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 0002c1b0 080002a0 080002a0 000012a0 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .rodata 00004c54 0802c450 0802c450 0002d450 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .ARM 00000008 080310a4 080310a4 000320a4 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .init_array 00000004 080310ac 080310ac 000320ac 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 5 .fini_array 00000004 080310b0 080310b0 000320b0 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 6 .data 00000224 24000000 080310b4 00033000 2**2 CONTENTS, ALLOC, LOAD, DATA 7 .bss 0002af64 24000224 080312d8 00033224 2**2 ALLOC 8 ._user_heap_stack 00000600 2402b188 080312d8 00034188 2**0 ALLOC 9 .lwip_sec 000193fb 2402b788 080312d8 00033788 2**2 ALLOC 10 .ARM.attributes 0000002e 00000000 00000000 00033224 2**0 CONTENTS, READONLY 11 .debug_info 00050ec2 00000000 00000000 00033252 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 12 .debug_abbrev 0000b5ee 00000000 00000000 00084114 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 13 .debug_aranges 00003788 00000000 00000000 0008f708 2**3 CONTENTS, READONLY, DEBUGGING, OCTETS 14 .debug_rnglists 00002c6b 00000000 00000000 00092e90 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 15 .debug_macro 0004f03f 00000000 00000000 00095afb 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 16 .debug_line 000570dd 00000000 00000000 000e4b3a 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 17 .debug_str 0018e539 00000000 00000000 0013bc17 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 18 .comment 00000043 00000000 00000000 002ca150 2**0 CONTENTS, READONLY 19 .debug_frame 0000f94c 00000000 00000000 002ca194 2**2 CONTENTS, READONLY, DEBUGGING, OCTETS 20 .debug_line_str 00000064 00000000 00000000 002d9ae0 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: 0802c438 .word 0x0802c438 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: 0802c438 .word 0x0802c438 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: 08030ce8 .word 0x08030ce8 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: f029 f8b7 bl 8029cf0 } 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: f028 f944 bl 8028fc4 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: f028 fc9b bl 8029d00 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: 0802c488 .word 0x0802c488 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: f028 fba6 bl 8029d00 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: f028 fb85 bl 8029d00 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: f028 fb64 bl 8029d00 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: 0802c45c .word 0x0802c45c 8001740: 0802c48c .word 0x0802c48c 8001744: 0802c494 .word 0x0802c494 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
: /** * @brief The application entry point. * @retval int */ int main(void) { 8001cb8: b580 push {r7, lr} 8001cba: b084 sub sp, #16 8001cbc: af00 add r7, sp, #0 /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MPU Configuration--------------------------------------------------------*/ MPU_Config(); 8001cbe: f000 fbb3 bl 8002428 \details Turns on I-Cache */ __STATIC_FORCEINLINE void SCB_EnableICache (void) { #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */ 8001cc2: 4b4c ldr r3, [pc, #304] @ (8001df4 ) 8001cc4: 695b ldr r3, [r3, #20] 8001cc6: f403 3300 and.w r3, r3, #131072 @ 0x20000 8001cca: 2b00 cmp r3, #0 8001ccc: d11b bne.n 8001d06 \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"); 8001cce: f3bf 8f4f dsb sy } 8001cd2: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8001cd4: f3bf 8f6f isb sy } 8001cd8: bf00 nop __DSB(); __ISB(); SCB->ICIALLU = 0UL; /* invalidate I-Cache */ 8001cda: 4b46 ldr r3, [pc, #280] @ (8001df4 ) 8001cdc: 2200 movs r2, #0 8001cde: f8c3 2250 str.w r2, [r3, #592] @ 0x250 __ASM volatile ("dsb 0xF":::"memory"); 8001ce2: f3bf 8f4f dsb sy } 8001ce6: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8001ce8: f3bf 8f6f isb sy } 8001cec: bf00 nop __DSB(); __ISB(); SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */ 8001cee: 4b41 ldr r3, [pc, #260] @ (8001df4 ) 8001cf0: 695b ldr r3, [r3, #20] 8001cf2: 4a40 ldr r2, [pc, #256] @ (8001df4 ) 8001cf4: f443 3300 orr.w r3, r3, #131072 @ 0x20000 8001cf8: 6153 str r3, [r2, #20] __ASM volatile ("dsb 0xF":::"memory"); 8001cfa: f3bf 8f4f dsb sy } 8001cfe: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8001d00: f3bf 8f6f isb sy } 8001d04: e000 b.n 8001d08 if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */ 8001d06: bf00 nop #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) uint32_t ccsidr; uint32_t sets; uint32_t ways; if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */ 8001d08: 4b3a ldr r3, [pc, #232] @ (8001df4 ) 8001d0a: 695b ldr r3, [r3, #20] 8001d0c: f403 3380 and.w r3, r3, #65536 @ 0x10000 8001d10: 2b00 cmp r3, #0 8001d12: d138 bne.n 8001d86 SCB->CSSELR = 0U; /* select Level 1 data cache */ 8001d14: 4b37 ldr r3, [pc, #220] @ (8001df4 ) 8001d16: 2200 movs r2, #0 8001d18: f8c3 2084 str.w r2, [r3, #132] @ 0x84 __ASM volatile ("dsb 0xF":::"memory"); 8001d1c: f3bf 8f4f dsb sy } 8001d20: bf00 nop __DSB(); ccsidr = SCB->CCSIDR; 8001d22: 4b34 ldr r3, [pc, #208] @ (8001df4 ) 8001d24: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 8001d28: 60fb str r3, [r7, #12] /* invalidate D-Cache */ sets = (uint32_t)(CCSIDR_SETS(ccsidr)); 8001d2a: 68fb ldr r3, [r7, #12] 8001d2c: 0b5b lsrs r3, r3, #13 8001d2e: f3c3 030e ubfx r3, r3, #0, #15 8001d32: 60bb str r3, [r7, #8] do { ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); 8001d34: 68fb ldr r3, [r7, #12] 8001d36: 08db lsrs r3, r3, #3 8001d38: f3c3 0309 ubfx r3, r3, #0, #10 8001d3c: 607b str r3, [r7, #4] do { SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | 8001d3e: 68bb ldr r3, [r7, #8] 8001d40: 015a lsls r2, r3, #5 8001d42: f643 73e0 movw r3, #16352 @ 0x3fe0 8001d46: 4013 ands r3, r2 ((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) ); 8001d48: 687a ldr r2, [r7, #4] 8001d4a: 0792 lsls r2, r2, #30 SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | 8001d4c: 4929 ldr r1, [pc, #164] @ (8001df4 ) 8001d4e: 4313 orrs r3, r2 8001d50: f8c1 3260 str.w r3, [r1, #608] @ 0x260 #if defined ( __CC_ARM ) __schedule_barrier(); #endif } while (ways-- != 0U); 8001d54: 687b ldr r3, [r7, #4] 8001d56: 1e5a subs r2, r3, #1 8001d58: 607a str r2, [r7, #4] 8001d5a: 2b00 cmp r3, #0 8001d5c: d1ef bne.n 8001d3e } while(sets-- != 0U); 8001d5e: 68bb ldr r3, [r7, #8] 8001d60: 1e5a subs r2, r3, #1 8001d62: 60ba str r2, [r7, #8] 8001d64: 2b00 cmp r3, #0 8001d66: d1e5 bne.n 8001d34 __ASM volatile ("dsb 0xF":::"memory"); 8001d68: f3bf 8f4f dsb sy } 8001d6c: bf00 nop __DSB(); SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */ 8001d6e: 4b21 ldr r3, [pc, #132] @ (8001df4 ) 8001d70: 695b ldr r3, [r3, #20] 8001d72: 4a20 ldr r2, [pc, #128] @ (8001df4 ) 8001d74: f443 3380 orr.w r3, r3, #65536 @ 0x10000 8001d78: 6153 str r3, [r2, #20] __ASM volatile ("dsb 0xF":::"memory"); 8001d7a: f3bf 8f4f dsb sy } 8001d7e: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8001d80: f3bf 8f6f isb sy } 8001d84: e000 b.n 8001d88 if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */ 8001d86: bf00 nop SCB_EnableDCache(); /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); 8001d88: f003 f902 bl 8004f90 /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); 8001d8c: f000 f83e bl 8001e0c /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); 8001d90: f000 faac bl 80022ec MX_DMA_Init(); 8001d94: f000 fa82 bl 800229c MX_UART8_Init(); 8001d98: f000 f8f4 bl 8001f84 MX_CRC_Init(); 8001d9c: f000 f8b2 bl 8001f04 MX_RNG_Init(); 8001da0: f000 f8da bl 8001f58 MX_USART1_UART_Init(); 8001da4: f000 f93a bl 800201c MX_USART2_UART_Init(); 8001da8: f000 f988 bl 80020bc MX_USART3_UART_Init(); 8001dac: f000 f9d6 bl 800215c MX_USART6_UART_Init(); 8001db0: f000 fa24 bl 80021fc // HAL_DMA_RegisterCallback(&hdma_uart8_rx, HAL_DMA_XFER_CPLT_CB_ID, dmaCallback); /* USER CODE END 2 */ /* Init scheduler */ osKernelInitialize(); 8001db4: f00e fce8 bl 8010788 /* USER CODE BEGIN RTOS_MUTEX */ /* add mutexes, ... */ resMeasurementsMutex = osMutexNew (NULL); 8001db8: 2000 movs r0, #0 8001dba: f00e fdfd bl 80109b8 8001dbe: 4603 mov r3, r0 8001dc0: 4a0d ldr r2, [pc, #52] @ (8001df8 ) 8001dc2: 6013 str r3, [r2, #0] sensorsInfoMutex = osMutexNew (NULL); 8001dc4: 2000 movs r0, #0 8001dc6: f00e fdf7 bl 80109b8 8001dca: 4603 mov r3, r0 8001dcc: 4a0b ldr r2, [pc, #44] @ (8001dfc ) 8001dce: 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); 8001dd0: 4a0b ldr r2, [pc, #44] @ (8001e00 ) 8001dd2: 2100 movs r1, #0 8001dd4: 480b ldr r0, [pc, #44] @ (8001e04 ) 8001dd6: f00e fd36 bl 8010846 8001dda: 4603 mov r3, r0 8001ddc: 4a0a ldr r2, [pc, #40] @ (8001e08 ) 8001dde: 6013 str r3, [r2, #0] /* USER CODE BEGIN RTOS_THREADS */ /* add threads, ... */ mqtt_cli_init(); 8001de0: f001 f8ae bl 8002f40 // Uart8TasksInit(); UartTasksInit(); 8001de4: f001 ffda bl 8003d9c #ifdef USER_MOCKS MockMeasurmetsTaskInit(); #else MeasurmentsReqSchedulerTaskInit(); 8001de8: f002 ff20 bl 8004c2c /* USER CODE BEGIN RTOS_EVENTS */ /* add events, ... */ /* USER CODE END RTOS_EVENTS */ /* Start scheduler */ osKernelStart(); 8001dec: f00e fcf0 bl 80107d0 /* We should never get here as control is now taken by the scheduler */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) 8001df0: bf00 nop 8001df2: e7fd b.n 8001df0 8001df4: e000ed00 .word 0xe000ed00 8001df8: 24002168 .word 0x24002168 8001dfc: 2400216c .word 0x2400216c 8001e00: 08030990 .word 0x08030990 8001e04: 08002411 .word 0x08002411 8001e08: 24000654 .word 0x24000654 08001e0c : /** * @brief System Clock Configuration * @retval None */ void SystemClock_Config(void) { 8001e0c: b580 push {r7, lr} 8001e0e: b09c sub sp, #112 @ 0x70 8001e10: af00 add r7, sp, #0 RCC_OscInitTypeDef RCC_OscInitStruct = {0}; 8001e12: f107 0324 add.w r3, r7, #36 @ 0x24 8001e16: 224c movs r2, #76 @ 0x4c 8001e18: 2100 movs r1, #0 8001e1a: 4618 mov r0, r3 8001e1c: f027 ff68 bl 8029cf0 RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; 8001e20: 1d3b adds r3, r7, #4 8001e22: 2220 movs r2, #32 8001e24: 2100 movs r1, #0 8001e26: 4618 mov r0, r3 8001e28: f027 ff62 bl 8029cf0 /** Supply configuration update enable */ HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY); 8001e2c: 2002 movs r0, #2 8001e2e: f007 fdf9 bl 8009a24 /** Configure the main internal regulator output voltage */ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); 8001e32: 2300 movs r3, #0 8001e34: 603b str r3, [r7, #0] 8001e36: 4b31 ldr r3, [pc, #196] @ (8001efc ) 8001e38: 6adb ldr r3, [r3, #44] @ 0x2c 8001e3a: 4a30 ldr r2, [pc, #192] @ (8001efc ) 8001e3c: f023 0301 bic.w r3, r3, #1 8001e40: 62d3 str r3, [r2, #44] @ 0x2c 8001e42: 4b2e ldr r3, [pc, #184] @ (8001efc ) 8001e44: 6adb ldr r3, [r3, #44] @ 0x2c 8001e46: f003 0301 and.w r3, r3, #1 8001e4a: 603b str r3, [r7, #0] 8001e4c: 4b2c ldr r3, [pc, #176] @ (8001f00 ) 8001e4e: 699b ldr r3, [r3, #24] 8001e50: 4a2b ldr r2, [pc, #172] @ (8001f00 ) 8001e52: f443 4340 orr.w r3, r3, #49152 @ 0xc000 8001e56: 6193 str r3, [r2, #24] 8001e58: 4b29 ldr r3, [pc, #164] @ (8001f00 ) 8001e5a: 699b ldr r3, [r3, #24] 8001e5c: f403 4340 and.w r3, r3, #49152 @ 0xc000 8001e60: 603b str r3, [r7, #0] 8001e62: 683b ldr r3, [r7, #0] while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {} 8001e64: bf00 nop 8001e66: 4b26 ldr r3, [pc, #152] @ (8001f00 ) 8001e68: 699b ldr r3, [r3, #24] 8001e6a: f403 5300 and.w r3, r3, #8192 @ 0x2000 8001e6e: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 8001e72: d1f8 bne.n 8001e66 /** Initializes the RCC Oscillators according to the specified parameters * in the RCC_OscInitTypeDef structure. */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48|RCC_OSCILLATORTYPE_HSE; 8001e74: 2321 movs r3, #33 @ 0x21 8001e76: 627b str r3, [r7, #36] @ 0x24 RCC_OscInitStruct.HSEState = RCC_HSE_ON; 8001e78: f44f 3380 mov.w r3, #65536 @ 0x10000 8001e7c: 62bb str r3, [r7, #40] @ 0x28 RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; 8001e7e: 2301 movs r3, #1 8001e80: 63fb str r3, [r7, #60] @ 0x3c RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; 8001e82: 2302 movs r3, #2 8001e84: 64bb str r3, [r7, #72] @ 0x48 RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; 8001e86: 2302 movs r3, #2 8001e88: 64fb str r3, [r7, #76] @ 0x4c RCC_OscInitStruct.PLL.PLLM = 5; 8001e8a: 2305 movs r3, #5 8001e8c: 653b str r3, [r7, #80] @ 0x50 RCC_OscInitStruct.PLL.PLLN = 160; 8001e8e: 23a0 movs r3, #160 @ 0xa0 8001e90: 657b str r3, [r7, #84] @ 0x54 RCC_OscInitStruct.PLL.PLLP = 2; 8001e92: 2302 movs r3, #2 8001e94: 65bb str r3, [r7, #88] @ 0x58 RCC_OscInitStruct.PLL.PLLQ = 2; 8001e96: 2302 movs r3, #2 8001e98: 65fb str r3, [r7, #92] @ 0x5c RCC_OscInitStruct.PLL.PLLR = 2; 8001e9a: 2302 movs r3, #2 8001e9c: 663b str r3, [r7, #96] @ 0x60 RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_2; 8001e9e: 2308 movs r3, #8 8001ea0: 667b str r3, [r7, #100] @ 0x64 RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE; 8001ea2: 2300 movs r3, #0 8001ea4: 66bb str r3, [r7, #104] @ 0x68 RCC_OscInitStruct.PLL.PLLFRACN = 0; 8001ea6: 2300 movs r3, #0 8001ea8: 66fb str r3, [r7, #108] @ 0x6c if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) 8001eaa: f107 0324 add.w r3, r7, #36 @ 0x24 8001eae: 4618 mov r0, r3 8001eb0: f007 fdf2 bl 8009a98 8001eb4: 4603 mov r3, r0 8001eb6: 2b00 cmp r3, #0 8001eb8: d001 beq.n 8001ebe { Error_Handler(); 8001eba: f000 fb25 bl 8002508 } /** Initializes the CPU, AHB and APB buses clocks */ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK 8001ebe: 233f movs r3, #63 @ 0x3f 8001ec0: 607b str r3, [r7, #4] |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2 |RCC_CLOCKTYPE_D3PCLK1|RCC_CLOCKTYPE_D1PCLK1; RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; 8001ec2: 2303 movs r3, #3 8001ec4: 60bb str r3, [r7, #8] RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1; 8001ec6: 2300 movs r3, #0 8001ec8: 60fb str r3, [r7, #12] RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2; 8001eca: 2308 movs r3, #8 8001ecc: 613b str r3, [r7, #16] RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2; 8001ece: 2340 movs r3, #64 @ 0x40 8001ed0: 617b str r3, [r7, #20] RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2; 8001ed2: 2340 movs r3, #64 @ 0x40 8001ed4: 61bb str r3, [r7, #24] RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2; 8001ed6: f44f 6380 mov.w r3, #1024 @ 0x400 8001eda: 61fb str r3, [r7, #28] RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2; 8001edc: 2340 movs r3, #64 @ 0x40 8001ede: 623b str r3, [r7, #32] if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) 8001ee0: 1d3b adds r3, r7, #4 8001ee2: 2102 movs r1, #2 8001ee4: 4618 mov r0, r3 8001ee6: f008 fa31 bl 800a34c 8001eea: 4603 mov r3, r0 8001eec: 2b00 cmp r3, #0 8001eee: d001 beq.n 8001ef4 { Error_Handler(); 8001ef0: f000 fb0a bl 8002508 } } 8001ef4: bf00 nop 8001ef6: 3770 adds r7, #112 @ 0x70 8001ef8: 46bd mov sp, r7 8001efa: bd80 pop {r7, pc} 8001efc: 58000400 .word 0x58000400 8001f00: 58024800 .word 0x58024800 08001f04 : * @brief CRC Initialization Function * @param None * @retval None */ static void MX_CRC_Init(void) { 8001f04: b580 push {r7, lr} 8001f06: 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; 8001f08: 4b11 ldr r3, [pc, #68] @ (8001f50 ) 8001f0a: 4a12 ldr r2, [pc, #72] @ (8001f54 ) 8001f0c: 601a str r2, [r3, #0] hcrc.Init.DefaultPolynomialUse = DEFAULT_POLYNOMIAL_DISABLE; 8001f0e: 4b10 ldr r3, [pc, #64] @ (8001f50 ) 8001f10: 2201 movs r2, #1 8001f12: 711a strb r2, [r3, #4] hcrc.Init.DefaultInitValueUse = DEFAULT_INIT_VALUE_ENABLE; 8001f14: 4b0e ldr r3, [pc, #56] @ (8001f50 ) 8001f16: 2200 movs r2, #0 8001f18: 715a strb r2, [r3, #5] hcrc.Init.GeneratingPolynomial = 4129; 8001f1a: 4b0d ldr r3, [pc, #52] @ (8001f50 ) 8001f1c: f241 0221 movw r2, #4129 @ 0x1021 8001f20: 609a str r2, [r3, #8] hcrc.Init.CRCLength = CRC_POLYLENGTH_16B; 8001f22: 4b0b ldr r3, [pc, #44] @ (8001f50 ) 8001f24: 2208 movs r2, #8 8001f26: 60da str r2, [r3, #12] hcrc.Init.InputDataInversionMode = CRC_INPUTDATA_INVERSION_NONE; 8001f28: 4b09 ldr r3, [pc, #36] @ (8001f50 ) 8001f2a: 2200 movs r2, #0 8001f2c: 615a str r2, [r3, #20] hcrc.Init.OutputDataInversionMode = CRC_OUTPUTDATA_INVERSION_DISABLE; 8001f2e: 4b08 ldr r3, [pc, #32] @ (8001f50 ) 8001f30: 2200 movs r2, #0 8001f32: 619a str r2, [r3, #24] hcrc.InputDataFormat = CRC_INPUTDATA_FORMAT_BYTES; 8001f34: 4b06 ldr r3, [pc, #24] @ (8001f50 ) 8001f36: 2201 movs r2, #1 8001f38: 621a str r2, [r3, #32] if (HAL_CRC_Init(&hcrc) != HAL_OK) 8001f3a: 4805 ldr r0, [pc, #20] @ (8001f50 ) 8001f3c: f003 fa20 bl 8005380 8001f40: 4603 mov r3, r0 8001f42: 2b00 cmp r3, #0 8001f44: d001 beq.n 8001f4a { Error_Handler(); 8001f46: f000 fadf bl 8002508 } /* USER CODE BEGIN CRC_Init 2 */ /* USER CODE END CRC_Init 2 */ } 8001f4a: bf00 nop 8001f4c: bd80 pop {r7, pc} 8001f4e: bf00 nop 8001f50: 24000248 .word 0x24000248 8001f54: 58024c00 .word 0x58024c00 08001f58 : * @brief RNG Initialization Function * @param None * @retval None */ static void MX_RNG_Init(void) { 8001f58: b580 push {r7, lr} 8001f5a: 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; 8001f5c: 4b07 ldr r3, [pc, #28] @ (8001f7c ) 8001f5e: 4a08 ldr r2, [pc, #32] @ (8001f80 ) 8001f60: 601a str r2, [r3, #0] hrng.Init.ClockErrorDetection = RNG_CED_ENABLE; 8001f62: 4b06 ldr r3, [pc, #24] @ (8001f7c ) 8001f64: 2200 movs r2, #0 8001f66: 605a str r2, [r3, #4] if (HAL_RNG_Init(&hrng) != HAL_OK) 8001f68: 4804 ldr r0, [pc, #16] @ (8001f7c ) 8001f6a: f00a fbcd bl 800c708 8001f6e: 4603 mov r3, r0 8001f70: 2b00 cmp r3, #0 8001f72: d001 beq.n 8001f78 { Error_Handler(); 8001f74: f000 fac8 bl 8002508 } /* USER CODE BEGIN RNG_Init 2 */ /* USER CODE END RNG_Init 2 */ } 8001f78: bf00 nop 8001f7a: bd80 pop {r7, pc} 8001f7c: 2400026c .word 0x2400026c 8001f80: 48021800 .word 0x48021800 08001f84 : * @brief UART8 Initialization Function * @param None * @retval None */ static void MX_UART8_Init(void) { 8001f84: b580 push {r7, lr} 8001f86: 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; 8001f88: 4b22 ldr r3, [pc, #136] @ (8002014 ) 8001f8a: 4a23 ldr r2, [pc, #140] @ (8002018 ) 8001f8c: 601a str r2, [r3, #0] huart8.Init.BaudRate = 115200; 8001f8e: 4b21 ldr r3, [pc, #132] @ (8002014 ) 8001f90: f44f 32e1 mov.w r2, #115200 @ 0x1c200 8001f94: 605a str r2, [r3, #4] huart8.Init.WordLength = UART_WORDLENGTH_8B; 8001f96: 4b1f ldr r3, [pc, #124] @ (8002014 ) 8001f98: 2200 movs r2, #0 8001f9a: 609a str r2, [r3, #8] huart8.Init.StopBits = UART_STOPBITS_1; 8001f9c: 4b1d ldr r3, [pc, #116] @ (8002014 ) 8001f9e: 2200 movs r2, #0 8001fa0: 60da str r2, [r3, #12] huart8.Init.Parity = UART_PARITY_NONE; 8001fa2: 4b1c ldr r3, [pc, #112] @ (8002014 ) 8001fa4: 2200 movs r2, #0 8001fa6: 611a str r2, [r3, #16] huart8.Init.Mode = UART_MODE_TX_RX; 8001fa8: 4b1a ldr r3, [pc, #104] @ (8002014 ) 8001faa: 220c movs r2, #12 8001fac: 615a str r2, [r3, #20] huart8.Init.HwFlowCtl = UART_HWCONTROL_NONE; 8001fae: 4b19 ldr r3, [pc, #100] @ (8002014 ) 8001fb0: 2200 movs r2, #0 8001fb2: 619a str r2, [r3, #24] huart8.Init.OverSampling = UART_OVERSAMPLING_16; 8001fb4: 4b17 ldr r3, [pc, #92] @ (8002014 ) 8001fb6: 2200 movs r2, #0 8001fb8: 61da str r2, [r3, #28] huart8.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 8001fba: 4b16 ldr r3, [pc, #88] @ (8002014 ) 8001fbc: 2200 movs r2, #0 8001fbe: 621a str r2, [r3, #32] huart8.Init.ClockPrescaler = UART_PRESCALER_DIV1; 8001fc0: 4b14 ldr r3, [pc, #80] @ (8002014 ) 8001fc2: 2200 movs r2, #0 8001fc4: 625a str r2, [r3, #36] @ 0x24 huart8.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; 8001fc6: 4b13 ldr r3, [pc, #76] @ (8002014 ) 8001fc8: 2200 movs r2, #0 8001fca: 629a str r2, [r3, #40] @ 0x28 if (HAL_UART_Init(&huart8) != HAL_OK) 8001fcc: 4811 ldr r0, [pc, #68] @ (8002014 ) 8001fce: f00a ff21 bl 800ce14 8001fd2: 4603 mov r3, r0 8001fd4: 2b00 cmp r3, #0 8001fd6: d001 beq.n 8001fdc { Error_Handler(); 8001fd8: f000 fa96 bl 8002508 } if (HAL_UARTEx_SetTxFifoThreshold(&huart8, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) 8001fdc: 2100 movs r1, #0 8001fde: 480d ldr r0, [pc, #52] @ (8002014 ) 8001fe0: f00d fbc1 bl 800f766 8001fe4: 4603 mov r3, r0 8001fe6: 2b00 cmp r3, #0 8001fe8: d001 beq.n 8001fee { Error_Handler(); 8001fea: f000 fa8d bl 8002508 } if (HAL_UARTEx_SetRxFifoThreshold(&huart8, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) 8001fee: 2100 movs r1, #0 8001ff0: 4808 ldr r0, [pc, #32] @ (8002014 ) 8001ff2: f00d fbf6 bl 800f7e2 8001ff6: 4603 mov r3, r0 8001ff8: 2b00 cmp r3, #0 8001ffa: d001 beq.n 8002000 { Error_Handler(); 8001ffc: f000 fa84 bl 8002508 } if (HAL_UARTEx_DisableFifoMode(&huart8) != HAL_OK) 8002000: 4804 ldr r0, [pc, #16] @ (8002014 ) 8002002: f00d fb77 bl 800f6f4 8002006: 4603 mov r3, r0 8002008: 2b00 cmp r3, #0 800200a: d001 beq.n 8002010 { Error_Handler(); 800200c: f000 fa7c bl 8002508 } /* USER CODE BEGIN UART8_Init 2 */ /* USER CODE END UART8_Init 2 */ } 8002010: bf00 nop 8002012: bd80 pop {r7, pc} 8002014: 24000280 .word 0x24000280 8002018: 40007c00 .word 0x40007c00 0800201c : * @brief USART1 Initialization Function * @param None * @retval None */ static void MX_USART1_UART_Init(void) { 800201c: b580 push {r7, lr} 800201e: 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; 8002020: 4b24 ldr r3, [pc, #144] @ (80020b4 ) 8002022: 4a25 ldr r2, [pc, #148] @ (80020b8 ) 8002024: 601a str r2, [r3, #0] huart1.Init.BaudRate = 115200; 8002026: 4b23 ldr r3, [pc, #140] @ (80020b4 ) 8002028: f44f 32e1 mov.w r2, #115200 @ 0x1c200 800202c: 605a str r2, [r3, #4] huart1.Init.WordLength = UART_WORDLENGTH_8B; 800202e: 4b21 ldr r3, [pc, #132] @ (80020b4 ) 8002030: 2200 movs r2, #0 8002032: 609a str r2, [r3, #8] huart1.Init.StopBits = UART_STOPBITS_1; 8002034: 4b1f ldr r3, [pc, #124] @ (80020b4 ) 8002036: 2200 movs r2, #0 8002038: 60da str r2, [r3, #12] huart1.Init.Parity = UART_PARITY_NONE; 800203a: 4b1e ldr r3, [pc, #120] @ (80020b4 ) 800203c: 2200 movs r2, #0 800203e: 611a str r2, [r3, #16] huart1.Init.Mode = UART_MODE_TX_RX; 8002040: 4b1c ldr r3, [pc, #112] @ (80020b4 ) 8002042: 220c movs r2, #12 8002044: 615a str r2, [r3, #20] huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE; 8002046: 4b1b ldr r3, [pc, #108] @ (80020b4 ) 8002048: 2200 movs r2, #0 800204a: 619a str r2, [r3, #24] huart1.Init.OverSampling = UART_OVERSAMPLING_16; 800204c: 4b19 ldr r3, [pc, #100] @ (80020b4 ) 800204e: 2200 movs r2, #0 8002050: 61da str r2, [r3, #28] huart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 8002052: 4b18 ldr r3, [pc, #96] @ (80020b4 ) 8002054: 2200 movs r2, #0 8002056: 621a str r2, [r3, #32] huart1.Init.ClockPrescaler = UART_PRESCALER_DIV1; 8002058: 4b16 ldr r3, [pc, #88] @ (80020b4 ) 800205a: 2200 movs r2, #0 800205c: 625a str r2, [r3, #36] @ 0x24 huart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_RXINVERT_INIT; 800205e: 4b15 ldr r3, [pc, #84] @ (80020b4 ) 8002060: 2202 movs r2, #2 8002062: 629a str r2, [r3, #40] @ 0x28 huart1.AdvancedInit.RxPinLevelInvert = UART_ADVFEATURE_RXINV_ENABLE; 8002064: 4b13 ldr r3, [pc, #76] @ (80020b4 ) 8002066: f44f 3280 mov.w r2, #65536 @ 0x10000 800206a: 631a str r2, [r3, #48] @ 0x30 if (HAL_UART_Init(&huart1) != HAL_OK) 800206c: 4811 ldr r0, [pc, #68] @ (80020b4 ) 800206e: f00a fed1 bl 800ce14 8002072: 4603 mov r3, r0 8002074: 2b00 cmp r3, #0 8002076: d001 beq.n 800207c { Error_Handler(); 8002078: f000 fa46 bl 8002508 } if (HAL_UARTEx_SetTxFifoThreshold(&huart1, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) 800207c: 2100 movs r1, #0 800207e: 480d ldr r0, [pc, #52] @ (80020b4 ) 8002080: f00d fb71 bl 800f766 8002084: 4603 mov r3, r0 8002086: 2b00 cmp r3, #0 8002088: d001 beq.n 800208e { Error_Handler(); 800208a: f000 fa3d bl 8002508 } if (HAL_UARTEx_SetRxFifoThreshold(&huart1, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) 800208e: 2100 movs r1, #0 8002090: 4808 ldr r0, [pc, #32] @ (80020b4 ) 8002092: f00d fba6 bl 800f7e2 8002096: 4603 mov r3, r0 8002098: 2b00 cmp r3, #0 800209a: d001 beq.n 80020a0 { Error_Handler(); 800209c: f000 fa34 bl 8002508 } if (HAL_UARTEx_DisableFifoMode(&huart1) != HAL_OK) 80020a0: 4804 ldr r0, [pc, #16] @ (80020b4 ) 80020a2: f00d fb27 bl 800f6f4 80020a6: 4603 mov r3, r0 80020a8: 2b00 cmp r3, #0 80020aa: d001 beq.n 80020b0 { Error_Handler(); 80020ac: f000 fa2c bl 8002508 } /* USER CODE BEGIN USART1_Init 2 */ /* USER CODE END USART1_Init 2 */ } 80020b0: bf00 nop 80020b2: bd80 pop {r7, pc} 80020b4: 24000314 .word 0x24000314 80020b8: 40011000 .word 0x40011000 080020bc : * @brief USART2 Initialization Function * @param None * @retval None */ static void MX_USART2_UART_Init(void) { 80020bc: b580 push {r7, lr} 80020be: 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; 80020c0: 4b24 ldr r3, [pc, #144] @ (8002154 ) 80020c2: 4a25 ldr r2, [pc, #148] @ (8002158 ) 80020c4: 601a str r2, [r3, #0] huart2.Init.BaudRate = 115200; 80020c6: 4b23 ldr r3, [pc, #140] @ (8002154 ) 80020c8: f44f 32e1 mov.w r2, #115200 @ 0x1c200 80020cc: 605a str r2, [r3, #4] huart2.Init.WordLength = UART_WORDLENGTH_8B; 80020ce: 4b21 ldr r3, [pc, #132] @ (8002154 ) 80020d0: 2200 movs r2, #0 80020d2: 609a str r2, [r3, #8] huart2.Init.StopBits = UART_STOPBITS_1; 80020d4: 4b1f ldr r3, [pc, #124] @ (8002154 ) 80020d6: 2200 movs r2, #0 80020d8: 60da str r2, [r3, #12] huart2.Init.Parity = UART_PARITY_NONE; 80020da: 4b1e ldr r3, [pc, #120] @ (8002154 ) 80020dc: 2200 movs r2, #0 80020de: 611a str r2, [r3, #16] huart2.Init.Mode = UART_MODE_TX_RX; 80020e0: 4b1c ldr r3, [pc, #112] @ (8002154 ) 80020e2: 220c movs r2, #12 80020e4: 615a str r2, [r3, #20] huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE; 80020e6: 4b1b ldr r3, [pc, #108] @ (8002154 ) 80020e8: 2200 movs r2, #0 80020ea: 619a str r2, [r3, #24] huart2.Init.OverSampling = UART_OVERSAMPLING_16; 80020ec: 4b19 ldr r3, [pc, #100] @ (8002154 ) 80020ee: 2200 movs r2, #0 80020f0: 61da str r2, [r3, #28] huart2.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 80020f2: 4b18 ldr r3, [pc, #96] @ (8002154 ) 80020f4: 2200 movs r2, #0 80020f6: 621a str r2, [r3, #32] huart2.Init.ClockPrescaler = UART_PRESCALER_DIV1; 80020f8: 4b16 ldr r3, [pc, #88] @ (8002154 ) 80020fa: 2200 movs r2, #0 80020fc: 625a str r2, [r3, #36] @ 0x24 huart2.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_RXINVERT_INIT; 80020fe: 4b15 ldr r3, [pc, #84] @ (8002154 ) 8002100: 2202 movs r2, #2 8002102: 629a str r2, [r3, #40] @ 0x28 huart2.AdvancedInit.RxPinLevelInvert = UART_ADVFEATURE_RXINV_ENABLE; 8002104: 4b13 ldr r3, [pc, #76] @ (8002154 ) 8002106: f44f 3280 mov.w r2, #65536 @ 0x10000 800210a: 631a str r2, [r3, #48] @ 0x30 if (HAL_UART_Init(&huart2) != HAL_OK) 800210c: 4811 ldr r0, [pc, #68] @ (8002154 ) 800210e: f00a fe81 bl 800ce14 8002112: 4603 mov r3, r0 8002114: 2b00 cmp r3, #0 8002116: d001 beq.n 800211c { Error_Handler(); 8002118: f000 f9f6 bl 8002508 } if (HAL_UARTEx_SetTxFifoThreshold(&huart2, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) 800211c: 2100 movs r1, #0 800211e: 480d ldr r0, [pc, #52] @ (8002154 ) 8002120: f00d fb21 bl 800f766 8002124: 4603 mov r3, r0 8002126: 2b00 cmp r3, #0 8002128: d001 beq.n 800212e { Error_Handler(); 800212a: f000 f9ed bl 8002508 } if (HAL_UARTEx_SetRxFifoThreshold(&huart2, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) 800212e: 2100 movs r1, #0 8002130: 4808 ldr r0, [pc, #32] @ (8002154 ) 8002132: f00d fb56 bl 800f7e2 8002136: 4603 mov r3, r0 8002138: 2b00 cmp r3, #0 800213a: d001 beq.n 8002140 { Error_Handler(); 800213c: f000 f9e4 bl 8002508 } if (HAL_UARTEx_DisableFifoMode(&huart2) != HAL_OK) 8002140: 4804 ldr r0, [pc, #16] @ (8002154 ) 8002142: f00d fad7 bl 800f6f4 8002146: 4603 mov r3, r0 8002148: 2b00 cmp r3, #0 800214a: d001 beq.n 8002150 { Error_Handler(); 800214c: f000 f9dc bl 8002508 } /* USER CODE BEGIN USART2_Init 2 */ /* USER CODE END USART2_Init 2 */ } 8002150: bf00 nop 8002152: bd80 pop {r7, pc} 8002154: 240003a8 .word 0x240003a8 8002158: 40004400 .word 0x40004400 0800215c : * @brief USART3 Initialization Function * @param None * @retval None */ static void MX_USART3_UART_Init(void) { 800215c: b580 push {r7, lr} 800215e: 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; 8002160: 4b24 ldr r3, [pc, #144] @ (80021f4 ) 8002162: 4a25 ldr r2, [pc, #148] @ (80021f8 ) 8002164: 601a str r2, [r3, #0] huart3.Init.BaudRate = 115200; 8002166: 4b23 ldr r3, [pc, #140] @ (80021f4 ) 8002168: f44f 32e1 mov.w r2, #115200 @ 0x1c200 800216c: 605a str r2, [r3, #4] huart3.Init.WordLength = UART_WORDLENGTH_8B; 800216e: 4b21 ldr r3, [pc, #132] @ (80021f4 ) 8002170: 2200 movs r2, #0 8002172: 609a str r2, [r3, #8] huart3.Init.StopBits = UART_STOPBITS_1; 8002174: 4b1f ldr r3, [pc, #124] @ (80021f4 ) 8002176: 2200 movs r2, #0 8002178: 60da str r2, [r3, #12] huart3.Init.Parity = UART_PARITY_NONE; 800217a: 4b1e ldr r3, [pc, #120] @ (80021f4 ) 800217c: 2200 movs r2, #0 800217e: 611a str r2, [r3, #16] huart3.Init.Mode = UART_MODE_TX_RX; 8002180: 4b1c ldr r3, [pc, #112] @ (80021f4 ) 8002182: 220c movs r2, #12 8002184: 615a str r2, [r3, #20] huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE; 8002186: 4b1b ldr r3, [pc, #108] @ (80021f4 ) 8002188: 2200 movs r2, #0 800218a: 619a str r2, [r3, #24] huart3.Init.OverSampling = UART_OVERSAMPLING_16; 800218c: 4b19 ldr r3, [pc, #100] @ (80021f4 ) 800218e: 2200 movs r2, #0 8002190: 61da str r2, [r3, #28] huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 8002192: 4b18 ldr r3, [pc, #96] @ (80021f4 ) 8002194: 2200 movs r2, #0 8002196: 621a str r2, [r3, #32] huart3.Init.ClockPrescaler = UART_PRESCALER_DIV1; 8002198: 4b16 ldr r3, [pc, #88] @ (80021f4 ) 800219a: 2200 movs r2, #0 800219c: 625a str r2, [r3, #36] @ 0x24 huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_RXINVERT_INIT; 800219e: 4b15 ldr r3, [pc, #84] @ (80021f4 ) 80021a0: 2202 movs r2, #2 80021a2: 629a str r2, [r3, #40] @ 0x28 huart3.AdvancedInit.RxPinLevelInvert = UART_ADVFEATURE_RXINV_ENABLE; 80021a4: 4b13 ldr r3, [pc, #76] @ (80021f4 ) 80021a6: f44f 3280 mov.w r2, #65536 @ 0x10000 80021aa: 631a str r2, [r3, #48] @ 0x30 if (HAL_UART_Init(&huart3) != HAL_OK) 80021ac: 4811 ldr r0, [pc, #68] @ (80021f4 ) 80021ae: f00a fe31 bl 800ce14 80021b2: 4603 mov r3, r0 80021b4: 2b00 cmp r3, #0 80021b6: d001 beq.n 80021bc { Error_Handler(); 80021b8: f000 f9a6 bl 8002508 } if (HAL_UARTEx_SetTxFifoThreshold(&huart3, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) 80021bc: 2100 movs r1, #0 80021be: 480d ldr r0, [pc, #52] @ (80021f4 ) 80021c0: f00d fad1 bl 800f766 80021c4: 4603 mov r3, r0 80021c6: 2b00 cmp r3, #0 80021c8: d001 beq.n 80021ce { Error_Handler(); 80021ca: f000 f99d bl 8002508 } if (HAL_UARTEx_SetRxFifoThreshold(&huart3, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) 80021ce: 2100 movs r1, #0 80021d0: 4808 ldr r0, [pc, #32] @ (80021f4 ) 80021d2: f00d fb06 bl 800f7e2 80021d6: 4603 mov r3, r0 80021d8: 2b00 cmp r3, #0 80021da: d001 beq.n 80021e0 { Error_Handler(); 80021dc: f000 f994 bl 8002508 } if (HAL_UARTEx_DisableFifoMode(&huart3) != HAL_OK) 80021e0: 4804 ldr r0, [pc, #16] @ (80021f4 ) 80021e2: f00d fa87 bl 800f6f4 80021e6: 4603 mov r3, r0 80021e8: 2b00 cmp r3, #0 80021ea: d001 beq.n 80021f0 { Error_Handler(); 80021ec: f000 f98c bl 8002508 } /* USER CODE BEGIN USART3_Init 2 */ /* USER CODE END USART3_Init 2 */ } 80021f0: bf00 nop 80021f2: bd80 pop {r7, pc} 80021f4: 2400043c .word 0x2400043c 80021f8: 40004800 .word 0x40004800 080021fc : * @brief USART6 Initialization Function * @param None * @retval None */ static void MX_USART6_UART_Init(void) { 80021fc: b580 push {r7, lr} 80021fe: 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; 8002200: 4b24 ldr r3, [pc, #144] @ (8002294 ) 8002202: 4a25 ldr r2, [pc, #148] @ (8002298 ) 8002204: 601a str r2, [r3, #0] huart6.Init.BaudRate = 115200; 8002206: 4b23 ldr r3, [pc, #140] @ (8002294 ) 8002208: f44f 32e1 mov.w r2, #115200 @ 0x1c200 800220c: 605a str r2, [r3, #4] huart6.Init.WordLength = UART_WORDLENGTH_8B; 800220e: 4b21 ldr r3, [pc, #132] @ (8002294 ) 8002210: 2200 movs r2, #0 8002212: 609a str r2, [r3, #8] huart6.Init.StopBits = UART_STOPBITS_1; 8002214: 4b1f ldr r3, [pc, #124] @ (8002294 ) 8002216: 2200 movs r2, #0 8002218: 60da str r2, [r3, #12] huart6.Init.Parity = UART_PARITY_NONE; 800221a: 4b1e ldr r3, [pc, #120] @ (8002294 ) 800221c: 2200 movs r2, #0 800221e: 611a str r2, [r3, #16] huart6.Init.Mode = UART_MODE_TX_RX; 8002220: 4b1c ldr r3, [pc, #112] @ (8002294 ) 8002222: 220c movs r2, #12 8002224: 615a str r2, [r3, #20] huart6.Init.HwFlowCtl = UART_HWCONTROL_NONE; 8002226: 4b1b ldr r3, [pc, #108] @ (8002294 ) 8002228: 2200 movs r2, #0 800222a: 619a str r2, [r3, #24] huart6.Init.OverSampling = UART_OVERSAMPLING_16; 800222c: 4b19 ldr r3, [pc, #100] @ (8002294 ) 800222e: 2200 movs r2, #0 8002230: 61da str r2, [r3, #28] huart6.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 8002232: 4b18 ldr r3, [pc, #96] @ (8002294 ) 8002234: 2200 movs r2, #0 8002236: 621a str r2, [r3, #32] huart6.Init.ClockPrescaler = UART_PRESCALER_DIV1; 8002238: 4b16 ldr r3, [pc, #88] @ (8002294 ) 800223a: 2200 movs r2, #0 800223c: 625a str r2, [r3, #36] @ 0x24 huart6.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_RXINVERT_INIT; 800223e: 4b15 ldr r3, [pc, #84] @ (8002294 ) 8002240: 2202 movs r2, #2 8002242: 629a str r2, [r3, #40] @ 0x28 huart6.AdvancedInit.RxPinLevelInvert = UART_ADVFEATURE_RXINV_ENABLE; 8002244: 4b13 ldr r3, [pc, #76] @ (8002294 ) 8002246: f44f 3280 mov.w r2, #65536 @ 0x10000 800224a: 631a str r2, [r3, #48] @ 0x30 if (HAL_UART_Init(&huart6) != HAL_OK) 800224c: 4811 ldr r0, [pc, #68] @ (8002294 ) 800224e: f00a fde1 bl 800ce14 8002252: 4603 mov r3, r0 8002254: 2b00 cmp r3, #0 8002256: d001 beq.n 800225c { Error_Handler(); 8002258: f000 f956 bl 8002508 } if (HAL_UARTEx_SetTxFifoThreshold(&huart6, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) 800225c: 2100 movs r1, #0 800225e: 480d ldr r0, [pc, #52] @ (8002294 ) 8002260: f00d fa81 bl 800f766 8002264: 4603 mov r3, r0 8002266: 2b00 cmp r3, #0 8002268: d001 beq.n 800226e { Error_Handler(); 800226a: f000 f94d bl 8002508 } if (HAL_UARTEx_SetRxFifoThreshold(&huart6, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) 800226e: 2100 movs r1, #0 8002270: 4808 ldr r0, [pc, #32] @ (8002294 ) 8002272: f00d fab6 bl 800f7e2 8002276: 4603 mov r3, r0 8002278: 2b00 cmp r3, #0 800227a: d001 beq.n 8002280 { Error_Handler(); 800227c: f000 f944 bl 8002508 } if (HAL_UARTEx_DisableFifoMode(&huart6) != HAL_OK) 8002280: 4804 ldr r0, [pc, #16] @ (8002294 ) 8002282: f00d fa37 bl 800f6f4 8002286: 4603 mov r3, r0 8002288: 2b00 cmp r3, #0 800228a: d001 beq.n 8002290 { Error_Handler(); 800228c: f000 f93c bl 8002508 } /* USER CODE BEGIN USART6_Init 2 */ /* USER CODE END USART6_Init 2 */ } 8002290: bf00 nop 8002292: bd80 pop {r7, pc} 8002294: 240004d0 .word 0x240004d0 8002298: 40011400 .word 0x40011400 0800229c : /** * Enable DMA controller clock */ static void MX_DMA_Init(void) { 800229c: b580 push {r7, lr} 800229e: b082 sub sp, #8 80022a0: af00 add r7, sp, #0 /* DMA controller clock enable */ __HAL_RCC_DMA2_CLK_ENABLE(); 80022a2: 4b11 ldr r3, [pc, #68] @ (80022e8 ) 80022a4: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 80022a8: 4a0f ldr r2, [pc, #60] @ (80022e8 ) 80022aa: f043 0302 orr.w r3, r3, #2 80022ae: f8c2 30d8 str.w r3, [r2, #216] @ 0xd8 80022b2: 4b0d ldr r3, [pc, #52] @ (80022e8 ) 80022b4: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 80022b8: f003 0302 and.w r3, r3, #2 80022bc: 607b str r3, [r7, #4] 80022be: 687b ldr r3, [r7, #4] /* DMA interrupt init */ /* DMA2_Stream6_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA2_Stream6_IRQn, 5, 0); 80022c0: 2200 movs r2, #0 80022c2: 2105 movs r1, #5 80022c4: 2045 movs r0, #69 @ 0x45 80022c6: f002 ffbb bl 8005240 HAL_NVIC_EnableIRQ(DMA2_Stream6_IRQn); 80022ca: 2045 movs r0, #69 @ 0x45 80022cc: f002 ffd2 bl 8005274 /* DMA2_Stream7_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA2_Stream7_IRQn, 5, 0); 80022d0: 2200 movs r2, #0 80022d2: 2105 movs r1, #5 80022d4: 2046 movs r0, #70 @ 0x46 80022d6: f002 ffb3 bl 8005240 HAL_NVIC_EnableIRQ(DMA2_Stream7_IRQn); 80022da: 2046 movs r0, #70 @ 0x46 80022dc: f002 ffca bl 8005274 } 80022e0: bf00 nop 80022e2: 3708 adds r7, #8 80022e4: 46bd mov sp, r7 80022e6: bd80 pop {r7, pc} 80022e8: 58024400 .word 0x58024400 080022ec : * @brief GPIO Initialization Function * @param None * @retval None */ static void MX_GPIO_Init(void) { 80022ec: b580 push {r7, lr} 80022ee: b08c sub sp, #48 @ 0x30 80022f0: af00 add r7, sp, #0 /* USER CODE BEGIN MX_GPIO_Init_1 */ GPIO_InitTypeDef GPIO_InitStruct = {0}; 80022f2: f107 031c add.w r3, r7, #28 80022f6: 2200 movs r2, #0 80022f8: 601a str r2, [r3, #0] 80022fa: 605a str r2, [r3, #4] 80022fc: 609a str r2, [r3, #8] 80022fe: 60da str r2, [r3, #12] 8002300: 611a str r2, [r3, #16] /* USER CODE END MX_GPIO_Init_1 */ /* GPIO Ports Clock Enable */ __HAL_RCC_GPIOH_CLK_ENABLE(); 8002302: 4b41 ldr r3, [pc, #260] @ (8002408 ) 8002304: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002308: 4a3f ldr r2, [pc, #252] @ (8002408 ) 800230a: f043 0380 orr.w r3, r3, #128 @ 0x80 800230e: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8002312: 4b3d ldr r3, [pc, #244] @ (8002408 ) 8002314: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002318: f003 0380 and.w r3, r3, #128 @ 0x80 800231c: 61bb str r3, [r7, #24] 800231e: 69bb ldr r3, [r7, #24] __HAL_RCC_GPIOC_CLK_ENABLE(); 8002320: 4b39 ldr r3, [pc, #228] @ (8002408 ) 8002322: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002326: 4a38 ldr r2, [pc, #224] @ (8002408 ) 8002328: f043 0304 orr.w r3, r3, #4 800232c: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8002330: 4b35 ldr r3, [pc, #212] @ (8002408 ) 8002332: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002336: f003 0304 and.w r3, r3, #4 800233a: 617b str r3, [r7, #20] 800233c: 697b ldr r3, [r7, #20] __HAL_RCC_GPIOA_CLK_ENABLE(); 800233e: 4b32 ldr r3, [pc, #200] @ (8002408 ) 8002340: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002344: 4a30 ldr r2, [pc, #192] @ (8002408 ) 8002346: f043 0301 orr.w r3, r3, #1 800234a: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 800234e: 4b2e ldr r3, [pc, #184] @ (8002408 ) 8002350: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002354: f003 0301 and.w r3, r3, #1 8002358: 613b str r3, [r7, #16] 800235a: 693b ldr r3, [r7, #16] __HAL_RCC_GPIOB_CLK_ENABLE(); 800235c: 4b2a ldr r3, [pc, #168] @ (8002408 ) 800235e: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002362: 4a29 ldr r2, [pc, #164] @ (8002408 ) 8002364: f043 0302 orr.w r3, r3, #2 8002368: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 800236c: 4b26 ldr r3, [pc, #152] @ (8002408 ) 800236e: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002372: f003 0302 and.w r3, r3, #2 8002376: 60fb str r3, [r7, #12] 8002378: 68fb ldr r3, [r7, #12] __HAL_RCC_GPIOD_CLK_ENABLE(); 800237a: 4b23 ldr r3, [pc, #140] @ (8002408 ) 800237c: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002380: 4a21 ldr r2, [pc, #132] @ (8002408 ) 8002382: f043 0308 orr.w r3, r3, #8 8002386: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 800238a: 4b1f ldr r3, [pc, #124] @ (8002408 ) 800238c: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002390: f003 0308 and.w r3, r3, #8 8002394: 60bb str r3, [r7, #8] 8002396: 68bb ldr r3, [r7, #8] __HAL_RCC_GPIOE_CLK_ENABLE(); 8002398: 4b1b ldr r3, [pc, #108] @ (8002408 ) 800239a: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 800239e: 4a1a ldr r2, [pc, #104] @ (8002408 ) 80023a0: f043 0310 orr.w r3, r3, #16 80023a4: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 80023a8: 4b17 ldr r3, [pc, #92] @ (8002408 ) 80023aa: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80023ae: f003 0310 and.w r3, r3, #16 80023b2: 607b str r3, [r7, #4] 80023b4: 687b ldr r3, [r7, #4] /* USER CODE BEGIN MX_GPIO_Init_2 */ GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15; 80023b6: f44f 4340 mov.w r3, #49152 @ 0xc000 80023ba: 61fb str r3, [r7, #28] GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; 80023bc: 2301 movs r3, #1 80023be: 623b str r3, [r7, #32] GPIO_InitStruct.Pull = GPIO_PULLUP; 80023c0: 2301 movs r3, #1 80023c2: 627b str r3, [r7, #36] @ 0x24 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; 80023c4: 2300 movs r3, #0 80023c6: 62bb str r3, [r7, #40] @ 0x28 HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); 80023c8: f107 031c add.w r3, r7, #28 80023cc: 4619 mov r1, r3 80023ce: 480f ldr r0, [pc, #60] @ (800240c ) 80023d0: f007 f95e bl 8009690 HAL_GPIO_WritePin(GPIOE, GPIO_PIN_14, GPIO_PIN_RESET); 80023d4: 2200 movs r2, #0 80023d6: f44f 4180 mov.w r1, #16384 @ 0x4000 80023da: 480c ldr r0, [pc, #48] @ (800240c ) 80023dc: f007 fb08 bl 80099f0 HAL_Delay(100); 80023e0: 2064 movs r0, #100 @ 0x64 80023e2: f002 fe31 bl 8005048 HAL_GPIO_WritePin(GPIOE, GPIO_PIN_14, GPIO_PIN_SET); 80023e6: 2201 movs r2, #1 80023e8: f44f 4180 mov.w r1, #16384 @ 0x4000 80023ec: 4807 ldr r0, [pc, #28] @ (800240c ) 80023ee: f007 faff bl 80099f0 HAL_GPIO_WritePin(GPIOE, GPIO_PIN_15, GPIO_PIN_SET); 80023f2: 2201 movs r2, #1 80023f4: f44f 4100 mov.w r1, #32768 @ 0x8000 80023f8: 4804 ldr r0, [pc, #16] @ (800240c ) 80023fa: f007 faf9 bl 80099f0 // HAL_GPIO_WritePin(GPIOB, GPIO_PIN_14, GPIO_PIN_RESET); // HAL_GPIO_WritePin(GPIOB, GPIO_PIN_14, GPIO_PIN_SET); // HAL_GPIO_WritePin(GPIOB, GPIO_PIN_14, GPIO_PIN_RESET); // HAL_GPIO_WritePin(GPIOB, GPIO_PIN_14, GPIO_PIN_SET); /* USER CODE END MX_GPIO_Init_2 */ } 80023fe: bf00 nop 8002400: 3730 adds r7, #48 @ 0x30 8002402: 46bd mov sp, r7 8002404: bd80 pop {r7, pc} 8002406: bf00 nop 8002408: 58024400 .word 0x58024400 800240c: 58021000 .word 0x58021000 08002410 : * @param argument: Not used * @retval None */ /* USER CODE END Header_StartDefaultTask */ void StartDefaultTask(void *argument) { 8002410: b580 push {r7, lr} 8002412: b082 sub sp, #8 8002414: af00 add r7, sp, #0 8002416: 6078 str r0, [r7, #4] /* init code for LWIP */ MX_LWIP_Init(); 8002418: f00d fae0 bl 800f9dc /* USER CODE BEGIN 5 */ /* Infinite loop */ for(;;) { osDelay(pdMS_TO_TICKS(1000)); 800241c: f44f 707a mov.w r0, #1000 @ 0x3e8 8002420: f00e faaf bl 8010982 8002424: e7fa b.n 800241c ... 08002428 : } /* MPU Configuration */ void MPU_Config(void) { 8002428: b580 push {r7, lr} 800242a: b084 sub sp, #16 800242c: af00 add r7, sp, #0 MPU_Region_InitTypeDef MPU_InitStruct = {0}; 800242e: 463b mov r3, r7 8002430: 2200 movs r2, #0 8002432: 601a str r2, [r3, #0] 8002434: 605a str r2, [r3, #4] 8002436: 609a str r2, [r3, #8] 8002438: 60da str r2, [r3, #12] /* Disables the MPU */ HAL_MPU_Disable(); 800243a: f002 ff29 bl 8005290 /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; 800243e: 2301 movs r3, #1 8002440: 703b strb r3, [r7, #0] MPU_InitStruct.Number = MPU_REGION_NUMBER0; 8002442: 2300 movs r3, #0 8002444: 707b strb r3, [r7, #1] MPU_InitStruct.BaseAddress = 0x0; 8002446: 2300 movs r3, #0 8002448: 607b str r3, [r7, #4] MPU_InitStruct.Size = MPU_REGION_SIZE_4GB; 800244a: 231f movs r3, #31 800244c: 723b strb r3, [r7, #8] MPU_InitStruct.SubRegionDisable = 0x87; 800244e: 2387 movs r3, #135 @ 0x87 8002450: 727b strb r3, [r7, #9] MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; 8002452: 2300 movs r3, #0 8002454: 72bb strb r3, [r7, #10] MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS; 8002456: 2300 movs r3, #0 8002458: 72fb strb r3, [r7, #11] MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE; 800245a: 2301 movs r3, #1 800245c: 733b strb r3, [r7, #12] MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; 800245e: 2301 movs r3, #1 8002460: 737b strb r3, [r7, #13] MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; 8002462: 2300 movs r3, #0 8002464: 73bb strb r3, [r7, #14] MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; 8002466: 2300 movs r3, #0 8002468: 73fb strb r3, [r7, #15] HAL_MPU_ConfigRegion(&MPU_InitStruct); 800246a: 463b mov r3, r7 800246c: 4618 mov r0, r3 800246e: f002 ff47 bl 8005300 /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Number = MPU_REGION_NUMBER1; 8002472: 2301 movs r3, #1 8002474: 707b strb r3, [r7, #1] MPU_InitStruct.BaseAddress = 0x24020000; 8002476: 4b13 ldr r3, [pc, #76] @ (80024c4 ) 8002478: 607b str r3, [r7, #4] MPU_InitStruct.Size = MPU_REGION_SIZE_128KB; 800247a: 2310 movs r3, #16 800247c: 723b strb r3, [r7, #8] MPU_InitStruct.SubRegionDisable = 0x0; 800247e: 2300 movs r3, #0 8002480: 727b strb r3, [r7, #9] MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1; 8002482: 2301 movs r3, #1 8002484: 72bb strb r3, [r7, #10] MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; 8002486: 2303 movs r3, #3 8002488: 72fb strb r3, [r7, #11] MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; 800248a: 2300 movs r3, #0 800248c: 737b strb r3, [r7, #13] HAL_MPU_ConfigRegion(&MPU_InitStruct); 800248e: 463b mov r3, r7 8002490: 4618 mov r0, r3 8002492: f002 ff35 bl 8005300 /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Number = MPU_REGION_NUMBER2; 8002496: 2302 movs r3, #2 8002498: 707b strb r3, [r7, #1] MPU_InitStruct.BaseAddress = 0x24040000; 800249a: 4b0b ldr r3, [pc, #44] @ (80024c8 ) 800249c: 607b str r3, [r7, #4] MPU_InitStruct.Size = MPU_REGION_SIZE_512B; 800249e: 2308 movs r3, #8 80024a0: 723b strb r3, [r7, #8] MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; 80024a2: 2300 movs r3, #0 80024a4: 72bb strb r3, [r7, #10] MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; 80024a6: 2301 movs r3, #1 80024a8: 737b strb r3, [r7, #13] MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE; 80024aa: 2301 movs r3, #1 80024ac: 73fb strb r3, [r7, #15] HAL_MPU_ConfigRegion(&MPU_InitStruct); 80024ae: 463b mov r3, r7 80024b0: 4618 mov r0, r3 80024b2: f002 ff25 bl 8005300 /* Enables the MPU */ HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT); 80024b6: 2004 movs r0, #4 80024b8: f002 ff02 bl 80052c0 } 80024bc: bf00 nop 80024be: 3710 adds r7, #16 80024c0: 46bd mov sp, r7 80024c2: bd80 pop {r7, pc} 80024c4: 24020000 .word 0x24020000 80024c8: 24040000 .word 0x24040000 080024cc : * a global variable "uwTick" used as application time base. * @param htim : TIM handle * @retval None */ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) { 80024cc: b580 push {r7, lr} 80024ce: b082 sub sp, #8 80024d0: af00 add r7, sp, #0 80024d2: 6078 str r0, [r7, #4] /* USER CODE BEGIN Callback 0 */ /* USER CODE END Callback 0 */ if (htim->Instance == TIM6) { 80024d4: 687b ldr r3, [r7, #4] 80024d6: 681b ldr r3, [r3, #0] 80024d8: 4a09 ldr r2, [pc, #36] @ (8002500 ) 80024da: 4293 cmp r3, r2 80024dc: d101 bne.n 80024e2 HAL_IncTick(); 80024de: f002 fd93 bl 8005008 } /* USER CODE BEGIN Callback 1 */ if (htim->Instance == TIM6) { 80024e2: 687b ldr r3, [r7, #4] 80024e4: 681b ldr r3, [r3, #0] 80024e6: 4a06 ldr r2, [pc, #24] @ (8002500 ) 80024e8: 4293 cmp r3, r2 80024ea: d104 bne.n 80024f6 MilliTimer++; 80024ec: 4b05 ldr r3, [pc, #20] @ (8002504 ) 80024ee: 681b ldr r3, [r3, #0] 80024f0: 3301 adds r3, #1 80024f2: 4a04 ldr r2, [pc, #16] @ (8002504 ) 80024f4: 6013 str r3, [r2, #0] } /* USER CODE END Callback 1 */ } 80024f6: bf00 nop 80024f8: 3708 adds r7, #8 80024fa: 46bd mov sp, r7 80024fc: bd80 pop {r7, pc} 80024fe: bf00 nop 8002500: 40001000 .word 0x40001000 8002504: 2402b034 .word 0x2402b034 08002508 : /** * @brief This function is executed in case of error occurrence. * @retval None */ void Error_Handler(void) { 8002508: b480 push {r7} 800250a: af00 add r7, sp, #0 __ASM volatile ("cpsid i" : : : "memory"); 800250c: b672 cpsid i } 800250e: bf00 nop /* USER CODE BEGIN Error_Handler_Debug */ /* User can add his own implementation to report the HAL error return state */ __disable_irq(); while (1) 8002510: bf00 nop 8002512: e7fd b.n 8002510 08002514 : void MqttClientSubTask(void *argument); //mqtt client subscribe task function void MqttClientPubTask(void *argument); //mqtt client publish task function int MqttConnectBroker(void); //mqtt broker connect function void MqttMessageArrived(MessageData *msg); //mqtt message callback function void MqttClientSubTask (void* argument) { 8002514: b580 push {r7, lr} 8002516: b082 sub sp, #8 8002518: af00 add r7, sp, #0 800251a: 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 800251c: 4b16 ldr r3, [pc, #88] @ (8002578 ) 800251e: 685b ldr r3, [r3, #4] 8002520: 2b00 cmp r3, #0 8002522: d007 beq.n 8002534 8002524: 4b14 ldr r3, [pc, #80] @ (8002578 ) 8002526: 689b ldr r3, [r3, #8] 8002528: 2b00 cmp r3, #0 800252a: d003 beq.n 8002534 800252c: 4b12 ldr r3, [pc, #72] @ (8002578 ) 800252e: 68db ldr r3, [r3, #12] 8002530: 2b00 cmp r3, #0 8002532: d104 bne.n 800253e { osDelay (pdMS_TO_TICKS (1000)); 8002534: f44f 707a mov.w r0, #1000 @ 0x3e8 8002538: f00e fa23 bl 8010982 continue; 800253c: e003 b.n 8002546 } else { printf ("DHCP/Static IP O.K.\n"); 800253e: 480f ldr r0, [pc, #60] @ (800257c ) 8002540: f027 faac bl 8029a9c break; 8002544: e000 b.n 8002548 if (gnetif.ip_addr.addr == 0 || gnetif.netmask.addr == 0 || gnetif.gw.addr == 0) // system has no valid ip address 8002546: e7e9 b.n 800251c } } while (1) { if (!mqttClient.isconnected) { 8002548: 4b0d ldr r3, [pc, #52] @ (8002580 ) 800254a: 6a1b ldr r3, [r3, #32] 800254c: 2b00 cmp r3, #0 800254e: d109 bne.n 8002564 // try to connect to the broker if (MqttConnectBroker () != MQTT_SUCCESS) { 8002550: f000 fb02 bl 8002b58 8002554: 4603 mov r3, r0 8002556: 2b00 cmp r3, #0 8002558: d0f6 beq.n 8002548 osDelay (pdMS_TO_TICKS (1000)); 800255a: f44f 707a mov.w r0, #1000 @ 0x3e8 800255e: f00e fa10 bl 8010982 8002562: e7f1 b.n 8002548 } } else { MQTTYield (&mqttClient, 500); // handle timer 8002564: f44f 71fa mov.w r1, #500 @ 0x1f4 8002568: 4805 ldr r0, [pc, #20] @ (8002580 ) 800256a: f024 fb99 bl 8026ca0 osDelay (pdMS_TO_TICKS (100)); 800256e: 2064 movs r0, #100 @ 0x64 8002570: f00e fa07 bl 8010982 if (!mqttClient.isconnected) { 8002574: e7e8 b.n 8002548 8002576: bf00 nop 8002578: 24002174 .word 0x24002174 800257c: 0802c554 .word 0x0802c554 8002580: 24000670 .word 0x24000670 08002584 : } } } void MqttClientPubTask (void* argument) { 8002584: b580 push {r7, lr} 8002586: f5ad 7d16 sub.w sp, sp, #600 @ 0x258 800258a: af04 add r7, sp, #16 800258c: f507 7312 add.w r3, r7, #584 @ 0x248 8002590: f5a3 7311 sub.w r3, r3, #580 @ 0x244 8002594: 6018 str r0, [r3, #0] char messageBuffer[512] = { 0x00 }; 8002596: f507 7312 add.w r3, r7, #584 @ 0x248 800259a: f5a3 7304 sub.w r3, r3, #528 @ 0x210 800259e: 2200 movs r2, #0 80025a0: 601a str r2, [r3, #0] 80025a2: 3304 adds r3, #4 80025a4: f44f 72fe mov.w r2, #508 @ 0x1fc 80025a8: 2100 movs r1, #0 80025aa: 4618 mov r0, r3 80025ac: f027 fba0 bl 8029cf0 char topicTextBuffer[32] = { 0x00 }; 80025b0: f507 7312 add.w r3, r7, #584 @ 0x248 80025b4: f5a3 730c sub.w r3, r3, #560 @ 0x230 80025b8: 2200 movs r2, #0 80025ba: 601a str r2, [r3, #0] 80025bc: 3304 adds r3, #4 80025be: 2200 movs r2, #0 80025c0: 601a str r2, [r3, #0] 80025c2: 605a str r2, [r3, #4] 80025c4: 609a str r2, [r3, #8] 80025c6: 60da str r2, [r3, #12] 80025c8: 611a str r2, [r3, #16] 80025ca: 615a str r2, [r3, #20] 80025cc: 619a str r2, [r3, #24] uint32_t bytesInBuffer = 0; 80025ce: 2300 movs r3, #0 80025d0: f8c7 3240 str.w r3, [r7, #576] @ 0x240 uint8_t boardNumber = 0; 80025d4: 2300 movs r3, #0 80025d6: f887 3247 strb.w r3, [r7, #583] @ 0x247 MQTTMessage message; while (1) { if (mqttClient.isconnected) { 80025da: 4b93 ldr r3, [pc, #588] @ (8002828 ) 80025dc: 6a1b ldr r3, [r3, #32] 80025de: 2b00 cmp r3, #0 80025e0: f000 8293 beq.w 8002b0a if (is_link_up ()) { 80025e4: f00d f9ea bl 800f9bc 80025e8: 4603 mov r3, r0 80025ea: 2b00 cmp r3, #0 80025ec: f000 828d beq.w 8002b0a for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 80025f0: 2300 movs r3, #0 80025f2: f887 3247 strb.w r3, [r7, #583] @ 0x247 80025f6: e10e b.n 8002816 osMutexAcquire (resMeasurementsMutex, osWaitForever); 80025f8: 4b8c ldr r3, [pc, #560] @ (800282c ) 80025fa: 681b ldr r3, [r3, #0] 80025fc: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8002600: 4618 mov r0, r3 8002602: f00e fa5f bl 8010ac4 RESMeasurements* resMeas = &resMeasurements[boardNumber]; 8002606: f897 2247 ldrb.w r2, [r7, #583] @ 0x247 800260a: 4613 mov r3, r2 800260c: 011b lsls r3, r3, #4 800260e: 1a9b subs r3, r3, r2 8002610: 009b lsls r3, r3, #2 8002612: 4a87 ldr r2, [pc, #540] @ (8002830 ) 8002614: 4413 add r3, r2 8002616: f8c7 3238 str.w r3, [r7, #568] @ 0x238 sprintf (topicTextBuffer, "RESmeasurments/%d", boardNumber + 1); 800261a: f897 3247 ldrb.w r3, [r7, #583] @ 0x247 800261e: 1c5a adds r2, r3, #1 8002620: f107 0318 add.w r3, r7, #24 8002624: 4983 ldr r1, [pc, #524] @ (8002834 ) 8002626: 4618 mov r0, r3 8002628: f027 fa40 bl 8029aac bytesInBuffer = sprintf (messageBuffer, "{\"voltageRMS\":[%.2f, %.2f, %.2f], ", resMeas->voltageRMS[0], resMeas->voltageRMS[1], resMeas->voltageRMS[2]); 800262c: f8d7 3238 ldr.w r3, [r7, #568] @ 0x238 8002630: edd3 7a00 vldr s15, [r3] 8002634: eeb7 5ae7 vcvt.f64.f32 d5, s15 8002638: f8d7 3238 ldr.w r3, [r7, #568] @ 0x238 800263c: edd3 7a01 vldr s15, [r3, #4] 8002640: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002644: f8d7 3238 ldr.w r3, [r7, #568] @ 0x238 8002648: edd3 6a02 vldr s13, [r3, #8] 800264c: eeb7 6ae6 vcvt.f64.f32 d6, s13 8002650: f107 0038 add.w r0, r7, #56 @ 0x38 8002654: ed8d 6b02 vstr d6, [sp, #8] 8002658: ed8d 7b00 vstr d7, [sp] 800265c: ec53 2b15 vmov r2, r3, d5 8002660: 4975 ldr r1, [pc, #468] @ (8002838 ) 8002662: f027 fa23 bl 8029aac 8002666: 4603 mov r3, r0 8002668: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"voltagePeak\":[%.2f, %.2f, %.2f], ", resMeas->voltagePeak[0], resMeas->voltagePeak[1], resMeas->voltagePeak[2]); 800266c: f107 0238 add.w r2, r7, #56 @ 0x38 8002670: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002674: 18d0 adds r0, r2, r3 8002676: f8d7 3238 ldr.w r3, [r7, #568] @ 0x238 800267a: edd3 7a03 vldr s15, [r3, #12] 800267e: eeb7 5ae7 vcvt.f64.f32 d5, s15 8002682: f8d7 3238 ldr.w r3, [r7, #568] @ 0x238 8002686: edd3 7a04 vldr s15, [r3, #16] 800268a: eeb7 7ae7 vcvt.f64.f32 d7, s15 800268e: f8d7 3238 ldr.w r3, [r7, #568] @ 0x238 8002692: edd3 6a05 vldr s13, [r3, #20] 8002696: eeb7 6ae6 vcvt.f64.f32 d6, s13 800269a: ed8d 6b02 vstr d6, [sp, #8] 800269e: ed8d 7b00 vstr d7, [sp] 80026a2: ec53 2b15 vmov r2, r3, d5 80026a6: 4965 ldr r1, [pc, #404] @ (800283c ) 80026a8: f027 fa00 bl 8029aac 80026ac: 4603 mov r3, r0 80026ae: 461a mov r2, r3 80026b0: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 80026b4: 4413 add r3, r2 80026b6: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"currentRMS\":[%.3f, %.3f, %.3f], ", resMeas->currentRMS[0], resMeas->currentRMS[1], resMeas->currentRMS[2]); 80026ba: f107 0238 add.w r2, r7, #56 @ 0x38 80026be: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 80026c2: 18d0 adds r0, r2, r3 80026c4: f8d7 3238 ldr.w r3, [r7, #568] @ 0x238 80026c8: edd3 7a06 vldr s15, [r3, #24] 80026cc: eeb7 5ae7 vcvt.f64.f32 d5, s15 80026d0: f8d7 3238 ldr.w r3, [r7, #568] @ 0x238 80026d4: edd3 7a07 vldr s15, [r3, #28] 80026d8: eeb7 7ae7 vcvt.f64.f32 d7, s15 80026dc: f8d7 3238 ldr.w r3, [r7, #568] @ 0x238 80026e0: edd3 6a08 vldr s13, [r3, #32] 80026e4: eeb7 6ae6 vcvt.f64.f32 d6, s13 80026e8: ed8d 6b02 vstr d6, [sp, #8] 80026ec: ed8d 7b00 vstr d7, [sp] 80026f0: ec53 2b15 vmov r2, r3, d5 80026f4: 4952 ldr r1, [pc, #328] @ (8002840 ) 80026f6: f027 f9d9 bl 8029aac 80026fa: 4603 mov r3, r0 80026fc: 461a mov r2, r3 80026fe: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002702: 4413 add r3, r2 8002704: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"currentPeak\":[%.3f, %.3f, %.3f], ", resMeas->currentPeak[0], resMeas->currentPeak[1], resMeas->currentPeak[2]); 8002708: f107 0238 add.w r2, r7, #56 @ 0x38 800270c: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002710: 18d0 adds r0, r2, r3 8002712: f8d7 3238 ldr.w r3, [r7, #568] @ 0x238 8002716: edd3 7a09 vldr s15, [r3, #36] @ 0x24 800271a: eeb7 5ae7 vcvt.f64.f32 d5, s15 800271e: f8d7 3238 ldr.w r3, [r7, #568] @ 0x238 8002722: edd3 7a0a vldr s15, [r3, #40] @ 0x28 8002726: eeb7 7ae7 vcvt.f64.f32 d7, s15 800272a: f8d7 3238 ldr.w r3, [r7, #568] @ 0x238 800272e: edd3 6a0b vldr s13, [r3, #44] @ 0x2c 8002732: eeb7 6ae6 vcvt.f64.f32 d6, s13 8002736: ed8d 6b02 vstr d6, [sp, #8] 800273a: ed8d 7b00 vstr d7, [sp] 800273e: ec53 2b15 vmov r2, r3, d5 8002742: 4940 ldr r1, [pc, #256] @ (8002844 ) 8002744: f027 f9b2 bl 8029aac 8002748: 4603 mov r3, r0 800274a: 461a mov r2, r3 800274c: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002750: 4413 add r3, r2 8002752: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"power\":[%.2f, %.2f, %.2f], ", resMeas->power[0], resMeas->power[1], resMeas->power[2]); 8002756: f107 0238 add.w r2, r7, #56 @ 0x38 800275a: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 800275e: 18d0 adds r0, r2, r3 8002760: f8d7 3238 ldr.w r3, [r7, #568] @ 0x238 8002764: edd3 7a0c vldr s15, [r3, #48] @ 0x30 8002768: eeb7 5ae7 vcvt.f64.f32 d5, s15 800276c: f8d7 3238 ldr.w r3, [r7, #568] @ 0x238 8002770: edd3 7a0d vldr s15, [r3, #52] @ 0x34 8002774: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002778: f8d7 3238 ldr.w r3, [r7, #568] @ 0x238 800277c: edd3 6a0e vldr s13, [r3, #56] @ 0x38 8002780: eeb7 6ae6 vcvt.f64.f32 d6, s13 8002784: ed8d 6b02 vstr d6, [sp, #8] 8002788: ed8d 7b00 vstr d7, [sp] 800278c: ec53 2b15 vmov r2, r3, d5 8002790: 492d ldr r1, [pc, #180] @ (8002848 ) 8002792: f027 f98b bl 8029aac 8002796: 4603 mov r3, r0 8002798: 461a mov r2, r3 800279a: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 800279e: 4413 add r3, r2 80027a0: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"lastSeen\": %ld}", slaveLastSeen[boardNumber]); 80027a4: f107 0238 add.w r2, r7, #56 @ 0x38 80027a8: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 80027ac: 18d0 adds r0, r2, r3 80027ae: f897 3247 ldrb.w r3, [r7, #583] @ 0x247 80027b2: 4a26 ldr r2, [pc, #152] @ (800284c ) 80027b4: f852 3023 ldr.w r3, [r2, r3, lsl #2] 80027b8: 461a mov r2, r3 80027ba: 4925 ldr r1, [pc, #148] @ (8002850 ) 80027bc: f027 f976 bl 8029aac 80027c0: 4603 mov r3, r0 80027c2: 461a mov r2, r3 80027c4: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 80027c8: 4413 add r3, r2 80027ca: f8c7 3240 str.w r3, [r7, #576] @ 0x240 osMutexRelease (resMeasurementsMutex); 80027ce: 4b17 ldr r3, [pc, #92] @ (800282c ) 80027d0: 681b ldr r3, [r3, #0] 80027d2: 4618 mov r0, r3 80027d4: f00e f9c1 bl 8010b5a message.payload = (void*)messageBuffer; 80027d8: f507 7312 add.w r3, r7, #584 @ 0x248 80027dc: f5a3 7310 sub.w r3, r3, #576 @ 0x240 80027e0: f107 0238 add.w r2, r7, #56 @ 0x38 80027e4: 609a str r2, [r3, #8] message.payloadlen = strlen (messageBuffer); 80027e6: f107 0338 add.w r3, r7, #56 @ 0x38 80027ea: 4618 mov r0, r3 80027ec: f7fd fdd8 bl 80003a0 80027f0: 4602 mov r2, r0 80027f2: f507 7312 add.w r3, r7, #584 @ 0x248 80027f6: f5a3 7310 sub.w r3, r3, #576 @ 0x240 80027fa: 60da str r2, [r3, #12] MQTTPublish (&mqttClient, topicTextBuffer, &message); // publish a message 80027fc: f107 0208 add.w r2, r7, #8 8002800: f107 0318 add.w r3, r7, #24 8002804: 4619 mov r1, r3 8002806: 4808 ldr r0, [pc, #32] @ (8002828 ) 8002808: f024 fc69 bl 80270de for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 800280c: f897 3247 ldrb.w r3, [r7, #583] @ 0x247 8002810: 3301 adds r3, #1 8002812: f887 3247 strb.w r3, [r7, #583] @ 0x247 8002816: f897 3247 ldrb.w r3, [r7, #583] @ 0x247 800281a: 2b03 cmp r3, #3 800281c: f67f aeec bls.w 80025f8 } for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8002820: 2300 movs r3, #0 8002822: f887 3247 strb.w r3, [r7, #583] @ 0x247 8002826: e16b b.n 8002b00 8002828: 24000670 .word 0x24000670 800282c: 24002168 .word 0x24002168 8002830: 24001fc8 .word 0x24001fc8 8002834: 0802c568 .word 0x0802c568 8002838: 0802c57c .word 0x0802c57c 800283c: 0802c5a0 .word 0x0802c5a0 8002840: 0802c5c4 .word 0x0802c5c4 8002844: 0802c5e8 .word 0x0802c5e8 8002848: 0802c60c .word 0x0802c60c 800284c: 24002158 .word 0x24002158 8002850: 0802c62c .word 0x0802c62c osMutexAcquire (sensorsInfoMutex, osWaitForever); 8002854: 4baf ldr r3, [pc, #700] @ (8002b14 ) 8002856: 681b ldr r3, [r3, #0] 8002858: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 800285c: 4618 mov r0, r3 800285e: f00e f931 bl 8010ac4 SesnorsInfo* sensors = &sensorsInfo[boardNumber]; 8002862: f897 2247 ldrb.w r2, [r7, #583] @ 0x247 8002866: 4613 mov r3, r2 8002868: 009b lsls r3, r3, #2 800286a: 4413 add r3, r2 800286c: 00db lsls r3, r3, #3 800286e: 4aaa ldr r2, [pc, #680] @ (8002b18 ) 8002870: 4413 add r3, r2 8002872: f8c7 323c str.w r3, [r7, #572] @ 0x23c sprintf (topicTextBuffer, "Sensors/%d", boardNumber + 1); 8002876: f897 3247 ldrb.w r3, [r7, #583] @ 0x247 800287a: 1c5a adds r2, r3, #1 800287c: f107 0318 add.w r3, r7, #24 8002880: 49a6 ldr r1, [pc, #664] @ (8002b1c ) 8002882: 4618 mov r0, r3 8002884: f027 f912 bl 8029aac bytesInBuffer = sprintf (messageBuffer, "{\"pvTemperature\":[%.1f, %.1f], ", sensors->pvTemperature[0], sensors->pvTemperature[1]); 8002888: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 800288c: edd3 7a00 vldr s15, [r3] 8002890: eeb7 6ae7 vcvt.f64.f32 d6, s15 8002894: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002898: edd3 7a01 vldr s15, [r3, #4] 800289c: eeb7 7ae7 vcvt.f64.f32 d7, s15 80028a0: f107 0038 add.w r0, r7, #56 @ 0x38 80028a4: ed8d 7b00 vstr d7, [sp] 80028a8: ec53 2b16 vmov r2, r3, d6 80028ac: 499c ldr r1, [pc, #624] @ (8002b20 ) 80028ae: f027 f8fd bl 8029aac 80028b2: 4603 mov r3, r0 80028b4: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"fanVoltage\":%.2f, ", sensors->fanVoltage); 80028b8: f107 0238 add.w r2, r7, #56 @ 0x38 80028bc: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 80028c0: 18d0 adds r0, r2, r3 80028c2: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80028c6: edd3 7a02 vldr s15, [r3, #8] 80028ca: eeb7 7ae7 vcvt.f64.f32 d7, s15 80028ce: ec53 2b17 vmov r2, r3, d7 80028d2: 4994 ldr r1, [pc, #592] @ (8002b24 ) 80028d4: f027 f8ea bl 8029aac 80028d8: 4603 mov r3, r0 80028da: 461a mov r2, r3 80028dc: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 80028e0: 4413 add r3, r2 80028e2: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"pvEncoder\":%.2f, ", sensors->pvEncoder); 80028e6: f107 0238 add.w r2, r7, #56 @ 0x38 80028ea: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 80028ee: 18d0 adds r0, r2, r3 80028f0: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80028f4: edd3 7a03 vldr s15, [r3, #12] 80028f8: eeb7 7ae7 vcvt.f64.f32 d7, s15 80028fc: ec53 2b17 vmov r2, r3, d7 8002900: 4989 ldr r1, [pc, #548] @ (8002b28 ) 8002902: f027 f8d3 bl 8029aac 8002906: 4603 mov r3, r0 8002908: 461a mov r2, r3 800290a: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 800290e: 4413 add r3, r2 8002910: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorXStatus\":%d, ", sensors->motorXStatus); 8002914: f107 0238 add.w r2, r7, #56 @ 0x38 8002918: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 800291c: 18d0 adds r0, r2, r3 800291e: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002922: 7c1b ldrb r3, [r3, #16] 8002924: 461a mov r2, r3 8002926: 4981 ldr r1, [pc, #516] @ (8002b2c ) 8002928: f027 f8c0 bl 8029aac 800292c: 4603 mov r3, r0 800292e: 461a mov r2, r3 8002930: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002934: 4413 add r3, r2 8002936: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorYStatus\":%d, ", sensors->motorYStatus); 800293a: f107 0238 add.w r2, r7, #56 @ 0x38 800293e: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002942: 18d0 adds r0, r2, r3 8002944: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002948: 7c5b ldrb r3, [r3, #17] 800294a: 461a mov r2, r3 800294c: 4978 ldr r1, [pc, #480] @ (8002b30 ) 800294e: f027 f8ad bl 8029aac 8002952: 4603 mov r3, r0 8002954: 461a mov r2, r3 8002956: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 800295a: 4413 add r3, r2 800295c: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorXAveCurrent\":%.3f, ", sensors->motorXAveCurrent); 8002960: f107 0238 add.w r2, r7, #56 @ 0x38 8002964: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002968: 18d0 adds r0, r2, r3 800296a: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 800296e: edd3 7a05 vldr s15, [r3, #20] 8002972: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002976: ec53 2b17 vmov r2, r3, d7 800297a: 496e ldr r1, [pc, #440] @ (8002b34 ) 800297c: f027 f896 bl 8029aac 8002980: 4603 mov r3, r0 8002982: 461a mov r2, r3 8002984: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002988: 4413 add r3, r2 800298a: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorYAveCurrent\":%.3f, ", sensors->motorYAveCurrent); 800298e: f107 0238 add.w r2, r7, #56 @ 0x38 8002992: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002996: 18d0 adds r0, r2, r3 8002998: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 800299c: edd3 7a06 vldr s15, [r3, #24] 80029a0: eeb7 7ae7 vcvt.f64.f32 d7, s15 80029a4: ec53 2b17 vmov r2, r3, d7 80029a8: 4963 ldr r1, [pc, #396] @ (8002b38 ) 80029aa: f027 f87f bl 8029aac 80029ae: 4603 mov r3, r0 80029b0: 461a mov r2, r3 80029b2: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 80029b6: 4413 add r3, r2 80029b8: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorXPeakCurrent\":%.3f, ", sensors->motorXPeakCurrent); 80029bc: f107 0238 add.w r2, r7, #56 @ 0x38 80029c0: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 80029c4: 18d0 adds r0, r2, r3 80029c6: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80029ca: edd3 7a07 vldr s15, [r3, #28] 80029ce: eeb7 7ae7 vcvt.f64.f32 d7, s15 80029d2: ec53 2b17 vmov r2, r3, d7 80029d6: 4959 ldr r1, [pc, #356] @ (8002b3c ) 80029d8: f027 f868 bl 8029aac 80029dc: 4603 mov r3, r0 80029de: 461a mov r2, r3 80029e0: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 80029e4: 4413 add r3, r2 80029e6: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorYPeakCurrent\":%.3f, ", sensors->motorYPeakCurrent); 80029ea: f107 0238 add.w r2, r7, #56 @ 0x38 80029ee: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 80029f2: 18d0 adds r0, r2, r3 80029f4: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80029f8: edd3 7a08 vldr s15, [r3, #32] 80029fc: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002a00: ec53 2b17 vmov r2, r3, d7 8002a04: 494e ldr r1, [pc, #312] @ (8002b40 ) 8002a06: f027 f851 bl 8029aac 8002a0a: 4603 mov r3, r0 8002a0c: 461a mov r2, r3 8002a0e: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002a12: 4413 add r3, r2 8002a14: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"limitSwitchUp\":%d, ", sensors->limitSwitchUp); 8002a18: f107 0238 add.w r2, r7, #56 @ 0x38 8002a1c: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002a20: 18d0 adds r0, r2, r3 8002a22: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002a26: f893 3024 ldrb.w r3, [r3, #36] @ 0x24 8002a2a: 461a mov r2, r3 8002a2c: 4945 ldr r1, [pc, #276] @ (8002b44 ) 8002a2e: f027 f83d bl 8029aac 8002a32: 4603 mov r3, r0 8002a34: 461a mov r2, r3 8002a36: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002a3a: 4413 add r3, r2 8002a3c: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"limitSwitchDown\":%d, ", sensors->limitSwitchDown); 8002a40: f107 0238 add.w r2, r7, #56 @ 0x38 8002a44: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002a48: 18d0 adds r0, r2, r3 8002a4a: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002a4e: f893 3025 ldrb.w r3, [r3, #37] @ 0x25 8002a52: 461a mov r2, r3 8002a54: 493c ldr r1, [pc, #240] @ (8002b48 ) 8002a56: f027 f829 bl 8029aac 8002a5a: 4603 mov r3, r0 8002a5c: 461a mov r2, r3 8002a5e: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002a62: 4413 add r3, r2 8002a64: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"limitSwitchCenter\":%d, ", sensors->limitSwitchCenter); 8002a68: f107 0238 add.w r2, r7, #56 @ 0x38 8002a6c: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002a70: 18d0 adds r0, r2, r3 8002a72: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002a76: f893 3026 ldrb.w r3, [r3, #38] @ 0x26 8002a7a: 461a mov r2, r3 8002a7c: 4933 ldr r1, [pc, #204] @ (8002b4c ) 8002a7e: f027 f815 bl 8029aac 8002a82: 4603 mov r3, r0 8002a84: 461a mov r2, r3 8002a86: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002a8a: 4413 add r3, r2 8002a8c: f8c7 3240 str.w r3, [r7, #576] @ 0x240 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"powerSupplyFailMask\":%d}", sensors->powerSupplyFailMask); 8002a90: f107 0238 add.w r2, r7, #56 @ 0x38 8002a94: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002a98: 18d0 adds r0, r2, r3 8002a9a: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002a9e: f893 3027 ldrb.w r3, [r3, #39] @ 0x27 8002aa2: 461a mov r2, r3 8002aa4: 492a ldr r1, [pc, #168] @ (8002b50 ) 8002aa6: f027 f801 bl 8029aac 8002aaa: 4603 mov r3, r0 8002aac: 461a mov r2, r3 8002aae: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002ab2: 4413 add r3, r2 8002ab4: f8c7 3240 str.w r3, [r7, #576] @ 0x240 osMutexRelease (sensorsInfoMutex); 8002ab8: 4b16 ldr r3, [pc, #88] @ (8002b14 ) 8002aba: 681b ldr r3, [r3, #0] 8002abc: 4618 mov r0, r3 8002abe: f00e f84c bl 8010b5a message.payload = (void*)messageBuffer; 8002ac2: f507 7312 add.w r3, r7, #584 @ 0x248 8002ac6: f5a3 7310 sub.w r3, r3, #576 @ 0x240 8002aca: f107 0238 add.w r2, r7, #56 @ 0x38 8002ace: 609a str r2, [r3, #8] message.payloadlen = strlen (messageBuffer); 8002ad0: f107 0338 add.w r3, r7, #56 @ 0x38 8002ad4: 4618 mov r0, r3 8002ad6: f7fd fc63 bl 80003a0 8002ada: 4602 mov r2, r0 8002adc: f507 7312 add.w r3, r7, #584 @ 0x248 8002ae0: f5a3 7310 sub.w r3, r3, #576 @ 0x240 8002ae4: 60da str r2, [r3, #12] MQTTPublish (&mqttClient, topicTextBuffer, &message); // publish a message 8002ae6: f107 0208 add.w r2, r7, #8 8002aea: f107 0318 add.w r3, r7, #24 8002aee: 4619 mov r1, r3 8002af0: 4818 ldr r0, [pc, #96] @ (8002b54 ) 8002af2: f024 faf4 bl 80270de for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8002af6: f897 3247 ldrb.w r3, [r7, #583] @ 0x247 8002afa: 3301 adds r3, #1 8002afc: f887 3247 strb.w r3, [r7, #583] @ 0x247 8002b00: f897 3247 ldrb.w r3, [r7, #583] @ 0x247 8002b04: 2b03 cmp r3, #3 8002b06: f67f aea5 bls.w 8002854 } } } osDelay (pdMS_TO_TICKS (1000)); 8002b0a: f44f 707a mov.w r0, #1000 @ 0x3e8 8002b0e: f00d ff38 bl 8010982 if (mqttClient.isconnected) { 8002b12: e562 b.n 80025da 8002b14: 2400216c .word 0x2400216c 8002b18: 240020b8 .word 0x240020b8 8002b1c: 0802c640 .word 0x0802c640 8002b20: 0802c64c .word 0x0802c64c 8002b24: 0802c66c .word 0x0802c66c 8002b28: 0802c680 .word 0x0802c680 8002b2c: 0802c694 .word 0x0802c694 8002b30: 0802c6a8 .word 0x0802c6a8 8002b34: 0802c6bc .word 0x0802c6bc 8002b38: 0802c6d8 .word 0x0802c6d8 8002b3c: 0802c6f4 .word 0x0802c6f4 8002b40: 0802c710 .word 0x0802c710 8002b44: 0802c72c .word 0x0802c72c 8002b48: 0802c744 .word 0x0802c744 8002b4c: 0802c75c .word 0x0802c75c 8002b50: 0802c778 .word 0x0802c778 8002b54: 24000670 .word 0x24000670 08002b58 : } } int MqttConnectBroker () { 8002b58: b580 push {r7, lr} 8002b5a: b09c sub sp, #112 @ 0x70 8002b5c: af04 add r7, sp, #16 uint8_t boardNumber = 0; 8002b5e: 2300 movs r3, #0 8002b60: f887 305f strb.w r3, [r7, #95] @ 0x5f int ret; NewNetwork (&net); 8002b64: 4839 ldr r0, [pc, #228] @ (8002c4c ) 8002b66: f024 fbf3 bl 8027350 ret = ConnectNetwork (&net, BROKER_IP, MQTT_PORT); 8002b6a: f240 725b movw r2, #1883 @ 0x75b 8002b6e: 4938 ldr r1, [pc, #224] @ (8002c50 ) 8002b70: 4836 ldr r0, [pc, #216] @ (8002c4c ) 8002b72: f024 fc09 bl 8027388 8002b76: 65b8 str r0, [r7, #88] @ 0x58 if (ret != MQTT_SUCCESS) { 8002b78: 6dbb ldr r3, [r7, #88] @ 0x58 8002b7a: 2b00 cmp r3, #0 8002b7c: d005 beq.n 8002b8a printf ("ConnectNetwork failed.\n"); 8002b7e: 4835 ldr r0, [pc, #212] @ (8002c54 ) 8002b80: f026 ff8c bl 8029a9c return -1; 8002b84: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8002b88: e05c b.n 8002c44 } MQTTClientInit (&mqttClient, &net, 1000, sndBuffer, sizeof (sndBuffer), rcvBuffer, sizeof (rcvBuffer)); 8002b8a: f44f 6380 mov.w r3, #1024 @ 0x400 8002b8e: 9302 str r3, [sp, #8] 8002b90: 4b31 ldr r3, [pc, #196] @ (8002c58 ) 8002b92: 9301 str r3, [sp, #4] 8002b94: f44f 6380 mov.w r3, #1024 @ 0x400 8002b98: 9300 str r3, [sp, #0] 8002b9a: 4b30 ldr r3, [pc, #192] @ (8002c5c ) 8002b9c: f44f 727a mov.w r2, #1000 @ 0x3e8 8002ba0: 492a ldr r1, [pc, #168] @ (8002c4c ) 8002ba2: 482f ldr r0, [pc, #188] @ (8002c60 ) 8002ba4: f023 fd0e bl 80265c4 MQTTPacket_connectData data = MQTTPacket_connectData_initializer; 8002ba8: 4a2e ldr r2, [pc, #184] @ (8002c64 ) 8002baa: 463b mov r3, r7 8002bac: 4611 mov r1, r2 8002bae: 2258 movs r2, #88 @ 0x58 8002bb0: 4618 mov r0, r3 8002bb2: f027 f994 bl 8029ede data.willFlag = 0; 8002bb6: 2300 movs r3, #0 8002bb8: 76fb strb r3, [r7, #27] data.MQTTVersion = 3; 8002bba: 2303 movs r3, #3 8002bbc: 723b strb r3, [r7, #8] data.clientID.cstring = "test_user1"; 8002bbe: 4b2a ldr r3, [pc, #168] @ (8002c68 ) 8002bc0: 60fb str r3, [r7, #12] data.username.cstring = "test_user1"; 8002bc2: 4b29 ldr r3, [pc, #164] @ (8002c68 ) 8002bc4: 643b str r3, [r7, #64] @ 0x40 data.password.cstring = "1234"; 8002bc6: 4b29 ldr r3, [pc, #164] @ (8002c6c ) 8002bc8: 64fb str r3, [r7, #76] @ 0x4c data.keepAliveInterval = 100; 8002bca: 2364 movs r3, #100 @ 0x64 8002bcc: 833b strh r3, [r7, #24] data.cleansession = 1; 8002bce: 2301 movs r3, #1 8002bd0: 76bb strb r3, [r7, #26] ret = MQTTConnect (&mqttClient, &data); 8002bd2: 463b mov r3, r7 8002bd4: 4619 mov r1, r3 8002bd6: 4822 ldr r0, [pc, #136] @ (8002c60 ) 8002bd8: f024 f950 bl 8026e7c 8002bdc: 65b8 str r0, [r7, #88] @ 0x58 if (ret != MQTT_SUCCESS) { 8002bde: 6dbb ldr r3, [r7, #88] @ 0x58 8002be0: 2b00 cmp r3, #0 8002be2: d008 beq.n 8002bf6 net_disconnect (&net); 8002be4: 4819 ldr r0, [pc, #100] @ (8002c4c ) 8002be6: f024 fc58 bl 802749a printf ("MQTTConnect failed. Code %d\n", ret); 8002bea: 6db9 ldr r1, [r7, #88] @ 0x58 8002bec: 4820 ldr r0, [pc, #128] @ (8002c70 ) 8002bee: f026 feed bl 80299cc return ret; 8002bf2: 6dbb ldr r3, [r7, #88] @ 0x58 8002bf4: e026 b.n 8002c44 } for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8002bf6: 2300 movs r3, #0 8002bf8: f887 305f strb.w r3, [r7, #95] @ 0x5f 8002bfc: e01a b.n 8002c34 ret = MQTTSubscribe (&mqttClient, subscribeTopicNames[boardNumber], QOS0, MqttMessageArrived); 8002bfe: f897 305f ldrb.w r3, [r7, #95] @ 0x5f 8002c02: 4a1c ldr r2, [pc, #112] @ (8002c74 ) 8002c04: f852 1023 ldr.w r1, [r2, r3, lsl #2] 8002c08: 4b1b ldr r3, [pc, #108] @ (8002c78 ) 8002c0a: 2200 movs r2, #0 8002c0c: 4814 ldr r0, [pc, #80] @ (8002c60 ) 8002c0e: f024 fa50 bl 80270b2 8002c12: 65b8 str r0, [r7, #88] @ 0x58 if (ret != MQTT_SUCCESS) { 8002c14: 6dbb ldr r3, [r7, #88] @ 0x58 8002c16: 2b00 cmp r3, #0 8002c18: d007 beq.n 8002c2a net_disconnect (&net); 8002c1a: 480c ldr r0, [pc, #48] @ (8002c4c ) 8002c1c: f024 fc3d bl 802749a printf ("MQTTSubscribe failed.\n"); 8002c20: 4816 ldr r0, [pc, #88] @ (8002c7c ) 8002c22: f026 ff3b bl 8029a9c return ret; 8002c26: 6dbb ldr r3, [r7, #88] @ 0x58 8002c28: e00c b.n 8002c44 for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8002c2a: f897 305f ldrb.w r3, [r7, #95] @ 0x5f 8002c2e: 3301 adds r3, #1 8002c30: f887 305f strb.w r3, [r7, #95] @ 0x5f 8002c34: f897 305f ldrb.w r3, [r7, #95] @ 0x5f 8002c38: 2b03 cmp r3, #3 8002c3a: d9e0 bls.n 8002bfe } } printf ("MQTT_ConnectBroker O.K.\n"); 8002c3c: 4810 ldr r0, [pc, #64] @ (8002c80 ) 8002c3e: f026 ff2d bl 8029a9c return MQTT_SUCCESS; 8002c42: 2300 movs r3, #0 } 8002c44: 4618 mov r0, r3 8002c46: 3760 adds r7, #96 @ 0x60 8002c48: 46bd mov sp, r7 8002c4a: bd80 pop {r7, pc} 8002c4c: 24000660 .word 0x24000660 8002c50: 0802c794 .word 0x0802c794 8002c54: 0802c7a4 .word 0x0802c7a4 8002c58: 24000adc .word 0x24000adc 8002c5c: 240006dc .word 0x240006dc 8002c60: 24000670 .word 0x24000670 8002c64: 0802c820 .word 0x0802c820 8002c68: 0802c7bc .word 0x0802c7bc 8002c6c: 0802c7c8 .word 0x0802c7c8 8002c70: 0802c7d0 .word 0x0802c7d0 8002c74: 080309b4 .word 0x080309b4 8002c78: 08002c85 .word 0x08002c85 8002c7c: 0802c7f0 .word 0x0802c7f0 8002c80: 0802c808 .word 0x0802c808 08002c84 : void MqttMessageArrived (MessageData* msg) { 8002c84: b580 push {r7, lr} 8002c86: b096 sub sp, #88 @ 0x58 8002c88: af00 add r7, sp, #0 8002c8a: 6078 str r0, [r7, #4] SerialProtocolCommands spCommand = spUnknown; 8002c8c: 2308 movs r3, #8 8002c8e: f887 3057 strb.w r3, [r7, #87] @ 0x57 BoardNoOverTopic topicForBoard = unknownBoard; 8002c92: 2305 movs r3, #5 8002c94: f887 3056 strb.w r3, [r7, #86] @ 0x56 uint8_t boardNumber = 0; 8002c98: 2300 movs r3, #0 8002c9a: f887 3055 strb.w r3, [r7, #85] @ 0x55 MQTTMessage* message = msg->message; 8002c9e: 687b ldr r3, [r7, #4] 8002ca0: 681b ldr r3, [r3, #0] 8002ca2: 64bb str r3, [r7, #72] @ 0x48 char topicName[32] = { 0 }; 8002ca4: 2300 movs r3, #0 8002ca6: 61bb str r3, [r7, #24] 8002ca8: f107 031c add.w r3, r7, #28 8002cac: 2200 movs r2, #0 8002cae: 601a str r2, [r3, #0] 8002cb0: 605a str r2, [r3, #4] 8002cb2: 609a str r2, [r3, #8] 8002cb4: 60da str r2, [r3, #12] 8002cb6: 611a str r2, [r3, #16] 8002cb8: 615a str r2, [r3, #20] 8002cba: 619a str r2, [r3, #24] memcpy (topicName, msg->topicName->lenstring.data, msg->topicName->lenstring.len); 8002cbc: 687b ldr r3, [r7, #4] 8002cbe: 685b ldr r3, [r3, #4] 8002cc0: 6899 ldr r1, [r3, #8] 8002cc2: 687b ldr r3, [r7, #4] 8002cc4: 685b ldr r3, [r3, #4] 8002cc6: 685b ldr r3, [r3, #4] 8002cc8: 461a mov r2, r3 8002cca: f107 0318 add.w r3, r7, #24 8002cce: 4618 mov r0, r3 8002cd0: f027 f905 bl 8029ede for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8002cd4: 2300 movs r3, #0 8002cd6: f887 3055 strb.w r3, [r7, #85] @ 0x55 8002cda: e017 b.n 8002d0c if (strcmp (topicName, subscribeTopicNames[boardNumber]) == 0) { 8002cdc: f897 3055 ldrb.w r3, [r7, #85] @ 0x55 8002ce0: 4a8c ldr r2, [pc, #560] @ (8002f14 ) 8002ce2: f852 2023 ldr.w r2, [r2, r3, lsl #2] 8002ce6: f107 0318 add.w r3, r7, #24 8002cea: 4611 mov r1, r2 8002cec: 4618 mov r0, r3 8002cee: f7fd faf7 bl 80002e0 8002cf2: 4603 mov r3, r0 8002cf4: 2b00 cmp r3, #0 8002cf6: d104 bne.n 8002d02 topicForBoard = (BoardNoOverTopic)(boardNumber + 1); 8002cf8: f897 3055 ldrb.w r3, [r7, #85] @ 0x55 8002cfc: 3301 adds r3, #1 8002cfe: f887 3056 strb.w r3, [r7, #86] @ 0x56 for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8002d02: f897 3055 ldrb.w r3, [r7, #85] @ 0x55 8002d06: 3301 adds r3, #1 8002d08: f887 3055 strb.w r3, [r7, #85] @ 0x55 8002d0c: f897 3055 ldrb.w r3, [r7, #85] @ 0x55 8002d10: 2b03 cmp r3, #3 8002d12: d9e3 bls.n 8002cdc } } cJSON* json = cJSON_Parse (message->payload); 8002d14: 6cbb ldr r3, [r7, #72] @ 0x48 8002d16: 689b ldr r3, [r3, #8] 8002d18: 4618 mov r0, r3 8002d1a: f7fe fc1b bl 8001554 8002d1e: 6478 str r0, [r7, #68] @ 0x44 const cJSON* objectItem = NULL; 8002d20: 2300 movs r3, #0 8002d22: 643b str r3, [r7, #64] @ 0x40 InterProcessData data = { 0 }; 8002d24: f107 030c add.w r3, r7, #12 8002d28: 2200 movs r2, #0 8002d2a: 601a str r2, [r3, #0] 8002d2c: 605a str r2, [r3, #4] 8002d2e: 609a str r2, [r3, #8] for (int topicCmdNumber = 0; topicCmdNumber < 6; topicCmdNumber++) { 8002d30: 2300 movs r3, #0 8002d32: 653b str r3, [r7, #80] @ 0x50 8002d34: e0d8 b.n 8002ee8 spCommand = spUnknown; 8002d36: 2308 movs r3, #8 8002d38: f887 3057 strb.w r3, [r7, #87] @ 0x57 objectItem = cJSON_GetObjectItemCaseSensitive (json, topicCommands[topicCmdNumber]); 8002d3c: 4a76 ldr r2, [pc, #472] @ (8002f18 ) 8002d3e: 6d3b ldr r3, [r7, #80] @ 0x50 8002d40: f852 3023 ldr.w r3, [r2, r3, lsl #2] 8002d44: 4619 mov r1, r3 8002d46: 6c78 ldr r0, [r7, #68] @ 0x44 8002d48: f7fe ff6e bl 8001c28 8002d4c: 6438 str r0, [r7, #64] @ 0x40 if (objectItem != NULL) { 8002d4e: 6c3b ldr r3, [r7, #64] @ 0x40 8002d50: 2b00 cmp r3, #0 8002d52: f000 80c6 beq.w 8002ee2 switch (topicCmdNumber) { 8002d56: 6d3b ldr r3, [r7, #80] @ 0x50 8002d58: 2b05 cmp r3, #5 8002d5a: d86e bhi.n 8002e3a 8002d5c: a201 add r2, pc, #4 @ (adr r2, 8002d64 ) 8002d5e: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8002d62: bf00 nop 8002d64: 08002d7d .word 0x08002d7d 8002d68: 08002d83 .word 0x08002d83 8002d6c: 08002d91 .word 0x08002d91 8002d70: 08002dfb .word 0x08002dfb 8002d74: 08002e0b .word 0x08002e0b 8002d78: 08002e11 .word 0x08002e11 case 0: spCommand = spSetFanSpeed; 8002d7c: 2302 movs r3, #2 8002d7e: f887 3057 strb.w r3, [r7, #87] @ 0x57 case 1: if (spCommand == spUnknown) { 8002d82: f897 3057 ldrb.w r3, [r7, #87] @ 0x57 8002d86: 2b08 cmp r3, #8 8002d88: d102 bne.n 8002d90 spCommand = spSetMotorXOn; 8002d8a: 2303 movs r3, #3 8002d8c: f887 3057 strb.w r3, [r7, #87] @ 0x57 } case 2: if (spCommand == spUnknown) { 8002d90: f897 3057 ldrb.w r3, [r7, #87] @ 0x57 8002d94: 2b08 cmp r3, #8 8002d96: d102 bne.n 8002d9e spCommand = spSetMotorYOn; 8002d98: 2304 movs r3, #4 8002d9a: f887 3057 strb.w r3, [r7, #87] @ 0x57 } if (cJSON_IsArray (objectItem)) { 8002d9e: 6c38 ldr r0, [r7, #64] @ 0x40 8002da0: f7fe ff68 bl 8001c74 8002da4: 4603 mov r3, r0 8002da6: 2b00 cmp r3, #0 8002da8: d049 beq.n 8002e3e data.spCommand = spCommand; 8002daa: f897 3057 ldrb.w r3, [r7, #87] @ 0x57 8002dae: 733b strb r3, [r7, #12] int arraySize = cJSON_GetArraySize (objectItem); 8002db0: 6c38 ldr r0, [r7, #64] @ 0x40 8002db2: f7fe fe99 bl 8001ae8 8002db6: 63f8 str r0, [r7, #60] @ 0x3c if (arraySize == 2) { 8002db8: 6bfb ldr r3, [r7, #60] @ 0x3c 8002dba: 2b02 cmp r3, #2 8002dbc: d13f bne.n 8002e3e for (int i = 0; i < arraySize; i++) { 8002dbe: 2300 movs r3, #0 8002dc0: 64fb str r3, [r7, #76] @ 0x4c 8002dc2: e015 b.n 8002df0 cJSON* item = cJSON_GetArrayItem (objectItem, i); 8002dc4: 6cf9 ldr r1, [r7, #76] @ 0x4c 8002dc6: 6c38 ldr r0, [r7, #64] @ 0x40 8002dc8: f7fe fed2 bl 8001b70 8002dcc: 63b8 str r0, [r7, #56] @ 0x38 if (cJSON_IsNumber (item)) { 8002dce: 6bb8 ldr r0, [r7, #56] @ 0x38 8002dd0: f7fe ff39 bl 8001c46 8002dd4: 4603 mov r3, r0 8002dd6: 2b00 cmp r3, #0 8002dd8: d007 beq.n 8002dea data.values.integerValues.value[i] = item->valueint; 8002dda: 6bbb ldr r3, [r7, #56] @ 0x38 8002ddc: 695a ldr r2, [r3, #20] 8002dde: 6cfb ldr r3, [r7, #76] @ 0x4c 8002de0: 009b lsls r3, r3, #2 8002de2: 3358 adds r3, #88 @ 0x58 8002de4: 443b add r3, r7 8002de6: f843 2c48 str.w r2, [r3, #-72] for (int i = 0; i < arraySize; i++) { 8002dea: 6cfb ldr r3, [r7, #76] @ 0x4c 8002dec: 3301 adds r3, #1 8002dee: 64fb str r3, [r7, #76] @ 0x4c 8002df0: 6cfa ldr r2, [r7, #76] @ 0x4c 8002df2: 6bfb ldr r3, [r7, #60] @ 0x3c 8002df4: 429a cmp r2, r3 8002df6: dbe5 blt.n 8002dc4 } } } } break; 8002df8: e021 b.n 8002e3e case 3: data.spCommand = spSetDiodeOn; 8002dfa: 2307 movs r3, #7 8002dfc: 733b strb r3, [r7, #12] data.values.integerValues.value[0] = objectItem->valueint; 8002dfe: 6c3b ldr r3, [r7, #64] @ 0x40 8002e00: 695b ldr r3, [r3, #20] 8002e02: 613b str r3, [r7, #16] data.values.integerValues.value[1] = 0; 8002e04: 2300 movs r3, #0 8002e06: 617b str r3, [r7, #20] break; 8002e08: e01a b.n 8002e40 case 4: spCommand = spSetmotorXMaxCurrent; 8002e0a: 2305 movs r3, #5 8002e0c: f887 3057 strb.w r3, [r7, #87] @ 0x57 case 5: if (spCommand == spUnknown) { 8002e10: f897 3057 ldrb.w r3, [r7, #87] @ 0x57 8002e14: 2b08 cmp r3, #8 8002e16: d102 bne.n 8002e1e spCommand = spSetmotorYMaxCurrent; 8002e18: 2306 movs r3, #6 8002e1a: f887 3057 strb.w r3, [r7, #87] @ 0x57 } data.spCommand = spCommand; 8002e1e: f897 3057 ldrb.w r3, [r7, #87] @ 0x57 8002e22: 733b strb r3, [r7, #12] data.values.flaotValues.value[0] = objectItem->valuedouble; 8002e24: 6c3b ldr r3, [r7, #64] @ 0x40 8002e26: ed93 7b06 vldr d7, [r3, #24] 8002e2a: eef7 7bc7 vcvt.f32.f64 s15, d7 8002e2e: edc7 7a04 vstr s15, [r7, #16] data.values.flaotValues.value[1] = 0.0; 8002e32: f04f 0300 mov.w r3, #0 8002e36: 617b str r3, [r7, #20] break; 8002e38: e002 b.n 8002e40 default: break; 8002e3a: bf00 nop 8002e3c: e000 b.n 8002e40 break; 8002e3e: bf00 nop } switch (topicForBoard) { 8002e40: f897 3056 ldrb.w r3, [r7, #86] @ 0x56 8002e44: 3b01 subs r3, #1 8002e46: 2b03 cmp r3, #3 8002e48: d84a bhi.n 8002ee0 8002e4a: a201 add r2, pc, #4 @ (adr r2, 8002e50 ) 8002e4c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8002e50: 08002e61 .word 0x08002e61 8002e54: 08002e81 .word 0x08002e81 8002e58: 08002ea1 .word 0x08002ea1 8002e5c: 08002ec1 .word 0x08002ec1 if (uart1TaskData.sendCmdToSlaveQueue != NULL) { osMessageQueuePut ( uart1TaskData.sendCmdToSlaveQueue, &data, 0, (TickType_t)100); } #else if (uart8TaskData.sendCmdToSlaveQueue != NULL) { 8002e60: 4b2e ldr r3, [pc, #184] @ (8002f1c ) 8002e62: 6adb ldr r3, [r3, #44] @ 0x2c 8002e64: 2b00 cmp r3, #0 8002e66: d007 beq.n 8002e78 osMessageQueuePut (uart8TaskData.sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 8002e68: 4b2c ldr r3, [pc, #176] @ (8002f1c ) 8002e6a: 6ad8 ldr r0, [r3, #44] @ 0x2c 8002e6c: f107 010c add.w r1, r7, #12 8002e70: 2364 movs r3, #100 @ 0x64 8002e72: 2200 movs r2, #0 8002e74: f00e f866 bl 8010f44 } #endif printf ("Send cmd to board 1\n"); 8002e78: 4829 ldr r0, [pc, #164] @ (8002f20 ) 8002e7a: f026 fe0f bl 8029a9c break; 8002e7e: e030 b.n 8002ee2 case board_2: if (uart3TaskData.sendCmdToSlaveQueue != NULL) { 8002e80: 4b28 ldr r3, [pc, #160] @ (8002f24 ) 8002e82: 6adb ldr r3, [r3, #44] @ 0x2c 8002e84: 2b00 cmp r3, #0 8002e86: d007 beq.n 8002e98 osMessageQueuePut (uart3TaskData.sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 8002e88: 4b26 ldr r3, [pc, #152] @ (8002f24 ) 8002e8a: 6ad8 ldr r0, [r3, #44] @ 0x2c 8002e8c: f107 010c add.w r1, r7, #12 8002e90: 2364 movs r3, #100 @ 0x64 8002e92: 2200 movs r2, #0 8002e94: f00e f856 bl 8010f44 } printf ("Send cmd to board 2\n"); 8002e98: 4823 ldr r0, [pc, #140] @ (8002f28 ) 8002e9a: f026 fdff bl 8029a9c break; 8002e9e: e020 b.n 8002ee2 case board_3: if (uart6TaskData.sendCmdToSlaveQueue != NULL) { 8002ea0: 4b22 ldr r3, [pc, #136] @ (8002f2c ) 8002ea2: 6adb ldr r3, [r3, #44] @ 0x2c 8002ea4: 2b00 cmp r3, #0 8002ea6: d007 beq.n 8002eb8 osMessageQueuePut (uart6TaskData.sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 8002ea8: 4b20 ldr r3, [pc, #128] @ (8002f2c ) 8002eaa: 6ad8 ldr r0, [r3, #44] @ 0x2c 8002eac: f107 010c add.w r1, r7, #12 8002eb0: 2364 movs r3, #100 @ 0x64 8002eb2: 2200 movs r2, #0 8002eb4: f00e f846 bl 8010f44 } printf ("Send cmd to board 3\n"); 8002eb8: 481d ldr r0, [pc, #116] @ (8002f30 ) 8002eba: f026 fdef bl 8029a9c break; 8002ebe: e010 b.n 8002ee2 case board_4: if (uart2TaskData.sendCmdToSlaveQueue != NULL) { 8002ec0: 4b1c ldr r3, [pc, #112] @ (8002f34 ) 8002ec2: 6adb ldr r3, [r3, #44] @ 0x2c 8002ec4: 2b00 cmp r3, #0 8002ec6: d007 beq.n 8002ed8 osMessageQueuePut (uart2TaskData.sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 8002ec8: 4b1a ldr r3, [pc, #104] @ (8002f34 ) 8002eca: 6ad8 ldr r0, [r3, #44] @ 0x2c 8002ecc: f107 010c add.w r1, r7, #12 8002ed0: 2364 movs r3, #100 @ 0x64 8002ed2: 2200 movs r2, #0 8002ed4: f00e f836 bl 8010f44 } printf ("Send cmd to board 4\n"); 8002ed8: 4817 ldr r0, [pc, #92] @ (8002f38 ) 8002eda: f026 fddf bl 8029a9c break; 8002ede: e000 b.n 8002ee2 default: break; 8002ee0: bf00 nop for (int topicCmdNumber = 0; topicCmdNumber < 6; topicCmdNumber++) { 8002ee2: 6d3b ldr r3, [r7, #80] @ 0x50 8002ee4: 3301 adds r3, #1 8002ee6: 653b str r3, [r7, #80] @ 0x50 8002ee8: 6d3b ldr r3, [r7, #80] @ 0x50 8002eea: 2b05 cmp r3, #5 8002eec: f77f af23 ble.w 8002d36 } } } cJSON_Delete (json); 8002ef0: 6c78 ldr r0, [r7, #68] @ 0x44 8002ef2: f7fd fe4b bl 8000b8c // printf ("MQTT MSG[%d]:%s\n", (int)message->payloadlen, (char*)message->payload); printf ("MQTT Topic:%s, MSG[%d]:%s\n", topicName, (int)message->payloadlen, (char*)message->payload); 8002ef6: 6cbb ldr r3, [r7, #72] @ 0x48 8002ef8: 68db ldr r3, [r3, #12] 8002efa: 461a mov r2, r3 8002efc: 6cbb ldr r3, [r7, #72] @ 0x48 8002efe: 689b ldr r3, [r3, #8] 8002f00: f107 0118 add.w r1, r7, #24 8002f04: 480d ldr r0, [pc, #52] @ (8002f3c ) 8002f06: f026 fd61 bl 80299cc } 8002f0a: bf00 nop 8002f0c: 3758 adds r7, #88 @ 0x58 8002f0e: 46bd mov sp, r7 8002f10: bd80 pop {r7, pc} 8002f12: bf00 nop 8002f14: 080309b4 .word 0x080309b4 8002f18: 080309c4 .word 0x080309c4 8002f1c: 24001f0c .word 0x24001f0c 8002f20: 0802c878 .word 0x0802c878 8002f24: 24001e64 .word 0x24001e64 8002f28: 0802c88c .word 0x0802c88c 8002f2c: 24001e9c .word 0x24001e9c 8002f30: 0802c8a0 .word 0x0802c8a0 8002f34: 24001ed4 .word 0x24001ed4 8002f38: 0802c8b4 .word 0x0802c8b4 8002f3c: 0802c8c8 .word 0x0802c8c8 08002f40 : void mqtt_cli_init (void) { 8002f40: b580 push {r7, lr} 8002f42: af00 add r7, sp, #0 mqttClientSubTaskHandle = osThreadNew (MqttClientSubTask, NULL, &mqttClientSubTaskAttr); // subscribe task 8002f44: 4a08 ldr r2, [pc, #32] @ (8002f68 ) 8002f46: 2100 movs r1, #0 8002f48: 4808 ldr r0, [pc, #32] @ (8002f6c ) 8002f4a: f00d fc7c bl 8010846 8002f4e: 4603 mov r3, r0 8002f50: 4a07 ldr r2, [pc, #28] @ (8002f70 ) 8002f52: 6013 str r3, [r2, #0] mqttClientPubTaskHandle = osThreadNew (MqttClientPubTask, NULL, &mqttClientPubTaskAttr); // publish task 8002f54: 4a07 ldr r2, [pc, #28] @ (8002f74 ) 8002f56: 2100 movs r1, #0 8002f58: 4807 ldr r0, [pc, #28] @ (8002f78 ) 8002f5a: f00d fc74 bl 8010846 8002f5e: 4603 mov r3, r0 8002f60: 4a06 ldr r2, [pc, #24] @ (8002f7c ) 8002f62: 6013 str r3, [r2, #0] } 8002f64: bf00 nop 8002f66: bd80 pop {r7, pc} 8002f68: 080309dc .word 0x080309dc 8002f6c: 08002515 .word 0x08002515 8002f70: 24000658 .word 0x24000658 8002f74: 08030a00 .word 0x08030a00 8002f78: 08002585 .word 0x08002585 8002f7c: 2400065c .word 0x2400065c 08002f80 : buff[newBuffPos++] = (uint8_t)((uData >> (i * 8)) & 0xFF); } *buffPos = newBuffPos; } void WriteDataToBuffer (uint8_t* buff, uint16_t* buffPos, void* data, uint8_t dataSize) { 8002f80: b480 push {r7} 8002f82: b089 sub sp, #36 @ 0x24 8002f84: af00 add r7, sp, #0 8002f86: 60f8 str r0, [r7, #12] 8002f88: 60b9 str r1, [r7, #8] 8002f8a: 607a str r2, [r7, #4] 8002f8c: 70fb strb r3, [r7, #3] uint32_t* uDataPtr = data; 8002f8e: 687b ldr r3, [r7, #4] 8002f90: 61bb str r3, [r7, #24] uint32_t uData = *uDataPtr; 8002f92: 69bb ldr r3, [r7, #24] 8002f94: 681b ldr r3, [r3, #0] 8002f96: 617b str r3, [r7, #20] uint8_t i = 0; 8002f98: 2300 movs r3, #0 8002f9a: 77fb strb r3, [r7, #31] uint8_t newBuffPos = *buffPos; 8002f9c: 68bb ldr r3, [r7, #8] 8002f9e: 881b ldrh r3, [r3, #0] 8002fa0: 77bb strb r3, [r7, #30] for (i = 0; i < dataSize; i++) { 8002fa2: 2300 movs r3, #0 8002fa4: 77fb strb r3, [r7, #31] 8002fa6: e00e b.n 8002fc6 buff[newBuffPos++] = (uint8_t)((uData >> (i * 8)) & 0xFF); 8002fa8: 7ffb ldrb r3, [r7, #31] 8002faa: 00db lsls r3, r3, #3 8002fac: 697a ldr r2, [r7, #20] 8002fae: 40da lsrs r2, r3 8002fb0: 7fbb ldrb r3, [r7, #30] 8002fb2: 1c59 adds r1, r3, #1 8002fb4: 77b9 strb r1, [r7, #30] 8002fb6: 4619 mov r1, r3 8002fb8: 68fb ldr r3, [r7, #12] 8002fba: 440b add r3, r1 8002fbc: b2d2 uxtb r2, r2 8002fbe: 701a strb r2, [r3, #0] for (i = 0; i < dataSize; i++) { 8002fc0: 7ffb ldrb r3, [r7, #31] 8002fc2: 3301 adds r3, #1 8002fc4: 77fb strb r3, [r7, #31] 8002fc6: 7ffa ldrb r2, [r7, #31] 8002fc8: 78fb ldrb r3, [r7, #3] 8002fca: 429a cmp r2, r3 8002fcc: d3ec bcc.n 8002fa8 } *buffPos = newBuffPos; 8002fce: 7fbb ldrb r3, [r7, #30] 8002fd0: b29a uxth r2, r3 8002fd2: 68bb ldr r3, [r7, #8] 8002fd4: 801a strh r2, [r3, #0] } 8002fd6: bf00 nop 8002fd8: 3724 adds r7, #36 @ 0x24 8002fda: 46bd mov sp, r7 8002fdc: f85d 7b04 ldr.w r7, [sp], #4 8002fe0: 4770 bx lr 08002fe2 : void ReadFloatFromBuffer(uint8_t* buff, uint16_t* buffPos, float* data) { 8002fe2: b480 push {r7} 8002fe4: b087 sub sp, #28 8002fe6: af00 add r7, sp, #0 8002fe8: 60f8 str r0, [r7, #12] 8002fea: 60b9 str r1, [r7, #8] 8002fec: 607a str r2, [r7, #4] uint32_t* word = (uint32_t *)data; 8002fee: 687b ldr r3, [r7, #4] 8002ff0: 617b str r3, [r7, #20] *word = CONVERT_BYTES_TO_WORD(&buff[*buffPos]); 8002ff2: 68bb ldr r3, [r7, #8] 8002ff4: 881b ldrh r3, [r3, #0] 8002ff6: 3303 adds r3, #3 8002ff8: 68fa ldr r2, [r7, #12] 8002ffa: 4413 add r3, r2 8002ffc: 781b ldrb r3, [r3, #0] 8002ffe: 061a lsls r2, r3, #24 8003000: 68bb ldr r3, [r7, #8] 8003002: 881b ldrh r3, [r3, #0] 8003004: 3302 adds r3, #2 8003006: 68f9 ldr r1, [r7, #12] 8003008: 440b add r3, r1 800300a: 781b ldrb r3, [r3, #0] 800300c: 041b lsls r3, r3, #16 800300e: 431a orrs r2, r3 8003010: 68bb ldr r3, [r7, #8] 8003012: 881b ldrh r3, [r3, #0] 8003014: 3301 adds r3, #1 8003016: 68f9 ldr r1, [r7, #12] 8003018: 440b add r3, r1 800301a: 781b ldrb r3, [r3, #0] 800301c: 021b lsls r3, r3, #8 800301e: 4313 orrs r3, r2 8003020: 68ba ldr r2, [r7, #8] 8003022: 8812 ldrh r2, [r2, #0] 8003024: 4611 mov r1, r2 8003026: 68fa ldr r2, [r7, #12] 8003028: 440a add r2, r1 800302a: 7812 ldrb r2, [r2, #0] 800302c: 4313 orrs r3, r2 800302e: 461a mov r2, r3 8003030: 697b ldr r3, [r7, #20] 8003032: 601a str r2, [r3, #0] *buffPos += sizeof(float); 8003034: 68bb ldr r3, [r7, #8] 8003036: 881b ldrh r3, [r3, #0] 8003038: 3304 adds r3, #4 800303a: b29a uxth r2, r3 800303c: 68bb ldr r3, [r7, #8] 800303e: 801a strh r2, [r3, #0] } 8003040: bf00 nop 8003042: 371c adds r7, #28 8003044: 46bd mov sp, r7 8003046: f85d 7b04 ldr.w r7, [sp], #4 800304a: 4770 bx lr 0800304c : *data = CONVERT_BYTES_TO_SHORT_WORD(&buff[*buffPos]); *buffPos += sizeof(uint32_t); } void ReadByteFromBufer(uint8_t* buff, uint16_t* buffPos, uint8_t* data) { 800304c: b480 push {r7} 800304e: b085 sub sp, #20 8003050: af00 add r7, sp, #0 8003052: 60f8 str r0, [r7, #12] 8003054: 60b9 str r1, [r7, #8] 8003056: 607a str r2, [r7, #4] *data = CONVERT_BYTES_TO_SHORT_WORD(&buff[*buffPos]); 8003058: 68bb ldr r3, [r7, #8] 800305a: 881b ldrh r3, [r3, #0] 800305c: 3301 adds r3, #1 800305e: 68fa ldr r2, [r7, #12] 8003060: 4413 add r3, r2 8003062: 781b ldrb r3, [r3, #0] 8003064: 021b lsls r3, r3, #8 8003066: b25a sxtb r2, r3 8003068: 68bb ldr r3, [r7, #8] 800306a: 881b ldrh r3, [r3, #0] 800306c: 4619 mov r1, r3 800306e: 68fb ldr r3, [r7, #12] 8003070: 440b add r3, r1 8003072: 781b ldrb r3, [r3, #0] 8003074: b25b sxtb r3, r3 8003076: 4313 orrs r3, r2 8003078: b25b sxtb r3, r3 800307a: b2da uxtb r2, r3 800307c: 687b ldr r3, [r7, #4] 800307e: 701a strb r2, [r3, #0] *buffPos += sizeof(uint8_t); 8003080: 68bb ldr r3, [r7, #8] 8003082: 881b ldrh r3, [r3, #0] 8003084: 3301 adds r3, #1 8003086: b29a uxth r2, r3 8003088: 68bb ldr r3, [r7, #8] 800308a: 801a strh r2, [r3, #0] } 800308c: bf00 nop 800308e: 3714 adds r7, #20 8003090: 46bd mov sp, r7 8003092: f85d 7b04 ldr.w r7, [sp], #4 8003096: 4770 bx lr 08003098 : uint16_t PrepareReqFrame (uint8_t* txBuffer, uint16_t frameId, SerialProtocolCommands frameCommand, uint8_t* dataBuffer, uint16_t dataLength) { 8003098: b580 push {r7, lr} 800309a: b086 sub sp, #24 800309c: af00 add r7, sp, #0 800309e: 60f8 str r0, [r7, #12] 80030a0: 607b str r3, [r7, #4] 80030a2: 460b mov r3, r1 80030a4: 817b strh r3, [r7, #10] 80030a6: 4613 mov r3, r2 80030a8: 727b strb r3, [r7, #9] uint16_t crc = 0; 80030aa: 2300 movs r3, #0 80030ac: 82bb strh r3, [r7, #20] uint16_t txBufferPos = 0; 80030ae: 2300 movs r3, #0 80030b0: 82fb strh r3, [r7, #22] uint16_t frameCmd = ((uint16_t)frameCommand); 80030b2: 7a7b ldrb r3, [r7, #9] 80030b4: 827b strh r3, [r7, #18] memset (txBuffer, 0x00, dataLength); 80030b6: 8c3b ldrh r3, [r7, #32] 80030b8: 461a mov r2, r3 80030ba: 2100 movs r1, #0 80030bc: 68f8 ldr r0, [r7, #12] 80030be: f026 fe17 bl 8029cf0 txBuffer[txBufferPos++] = FRAME_INDICATOR; 80030c2: 8afb ldrh r3, [r7, #22] 80030c4: 1c5a adds r2, r3, #1 80030c6: 82fa strh r2, [r7, #22] 80030c8: 461a mov r2, r3 80030ca: 68fb ldr r3, [r7, #12] 80030cc: 4413 add r3, r2 80030ce: 22aa movs r2, #170 @ 0xaa 80030d0: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (frameId); 80030d2: 8afb ldrh r3, [r7, #22] 80030d4: 1c5a adds r2, r3, #1 80030d6: 82fa strh r2, [r7, #22] 80030d8: 461a mov r2, r3 80030da: 68fb ldr r3, [r7, #12] 80030dc: 4413 add r3, r2 80030de: 897a ldrh r2, [r7, #10] 80030e0: b2d2 uxtb r2, r2 80030e2: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (frameId); 80030e4: 897b ldrh r3, [r7, #10] 80030e6: 0a1b lsrs r3, r3, #8 80030e8: b29a uxth r2, r3 80030ea: 8afb ldrh r3, [r7, #22] 80030ec: 1c59 adds r1, r3, #1 80030ee: 82f9 strh r1, [r7, #22] 80030f0: 4619 mov r1, r3 80030f2: 68fb ldr r3, [r7, #12] 80030f4: 440b add r3, r1 80030f6: b2d2 uxtb r2, r2 80030f8: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (frameCmd); 80030fa: 8afb ldrh r3, [r7, #22] 80030fc: 1c5a adds r2, r3, #1 80030fe: 82fa strh r2, [r7, #22] 8003100: 461a mov r2, r3 8003102: 68fb ldr r3, [r7, #12] 8003104: 4413 add r3, r2 8003106: 8a7a ldrh r2, [r7, #18] 8003108: b2d2 uxtb r2, r2 800310a: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (frameCmd); 800310c: 8a7b ldrh r3, [r7, #18] 800310e: 0a1b lsrs r3, r3, #8 8003110: b29a uxth r2, r3 8003112: 8afb ldrh r3, [r7, #22] 8003114: 1c59 adds r1, r3, #1 8003116: 82f9 strh r1, [r7, #22] 8003118: 4619 mov r1, r3 800311a: 68fb ldr r3, [r7, #12] 800311c: 440b add r3, r1 800311e: b2d2 uxtb r2, r2 8003120: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (dataLength); 8003122: 8afb ldrh r3, [r7, #22] 8003124: 1c5a adds r2, r3, #1 8003126: 82fa strh r2, [r7, #22] 8003128: 461a mov r2, r3 800312a: 68fb ldr r3, [r7, #12] 800312c: 4413 add r3, r2 800312e: 8c3a ldrh r2, [r7, #32] 8003130: b2d2 uxtb r2, r2 8003132: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (dataLength); 8003134: 8c3b ldrh r3, [r7, #32] 8003136: 0a1b lsrs r3, r3, #8 8003138: b29a uxth r2, r3 800313a: 8afb ldrh r3, [r7, #22] 800313c: 1c59 adds r1, r3, #1 800313e: 82f9 strh r1, [r7, #22] 8003140: 4619 mov r1, r3 8003142: 68fb ldr r3, [r7, #12] 8003144: 440b add r3, r1 8003146: b2d2 uxtb r2, r2 8003148: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = 0x00; 800314a: 8afb ldrh r3, [r7, #22] 800314c: 1c5a adds r2, r3, #1 800314e: 82fa strh r2, [r7, #22] 8003150: 461a mov r2, r3 8003152: 68fb ldr r3, [r7, #12] 8003154: 4413 add r3, r2 8003156: 2200 movs r2, #0 8003158: 701a strb r2, [r3, #0] if (dataLength > 0) { 800315a: 8c3b ldrh r3, [r7, #32] 800315c: 2b00 cmp r3, #0 800315e: d00b beq.n 8003178 memcpy (&txBuffer[txBufferPos], dataBuffer, dataLength); 8003160: 8afb ldrh r3, [r7, #22] 8003162: 68fa ldr r2, [r7, #12] 8003164: 4413 add r3, r2 8003166: 8c3a ldrh r2, [r7, #32] 8003168: 6879 ldr r1, [r7, #4] 800316a: 4618 mov r0, r3 800316c: f026 feb7 bl 8029ede txBufferPos += dataLength; 8003170: 8afa ldrh r2, [r7, #22] 8003172: 8c3b ldrh r3, [r7, #32] 8003174: 4413 add r3, r2 8003176: 82fb strh r3, [r7, #22] } crc = HAL_CRC_Calculate (&hcrc, (uint32_t*)txBuffer, txBufferPos); 8003178: 8afb ldrh r3, [r7, #22] 800317a: 461a mov r2, r3 800317c: 68f9 ldr r1, [r7, #12] 800317e: 480f ldr r0, [pc, #60] @ (80031bc ) 8003180: f002 f962 bl 8005448 8003184: 4603 mov r3, r0 8003186: 82bb strh r3, [r7, #20] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (crc); 8003188: 8afb ldrh r3, [r7, #22] 800318a: 1c5a adds r2, r3, #1 800318c: 82fa strh r2, [r7, #22] 800318e: 461a mov r2, r3 8003190: 68fb ldr r3, [r7, #12] 8003192: 4413 add r3, r2 8003194: 8aba ldrh r2, [r7, #20] 8003196: b2d2 uxtb r2, r2 8003198: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (crc); 800319a: 8abb ldrh r3, [r7, #20] 800319c: 0a1b lsrs r3, r3, #8 800319e: b29a uxth r2, r3 80031a0: 8afb ldrh r3, [r7, #22] 80031a2: 1c59 adds r1, r3, #1 80031a4: 82f9 strh r1, [r7, #22] 80031a6: 4619 mov r1, r3 80031a8: 68fb ldr r3, [r7, #12] 80031aa: 440b add r3, r1 80031ac: b2d2 uxtb r2, r2 80031ae: 701a strb r2, [r3, #0] return txBufferPos; 80031b0: 8afb ldrh r3, [r7, #22] } 80031b2: 4618 mov r0, r3 80031b4: 3718 adds r7, #24 80031b6: 46bd mov sp, r7 80031b8: bd80 pop {r7, pc} 80031ba: bf00 nop 80031bc: 24000248 .word 0x24000248 080031c0 : uint16_t PrepareRespFrame (uint8_t* txBuffer, uint16_t frameId, SerialProtocolCommands frameCommand, SerialProtocolRespStatus respStatus, uint8_t* dataBuffer, uint16_t dataLength) { 80031c0: b580 push {r7, lr} 80031c2: b084 sub sp, #16 80031c4: af00 add r7, sp, #0 80031c6: 6078 str r0, [r7, #4] 80031c8: 4608 mov r0, r1 80031ca: 4611 mov r1, r2 80031cc: 461a mov r2, r3 80031ce: 4603 mov r3, r0 80031d0: 807b strh r3, [r7, #2] 80031d2: 460b mov r3, r1 80031d4: 707b strb r3, [r7, #1] 80031d6: 4613 mov r3, r2 80031d8: 703b strb r3, [r7, #0] uint16_t crc = 0; 80031da: 2300 movs r3, #0 80031dc: 81bb strh r3, [r7, #12] uint16_t txBufferPos = 0; 80031de: 2300 movs r3, #0 80031e0: 81fb strh r3, [r7, #14] uint16_t frameCmd = ((uint16_t)frameCommand) | 0x8000; // MSB set means response 80031e2: 787b ldrb r3, [r7, #1] 80031e4: b21a sxth r2, r3 80031e6: 4b43 ldr r3, [pc, #268] @ (80032f4 ) 80031e8: 4313 orrs r3, r2 80031ea: b21b sxth r3, r3 80031ec: 817b strh r3, [r7, #10] memset (txBuffer, 0x00, dataLength); 80031ee: 8bbb ldrh r3, [r7, #28] 80031f0: 461a mov r2, r3 80031f2: 2100 movs r1, #0 80031f4: 6878 ldr r0, [r7, #4] 80031f6: f026 fd7b bl 8029cf0 txBuffer[txBufferPos++] = FRAME_INDICATOR; 80031fa: 89fb ldrh r3, [r7, #14] 80031fc: 1c5a adds r2, r3, #1 80031fe: 81fa strh r2, [r7, #14] 8003200: 461a mov r2, r3 8003202: 687b ldr r3, [r7, #4] 8003204: 4413 add r3, r2 8003206: 22aa movs r2, #170 @ 0xaa 8003208: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (frameId); 800320a: 89fb ldrh r3, [r7, #14] 800320c: 1c5a adds r2, r3, #1 800320e: 81fa strh r2, [r7, #14] 8003210: 461a mov r2, r3 8003212: 687b ldr r3, [r7, #4] 8003214: 4413 add r3, r2 8003216: 887a ldrh r2, [r7, #2] 8003218: b2d2 uxtb r2, r2 800321a: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (frameId); 800321c: 887b ldrh r3, [r7, #2] 800321e: 0a1b lsrs r3, r3, #8 8003220: b29a uxth r2, r3 8003222: 89fb ldrh r3, [r7, #14] 8003224: 1c59 adds r1, r3, #1 8003226: 81f9 strh r1, [r7, #14] 8003228: 4619 mov r1, r3 800322a: 687b ldr r3, [r7, #4] 800322c: 440b add r3, r1 800322e: b2d2 uxtb r2, r2 8003230: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (frameCmd); 8003232: 89fb ldrh r3, [r7, #14] 8003234: 1c5a adds r2, r3, #1 8003236: 81fa strh r2, [r7, #14] 8003238: 461a mov r2, r3 800323a: 687b ldr r3, [r7, #4] 800323c: 4413 add r3, r2 800323e: 897a ldrh r2, [r7, #10] 8003240: b2d2 uxtb r2, r2 8003242: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (frameCmd); 8003244: 897b ldrh r3, [r7, #10] 8003246: 0a1b lsrs r3, r3, #8 8003248: b29a uxth r2, r3 800324a: 89fb ldrh r3, [r7, #14] 800324c: 1c59 adds r1, r3, #1 800324e: 81f9 strh r1, [r7, #14] 8003250: 4619 mov r1, r3 8003252: 687b ldr r3, [r7, #4] 8003254: 440b add r3, r1 8003256: b2d2 uxtb r2, r2 8003258: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (dataLength); 800325a: 89fb ldrh r3, [r7, #14] 800325c: 1c5a adds r2, r3, #1 800325e: 81fa strh r2, [r7, #14] 8003260: 461a mov r2, r3 8003262: 687b ldr r3, [r7, #4] 8003264: 4413 add r3, r2 8003266: 8bba ldrh r2, [r7, #28] 8003268: b2d2 uxtb r2, r2 800326a: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (dataLength); 800326c: 8bbb ldrh r3, [r7, #28] 800326e: 0a1b lsrs r3, r3, #8 8003270: b29a uxth r2, r3 8003272: 89fb ldrh r3, [r7, #14] 8003274: 1c59 adds r1, r3, #1 8003276: 81f9 strh r1, [r7, #14] 8003278: 4619 mov r1, r3 800327a: 687b ldr r3, [r7, #4] 800327c: 440b add r3, r1 800327e: b2d2 uxtb r2, r2 8003280: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = (uint8_t)respStatus; 8003282: 89fb ldrh r3, [r7, #14] 8003284: 1c5a adds r2, r3, #1 8003286: 81fa strh r2, [r7, #14] 8003288: 461a mov r2, r3 800328a: 687b ldr r3, [r7, #4] 800328c: 4413 add r3, r2 800328e: 783a ldrb r2, [r7, #0] 8003290: 701a strb r2, [r3, #0] if (dataLength > 0) { 8003292: 8bbb ldrh r3, [r7, #28] 8003294: 2b00 cmp r3, #0 8003296: d00b beq.n 80032b0 memcpy (&txBuffer[txBufferPos], dataBuffer, dataLength); 8003298: 89fb ldrh r3, [r7, #14] 800329a: 687a ldr r2, [r7, #4] 800329c: 4413 add r3, r2 800329e: 8bba ldrh r2, [r7, #28] 80032a0: 69b9 ldr r1, [r7, #24] 80032a2: 4618 mov r0, r3 80032a4: f026 fe1b bl 8029ede txBufferPos += dataLength; 80032a8: 89fa ldrh r2, [r7, #14] 80032aa: 8bbb ldrh r3, [r7, #28] 80032ac: 4413 add r3, r2 80032ae: 81fb strh r3, [r7, #14] } crc = HAL_CRC_Calculate (&hcrc, (uint32_t*)txBuffer, txBufferPos); 80032b0: 89fb ldrh r3, [r7, #14] 80032b2: 461a mov r2, r3 80032b4: 6879 ldr r1, [r7, #4] 80032b6: 4810 ldr r0, [pc, #64] @ (80032f8 ) 80032b8: f002 f8c6 bl 8005448 80032bc: 4603 mov r3, r0 80032be: 81bb strh r3, [r7, #12] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (crc); 80032c0: 89fb ldrh r3, [r7, #14] 80032c2: 1c5a adds r2, r3, #1 80032c4: 81fa strh r2, [r7, #14] 80032c6: 461a mov r2, r3 80032c8: 687b ldr r3, [r7, #4] 80032ca: 4413 add r3, r2 80032cc: 89ba ldrh r2, [r7, #12] 80032ce: b2d2 uxtb r2, r2 80032d0: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (crc); 80032d2: 89bb ldrh r3, [r7, #12] 80032d4: 0a1b lsrs r3, r3, #8 80032d6: b29a uxth r2, r3 80032d8: 89fb ldrh r3, [r7, #14] 80032da: 1c59 adds r1, r3, #1 80032dc: 81f9 strh r1, [r7, #14] 80032de: 4619 mov r1, r3 80032e0: 687b ldr r3, [r7, #4] 80032e2: 440b add r3, r1 80032e4: b2d2 uxtb r2, r2 80032e6: 701a strb r2, [r3, #0] return txBufferPos; 80032e8: 89fb ldrh r3, [r7, #14] } 80032ea: 4618 mov r0, r3 80032ec: 3710 adds r7, #16 80032ee: 46bd mov sp, r7 80032f0: bd80 pop {r7, pc} 80032f2: bf00 nop 80032f4: ffff8000 .word 0xffff8000 80032f8: 24000248 .word 0x24000248 080032fc : /* USER CODE END 0 */ /** * Initializes the Global MSP. */ void HAL_MspInit(void) { 80032fc: b580 push {r7, lr} 80032fe: b082 sub sp, #8 8003300: af00 add r7, sp, #0 /* USER CODE BEGIN MspInit 0 */ /* USER CODE END MspInit 0 */ __HAL_RCC_SYSCFG_CLK_ENABLE(); 8003302: 4b10 ldr r3, [pc, #64] @ (8003344 ) 8003304: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 8003308: 4a0e ldr r2, [pc, #56] @ (8003344 ) 800330a: f043 0302 orr.w r3, r3, #2 800330e: f8c2 30f4 str.w r3, [r2, #244] @ 0xf4 8003312: 4b0c ldr r3, [pc, #48] @ (8003344 ) 8003314: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 8003318: f003 0302 and.w r3, r3, #2 800331c: 607b str r3, [r7, #4] 800331e: 687b ldr r3, [r7, #4] /* System interrupt init*/ /* PendSV_IRQn interrupt configuration */ HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0); 8003320: 2200 movs r2, #0 8003322: 210f movs r1, #15 8003324: f06f 0001 mvn.w r0, #1 8003328: f001 ff8a bl 8005240 /* Peripheral interrupt init */ /* RCC_IRQn interrupt configuration */ HAL_NVIC_SetPriority(RCC_IRQn, 5, 0); 800332c: 2200 movs r2, #0 800332e: 2105 movs r1, #5 8003330: 2005 movs r0, #5 8003332: f001 ff85 bl 8005240 HAL_NVIC_EnableIRQ(RCC_IRQn); 8003336: 2005 movs r0, #5 8003338: f001 ff9c bl 8005274 /* USER CODE BEGIN MspInit 1 */ /* USER CODE END MspInit 1 */ } 800333c: bf00 nop 800333e: 3708 adds r7, #8 8003340: 46bd mov sp, r7 8003342: bd80 pop {r7, pc} 8003344: 58024400 .word 0x58024400 08003348 : * This function configures the hardware resources used in this example * @param hcrc: CRC handle pointer * @retval None */ void HAL_CRC_MspInit(CRC_HandleTypeDef* hcrc) { 8003348: b480 push {r7} 800334a: b085 sub sp, #20 800334c: af00 add r7, sp, #0 800334e: 6078 str r0, [r7, #4] if(hcrc->Instance==CRC) 8003350: 687b ldr r3, [r7, #4] 8003352: 681b ldr r3, [r3, #0] 8003354: 4a0b ldr r2, [pc, #44] @ (8003384 ) 8003356: 4293 cmp r3, r2 8003358: d10e bne.n 8003378 { /* USER CODE BEGIN CRC_MspInit 0 */ /* USER CODE END CRC_MspInit 0 */ /* Peripheral clock enable */ __HAL_RCC_CRC_CLK_ENABLE(); 800335a: 4b0b ldr r3, [pc, #44] @ (8003388 ) 800335c: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003360: 4a09 ldr r2, [pc, #36] @ (8003388 ) 8003362: f443 2300 orr.w r3, r3, #524288 @ 0x80000 8003366: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 800336a: 4b07 ldr r3, [pc, #28] @ (8003388 ) 800336c: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003370: f403 2300 and.w r3, r3, #524288 @ 0x80000 8003374: 60fb str r3, [r7, #12] 8003376: 68fb ldr r3, [r7, #12] /* USER CODE BEGIN CRC_MspInit 1 */ /* USER CODE END CRC_MspInit 1 */ } } 8003378: bf00 nop 800337a: 3714 adds r7, #20 800337c: 46bd mov sp, r7 800337e: f85d 7b04 ldr.w r7, [sp], #4 8003382: 4770 bx lr 8003384: 58024c00 .word 0x58024c00 8003388: 58024400 .word 0x58024400 0800338c : * This function configures the hardware resources used in this example * @param hrng: RNG handle pointer * @retval None */ void HAL_RNG_MspInit(RNG_HandleTypeDef* hrng) { 800338c: b580 push {r7, lr} 800338e: b0b4 sub sp, #208 @ 0xd0 8003390: af00 add r7, sp, #0 8003392: 6078 str r0, [r7, #4] RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; 8003394: f107 0310 add.w r3, r7, #16 8003398: 22c0 movs r2, #192 @ 0xc0 800339a: 2100 movs r1, #0 800339c: 4618 mov r0, r3 800339e: f026 fca7 bl 8029cf0 if(hrng->Instance==RNG) 80033a2: 687b ldr r3, [r7, #4] 80033a4: 681b ldr r3, [r3, #0] 80033a6: 4a14 ldr r2, [pc, #80] @ (80033f8 ) 80033a8: 4293 cmp r3, r2 80033aa: d121 bne.n 80033f0 /* USER CODE END RNG_MspInit 0 */ /** Initializes the peripherals clock */ PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RNG; 80033ac: f44f 3200 mov.w r2, #131072 @ 0x20000 80033b0: f04f 0300 mov.w r3, #0 80033b4: e9c7 2304 strd r2, r3, [r7, #16] PeriphClkInitStruct.RngClockSelection = RCC_RNGCLKSOURCE_HSI48; 80033b8: 2300 movs r3, #0 80033ba: f8c7 3090 str.w r3, [r7, #144] @ 0x90 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 80033be: f107 0310 add.w r3, r7, #16 80033c2: 4618 mov r0, r3 80033c4: f007 fb90 bl 800aae8 80033c8: 4603 mov r3, r0 80033ca: 2b00 cmp r3, #0 80033cc: d001 beq.n 80033d2 { Error_Handler(); 80033ce: f7ff f89b bl 8002508 } /* Peripheral clock enable */ __HAL_RCC_RNG_CLK_ENABLE(); 80033d2: 4b0a ldr r3, [pc, #40] @ (80033fc ) 80033d4: f8d3 30dc ldr.w r3, [r3, #220] @ 0xdc 80033d8: 4a08 ldr r2, [pc, #32] @ (80033fc ) 80033da: f043 0340 orr.w r3, r3, #64 @ 0x40 80033de: f8c2 30dc str.w r3, [r2, #220] @ 0xdc 80033e2: 4b06 ldr r3, [pc, #24] @ (80033fc ) 80033e4: f8d3 30dc ldr.w r3, [r3, #220] @ 0xdc 80033e8: f003 0340 and.w r3, r3, #64 @ 0x40 80033ec: 60fb str r3, [r7, #12] 80033ee: 68fb ldr r3, [r7, #12] /* USER CODE BEGIN RNG_MspInit 1 */ /* USER CODE END RNG_MspInit 1 */ } } 80033f0: bf00 nop 80033f2: 37d0 adds r7, #208 @ 0xd0 80033f4: 46bd mov sp, r7 80033f6: bd80 pop {r7, pc} 80033f8: 48021800 .word 0x48021800 80033fc: 58024400 .word 0x58024400 08003400 : * This function configures the hardware resources used in this example * @param huart: UART handle pointer * @retval None */ void HAL_UART_MspInit(UART_HandleTypeDef* huart) { 8003400: b580 push {r7, lr} 8003402: b0c2 sub sp, #264 @ 0x108 8003404: af00 add r7, sp, #0 8003406: f507 7384 add.w r3, r7, #264 @ 0x108 800340a: f5a3 7382 sub.w r3, r3, #260 @ 0x104 800340e: 6018 str r0, [r3, #0] GPIO_InitTypeDef GPIO_InitStruct = {0}; 8003410: f107 03f4 add.w r3, r7, #244 @ 0xf4 8003414: 2200 movs r2, #0 8003416: 601a str r2, [r3, #0] 8003418: 605a str r2, [r3, #4] 800341a: 609a str r2, [r3, #8] 800341c: 60da str r2, [r3, #12] 800341e: 611a str r2, [r3, #16] RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; 8003420: f107 0330 add.w r3, r7, #48 @ 0x30 8003424: 22c0 movs r2, #192 @ 0xc0 8003426: 2100 movs r1, #0 8003428: 4618 mov r0, r3 800342a: f026 fc61 bl 8029cf0 if(huart->Instance==UART8) 800342e: f507 7384 add.w r3, r7, #264 @ 0x108 8003432: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003436: 681b ldr r3, [r3, #0] 8003438: 681b ldr r3, [r3, #0] 800343a: 4ab8 ldr r2, [pc, #736] @ (800371c ) 800343c: 4293 cmp r3, r2 800343e: f040 80bc bne.w 80035ba /* USER CODE END UART8_MspInit 0 */ /** Initializes the peripherals clock */ PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_UART8; 8003442: f04f 0202 mov.w r2, #2 8003446: f04f 0300 mov.w r3, #0 800344a: e9c7 230c strd r2, r3, [r7, #48] @ 0x30 PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1; 800344e: 2300 movs r3, #0 8003450: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 8003454: f107 0330 add.w r3, r7, #48 @ 0x30 8003458: 4618 mov r0, r3 800345a: f007 fb45 bl 800aae8 800345e: 4603 mov r3, r0 8003460: 2b00 cmp r3, #0 8003462: d001 beq.n 8003468 { Error_Handler(); 8003464: f7ff f850 bl 8002508 } /* Peripheral clock enable */ __HAL_RCC_UART8_CLK_ENABLE(); 8003468: 4bad ldr r3, [pc, #692] @ (8003720 ) 800346a: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 800346e: 4aac ldr r2, [pc, #688] @ (8003720 ) 8003470: f043 4300 orr.w r3, r3, #2147483648 @ 0x80000000 8003474: f8c2 30e8 str.w r3, [r2, #232] @ 0xe8 8003478: 4ba9 ldr r3, [pc, #676] @ (8003720 ) 800347a: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 800347e: f003 4300 and.w r3, r3, #2147483648 @ 0x80000000 8003482: 62fb str r3, [r7, #44] @ 0x2c 8003484: 6afb ldr r3, [r7, #44] @ 0x2c __HAL_RCC_GPIOE_CLK_ENABLE(); 8003486: 4ba6 ldr r3, [pc, #664] @ (8003720 ) 8003488: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 800348c: 4aa4 ldr r2, [pc, #656] @ (8003720 ) 800348e: f043 0310 orr.w r3, r3, #16 8003492: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8003496: 4ba2 ldr r3, [pc, #648] @ (8003720 ) 8003498: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 800349c: f003 0310 and.w r3, r3, #16 80034a0: 62bb str r3, [r7, #40] @ 0x28 80034a2: 6abb ldr r3, [r7, #40] @ 0x28 /**UART8 GPIO Configuration PE0 ------> UART8_RX PE1 ------> UART8_TX */ GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1; 80034a4: 2303 movs r3, #3 80034a6: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 80034aa: 2302 movs r3, #2 80034ac: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 GPIO_InitStruct.Pull = GPIO_NOPULL; 80034b0: 2300 movs r3, #0 80034b2: f8c7 30fc str.w r3, [r7, #252] @ 0xfc GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; 80034b6: 2300 movs r3, #0 80034b8: f8c7 3100 str.w r3, [r7, #256] @ 0x100 GPIO_InitStruct.Alternate = GPIO_AF8_UART8; 80034bc: 2308 movs r3, #8 80034be: f8c7 3104 str.w r3, [r7, #260] @ 0x104 HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); 80034c2: f107 03f4 add.w r3, r7, #244 @ 0xf4 80034c6: 4619 mov r1, r3 80034c8: 4896 ldr r0, [pc, #600] @ (8003724 ) 80034ca: f006 f8e1 bl 8009690 /* UART8 DMA Init */ /* UART8_RX Init */ hdma_uart8_rx.Instance = DMA2_Stream7; 80034ce: 4b96 ldr r3, [pc, #600] @ (8003728 ) 80034d0: 4a96 ldr r2, [pc, #600] @ (800372c ) 80034d2: 601a str r2, [r3, #0] hdma_uart8_rx.Init.Request = DMA_REQUEST_UART8_RX; 80034d4: 4b94 ldr r3, [pc, #592] @ (8003728 ) 80034d6: 2251 movs r2, #81 @ 0x51 80034d8: 605a str r2, [r3, #4] hdma_uart8_rx.Init.Direction = DMA_PERIPH_TO_MEMORY; 80034da: 4b93 ldr r3, [pc, #588] @ (8003728 ) 80034dc: 2200 movs r2, #0 80034de: 609a str r2, [r3, #8] hdma_uart8_rx.Init.PeriphInc = DMA_PINC_DISABLE; 80034e0: 4b91 ldr r3, [pc, #580] @ (8003728 ) 80034e2: 2200 movs r2, #0 80034e4: 60da str r2, [r3, #12] hdma_uart8_rx.Init.MemInc = DMA_MINC_ENABLE; 80034e6: 4b90 ldr r3, [pc, #576] @ (8003728 ) 80034e8: f44f 6280 mov.w r2, #1024 @ 0x400 80034ec: 611a str r2, [r3, #16] hdma_uart8_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; 80034ee: 4b8e ldr r3, [pc, #568] @ (8003728 ) 80034f0: 2200 movs r2, #0 80034f2: 615a str r2, [r3, #20] hdma_uart8_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; 80034f4: 4b8c ldr r3, [pc, #560] @ (8003728 ) 80034f6: 2200 movs r2, #0 80034f8: 619a str r2, [r3, #24] hdma_uart8_rx.Init.Mode = DMA_NORMAL; 80034fa: 4b8b ldr r3, [pc, #556] @ (8003728 ) 80034fc: 2200 movs r2, #0 80034fe: 61da str r2, [r3, #28] hdma_uart8_rx.Init.Priority = DMA_PRIORITY_VERY_HIGH; 8003500: 4b89 ldr r3, [pc, #548] @ (8003728 ) 8003502: f44f 3240 mov.w r2, #196608 @ 0x30000 8003506: 621a str r2, [r3, #32] hdma_uart8_rx.Init.FIFOMode = DMA_FIFOMODE_DISABLE; 8003508: 4b87 ldr r3, [pc, #540] @ (8003728 ) 800350a: 2200 movs r2, #0 800350c: 625a str r2, [r3, #36] @ 0x24 if (HAL_DMA_Init(&hdma_uart8_rx) != HAL_OK) 800350e: 4886 ldr r0, [pc, #536] @ (8003728 ) 8003510: f002 f93c bl 800578c 8003514: 4603 mov r3, r0 8003516: 2b00 cmp r3, #0 8003518: d001 beq.n 800351e { Error_Handler(); 800351a: f7fe fff5 bl 8002508 } __HAL_LINKDMA(huart,hdmarx,hdma_uart8_rx); 800351e: f507 7384 add.w r3, r7, #264 @ 0x108 8003522: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003526: 681b ldr r3, [r3, #0] 8003528: 4a7f ldr r2, [pc, #508] @ (8003728 ) 800352a: f8c3 2080 str.w r2, [r3, #128] @ 0x80 800352e: 4a7e ldr r2, [pc, #504] @ (8003728 ) 8003530: f507 7384 add.w r3, r7, #264 @ 0x108 8003534: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003538: 681b ldr r3, [r3, #0] 800353a: 6393 str r3, [r2, #56] @ 0x38 /* UART8_TX Init */ hdma_uart8_tx.Instance = DMA2_Stream6; 800353c: 4b7c ldr r3, [pc, #496] @ (8003730 ) 800353e: 4a7d ldr r2, [pc, #500] @ (8003734 ) 8003540: 601a str r2, [r3, #0] hdma_uart8_tx.Init.Request = DMA_REQUEST_UART8_TX; 8003542: 4b7b ldr r3, [pc, #492] @ (8003730 ) 8003544: 2252 movs r2, #82 @ 0x52 8003546: 605a str r2, [r3, #4] hdma_uart8_tx.Init.Direction = DMA_MEMORY_TO_PERIPH; 8003548: 4b79 ldr r3, [pc, #484] @ (8003730 ) 800354a: 2240 movs r2, #64 @ 0x40 800354c: 609a str r2, [r3, #8] hdma_uart8_tx.Init.PeriphInc = DMA_PINC_DISABLE; 800354e: 4b78 ldr r3, [pc, #480] @ (8003730 ) 8003550: 2200 movs r2, #0 8003552: 60da str r2, [r3, #12] hdma_uart8_tx.Init.MemInc = DMA_MINC_ENABLE; 8003554: 4b76 ldr r3, [pc, #472] @ (8003730 ) 8003556: f44f 6280 mov.w r2, #1024 @ 0x400 800355a: 611a str r2, [r3, #16] hdma_uart8_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; 800355c: 4b74 ldr r3, [pc, #464] @ (8003730 ) 800355e: 2200 movs r2, #0 8003560: 615a str r2, [r3, #20] hdma_uart8_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; 8003562: 4b73 ldr r3, [pc, #460] @ (8003730 ) 8003564: 2200 movs r2, #0 8003566: 619a str r2, [r3, #24] hdma_uart8_tx.Init.Mode = DMA_NORMAL; 8003568: 4b71 ldr r3, [pc, #452] @ (8003730 ) 800356a: 2200 movs r2, #0 800356c: 61da str r2, [r3, #28] hdma_uart8_tx.Init.Priority = DMA_PRIORITY_VERY_HIGH; 800356e: 4b70 ldr r3, [pc, #448] @ (8003730 ) 8003570: f44f 3240 mov.w r2, #196608 @ 0x30000 8003574: 621a str r2, [r3, #32] hdma_uart8_tx.Init.FIFOMode = DMA_FIFOMODE_DISABLE; 8003576: 4b6e ldr r3, [pc, #440] @ (8003730 ) 8003578: 2200 movs r2, #0 800357a: 625a str r2, [r3, #36] @ 0x24 if (HAL_DMA_Init(&hdma_uart8_tx) != HAL_OK) 800357c: 486c ldr r0, [pc, #432] @ (8003730 ) 800357e: f002 f905 bl 800578c 8003582: 4603 mov r3, r0 8003584: 2b00 cmp r3, #0 8003586: d001 beq.n 800358c { Error_Handler(); 8003588: f7fe ffbe bl 8002508 } __HAL_LINKDMA(huart,hdmatx,hdma_uart8_tx); 800358c: f507 7384 add.w r3, r7, #264 @ 0x108 8003590: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003594: 681b ldr r3, [r3, #0] 8003596: 4a66 ldr r2, [pc, #408] @ (8003730 ) 8003598: 67da str r2, [r3, #124] @ 0x7c 800359a: 4a65 ldr r2, [pc, #404] @ (8003730 ) 800359c: f507 7384 add.w r3, r7, #264 @ 0x108 80035a0: f5a3 7382 sub.w r3, r3, #260 @ 0x104 80035a4: 681b ldr r3, [r3, #0] 80035a6: 6393 str r3, [r2, #56] @ 0x38 /* UART8 interrupt Init */ HAL_NVIC_SetPriority(UART8_IRQn, 5, 0); 80035a8: 2200 movs r2, #0 80035aa: 2105 movs r1, #5 80035ac: 2053 movs r0, #83 @ 0x53 80035ae: f001 fe47 bl 8005240 HAL_NVIC_EnableIRQ(UART8_IRQn); 80035b2: 2053 movs r0, #83 @ 0x53 80035b4: f001 fe5e bl 8005274 /* USER CODE BEGIN USART6_MspInit 1 */ /* USER CODE END USART6_MspInit 1 */ } } 80035b8: e17e b.n 80038b8 else if(huart->Instance==USART1) 80035ba: f507 7384 add.w r3, r7, #264 @ 0x108 80035be: f5a3 7382 sub.w r3, r3, #260 @ 0x104 80035c2: 681b ldr r3, [r3, #0] 80035c4: 681b ldr r3, [r3, #0] 80035c6: 4a5c ldr r2, [pc, #368] @ (8003738 ) 80035c8: 4293 cmp r3, r2 80035ca: d14f bne.n 800366c PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART1; 80035cc: f04f 0201 mov.w r2, #1 80035d0: f04f 0300 mov.w r3, #0 80035d4: e9c7 230c strd r2, r3, [r7, #48] @ 0x30 PeriphClkInitStruct.Usart16ClockSelection = RCC_USART16CLKSOURCE_D2PCLK2; 80035d8: 2300 movs r3, #0 80035da: f8c7 30ac str.w r3, [r7, #172] @ 0xac if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 80035de: f107 0330 add.w r3, r7, #48 @ 0x30 80035e2: 4618 mov r0, r3 80035e4: f007 fa80 bl 800aae8 80035e8: 4603 mov r3, r0 80035ea: 2b00 cmp r3, #0 80035ec: d001 beq.n 80035f2 Error_Handler(); 80035ee: f7fe ff8b bl 8002508 __HAL_RCC_USART1_CLK_ENABLE(); 80035f2: 4b4b ldr r3, [pc, #300] @ (8003720 ) 80035f4: f8d3 30f0 ldr.w r3, [r3, #240] @ 0xf0 80035f8: 4a49 ldr r2, [pc, #292] @ (8003720 ) 80035fa: f043 0310 orr.w r3, r3, #16 80035fe: f8c2 30f0 str.w r3, [r2, #240] @ 0xf0 8003602: 4b47 ldr r3, [pc, #284] @ (8003720 ) 8003604: f8d3 30f0 ldr.w r3, [r3, #240] @ 0xf0 8003608: f003 0310 and.w r3, r3, #16 800360c: 627b str r3, [r7, #36] @ 0x24 800360e: 6a7b ldr r3, [r7, #36] @ 0x24 __HAL_RCC_GPIOB_CLK_ENABLE(); 8003610: 4b43 ldr r3, [pc, #268] @ (8003720 ) 8003612: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003616: 4a42 ldr r2, [pc, #264] @ (8003720 ) 8003618: f043 0302 orr.w r3, r3, #2 800361c: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8003620: 4b3f ldr r3, [pc, #252] @ (8003720 ) 8003622: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003626: f003 0302 and.w r3, r3, #2 800362a: 623b str r3, [r7, #32] 800362c: 6a3b ldr r3, [r7, #32] GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15; 800362e: f44f 4340 mov.w r3, #49152 @ 0xc000 8003632: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8003636: 2302 movs r3, #2 8003638: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 GPIO_InitStruct.Pull = GPIO_NOPULL; 800363c: 2300 movs r3, #0 800363e: f8c7 30fc str.w r3, [r7, #252] @ 0xfc GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; 8003642: 2302 movs r3, #2 8003644: f8c7 3100 str.w r3, [r7, #256] @ 0x100 GPIO_InitStruct.Alternate = GPIO_AF4_USART1; 8003648: 2304 movs r3, #4 800364a: f8c7 3104 str.w r3, [r7, #260] @ 0x104 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); 800364e: f107 03f4 add.w r3, r7, #244 @ 0xf4 8003652: 4619 mov r1, r3 8003654: 4839 ldr r0, [pc, #228] @ (800373c ) 8003656: f006 f81b bl 8009690 HAL_NVIC_SetPriority(USART1_IRQn, 5, 0); 800365a: 2200 movs r2, #0 800365c: 2105 movs r1, #5 800365e: 2025 movs r0, #37 @ 0x25 8003660: f001 fdee bl 8005240 HAL_NVIC_EnableIRQ(USART1_IRQn); 8003664: 2025 movs r0, #37 @ 0x25 8003666: f001 fe05 bl 8005274 } 800366a: e125 b.n 80038b8 else if(huart->Instance==USART2) 800366c: f507 7384 add.w r3, r7, #264 @ 0x108 8003670: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003674: 681b ldr r3, [r3, #0] 8003676: 681b ldr r3, [r3, #0] 8003678: 4a31 ldr r2, [pc, #196] @ (8003740 ) 800367a: 4293 cmp r3, r2 800367c: d164 bne.n 8003748 PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART2; 800367e: f04f 0202 mov.w r2, #2 8003682: f04f 0300 mov.w r3, #0 8003686: e9c7 230c strd r2, r3, [r7, #48] @ 0x30 PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1; 800368a: 2300 movs r3, #0 800368c: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 8003690: f107 0330 add.w r3, r7, #48 @ 0x30 8003694: 4618 mov r0, r3 8003696: f007 fa27 bl 800aae8 800369a: 4603 mov r3, r0 800369c: 2b00 cmp r3, #0 800369e: d001 beq.n 80036a4 Error_Handler(); 80036a0: f7fe ff32 bl 8002508 __HAL_RCC_USART2_CLK_ENABLE(); 80036a4: 4b1e ldr r3, [pc, #120] @ (8003720 ) 80036a6: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 80036aa: 4a1d ldr r2, [pc, #116] @ (8003720 ) 80036ac: f443 3300 orr.w r3, r3, #131072 @ 0x20000 80036b0: f8c2 30e8 str.w r3, [r2, #232] @ 0xe8 80036b4: 4b1a ldr r3, [pc, #104] @ (8003720 ) 80036b6: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 80036ba: f403 3300 and.w r3, r3, #131072 @ 0x20000 80036be: 61fb str r3, [r7, #28] 80036c0: 69fb ldr r3, [r7, #28] __HAL_RCC_GPIOD_CLK_ENABLE(); 80036c2: 4b17 ldr r3, [pc, #92] @ (8003720 ) 80036c4: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80036c8: 4a15 ldr r2, [pc, #84] @ (8003720 ) 80036ca: f043 0308 orr.w r3, r3, #8 80036ce: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 80036d2: 4b13 ldr r3, [pc, #76] @ (8003720 ) 80036d4: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80036d8: f003 0308 and.w r3, r3, #8 80036dc: 61bb str r3, [r7, #24] 80036de: 69bb ldr r3, [r7, #24] GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6; 80036e0: 2360 movs r3, #96 @ 0x60 80036e2: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 80036e6: 2302 movs r3, #2 80036e8: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 GPIO_InitStruct.Pull = GPIO_NOPULL; 80036ec: 2300 movs r3, #0 80036ee: f8c7 30fc str.w r3, [r7, #252] @ 0xfc GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; 80036f2: 2302 movs r3, #2 80036f4: f8c7 3100 str.w r3, [r7, #256] @ 0x100 GPIO_InitStruct.Alternate = GPIO_AF7_USART2; 80036f8: 2307 movs r3, #7 80036fa: f8c7 3104 str.w r3, [r7, #260] @ 0x104 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); 80036fe: f107 03f4 add.w r3, r7, #244 @ 0xf4 8003702: 4619 mov r1, r3 8003704: 480f ldr r0, [pc, #60] @ (8003744 ) 8003706: f005 ffc3 bl 8009690 HAL_NVIC_SetPriority(USART2_IRQn, 5, 0); 800370a: 2200 movs r2, #0 800370c: 2105 movs r1, #5 800370e: 2026 movs r0, #38 @ 0x26 8003710: f001 fd96 bl 8005240 HAL_NVIC_EnableIRQ(USART2_IRQn); 8003714: 2026 movs r0, #38 @ 0x26 8003716: f001 fdad bl 8005274 } 800371a: e0cd b.n 80038b8 800371c: 40007c00 .word 0x40007c00 8003720: 58024400 .word 0x58024400 8003724: 58021000 .word 0x58021000 8003728: 24000564 .word 0x24000564 800372c: 400204b8 .word 0x400204b8 8003730: 240005dc .word 0x240005dc 8003734: 400204a0 .word 0x400204a0 8003738: 40011000 .word 0x40011000 800373c: 58020400 .word 0x58020400 8003740: 40004400 .word 0x40004400 8003744: 58020c00 .word 0x58020c00 else if(huart->Instance==USART3) 8003748: f507 7384 add.w r3, r7, #264 @ 0x108 800374c: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003750: 681b ldr r3, [r3, #0] 8003752: 681b ldr r3, [r3, #0] 8003754: 4a5b ldr r2, [pc, #364] @ (80038c4 ) 8003756: 4293 cmp r3, r2 8003758: d14f bne.n 80037fa PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART3; 800375a: f04f 0202 mov.w r2, #2 800375e: f04f 0300 mov.w r3, #0 8003762: e9c7 230c strd r2, r3, [r7, #48] @ 0x30 PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1; 8003766: 2300 movs r3, #0 8003768: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 800376c: f107 0330 add.w r3, r7, #48 @ 0x30 8003770: 4618 mov r0, r3 8003772: f007 f9b9 bl 800aae8 8003776: 4603 mov r3, r0 8003778: 2b00 cmp r3, #0 800377a: d001 beq.n 8003780 Error_Handler(); 800377c: f7fe fec4 bl 8002508 __HAL_RCC_USART3_CLK_ENABLE(); 8003780: 4b51 ldr r3, [pc, #324] @ (80038c8 ) 8003782: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003786: 4a50 ldr r2, [pc, #320] @ (80038c8 ) 8003788: f443 2380 orr.w r3, r3, #262144 @ 0x40000 800378c: f8c2 30e8 str.w r3, [r2, #232] @ 0xe8 8003790: 4b4d ldr r3, [pc, #308] @ (80038c8 ) 8003792: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003796: f403 2380 and.w r3, r3, #262144 @ 0x40000 800379a: 617b str r3, [r7, #20] 800379c: 697b ldr r3, [r7, #20] __HAL_RCC_GPIOD_CLK_ENABLE(); 800379e: 4b4a ldr r3, [pc, #296] @ (80038c8 ) 80037a0: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80037a4: 4a48 ldr r2, [pc, #288] @ (80038c8 ) 80037a6: f043 0308 orr.w r3, r3, #8 80037aa: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 80037ae: 4b46 ldr r3, [pc, #280] @ (80038c8 ) 80037b0: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80037b4: f003 0308 and.w r3, r3, #8 80037b8: 613b str r3, [r7, #16] 80037ba: 693b ldr r3, [r7, #16] GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9; 80037bc: f44f 7340 mov.w r3, #768 @ 0x300 80037c0: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 80037c4: 2302 movs r3, #2 80037c6: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 GPIO_InitStruct.Pull = GPIO_NOPULL; 80037ca: 2300 movs r3, #0 80037cc: f8c7 30fc str.w r3, [r7, #252] @ 0xfc GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; 80037d0: 2302 movs r3, #2 80037d2: f8c7 3100 str.w r3, [r7, #256] @ 0x100 GPIO_InitStruct.Alternate = GPIO_AF7_USART3; 80037d6: 2307 movs r3, #7 80037d8: f8c7 3104 str.w r3, [r7, #260] @ 0x104 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); 80037dc: f107 03f4 add.w r3, r7, #244 @ 0xf4 80037e0: 4619 mov r1, r3 80037e2: 483a ldr r0, [pc, #232] @ (80038cc ) 80037e4: f005 ff54 bl 8009690 HAL_NVIC_SetPriority(USART3_IRQn, 5, 0); 80037e8: 2200 movs r2, #0 80037ea: 2105 movs r1, #5 80037ec: 2027 movs r0, #39 @ 0x27 80037ee: f001 fd27 bl 8005240 HAL_NVIC_EnableIRQ(USART3_IRQn); 80037f2: 2027 movs r0, #39 @ 0x27 80037f4: f001 fd3e bl 8005274 } 80037f8: e05e b.n 80038b8 else if(huart->Instance==USART6) 80037fa: f507 7384 add.w r3, r7, #264 @ 0x108 80037fe: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003802: 681b ldr r3, [r3, #0] 8003804: 681b ldr r3, [r3, #0] 8003806: 4a32 ldr r2, [pc, #200] @ (80038d0 ) 8003808: 4293 cmp r3, r2 800380a: d155 bne.n 80038b8 PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART6; 800380c: f04f 0201 mov.w r2, #1 8003810: f04f 0300 mov.w r3, #0 8003814: e9c7 230c strd r2, r3, [r7, #48] @ 0x30 PeriphClkInitStruct.Usart16ClockSelection = RCC_USART16CLKSOURCE_D2PCLK2; 8003818: 2300 movs r3, #0 800381a: f8c7 30ac str.w r3, [r7, #172] @ 0xac if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 800381e: f107 0330 add.w r3, r7, #48 @ 0x30 8003822: 4618 mov r0, r3 8003824: f007 f960 bl 800aae8 8003828: 4603 mov r3, r0 800382a: 2b00 cmp r3, #0 800382c: d001 beq.n 8003832 Error_Handler(); 800382e: f7fe fe6b bl 8002508 __HAL_RCC_USART6_CLK_ENABLE(); 8003832: 4b25 ldr r3, [pc, #148] @ (80038c8 ) 8003834: f8d3 30f0 ldr.w r3, [r3, #240] @ 0xf0 8003838: 4a23 ldr r2, [pc, #140] @ (80038c8 ) 800383a: f043 0320 orr.w r3, r3, #32 800383e: f8c2 30f0 str.w r3, [r2, #240] @ 0xf0 8003842: 4b21 ldr r3, [pc, #132] @ (80038c8 ) 8003844: f8d3 30f0 ldr.w r3, [r3, #240] @ 0xf0 8003848: f003 0320 and.w r3, r3, #32 800384c: 60fb str r3, [r7, #12] 800384e: 68fb ldr r3, [r7, #12] __HAL_RCC_GPIOC_CLK_ENABLE(); 8003850: 4b1d ldr r3, [pc, #116] @ (80038c8 ) 8003852: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003856: 4a1c ldr r2, [pc, #112] @ (80038c8 ) 8003858: f043 0304 orr.w r3, r3, #4 800385c: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8003860: 4b19 ldr r3, [pc, #100] @ (80038c8 ) 8003862: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003866: f003 0204 and.w r2, r3, #4 800386a: f507 7384 add.w r3, r7, #264 @ 0x108 800386e: f5a3 7380 sub.w r3, r3, #256 @ 0x100 8003872: 601a str r2, [r3, #0] 8003874: f507 7384 add.w r3, r7, #264 @ 0x108 8003878: f5a3 7380 sub.w r3, r3, #256 @ 0x100 800387c: 681b ldr r3, [r3, #0] GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7; 800387e: 23c0 movs r3, #192 @ 0xc0 8003880: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8003884: 2302 movs r3, #2 8003886: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 GPIO_InitStruct.Pull = GPIO_NOPULL; 800388a: 2300 movs r3, #0 800388c: f8c7 30fc str.w r3, [r7, #252] @ 0xfc GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; 8003890: 2302 movs r3, #2 8003892: f8c7 3100 str.w r3, [r7, #256] @ 0x100 GPIO_InitStruct.Alternate = GPIO_AF7_USART6; 8003896: 2307 movs r3, #7 8003898: f8c7 3104 str.w r3, [r7, #260] @ 0x104 HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); 800389c: f107 03f4 add.w r3, r7, #244 @ 0xf4 80038a0: 4619 mov r1, r3 80038a2: 480c ldr r0, [pc, #48] @ (80038d4 ) 80038a4: f005 fef4 bl 8009690 HAL_NVIC_SetPriority(USART6_IRQn, 5, 0); 80038a8: 2200 movs r2, #0 80038aa: 2105 movs r1, #5 80038ac: 2047 movs r0, #71 @ 0x47 80038ae: f001 fcc7 bl 8005240 HAL_NVIC_EnableIRQ(USART6_IRQn); 80038b2: 2047 movs r0, #71 @ 0x47 80038b4: f001 fcde bl 8005274 } 80038b8: bf00 nop 80038ba: f507 7784 add.w r7, r7, #264 @ 0x108 80038be: 46bd mov sp, r7 80038c0: bd80 pop {r7, pc} 80038c2: bf00 nop 80038c4: 40004800 .word 0x40004800 80038c8: 58024400 .word 0x58024400 80038cc: 58020c00 .word 0x58020c00 80038d0: 40011400 .word 0x40011400 80038d4: 58020800 .word 0x58020800 080038d8 : * 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) { 80038d8: b580 push {r7, lr} 80038da: b090 sub sp, #64 @ 0x40 80038dc: af00 add r7, sp, #0 80038de: 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)) 80038e0: 687b ldr r3, [r7, #4] 80038e2: 2b0f cmp r3, #15 80038e4: d827 bhi.n 8003936 { HAL_NVIC_SetPriority(TIM6_DAC_IRQn, TickPriority ,0U); 80038e6: 2200 movs r2, #0 80038e8: 6879 ldr r1, [r7, #4] 80038ea: 2036 movs r0, #54 @ 0x36 80038ec: f001 fca8 bl 8005240 /* Enable the TIM6 global Interrupt */ HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn); 80038f0: 2036 movs r0, #54 @ 0x36 80038f2: f001 fcbf bl 8005274 uwTickPrio = TickPriority; 80038f6: 4a29 ldr r2, [pc, #164] @ (800399c ) 80038f8: 687b ldr r3, [r7, #4] 80038fa: 6013 str r3, [r2, #0] { return HAL_ERROR; } /* Enable TIM6 clock */ __HAL_RCC_TIM6_CLK_ENABLE(); 80038fc: 4b28 ldr r3, [pc, #160] @ (80039a0 ) 80038fe: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003902: 4a27 ldr r2, [pc, #156] @ (80039a0 ) 8003904: f043 0310 orr.w r3, r3, #16 8003908: f8c2 30e8 str.w r3, [r2, #232] @ 0xe8 800390c: 4b24 ldr r3, [pc, #144] @ (80039a0 ) 800390e: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003912: f003 0310 and.w r3, r3, #16 8003916: 60fb str r3, [r7, #12] 8003918: 68fb ldr r3, [r7, #12] /* Get clock configuration */ HAL_RCC_GetClockConfig(&clkconfig, &pFLatency); 800391a: f107 0210 add.w r2, r7, #16 800391e: f107 0314 add.w r3, r7, #20 8003922: 4611 mov r1, r2 8003924: 4618 mov r0, r3 8003926: f007 f89d bl 800aa64 /* Get APB1 prescaler */ uwAPB1Prescaler = clkconfig.APB1CLKDivider; 800392a: 6abb ldr r3, [r7, #40] @ 0x28 800392c: 63bb str r3, [r7, #56] @ 0x38 /* Compute TIM6 clock */ if (uwAPB1Prescaler == RCC_HCLK_DIV1) 800392e: 6bbb ldr r3, [r7, #56] @ 0x38 8003930: 2b00 cmp r3, #0 8003932: d106 bne.n 8003942 8003934: e001 b.n 800393a return HAL_ERROR; 8003936: 2301 movs r3, #1 8003938: e02b b.n 8003992 { uwTimclock = HAL_RCC_GetPCLK1Freq(); 800393a: f007 f867 bl 800aa0c 800393e: 63f8 str r0, [r7, #60] @ 0x3c 8003940: e004 b.n 800394c } else { uwTimclock = 2UL * HAL_RCC_GetPCLK1Freq(); 8003942: f007 f863 bl 800aa0c 8003946: 4603 mov r3, r0 8003948: 005b lsls r3, r3, #1 800394a: 63fb str r3, [r7, #60] @ 0x3c } /* Compute the prescaler value to have TIM6 counter clock equal to 1MHz */ uwPrescalerValue = (uint32_t) ((uwTimclock / 1000000U) - 1U); 800394c: 6bfb ldr r3, [r7, #60] @ 0x3c 800394e: 4a15 ldr r2, [pc, #84] @ (80039a4 ) 8003950: fba2 2303 umull r2, r3, r2, r3 8003954: 0c9b lsrs r3, r3, #18 8003956: 3b01 subs r3, #1 8003958: 637b str r3, [r7, #52] @ 0x34 /* Initialize TIM6 */ htim6.Instance = TIM6; 800395a: 4b13 ldr r3, [pc, #76] @ (80039a8 ) 800395c: 4a13 ldr r2, [pc, #76] @ (80039ac ) 800395e: 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; 8003960: 4b11 ldr r3, [pc, #68] @ (80039a8 ) 8003962: f240 32e7 movw r2, #999 @ 0x3e7 8003966: 60da str r2, [r3, #12] htim6.Init.Prescaler = uwPrescalerValue; 8003968: 4a0f ldr r2, [pc, #60] @ (80039a8 ) 800396a: 6b7b ldr r3, [r7, #52] @ 0x34 800396c: 6053 str r3, [r2, #4] htim6.Init.ClockDivision = 0; 800396e: 4b0e ldr r3, [pc, #56] @ (80039a8 ) 8003970: 2200 movs r2, #0 8003972: 611a str r2, [r3, #16] htim6.Init.CounterMode = TIM_COUNTERMODE_UP; 8003974: 4b0c ldr r3, [pc, #48] @ (80039a8 ) 8003976: 2200 movs r2, #0 8003978: 609a str r2, [r3, #8] if(HAL_TIM_Base_Init(&htim6) == HAL_OK) 800397a: 480b ldr r0, [pc, #44] @ (80039a8 ) 800397c: f008 ff7c bl 800c878 8003980: 4603 mov r3, r0 8003982: 2b00 cmp r3, #0 8003984: d104 bne.n 8003990 { /* Start the TIM time Base generation in interrupt mode */ return HAL_TIM_Base_Start_IT(&htim6); 8003986: 4808 ldr r0, [pc, #32] @ (80039a8 ) 8003988: f008 ffd8 bl 800c93c 800398c: 4603 mov r3, r0 800398e: e000 b.n 8003992 } /* Return function status */ return HAL_ERROR; 8003990: 2301 movs r3, #1 } 8003992: 4618 mov r0, r3 8003994: 3740 adds r7, #64 @ 0x40 8003996: 46bd mov sp, r7 8003998: bd80 pop {r7, pc} 800399a: bf00 nop 800399c: 2400002c .word 0x2400002c 80039a0: 58024400 .word 0x58024400 80039a4: 431bde83 .word 0x431bde83 80039a8: 24000edc .word 0x24000edc 80039ac: 40001000 .word 0x40001000 080039b0 : /******************************************************************************/ /** * @brief This function handles Non maskable interrupt. */ void NMI_Handler(void) { 80039b0: b480 push {r7} 80039b2: 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) 80039b4: bf00 nop 80039b6: e7fd b.n 80039b4 080039b8 : /** * @brief This function handles Hard fault interrupt. */ void HardFault_Handler(void) { 80039b8: b480 push {r7} 80039ba: af00 add r7, sp, #0 /* USER CODE BEGIN HardFault_IRQn 0 */ /* USER CODE END HardFault_IRQn 0 */ while (1) 80039bc: bf00 nop 80039be: e7fd b.n 80039bc 080039c0 : /** * @brief This function handles Memory management fault. */ void MemManage_Handler(void) { 80039c0: b480 push {r7} 80039c2: af00 add r7, sp, #0 /* USER CODE BEGIN MemoryManagement_IRQn 0 */ /* USER CODE END MemoryManagement_IRQn 0 */ while (1) 80039c4: bf00 nop 80039c6: e7fd b.n 80039c4 080039c8 : /** * @brief This function handles Pre-fetch fault, memory access fault. */ void BusFault_Handler(void) { 80039c8: b480 push {r7} 80039ca: af00 add r7, sp, #0 /* USER CODE BEGIN BusFault_IRQn 0 */ /* USER CODE END BusFault_IRQn 0 */ while (1) 80039cc: bf00 nop 80039ce: e7fd b.n 80039cc 080039d0 : /** * @brief This function handles Undefined instruction or illegal state. */ void UsageFault_Handler(void) { 80039d0: b480 push {r7} 80039d2: af00 add r7, sp, #0 /* USER CODE BEGIN UsageFault_IRQn 0 */ /* USER CODE END UsageFault_IRQn 0 */ while (1) 80039d4: bf00 nop 80039d6: e7fd b.n 80039d4 080039d8 : /** * @brief This function handles Debug monitor. */ void DebugMon_Handler(void) { 80039d8: b480 push {r7} 80039da: af00 add r7, sp, #0 /* USER CODE END DebugMonitor_IRQn 0 */ /* USER CODE BEGIN DebugMonitor_IRQn 1 */ /* USER CODE END DebugMonitor_IRQn 1 */ } 80039dc: bf00 nop 80039de: 46bd mov sp, r7 80039e0: f85d 7b04 ldr.w r7, [sp], #4 80039e4: 4770 bx lr 080039e6 : /** * @brief This function handles RCC global interrupt. */ void RCC_IRQHandler(void) { 80039e6: b480 push {r7} 80039e8: af00 add r7, sp, #0 /* USER CODE END RCC_IRQn 0 */ /* USER CODE BEGIN RCC_IRQn 1 */ /* USER CODE END RCC_IRQn 1 */ } 80039ea: bf00 nop 80039ec: 46bd mov sp, r7 80039ee: f85d 7b04 ldr.w r7, [sp], #4 80039f2: 4770 bx lr 080039f4 : /** * @brief This function handles USART1 global interrupt. */ void USART1_IRQHandler(void) { 80039f4: b580 push {r7, lr} 80039f6: af00 add r7, sp, #0 /* USER CODE BEGIN USART1_IRQn 0 */ /* USER CODE END USART1_IRQn 0 */ HAL_UART_IRQHandler(&huart1); 80039f8: 4802 ldr r0, [pc, #8] @ (8003a04 ) 80039fa: f009 faef bl 800cfdc /* USER CODE BEGIN USART1_IRQn 1 */ /* USER CODE END USART1_IRQn 1 */ } 80039fe: bf00 nop 8003a00: bd80 pop {r7, pc} 8003a02: bf00 nop 8003a04: 24000314 .word 0x24000314 08003a08 : /** * @brief This function handles USART2 global interrupt. */ void USART2_IRQHandler(void) { 8003a08: b580 push {r7, lr} 8003a0a: af00 add r7, sp, #0 /* USER CODE BEGIN USART2_IRQn 0 */ /* USER CODE END USART2_IRQn 0 */ HAL_UART_IRQHandler(&huart2); 8003a0c: 4802 ldr r0, [pc, #8] @ (8003a18 ) 8003a0e: f009 fae5 bl 800cfdc /* USER CODE BEGIN USART2_IRQn 1 */ /* USER CODE END USART2_IRQn 1 */ } 8003a12: bf00 nop 8003a14: bd80 pop {r7, pc} 8003a16: bf00 nop 8003a18: 240003a8 .word 0x240003a8 08003a1c : /** * @brief This function handles USART3 global interrupt. */ void USART3_IRQHandler(void) { 8003a1c: b580 push {r7, lr} 8003a1e: af00 add r7, sp, #0 /* USER CODE BEGIN USART3_IRQn 0 */ /* USER CODE END USART3_IRQn 0 */ HAL_UART_IRQHandler(&huart3); 8003a20: 4802 ldr r0, [pc, #8] @ (8003a2c ) 8003a22: f009 fadb bl 800cfdc /* USER CODE BEGIN USART3_IRQn 1 */ /* USER CODE END USART3_IRQn 1 */ } 8003a26: bf00 nop 8003a28: bd80 pop {r7, pc} 8003a2a: bf00 nop 8003a2c: 2400043c .word 0x2400043c 08003a30 : /** * @brief This function handles TIM6 global interrupt, DAC1_CH1 and DAC1_CH2 underrun error interrupts. */ void TIM6_DAC_IRQHandler(void) { 8003a30: b580 push {r7, lr} 8003a32: af00 add r7, sp, #0 /* USER CODE BEGIN TIM6_DAC_IRQn 0 */ /* USER CODE END TIM6_DAC_IRQn 0 */ HAL_TIM_IRQHandler(&htim6); 8003a34: 4802 ldr r0, [pc, #8] @ (8003a40 ) 8003a36: f008 fff9 bl 800ca2c /* USER CODE BEGIN TIM6_DAC_IRQn 1 */ /* USER CODE END TIM6_DAC_IRQn 1 */ } 8003a3a: bf00 nop 8003a3c: bd80 pop {r7, pc} 8003a3e: bf00 nop 8003a40: 24000edc .word 0x24000edc 08003a44 : /** * @brief This function handles Ethernet global interrupt. */ void ETH_IRQHandler(void) { 8003a44: b580 push {r7, lr} 8003a46: af00 add r7, sp, #0 /* USER CODE BEGIN ETH_IRQn 0 */ /* USER CODE END ETH_IRQn 0 */ HAL_ETH_IRQHandler(&heth); 8003a48: 4802 ldr r0, [pc, #8] @ (8003a54 ) 8003a4a: f004 fc99 bl 8008380 /* USER CODE BEGIN ETH_IRQn 1 */ /* USER CODE END ETH_IRQn 1 */ } 8003a4e: bf00 nop 8003a50: bd80 pop {r7, pc} 8003a52: bf00 nop 8003a54: 240021ec .word 0x240021ec 08003a58 : /** * @brief This function handles DMA2 stream6 global interrupt. */ void DMA2_Stream6_IRQHandler(void) { 8003a58: b580 push {r7, lr} 8003a5a: 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); 8003a5c: 4802 ldr r0, [pc, #8] @ (8003a68 ) 8003a5e: f002 ff55 bl 800690c /* USER CODE BEGIN DMA2_Stream6_IRQn 1 */ /* USER CODE END DMA2_Stream6_IRQn 1 */ } 8003a62: bf00 nop 8003a64: bd80 pop {r7, pc} 8003a66: bf00 nop 8003a68: 240005dc .word 0x240005dc 08003a6c : /** * @brief This function handles DMA2 stream7 global interrupt. */ void DMA2_Stream7_IRQHandler(void) { 8003a6c: b580 push {r7, lr} 8003a6e: 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); 8003a70: 4802 ldr r0, [pc, #8] @ (8003a7c ) 8003a72: f002 ff4b bl 800690c /* USER CODE BEGIN DMA2_Stream7_IRQn 1 */ /* USER CODE END DMA2_Stream7_IRQn 1 */ } 8003a76: bf00 nop 8003a78: bd80 pop {r7, pc} 8003a7a: bf00 nop 8003a7c: 24000564 .word 0x24000564 08003a80 : /** * @brief This function handles USART6 global interrupt. */ void USART6_IRQHandler(void) { 8003a80: b580 push {r7, lr} 8003a82: af00 add r7, sp, #0 /* USER CODE BEGIN USART6_IRQn 0 */ /* USER CODE END USART6_IRQn 0 */ HAL_UART_IRQHandler(&huart6); 8003a84: 4802 ldr r0, [pc, #8] @ (8003a90 ) 8003a86: f009 faa9 bl 800cfdc /* USER CODE BEGIN USART6_IRQn 1 */ /* USER CODE END USART6_IRQn 1 */ } 8003a8a: bf00 nop 8003a8c: bd80 pop {r7, pc} 8003a8e: bf00 nop 8003a90: 240004d0 .word 0x240004d0 08003a94 : /** * @brief This function handles UART8 global interrupt. */ void UART8_IRQHandler(void) { 8003a94: b580 push {r7, lr} 8003a96: af00 add r7, sp, #0 /* USER CODE BEGIN UART8_IRQn 0 */ /* USER CODE END UART8_IRQn 0 */ HAL_UART_IRQHandler(&huart8); 8003a98: 4802 ldr r0, [pc, #8] @ (8003aa4 ) 8003a9a: f009 fa9f bl 800cfdc /* USER CODE BEGIN UART8_IRQn 1 */ /* USER CODE END UART8_IRQn 1 */ } 8003a9e: bf00 nop 8003aa0: bd80 pop {r7, pc} 8003aa2: bf00 nop 8003aa4: 24000280 .word 0x24000280 08003aa8 : \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) { 8003aa8: b480 push {r7} 8003aaa: b083 sub sp, #12 8003aac: af00 add r7, sp, #0 8003aae: 6078 str r0, [r7, #4] if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ 8003ab0: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000 8003ab4: f8d3 3e80 ldr.w r3, [r3, #3712] @ 0xe80 8003ab8: f003 0301 and.w r3, r3, #1 8003abc: 2b00 cmp r3, #0 8003abe: d013 beq.n 8003ae8 ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ 8003ac0: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000 8003ac4: f8d3 3e00 ldr.w r3, [r3, #3584] @ 0xe00 8003ac8: f003 0301 and.w r3, r3, #1 if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ 8003acc: 2b00 cmp r3, #0 8003ace: d00b beq.n 8003ae8 { while (ITM->PORT[0U].u32 == 0UL) 8003ad0: e000 b.n 8003ad4 { __NOP(); 8003ad2: bf00 nop while (ITM->PORT[0U].u32 == 0UL) 8003ad4: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000 8003ad8: 681b ldr r3, [r3, #0] 8003ada: 2b00 cmp r3, #0 8003adc: d0f9 beq.n 8003ad2 } ITM->PORT[0U].u8 = (uint8_t)ch; 8003ade: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000 8003ae2: 687a ldr r2, [r7, #4] 8003ae4: b2d2 uxtb r2, r2 8003ae6: 701a strb r2, [r3, #0] } return (ch); 8003ae8: 687b ldr r3, [r7, #4] } 8003aea: 4618 mov r0, r3 8003aec: 370c adds r7, #12 8003aee: 46bd mov sp, r7 8003af0: f85d 7b04 ldr.w r7, [sp], #4 8003af4: 4770 bx lr 08003af6 <_getpid>: void initialise_monitor_handles() { } int _getpid(void) { 8003af6: b480 push {r7} 8003af8: af00 add r7, sp, #0 return 1; 8003afa: 2301 movs r3, #1 } 8003afc: 4618 mov r0, r3 8003afe: 46bd mov sp, r7 8003b00: f85d 7b04 ldr.w r7, [sp], #4 8003b04: 4770 bx lr ... 08003b08 <_kill>: int _kill(int pid, int sig) { 8003b08: b480 push {r7} 8003b0a: b083 sub sp, #12 8003b0c: af00 add r7, sp, #0 8003b0e: 6078 str r0, [r7, #4] 8003b10: 6039 str r1, [r7, #0] (void)pid; (void)sig; errno = EINVAL; 8003b12: 4b05 ldr r3, [pc, #20] @ (8003b28 <_kill+0x20>) 8003b14: 2216 movs r2, #22 8003b16: 601a str r2, [r3, #0] return -1; 8003b18: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8003b1c: 4618 mov r0, r3 8003b1e: 370c adds r7, #12 8003b20: 46bd mov sp, r7 8003b22: f85d 7b04 ldr.w r7, [sp], #4 8003b26: 4770 bx lr 8003b28: 2402b180 .word 0x2402b180 08003b2c <_exit>: void _exit (int status) { 8003b2c: b580 push {r7, lr} 8003b2e: b082 sub sp, #8 8003b30: af00 add r7, sp, #0 8003b32: 6078 str r0, [r7, #4] _kill(status, -1); 8003b34: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8003b38: 6878 ldr r0, [r7, #4] 8003b3a: f7ff ffe5 bl 8003b08 <_kill> while (1) {} /* Make sure we hang here */ 8003b3e: bf00 nop 8003b40: e7fd b.n 8003b3e <_exit+0x12> 08003b42 <_read>: } __attribute__((weak)) int _read(int file, char *ptr, int len) { 8003b42: b580 push {r7, lr} 8003b44: b086 sub sp, #24 8003b46: af00 add r7, sp, #0 8003b48: 60f8 str r0, [r7, #12] 8003b4a: 60b9 str r1, [r7, #8] 8003b4c: 607a str r2, [r7, #4] (void)file; int DataIdx; for (DataIdx = 0; DataIdx < len; DataIdx++) 8003b4e: 2300 movs r3, #0 8003b50: 617b str r3, [r7, #20] 8003b52: e00a b.n 8003b6a <_read+0x28> { *ptr++ = __io_getchar(); 8003b54: f3af 8000 nop.w 8003b58: 4601 mov r1, r0 8003b5a: 68bb ldr r3, [r7, #8] 8003b5c: 1c5a adds r2, r3, #1 8003b5e: 60ba str r2, [r7, #8] 8003b60: b2ca uxtb r2, r1 8003b62: 701a strb r2, [r3, #0] for (DataIdx = 0; DataIdx < len; DataIdx++) 8003b64: 697b ldr r3, [r7, #20] 8003b66: 3301 adds r3, #1 8003b68: 617b str r3, [r7, #20] 8003b6a: 697a ldr r2, [r7, #20] 8003b6c: 687b ldr r3, [r7, #4] 8003b6e: 429a cmp r2, r3 8003b70: dbf0 blt.n 8003b54 <_read+0x12> } return len; 8003b72: 687b ldr r3, [r7, #4] } 8003b74: 4618 mov r0, r3 8003b76: 3718 adds r7, #24 8003b78: 46bd mov sp, r7 8003b7a: bd80 pop {r7, pc} 08003b7c <_write>: __attribute__((weak)) int _write(int file, char *ptr, int len) { 8003b7c: b580 push {r7, lr} 8003b7e: b086 sub sp, #24 8003b80: af00 add r7, sp, #0 8003b82: 60f8 str r0, [r7, #12] 8003b84: 60b9 str r1, [r7, #8] 8003b86: 607a str r2, [r7, #4] (void)file; int DataIdx; for (DataIdx = 0; DataIdx < len; DataIdx++) 8003b88: 2300 movs r3, #0 8003b8a: 617b str r3, [r7, #20] 8003b8c: e009 b.n 8003ba2 <_write+0x26> { // __io_putchar(*ptr++); ITM_SendChar(*ptr++); 8003b8e: 68bb ldr r3, [r7, #8] 8003b90: 1c5a adds r2, r3, #1 8003b92: 60ba str r2, [r7, #8] 8003b94: 781b ldrb r3, [r3, #0] 8003b96: 4618 mov r0, r3 8003b98: f7ff ff86 bl 8003aa8 for (DataIdx = 0; DataIdx < len; DataIdx++) 8003b9c: 697b ldr r3, [r7, #20] 8003b9e: 3301 adds r3, #1 8003ba0: 617b str r3, [r7, #20] 8003ba2: 697a ldr r2, [r7, #20] 8003ba4: 687b ldr r3, [r7, #4] 8003ba6: 429a cmp r2, r3 8003ba8: dbf1 blt.n 8003b8e <_write+0x12> } return len; 8003baa: 687b ldr r3, [r7, #4] } 8003bac: 4618 mov r0, r3 8003bae: 3718 adds r7, #24 8003bb0: 46bd mov sp, r7 8003bb2: bd80 pop {r7, pc} 08003bb4 <_close>: int _close(int file) { 8003bb4: b480 push {r7} 8003bb6: b083 sub sp, #12 8003bb8: af00 add r7, sp, #0 8003bba: 6078 str r0, [r7, #4] (void)file; return -1; 8003bbc: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8003bc0: 4618 mov r0, r3 8003bc2: 370c adds r7, #12 8003bc4: 46bd mov sp, r7 8003bc6: f85d 7b04 ldr.w r7, [sp], #4 8003bca: 4770 bx lr 08003bcc <_fstat>: int _fstat(int file, struct stat *st) { 8003bcc: b480 push {r7} 8003bce: b083 sub sp, #12 8003bd0: af00 add r7, sp, #0 8003bd2: 6078 str r0, [r7, #4] 8003bd4: 6039 str r1, [r7, #0] (void)file; st->st_mode = S_IFCHR; 8003bd6: 683b ldr r3, [r7, #0] 8003bd8: f44f 5200 mov.w r2, #8192 @ 0x2000 8003bdc: 605a str r2, [r3, #4] return 0; 8003bde: 2300 movs r3, #0 } 8003be0: 4618 mov r0, r3 8003be2: 370c adds r7, #12 8003be4: 46bd mov sp, r7 8003be6: f85d 7b04 ldr.w r7, [sp], #4 8003bea: 4770 bx lr 08003bec <_isatty>: int _isatty(int file) { 8003bec: b480 push {r7} 8003bee: b083 sub sp, #12 8003bf0: af00 add r7, sp, #0 8003bf2: 6078 str r0, [r7, #4] (void)file; return 1; 8003bf4: 2301 movs r3, #1 } 8003bf6: 4618 mov r0, r3 8003bf8: 370c adds r7, #12 8003bfa: 46bd mov sp, r7 8003bfc: f85d 7b04 ldr.w r7, [sp], #4 8003c00: 4770 bx lr 08003c02 <_lseek>: int _lseek(int file, int ptr, int dir) { 8003c02: b480 push {r7} 8003c04: b085 sub sp, #20 8003c06: af00 add r7, sp, #0 8003c08: 60f8 str r0, [r7, #12] 8003c0a: 60b9 str r1, [r7, #8] 8003c0c: 607a str r2, [r7, #4] (void)file; (void)ptr; (void)dir; return 0; 8003c0e: 2300 movs r3, #0 } 8003c10: 4618 mov r0, r3 8003c12: 3714 adds r7, #20 8003c14: 46bd mov sp, r7 8003c16: f85d 7b04 ldr.w r7, [sp], #4 8003c1a: 4770 bx lr 08003c1c <_sbrk>: * * @param incr Memory size * @return Pointer to allocated memory */ void *_sbrk(ptrdiff_t incr) { 8003c1c: b480 push {r7} 8003c1e: b087 sub sp, #28 8003c20: af00 add r7, sp, #0 8003c22: 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; 8003c24: 4a14 ldr r2, [pc, #80] @ (8003c78 <_sbrk+0x5c>) 8003c26: 4b15 ldr r3, [pc, #84] @ (8003c7c <_sbrk+0x60>) 8003c28: 1ad3 subs r3, r2, r3 8003c2a: 617b str r3, [r7, #20] const uint8_t *max_heap = (uint8_t *)stack_limit; 8003c2c: 697b ldr r3, [r7, #20] 8003c2e: 613b str r3, [r7, #16] uint8_t *prev_heap_end; /* Initialize heap end at first call */ if (NULL == __sbrk_heap_end) 8003c30: 4b13 ldr r3, [pc, #76] @ (8003c80 <_sbrk+0x64>) 8003c32: 681b ldr r3, [r3, #0] 8003c34: 2b00 cmp r3, #0 8003c36: d102 bne.n 8003c3e <_sbrk+0x22> { __sbrk_heap_end = &_end; 8003c38: 4b11 ldr r3, [pc, #68] @ (8003c80 <_sbrk+0x64>) 8003c3a: 4a12 ldr r2, [pc, #72] @ (8003c84 <_sbrk+0x68>) 8003c3c: 601a str r2, [r3, #0] } /* Protect heap from growing into the reserved MSP stack */ if (__sbrk_heap_end + incr > max_heap) 8003c3e: 4b10 ldr r3, [pc, #64] @ (8003c80 <_sbrk+0x64>) 8003c40: 681a ldr r2, [r3, #0] 8003c42: 687b ldr r3, [r7, #4] 8003c44: 4413 add r3, r2 8003c46: 693a ldr r2, [r7, #16] 8003c48: 429a cmp r2, r3 8003c4a: d205 bcs.n 8003c58 <_sbrk+0x3c> { errno = ENOMEM; 8003c4c: 4b0e ldr r3, [pc, #56] @ (8003c88 <_sbrk+0x6c>) 8003c4e: 220c movs r2, #12 8003c50: 601a str r2, [r3, #0] return (void *)-1; 8003c52: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8003c56: e009 b.n 8003c6c <_sbrk+0x50> } prev_heap_end = __sbrk_heap_end; 8003c58: 4b09 ldr r3, [pc, #36] @ (8003c80 <_sbrk+0x64>) 8003c5a: 681b ldr r3, [r3, #0] 8003c5c: 60fb str r3, [r7, #12] __sbrk_heap_end += incr; 8003c5e: 4b08 ldr r3, [pc, #32] @ (8003c80 <_sbrk+0x64>) 8003c60: 681a ldr r2, [r3, #0] 8003c62: 687b ldr r3, [r7, #4] 8003c64: 4413 add r3, r2 8003c66: 4a06 ldr r2, [pc, #24] @ (8003c80 <_sbrk+0x64>) 8003c68: 6013 str r3, [r2, #0] return (void *)prev_heap_end; 8003c6a: 68fb ldr r3, [r7, #12] } 8003c6c: 4618 mov r0, r3 8003c6e: 371c adds r7, #28 8003c70: 46bd mov sp, r7 8003c72: f85d 7b04 ldr.w r7, [sp], #4 8003c76: 4770 bx lr 8003c78: 24060000 .word 0x24060000 8003c7c: 00000400 .word 0x00000400 8003c80: 24000f28 .word 0x24000f28 8003c84: 2402b188 .word 0x2402b188 8003c88: 2402b180 .word 0x2402b180 08003c8c : * configuration. * @param None * @retval None */ void SystemInit (void) { 8003c8c: b480 push {r7} 8003c8e: 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 */ 8003c90: 4b37 ldr r3, [pc, #220] @ (8003d70 ) 8003c92: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 8003c96: 4a36 ldr r2, [pc, #216] @ (8003d70 ) 8003c98: f443 0370 orr.w r3, r3, #15728640 @ 0xf00000 8003c9c: 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))) 8003ca0: 4b34 ldr r3, [pc, #208] @ (8003d74 ) 8003ca2: 681b ldr r3, [r3, #0] 8003ca4: f003 030f and.w r3, r3, #15 8003ca8: 2b06 cmp r3, #6 8003caa: d807 bhi.n 8003cbc { /* 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)); 8003cac: 4b31 ldr r3, [pc, #196] @ (8003d74 ) 8003cae: 681b ldr r3, [r3, #0] 8003cb0: f023 030f bic.w r3, r3, #15 8003cb4: 4a2f ldr r2, [pc, #188] @ (8003d74 ) 8003cb6: f043 0307 orr.w r3, r3, #7 8003cba: 6013 str r3, [r2, #0] } /* Set HSION bit */ RCC->CR |= RCC_CR_HSION; 8003cbc: 4b2e ldr r3, [pc, #184] @ (8003d78 ) 8003cbe: 681b ldr r3, [r3, #0] 8003cc0: 4a2d ldr r2, [pc, #180] @ (8003d78 ) 8003cc2: f043 0301 orr.w r3, r3, #1 8003cc6: 6013 str r3, [r2, #0] /* Reset CFGR register */ RCC->CFGR = 0x00000000; 8003cc8: 4b2b ldr r3, [pc, #172] @ (8003d78 ) 8003cca: 2200 movs r2, #0 8003ccc: 611a str r2, [r3, #16] /* Reset HSEON, HSECSSON, CSION, HSI48ON, CSIKERON, PLL1ON, PLL2ON and PLL3ON bits */ RCC->CR &= 0xEAF6ED7FU; 8003cce: 4b2a ldr r3, [pc, #168] @ (8003d78 ) 8003cd0: 681a ldr r2, [r3, #0] 8003cd2: 4929 ldr r1, [pc, #164] @ (8003d78 ) 8003cd4: 4b29 ldr r3, [pc, #164] @ (8003d7c ) 8003cd6: 4013 ands r3, r2 8003cd8: 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))) 8003cda: 4b26 ldr r3, [pc, #152] @ (8003d74 ) 8003cdc: 681b ldr r3, [r3, #0] 8003cde: f003 0308 and.w r3, r3, #8 8003ce2: 2b00 cmp r3, #0 8003ce4: d007 beq.n 8003cf6 { /* 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)); 8003ce6: 4b23 ldr r3, [pc, #140] @ (8003d74 ) 8003ce8: 681b ldr r3, [r3, #0] 8003cea: f023 030f bic.w r3, r3, #15 8003cee: 4a21 ldr r2, [pc, #132] @ (8003d74 ) 8003cf0: f043 0307 orr.w r3, r3, #7 8003cf4: 6013 str r3, [r2, #0] } #if defined(D3_SRAM_BASE) /* Reset D1CFGR register */ RCC->D1CFGR = 0x00000000; 8003cf6: 4b20 ldr r3, [pc, #128] @ (8003d78 ) 8003cf8: 2200 movs r2, #0 8003cfa: 619a str r2, [r3, #24] /* Reset D2CFGR register */ RCC->D2CFGR = 0x00000000; 8003cfc: 4b1e ldr r3, [pc, #120] @ (8003d78 ) 8003cfe: 2200 movs r2, #0 8003d00: 61da str r2, [r3, #28] /* Reset D3CFGR register */ RCC->D3CFGR = 0x00000000; 8003d02: 4b1d ldr r3, [pc, #116] @ (8003d78 ) 8003d04: 2200 movs r2, #0 8003d06: 621a str r2, [r3, #32] /* Reset SRDCFGR register */ RCC->SRDCFGR = 0x00000000; #endif /* Reset PLLCKSELR register */ RCC->PLLCKSELR = 0x02020200; 8003d08: 4b1b ldr r3, [pc, #108] @ (8003d78 ) 8003d0a: 4a1d ldr r2, [pc, #116] @ (8003d80 ) 8003d0c: 629a str r2, [r3, #40] @ 0x28 /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x01FF0000; 8003d0e: 4b1a ldr r3, [pc, #104] @ (8003d78 ) 8003d10: 4a1c ldr r2, [pc, #112] @ (8003d84 ) 8003d12: 62da str r2, [r3, #44] @ 0x2c /* Reset PLL1DIVR register */ RCC->PLL1DIVR = 0x01010280; 8003d14: 4b18 ldr r3, [pc, #96] @ (8003d78 ) 8003d16: 4a1c ldr r2, [pc, #112] @ (8003d88 ) 8003d18: 631a str r2, [r3, #48] @ 0x30 /* Reset PLL1FRACR register */ RCC->PLL1FRACR = 0x00000000; 8003d1a: 4b17 ldr r3, [pc, #92] @ (8003d78 ) 8003d1c: 2200 movs r2, #0 8003d1e: 635a str r2, [r3, #52] @ 0x34 /* Reset PLL2DIVR register */ RCC->PLL2DIVR = 0x01010280; 8003d20: 4b15 ldr r3, [pc, #84] @ (8003d78 ) 8003d22: 4a19 ldr r2, [pc, #100] @ (8003d88 ) 8003d24: 639a str r2, [r3, #56] @ 0x38 /* Reset PLL2FRACR register */ RCC->PLL2FRACR = 0x00000000; 8003d26: 4b14 ldr r3, [pc, #80] @ (8003d78 ) 8003d28: 2200 movs r2, #0 8003d2a: 63da str r2, [r3, #60] @ 0x3c /* Reset PLL3DIVR register */ RCC->PLL3DIVR = 0x01010280; 8003d2c: 4b12 ldr r3, [pc, #72] @ (8003d78 ) 8003d2e: 4a16 ldr r2, [pc, #88] @ (8003d88 ) 8003d30: 641a str r2, [r3, #64] @ 0x40 /* Reset PLL3FRACR register */ RCC->PLL3FRACR = 0x00000000; 8003d32: 4b11 ldr r3, [pc, #68] @ (8003d78 ) 8003d34: 2200 movs r2, #0 8003d36: 645a str r2, [r3, #68] @ 0x44 /* Reset HSEBYP bit */ RCC->CR &= 0xFFFBFFFFU; 8003d38: 4b0f ldr r3, [pc, #60] @ (8003d78 ) 8003d3a: 681b ldr r3, [r3, #0] 8003d3c: 4a0e ldr r2, [pc, #56] @ (8003d78 ) 8003d3e: f423 2380 bic.w r3, r3, #262144 @ 0x40000 8003d42: 6013 str r3, [r2, #0] /* Disable all interrupts */ RCC->CIER = 0x00000000; 8003d44: 4b0c ldr r3, [pc, #48] @ (8003d78 ) 8003d46: 2200 movs r2, #0 8003d48: 661a str r2, [r3, #96] @ 0x60 #if (STM32H7_DEV_ID == 0x450UL) /* dual core CM7 or single core line */ if((DBGMCU->IDCODE & 0xFFFF0000U) < 0x20000000U) 8003d4a: 4b10 ldr r3, [pc, #64] @ (8003d8c ) 8003d4c: 681a ldr r2, [r3, #0] 8003d4e: 4b10 ldr r3, [pc, #64] @ (8003d90 ) 8003d50: 4013 ands r3, r2 8003d52: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 8003d56: d202 bcs.n 8003d5e { /* if stm32h7 revY*/ /* Change the switch matrix read issuing capability to 1 for the AXI SRAM target (Target 7) */ *((__IO uint32_t*)0x51008108) = 0x000000001U; 8003d58: 4b0e ldr r3, [pc, #56] @ (8003d94 ) 8003d5a: 2201 movs r2, #1 8003d5c: 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; 8003d5e: 4b0e ldr r3, [pc, #56] @ (8003d98 ) 8003d60: f243 02d2 movw r2, #12498 @ 0x30d2 8003d64: 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*/ } 8003d66: bf00 nop 8003d68: 46bd mov sp, r7 8003d6a: f85d 7b04 ldr.w r7, [sp], #4 8003d6e: 4770 bx lr 8003d70: e000ed00 .word 0xe000ed00 8003d74: 52002000 .word 0x52002000 8003d78: 58024400 .word 0x58024400 8003d7c: eaf6ed7f .word 0xeaf6ed7f 8003d80: 02020200 .word 0x02020200 8003d84: 01ff0000 .word 0x01ff0000 8003d88: 01010280 .word 0x01010280 8003d8c: 5c001000 .word 0x5c001000 8003d90: ffff0000 .word 0xffff0000 8003d94: 51008108 .word 0x51008108 8003d98: 52004000 .word 0x52004000 08003d9c : osMutexId_t resMeasurementsMutex; osMutexId_t sensorsInfoMutex; extern RNG_HandleTypeDef hrng; void UartTasksInit (void) { 8003d9c: b580 push {r7, lr} 8003d9e: af00 add r7, sp, #0 uart1TaskData.uartRxBuffer = uart1RxBuffer; 8003da0: 4b4e ldr r3, [pc, #312] @ (8003edc ) 8003da2: 4a4f ldr r2, [pc, #316] @ (8003ee0 ) 8003da4: 601a str r2, [r3, #0] uart1TaskData.uartRxBufferLen = UART1_RX_BUFF_SIZE; 8003da6: 4b4d ldr r3, [pc, #308] @ (8003edc ) 8003da8: f44f 7280 mov.w r2, #256 @ 0x100 8003dac: 809a strh r2, [r3, #4] uart1TaskData.uartTxBuffer = uart1TxBuffer; 8003dae: 4b4b ldr r3, [pc, #300] @ (8003edc ) 8003db0: 4a4c ldr r2, [pc, #304] @ (8003ee4 ) 8003db2: 609a str r2, [r3, #8] uart1TaskData.uartRxBufferLen = UART1_TX_BUFF_SIZE; 8003db4: 4b49 ldr r3, [pc, #292] @ (8003edc ) 8003db6: f44f 7280 mov.w r2, #256 @ 0x100 8003dba: 809a strh r2, [r3, #4] uart1TaskData.frameData = uart1TaskFrameData; 8003dbc: 4b47 ldr r3, [pc, #284] @ (8003edc ) 8003dbe: 4a4a ldr r2, [pc, #296] @ (8003ee8 ) 8003dc0: 611a str r2, [r3, #16] uart1TaskData.frameDataLen = UART1_RX_BUFF_SIZE; 8003dc2: 4b46 ldr r3, [pc, #280] @ (8003edc ) 8003dc4: f44f 7280 mov.w r2, #256 @ 0x100 8003dc8: 829a strh r2, [r3, #20] uart1TaskData.huart = &huart1; 8003dca: 4b44 ldr r3, [pc, #272] @ (8003edc ) 8003dcc: 4a47 ldr r2, [pc, #284] @ (8003eec ) 8003dce: 631a str r2, [r3, #48] @ 0x30 uart1TaskData.uartNumber = 1; 8003dd0: 4b42 ldr r3, [pc, #264] @ (8003edc ) 8003dd2: 2201 movs r2, #1 8003dd4: f883 2034 strb.w r2, [r3, #52] @ 0x34 uart2TaskData.uartRxBuffer = uart2RxBuffer; 8003dd8: 4b45 ldr r3, [pc, #276] @ (8003ef0 ) 8003dda: 4a46 ldr r2, [pc, #280] @ (8003ef4 ) 8003ddc: 601a str r2, [r3, #0] uart2TaskData.uartRxBufferLen = UART2_RX_BUFF_SIZE; 8003dde: 4b44 ldr r3, [pc, #272] @ (8003ef0 ) 8003de0: f44f 7280 mov.w r2, #256 @ 0x100 8003de4: 809a strh r2, [r3, #4] uart2TaskData.uartTxBuffer = uart2TxBuffer; 8003de6: 4b42 ldr r3, [pc, #264] @ (8003ef0 ) 8003de8: 4a43 ldr r2, [pc, #268] @ (8003ef8 ) 8003dea: 609a str r2, [r3, #8] uart2TaskData.uartRxBufferLen = UART2_TX_BUFF_SIZE; 8003dec: 4b40 ldr r3, [pc, #256] @ (8003ef0 ) 8003dee: f44f 7280 mov.w r2, #256 @ 0x100 8003df2: 809a strh r2, [r3, #4] uart2TaskData.frameData = uart2TaskFrameData; 8003df4: 4b3e ldr r3, [pc, #248] @ (8003ef0 ) 8003df6: 4a41 ldr r2, [pc, #260] @ (8003efc ) 8003df8: 611a str r2, [r3, #16] uart2TaskData.frameDataLen = UART2_RX_BUFF_SIZE; 8003dfa: 4b3d ldr r3, [pc, #244] @ (8003ef0 ) 8003dfc: f44f 7280 mov.w r2, #256 @ 0x100 8003e00: 829a strh r2, [r3, #20] uart2TaskData.huart = &huart2; 8003e02: 4b3b ldr r3, [pc, #236] @ (8003ef0 ) 8003e04: 4a3e ldr r2, [pc, #248] @ (8003f00 ) 8003e06: 631a str r2, [r3, #48] @ 0x30 uart2TaskData.uartNumber = 2; 8003e08: 4b39 ldr r3, [pc, #228] @ (8003ef0 ) 8003e0a: 2202 movs r2, #2 8003e0c: f883 2034 strb.w r2, [r3, #52] @ 0x34 uart3TaskData.uartRxBuffer = uart3RxBuffer; 8003e10: 4b3c ldr r3, [pc, #240] @ (8003f04 ) 8003e12: 4a3d ldr r2, [pc, #244] @ (8003f08 ) 8003e14: 601a str r2, [r3, #0] uart3TaskData.uartRxBufferLen = UART3_RX_BUFF_SIZE; 8003e16: 4b3b ldr r3, [pc, #236] @ (8003f04 ) 8003e18: f44f 7280 mov.w r2, #256 @ 0x100 8003e1c: 809a strh r2, [r3, #4] uart3TaskData.uartTxBuffer = uart3TxBuffer; 8003e1e: 4b39 ldr r3, [pc, #228] @ (8003f04 ) 8003e20: 4a3a ldr r2, [pc, #232] @ (8003f0c ) 8003e22: 609a str r2, [r3, #8] uart3TaskData.uartRxBufferLen = UART3_TX_BUFF_SIZE; 8003e24: 4b37 ldr r3, [pc, #220] @ (8003f04 ) 8003e26: f44f 7280 mov.w r2, #256 @ 0x100 8003e2a: 809a strh r2, [r3, #4] uart3TaskData.frameData = uart3TaskFrameData; 8003e2c: 4b35 ldr r3, [pc, #212] @ (8003f04 ) 8003e2e: 4a38 ldr r2, [pc, #224] @ (8003f10 ) 8003e30: 611a str r2, [r3, #16] uart3TaskData.frameDataLen = UART3_RX_BUFF_SIZE; 8003e32: 4b34 ldr r3, [pc, #208] @ (8003f04 ) 8003e34: f44f 7280 mov.w r2, #256 @ 0x100 8003e38: 829a strh r2, [r3, #20] uart3TaskData.huart = &huart3; 8003e3a: 4b32 ldr r3, [pc, #200] @ (8003f04 ) 8003e3c: 4a35 ldr r2, [pc, #212] @ (8003f14 ) 8003e3e: 631a str r2, [r3, #48] @ 0x30 uart3TaskData.uartNumber = 3; 8003e40: 4b30 ldr r3, [pc, #192] @ (8003f04 ) 8003e42: 2203 movs r2, #3 8003e44: f883 2034 strb.w r2, [r3, #52] @ 0x34 uart6TaskData.uartRxBuffer = uart6RxBuffer; 8003e48: 4b33 ldr r3, [pc, #204] @ (8003f18 ) 8003e4a: 4a34 ldr r2, [pc, #208] @ (8003f1c ) 8003e4c: 601a str r2, [r3, #0] uart6TaskData.uartRxBufferLen = UART6_RX_BUFF_SIZE; 8003e4e: 4b32 ldr r3, [pc, #200] @ (8003f18 ) 8003e50: f44f 7280 mov.w r2, #256 @ 0x100 8003e54: 809a strh r2, [r3, #4] uart6TaskData.uartTxBuffer = uart6TxBuffer; 8003e56: 4b30 ldr r3, [pc, #192] @ (8003f18 ) 8003e58: 4a31 ldr r2, [pc, #196] @ (8003f20 ) 8003e5a: 609a str r2, [r3, #8] uart6TaskData.uartRxBufferLen = UART6_TX_BUFF_SIZE; 8003e5c: 4b2e ldr r3, [pc, #184] @ (8003f18 ) 8003e5e: f44f 7280 mov.w r2, #256 @ 0x100 8003e62: 809a strh r2, [r3, #4] uart6TaskData.frameData = uart6TaskFrameData; 8003e64: 4b2c ldr r3, [pc, #176] @ (8003f18 ) 8003e66: 4a2f ldr r2, [pc, #188] @ (8003f24 ) 8003e68: 611a str r2, [r3, #16] uart6TaskData.frameDataLen = UART6_RX_BUFF_SIZE; 8003e6a: 4b2b ldr r3, [pc, #172] @ (8003f18 ) 8003e6c: f44f 7280 mov.w r2, #256 @ 0x100 8003e70: 829a strh r2, [r3, #20] uart6TaskData.huart = &huart6; 8003e72: 4b29 ldr r3, [pc, #164] @ (8003f18 ) 8003e74: 4a2c ldr r2, [pc, #176] @ (8003f28 ) 8003e76: 631a str r2, [r3, #48] @ 0x30 uart6TaskData.uartNumber = 6; 8003e78: 4b27 ldr r3, [pc, #156] @ (8003f18 ) 8003e7a: 2206 movs r2, #6 8003e7c: f883 2034 strb.w r2, [r3, #52] @ 0x34 uart8TaskData.uartRxBuffer = uart8RxBuffer; 8003e80: 4b2a ldr r3, [pc, #168] @ (8003f2c ) 8003e82: 4a2b ldr r2, [pc, #172] @ (8003f30 ) 8003e84: 601a str r2, [r3, #0] uart8TaskData.uartRxBufferLen = UART8_RX_BUFF_SIZE; 8003e86: 4b29 ldr r3, [pc, #164] @ (8003f2c ) 8003e88: f44f 7280 mov.w r2, #256 @ 0x100 8003e8c: 809a strh r2, [r3, #4] uart8TaskData.uartTxBuffer = uart8TxBuffer; 8003e8e: 4b27 ldr r3, [pc, #156] @ (8003f2c ) 8003e90: 4a28 ldr r2, [pc, #160] @ (8003f34 ) 8003e92: 609a str r2, [r3, #8] uart8TaskData.uartRxBufferLen = UART8_TX_BUFF_SIZE; 8003e94: 4b25 ldr r3, [pc, #148] @ (8003f2c ) 8003e96: f44f 7280 mov.w r2, #256 @ 0x100 8003e9a: 809a strh r2, [r3, #4] uart8TaskData.frameData = uart8TaskFrameData; 8003e9c: 4b23 ldr r3, [pc, #140] @ (8003f2c ) 8003e9e: 4a26 ldr r2, [pc, #152] @ (8003f38 ) 8003ea0: 611a str r2, [r3, #16] uart8TaskData.frameDataLen = UART8_RX_BUFF_SIZE; 8003ea2: 4b22 ldr r3, [pc, #136] @ (8003f2c ) 8003ea4: f44f 7280 mov.w r2, #256 @ 0x100 8003ea8: 829a strh r2, [r3, #20] uart8TaskData.huart = &huart8; 8003eaa: 4b20 ldr r3, [pc, #128] @ (8003f2c ) 8003eac: 4a23 ldr r2, [pc, #140] @ (8003f3c ) 8003eae: 631a str r2, [r3, #48] @ 0x30 uart8TaskData.uartNumber = 8; 8003eb0: 4b1e ldr r3, [pc, #120] @ (8003f2c ) 8003eb2: 2208 movs r2, #8 8003eb4: f883 2034 strb.w r2, [r3, #52] @ 0x34 UartTaskCreate (&uart1TaskData); 8003eb8: 4808 ldr r0, [pc, #32] @ (8003edc ) 8003eba: f000 f841 bl 8003f40 UartTaskCreate (&uart2TaskData); 8003ebe: 480c ldr r0, [pc, #48] @ (8003ef0 ) 8003ec0: f000 f83e bl 8003f40 UartTaskCreate (&uart3TaskData); 8003ec4: 480f ldr r0, [pc, #60] @ (8003f04 ) 8003ec6: f000 f83b bl 8003f40 UartTaskCreate (&uart6TaskData); 8003eca: 4813 ldr r0, [pc, #76] @ (8003f18 ) 8003ecc: f000 f838 bl 8003f40 UartTaskCreate (&uart8TaskData); 8003ed0: 4816 ldr r0, [pc, #88] @ (8003f2c ) 8003ed2: f000 f835 bl 8003f40 } 8003ed6: bf00 nop 8003ed8: bd80 pop {r7, pc} 8003eda: bf00 nop 8003edc: 24001e2c .word 0x24001e2c 8003ee0: 24000f2c .word 0x24000f2c 8003ee4: 2400102c .word 0x2400102c 8003ee8: 2400112c .word 0x2400112c 8003eec: 24000314 .word 0x24000314 8003ef0: 24001ed4 .word 0x24001ed4 8003ef4: 2400122c .word 0x2400122c 8003ef8: 2400132c .word 0x2400132c 8003efc: 2400142c .word 0x2400142c 8003f00: 240003a8 .word 0x240003a8 8003f04: 24001e64 .word 0x24001e64 8003f08: 2400152c .word 0x2400152c 8003f0c: 2400162c .word 0x2400162c 8003f10: 2400172c .word 0x2400172c 8003f14: 2400043c .word 0x2400043c 8003f18: 24001e9c .word 0x24001e9c 8003f1c: 2400182c .word 0x2400182c 8003f20: 2400192c .word 0x2400192c 8003f24: 24001a2c .word 0x24001a2c 8003f28: 240004d0 .word 0x240004d0 8003f2c: 24001f0c .word 0x24001f0c 8003f30: 24001b2c .word 0x24001b2c 8003f34: 24001c2c .word 0x24001c2c 8003f38: 24001d2c .word 0x24001d2c 8003f3c: 24000280 .word 0x24000280 08003f40 : void UartTaskCreate (UartTaskData* uartTaskData) { 8003f40: b580 push {r7, lr} 8003f42: b09a sub sp, #104 @ 0x68 8003f44: af00 add r7, sp, #0 8003f46: 6078 str r0, [r7, #4] osThreadAttr_t osThreadAttrRxUart = { 0 }; 8003f48: f107 0344 add.w r3, r7, #68 @ 0x44 8003f4c: 2224 movs r2, #36 @ 0x24 8003f4e: 2100 movs r1, #0 8003f50: 4618 mov r0, r3 8003f52: f025 fecd bl 8029cf0 osThreadAttr_t osThreadAttrTxUart = { 0 }; 8003f56: f107 0320 add.w r3, r7, #32 8003f5a: 2224 movs r2, #36 @ 0x24 8003f5c: 2100 movs r1, #0 8003f5e: 4618 mov r0, r3 8003f60: f025 fec6 bl 8029cf0 uartTaskData->processRxDataMsgBuffer = xMessageBufferCreate (INPUT_DATA_BUFF_SIZE); 8003f64: 2201 movs r2, #1 8003f66: 2100 movs r1, #0 8003f68: f44f 7080 mov.w r0, #256 @ 0x100 8003f6c: f00e faf6 bl 801255c 8003f70: 4602 mov r2, r0 8003f72: 687b ldr r3, [r7, #4] 8003f74: 625a str r2, [r3, #36] @ 0x24 uartTaskData->processDataCb = NULL; 8003f76: 687b ldr r3, [r7, #4] 8003f78: 2200 movs r2, #0 8003f7a: 629a str r2, [r3, #40] @ 0x28 // osThreadAttrRxUart.name = "os_thread_uart1_rx"; osThreadAttrRxUart.stack_size = configMINIMAL_STACK_SIZE * 2; 8003f7c: f44f 6380 mov.w r3, #1024 @ 0x400 8003f80: 65bb str r3, [r7, #88] @ 0x58 osThreadAttrRxUart.priority = (osPriority_t)osPriorityHigh; 8003f82: 2328 movs r3, #40 @ 0x28 8003f84: 65fb str r3, [r7, #92] @ 0x5c uartTaskData->uartRecieveTaskHandle = osThreadNew (UartRxTask, uartTaskData, &osThreadAttrRxUart); 8003f86: f107 0344 add.w r3, r7, #68 @ 0x44 8003f8a: 461a mov r2, r3 8003f8c: 6879 ldr r1, [r7, #4] 8003f8e: 4816 ldr r0, [pc, #88] @ (8003fe8 ) 8003f90: f00c fc59 bl 8010846 8003f94: 4602 mov r2, r0 8003f96: 687b ldr r3, [r7, #4] 8003f98: 619a str r2, [r3, #24] osMessageQueueAttr_t uartTxMsgQueueAttr = { 0 }; 8003f9a: f107 0308 add.w r3, r7, #8 8003f9e: 2200 movs r2, #0 8003fa0: 601a str r2, [r3, #0] 8003fa2: 605a str r2, [r3, #4] 8003fa4: 609a str r2, [r3, #8] 8003fa6: 60da str r2, [r3, #12] 8003fa8: 611a str r2, [r3, #16] 8003faa: 615a str r2, [r3, #20] // uartTxMsgQueueAttr.name = "uart1TxMsgQueue"; uartTaskData->sendCmdToSlaveQueue = osMessageQueueNew (16, sizeof (InterProcessData), &uartTxMsgQueueAttr); 8003fac: f107 0308 add.w r3, r7, #8 8003fb0: 461a mov r2, r3 8003fb2: 210c movs r1, #12 8003fb4: 2010 movs r0, #16 8003fb6: f00c ff51 bl 8010e5c 8003fba: 4602 mov r2, r0 8003fbc: 687b ldr r3, [r7, #4] 8003fbe: 62da str r2, [r3, #44] @ 0x2c // osThreadAttrTxUart.name = "os_thread_uart1_tx"; osThreadAttrTxUart.stack_size = configMINIMAL_STACK_SIZE * 4; 8003fc0: f44f 6300 mov.w r3, #2048 @ 0x800 8003fc4: 637b str r3, [r7, #52] @ 0x34 osThreadAttrTxUart.priority = (osPriority_t)osPriorityNormal; 8003fc6: 2318 movs r3, #24 8003fc8: 63bb str r3, [r7, #56] @ 0x38 uartTaskData->uartTransmitTaskHandle = osThreadNew (UartTxTask, uartTaskData, &osThreadAttrTxUart); 8003fca: f107 0320 add.w r3, r7, #32 8003fce: 461a mov r2, r3 8003fd0: 6879 ldr r1, [r7, #4] 8003fd2: 4806 ldr r0, [pc, #24] @ (8003fec ) 8003fd4: f00c fc37 bl 8010846 8003fd8: 4602 mov r2, r0 8003fda: 687b ldr r3, [r7, #4] 8003fdc: 61da str r2, [r3, #28] } 8003fde: bf00 nop 8003fe0: 3768 adds r7, #104 @ 0x68 8003fe2: 46bd mov sp, r7 8003fe4: bd80 pop {r7, pc} 8003fe6: bf00 nop 8003fe8: 08004165 .word 0x08004165 8003fec: 08004751 .word 0x08004751 08003ff0 : void HAL_UART_RxCpltCallback (UART_HandleTypeDef* huart) { 8003ff0: b480 push {r7} 8003ff2: b083 sub sp, #12 8003ff4: af00 add r7, sp, #0 8003ff6: 6078 str r0, [r7, #4] // osSemaphoreRelease(uart8RxSemaphore); } 8003ff8: bf00 nop 8003ffa: 370c adds r7, #12 8003ffc: 46bd mov sp, r7 8003ffe: f85d 7b04 ldr.w r7, [sp], #4 8004002: 4770 bx lr 08004004 : void HAL_UARTEx_RxEventCallback (UART_HandleTypeDef* huart, uint16_t Size) { 8004004: b580 push {r7, lr} 8004006: b082 sub sp, #8 8004008: af00 add r7, sp, #0 800400a: 6078 str r0, [r7, #4] 800400c: 460b mov r3, r1 800400e: 807b strh r3, [r7, #2] if (huart->Instance == USART1) { 8004010: 687b ldr r3, [r7, #4] 8004012: 681b ldr r3, [r3, #0] 8004014: 4a1e ldr r2, [pc, #120] @ (8004090 ) 8004016: 4293 cmp r3, r2 8004018: d106 bne.n 8004028 HandleUartRxCallback (&uart1TaskData, huart, Size); 800401a: 887b ldrh r3, [r7, #2] 800401c: 461a mov r2, r3 800401e: 6879 ldr r1, [r7, #4] 8004020: 481c ldr r0, [pc, #112] @ (8004094 ) 8004022: f000 f853 bl 80040cc } else if (huart->Instance == USART6) { HandleUartRxCallback (&uart6TaskData, huart, Size); } else if (huart->Instance == UART8) { HandleUartRxCallback (&uart8TaskData, huart, Size); } } 8004026: e02e b.n 8004086 } else if (huart->Instance == USART2) { 8004028: 687b ldr r3, [r7, #4] 800402a: 681b ldr r3, [r3, #0] 800402c: 4a1a ldr r2, [pc, #104] @ (8004098 ) 800402e: 4293 cmp r3, r2 8004030: d106 bne.n 8004040 HandleUartRxCallback (&uart2TaskData, huart, Size); 8004032: 887b ldrh r3, [r7, #2] 8004034: 461a mov r2, r3 8004036: 6879 ldr r1, [r7, #4] 8004038: 4818 ldr r0, [pc, #96] @ (800409c ) 800403a: f000 f847 bl 80040cc } 800403e: e022 b.n 8004086 } else if (huart->Instance == USART3) { 8004040: 687b ldr r3, [r7, #4] 8004042: 681b ldr r3, [r3, #0] 8004044: 4a16 ldr r2, [pc, #88] @ (80040a0 ) 8004046: 4293 cmp r3, r2 8004048: d106 bne.n 8004058 HandleUartRxCallback (&uart3TaskData, huart, Size); 800404a: 887b ldrh r3, [r7, #2] 800404c: 461a mov r2, r3 800404e: 6879 ldr r1, [r7, #4] 8004050: 4814 ldr r0, [pc, #80] @ (80040a4 ) 8004052: f000 f83b bl 80040cc } 8004056: e016 b.n 8004086 } else if (huart->Instance == USART6) { 8004058: 687b ldr r3, [r7, #4] 800405a: 681b ldr r3, [r3, #0] 800405c: 4a12 ldr r2, [pc, #72] @ (80040a8 ) 800405e: 4293 cmp r3, r2 8004060: d106 bne.n 8004070 HandleUartRxCallback (&uart6TaskData, huart, Size); 8004062: 887b ldrh r3, [r7, #2] 8004064: 461a mov r2, r3 8004066: 6879 ldr r1, [r7, #4] 8004068: 4810 ldr r0, [pc, #64] @ (80040ac ) 800406a: f000 f82f bl 80040cc } 800406e: e00a b.n 8004086 } else if (huart->Instance == UART8) { 8004070: 687b ldr r3, [r7, #4] 8004072: 681b ldr r3, [r3, #0] 8004074: 4a0e ldr r2, [pc, #56] @ (80040b0 ) 8004076: 4293 cmp r3, r2 8004078: d105 bne.n 8004086 HandleUartRxCallback (&uart8TaskData, huart, Size); 800407a: 887b ldrh r3, [r7, #2] 800407c: 461a mov r2, r3 800407e: 6879 ldr r1, [r7, #4] 8004080: 480c ldr r0, [pc, #48] @ (80040b4 ) 8004082: f000 f823 bl 80040cc } 8004086: bf00 nop 8004088: 3708 adds r7, #8 800408a: 46bd mov sp, r7 800408c: bd80 pop {r7, pc} 800408e: bf00 nop 8004090: 40011000 .word 0x40011000 8004094: 24001e2c .word 0x24001e2c 8004098: 40004400 .word 0x40004400 800409c: 24001ed4 .word 0x24001ed4 80040a0: 40004800 .word 0x40004800 80040a4: 24001e64 .word 0x24001e64 80040a8: 40011400 .word 0x40011400 80040ac: 24001e9c .word 0x24001e9c 80040b0: 40007c00 .word 0x40007c00 80040b4: 24001f0c .word 0x24001f0c 080040b8 : void HAL_UART_TxCpltCallback (UART_HandleTypeDef* huart) { 80040b8: b480 push {r7} 80040ba: b083 sub sp, #12 80040bc: af00 add r7, sp, #0 80040be: 6078 str r0, [r7, #4] if (huart->Instance == UART8) { } } 80040c0: bf00 nop 80040c2: 370c adds r7, #12 80040c4: 46bd mov sp, r7 80040c6: f85d 7b04 ldr.w r7, [sp], #4 80040ca: 4770 bx lr 080040cc : void HandleUartRxCallback (UartTaskData* uartTaskData, UART_HandleTypeDef* huart, uint16_t Size) { 80040cc: b580 push {r7, lr} 80040ce: b088 sub sp, #32 80040d0: af02 add r7, sp, #8 80040d2: 60f8 str r0, [r7, #12] 80040d4: 60b9 str r1, [r7, #8] 80040d6: 4613 mov r3, r2 80040d8: 80fb strh r3, [r7, #6] BaseType_t pxHigherPriorityTaskWoken = pdFALSE; 80040da: 2300 movs r3, #0 80040dc: 617b str r3, [r7, #20] osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 80040de: 68fb ldr r3, [r7, #12] 80040e0: 6a1b ldr r3, [r3, #32] 80040e2: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80040e6: 4618 mov r0, r3 80040e8: f00c fcec bl 8010ac4 memcpy (&(uartTaskData->frameData[uartTaskData->frameBytesCount]), uartTaskData->uartRxBuffer, Size); 80040ec: 68fb ldr r3, [r7, #12] 80040ee: 691b ldr r3, [r3, #16] 80040f0: 68fa ldr r2, [r7, #12] 80040f2: 8ad2 ldrh r2, [r2, #22] 80040f4: 1898 adds r0, r3, r2 80040f6: 68fb ldr r3, [r7, #12] 80040f8: 681b ldr r3, [r3, #0] 80040fa: 88fa ldrh r2, [r7, #6] 80040fc: 4619 mov r1, r3 80040fe: f025 feee bl 8029ede uartTaskData->frameBytesCount += Size; 8004102: 68fb ldr r3, [r7, #12] 8004104: 8ada ldrh r2, [r3, #22] 8004106: 88fb ldrh r3, [r7, #6] 8004108: 4413 add r3, r2 800410a: b29a uxth r2, r3 800410c: 68fb ldr r3, [r7, #12] 800410e: 82da strh r2, [r3, #22] osMutexRelease (uartTaskData->rxDataBufferMutex); 8004110: 68fb ldr r3, [r7, #12] 8004112: 6a1b ldr r3, [r3, #32] 8004114: 4618 mov r0, r3 8004116: f00c fd20 bl 8010b5a xTaskNotifyFromISR (uartTaskData->uartRecieveTaskHandle, Size, eSetValueWithOverwrite, &pxHigherPriorityTaskWoken); 800411a: 68fb ldr r3, [r7, #12] 800411c: 6998 ldr r0, [r3, #24] 800411e: 88f9 ldrh r1, [r7, #6] 8004120: f107 0314 add.w r3, r7, #20 8004124: 9300 str r3, [sp, #0] 8004126: 2300 movs r3, #0 8004128: 2203 movs r2, #3 800412a: f00f ff0f bl 8013f4c // 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); 800412e: 68fb ldr r3, [r7, #12] 8004130: 6b18 ldr r0, [r3, #48] @ 0x30 8004132: 68fb ldr r3, [r7, #12] 8004134: 6819 ldr r1, [r3, #0] 8004136: 68fb ldr r3, [r7, #12] 8004138: 889b ldrh r3, [r3, #4] 800413a: 461a mov r2, r3 800413c: f00b fb8f bl 800f85e portEND_SWITCHING_ISR (pxHigherPriorityTaskWoken); 8004140: 697b ldr r3, [r7, #20] 8004142: 2b00 cmp r3, #0 8004144: d007 beq.n 8004156 8004146: 4b06 ldr r3, [pc, #24] @ (8004160 ) 8004148: f04f 5280 mov.w r2, #268435456 @ 0x10000000 800414c: 601a str r2, [r3, #0] 800414e: f3bf 8f4f dsb sy 8004152: f3bf 8f6f isb sy } 8004156: bf00 nop 8004158: 3718 adds r7, #24 800415a: 46bd mov sp, r7 800415c: bd80 pop {r7, pc} 800415e: bf00 nop 8004160: e000ed04 .word 0xe000ed04 08004164 : void UartRxTask (void* argument) { 8004164: b580 push {r7, lr} 8004166: b0d2 sub sp, #328 @ 0x148 8004168: af02 add r7, sp, #8 800416a: f507 73a0 add.w r3, r7, #320 @ 0x140 800416e: f5a3 739e sub.w r3, r3, #316 @ 0x13c 8004172: 6018 str r0, [r3, #0] UartTaskData* uartTaskData = (UartTaskData*)argument; 8004174: f507 73a0 add.w r3, r7, #320 @ 0x140 8004178: f5a3 739e sub.w r3, r3, #316 @ 0x13c 800417c: 681b ldr r3, [r3, #0] 800417e: f8c7 312c str.w r3, [r7, #300] @ 0x12c SerialProtocolFrameData spFrameData = { 0 }; 8004182: f507 73a0 add.w r3, r7, #320 @ 0x140 8004186: f5a3 7398 sub.w r3, r3, #304 @ 0x130 800418a: 4618 mov r0, r3 800418c: f44f 7386 mov.w r3, #268 @ 0x10c 8004190: 461a mov r2, r3 8004192: 2100 movs r1, #0 8004194: f025 fdac bl 8029cf0 uint32_t bytesRec = 0; 8004198: f507 73a0 add.w r3, r7, #320 @ 0x140 800419c: f5a3 739a sub.w r3, r3, #308 @ 0x134 80041a0: 2200 movs r2, #0 80041a2: 601a str r2, [r3, #0] uint32_t crc = 0; 80041a4: 2300 movs r3, #0 80041a6: f8c7 3128 str.w r3, [r7, #296] @ 0x128 uint16_t frameCommandRaw = 0x0000; 80041aa: 2300 movs r3, #0 80041ac: f8a7 3126 strh.w r3, [r7, #294] @ 0x126 uint16_t frameBytesCount = 0; 80041b0: 2300 movs r3, #0 80041b2: f8a7 3124 strh.w r3, [r7, #292] @ 0x124 uint16_t frameCrc = 0; 80041b6: 2300 movs r3, #0 80041b8: f8a7 3122 strh.w r3, [r7, #290] @ 0x122 uint16_t frameTotalLength = 0; 80041bc: 2300 movs r3, #0 80041be: f8a7 313e strh.w r3, [r7, #318] @ 0x13e uint16_t dataToSend = 0; 80041c2: 2300 movs r3, #0 80041c4: f8a7 313c strh.w r3, [r7, #316] @ 0x13c portBASE_TYPE crcPass = pdFAIL; 80041c8: 2300 movs r3, #0 80041ca: f8c7 3138 str.w r3, [r7, #312] @ 0x138 portBASE_TYPE proceed = pdFALSE; 80041ce: 2300 movs r3, #0 80041d0: f8c7 3134 str.w r3, [r7, #308] @ 0x134 portBASE_TYPE frameTimeout = pdFAIL; 80041d4: 2300 movs r3, #0 80041d6: f8c7 311c str.w r3, [r7, #284] @ 0x11c enum SerialReceiverStates receverState = srWaitForHeader; 80041da: 2300 movs r3, #0 80041dc: f887 3133 strb.w r3, [r7, #307] @ 0x133 uartTaskData->rxDataBufferMutex = osMutexNew (NULL); 80041e0: 2000 movs r0, #0 80041e2: f00c fbe9 bl 80109b8 80041e6: 4602 mov r2, r0 80041e8: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80041ec: 621a str r2, [r3, #32] HAL_UARTEx_ReceiveToIdle_IT (uartTaskData->huart, uartTaskData->uartRxBuffer, uartTaskData->uartRxBufferLen); 80041ee: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80041f2: 6b18 ldr r0, [r3, #48] @ 0x30 80041f4: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80041f8: 6819 ldr r1, [r3, #0] 80041fa: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80041fe: 889b ldrh r3, [r3, #4] 8004200: 461a mov r2, r3 8004202: f00b fb2c bl 800f85e // HAL_UARTEx_ReceiveToIdle_DMA(&huart8, uart8RxBuffer, 32); while (pdTRUE) { // HAL_UART_Receive_IT(&huart8, uart8RxBuffer, 1); // if(osSemaphoreAcquire(uart8RxSemaphore, pdMS_TO_TICKS(1000)) != // osOK) if(xTaskNotifyWait(0, 0, &bytesRec, portMAX_DELAY) == pdTrue) frameTimeout = !(xTaskNotifyWait (0, 0, &bytesRec, pdMS_TO_TICKS (FRAME_TIMEOUT_MS))); 8004206: f107 020c add.w r2, r7, #12 800420a: f44f 63fa mov.w r3, #2000 @ 0x7d0 800420e: 2100 movs r1, #0 8004210: 2000 movs r0, #0 8004212: f00f fd79 bl 8013d08 8004216: 4603 mov r3, r0 8004218: 2b00 cmp r3, #0 800421a: bf0c ite eq 800421c: 2301 moveq r3, #1 800421e: 2300 movne r3, #0 8004220: b2db uxtb r3, r3 8004222: f8c7 311c str.w r3, [r7, #284] @ 0x11c osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 8004226: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800422a: 6a1b ldr r3, [r3, #32] 800422c: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004230: 4618 mov r0, r3 8004232: f00c fc47 bl 8010ac4 frameBytesCount = uartTaskData->frameBytesCount; 8004236: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800423a: 8adb ldrh r3, [r3, #22] 800423c: f8a7 3124 strh.w r3, [r7, #292] @ 0x124 osMutexRelease (uartTaskData->rxDataBufferMutex); 8004240: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004244: 6a1b ldr r3, [r3, #32] 8004246: 4618 mov r0, r3 8004248: f00c fc87 bl 8010b5a if ((frameTimeout == pdTRUE) && (frameBytesCount > 0)) { 800424c: f8d7 311c ldr.w r3, [r7, #284] @ 0x11c 8004250: 2b01 cmp r3, #1 8004252: d10a bne.n 800426a 8004254: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 8004258: 2b00 cmp r3, #0 800425a: d006 beq.n 800426a receverState = srFail; 800425c: 2304 movs r3, #4 800425e: f887 3133 strb.w r3, [r7, #307] @ 0x133 proceed = pdTRUE; 8004262: 2301 movs r3, #1 8004264: f8c7 3134 str.w r3, [r7, #308] @ 0x134 8004268: e029 b.n 80042be } else { if (frameTimeout == pdFALSE) { 800426a: f8d7 311c ldr.w r3, [r7, #284] @ 0x11c 800426e: 2b00 cmp r3, #0 8004270: d111 bne.n 8004296 proceed = pdTRUE; 8004272: 2301 movs r3, #1 8004274: f8c7 3134 str.w r3, [r7, #308] @ 0x134 #if UART_TASK_LOGS printf ("Uart%d: RX bytes received: %ld\n", uartTaskData->uartNumber, bytesRec); 8004278: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800427c: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8004280: 4619 mov r1, r3 8004282: f507 73a0 add.w r3, r7, #320 @ 0x140 8004286: f5a3 739a sub.w r3, r3, #308 @ 0x134 800428a: 681b ldr r3, [r3, #0] 800428c: 461a mov r2, r3 800428e: 48c1 ldr r0, [pc, #772] @ (8004594 ) 8004290: f025 fb9c bl 80299cc 8004294: e22f b.n 80046f6 #endif } else { if (uartTaskData->huart->RxState == HAL_UART_STATE_READY) { 8004296: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800429a: 6b1b ldr r3, [r3, #48] @ 0x30 800429c: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 80042a0: 2b20 cmp r3, #32 80042a2: f040 8228 bne.w 80046f6 HAL_UARTEx_ReceiveToIdle_IT (uartTaskData->huart, uartTaskData->uartRxBuffer, uartTaskData->uartRxBufferLen); 80042a6: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80042aa: 6b18 ldr r0, [r3, #48] @ 0x30 80042ac: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80042b0: 6819 ldr r1, [r3, #0] 80042b2: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80042b6: 889b ldrh r3, [r3, #4] 80042b8: 461a mov r2, r3 80042ba: f00b fad0 bl 800f85e } } } while (proceed) { 80042be: e21a b.n 80046f6 switch (receverState) { 80042c0: f897 3133 ldrb.w r3, [r7, #307] @ 0x133 80042c4: 2b04 cmp r3, #4 80042c6: f200 81f1 bhi.w 80046ac 80042ca: a201 add r2, pc, #4 @ (adr r2, 80042d0 ) 80042cc: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80042d0: 080042e5 .word 0x080042e5 80042d4: 08004447 .word 0x08004447 80042d8: 0800442b .word 0x0800442b 80042dc: 080044e7 .word 0x080044e7 80042e0: 080045a1 .word 0x080045a1 case srWaitForHeader: osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 80042e4: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80042e8: 6a1b ldr r3, [r3, #32] 80042ea: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80042ee: 4618 mov r0, r3 80042f0: f00c fbe8 bl 8010ac4 if (uartTaskData->frameData[0] == FRAME_INDICATOR) { 80042f4: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80042f8: 691b ldr r3, [r3, #16] 80042fa: 781b ldrb r3, [r3, #0] 80042fc: 2baa cmp r3, #170 @ 0xaa 80042fe: f040 8082 bne.w 8004406 if (frameBytesCount > FRAME_ID_LENGTH) { 8004302: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 8004306: 2b02 cmp r3, #2 8004308: d914 bls.n 8004334 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])); 800430a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800430e: 691b ldr r3, [r3, #16] 8004310: 3302 adds r3, #2 8004312: 781b ldrb r3, [r3, #0] 8004314: 021b lsls r3, r3, #8 8004316: b21a sxth r2, r3 8004318: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800431c: 691b ldr r3, [r3, #16] 800431e: 3301 adds r3, #1 8004320: 781b ldrb r3, [r3, #0] 8004322: b21b sxth r3, r3 8004324: 4313 orrs r3, r2 8004326: b21b sxth r3, r3 8004328: b29a uxth r2, r3 spFrameData.frameHeader.frameId = 800432a: f507 73a0 add.w r3, r7, #320 @ 0x140 800432e: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004332: 801a strh r2, [r3, #0] } if (frameBytesCount > FRAME_ID_LENGTH + FRAME_COMMAND_LENGTH) { 8004334: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 8004338: 2b04 cmp r3, #4 800433a: d923 bls.n 8004384 frameCommandRaw = CONVERT_BYTES_TO_SHORT_WORD (&(uartTaskData->frameData[FRAME_HEADER_LENGTH - FRAME_RESP_STAT_LENGTH - FRAME_DATALEN_LENGTH - FRAME_COMMAND_LENGTH])); 800433c: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004340: 691b ldr r3, [r3, #16] 8004342: 3304 adds r3, #4 8004344: 781b ldrb r3, [r3, #0] 8004346: 021b lsls r3, r3, #8 8004348: b21a sxth r2, r3 800434a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800434e: 691b ldr r3, [r3, #16] 8004350: 3303 adds r3, #3 8004352: 781b ldrb r3, [r3, #0] 8004354: b21b sxth r3, r3 8004356: 4313 orrs r3, r2 8004358: b21b sxth r3, r3 800435a: f8a7 3126 strh.w r3, [r7, #294] @ 0x126 spFrameData.frameHeader.frameCommand = (SerialProtocolCommands)(frameCommandRaw & 0x7FFF); 800435e: f8b7 3126 ldrh.w r3, [r7, #294] @ 0x126 8004362: b2da uxtb r2, r3 8004364: f507 73a0 add.w r3, r7, #320 @ 0x140 8004368: f5a3 7398 sub.w r3, r3, #304 @ 0x130 800436c: 709a strb r2, [r3, #2] spFrameData.frameHeader.isResponseFrame = (frameCommandRaw & 0x8000) != 0 ? pdTRUE : pdFALSE; 800436e: f9b7 3126 ldrsh.w r3, [r7, #294] @ 0x126 8004372: 13db asrs r3, r3, #15 8004374: b21b sxth r3, r3 8004376: f003 0201 and.w r2, r3, #1 800437a: f507 73a0 add.w r3, r7, #320 @ 0x140 800437e: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004382: 609a str r2, [r3, #8] } if ((frameBytesCount > FRAME_ID_LENGTH + FRAME_COMMAND_LENGTH + FRAME_RESP_STAT_LENGTH) && ((spFrameData.frameHeader.frameCommand & 0x8000) != 0)) { 8004384: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 8004388: 2b05 cmp r3, #5 800438a: d913 bls.n 80043b4 800438c: f507 73a0 add.w r3, r7, #320 @ 0x140 8004390: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004394: 789b ldrb r3, [r3, #2] 8004396: f403 4300 and.w r3, r3, #32768 @ 0x8000 800439a: 2b00 cmp r3, #0 800439c: d00a beq.n 80043b4 spFrameData.frameHeader.respStatus = (SerialProtocolRespStatus)(uartTaskData->frameData[FRAME_ID_LENGTH + FRAME_COMMAND_LENGTH + FRAME_RESP_STAT_LENGTH]); 800439e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80043a2: 691b ldr r3, [r3, #16] 80043a4: 3305 adds r3, #5 80043a6: 781b ldrb r3, [r3, #0] 80043a8: b25a sxtb r2, r3 80043aa: f507 73a0 add.w r3, r7, #320 @ 0x140 80043ae: f5a3 7398 sub.w r3, r3, #304 @ 0x130 80043b2: 70da strb r2, [r3, #3] } if (frameBytesCount >= FRAME_HEADER_LENGTH) { 80043b4: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 80043b8: 2b07 cmp r3, #7 80043ba: d920 bls.n 80043fe spFrameData.frameHeader.frameDataLength = CONVERT_BYTES_TO_SHORT_WORD (&(uartTaskData->frameData[FRAME_HEADER_LENGTH - FRAME_RESP_STAT_LENGTH - FRAME_DATALEN_LENGTH])); 80043bc: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80043c0: 691b ldr r3, [r3, #16] 80043c2: 3306 adds r3, #6 80043c4: 781b ldrb r3, [r3, #0] 80043c6: 021b lsls r3, r3, #8 80043c8: b21a sxth r2, r3 80043ca: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80043ce: 691b ldr r3, [r3, #16] 80043d0: 3305 adds r3, #5 80043d2: 781b ldrb r3, [r3, #0] 80043d4: b21b sxth r3, r3 80043d6: 4313 orrs r3, r2 80043d8: b21b sxth r3, r3 80043da: b29a uxth r2, r3 80043dc: f507 73a0 add.w r3, r7, #320 @ 0x140 80043e0: f5a3 7398 sub.w r3, r3, #304 @ 0x130 80043e4: 809a strh r2, [r3, #4] frameTotalLength = FRAME_HEADER_LENGTH + spFrameData.frameHeader.frameDataLength + FRAME_CRC_LENGTH; 80043e6: f507 73a0 add.w r3, r7, #320 @ 0x140 80043ea: f5a3 7398 sub.w r3, r3, #304 @ 0x130 80043ee: 889b ldrh r3, [r3, #4] 80043f0: 330a adds r3, #10 80043f2: f8a7 313e strh.w r3, [r7, #318] @ 0x13e receverState = srRecieveData; 80043f6: 2302 movs r3, #2 80043f8: f887 3133 strb.w r3, [r7, #307] @ 0x133 80043fc: e00e b.n 800441c } else { proceed = pdFALSE; 80043fe: 2300 movs r3, #0 8004400: f8c7 3134 str.w r3, [r7, #308] @ 0x134 8004404: e00a b.n 800441c } } else { if (frameBytesCount > 0) { 8004406: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 800440a: 2b00 cmp r3, #0 800440c: d003 beq.n 8004416 receverState = srFail; 800440e: 2304 movs r3, #4 8004410: f887 3133 strb.w r3, [r7, #307] @ 0x133 8004414: e002 b.n 800441c } else { proceed = pdFALSE; 8004416: 2300 movs r3, #0 8004418: f8c7 3134 str.w r3, [r7, #308] @ 0x134 } } osMutexRelease (uartTaskData->rxDataBufferMutex); 800441c: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004420: 6a1b ldr r3, [r3, #32] 8004422: 4618 mov r0, r3 8004424: f00c fb99 bl 8010b5a break; 8004428: e165 b.n 80046f6 case srRecieveData: if (frameBytesCount >= frameTotalLength) { 800442a: f8b7 2124 ldrh.w r2, [r7, #292] @ 0x124 800442e: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 8004432: 429a cmp r2, r3 8004434: d303 bcc.n 800443e receverState = srCheckCrc; 8004436: 2301 movs r3, #1 8004438: f887 3133 strb.w r3, [r7, #307] @ 0x133 } else { proceed = pdFALSE; } break; 800443c: e15b b.n 80046f6 proceed = pdFALSE; 800443e: 2300 movs r3, #0 8004440: f8c7 3134 str.w r3, [r7, #308] @ 0x134 break; 8004444: e157 b.n 80046f6 case srCheckCrc: osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 8004446: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800444a: 6a1b ldr r3, [r3, #32] 800444c: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004450: 4618 mov r0, r3 8004452: f00c fb37 bl 8010ac4 frameCrc = CONVERT_BYTES_TO_SHORT_WORD (&(uartTaskData->frameData[frameTotalLength - FRAME_CRC_LENGTH])); 8004456: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800445a: 691a ldr r2, [r3, #16] 800445c: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 8004460: 3b01 subs r3, #1 8004462: 4413 add r3, r2 8004464: 781b ldrb r3, [r3, #0] 8004466: 021b lsls r3, r3, #8 8004468: b21a sxth r2, r3 800446a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800446e: 6919 ldr r1, [r3, #16] 8004470: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 8004474: 3b02 subs r3, #2 8004476: 440b add r3, r1 8004478: 781b ldrb r3, [r3, #0] 800447a: b21b sxth r3, r3 800447c: 4313 orrs r3, r2 800447e: b21b sxth r3, r3 8004480: f8a7 3122 strh.w r3, [r7, #290] @ 0x122 crc = HAL_CRC_Calculate (&hcrc, (uint32_t*)(uartTaskData->frameData), frameTotalLength - FRAME_CRC_LENGTH); 8004484: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004488: 6919 ldr r1, [r3, #16] 800448a: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 800448e: 3b02 subs r3, #2 8004490: 461a mov r2, r3 8004492: 4841 ldr r0, [pc, #260] @ (8004598 ) 8004494: f000 ffd8 bl 8005448 8004498: f8c7 0128 str.w r0, [r7, #296] @ 0x128 osMutexRelease (uartTaskData->rxDataBufferMutex); 800449c: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80044a0: 6a1b ldr r3, [r3, #32] 80044a2: 4618 mov r0, r3 80044a4: f00c fb59 bl 8010b5a crcPass = frameCrc == crc; 80044a8: f8b7 3122 ldrh.w r3, [r7, #290] @ 0x122 80044ac: f8d7 2128 ldr.w r2, [r7, #296] @ 0x128 80044b0: 429a cmp r2, r3 80044b2: bf0c ite eq 80044b4: 2301 moveq r3, #1 80044b6: 2300 movne r3, #0 80044b8: b2db uxtb r3, r3 80044ba: f8c7 3138 str.w r3, [r7, #312] @ 0x138 if (crcPass) { 80044be: f8d7 3138 ldr.w r3, [r7, #312] @ 0x138 80044c2: 2b00 cmp r3, #0 80044c4: d00b beq.n 80044de #if UART_TASK_LOGS printf ("Uart%d: Frame CRC PASS\n", uartTaskData->uartNumber); 80044c6: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80044ca: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 80044ce: 4619 mov r1, r3 80044d0: 4832 ldr r0, [pc, #200] @ (800459c ) 80044d2: f025 fa7b bl 80299cc #endif receverState = srExecuteCmd; 80044d6: 2303 movs r3, #3 80044d8: f887 3133 strb.w r3, [r7, #307] @ 0x133 } else { receverState = srFail; } break; 80044dc: e10b b.n 80046f6 receverState = srFail; 80044de: 2304 movs r3, #4 80044e0: f887 3133 strb.w r3, [r7, #307] @ 0x133 break; 80044e4: e107 b.n 80046f6 case srExecuteCmd: if ((uartTaskData->processDataCb != NULL) || (uartTaskData->processRxDataMsgBuffer != NULL)) { 80044e6: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80044ea: 6a9b ldr r3, [r3, #40] @ 0x28 80044ec: 2b00 cmp r3, #0 80044ee: d104 bne.n 80044fa 80044f0: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80044f4: 6a5b ldr r3, [r3, #36] @ 0x24 80044f6: 2b00 cmp r3, #0 80044f8: d01e beq.n 8004538 osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 80044fa: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80044fe: 6a1b ldr r3, [r3, #32] 8004500: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004504: 4618 mov r0, r3 8004506: f00c fadd bl 8010ac4 memcpy (spFrameData.dataBuffer, &(uartTaskData->frameData[FRAME_HEADER_LENGTH]), spFrameData.frameHeader.frameDataLength); 800450a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800450e: 691b ldr r3, [r3, #16] 8004510: f103 0108 add.w r1, r3, #8 8004514: f507 73a0 add.w r3, r7, #320 @ 0x140 8004518: f5a3 7398 sub.w r3, r3, #304 @ 0x130 800451c: 889b ldrh r3, [r3, #4] 800451e: 461a mov r2, r3 8004520: f107 0310 add.w r3, r7, #16 8004524: 330c adds r3, #12 8004526: 4618 mov r0, r3 8004528: f025 fcd9 bl 8029ede osMutexRelease (uartTaskData->rxDataBufferMutex); 800452c: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004530: 6a1b ldr r3, [r3, #32] 8004532: 4618 mov r0, r3 8004534: f00c fb11 bl 8010b5a } if (uartTaskData->processRxDataMsgBuffer != NULL) { 8004538: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800453c: 6a5b ldr r3, [r3, #36] @ 0x24 800453e: 2b00 cmp r3, #0 8004540: d015 beq.n 800456e if(xMessageBufferSend (uartTaskData->processRxDataMsgBuffer, &spFrameData, sizeof (SerialProtocolFrameHeader) + spFrameData.frameHeader.frameDataLength, pdMS_TO_TICKS (200)) == pdFALSE) 8004542: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004546: 6a58 ldr r0, [r3, #36] @ 0x24 8004548: f507 73a0 add.w r3, r7, #320 @ 0x140 800454c: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004550: 889b ldrh r3, [r3, #4] 8004552: f103 020c add.w r2, r3, #12 8004556: f107 0110 add.w r1, r7, #16 800455a: 23c8 movs r3, #200 @ 0xc8 800455c: f00e f890 bl 8012680 8004560: 4603 mov r3, r0 8004562: 2b00 cmp r3, #0 8004564: d103 bne.n 800456e { receverState = srFail; 8004566: 2304 movs r3, #4 8004568: f887 3133 strb.w r3, [r7, #307] @ 0x133 break; 800456c: e0c3 b.n 80046f6 } } if (uartTaskData->processDataCb != NULL) { 800456e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004572: 6a9b ldr r3, [r3, #40] @ 0x28 8004574: 2b00 cmp r3, #0 8004576: d008 beq.n 800458a uartTaskData->processDataCb (uartTaskData, &spFrameData); 8004578: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800457c: 6a9b ldr r3, [r3, #40] @ 0x28 800457e: f107 0210 add.w r2, r7, #16 8004582: 4611 mov r1, r2 8004584: f8d7 012c ldr.w r0, [r7, #300] @ 0x12c 8004588: 4798 blx r3 } receverState = srFinish; 800458a: 2305 movs r3, #5 800458c: f887 3133 strb.w r3, [r7, #307] @ 0x133 break; 8004590: e0b1 b.n 80046f6 8004592: bf00 nop 8004594: 0802c8e4 .word 0x0802c8e4 8004598: 24000248 .word 0x24000248 800459c: 0802c904 .word 0x0802c904 case srFail: dataToSend = 0; 80045a0: 2300 movs r3, #0 80045a2: f8a7 313c strh.w r3, [r7, #316] @ 0x13c if ((frameTimeout == pdTRUE) && (frameBytesCount > 2)) { 80045a6: f8d7 311c ldr.w r3, [r7, #284] @ 0x11c 80045aa: 2b01 cmp r3, #1 80045ac: d124 bne.n 80045f8 80045ae: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 80045b2: 2b02 cmp r3, #2 80045b4: d920 bls.n 80045f8 dataToSend = PrepareRespFrame (uartTaskData->uartTxBuffer, spFrameData.frameHeader.frameId, spFrameData.frameHeader.frameCommand, spTimeout, NULL, 0); 80045b6: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80045ba: 6898 ldr r0, [r3, #8] 80045bc: f507 73a0 add.w r3, r7, #320 @ 0x140 80045c0: f5a3 7398 sub.w r3, r3, #304 @ 0x130 80045c4: 8819 ldrh r1, [r3, #0] 80045c6: f507 73a0 add.w r3, r7, #320 @ 0x140 80045ca: f5a3 7398 sub.w r3, r3, #304 @ 0x130 80045ce: 789a ldrb r2, [r3, #2] 80045d0: 2300 movs r3, #0 80045d2: 9301 str r3, [sp, #4] 80045d4: 2300 movs r3, #0 80045d6: 9300 str r3, [sp, #0] 80045d8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80045dc: f7fe fdf0 bl 80031c0 80045e0: 4603 mov r3, r0 80045e2: f8a7 313c strh.w r3, [r7, #316] @ 0x13c #if UART_TASK_LOGS printf ("Uart%d: RX data receiver timeout!\n", uartTaskData->uartNumber); 80045e6: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80045ea: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 80045ee: 4619 mov r1, r3 80045f0: 4844 ldr r0, [pc, #272] @ (8004704 ) 80045f2: f025 f9eb bl 80299cc 80045f6: e03c b.n 8004672 #endif } else if (!crcPass) { 80045f8: f8d7 3138 ldr.w r3, [r7, #312] @ 0x138 80045fc: 2b00 cmp r3, #0 80045fe: d120 bne.n 8004642 dataToSend = PrepareRespFrame (uartTaskData->uartTxBuffer, spFrameData.frameHeader.frameId, spFrameData.frameHeader.frameCommand, spCrcFail, NULL, 0); 8004600: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004604: 6898 ldr r0, [r3, #8] 8004606: f507 73a0 add.w r3, r7, #320 @ 0x140 800460a: f5a3 7398 sub.w r3, r3, #304 @ 0x130 800460e: 8819 ldrh r1, [r3, #0] 8004610: f507 73a0 add.w r3, r7, #320 @ 0x140 8004614: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004618: 789a ldrb r2, [r3, #2] 800461a: 2300 movs r3, #0 800461c: 9301 str r3, [sp, #4] 800461e: 2300 movs r3, #0 8004620: 9300 str r3, [sp, #0] 8004622: f06f 0301 mvn.w r3, #1 8004626: f7fe fdcb bl 80031c0 800462a: 4603 mov r3, r0 800462c: f8a7 313c strh.w r3, [r7, #316] @ 0x13c #if UART_TASK_LOGS printf ("Uart%d: Frame CRC FAIL\n", uartTaskData->uartNumber); 8004630: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004634: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8004638: 4619 mov r1, r3 800463a: 4833 ldr r0, [pc, #204] @ (8004708 ) 800463c: f025 f9c6 bl 80299cc 8004640: e017 b.n 8004672 #endif } else { dataToSend = PrepareRespFrame (uartTaskData->uartTxBuffer, spFrameData.frameHeader.frameId, spFrameData.frameHeader.frameCommand, spInternalError, NULL, 0); 8004642: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004646: 6898 ldr r0, [r3, #8] 8004648: f507 73a0 add.w r3, r7, #320 @ 0x140 800464c: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004650: 8819 ldrh r1, [r3, #0] 8004652: f507 73a0 add.w r3, r7, #320 @ 0x140 8004656: f5a3 7398 sub.w r3, r3, #304 @ 0x130 800465a: 789a ldrb r2, [r3, #2] 800465c: 2300 movs r3, #0 800465e: 9301 str r3, [sp, #4] 8004660: 2300 movs r3, #0 8004662: 9300 str r3, [sp, #0] 8004664: f06f 0302 mvn.w r3, #2 8004668: f7fe fdaa bl 80031c0 800466c: 4603 mov r3, r0 800466e: f8a7 313c strh.w r3, [r7, #316] @ 0x13c } if (dataToSend > 0) { 8004672: f8b7 313c ldrh.w r3, [r7, #316] @ 0x13c 8004676: 2b00 cmp r3, #0 8004678: d00a beq.n 8004690 HAL_UART_Transmit_IT (uartTaskData->huart, uartTaskData->uartTxBuffer, dataToSend); 800467a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800467e: 6b18 ldr r0, [r3, #48] @ 0x30 8004680: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004684: 689b ldr r3, [r3, #8] 8004686: f8b7 213c ldrh.w r2, [r7, #316] @ 0x13c 800468a: 4619 mov r1, r3 800468c: f008 fc12 bl 800ceb4 } #if UART_TASK_LOGS printf ("Uart%d: TX bytes sent: %d\n", dataToSend, uartTaskData->uartNumber); 8004690: f8b7 113c ldrh.w r1, [r7, #316] @ 0x13c 8004694: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004698: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 800469c: 461a mov r2, r3 800469e: 481b ldr r0, [pc, #108] @ (800470c ) 80046a0: f025 f994 bl 80299cc #endif receverState = srFinish; 80046a4: 2305 movs r3, #5 80046a6: f887 3133 strb.w r3, [r7, #307] @ 0x133 break; 80046aa: e024 b.n 80046f6 case srFinish: default: osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 80046ac: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80046b0: 6a1b ldr r3, [r3, #32] 80046b2: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80046b6: 4618 mov r0, r3 80046b8: f00c fa04 bl 8010ac4 uartTaskData->frameBytesCount = 0; 80046bc: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80046c0: 2200 movs r2, #0 80046c2: 82da strh r2, [r3, #22] osMutexRelease (uartTaskData->rxDataBufferMutex); 80046c4: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80046c8: 6a1b ldr r3, [r3, #32] 80046ca: 4618 mov r0, r3 80046cc: f00c fa45 bl 8010b5a spFrameData.frameHeader.frameCommand = spUnknown; 80046d0: f507 73a0 add.w r3, r7, #320 @ 0x140 80046d4: f5a3 7398 sub.w r3, r3, #304 @ 0x130 80046d8: 2208 movs r2, #8 80046da: 709a strb r2, [r3, #2] frameTotalLength = 0; 80046dc: 2300 movs r3, #0 80046de: f8a7 313e strh.w r3, [r7, #318] @ 0x13e outputDataBufferPos = 0; 80046e2: 4b0b ldr r3, [pc, #44] @ (8004710 ) 80046e4: 2200 movs r2, #0 80046e6: 801a strh r2, [r3, #0] receverState = srWaitForHeader; 80046e8: 2300 movs r3, #0 80046ea: f887 3133 strb.w r3, [r7, #307] @ 0x133 proceed = pdFALSE; 80046ee: 2300 movs r3, #0 80046f0: f8c7 3134 str.w r3, [r7, #308] @ 0x134 break; 80046f4: bf00 nop while (proceed) { 80046f6: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 80046fa: 2b00 cmp r3, #0 80046fc: f47f ade0 bne.w 80042c0 frameTimeout = !(xTaskNotifyWait (0, 0, &bytesRec, pdMS_TO_TICKS (FRAME_TIMEOUT_MS))); 8004700: e581 b.n 8004206 8004702: bf00 nop 8004704: 0802c91c .word 0x0802c91c 8004708: 0802c940 .word 0x0802c940 800470c: 0802c958 .word 0x0802c958 8004710: 24001fc4 .word 0x24001fc4 08004714 : } } } void ReadMeasSetFromBuffer(uint8_t* buff, uint16_t* buffPos, float* dataSet) { 8004714: b580 push {r7, lr} 8004716: b086 sub sp, #24 8004718: af00 add r7, sp, #0 800471a: 60f8 str r0, [r7, #12] 800471c: 60b9 str r1, [r7, #8] 800471e: 607a str r2, [r7, #4] for(uint8_t i = 0; i < 3; i++) 8004720: 2300 movs r3, #0 8004722: 75fb strb r3, [r7, #23] 8004724: e00b b.n 800473e { ReadFloatFromBuffer(buff, buffPos, &dataSet[i]); 8004726: 7dfb ldrb r3, [r7, #23] 8004728: 009b lsls r3, r3, #2 800472a: 687a ldr r2, [r7, #4] 800472c: 4413 add r3, r2 800472e: 461a mov r2, r3 8004730: 68b9 ldr r1, [r7, #8] 8004732: 68f8 ldr r0, [r7, #12] 8004734: f7fe fc55 bl 8002fe2 for(uint8_t i = 0; i < 3; i++) 8004738: 7dfb ldrb r3, [r7, #23] 800473a: 3301 adds r3, #1 800473c: 75fb strb r3, [r7, #23] 800473e: 7dfb ldrb r3, [r7, #23] 8004740: 2b02 cmp r3, #2 8004742: d9f0 bls.n 8004726 } } 8004744: bf00 nop 8004746: bf00 nop 8004748: 3718 adds r7, #24 800474a: 46bd mov sp, r7 800474c: bd80 pop {r7, pc} ... 08004750 : void UartTxTask (void* argument) { 8004750: b580 push {r7, lr} 8004752: b0d4 sub sp, #336 @ 0x150 8004754: af02 add r7, sp, #8 8004756: f507 73a4 add.w r3, r7, #328 @ 0x148 800475a: f5a3 73a2 sub.w r3, r3, #324 @ 0x144 800475e: 6018 str r0, [r3, #0] UartTaskData* const uartTaskData = (UartTaskData*)argument; 8004760: f507 73a4 add.w r3, r7, #328 @ 0x148 8004764: f5a3 73a2 sub.w r3, r3, #324 @ 0x144 8004768: 681b ldr r3, [r3, #0] 800476a: f8c7 3140 str.w r3, [r7, #320] @ 0x140 InterProcessData data = { 0 }; 800476e: f507 7390 add.w r3, r7, #288 @ 0x120 8004772: 2200 movs r2, #0 8004774: 601a str r2, [r3, #0] 8004776: 605a str r2, [r3, #4] 8004778: 609a str r2, [r3, #8] SerialProtocolFrameData frameData = { 0 }; 800477a: f507 73a4 add.w r3, r7, #328 @ 0x148 800477e: f5a3 739a sub.w r3, r3, #308 @ 0x134 8004782: 4618 mov r0, r3 8004784: f44f 7386 mov.w r3, #268 @ 0x10c 8004788: 461a mov r2, r3 800478a: 2100 movs r1, #0 800478c: f025 fab0 bl 8029cf0 size_t bytesInMsg; uint16_t frameId = 0; 8004790: 2300 movs r3, #0 8004792: f8a7 313e strh.w r3, [r7, #318] @ 0x13e uint32_t rndVal = 0; 8004796: f507 73a4 add.w r3, r7, #328 @ 0x148 800479a: f5a3 739c sub.w r3, r3, #312 @ 0x138 800479e: 2200 movs r2, #0 80047a0: 601a str r2, [r3, #0] uint16_t bytesToSend = 0; 80047a2: 2300 movs r3, #0 80047a4: f8a7 313c strh.w r3, [r7, #316] @ 0x13c SerialProtocolCommands frameCommand = spUnknown; 80047a8: 2308 movs r3, #8 80047aa: f887 313b strb.w r3, [r7, #315] @ 0x13b uint16_t inputDataBufferPos = 0; 80047ae: f507 73a4 add.w r3, r7, #328 @ 0x148 80047b2: f5a3 739d sub.w r3, r3, #314 @ 0x13a 80047b6: 2200 movs r2, #0 80047b8: 801a strh r2, [r3, #0] uint8_t boardNumber = 0; 80047ba: 2300 movs r3, #0 80047bc: f887 3147 strb.w r3, [r7, #327] @ 0x147 while (pdTRUE) { if (uartTaskData->sendCmdToSlaveQueue != NULL) { 80047c0: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 80047c4: 6adb ldr r3, [r3, #44] @ 0x2c 80047c6: 2b00 cmp r3, #0 80047c8: f000 8224 beq.w 8004c14 osMessageQueueGet (uartTaskData->sendCmdToSlaveQueue, &data, 0, osWaitForever); 80047cc: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 80047d0: 6ad8 ldr r0, [r3, #44] @ 0x2c 80047d2: f507 7190 add.w r1, r7, #288 @ 0x120 80047d6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80047da: 2200 movs r2, #0 80047dc: f00c fc12 bl 8011004 HAL_RNG_GenerateRandomNumber (&hrng, &rndVal); 80047e0: f107 0310 add.w r3, r7, #16 80047e4: 4619 mov r1, r3 80047e6: 48a1 ldr r0, [pc, #644] @ (8004a6c ) 80047e8: f007 fff0 bl 800c7cc frameId = (uint16_t)(rndVal & 0xFFFF); 80047ec: f507 73a4 add.w r3, r7, #328 @ 0x148 80047f0: f5a3 739c sub.w r3, r3, #312 @ 0x138 80047f4: 681b ldr r3, [r3, #0] 80047f6: f8a7 313e strh.w r3, [r7, #318] @ 0x13e frameCommand = data.spCommand; 80047fa: f897 3120 ldrb.w r3, [r7, #288] @ 0x120 80047fe: f887 313b strb.w r3, [r7, #315] @ 0x13b outputDataBufferPos = 0; 8004802: 4b9b ldr r3, [pc, #620] @ (8004a70 ) 8004804: 2200 movs r2, #0 8004806: 801a strh r2, [r3, #0] memset (outputDataBuffer, 0x00, OUTPUT_DATA_BUFF_SIZE); 8004808: 2280 movs r2, #128 @ 0x80 800480a: 2100 movs r1, #0 800480c: 4899 ldr r0, [pc, #612] @ (8004a74 ) 800480e: f025 fa6f bl 8029cf0 switch (frameCommand) { 8004812: f897 313b ldrb.w r3, [r7, #315] @ 0x13b 8004816: 2b07 cmp r3, #7 8004818: f200 8201 bhi.w 8004c1e 800481c: a201 add r2, pc, #4 @ (adr r2, 8004824 ) 800481e: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8004822: bf00 nop 8004824: 0800488d .word 0x0800488d 8004828: 0800488d .word 0x0800488d 800482c: 08004845 .word 0x08004845 8004830: 08004845 .word 0x08004845 8004834: 08004845 .word 0x08004845 8004838: 0800487b .word 0x0800487b 800483c: 0800487b .word 0x0800487b 8004840: 08004869 .word 0x08004869 case spSetFanSpeed: case spSetMotorXOn: case spSetMotorYOn: WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.integerValues.value[0], sizeof (float)); 8004844: f507 7390 add.w r3, r7, #288 @ 0x120 8004848: 1d1a adds r2, r3, #4 800484a: 2304 movs r3, #4 800484c: 4988 ldr r1, [pc, #544] @ (8004a70 ) 800484e: 4889 ldr r0, [pc, #548] @ (8004a74 ) 8004850: f7fe fb96 bl 8002f80 WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.integerValues.value[1], sizeof (float)); 8004854: f507 7390 add.w r3, r7, #288 @ 0x120 8004858: f103 0208 add.w r2, r3, #8 800485c: 2304 movs r3, #4 800485e: 4984 ldr r1, [pc, #528] @ (8004a70 ) 8004860: 4884 ldr r0, [pc, #528] @ (8004a74 ) 8004862: f7fe fb8d bl 8002f80 break; 8004866: e012 b.n 800488e case spSetDiodeOn: WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.integerValues.value[0], sizeof (float)); break; 8004868: f507 7390 add.w r3, r7, #288 @ 0x120 800486c: 1d1a adds r2, r3, #4 800486e: 2304 movs r3, #4 8004870: 497f ldr r1, [pc, #508] @ (8004a70 ) 8004872: 4880 ldr r0, [pc, #512] @ (8004a74 ) 8004874: f7fe fb84 bl 8002f80 8004878: e009 b.n 800488e case spSetmotorXMaxCurrent: case spSetmotorYMaxCurrent: WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.flaotValues.value[0], sizeof (float)); break; 800487a: f507 7390 add.w r3, r7, #288 @ 0x120 800487e: 1d1a adds r2, r3, #4 8004880: 2304 movs r3, #4 8004882: 497b ldr r1, [pc, #492] @ (8004a70 ) 8004884: 487b ldr r0, [pc, #492] @ (8004a74 ) 8004886: f7fe fb7b bl 8002f80 800488a: e000 b.n 800488e case spGetElectricalMeasurments: case spGetSensorMeasurments: break; 800488c: bf00 nop default: continue; break; } bytesToSend = PrepareReqFrame (uartTaskData->uartTxBuffer, frameId, frameCommand, outputDataBuffer, outputDataBufferPos); 800488e: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 8004892: 6898 ldr r0, [r3, #8] 8004894: 4b76 ldr r3, [pc, #472] @ (8004a70 ) 8004896: 881b ldrh r3, [r3, #0] 8004898: f897 213b ldrb.w r2, [r7, #315] @ 0x13b 800489c: f8b7 113e ldrh.w r1, [r7, #318] @ 0x13e 80048a0: 9300 str r3, [sp, #0] 80048a2: 4b74 ldr r3, [pc, #464] @ (8004a74 ) 80048a4: f7fe fbf8 bl 8003098 80048a8: 4603 mov r3, r0 80048aa: f8a7 313c strh.w r3, [r7, #316] @ 0x13c HAL_UART_Transmit_IT (uartTaskData->huart, uartTaskData->uartTxBuffer, bytesToSend); 80048ae: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 80048b2: 6b18 ldr r0, [r3, #48] @ 0x30 80048b4: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 80048b8: 689b ldr r3, [r3, #8] 80048ba: f8b7 213c ldrh.w r2, [r7, #316] @ 0x13c 80048be: 4619 mov r1, r3 80048c0: f008 faf8 bl 800ceb4 bytesInMsg = xMessageBufferReceive (uartTaskData->processRxDataMsgBuffer, &frameData, INPUT_DATA_BUFF_SIZE, pdMS_TO_TICKS (1000)); 80048c4: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 80048c8: 6a58 ldr r0, [r3, #36] @ 0x24 80048ca: f107 0114 add.w r1, r7, #20 80048ce: f44f 737a mov.w r3, #1000 @ 0x3e8 80048d2: f44f 7280 mov.w r2, #256 @ 0x100 80048d6: f00d ffc9 bl 801286c 80048da: f8c7 0134 str.w r0, [r7, #308] @ 0x134 for(boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) 80048de: 2300 movs r3, #0 80048e0: f887 3147 strb.w r3, [r7, #327] @ 0x147 80048e4: e00e b.n 8004904 { if(boardToUartNumberMap[boardNumber] == uartTaskData->uartNumber) 80048e6: f897 3147 ldrb.w r3, [r7, #327] @ 0x147 80048ea: 4a63 ldr r2, [pc, #396] @ (8004a78 ) 80048ec: 5cd2 ldrb r2, [r2, r3] 80048ee: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 80048f2: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 80048f6: 429a cmp r2, r3 80048f8: d009 beq.n 800490e for(boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) 80048fa: f897 3147 ldrb.w r3, [r7, #327] @ 0x147 80048fe: 3301 adds r3, #1 8004900: f887 3147 strb.w r3, [r7, #327] @ 0x147 8004904: f897 3147 ldrb.w r3, [r7, #327] @ 0x147 8004908: 2b03 cmp r3, #3 800490a: d9ec bls.n 80048e6 800490c: e000 b.n 8004910 { break; 800490e: bf00 nop } } if (bytesInMsg == 0) { 8004910: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 8004914: 2b00 cmp r3, #0 8004916: d124 bne.n 8004962 if (frameCommand == spGetElectricalMeasurments) 8004918: f897 313b ldrb.w r3, [r7, #315] @ 0x13b 800491c: 2b00 cmp r3, #0 800491e: d114 bne.n 800494a { osMutexAcquire (resMeasurementsMutex, osWaitForever); 8004920: 4b56 ldr r3, [pc, #344] @ (8004a7c ) 8004922: 681b ldr r3, [r3, #0] 8004924: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004928: 4618 mov r0, r3 800492a: f00c f8cb bl 8010ac4 slaveLastSeen[boardNumber]++; 800492e: f897 3147 ldrb.w r3, [r7, #327] @ 0x147 8004932: 4a53 ldr r2, [pc, #332] @ (8004a80 ) 8004934: f852 2023 ldr.w r2, [r2, r3, lsl #2] 8004938: 3201 adds r2, #1 800493a: 4951 ldr r1, [pc, #324] @ (8004a80 ) 800493c: f841 2023 str.w r2, [r1, r3, lsl #2] osMutexRelease(resMeasurementsMutex); 8004940: 4b4e ldr r3, [pc, #312] @ (8004a7c ) 8004942: 681b ldr r3, [r3, #0] 8004944: 4618 mov r0, r3 8004946: f00c f908 bl 8010b5a } #if UART_TASK_LOGS printf ("Uart%d: Response timeout for frameId 0x%x\n", uartTaskData->uartNumber, frameId); 800494a: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 800494e: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8004952: 4619 mov r1, r3 8004954: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 8004958: 461a mov r2, r3 800495a: 484a ldr r0, [pc, #296] @ (8004a84 ) 800495c: f025 f836 bl 80299cc 8004960: e72e b.n 80047c0 #endif } else { if ((frameId == frameData.frameHeader.frameId) && (frameData.frameHeader.respStatus == spOK)) { 8004962: f507 73a4 add.w r3, r7, #328 @ 0x148 8004966: f5a3 739a sub.w r3, r3, #308 @ 0x134 800496a: 881b ldrh r3, [r3, #0] 800496c: f8b7 213e ldrh.w r2, [r7, #318] @ 0x13e 8004970: 429a cmp r2, r3 8004972: f47f af25 bne.w 80047c0 8004976: f507 73a4 add.w r3, r7, #328 @ 0x148 800497a: f5a3 739a sub.w r3, r3, #308 @ 0x134 800497e: f993 3003 ldrsb.w r3, [r3, #3] 8004982: 2b00 cmp r3, #0 8004984: f47f af1c bne.w 80047c0 #if UART_TASK_LOGS printf ("Uart%d: Response for frameId 0x%x OK\n", uartTaskData->uartNumber, frameId); 8004988: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 800498c: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8004990: 4619 mov r1, r3 8004992: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 8004996: 461a mov r2, r3 8004998: 483b ldr r0, [pc, #236] @ (8004a88 ) 800499a: f025 f817 bl 80299cc #endif slaveLastSeen[boardNumber] = 0; 800499e: f897 3147 ldrb.w r3, [r7, #327] @ 0x147 80049a2: 4a37 ldr r2, [pc, #220] @ (8004a80 ) 80049a4: 2100 movs r1, #0 80049a6: f842 1023 str.w r1, [r2, r3, lsl #2] switch(frameData.frameHeader.frameCommand) 80049aa: f507 73a4 add.w r3, r7, #328 @ 0x148 80049ae: f5a3 739a sub.w r3, r3, #308 @ 0x134 80049b2: 789b ldrb r3, [r3, #2] 80049b4: 2b00 cmp r3, #0 80049b6: d002 beq.n 80049be 80049b8: 2b01 cmp r3, #1 80049ba: d069 beq.n 8004a90 ReadByteFromBufer(frameData.dataBuffer, &inputDataBufferPos, &sensors->limitSwitchCenter); ReadByteFromBufer(frameData.dataBuffer, &inputDataBufferPos, &sensors->powerSupplyFailMask); osMutexRelease(sensorsInfoMutex); break; default: break; 80049bc: e130 b.n 8004c20 osMutexAcquire (resMeasurementsMutex, osWaitForever); 80049be: 4b2f ldr r3, [pc, #188] @ (8004a7c ) 80049c0: 681b ldr r3, [r3, #0] 80049c2: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80049c6: 4618 mov r0, r3 80049c8: f00c f87c bl 8010ac4 RESMeasurements *resMeas = &resMeasurements[boardNumber]; 80049cc: f897 2147 ldrb.w r2, [r7, #327] @ 0x147 80049d0: 4613 mov r3, r2 80049d2: 011b lsls r3, r3, #4 80049d4: 1a9b subs r3, r3, r2 80049d6: 009b lsls r3, r3, #2 80049d8: 4a2c ldr r2, [pc, #176] @ (8004a8c ) 80049da: 4413 add r3, r2 80049dc: f8c7 312c str.w r3, [r7, #300] @ 0x12c inputDataBufferPos = 0; 80049e0: f507 73a4 add.w r3, r7, #328 @ 0x148 80049e4: f5a3 739d sub.w r3, r3, #314 @ 0x13a 80049e8: 2200 movs r2, #0 80049ea: 801a strh r2, [r3, #0] ReadMeasSetFromBuffer(frameData.dataBuffer, &inputDataBufferPos, resMeas->voltageRMS); 80049ec: f8d7 212c ldr.w r2, [r7, #300] @ 0x12c 80049f0: f107 010e add.w r1, r7, #14 80049f4: f107 0314 add.w r3, r7, #20 80049f8: 330c adds r3, #12 80049fa: 4618 mov r0, r3 80049fc: f7ff fe8a bl 8004714 ReadMeasSetFromBuffer(frameData.dataBuffer, &inputDataBufferPos, resMeas->voltagePeak); 8004a00: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004a04: f103 020c add.w r2, r3, #12 8004a08: f107 010e add.w r1, r7, #14 8004a0c: f107 0314 add.w r3, r7, #20 8004a10: 330c adds r3, #12 8004a12: 4618 mov r0, r3 8004a14: f7ff fe7e bl 8004714 ReadMeasSetFromBuffer(frameData.dataBuffer, &inputDataBufferPos, resMeas->currentRMS); 8004a18: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004a1c: f103 0218 add.w r2, r3, #24 8004a20: f107 010e add.w r1, r7, #14 8004a24: f107 0314 add.w r3, r7, #20 8004a28: 330c adds r3, #12 8004a2a: 4618 mov r0, r3 8004a2c: f7ff fe72 bl 8004714 ReadMeasSetFromBuffer(frameData.dataBuffer, &inputDataBufferPos, resMeas->currentPeak); 8004a30: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004a34: f103 0224 add.w r2, r3, #36 @ 0x24 8004a38: f107 010e add.w r1, r7, #14 8004a3c: f107 0314 add.w r3, r7, #20 8004a40: 330c adds r3, #12 8004a42: 4618 mov r0, r3 8004a44: f7ff fe66 bl 8004714 ReadMeasSetFromBuffer(frameData.dataBuffer, &inputDataBufferPos, resMeas->power); 8004a48: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004a4c: f103 0230 add.w r2, r3, #48 @ 0x30 8004a50: f107 010e add.w r1, r7, #14 8004a54: f107 0314 add.w r3, r7, #20 8004a58: 330c adds r3, #12 8004a5a: 4618 mov r0, r3 8004a5c: f7ff fe5a bl 8004714 osMutexRelease(resMeasurementsMutex); 8004a60: 4b06 ldr r3, [pc, #24] @ (8004a7c ) 8004a62: 681b ldr r3, [r3, #0] 8004a64: 4618 mov r0, r3 8004a66: f00c f878 bl 8010b5a break; 8004a6a: e0d9 b.n 8004c20 8004a6c: 2400026c .word 0x2400026c 8004a70: 24001fc4 .word 0x24001fc4 8004a74: 24001f44 .word 0x24001f44 8004a78: 24000014 .word 0x24000014 8004a7c: 24002168 .word 0x24002168 8004a80: 24002158 .word 0x24002158 8004a84: 0802c974 .word 0x0802c974 8004a88: 0802c9a0 .word 0x0802c9a0 8004a8c: 24001fc8 .word 0x24001fc8 osMutexAcquire (sensorsInfoMutex, osWaitForever); 8004a90: 4b64 ldr r3, [pc, #400] @ (8004c24 ) 8004a92: 681b ldr r3, [r3, #0] 8004a94: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004a98: 4618 mov r0, r3 8004a9a: f00c f813 bl 8010ac4 inputDataBufferPos = 0; 8004a9e: f507 73a4 add.w r3, r7, #328 @ 0x148 8004aa2: f5a3 739d sub.w r3, r3, #314 @ 0x13a 8004aa6: 2200 movs r2, #0 8004aa8: 801a strh r2, [r3, #0] SesnorsInfo* sensors = &sensorsInfo[boardNumber]; 8004aaa: f897 2147 ldrb.w r2, [r7, #327] @ 0x147 8004aae: 4613 mov r3, r2 8004ab0: 009b lsls r3, r3, #2 8004ab2: 4413 add r3, r2 8004ab4: 00db lsls r3, r3, #3 8004ab6: 4a5c ldr r2, [pc, #368] @ (8004c28 ) 8004ab8: 4413 add r3, r2 8004aba: f8c7 3130 str.w r3, [r7, #304] @ 0x130 ReadFloatFromBuffer(frameData.dataBuffer, &inputDataBufferPos, &sensors->pvTemperature[0]); 8004abe: f8d7 2130 ldr.w r2, [r7, #304] @ 0x130 8004ac2: f107 010e add.w r1, r7, #14 8004ac6: f107 0314 add.w r3, r7, #20 8004aca: 330c adds r3, #12 8004acc: 4618 mov r0, r3 8004ace: f7fe fa88 bl 8002fe2 ReadFloatFromBuffer(frameData.dataBuffer, &inputDataBufferPos, &sensors->pvTemperature[1]); 8004ad2: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8004ad6: 1d1a adds r2, r3, #4 8004ad8: f107 010e add.w r1, r7, #14 8004adc: f107 0314 add.w r3, r7, #20 8004ae0: 330c adds r3, #12 8004ae2: 4618 mov r0, r3 8004ae4: f7fe fa7d bl 8002fe2 ReadFloatFromBuffer(frameData.dataBuffer, &inputDataBufferPos, &sensors->fanVoltage); 8004ae8: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8004aec: f103 0208 add.w r2, r3, #8 8004af0: f107 010e add.w r1, r7, #14 8004af4: f107 0314 add.w r3, r7, #20 8004af8: 330c adds r3, #12 8004afa: 4618 mov r0, r3 8004afc: f7fe fa71 bl 8002fe2 ReadFloatFromBuffer(frameData.dataBuffer, &inputDataBufferPos, &sensors->pvEncoder); 8004b00: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8004b04: f103 020c add.w r2, r3, #12 8004b08: f107 010e add.w r1, r7, #14 8004b0c: f107 0314 add.w r3, r7, #20 8004b10: 330c adds r3, #12 8004b12: 4618 mov r0, r3 8004b14: f7fe fa65 bl 8002fe2 ReadByteFromBufer(frameData.dataBuffer, &inputDataBufferPos, &sensors->motorXStatus); 8004b18: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8004b1c: f103 0210 add.w r2, r3, #16 8004b20: f107 010e add.w r1, r7, #14 8004b24: f107 0314 add.w r3, r7, #20 8004b28: 330c adds r3, #12 8004b2a: 4618 mov r0, r3 8004b2c: f7fe fa8e bl 800304c ReadByteFromBufer(frameData.dataBuffer, &inputDataBufferPos, &sensors->motorYStatus); 8004b30: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8004b34: f103 0211 add.w r2, r3, #17 8004b38: f107 010e add.w r1, r7, #14 8004b3c: f107 0314 add.w r3, r7, #20 8004b40: 330c adds r3, #12 8004b42: 4618 mov r0, r3 8004b44: f7fe fa82 bl 800304c ReadFloatFromBuffer(frameData.dataBuffer, &inputDataBufferPos, &sensors->motorXAveCurrent); 8004b48: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8004b4c: f103 0214 add.w r2, r3, #20 8004b50: f107 010e add.w r1, r7, #14 8004b54: f107 0314 add.w r3, r7, #20 8004b58: 330c adds r3, #12 8004b5a: 4618 mov r0, r3 8004b5c: f7fe fa41 bl 8002fe2 ReadFloatFromBuffer(frameData.dataBuffer, &inputDataBufferPos, &sensors->motorYAveCurrent); 8004b60: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8004b64: f103 0218 add.w r2, r3, #24 8004b68: f107 010e add.w r1, r7, #14 8004b6c: f107 0314 add.w r3, r7, #20 8004b70: 330c adds r3, #12 8004b72: 4618 mov r0, r3 8004b74: f7fe fa35 bl 8002fe2 ReadFloatFromBuffer(frameData.dataBuffer, &inputDataBufferPos, &sensors->motorXPeakCurrent); 8004b78: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8004b7c: f103 021c add.w r2, r3, #28 8004b80: f107 010e add.w r1, r7, #14 8004b84: f107 0314 add.w r3, r7, #20 8004b88: 330c adds r3, #12 8004b8a: 4618 mov r0, r3 8004b8c: f7fe fa29 bl 8002fe2 ReadFloatFromBuffer(frameData.dataBuffer, &inputDataBufferPos, &sensors->motorYPeakCurrent); 8004b90: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8004b94: f103 0220 add.w r2, r3, #32 8004b98: f107 010e add.w r1, r7, #14 8004b9c: f107 0314 add.w r3, r7, #20 8004ba0: 330c adds r3, #12 8004ba2: 4618 mov r0, r3 8004ba4: f7fe fa1d bl 8002fe2 ReadByteFromBufer(frameData.dataBuffer, &inputDataBufferPos, &sensors->limitSwitchUp); 8004ba8: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8004bac: f103 0224 add.w r2, r3, #36 @ 0x24 8004bb0: f107 010e add.w r1, r7, #14 8004bb4: f107 0314 add.w r3, r7, #20 8004bb8: 330c adds r3, #12 8004bba: 4618 mov r0, r3 8004bbc: f7fe fa46 bl 800304c ReadByteFromBufer(frameData.dataBuffer, &inputDataBufferPos, &sensors->limitSwitchDown); 8004bc0: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8004bc4: f103 0225 add.w r2, r3, #37 @ 0x25 8004bc8: f107 010e add.w r1, r7, #14 8004bcc: f107 0314 add.w r3, r7, #20 8004bd0: 330c adds r3, #12 8004bd2: 4618 mov r0, r3 8004bd4: f7fe fa3a bl 800304c ReadByteFromBufer(frameData.dataBuffer, &inputDataBufferPos, &sensors->limitSwitchCenter); 8004bd8: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8004bdc: f103 0226 add.w r2, r3, #38 @ 0x26 8004be0: f107 010e add.w r1, r7, #14 8004be4: f107 0314 add.w r3, r7, #20 8004be8: 330c adds r3, #12 8004bea: 4618 mov r0, r3 8004bec: f7fe fa2e bl 800304c ReadByteFromBufer(frameData.dataBuffer, &inputDataBufferPos, &sensors->powerSupplyFailMask); 8004bf0: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8004bf4: f103 0227 add.w r2, r3, #39 @ 0x27 8004bf8: f107 010e add.w r1, r7, #14 8004bfc: f107 0314 add.w r3, r7, #20 8004c00: 330c adds r3, #12 8004c02: 4618 mov r0, r3 8004c04: f7fe fa22 bl 800304c osMutexRelease(sensorsInfoMutex); 8004c08: 4b06 ldr r3, [pc, #24] @ (8004c24 ) 8004c0a: 681b ldr r3, [r3, #0] 8004c0c: 4618 mov r0, r3 8004c0e: f00b ffa4 bl 8010b5a break; 8004c12: e005 b.n 8004c20 } } } } else { osDelay (pdMS_TO_TICKS (1000)); 8004c14: f44f 707a mov.w r0, #1000 @ 0x3e8 8004c18: f00b feb3 bl 8010982 8004c1c: e5d0 b.n 80047c0 default: continue; break; 8004c1e: bf00 nop if (uartTaskData->sendCmdToSlaveQueue != NULL) { 8004c20: e5ce b.n 80047c0 8004c22: bf00 nop 8004c24: 2400216c .word 0x2400216c 8004c28: 240020b8 .word 0x240020b8 08004c2c : } } } void MeasurmentsReqSchedulerTaskInit (void) { 8004c2c: b580 push {r7, lr} 8004c2e: b08a sub sp, #40 @ 0x28 8004c30: af00 add r7, sp, #0 osThreadAttr_t osThreadAttrMeasurmentsReqSchedulerTask = { 0 }; 8004c32: 1d3b adds r3, r7, #4 8004c34: 2224 movs r2, #36 @ 0x24 8004c36: 2100 movs r1, #0 8004c38: 4618 mov r0, r3 8004c3a: f025 f859 bl 8029cf0 osThreadAttrMeasurmentsReqSchedulerTask.name = "os_thread_XXX"; 8004c3e: 4b08 ldr r3, [pc, #32] @ (8004c60 ) 8004c40: 607b str r3, [r7, #4] osThreadAttrMeasurmentsReqSchedulerTask.stack_size = configMINIMAL_STACK_SIZE * 2; 8004c42: f44f 6380 mov.w r3, #1024 @ 0x400 8004c46: 61bb str r3, [r7, #24] osThreadAttrMeasurmentsReqSchedulerTask.priority = (osPriority_t)osPriorityNormal; 8004c48: 2318 movs r3, #24 8004c4a: 61fb str r3, [r7, #28] osThreadNew (MeasurmentsReqSchedulerTask, uartTasks, &osThreadAttrMeasurmentsReqSchedulerTask); 8004c4c: 1d3b adds r3, r7, #4 8004c4e: 461a mov r2, r3 8004c50: 4904 ldr r1, [pc, #16] @ (8004c64 ) 8004c52: 4805 ldr r0, [pc, #20] @ (8004c68 ) 8004c54: f00b fdf7 bl 8010846 } 8004c58: bf00 nop 8004c5a: 3728 adds r7, #40 @ 0x28 8004c5c: 46bd mov sp, r7 8004c5e: bd80 pop {r7, pc} 8004c60: 0802c9c8 .word 0x0802c9c8 8004c64: 24000018 .word 0x24000018 8004c68: 08004c6d .word 0x08004c6d 08004c6c : void MeasurmentsReqSchedulerTask (void* argument) { 8004c6c: b580 push {r7, lr} 8004c6e: b088 sub sp, #32 8004c70: af00 add r7, sp, #0 8004c72: 6078 str r0, [r7, #4] while (pdTRUE) { __uintptr_t* ptr = (__uintptr_t*)argument; 8004c74: 687b ldr r3, [r7, #4] 8004c76: 61fb str r3, [r7, #28] while (*ptr != 0) { 8004c78: e04a b.n 8004d10 UartTaskData* uartTask = (UartTaskData*)*ptr; 8004c7a: 69fb ldr r3, [r7, #28] 8004c7c: 681b ldr r3, [r3, #0] 8004c7e: 617b str r3, [r7, #20] if (uartTask->sendCmdToSlaveQueue != NULL) { 8004c80: 697b ldr r3, [r7, #20] 8004c82: 6adb ldr r3, [r3, #44] @ 0x2c 8004c84: 2b00 cmp r3, #0 8004c86: d040 beq.n 8004d0a InterProcessData data = { 0 }; 8004c88: f107 0308 add.w r3, r7, #8 8004c8c: 2200 movs r2, #0 8004c8e: 601a str r2, [r3, #0] 8004c90: 605a str r2, [r3, #4] 8004c92: 609a str r2, [r3, #8] uint8_t boardNumber = 0; 8004c94: 2300 movs r3, #0 8004c96: 76fb strb r3, [r7, #27] for(boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) 8004c98: 2300 movs r3, #0 8004c9a: 76fb strb r3, [r7, #27] 8004c9c: e00a b.n 8004cb4 { if(boardToUartNumberMap[boardNumber] == uartTask->uartNumber) 8004c9e: 7efb ldrb r3, [r7, #27] 8004ca0: 4a20 ldr r2, [pc, #128] @ (8004d24 ) 8004ca2: 5cd2 ldrb r2, [r2, r3] 8004ca4: 697b ldr r3, [r7, #20] 8004ca6: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8004caa: 429a cmp r2, r3 8004cac: d006 beq.n 8004cbc for(boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) 8004cae: 7efb ldrb r3, [r7, #27] 8004cb0: 3301 adds r3, #1 8004cb2: 76fb strb r3, [r7, #27] 8004cb4: 7efb ldrb r3, [r7, #27] 8004cb6: 2b03 cmp r3, #3 8004cb8: d9f1 bls.n 8004c9e 8004cba: e000 b.n 8004cbe { break; 8004cbc: bf00 nop } } data.spCommand = spGetElectricalMeasurments; 8004cbe: 2300 movs r3, #0 8004cc0: 723b strb r3, [r7, #8] osMessageQueuePut (uartTask->sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 8004cc2: 697b ldr r3, [r7, #20] 8004cc4: 6ad8 ldr r0, [r3, #44] @ 0x2c 8004cc6: f107 0108 add.w r1, r7, #8 8004cca: 2364 movs r3, #100 @ 0x64 8004ccc: 2200 movs r2, #0 8004cce: f00c f939 bl 8010f44 osMutexAcquire (resMeasurementsMutex, osWaitForever); 8004cd2: 4b15 ldr r3, [pc, #84] @ (8004d28 ) 8004cd4: 681b ldr r3, [r3, #0] 8004cd6: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004cda: 4618 mov r0, r3 8004cdc: f00b fef2 bl 8010ac4 if(slaveLastSeen[boardNumber] == 0) 8004ce0: 7efb ldrb r3, [r7, #27] 8004ce2: 4a12 ldr r2, [pc, #72] @ (8004d2c ) 8004ce4: f852 3023 ldr.w r3, [r2, r3, lsl #2] 8004ce8: 2b00 cmp r3, #0 8004cea: d109 bne.n 8004d00 { data.spCommand = spGetSensorMeasurments; 8004cec: 2301 movs r3, #1 8004cee: 723b strb r3, [r7, #8] osMessageQueuePut (uartTask->sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 8004cf0: 697b ldr r3, [r7, #20] 8004cf2: 6ad8 ldr r0, [r3, #44] @ 0x2c 8004cf4: f107 0108 add.w r1, r7, #8 8004cf8: 2364 movs r3, #100 @ 0x64 8004cfa: 2200 movs r2, #0 8004cfc: f00c f922 bl 8010f44 } osMutexRelease(resMeasurementsMutex); 8004d00: 4b09 ldr r3, [pc, #36] @ (8004d28 ) 8004d02: 681b ldr r3, [r3, #0] 8004d04: 4618 mov r0, r3 8004d06: f00b ff28 bl 8010b5a } ptr++; 8004d0a: 69fb ldr r3, [r7, #28] 8004d0c: 3304 adds r3, #4 8004d0e: 61fb str r3, [r7, #28] while (*ptr != 0) { 8004d10: 69fb ldr r3, [r7, #28] 8004d12: 681b ldr r3, [r3, #0] 8004d14: 2b00 cmp r3, #0 8004d16: d1b0 bne.n 8004c7a } osDelay (pdMS_TO_TICKS (MEASURMENTS_SCHEDULER_INTERVAL_MS)); 8004d18: f44f 707a mov.w r0, #1000 @ 0x3e8 8004d1c: f00b fe31 bl 8010982 while (pdTRUE) { 8004d20: e7a8 b.n 8004c74 8004d22: bf00 nop 8004d24: 24000014 .word 0x24000014 8004d28: 24002168 .word 0x24002168 8004d2c: 24002158 .word 0x24002158 08004d30 : .section .text.Reset_Handler .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: ldr sp, =_estack /* set stack pointer */ 8004d30: f8df d034 ldr.w sp, [pc, #52] @ 8004d68 /* Call the clock system initialization function.*/ bl SystemInit 8004d34: f7fe ffaa bl 8003c8c /* Copy the data segment initializers from flash to SRAM */ ldr r0, =_sdata 8004d38: 480c ldr r0, [pc, #48] @ (8004d6c ) ldr r1, =_edata 8004d3a: 490d ldr r1, [pc, #52] @ (8004d70 ) ldr r2, =_sidata 8004d3c: 4a0d ldr r2, [pc, #52] @ (8004d74 ) movs r3, #0 8004d3e: 2300 movs r3, #0 b LoopCopyDataInit 8004d40: e002 b.n 8004d48 08004d42 : CopyDataInit: ldr r4, [r2, r3] 8004d42: 58d4 ldr r4, [r2, r3] str r4, [r0, r3] 8004d44: 50c4 str r4, [r0, r3] adds r3, r3, #4 8004d46: 3304 adds r3, #4 08004d48 : LoopCopyDataInit: adds r4, r0, r3 8004d48: 18c4 adds r4, r0, r3 cmp r4, r1 8004d4a: 428c cmp r4, r1 bcc CopyDataInit 8004d4c: d3f9 bcc.n 8004d42 /* Zero fill the bss segment. */ ldr r2, =_sbss 8004d4e: 4a0a ldr r2, [pc, #40] @ (8004d78 ) ldr r4, =_ebss 8004d50: 4c0a ldr r4, [pc, #40] @ (8004d7c ) movs r3, #0 8004d52: 2300 movs r3, #0 b LoopFillZerobss 8004d54: e001 b.n 8004d5a 08004d56 : FillZerobss: str r3, [r2] 8004d56: 6013 str r3, [r2, #0] adds r2, r2, #4 8004d58: 3204 adds r2, #4 08004d5a : LoopFillZerobss: cmp r2, r4 8004d5a: 42a2 cmp r2, r4 bcc FillZerobss 8004d5c: d3fb bcc.n 8004d56 /* Call static constructors */ bl __libc_init_array 8004d5e: f025 f897 bl 8029e90 <__libc_init_array> /* Call the application's entry point.*/ bl main 8004d62: f7fc ffa9 bl 8001cb8
bx lr 8004d66: 4770 bx lr ldr sp, =_estack /* set stack pointer */ 8004d68: 24060000 .word 0x24060000 ldr r0, =_sdata 8004d6c: 24000000 .word 0x24000000 ldr r1, =_edata 8004d70: 24000224 .word 0x24000224 ldr r2, =_sidata 8004d74: 080310b4 .word 0x080310b4 ldr r2, =_sbss 8004d78: 24000224 .word 0x24000224 ldr r4, =_ebss 8004d7c: 2402b188 .word 0x2402b188 08004d80 : * @retval None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop 8004d80: e7fe b.n 8004d80 08004d82 : * @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) { 8004d82: b480 push {r7} 8004d84: b083 sub sp, #12 8004d86: af00 add r7, sp, #0 8004d88: 6078 str r0, [r7, #4] 8004d8a: 6039 str r1, [r7, #0] if(!pObj || !ioctx->ReadReg || !ioctx->WriteReg || !ioctx->GetTick) 8004d8c: 687b ldr r3, [r7, #4] 8004d8e: 2b00 cmp r3, #0 8004d90: d00b beq.n 8004daa 8004d92: 683b ldr r3, [r7, #0] 8004d94: 68db ldr r3, [r3, #12] 8004d96: 2b00 cmp r3, #0 8004d98: d007 beq.n 8004daa 8004d9a: 683b ldr r3, [r7, #0] 8004d9c: 689b ldr r3, [r3, #8] 8004d9e: 2b00 cmp r3, #0 8004da0: d003 beq.n 8004daa 8004da2: 683b ldr r3, [r7, #0] 8004da4: 691b ldr r3, [r3, #16] 8004da6: 2b00 cmp r3, #0 8004da8: d102 bne.n 8004db0 { return DP83848_STATUS_ERROR; 8004daa: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8004dae: e014 b.n 8004dda } pObj->IO.Init = ioctx->Init; 8004db0: 683b ldr r3, [r7, #0] 8004db2: 681a ldr r2, [r3, #0] 8004db4: 687b ldr r3, [r7, #4] 8004db6: 609a str r2, [r3, #8] pObj->IO.DeInit = ioctx->DeInit; 8004db8: 683b ldr r3, [r7, #0] 8004dba: 685a ldr r2, [r3, #4] 8004dbc: 687b ldr r3, [r7, #4] 8004dbe: 60da str r2, [r3, #12] pObj->IO.ReadReg = ioctx->ReadReg; 8004dc0: 683b ldr r3, [r7, #0] 8004dc2: 68da ldr r2, [r3, #12] 8004dc4: 687b ldr r3, [r7, #4] 8004dc6: 615a str r2, [r3, #20] pObj->IO.WriteReg = ioctx->WriteReg; 8004dc8: 683b ldr r3, [r7, #0] 8004dca: 689a ldr r2, [r3, #8] 8004dcc: 687b ldr r3, [r7, #4] 8004dce: 611a str r2, [r3, #16] pObj->IO.GetTick = ioctx->GetTick; 8004dd0: 683b ldr r3, [r7, #0] 8004dd2: 691a ldr r2, [r3, #16] 8004dd4: 687b ldr r3, [r7, #4] 8004dd6: 619a str r2, [r3, #24] return DP83848_STATUS_OK; 8004dd8: 2300 movs r3, #0 } 8004dda: 4618 mov r0, r3 8004ddc: 370c adds r7, #12 8004dde: 46bd mov sp, r7 8004de0: f85d 7b04 ldr.w r7, [sp], #4 8004de4: 4770 bx lr 08004de6 : * @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) { 8004de6: b580 push {r7, lr} 8004de8: b086 sub sp, #24 8004dea: af00 add r7, sp, #0 8004dec: 6078 str r0, [r7, #4] uint32_t regvalue = 0, addr = 0; 8004dee: 2300 movs r3, #0 8004df0: 60fb str r3, [r7, #12] 8004df2: 2300 movs r3, #0 8004df4: 617b str r3, [r7, #20] int32_t status = DP83848_STATUS_OK; 8004df6: 2300 movs r3, #0 8004df8: 613b str r3, [r7, #16] if(pObj->Is_Initialized == 0) 8004dfa: 687b ldr r3, [r7, #4] 8004dfc: 685b ldr r3, [r3, #4] 8004dfe: 2b00 cmp r3, #0 8004e00: d139 bne.n 8004e76 { if(pObj->IO.Init != 0) 8004e02: 687b ldr r3, [r7, #4] 8004e04: 689b ldr r3, [r3, #8] 8004e06: 2b00 cmp r3, #0 8004e08: d002 beq.n 8004e10 { /* GPIO and Clocks initialization */ pObj->IO.Init(); 8004e0a: 687b ldr r3, [r7, #4] 8004e0c: 689b ldr r3, [r3, #8] 8004e0e: 4798 blx r3 } /* for later check */ pObj->DevAddr = DP83848_MAX_DEV_ADDR + 1; 8004e10: 687b ldr r3, [r7, #4] 8004e12: 2220 movs r2, #32 8004e14: 601a str r2, [r3, #0] /* Get the device address from special mode register */ for(addr = 0; addr <= DP83848_MAX_DEV_ADDR; addr ++) 8004e16: 2300 movs r3, #0 8004e18: 617b str r3, [r7, #20] 8004e1a: e01c b.n 8004e56 { if(pObj->IO.ReadReg(addr, DP83848_SMR, ®value) < 0) 8004e1c: 687b ldr r3, [r7, #4] 8004e1e: 695b ldr r3, [r3, #20] 8004e20: f107 020c add.w r2, r7, #12 8004e24: 2119 movs r1, #25 8004e26: 6978 ldr r0, [r7, #20] 8004e28: 4798 blx r3 8004e2a: 4603 mov r3, r0 8004e2c: 2b00 cmp r3, #0 8004e2e: da03 bge.n 8004e38 { status = DP83848_STATUS_READ_ERROR; 8004e30: f06f 0304 mvn.w r3, #4 8004e34: 613b str r3, [r7, #16] /* Can't read from this device address continue with next address */ continue; 8004e36: e00b b.n 8004e50 } if((regvalue & DP83848_SMR_PHY_ADDR) == addr) 8004e38: 68fb ldr r3, [r7, #12] 8004e3a: f003 031f and.w r3, r3, #31 8004e3e: 697a ldr r2, [r7, #20] 8004e40: 429a cmp r2, r3 8004e42: d105 bne.n 8004e50 { pObj->DevAddr = addr; 8004e44: 687b ldr r3, [r7, #4] 8004e46: 697a ldr r2, [r7, #20] 8004e48: 601a str r2, [r3, #0] status = DP83848_STATUS_OK; 8004e4a: 2300 movs r3, #0 8004e4c: 613b str r3, [r7, #16] break; 8004e4e: e005 b.n 8004e5c for(addr = 0; addr <= DP83848_MAX_DEV_ADDR; addr ++) 8004e50: 697b ldr r3, [r7, #20] 8004e52: 3301 adds r3, #1 8004e54: 617b str r3, [r7, #20] 8004e56: 697b ldr r3, [r7, #20] 8004e58: 2b1f cmp r3, #31 8004e5a: d9df bls.n 8004e1c } } if(pObj->DevAddr > DP83848_MAX_DEV_ADDR) 8004e5c: 687b ldr r3, [r7, #4] 8004e5e: 681b ldr r3, [r3, #0] 8004e60: 2b1f cmp r3, #31 8004e62: d902 bls.n 8004e6a { status = DP83848_STATUS_ADDRESS_ERROR; 8004e64: f06f 0302 mvn.w r3, #2 8004e68: 613b str r3, [r7, #16] } /* if device address is matched */ if(status == DP83848_STATUS_OK) 8004e6a: 693b ldr r3, [r7, #16] 8004e6c: 2b00 cmp r3, #0 8004e6e: d102 bne.n 8004e76 { pObj->Is_Initialized = 1; 8004e70: 687b ldr r3, [r7, #4] 8004e72: 2201 movs r2, #1 8004e74: 605a str r2, [r3, #4] } } return status; 8004e76: 693b ldr r3, [r7, #16] } 8004e78: 4618 mov r0, r3 8004e7a: 3718 adds r7, #24 8004e7c: 46bd mov sp, r7 8004e7e: bd80 pop {r7, pc} 08004e80 : * 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) { 8004e80: b580 push {r7, lr} 8004e82: b084 sub sp, #16 8004e84: af00 add r7, sp, #0 8004e86: 6078 str r0, [r7, #4] uint32_t readval = 0; 8004e88: 2300 movs r3, #0 8004e8a: 60fb str r3, [r7, #12] /* Read Status register */ if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BSR, &readval) < 0) 8004e8c: 687b ldr r3, [r7, #4] 8004e8e: 695b ldr r3, [r3, #20] 8004e90: 687a ldr r2, [r7, #4] 8004e92: 6810 ldr r0, [r2, #0] 8004e94: f107 020c add.w r2, r7, #12 8004e98: 2101 movs r1, #1 8004e9a: 4798 blx r3 8004e9c: 4603 mov r3, r0 8004e9e: 2b00 cmp r3, #0 8004ea0: da02 bge.n 8004ea8 { return DP83848_STATUS_READ_ERROR; 8004ea2: f06f 0304 mvn.w r3, #4 8004ea6: e06e b.n 8004f86 } /* Read Status register again */ if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BSR, &readval) < 0) 8004ea8: 687b ldr r3, [r7, #4] 8004eaa: 695b ldr r3, [r3, #20] 8004eac: 687a ldr r2, [r7, #4] 8004eae: 6810 ldr r0, [r2, #0] 8004eb0: f107 020c add.w r2, r7, #12 8004eb4: 2101 movs r1, #1 8004eb6: 4798 blx r3 8004eb8: 4603 mov r3, r0 8004eba: 2b00 cmp r3, #0 8004ebc: da02 bge.n 8004ec4 { return DP83848_STATUS_READ_ERROR; 8004ebe: f06f 0304 mvn.w r3, #4 8004ec2: e060 b.n 8004f86 } if((readval & DP83848_BSR_LINK_STATUS) == 0) 8004ec4: 68fb ldr r3, [r7, #12] 8004ec6: f003 0304 and.w r3, r3, #4 8004eca: 2b00 cmp r3, #0 8004ecc: d101 bne.n 8004ed2 { /* Return Link Down status */ return DP83848_STATUS_LINK_DOWN; 8004ece: 2301 movs r3, #1 8004ed0: e059 b.n 8004f86 } /* Check Auto negotiaition */ if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BCR, &readval) < 0) 8004ed2: 687b ldr r3, [r7, #4] 8004ed4: 695b ldr r3, [r3, #20] 8004ed6: 687a ldr r2, [r7, #4] 8004ed8: 6810 ldr r0, [r2, #0] 8004eda: f107 020c add.w r2, r7, #12 8004ede: 2100 movs r1, #0 8004ee0: 4798 blx r3 8004ee2: 4603 mov r3, r0 8004ee4: 2b00 cmp r3, #0 8004ee6: da02 bge.n 8004eee { return DP83848_STATUS_READ_ERROR; 8004ee8: f06f 0304 mvn.w r3, #4 8004eec: e04b b.n 8004f86 } if((readval & DP83848_BCR_AUTONEGO_EN) != DP83848_BCR_AUTONEGO_EN) 8004eee: 68fb ldr r3, [r7, #12] 8004ef0: f403 5380 and.w r3, r3, #4096 @ 0x1000 8004ef4: 2b00 cmp r3, #0 8004ef6: d11b bne.n 8004f30 { if(((readval & DP83848_BCR_SPEED_SELECT) == DP83848_BCR_SPEED_SELECT) && ((readval & DP83848_BCR_DUPLEX_MODE) == DP83848_BCR_DUPLEX_MODE)) 8004ef8: 68fb ldr r3, [r7, #12] 8004efa: f403 5300 and.w r3, r3, #8192 @ 0x2000 8004efe: 2b00 cmp r3, #0 8004f00: d006 beq.n 8004f10 8004f02: 68fb ldr r3, [r7, #12] 8004f04: f403 7380 and.w r3, r3, #256 @ 0x100 8004f08: 2b00 cmp r3, #0 8004f0a: d001 beq.n 8004f10 { return DP83848_STATUS_100MBITS_FULLDUPLEX; 8004f0c: 2302 movs r3, #2 8004f0e: e03a b.n 8004f86 } else if ((readval & DP83848_BCR_SPEED_SELECT) == DP83848_BCR_SPEED_SELECT) 8004f10: 68fb ldr r3, [r7, #12] 8004f12: f403 5300 and.w r3, r3, #8192 @ 0x2000 8004f16: 2b00 cmp r3, #0 8004f18: d001 beq.n 8004f1e { return DP83848_STATUS_100MBITS_HALFDUPLEX; 8004f1a: 2303 movs r3, #3 8004f1c: e033 b.n 8004f86 } else if ((readval & DP83848_BCR_DUPLEX_MODE) == DP83848_BCR_DUPLEX_MODE) 8004f1e: 68fb ldr r3, [r7, #12] 8004f20: f403 7380 and.w r3, r3, #256 @ 0x100 8004f24: 2b00 cmp r3, #0 8004f26: d001 beq.n 8004f2c { return DP83848_STATUS_10MBITS_FULLDUPLEX; 8004f28: 2304 movs r3, #4 8004f2a: e02c b.n 8004f86 } else { return DP83848_STATUS_10MBITS_HALFDUPLEX; 8004f2c: 2305 movs r3, #5 8004f2e: e02a b.n 8004f86 } } else /* Auto Nego enabled */ { if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_PHYSCSR, &readval) < 0) 8004f30: 687b ldr r3, [r7, #4] 8004f32: 695b ldr r3, [r3, #20] 8004f34: 687a ldr r2, [r7, #4] 8004f36: 6810 ldr r0, [r2, #0] 8004f38: f107 020c add.w r2, r7, #12 8004f3c: 2110 movs r1, #16 8004f3e: 4798 blx r3 8004f40: 4603 mov r3, r0 8004f42: 2b00 cmp r3, #0 8004f44: da02 bge.n 8004f4c { return DP83848_STATUS_READ_ERROR; 8004f46: f06f 0304 mvn.w r3, #4 8004f4a: e01c b.n 8004f86 } /* Check if auto nego not done */ if((readval & DP83848_PHYSCSR_AUTONEGO_DONE) == 0) 8004f4c: 68fb ldr r3, [r7, #12] 8004f4e: f003 0310 and.w r3, r3, #16 8004f52: 2b00 cmp r3, #0 8004f54: d101 bne.n 8004f5a { return DP83848_STATUS_AUTONEGO_NOTDONE; 8004f56: 2306 movs r3, #6 8004f58: e015 b.n 8004f86 } if((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_100BTX_FD) 8004f5a: 68fb ldr r3, [r7, #12] 8004f5c: f003 0306 and.w r3, r3, #6 8004f60: 2b04 cmp r3, #4 8004f62: d101 bne.n 8004f68 { return DP83848_STATUS_100MBITS_FULLDUPLEX; 8004f64: 2302 movs r3, #2 8004f66: e00e b.n 8004f86 } else if ((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_100BTX_HD) 8004f68: 68fb ldr r3, [r7, #12] 8004f6a: f003 0306 and.w r3, r3, #6 8004f6e: 2b00 cmp r3, #0 8004f70: d101 bne.n 8004f76 { return DP83848_STATUS_100MBITS_HALFDUPLEX; 8004f72: 2303 movs r3, #3 8004f74: e007 b.n 8004f86 } else if ((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_10BT_FD) 8004f76: 68fb ldr r3, [r7, #12] 8004f78: f003 0306 and.w r3, r3, #6 8004f7c: 2b06 cmp r3, #6 8004f7e: d101 bne.n 8004f84 { return DP83848_STATUS_10MBITS_FULLDUPLEX; 8004f80: 2304 movs r3, #4 8004f82: e000 b.n 8004f86 } else { return DP83848_STATUS_10MBITS_HALFDUPLEX; 8004f84: 2305 movs r3, #5 } } } 8004f86: 4618 mov r0, r3 8004f88: 3710 adds r7, #16 8004f8a: 46bd mov sp, r7 8004f8c: bd80 pop {r7, pc} ... 08004f90 : * 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) { 8004f90: b580 push {r7, lr} 8004f92: b082 sub sp, #8 8004f94: 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); 8004f96: 2003 movs r0, #3 8004f98: f000 f947 bl 800522a /* 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); 8004f9c: f005 fb8c bl 800a6b8 8004fa0: 4602 mov r2, r0 8004fa2: 4b15 ldr r3, [pc, #84] @ (8004ff8 ) 8004fa4: 699b ldr r3, [r3, #24] 8004fa6: 0a1b lsrs r3, r3, #8 8004fa8: f003 030f and.w r3, r3, #15 8004fac: 4913 ldr r1, [pc, #76] @ (8004ffc ) 8004fae: 5ccb ldrb r3, [r1, r3] 8004fb0: f003 031f and.w r3, r3, #31 8004fb4: fa22 f303 lsr.w r3, r2, r3 8004fb8: 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)); 8004fba: 4b0f ldr r3, [pc, #60] @ (8004ff8 ) 8004fbc: 699b ldr r3, [r3, #24] 8004fbe: f003 030f and.w r3, r3, #15 8004fc2: 4a0e ldr r2, [pc, #56] @ (8004ffc ) 8004fc4: 5cd3 ldrb r3, [r2, r3] 8004fc6: f003 031f and.w r3, r3, #31 8004fca: 687a ldr r2, [r7, #4] 8004fcc: fa22 f303 lsr.w r3, r2, r3 8004fd0: 4a0b ldr r2, [pc, #44] @ (8005000 ) 8004fd2: 6013 str r3, [r2, #0] #endif #if defined(DUAL_CORE) && defined(CORE_CM4) SystemCoreClock = SystemD2Clock; #else SystemCoreClock = common_system_clock; 8004fd4: 4a0b ldr r2, [pc, #44] @ (8005004 ) 8004fd6: 687b ldr r3, [r7, #4] 8004fd8: 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) 8004fda: 200f movs r0, #15 8004fdc: f7fe fc7c bl 80038d8 8004fe0: 4603 mov r3, r0 8004fe2: 2b00 cmp r3, #0 8004fe4: d001 beq.n 8004fea { return HAL_ERROR; 8004fe6: 2301 movs r3, #1 8004fe8: e002 b.n 8004ff0 } /* Init the low level hardware */ HAL_MspInit(); 8004fea: f7fe f987 bl 80032fc /* Return function status */ return HAL_OK; 8004fee: 2300 movs r3, #0 } 8004ff0: 4618 mov r0, r3 8004ff2: 3708 adds r7, #8 8004ff4: 46bd mov sp, r7 8004ff6: bd80 pop {r7, pc} 8004ff8: 58024400 .word 0x58024400 8004ffc: 08030a24 .word 0x08030a24 8005000: 24000010 .word 0x24000010 8005004: 2400000c .word 0x2400000c 08005008 : * @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) { 8005008: b480 push {r7} 800500a: af00 add r7, sp, #0 uwTick += (uint32_t)uwTickFreq; 800500c: 4b06 ldr r3, [pc, #24] @ (8005028 ) 800500e: 781b ldrb r3, [r3, #0] 8005010: 461a mov r2, r3 8005012: 4b06 ldr r3, [pc, #24] @ (800502c ) 8005014: 681b ldr r3, [r3, #0] 8005016: 4413 add r3, r2 8005018: 4a04 ldr r2, [pc, #16] @ (800502c ) 800501a: 6013 str r3, [r2, #0] } 800501c: bf00 nop 800501e: 46bd mov sp, r7 8005020: f85d 7b04 ldr.w r7, [sp], #4 8005024: 4770 bx lr 8005026: bf00 nop 8005028: 24000030 .word 0x24000030 800502c: 24002170 .word 0x24002170 08005030 : * @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) { 8005030: b480 push {r7} 8005032: af00 add r7, sp, #0 return uwTick; 8005034: 4b03 ldr r3, [pc, #12] @ (8005044 ) 8005036: 681b ldr r3, [r3, #0] } 8005038: 4618 mov r0, r3 800503a: 46bd mov sp, r7 800503c: f85d 7b04 ldr.w r7, [sp], #4 8005040: 4770 bx lr 8005042: bf00 nop 8005044: 24002170 .word 0x24002170 08005048 : * implementations in user file. * @param Delay specifies the delay time length, in milliseconds. * @retval None */ __weak void HAL_Delay(uint32_t Delay) { 8005048: b580 push {r7, lr} 800504a: b084 sub sp, #16 800504c: af00 add r7, sp, #0 800504e: 6078 str r0, [r7, #4] uint32_t tickstart = HAL_GetTick(); 8005050: f7ff ffee bl 8005030 8005054: 60b8 str r0, [r7, #8] uint32_t wait = Delay; 8005056: 687b ldr r3, [r7, #4] 8005058: 60fb str r3, [r7, #12] /* Add a freq to guarantee minimum wait */ if (wait < HAL_MAX_DELAY) 800505a: 68fb ldr r3, [r7, #12] 800505c: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8005060: d005 beq.n 800506e { wait += (uint32_t)(uwTickFreq); 8005062: 4b0a ldr r3, [pc, #40] @ (800508c ) 8005064: 781b ldrb r3, [r3, #0] 8005066: 461a mov r2, r3 8005068: 68fb ldr r3, [r7, #12] 800506a: 4413 add r3, r2 800506c: 60fb str r3, [r7, #12] } while ((HAL_GetTick() - tickstart) < wait) 800506e: bf00 nop 8005070: f7ff ffde bl 8005030 8005074: 4602 mov r2, r0 8005076: 68bb ldr r3, [r7, #8] 8005078: 1ad3 subs r3, r2, r3 800507a: 68fa ldr r2, [r7, #12] 800507c: 429a cmp r2, r3 800507e: d8f7 bhi.n 8005070 { } } 8005080: bf00 nop 8005082: bf00 nop 8005084: 3710 adds r7, #16 8005086: 46bd mov sp, r7 8005088: bd80 pop {r7, pc} 800508a: bf00 nop 800508c: 24000030 .word 0x24000030 08005090 : /** * @brief Returns the device revision identifier. * @retval Device revision identifier */ uint32_t HAL_GetREVID(void) { 8005090: b480 push {r7} 8005092: af00 add r7, sp, #0 return((DBGMCU->IDCODE) >> 16); 8005094: 4b03 ldr r3, [pc, #12] @ (80050a4 ) 8005096: 681b ldr r3, [r3, #0] 8005098: 0c1b lsrs r3, r3, #16 } 800509a: 4618 mov r0, r3 800509c: 46bd mov sp, r7 800509e: f85d 7b04 ldr.w r7, [sp], #4 80050a2: 4770 bx lr 80050a4: 5c001000 .word 0x5c001000 080050a8 : * @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) { 80050a8: b480 push {r7} 80050aa: b083 sub sp, #12 80050ac: af00 add r7, sp, #0 80050ae: 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)); 80050b0: 4b06 ldr r3, [pc, #24] @ (80050cc ) 80050b2: 685b ldr r3, [r3, #4] 80050b4: f423 0260 bic.w r2, r3, #14680064 @ 0xe00000 80050b8: 4904 ldr r1, [pc, #16] @ (80050cc ) 80050ba: 687b ldr r3, [r7, #4] 80050bc: 4313 orrs r3, r2 80050be: 604b str r3, [r1, #4] } 80050c0: bf00 nop 80050c2: 370c adds r7, #12 80050c4: 46bd mov sp, r7 80050c6: f85d 7b04 ldr.w r7, [sp], #4 80050ca: 4770 bx lr 80050cc: 58000400 .word 0x58000400 080050d0 <__NVIC_SetPriorityGrouping>: { 80050d0: b480 push {r7} 80050d2: b085 sub sp, #20 80050d4: af00 add r7, sp, #0 80050d6: 6078 str r0, [r7, #4] uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ 80050d8: 687b ldr r3, [r7, #4] 80050da: f003 0307 and.w r3, r3, #7 80050de: 60fb str r3, [r7, #12] reg_value = SCB->AIRCR; /* read old register configuration */ 80050e0: 4b0b ldr r3, [pc, #44] @ (8005110 <__NVIC_SetPriorityGrouping+0x40>) 80050e2: 68db ldr r3, [r3, #12] 80050e4: 60bb str r3, [r7, #8] reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ 80050e6: 68ba ldr r2, [r7, #8] 80050e8: f64f 03ff movw r3, #63743 @ 0xf8ff 80050ec: 4013 ands r3, r2 80050ee: 60bb str r3, [r7, #8] (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ 80050f0: 68fb ldr r3, [r7, #12] 80050f2: 021a lsls r2, r3, #8 ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | 80050f4: 68bb ldr r3, [r7, #8] 80050f6: 431a orrs r2, r3 reg_value = (reg_value | 80050f8: 4b06 ldr r3, [pc, #24] @ (8005114 <__NVIC_SetPriorityGrouping+0x44>) 80050fa: 4313 orrs r3, r2 80050fc: 60bb str r3, [r7, #8] SCB->AIRCR = reg_value; 80050fe: 4a04 ldr r2, [pc, #16] @ (8005110 <__NVIC_SetPriorityGrouping+0x40>) 8005100: 68bb ldr r3, [r7, #8] 8005102: 60d3 str r3, [r2, #12] } 8005104: bf00 nop 8005106: 3714 adds r7, #20 8005108: 46bd mov sp, r7 800510a: f85d 7b04 ldr.w r7, [sp], #4 800510e: 4770 bx lr 8005110: e000ed00 .word 0xe000ed00 8005114: 05fa0000 .word 0x05fa0000 08005118 <__NVIC_GetPriorityGrouping>: { 8005118: b480 push {r7} 800511a: af00 add r7, sp, #0 return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); 800511c: 4b04 ldr r3, [pc, #16] @ (8005130 <__NVIC_GetPriorityGrouping+0x18>) 800511e: 68db ldr r3, [r3, #12] 8005120: 0a1b lsrs r3, r3, #8 8005122: f003 0307 and.w r3, r3, #7 } 8005126: 4618 mov r0, r3 8005128: 46bd mov sp, r7 800512a: f85d 7b04 ldr.w r7, [sp], #4 800512e: 4770 bx lr 8005130: e000ed00 .word 0xe000ed00 08005134 <__NVIC_EnableIRQ>: { 8005134: b480 push {r7} 8005136: b083 sub sp, #12 8005138: af00 add r7, sp, #0 800513a: 4603 mov r3, r0 800513c: 80fb strh r3, [r7, #6] if ((int32_t)(IRQn) >= 0) 800513e: f9b7 3006 ldrsh.w r3, [r7, #6] 8005142: 2b00 cmp r3, #0 8005144: db0b blt.n 800515e <__NVIC_EnableIRQ+0x2a> NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); 8005146: 88fb ldrh r3, [r7, #6] 8005148: f003 021f and.w r2, r3, #31 800514c: 4907 ldr r1, [pc, #28] @ (800516c <__NVIC_EnableIRQ+0x38>) 800514e: f9b7 3006 ldrsh.w r3, [r7, #6] 8005152: 095b lsrs r3, r3, #5 8005154: 2001 movs r0, #1 8005156: fa00 f202 lsl.w r2, r0, r2 800515a: f841 2023 str.w r2, [r1, r3, lsl #2] } 800515e: bf00 nop 8005160: 370c adds r7, #12 8005162: 46bd mov sp, r7 8005164: f85d 7b04 ldr.w r7, [sp], #4 8005168: 4770 bx lr 800516a: bf00 nop 800516c: e000e100 .word 0xe000e100 08005170 <__NVIC_SetPriority>: { 8005170: b480 push {r7} 8005172: b083 sub sp, #12 8005174: af00 add r7, sp, #0 8005176: 4603 mov r3, r0 8005178: 6039 str r1, [r7, #0] 800517a: 80fb strh r3, [r7, #6] if ((int32_t)(IRQn) >= 0) 800517c: f9b7 3006 ldrsh.w r3, [r7, #6] 8005180: 2b00 cmp r3, #0 8005182: db0a blt.n 800519a <__NVIC_SetPriority+0x2a> NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 8005184: 683b ldr r3, [r7, #0] 8005186: b2da uxtb r2, r3 8005188: 490c ldr r1, [pc, #48] @ (80051bc <__NVIC_SetPriority+0x4c>) 800518a: f9b7 3006 ldrsh.w r3, [r7, #6] 800518e: 0112 lsls r2, r2, #4 8005190: b2d2 uxtb r2, r2 8005192: 440b add r3, r1 8005194: f883 2300 strb.w r2, [r3, #768] @ 0x300 } 8005198: e00a b.n 80051b0 <__NVIC_SetPriority+0x40> SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 800519a: 683b ldr r3, [r7, #0] 800519c: b2da uxtb r2, r3 800519e: 4908 ldr r1, [pc, #32] @ (80051c0 <__NVIC_SetPriority+0x50>) 80051a0: 88fb ldrh r3, [r7, #6] 80051a2: f003 030f and.w r3, r3, #15 80051a6: 3b04 subs r3, #4 80051a8: 0112 lsls r2, r2, #4 80051aa: b2d2 uxtb r2, r2 80051ac: 440b add r3, r1 80051ae: 761a strb r2, [r3, #24] } 80051b0: bf00 nop 80051b2: 370c adds r7, #12 80051b4: 46bd mov sp, r7 80051b6: f85d 7b04 ldr.w r7, [sp], #4 80051ba: 4770 bx lr 80051bc: e000e100 .word 0xe000e100 80051c0: e000ed00 .word 0xe000ed00 080051c4 : { 80051c4: b480 push {r7} 80051c6: b089 sub sp, #36 @ 0x24 80051c8: af00 add r7, sp, #0 80051ca: 60f8 str r0, [r7, #12] 80051cc: 60b9 str r1, [r7, #8] 80051ce: 607a str r2, [r7, #4] uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ 80051d0: 68fb ldr r3, [r7, #12] 80051d2: f003 0307 and.w r3, r3, #7 80051d6: 61fb str r3, [r7, #28] PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); 80051d8: 69fb ldr r3, [r7, #28] 80051da: f1c3 0307 rsb r3, r3, #7 80051de: 2b04 cmp r3, #4 80051e0: bf28 it cs 80051e2: 2304 movcs r3, #4 80051e4: 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)); 80051e6: 69fb ldr r3, [r7, #28] 80051e8: 3304 adds r3, #4 80051ea: 2b06 cmp r3, #6 80051ec: d902 bls.n 80051f4 80051ee: 69fb ldr r3, [r7, #28] 80051f0: 3b03 subs r3, #3 80051f2: e000 b.n 80051f6 80051f4: 2300 movs r3, #0 80051f6: 617b str r3, [r7, #20] ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | 80051f8: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 80051fc: 69bb ldr r3, [r7, #24] 80051fe: fa02 f303 lsl.w r3, r2, r3 8005202: 43da mvns r2, r3 8005204: 68bb ldr r3, [r7, #8] 8005206: 401a ands r2, r3 8005208: 697b ldr r3, [r7, #20] 800520a: 409a lsls r2, r3 ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) 800520c: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8005210: 697b ldr r3, [r7, #20] 8005212: fa01 f303 lsl.w r3, r1, r3 8005216: 43d9 mvns r1, r3 8005218: 687b ldr r3, [r7, #4] 800521a: 400b ands r3, r1 ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | 800521c: 4313 orrs r3, r2 } 800521e: 4618 mov r0, r3 8005220: 3724 adds r7, #36 @ 0x24 8005222: 46bd mov sp, r7 8005224: f85d 7b04 ldr.w r7, [sp], #4 8005228: 4770 bx lr 0800522a : * @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) { 800522a: b580 push {r7, lr} 800522c: b082 sub sp, #8 800522e: af00 add r7, sp, #0 8005230: 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); 8005232: 6878 ldr r0, [r7, #4] 8005234: f7ff ff4c bl 80050d0 <__NVIC_SetPriorityGrouping> } 8005238: bf00 nop 800523a: 3708 adds r7, #8 800523c: 46bd mov sp, r7 800523e: bd80 pop {r7, pc} 08005240 : * 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) { 8005240: b580 push {r7, lr} 8005242: b086 sub sp, #24 8005244: af00 add r7, sp, #0 8005246: 4603 mov r3, r0 8005248: 60b9 str r1, [r7, #8] 800524a: 607a str r2, [r7, #4] 800524c: 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(); 800524e: f7ff ff63 bl 8005118 <__NVIC_GetPriorityGrouping> 8005252: 6178 str r0, [r7, #20] NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority)); 8005254: 687a ldr r2, [r7, #4] 8005256: 68b9 ldr r1, [r7, #8] 8005258: 6978 ldr r0, [r7, #20] 800525a: f7ff ffb3 bl 80051c4 800525e: 4602 mov r2, r0 8005260: f9b7 300e ldrsh.w r3, [r7, #14] 8005264: 4611 mov r1, r2 8005266: 4618 mov r0, r3 8005268: f7ff ff82 bl 8005170 <__NVIC_SetPriority> } 800526c: bf00 nop 800526e: 3718 adds r7, #24 8005270: 46bd mov sp, r7 8005272: bd80 pop {r7, pc} 08005274 : * 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) { 8005274: b580 push {r7, lr} 8005276: b082 sub sp, #8 8005278: af00 add r7, sp, #0 800527a: 4603 mov r3, r0 800527c: 80fb strh r3, [r7, #6] /* Check the parameters */ assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); /* Enable interrupt */ NVIC_EnableIRQ(IRQn); 800527e: f9b7 3006 ldrsh.w r3, [r7, #6] 8005282: 4618 mov r0, r3 8005284: f7ff ff56 bl 8005134 <__NVIC_EnableIRQ> } 8005288: bf00 nop 800528a: 3708 adds r7, #8 800528c: 46bd mov sp, r7 800528e: bd80 pop {r7, pc} 08005290 : /** * @brief Disables the MPU * @retval None */ void HAL_MPU_Disable(void) { 8005290: b480 push {r7} 8005292: 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"); 8005294: f3bf 8f5f dmb sy } 8005298: bf00 nop /* Make sure outstanding transfers are done */ __DMB(); /* Disable fault exceptions */ SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; 800529a: 4b07 ldr r3, [pc, #28] @ (80052b8 ) 800529c: 6a5b ldr r3, [r3, #36] @ 0x24 800529e: 4a06 ldr r2, [pc, #24] @ (80052b8 ) 80052a0: f423 3380 bic.w r3, r3, #65536 @ 0x10000 80052a4: 6253 str r3, [r2, #36] @ 0x24 /* Disable the MPU and clear the control register*/ MPU->CTRL = 0; 80052a6: 4b05 ldr r3, [pc, #20] @ (80052bc ) 80052a8: 2200 movs r2, #0 80052aa: 605a str r2, [r3, #4] } 80052ac: bf00 nop 80052ae: 46bd mov sp, r7 80052b0: f85d 7b04 ldr.w r7, [sp], #4 80052b4: 4770 bx lr 80052b6: bf00 nop 80052b8: e000ed00 .word 0xe000ed00 80052bc: e000ed90 .word 0xe000ed90 080052c0 : * @arg MPU_PRIVILEGED_DEFAULT * @arg MPU_HFNMI_PRIVDEF * @retval None */ void HAL_MPU_Enable(uint32_t MPU_Control) { 80052c0: b480 push {r7} 80052c2: b083 sub sp, #12 80052c4: af00 add r7, sp, #0 80052c6: 6078 str r0, [r7, #4] /* Enable the MPU */ MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk; 80052c8: 4a0b ldr r2, [pc, #44] @ (80052f8 ) 80052ca: 687b ldr r3, [r7, #4] 80052cc: f043 0301 orr.w r3, r3, #1 80052d0: 6053 str r3, [r2, #4] /* Enable fault exceptions */ SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; 80052d2: 4b0a ldr r3, [pc, #40] @ (80052fc ) 80052d4: 6a5b ldr r3, [r3, #36] @ 0x24 80052d6: 4a09 ldr r2, [pc, #36] @ (80052fc ) 80052d8: f443 3380 orr.w r3, r3, #65536 @ 0x10000 80052dc: 6253 str r3, [r2, #36] @ 0x24 __ASM volatile ("dsb 0xF":::"memory"); 80052de: f3bf 8f4f dsb sy } 80052e2: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 80052e4: f3bf 8f6f isb sy } 80052e8: bf00 nop /* Ensure MPU setting take effects */ __DSB(); __ISB(); } 80052ea: bf00 nop 80052ec: 370c adds r7, #12 80052ee: 46bd mov sp, r7 80052f0: f85d 7b04 ldr.w r7, [sp], #4 80052f4: 4770 bx lr 80052f6: bf00 nop 80052f8: e000ed90 .word 0xe000ed90 80052fc: e000ed00 .word 0xe000ed00 08005300 : * @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) { 8005300: b480 push {r7} 8005302: b083 sub sp, #12 8005304: af00 add r7, sp, #0 8005306: 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; 8005308: 687b ldr r3, [r7, #4] 800530a: 785a ldrb r2, [r3, #1] 800530c: 4b1b ldr r3, [pc, #108] @ (800537c ) 800530e: 609a str r2, [r3, #8] /* Disable the Region */ CLEAR_BIT(MPU->RASR, MPU_RASR_ENABLE_Msk); 8005310: 4b1a ldr r3, [pc, #104] @ (800537c ) 8005312: 691b ldr r3, [r3, #16] 8005314: 4a19 ldr r2, [pc, #100] @ (800537c ) 8005316: f023 0301 bic.w r3, r3, #1 800531a: 6113 str r3, [r2, #16] /* Apply configuration */ MPU->RBAR = MPU_Init->BaseAddress; 800531c: 4a17 ldr r2, [pc, #92] @ (800537c ) 800531e: 687b ldr r3, [r7, #4] 8005320: 685b ldr r3, [r3, #4] 8005322: 60d3 str r3, [r2, #12] MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8005324: 687b ldr r3, [r7, #4] 8005326: 7b1b ldrb r3, [r3, #12] 8005328: 071a lsls r2, r3, #28 ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) | 800532a: 687b ldr r3, [r7, #4] 800532c: 7adb ldrb r3, [r3, #11] 800532e: 061b lsls r3, r3, #24 MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8005330: 431a orrs r2, r3 ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) | 8005332: 687b ldr r3, [r7, #4] 8005334: 7a9b ldrb r3, [r3, #10] 8005336: 04db lsls r3, r3, #19 ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) | 8005338: 431a orrs r2, r3 ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) | 800533a: 687b ldr r3, [r7, #4] 800533c: 7b5b ldrb r3, [r3, #13] 800533e: 049b lsls r3, r3, #18 ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) | 8005340: 431a orrs r2, r3 ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) | 8005342: 687b ldr r3, [r7, #4] 8005344: 7b9b ldrb r3, [r3, #14] 8005346: 045b lsls r3, r3, #17 ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) | 8005348: 431a orrs r2, r3 ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) | 800534a: 687b ldr r3, [r7, #4] 800534c: 7bdb ldrb r3, [r3, #15] 800534e: 041b lsls r3, r3, #16 ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) | 8005350: 431a orrs r2, r3 ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) | 8005352: 687b ldr r3, [r7, #4] 8005354: 7a5b ldrb r3, [r3, #9] 8005356: 021b lsls r3, r3, #8 ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) | 8005358: 431a orrs r2, r3 ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) | 800535a: 687b ldr r3, [r7, #4] 800535c: 7a1b ldrb r3, [r3, #8] 800535e: 005b lsls r3, r3, #1 ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) | 8005360: 4313 orrs r3, r2 ((uint32_t)MPU_Init->Enable << MPU_RASR_ENABLE_Pos); 8005362: 687a ldr r2, [r7, #4] 8005364: 7812 ldrb r2, [r2, #0] 8005366: 4611 mov r1, r2 MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8005368: 4a04 ldr r2, [pc, #16] @ (800537c ) ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) | 800536a: 430b orrs r3, r1 MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 800536c: 6113 str r3, [r2, #16] } 800536e: bf00 nop 8005370: 370c adds r7, #12 8005372: 46bd mov sp, r7 8005374: f85d 7b04 ldr.w r7, [sp], #4 8005378: 4770 bx lr 800537a: bf00 nop 800537c: e000ed90 .word 0xe000ed90 08005380 : * 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) { 8005380: b580 push {r7, lr} 8005382: b082 sub sp, #8 8005384: af00 add r7, sp, #0 8005386: 6078 str r0, [r7, #4] /* Check the CRC handle allocation */ if (hcrc == NULL) 8005388: 687b ldr r3, [r7, #4] 800538a: 2b00 cmp r3, #0 800538c: d101 bne.n 8005392 { return HAL_ERROR; 800538e: 2301 movs r3, #1 8005390: e054 b.n 800543c } /* Check the parameters */ assert_param(IS_CRC_ALL_INSTANCE(hcrc->Instance)); if (hcrc->State == HAL_CRC_STATE_RESET) 8005392: 687b ldr r3, [r7, #4] 8005394: 7f5b ldrb r3, [r3, #29] 8005396: b2db uxtb r3, r3 8005398: 2b00 cmp r3, #0 800539a: d105 bne.n 80053a8 { /* Allocate lock resource and initialize it */ hcrc->Lock = HAL_UNLOCKED; 800539c: 687b ldr r3, [r7, #4] 800539e: 2200 movs r2, #0 80053a0: 771a strb r2, [r3, #28] /* Init the low level hardware */ HAL_CRC_MspInit(hcrc); 80053a2: 6878 ldr r0, [r7, #4] 80053a4: f7fd ffd0 bl 8003348 } hcrc->State = HAL_CRC_STATE_BUSY; 80053a8: 687b ldr r3, [r7, #4] 80053aa: 2202 movs r2, #2 80053ac: 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) 80053ae: 687b ldr r3, [r7, #4] 80053b0: 791b ldrb r3, [r3, #4] 80053b2: 2b00 cmp r3, #0 80053b4: d10c bne.n 80053d0 { /* initialize peripheral with default generating polynomial */ WRITE_REG(hcrc->Instance->POL, DEFAULT_CRC32_POLY); 80053b6: 687b ldr r3, [r7, #4] 80053b8: 681b ldr r3, [r3, #0] 80053ba: 4a22 ldr r2, [pc, #136] @ (8005444 ) 80053bc: 615a str r2, [r3, #20] MODIFY_REG(hcrc->Instance->CR, CRC_CR_POLYSIZE, CRC_POLYLENGTH_32B); 80053be: 687b ldr r3, [r7, #4] 80053c0: 681b ldr r3, [r3, #0] 80053c2: 689a ldr r2, [r3, #8] 80053c4: 687b ldr r3, [r7, #4] 80053c6: 681b ldr r3, [r3, #0] 80053c8: f022 0218 bic.w r2, r2, #24 80053cc: 609a str r2, [r3, #8] 80053ce: e00c b.n 80053ea } else { /* initialize CRC peripheral with generating polynomial defined by user */ if (HAL_CRCEx_Polynomial_Set(hcrc, hcrc->Init.GeneratingPolynomial, hcrc->Init.CRCLength) != HAL_OK) 80053d0: 687b ldr r3, [r7, #4] 80053d2: 6899 ldr r1, [r3, #8] 80053d4: 687b ldr r3, [r7, #4] 80053d6: 68db ldr r3, [r3, #12] 80053d8: 461a mov r2, r3 80053da: 6878 ldr r0, [r7, #4] 80053dc: f000 f948 bl 8005670 80053e0: 4603 mov r3, r0 80053e2: 2b00 cmp r3, #0 80053e4: d001 beq.n 80053ea { return HAL_ERROR; 80053e6: 2301 movs r3, #1 80053e8: e028 b.n 800543c } /* 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) 80053ea: 687b ldr r3, [r7, #4] 80053ec: 795b ldrb r3, [r3, #5] 80053ee: 2b00 cmp r3, #0 80053f0: d105 bne.n 80053fe { WRITE_REG(hcrc->Instance->INIT, DEFAULT_CRC_INITVALUE); 80053f2: 687b ldr r3, [r7, #4] 80053f4: 681b ldr r3, [r3, #0] 80053f6: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 80053fa: 611a str r2, [r3, #16] 80053fc: e004 b.n 8005408 } else { WRITE_REG(hcrc->Instance->INIT, hcrc->Init.InitValue); 80053fe: 687b ldr r3, [r7, #4] 8005400: 681b ldr r3, [r3, #0] 8005402: 687a ldr r2, [r7, #4] 8005404: 6912 ldr r2, [r2, #16] 8005406: 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); 8005408: 687b ldr r3, [r7, #4] 800540a: 681b ldr r3, [r3, #0] 800540c: 689b ldr r3, [r3, #8] 800540e: f023 0160 bic.w r1, r3, #96 @ 0x60 8005412: 687b ldr r3, [r7, #4] 8005414: 695a ldr r2, [r3, #20] 8005416: 687b ldr r3, [r7, #4] 8005418: 681b ldr r3, [r3, #0] 800541a: 430a orrs r2, r1 800541c: 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); 800541e: 687b ldr r3, [r7, #4] 8005420: 681b ldr r3, [r3, #0] 8005422: 689b ldr r3, [r3, #8] 8005424: f023 0180 bic.w r1, r3, #128 @ 0x80 8005428: 687b ldr r3, [r7, #4] 800542a: 699a ldr r2, [r3, #24] 800542c: 687b ldr r3, [r7, #4] 800542e: 681b ldr r3, [r3, #0] 8005430: 430a orrs r2, r1 8005432: 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; 8005434: 687b ldr r3, [r7, #4] 8005436: 2201 movs r2, #1 8005438: 775a strb r2, [r3, #29] /* Return function status */ return HAL_OK; 800543a: 2300 movs r3, #0 } 800543c: 4618 mov r0, r3 800543e: 3708 adds r7, #8 8005440: 46bd mov sp, r7 8005442: bd80 pop {r7, pc} 8005444: 04c11db7 .word 0x04c11db7 08005448 : * 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) { 8005448: b580 push {r7, lr} 800544a: b086 sub sp, #24 800544c: af00 add r7, sp, #0 800544e: 60f8 str r0, [r7, #12] 8005450: 60b9 str r1, [r7, #8] 8005452: 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) */ 8005454: 2300 movs r3, #0 8005456: 613b str r3, [r7, #16] /* Change CRC peripheral state */ hcrc->State = HAL_CRC_STATE_BUSY; 8005458: 68fb ldr r3, [r7, #12] 800545a: 2202 movs r2, #2 800545c: 775a strb r2, [r3, #29] /* Reset CRC Calculation Unit (hcrc->Instance->INIT is * written in hcrc->Instance->DR) */ __HAL_CRC_DR_RESET(hcrc); 800545e: 68fb ldr r3, [r7, #12] 8005460: 681b ldr r3, [r3, #0] 8005462: 689a ldr r2, [r3, #8] 8005464: 68fb ldr r3, [r7, #12] 8005466: 681b ldr r3, [r3, #0] 8005468: f042 0201 orr.w r2, r2, #1 800546c: 609a str r2, [r3, #8] switch (hcrc->InputDataFormat) 800546e: 68fb ldr r3, [r7, #12] 8005470: 6a1b ldr r3, [r3, #32] 8005472: 2b03 cmp r3, #3 8005474: d006 beq.n 8005484 8005476: 2b03 cmp r3, #3 8005478: d829 bhi.n 80054ce 800547a: 2b01 cmp r3, #1 800547c: d019 beq.n 80054b2 800547e: 2b02 cmp r3, #2 8005480: d01e beq.n 80054c0 /* Specific 16-bit input data handling */ temp = CRC_Handle_16(hcrc, (uint16_t *)(void *)pBuffer, BufferLength); /* Derogation MisraC2012 R.11.5 */ break; default: break; 8005482: e024 b.n 80054ce for (index = 0U; index < BufferLength; index++) 8005484: 2300 movs r3, #0 8005486: 617b str r3, [r7, #20] 8005488: e00a b.n 80054a0 hcrc->Instance->DR = pBuffer[index]; 800548a: 697b ldr r3, [r7, #20] 800548c: 009b lsls r3, r3, #2 800548e: 68ba ldr r2, [r7, #8] 8005490: 441a add r2, r3 8005492: 68fb ldr r3, [r7, #12] 8005494: 681b ldr r3, [r3, #0] 8005496: 6812 ldr r2, [r2, #0] 8005498: 601a str r2, [r3, #0] for (index = 0U; index < BufferLength; index++) 800549a: 697b ldr r3, [r7, #20] 800549c: 3301 adds r3, #1 800549e: 617b str r3, [r7, #20] 80054a0: 697a ldr r2, [r7, #20] 80054a2: 687b ldr r3, [r7, #4] 80054a4: 429a cmp r2, r3 80054a6: d3f0 bcc.n 800548a temp = hcrc->Instance->DR; 80054a8: 68fb ldr r3, [r7, #12] 80054aa: 681b ldr r3, [r3, #0] 80054ac: 681b ldr r3, [r3, #0] 80054ae: 613b str r3, [r7, #16] break; 80054b0: e00e b.n 80054d0 temp = CRC_Handle_8(hcrc, (uint8_t *)pBuffer, BufferLength); 80054b2: 687a ldr r2, [r7, #4] 80054b4: 68b9 ldr r1, [r7, #8] 80054b6: 68f8 ldr r0, [r7, #12] 80054b8: f000 f812 bl 80054e0 80054bc: 6138 str r0, [r7, #16] break; 80054be: e007 b.n 80054d0 temp = CRC_Handle_16(hcrc, (uint16_t *)(void *)pBuffer, BufferLength); /* Derogation MisraC2012 R.11.5 */ 80054c0: 687a ldr r2, [r7, #4] 80054c2: 68b9 ldr r1, [r7, #8] 80054c4: 68f8 ldr r0, [r7, #12] 80054c6: f000 f899 bl 80055fc 80054ca: 6138 str r0, [r7, #16] break; 80054cc: e000 b.n 80054d0 break; 80054ce: bf00 nop } /* Change CRC peripheral state */ hcrc->State = HAL_CRC_STATE_READY; 80054d0: 68fb ldr r3, [r7, #12] 80054d2: 2201 movs r2, #1 80054d4: 775a strb r2, [r3, #29] /* Return the CRC computed value */ return temp; 80054d6: 693b ldr r3, [r7, #16] } 80054d8: 4618 mov r0, r3 80054da: 3718 adds r7, #24 80054dc: 46bd mov sp, r7 80054de: bd80 pop {r7, pc} 080054e0 : * @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) { 80054e0: b480 push {r7} 80054e2: b089 sub sp, #36 @ 0x24 80054e4: af00 add r7, sp, #0 80054e6: 60f8 str r0, [r7, #12] 80054e8: 60b9 str r1, [r7, #8] 80054ea: 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++) 80054ec: 2300 movs r3, #0 80054ee: 61fb str r3, [r7, #28] 80054f0: e023 b.n 800553a { hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \ 80054f2: 69fb ldr r3, [r7, #28] 80054f4: 009b lsls r3, r3, #2 80054f6: 68ba ldr r2, [r7, #8] 80054f8: 4413 add r3, r2 80054fa: 781b ldrb r3, [r3, #0] 80054fc: 061a lsls r2, r3, #24 ((uint32_t)pBuffer[(4U * i) + 1U] << 16U) | \ 80054fe: 69fb ldr r3, [r7, #28] 8005500: 009b lsls r3, r3, #2 8005502: 3301 adds r3, #1 8005504: 68b9 ldr r1, [r7, #8] 8005506: 440b add r3, r1 8005508: 781b ldrb r3, [r3, #0] 800550a: 041b lsls r3, r3, #16 hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \ 800550c: 431a orrs r2, r3 ((uint32_t)pBuffer[(4U * i) + 2U] << 8U) | \ 800550e: 69fb ldr r3, [r7, #28] 8005510: 009b lsls r3, r3, #2 8005512: 3302 adds r3, #2 8005514: 68b9 ldr r1, [r7, #8] 8005516: 440b add r3, r1 8005518: 781b ldrb r3, [r3, #0] 800551a: 021b lsls r3, r3, #8 ((uint32_t)pBuffer[(4U * i) + 1U] << 16U) | \ 800551c: 431a orrs r2, r3 (uint32_t)pBuffer[(4U * i) + 3U]; 800551e: 69fb ldr r3, [r7, #28] 8005520: 009b lsls r3, r3, #2 8005522: 3303 adds r3, #3 8005524: 68b9 ldr r1, [r7, #8] 8005526: 440b add r3, r1 8005528: 781b ldrb r3, [r3, #0] 800552a: 4619 mov r1, r3 hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \ 800552c: 68fb ldr r3, [r7, #12] 800552e: 681b ldr r3, [r3, #0] ((uint32_t)pBuffer[(4U * i) + 2U] << 8U) | \ 8005530: 430a orrs r2, r1 hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \ 8005532: 601a str r2, [r3, #0] for (i = 0U; i < (BufferLength / 4U); i++) 8005534: 69fb ldr r3, [r7, #28] 8005536: 3301 adds r3, #1 8005538: 61fb str r3, [r7, #28] 800553a: 687b ldr r3, [r7, #4] 800553c: 089b lsrs r3, r3, #2 800553e: 69fa ldr r2, [r7, #28] 8005540: 429a cmp r2, r3 8005542: d3d6 bcc.n 80054f2 } /* last bytes specific handling */ if ((BufferLength % 4U) != 0U) 8005544: 687b ldr r3, [r7, #4] 8005546: f003 0303 and.w r3, r3, #3 800554a: 2b00 cmp r3, #0 800554c: d04d beq.n 80055ea { if ((BufferLength % 4U) == 1U) 800554e: 687b ldr r3, [r7, #4] 8005550: f003 0303 and.w r3, r3, #3 8005554: 2b01 cmp r3, #1 8005556: d107 bne.n 8005568 { *(__IO uint8_t *)(__IO void *)(&hcrc->Instance->DR) = pBuffer[4U * i]; /* Derogation MisraC2012 R.11.5 */ 8005558: 69fb ldr r3, [r7, #28] 800555a: 009b lsls r3, r3, #2 800555c: 68ba ldr r2, [r7, #8] 800555e: 4413 add r3, r2 8005560: 68fa ldr r2, [r7, #12] 8005562: 6812 ldr r2, [r2, #0] 8005564: 781b ldrb r3, [r3, #0] 8005566: 7013 strb r3, [r2, #0] } if ((BufferLength % 4U) == 2U) 8005568: 687b ldr r3, [r7, #4] 800556a: f003 0303 and.w r3, r3, #3 800556e: 2b02 cmp r3, #2 8005570: d116 bne.n 80055a0 { data = ((uint16_t)(pBuffer[4U * i]) << 8U) | (uint16_t)pBuffer[(4U * i) + 1U]; 8005572: 69fb ldr r3, [r7, #28] 8005574: 009b lsls r3, r3, #2 8005576: 68ba ldr r2, [r7, #8] 8005578: 4413 add r3, r2 800557a: 781b ldrb r3, [r3, #0] 800557c: 021b lsls r3, r3, #8 800557e: b21a sxth r2, r3 8005580: 69fb ldr r3, [r7, #28] 8005582: 009b lsls r3, r3, #2 8005584: 3301 adds r3, #1 8005586: 68b9 ldr r1, [r7, #8] 8005588: 440b add r3, r1 800558a: 781b ldrb r3, [r3, #0] 800558c: b21b sxth r3, r3 800558e: 4313 orrs r3, r2 8005590: b21b sxth r3, r3 8005592: 837b strh r3, [r7, #26] pReg = (__IO uint16_t *)(__IO void *)(&hcrc->Instance->DR); /* Derogation MisraC2012 R.11.5 */ 8005594: 68fb ldr r3, [r7, #12] 8005596: 681b ldr r3, [r3, #0] 8005598: 617b str r3, [r7, #20] *pReg = data; 800559a: 697b ldr r3, [r7, #20] 800559c: 8b7a ldrh r2, [r7, #26] 800559e: 801a strh r2, [r3, #0] } if ((BufferLength % 4U) == 3U) 80055a0: 687b ldr r3, [r7, #4] 80055a2: f003 0303 and.w r3, r3, #3 80055a6: 2b03 cmp r3, #3 80055a8: d11f bne.n 80055ea { data = ((uint16_t)(pBuffer[4U * i]) << 8U) | (uint16_t)pBuffer[(4U * i) + 1U]; 80055aa: 69fb ldr r3, [r7, #28] 80055ac: 009b lsls r3, r3, #2 80055ae: 68ba ldr r2, [r7, #8] 80055b0: 4413 add r3, r2 80055b2: 781b ldrb r3, [r3, #0] 80055b4: 021b lsls r3, r3, #8 80055b6: b21a sxth r2, r3 80055b8: 69fb ldr r3, [r7, #28] 80055ba: 009b lsls r3, r3, #2 80055bc: 3301 adds r3, #1 80055be: 68b9 ldr r1, [r7, #8] 80055c0: 440b add r3, r1 80055c2: 781b ldrb r3, [r3, #0] 80055c4: b21b sxth r3, r3 80055c6: 4313 orrs r3, r2 80055c8: b21b sxth r3, r3 80055ca: 837b strh r3, [r7, #26] pReg = (__IO uint16_t *)(__IO void *)(&hcrc->Instance->DR); /* Derogation MisraC2012 R.11.5 */ 80055cc: 68fb ldr r3, [r7, #12] 80055ce: 681b ldr r3, [r3, #0] 80055d0: 617b str r3, [r7, #20] *pReg = data; 80055d2: 697b ldr r3, [r7, #20] 80055d4: 8b7a ldrh r2, [r7, #26] 80055d6: 801a strh r2, [r3, #0] *(__IO uint8_t *)(__IO void *)(&hcrc->Instance->DR) = pBuffer[(4U * i) + 2U]; /* Derogation MisraC2012 R.11.5 */ 80055d8: 69fb ldr r3, [r7, #28] 80055da: 009b lsls r3, r3, #2 80055dc: 3302 adds r3, #2 80055de: 68ba ldr r2, [r7, #8] 80055e0: 4413 add r3, r2 80055e2: 68fa ldr r2, [r7, #12] 80055e4: 6812 ldr r2, [r2, #0] 80055e6: 781b ldrb r3, [r3, #0] 80055e8: 7013 strb r3, [r2, #0] } } /* Return the CRC computed value */ return hcrc->Instance->DR; 80055ea: 68fb ldr r3, [r7, #12] 80055ec: 681b ldr r3, [r3, #0] 80055ee: 681b ldr r3, [r3, #0] } 80055f0: 4618 mov r0, r3 80055f2: 3724 adds r7, #36 @ 0x24 80055f4: 46bd mov sp, r7 80055f6: f85d 7b04 ldr.w r7, [sp], #4 80055fa: 4770 bx lr 080055fc : * @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) { 80055fc: b480 push {r7} 80055fe: b087 sub sp, #28 8005600: af00 add r7, sp, #0 8005602: 60f8 str r0, [r7, #12] 8005604: 60b9 str r1, [r7, #8] 8005606: 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++) 8005608: 2300 movs r3, #0 800560a: 617b str r3, [r7, #20] 800560c: e013 b.n 8005636 { hcrc->Instance->DR = ((uint32_t)pBuffer[2U * i] << 16U) | (uint32_t)pBuffer[(2U * i) + 1U]; 800560e: 697b ldr r3, [r7, #20] 8005610: 009b lsls r3, r3, #2 8005612: 68ba ldr r2, [r7, #8] 8005614: 4413 add r3, r2 8005616: 881b ldrh r3, [r3, #0] 8005618: 041a lsls r2, r3, #16 800561a: 697b ldr r3, [r7, #20] 800561c: 009b lsls r3, r3, #2 800561e: 3302 adds r3, #2 8005620: 68b9 ldr r1, [r7, #8] 8005622: 440b add r3, r1 8005624: 881b ldrh r3, [r3, #0] 8005626: 4619 mov r1, r3 8005628: 68fb ldr r3, [r7, #12] 800562a: 681b ldr r3, [r3, #0] 800562c: 430a orrs r2, r1 800562e: 601a str r2, [r3, #0] for (i = 0U; i < (BufferLength / 2U); i++) 8005630: 697b ldr r3, [r7, #20] 8005632: 3301 adds r3, #1 8005634: 617b str r3, [r7, #20] 8005636: 687b ldr r3, [r7, #4] 8005638: 085b lsrs r3, r3, #1 800563a: 697a ldr r2, [r7, #20] 800563c: 429a cmp r2, r3 800563e: d3e6 bcc.n 800560e } if ((BufferLength % 2U) != 0U) 8005640: 687b ldr r3, [r7, #4] 8005642: f003 0301 and.w r3, r3, #1 8005646: 2b00 cmp r3, #0 8005648: d009 beq.n 800565e { pReg = (__IO uint16_t *)(__IO void *)(&hcrc->Instance->DR); /* Derogation MisraC2012 R.11.5 */ 800564a: 68fb ldr r3, [r7, #12] 800564c: 681b ldr r3, [r3, #0] 800564e: 613b str r3, [r7, #16] *pReg = pBuffer[2U * i]; 8005650: 697b ldr r3, [r7, #20] 8005652: 009b lsls r3, r3, #2 8005654: 68ba ldr r2, [r7, #8] 8005656: 4413 add r3, r2 8005658: 881a ldrh r2, [r3, #0] 800565a: 693b ldr r3, [r7, #16] 800565c: 801a strh r2, [r3, #0] } /* Return the CRC computed value */ return hcrc->Instance->DR; 800565e: 68fb ldr r3, [r7, #12] 8005660: 681b ldr r3, [r3, #0] 8005662: 681b ldr r3, [r3, #0] } 8005664: 4618 mov r0, r3 8005666: 371c adds r7, #28 8005668: 46bd mov sp, r7 800566a: f85d 7b04 ldr.w r7, [sp], #4 800566e: 4770 bx lr 08005670 : * @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) { 8005670: b480 push {r7} 8005672: b087 sub sp, #28 8005674: af00 add r7, sp, #0 8005676: 60f8 str r0, [r7, #12] 8005678: 60b9 str r1, [r7, #8] 800567a: 607a str r2, [r7, #4] HAL_StatusTypeDef status = HAL_OK; 800567c: 2300 movs r3, #0 800567e: 75fb strb r3, [r7, #23] uint32_t msb = 31U; /* polynomial degree is 32 at most, so msb is initialized to max value */ 8005680: 231f movs r3, #31 8005682: 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) 8005684: 68bb ldr r3, [r7, #8] 8005686: f003 0301 and.w r3, r3, #1 800568a: 2b00 cmp r3, #0 800568c: d102 bne.n 8005694 { status = HAL_ERROR; 800568e: 2301 movs r3, #1 8005690: 75fb strb r3, [r7, #23] 8005692: e063 b.n 800575c * 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)) 8005694: bf00 nop 8005696: 693b ldr r3, [r7, #16] 8005698: 1e5a subs r2, r3, #1 800569a: 613a str r2, [r7, #16] 800569c: 2b00 cmp r3, #0 800569e: d009 beq.n 80056b4 80056a0: 693b ldr r3, [r7, #16] 80056a2: f003 031f and.w r3, r3, #31 80056a6: 68ba ldr r2, [r7, #8] 80056a8: fa22 f303 lsr.w r3, r2, r3 80056ac: f003 0301 and.w r3, r3, #1 80056b0: 2b00 cmp r3, #0 80056b2: d0f0 beq.n 8005696 { } switch (PolyLength) 80056b4: 687b ldr r3, [r7, #4] 80056b6: 2b18 cmp r3, #24 80056b8: d846 bhi.n 8005748 80056ba: a201 add r2, pc, #4 @ (adr r2, 80056c0 ) 80056bc: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80056c0: 0800574f .word 0x0800574f 80056c4: 08005749 .word 0x08005749 80056c8: 08005749 .word 0x08005749 80056cc: 08005749 .word 0x08005749 80056d0: 08005749 .word 0x08005749 80056d4: 08005749 .word 0x08005749 80056d8: 08005749 .word 0x08005749 80056dc: 08005749 .word 0x08005749 80056e0: 0800573d .word 0x0800573d 80056e4: 08005749 .word 0x08005749 80056e8: 08005749 .word 0x08005749 80056ec: 08005749 .word 0x08005749 80056f0: 08005749 .word 0x08005749 80056f4: 08005749 .word 0x08005749 80056f8: 08005749 .word 0x08005749 80056fc: 08005749 .word 0x08005749 8005700: 08005731 .word 0x08005731 8005704: 08005749 .word 0x08005749 8005708: 08005749 .word 0x08005749 800570c: 08005749 .word 0x08005749 8005710: 08005749 .word 0x08005749 8005714: 08005749 .word 0x08005749 8005718: 08005749 .word 0x08005749 800571c: 08005749 .word 0x08005749 8005720: 08005725 .word 0x08005725 { case CRC_POLYLENGTH_7B: if (msb >= HAL_CRC_LENGTH_7B) 8005724: 693b ldr r3, [r7, #16] 8005726: 2b06 cmp r3, #6 8005728: d913 bls.n 8005752 { status = HAL_ERROR; 800572a: 2301 movs r3, #1 800572c: 75fb strb r3, [r7, #23] } break; 800572e: e010 b.n 8005752 case CRC_POLYLENGTH_8B: if (msb >= HAL_CRC_LENGTH_8B) 8005730: 693b ldr r3, [r7, #16] 8005732: 2b07 cmp r3, #7 8005734: d90f bls.n 8005756 { status = HAL_ERROR; 8005736: 2301 movs r3, #1 8005738: 75fb strb r3, [r7, #23] } break; 800573a: e00c b.n 8005756 case CRC_POLYLENGTH_16B: if (msb >= HAL_CRC_LENGTH_16B) 800573c: 693b ldr r3, [r7, #16] 800573e: 2b0f cmp r3, #15 8005740: d90b bls.n 800575a { status = HAL_ERROR; 8005742: 2301 movs r3, #1 8005744: 75fb strb r3, [r7, #23] } break; 8005746: e008 b.n 800575a case CRC_POLYLENGTH_32B: /* no polynomial definition vs. polynomial length issue possible */ break; default: status = HAL_ERROR; 8005748: 2301 movs r3, #1 800574a: 75fb strb r3, [r7, #23] break; 800574c: e006 b.n 800575c break; 800574e: bf00 nop 8005750: e004 b.n 800575c break; 8005752: bf00 nop 8005754: e002 b.n 800575c break; 8005756: bf00 nop 8005758: e000 b.n 800575c break; 800575a: bf00 nop } } if (status == HAL_OK) 800575c: 7dfb ldrb r3, [r7, #23] 800575e: 2b00 cmp r3, #0 8005760: d10d bne.n 800577e { /* set generating polynomial */ WRITE_REG(hcrc->Instance->POL, Pol); 8005762: 68fb ldr r3, [r7, #12] 8005764: 681b ldr r3, [r3, #0] 8005766: 68ba ldr r2, [r7, #8] 8005768: 615a str r2, [r3, #20] /* set generating polynomial size */ MODIFY_REG(hcrc->Instance->CR, CRC_CR_POLYSIZE, PolyLength); 800576a: 68fb ldr r3, [r7, #12] 800576c: 681b ldr r3, [r3, #0] 800576e: 689b ldr r3, [r3, #8] 8005770: f023 0118 bic.w r1, r3, #24 8005774: 68fb ldr r3, [r7, #12] 8005776: 681b ldr r3, [r3, #0] 8005778: 687a ldr r2, [r7, #4] 800577a: 430a orrs r2, r1 800577c: 609a str r2, [r3, #8] } /* Return function status */ return status; 800577e: 7dfb ldrb r3, [r7, #23] } 8005780: 4618 mov r0, r3 8005782: 371c adds r7, #28 8005784: 46bd mov sp, r7 8005786: f85d 7b04 ldr.w r7, [sp], #4 800578a: 4770 bx lr 0800578c : * @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) { 800578c: b580 push {r7, lr} 800578e: b086 sub sp, #24 8005790: af00 add r7, sp, #0 8005792: 6078 str r0, [r7, #4] uint32_t registerValue; uint32_t tickstart = HAL_GetTick(); 8005794: f7ff fc4c bl 8005030 8005798: 6138 str r0, [r7, #16] DMA_Base_Registers *regs_dma; BDMA_Base_Registers *regs_bdma; /* Check the DMA peripheral handle */ if(hdma == NULL) 800579a: 687b ldr r3, [r7, #4] 800579c: 2b00 cmp r3, #0 800579e: d101 bne.n 80057a4 { return HAL_ERROR; 80057a0: 2301 movs r3, #1 80057a2: e316 b.n 8005dd2 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 */ 80057a4: 687b ldr r3, [r7, #4] 80057a6: 681b ldr r3, [r3, #0] 80057a8: 4a66 ldr r2, [pc, #408] @ (8005944 ) 80057aa: 4293 cmp r3, r2 80057ac: d04a beq.n 8005844 80057ae: 687b ldr r3, [r7, #4] 80057b0: 681b ldr r3, [r3, #0] 80057b2: 4a65 ldr r2, [pc, #404] @ (8005948 ) 80057b4: 4293 cmp r3, r2 80057b6: d045 beq.n 8005844 80057b8: 687b ldr r3, [r7, #4] 80057ba: 681b ldr r3, [r3, #0] 80057bc: 4a63 ldr r2, [pc, #396] @ (800594c ) 80057be: 4293 cmp r3, r2 80057c0: d040 beq.n 8005844 80057c2: 687b ldr r3, [r7, #4] 80057c4: 681b ldr r3, [r3, #0] 80057c6: 4a62 ldr r2, [pc, #392] @ (8005950 ) 80057c8: 4293 cmp r3, r2 80057ca: d03b beq.n 8005844 80057cc: 687b ldr r3, [r7, #4] 80057ce: 681b ldr r3, [r3, #0] 80057d0: 4a60 ldr r2, [pc, #384] @ (8005954 ) 80057d2: 4293 cmp r3, r2 80057d4: d036 beq.n 8005844 80057d6: 687b ldr r3, [r7, #4] 80057d8: 681b ldr r3, [r3, #0] 80057da: 4a5f ldr r2, [pc, #380] @ (8005958 ) 80057dc: 4293 cmp r3, r2 80057de: d031 beq.n 8005844 80057e0: 687b ldr r3, [r7, #4] 80057e2: 681b ldr r3, [r3, #0] 80057e4: 4a5d ldr r2, [pc, #372] @ (800595c ) 80057e6: 4293 cmp r3, r2 80057e8: d02c beq.n 8005844 80057ea: 687b ldr r3, [r7, #4] 80057ec: 681b ldr r3, [r3, #0] 80057ee: 4a5c ldr r2, [pc, #368] @ (8005960 ) 80057f0: 4293 cmp r3, r2 80057f2: d027 beq.n 8005844 80057f4: 687b ldr r3, [r7, #4] 80057f6: 681b ldr r3, [r3, #0] 80057f8: 4a5a ldr r2, [pc, #360] @ (8005964 ) 80057fa: 4293 cmp r3, r2 80057fc: d022 beq.n 8005844 80057fe: 687b ldr r3, [r7, #4] 8005800: 681b ldr r3, [r3, #0] 8005802: 4a59 ldr r2, [pc, #356] @ (8005968 ) 8005804: 4293 cmp r3, r2 8005806: d01d beq.n 8005844 8005808: 687b ldr r3, [r7, #4] 800580a: 681b ldr r3, [r3, #0] 800580c: 4a57 ldr r2, [pc, #348] @ (800596c ) 800580e: 4293 cmp r3, r2 8005810: d018 beq.n 8005844 8005812: 687b ldr r3, [r7, #4] 8005814: 681b ldr r3, [r3, #0] 8005816: 4a56 ldr r2, [pc, #344] @ (8005970 ) 8005818: 4293 cmp r3, r2 800581a: d013 beq.n 8005844 800581c: 687b ldr r3, [r7, #4] 800581e: 681b ldr r3, [r3, #0] 8005820: 4a54 ldr r2, [pc, #336] @ (8005974 ) 8005822: 4293 cmp r3, r2 8005824: d00e beq.n 8005844 8005826: 687b ldr r3, [r7, #4] 8005828: 681b ldr r3, [r3, #0] 800582a: 4a53 ldr r2, [pc, #332] @ (8005978 ) 800582c: 4293 cmp r3, r2 800582e: d009 beq.n 8005844 8005830: 687b ldr r3, [r7, #4] 8005832: 681b ldr r3, [r3, #0] 8005834: 4a51 ldr r2, [pc, #324] @ (800597c ) 8005836: 4293 cmp r3, r2 8005838: d004 beq.n 8005844 800583a: 687b ldr r3, [r7, #4] 800583c: 681b ldr r3, [r3, #0] 800583e: 4a50 ldr r2, [pc, #320] @ (8005980 ) 8005840: 4293 cmp r3, r2 8005842: d101 bne.n 8005848 8005844: 2301 movs r3, #1 8005846: e000 b.n 800584a 8005848: 2300 movs r3, #0 800584a: 2b00 cmp r3, #0 800584c: f000 813b beq.w 8005ac6 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; 8005850: 687b ldr r3, [r7, #4] 8005852: 2202 movs r2, #2 8005854: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Allocate lock resource */ __HAL_UNLOCK(hdma); 8005858: 687b ldr r3, [r7, #4] 800585a: 2200 movs r2, #0 800585c: f883 2034 strb.w r2, [r3, #52] @ 0x34 /* Disable the peripheral */ __HAL_DMA_DISABLE(hdma); 8005860: 687b ldr r3, [r7, #4] 8005862: 681b ldr r3, [r3, #0] 8005864: 4a37 ldr r2, [pc, #220] @ (8005944 ) 8005866: 4293 cmp r3, r2 8005868: d04a beq.n 8005900 800586a: 687b ldr r3, [r7, #4] 800586c: 681b ldr r3, [r3, #0] 800586e: 4a36 ldr r2, [pc, #216] @ (8005948 ) 8005870: 4293 cmp r3, r2 8005872: d045 beq.n 8005900 8005874: 687b ldr r3, [r7, #4] 8005876: 681b ldr r3, [r3, #0] 8005878: 4a34 ldr r2, [pc, #208] @ (800594c ) 800587a: 4293 cmp r3, r2 800587c: d040 beq.n 8005900 800587e: 687b ldr r3, [r7, #4] 8005880: 681b ldr r3, [r3, #0] 8005882: 4a33 ldr r2, [pc, #204] @ (8005950 ) 8005884: 4293 cmp r3, r2 8005886: d03b beq.n 8005900 8005888: 687b ldr r3, [r7, #4] 800588a: 681b ldr r3, [r3, #0] 800588c: 4a31 ldr r2, [pc, #196] @ (8005954 ) 800588e: 4293 cmp r3, r2 8005890: d036 beq.n 8005900 8005892: 687b ldr r3, [r7, #4] 8005894: 681b ldr r3, [r3, #0] 8005896: 4a30 ldr r2, [pc, #192] @ (8005958 ) 8005898: 4293 cmp r3, r2 800589a: d031 beq.n 8005900 800589c: 687b ldr r3, [r7, #4] 800589e: 681b ldr r3, [r3, #0] 80058a0: 4a2e ldr r2, [pc, #184] @ (800595c ) 80058a2: 4293 cmp r3, r2 80058a4: d02c beq.n 8005900 80058a6: 687b ldr r3, [r7, #4] 80058a8: 681b ldr r3, [r3, #0] 80058aa: 4a2d ldr r2, [pc, #180] @ (8005960 ) 80058ac: 4293 cmp r3, r2 80058ae: d027 beq.n 8005900 80058b0: 687b ldr r3, [r7, #4] 80058b2: 681b ldr r3, [r3, #0] 80058b4: 4a2b ldr r2, [pc, #172] @ (8005964 ) 80058b6: 4293 cmp r3, r2 80058b8: d022 beq.n 8005900 80058ba: 687b ldr r3, [r7, #4] 80058bc: 681b ldr r3, [r3, #0] 80058be: 4a2a ldr r2, [pc, #168] @ (8005968 ) 80058c0: 4293 cmp r3, r2 80058c2: d01d beq.n 8005900 80058c4: 687b ldr r3, [r7, #4] 80058c6: 681b ldr r3, [r3, #0] 80058c8: 4a28 ldr r2, [pc, #160] @ (800596c ) 80058ca: 4293 cmp r3, r2 80058cc: d018 beq.n 8005900 80058ce: 687b ldr r3, [r7, #4] 80058d0: 681b ldr r3, [r3, #0] 80058d2: 4a27 ldr r2, [pc, #156] @ (8005970 ) 80058d4: 4293 cmp r3, r2 80058d6: d013 beq.n 8005900 80058d8: 687b ldr r3, [r7, #4] 80058da: 681b ldr r3, [r3, #0] 80058dc: 4a25 ldr r2, [pc, #148] @ (8005974 ) 80058de: 4293 cmp r3, r2 80058e0: d00e beq.n 8005900 80058e2: 687b ldr r3, [r7, #4] 80058e4: 681b ldr r3, [r3, #0] 80058e6: 4a24 ldr r2, [pc, #144] @ (8005978 ) 80058e8: 4293 cmp r3, r2 80058ea: d009 beq.n 8005900 80058ec: 687b ldr r3, [r7, #4] 80058ee: 681b ldr r3, [r3, #0] 80058f0: 4a22 ldr r2, [pc, #136] @ (800597c ) 80058f2: 4293 cmp r3, r2 80058f4: d004 beq.n 8005900 80058f6: 687b ldr r3, [r7, #4] 80058f8: 681b ldr r3, [r3, #0] 80058fa: 4a21 ldr r2, [pc, #132] @ (8005980 ) 80058fc: 4293 cmp r3, r2 80058fe: d108 bne.n 8005912 8005900: 687b ldr r3, [r7, #4] 8005902: 681b ldr r3, [r3, #0] 8005904: 681a ldr r2, [r3, #0] 8005906: 687b ldr r3, [r7, #4] 8005908: 681b ldr r3, [r3, #0] 800590a: f022 0201 bic.w r2, r2, #1 800590e: 601a str r2, [r3, #0] 8005910: e007 b.n 8005922 8005912: 687b ldr r3, [r7, #4] 8005914: 681b ldr r3, [r3, #0] 8005916: 681a ldr r2, [r3, #0] 8005918: 687b ldr r3, [r7, #4] 800591a: 681b ldr r3, [r3, #0] 800591c: f022 0201 bic.w r2, r2, #1 8005920: 601a str r2, [r3, #0] /* Check if the DMA Stream is effectively disabled */ while((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_EN) != 0U) 8005922: e02f b.n 8005984 { /* Check for the Timeout */ if((HAL_GetTick() - tickstart ) > HAL_TIMEOUT_DMA_ABORT) 8005924: f7ff fb84 bl 8005030 8005928: 4602 mov r2, r0 800592a: 693b ldr r3, [r7, #16] 800592c: 1ad3 subs r3, r2, r3 800592e: 2b05 cmp r3, #5 8005930: d928 bls.n 8005984 { /* Update error code */ hdma->ErrorCode = HAL_DMA_ERROR_TIMEOUT; 8005932: 687b ldr r3, [r7, #4] 8005934: 2220 movs r2, #32 8005936: 655a str r2, [r3, #84] @ 0x54 /* Change the DMA state */ hdma->State = HAL_DMA_STATE_ERROR; 8005938: 687b ldr r3, [r7, #4] 800593a: 2203 movs r2, #3 800593c: f883 2035 strb.w r2, [r3, #53] @ 0x35 return HAL_ERROR; 8005940: 2301 movs r3, #1 8005942: e246 b.n 8005dd2 8005944: 40020010 .word 0x40020010 8005948: 40020028 .word 0x40020028 800594c: 40020040 .word 0x40020040 8005950: 40020058 .word 0x40020058 8005954: 40020070 .word 0x40020070 8005958: 40020088 .word 0x40020088 800595c: 400200a0 .word 0x400200a0 8005960: 400200b8 .word 0x400200b8 8005964: 40020410 .word 0x40020410 8005968: 40020428 .word 0x40020428 800596c: 40020440 .word 0x40020440 8005970: 40020458 .word 0x40020458 8005974: 40020470 .word 0x40020470 8005978: 40020488 .word 0x40020488 800597c: 400204a0 .word 0x400204a0 8005980: 400204b8 .word 0x400204b8 while((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_EN) != 0U) 8005984: 687b ldr r3, [r7, #4] 8005986: 681b ldr r3, [r3, #0] 8005988: 681b ldr r3, [r3, #0] 800598a: f003 0301 and.w r3, r3, #1 800598e: 2b00 cmp r3, #0 8005990: d1c8 bne.n 8005924 } } /* Get the CR register value */ registerValue = ((DMA_Stream_TypeDef *)hdma->Instance)->CR; 8005992: 687b ldr r3, [r7, #4] 8005994: 681b ldr r3, [r3, #0] 8005996: 681b ldr r3, [r3, #0] 8005998: 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 | \ 800599a: 697a ldr r2, [r7, #20] 800599c: 4b83 ldr r3, [pc, #524] @ (8005bac ) 800599e: 4013 ands r3, r2 80059a0: 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 | 80059a2: 687b ldr r3, [r7, #4] 80059a4: 689a ldr r2, [r3, #8] hdma->Init.PeriphInc | hdma->Init.MemInc | 80059a6: 687b ldr r3, [r7, #4] 80059a8: 68db ldr r3, [r3, #12] registerValue |= hdma->Init.Direction | 80059aa: 431a orrs r2, r3 hdma->Init.PeriphInc | hdma->Init.MemInc | 80059ac: 687b ldr r3, [r7, #4] 80059ae: 691b ldr r3, [r3, #16] 80059b0: 431a orrs r2, r3 hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment | 80059b2: 687b ldr r3, [r7, #4] 80059b4: 695b ldr r3, [r3, #20] hdma->Init.PeriphInc | hdma->Init.MemInc | 80059b6: 431a orrs r2, r3 hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment | 80059b8: 687b ldr r3, [r7, #4] 80059ba: 699b ldr r3, [r3, #24] 80059bc: 431a orrs r2, r3 hdma->Init.Mode | hdma->Init.Priority; 80059be: 687b ldr r3, [r7, #4] 80059c0: 69db ldr r3, [r3, #28] hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment | 80059c2: 431a orrs r2, r3 hdma->Init.Mode | hdma->Init.Priority; 80059c4: 687b ldr r3, [r7, #4] 80059c6: 6a1b ldr r3, [r3, #32] 80059c8: 4313 orrs r3, r2 registerValue |= hdma->Init.Direction | 80059ca: 697a ldr r2, [r7, #20] 80059cc: 4313 orrs r3, r2 80059ce: 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) 80059d0: 687b ldr r3, [r7, #4] 80059d2: 6a5b ldr r3, [r3, #36] @ 0x24 80059d4: 2b04 cmp r3, #4 80059d6: d107 bne.n 80059e8 { /* Get memory burst and peripheral burst */ registerValue |= hdma->Init.MemBurst | hdma->Init.PeriphBurst; 80059d8: 687b ldr r3, [r7, #4] 80059da: 6ada ldr r2, [r3, #44] @ 0x2c 80059dc: 687b ldr r3, [r7, #4] 80059de: 6b1b ldr r3, [r3, #48] @ 0x30 80059e0: 4313 orrs r3, r2 80059e2: 697a ldr r2, [r7, #20] 80059e4: 4313 orrs r3, r2 80059e6: 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) 80059e8: 4b71 ldr r3, [pc, #452] @ (8005bb0 ) 80059ea: 681a ldr r2, [r3, #0] 80059ec: 4b71 ldr r3, [pc, #452] @ (8005bb4 ) 80059ee: 4013 ands r3, r2 80059f0: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 80059f4: d328 bcc.n 8005a48 { #endif /* STM32H7_DEV_ID == 0x450UL */ if(IS_DMA_UART_USART_REQUEST(hdma->Init.Request) != 0U) 80059f6: 687b ldr r3, [r7, #4] 80059f8: 685b ldr r3, [r3, #4] 80059fa: 2b28 cmp r3, #40 @ 0x28 80059fc: d903 bls.n 8005a06 80059fe: 687b ldr r3, [r7, #4] 8005a00: 685b ldr r3, [r3, #4] 8005a02: 2b2e cmp r3, #46 @ 0x2e 8005a04: d917 bls.n 8005a36 8005a06: 687b ldr r3, [r7, #4] 8005a08: 685b ldr r3, [r3, #4] 8005a0a: 2b3e cmp r3, #62 @ 0x3e 8005a0c: d903 bls.n 8005a16 8005a0e: 687b ldr r3, [r7, #4] 8005a10: 685b ldr r3, [r3, #4] 8005a12: 2b42 cmp r3, #66 @ 0x42 8005a14: d90f bls.n 8005a36 8005a16: 687b ldr r3, [r7, #4] 8005a18: 685b ldr r3, [r3, #4] 8005a1a: 2b46 cmp r3, #70 @ 0x46 8005a1c: d903 bls.n 8005a26 8005a1e: 687b ldr r3, [r7, #4] 8005a20: 685b ldr r3, [r3, #4] 8005a22: 2b48 cmp r3, #72 @ 0x48 8005a24: d907 bls.n 8005a36 8005a26: 687b ldr r3, [r7, #4] 8005a28: 685b ldr r3, [r3, #4] 8005a2a: 2b4e cmp r3, #78 @ 0x4e 8005a2c: d905 bls.n 8005a3a 8005a2e: 687b ldr r3, [r7, #4] 8005a30: 685b ldr r3, [r3, #4] 8005a32: 2b52 cmp r3, #82 @ 0x52 8005a34: d801 bhi.n 8005a3a 8005a36: 2301 movs r3, #1 8005a38: e000 b.n 8005a3c 8005a3a: 2300 movs r3, #0 8005a3c: 2b00 cmp r3, #0 8005a3e: d003 beq.n 8005a48 { registerValue |= DMA_SxCR_TRBUFF; 8005a40: 697b ldr r3, [r7, #20] 8005a42: f443 1380 orr.w r3, r3, #1048576 @ 0x100000 8005a46: 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; 8005a48: 687b ldr r3, [r7, #4] 8005a4a: 681b ldr r3, [r3, #0] 8005a4c: 697a ldr r2, [r7, #20] 8005a4e: 601a str r2, [r3, #0] /* Get the FCR register value */ registerValue = ((DMA_Stream_TypeDef *)hdma->Instance)->FCR; 8005a50: 687b ldr r3, [r7, #4] 8005a52: 681b ldr r3, [r3, #0] 8005a54: 695b ldr r3, [r3, #20] 8005a56: 617b str r3, [r7, #20] /* Clear Direct mode and FIFO threshold bits */ registerValue &= (uint32_t)~(DMA_SxFCR_DMDIS | DMA_SxFCR_FTH); 8005a58: 697b ldr r3, [r7, #20] 8005a5a: f023 0307 bic.w r3, r3, #7 8005a5e: 617b str r3, [r7, #20] /* Prepare the DMA Stream FIFO configuration */ registerValue |= hdma->Init.FIFOMode; 8005a60: 687b ldr r3, [r7, #4] 8005a62: 6a5b ldr r3, [r3, #36] @ 0x24 8005a64: 697a ldr r2, [r7, #20] 8005a66: 4313 orrs r3, r2 8005a68: 617b str r3, [r7, #20] /* the FIFO threshold is not used when the FIFO mode is disabled */ if(hdma->Init.FIFOMode == DMA_FIFOMODE_ENABLE) 8005a6a: 687b ldr r3, [r7, #4] 8005a6c: 6a5b ldr r3, [r3, #36] @ 0x24 8005a6e: 2b04 cmp r3, #4 8005a70: d117 bne.n 8005aa2 { /* Get the FIFO threshold */ registerValue |= hdma->Init.FIFOThreshold; 8005a72: 687b ldr r3, [r7, #4] 8005a74: 6a9b ldr r3, [r3, #40] @ 0x28 8005a76: 697a ldr r2, [r7, #20] 8005a78: 4313 orrs r3, r2 8005a7a: 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) 8005a7c: 687b ldr r3, [r7, #4] 8005a7e: 6adb ldr r3, [r3, #44] @ 0x2c 8005a80: 2b00 cmp r3, #0 8005a82: d00e beq.n 8005aa2 { if (DMA_CheckFifoParam(hdma) != HAL_OK) 8005a84: 6878 ldr r0, [r7, #4] 8005a86: f001 ff1d bl 80078c4 8005a8a: 4603 mov r3, r0 8005a8c: 2b00 cmp r3, #0 8005a8e: d008 beq.n 8005aa2 { /* Update error code */ hdma->ErrorCode = HAL_DMA_ERROR_PARAM; 8005a90: 687b ldr r3, [r7, #4] 8005a92: 2240 movs r2, #64 @ 0x40 8005a94: 655a str r2, [r3, #84] @ 0x54 /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 8005a96: 687b ldr r3, [r7, #4] 8005a98: 2201 movs r2, #1 8005a9a: f883 2035 strb.w r2, [r3, #53] @ 0x35 return HAL_ERROR; 8005a9e: 2301 movs r3, #1 8005aa0: e197 b.n 8005dd2 } } } /* Write to DMA Stream FCR */ ((DMA_Stream_TypeDef *)hdma->Instance)->FCR = registerValue; 8005aa2: 687b ldr r3, [r7, #4] 8005aa4: 681b ldr r3, [r3, #0] 8005aa6: 697a ldr r2, [r7, #20] 8005aa8: 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); 8005aaa: 6878 ldr r0, [r7, #4] 8005aac: f001 fe58 bl 8007760 8005ab0: 4603 mov r3, r0 8005ab2: 60bb str r3, [r7, #8] /* Clear all interrupt flags */ regs_dma->IFCR = 0x3FUL << (hdma->StreamIndex & 0x1FU); 8005ab4: 687b ldr r3, [r7, #4] 8005ab6: 6ddb ldr r3, [r3, #92] @ 0x5c 8005ab8: f003 031f and.w r3, r3, #31 8005abc: 223f movs r2, #63 @ 0x3f 8005abe: 409a lsls r2, r3 8005ac0: 68bb ldr r3, [r7, #8] 8005ac2: 609a str r2, [r3, #8] 8005ac4: e0cd b.n 8005c62 } else if(IS_BDMA_CHANNEL_INSTANCE(hdma->Instance) != 0U) /* BDMA instance(s) */ 8005ac6: 687b ldr r3, [r7, #4] 8005ac8: 681b ldr r3, [r3, #0] 8005aca: 4a3b ldr r2, [pc, #236] @ (8005bb8 ) 8005acc: 4293 cmp r3, r2 8005ace: d022 beq.n 8005b16 8005ad0: 687b ldr r3, [r7, #4] 8005ad2: 681b ldr r3, [r3, #0] 8005ad4: 4a39 ldr r2, [pc, #228] @ (8005bbc ) 8005ad6: 4293 cmp r3, r2 8005ad8: d01d beq.n 8005b16 8005ada: 687b ldr r3, [r7, #4] 8005adc: 681b ldr r3, [r3, #0] 8005ade: 4a38 ldr r2, [pc, #224] @ (8005bc0 ) 8005ae0: 4293 cmp r3, r2 8005ae2: d018 beq.n 8005b16 8005ae4: 687b ldr r3, [r7, #4] 8005ae6: 681b ldr r3, [r3, #0] 8005ae8: 4a36 ldr r2, [pc, #216] @ (8005bc4 ) 8005aea: 4293 cmp r3, r2 8005aec: d013 beq.n 8005b16 8005aee: 687b ldr r3, [r7, #4] 8005af0: 681b ldr r3, [r3, #0] 8005af2: 4a35 ldr r2, [pc, #212] @ (8005bc8 ) 8005af4: 4293 cmp r3, r2 8005af6: d00e beq.n 8005b16 8005af8: 687b ldr r3, [r7, #4] 8005afa: 681b ldr r3, [r3, #0] 8005afc: 4a33 ldr r2, [pc, #204] @ (8005bcc ) 8005afe: 4293 cmp r3, r2 8005b00: d009 beq.n 8005b16 8005b02: 687b ldr r3, [r7, #4] 8005b04: 681b ldr r3, [r3, #0] 8005b06: 4a32 ldr r2, [pc, #200] @ (8005bd0 ) 8005b08: 4293 cmp r3, r2 8005b0a: d004 beq.n 8005b16 8005b0c: 687b ldr r3, [r7, #4] 8005b0e: 681b ldr r3, [r3, #0] 8005b10: 4a30 ldr r2, [pc, #192] @ (8005bd4 ) 8005b12: 4293 cmp r3, r2 8005b14: d101 bne.n 8005b1a 8005b16: 2301 movs r3, #1 8005b18: e000 b.n 8005b1c 8005b1a: 2300 movs r3, #0 8005b1c: 2b00 cmp r3, #0 8005b1e: f000 8097 beq.w 8005c50 { if(IS_BDMA_CHANNEL_DMAMUX_INSTANCE(hdma->Instance) != 0U) 8005b22: 687b ldr r3, [r7, #4] 8005b24: 681b ldr r3, [r3, #0] 8005b26: 4a24 ldr r2, [pc, #144] @ (8005bb8 ) 8005b28: 4293 cmp r3, r2 8005b2a: d021 beq.n 8005b70 8005b2c: 687b ldr r3, [r7, #4] 8005b2e: 681b ldr r3, [r3, #0] 8005b30: 4a22 ldr r2, [pc, #136] @ (8005bbc ) 8005b32: 4293 cmp r3, r2 8005b34: d01c beq.n 8005b70 8005b36: 687b ldr r3, [r7, #4] 8005b38: 681b ldr r3, [r3, #0] 8005b3a: 4a21 ldr r2, [pc, #132] @ (8005bc0 ) 8005b3c: 4293 cmp r3, r2 8005b3e: d017 beq.n 8005b70 8005b40: 687b ldr r3, [r7, #4] 8005b42: 681b ldr r3, [r3, #0] 8005b44: 4a1f ldr r2, [pc, #124] @ (8005bc4 ) 8005b46: 4293 cmp r3, r2 8005b48: d012 beq.n 8005b70 8005b4a: 687b ldr r3, [r7, #4] 8005b4c: 681b ldr r3, [r3, #0] 8005b4e: 4a1e ldr r2, [pc, #120] @ (8005bc8 ) 8005b50: 4293 cmp r3, r2 8005b52: d00d beq.n 8005b70 8005b54: 687b ldr r3, [r7, #4] 8005b56: 681b ldr r3, [r3, #0] 8005b58: 4a1c ldr r2, [pc, #112] @ (8005bcc ) 8005b5a: 4293 cmp r3, r2 8005b5c: d008 beq.n 8005b70 8005b5e: 687b ldr r3, [r7, #4] 8005b60: 681b ldr r3, [r3, #0] 8005b62: 4a1b ldr r2, [pc, #108] @ (8005bd0 ) 8005b64: 4293 cmp r3, r2 8005b66: d003 beq.n 8005b70 8005b68: 687b ldr r3, [r7, #4] 8005b6a: 681b ldr r3, [r3, #0] 8005b6c: 4a19 ldr r2, [pc, #100] @ (8005bd4 ) 8005b6e: 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; 8005b70: 687b ldr r3, [r7, #4] 8005b72: 2202 movs r2, #2 8005b74: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Allocate lock resource */ __HAL_UNLOCK(hdma); 8005b78: 687b ldr r3, [r7, #4] 8005b7a: 2200 movs r2, #0 8005b7c: f883 2034 strb.w r2, [r3, #52] @ 0x34 /* Get the CR register value */ registerValue = ((BDMA_Channel_TypeDef *)hdma->Instance)->CCR; 8005b80: 687b ldr r3, [r7, #4] 8005b82: 681b ldr r3, [r3, #0] 8005b84: 681b ldr r3, [r3, #0] 8005b86: 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 | \ 8005b88: 697a ldr r2, [r7, #20] 8005b8a: 4b13 ldr r3, [pc, #76] @ (8005bd8 ) 8005b8c: 4013 ands r3, r2 8005b8e: 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) | 8005b90: 687b ldr r3, [r7, #4] 8005b92: 689b ldr r3, [r3, #8] 8005b94: 2b40 cmp r3, #64 @ 0x40 8005b96: d021 beq.n 8005bdc 8005b98: 687b ldr r3, [r7, #4] 8005b9a: 689b ldr r3, [r3, #8] 8005b9c: 2b80 cmp r3, #128 @ 0x80 8005b9e: d102 bne.n 8005ba6 8005ba0: f44f 4380 mov.w r3, #16384 @ 0x4000 8005ba4: e01b b.n 8005bde 8005ba6: 2300 movs r3, #0 8005ba8: e019 b.n 8005bde 8005baa: bf00 nop 8005bac: fe10803f .word 0xfe10803f 8005bb0: 5c001000 .word 0x5c001000 8005bb4: ffff0000 .word 0xffff0000 8005bb8: 58025408 .word 0x58025408 8005bbc: 5802541c .word 0x5802541c 8005bc0: 58025430 .word 0x58025430 8005bc4: 58025444 .word 0x58025444 8005bc8: 58025458 .word 0x58025458 8005bcc: 5802546c .word 0x5802546c 8005bd0: 58025480 .word 0x58025480 8005bd4: 58025494 .word 0x58025494 8005bd8: fffe000f .word 0xfffe000f 8005bdc: 2310 movs r3, #16 DMA_TO_BDMA_PERIPHERAL_INC(hdma->Init.PeriphInc) | 8005bde: 687a ldr r2, [r7, #4] 8005be0: 68d2 ldr r2, [r2, #12] 8005be2: 08d2 lsrs r2, r2, #3 registerValue |= DMA_TO_BDMA_DIRECTION(hdma->Init.Direction) | 8005be4: 431a orrs r2, r3 DMA_TO_BDMA_MEMORY_INC(hdma->Init.MemInc) | 8005be6: 687b ldr r3, [r7, #4] 8005be8: 691b ldr r3, [r3, #16] 8005bea: 08db lsrs r3, r3, #3 DMA_TO_BDMA_PERIPHERAL_INC(hdma->Init.PeriphInc) | 8005bec: 431a orrs r2, r3 DMA_TO_BDMA_PDATA_SIZE(hdma->Init.PeriphDataAlignment) | 8005bee: 687b ldr r3, [r7, #4] 8005bf0: 695b ldr r3, [r3, #20] 8005bf2: 08db lsrs r3, r3, #3 DMA_TO_BDMA_MEMORY_INC(hdma->Init.MemInc) | 8005bf4: 431a orrs r2, r3 DMA_TO_BDMA_MDATA_SIZE(hdma->Init.MemDataAlignment) | 8005bf6: 687b ldr r3, [r7, #4] 8005bf8: 699b ldr r3, [r3, #24] 8005bfa: 08db lsrs r3, r3, #3 DMA_TO_BDMA_PDATA_SIZE(hdma->Init.PeriphDataAlignment) | 8005bfc: 431a orrs r2, r3 DMA_TO_BDMA_MODE(hdma->Init.Mode) | 8005bfe: 687b ldr r3, [r7, #4] 8005c00: 69db ldr r3, [r3, #28] 8005c02: 08db lsrs r3, r3, #3 DMA_TO_BDMA_MDATA_SIZE(hdma->Init.MemDataAlignment) | 8005c04: 431a orrs r2, r3 DMA_TO_BDMA_PRIORITY(hdma->Init.Priority); 8005c06: 687b ldr r3, [r7, #4] 8005c08: 6a1b ldr r3, [r3, #32] 8005c0a: 091b lsrs r3, r3, #4 DMA_TO_BDMA_MODE(hdma->Init.Mode) | 8005c0c: 4313 orrs r3, r2 registerValue |= DMA_TO_BDMA_DIRECTION(hdma->Init.Direction) | 8005c0e: 697a ldr r2, [r7, #20] 8005c10: 4313 orrs r3, r2 8005c12: 617b str r3, [r7, #20] /* Write to DMA Channel CR register */ ((BDMA_Channel_TypeDef *)hdma->Instance)->CCR = registerValue; 8005c14: 687b ldr r3, [r7, #4] 8005c16: 681b ldr r3, [r3, #0] 8005c18: 697a ldr r2, [r7, #20] 8005c1a: 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; 8005c1c: 687b ldr r3, [r7, #4] 8005c1e: 681b ldr r3, [r3, #0] 8005c20: 461a mov r2, r3 8005c22: 4b6e ldr r3, [pc, #440] @ (8005ddc ) 8005c24: 4413 add r3, r2 8005c26: 4a6e ldr r2, [pc, #440] @ (8005de0 ) 8005c28: fba2 2303 umull r2, r3, r2, r3 8005c2c: 091b lsrs r3, r3, #4 8005c2e: 009a lsls r2, r3, #2 8005c30: 687b ldr r3, [r7, #4] 8005c32: 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); 8005c34: 6878 ldr r0, [r7, #4] 8005c36: f001 fd93 bl 8007760 8005c3a: 4603 mov r3, r0 8005c3c: 60fb str r3, [r7, #12] /* Clear all interrupt flags */ regs_bdma->IFCR = ((BDMA_IFCR_CGIF0) << (hdma->StreamIndex & 0x1FU)); 8005c3e: 687b ldr r3, [r7, #4] 8005c40: 6ddb ldr r3, [r3, #92] @ 0x5c 8005c42: f003 031f and.w r3, r3, #31 8005c46: 2201 movs r2, #1 8005c48: 409a lsls r2, r3 8005c4a: 68fb ldr r3, [r7, #12] 8005c4c: 605a str r2, [r3, #4] 8005c4e: e008 b.n 8005c62 } else { hdma->ErrorCode = HAL_DMA_ERROR_PARAM; 8005c50: 687b ldr r3, [r7, #4] 8005c52: 2240 movs r2, #64 @ 0x40 8005c54: 655a str r2, [r3, #84] @ 0x54 hdma->State = HAL_DMA_STATE_ERROR; 8005c56: 687b ldr r3, [r7, #4] 8005c58: 2203 movs r2, #3 8005c5a: f883 2035 strb.w r2, [r3, #53] @ 0x35 return HAL_ERROR; 8005c5e: 2301 movs r3, #1 8005c60: e0b7 b.n 8005dd2 } if(IS_DMA_DMAMUX_ALL_INSTANCE(hdma->Instance) != 0U) /* No DMAMUX available for BDMA1 */ 8005c62: 687b ldr r3, [r7, #4] 8005c64: 681b ldr r3, [r3, #0] 8005c66: 4a5f ldr r2, [pc, #380] @ (8005de4 ) 8005c68: 4293 cmp r3, r2 8005c6a: d072 beq.n 8005d52 8005c6c: 687b ldr r3, [r7, #4] 8005c6e: 681b ldr r3, [r3, #0] 8005c70: 4a5d ldr r2, [pc, #372] @ (8005de8 ) 8005c72: 4293 cmp r3, r2 8005c74: d06d beq.n 8005d52 8005c76: 687b ldr r3, [r7, #4] 8005c78: 681b ldr r3, [r3, #0] 8005c7a: 4a5c ldr r2, [pc, #368] @ (8005dec ) 8005c7c: 4293 cmp r3, r2 8005c7e: d068 beq.n 8005d52 8005c80: 687b ldr r3, [r7, #4] 8005c82: 681b ldr r3, [r3, #0] 8005c84: 4a5a ldr r2, [pc, #360] @ (8005df0 ) 8005c86: 4293 cmp r3, r2 8005c88: d063 beq.n 8005d52 8005c8a: 687b ldr r3, [r7, #4] 8005c8c: 681b ldr r3, [r3, #0] 8005c8e: 4a59 ldr r2, [pc, #356] @ (8005df4 ) 8005c90: 4293 cmp r3, r2 8005c92: d05e beq.n 8005d52 8005c94: 687b ldr r3, [r7, #4] 8005c96: 681b ldr r3, [r3, #0] 8005c98: 4a57 ldr r2, [pc, #348] @ (8005df8 ) 8005c9a: 4293 cmp r3, r2 8005c9c: d059 beq.n 8005d52 8005c9e: 687b ldr r3, [r7, #4] 8005ca0: 681b ldr r3, [r3, #0] 8005ca2: 4a56 ldr r2, [pc, #344] @ (8005dfc ) 8005ca4: 4293 cmp r3, r2 8005ca6: d054 beq.n 8005d52 8005ca8: 687b ldr r3, [r7, #4] 8005caa: 681b ldr r3, [r3, #0] 8005cac: 4a54 ldr r2, [pc, #336] @ (8005e00 ) 8005cae: 4293 cmp r3, r2 8005cb0: d04f beq.n 8005d52 8005cb2: 687b ldr r3, [r7, #4] 8005cb4: 681b ldr r3, [r3, #0] 8005cb6: 4a53 ldr r2, [pc, #332] @ (8005e04 ) 8005cb8: 4293 cmp r3, r2 8005cba: d04a beq.n 8005d52 8005cbc: 687b ldr r3, [r7, #4] 8005cbe: 681b ldr r3, [r3, #0] 8005cc0: 4a51 ldr r2, [pc, #324] @ (8005e08 ) 8005cc2: 4293 cmp r3, r2 8005cc4: d045 beq.n 8005d52 8005cc6: 687b ldr r3, [r7, #4] 8005cc8: 681b ldr r3, [r3, #0] 8005cca: 4a50 ldr r2, [pc, #320] @ (8005e0c ) 8005ccc: 4293 cmp r3, r2 8005cce: d040 beq.n 8005d52 8005cd0: 687b ldr r3, [r7, #4] 8005cd2: 681b ldr r3, [r3, #0] 8005cd4: 4a4e ldr r2, [pc, #312] @ (8005e10 ) 8005cd6: 4293 cmp r3, r2 8005cd8: d03b beq.n 8005d52 8005cda: 687b ldr r3, [r7, #4] 8005cdc: 681b ldr r3, [r3, #0] 8005cde: 4a4d ldr r2, [pc, #308] @ (8005e14 ) 8005ce0: 4293 cmp r3, r2 8005ce2: d036 beq.n 8005d52 8005ce4: 687b ldr r3, [r7, #4] 8005ce6: 681b ldr r3, [r3, #0] 8005ce8: 4a4b ldr r2, [pc, #300] @ (8005e18 ) 8005cea: 4293 cmp r3, r2 8005cec: d031 beq.n 8005d52 8005cee: 687b ldr r3, [r7, #4] 8005cf0: 681b ldr r3, [r3, #0] 8005cf2: 4a4a ldr r2, [pc, #296] @ (8005e1c ) 8005cf4: 4293 cmp r3, r2 8005cf6: d02c beq.n 8005d52 8005cf8: 687b ldr r3, [r7, #4] 8005cfa: 681b ldr r3, [r3, #0] 8005cfc: 4a48 ldr r2, [pc, #288] @ (8005e20 ) 8005cfe: 4293 cmp r3, r2 8005d00: d027 beq.n 8005d52 8005d02: 687b ldr r3, [r7, #4] 8005d04: 681b ldr r3, [r3, #0] 8005d06: 4a47 ldr r2, [pc, #284] @ (8005e24 ) 8005d08: 4293 cmp r3, r2 8005d0a: d022 beq.n 8005d52 8005d0c: 687b ldr r3, [r7, #4] 8005d0e: 681b ldr r3, [r3, #0] 8005d10: 4a45 ldr r2, [pc, #276] @ (8005e28 ) 8005d12: 4293 cmp r3, r2 8005d14: d01d beq.n 8005d52 8005d16: 687b ldr r3, [r7, #4] 8005d18: 681b ldr r3, [r3, #0] 8005d1a: 4a44 ldr r2, [pc, #272] @ (8005e2c ) 8005d1c: 4293 cmp r3, r2 8005d1e: d018 beq.n 8005d52 8005d20: 687b ldr r3, [r7, #4] 8005d22: 681b ldr r3, [r3, #0] 8005d24: 4a42 ldr r2, [pc, #264] @ (8005e30 ) 8005d26: 4293 cmp r3, r2 8005d28: d013 beq.n 8005d52 8005d2a: 687b ldr r3, [r7, #4] 8005d2c: 681b ldr r3, [r3, #0] 8005d2e: 4a41 ldr r2, [pc, #260] @ (8005e34 ) 8005d30: 4293 cmp r3, r2 8005d32: d00e beq.n 8005d52 8005d34: 687b ldr r3, [r7, #4] 8005d36: 681b ldr r3, [r3, #0] 8005d38: 4a3f ldr r2, [pc, #252] @ (8005e38 ) 8005d3a: 4293 cmp r3, r2 8005d3c: d009 beq.n 8005d52 8005d3e: 687b ldr r3, [r7, #4] 8005d40: 681b ldr r3, [r3, #0] 8005d42: 4a3e ldr r2, [pc, #248] @ (8005e3c ) 8005d44: 4293 cmp r3, r2 8005d46: d004 beq.n 8005d52 8005d48: 687b ldr r3, [r7, #4] 8005d4a: 681b ldr r3, [r3, #0] 8005d4c: 4a3c ldr r2, [pc, #240] @ (8005e40 ) 8005d4e: 4293 cmp r3, r2 8005d50: d101 bne.n 8005d56 8005d52: 2301 movs r3, #1 8005d54: e000 b.n 8005d58 8005d56: 2300 movs r3, #0 8005d58: 2b00 cmp r3, #0 8005d5a: d032 beq.n 8005dc2 { /* Initialize parameters for DMAMUX channel : DMAmuxChannel, DMAmuxChannelStatus and DMAmuxChannelStatusMask */ DMA_CalcDMAMUXChannelBaseAndMask(hdma); 8005d5c: 6878 ldr r0, [r7, #4] 8005d5e: f001 fe2d bl 80079bc if(hdma->Init.Direction == DMA_MEMORY_TO_MEMORY) 8005d62: 687b ldr r3, [r7, #4] 8005d64: 689b ldr r3, [r3, #8] 8005d66: 2b80 cmp r3, #128 @ 0x80 8005d68: d102 bne.n 8005d70 { /* if memory to memory force the request to 0*/ hdma->Init.Request = DMA_REQUEST_MEM2MEM; 8005d6a: 687b ldr r3, [r7, #4] 8005d6c: 2200 movs r2, #0 8005d6e: 605a str r2, [r3, #4] } /* Set peripheral request to DMAMUX channel */ hdma->DMAmuxChannel->CCR = (hdma->Init.Request & DMAMUX_CxCR_DMAREQ_ID); 8005d70: 687b ldr r3, [r7, #4] 8005d72: 685a ldr r2, [r3, #4] 8005d74: 687b ldr r3, [r7, #4] 8005d76: 6e1b ldr r3, [r3, #96] @ 0x60 8005d78: b2d2 uxtb r2, r2 8005d7a: 601a str r2, [r3, #0] /* Clear the DMAMUX synchro overrun flag */ hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask; 8005d7c: 687b ldr r3, [r7, #4] 8005d7e: 6e5b ldr r3, [r3, #100] @ 0x64 8005d80: 687a ldr r2, [r7, #4] 8005d82: 6e92 ldr r2, [r2, #104] @ 0x68 8005d84: 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)) 8005d86: 687b ldr r3, [r7, #4] 8005d88: 685b ldr r3, [r3, #4] 8005d8a: 2b00 cmp r3, #0 8005d8c: d010 beq.n 8005db0 8005d8e: 687b ldr r3, [r7, #4] 8005d90: 685b ldr r3, [r3, #4] 8005d92: 2b08 cmp r3, #8 8005d94: d80c bhi.n 8005db0 { /* Initialize parameters for DMAMUX request generator : DMAmuxRequestGen, DMAmuxRequestGenStatus and DMAmuxRequestGenStatusMask */ DMA_CalcDMAMUXRequestGenBaseAndMask(hdma); 8005d96: 6878 ldr r0, [r7, #4] 8005d98: f001 feaa bl 8007af0 /* Reset the DMAMUX request generator register */ hdma->DMAmuxRequestGen->RGCR = 0U; 8005d9c: 687b ldr r3, [r7, #4] 8005d9e: 6edb ldr r3, [r3, #108] @ 0x6c 8005da0: 2200 movs r2, #0 8005da2: 601a str r2, [r3, #0] /* Clear the DMAMUX request generator overrun flag */ hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask; 8005da4: 687b ldr r3, [r7, #4] 8005da6: 6f1b ldr r3, [r3, #112] @ 0x70 8005da8: 687a ldr r2, [r7, #4] 8005daa: 6f52 ldr r2, [r2, #116] @ 0x74 8005dac: 605a str r2, [r3, #4] 8005dae: e008 b.n 8005dc2 } else { hdma->DMAmuxRequestGen = 0U; 8005db0: 687b ldr r3, [r7, #4] 8005db2: 2200 movs r2, #0 8005db4: 66da str r2, [r3, #108] @ 0x6c hdma->DMAmuxRequestGenStatus = 0U; 8005db6: 687b ldr r3, [r7, #4] 8005db8: 2200 movs r2, #0 8005dba: 671a str r2, [r3, #112] @ 0x70 hdma->DMAmuxRequestGenStatusMask = 0U; 8005dbc: 687b ldr r3, [r7, #4] 8005dbe: 2200 movs r2, #0 8005dc0: 675a str r2, [r3, #116] @ 0x74 } } /* Initialize the error code */ hdma->ErrorCode = HAL_DMA_ERROR_NONE; 8005dc2: 687b ldr r3, [r7, #4] 8005dc4: 2200 movs r2, #0 8005dc6: 655a str r2, [r3, #84] @ 0x54 /* Initialize the DMA state */ hdma->State = HAL_DMA_STATE_READY; 8005dc8: 687b ldr r3, [r7, #4] 8005dca: 2201 movs r2, #1 8005dcc: f883 2035 strb.w r2, [r3, #53] @ 0x35 return HAL_OK; 8005dd0: 2300 movs r3, #0 } 8005dd2: 4618 mov r0, r3 8005dd4: 3718 adds r7, #24 8005dd6: 46bd mov sp, r7 8005dd8: bd80 pop {r7, pc} 8005dda: bf00 nop 8005ddc: a7fdabf8 .word 0xa7fdabf8 8005de0: cccccccd .word 0xcccccccd 8005de4: 40020010 .word 0x40020010 8005de8: 40020028 .word 0x40020028 8005dec: 40020040 .word 0x40020040 8005df0: 40020058 .word 0x40020058 8005df4: 40020070 .word 0x40020070 8005df8: 40020088 .word 0x40020088 8005dfc: 400200a0 .word 0x400200a0 8005e00: 400200b8 .word 0x400200b8 8005e04: 40020410 .word 0x40020410 8005e08: 40020428 .word 0x40020428 8005e0c: 40020440 .word 0x40020440 8005e10: 40020458 .word 0x40020458 8005e14: 40020470 .word 0x40020470 8005e18: 40020488 .word 0x40020488 8005e1c: 400204a0 .word 0x400204a0 8005e20: 400204b8 .word 0x400204b8 8005e24: 58025408 .word 0x58025408 8005e28: 5802541c .word 0x5802541c 8005e2c: 58025430 .word 0x58025430 8005e30: 58025444 .word 0x58025444 8005e34: 58025458 .word 0x58025458 8005e38: 5802546c .word 0x5802546c 8005e3c: 58025480 .word 0x58025480 8005e40: 58025494 .word 0x58025494 08005e44 : * 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) { 8005e44: b580 push {r7, lr} 8005e46: b086 sub sp, #24 8005e48: af00 add r7, sp, #0 8005e4a: 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(); 8005e4c: f7ff f8f0 bl 8005030 8005e50: 6138 str r0, [r7, #16] /* Check the DMA peripheral handle */ if(hdma == NULL) 8005e52: 687b ldr r3, [r7, #4] 8005e54: 2b00 cmp r3, #0 8005e56: d101 bne.n 8005e5c { return HAL_ERROR; 8005e58: 2301 movs r3, #1 8005e5a: e2dc b.n 8006416 } /* Check the DMA peripheral state */ if(hdma->State != HAL_DMA_STATE_BUSY) 8005e5c: 687b ldr r3, [r7, #4] 8005e5e: f893 3035 ldrb.w r3, [r3, #53] @ 0x35 8005e62: b2db uxtb r3, r3 8005e64: 2b02 cmp r3, #2 8005e66: d008 beq.n 8005e7a { hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER; 8005e68: 687b ldr r3, [r7, #4] 8005e6a: 2280 movs r2, #128 @ 0x80 8005e6c: 655a str r2, [r3, #84] @ 0x54 /* Process Unlocked */ __HAL_UNLOCK(hdma); 8005e6e: 687b ldr r3, [r7, #4] 8005e70: 2200 movs r2, #0 8005e72: f883 2034 strb.w r2, [r3, #52] @ 0x34 return HAL_ERROR; 8005e76: 2301 movs r3, #1 8005e78: e2cd b.n 8006416 } else { /* Disable all the transfer interrupts */ if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 8005e7a: 687b ldr r3, [r7, #4] 8005e7c: 681b ldr r3, [r3, #0] 8005e7e: 4a76 ldr r2, [pc, #472] @ (8006058 ) 8005e80: 4293 cmp r3, r2 8005e82: d04a beq.n 8005f1a 8005e84: 687b ldr r3, [r7, #4] 8005e86: 681b ldr r3, [r3, #0] 8005e88: 4a74 ldr r2, [pc, #464] @ (800605c ) 8005e8a: 4293 cmp r3, r2 8005e8c: d045 beq.n 8005f1a 8005e8e: 687b ldr r3, [r7, #4] 8005e90: 681b ldr r3, [r3, #0] 8005e92: 4a73 ldr r2, [pc, #460] @ (8006060 ) 8005e94: 4293 cmp r3, r2 8005e96: d040 beq.n 8005f1a 8005e98: 687b ldr r3, [r7, #4] 8005e9a: 681b ldr r3, [r3, #0] 8005e9c: 4a71 ldr r2, [pc, #452] @ (8006064 ) 8005e9e: 4293 cmp r3, r2 8005ea0: d03b beq.n 8005f1a 8005ea2: 687b ldr r3, [r7, #4] 8005ea4: 681b ldr r3, [r3, #0] 8005ea6: 4a70 ldr r2, [pc, #448] @ (8006068 ) 8005ea8: 4293 cmp r3, r2 8005eaa: d036 beq.n 8005f1a 8005eac: 687b ldr r3, [r7, #4] 8005eae: 681b ldr r3, [r3, #0] 8005eb0: 4a6e ldr r2, [pc, #440] @ (800606c ) 8005eb2: 4293 cmp r3, r2 8005eb4: d031 beq.n 8005f1a 8005eb6: 687b ldr r3, [r7, #4] 8005eb8: 681b ldr r3, [r3, #0] 8005eba: 4a6d ldr r2, [pc, #436] @ (8006070 ) 8005ebc: 4293 cmp r3, r2 8005ebe: d02c beq.n 8005f1a 8005ec0: 687b ldr r3, [r7, #4] 8005ec2: 681b ldr r3, [r3, #0] 8005ec4: 4a6b ldr r2, [pc, #428] @ (8006074 ) 8005ec6: 4293 cmp r3, r2 8005ec8: d027 beq.n 8005f1a 8005eca: 687b ldr r3, [r7, #4] 8005ecc: 681b ldr r3, [r3, #0] 8005ece: 4a6a ldr r2, [pc, #424] @ (8006078 ) 8005ed0: 4293 cmp r3, r2 8005ed2: d022 beq.n 8005f1a 8005ed4: 687b ldr r3, [r7, #4] 8005ed6: 681b ldr r3, [r3, #0] 8005ed8: 4a68 ldr r2, [pc, #416] @ (800607c ) 8005eda: 4293 cmp r3, r2 8005edc: d01d beq.n 8005f1a 8005ede: 687b ldr r3, [r7, #4] 8005ee0: 681b ldr r3, [r3, #0] 8005ee2: 4a67 ldr r2, [pc, #412] @ (8006080 ) 8005ee4: 4293 cmp r3, r2 8005ee6: d018 beq.n 8005f1a 8005ee8: 687b ldr r3, [r7, #4] 8005eea: 681b ldr r3, [r3, #0] 8005eec: 4a65 ldr r2, [pc, #404] @ (8006084 ) 8005eee: 4293 cmp r3, r2 8005ef0: d013 beq.n 8005f1a 8005ef2: 687b ldr r3, [r7, #4] 8005ef4: 681b ldr r3, [r3, #0] 8005ef6: 4a64 ldr r2, [pc, #400] @ (8006088 ) 8005ef8: 4293 cmp r3, r2 8005efa: d00e beq.n 8005f1a 8005efc: 687b ldr r3, [r7, #4] 8005efe: 681b ldr r3, [r3, #0] 8005f00: 4a62 ldr r2, [pc, #392] @ (800608c ) 8005f02: 4293 cmp r3, r2 8005f04: d009 beq.n 8005f1a 8005f06: 687b ldr r3, [r7, #4] 8005f08: 681b ldr r3, [r3, #0] 8005f0a: 4a61 ldr r2, [pc, #388] @ (8006090 ) 8005f0c: 4293 cmp r3, r2 8005f0e: d004 beq.n 8005f1a 8005f10: 687b ldr r3, [r7, #4] 8005f12: 681b ldr r3, [r3, #0] 8005f14: 4a5f ldr r2, [pc, #380] @ (8006094 ) 8005f16: 4293 cmp r3, r2 8005f18: d101 bne.n 8005f1e 8005f1a: 2301 movs r3, #1 8005f1c: e000 b.n 8005f20 8005f1e: 2300 movs r3, #0 8005f20: 2b00 cmp r3, #0 8005f22: d013 beq.n 8005f4c { /* Disable DMA All Interrupts */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_TC | DMA_IT_TE | DMA_IT_DME | DMA_IT_HT); 8005f24: 687b ldr r3, [r7, #4] 8005f26: 681b ldr r3, [r3, #0] 8005f28: 681a ldr r2, [r3, #0] 8005f2a: 687b ldr r3, [r7, #4] 8005f2c: 681b ldr r3, [r3, #0] 8005f2e: f022 021e bic.w r2, r2, #30 8005f32: 601a str r2, [r3, #0] ((DMA_Stream_TypeDef *)hdma->Instance)->FCR &= ~(DMA_IT_FE); 8005f34: 687b ldr r3, [r7, #4] 8005f36: 681b ldr r3, [r3, #0] 8005f38: 695a ldr r2, [r3, #20] 8005f3a: 687b ldr r3, [r7, #4] 8005f3c: 681b ldr r3, [r3, #0] 8005f3e: f022 0280 bic.w r2, r2, #128 @ 0x80 8005f42: 615a str r2, [r3, #20] enableRegister = (__IO uint32_t *)(&(((DMA_Stream_TypeDef *)hdma->Instance)->CR)); 8005f44: 687b ldr r3, [r7, #4] 8005f46: 681b ldr r3, [r3, #0] 8005f48: 617b str r3, [r7, #20] 8005f4a: e00a b.n 8005f62 } else /* BDMA channel */ { /* Disable DMA All Interrupts */ ((BDMA_Channel_TypeDef *)hdma->Instance)->CCR &= ~(BDMA_CCR_TCIE | BDMA_CCR_HTIE | BDMA_CCR_TEIE); 8005f4c: 687b ldr r3, [r7, #4] 8005f4e: 681b ldr r3, [r3, #0] 8005f50: 681a ldr r2, [r3, #0] 8005f52: 687b ldr r3, [r7, #4] 8005f54: 681b ldr r3, [r3, #0] 8005f56: f022 020e bic.w r2, r2, #14 8005f5a: 601a str r2, [r3, #0] enableRegister = (__IO uint32_t *)(&(((BDMA_Channel_TypeDef *)hdma->Instance)->CCR)); 8005f5c: 687b ldr r3, [r7, #4] 8005f5e: 681b ldr r3, [r3, #0] 8005f60: 617b str r3, [r7, #20] } if(IS_DMA_DMAMUX_ALL_INSTANCE(hdma->Instance) != 0U) /* No DMAMUX available for BDMA1 */ 8005f62: 687b ldr r3, [r7, #4] 8005f64: 681b ldr r3, [r3, #0] 8005f66: 4a3c ldr r2, [pc, #240] @ (8006058 ) 8005f68: 4293 cmp r3, r2 8005f6a: d072 beq.n 8006052 8005f6c: 687b ldr r3, [r7, #4] 8005f6e: 681b ldr r3, [r3, #0] 8005f70: 4a3a ldr r2, [pc, #232] @ (800605c ) 8005f72: 4293 cmp r3, r2 8005f74: d06d beq.n 8006052 8005f76: 687b ldr r3, [r7, #4] 8005f78: 681b ldr r3, [r3, #0] 8005f7a: 4a39 ldr r2, [pc, #228] @ (8006060 ) 8005f7c: 4293 cmp r3, r2 8005f7e: d068 beq.n 8006052 8005f80: 687b ldr r3, [r7, #4] 8005f82: 681b ldr r3, [r3, #0] 8005f84: 4a37 ldr r2, [pc, #220] @ (8006064 ) 8005f86: 4293 cmp r3, r2 8005f88: d063 beq.n 8006052 8005f8a: 687b ldr r3, [r7, #4] 8005f8c: 681b ldr r3, [r3, #0] 8005f8e: 4a36 ldr r2, [pc, #216] @ (8006068 ) 8005f90: 4293 cmp r3, r2 8005f92: d05e beq.n 8006052 8005f94: 687b ldr r3, [r7, #4] 8005f96: 681b ldr r3, [r3, #0] 8005f98: 4a34 ldr r2, [pc, #208] @ (800606c ) 8005f9a: 4293 cmp r3, r2 8005f9c: d059 beq.n 8006052 8005f9e: 687b ldr r3, [r7, #4] 8005fa0: 681b ldr r3, [r3, #0] 8005fa2: 4a33 ldr r2, [pc, #204] @ (8006070 ) 8005fa4: 4293 cmp r3, r2 8005fa6: d054 beq.n 8006052 8005fa8: 687b ldr r3, [r7, #4] 8005faa: 681b ldr r3, [r3, #0] 8005fac: 4a31 ldr r2, [pc, #196] @ (8006074 ) 8005fae: 4293 cmp r3, r2 8005fb0: d04f beq.n 8006052 8005fb2: 687b ldr r3, [r7, #4] 8005fb4: 681b ldr r3, [r3, #0] 8005fb6: 4a30 ldr r2, [pc, #192] @ (8006078 ) 8005fb8: 4293 cmp r3, r2 8005fba: d04a beq.n 8006052 8005fbc: 687b ldr r3, [r7, #4] 8005fbe: 681b ldr r3, [r3, #0] 8005fc0: 4a2e ldr r2, [pc, #184] @ (800607c ) 8005fc2: 4293 cmp r3, r2 8005fc4: d045 beq.n 8006052 8005fc6: 687b ldr r3, [r7, #4] 8005fc8: 681b ldr r3, [r3, #0] 8005fca: 4a2d ldr r2, [pc, #180] @ (8006080 ) 8005fcc: 4293 cmp r3, r2 8005fce: d040 beq.n 8006052 8005fd0: 687b ldr r3, [r7, #4] 8005fd2: 681b ldr r3, [r3, #0] 8005fd4: 4a2b ldr r2, [pc, #172] @ (8006084 ) 8005fd6: 4293 cmp r3, r2 8005fd8: d03b beq.n 8006052 8005fda: 687b ldr r3, [r7, #4] 8005fdc: 681b ldr r3, [r3, #0] 8005fde: 4a2a ldr r2, [pc, #168] @ (8006088 ) 8005fe0: 4293 cmp r3, r2 8005fe2: d036 beq.n 8006052 8005fe4: 687b ldr r3, [r7, #4] 8005fe6: 681b ldr r3, [r3, #0] 8005fe8: 4a28 ldr r2, [pc, #160] @ (800608c ) 8005fea: 4293 cmp r3, r2 8005fec: d031 beq.n 8006052 8005fee: 687b ldr r3, [r7, #4] 8005ff0: 681b ldr r3, [r3, #0] 8005ff2: 4a27 ldr r2, [pc, #156] @ (8006090 ) 8005ff4: 4293 cmp r3, r2 8005ff6: d02c beq.n 8006052 8005ff8: 687b ldr r3, [r7, #4] 8005ffa: 681b ldr r3, [r3, #0] 8005ffc: 4a25 ldr r2, [pc, #148] @ (8006094 ) 8005ffe: 4293 cmp r3, r2 8006000: d027 beq.n 8006052 8006002: 687b ldr r3, [r7, #4] 8006004: 681b ldr r3, [r3, #0] 8006006: 4a24 ldr r2, [pc, #144] @ (8006098 ) 8006008: 4293 cmp r3, r2 800600a: d022 beq.n 8006052 800600c: 687b ldr r3, [r7, #4] 800600e: 681b ldr r3, [r3, #0] 8006010: 4a22 ldr r2, [pc, #136] @ (800609c ) 8006012: 4293 cmp r3, r2 8006014: d01d beq.n 8006052 8006016: 687b ldr r3, [r7, #4] 8006018: 681b ldr r3, [r3, #0] 800601a: 4a21 ldr r2, [pc, #132] @ (80060a0 ) 800601c: 4293 cmp r3, r2 800601e: d018 beq.n 8006052 8006020: 687b ldr r3, [r7, #4] 8006022: 681b ldr r3, [r3, #0] 8006024: 4a1f ldr r2, [pc, #124] @ (80060a4 ) 8006026: 4293 cmp r3, r2 8006028: d013 beq.n 8006052 800602a: 687b ldr r3, [r7, #4] 800602c: 681b ldr r3, [r3, #0] 800602e: 4a1e ldr r2, [pc, #120] @ (80060a8 ) 8006030: 4293 cmp r3, r2 8006032: d00e beq.n 8006052 8006034: 687b ldr r3, [r7, #4] 8006036: 681b ldr r3, [r3, #0] 8006038: 4a1c ldr r2, [pc, #112] @ (80060ac ) 800603a: 4293 cmp r3, r2 800603c: d009 beq.n 8006052 800603e: 687b ldr r3, [r7, #4] 8006040: 681b ldr r3, [r3, #0] 8006042: 4a1b ldr r2, [pc, #108] @ (80060b0 ) 8006044: 4293 cmp r3, r2 8006046: d004 beq.n 8006052 8006048: 687b ldr r3, [r7, #4] 800604a: 681b ldr r3, [r3, #0] 800604c: 4a19 ldr r2, [pc, #100] @ (80060b4 ) 800604e: 4293 cmp r3, r2 8006050: d132 bne.n 80060b8 8006052: 2301 movs r3, #1 8006054: e031 b.n 80060ba 8006056: bf00 nop 8006058: 40020010 .word 0x40020010 800605c: 40020028 .word 0x40020028 8006060: 40020040 .word 0x40020040 8006064: 40020058 .word 0x40020058 8006068: 40020070 .word 0x40020070 800606c: 40020088 .word 0x40020088 8006070: 400200a0 .word 0x400200a0 8006074: 400200b8 .word 0x400200b8 8006078: 40020410 .word 0x40020410 800607c: 40020428 .word 0x40020428 8006080: 40020440 .word 0x40020440 8006084: 40020458 .word 0x40020458 8006088: 40020470 .word 0x40020470 800608c: 40020488 .word 0x40020488 8006090: 400204a0 .word 0x400204a0 8006094: 400204b8 .word 0x400204b8 8006098: 58025408 .word 0x58025408 800609c: 5802541c .word 0x5802541c 80060a0: 58025430 .word 0x58025430 80060a4: 58025444 .word 0x58025444 80060a8: 58025458 .word 0x58025458 80060ac: 5802546c .word 0x5802546c 80060b0: 58025480 .word 0x58025480 80060b4: 58025494 .word 0x58025494 80060b8: 2300 movs r3, #0 80060ba: 2b00 cmp r3, #0 80060bc: d007 beq.n 80060ce { /* disable the DMAMUX sync overrun IT */ hdma->DMAmuxChannel->CCR &= ~DMAMUX_CxCR_SOIE; 80060be: 687b ldr r3, [r7, #4] 80060c0: 6e1b ldr r3, [r3, #96] @ 0x60 80060c2: 681a ldr r2, [r3, #0] 80060c4: 687b ldr r3, [r7, #4] 80060c6: 6e1b ldr r3, [r3, #96] @ 0x60 80060c8: f422 7280 bic.w r2, r2, #256 @ 0x100 80060cc: 601a str r2, [r3, #0] } /* Disable the stream */ __HAL_DMA_DISABLE(hdma); 80060ce: 687b ldr r3, [r7, #4] 80060d0: 681b ldr r3, [r3, #0] 80060d2: 4a6d ldr r2, [pc, #436] @ (8006288 ) 80060d4: 4293 cmp r3, r2 80060d6: d04a beq.n 800616e 80060d8: 687b ldr r3, [r7, #4] 80060da: 681b ldr r3, [r3, #0] 80060dc: 4a6b ldr r2, [pc, #428] @ (800628c ) 80060de: 4293 cmp r3, r2 80060e0: d045 beq.n 800616e 80060e2: 687b ldr r3, [r7, #4] 80060e4: 681b ldr r3, [r3, #0] 80060e6: 4a6a ldr r2, [pc, #424] @ (8006290 ) 80060e8: 4293 cmp r3, r2 80060ea: d040 beq.n 800616e 80060ec: 687b ldr r3, [r7, #4] 80060ee: 681b ldr r3, [r3, #0] 80060f0: 4a68 ldr r2, [pc, #416] @ (8006294 ) 80060f2: 4293 cmp r3, r2 80060f4: d03b beq.n 800616e 80060f6: 687b ldr r3, [r7, #4] 80060f8: 681b ldr r3, [r3, #0] 80060fa: 4a67 ldr r2, [pc, #412] @ (8006298 ) 80060fc: 4293 cmp r3, r2 80060fe: d036 beq.n 800616e 8006100: 687b ldr r3, [r7, #4] 8006102: 681b ldr r3, [r3, #0] 8006104: 4a65 ldr r2, [pc, #404] @ (800629c ) 8006106: 4293 cmp r3, r2 8006108: d031 beq.n 800616e 800610a: 687b ldr r3, [r7, #4] 800610c: 681b ldr r3, [r3, #0] 800610e: 4a64 ldr r2, [pc, #400] @ (80062a0 ) 8006110: 4293 cmp r3, r2 8006112: d02c beq.n 800616e 8006114: 687b ldr r3, [r7, #4] 8006116: 681b ldr r3, [r3, #0] 8006118: 4a62 ldr r2, [pc, #392] @ (80062a4 ) 800611a: 4293 cmp r3, r2 800611c: d027 beq.n 800616e 800611e: 687b ldr r3, [r7, #4] 8006120: 681b ldr r3, [r3, #0] 8006122: 4a61 ldr r2, [pc, #388] @ (80062a8 ) 8006124: 4293 cmp r3, r2 8006126: d022 beq.n 800616e 8006128: 687b ldr r3, [r7, #4] 800612a: 681b ldr r3, [r3, #0] 800612c: 4a5f ldr r2, [pc, #380] @ (80062ac ) 800612e: 4293 cmp r3, r2 8006130: d01d beq.n 800616e 8006132: 687b ldr r3, [r7, #4] 8006134: 681b ldr r3, [r3, #0] 8006136: 4a5e ldr r2, [pc, #376] @ (80062b0 ) 8006138: 4293 cmp r3, r2 800613a: d018 beq.n 800616e 800613c: 687b ldr r3, [r7, #4] 800613e: 681b ldr r3, [r3, #0] 8006140: 4a5c ldr r2, [pc, #368] @ (80062b4 ) 8006142: 4293 cmp r3, r2 8006144: d013 beq.n 800616e 8006146: 687b ldr r3, [r7, #4] 8006148: 681b ldr r3, [r3, #0] 800614a: 4a5b ldr r2, [pc, #364] @ (80062b8 ) 800614c: 4293 cmp r3, r2 800614e: d00e beq.n 800616e 8006150: 687b ldr r3, [r7, #4] 8006152: 681b ldr r3, [r3, #0] 8006154: 4a59 ldr r2, [pc, #356] @ (80062bc ) 8006156: 4293 cmp r3, r2 8006158: d009 beq.n 800616e 800615a: 687b ldr r3, [r7, #4] 800615c: 681b ldr r3, [r3, #0] 800615e: 4a58 ldr r2, [pc, #352] @ (80062c0 ) 8006160: 4293 cmp r3, r2 8006162: d004 beq.n 800616e 8006164: 687b ldr r3, [r7, #4] 8006166: 681b ldr r3, [r3, #0] 8006168: 4a56 ldr r2, [pc, #344] @ (80062c4 ) 800616a: 4293 cmp r3, r2 800616c: d108 bne.n 8006180 800616e: 687b ldr r3, [r7, #4] 8006170: 681b ldr r3, [r3, #0] 8006172: 681a ldr r2, [r3, #0] 8006174: 687b ldr r3, [r7, #4] 8006176: 681b ldr r3, [r3, #0] 8006178: f022 0201 bic.w r2, r2, #1 800617c: 601a str r2, [r3, #0] 800617e: e007 b.n 8006190 8006180: 687b ldr r3, [r7, #4] 8006182: 681b ldr r3, [r3, #0] 8006184: 681a ldr r2, [r3, #0] 8006186: 687b ldr r3, [r7, #4] 8006188: 681b ldr r3, [r3, #0] 800618a: f022 0201 bic.w r2, r2, #1 800618e: 601a str r2, [r3, #0] /* Check if the DMA Stream is effectively disabled */ while(((*enableRegister) & DMA_SxCR_EN) != 0U) 8006190: e013 b.n 80061ba { /* Check for the Timeout */ if((HAL_GetTick() - tickstart ) > HAL_TIMEOUT_DMA_ABORT) 8006192: f7fe ff4d bl 8005030 8006196: 4602 mov r2, r0 8006198: 693b ldr r3, [r7, #16] 800619a: 1ad3 subs r3, r2, r3 800619c: 2b05 cmp r3, #5 800619e: d90c bls.n 80061ba { /* Update error code */ hdma->ErrorCode = HAL_DMA_ERROR_TIMEOUT; 80061a0: 687b ldr r3, [r7, #4] 80061a2: 2220 movs r2, #32 80061a4: 655a str r2, [r3, #84] @ 0x54 /* Change the DMA state */ hdma->State = HAL_DMA_STATE_ERROR; 80061a6: 687b ldr r3, [r7, #4] 80061a8: 2203 movs r2, #3 80061aa: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 80061ae: 687b ldr r3, [r7, #4] 80061b0: 2200 movs r2, #0 80061b2: f883 2034 strb.w r2, [r3, #52] @ 0x34 return HAL_ERROR; 80061b6: 2301 movs r3, #1 80061b8: e12d b.n 8006416 while(((*enableRegister) & DMA_SxCR_EN) != 0U) 80061ba: 697b ldr r3, [r7, #20] 80061bc: 681b ldr r3, [r3, #0] 80061be: f003 0301 and.w r3, r3, #1 80061c2: 2b00 cmp r3, #0 80061c4: d1e5 bne.n 8006192 } } /* Clear all interrupt flags at correct offset within the register */ if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 80061c6: 687b ldr r3, [r7, #4] 80061c8: 681b ldr r3, [r3, #0] 80061ca: 4a2f ldr r2, [pc, #188] @ (8006288 ) 80061cc: 4293 cmp r3, r2 80061ce: d04a beq.n 8006266 80061d0: 687b ldr r3, [r7, #4] 80061d2: 681b ldr r3, [r3, #0] 80061d4: 4a2d ldr r2, [pc, #180] @ (800628c ) 80061d6: 4293 cmp r3, r2 80061d8: d045 beq.n 8006266 80061da: 687b ldr r3, [r7, #4] 80061dc: 681b ldr r3, [r3, #0] 80061de: 4a2c ldr r2, [pc, #176] @ (8006290 ) 80061e0: 4293 cmp r3, r2 80061e2: d040 beq.n 8006266 80061e4: 687b ldr r3, [r7, #4] 80061e6: 681b ldr r3, [r3, #0] 80061e8: 4a2a ldr r2, [pc, #168] @ (8006294 ) 80061ea: 4293 cmp r3, r2 80061ec: d03b beq.n 8006266 80061ee: 687b ldr r3, [r7, #4] 80061f0: 681b ldr r3, [r3, #0] 80061f2: 4a29 ldr r2, [pc, #164] @ (8006298 ) 80061f4: 4293 cmp r3, r2 80061f6: d036 beq.n 8006266 80061f8: 687b ldr r3, [r7, #4] 80061fa: 681b ldr r3, [r3, #0] 80061fc: 4a27 ldr r2, [pc, #156] @ (800629c ) 80061fe: 4293 cmp r3, r2 8006200: d031 beq.n 8006266 8006202: 687b ldr r3, [r7, #4] 8006204: 681b ldr r3, [r3, #0] 8006206: 4a26 ldr r2, [pc, #152] @ (80062a0 ) 8006208: 4293 cmp r3, r2 800620a: d02c beq.n 8006266 800620c: 687b ldr r3, [r7, #4] 800620e: 681b ldr r3, [r3, #0] 8006210: 4a24 ldr r2, [pc, #144] @ (80062a4 ) 8006212: 4293 cmp r3, r2 8006214: d027 beq.n 8006266 8006216: 687b ldr r3, [r7, #4] 8006218: 681b ldr r3, [r3, #0] 800621a: 4a23 ldr r2, [pc, #140] @ (80062a8 ) 800621c: 4293 cmp r3, r2 800621e: d022 beq.n 8006266 8006220: 687b ldr r3, [r7, #4] 8006222: 681b ldr r3, [r3, #0] 8006224: 4a21 ldr r2, [pc, #132] @ (80062ac ) 8006226: 4293 cmp r3, r2 8006228: d01d beq.n 8006266 800622a: 687b ldr r3, [r7, #4] 800622c: 681b ldr r3, [r3, #0] 800622e: 4a20 ldr r2, [pc, #128] @ (80062b0 ) 8006230: 4293 cmp r3, r2 8006232: d018 beq.n 8006266 8006234: 687b ldr r3, [r7, #4] 8006236: 681b ldr r3, [r3, #0] 8006238: 4a1e ldr r2, [pc, #120] @ (80062b4 ) 800623a: 4293 cmp r3, r2 800623c: d013 beq.n 8006266 800623e: 687b ldr r3, [r7, #4] 8006240: 681b ldr r3, [r3, #0] 8006242: 4a1d ldr r2, [pc, #116] @ (80062b8 ) 8006244: 4293 cmp r3, r2 8006246: d00e beq.n 8006266 8006248: 687b ldr r3, [r7, #4] 800624a: 681b ldr r3, [r3, #0] 800624c: 4a1b ldr r2, [pc, #108] @ (80062bc ) 800624e: 4293 cmp r3, r2 8006250: d009 beq.n 8006266 8006252: 687b ldr r3, [r7, #4] 8006254: 681b ldr r3, [r3, #0] 8006256: 4a1a ldr r2, [pc, #104] @ (80062c0 ) 8006258: 4293 cmp r3, r2 800625a: d004 beq.n 8006266 800625c: 687b ldr r3, [r7, #4] 800625e: 681b ldr r3, [r3, #0] 8006260: 4a18 ldr r2, [pc, #96] @ (80062c4 ) 8006262: 4293 cmp r3, r2 8006264: d101 bne.n 800626a 8006266: 2301 movs r3, #1 8006268: e000 b.n 800626c 800626a: 2300 movs r3, #0 800626c: 2b00 cmp r3, #0 800626e: d02b beq.n 80062c8 { regs_dma = (DMA_Base_Registers *)hdma->StreamBaseAddress; 8006270: 687b ldr r3, [r7, #4] 8006272: 6d9b ldr r3, [r3, #88] @ 0x58 8006274: 60bb str r3, [r7, #8] regs_dma->IFCR = 0x3FUL << (hdma->StreamIndex & 0x1FU); 8006276: 687b ldr r3, [r7, #4] 8006278: 6ddb ldr r3, [r3, #92] @ 0x5c 800627a: f003 031f and.w r3, r3, #31 800627e: 223f movs r2, #63 @ 0x3f 8006280: 409a lsls r2, r3 8006282: 68bb ldr r3, [r7, #8] 8006284: 609a str r2, [r3, #8] 8006286: e02a b.n 80062de 8006288: 40020010 .word 0x40020010 800628c: 40020028 .word 0x40020028 8006290: 40020040 .word 0x40020040 8006294: 40020058 .word 0x40020058 8006298: 40020070 .word 0x40020070 800629c: 40020088 .word 0x40020088 80062a0: 400200a0 .word 0x400200a0 80062a4: 400200b8 .word 0x400200b8 80062a8: 40020410 .word 0x40020410 80062ac: 40020428 .word 0x40020428 80062b0: 40020440 .word 0x40020440 80062b4: 40020458 .word 0x40020458 80062b8: 40020470 .word 0x40020470 80062bc: 40020488 .word 0x40020488 80062c0: 400204a0 .word 0x400204a0 80062c4: 400204b8 .word 0x400204b8 } else /* BDMA channel */ { regs_bdma = (BDMA_Base_Registers *)hdma->StreamBaseAddress; 80062c8: 687b ldr r3, [r7, #4] 80062ca: 6d9b ldr r3, [r3, #88] @ 0x58 80062cc: 60fb str r3, [r7, #12] regs_bdma->IFCR = ((BDMA_IFCR_CGIF0) << (hdma->StreamIndex & 0x1FU)); 80062ce: 687b ldr r3, [r7, #4] 80062d0: 6ddb ldr r3, [r3, #92] @ 0x5c 80062d2: f003 031f and.w r3, r3, #31 80062d6: 2201 movs r2, #1 80062d8: 409a lsls r2, r3 80062da: 68fb ldr r3, [r7, #12] 80062dc: 605a str r2, [r3, #4] } if(IS_DMA_DMAMUX_ALL_INSTANCE(hdma->Instance) != 0U) /* No DMAMUX available for BDMA1 */ 80062de: 687b ldr r3, [r7, #4] 80062e0: 681b ldr r3, [r3, #0] 80062e2: 4a4f ldr r2, [pc, #316] @ (8006420 ) 80062e4: 4293 cmp r3, r2 80062e6: d072 beq.n 80063ce 80062e8: 687b ldr r3, [r7, #4] 80062ea: 681b ldr r3, [r3, #0] 80062ec: 4a4d ldr r2, [pc, #308] @ (8006424 ) 80062ee: 4293 cmp r3, r2 80062f0: d06d beq.n 80063ce 80062f2: 687b ldr r3, [r7, #4] 80062f4: 681b ldr r3, [r3, #0] 80062f6: 4a4c ldr r2, [pc, #304] @ (8006428 ) 80062f8: 4293 cmp r3, r2 80062fa: d068 beq.n 80063ce 80062fc: 687b ldr r3, [r7, #4] 80062fe: 681b ldr r3, [r3, #0] 8006300: 4a4a ldr r2, [pc, #296] @ (800642c ) 8006302: 4293 cmp r3, r2 8006304: d063 beq.n 80063ce 8006306: 687b ldr r3, [r7, #4] 8006308: 681b ldr r3, [r3, #0] 800630a: 4a49 ldr r2, [pc, #292] @ (8006430 ) 800630c: 4293 cmp r3, r2 800630e: d05e beq.n 80063ce 8006310: 687b ldr r3, [r7, #4] 8006312: 681b ldr r3, [r3, #0] 8006314: 4a47 ldr r2, [pc, #284] @ (8006434 ) 8006316: 4293 cmp r3, r2 8006318: d059 beq.n 80063ce 800631a: 687b ldr r3, [r7, #4] 800631c: 681b ldr r3, [r3, #0] 800631e: 4a46 ldr r2, [pc, #280] @ (8006438 ) 8006320: 4293 cmp r3, r2 8006322: d054 beq.n 80063ce 8006324: 687b ldr r3, [r7, #4] 8006326: 681b ldr r3, [r3, #0] 8006328: 4a44 ldr r2, [pc, #272] @ (800643c ) 800632a: 4293 cmp r3, r2 800632c: d04f beq.n 80063ce 800632e: 687b ldr r3, [r7, #4] 8006330: 681b ldr r3, [r3, #0] 8006332: 4a43 ldr r2, [pc, #268] @ (8006440 ) 8006334: 4293 cmp r3, r2 8006336: d04a beq.n 80063ce 8006338: 687b ldr r3, [r7, #4] 800633a: 681b ldr r3, [r3, #0] 800633c: 4a41 ldr r2, [pc, #260] @ (8006444 ) 800633e: 4293 cmp r3, r2 8006340: d045 beq.n 80063ce 8006342: 687b ldr r3, [r7, #4] 8006344: 681b ldr r3, [r3, #0] 8006346: 4a40 ldr r2, [pc, #256] @ (8006448 ) 8006348: 4293 cmp r3, r2 800634a: d040 beq.n 80063ce 800634c: 687b ldr r3, [r7, #4] 800634e: 681b ldr r3, [r3, #0] 8006350: 4a3e ldr r2, [pc, #248] @ (800644c ) 8006352: 4293 cmp r3, r2 8006354: d03b beq.n 80063ce 8006356: 687b ldr r3, [r7, #4] 8006358: 681b ldr r3, [r3, #0] 800635a: 4a3d ldr r2, [pc, #244] @ (8006450 ) 800635c: 4293 cmp r3, r2 800635e: d036 beq.n 80063ce 8006360: 687b ldr r3, [r7, #4] 8006362: 681b ldr r3, [r3, #0] 8006364: 4a3b ldr r2, [pc, #236] @ (8006454 ) 8006366: 4293 cmp r3, r2 8006368: d031 beq.n 80063ce 800636a: 687b ldr r3, [r7, #4] 800636c: 681b ldr r3, [r3, #0] 800636e: 4a3a ldr r2, [pc, #232] @ (8006458 ) 8006370: 4293 cmp r3, r2 8006372: d02c beq.n 80063ce 8006374: 687b ldr r3, [r7, #4] 8006376: 681b ldr r3, [r3, #0] 8006378: 4a38 ldr r2, [pc, #224] @ (800645c ) 800637a: 4293 cmp r3, r2 800637c: d027 beq.n 80063ce 800637e: 687b ldr r3, [r7, #4] 8006380: 681b ldr r3, [r3, #0] 8006382: 4a37 ldr r2, [pc, #220] @ (8006460 ) 8006384: 4293 cmp r3, r2 8006386: d022 beq.n 80063ce 8006388: 687b ldr r3, [r7, #4] 800638a: 681b ldr r3, [r3, #0] 800638c: 4a35 ldr r2, [pc, #212] @ (8006464 ) 800638e: 4293 cmp r3, r2 8006390: d01d beq.n 80063ce 8006392: 687b ldr r3, [r7, #4] 8006394: 681b ldr r3, [r3, #0] 8006396: 4a34 ldr r2, [pc, #208] @ (8006468 ) 8006398: 4293 cmp r3, r2 800639a: d018 beq.n 80063ce 800639c: 687b ldr r3, [r7, #4] 800639e: 681b ldr r3, [r3, #0] 80063a0: 4a32 ldr r2, [pc, #200] @ (800646c ) 80063a2: 4293 cmp r3, r2 80063a4: d013 beq.n 80063ce 80063a6: 687b ldr r3, [r7, #4] 80063a8: 681b ldr r3, [r3, #0] 80063aa: 4a31 ldr r2, [pc, #196] @ (8006470 ) 80063ac: 4293 cmp r3, r2 80063ae: d00e beq.n 80063ce 80063b0: 687b ldr r3, [r7, #4] 80063b2: 681b ldr r3, [r3, #0] 80063b4: 4a2f ldr r2, [pc, #188] @ (8006474 ) 80063b6: 4293 cmp r3, r2 80063b8: d009 beq.n 80063ce 80063ba: 687b ldr r3, [r7, #4] 80063bc: 681b ldr r3, [r3, #0] 80063be: 4a2e ldr r2, [pc, #184] @ (8006478 ) 80063c0: 4293 cmp r3, r2 80063c2: d004 beq.n 80063ce 80063c4: 687b ldr r3, [r7, #4] 80063c6: 681b ldr r3, [r3, #0] 80063c8: 4a2c ldr r2, [pc, #176] @ (800647c ) 80063ca: 4293 cmp r3, r2 80063cc: d101 bne.n 80063d2 80063ce: 2301 movs r3, #1 80063d0: e000 b.n 80063d4 80063d2: 2300 movs r3, #0 80063d4: 2b00 cmp r3, #0 80063d6: d015 beq.n 8006404 { /* Clear the DMAMUX synchro overrun flag */ hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask; 80063d8: 687b ldr r3, [r7, #4] 80063da: 6e5b ldr r3, [r3, #100] @ 0x64 80063dc: 687a ldr r2, [r7, #4] 80063de: 6e92 ldr r2, [r2, #104] @ 0x68 80063e0: 605a str r2, [r3, #4] if(hdma->DMAmuxRequestGen != 0U) 80063e2: 687b ldr r3, [r7, #4] 80063e4: 6edb ldr r3, [r3, #108] @ 0x6c 80063e6: 2b00 cmp r3, #0 80063e8: d00c beq.n 8006404 { /* if using DMAMUX request generator, disable the DMAMUX request generator overrun IT */ /* disable the request gen overrun IT */ hdma->DMAmuxRequestGen->RGCR &= ~DMAMUX_RGxCR_OIE; 80063ea: 687b ldr r3, [r7, #4] 80063ec: 6edb ldr r3, [r3, #108] @ 0x6c 80063ee: 681a ldr r2, [r3, #0] 80063f0: 687b ldr r3, [r7, #4] 80063f2: 6edb ldr r3, [r3, #108] @ 0x6c 80063f4: f422 7280 bic.w r2, r2, #256 @ 0x100 80063f8: 601a str r2, [r3, #0] /* Clear the DMAMUX request generator overrun flag */ hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask; 80063fa: 687b ldr r3, [r7, #4] 80063fc: 6f1b ldr r3, [r3, #112] @ 0x70 80063fe: 687a ldr r2, [r7, #4] 8006400: 6f52 ldr r2, [r2, #116] @ 0x74 8006402: 605a str r2, [r3, #4] } } /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 8006404: 687b ldr r3, [r7, #4] 8006406: 2201 movs r2, #1 8006408: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 800640c: 687b ldr r3, [r7, #4] 800640e: 2200 movs r2, #0 8006410: f883 2034 strb.w r2, [r3, #52] @ 0x34 } return HAL_OK; 8006414: 2300 movs r3, #0 } 8006416: 4618 mov r0, r3 8006418: 3718 adds r7, #24 800641a: 46bd mov sp, r7 800641c: bd80 pop {r7, pc} 800641e: bf00 nop 8006420: 40020010 .word 0x40020010 8006424: 40020028 .word 0x40020028 8006428: 40020040 .word 0x40020040 800642c: 40020058 .word 0x40020058 8006430: 40020070 .word 0x40020070 8006434: 40020088 .word 0x40020088 8006438: 400200a0 .word 0x400200a0 800643c: 400200b8 .word 0x400200b8 8006440: 40020410 .word 0x40020410 8006444: 40020428 .word 0x40020428 8006448: 40020440 .word 0x40020440 800644c: 40020458 .word 0x40020458 8006450: 40020470 .word 0x40020470 8006454: 40020488 .word 0x40020488 8006458: 400204a0 .word 0x400204a0 800645c: 400204b8 .word 0x400204b8 8006460: 58025408 .word 0x58025408 8006464: 5802541c .word 0x5802541c 8006468: 58025430 .word 0x58025430 800646c: 58025444 .word 0x58025444 8006470: 58025458 .word 0x58025458 8006474: 5802546c .word 0x5802546c 8006478: 58025480 .word 0x58025480 800647c: 58025494 .word 0x58025494 08006480 : * @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) { 8006480: b580 push {r7, lr} 8006482: b084 sub sp, #16 8006484: af00 add r7, sp, #0 8006486: 6078 str r0, [r7, #4] BDMA_Base_Registers *regs_bdma; /* Check the DMA peripheral handle */ if(hdma == NULL) 8006488: 687b ldr r3, [r7, #4] 800648a: 2b00 cmp r3, #0 800648c: d101 bne.n 8006492 { return HAL_ERROR; 800648e: 2301 movs r3, #1 8006490: e237 b.n 8006902 } if(hdma->State != HAL_DMA_STATE_BUSY) 8006492: 687b ldr r3, [r7, #4] 8006494: f893 3035 ldrb.w r3, [r3, #53] @ 0x35 8006498: b2db uxtb r3, r3 800649a: 2b02 cmp r3, #2 800649c: d004 beq.n 80064a8 { hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER; 800649e: 687b ldr r3, [r7, #4] 80064a0: 2280 movs r2, #128 @ 0x80 80064a2: 655a str r2, [r3, #84] @ 0x54 return HAL_ERROR; 80064a4: 2301 movs r3, #1 80064a6: e22c b.n 8006902 } else { if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 80064a8: 687b ldr r3, [r7, #4] 80064aa: 681b ldr r3, [r3, #0] 80064ac: 4a5c ldr r2, [pc, #368] @ (8006620 ) 80064ae: 4293 cmp r3, r2 80064b0: d04a beq.n 8006548 80064b2: 687b ldr r3, [r7, #4] 80064b4: 681b ldr r3, [r3, #0] 80064b6: 4a5b ldr r2, [pc, #364] @ (8006624 ) 80064b8: 4293 cmp r3, r2 80064ba: d045 beq.n 8006548 80064bc: 687b ldr r3, [r7, #4] 80064be: 681b ldr r3, [r3, #0] 80064c0: 4a59 ldr r2, [pc, #356] @ (8006628 ) 80064c2: 4293 cmp r3, r2 80064c4: d040 beq.n 8006548 80064c6: 687b ldr r3, [r7, #4] 80064c8: 681b ldr r3, [r3, #0] 80064ca: 4a58 ldr r2, [pc, #352] @ (800662c ) 80064cc: 4293 cmp r3, r2 80064ce: d03b beq.n 8006548 80064d0: 687b ldr r3, [r7, #4] 80064d2: 681b ldr r3, [r3, #0] 80064d4: 4a56 ldr r2, [pc, #344] @ (8006630 ) 80064d6: 4293 cmp r3, r2 80064d8: d036 beq.n 8006548 80064da: 687b ldr r3, [r7, #4] 80064dc: 681b ldr r3, [r3, #0] 80064de: 4a55 ldr r2, [pc, #340] @ (8006634 ) 80064e0: 4293 cmp r3, r2 80064e2: d031 beq.n 8006548 80064e4: 687b ldr r3, [r7, #4] 80064e6: 681b ldr r3, [r3, #0] 80064e8: 4a53 ldr r2, [pc, #332] @ (8006638 ) 80064ea: 4293 cmp r3, r2 80064ec: d02c beq.n 8006548 80064ee: 687b ldr r3, [r7, #4] 80064f0: 681b ldr r3, [r3, #0] 80064f2: 4a52 ldr r2, [pc, #328] @ (800663c ) 80064f4: 4293 cmp r3, r2 80064f6: d027 beq.n 8006548 80064f8: 687b ldr r3, [r7, #4] 80064fa: 681b ldr r3, [r3, #0] 80064fc: 4a50 ldr r2, [pc, #320] @ (8006640 ) 80064fe: 4293 cmp r3, r2 8006500: d022 beq.n 8006548 8006502: 687b ldr r3, [r7, #4] 8006504: 681b ldr r3, [r3, #0] 8006506: 4a4f ldr r2, [pc, #316] @ (8006644 ) 8006508: 4293 cmp r3, r2 800650a: d01d beq.n 8006548 800650c: 687b ldr r3, [r7, #4] 800650e: 681b ldr r3, [r3, #0] 8006510: 4a4d ldr r2, [pc, #308] @ (8006648 ) 8006512: 4293 cmp r3, r2 8006514: d018 beq.n 8006548 8006516: 687b ldr r3, [r7, #4] 8006518: 681b ldr r3, [r3, #0] 800651a: 4a4c ldr r2, [pc, #304] @ (800664c ) 800651c: 4293 cmp r3, r2 800651e: d013 beq.n 8006548 8006520: 687b ldr r3, [r7, #4] 8006522: 681b ldr r3, [r3, #0] 8006524: 4a4a ldr r2, [pc, #296] @ (8006650 ) 8006526: 4293 cmp r3, r2 8006528: d00e beq.n 8006548 800652a: 687b ldr r3, [r7, #4] 800652c: 681b ldr r3, [r3, #0] 800652e: 4a49 ldr r2, [pc, #292] @ (8006654 ) 8006530: 4293 cmp r3, r2 8006532: d009 beq.n 8006548 8006534: 687b ldr r3, [r7, #4] 8006536: 681b ldr r3, [r3, #0] 8006538: 4a47 ldr r2, [pc, #284] @ (8006658 ) 800653a: 4293 cmp r3, r2 800653c: d004 beq.n 8006548 800653e: 687b ldr r3, [r7, #4] 8006540: 681b ldr r3, [r3, #0] 8006542: 4a46 ldr r2, [pc, #280] @ (800665c ) 8006544: 4293 cmp r3, r2 8006546: d101 bne.n 800654c 8006548: 2301 movs r3, #1 800654a: e000 b.n 800654e 800654c: 2300 movs r3, #0 800654e: 2b00 cmp r3, #0 8006550: f000 8086 beq.w 8006660 { /* Set Abort State */ hdma->State = HAL_DMA_STATE_ABORT; 8006554: 687b ldr r3, [r7, #4] 8006556: 2204 movs r2, #4 8006558: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Disable the stream */ __HAL_DMA_DISABLE(hdma); 800655c: 687b ldr r3, [r7, #4] 800655e: 681b ldr r3, [r3, #0] 8006560: 4a2f ldr r2, [pc, #188] @ (8006620 ) 8006562: 4293 cmp r3, r2 8006564: d04a beq.n 80065fc 8006566: 687b ldr r3, [r7, #4] 8006568: 681b ldr r3, [r3, #0] 800656a: 4a2e ldr r2, [pc, #184] @ (8006624 ) 800656c: 4293 cmp r3, r2 800656e: d045 beq.n 80065fc 8006570: 687b ldr r3, [r7, #4] 8006572: 681b ldr r3, [r3, #0] 8006574: 4a2c ldr r2, [pc, #176] @ (8006628 ) 8006576: 4293 cmp r3, r2 8006578: d040 beq.n 80065fc 800657a: 687b ldr r3, [r7, #4] 800657c: 681b ldr r3, [r3, #0] 800657e: 4a2b ldr r2, [pc, #172] @ (800662c ) 8006580: 4293 cmp r3, r2 8006582: d03b beq.n 80065fc 8006584: 687b ldr r3, [r7, #4] 8006586: 681b ldr r3, [r3, #0] 8006588: 4a29 ldr r2, [pc, #164] @ (8006630 ) 800658a: 4293 cmp r3, r2 800658c: d036 beq.n 80065fc 800658e: 687b ldr r3, [r7, #4] 8006590: 681b ldr r3, [r3, #0] 8006592: 4a28 ldr r2, [pc, #160] @ (8006634 ) 8006594: 4293 cmp r3, r2 8006596: d031 beq.n 80065fc 8006598: 687b ldr r3, [r7, #4] 800659a: 681b ldr r3, [r3, #0] 800659c: 4a26 ldr r2, [pc, #152] @ (8006638 ) 800659e: 4293 cmp r3, r2 80065a0: d02c beq.n 80065fc 80065a2: 687b ldr r3, [r7, #4] 80065a4: 681b ldr r3, [r3, #0] 80065a6: 4a25 ldr r2, [pc, #148] @ (800663c ) 80065a8: 4293 cmp r3, r2 80065aa: d027 beq.n 80065fc 80065ac: 687b ldr r3, [r7, #4] 80065ae: 681b ldr r3, [r3, #0] 80065b0: 4a23 ldr r2, [pc, #140] @ (8006640 ) 80065b2: 4293 cmp r3, r2 80065b4: d022 beq.n 80065fc 80065b6: 687b ldr r3, [r7, #4] 80065b8: 681b ldr r3, [r3, #0] 80065ba: 4a22 ldr r2, [pc, #136] @ (8006644 ) 80065bc: 4293 cmp r3, r2 80065be: d01d beq.n 80065fc 80065c0: 687b ldr r3, [r7, #4] 80065c2: 681b ldr r3, [r3, #0] 80065c4: 4a20 ldr r2, [pc, #128] @ (8006648 ) 80065c6: 4293 cmp r3, r2 80065c8: d018 beq.n 80065fc 80065ca: 687b ldr r3, [r7, #4] 80065cc: 681b ldr r3, [r3, #0] 80065ce: 4a1f ldr r2, [pc, #124] @ (800664c ) 80065d0: 4293 cmp r3, r2 80065d2: d013 beq.n 80065fc 80065d4: 687b ldr r3, [r7, #4] 80065d6: 681b ldr r3, [r3, #0] 80065d8: 4a1d ldr r2, [pc, #116] @ (8006650 ) 80065da: 4293 cmp r3, r2 80065dc: d00e beq.n 80065fc 80065de: 687b ldr r3, [r7, #4] 80065e0: 681b ldr r3, [r3, #0] 80065e2: 4a1c ldr r2, [pc, #112] @ (8006654 ) 80065e4: 4293 cmp r3, r2 80065e6: d009 beq.n 80065fc 80065e8: 687b ldr r3, [r7, #4] 80065ea: 681b ldr r3, [r3, #0] 80065ec: 4a1a ldr r2, [pc, #104] @ (8006658 ) 80065ee: 4293 cmp r3, r2 80065f0: d004 beq.n 80065fc 80065f2: 687b ldr r3, [r7, #4] 80065f4: 681b ldr r3, [r3, #0] 80065f6: 4a19 ldr r2, [pc, #100] @ (800665c ) 80065f8: 4293 cmp r3, r2 80065fa: d108 bne.n 800660e 80065fc: 687b ldr r3, [r7, #4] 80065fe: 681b ldr r3, [r3, #0] 8006600: 681a ldr r2, [r3, #0] 8006602: 687b ldr r3, [r7, #4] 8006604: 681b ldr r3, [r3, #0] 8006606: f022 0201 bic.w r2, r2, #1 800660a: 601a str r2, [r3, #0] 800660c: e178 b.n 8006900 800660e: 687b ldr r3, [r7, #4] 8006610: 681b ldr r3, [r3, #0] 8006612: 681a ldr r2, [r3, #0] 8006614: 687b ldr r3, [r7, #4] 8006616: 681b ldr r3, [r3, #0] 8006618: f022 0201 bic.w r2, r2, #1 800661c: 601a str r2, [r3, #0] 800661e: e16f b.n 8006900 8006620: 40020010 .word 0x40020010 8006624: 40020028 .word 0x40020028 8006628: 40020040 .word 0x40020040 800662c: 40020058 .word 0x40020058 8006630: 40020070 .word 0x40020070 8006634: 40020088 .word 0x40020088 8006638: 400200a0 .word 0x400200a0 800663c: 400200b8 .word 0x400200b8 8006640: 40020410 .word 0x40020410 8006644: 40020428 .word 0x40020428 8006648: 40020440 .word 0x40020440 800664c: 40020458 .word 0x40020458 8006650: 40020470 .word 0x40020470 8006654: 40020488 .word 0x40020488 8006658: 400204a0 .word 0x400204a0 800665c: 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); 8006660: 687b ldr r3, [r7, #4] 8006662: 681b ldr r3, [r3, #0] 8006664: 681a ldr r2, [r3, #0] 8006666: 687b ldr r3, [r7, #4] 8006668: 681b ldr r3, [r3, #0] 800666a: f022 020e bic.w r2, r2, #14 800666e: 601a str r2, [r3, #0] /* Disable the channel */ __HAL_DMA_DISABLE(hdma); 8006670: 687b ldr r3, [r7, #4] 8006672: 681b ldr r3, [r3, #0] 8006674: 4a6c ldr r2, [pc, #432] @ (8006828 ) 8006676: 4293 cmp r3, r2 8006678: d04a beq.n 8006710 800667a: 687b ldr r3, [r7, #4] 800667c: 681b ldr r3, [r3, #0] 800667e: 4a6b ldr r2, [pc, #428] @ (800682c ) 8006680: 4293 cmp r3, r2 8006682: d045 beq.n 8006710 8006684: 687b ldr r3, [r7, #4] 8006686: 681b ldr r3, [r3, #0] 8006688: 4a69 ldr r2, [pc, #420] @ (8006830 ) 800668a: 4293 cmp r3, r2 800668c: d040 beq.n 8006710 800668e: 687b ldr r3, [r7, #4] 8006690: 681b ldr r3, [r3, #0] 8006692: 4a68 ldr r2, [pc, #416] @ (8006834 ) 8006694: 4293 cmp r3, r2 8006696: d03b beq.n 8006710 8006698: 687b ldr r3, [r7, #4] 800669a: 681b ldr r3, [r3, #0] 800669c: 4a66 ldr r2, [pc, #408] @ (8006838 ) 800669e: 4293 cmp r3, r2 80066a0: d036 beq.n 8006710 80066a2: 687b ldr r3, [r7, #4] 80066a4: 681b ldr r3, [r3, #0] 80066a6: 4a65 ldr r2, [pc, #404] @ (800683c ) 80066a8: 4293 cmp r3, r2 80066aa: d031 beq.n 8006710 80066ac: 687b ldr r3, [r7, #4] 80066ae: 681b ldr r3, [r3, #0] 80066b0: 4a63 ldr r2, [pc, #396] @ (8006840 ) 80066b2: 4293 cmp r3, r2 80066b4: d02c beq.n 8006710 80066b6: 687b ldr r3, [r7, #4] 80066b8: 681b ldr r3, [r3, #0] 80066ba: 4a62 ldr r2, [pc, #392] @ (8006844 ) 80066bc: 4293 cmp r3, r2 80066be: d027 beq.n 8006710 80066c0: 687b ldr r3, [r7, #4] 80066c2: 681b ldr r3, [r3, #0] 80066c4: 4a60 ldr r2, [pc, #384] @ (8006848 ) 80066c6: 4293 cmp r3, r2 80066c8: d022 beq.n 8006710 80066ca: 687b ldr r3, [r7, #4] 80066cc: 681b ldr r3, [r3, #0] 80066ce: 4a5f ldr r2, [pc, #380] @ (800684c ) 80066d0: 4293 cmp r3, r2 80066d2: d01d beq.n 8006710 80066d4: 687b ldr r3, [r7, #4] 80066d6: 681b ldr r3, [r3, #0] 80066d8: 4a5d ldr r2, [pc, #372] @ (8006850 ) 80066da: 4293 cmp r3, r2 80066dc: d018 beq.n 8006710 80066de: 687b ldr r3, [r7, #4] 80066e0: 681b ldr r3, [r3, #0] 80066e2: 4a5c ldr r2, [pc, #368] @ (8006854 ) 80066e4: 4293 cmp r3, r2 80066e6: d013 beq.n 8006710 80066e8: 687b ldr r3, [r7, #4] 80066ea: 681b ldr r3, [r3, #0] 80066ec: 4a5a ldr r2, [pc, #360] @ (8006858 ) 80066ee: 4293 cmp r3, r2 80066f0: d00e beq.n 8006710 80066f2: 687b ldr r3, [r7, #4] 80066f4: 681b ldr r3, [r3, #0] 80066f6: 4a59 ldr r2, [pc, #356] @ (800685c ) 80066f8: 4293 cmp r3, r2 80066fa: d009 beq.n 8006710 80066fc: 687b ldr r3, [r7, #4] 80066fe: 681b ldr r3, [r3, #0] 8006700: 4a57 ldr r2, [pc, #348] @ (8006860 ) 8006702: 4293 cmp r3, r2 8006704: d004 beq.n 8006710 8006706: 687b ldr r3, [r7, #4] 8006708: 681b ldr r3, [r3, #0] 800670a: 4a56 ldr r2, [pc, #344] @ (8006864 ) 800670c: 4293 cmp r3, r2 800670e: d108 bne.n 8006722 8006710: 687b ldr r3, [r7, #4] 8006712: 681b ldr r3, [r3, #0] 8006714: 681a ldr r2, [r3, #0] 8006716: 687b ldr r3, [r7, #4] 8006718: 681b ldr r3, [r3, #0] 800671a: f022 0201 bic.w r2, r2, #1 800671e: 601a str r2, [r3, #0] 8006720: e007 b.n 8006732 8006722: 687b ldr r3, [r7, #4] 8006724: 681b ldr r3, [r3, #0] 8006726: 681a ldr r2, [r3, #0] 8006728: 687b ldr r3, [r7, #4] 800672a: 681b ldr r3, [r3, #0] 800672c: f022 0201 bic.w r2, r2, #1 8006730: 601a str r2, [r3, #0] if(IS_DMA_DMAMUX_ALL_INSTANCE(hdma->Instance) != 0U) /* No DMAMUX available for BDMA1 */ 8006732: 687b ldr r3, [r7, #4] 8006734: 681b ldr r3, [r3, #0] 8006736: 4a3c ldr r2, [pc, #240] @ (8006828 ) 8006738: 4293 cmp r3, r2 800673a: d072 beq.n 8006822 800673c: 687b ldr r3, [r7, #4] 800673e: 681b ldr r3, [r3, #0] 8006740: 4a3a ldr r2, [pc, #232] @ (800682c ) 8006742: 4293 cmp r3, r2 8006744: d06d beq.n 8006822 8006746: 687b ldr r3, [r7, #4] 8006748: 681b ldr r3, [r3, #0] 800674a: 4a39 ldr r2, [pc, #228] @ (8006830 ) 800674c: 4293 cmp r3, r2 800674e: d068 beq.n 8006822 8006750: 687b ldr r3, [r7, #4] 8006752: 681b ldr r3, [r3, #0] 8006754: 4a37 ldr r2, [pc, #220] @ (8006834 ) 8006756: 4293 cmp r3, r2 8006758: d063 beq.n 8006822 800675a: 687b ldr r3, [r7, #4] 800675c: 681b ldr r3, [r3, #0] 800675e: 4a36 ldr r2, [pc, #216] @ (8006838 ) 8006760: 4293 cmp r3, r2 8006762: d05e beq.n 8006822 8006764: 687b ldr r3, [r7, #4] 8006766: 681b ldr r3, [r3, #0] 8006768: 4a34 ldr r2, [pc, #208] @ (800683c ) 800676a: 4293 cmp r3, r2 800676c: d059 beq.n 8006822 800676e: 687b ldr r3, [r7, #4] 8006770: 681b ldr r3, [r3, #0] 8006772: 4a33 ldr r2, [pc, #204] @ (8006840 ) 8006774: 4293 cmp r3, r2 8006776: d054 beq.n 8006822 8006778: 687b ldr r3, [r7, #4] 800677a: 681b ldr r3, [r3, #0] 800677c: 4a31 ldr r2, [pc, #196] @ (8006844 ) 800677e: 4293 cmp r3, r2 8006780: d04f beq.n 8006822 8006782: 687b ldr r3, [r7, #4] 8006784: 681b ldr r3, [r3, #0] 8006786: 4a30 ldr r2, [pc, #192] @ (8006848 ) 8006788: 4293 cmp r3, r2 800678a: d04a beq.n 8006822 800678c: 687b ldr r3, [r7, #4] 800678e: 681b ldr r3, [r3, #0] 8006790: 4a2e ldr r2, [pc, #184] @ (800684c ) 8006792: 4293 cmp r3, r2 8006794: d045 beq.n 8006822 8006796: 687b ldr r3, [r7, #4] 8006798: 681b ldr r3, [r3, #0] 800679a: 4a2d ldr r2, [pc, #180] @ (8006850 ) 800679c: 4293 cmp r3, r2 800679e: d040 beq.n 8006822 80067a0: 687b ldr r3, [r7, #4] 80067a2: 681b ldr r3, [r3, #0] 80067a4: 4a2b ldr r2, [pc, #172] @ (8006854 ) 80067a6: 4293 cmp r3, r2 80067a8: d03b beq.n 8006822 80067aa: 687b ldr r3, [r7, #4] 80067ac: 681b ldr r3, [r3, #0] 80067ae: 4a2a ldr r2, [pc, #168] @ (8006858 ) 80067b0: 4293 cmp r3, r2 80067b2: d036 beq.n 8006822 80067b4: 687b ldr r3, [r7, #4] 80067b6: 681b ldr r3, [r3, #0] 80067b8: 4a28 ldr r2, [pc, #160] @ (800685c ) 80067ba: 4293 cmp r3, r2 80067bc: d031 beq.n 8006822 80067be: 687b ldr r3, [r7, #4] 80067c0: 681b ldr r3, [r3, #0] 80067c2: 4a27 ldr r2, [pc, #156] @ (8006860 ) 80067c4: 4293 cmp r3, r2 80067c6: d02c beq.n 8006822 80067c8: 687b ldr r3, [r7, #4] 80067ca: 681b ldr r3, [r3, #0] 80067cc: 4a25 ldr r2, [pc, #148] @ (8006864 ) 80067ce: 4293 cmp r3, r2 80067d0: d027 beq.n 8006822 80067d2: 687b ldr r3, [r7, #4] 80067d4: 681b ldr r3, [r3, #0] 80067d6: 4a24 ldr r2, [pc, #144] @ (8006868 ) 80067d8: 4293 cmp r3, r2 80067da: d022 beq.n 8006822 80067dc: 687b ldr r3, [r7, #4] 80067de: 681b ldr r3, [r3, #0] 80067e0: 4a22 ldr r2, [pc, #136] @ (800686c ) 80067e2: 4293 cmp r3, r2 80067e4: d01d beq.n 8006822 80067e6: 687b ldr r3, [r7, #4] 80067e8: 681b ldr r3, [r3, #0] 80067ea: 4a21 ldr r2, [pc, #132] @ (8006870 ) 80067ec: 4293 cmp r3, r2 80067ee: d018 beq.n 8006822 80067f0: 687b ldr r3, [r7, #4] 80067f2: 681b ldr r3, [r3, #0] 80067f4: 4a1f ldr r2, [pc, #124] @ (8006874 ) 80067f6: 4293 cmp r3, r2 80067f8: d013 beq.n 8006822 80067fa: 687b ldr r3, [r7, #4] 80067fc: 681b ldr r3, [r3, #0] 80067fe: 4a1e ldr r2, [pc, #120] @ (8006878 ) 8006800: 4293 cmp r3, r2 8006802: d00e beq.n 8006822 8006804: 687b ldr r3, [r7, #4] 8006806: 681b ldr r3, [r3, #0] 8006808: 4a1c ldr r2, [pc, #112] @ (800687c ) 800680a: 4293 cmp r3, r2 800680c: d009 beq.n 8006822 800680e: 687b ldr r3, [r7, #4] 8006810: 681b ldr r3, [r3, #0] 8006812: 4a1b ldr r2, [pc, #108] @ (8006880 ) 8006814: 4293 cmp r3, r2 8006816: d004 beq.n 8006822 8006818: 687b ldr r3, [r7, #4] 800681a: 681b ldr r3, [r3, #0] 800681c: 4a19 ldr r2, [pc, #100] @ (8006884 ) 800681e: 4293 cmp r3, r2 8006820: d132 bne.n 8006888 8006822: 2301 movs r3, #1 8006824: e031 b.n 800688a 8006826: bf00 nop 8006828: 40020010 .word 0x40020010 800682c: 40020028 .word 0x40020028 8006830: 40020040 .word 0x40020040 8006834: 40020058 .word 0x40020058 8006838: 40020070 .word 0x40020070 800683c: 40020088 .word 0x40020088 8006840: 400200a0 .word 0x400200a0 8006844: 400200b8 .word 0x400200b8 8006848: 40020410 .word 0x40020410 800684c: 40020428 .word 0x40020428 8006850: 40020440 .word 0x40020440 8006854: 40020458 .word 0x40020458 8006858: 40020470 .word 0x40020470 800685c: 40020488 .word 0x40020488 8006860: 400204a0 .word 0x400204a0 8006864: 400204b8 .word 0x400204b8 8006868: 58025408 .word 0x58025408 800686c: 5802541c .word 0x5802541c 8006870: 58025430 .word 0x58025430 8006874: 58025444 .word 0x58025444 8006878: 58025458 .word 0x58025458 800687c: 5802546c .word 0x5802546c 8006880: 58025480 .word 0x58025480 8006884: 58025494 .word 0x58025494 8006888: 2300 movs r3, #0 800688a: 2b00 cmp r3, #0 800688c: d028 beq.n 80068e0 { /* disable the DMAMUX sync overrun IT */ hdma->DMAmuxChannel->CCR &= ~DMAMUX_CxCR_SOIE; 800688e: 687b ldr r3, [r7, #4] 8006890: 6e1b ldr r3, [r3, #96] @ 0x60 8006892: 681a ldr r2, [r3, #0] 8006894: 687b ldr r3, [r7, #4] 8006896: 6e1b ldr r3, [r3, #96] @ 0x60 8006898: f422 7280 bic.w r2, r2, #256 @ 0x100 800689c: 601a str r2, [r3, #0] /* Clear all flags */ regs_bdma = (BDMA_Base_Registers *)hdma->StreamBaseAddress; 800689e: 687b ldr r3, [r7, #4] 80068a0: 6d9b ldr r3, [r3, #88] @ 0x58 80068a2: 60fb str r3, [r7, #12] regs_bdma->IFCR = ((BDMA_IFCR_CGIF0) << (hdma->StreamIndex & 0x1FU)); 80068a4: 687b ldr r3, [r7, #4] 80068a6: 6ddb ldr r3, [r3, #92] @ 0x5c 80068a8: f003 031f and.w r3, r3, #31 80068ac: 2201 movs r2, #1 80068ae: 409a lsls r2, r3 80068b0: 68fb ldr r3, [r7, #12] 80068b2: 605a str r2, [r3, #4] /* Clear the DMAMUX synchro overrun flag */ hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask; 80068b4: 687b ldr r3, [r7, #4] 80068b6: 6e5b ldr r3, [r3, #100] @ 0x64 80068b8: 687a ldr r2, [r7, #4] 80068ba: 6e92 ldr r2, [r2, #104] @ 0x68 80068bc: 605a str r2, [r3, #4] if(hdma->DMAmuxRequestGen != 0U) 80068be: 687b ldr r3, [r7, #4] 80068c0: 6edb ldr r3, [r3, #108] @ 0x6c 80068c2: 2b00 cmp r3, #0 80068c4: d00c beq.n 80068e0 { /* if using DMAMUX request generator, disable the DMAMUX request generator overrun IT*/ /* disable the request gen overrun IT */ hdma->DMAmuxRequestGen->RGCR &= ~DMAMUX_RGxCR_OIE; 80068c6: 687b ldr r3, [r7, #4] 80068c8: 6edb ldr r3, [r3, #108] @ 0x6c 80068ca: 681a ldr r2, [r3, #0] 80068cc: 687b ldr r3, [r7, #4] 80068ce: 6edb ldr r3, [r3, #108] @ 0x6c 80068d0: f422 7280 bic.w r2, r2, #256 @ 0x100 80068d4: 601a str r2, [r3, #0] /* Clear the DMAMUX request generator overrun flag */ hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask; 80068d6: 687b ldr r3, [r7, #4] 80068d8: 6f1b ldr r3, [r3, #112] @ 0x70 80068da: 687a ldr r2, [r7, #4] 80068dc: 6f52 ldr r2, [r2, #116] @ 0x74 80068de: 605a str r2, [r3, #4] } } /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 80068e0: 687b ldr r3, [r7, #4] 80068e2: 2201 movs r2, #1 80068e4: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 80068e8: 687b ldr r3, [r7, #4] 80068ea: 2200 movs r2, #0 80068ec: f883 2034 strb.w r2, [r3, #52] @ 0x34 /* Call User Abort callback */ if(hdma->XferAbortCallback != NULL) 80068f0: 687b ldr r3, [r7, #4] 80068f2: 6d1b ldr r3, [r3, #80] @ 0x50 80068f4: 2b00 cmp r3, #0 80068f6: d003 beq.n 8006900 { hdma->XferAbortCallback(hdma); 80068f8: 687b ldr r3, [r7, #4] 80068fa: 6d1b ldr r3, [r3, #80] @ 0x50 80068fc: 6878 ldr r0, [r7, #4] 80068fe: 4798 blx r3 } } } return HAL_OK; 8006900: 2300 movs r3, #0 } 8006902: 4618 mov r0, r3 8006904: 3710 adds r7, #16 8006906: 46bd mov sp, r7 8006908: bd80 pop {r7, pc} 800690a: bf00 nop 0800690c : * @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) { 800690c: b580 push {r7, lr} 800690e: b08a sub sp, #40 @ 0x28 8006910: af00 add r7, sp, #0 8006912: 6078 str r0, [r7, #4] uint32_t tmpisr_dma, tmpisr_bdma; uint32_t ccr_reg; __IO uint32_t count = 0U; 8006914: 2300 movs r3, #0 8006916: 60fb str r3, [r7, #12] uint32_t timeout = SystemCoreClock / 9600U; 8006918: 4b67 ldr r3, [pc, #412] @ (8006ab8 ) 800691a: 681b ldr r3, [r3, #0] 800691c: 4a67 ldr r2, [pc, #412] @ (8006abc ) 800691e: fba2 2303 umull r2, r3, r2, r3 8006922: 0a9b lsrs r3, r3, #10 8006924: 627b str r3, [r7, #36] @ 0x24 /* calculate DMA base and stream number */ DMA_Base_Registers *regs_dma = (DMA_Base_Registers *)hdma->StreamBaseAddress; 8006926: 687b ldr r3, [r7, #4] 8006928: 6d9b ldr r3, [r3, #88] @ 0x58 800692a: 623b str r3, [r7, #32] BDMA_Base_Registers *regs_bdma = (BDMA_Base_Registers *)hdma->StreamBaseAddress; 800692c: 687b ldr r3, [r7, #4] 800692e: 6d9b ldr r3, [r3, #88] @ 0x58 8006930: 61fb str r3, [r7, #28] tmpisr_dma = regs_dma->ISR; 8006932: 6a3b ldr r3, [r7, #32] 8006934: 681b ldr r3, [r3, #0] 8006936: 61bb str r3, [r7, #24] tmpisr_bdma = regs_bdma->ISR; 8006938: 69fb ldr r3, [r7, #28] 800693a: 681b ldr r3, [r3, #0] 800693c: 617b str r3, [r7, #20] if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 800693e: 687b ldr r3, [r7, #4] 8006940: 681b ldr r3, [r3, #0] 8006942: 4a5f ldr r2, [pc, #380] @ (8006ac0 ) 8006944: 4293 cmp r3, r2 8006946: d04a beq.n 80069de 8006948: 687b ldr r3, [r7, #4] 800694a: 681b ldr r3, [r3, #0] 800694c: 4a5d ldr r2, [pc, #372] @ (8006ac4 ) 800694e: 4293 cmp r3, r2 8006950: d045 beq.n 80069de 8006952: 687b ldr r3, [r7, #4] 8006954: 681b ldr r3, [r3, #0] 8006956: 4a5c ldr r2, [pc, #368] @ (8006ac8 ) 8006958: 4293 cmp r3, r2 800695a: d040 beq.n 80069de 800695c: 687b ldr r3, [r7, #4] 800695e: 681b ldr r3, [r3, #0] 8006960: 4a5a ldr r2, [pc, #360] @ (8006acc ) 8006962: 4293 cmp r3, r2 8006964: d03b beq.n 80069de 8006966: 687b ldr r3, [r7, #4] 8006968: 681b ldr r3, [r3, #0] 800696a: 4a59 ldr r2, [pc, #356] @ (8006ad0 ) 800696c: 4293 cmp r3, r2 800696e: d036 beq.n 80069de 8006970: 687b ldr r3, [r7, #4] 8006972: 681b ldr r3, [r3, #0] 8006974: 4a57 ldr r2, [pc, #348] @ (8006ad4 ) 8006976: 4293 cmp r3, r2 8006978: d031 beq.n 80069de 800697a: 687b ldr r3, [r7, #4] 800697c: 681b ldr r3, [r3, #0] 800697e: 4a56 ldr r2, [pc, #344] @ (8006ad8 ) 8006980: 4293 cmp r3, r2 8006982: d02c beq.n 80069de 8006984: 687b ldr r3, [r7, #4] 8006986: 681b ldr r3, [r3, #0] 8006988: 4a54 ldr r2, [pc, #336] @ (8006adc ) 800698a: 4293 cmp r3, r2 800698c: d027 beq.n 80069de 800698e: 687b ldr r3, [r7, #4] 8006990: 681b ldr r3, [r3, #0] 8006992: 4a53 ldr r2, [pc, #332] @ (8006ae0 ) 8006994: 4293 cmp r3, r2 8006996: d022 beq.n 80069de 8006998: 687b ldr r3, [r7, #4] 800699a: 681b ldr r3, [r3, #0] 800699c: 4a51 ldr r2, [pc, #324] @ (8006ae4 ) 800699e: 4293 cmp r3, r2 80069a0: d01d beq.n 80069de 80069a2: 687b ldr r3, [r7, #4] 80069a4: 681b ldr r3, [r3, #0] 80069a6: 4a50 ldr r2, [pc, #320] @ (8006ae8 ) 80069a8: 4293 cmp r3, r2 80069aa: d018 beq.n 80069de 80069ac: 687b ldr r3, [r7, #4] 80069ae: 681b ldr r3, [r3, #0] 80069b0: 4a4e ldr r2, [pc, #312] @ (8006aec ) 80069b2: 4293 cmp r3, r2 80069b4: d013 beq.n 80069de 80069b6: 687b ldr r3, [r7, #4] 80069b8: 681b ldr r3, [r3, #0] 80069ba: 4a4d ldr r2, [pc, #308] @ (8006af0 ) 80069bc: 4293 cmp r3, r2 80069be: d00e beq.n 80069de 80069c0: 687b ldr r3, [r7, #4] 80069c2: 681b ldr r3, [r3, #0] 80069c4: 4a4b ldr r2, [pc, #300] @ (8006af4 ) 80069c6: 4293 cmp r3, r2 80069c8: d009 beq.n 80069de 80069ca: 687b ldr r3, [r7, #4] 80069cc: 681b ldr r3, [r3, #0] 80069ce: 4a4a ldr r2, [pc, #296] @ (8006af8 ) 80069d0: 4293 cmp r3, r2 80069d2: d004 beq.n 80069de 80069d4: 687b ldr r3, [r7, #4] 80069d6: 681b ldr r3, [r3, #0] 80069d8: 4a48 ldr r2, [pc, #288] @ (8006afc ) 80069da: 4293 cmp r3, r2 80069dc: d101 bne.n 80069e2 80069de: 2301 movs r3, #1 80069e0: e000 b.n 80069e4 80069e2: 2300 movs r3, #0 80069e4: 2b00 cmp r3, #0 80069e6: f000 842b beq.w 8007240 { /* Transfer Error Interrupt management ***************************************/ if ((tmpisr_dma & (DMA_FLAG_TEIF0_4 << (hdma->StreamIndex & 0x1FU))) != 0U) 80069ea: 687b ldr r3, [r7, #4] 80069ec: 6ddb ldr r3, [r3, #92] @ 0x5c 80069ee: f003 031f and.w r3, r3, #31 80069f2: 2208 movs r2, #8 80069f4: 409a lsls r2, r3 80069f6: 69bb ldr r3, [r7, #24] 80069f8: 4013 ands r3, r2 80069fa: 2b00 cmp r3, #0 80069fc: f000 80a2 beq.w 8006b44 { if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_TE) != 0U) 8006a00: 687b ldr r3, [r7, #4] 8006a02: 681b ldr r3, [r3, #0] 8006a04: 4a2e ldr r2, [pc, #184] @ (8006ac0 ) 8006a06: 4293 cmp r3, r2 8006a08: d04a beq.n 8006aa0 8006a0a: 687b ldr r3, [r7, #4] 8006a0c: 681b ldr r3, [r3, #0] 8006a0e: 4a2d ldr r2, [pc, #180] @ (8006ac4 ) 8006a10: 4293 cmp r3, r2 8006a12: d045 beq.n 8006aa0 8006a14: 687b ldr r3, [r7, #4] 8006a16: 681b ldr r3, [r3, #0] 8006a18: 4a2b ldr r2, [pc, #172] @ (8006ac8 ) 8006a1a: 4293 cmp r3, r2 8006a1c: d040 beq.n 8006aa0 8006a1e: 687b ldr r3, [r7, #4] 8006a20: 681b ldr r3, [r3, #0] 8006a22: 4a2a ldr r2, [pc, #168] @ (8006acc ) 8006a24: 4293 cmp r3, r2 8006a26: d03b beq.n 8006aa0 8006a28: 687b ldr r3, [r7, #4] 8006a2a: 681b ldr r3, [r3, #0] 8006a2c: 4a28 ldr r2, [pc, #160] @ (8006ad0 ) 8006a2e: 4293 cmp r3, r2 8006a30: d036 beq.n 8006aa0 8006a32: 687b ldr r3, [r7, #4] 8006a34: 681b ldr r3, [r3, #0] 8006a36: 4a27 ldr r2, [pc, #156] @ (8006ad4 ) 8006a38: 4293 cmp r3, r2 8006a3a: d031 beq.n 8006aa0 8006a3c: 687b ldr r3, [r7, #4] 8006a3e: 681b ldr r3, [r3, #0] 8006a40: 4a25 ldr r2, [pc, #148] @ (8006ad8 ) 8006a42: 4293 cmp r3, r2 8006a44: d02c beq.n 8006aa0 8006a46: 687b ldr r3, [r7, #4] 8006a48: 681b ldr r3, [r3, #0] 8006a4a: 4a24 ldr r2, [pc, #144] @ (8006adc ) 8006a4c: 4293 cmp r3, r2 8006a4e: d027 beq.n 8006aa0 8006a50: 687b ldr r3, [r7, #4] 8006a52: 681b ldr r3, [r3, #0] 8006a54: 4a22 ldr r2, [pc, #136] @ (8006ae0 ) 8006a56: 4293 cmp r3, r2 8006a58: d022 beq.n 8006aa0 8006a5a: 687b ldr r3, [r7, #4] 8006a5c: 681b ldr r3, [r3, #0] 8006a5e: 4a21 ldr r2, [pc, #132] @ (8006ae4 ) 8006a60: 4293 cmp r3, r2 8006a62: d01d beq.n 8006aa0 8006a64: 687b ldr r3, [r7, #4] 8006a66: 681b ldr r3, [r3, #0] 8006a68: 4a1f ldr r2, [pc, #124] @ (8006ae8 ) 8006a6a: 4293 cmp r3, r2 8006a6c: d018 beq.n 8006aa0 8006a6e: 687b ldr r3, [r7, #4] 8006a70: 681b ldr r3, [r3, #0] 8006a72: 4a1e ldr r2, [pc, #120] @ (8006aec ) 8006a74: 4293 cmp r3, r2 8006a76: d013 beq.n 8006aa0 8006a78: 687b ldr r3, [r7, #4] 8006a7a: 681b ldr r3, [r3, #0] 8006a7c: 4a1c ldr r2, [pc, #112] @ (8006af0 ) 8006a7e: 4293 cmp r3, r2 8006a80: d00e beq.n 8006aa0 8006a82: 687b ldr r3, [r7, #4] 8006a84: 681b ldr r3, [r3, #0] 8006a86: 4a1b ldr r2, [pc, #108] @ (8006af4 ) 8006a88: 4293 cmp r3, r2 8006a8a: d009 beq.n 8006aa0 8006a8c: 687b ldr r3, [r7, #4] 8006a8e: 681b ldr r3, [r3, #0] 8006a90: 4a19 ldr r2, [pc, #100] @ (8006af8 ) 8006a92: 4293 cmp r3, r2 8006a94: d004 beq.n 8006aa0 8006a96: 687b ldr r3, [r7, #4] 8006a98: 681b ldr r3, [r3, #0] 8006a9a: 4a18 ldr r2, [pc, #96] @ (8006afc ) 8006a9c: 4293 cmp r3, r2 8006a9e: d12f bne.n 8006b00 8006aa0: 687b ldr r3, [r7, #4] 8006aa2: 681b ldr r3, [r3, #0] 8006aa4: 681b ldr r3, [r3, #0] 8006aa6: f003 0304 and.w r3, r3, #4 8006aaa: 2b00 cmp r3, #0 8006aac: bf14 ite ne 8006aae: 2301 movne r3, #1 8006ab0: 2300 moveq r3, #0 8006ab2: b2db uxtb r3, r3 8006ab4: e02e b.n 8006b14 8006ab6: bf00 nop 8006ab8: 2400000c .word 0x2400000c 8006abc: 1b4e81b5 .word 0x1b4e81b5 8006ac0: 40020010 .word 0x40020010 8006ac4: 40020028 .word 0x40020028 8006ac8: 40020040 .word 0x40020040 8006acc: 40020058 .word 0x40020058 8006ad0: 40020070 .word 0x40020070 8006ad4: 40020088 .word 0x40020088 8006ad8: 400200a0 .word 0x400200a0 8006adc: 400200b8 .word 0x400200b8 8006ae0: 40020410 .word 0x40020410 8006ae4: 40020428 .word 0x40020428 8006ae8: 40020440 .word 0x40020440 8006aec: 40020458 .word 0x40020458 8006af0: 40020470 .word 0x40020470 8006af4: 40020488 .word 0x40020488 8006af8: 400204a0 .word 0x400204a0 8006afc: 400204b8 .word 0x400204b8 8006b00: 687b ldr r3, [r7, #4] 8006b02: 681b ldr r3, [r3, #0] 8006b04: 681b ldr r3, [r3, #0] 8006b06: f003 0308 and.w r3, r3, #8 8006b0a: 2b00 cmp r3, #0 8006b0c: bf14 ite ne 8006b0e: 2301 movne r3, #1 8006b10: 2300 moveq r3, #0 8006b12: b2db uxtb r3, r3 8006b14: 2b00 cmp r3, #0 8006b16: d015 beq.n 8006b44 { /* Disable the transfer error interrupt */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_TE); 8006b18: 687b ldr r3, [r7, #4] 8006b1a: 681b ldr r3, [r3, #0] 8006b1c: 681a ldr r2, [r3, #0] 8006b1e: 687b ldr r3, [r7, #4] 8006b20: 681b ldr r3, [r3, #0] 8006b22: f022 0204 bic.w r2, r2, #4 8006b26: 601a str r2, [r3, #0] /* Clear the transfer error flag */ regs_dma->IFCR = DMA_FLAG_TEIF0_4 << (hdma->StreamIndex & 0x1FU); 8006b28: 687b ldr r3, [r7, #4] 8006b2a: 6ddb ldr r3, [r3, #92] @ 0x5c 8006b2c: f003 031f and.w r3, r3, #31 8006b30: 2208 movs r2, #8 8006b32: 409a lsls r2, r3 8006b34: 6a3b ldr r3, [r7, #32] 8006b36: 609a str r2, [r3, #8] /* Update error code */ hdma->ErrorCode |= HAL_DMA_ERROR_TE; 8006b38: 687b ldr r3, [r7, #4] 8006b3a: 6d5b ldr r3, [r3, #84] @ 0x54 8006b3c: f043 0201 orr.w r2, r3, #1 8006b40: 687b ldr r3, [r7, #4] 8006b42: 655a str r2, [r3, #84] @ 0x54 } } /* FIFO Error Interrupt management ******************************************/ if ((tmpisr_dma & (DMA_FLAG_FEIF0_4 << (hdma->StreamIndex & 0x1FU))) != 0U) 8006b44: 687b ldr r3, [r7, #4] 8006b46: 6ddb ldr r3, [r3, #92] @ 0x5c 8006b48: f003 031f and.w r3, r3, #31 8006b4c: 69ba ldr r2, [r7, #24] 8006b4e: fa22 f303 lsr.w r3, r2, r3 8006b52: f003 0301 and.w r3, r3, #1 8006b56: 2b00 cmp r3, #0 8006b58: d06e beq.n 8006c38 { if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_FE) != 0U) 8006b5a: 687b ldr r3, [r7, #4] 8006b5c: 681b ldr r3, [r3, #0] 8006b5e: 4a69 ldr r2, [pc, #420] @ (8006d04 ) 8006b60: 4293 cmp r3, r2 8006b62: d04a beq.n 8006bfa 8006b64: 687b ldr r3, [r7, #4] 8006b66: 681b ldr r3, [r3, #0] 8006b68: 4a67 ldr r2, [pc, #412] @ (8006d08 ) 8006b6a: 4293 cmp r3, r2 8006b6c: d045 beq.n 8006bfa 8006b6e: 687b ldr r3, [r7, #4] 8006b70: 681b ldr r3, [r3, #0] 8006b72: 4a66 ldr r2, [pc, #408] @ (8006d0c ) 8006b74: 4293 cmp r3, r2 8006b76: d040 beq.n 8006bfa 8006b78: 687b ldr r3, [r7, #4] 8006b7a: 681b ldr r3, [r3, #0] 8006b7c: 4a64 ldr r2, [pc, #400] @ (8006d10 ) 8006b7e: 4293 cmp r3, r2 8006b80: d03b beq.n 8006bfa 8006b82: 687b ldr r3, [r7, #4] 8006b84: 681b ldr r3, [r3, #0] 8006b86: 4a63 ldr r2, [pc, #396] @ (8006d14 ) 8006b88: 4293 cmp r3, r2 8006b8a: d036 beq.n 8006bfa 8006b8c: 687b ldr r3, [r7, #4] 8006b8e: 681b ldr r3, [r3, #0] 8006b90: 4a61 ldr r2, [pc, #388] @ (8006d18 ) 8006b92: 4293 cmp r3, r2 8006b94: d031 beq.n 8006bfa 8006b96: 687b ldr r3, [r7, #4] 8006b98: 681b ldr r3, [r3, #0] 8006b9a: 4a60 ldr r2, [pc, #384] @ (8006d1c ) 8006b9c: 4293 cmp r3, r2 8006b9e: d02c beq.n 8006bfa 8006ba0: 687b ldr r3, [r7, #4] 8006ba2: 681b ldr r3, [r3, #0] 8006ba4: 4a5e ldr r2, [pc, #376] @ (8006d20 ) 8006ba6: 4293 cmp r3, r2 8006ba8: d027 beq.n 8006bfa 8006baa: 687b ldr r3, [r7, #4] 8006bac: 681b ldr r3, [r3, #0] 8006bae: 4a5d ldr r2, [pc, #372] @ (8006d24 ) 8006bb0: 4293 cmp r3, r2 8006bb2: d022 beq.n 8006bfa 8006bb4: 687b ldr r3, [r7, #4] 8006bb6: 681b ldr r3, [r3, #0] 8006bb8: 4a5b ldr r2, [pc, #364] @ (8006d28 ) 8006bba: 4293 cmp r3, r2 8006bbc: d01d beq.n 8006bfa 8006bbe: 687b ldr r3, [r7, #4] 8006bc0: 681b ldr r3, [r3, #0] 8006bc2: 4a5a ldr r2, [pc, #360] @ (8006d2c ) 8006bc4: 4293 cmp r3, r2 8006bc6: d018 beq.n 8006bfa 8006bc8: 687b ldr r3, [r7, #4] 8006bca: 681b ldr r3, [r3, #0] 8006bcc: 4a58 ldr r2, [pc, #352] @ (8006d30 ) 8006bce: 4293 cmp r3, r2 8006bd0: d013 beq.n 8006bfa 8006bd2: 687b ldr r3, [r7, #4] 8006bd4: 681b ldr r3, [r3, #0] 8006bd6: 4a57 ldr r2, [pc, #348] @ (8006d34 ) 8006bd8: 4293 cmp r3, r2 8006bda: d00e beq.n 8006bfa 8006bdc: 687b ldr r3, [r7, #4] 8006bde: 681b ldr r3, [r3, #0] 8006be0: 4a55 ldr r2, [pc, #340] @ (8006d38 ) 8006be2: 4293 cmp r3, r2 8006be4: d009 beq.n 8006bfa 8006be6: 687b ldr r3, [r7, #4] 8006be8: 681b ldr r3, [r3, #0] 8006bea: 4a54 ldr r2, [pc, #336] @ (8006d3c ) 8006bec: 4293 cmp r3, r2 8006bee: d004 beq.n 8006bfa 8006bf0: 687b ldr r3, [r7, #4] 8006bf2: 681b ldr r3, [r3, #0] 8006bf4: 4a52 ldr r2, [pc, #328] @ (8006d40 ) 8006bf6: 4293 cmp r3, r2 8006bf8: d10a bne.n 8006c10 8006bfa: 687b ldr r3, [r7, #4] 8006bfc: 681b ldr r3, [r3, #0] 8006bfe: 695b ldr r3, [r3, #20] 8006c00: f003 0380 and.w r3, r3, #128 @ 0x80 8006c04: 2b00 cmp r3, #0 8006c06: bf14 ite ne 8006c08: 2301 movne r3, #1 8006c0a: 2300 moveq r3, #0 8006c0c: b2db uxtb r3, r3 8006c0e: e003 b.n 8006c18 8006c10: 687b ldr r3, [r7, #4] 8006c12: 681b ldr r3, [r3, #0] 8006c14: 681b ldr r3, [r3, #0] 8006c16: 2300 movs r3, #0 8006c18: 2b00 cmp r3, #0 8006c1a: d00d beq.n 8006c38 { /* Clear the FIFO error flag */ regs_dma->IFCR = DMA_FLAG_FEIF0_4 << (hdma->StreamIndex & 0x1FU); 8006c1c: 687b ldr r3, [r7, #4] 8006c1e: 6ddb ldr r3, [r3, #92] @ 0x5c 8006c20: f003 031f and.w r3, r3, #31 8006c24: 2201 movs r2, #1 8006c26: 409a lsls r2, r3 8006c28: 6a3b ldr r3, [r7, #32] 8006c2a: 609a str r2, [r3, #8] /* Update error code */ hdma->ErrorCode |= HAL_DMA_ERROR_FE; 8006c2c: 687b ldr r3, [r7, #4] 8006c2e: 6d5b ldr r3, [r3, #84] @ 0x54 8006c30: f043 0202 orr.w r2, r3, #2 8006c34: 687b ldr r3, [r7, #4] 8006c36: 655a str r2, [r3, #84] @ 0x54 } } /* Direct Mode Error Interrupt management ***********************************/ if ((tmpisr_dma & (DMA_FLAG_DMEIF0_4 << (hdma->StreamIndex & 0x1FU))) != 0U) 8006c38: 687b ldr r3, [r7, #4] 8006c3a: 6ddb ldr r3, [r3, #92] @ 0x5c 8006c3c: f003 031f and.w r3, r3, #31 8006c40: 2204 movs r2, #4 8006c42: 409a lsls r2, r3 8006c44: 69bb ldr r3, [r7, #24] 8006c46: 4013 ands r3, r2 8006c48: 2b00 cmp r3, #0 8006c4a: f000 808f beq.w 8006d6c { if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_DME) != 0U) 8006c4e: 687b ldr r3, [r7, #4] 8006c50: 681b ldr r3, [r3, #0] 8006c52: 4a2c ldr r2, [pc, #176] @ (8006d04 ) 8006c54: 4293 cmp r3, r2 8006c56: d04a beq.n 8006cee 8006c58: 687b ldr r3, [r7, #4] 8006c5a: 681b ldr r3, [r3, #0] 8006c5c: 4a2a ldr r2, [pc, #168] @ (8006d08 ) 8006c5e: 4293 cmp r3, r2 8006c60: d045 beq.n 8006cee 8006c62: 687b ldr r3, [r7, #4] 8006c64: 681b ldr r3, [r3, #0] 8006c66: 4a29 ldr r2, [pc, #164] @ (8006d0c ) 8006c68: 4293 cmp r3, r2 8006c6a: d040 beq.n 8006cee 8006c6c: 687b ldr r3, [r7, #4] 8006c6e: 681b ldr r3, [r3, #0] 8006c70: 4a27 ldr r2, [pc, #156] @ (8006d10 ) 8006c72: 4293 cmp r3, r2 8006c74: d03b beq.n 8006cee 8006c76: 687b ldr r3, [r7, #4] 8006c78: 681b ldr r3, [r3, #0] 8006c7a: 4a26 ldr r2, [pc, #152] @ (8006d14 ) 8006c7c: 4293 cmp r3, r2 8006c7e: d036 beq.n 8006cee 8006c80: 687b ldr r3, [r7, #4] 8006c82: 681b ldr r3, [r3, #0] 8006c84: 4a24 ldr r2, [pc, #144] @ (8006d18 ) 8006c86: 4293 cmp r3, r2 8006c88: d031 beq.n 8006cee 8006c8a: 687b ldr r3, [r7, #4] 8006c8c: 681b ldr r3, [r3, #0] 8006c8e: 4a23 ldr r2, [pc, #140] @ (8006d1c ) 8006c90: 4293 cmp r3, r2 8006c92: d02c beq.n 8006cee 8006c94: 687b ldr r3, [r7, #4] 8006c96: 681b ldr r3, [r3, #0] 8006c98: 4a21 ldr r2, [pc, #132] @ (8006d20 ) 8006c9a: 4293 cmp r3, r2 8006c9c: d027 beq.n 8006cee 8006c9e: 687b ldr r3, [r7, #4] 8006ca0: 681b ldr r3, [r3, #0] 8006ca2: 4a20 ldr r2, [pc, #128] @ (8006d24 ) 8006ca4: 4293 cmp r3, r2 8006ca6: d022 beq.n 8006cee 8006ca8: 687b ldr r3, [r7, #4] 8006caa: 681b ldr r3, [r3, #0] 8006cac: 4a1e ldr r2, [pc, #120] @ (8006d28 ) 8006cae: 4293 cmp r3, r2 8006cb0: d01d beq.n 8006cee 8006cb2: 687b ldr r3, [r7, #4] 8006cb4: 681b ldr r3, [r3, #0] 8006cb6: 4a1d ldr r2, [pc, #116] @ (8006d2c ) 8006cb8: 4293 cmp r3, r2 8006cba: d018 beq.n 8006cee 8006cbc: 687b ldr r3, [r7, #4] 8006cbe: 681b ldr r3, [r3, #0] 8006cc0: 4a1b ldr r2, [pc, #108] @ (8006d30 ) 8006cc2: 4293 cmp r3, r2 8006cc4: d013 beq.n 8006cee 8006cc6: 687b ldr r3, [r7, #4] 8006cc8: 681b ldr r3, [r3, #0] 8006cca: 4a1a ldr r2, [pc, #104] @ (8006d34 ) 8006ccc: 4293 cmp r3, r2 8006cce: d00e beq.n 8006cee 8006cd0: 687b ldr r3, [r7, #4] 8006cd2: 681b ldr r3, [r3, #0] 8006cd4: 4a18 ldr r2, [pc, #96] @ (8006d38 ) 8006cd6: 4293 cmp r3, r2 8006cd8: d009 beq.n 8006cee 8006cda: 687b ldr r3, [r7, #4] 8006cdc: 681b ldr r3, [r3, #0] 8006cde: 4a17 ldr r2, [pc, #92] @ (8006d3c ) 8006ce0: 4293 cmp r3, r2 8006ce2: d004 beq.n 8006cee 8006ce4: 687b ldr r3, [r7, #4] 8006ce6: 681b ldr r3, [r3, #0] 8006ce8: 4a15 ldr r2, [pc, #84] @ (8006d40 ) 8006cea: 4293 cmp r3, r2 8006cec: d12a bne.n 8006d44 8006cee: 687b ldr r3, [r7, #4] 8006cf0: 681b ldr r3, [r3, #0] 8006cf2: 681b ldr r3, [r3, #0] 8006cf4: f003 0302 and.w r3, r3, #2 8006cf8: 2b00 cmp r3, #0 8006cfa: bf14 ite ne 8006cfc: 2301 movne r3, #1 8006cfe: 2300 moveq r3, #0 8006d00: b2db uxtb r3, r3 8006d02: e023 b.n 8006d4c 8006d04: 40020010 .word 0x40020010 8006d08: 40020028 .word 0x40020028 8006d0c: 40020040 .word 0x40020040 8006d10: 40020058 .word 0x40020058 8006d14: 40020070 .word 0x40020070 8006d18: 40020088 .word 0x40020088 8006d1c: 400200a0 .word 0x400200a0 8006d20: 400200b8 .word 0x400200b8 8006d24: 40020410 .word 0x40020410 8006d28: 40020428 .word 0x40020428 8006d2c: 40020440 .word 0x40020440 8006d30: 40020458 .word 0x40020458 8006d34: 40020470 .word 0x40020470 8006d38: 40020488 .word 0x40020488 8006d3c: 400204a0 .word 0x400204a0 8006d40: 400204b8 .word 0x400204b8 8006d44: 687b ldr r3, [r7, #4] 8006d46: 681b ldr r3, [r3, #0] 8006d48: 681b ldr r3, [r3, #0] 8006d4a: 2300 movs r3, #0 8006d4c: 2b00 cmp r3, #0 8006d4e: d00d beq.n 8006d6c { /* Clear the direct mode error flag */ regs_dma->IFCR = DMA_FLAG_DMEIF0_4 << (hdma->StreamIndex & 0x1FU); 8006d50: 687b ldr r3, [r7, #4] 8006d52: 6ddb ldr r3, [r3, #92] @ 0x5c 8006d54: f003 031f and.w r3, r3, #31 8006d58: 2204 movs r2, #4 8006d5a: 409a lsls r2, r3 8006d5c: 6a3b ldr r3, [r7, #32] 8006d5e: 609a str r2, [r3, #8] /* Update error code */ hdma->ErrorCode |= HAL_DMA_ERROR_DME; 8006d60: 687b ldr r3, [r7, #4] 8006d62: 6d5b ldr r3, [r3, #84] @ 0x54 8006d64: f043 0204 orr.w r2, r3, #4 8006d68: 687b ldr r3, [r7, #4] 8006d6a: 655a str r2, [r3, #84] @ 0x54 } } /* Half Transfer Complete Interrupt management ******************************/ if ((tmpisr_dma & (DMA_FLAG_HTIF0_4 << (hdma->StreamIndex & 0x1FU))) != 0U) 8006d6c: 687b ldr r3, [r7, #4] 8006d6e: 6ddb ldr r3, [r3, #92] @ 0x5c 8006d70: f003 031f and.w r3, r3, #31 8006d74: 2210 movs r2, #16 8006d76: 409a lsls r2, r3 8006d78: 69bb ldr r3, [r7, #24] 8006d7a: 4013 ands r3, r2 8006d7c: 2b00 cmp r3, #0 8006d7e: f000 80a6 beq.w 8006ece { if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_HT) != 0U) 8006d82: 687b ldr r3, [r7, #4] 8006d84: 681b ldr r3, [r3, #0] 8006d86: 4a85 ldr r2, [pc, #532] @ (8006f9c ) 8006d88: 4293 cmp r3, r2 8006d8a: d04a beq.n 8006e22 8006d8c: 687b ldr r3, [r7, #4] 8006d8e: 681b ldr r3, [r3, #0] 8006d90: 4a83 ldr r2, [pc, #524] @ (8006fa0 ) 8006d92: 4293 cmp r3, r2 8006d94: d045 beq.n 8006e22 8006d96: 687b ldr r3, [r7, #4] 8006d98: 681b ldr r3, [r3, #0] 8006d9a: 4a82 ldr r2, [pc, #520] @ (8006fa4 ) 8006d9c: 4293 cmp r3, r2 8006d9e: d040 beq.n 8006e22 8006da0: 687b ldr r3, [r7, #4] 8006da2: 681b ldr r3, [r3, #0] 8006da4: 4a80 ldr r2, [pc, #512] @ (8006fa8 ) 8006da6: 4293 cmp r3, r2 8006da8: d03b beq.n 8006e22 8006daa: 687b ldr r3, [r7, #4] 8006dac: 681b ldr r3, [r3, #0] 8006dae: 4a7f ldr r2, [pc, #508] @ (8006fac ) 8006db0: 4293 cmp r3, r2 8006db2: d036 beq.n 8006e22 8006db4: 687b ldr r3, [r7, #4] 8006db6: 681b ldr r3, [r3, #0] 8006db8: 4a7d ldr r2, [pc, #500] @ (8006fb0 ) 8006dba: 4293 cmp r3, r2 8006dbc: d031 beq.n 8006e22 8006dbe: 687b ldr r3, [r7, #4] 8006dc0: 681b ldr r3, [r3, #0] 8006dc2: 4a7c ldr r2, [pc, #496] @ (8006fb4 ) 8006dc4: 4293 cmp r3, r2 8006dc6: d02c beq.n 8006e22 8006dc8: 687b ldr r3, [r7, #4] 8006dca: 681b ldr r3, [r3, #0] 8006dcc: 4a7a ldr r2, [pc, #488] @ (8006fb8 ) 8006dce: 4293 cmp r3, r2 8006dd0: d027 beq.n 8006e22 8006dd2: 687b ldr r3, [r7, #4] 8006dd4: 681b ldr r3, [r3, #0] 8006dd6: 4a79 ldr r2, [pc, #484] @ (8006fbc ) 8006dd8: 4293 cmp r3, r2 8006dda: d022 beq.n 8006e22 8006ddc: 687b ldr r3, [r7, #4] 8006dde: 681b ldr r3, [r3, #0] 8006de0: 4a77 ldr r2, [pc, #476] @ (8006fc0 ) 8006de2: 4293 cmp r3, r2 8006de4: d01d beq.n 8006e22 8006de6: 687b ldr r3, [r7, #4] 8006de8: 681b ldr r3, [r3, #0] 8006dea: 4a76 ldr r2, [pc, #472] @ (8006fc4 ) 8006dec: 4293 cmp r3, r2 8006dee: d018 beq.n 8006e22 8006df0: 687b ldr r3, [r7, #4] 8006df2: 681b ldr r3, [r3, #0] 8006df4: 4a74 ldr r2, [pc, #464] @ (8006fc8 ) 8006df6: 4293 cmp r3, r2 8006df8: d013 beq.n 8006e22 8006dfa: 687b ldr r3, [r7, #4] 8006dfc: 681b ldr r3, [r3, #0] 8006dfe: 4a73 ldr r2, [pc, #460] @ (8006fcc ) 8006e00: 4293 cmp r3, r2 8006e02: d00e beq.n 8006e22 8006e04: 687b ldr r3, [r7, #4] 8006e06: 681b ldr r3, [r3, #0] 8006e08: 4a71 ldr r2, [pc, #452] @ (8006fd0 ) 8006e0a: 4293 cmp r3, r2 8006e0c: d009 beq.n 8006e22 8006e0e: 687b ldr r3, [r7, #4] 8006e10: 681b ldr r3, [r3, #0] 8006e12: 4a70 ldr r2, [pc, #448] @ (8006fd4 ) 8006e14: 4293 cmp r3, r2 8006e16: d004 beq.n 8006e22 8006e18: 687b ldr r3, [r7, #4] 8006e1a: 681b ldr r3, [r3, #0] 8006e1c: 4a6e ldr r2, [pc, #440] @ (8006fd8 ) 8006e1e: 4293 cmp r3, r2 8006e20: d10a bne.n 8006e38 8006e22: 687b ldr r3, [r7, #4] 8006e24: 681b ldr r3, [r3, #0] 8006e26: 681b ldr r3, [r3, #0] 8006e28: f003 0308 and.w r3, r3, #8 8006e2c: 2b00 cmp r3, #0 8006e2e: bf14 ite ne 8006e30: 2301 movne r3, #1 8006e32: 2300 moveq r3, #0 8006e34: b2db uxtb r3, r3 8006e36: e009 b.n 8006e4c 8006e38: 687b ldr r3, [r7, #4] 8006e3a: 681b ldr r3, [r3, #0] 8006e3c: 681b ldr r3, [r3, #0] 8006e3e: f003 0304 and.w r3, r3, #4 8006e42: 2b00 cmp r3, #0 8006e44: bf14 ite ne 8006e46: 2301 movne r3, #1 8006e48: 2300 moveq r3, #0 8006e4a: b2db uxtb r3, r3 8006e4c: 2b00 cmp r3, #0 8006e4e: d03e beq.n 8006ece { /* Clear the half transfer complete flag */ regs_dma->IFCR = DMA_FLAG_HTIF0_4 << (hdma->StreamIndex & 0x1FU); 8006e50: 687b ldr r3, [r7, #4] 8006e52: 6ddb ldr r3, [r3, #92] @ 0x5c 8006e54: f003 031f and.w r3, r3, #31 8006e58: 2210 movs r2, #16 8006e5a: 409a lsls r2, r3 8006e5c: 6a3b ldr r3, [r7, #32] 8006e5e: 609a str r2, [r3, #8] /* Multi_Buffering mode enabled */ if(((((DMA_Stream_TypeDef *)hdma->Instance)->CR) & (uint32_t)(DMA_SxCR_DBM)) != 0U) 8006e60: 687b ldr r3, [r7, #4] 8006e62: 681b ldr r3, [r3, #0] 8006e64: 681b ldr r3, [r3, #0] 8006e66: f403 2380 and.w r3, r3, #262144 @ 0x40000 8006e6a: 2b00 cmp r3, #0 8006e6c: d018 beq.n 8006ea0 { /* Current memory buffer used is Memory 0 */ if((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_CT) == 0U) 8006e6e: 687b ldr r3, [r7, #4] 8006e70: 681b ldr r3, [r3, #0] 8006e72: 681b ldr r3, [r3, #0] 8006e74: f403 2300 and.w r3, r3, #524288 @ 0x80000 8006e78: 2b00 cmp r3, #0 8006e7a: d108 bne.n 8006e8e { if(hdma->XferHalfCpltCallback != NULL) 8006e7c: 687b ldr r3, [r7, #4] 8006e7e: 6c1b ldr r3, [r3, #64] @ 0x40 8006e80: 2b00 cmp r3, #0 8006e82: d024 beq.n 8006ece { /* Half transfer callback */ hdma->XferHalfCpltCallback(hdma); 8006e84: 687b ldr r3, [r7, #4] 8006e86: 6c1b ldr r3, [r3, #64] @ 0x40 8006e88: 6878 ldr r0, [r7, #4] 8006e8a: 4798 blx r3 8006e8c: e01f b.n 8006ece } } /* Current memory buffer used is Memory 1 */ else { if(hdma->XferM1HalfCpltCallback != NULL) 8006e8e: 687b ldr r3, [r7, #4] 8006e90: 6c9b ldr r3, [r3, #72] @ 0x48 8006e92: 2b00 cmp r3, #0 8006e94: d01b beq.n 8006ece { /* Half transfer callback */ hdma->XferM1HalfCpltCallback(hdma); 8006e96: 687b ldr r3, [r7, #4] 8006e98: 6c9b ldr r3, [r3, #72] @ 0x48 8006e9a: 6878 ldr r0, [r7, #4] 8006e9c: 4798 blx r3 8006e9e: e016 b.n 8006ece } } else { /* Disable the half transfer interrupt if the DMA mode is not CIRCULAR */ if((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_CIRC) == 0U) 8006ea0: 687b ldr r3, [r7, #4] 8006ea2: 681b ldr r3, [r3, #0] 8006ea4: 681b ldr r3, [r3, #0] 8006ea6: f403 7380 and.w r3, r3, #256 @ 0x100 8006eaa: 2b00 cmp r3, #0 8006eac: d107 bne.n 8006ebe { /* Disable the half transfer interrupt */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_HT); 8006eae: 687b ldr r3, [r7, #4] 8006eb0: 681b ldr r3, [r3, #0] 8006eb2: 681a ldr r2, [r3, #0] 8006eb4: 687b ldr r3, [r7, #4] 8006eb6: 681b ldr r3, [r3, #0] 8006eb8: f022 0208 bic.w r2, r2, #8 8006ebc: 601a str r2, [r3, #0] } if(hdma->XferHalfCpltCallback != NULL) 8006ebe: 687b ldr r3, [r7, #4] 8006ec0: 6c1b ldr r3, [r3, #64] @ 0x40 8006ec2: 2b00 cmp r3, #0 8006ec4: d003 beq.n 8006ece { /* Half transfer callback */ hdma->XferHalfCpltCallback(hdma); 8006ec6: 687b ldr r3, [r7, #4] 8006ec8: 6c1b ldr r3, [r3, #64] @ 0x40 8006eca: 6878 ldr r0, [r7, #4] 8006ecc: 4798 blx r3 } } } } /* Transfer Complete Interrupt management ***********************************/ if ((tmpisr_dma & (DMA_FLAG_TCIF0_4 << (hdma->StreamIndex & 0x1FU))) != 0U) 8006ece: 687b ldr r3, [r7, #4] 8006ed0: 6ddb ldr r3, [r3, #92] @ 0x5c 8006ed2: f003 031f and.w r3, r3, #31 8006ed6: 2220 movs r2, #32 8006ed8: 409a lsls r2, r3 8006eda: 69bb ldr r3, [r7, #24] 8006edc: 4013 ands r3, r2 8006ede: 2b00 cmp r3, #0 8006ee0: f000 8110 beq.w 8007104 { if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_TC) != 0U) 8006ee4: 687b ldr r3, [r7, #4] 8006ee6: 681b ldr r3, [r3, #0] 8006ee8: 4a2c ldr r2, [pc, #176] @ (8006f9c ) 8006eea: 4293 cmp r3, r2 8006eec: d04a beq.n 8006f84 8006eee: 687b ldr r3, [r7, #4] 8006ef0: 681b ldr r3, [r3, #0] 8006ef2: 4a2b ldr r2, [pc, #172] @ (8006fa0 ) 8006ef4: 4293 cmp r3, r2 8006ef6: d045 beq.n 8006f84 8006ef8: 687b ldr r3, [r7, #4] 8006efa: 681b ldr r3, [r3, #0] 8006efc: 4a29 ldr r2, [pc, #164] @ (8006fa4 ) 8006efe: 4293 cmp r3, r2 8006f00: d040 beq.n 8006f84 8006f02: 687b ldr r3, [r7, #4] 8006f04: 681b ldr r3, [r3, #0] 8006f06: 4a28 ldr r2, [pc, #160] @ (8006fa8 ) 8006f08: 4293 cmp r3, r2 8006f0a: d03b beq.n 8006f84 8006f0c: 687b ldr r3, [r7, #4] 8006f0e: 681b ldr r3, [r3, #0] 8006f10: 4a26 ldr r2, [pc, #152] @ (8006fac ) 8006f12: 4293 cmp r3, r2 8006f14: d036 beq.n 8006f84 8006f16: 687b ldr r3, [r7, #4] 8006f18: 681b ldr r3, [r3, #0] 8006f1a: 4a25 ldr r2, [pc, #148] @ (8006fb0 ) 8006f1c: 4293 cmp r3, r2 8006f1e: d031 beq.n 8006f84 8006f20: 687b ldr r3, [r7, #4] 8006f22: 681b ldr r3, [r3, #0] 8006f24: 4a23 ldr r2, [pc, #140] @ (8006fb4 ) 8006f26: 4293 cmp r3, r2 8006f28: d02c beq.n 8006f84 8006f2a: 687b ldr r3, [r7, #4] 8006f2c: 681b ldr r3, [r3, #0] 8006f2e: 4a22 ldr r2, [pc, #136] @ (8006fb8 ) 8006f30: 4293 cmp r3, r2 8006f32: d027 beq.n 8006f84 8006f34: 687b ldr r3, [r7, #4] 8006f36: 681b ldr r3, [r3, #0] 8006f38: 4a20 ldr r2, [pc, #128] @ (8006fbc ) 8006f3a: 4293 cmp r3, r2 8006f3c: d022 beq.n 8006f84 8006f3e: 687b ldr r3, [r7, #4] 8006f40: 681b ldr r3, [r3, #0] 8006f42: 4a1f ldr r2, [pc, #124] @ (8006fc0 ) 8006f44: 4293 cmp r3, r2 8006f46: d01d beq.n 8006f84 8006f48: 687b ldr r3, [r7, #4] 8006f4a: 681b ldr r3, [r3, #0] 8006f4c: 4a1d ldr r2, [pc, #116] @ (8006fc4 ) 8006f4e: 4293 cmp r3, r2 8006f50: d018 beq.n 8006f84 8006f52: 687b ldr r3, [r7, #4] 8006f54: 681b ldr r3, [r3, #0] 8006f56: 4a1c ldr r2, [pc, #112] @ (8006fc8 ) 8006f58: 4293 cmp r3, r2 8006f5a: d013 beq.n 8006f84 8006f5c: 687b ldr r3, [r7, #4] 8006f5e: 681b ldr r3, [r3, #0] 8006f60: 4a1a ldr r2, [pc, #104] @ (8006fcc ) 8006f62: 4293 cmp r3, r2 8006f64: d00e beq.n 8006f84 8006f66: 687b ldr r3, [r7, #4] 8006f68: 681b ldr r3, [r3, #0] 8006f6a: 4a19 ldr r2, [pc, #100] @ (8006fd0 ) 8006f6c: 4293 cmp r3, r2 8006f6e: d009 beq.n 8006f84 8006f70: 687b ldr r3, [r7, #4] 8006f72: 681b ldr r3, [r3, #0] 8006f74: 4a17 ldr r2, [pc, #92] @ (8006fd4 ) 8006f76: 4293 cmp r3, r2 8006f78: d004 beq.n 8006f84 8006f7a: 687b ldr r3, [r7, #4] 8006f7c: 681b ldr r3, [r3, #0] 8006f7e: 4a16 ldr r2, [pc, #88] @ (8006fd8 ) 8006f80: 4293 cmp r3, r2 8006f82: d12b bne.n 8006fdc 8006f84: 687b ldr r3, [r7, #4] 8006f86: 681b ldr r3, [r3, #0] 8006f88: 681b ldr r3, [r3, #0] 8006f8a: f003 0310 and.w r3, r3, #16 8006f8e: 2b00 cmp r3, #0 8006f90: bf14 ite ne 8006f92: 2301 movne r3, #1 8006f94: 2300 moveq r3, #0 8006f96: b2db uxtb r3, r3 8006f98: e02a b.n 8006ff0 8006f9a: bf00 nop 8006f9c: 40020010 .word 0x40020010 8006fa0: 40020028 .word 0x40020028 8006fa4: 40020040 .word 0x40020040 8006fa8: 40020058 .word 0x40020058 8006fac: 40020070 .word 0x40020070 8006fb0: 40020088 .word 0x40020088 8006fb4: 400200a0 .word 0x400200a0 8006fb8: 400200b8 .word 0x400200b8 8006fbc: 40020410 .word 0x40020410 8006fc0: 40020428 .word 0x40020428 8006fc4: 40020440 .word 0x40020440 8006fc8: 40020458 .word 0x40020458 8006fcc: 40020470 .word 0x40020470 8006fd0: 40020488 .word 0x40020488 8006fd4: 400204a0 .word 0x400204a0 8006fd8: 400204b8 .word 0x400204b8 8006fdc: 687b ldr r3, [r7, #4] 8006fde: 681b ldr r3, [r3, #0] 8006fe0: 681b ldr r3, [r3, #0] 8006fe2: f003 0302 and.w r3, r3, #2 8006fe6: 2b00 cmp r3, #0 8006fe8: bf14 ite ne 8006fea: 2301 movne r3, #1 8006fec: 2300 moveq r3, #0 8006fee: b2db uxtb r3, r3 8006ff0: 2b00 cmp r3, #0 8006ff2: f000 8087 beq.w 8007104 { /* Clear the transfer complete flag */ regs_dma->IFCR = DMA_FLAG_TCIF0_4 << (hdma->StreamIndex & 0x1FU); 8006ff6: 687b ldr r3, [r7, #4] 8006ff8: 6ddb ldr r3, [r3, #92] @ 0x5c 8006ffa: f003 031f and.w r3, r3, #31 8006ffe: 2220 movs r2, #32 8007000: 409a lsls r2, r3 8007002: 6a3b ldr r3, [r7, #32] 8007004: 609a str r2, [r3, #8] if(HAL_DMA_STATE_ABORT == hdma->State) 8007006: 687b ldr r3, [r7, #4] 8007008: f893 3035 ldrb.w r3, [r3, #53] @ 0x35 800700c: b2db uxtb r3, r3 800700e: 2b04 cmp r3, #4 8007010: d139 bne.n 8007086 { /* Disable all the transfer interrupts */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_TC | DMA_IT_TE | DMA_IT_DME); 8007012: 687b ldr r3, [r7, #4] 8007014: 681b ldr r3, [r3, #0] 8007016: 681a ldr r2, [r3, #0] 8007018: 687b ldr r3, [r7, #4] 800701a: 681b ldr r3, [r3, #0] 800701c: f022 0216 bic.w r2, r2, #22 8007020: 601a str r2, [r3, #0] ((DMA_Stream_TypeDef *)hdma->Instance)->FCR &= ~(DMA_IT_FE); 8007022: 687b ldr r3, [r7, #4] 8007024: 681b ldr r3, [r3, #0] 8007026: 695a ldr r2, [r3, #20] 8007028: 687b ldr r3, [r7, #4] 800702a: 681b ldr r3, [r3, #0] 800702c: f022 0280 bic.w r2, r2, #128 @ 0x80 8007030: 615a str r2, [r3, #20] if((hdma->XferHalfCpltCallback != NULL) || (hdma->XferM1HalfCpltCallback != NULL)) 8007032: 687b ldr r3, [r7, #4] 8007034: 6c1b ldr r3, [r3, #64] @ 0x40 8007036: 2b00 cmp r3, #0 8007038: d103 bne.n 8007042 800703a: 687b ldr r3, [r7, #4] 800703c: 6c9b ldr r3, [r3, #72] @ 0x48 800703e: 2b00 cmp r3, #0 8007040: d007 beq.n 8007052 { ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_HT); 8007042: 687b ldr r3, [r7, #4] 8007044: 681b ldr r3, [r3, #0] 8007046: 681a ldr r2, [r3, #0] 8007048: 687b ldr r3, [r7, #4] 800704a: 681b ldr r3, [r3, #0] 800704c: f022 0208 bic.w r2, r2, #8 8007050: 601a str r2, [r3, #0] } /* Clear all interrupt flags at correct offset within the register */ regs_dma->IFCR = 0x3FUL << (hdma->StreamIndex & 0x1FU); 8007052: 687b ldr r3, [r7, #4] 8007054: 6ddb ldr r3, [r3, #92] @ 0x5c 8007056: f003 031f and.w r3, r3, #31 800705a: 223f movs r2, #63 @ 0x3f 800705c: 409a lsls r2, r3 800705e: 6a3b ldr r3, [r7, #32] 8007060: 609a str r2, [r3, #8] /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 8007062: 687b ldr r3, [r7, #4] 8007064: 2201 movs r2, #1 8007066: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 800706a: 687b ldr r3, [r7, #4] 800706c: 2200 movs r2, #0 800706e: f883 2034 strb.w r2, [r3, #52] @ 0x34 if(hdma->XferAbortCallback != NULL) 8007072: 687b ldr r3, [r7, #4] 8007074: 6d1b ldr r3, [r3, #80] @ 0x50 8007076: 2b00 cmp r3, #0 8007078: f000 834a beq.w 8007710 { hdma->XferAbortCallback(hdma); 800707c: 687b ldr r3, [r7, #4] 800707e: 6d1b ldr r3, [r3, #80] @ 0x50 8007080: 6878 ldr r0, [r7, #4] 8007082: 4798 blx r3 } return; 8007084: e344 b.n 8007710 } if(((((DMA_Stream_TypeDef *)hdma->Instance)->CR) & (uint32_t)(DMA_SxCR_DBM)) != 0U) 8007086: 687b ldr r3, [r7, #4] 8007088: 681b ldr r3, [r3, #0] 800708a: 681b ldr r3, [r3, #0] 800708c: f403 2380 and.w r3, r3, #262144 @ 0x40000 8007090: 2b00 cmp r3, #0 8007092: d018 beq.n 80070c6 { /* Current memory buffer used is Memory 0 */ if((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_CT) == 0U) 8007094: 687b ldr r3, [r7, #4] 8007096: 681b ldr r3, [r3, #0] 8007098: 681b ldr r3, [r3, #0] 800709a: f403 2300 and.w r3, r3, #524288 @ 0x80000 800709e: 2b00 cmp r3, #0 80070a0: d108 bne.n 80070b4 { if(hdma->XferM1CpltCallback != NULL) 80070a2: 687b ldr r3, [r7, #4] 80070a4: 6c5b ldr r3, [r3, #68] @ 0x44 80070a6: 2b00 cmp r3, #0 80070a8: d02c beq.n 8007104 { /* Transfer complete Callback for memory1 */ hdma->XferM1CpltCallback(hdma); 80070aa: 687b ldr r3, [r7, #4] 80070ac: 6c5b ldr r3, [r3, #68] @ 0x44 80070ae: 6878 ldr r0, [r7, #4] 80070b0: 4798 blx r3 80070b2: e027 b.n 8007104 } } /* Current memory buffer used is Memory 1 */ else { if(hdma->XferCpltCallback != NULL) 80070b4: 687b ldr r3, [r7, #4] 80070b6: 6bdb ldr r3, [r3, #60] @ 0x3c 80070b8: 2b00 cmp r3, #0 80070ba: d023 beq.n 8007104 { /* Transfer complete Callback for memory0 */ hdma->XferCpltCallback(hdma); 80070bc: 687b ldr r3, [r7, #4] 80070be: 6bdb ldr r3, [r3, #60] @ 0x3c 80070c0: 6878 ldr r0, [r7, #4] 80070c2: 4798 blx r3 80070c4: e01e b.n 8007104 } } /* Disable the transfer complete interrupt if the DMA mode is not CIRCULAR */ else { if((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_CIRC) == 0U) 80070c6: 687b ldr r3, [r7, #4] 80070c8: 681b ldr r3, [r3, #0] 80070ca: 681b ldr r3, [r3, #0] 80070cc: f403 7380 and.w r3, r3, #256 @ 0x100 80070d0: 2b00 cmp r3, #0 80070d2: d10f bne.n 80070f4 { /* Disable the transfer complete interrupt */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_TC); 80070d4: 687b ldr r3, [r7, #4] 80070d6: 681b ldr r3, [r3, #0] 80070d8: 681a ldr r2, [r3, #0] 80070da: 687b ldr r3, [r7, #4] 80070dc: 681b ldr r3, [r3, #0] 80070de: f022 0210 bic.w r2, r2, #16 80070e2: 601a str r2, [r3, #0] /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 80070e4: 687b ldr r3, [r7, #4] 80070e6: 2201 movs r2, #1 80070e8: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 80070ec: 687b ldr r3, [r7, #4] 80070ee: 2200 movs r2, #0 80070f0: f883 2034 strb.w r2, [r3, #52] @ 0x34 } if(hdma->XferCpltCallback != NULL) 80070f4: 687b ldr r3, [r7, #4] 80070f6: 6bdb ldr r3, [r3, #60] @ 0x3c 80070f8: 2b00 cmp r3, #0 80070fa: d003 beq.n 8007104 { /* Transfer complete callback */ hdma->XferCpltCallback(hdma); 80070fc: 687b ldr r3, [r7, #4] 80070fe: 6bdb ldr r3, [r3, #60] @ 0x3c 8007100: 6878 ldr r0, [r7, #4] 8007102: 4798 blx r3 } } } /* manage error case */ if(hdma->ErrorCode != HAL_DMA_ERROR_NONE) 8007104: 687b ldr r3, [r7, #4] 8007106: 6d5b ldr r3, [r3, #84] @ 0x54 8007108: 2b00 cmp r3, #0 800710a: f000 8306 beq.w 800771a { if((hdma->ErrorCode & HAL_DMA_ERROR_TE) != 0U) 800710e: 687b ldr r3, [r7, #4] 8007110: 6d5b ldr r3, [r3, #84] @ 0x54 8007112: f003 0301 and.w r3, r3, #1 8007116: 2b00 cmp r3, #0 8007118: f000 8088 beq.w 800722c { hdma->State = HAL_DMA_STATE_ABORT; 800711c: 687b ldr r3, [r7, #4] 800711e: 2204 movs r2, #4 8007120: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Disable the stream */ __HAL_DMA_DISABLE(hdma); 8007124: 687b ldr r3, [r7, #4] 8007126: 681b ldr r3, [r3, #0] 8007128: 4a7a ldr r2, [pc, #488] @ (8007314 ) 800712a: 4293 cmp r3, r2 800712c: d04a beq.n 80071c4 800712e: 687b ldr r3, [r7, #4] 8007130: 681b ldr r3, [r3, #0] 8007132: 4a79 ldr r2, [pc, #484] @ (8007318 ) 8007134: 4293 cmp r3, r2 8007136: d045 beq.n 80071c4 8007138: 687b ldr r3, [r7, #4] 800713a: 681b ldr r3, [r3, #0] 800713c: 4a77 ldr r2, [pc, #476] @ (800731c ) 800713e: 4293 cmp r3, r2 8007140: d040 beq.n 80071c4 8007142: 687b ldr r3, [r7, #4] 8007144: 681b ldr r3, [r3, #0] 8007146: 4a76 ldr r2, [pc, #472] @ (8007320 ) 8007148: 4293 cmp r3, r2 800714a: d03b beq.n 80071c4 800714c: 687b ldr r3, [r7, #4] 800714e: 681b ldr r3, [r3, #0] 8007150: 4a74 ldr r2, [pc, #464] @ (8007324 ) 8007152: 4293 cmp r3, r2 8007154: d036 beq.n 80071c4 8007156: 687b ldr r3, [r7, #4] 8007158: 681b ldr r3, [r3, #0] 800715a: 4a73 ldr r2, [pc, #460] @ (8007328 ) 800715c: 4293 cmp r3, r2 800715e: d031 beq.n 80071c4 8007160: 687b ldr r3, [r7, #4] 8007162: 681b ldr r3, [r3, #0] 8007164: 4a71 ldr r2, [pc, #452] @ (800732c ) 8007166: 4293 cmp r3, r2 8007168: d02c beq.n 80071c4 800716a: 687b ldr r3, [r7, #4] 800716c: 681b ldr r3, [r3, #0] 800716e: 4a70 ldr r2, [pc, #448] @ (8007330 ) 8007170: 4293 cmp r3, r2 8007172: d027 beq.n 80071c4 8007174: 687b ldr r3, [r7, #4] 8007176: 681b ldr r3, [r3, #0] 8007178: 4a6e ldr r2, [pc, #440] @ (8007334 ) 800717a: 4293 cmp r3, r2 800717c: d022 beq.n 80071c4 800717e: 687b ldr r3, [r7, #4] 8007180: 681b ldr r3, [r3, #0] 8007182: 4a6d ldr r2, [pc, #436] @ (8007338 ) 8007184: 4293 cmp r3, r2 8007186: d01d beq.n 80071c4 8007188: 687b ldr r3, [r7, #4] 800718a: 681b ldr r3, [r3, #0] 800718c: 4a6b ldr r2, [pc, #428] @ (800733c ) 800718e: 4293 cmp r3, r2 8007190: d018 beq.n 80071c4 8007192: 687b ldr r3, [r7, #4] 8007194: 681b ldr r3, [r3, #0] 8007196: 4a6a ldr r2, [pc, #424] @ (8007340 ) 8007198: 4293 cmp r3, r2 800719a: d013 beq.n 80071c4 800719c: 687b ldr r3, [r7, #4] 800719e: 681b ldr r3, [r3, #0] 80071a0: 4a68 ldr r2, [pc, #416] @ (8007344 ) 80071a2: 4293 cmp r3, r2 80071a4: d00e beq.n 80071c4 80071a6: 687b ldr r3, [r7, #4] 80071a8: 681b ldr r3, [r3, #0] 80071aa: 4a67 ldr r2, [pc, #412] @ (8007348 ) 80071ac: 4293 cmp r3, r2 80071ae: d009 beq.n 80071c4 80071b0: 687b ldr r3, [r7, #4] 80071b2: 681b ldr r3, [r3, #0] 80071b4: 4a65 ldr r2, [pc, #404] @ (800734c ) 80071b6: 4293 cmp r3, r2 80071b8: d004 beq.n 80071c4 80071ba: 687b ldr r3, [r7, #4] 80071bc: 681b ldr r3, [r3, #0] 80071be: 4a64 ldr r2, [pc, #400] @ (8007350 ) 80071c0: 4293 cmp r3, r2 80071c2: d108 bne.n 80071d6 80071c4: 687b ldr r3, [r7, #4] 80071c6: 681b ldr r3, [r3, #0] 80071c8: 681a ldr r2, [r3, #0] 80071ca: 687b ldr r3, [r7, #4] 80071cc: 681b ldr r3, [r3, #0] 80071ce: f022 0201 bic.w r2, r2, #1 80071d2: 601a str r2, [r3, #0] 80071d4: e007 b.n 80071e6 80071d6: 687b ldr r3, [r7, #4] 80071d8: 681b ldr r3, [r3, #0] 80071da: 681a ldr r2, [r3, #0] 80071dc: 687b ldr r3, [r7, #4] 80071de: 681b ldr r3, [r3, #0] 80071e0: f022 0201 bic.w r2, r2, #1 80071e4: 601a str r2, [r3, #0] do { if (++count > timeout) 80071e6: 68fb ldr r3, [r7, #12] 80071e8: 3301 adds r3, #1 80071ea: 60fb str r3, [r7, #12] 80071ec: 6a7a ldr r2, [r7, #36] @ 0x24 80071ee: 429a cmp r2, r3 80071f0: d307 bcc.n 8007202 { break; } } while((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_EN) != 0U); 80071f2: 687b ldr r3, [r7, #4] 80071f4: 681b ldr r3, [r3, #0] 80071f6: 681b ldr r3, [r3, #0] 80071f8: f003 0301 and.w r3, r3, #1 80071fc: 2b00 cmp r3, #0 80071fe: d1f2 bne.n 80071e6 8007200: e000 b.n 8007204 break; 8007202: bf00 nop if((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_EN) != 0U) 8007204: 687b ldr r3, [r7, #4] 8007206: 681b ldr r3, [r3, #0] 8007208: 681b ldr r3, [r3, #0] 800720a: f003 0301 and.w r3, r3, #1 800720e: 2b00 cmp r3, #0 8007210: d004 beq.n 800721c { /* Change the DMA state to error if DMA disable fails */ hdma->State = HAL_DMA_STATE_ERROR; 8007212: 687b ldr r3, [r7, #4] 8007214: 2203 movs r2, #3 8007216: f883 2035 strb.w r2, [r3, #53] @ 0x35 800721a: e003 b.n 8007224 } else { /* Change the DMA state to Ready if DMA disable success */ hdma->State = HAL_DMA_STATE_READY; 800721c: 687b ldr r3, [r7, #4] 800721e: 2201 movs r2, #1 8007220: f883 2035 strb.w r2, [r3, #53] @ 0x35 } /* Process Unlocked */ __HAL_UNLOCK(hdma); 8007224: 687b ldr r3, [r7, #4] 8007226: 2200 movs r2, #0 8007228: f883 2034 strb.w r2, [r3, #52] @ 0x34 } if(hdma->XferErrorCallback != NULL) 800722c: 687b ldr r3, [r7, #4] 800722e: 6cdb ldr r3, [r3, #76] @ 0x4c 8007230: 2b00 cmp r3, #0 8007232: f000 8272 beq.w 800771a { /* Transfer error callback */ hdma->XferErrorCallback(hdma); 8007236: 687b ldr r3, [r7, #4] 8007238: 6cdb ldr r3, [r3, #76] @ 0x4c 800723a: 6878 ldr r0, [r7, #4] 800723c: 4798 blx r3 800723e: e26c b.n 800771a } } } else if(IS_BDMA_CHANNEL_INSTANCE(hdma->Instance) != 0U) /* BDMA instance(s) */ 8007240: 687b ldr r3, [r7, #4] 8007242: 681b ldr r3, [r3, #0] 8007244: 4a43 ldr r2, [pc, #268] @ (8007354 ) 8007246: 4293 cmp r3, r2 8007248: d022 beq.n 8007290 800724a: 687b ldr r3, [r7, #4] 800724c: 681b ldr r3, [r3, #0] 800724e: 4a42 ldr r2, [pc, #264] @ (8007358 ) 8007250: 4293 cmp r3, r2 8007252: d01d beq.n 8007290 8007254: 687b ldr r3, [r7, #4] 8007256: 681b ldr r3, [r3, #0] 8007258: 4a40 ldr r2, [pc, #256] @ (800735c ) 800725a: 4293 cmp r3, r2 800725c: d018 beq.n 8007290 800725e: 687b ldr r3, [r7, #4] 8007260: 681b ldr r3, [r3, #0] 8007262: 4a3f ldr r2, [pc, #252] @ (8007360 ) 8007264: 4293 cmp r3, r2 8007266: d013 beq.n 8007290 8007268: 687b ldr r3, [r7, #4] 800726a: 681b ldr r3, [r3, #0] 800726c: 4a3d ldr r2, [pc, #244] @ (8007364 ) 800726e: 4293 cmp r3, r2 8007270: d00e beq.n 8007290 8007272: 687b ldr r3, [r7, #4] 8007274: 681b ldr r3, [r3, #0] 8007276: 4a3c ldr r2, [pc, #240] @ (8007368 ) 8007278: 4293 cmp r3, r2 800727a: d009 beq.n 8007290 800727c: 687b ldr r3, [r7, #4] 800727e: 681b ldr r3, [r3, #0] 8007280: 4a3a ldr r2, [pc, #232] @ (800736c ) 8007282: 4293 cmp r3, r2 8007284: d004 beq.n 8007290 8007286: 687b ldr r3, [r7, #4] 8007288: 681b ldr r3, [r3, #0] 800728a: 4a39 ldr r2, [pc, #228] @ (8007370 ) 800728c: 4293 cmp r3, r2 800728e: d101 bne.n 8007294 8007290: 2301 movs r3, #1 8007292: e000 b.n 8007296 8007294: 2300 movs r3, #0 8007296: 2b00 cmp r3, #0 8007298: f000 823f beq.w 800771a { ccr_reg = (((BDMA_Channel_TypeDef *)hdma->Instance)->CCR); 800729c: 687b ldr r3, [r7, #4] 800729e: 681b ldr r3, [r3, #0] 80072a0: 681b ldr r3, [r3, #0] 80072a2: 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)) 80072a4: 687b ldr r3, [r7, #4] 80072a6: 6ddb ldr r3, [r3, #92] @ 0x5c 80072a8: f003 031f and.w r3, r3, #31 80072ac: 2204 movs r2, #4 80072ae: 409a lsls r2, r3 80072b0: 697b ldr r3, [r7, #20] 80072b2: 4013 ands r3, r2 80072b4: 2b00 cmp r3, #0 80072b6: f000 80cd beq.w 8007454 80072ba: 693b ldr r3, [r7, #16] 80072bc: f003 0304 and.w r3, r3, #4 80072c0: 2b00 cmp r3, #0 80072c2: f000 80c7 beq.w 8007454 { /* Clear the half transfer complete flag */ regs_bdma->IFCR = (BDMA_ISR_HTIF0 << (hdma->StreamIndex & 0x1FU)); 80072c6: 687b ldr r3, [r7, #4] 80072c8: 6ddb ldr r3, [r3, #92] @ 0x5c 80072ca: f003 031f and.w r3, r3, #31 80072ce: 2204 movs r2, #4 80072d0: 409a lsls r2, r3 80072d2: 69fb ldr r3, [r7, #28] 80072d4: 605a str r2, [r3, #4] /* Disable the transfer complete interrupt if the DMA mode is Double Buffering */ if((ccr_reg & BDMA_CCR_DBM) != 0U) 80072d6: 693b ldr r3, [r7, #16] 80072d8: f403 4300 and.w r3, r3, #32768 @ 0x8000 80072dc: 2b00 cmp r3, #0 80072de: d049 beq.n 8007374 { /* Current memory buffer used is Memory 0 */ if((ccr_reg & BDMA_CCR_CT) == 0U) 80072e0: 693b ldr r3, [r7, #16] 80072e2: f403 3380 and.w r3, r3, #65536 @ 0x10000 80072e6: 2b00 cmp r3, #0 80072e8: d109 bne.n 80072fe { if(hdma->XferM1HalfCpltCallback != NULL) 80072ea: 687b ldr r3, [r7, #4] 80072ec: 6c9b ldr r3, [r3, #72] @ 0x48 80072ee: 2b00 cmp r3, #0 80072f0: f000 8210 beq.w 8007714 { /* Half transfer Callback for Memory 1 */ hdma->XferM1HalfCpltCallback(hdma); 80072f4: 687b ldr r3, [r7, #4] 80072f6: 6c9b ldr r3, [r3, #72] @ 0x48 80072f8: 6878 ldr r0, [r7, #4] 80072fa: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 80072fc: e20a b.n 8007714 } } /* Current memory buffer used is Memory 1 */ else { if(hdma->XferHalfCpltCallback != NULL) 80072fe: 687b ldr r3, [r7, #4] 8007300: 6c1b ldr r3, [r3, #64] @ 0x40 8007302: 2b00 cmp r3, #0 8007304: f000 8206 beq.w 8007714 { /* Half transfer Callback for Memory 0 */ hdma->XferHalfCpltCallback(hdma); 8007308: 687b ldr r3, [r7, #4] 800730a: 6c1b ldr r3, [r3, #64] @ 0x40 800730c: 6878 ldr r0, [r7, #4] 800730e: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007310: e200 b.n 8007714 8007312: bf00 nop 8007314: 40020010 .word 0x40020010 8007318: 40020028 .word 0x40020028 800731c: 40020040 .word 0x40020040 8007320: 40020058 .word 0x40020058 8007324: 40020070 .word 0x40020070 8007328: 40020088 .word 0x40020088 800732c: 400200a0 .word 0x400200a0 8007330: 400200b8 .word 0x400200b8 8007334: 40020410 .word 0x40020410 8007338: 40020428 .word 0x40020428 800733c: 40020440 .word 0x40020440 8007340: 40020458 .word 0x40020458 8007344: 40020470 .word 0x40020470 8007348: 40020488 .word 0x40020488 800734c: 400204a0 .word 0x400204a0 8007350: 400204b8 .word 0x400204b8 8007354: 58025408 .word 0x58025408 8007358: 5802541c .word 0x5802541c 800735c: 58025430 .word 0x58025430 8007360: 58025444 .word 0x58025444 8007364: 58025458 .word 0x58025458 8007368: 5802546c .word 0x5802546c 800736c: 58025480 .word 0x58025480 8007370: 58025494 .word 0x58025494 } } } else { if((ccr_reg & BDMA_CCR_CIRC) == 0U) 8007374: 693b ldr r3, [r7, #16] 8007376: f003 0320 and.w r3, r3, #32 800737a: 2b00 cmp r3, #0 800737c: d160 bne.n 8007440 { /* Disable the half transfer interrupt */ __HAL_DMA_DISABLE_IT(hdma, DMA_IT_HT); 800737e: 687b ldr r3, [r7, #4] 8007380: 681b ldr r3, [r3, #0] 8007382: 4a7f ldr r2, [pc, #508] @ (8007580 ) 8007384: 4293 cmp r3, r2 8007386: d04a beq.n 800741e 8007388: 687b ldr r3, [r7, #4] 800738a: 681b ldr r3, [r3, #0] 800738c: 4a7d ldr r2, [pc, #500] @ (8007584 ) 800738e: 4293 cmp r3, r2 8007390: d045 beq.n 800741e 8007392: 687b ldr r3, [r7, #4] 8007394: 681b ldr r3, [r3, #0] 8007396: 4a7c ldr r2, [pc, #496] @ (8007588 ) 8007398: 4293 cmp r3, r2 800739a: d040 beq.n 800741e 800739c: 687b ldr r3, [r7, #4] 800739e: 681b ldr r3, [r3, #0] 80073a0: 4a7a ldr r2, [pc, #488] @ (800758c ) 80073a2: 4293 cmp r3, r2 80073a4: d03b beq.n 800741e 80073a6: 687b ldr r3, [r7, #4] 80073a8: 681b ldr r3, [r3, #0] 80073aa: 4a79 ldr r2, [pc, #484] @ (8007590 ) 80073ac: 4293 cmp r3, r2 80073ae: d036 beq.n 800741e 80073b0: 687b ldr r3, [r7, #4] 80073b2: 681b ldr r3, [r3, #0] 80073b4: 4a77 ldr r2, [pc, #476] @ (8007594 ) 80073b6: 4293 cmp r3, r2 80073b8: d031 beq.n 800741e 80073ba: 687b ldr r3, [r7, #4] 80073bc: 681b ldr r3, [r3, #0] 80073be: 4a76 ldr r2, [pc, #472] @ (8007598 ) 80073c0: 4293 cmp r3, r2 80073c2: d02c beq.n 800741e 80073c4: 687b ldr r3, [r7, #4] 80073c6: 681b ldr r3, [r3, #0] 80073c8: 4a74 ldr r2, [pc, #464] @ (800759c ) 80073ca: 4293 cmp r3, r2 80073cc: d027 beq.n 800741e 80073ce: 687b ldr r3, [r7, #4] 80073d0: 681b ldr r3, [r3, #0] 80073d2: 4a73 ldr r2, [pc, #460] @ (80075a0 ) 80073d4: 4293 cmp r3, r2 80073d6: d022 beq.n 800741e 80073d8: 687b ldr r3, [r7, #4] 80073da: 681b ldr r3, [r3, #0] 80073dc: 4a71 ldr r2, [pc, #452] @ (80075a4 ) 80073de: 4293 cmp r3, r2 80073e0: d01d beq.n 800741e 80073e2: 687b ldr r3, [r7, #4] 80073e4: 681b ldr r3, [r3, #0] 80073e6: 4a70 ldr r2, [pc, #448] @ (80075a8 ) 80073e8: 4293 cmp r3, r2 80073ea: d018 beq.n 800741e 80073ec: 687b ldr r3, [r7, #4] 80073ee: 681b ldr r3, [r3, #0] 80073f0: 4a6e ldr r2, [pc, #440] @ (80075ac ) 80073f2: 4293 cmp r3, r2 80073f4: d013 beq.n 800741e 80073f6: 687b ldr r3, [r7, #4] 80073f8: 681b ldr r3, [r3, #0] 80073fa: 4a6d ldr r2, [pc, #436] @ (80075b0 ) 80073fc: 4293 cmp r3, r2 80073fe: d00e beq.n 800741e 8007400: 687b ldr r3, [r7, #4] 8007402: 681b ldr r3, [r3, #0] 8007404: 4a6b ldr r2, [pc, #428] @ (80075b4 ) 8007406: 4293 cmp r3, r2 8007408: d009 beq.n 800741e 800740a: 687b ldr r3, [r7, #4] 800740c: 681b ldr r3, [r3, #0] 800740e: 4a6a ldr r2, [pc, #424] @ (80075b8 ) 8007410: 4293 cmp r3, r2 8007412: d004 beq.n 800741e 8007414: 687b ldr r3, [r7, #4] 8007416: 681b ldr r3, [r3, #0] 8007418: 4a68 ldr r2, [pc, #416] @ (80075bc ) 800741a: 4293 cmp r3, r2 800741c: d108 bne.n 8007430 800741e: 687b ldr r3, [r7, #4] 8007420: 681b ldr r3, [r3, #0] 8007422: 681a ldr r2, [r3, #0] 8007424: 687b ldr r3, [r7, #4] 8007426: 681b ldr r3, [r3, #0] 8007428: f022 0208 bic.w r2, r2, #8 800742c: 601a str r2, [r3, #0] 800742e: e007 b.n 8007440 8007430: 687b ldr r3, [r7, #4] 8007432: 681b ldr r3, [r3, #0] 8007434: 681a ldr r2, [r3, #0] 8007436: 687b ldr r3, [r7, #4] 8007438: 681b ldr r3, [r3, #0] 800743a: f022 0204 bic.w r2, r2, #4 800743e: 601a str r2, [r3, #0] } /* DMA peripheral state is not updated in Half Transfer */ /* but in Transfer Complete case */ if(hdma->XferHalfCpltCallback != NULL) 8007440: 687b ldr r3, [r7, #4] 8007442: 6c1b ldr r3, [r3, #64] @ 0x40 8007444: 2b00 cmp r3, #0 8007446: f000 8165 beq.w 8007714 { /* Half transfer callback */ hdma->XferHalfCpltCallback(hdma); 800744a: 687b ldr r3, [r7, #4] 800744c: 6c1b ldr r3, [r3, #64] @ 0x40 800744e: 6878 ldr r0, [r7, #4] 8007450: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007452: e15f b.n 8007714 } } } /* Transfer Complete Interrupt management ***********************************/ else if (((tmpisr_bdma & (BDMA_FLAG_TC0 << (hdma->StreamIndex & 0x1FU))) != 0U) && ((ccr_reg & BDMA_CCR_TCIE) != 0U)) 8007454: 687b ldr r3, [r7, #4] 8007456: 6ddb ldr r3, [r3, #92] @ 0x5c 8007458: f003 031f and.w r3, r3, #31 800745c: 2202 movs r2, #2 800745e: 409a lsls r2, r3 8007460: 697b ldr r3, [r7, #20] 8007462: 4013 ands r3, r2 8007464: 2b00 cmp r3, #0 8007466: f000 80c5 beq.w 80075f4 800746a: 693b ldr r3, [r7, #16] 800746c: f003 0302 and.w r3, r3, #2 8007470: 2b00 cmp r3, #0 8007472: f000 80bf beq.w 80075f4 { /* Clear the transfer complete flag */ regs_bdma->IFCR = (BDMA_ISR_TCIF0) << (hdma->StreamIndex & 0x1FU); 8007476: 687b ldr r3, [r7, #4] 8007478: 6ddb ldr r3, [r3, #92] @ 0x5c 800747a: f003 031f and.w r3, r3, #31 800747e: 2202 movs r2, #2 8007480: 409a lsls r2, r3 8007482: 69fb ldr r3, [r7, #28] 8007484: 605a str r2, [r3, #4] /* Disable the transfer complete interrupt if the DMA mode is Double Buffering */ if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007486: 693b ldr r3, [r7, #16] 8007488: f403 4300 and.w r3, r3, #32768 @ 0x8000 800748c: 2b00 cmp r3, #0 800748e: d018 beq.n 80074c2 { /* Current memory buffer used is Memory 0 */ if((ccr_reg & BDMA_CCR_CT) == 0U) 8007490: 693b ldr r3, [r7, #16] 8007492: f403 3380 and.w r3, r3, #65536 @ 0x10000 8007496: 2b00 cmp r3, #0 8007498: d109 bne.n 80074ae { if(hdma->XferM1CpltCallback != NULL) 800749a: 687b ldr r3, [r7, #4] 800749c: 6c5b ldr r3, [r3, #68] @ 0x44 800749e: 2b00 cmp r3, #0 80074a0: f000 813a beq.w 8007718 { /* Transfer complete Callback for Memory 1 */ hdma->XferM1CpltCallback(hdma); 80074a4: 687b ldr r3, [r7, #4] 80074a6: 6c5b ldr r3, [r3, #68] @ 0x44 80074a8: 6878 ldr r0, [r7, #4] 80074aa: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 80074ac: e134 b.n 8007718 } } /* Current memory buffer used is Memory 1 */ else { if(hdma->XferCpltCallback != NULL) 80074ae: 687b ldr r3, [r7, #4] 80074b0: 6bdb ldr r3, [r3, #60] @ 0x3c 80074b2: 2b00 cmp r3, #0 80074b4: f000 8130 beq.w 8007718 { /* Transfer complete Callback for Memory 0 */ hdma->XferCpltCallback(hdma); 80074b8: 687b ldr r3, [r7, #4] 80074ba: 6bdb ldr r3, [r3, #60] @ 0x3c 80074bc: 6878 ldr r0, [r7, #4] 80074be: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 80074c0: e12a b.n 8007718 } } } else { if((ccr_reg & BDMA_CCR_CIRC) == 0U) 80074c2: 693b ldr r3, [r7, #16] 80074c4: f003 0320 and.w r3, r3, #32 80074c8: 2b00 cmp r3, #0 80074ca: f040 8089 bne.w 80075e0 { /* 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); 80074ce: 687b ldr r3, [r7, #4] 80074d0: 681b ldr r3, [r3, #0] 80074d2: 4a2b ldr r2, [pc, #172] @ (8007580 ) 80074d4: 4293 cmp r3, r2 80074d6: d04a beq.n 800756e 80074d8: 687b ldr r3, [r7, #4] 80074da: 681b ldr r3, [r3, #0] 80074dc: 4a29 ldr r2, [pc, #164] @ (8007584 ) 80074de: 4293 cmp r3, r2 80074e0: d045 beq.n 800756e 80074e2: 687b ldr r3, [r7, #4] 80074e4: 681b ldr r3, [r3, #0] 80074e6: 4a28 ldr r2, [pc, #160] @ (8007588 ) 80074e8: 4293 cmp r3, r2 80074ea: d040 beq.n 800756e 80074ec: 687b ldr r3, [r7, #4] 80074ee: 681b ldr r3, [r3, #0] 80074f0: 4a26 ldr r2, [pc, #152] @ (800758c ) 80074f2: 4293 cmp r3, r2 80074f4: d03b beq.n 800756e 80074f6: 687b ldr r3, [r7, #4] 80074f8: 681b ldr r3, [r3, #0] 80074fa: 4a25 ldr r2, [pc, #148] @ (8007590 ) 80074fc: 4293 cmp r3, r2 80074fe: d036 beq.n 800756e 8007500: 687b ldr r3, [r7, #4] 8007502: 681b ldr r3, [r3, #0] 8007504: 4a23 ldr r2, [pc, #140] @ (8007594 ) 8007506: 4293 cmp r3, r2 8007508: d031 beq.n 800756e 800750a: 687b ldr r3, [r7, #4] 800750c: 681b ldr r3, [r3, #0] 800750e: 4a22 ldr r2, [pc, #136] @ (8007598 ) 8007510: 4293 cmp r3, r2 8007512: d02c beq.n 800756e 8007514: 687b ldr r3, [r7, #4] 8007516: 681b ldr r3, [r3, #0] 8007518: 4a20 ldr r2, [pc, #128] @ (800759c ) 800751a: 4293 cmp r3, r2 800751c: d027 beq.n 800756e 800751e: 687b ldr r3, [r7, #4] 8007520: 681b ldr r3, [r3, #0] 8007522: 4a1f ldr r2, [pc, #124] @ (80075a0 ) 8007524: 4293 cmp r3, r2 8007526: d022 beq.n 800756e 8007528: 687b ldr r3, [r7, #4] 800752a: 681b ldr r3, [r3, #0] 800752c: 4a1d ldr r2, [pc, #116] @ (80075a4 ) 800752e: 4293 cmp r3, r2 8007530: d01d beq.n 800756e 8007532: 687b ldr r3, [r7, #4] 8007534: 681b ldr r3, [r3, #0] 8007536: 4a1c ldr r2, [pc, #112] @ (80075a8 ) 8007538: 4293 cmp r3, r2 800753a: d018 beq.n 800756e 800753c: 687b ldr r3, [r7, #4] 800753e: 681b ldr r3, [r3, #0] 8007540: 4a1a ldr r2, [pc, #104] @ (80075ac ) 8007542: 4293 cmp r3, r2 8007544: d013 beq.n 800756e 8007546: 687b ldr r3, [r7, #4] 8007548: 681b ldr r3, [r3, #0] 800754a: 4a19 ldr r2, [pc, #100] @ (80075b0 ) 800754c: 4293 cmp r3, r2 800754e: d00e beq.n 800756e 8007550: 687b ldr r3, [r7, #4] 8007552: 681b ldr r3, [r3, #0] 8007554: 4a17 ldr r2, [pc, #92] @ (80075b4 ) 8007556: 4293 cmp r3, r2 8007558: d009 beq.n 800756e 800755a: 687b ldr r3, [r7, #4] 800755c: 681b ldr r3, [r3, #0] 800755e: 4a16 ldr r2, [pc, #88] @ (80075b8 ) 8007560: 4293 cmp r3, r2 8007562: d004 beq.n 800756e 8007564: 687b ldr r3, [r7, #4] 8007566: 681b ldr r3, [r3, #0] 8007568: 4a14 ldr r2, [pc, #80] @ (80075bc ) 800756a: 4293 cmp r3, r2 800756c: d128 bne.n 80075c0 800756e: 687b ldr r3, [r7, #4] 8007570: 681b ldr r3, [r3, #0] 8007572: 681a ldr r2, [r3, #0] 8007574: 687b ldr r3, [r7, #4] 8007576: 681b ldr r3, [r3, #0] 8007578: f022 0214 bic.w r2, r2, #20 800757c: 601a str r2, [r3, #0] 800757e: e027 b.n 80075d0 8007580: 40020010 .word 0x40020010 8007584: 40020028 .word 0x40020028 8007588: 40020040 .word 0x40020040 800758c: 40020058 .word 0x40020058 8007590: 40020070 .word 0x40020070 8007594: 40020088 .word 0x40020088 8007598: 400200a0 .word 0x400200a0 800759c: 400200b8 .word 0x400200b8 80075a0: 40020410 .word 0x40020410 80075a4: 40020428 .word 0x40020428 80075a8: 40020440 .word 0x40020440 80075ac: 40020458 .word 0x40020458 80075b0: 40020470 .word 0x40020470 80075b4: 40020488 .word 0x40020488 80075b8: 400204a0 .word 0x400204a0 80075bc: 400204b8 .word 0x400204b8 80075c0: 687b ldr r3, [r7, #4] 80075c2: 681b ldr r3, [r3, #0] 80075c4: 681a ldr r2, [r3, #0] 80075c6: 687b ldr r3, [r7, #4] 80075c8: 681b ldr r3, [r3, #0] 80075ca: f022 020a bic.w r2, r2, #10 80075ce: 601a str r2, [r3, #0] /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 80075d0: 687b ldr r3, [r7, #4] 80075d2: 2201 movs r2, #1 80075d4: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 80075d8: 687b ldr r3, [r7, #4] 80075da: 2200 movs r2, #0 80075dc: f883 2034 strb.w r2, [r3, #52] @ 0x34 } if(hdma->XferCpltCallback != NULL) 80075e0: 687b ldr r3, [r7, #4] 80075e2: 6bdb ldr r3, [r3, #60] @ 0x3c 80075e4: 2b00 cmp r3, #0 80075e6: f000 8097 beq.w 8007718 { /* Transfer complete callback */ hdma->XferCpltCallback(hdma); 80075ea: 687b ldr r3, [r7, #4] 80075ec: 6bdb ldr r3, [r3, #60] @ 0x3c 80075ee: 6878 ldr r0, [r7, #4] 80075f0: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 80075f2: e091 b.n 8007718 } } } /* Transfer Error Interrupt management **************************************/ else if (((tmpisr_bdma & (BDMA_FLAG_TE0 << (hdma->StreamIndex & 0x1FU))) != 0U) && ((ccr_reg & BDMA_CCR_TEIE) != 0U)) 80075f4: 687b ldr r3, [r7, #4] 80075f6: 6ddb ldr r3, [r3, #92] @ 0x5c 80075f8: f003 031f and.w r3, r3, #31 80075fc: 2208 movs r2, #8 80075fe: 409a lsls r2, r3 8007600: 697b ldr r3, [r7, #20] 8007602: 4013 ands r3, r2 8007604: 2b00 cmp r3, #0 8007606: f000 8088 beq.w 800771a 800760a: 693b ldr r3, [r7, #16] 800760c: f003 0308 and.w r3, r3, #8 8007610: 2b00 cmp r3, #0 8007612: f000 8082 beq.w 800771a { /* 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)); 8007616: 687b ldr r3, [r7, #4] 8007618: 681b ldr r3, [r3, #0] 800761a: 4a41 ldr r2, [pc, #260] @ (8007720 ) 800761c: 4293 cmp r3, r2 800761e: d04a beq.n 80076b6 8007620: 687b ldr r3, [r7, #4] 8007622: 681b ldr r3, [r3, #0] 8007624: 4a3f ldr r2, [pc, #252] @ (8007724 ) 8007626: 4293 cmp r3, r2 8007628: d045 beq.n 80076b6 800762a: 687b ldr r3, [r7, #4] 800762c: 681b ldr r3, [r3, #0] 800762e: 4a3e ldr r2, [pc, #248] @ (8007728 ) 8007630: 4293 cmp r3, r2 8007632: d040 beq.n 80076b6 8007634: 687b ldr r3, [r7, #4] 8007636: 681b ldr r3, [r3, #0] 8007638: 4a3c ldr r2, [pc, #240] @ (800772c ) 800763a: 4293 cmp r3, r2 800763c: d03b beq.n 80076b6 800763e: 687b ldr r3, [r7, #4] 8007640: 681b ldr r3, [r3, #0] 8007642: 4a3b ldr r2, [pc, #236] @ (8007730 ) 8007644: 4293 cmp r3, r2 8007646: d036 beq.n 80076b6 8007648: 687b ldr r3, [r7, #4] 800764a: 681b ldr r3, [r3, #0] 800764c: 4a39 ldr r2, [pc, #228] @ (8007734 ) 800764e: 4293 cmp r3, r2 8007650: d031 beq.n 80076b6 8007652: 687b ldr r3, [r7, #4] 8007654: 681b ldr r3, [r3, #0] 8007656: 4a38 ldr r2, [pc, #224] @ (8007738 ) 8007658: 4293 cmp r3, r2 800765a: d02c beq.n 80076b6 800765c: 687b ldr r3, [r7, #4] 800765e: 681b ldr r3, [r3, #0] 8007660: 4a36 ldr r2, [pc, #216] @ (800773c ) 8007662: 4293 cmp r3, r2 8007664: d027 beq.n 80076b6 8007666: 687b ldr r3, [r7, #4] 8007668: 681b ldr r3, [r3, #0] 800766a: 4a35 ldr r2, [pc, #212] @ (8007740 ) 800766c: 4293 cmp r3, r2 800766e: d022 beq.n 80076b6 8007670: 687b ldr r3, [r7, #4] 8007672: 681b ldr r3, [r3, #0] 8007674: 4a33 ldr r2, [pc, #204] @ (8007744 ) 8007676: 4293 cmp r3, r2 8007678: d01d beq.n 80076b6 800767a: 687b ldr r3, [r7, #4] 800767c: 681b ldr r3, [r3, #0] 800767e: 4a32 ldr r2, [pc, #200] @ (8007748 ) 8007680: 4293 cmp r3, r2 8007682: d018 beq.n 80076b6 8007684: 687b ldr r3, [r7, #4] 8007686: 681b ldr r3, [r3, #0] 8007688: 4a30 ldr r2, [pc, #192] @ (800774c ) 800768a: 4293 cmp r3, r2 800768c: d013 beq.n 80076b6 800768e: 687b ldr r3, [r7, #4] 8007690: 681b ldr r3, [r3, #0] 8007692: 4a2f ldr r2, [pc, #188] @ (8007750 ) 8007694: 4293 cmp r3, r2 8007696: d00e beq.n 80076b6 8007698: 687b ldr r3, [r7, #4] 800769a: 681b ldr r3, [r3, #0] 800769c: 4a2d ldr r2, [pc, #180] @ (8007754 ) 800769e: 4293 cmp r3, r2 80076a0: d009 beq.n 80076b6 80076a2: 687b ldr r3, [r7, #4] 80076a4: 681b ldr r3, [r3, #0] 80076a6: 4a2c ldr r2, [pc, #176] @ (8007758 ) 80076a8: 4293 cmp r3, r2 80076aa: d004 beq.n 80076b6 80076ac: 687b ldr r3, [r7, #4] 80076ae: 681b ldr r3, [r3, #0] 80076b0: 4a2a ldr r2, [pc, #168] @ (800775c ) 80076b2: 4293 cmp r3, r2 80076b4: d108 bne.n 80076c8 80076b6: 687b ldr r3, [r7, #4] 80076b8: 681b ldr r3, [r3, #0] 80076ba: 681a ldr r2, [r3, #0] 80076bc: 687b ldr r3, [r7, #4] 80076be: 681b ldr r3, [r3, #0] 80076c0: f022 021c bic.w r2, r2, #28 80076c4: 601a str r2, [r3, #0] 80076c6: e007 b.n 80076d8 80076c8: 687b ldr r3, [r7, #4] 80076ca: 681b ldr r3, [r3, #0] 80076cc: 681a ldr r2, [r3, #0] 80076ce: 687b ldr r3, [r7, #4] 80076d0: 681b ldr r3, [r3, #0] 80076d2: f022 020e bic.w r2, r2, #14 80076d6: 601a str r2, [r3, #0] /* Clear all flags */ regs_bdma->IFCR = (BDMA_ISR_GIF0) << (hdma->StreamIndex & 0x1FU); 80076d8: 687b ldr r3, [r7, #4] 80076da: 6ddb ldr r3, [r3, #92] @ 0x5c 80076dc: f003 031f and.w r3, r3, #31 80076e0: 2201 movs r2, #1 80076e2: 409a lsls r2, r3 80076e4: 69fb ldr r3, [r7, #28] 80076e6: 605a str r2, [r3, #4] /* Update error code */ hdma->ErrorCode = HAL_DMA_ERROR_TE; 80076e8: 687b ldr r3, [r7, #4] 80076ea: 2201 movs r2, #1 80076ec: 655a str r2, [r3, #84] @ 0x54 /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 80076ee: 687b ldr r3, [r7, #4] 80076f0: 2201 movs r2, #1 80076f2: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 80076f6: 687b ldr r3, [r7, #4] 80076f8: 2200 movs r2, #0 80076fa: f883 2034 strb.w r2, [r3, #52] @ 0x34 if (hdma->XferErrorCallback != NULL) 80076fe: 687b ldr r3, [r7, #4] 8007700: 6cdb ldr r3, [r3, #76] @ 0x4c 8007702: 2b00 cmp r3, #0 8007704: d009 beq.n 800771a { /* Transfer error callback */ hdma->XferErrorCallback(hdma); 8007706: 687b ldr r3, [r7, #4] 8007708: 6cdb ldr r3, [r3, #76] @ 0x4c 800770a: 6878 ldr r0, [r7, #4] 800770c: 4798 blx r3 800770e: e004 b.n 800771a return; 8007710: bf00 nop 8007712: e002 b.n 800771a if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007714: bf00 nop 8007716: e000 b.n 800771a if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007718: bf00 nop } else { /* Nothing To Do */ } } 800771a: 3728 adds r7, #40 @ 0x28 800771c: 46bd mov sp, r7 800771e: bd80 pop {r7, pc} 8007720: 40020010 .word 0x40020010 8007724: 40020028 .word 0x40020028 8007728: 40020040 .word 0x40020040 800772c: 40020058 .word 0x40020058 8007730: 40020070 .word 0x40020070 8007734: 40020088 .word 0x40020088 8007738: 400200a0 .word 0x400200a0 800773c: 400200b8 .word 0x400200b8 8007740: 40020410 .word 0x40020410 8007744: 40020428 .word 0x40020428 8007748: 40020440 .word 0x40020440 800774c: 40020458 .word 0x40020458 8007750: 40020470 .word 0x40020470 8007754: 40020488 .word 0x40020488 8007758: 400204a0 .word 0x400204a0 800775c: 400204b8 .word 0x400204b8 08007760 : * @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) { 8007760: b480 push {r7} 8007762: b085 sub sp, #20 8007764: af00 add r7, sp, #0 8007766: 6078 str r0, [r7, #4] if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 8007768: 687b ldr r3, [r7, #4] 800776a: 681b ldr r3, [r3, #0] 800776c: 4a42 ldr r2, [pc, #264] @ (8007878 ) 800776e: 4293 cmp r3, r2 8007770: d04a beq.n 8007808 8007772: 687b ldr r3, [r7, #4] 8007774: 681b ldr r3, [r3, #0] 8007776: 4a41 ldr r2, [pc, #260] @ (800787c ) 8007778: 4293 cmp r3, r2 800777a: d045 beq.n 8007808 800777c: 687b ldr r3, [r7, #4] 800777e: 681b ldr r3, [r3, #0] 8007780: 4a3f ldr r2, [pc, #252] @ (8007880 ) 8007782: 4293 cmp r3, r2 8007784: d040 beq.n 8007808 8007786: 687b ldr r3, [r7, #4] 8007788: 681b ldr r3, [r3, #0] 800778a: 4a3e ldr r2, [pc, #248] @ (8007884 ) 800778c: 4293 cmp r3, r2 800778e: d03b beq.n 8007808 8007790: 687b ldr r3, [r7, #4] 8007792: 681b ldr r3, [r3, #0] 8007794: 4a3c ldr r2, [pc, #240] @ (8007888 ) 8007796: 4293 cmp r3, r2 8007798: d036 beq.n 8007808 800779a: 687b ldr r3, [r7, #4] 800779c: 681b ldr r3, [r3, #0] 800779e: 4a3b ldr r2, [pc, #236] @ (800788c ) 80077a0: 4293 cmp r3, r2 80077a2: d031 beq.n 8007808 80077a4: 687b ldr r3, [r7, #4] 80077a6: 681b ldr r3, [r3, #0] 80077a8: 4a39 ldr r2, [pc, #228] @ (8007890 ) 80077aa: 4293 cmp r3, r2 80077ac: d02c beq.n 8007808 80077ae: 687b ldr r3, [r7, #4] 80077b0: 681b ldr r3, [r3, #0] 80077b2: 4a38 ldr r2, [pc, #224] @ (8007894 ) 80077b4: 4293 cmp r3, r2 80077b6: d027 beq.n 8007808 80077b8: 687b ldr r3, [r7, #4] 80077ba: 681b ldr r3, [r3, #0] 80077bc: 4a36 ldr r2, [pc, #216] @ (8007898 ) 80077be: 4293 cmp r3, r2 80077c0: d022 beq.n 8007808 80077c2: 687b ldr r3, [r7, #4] 80077c4: 681b ldr r3, [r3, #0] 80077c6: 4a35 ldr r2, [pc, #212] @ (800789c ) 80077c8: 4293 cmp r3, r2 80077ca: d01d beq.n 8007808 80077cc: 687b ldr r3, [r7, #4] 80077ce: 681b ldr r3, [r3, #0] 80077d0: 4a33 ldr r2, [pc, #204] @ (80078a0 ) 80077d2: 4293 cmp r3, r2 80077d4: d018 beq.n 8007808 80077d6: 687b ldr r3, [r7, #4] 80077d8: 681b ldr r3, [r3, #0] 80077da: 4a32 ldr r2, [pc, #200] @ (80078a4 ) 80077dc: 4293 cmp r3, r2 80077de: d013 beq.n 8007808 80077e0: 687b ldr r3, [r7, #4] 80077e2: 681b ldr r3, [r3, #0] 80077e4: 4a30 ldr r2, [pc, #192] @ (80078a8 ) 80077e6: 4293 cmp r3, r2 80077e8: d00e beq.n 8007808 80077ea: 687b ldr r3, [r7, #4] 80077ec: 681b ldr r3, [r3, #0] 80077ee: 4a2f ldr r2, [pc, #188] @ (80078ac ) 80077f0: 4293 cmp r3, r2 80077f2: d009 beq.n 8007808 80077f4: 687b ldr r3, [r7, #4] 80077f6: 681b ldr r3, [r3, #0] 80077f8: 4a2d ldr r2, [pc, #180] @ (80078b0 ) 80077fa: 4293 cmp r3, r2 80077fc: d004 beq.n 8007808 80077fe: 687b ldr r3, [r7, #4] 8007800: 681b ldr r3, [r3, #0] 8007802: 4a2c ldr r2, [pc, #176] @ (80078b4 ) 8007804: 4293 cmp r3, r2 8007806: d101 bne.n 800780c 8007808: 2301 movs r3, #1 800780a: e000 b.n 800780e 800780c: 2300 movs r3, #0 800780e: 2b00 cmp r3, #0 8007810: d024 beq.n 800785c { uint32_t stream_number = (((uint32_t)((uint32_t*)hdma->Instance) & 0xFFU) - 16U) / 24U; 8007812: 687b ldr r3, [r7, #4] 8007814: 681b ldr r3, [r3, #0] 8007816: b2db uxtb r3, r3 8007818: 3b10 subs r3, #16 800781a: 4a27 ldr r2, [pc, #156] @ (80078b8 ) 800781c: fba2 2303 umull r2, r3, r2, r3 8007820: 091b lsrs r3, r3, #4 8007822: 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]; 8007824: 68fb ldr r3, [r7, #12] 8007826: f003 0307 and.w r3, r3, #7 800782a: 4a24 ldr r2, [pc, #144] @ (80078bc ) 800782c: 5cd3 ldrb r3, [r2, r3] 800782e: 461a mov r2, r3 8007830: 687b ldr r3, [r7, #4] 8007832: 65da str r2, [r3, #92] @ 0x5c if (stream_number > 3U) 8007834: 68fb ldr r3, [r7, #12] 8007836: 2b03 cmp r3, #3 8007838: d908 bls.n 800784c { /* return pointer to HISR and HIFCR */ hdma->StreamBaseAddress = (((uint32_t)((uint32_t*)hdma->Instance) & (uint32_t)(~0x3FFU)) + 4U); 800783a: 687b ldr r3, [r7, #4] 800783c: 681b ldr r3, [r3, #0] 800783e: 461a mov r2, r3 8007840: 4b1f ldr r3, [pc, #124] @ (80078c0 ) 8007842: 4013 ands r3, r2 8007844: 1d1a adds r2, r3, #4 8007846: 687b ldr r3, [r7, #4] 8007848: 659a str r2, [r3, #88] @ 0x58 800784a: e00d b.n 8007868 } else { /* return pointer to LISR and LIFCR */ hdma->StreamBaseAddress = ((uint32_t)((uint32_t*)hdma->Instance) & (uint32_t)(~0x3FFU)); 800784c: 687b ldr r3, [r7, #4] 800784e: 681b ldr r3, [r3, #0] 8007850: 461a mov r2, r3 8007852: 4b1b ldr r3, [pc, #108] @ (80078c0 ) 8007854: 4013 ands r3, r2 8007856: 687a ldr r2, [r7, #4] 8007858: 6593 str r3, [r2, #88] @ 0x58 800785a: e005 b.n 8007868 } } else /* BDMA instance(s) */ { /* return pointer to ISR and IFCR */ hdma->StreamBaseAddress = ((uint32_t)((uint32_t*)hdma->Instance) & (uint32_t)(~0xFFU)); 800785c: 687b ldr r3, [r7, #4] 800785e: 681b ldr r3, [r3, #0] 8007860: f023 02ff bic.w r2, r3, #255 @ 0xff 8007864: 687b ldr r3, [r7, #4] 8007866: 659a str r2, [r3, #88] @ 0x58 } return hdma->StreamBaseAddress; 8007868: 687b ldr r3, [r7, #4] 800786a: 6d9b ldr r3, [r3, #88] @ 0x58 } 800786c: 4618 mov r0, r3 800786e: 3714 adds r7, #20 8007870: 46bd mov sp, r7 8007872: f85d 7b04 ldr.w r7, [sp], #4 8007876: 4770 bx lr 8007878: 40020010 .word 0x40020010 800787c: 40020028 .word 0x40020028 8007880: 40020040 .word 0x40020040 8007884: 40020058 .word 0x40020058 8007888: 40020070 .word 0x40020070 800788c: 40020088 .word 0x40020088 8007890: 400200a0 .word 0x400200a0 8007894: 400200b8 .word 0x400200b8 8007898: 40020410 .word 0x40020410 800789c: 40020428 .word 0x40020428 80078a0: 40020440 .word 0x40020440 80078a4: 40020458 .word 0x40020458 80078a8: 40020470 .word 0x40020470 80078ac: 40020488 .word 0x40020488 80078b0: 400204a0 .word 0x400204a0 80078b4: 400204b8 .word 0x400204b8 80078b8: aaaaaaab .word 0xaaaaaaab 80078bc: 08030a34 .word 0x08030a34 80078c0: fffffc00 .word 0xfffffc00 080078c4 : * @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) { 80078c4: b480 push {r7} 80078c6: b085 sub sp, #20 80078c8: af00 add r7, sp, #0 80078ca: 6078 str r0, [r7, #4] HAL_StatusTypeDef status = HAL_OK; 80078cc: 2300 movs r3, #0 80078ce: 73fb strb r3, [r7, #15] /* Memory Data size equal to Byte */ if (hdma->Init.MemDataAlignment == DMA_MDATAALIGN_BYTE) 80078d0: 687b ldr r3, [r7, #4] 80078d2: 699b ldr r3, [r3, #24] 80078d4: 2b00 cmp r3, #0 80078d6: d120 bne.n 800791a { switch (hdma->Init.FIFOThreshold) 80078d8: 687b ldr r3, [r7, #4] 80078da: 6a9b ldr r3, [r3, #40] @ 0x28 80078dc: 2b03 cmp r3, #3 80078de: d858 bhi.n 8007992 80078e0: a201 add r2, pc, #4 @ (adr r2, 80078e8 ) 80078e2: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80078e6: bf00 nop 80078e8: 080078f9 .word 0x080078f9 80078ec: 0800790b .word 0x0800790b 80078f0: 080078f9 .word 0x080078f9 80078f4: 08007993 .word 0x08007993 { case DMA_FIFO_THRESHOLD_1QUARTERFULL: case DMA_FIFO_THRESHOLD_3QUARTERSFULL: if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1) 80078f8: 687b ldr r3, [r7, #4] 80078fa: 6adb ldr r3, [r3, #44] @ 0x2c 80078fc: f003 7380 and.w r3, r3, #16777216 @ 0x1000000 8007900: 2b00 cmp r3, #0 8007902: d048 beq.n 8007996 { status = HAL_ERROR; 8007904: 2301 movs r3, #1 8007906: 73fb strb r3, [r7, #15] } break; 8007908: e045 b.n 8007996 case DMA_FIFO_THRESHOLD_HALFFULL: if (hdma->Init.MemBurst == DMA_MBURST_INC16) 800790a: 687b ldr r3, [r7, #4] 800790c: 6adb ldr r3, [r3, #44] @ 0x2c 800790e: f1b3 7fc0 cmp.w r3, #25165824 @ 0x1800000 8007912: d142 bne.n 800799a { status = HAL_ERROR; 8007914: 2301 movs r3, #1 8007916: 73fb strb r3, [r7, #15] } break; 8007918: e03f b.n 800799a break; } } /* Memory Data size equal to Half-Word */ else if (hdma->Init.MemDataAlignment == DMA_MDATAALIGN_HALFWORD) 800791a: 687b ldr r3, [r7, #4] 800791c: 699b ldr r3, [r3, #24] 800791e: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 8007922: d123 bne.n 800796c { switch (hdma->Init.FIFOThreshold) 8007924: 687b ldr r3, [r7, #4] 8007926: 6a9b ldr r3, [r3, #40] @ 0x28 8007928: 2b03 cmp r3, #3 800792a: d838 bhi.n 800799e 800792c: a201 add r2, pc, #4 @ (adr r2, 8007934 ) 800792e: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8007932: bf00 nop 8007934: 08007945 .word 0x08007945 8007938: 0800794b .word 0x0800794b 800793c: 08007945 .word 0x08007945 8007940: 0800795d .word 0x0800795d { case DMA_FIFO_THRESHOLD_1QUARTERFULL: case DMA_FIFO_THRESHOLD_3QUARTERSFULL: status = HAL_ERROR; 8007944: 2301 movs r3, #1 8007946: 73fb strb r3, [r7, #15] break; 8007948: e030 b.n 80079ac case DMA_FIFO_THRESHOLD_HALFFULL: if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1) 800794a: 687b ldr r3, [r7, #4] 800794c: 6adb ldr r3, [r3, #44] @ 0x2c 800794e: f003 7380 and.w r3, r3, #16777216 @ 0x1000000 8007952: 2b00 cmp r3, #0 8007954: d025 beq.n 80079a2 { status = HAL_ERROR; 8007956: 2301 movs r3, #1 8007958: 73fb strb r3, [r7, #15] } break; 800795a: e022 b.n 80079a2 case DMA_FIFO_THRESHOLD_FULL: if (hdma->Init.MemBurst == DMA_MBURST_INC16) 800795c: 687b ldr r3, [r7, #4] 800795e: 6adb ldr r3, [r3, #44] @ 0x2c 8007960: f1b3 7fc0 cmp.w r3, #25165824 @ 0x1800000 8007964: d11f bne.n 80079a6 { status = HAL_ERROR; 8007966: 2301 movs r3, #1 8007968: 73fb strb r3, [r7, #15] } break; 800796a: e01c b.n 80079a6 } /* Memory Data size equal to Word */ else { switch (hdma->Init.FIFOThreshold) 800796c: 687b ldr r3, [r7, #4] 800796e: 6a9b ldr r3, [r3, #40] @ 0x28 8007970: 2b02 cmp r3, #2 8007972: d902 bls.n 800797a 8007974: 2b03 cmp r3, #3 8007976: d003 beq.n 8007980 status = HAL_ERROR; } break; default: break; 8007978: e018 b.n 80079ac status = HAL_ERROR; 800797a: 2301 movs r3, #1 800797c: 73fb strb r3, [r7, #15] break; 800797e: e015 b.n 80079ac if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1) 8007980: 687b ldr r3, [r7, #4] 8007982: 6adb ldr r3, [r3, #44] @ 0x2c 8007984: f003 7380 and.w r3, r3, #16777216 @ 0x1000000 8007988: 2b00 cmp r3, #0 800798a: d00e beq.n 80079aa status = HAL_ERROR; 800798c: 2301 movs r3, #1 800798e: 73fb strb r3, [r7, #15] break; 8007990: e00b b.n 80079aa break; 8007992: bf00 nop 8007994: e00a b.n 80079ac break; 8007996: bf00 nop 8007998: e008 b.n 80079ac break; 800799a: bf00 nop 800799c: e006 b.n 80079ac break; 800799e: bf00 nop 80079a0: e004 b.n 80079ac break; 80079a2: bf00 nop 80079a4: e002 b.n 80079ac break; 80079a6: bf00 nop 80079a8: e000 b.n 80079ac break; 80079aa: bf00 nop } } return status; 80079ac: 7bfb ldrb r3, [r7, #15] } 80079ae: 4618 mov r0, r3 80079b0: 3714 adds r7, #20 80079b2: 46bd mov sp, r7 80079b4: f85d 7b04 ldr.w r7, [sp], #4 80079b8: 4770 bx lr 80079ba: bf00 nop 080079bc : * @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) { 80079bc: b480 push {r7} 80079be: b085 sub sp, #20 80079c0: af00 add r7, sp, #0 80079c2: 6078 str r0, [r7, #4] uint32_t stream_number; uint32_t stream_baseaddress = (uint32_t)((uint32_t*)hdma->Instance); 80079c4: 687b ldr r3, [r7, #4] 80079c6: 681b ldr r3, [r3, #0] 80079c8: 60bb str r3, [r7, #8] if(IS_BDMA_CHANNEL_DMAMUX_INSTANCE(hdma->Instance) != 0U) 80079ca: 687b ldr r3, [r7, #4] 80079cc: 681b ldr r3, [r3, #0] 80079ce: 4a38 ldr r2, [pc, #224] @ (8007ab0 ) 80079d0: 4293 cmp r3, r2 80079d2: d022 beq.n 8007a1a 80079d4: 687b ldr r3, [r7, #4] 80079d6: 681b ldr r3, [r3, #0] 80079d8: 4a36 ldr r2, [pc, #216] @ (8007ab4 ) 80079da: 4293 cmp r3, r2 80079dc: d01d beq.n 8007a1a 80079de: 687b ldr r3, [r7, #4] 80079e0: 681b ldr r3, [r3, #0] 80079e2: 4a35 ldr r2, [pc, #212] @ (8007ab8 ) 80079e4: 4293 cmp r3, r2 80079e6: d018 beq.n 8007a1a 80079e8: 687b ldr r3, [r7, #4] 80079ea: 681b ldr r3, [r3, #0] 80079ec: 4a33 ldr r2, [pc, #204] @ (8007abc ) 80079ee: 4293 cmp r3, r2 80079f0: d013 beq.n 8007a1a 80079f2: 687b ldr r3, [r7, #4] 80079f4: 681b ldr r3, [r3, #0] 80079f6: 4a32 ldr r2, [pc, #200] @ (8007ac0 ) 80079f8: 4293 cmp r3, r2 80079fa: d00e beq.n 8007a1a 80079fc: 687b ldr r3, [r7, #4] 80079fe: 681b ldr r3, [r3, #0] 8007a00: 4a30 ldr r2, [pc, #192] @ (8007ac4 ) 8007a02: 4293 cmp r3, r2 8007a04: d009 beq.n 8007a1a 8007a06: 687b ldr r3, [r7, #4] 8007a08: 681b ldr r3, [r3, #0] 8007a0a: 4a2f ldr r2, [pc, #188] @ (8007ac8 ) 8007a0c: 4293 cmp r3, r2 8007a0e: d004 beq.n 8007a1a 8007a10: 687b ldr r3, [r7, #4] 8007a12: 681b ldr r3, [r3, #0] 8007a14: 4a2d ldr r2, [pc, #180] @ (8007acc ) 8007a16: 4293 cmp r3, r2 8007a18: d101 bne.n 8007a1e 8007a1a: 2301 movs r3, #1 8007a1c: e000 b.n 8007a20 8007a1e: 2300 movs r3, #0 8007a20: 2b00 cmp r3, #0 8007a22: d01a beq.n 8007a5a { /* BDMA Channels are connected to DMAMUX2 channels */ stream_number = (((uint32_t)((uint32_t*)hdma->Instance) & 0xFFU) - 8U) / 20U; 8007a24: 687b ldr r3, [r7, #4] 8007a26: 681b ldr r3, [r3, #0] 8007a28: b2db uxtb r3, r3 8007a2a: 3b08 subs r3, #8 8007a2c: 4a28 ldr r2, [pc, #160] @ (8007ad0 ) 8007a2e: fba2 2303 umull r2, r3, r2, r3 8007a32: 091b lsrs r3, r3, #4 8007a34: 60fb str r3, [r7, #12] hdma->DMAmuxChannel = (DMAMUX_Channel_TypeDef *)((uint32_t)(((uint32_t)DMAMUX2_Channel0) + (stream_number * 4U))); 8007a36: 68fa ldr r2, [r7, #12] 8007a38: 4b26 ldr r3, [pc, #152] @ (8007ad4 ) 8007a3a: 4413 add r3, r2 8007a3c: 009b lsls r3, r3, #2 8007a3e: 461a mov r2, r3 8007a40: 687b ldr r3, [r7, #4] 8007a42: 661a str r2, [r3, #96] @ 0x60 hdma->DMAmuxChannelStatus = DMAMUX2_ChannelStatus; 8007a44: 687b ldr r3, [r7, #4] 8007a46: 4a24 ldr r2, [pc, #144] @ (8007ad8 ) 8007a48: 665a str r2, [r3, #100] @ 0x64 hdma->DMAmuxChannelStatusMask = 1UL << (stream_number & 0x1FU); 8007a4a: 68fb ldr r3, [r7, #12] 8007a4c: f003 031f and.w r3, r3, #31 8007a50: 2201 movs r2, #1 8007a52: 409a lsls r2, r3 8007a54: 687b ldr r3, [r7, #4] 8007a56: 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); } } 8007a58: e024 b.n 8007aa4 stream_number = (((uint32_t)((uint32_t*)hdma->Instance) & 0xFFU) - 16U) / 24U; 8007a5a: 687b ldr r3, [r7, #4] 8007a5c: 681b ldr r3, [r3, #0] 8007a5e: b2db uxtb r3, r3 8007a60: 3b10 subs r3, #16 8007a62: 4a1e ldr r2, [pc, #120] @ (8007adc ) 8007a64: fba2 2303 umull r2, r3, r2, r3 8007a68: 091b lsrs r3, r3, #4 8007a6a: 60fb str r3, [r7, #12] if((stream_baseaddress <= ((uint32_t)DMA2_Stream7) ) && \ 8007a6c: 68bb ldr r3, [r7, #8] 8007a6e: 4a1c ldr r2, [pc, #112] @ (8007ae0 ) 8007a70: 4293 cmp r3, r2 8007a72: d806 bhi.n 8007a82 8007a74: 68bb ldr r3, [r7, #8] 8007a76: 4a1b ldr r2, [pc, #108] @ (8007ae4 ) 8007a78: 4293 cmp r3, r2 8007a7a: d902 bls.n 8007a82 stream_number += 8U; 8007a7c: 68fb ldr r3, [r7, #12] 8007a7e: 3308 adds r3, #8 8007a80: 60fb str r3, [r7, #12] hdma->DMAmuxChannel = (DMAMUX_Channel_TypeDef *)((uint32_t)(((uint32_t)DMAMUX1_Channel0) + (stream_number * 4U))); 8007a82: 68fa ldr r2, [r7, #12] 8007a84: 4b18 ldr r3, [pc, #96] @ (8007ae8 ) 8007a86: 4413 add r3, r2 8007a88: 009b lsls r3, r3, #2 8007a8a: 461a mov r2, r3 8007a8c: 687b ldr r3, [r7, #4] 8007a8e: 661a str r2, [r3, #96] @ 0x60 hdma->DMAmuxChannelStatus = DMAMUX1_ChannelStatus; 8007a90: 687b ldr r3, [r7, #4] 8007a92: 4a16 ldr r2, [pc, #88] @ (8007aec ) 8007a94: 665a str r2, [r3, #100] @ 0x64 hdma->DMAmuxChannelStatusMask = 1UL << (stream_number & 0x1FU); 8007a96: 68fb ldr r3, [r7, #12] 8007a98: f003 031f and.w r3, r3, #31 8007a9c: 2201 movs r2, #1 8007a9e: 409a lsls r2, r3 8007aa0: 687b ldr r3, [r7, #4] 8007aa2: 669a str r2, [r3, #104] @ 0x68 } 8007aa4: bf00 nop 8007aa6: 3714 adds r7, #20 8007aa8: 46bd mov sp, r7 8007aaa: f85d 7b04 ldr.w r7, [sp], #4 8007aae: 4770 bx lr 8007ab0: 58025408 .word 0x58025408 8007ab4: 5802541c .word 0x5802541c 8007ab8: 58025430 .word 0x58025430 8007abc: 58025444 .word 0x58025444 8007ac0: 58025458 .word 0x58025458 8007ac4: 5802546c .word 0x5802546c 8007ac8: 58025480 .word 0x58025480 8007acc: 58025494 .word 0x58025494 8007ad0: cccccccd .word 0xcccccccd 8007ad4: 16009600 .word 0x16009600 8007ad8: 58025880 .word 0x58025880 8007adc: aaaaaaab .word 0xaaaaaaab 8007ae0: 400204b8 .word 0x400204b8 8007ae4: 4002040f .word 0x4002040f 8007ae8: 10008200 .word 0x10008200 8007aec: 40020880 .word 0x40020880 08007af0 : * @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) { 8007af0: b480 push {r7} 8007af2: b085 sub sp, #20 8007af4: af00 add r7, sp, #0 8007af6: 6078 str r0, [r7, #4] uint32_t request = hdma->Init.Request & DMAMUX_CxCR_DMAREQ_ID; 8007af8: 687b ldr r3, [r7, #4] 8007afa: 685b ldr r3, [r3, #4] 8007afc: b2db uxtb r3, r3 8007afe: 60fb str r3, [r7, #12] if((request >= DMA_REQUEST_GENERATOR0) && (request <= DMA_REQUEST_GENERATOR7)) 8007b00: 68fb ldr r3, [r7, #12] 8007b02: 2b00 cmp r3, #0 8007b04: d04a beq.n 8007b9c 8007b06: 68fb ldr r3, [r7, #12] 8007b08: 2b08 cmp r3, #8 8007b0a: d847 bhi.n 8007b9c { if(IS_BDMA_CHANNEL_DMAMUX_INSTANCE(hdma->Instance) != 0U) 8007b0c: 687b ldr r3, [r7, #4] 8007b0e: 681b ldr r3, [r3, #0] 8007b10: 4a25 ldr r2, [pc, #148] @ (8007ba8 ) 8007b12: 4293 cmp r3, r2 8007b14: d022 beq.n 8007b5c 8007b16: 687b ldr r3, [r7, #4] 8007b18: 681b ldr r3, [r3, #0] 8007b1a: 4a24 ldr r2, [pc, #144] @ (8007bac ) 8007b1c: 4293 cmp r3, r2 8007b1e: d01d beq.n 8007b5c 8007b20: 687b ldr r3, [r7, #4] 8007b22: 681b ldr r3, [r3, #0] 8007b24: 4a22 ldr r2, [pc, #136] @ (8007bb0 ) 8007b26: 4293 cmp r3, r2 8007b28: d018 beq.n 8007b5c 8007b2a: 687b ldr r3, [r7, #4] 8007b2c: 681b ldr r3, [r3, #0] 8007b2e: 4a21 ldr r2, [pc, #132] @ (8007bb4 ) 8007b30: 4293 cmp r3, r2 8007b32: d013 beq.n 8007b5c 8007b34: 687b ldr r3, [r7, #4] 8007b36: 681b ldr r3, [r3, #0] 8007b38: 4a1f ldr r2, [pc, #124] @ (8007bb8 ) 8007b3a: 4293 cmp r3, r2 8007b3c: d00e beq.n 8007b5c 8007b3e: 687b ldr r3, [r7, #4] 8007b40: 681b ldr r3, [r3, #0] 8007b42: 4a1e ldr r2, [pc, #120] @ (8007bbc ) 8007b44: 4293 cmp r3, r2 8007b46: d009 beq.n 8007b5c 8007b48: 687b ldr r3, [r7, #4] 8007b4a: 681b ldr r3, [r3, #0] 8007b4c: 4a1c ldr r2, [pc, #112] @ (8007bc0 ) 8007b4e: 4293 cmp r3, r2 8007b50: d004 beq.n 8007b5c 8007b52: 687b ldr r3, [r7, #4] 8007b54: 681b ldr r3, [r3, #0] 8007b56: 4a1b ldr r2, [pc, #108] @ (8007bc4 ) 8007b58: 4293 cmp r3, r2 8007b5a: d101 bne.n 8007b60 8007b5c: 2301 movs r3, #1 8007b5e: e000 b.n 8007b62 8007b60: 2300 movs r3, #0 8007b62: 2b00 cmp r3, #0 8007b64: d00a beq.n 8007b7c { /* BDMA Channels are connected to DMAMUX2 request generator blocks */ hdma->DMAmuxRequestGen = (DMAMUX_RequestGen_TypeDef *)((uint32_t)(((uint32_t)DMAMUX2_RequestGenerator0) + ((request - 1U) * 4U))); 8007b66: 68fa ldr r2, [r7, #12] 8007b68: 4b17 ldr r3, [pc, #92] @ (8007bc8 ) 8007b6a: 4413 add r3, r2 8007b6c: 009b lsls r3, r3, #2 8007b6e: 461a mov r2, r3 8007b70: 687b ldr r3, [r7, #4] 8007b72: 66da str r2, [r3, #108] @ 0x6c hdma->DMAmuxRequestGenStatus = DMAMUX2_RequestGenStatus; 8007b74: 687b ldr r3, [r7, #4] 8007b76: 4a15 ldr r2, [pc, #84] @ (8007bcc ) 8007b78: 671a str r2, [r3, #112] @ 0x70 8007b7a: e009 b.n 8007b90 } else { /* DMA1 and DMA2 Streams use DMAMUX1 request generator blocks */ hdma->DMAmuxRequestGen = (DMAMUX_RequestGen_TypeDef *)((uint32_t)(((uint32_t)DMAMUX1_RequestGenerator0) + ((request - 1U) * 4U))); 8007b7c: 68fa ldr r2, [r7, #12] 8007b7e: 4b14 ldr r3, [pc, #80] @ (8007bd0 ) 8007b80: 4413 add r3, r2 8007b82: 009b lsls r3, r3, #2 8007b84: 461a mov r2, r3 8007b86: 687b ldr r3, [r7, #4] 8007b88: 66da str r2, [r3, #108] @ 0x6c hdma->DMAmuxRequestGenStatus = DMAMUX1_RequestGenStatus; 8007b8a: 687b ldr r3, [r7, #4] 8007b8c: 4a11 ldr r2, [pc, #68] @ (8007bd4 ) 8007b8e: 671a str r2, [r3, #112] @ 0x70 } hdma->DMAmuxRequestGenStatusMask = 1UL << (request - 1U); 8007b90: 68fb ldr r3, [r7, #12] 8007b92: 3b01 subs r3, #1 8007b94: 2201 movs r2, #1 8007b96: 409a lsls r2, r3 8007b98: 687b ldr r3, [r7, #4] 8007b9a: 675a str r2, [r3, #116] @ 0x74 } } 8007b9c: bf00 nop 8007b9e: 3714 adds r7, #20 8007ba0: 46bd mov sp, r7 8007ba2: f85d 7b04 ldr.w r7, [sp], #4 8007ba6: 4770 bx lr 8007ba8: 58025408 .word 0x58025408 8007bac: 5802541c .word 0x5802541c 8007bb0: 58025430 .word 0x58025430 8007bb4: 58025444 .word 0x58025444 8007bb8: 58025458 .word 0x58025458 8007bbc: 5802546c .word 0x5802546c 8007bc0: 58025480 .word 0x58025480 8007bc4: 58025494 .word 0x58025494 8007bc8: 1600963f .word 0x1600963f 8007bcc: 58025940 .word 0x58025940 8007bd0: 1000823f .word 0x1000823f 8007bd4: 40020940 .word 0x40020940 08007bd8 : * @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) { 8007bd8: b580 push {r7, lr} 8007bda: b084 sub sp, #16 8007bdc: af00 add r7, sp, #0 8007bde: 6078 str r0, [r7, #4] uint32_t tickstart; if (heth == NULL) 8007be0: 687b ldr r3, [r7, #4] 8007be2: 2b00 cmp r3, #0 8007be4: d101 bne.n 8007bea { return HAL_ERROR; 8007be6: 2301 movs r3, #1 8007be8: e0e3 b.n 8007db2 } if (heth->gState == HAL_ETH_STATE_RESET) 8007bea: 687b ldr r3, [r7, #4] 8007bec: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 8007bf0: 2b00 cmp r3, #0 8007bf2: d106 bne.n 8007c02 { heth->gState = HAL_ETH_STATE_BUSY; 8007bf4: 687b ldr r3, [r7, #4] 8007bf6: 2223 movs r2, #35 @ 0x23 8007bf8: 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); 8007bfc: 6878 ldr r0, [r7, #4] 8007bfe: f008 fa03 bl 8010008 #endif /* (USE_HAL_ETH_REGISTER_CALLBACKS) */ } __HAL_RCC_SYSCFG_CLK_ENABLE(); 8007c02: 4b6e ldr r3, [pc, #440] @ (8007dbc ) 8007c04: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 8007c08: 4a6c ldr r2, [pc, #432] @ (8007dbc ) 8007c0a: f043 0302 orr.w r3, r3, #2 8007c0e: f8c2 30f4 str.w r3, [r2, #244] @ 0xf4 8007c12: 4b6a ldr r3, [pc, #424] @ (8007dbc ) 8007c14: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 8007c18: f003 0302 and.w r3, r3, #2 8007c1c: 60bb str r3, [r7, #8] 8007c1e: 68bb ldr r3, [r7, #8] if (heth->Init.MediaInterface == HAL_ETH_MII_MODE) 8007c20: 687b ldr r3, [r7, #4] 8007c22: 7a1b ldrb r3, [r3, #8] 8007c24: 2b00 cmp r3, #0 8007c26: d103 bne.n 8007c30 { HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_MII); 8007c28: 2000 movs r0, #0 8007c2a: f7fd fa3d bl 80050a8 8007c2e: e003 b.n 8007c38 } else { HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_RMII); 8007c30: f44f 0000 mov.w r0, #8388608 @ 0x800000 8007c34: f7fd fa38 bl 80050a8 } /* Dummy read to sync with ETH */ (void)SYSCFG->PMCR; 8007c38: 4b61 ldr r3, [pc, #388] @ (8007dc0 ) 8007c3a: 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); 8007c3c: 687b ldr r3, [r7, #4] 8007c3e: 681b ldr r3, [r3, #0] 8007c40: f503 5380 add.w r3, r3, #4096 @ 0x1000 8007c44: 681b ldr r3, [r3, #0] 8007c46: 687a ldr r2, [r7, #4] 8007c48: 6812 ldr r2, [r2, #0] 8007c4a: f043 0301 orr.w r3, r3, #1 8007c4e: f502 5280 add.w r2, r2, #4096 @ 0x1000 8007c52: 6013 str r3, [r2, #0] /* Get tick */ tickstart = HAL_GetTick(); 8007c54: f7fd f9ec bl 8005030 8007c58: 60f8 str r0, [r7, #12] /* Wait for software reset */ while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U) 8007c5a: e011 b.n 8007c80 { if (((HAL_GetTick() - tickstart) > ETH_SWRESET_TIMEOUT)) 8007c5c: f7fd f9e8 bl 8005030 8007c60: 4602 mov r2, r0 8007c62: 68fb ldr r3, [r7, #12] 8007c64: 1ad3 subs r3, r2, r3 8007c66: f5b3 7ffa cmp.w r3, #500 @ 0x1f4 8007c6a: d909 bls.n 8007c80 { /* Set Error Code */ heth->ErrorCode = HAL_ETH_ERROR_TIMEOUT; 8007c6c: 687b ldr r3, [r7, #4] 8007c6e: 2204 movs r2, #4 8007c70: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Set State as Error */ heth->gState = HAL_ETH_STATE_ERROR; 8007c74: 687b ldr r3, [r7, #4] 8007c76: 22e0 movs r2, #224 @ 0xe0 8007c78: f8c3 2084 str.w r2, [r3, #132] @ 0x84 /* Return Error */ return HAL_ERROR; 8007c7c: 2301 movs r3, #1 8007c7e: e098 b.n 8007db2 while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U) 8007c80: 687b ldr r3, [r7, #4] 8007c82: 681b ldr r3, [r3, #0] 8007c84: f503 5380 add.w r3, r3, #4096 @ 0x1000 8007c88: 681b ldr r3, [r3, #0] 8007c8a: f003 0301 and.w r3, r3, #1 8007c8e: 2b00 cmp r3, #0 8007c90: d1e4 bne.n 8007c5c } } /*------------------ MDIO CSR Clock Range Configuration --------------------*/ HAL_ETH_SetMDIOClockRange(heth); 8007c92: 6878 ldr r0, [r7, #4] 8007c94: f000 ff1c bl 8008ad0 /*------------------ MAC LPI 1US Tic Counter Configuration --------------------*/ WRITE_REG(heth->Instance->MAC1USTCR, (((uint32_t)HAL_RCC_GetHCLKFreq() / ETH_MAC_US_TICK) - 1U)); 8007c98: f002 fe88 bl 800a9ac 8007c9c: 4603 mov r3, r0 8007c9e: 4a49 ldr r2, [pc, #292] @ (8007dc4 ) 8007ca0: fba2 2303 umull r2, r3, r2, r3 8007ca4: 0c9a lsrs r2, r3, #18 8007ca6: 687b ldr r3, [r7, #4] 8007ca8: 681b ldr r3, [r3, #0] 8007caa: 3a01 subs r2, #1 8007cac: f8c3 20dc str.w r2, [r3, #220] @ 0xdc /*------------------ MAC, MTL and DMA default Configuration ----------------*/ ETH_MACDMAConfig(heth); 8007cb0: 6878 ldr r0, [r7, #4] 8007cb2: f001 f90d bl 8008ed0 /* SET DSL to 64 bit */ MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_DSL, ETH_DMACCR_DSL_64BIT); 8007cb6: 687b ldr r3, [r7, #4] 8007cb8: 681b ldr r3, [r3, #0] 8007cba: f503 5380 add.w r3, r3, #4096 @ 0x1000 8007cbe: f8d3 3100 ldr.w r3, [r3, #256] @ 0x100 8007cc2: f423 13e0 bic.w r3, r3, #1835008 @ 0x1c0000 8007cc6: 687a ldr r2, [r7, #4] 8007cc8: 6812 ldr r2, [r2, #0] 8007cca: f443 2300 orr.w r3, r3, #524288 @ 0x80000 8007cce: f502 5280 add.w r2, r2, #4096 @ 0x1000 8007cd2: f8c2 3100 str.w r3, [r2, #256] @ 0x100 /* Set Receive Buffers Length (must be a multiple of 4) */ if ((heth->Init.RxBuffLen % 0x4U) != 0x0U) 8007cd6: 687b ldr r3, [r7, #4] 8007cd8: 695b ldr r3, [r3, #20] 8007cda: f003 0303 and.w r3, r3, #3 8007cde: 2b00 cmp r3, #0 8007ce0: d009 beq.n 8007cf6 { /* Set Error Code */ heth->ErrorCode = HAL_ETH_ERROR_PARAM; 8007ce2: 687b ldr r3, [r7, #4] 8007ce4: 2201 movs r2, #1 8007ce6: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Set State as Error */ heth->gState = HAL_ETH_STATE_ERROR; 8007cea: 687b ldr r3, [r7, #4] 8007cec: 22e0 movs r2, #224 @ 0xe0 8007cee: f8c3 2084 str.w r2, [r3, #132] @ 0x84 /* Return Error */ return HAL_ERROR; 8007cf2: 2301 movs r3, #1 8007cf4: e05d b.n 8007db2 } else { MODIFY_REG(heth->Instance->DMACRCR, ETH_DMACRCR_RBSZ, ((heth->Init.RxBuffLen) << 1)); 8007cf6: 687b ldr r3, [r7, #4] 8007cf8: 681b ldr r3, [r3, #0] 8007cfa: f503 5380 add.w r3, r3, #4096 @ 0x1000 8007cfe: f8d3 2108 ldr.w r2, [r3, #264] @ 0x108 8007d02: 4b31 ldr r3, [pc, #196] @ (8007dc8 ) 8007d04: 4013 ands r3, r2 8007d06: 687a ldr r2, [r7, #4] 8007d08: 6952 ldr r2, [r2, #20] 8007d0a: 0051 lsls r1, r2, #1 8007d0c: 687a ldr r2, [r7, #4] 8007d0e: 6812 ldr r2, [r2, #0] 8007d10: 430b orrs r3, r1 8007d12: f502 5280 add.w r2, r2, #4096 @ 0x1000 8007d16: f8c2 3108 str.w r3, [r2, #264] @ 0x108 } /*------------------ DMA Tx Descriptors Configuration ----------------------*/ ETH_DMATxDescListInit(heth); 8007d1a: 6878 ldr r0, [r7, #4] 8007d1c: f001 f975 bl 800900a /*------------------ DMA Rx Descriptors Configuration ----------------------*/ ETH_DMARxDescListInit(heth); 8007d20: 6878 ldr r0, [r7, #4] 8007d22: f001 f9bb bl 800909c /*--------------------- 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]); 8007d26: 687b ldr r3, [r7, #4] 8007d28: 685b ldr r3, [r3, #4] 8007d2a: 3305 adds r3, #5 8007d2c: 781b ldrb r3, [r3, #0] 8007d2e: 021a lsls r2, r3, #8 8007d30: 687b ldr r3, [r7, #4] 8007d32: 685b ldr r3, [r3, #4] 8007d34: 3304 adds r3, #4 8007d36: 781b ldrb r3, [r3, #0] 8007d38: 4619 mov r1, r3 8007d3a: 687b ldr r3, [r7, #4] 8007d3c: 681b ldr r3, [r3, #0] 8007d3e: 430a orrs r2, r1 8007d40: 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) | 8007d44: 687b ldr r3, [r7, #4] 8007d46: 685b ldr r3, [r3, #4] 8007d48: 3303 adds r3, #3 8007d4a: 781b ldrb r3, [r3, #0] 8007d4c: 061a lsls r2, r3, #24 8007d4e: 687b ldr r3, [r7, #4] 8007d50: 685b ldr r3, [r3, #4] 8007d52: 3302 adds r3, #2 8007d54: 781b ldrb r3, [r3, #0] 8007d56: 041b lsls r3, r3, #16 8007d58: 431a orrs r2, r3 ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]); 8007d5a: 687b ldr r3, [r7, #4] 8007d5c: 685b ldr r3, [r3, #4] 8007d5e: 3301 adds r3, #1 8007d60: 781b ldrb r3, [r3, #0] 8007d62: 021b lsls r3, r3, #8 heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 8007d64: 431a orrs r2, r3 ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]); 8007d66: 687b ldr r3, [r7, #4] 8007d68: 685b ldr r3, [r3, #4] 8007d6a: 781b ldrb r3, [r3, #0] 8007d6c: 4619 mov r1, r3 heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 8007d6e: 687b ldr r3, [r7, #4] 8007d70: 681b ldr r3, [r3, #0] ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]); 8007d72: 430a orrs r2, r1 heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 8007d74: f8c3 2304 str.w r2, [r3, #772] @ 0x304 /* Disable Rx MMC Interrupts */ SET_BIT(heth->Instance->MMCRIMR, ETH_MMCRIMR_RXLPITRCIM | ETH_MMCRIMR_RXLPIUSCIM | \ 8007d78: 687b ldr r3, [r7, #4] 8007d7a: 681b ldr r3, [r3, #0] 8007d7c: f8d3 170c ldr.w r1, [r3, #1804] @ 0x70c 8007d80: 687b ldr r3, [r7, #4] 8007d82: 681a ldr r2, [r3, #0] 8007d84: 4b11 ldr r3, [pc, #68] @ (8007dcc ) 8007d86: 430b orrs r3, r1 8007d88: 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 | \ 8007d8c: 687b ldr r3, [r7, #4] 8007d8e: 681b ldr r3, [r3, #0] 8007d90: f8d3 1710 ldr.w r1, [r3, #1808] @ 0x710 8007d94: 687b ldr r3, [r7, #4] 8007d96: 681a ldr r2, [r3, #0] 8007d98: 4b0d ldr r3, [pc, #52] @ (8007dd0 ) 8007d9a: 430b orrs r3, r1 8007d9c: f8c2 3710 str.w r3, [r2, #1808] @ 0x710 ETH_MMCTIMR_TXGPKTIM | ETH_MMCTIMR_TXMCOLGPIM | ETH_MMCTIMR_TXSCOLGPIM); heth->ErrorCode = HAL_ETH_ERROR_NONE; 8007da0: 687b ldr r3, [r7, #4] 8007da2: 2200 movs r2, #0 8007da4: f8c3 2088 str.w r2, [r3, #136] @ 0x88 heth->gState = HAL_ETH_STATE_READY; 8007da8: 687b ldr r3, [r7, #4] 8007daa: 2210 movs r2, #16 8007dac: f8c3 2084 str.w r2, [r3, #132] @ 0x84 return HAL_OK; 8007db0: 2300 movs r3, #0 } 8007db2: 4618 mov r0, r3 8007db4: 3710 adds r7, #16 8007db6: 46bd mov sp, r7 8007db8: bd80 pop {r7, pc} 8007dba: bf00 nop 8007dbc: 58024400 .word 0x58024400 8007dc0: 58000400 .word 0x58000400 8007dc4: 431bde83 .word 0x431bde83 8007dc8: ffff8001 .word 0xffff8001 8007dcc: 0c020060 .word 0x0c020060 8007dd0: 0c20c000 .word 0x0c20c000 08007dd4 : * @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) { 8007dd4: b580 push {r7, lr} 8007dd6: b082 sub sp, #8 8007dd8: af00 add r7, sp, #0 8007dda: 6078 str r0, [r7, #4] if (heth->gState == HAL_ETH_STATE_READY) 8007ddc: 687b ldr r3, [r7, #4] 8007dde: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 8007de2: 2b10 cmp r3, #16 8007de4: d165 bne.n 8007eb2 { heth->gState = HAL_ETH_STATE_BUSY; 8007de6: 687b ldr r3, [r7, #4] 8007de8: 2223 movs r2, #35 @ 0x23 8007dea: f8c3 2084 str.w r2, [r3, #132] @ 0x84 /* save IT mode to ETH Handle */ heth->RxDescList.ItMode = 1U; 8007dee: 687b ldr r3, [r7, #4] 8007df0: 2201 movs r2, #1 8007df2: 659a str r2, [r3, #88] @ 0x58 /* Set number of descriptors to build */ heth->RxDescList.RxBuildDescCnt = ETH_RX_DESC_CNT; 8007df4: 687b ldr r3, [r7, #4] 8007df6: 2204 movs r2, #4 8007df8: 66da str r2, [r3, #108] @ 0x6c /* Build all descriptors */ ETH_UpdateDescriptor(heth); 8007dfa: 6878 ldr r0, [r7, #4] 8007dfc: f000 f9e4 bl 80081c8 /* Enable the DMA transmission */ SET_BIT(heth->Instance->DMACTCR, ETH_DMACTCR_ST); 8007e00: 687b ldr r3, [r7, #4] 8007e02: 681b ldr r3, [r3, #0] 8007e04: f503 5380 add.w r3, r3, #4096 @ 0x1000 8007e08: f8d3 3104 ldr.w r3, [r3, #260] @ 0x104 8007e0c: 687a ldr r2, [r7, #4] 8007e0e: 6812 ldr r2, [r2, #0] 8007e10: f043 0301 orr.w r3, r3, #1 8007e14: f502 5280 add.w r2, r2, #4096 @ 0x1000 8007e18: f8c2 3104 str.w r3, [r2, #260] @ 0x104 /* Enable the DMA reception */ SET_BIT(heth->Instance->DMACRCR, ETH_DMACRCR_SR); 8007e1c: 687b ldr r3, [r7, #4] 8007e1e: 681b ldr r3, [r3, #0] 8007e20: f503 5380 add.w r3, r3, #4096 @ 0x1000 8007e24: f8d3 3108 ldr.w r3, [r3, #264] @ 0x108 8007e28: 687a ldr r2, [r7, #4] 8007e2a: 6812 ldr r2, [r2, #0] 8007e2c: f043 0301 orr.w r3, r3, #1 8007e30: f502 5280 add.w r2, r2, #4096 @ 0x1000 8007e34: f8c2 3108 str.w r3, [r2, #264] @ 0x108 /* Clear Tx and Rx process stopped flags */ heth->Instance->DMACSR |= (ETH_DMACSR_TPS | ETH_DMACSR_RPS); 8007e38: 687b ldr r3, [r7, #4] 8007e3a: 681b ldr r3, [r3, #0] 8007e3c: f503 5380 add.w r3, r3, #4096 @ 0x1000 8007e40: f8d3 3160 ldr.w r3, [r3, #352] @ 0x160 8007e44: 687a ldr r2, [r7, #4] 8007e46: 6812 ldr r2, [r2, #0] 8007e48: f443 7381 orr.w r3, r3, #258 @ 0x102 8007e4c: f502 5280 add.w r2, r2, #4096 @ 0x1000 8007e50: f8c2 3160 str.w r3, [r2, #352] @ 0x160 /* Set the Flush Transmit FIFO bit */ SET_BIT(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_FTQ); 8007e54: 687b ldr r3, [r7, #4] 8007e56: 681b ldr r3, [r3, #0] 8007e58: f8d3 2d00 ldr.w r2, [r3, #3328] @ 0xd00 8007e5c: 687b ldr r3, [r7, #4] 8007e5e: 681b ldr r3, [r3, #0] 8007e60: f042 0201 orr.w r2, r2, #1 8007e64: f8c3 2d00 str.w r2, [r3, #3328] @ 0xd00 /* Enable the MAC transmission */ SET_BIT(heth->Instance->MACCR, ETH_MACCR_TE); 8007e68: 687b ldr r3, [r7, #4] 8007e6a: 681b ldr r3, [r3, #0] 8007e6c: 681a ldr r2, [r3, #0] 8007e6e: 687b ldr r3, [r7, #4] 8007e70: 681b ldr r3, [r3, #0] 8007e72: f042 0202 orr.w r2, r2, #2 8007e76: 601a str r2, [r3, #0] /* Enable the MAC reception */ SET_BIT(heth->Instance->MACCR, ETH_MACCR_RE); 8007e78: 687b ldr r3, [r7, #4] 8007e7a: 681b ldr r3, [r3, #0] 8007e7c: 681a ldr r2, [r3, #0] 8007e7e: 687b ldr r3, [r7, #4] 8007e80: 681b ldr r3, [r3, #0] 8007e82: f042 0201 orr.w r2, r2, #1 8007e86: 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 | 8007e88: 687b ldr r3, [r7, #4] 8007e8a: 681b ldr r3, [r3, #0] 8007e8c: f503 5380 add.w r3, r3, #4096 @ 0x1000 8007e90: f8d3 1134 ldr.w r1, [r3, #308] @ 0x134 8007e94: 687b ldr r3, [r7, #4] 8007e96: 681a ldr r2, [r3, #0] 8007e98: f24d 03c1 movw r3, #53441 @ 0xd0c1 8007e9c: 430b orrs r3, r1 8007e9e: f502 5280 add.w r2, r2, #4096 @ 0x1000 8007ea2: f8c2 3134 str.w r3, [r2, #308] @ 0x134 ETH_DMACIER_FBEE | ETH_DMACIER_AIE | ETH_DMACIER_RBUE)); heth->gState = HAL_ETH_STATE_STARTED; 8007ea6: 687b ldr r3, [r7, #4] 8007ea8: 2223 movs r2, #35 @ 0x23 8007eaa: f8c3 2084 str.w r2, [r3, #132] @ 0x84 return HAL_OK; 8007eae: 2300 movs r3, #0 8007eb0: e000 b.n 8007eb4 } else { return HAL_ERROR; 8007eb2: 2301 movs r3, #1 } } 8007eb4: 4618 mov r0, r3 8007eb6: 3708 adds r7, #8 8007eb8: 46bd mov sp, r7 8007eba: bd80 pop {r7, pc} 08007ebc : * @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) { 8007ebc: b480 push {r7} 8007ebe: b085 sub sp, #20 8007ec0: af00 add r7, sp, #0 8007ec2: 6078 str r0, [r7, #4] ETH_DMADescTypeDef *dmarxdesc; uint32_t descindex; if (heth->gState == HAL_ETH_STATE_STARTED) 8007ec4: 687b ldr r3, [r7, #4] 8007ec6: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 8007eca: 2b23 cmp r3, #35 @ 0x23 8007ecc: d165 bne.n 8007f9a { /* Set the ETH peripheral state to BUSY */ heth->gState = HAL_ETH_STATE_BUSY; 8007ece: 687b ldr r3, [r7, #4] 8007ed0: 2223 movs r2, #35 @ 0x23 8007ed2: 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 | 8007ed6: 687b ldr r3, [r7, #4] 8007ed8: 681b ldr r3, [r3, #0] 8007eda: f503 5380 add.w r3, r3, #4096 @ 0x1000 8007ede: f8d3 1134 ldr.w r1, [r3, #308] @ 0x134 8007ee2: 687b ldr r3, [r7, #4] 8007ee4: 681a ldr r2, [r3, #0] 8007ee6: 4b30 ldr r3, [pc, #192] @ (8007fa8 ) 8007ee8: 400b ands r3, r1 8007eea: f502 5280 add.w r2, r2, #4096 @ 0x1000 8007eee: 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); 8007ef2: 687b ldr r3, [r7, #4] 8007ef4: 681b ldr r3, [r3, #0] 8007ef6: f503 5380 add.w r3, r3, #4096 @ 0x1000 8007efa: f8d3 3104 ldr.w r3, [r3, #260] @ 0x104 8007efe: 687a ldr r2, [r7, #4] 8007f00: 6812 ldr r2, [r2, #0] 8007f02: f023 0301 bic.w r3, r3, #1 8007f06: f502 5280 add.w r2, r2, #4096 @ 0x1000 8007f0a: f8c2 3104 str.w r3, [r2, #260] @ 0x104 /* Disable the DMA reception */ CLEAR_BIT(heth->Instance->DMACRCR, ETH_DMACRCR_SR); 8007f0e: 687b ldr r3, [r7, #4] 8007f10: 681b ldr r3, [r3, #0] 8007f12: f503 5380 add.w r3, r3, #4096 @ 0x1000 8007f16: f8d3 3108 ldr.w r3, [r3, #264] @ 0x108 8007f1a: 687a ldr r2, [r7, #4] 8007f1c: 6812 ldr r2, [r2, #0] 8007f1e: f023 0301 bic.w r3, r3, #1 8007f22: f502 5280 add.w r2, r2, #4096 @ 0x1000 8007f26: f8c2 3108 str.w r3, [r2, #264] @ 0x108 /* Disable the MAC reception */ CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_RE); 8007f2a: 687b ldr r3, [r7, #4] 8007f2c: 681b ldr r3, [r3, #0] 8007f2e: 681a ldr r2, [r3, #0] 8007f30: 687b ldr r3, [r7, #4] 8007f32: 681b ldr r3, [r3, #0] 8007f34: f022 0201 bic.w r2, r2, #1 8007f38: 601a str r2, [r3, #0] /* Set the Flush Transmit FIFO bit */ SET_BIT(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_FTQ); 8007f3a: 687b ldr r3, [r7, #4] 8007f3c: 681b ldr r3, [r3, #0] 8007f3e: f8d3 2d00 ldr.w r2, [r3, #3328] @ 0xd00 8007f42: 687b ldr r3, [r7, #4] 8007f44: 681b ldr r3, [r3, #0] 8007f46: f042 0201 orr.w r2, r2, #1 8007f4a: f8c3 2d00 str.w r2, [r3, #3328] @ 0xd00 /* Disable the MAC transmission */ CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_TE); 8007f4e: 687b ldr r3, [r7, #4] 8007f50: 681b ldr r3, [r3, #0] 8007f52: 681a ldr r2, [r3, #0] 8007f54: 687b ldr r3, [r7, #4] 8007f56: 681b ldr r3, [r3, #0] 8007f58: f022 0202 bic.w r2, r2, #2 8007f5c: 601a str r2, [r3, #0] /* Clear IOC bit to all Rx descriptors */ for (descindex = 0; descindex < (uint32_t)ETH_RX_DESC_CNT; descindex++) 8007f5e: 2300 movs r3, #0 8007f60: 60fb str r3, [r7, #12] 8007f62: e00e b.n 8007f82 { dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descindex]; 8007f64: 687b ldr r3, [r7, #4] 8007f66: 68fa ldr r2, [r7, #12] 8007f68: 3212 adds r2, #18 8007f6a: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8007f6e: 60bb str r3, [r7, #8] CLEAR_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCRF_IOC); 8007f70: 68bb ldr r3, [r7, #8] 8007f72: 68db ldr r3, [r3, #12] 8007f74: f023 4280 bic.w r2, r3, #1073741824 @ 0x40000000 8007f78: 68bb ldr r3, [r7, #8] 8007f7a: 60da str r2, [r3, #12] for (descindex = 0; descindex < (uint32_t)ETH_RX_DESC_CNT; descindex++) 8007f7c: 68fb ldr r3, [r7, #12] 8007f7e: 3301 adds r3, #1 8007f80: 60fb str r3, [r7, #12] 8007f82: 68fb ldr r3, [r7, #12] 8007f84: 2b03 cmp r3, #3 8007f86: d9ed bls.n 8007f64 } heth->RxDescList.ItMode = 0U; 8007f88: 687b ldr r3, [r7, #4] 8007f8a: 2200 movs r2, #0 8007f8c: 659a str r2, [r3, #88] @ 0x58 heth->gState = HAL_ETH_STATE_READY; 8007f8e: 687b ldr r3, [r7, #4] 8007f90: 2210 movs r2, #16 8007f92: f8c3 2084 str.w r2, [r3, #132] @ 0x84 /* Return function status */ return HAL_OK; 8007f96: 2300 movs r3, #0 8007f98: e000 b.n 8007f9c } else { return HAL_ERROR; 8007f9a: 2301 movs r3, #1 } } 8007f9c: 4618 mov r0, r3 8007f9e: 3714 adds r7, #20 8007fa0: 46bd mov sp, r7 8007fa2: f85d 7b04 ldr.w r7, [sp], #4 8007fa6: 4770 bx lr 8007fa8: ffff2f3e .word 0xffff2f3e 08007fac : * 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) { 8007fac: b580 push {r7, lr} 8007fae: b082 sub sp, #8 8007fb0: af00 add r7, sp, #0 8007fb2: 6078 str r0, [r7, #4] 8007fb4: 6039 str r1, [r7, #0] if (pTxConfig == NULL) 8007fb6: 683b ldr r3, [r7, #0] 8007fb8: 2b00 cmp r3, #0 8007fba: d109 bne.n 8007fd0 { heth->ErrorCode |= HAL_ETH_ERROR_PARAM; 8007fbc: 687b ldr r3, [r7, #4] 8007fbe: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 8007fc2: f043 0201 orr.w r2, r3, #1 8007fc6: 687b ldr r3, [r7, #4] 8007fc8: f8c3 2088 str.w r2, [r3, #136] @ 0x88 return HAL_ERROR; 8007fcc: 2301 movs r3, #1 8007fce: e03a b.n 8008046 } if (heth->gState == HAL_ETH_STATE_STARTED) 8007fd0: 687b ldr r3, [r7, #4] 8007fd2: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 8007fd6: 2b23 cmp r3, #35 @ 0x23 8007fd8: d134 bne.n 8008044 { /* Save the packet pointer to release. */ heth->TxDescList.CurrentPacketAddress = (uint32_t *)pTxConfig->pData; 8007fda: 683b ldr r3, [r7, #0] 8007fdc: 6b5a ldr r2, [r3, #52] @ 0x34 8007fde: 687b ldr r3, [r7, #4] 8007fe0: 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) 8007fe2: 2201 movs r2, #1 8007fe4: 6839 ldr r1, [r7, #0] 8007fe6: 6878 ldr r0, [r7, #4] 8007fe8: f001 f8b6 bl 8009158 8007fec: 4603 mov r3, r0 8007fee: 2b00 cmp r3, #0 8007ff0: d009 beq.n 8008006 { heth->ErrorCode |= HAL_ETH_ERROR_BUSY; 8007ff2: 687b ldr r3, [r7, #4] 8007ff4: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 8007ff8: f043 0202 orr.w r2, r3, #2 8007ffc: 687b ldr r3, [r7, #4] 8007ffe: f8c3 2088 str.w r2, [r3, #136] @ 0x88 return HAL_ERROR; 8008002: 2301 movs r3, #1 8008004: e01f b.n 8008046 __ASM volatile ("dsb 0xF":::"memory"); 8008006: f3bf 8f4f dsb sy } 800800a: bf00 nop /* Ensure completion of descriptor preparation before transmission start */ __DSB(); /* Incr current tx desc index */ INCR_TX_DESC_INDEX(heth->TxDescList.CurTxDesc, 1U); 800800c: 687b ldr r3, [r7, #4] 800800e: 6a9b ldr r3, [r3, #40] @ 0x28 8008010: 1c5a adds r2, r3, #1 8008012: 687b ldr r3, [r7, #4] 8008014: 629a str r2, [r3, #40] @ 0x28 8008016: 687b ldr r3, [r7, #4] 8008018: 6a9b ldr r3, [r3, #40] @ 0x28 800801a: 2b03 cmp r3, #3 800801c: d904 bls.n 8008028 800801e: 687b ldr r3, [r7, #4] 8008020: 6a9b ldr r3, [r3, #40] @ 0x28 8008022: 1f1a subs r2, r3, #4 8008024: 687b ldr r3, [r7, #4] 8008026: 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])); 8008028: 687b ldr r3, [r7, #4] 800802a: 6a99 ldr r1, [r3, #40] @ 0x28 800802c: 687b ldr r3, [r7, #4] 800802e: 681a ldr r2, [r3, #0] 8008030: 687b ldr r3, [r7, #4] 8008032: 3106 adds r1, #6 8008034: f853 3021 ldr.w r3, [r3, r1, lsl #2] 8008038: f502 5280 add.w r2, r2, #4096 @ 0x1000 800803c: f8c2 3120 str.w r3, [r2, #288] @ 0x120 return HAL_OK; 8008040: 2300 movs r3, #0 8008042: e000 b.n 8008046 } else { return HAL_ERROR; 8008044: 2301 movs r3, #1 } } 8008046: 4618 mov r0, r3 8008048: 3708 adds r7, #8 800804a: 46bd mov sp, r7 800804c: bd80 pop {r7, pc} 0800804e : * 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) { 800804e: b580 push {r7, lr} 8008050: b088 sub sp, #32 8008052: af00 add r7, sp, #0 8008054: 6078 str r0, [r7, #4] 8008056: 6039 str r1, [r7, #0] uint32_t descidx; ETH_DMADescTypeDef *dmarxdesc; uint32_t desccnt = 0U; 8008058: 2300 movs r3, #0 800805a: 617b str r3, [r7, #20] uint32_t desccntmax; uint32_t bufflength; uint8_t rxdataready = 0U; 800805c: 2300 movs r3, #0 800805e: 74fb strb r3, [r7, #19] if (pAppBuff == NULL) 8008060: 683b ldr r3, [r7, #0] 8008062: 2b00 cmp r3, #0 8008064: d109 bne.n 800807a { heth->ErrorCode |= HAL_ETH_ERROR_PARAM; 8008066: 687b ldr r3, [r7, #4] 8008068: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800806c: f043 0201 orr.w r2, r3, #1 8008070: 687b ldr r3, [r7, #4] 8008072: f8c3 2088 str.w r2, [r3, #136] @ 0x88 return HAL_ERROR; 8008076: 2301 movs r3, #1 8008078: e0a2 b.n 80081c0 } if (heth->gState != HAL_ETH_STATE_STARTED) 800807a: 687b ldr r3, [r7, #4] 800807c: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 8008080: 2b23 cmp r3, #35 @ 0x23 8008082: d001 beq.n 8008088 { return HAL_ERROR; 8008084: 2301 movs r3, #1 8008086: e09b b.n 80081c0 } descidx = heth->RxDescList.RxDescIdx; 8008088: 687b ldr r3, [r7, #4] 800808a: 6ddb ldr r3, [r3, #92] @ 0x5c 800808c: 61fb str r3, [r7, #28] dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 800808e: 687b ldr r3, [r7, #4] 8008090: 69fa ldr r2, [r7, #28] 8008092: 3212 adds r2, #18 8008094: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8008098: 61bb str r3, [r7, #24] desccntmax = ETH_RX_DESC_CNT - heth->RxDescList.RxBuildDescCnt; 800809a: 687b ldr r3, [r7, #4] 800809c: 6edb ldr r3, [r3, #108] @ 0x6c 800809e: f1c3 0304 rsb r3, r3, #4 80080a2: 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) 80080a4: e064 b.n 8008170 && (rxdataready == 0U)) { if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_CTXT) != (uint32_t)RESET) 80080a6: 69bb ldr r3, [r7, #24] 80080a8: 68db ldr r3, [r3, #12] 80080aa: f003 4380 and.w r3, r3, #1073741824 @ 0x40000000 80080ae: 2b00 cmp r3, #0 80080b0: d007 beq.n 80080c2 { /* Get timestamp high */ heth->RxDescList.TimeStamp.TimeStampHigh = dmarxdesc->DESC1; 80080b2: 69bb ldr r3, [r7, #24] 80080b4: 685a ldr r2, [r3, #4] 80080b6: 687b ldr r3, [r7, #4] 80080b8: 679a str r2, [r3, #120] @ 0x78 /* Get timestamp low */ heth->RxDescList.TimeStamp.TimeStampLow = dmarxdesc->DESC0; 80080ba: 69bb ldr r3, [r7, #24] 80080bc: 681a ldr r2, [r3, #0] 80080be: 687b ldr r3, [r7, #4] 80080c0: 675a str r2, [r3, #116] @ 0x74 } if ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_FD) != (uint32_t)RESET) || (heth->RxDescList.pRxStart != NULL)) 80080c2: 69bb ldr r3, [r7, #24] 80080c4: 68db ldr r3, [r3, #12] 80080c6: f003 5300 and.w r3, r3, #536870912 @ 0x20000000 80080ca: 2b00 cmp r3, #0 80080cc: d103 bne.n 80080d6 80080ce: 687b ldr r3, [r7, #4] 80080d0: 6fdb ldr r3, [r3, #124] @ 0x7c 80080d2: 2b00 cmp r3, #0 80080d4: d03a beq.n 800814c { /* Check if first descriptor */ if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_FD) != (uint32_t)RESET) 80080d6: 69bb ldr r3, [r7, #24] 80080d8: 68db ldr r3, [r3, #12] 80080da: f003 5300 and.w r3, r3, #536870912 @ 0x20000000 80080de: 2b00 cmp r3, #0 80080e0: d005 beq.n 80080ee { heth->RxDescList.RxDescCnt = 0; 80080e2: 687b ldr r3, [r7, #4] 80080e4: 2200 movs r2, #0 80080e6: 661a str r2, [r3, #96] @ 0x60 heth->RxDescList.RxDataLength = 0; 80080e8: 687b ldr r3, [r7, #4] 80080ea: 2200 movs r2, #0 80080ec: 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; 80080ee: 69bb ldr r3, [r7, #24] 80080f0: 68db ldr r3, [r3, #12] 80080f2: f3c3 020e ubfx r2, r3, #0, #15 80080f6: 687b ldr r3, [r7, #4] 80080f8: 6e5b ldr r3, [r3, #100] @ 0x64 80080fa: 1ad3 subs r3, r2, r3 80080fc: 60bb str r3, [r7, #8] /* Check if last descriptor */ if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_LD) != (uint32_t)RESET) 80080fe: 69bb ldr r3, [r7, #24] 8008100: 68db ldr r3, [r3, #12] 8008102: f003 5380 and.w r3, r3, #268435456 @ 0x10000000 8008106: 2b00 cmp r3, #0 8008108: d005 beq.n 8008116 { /* Save Last descriptor index */ heth->RxDescList.pRxLastRxDesc = dmarxdesc->DESC3; 800810a: 69bb ldr r3, [r7, #24] 800810c: 68da ldr r2, [r3, #12] 800810e: 687b ldr r3, [r7, #4] 8008110: 671a str r2, [r3, #112] @ 0x70 /* Packet ready */ rxdataready = 1; 8008112: 2301 movs r3, #1 8008114: 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, 8008116: 687b ldr r3, [r7, #4] 8008118: f103 007c add.w r0, r3, #124 @ 0x7c 800811c: 687b ldr r3, [r7, #4] 800811e: f103 0180 add.w r1, r3, #128 @ 0x80 (uint8_t *)dmarxdesc->BackupAddr0, (uint16_t) bufflength); 8008122: 69bb ldr r3, [r7, #24] 8008124: 691b ldr r3, [r3, #16] HAL_ETH_RxLinkCallback(&heth->RxDescList.pRxStart, &heth->RxDescList.pRxEnd, 8008126: 461a mov r2, r3 8008128: 68bb ldr r3, [r7, #8] 800812a: b29b uxth r3, r3 800812c: f008 f96e bl 801040c #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->RxDescList.RxDescCnt++; 8008130: 687b ldr r3, [r7, #4] 8008132: 6e1b ldr r3, [r3, #96] @ 0x60 8008134: 1c5a adds r2, r3, #1 8008136: 687b ldr r3, [r7, #4] 8008138: 661a str r2, [r3, #96] @ 0x60 heth->RxDescList.RxDataLength += bufflength; 800813a: 687b ldr r3, [r7, #4] 800813c: 6e5a ldr r2, [r3, #100] @ 0x64 800813e: 68bb ldr r3, [r7, #8] 8008140: 441a add r2, r3 8008142: 687b ldr r3, [r7, #4] 8008144: 665a str r2, [r3, #100] @ 0x64 /* Clear buffer pointer */ dmarxdesc->BackupAddr0 = 0; 8008146: 69bb ldr r3, [r7, #24] 8008148: 2200 movs r2, #0 800814a: 611a str r2, [r3, #16] } /* Increment current rx descriptor index */ INCR_RX_DESC_INDEX(descidx, 1U); 800814c: 69fb ldr r3, [r7, #28] 800814e: 3301 adds r3, #1 8008150: 61fb str r3, [r7, #28] 8008152: 69fb ldr r3, [r7, #28] 8008154: 2b03 cmp r3, #3 8008156: d902 bls.n 800815e 8008158: 69fb ldr r3, [r7, #28] 800815a: 3b04 subs r3, #4 800815c: 61fb str r3, [r7, #28] /* Get current descriptor address */ dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 800815e: 687b ldr r3, [r7, #4] 8008160: 69fa ldr r2, [r7, #28] 8008162: 3212 adds r2, #18 8008164: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8008168: 61bb str r3, [r7, #24] desccnt++; 800816a: 697b ldr r3, [r7, #20] 800816c: 3301 adds r3, #1 800816e: 617b str r3, [r7, #20] while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax) 8008170: 69bb ldr r3, [r7, #24] 8008172: 68db ldr r3, [r3, #12] && (rxdataready == 0U)) 8008174: 2b00 cmp r3, #0 8008176: db06 blt.n 8008186 while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax) 8008178: 697a ldr r2, [r7, #20] 800817a: 68fb ldr r3, [r7, #12] 800817c: 429a cmp r2, r3 800817e: d202 bcs.n 8008186 && (rxdataready == 0U)) 8008180: 7cfb ldrb r3, [r7, #19] 8008182: 2b00 cmp r3, #0 8008184: d08f beq.n 80080a6 } heth->RxDescList.RxBuildDescCnt += desccnt; 8008186: 687b ldr r3, [r7, #4] 8008188: 6eda ldr r2, [r3, #108] @ 0x6c 800818a: 697b ldr r3, [r7, #20] 800818c: 441a add r2, r3 800818e: 687b ldr r3, [r7, #4] 8008190: 66da str r2, [r3, #108] @ 0x6c if ((heth->RxDescList.RxBuildDescCnt) != 0U) 8008192: 687b ldr r3, [r7, #4] 8008194: 6edb ldr r3, [r3, #108] @ 0x6c 8008196: 2b00 cmp r3, #0 8008198: d002 beq.n 80081a0 { /* Update Descriptors */ ETH_UpdateDescriptor(heth); 800819a: 6878 ldr r0, [r7, #4] 800819c: f000 f814 bl 80081c8 } heth->RxDescList.RxDescIdx = descidx; 80081a0: 687b ldr r3, [r7, #4] 80081a2: 69fa ldr r2, [r7, #28] 80081a4: 65da str r2, [r3, #92] @ 0x5c if (rxdataready == 1U) 80081a6: 7cfb ldrb r3, [r7, #19] 80081a8: 2b01 cmp r3, #1 80081aa: d108 bne.n 80081be { /* Return received packet */ *pAppBuff = heth->RxDescList.pRxStart; 80081ac: 687b ldr r3, [r7, #4] 80081ae: 6fda ldr r2, [r3, #124] @ 0x7c 80081b0: 683b ldr r3, [r7, #0] 80081b2: 601a str r2, [r3, #0] /* Reset first element */ heth->RxDescList.pRxStart = NULL; 80081b4: 687b ldr r3, [r7, #4] 80081b6: 2200 movs r2, #0 80081b8: 67da str r2, [r3, #124] @ 0x7c return HAL_OK; 80081ba: 2300 movs r3, #0 80081bc: e000 b.n 80081c0 } /* Packet not ready */ return HAL_ERROR; 80081be: 2301 movs r3, #1 } 80081c0: 4618 mov r0, r3 80081c2: 3720 adds r7, #32 80081c4: 46bd mov sp, r7 80081c6: bd80 pop {r7, pc} 080081c8 : * @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) { 80081c8: b580 push {r7, lr} 80081ca: b088 sub sp, #32 80081cc: af00 add r7, sp, #0 80081ce: 6078 str r0, [r7, #4] uint32_t descidx; uint32_t tailidx; uint32_t desccount; ETH_DMADescTypeDef *dmarxdesc; uint8_t *buff = NULL; 80081d0: 2300 movs r3, #0 80081d2: 60bb str r3, [r7, #8] uint8_t allocStatus = 1U; 80081d4: 2301 movs r3, #1 80081d6: 74fb strb r3, [r7, #19] descidx = heth->RxDescList.RxBuildDescIdx; 80081d8: 687b ldr r3, [r7, #4] 80081da: 6e9b ldr r3, [r3, #104] @ 0x68 80081dc: 61fb str r3, [r7, #28] dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 80081de: 687b ldr r3, [r7, #4] 80081e0: 69fa ldr r2, [r7, #28] 80081e2: 3212 adds r2, #18 80081e4: f853 3022 ldr.w r3, [r3, r2, lsl #2] 80081e8: 617b str r3, [r7, #20] desccount = heth->RxDescList.RxBuildDescCnt; 80081ea: 687b ldr r3, [r7, #4] 80081ec: 6edb ldr r3, [r3, #108] @ 0x6c 80081ee: 61bb str r3, [r7, #24] while ((desccount > 0U) && (allocStatus != 0U)) 80081f0: e038 b.n 8008264 { /* Check if a buffer's attached the descriptor */ if (READ_REG(dmarxdesc->BackupAddr0) == 0U) 80081f2: 697b ldr r3, [r7, #20] 80081f4: 691b ldr r3, [r3, #16] 80081f6: 2b00 cmp r3, #0 80081f8: d112 bne.n 8008220 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /*Call registered Allocate callback*/ heth->rxAllocateCallback(&buff); #else /* Allocate callback */ HAL_ETH_RxAllocateCallback(&buff); 80081fa: f107 0308 add.w r3, r7, #8 80081fe: 4618 mov r0, r3 8008200: f008 f8d4 bl 80103ac #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ if (buff == NULL) 8008204: 68bb ldr r3, [r7, #8] 8008206: 2b00 cmp r3, #0 8008208: d102 bne.n 8008210 { allocStatus = 0U; 800820a: 2300 movs r3, #0 800820c: 74fb strb r3, [r7, #19] 800820e: e007 b.n 8008220 } else { WRITE_REG(dmarxdesc->BackupAddr0, (uint32_t)buff); 8008210: 68bb ldr r3, [r7, #8] 8008212: 461a mov r2, r3 8008214: 697b ldr r3, [r7, #20] 8008216: 611a str r2, [r3, #16] WRITE_REG(dmarxdesc->DESC0, (uint32_t)buff); 8008218: 68bb ldr r3, [r7, #8] 800821a: 461a mov r2, r3 800821c: 697b ldr r3, [r7, #20] 800821e: 601a str r2, [r3, #0] } } if (allocStatus != 0U) 8008220: 7cfb ldrb r3, [r7, #19] 8008222: 2b00 cmp r3, #0 8008224: d01e beq.n 8008264 { if (heth->RxDescList.ItMode != 0U) 8008226: 687b ldr r3, [r7, #4] 8008228: 6d9b ldr r3, [r3, #88] @ 0x58 800822a: 2b00 cmp r3, #0 800822c: d004 beq.n 8008238 { WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V | ETH_DMARXNDESCRF_IOC); 800822e: 697b ldr r3, [r7, #20] 8008230: f04f 4241 mov.w r2, #3238002688 @ 0xc1000000 8008234: 60da str r2, [r3, #12] 8008236: e003 b.n 8008240 } else { WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V); 8008238: 697b ldr r3, [r7, #20] 800823a: f04f 4201 mov.w r2, #2164260864 @ 0x81000000 800823e: 60da str r2, [r3, #12] } /* Increment current rx descriptor index */ INCR_RX_DESC_INDEX(descidx, 1U); 8008240: 69fb ldr r3, [r7, #28] 8008242: 3301 adds r3, #1 8008244: 61fb str r3, [r7, #28] 8008246: 69fb ldr r3, [r7, #28] 8008248: 2b03 cmp r3, #3 800824a: d902 bls.n 8008252 800824c: 69fb ldr r3, [r7, #28] 800824e: 3b04 subs r3, #4 8008250: 61fb str r3, [r7, #28] /* Get current descriptor address */ dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 8008252: 687b ldr r3, [r7, #4] 8008254: 69fa ldr r2, [r7, #28] 8008256: 3212 adds r2, #18 8008258: f853 3022 ldr.w r3, [r3, r2, lsl #2] 800825c: 617b str r3, [r7, #20] desccount--; 800825e: 69bb ldr r3, [r7, #24] 8008260: 3b01 subs r3, #1 8008262: 61bb str r3, [r7, #24] while ((desccount > 0U) && (allocStatus != 0U)) 8008264: 69bb ldr r3, [r7, #24] 8008266: 2b00 cmp r3, #0 8008268: d002 beq.n 8008270 800826a: 7cfb ldrb r3, [r7, #19] 800826c: 2b00 cmp r3, #0 800826e: d1c0 bne.n 80081f2 } } if (heth->RxDescList.RxBuildDescCnt != desccount) 8008270: 687b ldr r3, [r7, #4] 8008272: 6edb ldr r3, [r3, #108] @ 0x6c 8008274: 69ba ldr r2, [r7, #24] 8008276: 429a cmp r2, r3 8008278: d01b beq.n 80082b2 { /* Set the tail pointer index */ tailidx = (descidx + 1U) % ETH_RX_DESC_CNT; 800827a: 69fb ldr r3, [r7, #28] 800827c: 3301 adds r3, #1 800827e: f003 0303 and.w r3, r3, #3 8008282: 60fb str r3, [r7, #12] __ASM volatile ("dmb 0xF":::"memory"); 8008284: f3bf 8f5f dmb sy } 8008288: 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)))); 800828a: 687b ldr r3, [r7, #4] 800828c: 6919 ldr r1, [r3, #16] 800828e: 68fa ldr r2, [r7, #12] 8008290: 4613 mov r3, r2 8008292: 005b lsls r3, r3, #1 8008294: 4413 add r3, r2 8008296: 00db lsls r3, r3, #3 8008298: 18ca adds r2, r1, r3 800829a: 687b ldr r3, [r7, #4] 800829c: 681b ldr r3, [r3, #0] 800829e: f503 5380 add.w r3, r3, #4096 @ 0x1000 80082a2: f8c3 2128 str.w r2, [r3, #296] @ 0x128 heth->RxDescList.RxBuildDescIdx = descidx; 80082a6: 687b ldr r3, [r7, #4] 80082a8: 69fa ldr r2, [r7, #28] 80082aa: 669a str r2, [r3, #104] @ 0x68 heth->RxDescList.RxBuildDescCnt = desccount; 80082ac: 687b ldr r3, [r7, #4] 80082ae: 69ba ldr r2, [r7, #24] 80082b0: 66da str r2, [r3, #108] @ 0x6c } } 80082b2: bf00 nop 80082b4: 3720 adds r7, #32 80082b6: 46bd mov sp, r7 80082b8: bd80 pop {r7, pc} 080082ba : * @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) { 80082ba: b580 push {r7, lr} 80082bc: b086 sub sp, #24 80082be: af00 add r7, sp, #0 80082c0: 6078 str r0, [r7, #4] ETH_TxDescListTypeDef *dmatxdesclist = &heth->TxDescList; 80082c2: 687b ldr r3, [r7, #4] 80082c4: 3318 adds r3, #24 80082c6: 60bb str r3, [r7, #8] uint32_t numOfBuf = dmatxdesclist->BuffersInUse; 80082c8: 68bb ldr r3, [r7, #8] 80082ca: 6a9b ldr r3, [r3, #40] @ 0x28 80082cc: 617b str r3, [r7, #20] uint32_t idx = dmatxdesclist->releaseIndex; 80082ce: 68bb ldr r3, [r7, #8] 80082d0: 6adb ldr r3, [r3, #44] @ 0x2c 80082d2: 613b str r3, [r7, #16] uint8_t pktTxStatus = 1U; 80082d4: 2301 movs r3, #1 80082d6: 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)) 80082d8: e047 b.n 800836a { pktInUse = 1U; 80082da: 2301 movs r3, #1 80082dc: 73bb strb r3, [r7, #14] numOfBuf--; 80082de: 697b ldr r3, [r7, #20] 80082e0: 3b01 subs r3, #1 80082e2: 617b str r3, [r7, #20] /* If no packet, just examine the next packet. */ if (dmatxdesclist->PacketAddress[idx] == NULL) 80082e4: 68ba ldr r2, [r7, #8] 80082e6: 693b ldr r3, [r7, #16] 80082e8: 3304 adds r3, #4 80082ea: 009b lsls r3, r3, #2 80082ec: 4413 add r3, r2 80082ee: 685b ldr r3, [r3, #4] 80082f0: 2b00 cmp r3, #0 80082f2: d10a bne.n 800830a { /* No packet in use, skip to next. */ INCR_TX_DESC_INDEX(idx, 1U); 80082f4: 693b ldr r3, [r7, #16] 80082f6: 3301 adds r3, #1 80082f8: 613b str r3, [r7, #16] 80082fa: 693b ldr r3, [r7, #16] 80082fc: 2b03 cmp r3, #3 80082fe: d902 bls.n 8008306 8008300: 693b ldr r3, [r7, #16] 8008302: 3b04 subs r3, #4 8008304: 613b str r3, [r7, #16] pktInUse = 0U; 8008306: 2300 movs r3, #0 8008308: 73bb strb r3, [r7, #14] } if (pktInUse != 0U) 800830a: 7bbb ldrb r3, [r7, #14] 800830c: 2b00 cmp r3, #0 800830e: d02c beq.n 800836a { /* Determine if the packet has been transmitted. */ if ((heth->Init.TxDesc[idx].DESC3 & ETH_DMATXNDESCRF_OWN) == 0U) 8008310: 687b ldr r3, [r7, #4] 8008312: 68d9 ldr r1, [r3, #12] 8008314: 693a ldr r2, [r7, #16] 8008316: 4613 mov r3, r2 8008318: 005b lsls r3, r3, #1 800831a: 4413 add r3, r2 800831c: 00db lsls r3, r3, #3 800831e: 440b add r3, r1 8008320: 68db ldr r3, [r3, #12] 8008322: 2b00 cmp r3, #0 8008324: db1f blt.n 8008366 { HAL_ETH_TxPtpCallback(dmatxdesclist->PacketAddress[idx], timestamp); } #endif /* HAL_ETH_USE_PTP */ /* Release the packet. */ HAL_ETH_TxFreeCallback(dmatxdesclist->PacketAddress[idx]); 8008326: 68ba ldr r2, [r7, #8] 8008328: 693b ldr r3, [r7, #16] 800832a: 3304 adds r3, #4 800832c: 009b lsls r3, r3, #2 800832e: 4413 add r3, r2 8008330: 685b ldr r3, [r3, #4] 8008332: 4618 mov r0, r3 8008334: f008 f8d2 bl 80104dc #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ /* Clear the entry in the in-use array. */ dmatxdesclist->PacketAddress[idx] = NULL; 8008338: 68ba ldr r2, [r7, #8] 800833a: 693b ldr r3, [r7, #16] 800833c: 3304 adds r3, #4 800833e: 009b lsls r3, r3, #2 8008340: 4413 add r3, r2 8008342: 2200 movs r2, #0 8008344: 605a str r2, [r3, #4] /* Update the transmit relesae index and number of buffers in use. */ INCR_TX_DESC_INDEX(idx, 1U); 8008346: 693b ldr r3, [r7, #16] 8008348: 3301 adds r3, #1 800834a: 613b str r3, [r7, #16] 800834c: 693b ldr r3, [r7, #16] 800834e: 2b03 cmp r3, #3 8008350: d902 bls.n 8008358 8008352: 693b ldr r3, [r7, #16] 8008354: 3b04 subs r3, #4 8008356: 613b str r3, [r7, #16] dmatxdesclist->BuffersInUse = numOfBuf; 8008358: 68bb ldr r3, [r7, #8] 800835a: 697a ldr r2, [r7, #20] 800835c: 629a str r2, [r3, #40] @ 0x28 dmatxdesclist->releaseIndex = idx; 800835e: 68bb ldr r3, [r7, #8] 8008360: 693a ldr r2, [r7, #16] 8008362: 62da str r2, [r3, #44] @ 0x2c 8008364: e001 b.n 800836a } else { /* Get out of the loop! */ pktTxStatus = 0U; 8008366: 2300 movs r3, #0 8008368: 73fb strb r3, [r7, #15] while ((numOfBuf != 0U) && (pktTxStatus != 0U)) 800836a: 697b ldr r3, [r7, #20] 800836c: 2b00 cmp r3, #0 800836e: d002 beq.n 8008376 8008370: 7bfb ldrb r3, [r7, #15] 8008372: 2b00 cmp r3, #0 8008374: d1b1 bne.n 80082da } } } return HAL_OK; 8008376: 2300 movs r3, #0 } 8008378: 4618 mov r0, r3 800837a: 3718 adds r7, #24 800837c: 46bd mov sp, r7 800837e: bd80 pop {r7, pc} 08008380 : * @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) { 8008380: b580 push {r7, lr} 8008382: b086 sub sp, #24 8008384: af00 add r7, sp, #0 8008386: 6078 str r0, [r7, #4] uint32_t mac_flag = READ_REG(heth->Instance->MACISR); 8008388: 687b ldr r3, [r7, #4] 800838a: 681b ldr r3, [r3, #0] 800838c: f8d3 30b0 ldr.w r3, [r3, #176] @ 0xb0 8008390: 617b str r3, [r7, #20] uint32_t dma_flag = READ_REG(heth->Instance->DMACSR); 8008392: 687b ldr r3, [r7, #4] 8008394: 681b ldr r3, [r3, #0] 8008396: f503 5380 add.w r3, r3, #4096 @ 0x1000 800839a: f8d3 3160 ldr.w r3, [r3, #352] @ 0x160 800839e: 613b str r3, [r7, #16] uint32_t dma_itsource = READ_REG(heth->Instance->DMACIER); 80083a0: 687b ldr r3, [r7, #4] 80083a2: 681b ldr r3, [r3, #0] 80083a4: f503 5380 add.w r3, r3, #4096 @ 0x1000 80083a8: f8d3 3134 ldr.w r3, [r3, #308] @ 0x134 80083ac: 60fb str r3, [r7, #12] uint32_t exti_d1_flag = READ_REG(EXTI_D1->PR3); 80083ae: 4b6d ldr r3, [pc, #436] @ (8008564 ) 80083b0: 6a9b ldr r3, [r3, #40] @ 0x28 80083b2: 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)) 80083b4: 693b ldr r3, [r7, #16] 80083b6: f003 0340 and.w r3, r3, #64 @ 0x40 80083ba: 2b00 cmp r3, #0 80083bc: d010 beq.n 80083e0 80083be: 68fb ldr r3, [r7, #12] 80083c0: f003 0340 and.w r3, r3, #64 @ 0x40 80083c4: 2b00 cmp r3, #0 80083c6: d00b beq.n 80083e0 { /* Clear the Eth DMA Rx IT pending bits */ __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMACSR_RI | ETH_DMACSR_NIS); 80083c8: 687b ldr r3, [r7, #4] 80083ca: 681b ldr r3, [r3, #0] 80083cc: f503 5380 add.w r3, r3, #4096 @ 0x1000 80083d0: 461a mov r2, r3 80083d2: f248 0340 movw r3, #32832 @ 0x8040 80083d6: 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); 80083da: 6878 ldr r0, [r7, #4] 80083dc: f007 fb6e bl 800fabc #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } /* Packet transmitted */ if (((dma_flag & ETH_DMACSR_TI) != 0U) && ((dma_itsource & ETH_DMACIER_TIE) != 0U)) 80083e0: 693b ldr r3, [r7, #16] 80083e2: f003 0301 and.w r3, r3, #1 80083e6: 2b00 cmp r3, #0 80083e8: d010 beq.n 800840c 80083ea: 68fb ldr r3, [r7, #12] 80083ec: f003 0301 and.w r3, r3, #1 80083f0: 2b00 cmp r3, #0 80083f2: d00b beq.n 800840c { /* Clear the Eth DMA Tx IT pending bits */ __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMACSR_TI | ETH_DMACSR_NIS); 80083f4: 687b ldr r3, [r7, #4] 80083f6: 681b ldr r3, [r3, #0] 80083f8: f503 5380 add.w r3, r3, #4096 @ 0x1000 80083fc: 461a mov r2, r3 80083fe: f248 0301 movw r3, #32769 @ 0x8001 8008402: 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); 8008406: 6878 ldr r0, [r7, #4] 8008408: f007 fb68 bl 800fadc #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } /* ETH DMA Error */ if (((dma_flag & ETH_DMACSR_AIS) != 0U) && ((dma_itsource & ETH_DMACIER_AIE) != 0U)) 800840c: 693b ldr r3, [r7, #16] 800840e: f403 4380 and.w r3, r3, #16384 @ 0x4000 8008412: 2b00 cmp r3, #0 8008414: d047 beq.n 80084a6 8008416: 68fb ldr r3, [r7, #12] 8008418: f403 4380 and.w r3, r3, #16384 @ 0x4000 800841c: 2b00 cmp r3, #0 800841e: d042 beq.n 80084a6 { heth->ErrorCode |= HAL_ETH_ERROR_DMA; 8008420: 687b ldr r3, [r7, #4] 8008422: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 8008426: f043 0208 orr.w r2, r3, #8 800842a: 687b ldr r3, [r7, #4] 800842c: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* if fatal bus error occurred */ if ((dma_flag & ETH_DMACSR_FBE) != 0U) 8008430: 693b ldr r3, [r7, #16] 8008432: f403 5380 and.w r3, r3, #4096 @ 0x1000 8008436: 2b00 cmp r3, #0 8008438: d01e beq.n 8008478 { /* Get DMA error code */ heth->DMAErrorCode = READ_BIT(heth->Instance->DMACSR, (ETH_DMACSR_FBE | ETH_DMACSR_TPS | ETH_DMACSR_RPS)); 800843a: 687b ldr r3, [r7, #4] 800843c: 681b ldr r3, [r3, #0] 800843e: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008442: f8d3 2160 ldr.w r2, [r3, #352] @ 0x160 8008446: f241 1302 movw r3, #4354 @ 0x1102 800844a: 4013 ands r3, r2 800844c: 687a ldr r2, [r7, #4] 800844e: f8c2 308c str.w r3, [r2, #140] @ 0x8c /* Disable all interrupts */ __HAL_ETH_DMA_DISABLE_IT(heth, ETH_DMACIER_NIE | ETH_DMACIER_AIE); 8008452: 687b ldr r3, [r7, #4] 8008454: 681b ldr r3, [r3, #0] 8008456: f503 5380 add.w r3, r3, #4096 @ 0x1000 800845a: f8d3 3134 ldr.w r3, [r3, #308] @ 0x134 800845e: 687a ldr r2, [r7, #4] 8008460: 6812 ldr r2, [r2, #0] 8008462: f423 4340 bic.w r3, r3, #49152 @ 0xc000 8008466: f502 5280 add.w r2, r2, #4096 @ 0x1000 800846a: f8c2 3134 str.w r3, [r2, #308] @ 0x134 /* Set HAL state to ERROR */ heth->gState = HAL_ETH_STATE_ERROR; 800846e: 687b ldr r3, [r7, #4] 8008470: 22e0 movs r2, #224 @ 0xe0 8008472: f8c3 2084 str.w r2, [r3, #132] @ 0x84 8008476: e013 b.n 80084a0 } else { /* Get DMA error status */ heth->DMAErrorCode = READ_BIT(heth->Instance->DMACSR, (ETH_DMACSR_CDE | ETH_DMACSR_ETI | ETH_DMACSR_RWT | 8008478: 687b ldr r3, [r7, #4] 800847a: 681b ldr r3, [r3, #0] 800847c: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008480: f8d3 3160 ldr.w r3, [r3, #352] @ 0x160 8008484: f403 42cd and.w r2, r3, #26240 @ 0x6680 8008488: 687b ldr r3, [r7, #4] 800848a: 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 | 800848e: 687b ldr r3, [r7, #4] 8008490: 681b ldr r3, [r3, #0] 8008492: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008496: 461a mov r2, r3 8008498: f44f 43cd mov.w r3, #26240 @ 0x6680 800849c: 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); 80084a0: 6878 ldr r0, [r7, #4] 80084a2: f007 fb2b bl 800fafc #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } /* ETH MAC Error IT */ if (((mac_flag & ETH_MACIER_RXSTSIE) == ETH_MACIER_RXSTSIE) || \ 80084a6: 697b ldr r3, [r7, #20] 80084a8: f403 4380 and.w r3, r3, #16384 @ 0x4000 80084ac: 2b00 cmp r3, #0 80084ae: d104 bne.n 80084ba ((mac_flag & ETH_MACIER_TXSTSIE) == ETH_MACIER_TXSTSIE)) 80084b0: 697b ldr r3, [r7, #20] 80084b2: f403 5300 and.w r3, r3, #8192 @ 0x2000 if (((mac_flag & ETH_MACIER_RXSTSIE) == ETH_MACIER_RXSTSIE) || \ 80084b6: 2b00 cmp r3, #0 80084b8: d019 beq.n 80084ee { heth->ErrorCode |= HAL_ETH_ERROR_MAC; 80084ba: 687b ldr r3, [r7, #4] 80084bc: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 80084c0: f043 0210 orr.w r2, r3, #16 80084c4: 687b ldr r3, [r7, #4] 80084c6: 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); 80084ca: 687b ldr r3, [r7, #4] 80084cc: 681b ldr r3, [r3, #0] 80084ce: f8d3 20b8 ldr.w r2, [r3, #184] @ 0xb8 80084d2: 687b ldr r3, [r7, #4] 80084d4: f8c3 2090 str.w r2, [r3, #144] @ 0x90 heth->gState = HAL_ETH_STATE_ERROR; 80084d8: 687b ldr r3, [r7, #4] 80084da: 22e0 movs r2, #224 @ 0xe0 80084dc: 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); 80084e0: 6878 ldr r0, [r7, #4] 80084e2: f007 fb0b bl 800fafc #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->MACErrorCode = (uint32_t)(0x0U); 80084e6: 687b ldr r3, [r7, #4] 80084e8: 2200 movs r2, #0 80084ea: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* ETH PMT IT */ if ((mac_flag & ETH_MAC_PMT_IT) != 0U) 80084ee: 697b ldr r3, [r7, #20] 80084f0: f003 0310 and.w r3, r3, #16 80084f4: 2b00 cmp r3, #0 80084f6: d00f beq.n 8008518 { /* 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)); 80084f8: 687b ldr r3, [r7, #4] 80084fa: 681b ldr r3, [r3, #0] 80084fc: f8d3 30c0 ldr.w r3, [r3, #192] @ 0xc0 8008500: f003 0260 and.w r2, r3, #96 @ 0x60 8008504: 687b ldr r3, [r7, #4] 8008506: 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); 800850a: 6878 ldr r0, [r7, #4] 800850c: f000 f82c bl 8008568 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->MACWakeUpEvent = (uint32_t)(0x0U); 8008510: 687b ldr r3, [r7, #4] 8008512: 2200 movs r2, #0 8008514: f8c3 2094 str.w r2, [r3, #148] @ 0x94 } /* ETH EEE IT */ if ((mac_flag & ETH_MAC_LPI_IT) != 0U) 8008518: 697b ldr r3, [r7, #20] 800851a: f003 0320 and.w r3, r3, #32 800851e: 2b00 cmp r3, #0 8008520: d00f beq.n 8008542 { /* Get MAC LPI interrupt source and clear the status register pending bit */ heth->MACLPIEvent = READ_BIT(heth->Instance->MACLCSR, 0x0000000FU); 8008522: 687b ldr r3, [r7, #4] 8008524: 681b ldr r3, [r3, #0] 8008526: f8d3 30d0 ldr.w r3, [r3, #208] @ 0xd0 800852a: f003 020f and.w r2, r3, #15 800852e: 687b ldr r3, [r7, #4] 8008530: 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); 8008534: 6878 ldr r0, [r7, #4] 8008536: f000 f821 bl 800857c #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->MACLPIEvent = (uint32_t)(0x0U); 800853a: 687b ldr r3, [r7, #4] 800853c: 2200 movs r2, #0 800853e: 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) 8008542: 68bb ldr r3, [r7, #8] 8008544: f403 0380 and.w r3, r3, #4194304 @ 0x400000 8008548: 2b00 cmp r3, #0 800854a: d006 beq.n 800855a { /* Clear ETH WAKEUP Exti pending bit */ __HAL_ETH_WAKEUP_EXTI_CLEAR_FLAG(ETH_WAKEUP_EXTI_LINE); 800854c: 4b05 ldr r3, [pc, #20] @ (8008564 ) 800854e: f44f 0280 mov.w r2, #4194304 @ 0x400000 8008552: 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); 8008554: 6878 ldr r0, [r7, #4] 8008556: f000 f81b bl 8008590 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } #endif /* DUAL_CORE */ } 800855a: bf00 nop 800855c: 3718 adds r7, #24 800855e: 46bd mov sp, r7 8008560: bd80 pop {r7, pc} 8008562: bf00 nop 8008564: 58000080 .word 0x58000080 08008568 : * @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) { 8008568: b480 push {r7} 800856a: b083 sub sp, #12 800856c: af00 add r7, sp, #0 800856e: 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 */ } 8008570: bf00 nop 8008572: 370c adds r7, #12 8008574: 46bd mov sp, r7 8008576: f85d 7b04 ldr.w r7, [sp], #4 800857a: 4770 bx lr 0800857c : * @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) { 800857c: b480 push {r7} 800857e: b083 sub sp, #12 8008580: af00 add r7, sp, #0 8008582: 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 */ } 8008584: bf00 nop 8008586: 370c adds r7, #12 8008588: 46bd mov sp, r7 800858a: f85d 7b04 ldr.w r7, [sp], #4 800858e: 4770 bx lr 08008590 : * @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) { 8008590: b480 push {r7} 8008592: b083 sub sp, #12 8008594: af00 add r7, sp, #0 8008596: 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 */ } 8008598: bf00 nop 800859a: 370c adds r7, #12 800859c: 46bd mov sp, r7 800859e: f85d 7b04 ldr.w r7, [sp], #4 80085a2: 4770 bx lr 080085a4 : * @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) { 80085a4: b580 push {r7, lr} 80085a6: b086 sub sp, #24 80085a8: af00 add r7, sp, #0 80085aa: 60f8 str r0, [r7, #12] 80085ac: 60b9 str r1, [r7, #8] 80085ae: 607a str r2, [r7, #4] 80085b0: 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) 80085b2: 68fb ldr r3, [r7, #12] 80085b4: 681b ldr r3, [r3, #0] 80085b6: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 80085ba: f003 0301 and.w r3, r3, #1 80085be: 2b00 cmp r3, #0 80085c0: d001 beq.n 80085c6 { return HAL_ERROR; 80085c2: 2301 movs r3, #1 80085c4: e03e b.n 8008644 } /* Get the MACMDIOAR value */ WRITE_REG(tmpreg, heth->Instance->MACMDIOAR); 80085c6: 68fb ldr r3, [r7, #12] 80085c8: 681b ldr r3, [r3, #0] 80085ca: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 80085ce: 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)); 80085d0: 697b ldr r3, [r7, #20] 80085d2: f023 7278 bic.w r2, r3, #65011712 @ 0x3e00000 80085d6: 68bb ldr r3, [r7, #8] 80085d8: 055b lsls r3, r3, #21 80085da: 4313 orrs r3, r2 80085dc: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_RDA, (PHYReg << 16)); 80085de: 697b ldr r3, [r7, #20] 80085e0: f423 12f8 bic.w r2, r3, #2031616 @ 0x1f0000 80085e4: 687b ldr r3, [r7, #4] 80085e6: 041b lsls r3, r3, #16 80085e8: 4313 orrs r3, r2 80085ea: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_MOC, ETH_MACMDIOAR_MOC_RD); 80085ec: 697b ldr r3, [r7, #20] 80085ee: f043 030c orr.w r3, r3, #12 80085f2: 617b str r3, [r7, #20] SET_BIT(tmpreg, ETH_MACMDIOAR_MB); 80085f4: 697b ldr r3, [r7, #20] 80085f6: f043 0301 orr.w r3, r3, #1 80085fa: 617b str r3, [r7, #20] /* Write the result value into the MDII Address register */ WRITE_REG(heth->Instance->MACMDIOAR, tmpreg); 80085fc: 68fb ldr r3, [r7, #12] 80085fe: 681b ldr r3, [r3, #0] 8008600: 697a ldr r2, [r7, #20] 8008602: f8c3 2200 str.w r2, [r3, #512] @ 0x200 tickstart = HAL_GetTick(); 8008606: f7fc fd13 bl 8005030 800860a: 6138 str r0, [r7, #16] /* Wait for the Busy flag */ while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 800860c: e009 b.n 8008622 { if (((HAL_GetTick() - tickstart) > ETH_MDIO_BUS_TIMEOUT)) 800860e: f7fc fd0f bl 8005030 8008612: 4602 mov r2, r0 8008614: 693b ldr r3, [r7, #16] 8008616: 1ad3 subs r3, r2, r3 8008618: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8 800861c: d901 bls.n 8008622 { return HAL_ERROR; 800861e: 2301 movs r3, #1 8008620: e010 b.n 8008644 while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 8008622: 68fb ldr r3, [r7, #12] 8008624: 681b ldr r3, [r3, #0] 8008626: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 800862a: f003 0301 and.w r3, r3, #1 800862e: 2b00 cmp r3, #0 8008630: d1ed bne.n 800860e } } /* Get MACMIIDR value */ WRITE_REG(*pRegValue, (uint16_t)heth->Instance->MACMDIODR); 8008632: 68fb ldr r3, [r7, #12] 8008634: 681b ldr r3, [r3, #0] 8008636: f8d3 3204 ldr.w r3, [r3, #516] @ 0x204 800863a: b29b uxth r3, r3 800863c: 461a mov r2, r3 800863e: 683b ldr r3, [r7, #0] 8008640: 601a str r2, [r3, #0] return HAL_OK; 8008642: 2300 movs r3, #0 } 8008644: 4618 mov r0, r3 8008646: 3718 adds r7, #24 8008648: 46bd mov sp, r7 800864a: bd80 pop {r7, pc} 0800864c : * @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) { 800864c: b580 push {r7, lr} 800864e: b086 sub sp, #24 8008650: af00 add r7, sp, #0 8008652: 60f8 str r0, [r7, #12] 8008654: 60b9 str r1, [r7, #8] 8008656: 607a str r2, [r7, #4] 8008658: 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) 800865a: 68fb ldr r3, [r7, #12] 800865c: 681b ldr r3, [r3, #0] 800865e: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8008662: f003 0301 and.w r3, r3, #1 8008666: 2b00 cmp r3, #0 8008668: d001 beq.n 800866e { return HAL_ERROR; 800866a: 2301 movs r3, #1 800866c: e03c b.n 80086e8 } /* Get the MACMDIOAR value */ WRITE_REG(tmpreg, heth->Instance->MACMDIOAR); 800866e: 68fb ldr r3, [r7, #12] 8008670: 681b ldr r3, [r3, #0] 8008672: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8008676: 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)); 8008678: 697b ldr r3, [r7, #20] 800867a: f023 7278 bic.w r2, r3, #65011712 @ 0x3e00000 800867e: 68bb ldr r3, [r7, #8] 8008680: 055b lsls r3, r3, #21 8008682: 4313 orrs r3, r2 8008684: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_RDA, (PHYReg << 16)); 8008686: 697b ldr r3, [r7, #20] 8008688: f423 12f8 bic.w r2, r3, #2031616 @ 0x1f0000 800868c: 687b ldr r3, [r7, #4] 800868e: 041b lsls r3, r3, #16 8008690: 4313 orrs r3, r2 8008692: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_MOC, ETH_MACMDIOAR_MOC_WR); 8008694: 697b ldr r3, [r7, #20] 8008696: f023 030c bic.w r3, r3, #12 800869a: f043 0304 orr.w r3, r3, #4 800869e: 617b str r3, [r7, #20] SET_BIT(tmpreg, ETH_MACMDIOAR_MB); 80086a0: 697b ldr r3, [r7, #20] 80086a2: f043 0301 orr.w r3, r3, #1 80086a6: 617b str r3, [r7, #20] /* Give the value to the MII data register */ WRITE_REG(ETH->MACMDIODR, (uint16_t)RegValue); 80086a8: 683b ldr r3, [r7, #0] 80086aa: b29a uxth r2, r3 80086ac: 4b10 ldr r3, [pc, #64] @ (80086f0 ) 80086ae: f8c3 2204 str.w r2, [r3, #516] @ 0x204 /* Write the result value into the MII Address register */ WRITE_REG(ETH->MACMDIOAR, tmpreg); 80086b2: 4a0f ldr r2, [pc, #60] @ (80086f0 ) 80086b4: 697b ldr r3, [r7, #20] 80086b6: f8c2 3200 str.w r3, [r2, #512] @ 0x200 tickstart = HAL_GetTick(); 80086ba: f7fc fcb9 bl 8005030 80086be: 6138 str r0, [r7, #16] /* Wait for the Busy flag */ while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 80086c0: e009 b.n 80086d6 { if (((HAL_GetTick() - tickstart) > ETH_MDIO_BUS_TIMEOUT)) 80086c2: f7fc fcb5 bl 8005030 80086c6: 4602 mov r2, r0 80086c8: 693b ldr r3, [r7, #16] 80086ca: 1ad3 subs r3, r2, r3 80086cc: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8 80086d0: d901 bls.n 80086d6 { return HAL_ERROR; 80086d2: 2301 movs r3, #1 80086d4: e008 b.n 80086e8 while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 80086d6: 68fb ldr r3, [r7, #12] 80086d8: 681b ldr r3, [r3, #0] 80086da: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 80086de: f003 0301 and.w r3, r3, #1 80086e2: 2b00 cmp r3, #0 80086e4: d1ed bne.n 80086c2 } } return HAL_OK; 80086e6: 2300 movs r3, #0 } 80086e8: 4618 mov r0, r3 80086ea: 3718 adds r7, #24 80086ec: 46bd mov sp, r7 80086ee: bd80 pop {r7, pc} 80086f0: 40028000 .word 0x40028000 080086f4 : * @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) { 80086f4: b480 push {r7} 80086f6: b083 sub sp, #12 80086f8: af00 add r7, sp, #0 80086fa: 6078 str r0, [r7, #4] 80086fc: 6039 str r1, [r7, #0] if (macconf == NULL) 80086fe: 683b ldr r3, [r7, #0] 8008700: 2b00 cmp r3, #0 8008702: d101 bne.n 8008708 { return HAL_ERROR; 8008704: 2301 movs r3, #1 8008706: e1c3 b.n 8008a90 } /* Get MAC parameters */ macconf->PreambleLength = READ_BIT(heth->Instance->MACCR, ETH_MACCR_PRELEN); 8008708: 687b ldr r3, [r7, #4] 800870a: 681b ldr r3, [r3, #0] 800870c: 681b ldr r3, [r3, #0] 800870e: f003 020c and.w r2, r3, #12 8008712: 683b ldr r3, [r7, #0] 8008714: 62da str r2, [r3, #44] @ 0x2c macconf->DeferralCheck = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DC) >> 4) > 0U) ? ENABLE : DISABLE; 8008716: 687b ldr r3, [r7, #4] 8008718: 681b ldr r3, [r3, #0] 800871a: 681b ldr r3, [r3, #0] 800871c: f003 0310 and.w r3, r3, #16 8008720: 2b00 cmp r3, #0 8008722: bf14 ite ne 8008724: 2301 movne r3, #1 8008726: 2300 moveq r3, #0 8008728: b2db uxtb r3, r3 800872a: 461a mov r2, r3 800872c: 683b ldr r3, [r7, #0] 800872e: f883 2028 strb.w r2, [r3, #40] @ 0x28 macconf->BackOffLimit = READ_BIT(heth->Instance->MACCR, ETH_MACCR_BL); 8008732: 687b ldr r3, [r7, #4] 8008734: 681b ldr r3, [r3, #0] 8008736: 681b ldr r3, [r3, #0] 8008738: f003 0260 and.w r2, r3, #96 @ 0x60 800873c: 683b ldr r3, [r7, #0] 800873e: 625a str r2, [r3, #36] @ 0x24 macconf->RetryTransmission = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DR) >> 8) == 0U) ? ENABLE : DISABLE; 8008740: 687b ldr r3, [r7, #4] 8008742: 681b ldr r3, [r3, #0] 8008744: 681b ldr r3, [r3, #0] 8008746: f403 7380 and.w r3, r3, #256 @ 0x100 800874a: 2b00 cmp r3, #0 800874c: bf0c ite eq 800874e: 2301 moveq r3, #1 8008750: 2300 movne r3, #0 8008752: b2db uxtb r3, r3 8008754: 461a mov r2, r3 8008756: 683b ldr r3, [r7, #0] 8008758: f883 2020 strb.w r2, [r3, #32] macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DCRS) >> 9) > 0U) 800875c: 687b ldr r3, [r7, #4] 800875e: 681b ldr r3, [r3, #0] 8008760: 681b ldr r3, [r3, #0] 8008762: f403 7300 and.w r3, r3, #512 @ 0x200 ? ENABLE : DISABLE; 8008766: 2b00 cmp r3, #0 8008768: bf14 ite ne 800876a: 2301 movne r3, #1 800876c: 2300 moveq r3, #0 800876e: b2db uxtb r3, r3 8008770: 461a mov r2, r3 macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DCRS) >> 9) > 0U) 8008772: 683b ldr r3, [r7, #0] 8008774: 77da strb r2, [r3, #31] macconf->ReceiveOwn = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DO) >> 10) == 0U) ? ENABLE : DISABLE; 8008776: 687b ldr r3, [r7, #4] 8008778: 681b ldr r3, [r3, #0] 800877a: 681b ldr r3, [r3, #0] 800877c: f403 6380 and.w r3, r3, #1024 @ 0x400 8008780: 2b00 cmp r3, #0 8008782: bf0c ite eq 8008784: 2301 moveq r3, #1 8008786: 2300 movne r3, #0 8008788: b2db uxtb r3, r3 800878a: 461a mov r2, r3 800878c: 683b ldr r3, [r7, #0] 800878e: 779a strb r2, [r3, #30] macconf->CarrierSenseBeforeTransmit = ((READ_BIT(heth->Instance->MACCR, 8008790: 687b ldr r3, [r7, #4] 8008792: 681b ldr r3, [r3, #0] 8008794: 681b ldr r3, [r3, #0] ETH_MACCR_ECRSFD) >> 11) > 0U) ? ENABLE : DISABLE; 8008796: f403 6300 and.w r3, r3, #2048 @ 0x800 800879a: 2b00 cmp r3, #0 800879c: bf14 ite ne 800879e: 2301 movne r3, #1 80087a0: 2300 moveq r3, #0 80087a2: b2db uxtb r3, r3 80087a4: 461a mov r2, r3 macconf->CarrierSenseBeforeTransmit = ((READ_BIT(heth->Instance->MACCR, 80087a6: 683b ldr r3, [r7, #0] 80087a8: 775a strb r2, [r3, #29] macconf->LoopbackMode = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_LM) >> 12) > 0U) ? ENABLE : DISABLE; 80087aa: 687b ldr r3, [r7, #4] 80087ac: 681b ldr r3, [r3, #0] 80087ae: 681b ldr r3, [r3, #0] 80087b0: f403 5380 and.w r3, r3, #4096 @ 0x1000 80087b4: 2b00 cmp r3, #0 80087b6: bf14 ite ne 80087b8: 2301 movne r3, #1 80087ba: 2300 moveq r3, #0 80087bc: b2db uxtb r3, r3 80087be: 461a mov r2, r3 80087c0: 683b ldr r3, [r7, #0] 80087c2: 771a strb r2, [r3, #28] macconf->DuplexMode = READ_BIT(heth->Instance->MACCR, ETH_MACCR_DM); 80087c4: 687b ldr r3, [r7, #4] 80087c6: 681b ldr r3, [r3, #0] 80087c8: 681b ldr r3, [r3, #0] 80087ca: f403 5200 and.w r2, r3, #8192 @ 0x2000 80087ce: 683b ldr r3, [r7, #0] 80087d0: 619a str r2, [r3, #24] macconf->Speed = READ_BIT(heth->Instance->MACCR, ETH_MACCR_FES); 80087d2: 687b ldr r3, [r7, #4] 80087d4: 681b ldr r3, [r3, #0] 80087d6: 681b ldr r3, [r3, #0] 80087d8: f403 4280 and.w r2, r3, #16384 @ 0x4000 80087dc: 683b ldr r3, [r7, #0] 80087de: 615a str r2, [r3, #20] macconf->JumboPacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JE) >> 16) > 0U) ? ENABLE : DISABLE; 80087e0: 687b ldr r3, [r7, #4] 80087e2: 681b ldr r3, [r3, #0] 80087e4: 681b ldr r3, [r3, #0] 80087e6: f403 3380 and.w r3, r3, #65536 @ 0x10000 80087ea: 2b00 cmp r3, #0 80087ec: bf14 ite ne 80087ee: 2301 movne r3, #1 80087f0: 2300 moveq r3, #0 80087f2: b2db uxtb r3, r3 80087f4: 461a mov r2, r3 80087f6: 683b ldr r3, [r7, #0] 80087f8: 749a strb r2, [r3, #18] macconf->Jabber = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JD) >> 17) == 0U) ? ENABLE : DISABLE; 80087fa: 687b ldr r3, [r7, #4] 80087fc: 681b ldr r3, [r3, #0] 80087fe: 681b ldr r3, [r3, #0] 8008800: f403 3300 and.w r3, r3, #131072 @ 0x20000 8008804: 2b00 cmp r3, #0 8008806: bf0c ite eq 8008808: 2301 moveq r3, #1 800880a: 2300 movne r3, #0 800880c: b2db uxtb r3, r3 800880e: 461a mov r2, r3 8008810: 683b ldr r3, [r7, #0] 8008812: 745a strb r2, [r3, #17] macconf->Watchdog = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_WD) >> 19) == 0U) ? ENABLE : DISABLE; 8008814: 687b ldr r3, [r7, #4] 8008816: 681b ldr r3, [r3, #0] 8008818: 681b ldr r3, [r3, #0] 800881a: f403 2300 and.w r3, r3, #524288 @ 0x80000 800881e: 2b00 cmp r3, #0 8008820: bf0c ite eq 8008822: 2301 moveq r3, #1 8008824: 2300 movne r3, #0 8008826: b2db uxtb r3, r3 8008828: 461a mov r2, r3 800882a: 683b ldr r3, [r7, #0] 800882c: 741a strb r2, [r3, #16] macconf->AutomaticPadCRCStrip = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_ACS) >> 20) > 0U) ? ENABLE : DISABLE; 800882e: 687b ldr r3, [r7, #4] 8008830: 681b ldr r3, [r3, #0] 8008832: 681b ldr r3, [r3, #0] 8008834: f403 1380 and.w r3, r3, #1048576 @ 0x100000 8008838: 2b00 cmp r3, #0 800883a: bf14 ite ne 800883c: 2301 movne r3, #1 800883e: 2300 moveq r3, #0 8008840: b2db uxtb r3, r3 8008842: 461a mov r2, r3 8008844: 683b ldr r3, [r7, #0] 8008846: 73da strb r2, [r3, #15] macconf->CRCStripTypePacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_CST) >> 21) > 0U) ? ENABLE : DISABLE; 8008848: 687b ldr r3, [r7, #4] 800884a: 681b ldr r3, [r3, #0] 800884c: 681b ldr r3, [r3, #0] 800884e: f403 1300 and.w r3, r3, #2097152 @ 0x200000 8008852: 2b00 cmp r3, #0 8008854: bf14 ite ne 8008856: 2301 movne r3, #1 8008858: 2300 moveq r3, #0 800885a: b2db uxtb r3, r3 800885c: 461a mov r2, r3 800885e: 683b ldr r3, [r7, #0] 8008860: 739a strb r2, [r3, #14] macconf->Support2KPacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_S2KP) >> 22) > 0U) ? ENABLE : DISABLE; 8008862: 687b ldr r3, [r7, #4] 8008864: 681b ldr r3, [r3, #0] 8008866: 681b ldr r3, [r3, #0] 8008868: f403 0380 and.w r3, r3, #4194304 @ 0x400000 800886c: 2b00 cmp r3, #0 800886e: bf14 ite ne 8008870: 2301 movne r3, #1 8008872: 2300 moveq r3, #0 8008874: b2db uxtb r3, r3 8008876: 461a mov r2, r3 8008878: 683b ldr r3, [r7, #0] 800887a: 735a strb r2, [r3, #13] macconf->GiantPacketSizeLimitControl = ((READ_BIT(heth->Instance->MACCR, 800887c: 687b ldr r3, [r7, #4] 800887e: 681b ldr r3, [r3, #0] 8008880: 681b ldr r3, [r3, #0] ETH_MACCR_GPSLCE) >> 23) > 0U) ? ENABLE : DISABLE; 8008882: f403 0300 and.w r3, r3, #8388608 @ 0x800000 8008886: 2b00 cmp r3, #0 8008888: bf14 ite ne 800888a: 2301 movne r3, #1 800888c: 2300 moveq r3, #0 800888e: b2db uxtb r3, r3 8008890: 461a mov r2, r3 macconf->GiantPacketSizeLimitControl = ((READ_BIT(heth->Instance->MACCR, 8008892: 683b ldr r3, [r7, #0] 8008894: 731a strb r2, [r3, #12] macconf->InterPacketGapVal = READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPG); 8008896: 687b ldr r3, [r7, #4] 8008898: 681b ldr r3, [r3, #0] 800889a: 681b ldr r3, [r3, #0] 800889c: f003 62e0 and.w r2, r3, #117440512 @ 0x7000000 80088a0: 683b ldr r3, [r7, #0] 80088a2: 609a str r2, [r3, #8] macconf->ChecksumOffload = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPC) >> 27) > 0U) ? ENABLE : DISABLE; 80088a4: 687b ldr r3, [r7, #4] 80088a6: 681b ldr r3, [r3, #0] 80088a8: 681b ldr r3, [r3, #0] 80088aa: f003 6300 and.w r3, r3, #134217728 @ 0x8000000 80088ae: 2b00 cmp r3, #0 80088b0: bf14 ite ne 80088b2: 2301 movne r3, #1 80088b4: 2300 moveq r3, #0 80088b6: b2db uxtb r3, r3 80088b8: 461a mov r2, r3 80088ba: 683b ldr r3, [r7, #0] 80088bc: 711a strb r2, [r3, #4] macconf->SourceAddrControl = READ_BIT(heth->Instance->MACCR, ETH_MACCR_SARC); 80088be: 687b ldr r3, [r7, #4] 80088c0: 681b ldr r3, [r3, #0] 80088c2: 681b ldr r3, [r3, #0] 80088c4: f003 42e0 and.w r2, r3, #1879048192 @ 0x70000000 80088c8: 683b ldr r3, [r7, #0] 80088ca: 601a str r2, [r3, #0] macconf->GiantPacketSizeLimit = READ_BIT(heth->Instance->MACECR, ETH_MACECR_GPSL); 80088cc: 687b ldr r3, [r7, #4] 80088ce: 681b ldr r3, [r3, #0] 80088d0: 685b ldr r3, [r3, #4] 80088d2: f3c3 020d ubfx r2, r3, #0, #14 80088d6: 683b ldr r3, [r7, #0] 80088d8: 635a str r2, [r3, #52] @ 0x34 macconf->CRCCheckingRxPackets = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_DCRCC) >> 16) == 0U) ? ENABLE : DISABLE; 80088da: 687b ldr r3, [r7, #4] 80088dc: 681b ldr r3, [r3, #0] 80088de: 685b ldr r3, [r3, #4] 80088e0: f403 3380 and.w r3, r3, #65536 @ 0x10000 80088e4: 2b00 cmp r3, #0 80088e6: bf0c ite eq 80088e8: 2301 moveq r3, #1 80088ea: 2300 movne r3, #0 80088ec: b2db uxtb r3, r3 80088ee: 461a mov r2, r3 80088f0: 683b ldr r3, [r7, #0] 80088f2: f883 2032 strb.w r2, [r3, #50] @ 0x32 macconf->SlowProtocolDetect = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_SPEN) >> 17) > 0U) ? ENABLE : DISABLE; 80088f6: 687b ldr r3, [r7, #4] 80088f8: 681b ldr r3, [r3, #0] 80088fa: 685b ldr r3, [r3, #4] 80088fc: f403 3300 and.w r3, r3, #131072 @ 0x20000 8008900: 2b00 cmp r3, #0 8008902: bf14 ite ne 8008904: 2301 movne r3, #1 8008906: 2300 moveq r3, #0 8008908: b2db uxtb r3, r3 800890a: 461a mov r2, r3 800890c: 683b ldr r3, [r7, #0] 800890e: f883 2031 strb.w r2, [r3, #49] @ 0x31 macconf->UnicastSlowProtocolPacketDetect = ((READ_BIT(heth->Instance->MACECR, 8008912: 687b ldr r3, [r7, #4] 8008914: 681b ldr r3, [r3, #0] 8008916: 685b ldr r3, [r3, #4] ETH_MACECR_USP) >> 18) > 0U) ? ENABLE : DISABLE; 8008918: f403 2380 and.w r3, r3, #262144 @ 0x40000 800891c: 2b00 cmp r3, #0 800891e: bf14 ite ne 8008920: 2301 movne r3, #1 8008922: 2300 moveq r3, #0 8008924: b2db uxtb r3, r3 8008926: 461a mov r2, r3 macconf->UnicastSlowProtocolPacketDetect = ((READ_BIT(heth->Instance->MACECR, 8008928: 683b ldr r3, [r7, #0] 800892a: f883 2030 strb.w r2, [r3, #48] @ 0x30 macconf->ExtendedInterPacketGap = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPGEN) >> 24) > 0U) 800892e: 687b ldr r3, [r7, #4] 8008930: 681b ldr r3, [r3, #0] 8008932: 685b ldr r3, [r3, #4] 8008934: f003 7380 and.w r3, r3, #16777216 @ 0x1000000 ? ENABLE : DISABLE; 8008938: 2b00 cmp r3, #0 800893a: bf14 ite ne 800893c: 2301 movne r3, #1 800893e: 2300 moveq r3, #0 8008940: b2db uxtb r3, r3 8008942: 461a mov r2, r3 macconf->ExtendedInterPacketGap = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPGEN) >> 24) > 0U) 8008944: 683b ldr r3, [r7, #0] 8008946: f883 2038 strb.w r2, [r3, #56] @ 0x38 macconf->ExtendedInterPacketGapVal = READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPG) >> 25; 800894a: 687b ldr r3, [r7, #4] 800894c: 681b ldr r3, [r3, #0] 800894e: 685b ldr r3, [r3, #4] 8008950: 0e5b lsrs r3, r3, #25 8008952: f003 021f and.w r2, r3, #31 8008956: 683b ldr r3, [r7, #0] 8008958: 63da str r2, [r3, #60] @ 0x3c macconf->ProgrammableWatchdog = ((READ_BIT(heth->Instance->MACWTR, ETH_MACWTR_PWE) >> 8) > 0U) ? ENABLE : DISABLE; 800895a: 687b ldr r3, [r7, #4] 800895c: 681b ldr r3, [r3, #0] 800895e: 68db ldr r3, [r3, #12] 8008960: f403 7380 and.w r3, r3, #256 @ 0x100 8008964: 2b00 cmp r3, #0 8008966: bf14 ite ne 8008968: 2301 movne r3, #1 800896a: 2300 moveq r3, #0 800896c: b2db uxtb r3, r3 800896e: 461a mov r2, r3 8008970: 683b ldr r3, [r7, #0] 8008972: f883 2040 strb.w r2, [r3, #64] @ 0x40 macconf->WatchdogTimeout = READ_BIT(heth->Instance->MACWTR, ETH_MACWTR_WTO); 8008976: 687b ldr r3, [r7, #4] 8008978: 681b ldr r3, [r3, #0] 800897a: 68db ldr r3, [r3, #12] 800897c: f003 020f and.w r2, r3, #15 8008980: 683b ldr r3, [r7, #0] 8008982: 645a str r2, [r3, #68] @ 0x44 macconf->TransmitFlowControl = ((READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_TFE) >> 1) > 0U) ? ENABLE : DISABLE; 8008984: 687b ldr r3, [r7, #4] 8008986: 681b ldr r3, [r3, #0] 8008988: 6f1b ldr r3, [r3, #112] @ 0x70 800898a: f003 0302 and.w r3, r3, #2 800898e: 2b00 cmp r3, #0 8008990: bf14 ite ne 8008992: 2301 movne r3, #1 8008994: 2300 moveq r3, #0 8008996: b2db uxtb r3, r3 8008998: 461a mov r2, r3 800899a: 683b ldr r3, [r7, #0] 800899c: f883 2054 strb.w r2, [r3, #84] @ 0x54 macconf->ZeroQuantaPause = ((READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_DZPQ) >> 7) == 0U) ? ENABLE : DISABLE; 80089a0: 687b ldr r3, [r7, #4] 80089a2: 681b ldr r3, [r3, #0] 80089a4: 6f1b ldr r3, [r3, #112] @ 0x70 80089a6: f003 0380 and.w r3, r3, #128 @ 0x80 80089aa: 2b00 cmp r3, #0 80089ac: bf0c ite eq 80089ae: 2301 moveq r3, #1 80089b0: 2300 movne r3, #0 80089b2: b2db uxtb r3, r3 80089b4: 461a mov r2, r3 80089b6: 683b ldr r3, [r7, #0] 80089b8: f883 204c strb.w r2, [r3, #76] @ 0x4c macconf->PauseLowThreshold = READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_PLT); 80089bc: 687b ldr r3, [r7, #4] 80089be: 681b ldr r3, [r3, #0] 80089c0: 6f1b ldr r3, [r3, #112] @ 0x70 80089c2: f003 0270 and.w r2, r3, #112 @ 0x70 80089c6: 683b ldr r3, [r7, #0] 80089c8: 651a str r2, [r3, #80] @ 0x50 macconf->PauseTime = (READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_PT) >> 16); 80089ca: 687b ldr r3, [r7, #4] 80089cc: 681b ldr r3, [r3, #0] 80089ce: 6f1b ldr r3, [r3, #112] @ 0x70 80089d0: 0c1b lsrs r3, r3, #16 80089d2: b29a uxth r2, r3 80089d4: 683b ldr r3, [r7, #0] 80089d6: 649a str r2, [r3, #72] @ 0x48 macconf->ReceiveFlowControl = (READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_RFE) > 0U) ? ENABLE : DISABLE; 80089d8: 687b ldr r3, [r7, #4] 80089da: 681b ldr r3, [r3, #0] 80089dc: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 80089e0: f003 0301 and.w r3, r3, #1 80089e4: 2b00 cmp r3, #0 80089e6: bf14 ite ne 80089e8: 2301 movne r3, #1 80089ea: 2300 moveq r3, #0 80089ec: b2db uxtb r3, r3 80089ee: 461a mov r2, r3 80089f0: 683b ldr r3, [r7, #0] 80089f2: f883 2056 strb.w r2, [r3, #86] @ 0x56 macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_UP) >> 1) > 0U) 80089f6: 687b ldr r3, [r7, #4] 80089f8: 681b ldr r3, [r3, #0] 80089fa: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 80089fe: f003 0302 and.w r3, r3, #2 ? ENABLE : DISABLE; 8008a02: 2b00 cmp r3, #0 8008a04: bf14 ite ne 8008a06: 2301 movne r3, #1 8008a08: 2300 moveq r3, #0 8008a0a: b2db uxtb r3, r3 8008a0c: 461a mov r2, r3 macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_UP) >> 1) > 0U) 8008a0e: 683b ldr r3, [r7, #0] 8008a10: f883 2055 strb.w r2, [r3, #85] @ 0x55 macconf->TransmitQueueMode = READ_BIT(heth->Instance->MTLTQOMR, (ETH_MTLTQOMR_TTC | ETH_MTLTQOMR_TSF)); 8008a14: 687b ldr r3, [r7, #4] 8008a16: 681b ldr r3, [r3, #0] 8008a18: f8d3 3d00 ldr.w r3, [r3, #3328] @ 0xd00 8008a1c: f003 0272 and.w r2, r3, #114 @ 0x72 8008a20: 683b ldr r3, [r7, #0] 8008a22: 659a str r2, [r3, #88] @ 0x58 macconf->ReceiveQueueMode = READ_BIT(heth->Instance->MTLRQOMR, (ETH_MTLRQOMR_RTC | ETH_MTLRQOMR_RSF)); 8008a24: 687b ldr r3, [r7, #4] 8008a26: 681b ldr r3, [r3, #0] 8008a28: f8d3 3d30 ldr.w r3, [r3, #3376] @ 0xd30 8008a2c: f003 0223 and.w r2, r3, #35 @ 0x23 8008a30: 683b ldr r3, [r7, #0] 8008a32: 65da str r2, [r3, #92] @ 0x5c macconf->ForwardRxUndersizedGoodPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 8008a34: 687b ldr r3, [r7, #4] 8008a36: 681b ldr r3, [r3, #0] 8008a38: f8d3 3d30 ldr.w r3, [r3, #3376] @ 0xd30 ETH_MTLRQOMR_FUP) >> 3) > 0U) ? ENABLE : DISABLE; 8008a3c: f003 0308 and.w r3, r3, #8 8008a40: 2b00 cmp r3, #0 8008a42: bf14 ite ne 8008a44: 2301 movne r3, #1 8008a46: 2300 moveq r3, #0 8008a48: b2db uxtb r3, r3 8008a4a: 461a mov r2, r3 macconf->ForwardRxUndersizedGoodPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 8008a4c: 683b ldr r3, [r7, #0] 8008a4e: f883 2062 strb.w r2, [r3, #98] @ 0x62 macconf->ForwardRxErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, ETH_MTLRQOMR_FEP) >> 4) > 0U) ? ENABLE : DISABLE; 8008a52: 687b ldr r3, [r7, #4] 8008a54: 681b ldr r3, [r3, #0] 8008a56: f8d3 3d30 ldr.w r3, [r3, #3376] @ 0xd30 8008a5a: f003 0310 and.w r3, r3, #16 8008a5e: 2b00 cmp r3, #0 8008a60: bf14 ite ne 8008a62: 2301 movne r3, #1 8008a64: 2300 moveq r3, #0 8008a66: b2db uxtb r3, r3 8008a68: 461a mov r2, r3 8008a6a: 683b ldr r3, [r7, #0] 8008a6c: f883 2061 strb.w r2, [r3, #97] @ 0x61 macconf->DropTCPIPChecksumErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 8008a70: 687b ldr r3, [r7, #4] 8008a72: 681b ldr r3, [r3, #0] 8008a74: f8d3 3d30 ldr.w r3, [r3, #3376] @ 0xd30 ETH_MTLRQOMR_DISTCPEF) >> 6) == 0U) ? ENABLE : DISABLE; 8008a78: f003 0340 and.w r3, r3, #64 @ 0x40 8008a7c: 2b00 cmp r3, #0 8008a7e: bf0c ite eq 8008a80: 2301 moveq r3, #1 8008a82: 2300 movne r3, #0 8008a84: b2db uxtb r3, r3 8008a86: 461a mov r2, r3 macconf->DropTCPIPChecksumErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 8008a88: 683b ldr r3, [r7, #0] 8008a8a: f883 2060 strb.w r2, [r3, #96] @ 0x60 return HAL_OK; 8008a8e: 2300 movs r3, #0 } 8008a90: 4618 mov r0, r3 8008a92: 370c adds r7, #12 8008a94: 46bd mov sp, r7 8008a96: f85d 7b04 ldr.w r7, [sp], #4 8008a9a: 4770 bx lr 08008a9c : * @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) { 8008a9c: b580 push {r7, lr} 8008a9e: b082 sub sp, #8 8008aa0: af00 add r7, sp, #0 8008aa2: 6078 str r0, [r7, #4] 8008aa4: 6039 str r1, [r7, #0] if (macconf == NULL) 8008aa6: 683b ldr r3, [r7, #0] 8008aa8: 2b00 cmp r3, #0 8008aaa: d101 bne.n 8008ab0 { return HAL_ERROR; 8008aac: 2301 movs r3, #1 8008aae: e00b b.n 8008ac8 } if (heth->gState == HAL_ETH_STATE_READY) 8008ab0: 687b ldr r3, [r7, #4] 8008ab2: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 8008ab6: 2b10 cmp r3, #16 8008ab8: d105 bne.n 8008ac6 { ETH_SetMACConfig(heth, macconf); 8008aba: 6839 ldr r1, [r7, #0] 8008abc: 6878 ldr r0, [r7, #4] 8008abe: f000 f865 bl 8008b8c return HAL_OK; 8008ac2: 2300 movs r3, #0 8008ac4: e000 b.n 8008ac8 } else { return HAL_ERROR; 8008ac6: 2301 movs r3, #1 } } 8008ac8: 4618 mov r0, r3 8008aca: 3708 adds r7, #8 8008acc: 46bd mov sp, r7 8008ace: bd80 pop {r7, pc} 08008ad0 : * @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) { 8008ad0: b580 push {r7, lr} 8008ad2: b084 sub sp, #16 8008ad4: af00 add r7, sp, #0 8008ad6: 6078 str r0, [r7, #4] uint32_t hclk; uint32_t tmpreg; /* Get the ETHERNET MACMDIOAR value */ tmpreg = (heth->Instance)->MACMDIOAR; 8008ad8: 687b ldr r3, [r7, #4] 8008ada: 681b ldr r3, [r3, #0] 8008adc: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8008ae0: 60fb str r3, [r7, #12] /* Clear CSR Clock Range bits */ tmpreg &= ~ETH_MACMDIOAR_CR; 8008ae2: 68fb ldr r3, [r7, #12] 8008ae4: f423 6370 bic.w r3, r3, #3840 @ 0xf00 8008ae8: 60fb str r3, [r7, #12] /* Get hclk frequency value */ hclk = HAL_RCC_GetHCLKFreq(); 8008aea: f001 ff5f bl 800a9ac 8008aee: 60b8 str r0, [r7, #8] /* Set CR bits depending on hclk value */ if (hclk < 35000000U) 8008af0: 68bb ldr r3, [r7, #8] 8008af2: 4a1a ldr r2, [pc, #104] @ (8008b5c ) 8008af4: 4293 cmp r3, r2 8008af6: d804 bhi.n 8008b02 { /* CSR Clock Range between 0-35 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV16; 8008af8: 68fb ldr r3, [r7, #12] 8008afa: f443 7300 orr.w r3, r3, #512 @ 0x200 8008afe: 60fb str r3, [r7, #12] 8008b00: e022 b.n 8008b48 } else if (hclk < 60000000U) 8008b02: 68bb ldr r3, [r7, #8] 8008b04: 4a16 ldr r2, [pc, #88] @ (8008b60 ) 8008b06: 4293 cmp r3, r2 8008b08: d204 bcs.n 8008b14 { /* CSR Clock Range between 35-60 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV26; 8008b0a: 68fb ldr r3, [r7, #12] 8008b0c: f443 7340 orr.w r3, r3, #768 @ 0x300 8008b10: 60fb str r3, [r7, #12] 8008b12: e019 b.n 8008b48 } else if (hclk < 100000000U) 8008b14: 68bb ldr r3, [r7, #8] 8008b16: 4a13 ldr r2, [pc, #76] @ (8008b64 ) 8008b18: 4293 cmp r3, r2 8008b1a: d915 bls.n 8008b48 { /* CSR Clock Range between 60-100 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV42; } else if (hclk < 150000000U) 8008b1c: 68bb ldr r3, [r7, #8] 8008b1e: 4a12 ldr r2, [pc, #72] @ (8008b68 ) 8008b20: 4293 cmp r3, r2 8008b22: d804 bhi.n 8008b2e { /* CSR Clock Range between 100-150 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV62; 8008b24: 68fb ldr r3, [r7, #12] 8008b26: f443 7380 orr.w r3, r3, #256 @ 0x100 8008b2a: 60fb str r3, [r7, #12] 8008b2c: e00c b.n 8008b48 } else if (hclk < 250000000U) 8008b2e: 68bb ldr r3, [r7, #8] 8008b30: 4a0e ldr r2, [pc, #56] @ (8008b6c ) 8008b32: 4293 cmp r3, r2 8008b34: d804 bhi.n 8008b40 { /* CSR Clock Range between 150-250 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV102; 8008b36: 68fb ldr r3, [r7, #12] 8008b38: f443 6380 orr.w r3, r3, #1024 @ 0x400 8008b3c: 60fb str r3, [r7, #12] 8008b3e: e003 b.n 8008b48 } else /* (hclk >= 250000000U) */ { /* CSR Clock >= 250 MHz */ tmpreg |= (uint32_t)(ETH_MACMDIOAR_CR_DIV124); 8008b40: 68fb ldr r3, [r7, #12] 8008b42: f443 63a0 orr.w r3, r3, #1280 @ 0x500 8008b46: 60fb str r3, [r7, #12] } /* Configure the CSR Clock Range */ (heth->Instance)->MACMDIOAR = (uint32_t)tmpreg; 8008b48: 687b ldr r3, [r7, #4] 8008b4a: 681b ldr r3, [r3, #0] 8008b4c: 68fa ldr r2, [r7, #12] 8008b4e: f8c3 2200 str.w r2, [r3, #512] @ 0x200 } 8008b52: bf00 nop 8008b54: 3710 adds r7, #16 8008b56: 46bd mov sp, r7 8008b58: bd80 pop {r7, pc} 8008b5a: bf00 nop 8008b5c: 02160ebf .word 0x02160ebf 8008b60: 03938700 .word 0x03938700 8008b64: 05f5e0ff .word 0x05f5e0ff 8008b68: 08f0d17f .word 0x08f0d17f 8008b6c: 0ee6b27f .word 0x0ee6b27f 08008b70 : * @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) { 8008b70: b480 push {r7} 8008b72: b083 sub sp, #12 8008b74: af00 add r7, sp, #0 8008b76: 6078 str r0, [r7, #4] return heth->DMAErrorCode; 8008b78: 687b ldr r3, [r7, #4] 8008b7a: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c } 8008b7e: 4618 mov r0, r3 8008b80: 370c adds r7, #12 8008b82: 46bd mov sp, r7 8008b84: f85d 7b04 ldr.w r7, [sp], #4 8008b88: 4770 bx lr ... 08008b8c : /** @addtogroup ETH_Private_Functions ETH Private Functions * @{ */ static void ETH_SetMACConfig(ETH_HandleTypeDef *heth, const ETH_MACConfigTypeDef *macconf) { 8008b8c: b480 push {r7} 8008b8e: b085 sub sp, #20 8008b90: af00 add r7, sp, #0 8008b92: 6078 str r0, [r7, #4] 8008b94: 6039 str r1, [r7, #0] uint32_t macregval; /*------------------------ MACCR Configuration --------------------*/ macregval = (macconf->InterPacketGapVal | 8008b96: 683b ldr r3, [r7, #0] 8008b98: 689a ldr r2, [r3, #8] macconf->SourceAddrControl | 8008b9a: 683b ldr r3, [r7, #0] 8008b9c: 681b ldr r3, [r3, #0] macregval = (macconf->InterPacketGapVal | 8008b9e: 431a orrs r2, r3 ((uint32_t)macconf->ChecksumOffload << 27) | 8008ba0: 683b ldr r3, [r7, #0] 8008ba2: 791b ldrb r3, [r3, #4] 8008ba4: 06db lsls r3, r3, #27 macconf->SourceAddrControl | 8008ba6: 431a orrs r2, r3 ((uint32_t)macconf->GiantPacketSizeLimitControl << 23) | 8008ba8: 683b ldr r3, [r7, #0] 8008baa: 7b1b ldrb r3, [r3, #12] 8008bac: 05db lsls r3, r3, #23 ((uint32_t)macconf->ChecksumOffload << 27) | 8008bae: 431a orrs r2, r3 ((uint32_t)macconf->Support2KPacket << 22) | 8008bb0: 683b ldr r3, [r7, #0] 8008bb2: 7b5b ldrb r3, [r3, #13] 8008bb4: 059b lsls r3, r3, #22 ((uint32_t)macconf->GiantPacketSizeLimitControl << 23) | 8008bb6: 431a orrs r2, r3 ((uint32_t)macconf->CRCStripTypePacket << 21) | 8008bb8: 683b ldr r3, [r7, #0] 8008bba: 7b9b ldrb r3, [r3, #14] 8008bbc: 055b lsls r3, r3, #21 ((uint32_t)macconf->Support2KPacket << 22) | 8008bbe: 431a orrs r2, r3 ((uint32_t)macconf->AutomaticPadCRCStrip << 20) | 8008bc0: 683b ldr r3, [r7, #0] 8008bc2: 7bdb ldrb r3, [r3, #15] 8008bc4: 051b lsls r3, r3, #20 ((uint32_t)macconf->CRCStripTypePacket << 21) | 8008bc6: 4313 orrs r3, r2 ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) | 8008bc8: 683a ldr r2, [r7, #0] 8008bca: 7c12 ldrb r2, [r2, #16] 8008bcc: 2a00 cmp r2, #0 8008bce: d102 bne.n 8008bd6 8008bd0: f44f 2200 mov.w r2, #524288 @ 0x80000 8008bd4: e000 b.n 8008bd8 8008bd6: 2200 movs r2, #0 ((uint32_t)macconf->AutomaticPadCRCStrip << 20) | 8008bd8: 4313 orrs r3, r2 ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) | 8008bda: 683a ldr r2, [r7, #0] 8008bdc: 7c52 ldrb r2, [r2, #17] 8008bde: 2a00 cmp r2, #0 8008be0: d102 bne.n 8008be8 8008be2: f44f 3200 mov.w r2, #131072 @ 0x20000 8008be6: e000 b.n 8008bea 8008be8: 2200 movs r2, #0 ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) | 8008bea: 431a orrs r2, r3 ((uint32_t)macconf->JumboPacket << 16) | 8008bec: 683b ldr r3, [r7, #0] 8008bee: 7c9b ldrb r3, [r3, #18] 8008bf0: 041b lsls r3, r3, #16 ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) | 8008bf2: 431a orrs r2, r3 macconf->Speed | 8008bf4: 683b ldr r3, [r7, #0] 8008bf6: 695b ldr r3, [r3, #20] ((uint32_t)macconf->JumboPacket << 16) | 8008bf8: 431a orrs r2, r3 macconf->DuplexMode | 8008bfa: 683b ldr r3, [r7, #0] 8008bfc: 699b ldr r3, [r3, #24] macconf->Speed | 8008bfe: 431a orrs r2, r3 ((uint32_t)macconf->LoopbackMode << 12) | 8008c00: 683b ldr r3, [r7, #0] 8008c02: 7f1b ldrb r3, [r3, #28] 8008c04: 031b lsls r3, r3, #12 macconf->DuplexMode | 8008c06: 431a orrs r2, r3 ((uint32_t)macconf->CarrierSenseBeforeTransmit << 11) | 8008c08: 683b ldr r3, [r7, #0] 8008c0a: 7f5b ldrb r3, [r3, #29] 8008c0c: 02db lsls r3, r3, #11 ((uint32_t)macconf->LoopbackMode << 12) | 8008c0e: 4313 orrs r3, r2 ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) | 8008c10: 683a ldr r2, [r7, #0] 8008c12: 7f92 ldrb r2, [r2, #30] 8008c14: 2a00 cmp r2, #0 8008c16: d102 bne.n 8008c1e 8008c18: f44f 6280 mov.w r2, #1024 @ 0x400 8008c1c: e000 b.n 8008c20 8008c1e: 2200 movs r2, #0 ((uint32_t)macconf->CarrierSenseBeforeTransmit << 11) | 8008c20: 431a orrs r2, r3 ((uint32_t)macconf->CarrierSenseDuringTransmit << 9) | 8008c22: 683b ldr r3, [r7, #0] 8008c24: 7fdb ldrb r3, [r3, #31] 8008c26: 025b lsls r3, r3, #9 ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) | 8008c28: 4313 orrs r3, r2 ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) | 8008c2a: 683a ldr r2, [r7, #0] 8008c2c: f892 2020 ldrb.w r2, [r2, #32] 8008c30: 2a00 cmp r2, #0 8008c32: d102 bne.n 8008c3a 8008c34: f44f 7280 mov.w r2, #256 @ 0x100 8008c38: e000 b.n 8008c3c 8008c3a: 2200 movs r2, #0 ((uint32_t)macconf->CarrierSenseDuringTransmit << 9) | 8008c3c: 431a orrs r2, r3 macconf->BackOffLimit | 8008c3e: 683b ldr r3, [r7, #0] 8008c40: 6a5b ldr r3, [r3, #36] @ 0x24 ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) | 8008c42: 431a orrs r2, r3 ((uint32_t)macconf->DeferralCheck << 4) | 8008c44: 683b ldr r3, [r7, #0] 8008c46: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8008c4a: 011b lsls r3, r3, #4 macconf->BackOffLimit | 8008c4c: 431a orrs r2, r3 macconf->PreambleLength); 8008c4e: 683b ldr r3, [r7, #0] 8008c50: 6adb ldr r3, [r3, #44] @ 0x2c macregval = (macconf->InterPacketGapVal | 8008c52: 4313 orrs r3, r2 8008c54: 60fb str r3, [r7, #12] /* Write to MACCR */ MODIFY_REG(heth->Instance->MACCR, ETH_MACCR_MASK, macregval); 8008c56: 687b ldr r3, [r7, #4] 8008c58: 681b ldr r3, [r3, #0] 8008c5a: 681a ldr r2, [r3, #0] 8008c5c: 4b56 ldr r3, [pc, #344] @ (8008db8 ) 8008c5e: 4013 ands r3, r2 8008c60: 687a ldr r2, [r7, #4] 8008c62: 6812 ldr r2, [r2, #0] 8008c64: 68f9 ldr r1, [r7, #12] 8008c66: 430b orrs r3, r1 8008c68: 6013 str r3, [r2, #0] /*------------------------ MACECR Configuration --------------------*/ macregval = ((macconf->ExtendedInterPacketGapVal << 25) | 8008c6a: 683b ldr r3, [r7, #0] 8008c6c: 6bdb ldr r3, [r3, #60] @ 0x3c 8008c6e: 065a lsls r2, r3, #25 ((uint32_t)macconf->ExtendedInterPacketGap << 24) | 8008c70: 683b ldr r3, [r7, #0] 8008c72: f893 3038 ldrb.w r3, [r3, #56] @ 0x38 8008c76: 061b lsls r3, r3, #24 macregval = ((macconf->ExtendedInterPacketGapVal << 25) | 8008c78: 431a orrs r2, r3 ((uint32_t)macconf->UnicastSlowProtocolPacketDetect << 18) | 8008c7a: 683b ldr r3, [r7, #0] 8008c7c: f893 3030 ldrb.w r3, [r3, #48] @ 0x30 8008c80: 049b lsls r3, r3, #18 ((uint32_t)macconf->ExtendedInterPacketGap << 24) | 8008c82: 431a orrs r2, r3 ((uint32_t)macconf->SlowProtocolDetect << 17) | 8008c84: 683b ldr r3, [r7, #0] 8008c86: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8008c8a: 045b lsls r3, r3, #17 ((uint32_t)macconf->UnicastSlowProtocolPacketDetect << 18) | 8008c8c: 4313 orrs r3, r2 ((uint32_t)((macconf->CRCCheckingRxPackets == DISABLE) ? 1U : 0U) << 16) | 8008c8e: 683a ldr r2, [r7, #0] 8008c90: f892 2032 ldrb.w r2, [r2, #50] @ 0x32 8008c94: 2a00 cmp r2, #0 8008c96: d102 bne.n 8008c9e 8008c98: f44f 3280 mov.w r2, #65536 @ 0x10000 8008c9c: e000 b.n 8008ca0 8008c9e: 2200 movs r2, #0 ((uint32_t)macconf->SlowProtocolDetect << 17) | 8008ca0: 431a orrs r2, r3 macconf->GiantPacketSizeLimit); 8008ca2: 683b ldr r3, [r7, #0] 8008ca4: 6b5b ldr r3, [r3, #52] @ 0x34 macregval = ((macconf->ExtendedInterPacketGapVal << 25) | 8008ca6: 4313 orrs r3, r2 8008ca8: 60fb str r3, [r7, #12] /* Write to MACECR */ MODIFY_REG(heth->Instance->MACECR, ETH_MACECR_MASK, macregval); 8008caa: 687b ldr r3, [r7, #4] 8008cac: 681b ldr r3, [r3, #0] 8008cae: 685a ldr r2, [r3, #4] 8008cb0: 4b42 ldr r3, [pc, #264] @ (8008dbc ) 8008cb2: 4013 ands r3, r2 8008cb4: 687a ldr r2, [r7, #4] 8008cb6: 6812 ldr r2, [r2, #0] 8008cb8: 68f9 ldr r1, [r7, #12] 8008cba: 430b orrs r3, r1 8008cbc: 6053 str r3, [r2, #4] /*------------------------ MACWTR Configuration --------------------*/ macregval = (((uint32_t)macconf->ProgrammableWatchdog << 8) | 8008cbe: 683b ldr r3, [r7, #0] 8008cc0: f893 3040 ldrb.w r3, [r3, #64] @ 0x40 8008cc4: 021a lsls r2, r3, #8 macconf->WatchdogTimeout); 8008cc6: 683b ldr r3, [r7, #0] 8008cc8: 6c5b ldr r3, [r3, #68] @ 0x44 macregval = (((uint32_t)macconf->ProgrammableWatchdog << 8) | 8008cca: 4313 orrs r3, r2 8008ccc: 60fb str r3, [r7, #12] /* Write to MACWTR */ MODIFY_REG(heth->Instance->MACWTR, ETH_MACWTR_MASK, macregval); 8008cce: 687b ldr r3, [r7, #4] 8008cd0: 681b ldr r3, [r3, #0] 8008cd2: 68da ldr r2, [r3, #12] 8008cd4: 4b3a ldr r3, [pc, #232] @ (8008dc0 ) 8008cd6: 4013 ands r3, r2 8008cd8: 687a ldr r2, [r7, #4] 8008cda: 6812 ldr r2, [r2, #0] 8008cdc: 68f9 ldr r1, [r7, #12] 8008cde: 430b orrs r3, r1 8008ce0: 60d3 str r3, [r2, #12] /*------------------------ MACTFCR Configuration --------------------*/ macregval = (((uint32_t)macconf->TransmitFlowControl << 1) | 8008ce2: 683b ldr r3, [r7, #0] 8008ce4: f893 3054 ldrb.w r3, [r3, #84] @ 0x54 8008ce8: 005a lsls r2, r3, #1 macconf->PauseLowThreshold | 8008cea: 683b ldr r3, [r7, #0] 8008cec: 6d1b ldr r3, [r3, #80] @ 0x50 macregval = (((uint32_t)macconf->TransmitFlowControl << 1) | 8008cee: 4313 orrs r3, r2 ((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7) | 8008cf0: 683a ldr r2, [r7, #0] 8008cf2: f892 204c ldrb.w r2, [r2, #76] @ 0x4c 8008cf6: 2a00 cmp r2, #0 8008cf8: d101 bne.n 8008cfe 8008cfa: 2280 movs r2, #128 @ 0x80 8008cfc: e000 b.n 8008d00 8008cfe: 2200 movs r2, #0 macconf->PauseLowThreshold | 8008d00: 431a orrs r2, r3 (macconf->PauseTime << 16)); 8008d02: 683b ldr r3, [r7, #0] 8008d04: 6c9b ldr r3, [r3, #72] @ 0x48 8008d06: 041b lsls r3, r3, #16 macregval = (((uint32_t)macconf->TransmitFlowControl << 1) | 8008d08: 4313 orrs r3, r2 8008d0a: 60fb str r3, [r7, #12] /* Write to MACTFCR */ MODIFY_REG(heth->Instance->MACTFCR, ETH_MACTFCR_MASK, macregval); 8008d0c: 687b ldr r3, [r7, #4] 8008d0e: 681b ldr r3, [r3, #0] 8008d10: 6f1a ldr r2, [r3, #112] @ 0x70 8008d12: f64f 730d movw r3, #65293 @ 0xff0d 8008d16: 4013 ands r3, r2 8008d18: 687a ldr r2, [r7, #4] 8008d1a: 6812 ldr r2, [r2, #0] 8008d1c: 68f9 ldr r1, [r7, #12] 8008d1e: 430b orrs r3, r1 8008d20: 6713 str r3, [r2, #112] @ 0x70 /*------------------------ MACRFCR Configuration --------------------*/ macregval = ((uint32_t)macconf->ReceiveFlowControl | 8008d22: 683b ldr r3, [r7, #0] 8008d24: f893 3056 ldrb.w r3, [r3, #86] @ 0x56 8008d28: 461a mov r2, r3 ((uint32_t)macconf->UnicastPausePacketDetect << 1)); 8008d2a: 683b ldr r3, [r7, #0] 8008d2c: f893 3055 ldrb.w r3, [r3, #85] @ 0x55 8008d30: 005b lsls r3, r3, #1 macregval = ((uint32_t)macconf->ReceiveFlowControl | 8008d32: 4313 orrs r3, r2 8008d34: 60fb str r3, [r7, #12] /* Write to MACRFCR */ MODIFY_REG(heth->Instance->MACRFCR, ETH_MACRFCR_MASK, macregval); 8008d36: 687b ldr r3, [r7, #4] 8008d38: 681b ldr r3, [r3, #0] 8008d3a: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 8008d3e: f023 0103 bic.w r1, r3, #3 8008d42: 687b ldr r3, [r7, #4] 8008d44: 681b ldr r3, [r3, #0] 8008d46: 68fa ldr r2, [r7, #12] 8008d48: 430a orrs r2, r1 8008d4a: f8c3 2090 str.w r2, [r3, #144] @ 0x90 /*------------------------ MTLTQOMR Configuration --------------------*/ /* Write to MTLTQOMR */ MODIFY_REG(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_MASK, macconf->TransmitQueueMode); 8008d4e: 687b ldr r3, [r7, #4] 8008d50: 681b ldr r3, [r3, #0] 8008d52: f8d3 3d00 ldr.w r3, [r3, #3328] @ 0xd00 8008d56: f023 0172 bic.w r1, r3, #114 @ 0x72 8008d5a: 683b ldr r3, [r7, #0] 8008d5c: 6d9a ldr r2, [r3, #88] @ 0x58 8008d5e: 687b ldr r3, [r7, #4] 8008d60: 681b ldr r3, [r3, #0] 8008d62: 430a orrs r2, r1 8008d64: f8c3 2d00 str.w r2, [r3, #3328] @ 0xd00 /*------------------------ MTLRQOMR Configuration --------------------*/ macregval = (macconf->ReceiveQueueMode | 8008d68: 683b ldr r3, [r7, #0] 8008d6a: 6ddb ldr r3, [r3, #92] @ 0x5c ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) | 8008d6c: 683a ldr r2, [r7, #0] 8008d6e: f892 2060 ldrb.w r2, [r2, #96] @ 0x60 8008d72: 2a00 cmp r2, #0 8008d74: d101 bne.n 8008d7a 8008d76: 2240 movs r2, #64 @ 0x40 8008d78: e000 b.n 8008d7c 8008d7a: 2200 movs r2, #0 macregval = (macconf->ReceiveQueueMode | 8008d7c: 431a orrs r2, r3 ((uint32_t)macconf->ForwardRxErrorPacket << 4) | 8008d7e: 683b ldr r3, [r7, #0] 8008d80: f893 3061 ldrb.w r3, [r3, #97] @ 0x61 8008d84: 011b lsls r3, r3, #4 ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) | 8008d86: 431a orrs r2, r3 ((uint32_t)macconf->ForwardRxUndersizedGoodPacket << 3)); 8008d88: 683b ldr r3, [r7, #0] 8008d8a: f893 3062 ldrb.w r3, [r3, #98] @ 0x62 8008d8e: 00db lsls r3, r3, #3 macregval = (macconf->ReceiveQueueMode | 8008d90: 4313 orrs r3, r2 8008d92: 60fb str r3, [r7, #12] /* Write to MTLRQOMR */ MODIFY_REG(heth->Instance->MTLRQOMR, ETH_MTLRQOMR_MASK, macregval); 8008d94: 687b ldr r3, [r7, #4] 8008d96: 681b ldr r3, [r3, #0] 8008d98: f8d3 3d30 ldr.w r3, [r3, #3376] @ 0xd30 8008d9c: f023 017b bic.w r1, r3, #123 @ 0x7b 8008da0: 687b ldr r3, [r7, #4] 8008da2: 681b ldr r3, [r3, #0] 8008da4: 68fa ldr r2, [r7, #12] 8008da6: 430a orrs r2, r1 8008da8: f8c3 2d30 str.w r2, [r3, #3376] @ 0xd30 } 8008dac: bf00 nop 8008dae: 3714 adds r7, #20 8008db0: 46bd mov sp, r7 8008db2: f85d 7b04 ldr.w r7, [sp], #4 8008db6: 4770 bx lr 8008db8: 00048083 .word 0x00048083 8008dbc: c0f88000 .word 0xc0f88000 8008dc0: fffffef0 .word 0xfffffef0 08008dc4 : static void ETH_SetDMAConfig(ETH_HandleTypeDef *heth, const ETH_DMAConfigTypeDef *dmaconf) { 8008dc4: b480 push {r7} 8008dc6: b085 sub sp, #20 8008dc8: af00 add r7, sp, #0 8008dca: 6078 str r0, [r7, #4] 8008dcc: 6039 str r1, [r7, #0] uint32_t dmaregval; /*------------------------ DMAMR Configuration --------------------*/ MODIFY_REG(heth->Instance->DMAMR, ETH_DMAMR_MASK, dmaconf->DMAArbitration); 8008dce: 687b ldr r3, [r7, #4] 8008dd0: 681b ldr r3, [r3, #0] 8008dd2: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008dd6: 681a ldr r2, [r3, #0] 8008dd8: 4b38 ldr r3, [pc, #224] @ (8008ebc ) 8008dda: 4013 ands r3, r2 8008ddc: 683a ldr r2, [r7, #0] 8008dde: 6811 ldr r1, [r2, #0] 8008de0: 687a ldr r2, [r7, #4] 8008de2: 6812 ldr r2, [r2, #0] 8008de4: 430b orrs r3, r1 8008de6: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008dea: 6013 str r3, [r2, #0] /*------------------------ DMASBMR Configuration --------------------*/ dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) | 8008dec: 683b ldr r3, [r7, #0] 8008dee: 791b ldrb r3, [r3, #4] 8008df0: 031a lsls r2, r3, #12 dmaconf->BurstMode | 8008df2: 683b ldr r3, [r7, #0] 8008df4: 689b ldr r3, [r3, #8] dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) | 8008df6: 431a orrs r2, r3 ((uint32_t)dmaconf->RebuildINCRxBurst << 15)); 8008df8: 683b ldr r3, [r7, #0] 8008dfa: 7b1b ldrb r3, [r3, #12] 8008dfc: 03db lsls r3, r3, #15 dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) | 8008dfe: 4313 orrs r3, r2 8008e00: 60fb str r3, [r7, #12] MODIFY_REG(heth->Instance->DMASBMR, ETH_DMASBMR_MASK, dmaregval); 8008e02: 687b ldr r3, [r7, #4] 8008e04: 681b ldr r3, [r3, #0] 8008e06: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008e0a: 685a ldr r2, [r3, #4] 8008e0c: 4b2c ldr r3, [pc, #176] @ (8008ec0 ) 8008e0e: 4013 ands r3, r2 8008e10: 687a ldr r2, [r7, #4] 8008e12: 6812 ldr r2, [r2, #0] 8008e14: 68f9 ldr r1, [r7, #12] 8008e16: 430b orrs r3, r1 8008e18: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008e1c: 6053 str r3, [r2, #4] /*------------------------ DMACCR Configuration --------------------*/ dmaregval = (((uint32_t)dmaconf->PBLx8Mode << 16) | 8008e1e: 683b ldr r3, [r7, #0] 8008e20: 7b5b ldrb r3, [r3, #13] 8008e22: 041a lsls r2, r3, #16 dmaconf->MaximumSegmentSize); 8008e24: 683b ldr r3, [r7, #0] 8008e26: 6a1b ldr r3, [r3, #32] dmaregval = (((uint32_t)dmaconf->PBLx8Mode << 16) | 8008e28: 4313 orrs r3, r2 8008e2a: 60fb str r3, [r7, #12] MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_MASK, dmaregval); 8008e2c: 687b ldr r3, [r7, #4] 8008e2e: 681b ldr r3, [r3, #0] 8008e30: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008e34: f8d3 2100 ldr.w r2, [r3, #256] @ 0x100 8008e38: 4b22 ldr r3, [pc, #136] @ (8008ec4 ) 8008e3a: 4013 ands r3, r2 8008e3c: 687a ldr r2, [r7, #4] 8008e3e: 6812 ldr r2, [r2, #0] 8008e40: 68f9 ldr r1, [r7, #12] 8008e42: 430b orrs r3, r1 8008e44: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008e48: f8c2 3100 str.w r3, [r2, #256] @ 0x100 /*------------------------ DMACTCR Configuration --------------------*/ dmaregval = (dmaconf->TxDMABurstLength | 8008e4c: 683b ldr r3, [r7, #0] 8008e4e: 691a ldr r2, [r3, #16] ((uint32_t)dmaconf->SecondPacketOperate << 4) | 8008e50: 683b ldr r3, [r7, #0] 8008e52: 7d1b ldrb r3, [r3, #20] 8008e54: 011b lsls r3, r3, #4 dmaregval = (dmaconf->TxDMABurstLength | 8008e56: 431a orrs r2, r3 ((uint32_t)dmaconf->TCPSegmentation << 12)); 8008e58: 683b ldr r3, [r7, #0] 8008e5a: 7f5b ldrb r3, [r3, #29] 8008e5c: 031b lsls r3, r3, #12 dmaregval = (dmaconf->TxDMABurstLength | 8008e5e: 4313 orrs r3, r2 8008e60: 60fb str r3, [r7, #12] MODIFY_REG(heth->Instance->DMACTCR, ETH_DMACTCR_MASK, dmaregval); 8008e62: 687b ldr r3, [r7, #4] 8008e64: 681b ldr r3, [r3, #0] 8008e66: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008e6a: f8d3 2104 ldr.w r2, [r3, #260] @ 0x104 8008e6e: 4b16 ldr r3, [pc, #88] @ (8008ec8 ) 8008e70: 4013 ands r3, r2 8008e72: 687a ldr r2, [r7, #4] 8008e74: 6812 ldr r2, [r2, #0] 8008e76: 68f9 ldr r1, [r7, #12] 8008e78: 430b orrs r3, r1 8008e7a: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008e7e: f8c2 3104 str.w r3, [r2, #260] @ 0x104 /*------------------------ DMACRCR Configuration --------------------*/ dmaregval = (((uint32_t)dmaconf->FlushRxPacket << 31) | 8008e82: 683b ldr r3, [r7, #0] 8008e84: 7f1b ldrb r3, [r3, #28] 8008e86: 07da lsls r2, r3, #31 dmaconf->RxDMABurstLength); 8008e88: 683b ldr r3, [r7, #0] 8008e8a: 699b ldr r3, [r3, #24] dmaregval = (((uint32_t)dmaconf->FlushRxPacket << 31) | 8008e8c: 4313 orrs r3, r2 8008e8e: 60fb str r3, [r7, #12] /* Write to DMACRCR */ MODIFY_REG(heth->Instance->DMACRCR, ETH_DMACRCR_MASK, dmaregval); 8008e90: 687b ldr r3, [r7, #4] 8008e92: 681b ldr r3, [r3, #0] 8008e94: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008e98: f8d3 2108 ldr.w r2, [r3, #264] @ 0x108 8008e9c: 4b0b ldr r3, [pc, #44] @ (8008ecc ) 8008e9e: 4013 ands r3, r2 8008ea0: 687a ldr r2, [r7, #4] 8008ea2: 6812 ldr r2, [r2, #0] 8008ea4: 68f9 ldr r1, [r7, #12] 8008ea6: 430b orrs r3, r1 8008ea8: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008eac: f8c2 3108 str.w r3, [r2, #264] @ 0x108 } 8008eb0: bf00 nop 8008eb2: 3714 adds r7, #20 8008eb4: 46bd mov sp, r7 8008eb6: f85d 7b04 ldr.w r7, [sp], #4 8008eba: 4770 bx lr 8008ebc: ffff87fd .word 0xffff87fd 8008ec0: ffff2ffe .word 0xffff2ffe 8008ec4: fffec000 .word 0xfffec000 8008ec8: ffc0efef .word 0xffc0efef 8008ecc: 7fc0ffff .word 0x7fc0ffff 08008ed0 : * @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) { 8008ed0: b580 push {r7, lr} 8008ed2: b0a4 sub sp, #144 @ 0x90 8008ed4: af00 add r7, sp, #0 8008ed6: 6078 str r0, [r7, #4] ETH_MACConfigTypeDef macDefaultConf; ETH_DMAConfigTypeDef dmaDefaultConf; /*--------------- ETHERNET MAC registers default Configuration --------------*/ macDefaultConf.AutomaticPadCRCStrip = ENABLE; 8008ed8: 2301 movs r3, #1 8008eda: f887 303b strb.w r3, [r7, #59] @ 0x3b macDefaultConf.BackOffLimit = ETH_BACKOFFLIMIT_10; 8008ede: 2300 movs r3, #0 8008ee0: 653b str r3, [r7, #80] @ 0x50 macDefaultConf.CarrierSenseBeforeTransmit = DISABLE; 8008ee2: 2300 movs r3, #0 8008ee4: f887 3049 strb.w r3, [r7, #73] @ 0x49 macDefaultConf.CarrierSenseDuringTransmit = DISABLE; 8008ee8: 2300 movs r3, #0 8008eea: f887 304b strb.w r3, [r7, #75] @ 0x4b macDefaultConf.ChecksumOffload = ENABLE; 8008eee: 2301 movs r3, #1 8008ef0: f887 3030 strb.w r3, [r7, #48] @ 0x30 macDefaultConf.CRCCheckingRxPackets = ENABLE; 8008ef4: 2301 movs r3, #1 8008ef6: f887 305e strb.w r3, [r7, #94] @ 0x5e macDefaultConf.CRCStripTypePacket = ENABLE; 8008efa: 2301 movs r3, #1 8008efc: f887 303a strb.w r3, [r7, #58] @ 0x3a macDefaultConf.DeferralCheck = DISABLE; 8008f00: 2300 movs r3, #0 8008f02: f887 3054 strb.w r3, [r7, #84] @ 0x54 macDefaultConf.DropTCPIPChecksumErrorPacket = ENABLE; 8008f06: 2301 movs r3, #1 8008f08: f887 308c strb.w r3, [r7, #140] @ 0x8c macDefaultConf.DuplexMode = ETH_FULLDUPLEX_MODE; 8008f0c: f44f 5300 mov.w r3, #8192 @ 0x2000 8008f10: 647b str r3, [r7, #68] @ 0x44 macDefaultConf.ExtendedInterPacketGap = DISABLE; 8008f12: 2300 movs r3, #0 8008f14: f887 3064 strb.w r3, [r7, #100] @ 0x64 macDefaultConf.ExtendedInterPacketGapVal = 0x0U; 8008f18: 2300 movs r3, #0 8008f1a: 66bb str r3, [r7, #104] @ 0x68 macDefaultConf.ForwardRxErrorPacket = DISABLE; 8008f1c: 2300 movs r3, #0 8008f1e: f887 308d strb.w r3, [r7, #141] @ 0x8d macDefaultConf.ForwardRxUndersizedGoodPacket = DISABLE; 8008f22: 2300 movs r3, #0 8008f24: f887 308e strb.w r3, [r7, #142] @ 0x8e macDefaultConf.GiantPacketSizeLimit = 0x618U; 8008f28: f44f 63c3 mov.w r3, #1560 @ 0x618 8008f2c: 663b str r3, [r7, #96] @ 0x60 macDefaultConf.GiantPacketSizeLimitControl = DISABLE; 8008f2e: 2300 movs r3, #0 8008f30: f887 3038 strb.w r3, [r7, #56] @ 0x38 macDefaultConf.InterPacketGapVal = ETH_INTERPACKETGAP_96BIT; 8008f34: 2300 movs r3, #0 8008f36: 637b str r3, [r7, #52] @ 0x34 macDefaultConf.Jabber = ENABLE; 8008f38: 2301 movs r3, #1 8008f3a: f887 303d strb.w r3, [r7, #61] @ 0x3d macDefaultConf.JumboPacket = DISABLE; 8008f3e: 2300 movs r3, #0 8008f40: f887 303e strb.w r3, [r7, #62] @ 0x3e macDefaultConf.LoopbackMode = DISABLE; 8008f44: 2300 movs r3, #0 8008f46: f887 3048 strb.w r3, [r7, #72] @ 0x48 macDefaultConf.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS_4; 8008f4a: 2300 movs r3, #0 8008f4c: 67fb str r3, [r7, #124] @ 0x7c macDefaultConf.PauseTime = 0x0U; 8008f4e: 2300 movs r3, #0 8008f50: 677b str r3, [r7, #116] @ 0x74 macDefaultConf.PreambleLength = ETH_PREAMBLELENGTH_7; 8008f52: 2300 movs r3, #0 8008f54: 65bb str r3, [r7, #88] @ 0x58 macDefaultConf.ProgrammableWatchdog = DISABLE; 8008f56: 2300 movs r3, #0 8008f58: f887 306c strb.w r3, [r7, #108] @ 0x6c macDefaultConf.ReceiveFlowControl = DISABLE; 8008f5c: 2300 movs r3, #0 8008f5e: f887 3082 strb.w r3, [r7, #130] @ 0x82 macDefaultConf.ReceiveOwn = ENABLE; 8008f62: 2301 movs r3, #1 8008f64: f887 304a strb.w r3, [r7, #74] @ 0x4a macDefaultConf.ReceiveQueueMode = ETH_RECEIVESTOREFORWARD; 8008f68: 2320 movs r3, #32 8008f6a: f8c7 3088 str.w r3, [r7, #136] @ 0x88 macDefaultConf.RetryTransmission = ENABLE; 8008f6e: 2301 movs r3, #1 8008f70: f887 304c strb.w r3, [r7, #76] @ 0x4c macDefaultConf.SlowProtocolDetect = DISABLE; 8008f74: 2300 movs r3, #0 8008f76: f887 305d strb.w r3, [r7, #93] @ 0x5d macDefaultConf.SourceAddrControl = ETH_SOURCEADDRESS_REPLACE_ADDR0; 8008f7a: f04f 5340 mov.w r3, #805306368 @ 0x30000000 8008f7e: 62fb str r3, [r7, #44] @ 0x2c macDefaultConf.Speed = ETH_SPEED_100M; 8008f80: f44f 4380 mov.w r3, #16384 @ 0x4000 8008f84: 643b str r3, [r7, #64] @ 0x40 macDefaultConf.Support2KPacket = DISABLE; 8008f86: 2300 movs r3, #0 8008f88: f887 3039 strb.w r3, [r7, #57] @ 0x39 macDefaultConf.TransmitQueueMode = ETH_TRANSMITSTOREFORWARD; 8008f8c: 2302 movs r3, #2 8008f8e: f8c7 3084 str.w r3, [r7, #132] @ 0x84 macDefaultConf.TransmitFlowControl = DISABLE; 8008f92: 2300 movs r3, #0 8008f94: f887 3080 strb.w r3, [r7, #128] @ 0x80 macDefaultConf.UnicastPausePacketDetect = DISABLE; 8008f98: 2300 movs r3, #0 8008f9a: f887 3081 strb.w r3, [r7, #129] @ 0x81 macDefaultConf.UnicastSlowProtocolPacketDetect = DISABLE; 8008f9e: 2300 movs r3, #0 8008fa0: f887 305c strb.w r3, [r7, #92] @ 0x5c macDefaultConf.Watchdog = ENABLE; 8008fa4: 2301 movs r3, #1 8008fa6: f887 303c strb.w r3, [r7, #60] @ 0x3c macDefaultConf.WatchdogTimeout = ETH_MACWTR_WTO_2KB; 8008faa: 2300 movs r3, #0 8008fac: 673b str r3, [r7, #112] @ 0x70 macDefaultConf.ZeroQuantaPause = ENABLE; 8008fae: 2301 movs r3, #1 8008fb0: f887 3078 strb.w r3, [r7, #120] @ 0x78 /* MAC default configuration */ ETH_SetMACConfig(heth, &macDefaultConf); 8008fb4: f107 032c add.w r3, r7, #44 @ 0x2c 8008fb8: 4619 mov r1, r3 8008fba: 6878 ldr r0, [r7, #4] 8008fbc: f7ff fde6 bl 8008b8c /*--------------- ETHERNET DMA registers default Configuration --------------*/ dmaDefaultConf.AddressAlignedBeats = ENABLE; 8008fc0: 2301 movs r3, #1 8008fc2: 733b strb r3, [r7, #12] dmaDefaultConf.BurstMode = ETH_BURSTLENGTH_FIXED; 8008fc4: 2301 movs r3, #1 8008fc6: 613b str r3, [r7, #16] dmaDefaultConf.DMAArbitration = ETH_DMAARBITRATION_RX1_TX1; 8008fc8: 2300 movs r3, #0 8008fca: 60bb str r3, [r7, #8] dmaDefaultConf.FlushRxPacket = DISABLE; 8008fcc: 2300 movs r3, #0 8008fce: f887 3024 strb.w r3, [r7, #36] @ 0x24 dmaDefaultConf.PBLx8Mode = DISABLE; 8008fd2: 2300 movs r3, #0 8008fd4: 757b strb r3, [r7, #21] dmaDefaultConf.RebuildINCRxBurst = DISABLE; 8008fd6: 2300 movs r3, #0 8008fd8: 753b strb r3, [r7, #20] dmaDefaultConf.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT; 8008fda: f44f 1300 mov.w r3, #2097152 @ 0x200000 8008fde: 623b str r3, [r7, #32] dmaDefaultConf.SecondPacketOperate = DISABLE; 8008fe0: 2300 movs r3, #0 8008fe2: 773b strb r3, [r7, #28] dmaDefaultConf.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT; 8008fe4: f44f 1300 mov.w r3, #2097152 @ 0x200000 8008fe8: 61bb str r3, [r7, #24] dmaDefaultConf.TCPSegmentation = DISABLE; 8008fea: 2300 movs r3, #0 8008fec: f887 3025 strb.w r3, [r7, #37] @ 0x25 dmaDefaultConf.MaximumSegmentSize = ETH_SEGMENT_SIZE_DEFAULT; 8008ff0: f44f 7306 mov.w r3, #536 @ 0x218 8008ff4: 62bb str r3, [r7, #40] @ 0x28 /* DMA default configuration */ ETH_SetDMAConfig(heth, &dmaDefaultConf); 8008ff6: f107 0308 add.w r3, r7, #8 8008ffa: 4619 mov r1, r3 8008ffc: 6878 ldr r0, [r7, #4] 8008ffe: f7ff fee1 bl 8008dc4 } 8009002: bf00 nop 8009004: 3790 adds r7, #144 @ 0x90 8009006: 46bd mov sp, r7 8009008: bd80 pop {r7, pc} 0800900a : * @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) { 800900a: b480 push {r7} 800900c: b085 sub sp, #20 800900e: af00 add r7, sp, #0 8009010: 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++) 8009012: 2300 movs r3, #0 8009014: 60fb str r3, [r7, #12] 8009016: e01d b.n 8009054 { dmatxdesc = heth->Init.TxDesc + i; 8009018: 687b ldr r3, [r7, #4] 800901a: 68d9 ldr r1, [r3, #12] 800901c: 68fa ldr r2, [r7, #12] 800901e: 4613 mov r3, r2 8009020: 005b lsls r3, r3, #1 8009022: 4413 add r3, r2 8009024: 00db lsls r3, r3, #3 8009026: 440b add r3, r1 8009028: 60bb str r3, [r7, #8] WRITE_REG(dmatxdesc->DESC0, 0x0U); 800902a: 68bb ldr r3, [r7, #8] 800902c: 2200 movs r2, #0 800902e: 601a str r2, [r3, #0] WRITE_REG(dmatxdesc->DESC1, 0x0U); 8009030: 68bb ldr r3, [r7, #8] 8009032: 2200 movs r2, #0 8009034: 605a str r2, [r3, #4] WRITE_REG(dmatxdesc->DESC2, 0x0U); 8009036: 68bb ldr r3, [r7, #8] 8009038: 2200 movs r2, #0 800903a: 609a str r2, [r3, #8] WRITE_REG(dmatxdesc->DESC3, 0x0U); 800903c: 68bb ldr r3, [r7, #8] 800903e: 2200 movs r2, #0 8009040: 60da str r2, [r3, #12] WRITE_REG(heth->TxDescList.TxDesc[i], (uint32_t)dmatxdesc); 8009042: 68b9 ldr r1, [r7, #8] 8009044: 687b ldr r3, [r7, #4] 8009046: 68fa ldr r2, [r7, #12] 8009048: 3206 adds r2, #6 800904a: f843 1022 str.w r1, [r3, r2, lsl #2] for (i = 0; i < (uint32_t)ETH_TX_DESC_CNT; i++) 800904e: 68fb ldr r3, [r7, #12] 8009050: 3301 adds r3, #1 8009052: 60fb str r3, [r7, #12] 8009054: 68fb ldr r3, [r7, #12] 8009056: 2b03 cmp r3, #3 8009058: d9de bls.n 8009018 } heth->TxDescList.CurTxDesc = 0; 800905a: 687b ldr r3, [r7, #4] 800905c: 2200 movs r2, #0 800905e: 629a str r2, [r3, #40] @ 0x28 /* Set Transmit Descriptor Ring Length */ WRITE_REG(heth->Instance->DMACTDRLR, (ETH_TX_DESC_CNT - 1U)); 8009060: 687b ldr r3, [r7, #4] 8009062: 681b ldr r3, [r3, #0] 8009064: f503 5380 add.w r3, r3, #4096 @ 0x1000 8009068: 461a mov r2, r3 800906a: 2303 movs r3, #3 800906c: f8c2 312c str.w r3, [r2, #300] @ 0x12c /* Set Transmit Descriptor List Address */ WRITE_REG(heth->Instance->DMACTDLAR, (uint32_t) heth->Init.TxDesc); 8009070: 687b ldr r3, [r7, #4] 8009072: 68da ldr r2, [r3, #12] 8009074: 687b ldr r3, [r7, #4] 8009076: 681b ldr r3, [r3, #0] 8009078: f503 5380 add.w r3, r3, #4096 @ 0x1000 800907c: f8c3 2114 str.w r2, [r3, #276] @ 0x114 /* Set Transmit Descriptor Tail pointer */ WRITE_REG(heth->Instance->DMACTDTPR, (uint32_t) heth->Init.TxDesc); 8009080: 687b ldr r3, [r7, #4] 8009082: 68da ldr r2, [r3, #12] 8009084: 687b ldr r3, [r7, #4] 8009086: 681b ldr r3, [r3, #0] 8009088: f503 5380 add.w r3, r3, #4096 @ 0x1000 800908c: f8c3 2120 str.w r2, [r3, #288] @ 0x120 } 8009090: bf00 nop 8009092: 3714 adds r7, #20 8009094: 46bd mov sp, r7 8009096: f85d 7b04 ldr.w r7, [sp], #4 800909a: 4770 bx lr 0800909c : * @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) { 800909c: b480 push {r7} 800909e: b085 sub sp, #20 80090a0: af00 add r7, sp, #0 80090a2: 6078 str r0, [r7, #4] ETH_DMADescTypeDef *dmarxdesc; uint32_t i; for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++) 80090a4: 2300 movs r3, #0 80090a6: 60fb str r3, [r7, #12] 80090a8: e023 b.n 80090f2 { dmarxdesc = heth->Init.RxDesc + i; 80090aa: 687b ldr r3, [r7, #4] 80090ac: 6919 ldr r1, [r3, #16] 80090ae: 68fa ldr r2, [r7, #12] 80090b0: 4613 mov r3, r2 80090b2: 005b lsls r3, r3, #1 80090b4: 4413 add r3, r2 80090b6: 00db lsls r3, r3, #3 80090b8: 440b add r3, r1 80090ba: 60bb str r3, [r7, #8] WRITE_REG(dmarxdesc->DESC0, 0x0U); 80090bc: 68bb ldr r3, [r7, #8] 80090be: 2200 movs r2, #0 80090c0: 601a str r2, [r3, #0] WRITE_REG(dmarxdesc->DESC1, 0x0U); 80090c2: 68bb ldr r3, [r7, #8] 80090c4: 2200 movs r2, #0 80090c6: 605a str r2, [r3, #4] WRITE_REG(dmarxdesc->DESC2, 0x0U); 80090c8: 68bb ldr r3, [r7, #8] 80090ca: 2200 movs r2, #0 80090cc: 609a str r2, [r3, #8] WRITE_REG(dmarxdesc->DESC3, 0x0U); 80090ce: 68bb ldr r3, [r7, #8] 80090d0: 2200 movs r2, #0 80090d2: 60da str r2, [r3, #12] WRITE_REG(dmarxdesc->BackupAddr0, 0x0U); 80090d4: 68bb ldr r3, [r7, #8] 80090d6: 2200 movs r2, #0 80090d8: 611a str r2, [r3, #16] WRITE_REG(dmarxdesc->BackupAddr1, 0x0U); 80090da: 68bb ldr r3, [r7, #8] 80090dc: 2200 movs r2, #0 80090de: 615a str r2, [r3, #20] /* Set Rx descritors addresses */ WRITE_REG(heth->RxDescList.RxDesc[i], (uint32_t)dmarxdesc); 80090e0: 68b9 ldr r1, [r7, #8] 80090e2: 687b ldr r3, [r7, #4] 80090e4: 68fa ldr r2, [r7, #12] 80090e6: 3212 adds r2, #18 80090e8: f843 1022 str.w r1, [r3, r2, lsl #2] for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++) 80090ec: 68fb ldr r3, [r7, #12] 80090ee: 3301 adds r3, #1 80090f0: 60fb str r3, [r7, #12] 80090f2: 68fb ldr r3, [r7, #12] 80090f4: 2b03 cmp r3, #3 80090f6: d9d8 bls.n 80090aa } WRITE_REG(heth->RxDescList.RxDescIdx, 0U); 80090f8: 687b ldr r3, [r7, #4] 80090fa: 2200 movs r2, #0 80090fc: 65da str r2, [r3, #92] @ 0x5c WRITE_REG(heth->RxDescList.RxDescCnt, 0U); 80090fe: 687b ldr r3, [r7, #4] 8009100: 2200 movs r2, #0 8009102: 661a str r2, [r3, #96] @ 0x60 WRITE_REG(heth->RxDescList.RxBuildDescIdx, 0U); 8009104: 687b ldr r3, [r7, #4] 8009106: 2200 movs r2, #0 8009108: 669a str r2, [r3, #104] @ 0x68 WRITE_REG(heth->RxDescList.RxBuildDescCnt, 0U); 800910a: 687b ldr r3, [r7, #4] 800910c: 2200 movs r2, #0 800910e: 66da str r2, [r3, #108] @ 0x6c WRITE_REG(heth->RxDescList.ItMode, 0U); 8009110: 687b ldr r3, [r7, #4] 8009112: 2200 movs r2, #0 8009114: 659a str r2, [r3, #88] @ 0x58 /* Set Receive Descriptor Ring Length */ WRITE_REG(heth->Instance->DMACRDRLR, ((uint32_t)(ETH_RX_DESC_CNT - 1U))); 8009116: 687b ldr r3, [r7, #4] 8009118: 681b ldr r3, [r3, #0] 800911a: f503 5380 add.w r3, r3, #4096 @ 0x1000 800911e: 461a mov r2, r3 8009120: 2303 movs r3, #3 8009122: f8c2 3130 str.w r3, [r2, #304] @ 0x130 /* Set Receive Descriptor List Address */ WRITE_REG(heth->Instance->DMACRDLAR, (uint32_t) heth->Init.RxDesc); 8009126: 687b ldr r3, [r7, #4] 8009128: 691a ldr r2, [r3, #16] 800912a: 687b ldr r3, [r7, #4] 800912c: 681b ldr r3, [r3, #0] 800912e: f503 5380 add.w r3, r3, #4096 @ 0x1000 8009132: 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)))); 8009136: 687b ldr r3, [r7, #4] 8009138: 691b ldr r3, [r3, #16] 800913a: f103 0248 add.w r2, r3, #72 @ 0x48 800913e: 687b ldr r3, [r7, #4] 8009140: 681b ldr r3, [r3, #0] 8009142: f503 5380 add.w r3, r3, #4096 @ 0x1000 8009146: f8c3 2128 str.w r2, [r3, #296] @ 0x128 } 800914a: bf00 nop 800914c: 3714 adds r7, #20 800914e: 46bd mov sp, r7 8009150: f85d 7b04 ldr.w r7, [sp], #4 8009154: 4770 bx lr ... 08009158 : * @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) { 8009158: b480 push {r7} 800915a: b091 sub sp, #68 @ 0x44 800915c: af00 add r7, sp, #0 800915e: 60f8 str r0, [r7, #12] 8009160: 60b9 str r1, [r7, #8] 8009162: 607a str r2, [r7, #4] ETH_TxDescListTypeDef *dmatxdesclist = &heth->TxDescList; 8009164: 68fb ldr r3, [r7, #12] 8009166: 3318 adds r3, #24 8009168: 627b str r3, [r7, #36] @ 0x24 uint32_t descidx = dmatxdesclist->CurTxDesc; 800916a: 6a7b ldr r3, [r7, #36] @ 0x24 800916c: 691b ldr r3, [r3, #16] 800916e: 63fb str r3, [r7, #60] @ 0x3c uint32_t firstdescidx = dmatxdesclist->CurTxDesc; 8009170: 6a7b ldr r3, [r7, #36] @ 0x24 8009172: 691b ldr r3, [r3, #16] 8009174: 623b str r3, [r7, #32] uint32_t idx; uint32_t descnbr = 0; 8009176: 2300 movs r3, #0 8009178: 637b str r3, [r7, #52] @ 0x34 ETH_DMADescTypeDef *dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 800917a: 6a7b ldr r3, [r7, #36] @ 0x24 800917c: 6bfa ldr r2, [r7, #60] @ 0x3c 800917e: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8009182: 633b str r3, [r7, #48] @ 0x30 ETH_BufferTypeDef *txbuffer = pTxConfig->TxBuffer; 8009184: 68bb ldr r3, [r7, #8] 8009186: 689b ldr r3, [r3, #8] 8009188: 62fb str r3, [r7, #44] @ 0x2c uint32_t bd_count = 0; 800918a: 2300 movs r3, #0 800918c: 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) 800918e: 6b3b ldr r3, [r7, #48] @ 0x30 8009190: 68db ldr r3, [r3, #12] 8009192: f003 4300 and.w r3, r3, #2147483648 @ 0x80000000 8009196: f1b3 4f00 cmp.w r3, #2147483648 @ 0x80000000 800919a: d007 beq.n 80091ac || (dmatxdesclist->PacketAddress[descidx] != NULL)) 800919c: 6a7a ldr r2, [r7, #36] @ 0x24 800919e: 6bfb ldr r3, [r7, #60] @ 0x3c 80091a0: 3304 adds r3, #4 80091a2: 009b lsls r3, r3, #2 80091a4: 4413 add r3, r2 80091a6: 685b ldr r3, [r3, #4] 80091a8: 2b00 cmp r3, #0 80091aa: d001 beq.n 80091b0 { return HAL_ETH_ERROR_BUSY; 80091ac: 2302 movs r3, #2 80091ae: e266 b.n 800967e /***************************************************************************/ /***************** 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) 80091b0: 68bb ldr r3, [r7, #8] 80091b2: 681b ldr r3, [r3, #0] 80091b4: f003 0304 and.w r3, r3, #4 80091b8: 2b00 cmp r3, #0 80091ba: d044 beq.n 8009246 { /* Set vlan tag value */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXCDESC_VT, pTxConfig->VlanTag); 80091bc: 6b3b ldr r3, [r7, #48] @ 0x30 80091be: 68da ldr r2, [r3, #12] 80091c0: 4b75 ldr r3, [pc, #468] @ (8009398 ) 80091c2: 4013 ands r3, r2 80091c4: 68ba ldr r2, [r7, #8] 80091c6: 6a52 ldr r2, [r2, #36] @ 0x24 80091c8: 431a orrs r2, r3 80091ca: 6b3b ldr r3, [r7, #48] @ 0x30 80091cc: 60da str r2, [r3, #12] /* Set vlan tag valid bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_VLTV); 80091ce: 6b3b ldr r3, [r7, #48] @ 0x30 80091d0: 68db ldr r3, [r3, #12] 80091d2: f443 3280 orr.w r2, r3, #65536 @ 0x10000 80091d6: 6b3b ldr r3, [r7, #48] @ 0x30 80091d8: 60da str r2, [r3, #12] /* Set the descriptor as the vlan input source */ SET_BIT(heth->Instance->MACVIR, ETH_MACVIR_VLTI); 80091da: 68fb ldr r3, [r7, #12] 80091dc: 681b ldr r3, [r3, #0] 80091de: 6e1a ldr r2, [r3, #96] @ 0x60 80091e0: 68fb ldr r3, [r7, #12] 80091e2: 681b ldr r3, [r3, #0] 80091e4: f442 1280 orr.w r2, r2, #1048576 @ 0x100000 80091e8: 661a str r2, [r3, #96] @ 0x60 /* if inner VLAN is enabled */ if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_INNERVLANTAG) != (uint32_t)RESET) 80091ea: 68bb ldr r3, [r7, #8] 80091ec: 681b ldr r3, [r3, #0] 80091ee: f003 0308 and.w r3, r3, #8 80091f2: 2b00 cmp r3, #0 80091f4: d027 beq.n 8009246 { /* Set inner vlan tag value */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXCDESC_IVT, (pTxConfig->InnerVlanTag << 16)); 80091f6: 6b3b ldr r3, [r7, #48] @ 0x30 80091f8: 689b ldr r3, [r3, #8] 80091fa: b29a uxth r2, r3 80091fc: 68bb ldr r3, [r7, #8] 80091fe: 6adb ldr r3, [r3, #44] @ 0x2c 8009200: 041b lsls r3, r3, #16 8009202: 431a orrs r2, r3 8009204: 6b3b ldr r3, [r7, #48] @ 0x30 8009206: 609a str r2, [r3, #8] /* Set inner vlan tag valid bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_IVLTV); 8009208: 6b3b ldr r3, [r7, #48] @ 0x30 800920a: 68db ldr r3, [r3, #12] 800920c: f443 3200 orr.w r2, r3, #131072 @ 0x20000 8009210: 6b3b ldr r3, [r7, #48] @ 0x30 8009212: 60da str r2, [r3, #12] /* Set Vlan Tag control */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXCDESC_IVTIR, pTxConfig->InnerVlanCtrl); 8009214: 6b3b ldr r3, [r7, #48] @ 0x30 8009216: 68db ldr r3, [r3, #12] 8009218: f423 2240 bic.w r2, r3, #786432 @ 0xc0000 800921c: 68bb ldr r3, [r7, #8] 800921e: 6b1b ldr r3, [r3, #48] @ 0x30 8009220: 431a orrs r2, r3 8009222: 6b3b ldr r3, [r7, #48] @ 0x30 8009224: 60da str r2, [r3, #12] /* Set the descriptor as the inner vlan input source */ SET_BIT(heth->Instance->MACIVIR, ETH_MACIVIR_VLTI); 8009226: 68fb ldr r3, [r7, #12] 8009228: 681b ldr r3, [r3, #0] 800922a: 6e5a ldr r2, [r3, #100] @ 0x64 800922c: 68fb ldr r3, [r7, #12] 800922e: 681b ldr r3, [r3, #0] 8009230: f442 1280 orr.w r2, r2, #1048576 @ 0x100000 8009234: 665a str r2, [r3, #100] @ 0x64 /* Enable double VLAN processing */ SET_BIT(heth->Instance->MACVTR, ETH_MACVTR_EDVLP); 8009236: 68fb ldr r3, [r7, #12] 8009238: 681b ldr r3, [r3, #0] 800923a: 6d1a ldr r2, [r3, #80] @ 0x50 800923c: 68fb ldr r3, [r7, #12] 800923e: 681b ldr r3, [r3, #0] 8009240: f042 6280 orr.w r2, r2, #67108864 @ 0x4000000 8009244: 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) 8009246: 68bb ldr r3, [r7, #8] 8009248: 681b ldr r3, [r3, #0] 800924a: f003 0310 and.w r3, r3, #16 800924e: 2b00 cmp r3, #0 8009250: d00e beq.n 8009270 { /* Set MSS value */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXCDESC_MSS, pTxConfig->MaxSegmentSize); 8009252: 6b3b ldr r3, [r7, #48] @ 0x30 8009254: 689a ldr r2, [r3, #8] 8009256: 4b51 ldr r3, [pc, #324] @ (800939c ) 8009258: 4013 ands r3, r2 800925a: 68ba ldr r2, [r7, #8] 800925c: 6992 ldr r2, [r2, #24] 800925e: 431a orrs r2, r3 8009260: 6b3b ldr r3, [r7, #48] @ 0x30 8009262: 609a str r2, [r3, #8] /* Set MSS valid bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_TCMSSV); 8009264: 6b3b ldr r3, [r7, #48] @ 0x30 8009266: 68db ldr r3, [r3, #12] 8009268: f043 6280 orr.w r2, r3, #67108864 @ 0x4000000 800926c: 6b3b ldr r3, [r7, #48] @ 0x30 800926e: 60da str r2, [r3, #12] } if ((READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET) 8009270: 68bb ldr r3, [r7, #8] 8009272: 681b ldr r3, [r3, #0] 8009274: f003 0304 and.w r3, r3, #4 8009278: 2b00 cmp r3, #0 800927a: d105 bne.n 8009288 || (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET)) 800927c: 68bb ldr r3, [r7, #8] 800927e: 681b ldr r3, [r3, #0] 8009280: f003 0310 and.w r3, r3, #16 8009284: 2b00 cmp r3, #0 8009286: d036 beq.n 80092f6 { /* Set as context descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_CTXT); 8009288: 6b3b ldr r3, [r7, #48] @ 0x30 800928a: 68db ldr r3, [r3, #12] 800928c: f043 4280 orr.w r2, r3, #1073741824 @ 0x40000000 8009290: 6b3b ldr r3, [r7, #48] @ 0x30 8009292: 60da str r2, [r3, #12] __ASM volatile ("dmb 0xF":::"memory"); 8009294: f3bf 8f5f dmb sy } 8009298: 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); 800929a: 6b3b ldr r3, [r7, #48] @ 0x30 800929c: 68db ldr r3, [r3, #12] 800929e: f043 4200 orr.w r2, r3, #2147483648 @ 0x80000000 80092a2: 6b3b ldr r3, [r7, #48] @ 0x30 80092a4: 60da str r2, [r3, #12] /* Increment current tx descriptor index */ INCR_TX_DESC_INDEX(descidx, 1U); 80092a6: 6bfb ldr r3, [r7, #60] @ 0x3c 80092a8: 3301 adds r3, #1 80092aa: 63fb str r3, [r7, #60] @ 0x3c 80092ac: 6bfb ldr r3, [r7, #60] @ 0x3c 80092ae: 2b03 cmp r3, #3 80092b0: d902 bls.n 80092b8 80092b2: 6bfb ldr r3, [r7, #60] @ 0x3c 80092b4: 3b04 subs r3, #4 80092b6: 63fb str r3, [r7, #60] @ 0x3c /* Get current descriptor address */ dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 80092b8: 6a7b ldr r3, [r7, #36] @ 0x24 80092ba: 6bfa ldr r2, [r7, #60] @ 0x3c 80092bc: f853 3022 ldr.w r3, [r3, r2, lsl #2] 80092c0: 633b str r3, [r7, #48] @ 0x30 descnbr += 1U; 80092c2: 6b7b ldr r3, [r7, #52] @ 0x34 80092c4: 3301 adds r3, #1 80092c6: 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) 80092c8: 6b3b ldr r3, [r7, #48] @ 0x30 80092ca: 68db ldr r3, [r3, #12] 80092cc: f003 4300 and.w r3, r3, #2147483648 @ 0x80000000 80092d0: f1b3 4f00 cmp.w r3, #2147483648 @ 0x80000000 80092d4: d10f bne.n 80092f6 { dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[firstdescidx]; 80092d6: 6a7b ldr r3, [r7, #36] @ 0x24 80092d8: 6a3a ldr r2, [r7, #32] 80092da: f853 3022 ldr.w r3, [r3, r2, lsl #2] 80092de: 633b str r3, [r7, #48] @ 0x30 __ASM volatile ("dmb 0xF":::"memory"); 80092e0: f3bf 8f5f dmb sy } 80092e4: 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); 80092e6: 6b3b ldr r3, [r7, #48] @ 0x30 80092e8: 68db ldr r3, [r3, #12] 80092ea: f023 4200 bic.w r2, r3, #2147483648 @ 0x80000000 80092ee: 6b3b ldr r3, [r7, #48] @ 0x30 80092f0: 60da str r2, [r3, #12] return HAL_ETH_ERROR_BUSY; 80092f2: 2302 movs r3, #2 80092f4: e1c3 b.n 800967e /***************************************************************************/ /***************** Normal descriptors configuration *****************/ /***************************************************************************/ descnbr += 1U; 80092f6: 6b7b ldr r3, [r7, #52] @ 0x34 80092f8: 3301 adds r3, #1 80092fa: 637b str r3, [r7, #52] @ 0x34 /* Set header or buffer 1 address */ WRITE_REG(dmatxdesc->DESC0, (uint32_t)txbuffer->buffer); 80092fc: 6afb ldr r3, [r7, #44] @ 0x2c 80092fe: 681b ldr r3, [r3, #0] 8009300: 461a mov r2, r3 8009302: 6b3b ldr r3, [r7, #48] @ 0x30 8009304: 601a str r2, [r3, #0] /* Set header or buffer 1 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B1L, txbuffer->len); 8009306: 6b3b ldr r3, [r7, #48] @ 0x30 8009308: 689a ldr r2, [r3, #8] 800930a: 4b24 ldr r3, [pc, #144] @ (800939c ) 800930c: 4013 ands r3, r2 800930e: 6afa ldr r2, [r7, #44] @ 0x2c 8009310: 6852 ldr r2, [r2, #4] 8009312: 431a orrs r2, r3 8009314: 6b3b ldr r3, [r7, #48] @ 0x30 8009316: 609a str r2, [r3, #8] if (txbuffer->next != NULL) 8009318: 6afb ldr r3, [r7, #44] @ 0x2c 800931a: 689b ldr r3, [r3, #8] 800931c: 2b00 cmp r3, #0 800931e: d012 beq.n 8009346 { txbuffer = txbuffer->next; 8009320: 6afb ldr r3, [r7, #44] @ 0x2c 8009322: 689b ldr r3, [r3, #8] 8009324: 62fb str r3, [r7, #44] @ 0x2c /* Set buffer 2 address */ WRITE_REG(dmatxdesc->DESC1, (uint32_t)txbuffer->buffer); 8009326: 6afb ldr r3, [r7, #44] @ 0x2c 8009328: 681b ldr r3, [r3, #0] 800932a: 461a mov r2, r3 800932c: 6b3b ldr r3, [r7, #48] @ 0x30 800932e: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16)); 8009330: 6b3b ldr r3, [r7, #48] @ 0x30 8009332: 689a ldr r2, [r3, #8] 8009334: 4b1a ldr r3, [pc, #104] @ (80093a0 ) 8009336: 4013 ands r3, r2 8009338: 6afa ldr r2, [r7, #44] @ 0x2c 800933a: 6852 ldr r2, [r2, #4] 800933c: 0412 lsls r2, r2, #16 800933e: 431a orrs r2, r3 8009340: 6b3b ldr r3, [r7, #48] @ 0x30 8009342: 609a str r2, [r3, #8] 8009344: e008 b.n 8009358 } else { WRITE_REG(dmatxdesc->DESC1, 0x0U); 8009346: 6b3b ldr r3, [r7, #48] @ 0x30 8009348: 2200 movs r2, #0 800934a: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U); 800934c: 6b3b ldr r3, [r7, #48] @ 0x30 800934e: 689a ldr r2, [r3, #8] 8009350: 4b13 ldr r3, [pc, #76] @ (80093a0 ) 8009352: 4013 ands r3, r2 8009354: 6b3a ldr r2, [r7, #48] @ 0x30 8009356: 6093 str r3, [r2, #8] } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET) 8009358: 68bb ldr r3, [r7, #8] 800935a: 681b ldr r3, [r3, #0] 800935c: f003 0310 and.w r3, r3, #16 8009360: 2b00 cmp r3, #0 8009362: d021 beq.n 80093a8 { /* Set TCP Header length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_THL, (pTxConfig->TCPHeaderLen << 19)); 8009364: 6b3b ldr r3, [r7, #48] @ 0x30 8009366: 68db ldr r3, [r3, #12] 8009368: f423 02f0 bic.w r2, r3, #7864320 @ 0x780000 800936c: 68bb ldr r3, [r7, #8] 800936e: 6a1b ldr r3, [r3, #32] 8009370: 04db lsls r3, r3, #19 8009372: 431a orrs r2, r3 8009374: 6b3b ldr r3, [r7, #48] @ 0x30 8009376: 60da str r2, [r3, #12] /* Set TCP payload length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TPL, pTxConfig->PayloadLen); 8009378: 6b3b ldr r3, [r7, #48] @ 0x30 800937a: 68da ldr r2, [r3, #12] 800937c: 4b09 ldr r3, [pc, #36] @ (80093a4 ) 800937e: 4013 ands r3, r2 8009380: 68ba ldr r2, [r7, #8] 8009382: 69d2 ldr r2, [r2, #28] 8009384: 431a orrs r2, r3 8009386: 6b3b ldr r3, [r7, #48] @ 0x30 8009388: 60da str r2, [r3, #12] /* Set TCP Segmentation Enabled bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE); 800938a: 6b3b ldr r3, [r7, #48] @ 0x30 800938c: 68db ldr r3, [r3, #12] 800938e: f443 2280 orr.w r2, r3, #262144 @ 0x40000 8009392: 6b3b ldr r3, [r7, #48] @ 0x30 8009394: 60da str r2, [r3, #12] 8009396: e02e b.n 80093f6 8009398: ffff0000 .word 0xffff0000 800939c: ffffc000 .word 0xffffc000 80093a0: c000ffff .word 0xc000ffff 80093a4: fffc0000 .word 0xfffc0000 } else { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FL, pTxConfig->Length); 80093a8: 6b3b ldr r3, [r7, #48] @ 0x30 80093aa: 68da ldr r2, [r3, #12] 80093ac: 4b7b ldr r3, [pc, #492] @ (800959c ) 80093ae: 4013 ands r3, r2 80093b0: 68ba ldr r2, [r7, #8] 80093b2: 6852 ldr r2, [r2, #4] 80093b4: 431a orrs r2, r3 80093b6: 6b3b ldr r3, [r7, #48] @ 0x30 80093b8: 60da str r2, [r3, #12] if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != (uint32_t)RESET) 80093ba: 68bb ldr r3, [r7, #8] 80093bc: 681b ldr r3, [r3, #0] 80093be: f003 0301 and.w r3, r3, #1 80093c2: 2b00 cmp r3, #0 80093c4: d008 beq.n 80093d8 { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CIC, pTxConfig->ChecksumCtrl); 80093c6: 6b3b ldr r3, [r7, #48] @ 0x30 80093c8: 68db ldr r3, [r3, #12] 80093ca: f423 3240 bic.w r2, r3, #196608 @ 0x30000 80093ce: 68bb ldr r3, [r7, #8] 80093d0: 695b ldr r3, [r3, #20] 80093d2: 431a orrs r2, r3 80093d4: 6b3b ldr r3, [r7, #48] @ 0x30 80093d6: 60da str r2, [r3, #12] } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CRCPAD) != (uint32_t)RESET) 80093d8: 68bb ldr r3, [r7, #8] 80093da: 681b ldr r3, [r3, #0] 80093dc: f003 0320 and.w r3, r3, #32 80093e0: 2b00 cmp r3, #0 80093e2: d008 beq.n 80093f6 { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CPC, pTxConfig->CRCPadCtrl); 80093e4: 6b3b ldr r3, [r7, #48] @ 0x30 80093e6: 68db ldr r3, [r3, #12] 80093e8: f023 6240 bic.w r2, r3, #201326592 @ 0xc000000 80093ec: 68bb ldr r3, [r7, #8] 80093ee: 691b ldr r3, [r3, #16] 80093f0: 431a orrs r2, r3 80093f2: 6b3b ldr r3, [r7, #48] @ 0x30 80093f4: 60da str r2, [r3, #12] } } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET) 80093f6: 68bb ldr r3, [r7, #8] 80093f8: 681b ldr r3, [r3, #0] 80093fa: f003 0304 and.w r3, r3, #4 80093fe: 2b00 cmp r3, #0 8009400: d008 beq.n 8009414 { /* Set Vlan Tag control */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_VTIR, pTxConfig->VlanCtrl); 8009402: 6b3b ldr r3, [r7, #48] @ 0x30 8009404: 689b ldr r3, [r3, #8] 8009406: f423 4240 bic.w r2, r3, #49152 @ 0xc000 800940a: 68bb ldr r3, [r7, #8] 800940c: 6a9b ldr r3, [r3, #40] @ 0x28 800940e: 431a orrs r2, r3 8009410: 6b3b ldr r3, [r7, #48] @ 0x30 8009412: 609a str r2, [r3, #8] } /* Mark it as First Descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FD); 8009414: 6b3b ldr r3, [r7, #48] @ 0x30 8009416: 68db ldr r3, [r3, #12] 8009418: f043 5200 orr.w r2, r3, #536870912 @ 0x20000000 800941c: 6b3b ldr r3, [r7, #48] @ 0x30 800941e: 60da str r2, [r3, #12] /* Mark it as NORMAL descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CTXT); 8009420: 6b3b ldr r3, [r7, #48] @ 0x30 8009422: 68db ldr r3, [r3, #12] 8009424: f023 4280 bic.w r2, r3, #1073741824 @ 0x40000000 8009428: 6b3b ldr r3, [r7, #48] @ 0x30 800942a: 60da str r2, [r3, #12] __ASM volatile ("dmb 0xF":::"memory"); 800942c: f3bf 8f5f dmb sy } 8009430: 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); 8009432: 6b3b ldr r3, [r7, #48] @ 0x30 8009434: 68db ldr r3, [r3, #12] 8009436: f043 4200 orr.w r2, r3, #2147483648 @ 0x80000000 800943a: 6b3b ldr r3, [r7, #48] @ 0x30 800943c: 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) 800943e: 68bb ldr r3, [r7, #8] 8009440: 681b ldr r3, [r3, #0] 8009442: f003 0302 and.w r3, r3, #2 8009446: 2b00 cmp r3, #0 8009448: f000 80da beq.w 8009600 { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_SAIC, pTxConfig->SrcAddrCtrl); 800944c: 6b3b ldr r3, [r7, #48] @ 0x30 800944e: 68db ldr r3, [r3, #12] 8009450: f023 7260 bic.w r2, r3, #58720256 @ 0x3800000 8009454: 68bb ldr r3, [r7, #8] 8009456: 68db ldr r3, [r3, #12] 8009458: 431a orrs r2, r3 800945a: 6b3b ldr r3, [r7, #48] @ 0x30 800945c: 60da str r2, [r3, #12] } /* only if the packet is split into more than one descriptors > 1 */ while (txbuffer->next != NULL) 800945e: e0cf b.n 8009600 { /* Clear the LD bit of previous descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_LD); 8009460: 6b3b ldr r3, [r7, #48] @ 0x30 8009462: 68db ldr r3, [r3, #12] 8009464: f023 5280 bic.w r2, r3, #268435456 @ 0x10000000 8009468: 6b3b ldr r3, [r7, #48] @ 0x30 800946a: 60da str r2, [r3, #12] /* Increment current tx descriptor index */ INCR_TX_DESC_INDEX(descidx, 1U); 800946c: 6bfb ldr r3, [r7, #60] @ 0x3c 800946e: 3301 adds r3, #1 8009470: 63fb str r3, [r7, #60] @ 0x3c 8009472: 6bfb ldr r3, [r7, #60] @ 0x3c 8009474: 2b03 cmp r3, #3 8009476: d902 bls.n 800947e 8009478: 6bfb ldr r3, [r7, #60] @ 0x3c 800947a: 3b04 subs r3, #4 800947c: 63fb str r3, [r7, #60] @ 0x3c /* Get current descriptor address */ dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 800947e: 6a7b ldr r3, [r7, #36] @ 0x24 8009480: 6bfa ldr r2, [r7, #60] @ 0x3c 8009482: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8009486: 633b str r3, [r7, #48] @ 0x30 /* Clear the FD bit of new Descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FD); 8009488: 6b3b ldr r3, [r7, #48] @ 0x30 800948a: 68db ldr r3, [r3, #12] 800948c: f023 5200 bic.w r2, r3, #536870912 @ 0x20000000 8009490: 6b3b ldr r3, [r7, #48] @ 0x30 8009492: 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) 8009494: 6b3b ldr r3, [r7, #48] @ 0x30 8009496: 68db ldr r3, [r3, #12] 8009498: f003 4300 and.w r3, r3, #2147483648 @ 0x80000000 800949c: f1b3 4f00 cmp.w r3, #2147483648 @ 0x80000000 80094a0: d007 beq.n 80094b2 || (dmatxdesclist->PacketAddress[descidx] != NULL)) 80094a2: 6a7a ldr r2, [r7, #36] @ 0x24 80094a4: 6bfb ldr r3, [r7, #60] @ 0x3c 80094a6: 3304 adds r3, #4 80094a8: 009b lsls r3, r3, #2 80094aa: 4413 add r3, r2 80094ac: 685b ldr r3, [r3, #4] 80094ae: 2b00 cmp r3, #0 80094b0: d029 beq.n 8009506 { descidx = firstdescidx; 80094b2: 6a3b ldr r3, [r7, #32] 80094b4: 63fb str r3, [r7, #60] @ 0x3c dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 80094b6: 6a7b ldr r3, [r7, #36] @ 0x24 80094b8: 6bfa ldr r2, [r7, #60] @ 0x3c 80094ba: f853 3022 ldr.w r3, [r3, r2, lsl #2] 80094be: 633b str r3, [r7, #48] @ 0x30 /* clear previous desc own bit */ for (idx = 0; idx < descnbr; idx ++) 80094c0: 2300 movs r3, #0 80094c2: 63bb str r3, [r7, #56] @ 0x38 80094c4: e019 b.n 80094fa __ASM volatile ("dmb 0xF":::"memory"); 80094c6: f3bf 8f5f dmb sy } 80094ca: bf00 nop { /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN); 80094cc: 6b3b ldr r3, [r7, #48] @ 0x30 80094ce: 68db ldr r3, [r3, #12] 80094d0: f023 4200 bic.w r2, r3, #2147483648 @ 0x80000000 80094d4: 6b3b ldr r3, [r7, #48] @ 0x30 80094d6: 60da str r2, [r3, #12] /* Increment current tx descriptor index */ INCR_TX_DESC_INDEX(descidx, 1U); 80094d8: 6bfb ldr r3, [r7, #60] @ 0x3c 80094da: 3301 adds r3, #1 80094dc: 63fb str r3, [r7, #60] @ 0x3c 80094de: 6bfb ldr r3, [r7, #60] @ 0x3c 80094e0: 2b03 cmp r3, #3 80094e2: d902 bls.n 80094ea 80094e4: 6bfb ldr r3, [r7, #60] @ 0x3c 80094e6: 3b04 subs r3, #4 80094e8: 63fb str r3, [r7, #60] @ 0x3c /* Get current descriptor address */ dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 80094ea: 6a7b ldr r3, [r7, #36] @ 0x24 80094ec: 6bfa ldr r2, [r7, #60] @ 0x3c 80094ee: f853 3022 ldr.w r3, [r3, r2, lsl #2] 80094f2: 633b str r3, [r7, #48] @ 0x30 for (idx = 0; idx < descnbr; idx ++) 80094f4: 6bbb ldr r3, [r7, #56] @ 0x38 80094f6: 3301 adds r3, #1 80094f8: 63bb str r3, [r7, #56] @ 0x38 80094fa: 6bba ldr r2, [r7, #56] @ 0x38 80094fc: 6b7b ldr r3, [r7, #52] @ 0x34 80094fe: 429a cmp r2, r3 8009500: d3e1 bcc.n 80094c6 } return HAL_ETH_ERROR_BUSY; 8009502: 2302 movs r3, #2 8009504: e0bb b.n 800967e } descnbr += 1U; 8009506: 6b7b ldr r3, [r7, #52] @ 0x34 8009508: 3301 adds r3, #1 800950a: 637b str r3, [r7, #52] @ 0x34 /* Get the next Tx buffer in the list */ txbuffer = txbuffer->next; 800950c: 6afb ldr r3, [r7, #44] @ 0x2c 800950e: 689b ldr r3, [r3, #8] 8009510: 62fb str r3, [r7, #44] @ 0x2c /* Set header or buffer 1 address */ WRITE_REG(dmatxdesc->DESC0, (uint32_t)txbuffer->buffer); 8009512: 6afb ldr r3, [r7, #44] @ 0x2c 8009514: 681b ldr r3, [r3, #0] 8009516: 461a mov r2, r3 8009518: 6b3b ldr r3, [r7, #48] @ 0x30 800951a: 601a str r2, [r3, #0] /* Set header or buffer 1 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B1L, txbuffer->len); 800951c: 6b3b ldr r3, [r7, #48] @ 0x30 800951e: 689a ldr r2, [r3, #8] 8009520: 4b1f ldr r3, [pc, #124] @ (80095a0 ) 8009522: 4013 ands r3, r2 8009524: 6afa ldr r2, [r7, #44] @ 0x2c 8009526: 6852 ldr r2, [r2, #4] 8009528: 431a orrs r2, r3 800952a: 6b3b ldr r3, [r7, #48] @ 0x30 800952c: 609a str r2, [r3, #8] if (txbuffer->next != NULL) 800952e: 6afb ldr r3, [r7, #44] @ 0x2c 8009530: 689b ldr r3, [r3, #8] 8009532: 2b00 cmp r3, #0 8009534: d012 beq.n 800955c { /* Get the next Tx buffer in the list */ txbuffer = txbuffer->next; 8009536: 6afb ldr r3, [r7, #44] @ 0x2c 8009538: 689b ldr r3, [r3, #8] 800953a: 62fb str r3, [r7, #44] @ 0x2c /* Set buffer 2 address */ WRITE_REG(dmatxdesc->DESC1, (uint32_t)txbuffer->buffer); 800953c: 6afb ldr r3, [r7, #44] @ 0x2c 800953e: 681b ldr r3, [r3, #0] 8009540: 461a mov r2, r3 8009542: 6b3b ldr r3, [r7, #48] @ 0x30 8009544: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16)); 8009546: 6b3b ldr r3, [r7, #48] @ 0x30 8009548: 689a ldr r2, [r3, #8] 800954a: 4b16 ldr r3, [pc, #88] @ (80095a4 ) 800954c: 4013 ands r3, r2 800954e: 6afa ldr r2, [r7, #44] @ 0x2c 8009550: 6852 ldr r2, [r2, #4] 8009552: 0412 lsls r2, r2, #16 8009554: 431a orrs r2, r3 8009556: 6b3b ldr r3, [r7, #48] @ 0x30 8009558: 609a str r2, [r3, #8] 800955a: e008 b.n 800956e } else { WRITE_REG(dmatxdesc->DESC1, 0x0U); 800955c: 6b3b ldr r3, [r7, #48] @ 0x30 800955e: 2200 movs r2, #0 8009560: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U); 8009562: 6b3b ldr r3, [r7, #48] @ 0x30 8009564: 689a ldr r2, [r3, #8] 8009566: 4b0f ldr r3, [pc, #60] @ (80095a4 ) 8009568: 4013 ands r3, r2 800956a: 6b3a ldr r2, [r7, #48] @ 0x30 800956c: 6093 str r3, [r2, #8] } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET) 800956e: 68bb ldr r3, [r7, #8] 8009570: 681b ldr r3, [r3, #0] 8009572: f003 0310 and.w r3, r3, #16 8009576: 2b00 cmp r3, #0 8009578: d018 beq.n 80095ac { /* Set TCP payload length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TPL, pTxConfig->PayloadLen); 800957a: 6b3b ldr r3, [r7, #48] @ 0x30 800957c: 68da ldr r2, [r3, #12] 800957e: 4b0a ldr r3, [pc, #40] @ (80095a8 ) 8009580: 4013 ands r3, r2 8009582: 68ba ldr r2, [r7, #8] 8009584: 69d2 ldr r2, [r2, #28] 8009586: 431a orrs r2, r3 8009588: 6b3b ldr r3, [r7, #48] @ 0x30 800958a: 60da str r2, [r3, #12] /* Set TCP Segmentation Enabled bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE); 800958c: 6b3b ldr r3, [r7, #48] @ 0x30 800958e: 68db ldr r3, [r3, #12] 8009590: f443 2280 orr.w r2, r3, #262144 @ 0x40000 8009594: 6b3b ldr r3, [r7, #48] @ 0x30 8009596: 60da str r2, [r3, #12] 8009598: e020 b.n 80095dc 800959a: bf00 nop 800959c: ffff8000 .word 0xffff8000 80095a0: ffffc000 .word 0xffffc000 80095a4: c000ffff .word 0xc000ffff 80095a8: fffc0000 .word 0xfffc0000 } else { /* Set the packet length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FL, pTxConfig->Length); 80095ac: 6b3b ldr r3, [r7, #48] @ 0x30 80095ae: 68da ldr r2, [r3, #12] 80095b0: 4b36 ldr r3, [pc, #216] @ (800968c ) 80095b2: 4013 ands r3, r2 80095b4: 68ba ldr r2, [r7, #8] 80095b6: 6852 ldr r2, [r2, #4] 80095b8: 431a orrs r2, r3 80095ba: 6b3b ldr r3, [r7, #48] @ 0x30 80095bc: 60da str r2, [r3, #12] if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != (uint32_t)RESET) 80095be: 68bb ldr r3, [r7, #8] 80095c0: 681b ldr r3, [r3, #0] 80095c2: f003 0301 and.w r3, r3, #1 80095c6: 2b00 cmp r3, #0 80095c8: d008 beq.n 80095dc { /* Checksum Insertion Control */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CIC, pTxConfig->ChecksumCtrl); 80095ca: 6b3b ldr r3, [r7, #48] @ 0x30 80095cc: 68db ldr r3, [r3, #12] 80095ce: f423 3240 bic.w r2, r3, #196608 @ 0x30000 80095d2: 68bb ldr r3, [r7, #8] 80095d4: 695b ldr r3, [r3, #20] 80095d6: 431a orrs r2, r3 80095d8: 6b3b ldr r3, [r7, #48] @ 0x30 80095da: 60da str r2, [r3, #12] } } bd_count += 1U; 80095dc: 6abb ldr r3, [r7, #40] @ 0x28 80095de: 3301 adds r3, #1 80095e0: 62bb str r3, [r7, #40] @ 0x28 __ASM volatile ("dmb 0xF":::"memory"); 80095e2: f3bf 8f5f dmb sy } 80095e6: 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); 80095e8: 6b3b ldr r3, [r7, #48] @ 0x30 80095ea: 68db ldr r3, [r3, #12] 80095ec: f043 4200 orr.w r2, r3, #2147483648 @ 0x80000000 80095f0: 6b3b ldr r3, [r7, #48] @ 0x30 80095f2: 60da str r2, [r3, #12] /* Mark it as NORMAL descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CTXT); 80095f4: 6b3b ldr r3, [r7, #48] @ 0x30 80095f6: 68db ldr r3, [r3, #12] 80095f8: f023 4280 bic.w r2, r3, #1073741824 @ 0x40000000 80095fc: 6b3b ldr r3, [r7, #48] @ 0x30 80095fe: 60da str r2, [r3, #12] while (txbuffer->next != NULL) 8009600: 6afb ldr r3, [r7, #44] @ 0x2c 8009602: 689b ldr r3, [r3, #8] 8009604: 2b00 cmp r3, #0 8009606: f47f af2b bne.w 8009460 } if (ItMode != ((uint32_t)RESET)) 800960a: 687b ldr r3, [r7, #4] 800960c: 2b00 cmp r3, #0 800960e: d006 beq.n 800961e { /* Set Interrupt on completion bit */ SET_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC); 8009610: 6b3b ldr r3, [r7, #48] @ 0x30 8009612: 689b ldr r3, [r3, #8] 8009614: f043 4200 orr.w r2, r3, #2147483648 @ 0x80000000 8009618: 6b3b ldr r3, [r7, #48] @ 0x30 800961a: 609a str r2, [r3, #8] 800961c: e005 b.n 800962a } else { /* Clear Interrupt on completion bit */ CLEAR_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC); 800961e: 6b3b ldr r3, [r7, #48] @ 0x30 8009620: 689b ldr r3, [r3, #8] 8009622: f023 4200 bic.w r2, r3, #2147483648 @ 0x80000000 8009626: 6b3b ldr r3, [r7, #48] @ 0x30 8009628: 609a str r2, [r3, #8] } /* Mark it as LAST descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_LD); 800962a: 6b3b ldr r3, [r7, #48] @ 0x30 800962c: 68db ldr r3, [r3, #12] 800962e: f043 5280 orr.w r2, r3, #268435456 @ 0x10000000 8009632: 6b3b ldr r3, [r7, #48] @ 0x30 8009634: 60da str r2, [r3, #12] /* Save the current packet address to expose it to the application */ dmatxdesclist->PacketAddress[descidx] = dmatxdesclist->CurrentPacketAddress; 8009636: 6a7b ldr r3, [r7, #36] @ 0x24 8009638: 6a5a ldr r2, [r3, #36] @ 0x24 800963a: 6a79 ldr r1, [r7, #36] @ 0x24 800963c: 6bfb ldr r3, [r7, #60] @ 0x3c 800963e: 3304 adds r3, #4 8009640: 009b lsls r3, r3, #2 8009642: 440b add r3, r1 8009644: 605a str r2, [r3, #4] dmatxdesclist->CurTxDesc = descidx; 8009646: 6a7b ldr r3, [r7, #36] @ 0x24 8009648: 6bfa ldr r2, [r7, #60] @ 0x3c 800964a: 611a str r2, [r3, #16] __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); 800964c: f3ef 8310 mrs r3, PRIMASK 8009650: 613b str r3, [r7, #16] return(result); 8009652: 693b ldr r3, [r7, #16] /* Enter critical section */ primask_bit = __get_PRIMASK(); 8009654: 61fb str r3, [r7, #28] 8009656: 2301 movs r3, #1 8009658: 617b str r3, [r7, #20] __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); 800965a: 697b ldr r3, [r7, #20] 800965c: f383 8810 msr PRIMASK, r3 } 8009660: bf00 nop __set_PRIMASK(1); dmatxdesclist->BuffersInUse += bd_count + 1U; 8009662: 6a7b ldr r3, [r7, #36] @ 0x24 8009664: 6a9a ldr r2, [r3, #40] @ 0x28 8009666: 6abb ldr r3, [r7, #40] @ 0x28 8009668: 4413 add r3, r2 800966a: 1c5a adds r2, r3, #1 800966c: 6a7b ldr r3, [r7, #36] @ 0x24 800966e: 629a str r2, [r3, #40] @ 0x28 8009670: 69fb ldr r3, [r7, #28] 8009672: 61bb str r3, [r7, #24] __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); 8009674: 69bb ldr r3, [r7, #24] 8009676: f383 8810 msr PRIMASK, r3 } 800967a: bf00 nop /* Exit critical section: restore previous priority mask */ __set_PRIMASK(primask_bit); /* Return function status */ return HAL_ETH_ERROR_NONE; 800967c: 2300 movs r3, #0 } 800967e: 4618 mov r0, r3 8009680: 3744 adds r7, #68 @ 0x44 8009682: 46bd mov sp, r7 8009684: f85d 7b04 ldr.w r7, [sp], #4 8009688: 4770 bx lr 800968a: bf00 nop 800968c: ffff8000 .word 0xffff8000 08009690 : * @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) { 8009690: b480 push {r7} 8009692: b089 sub sp, #36 @ 0x24 8009694: af00 add r7, sp, #0 8009696: 6078 str r0, [r7, #4] 8009698: 6039 str r1, [r7, #0] uint32_t position = 0x00U; 800969a: 2300 movs r3, #0 800969c: 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 */ 800969e: 4b89 ldr r3, [pc, #548] @ (80098c4 ) 80096a0: 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) 80096a2: e194 b.n 80099ce { /* Get current io position */ iocurrent = (GPIO_Init->Pin) & (1UL << position); 80096a4: 683b ldr r3, [r7, #0] 80096a6: 681a ldr r2, [r3, #0] 80096a8: 2101 movs r1, #1 80096aa: 69fb ldr r3, [r7, #28] 80096ac: fa01 f303 lsl.w r3, r1, r3 80096b0: 4013 ands r3, r2 80096b2: 613b str r3, [r7, #16] if (iocurrent != 0x00U) 80096b4: 693b ldr r3, [r7, #16] 80096b6: 2b00 cmp r3, #0 80096b8: f000 8186 beq.w 80099c8 { /*--------------------- 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)) 80096bc: 683b ldr r3, [r7, #0] 80096be: 685b ldr r3, [r3, #4] 80096c0: f003 0303 and.w r3, r3, #3 80096c4: 2b01 cmp r3, #1 80096c6: d005 beq.n 80096d4 80096c8: 683b ldr r3, [r7, #0] 80096ca: 685b ldr r3, [r3, #4] 80096cc: f003 0303 and.w r3, r3, #3 80096d0: 2b02 cmp r3, #2 80096d2: d130 bne.n 8009736 { /* Check the Speed parameter */ assert_param(IS_GPIO_SPEED(GPIO_Init->Speed)); /* Configure the IO Speed */ temp = GPIOx->OSPEEDR; 80096d4: 687b ldr r3, [r7, #4] 80096d6: 689b ldr r3, [r3, #8] 80096d8: 61bb str r3, [r7, #24] temp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * 2U)); 80096da: 69fb ldr r3, [r7, #28] 80096dc: 005b lsls r3, r3, #1 80096de: 2203 movs r2, #3 80096e0: fa02 f303 lsl.w r3, r2, r3 80096e4: 43db mvns r3, r3 80096e6: 69ba ldr r2, [r7, #24] 80096e8: 4013 ands r3, r2 80096ea: 61bb str r3, [r7, #24] temp |= (GPIO_Init->Speed << (position * 2U)); 80096ec: 683b ldr r3, [r7, #0] 80096ee: 68da ldr r2, [r3, #12] 80096f0: 69fb ldr r3, [r7, #28] 80096f2: 005b lsls r3, r3, #1 80096f4: fa02 f303 lsl.w r3, r2, r3 80096f8: 69ba ldr r2, [r7, #24] 80096fa: 4313 orrs r3, r2 80096fc: 61bb str r3, [r7, #24] GPIOx->OSPEEDR = temp; 80096fe: 687b ldr r3, [r7, #4] 8009700: 69ba ldr r2, [r7, #24] 8009702: 609a str r2, [r3, #8] /* Configure the IO Output Type */ temp = GPIOx->OTYPER; 8009704: 687b ldr r3, [r7, #4] 8009706: 685b ldr r3, [r3, #4] 8009708: 61bb str r3, [r7, #24] temp &= ~(GPIO_OTYPER_OT0 << position) ; 800970a: 2201 movs r2, #1 800970c: 69fb ldr r3, [r7, #28] 800970e: fa02 f303 lsl.w r3, r2, r3 8009712: 43db mvns r3, r3 8009714: 69ba ldr r2, [r7, #24] 8009716: 4013 ands r3, r2 8009718: 61bb str r3, [r7, #24] temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position); 800971a: 683b ldr r3, [r7, #0] 800971c: 685b ldr r3, [r3, #4] 800971e: 091b lsrs r3, r3, #4 8009720: f003 0201 and.w r2, r3, #1 8009724: 69fb ldr r3, [r7, #28] 8009726: fa02 f303 lsl.w r3, r2, r3 800972a: 69ba ldr r2, [r7, #24] 800972c: 4313 orrs r3, r2 800972e: 61bb str r3, [r7, #24] GPIOx->OTYPER = temp; 8009730: 687b ldr r3, [r7, #4] 8009732: 69ba ldr r2, [r7, #24] 8009734: 605a str r2, [r3, #4] } if ((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG) 8009736: 683b ldr r3, [r7, #0] 8009738: 685b ldr r3, [r3, #4] 800973a: f003 0303 and.w r3, r3, #3 800973e: 2b03 cmp r3, #3 8009740: d017 beq.n 8009772 { /* 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; 8009742: 687b ldr r3, [r7, #4] 8009744: 68db ldr r3, [r3, #12] 8009746: 61bb str r3, [r7, #24] temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2U)); 8009748: 69fb ldr r3, [r7, #28] 800974a: 005b lsls r3, r3, #1 800974c: 2203 movs r2, #3 800974e: fa02 f303 lsl.w r3, r2, r3 8009752: 43db mvns r3, r3 8009754: 69ba ldr r2, [r7, #24] 8009756: 4013 ands r3, r2 8009758: 61bb str r3, [r7, #24] temp |= ((GPIO_Init->Pull) << (position * 2U)); 800975a: 683b ldr r3, [r7, #0] 800975c: 689a ldr r2, [r3, #8] 800975e: 69fb ldr r3, [r7, #28] 8009760: 005b lsls r3, r3, #1 8009762: fa02 f303 lsl.w r3, r2, r3 8009766: 69ba ldr r2, [r7, #24] 8009768: 4313 orrs r3, r2 800976a: 61bb str r3, [r7, #24] GPIOx->PUPDR = temp; 800976c: 687b ldr r3, [r7, #4] 800976e: 69ba ldr r2, [r7, #24] 8009770: 60da str r2, [r3, #12] } /* In case of Alternate function mode selection */ if ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF) 8009772: 683b ldr r3, [r7, #0] 8009774: 685b ldr r3, [r3, #4] 8009776: f003 0303 and.w r3, r3, #3 800977a: 2b02 cmp r3, #2 800977c: d123 bne.n 80097c6 /* 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]; 800977e: 69fb ldr r3, [r7, #28] 8009780: 08da lsrs r2, r3, #3 8009782: 687b ldr r3, [r7, #4] 8009784: 3208 adds r2, #8 8009786: f853 3022 ldr.w r3, [r3, r2, lsl #2] 800978a: 61bb str r3, [r7, #24] temp &= ~(0xFU << ((position & 0x07U) * 4U)); 800978c: 69fb ldr r3, [r7, #28] 800978e: f003 0307 and.w r3, r3, #7 8009792: 009b lsls r3, r3, #2 8009794: 220f movs r2, #15 8009796: fa02 f303 lsl.w r3, r2, r3 800979a: 43db mvns r3, r3 800979c: 69ba ldr r2, [r7, #24] 800979e: 4013 ands r3, r2 80097a0: 61bb str r3, [r7, #24] temp |= ((GPIO_Init->Alternate) << ((position & 0x07U) * 4U)); 80097a2: 683b ldr r3, [r7, #0] 80097a4: 691a ldr r2, [r3, #16] 80097a6: 69fb ldr r3, [r7, #28] 80097a8: f003 0307 and.w r3, r3, #7 80097ac: 009b lsls r3, r3, #2 80097ae: fa02 f303 lsl.w r3, r2, r3 80097b2: 69ba ldr r2, [r7, #24] 80097b4: 4313 orrs r3, r2 80097b6: 61bb str r3, [r7, #24] GPIOx->AFR[position >> 3U] = temp; 80097b8: 69fb ldr r3, [r7, #28] 80097ba: 08da lsrs r2, r3, #3 80097bc: 687b ldr r3, [r7, #4] 80097be: 3208 adds r2, #8 80097c0: 69b9 ldr r1, [r7, #24] 80097c2: f843 1022 str.w r1, [r3, r2, lsl #2] } /* Configure IO Direction mode (Input, Output, Alternate or Analog) */ temp = GPIOx->MODER; 80097c6: 687b ldr r3, [r7, #4] 80097c8: 681b ldr r3, [r3, #0] 80097ca: 61bb str r3, [r7, #24] temp &= ~(GPIO_MODER_MODE0 << (position * 2U)); 80097cc: 69fb ldr r3, [r7, #28] 80097ce: 005b lsls r3, r3, #1 80097d0: 2203 movs r2, #3 80097d2: fa02 f303 lsl.w r3, r2, r3 80097d6: 43db mvns r3, r3 80097d8: 69ba ldr r2, [r7, #24] 80097da: 4013 ands r3, r2 80097dc: 61bb str r3, [r7, #24] temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2U)); 80097de: 683b ldr r3, [r7, #0] 80097e0: 685b ldr r3, [r3, #4] 80097e2: f003 0203 and.w r2, r3, #3 80097e6: 69fb ldr r3, [r7, #28] 80097e8: 005b lsls r3, r3, #1 80097ea: fa02 f303 lsl.w r3, r2, r3 80097ee: 69ba ldr r2, [r7, #24] 80097f0: 4313 orrs r3, r2 80097f2: 61bb str r3, [r7, #24] GPIOx->MODER = temp; 80097f4: 687b ldr r3, [r7, #4] 80097f6: 69ba ldr r2, [r7, #24] 80097f8: 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) 80097fa: 683b ldr r3, [r7, #0] 80097fc: 685b ldr r3, [r3, #4] 80097fe: f403 3340 and.w r3, r3, #196608 @ 0x30000 8009802: 2b00 cmp r3, #0 8009804: f000 80e0 beq.w 80099c8 { /* Enable SYSCFG Clock */ __HAL_RCC_SYSCFG_CLK_ENABLE(); 8009808: 4b2f ldr r3, [pc, #188] @ (80098c8 ) 800980a: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 800980e: 4a2e ldr r2, [pc, #184] @ (80098c8 ) 8009810: f043 0302 orr.w r3, r3, #2 8009814: f8c2 30f4 str.w r3, [r2, #244] @ 0xf4 8009818: 4b2b ldr r3, [pc, #172] @ (80098c8 ) 800981a: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 800981e: f003 0302 and.w r3, r3, #2 8009822: 60fb str r3, [r7, #12] 8009824: 68fb ldr r3, [r7, #12] temp = SYSCFG->EXTICR[position >> 2U]; 8009826: 4a29 ldr r2, [pc, #164] @ (80098cc ) 8009828: 69fb ldr r3, [r7, #28] 800982a: 089b lsrs r3, r3, #2 800982c: 3302 adds r3, #2 800982e: f852 3023 ldr.w r3, [r2, r3, lsl #2] 8009832: 61bb str r3, [r7, #24] temp &= ~(0x0FUL << (4U * (position & 0x03U))); 8009834: 69fb ldr r3, [r7, #28] 8009836: f003 0303 and.w r3, r3, #3 800983a: 009b lsls r3, r3, #2 800983c: 220f movs r2, #15 800983e: fa02 f303 lsl.w r3, r2, r3 8009842: 43db mvns r3, r3 8009844: 69ba ldr r2, [r7, #24] 8009846: 4013 ands r3, r2 8009848: 61bb str r3, [r7, #24] temp |= (GPIO_GET_INDEX(GPIOx) << (4U * (position & 0x03U))); 800984a: 687b ldr r3, [r7, #4] 800984c: 4a20 ldr r2, [pc, #128] @ (80098d0 ) 800984e: 4293 cmp r3, r2 8009850: d052 beq.n 80098f8 8009852: 687b ldr r3, [r7, #4] 8009854: 4a1f ldr r2, [pc, #124] @ (80098d4 ) 8009856: 4293 cmp r3, r2 8009858: d031 beq.n 80098be 800985a: 687b ldr r3, [r7, #4] 800985c: 4a1e ldr r2, [pc, #120] @ (80098d8 ) 800985e: 4293 cmp r3, r2 8009860: d02b beq.n 80098ba 8009862: 687b ldr r3, [r7, #4] 8009864: 4a1d ldr r2, [pc, #116] @ (80098dc ) 8009866: 4293 cmp r3, r2 8009868: d025 beq.n 80098b6 800986a: 687b ldr r3, [r7, #4] 800986c: 4a1c ldr r2, [pc, #112] @ (80098e0 ) 800986e: 4293 cmp r3, r2 8009870: d01f beq.n 80098b2 8009872: 687b ldr r3, [r7, #4] 8009874: 4a1b ldr r2, [pc, #108] @ (80098e4 ) 8009876: 4293 cmp r3, r2 8009878: d019 beq.n 80098ae 800987a: 687b ldr r3, [r7, #4] 800987c: 4a1a ldr r2, [pc, #104] @ (80098e8 ) 800987e: 4293 cmp r3, r2 8009880: d013 beq.n 80098aa 8009882: 687b ldr r3, [r7, #4] 8009884: 4a19 ldr r2, [pc, #100] @ (80098ec ) 8009886: 4293 cmp r3, r2 8009888: d00d beq.n 80098a6 800988a: 687b ldr r3, [r7, #4] 800988c: 4a18 ldr r2, [pc, #96] @ (80098f0 ) 800988e: 4293 cmp r3, r2 8009890: d007 beq.n 80098a2 8009892: 687b ldr r3, [r7, #4] 8009894: 4a17 ldr r2, [pc, #92] @ (80098f4 ) 8009896: 4293 cmp r3, r2 8009898: d101 bne.n 800989e 800989a: 2309 movs r3, #9 800989c: e02d b.n 80098fa 800989e: 230a movs r3, #10 80098a0: e02b b.n 80098fa 80098a2: 2308 movs r3, #8 80098a4: e029 b.n 80098fa 80098a6: 2307 movs r3, #7 80098a8: e027 b.n 80098fa 80098aa: 2306 movs r3, #6 80098ac: e025 b.n 80098fa 80098ae: 2305 movs r3, #5 80098b0: e023 b.n 80098fa 80098b2: 2304 movs r3, #4 80098b4: e021 b.n 80098fa 80098b6: 2303 movs r3, #3 80098b8: e01f b.n 80098fa 80098ba: 2302 movs r3, #2 80098bc: e01d b.n 80098fa 80098be: 2301 movs r3, #1 80098c0: e01b b.n 80098fa 80098c2: bf00 nop 80098c4: 58000080 .word 0x58000080 80098c8: 58024400 .word 0x58024400 80098cc: 58000400 .word 0x58000400 80098d0: 58020000 .word 0x58020000 80098d4: 58020400 .word 0x58020400 80098d8: 58020800 .word 0x58020800 80098dc: 58020c00 .word 0x58020c00 80098e0: 58021000 .word 0x58021000 80098e4: 58021400 .word 0x58021400 80098e8: 58021800 .word 0x58021800 80098ec: 58021c00 .word 0x58021c00 80098f0: 58022000 .word 0x58022000 80098f4: 58022400 .word 0x58022400 80098f8: 2300 movs r3, #0 80098fa: 69fa ldr r2, [r7, #28] 80098fc: f002 0203 and.w r2, r2, #3 8009900: 0092 lsls r2, r2, #2 8009902: 4093 lsls r3, r2 8009904: 69ba ldr r2, [r7, #24] 8009906: 4313 orrs r3, r2 8009908: 61bb str r3, [r7, #24] SYSCFG->EXTICR[position >> 2U] = temp; 800990a: 4938 ldr r1, [pc, #224] @ (80099ec ) 800990c: 69fb ldr r3, [r7, #28] 800990e: 089b lsrs r3, r3, #2 8009910: 3302 adds r3, #2 8009912: 69ba ldr r2, [r7, #24] 8009914: f841 2023 str.w r2, [r1, r3, lsl #2] /* Clear Rising Falling edge configuration */ temp = EXTI->RTSR1; 8009918: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800991c: 681b ldr r3, [r3, #0] 800991e: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 8009920: 693b ldr r3, [r7, #16] 8009922: 43db mvns r3, r3 8009924: 69ba ldr r2, [r7, #24] 8009926: 4013 ands r3, r2 8009928: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & TRIGGER_RISING) != 0x00U) 800992a: 683b ldr r3, [r7, #0] 800992c: 685b ldr r3, [r3, #4] 800992e: f403 1380 and.w r3, r3, #1048576 @ 0x100000 8009932: 2b00 cmp r3, #0 8009934: d003 beq.n 800993e { temp |= iocurrent; 8009936: 69ba ldr r2, [r7, #24] 8009938: 693b ldr r3, [r7, #16] 800993a: 4313 orrs r3, r2 800993c: 61bb str r3, [r7, #24] } EXTI->RTSR1 = temp; 800993e: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 8009942: 69bb ldr r3, [r7, #24] 8009944: 6013 str r3, [r2, #0] temp = EXTI->FTSR1; 8009946: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800994a: 685b ldr r3, [r3, #4] 800994c: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 800994e: 693b ldr r3, [r7, #16] 8009950: 43db mvns r3, r3 8009952: 69ba ldr r2, [r7, #24] 8009954: 4013 ands r3, r2 8009956: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00U) 8009958: 683b ldr r3, [r7, #0] 800995a: 685b ldr r3, [r3, #4] 800995c: f403 1300 and.w r3, r3, #2097152 @ 0x200000 8009960: 2b00 cmp r3, #0 8009962: d003 beq.n 800996c { temp |= iocurrent; 8009964: 69ba ldr r2, [r7, #24] 8009966: 693b ldr r3, [r7, #16] 8009968: 4313 orrs r3, r2 800996a: 61bb str r3, [r7, #24] } EXTI->FTSR1 = temp; 800996c: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 8009970: 69bb ldr r3, [r7, #24] 8009972: 6053 str r3, [r2, #4] temp = EXTI_CurrentCPU->EMR1; 8009974: 697b ldr r3, [r7, #20] 8009976: 685b ldr r3, [r3, #4] 8009978: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 800997a: 693b ldr r3, [r7, #16] 800997c: 43db mvns r3, r3 800997e: 69ba ldr r2, [r7, #24] 8009980: 4013 ands r3, r2 8009982: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & EXTI_EVT) != 0x00U) 8009984: 683b ldr r3, [r7, #0] 8009986: 685b ldr r3, [r3, #4] 8009988: f403 3300 and.w r3, r3, #131072 @ 0x20000 800998c: 2b00 cmp r3, #0 800998e: d003 beq.n 8009998 { temp |= iocurrent; 8009990: 69ba ldr r2, [r7, #24] 8009992: 693b ldr r3, [r7, #16] 8009994: 4313 orrs r3, r2 8009996: 61bb str r3, [r7, #24] } EXTI_CurrentCPU->EMR1 = temp; 8009998: 697b ldr r3, [r7, #20] 800999a: 69ba ldr r2, [r7, #24] 800999c: 605a str r2, [r3, #4] /* Clear EXTI line configuration */ temp = EXTI_CurrentCPU->IMR1; 800999e: 697b ldr r3, [r7, #20] 80099a0: 681b ldr r3, [r3, #0] 80099a2: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 80099a4: 693b ldr r3, [r7, #16] 80099a6: 43db mvns r3, r3 80099a8: 69ba ldr r2, [r7, #24] 80099aa: 4013 ands r3, r2 80099ac: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & EXTI_IT) != 0x00U) 80099ae: 683b ldr r3, [r7, #0] 80099b0: 685b ldr r3, [r3, #4] 80099b2: f403 3380 and.w r3, r3, #65536 @ 0x10000 80099b6: 2b00 cmp r3, #0 80099b8: d003 beq.n 80099c2 { temp |= iocurrent; 80099ba: 69ba ldr r2, [r7, #24] 80099bc: 693b ldr r3, [r7, #16] 80099be: 4313 orrs r3, r2 80099c0: 61bb str r3, [r7, #24] } EXTI_CurrentCPU->IMR1 = temp; 80099c2: 697b ldr r3, [r7, #20] 80099c4: 69ba ldr r2, [r7, #24] 80099c6: 601a str r2, [r3, #0] } } position++; 80099c8: 69fb ldr r3, [r7, #28] 80099ca: 3301 adds r3, #1 80099cc: 61fb str r3, [r7, #28] while (((GPIO_Init->Pin) >> position) != 0x00U) 80099ce: 683b ldr r3, [r7, #0] 80099d0: 681a ldr r2, [r3, #0] 80099d2: 69fb ldr r3, [r7, #28] 80099d4: fa22 f303 lsr.w r3, r2, r3 80099d8: 2b00 cmp r3, #0 80099da: f47f ae63 bne.w 80096a4 } } 80099de: bf00 nop 80099e0: bf00 nop 80099e2: 3724 adds r7, #36 @ 0x24 80099e4: 46bd mov sp, r7 80099e6: f85d 7b04 ldr.w r7, [sp], #4 80099ea: 4770 bx lr 80099ec: 58000400 .word 0x58000400 080099f0 : * @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) { 80099f0: b480 push {r7} 80099f2: b083 sub sp, #12 80099f4: af00 add r7, sp, #0 80099f6: 6078 str r0, [r7, #4] 80099f8: 460b mov r3, r1 80099fa: 807b strh r3, [r7, #2] 80099fc: 4613 mov r3, r2 80099fe: 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) 8009a00: 787b ldrb r3, [r7, #1] 8009a02: 2b00 cmp r3, #0 8009a04: d003 beq.n 8009a0e { GPIOx->BSRR = GPIO_Pin; 8009a06: 887a ldrh r2, [r7, #2] 8009a08: 687b ldr r3, [r7, #4] 8009a0a: 619a str r2, [r3, #24] } else { GPIOx->BSRR = (uint32_t)GPIO_Pin << GPIO_NUMBER; } } 8009a0c: e003 b.n 8009a16 GPIOx->BSRR = (uint32_t)GPIO_Pin << GPIO_NUMBER; 8009a0e: 887b ldrh r3, [r7, #2] 8009a10: 041a lsls r2, r3, #16 8009a12: 687b ldr r3, [r7, #4] 8009a14: 619a str r2, [r3, #24] } 8009a16: bf00 nop 8009a18: 370c adds r7, #12 8009a1a: 46bd mov sp, r7 8009a1c: f85d 7b04 ldr.w r7, [sp], #4 8009a20: 4770 bx lr ... 08009a24 : * 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) { 8009a24: b580 push {r7, lr} 8009a26: b084 sub sp, #16 8009a28: af00 add r7, sp, #0 8009a2a: 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) 8009a2c: 4b19 ldr r3, [pc, #100] @ (8009a94 ) 8009a2e: 68db ldr r3, [r3, #12] 8009a30: f003 0304 and.w r3, r3, #4 8009a34: 2b04 cmp r3, #4 8009a36: d00a beq.n 8009a4e #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) 8009a38: 4b16 ldr r3, [pc, #88] @ (8009a94 ) 8009a3a: 68db ldr r3, [r3, #12] 8009a3c: f003 0307 and.w r3, r3, #7 8009a40: 687a ldr r2, [r7, #4] 8009a42: 429a cmp r2, r3 8009a44: d001 beq.n 8009a4a { /* Supply configuration update locked, can't apply a new supply config */ return HAL_ERROR; 8009a46: 2301 movs r3, #1 8009a48: e01f b.n 8009a8a else { /* Supply configuration update locked, but new supply configuration matches with old supply configuration : nothing to do */ return HAL_OK; 8009a4a: 2300 movs r3, #0 8009a4c: e01d b.n 8009a8a } } /* Set the power supply configuration */ MODIFY_REG (PWR->CR3, PWR_SUPPLY_CONFIG_MASK, SupplySource); 8009a4e: 4b11 ldr r3, [pc, #68] @ (8009a94 ) 8009a50: 68db ldr r3, [r3, #12] 8009a52: f023 0207 bic.w r2, r3, #7 8009a56: 490f ldr r1, [pc, #60] @ (8009a94 ) 8009a58: 687b ldr r3, [r7, #4] 8009a5a: 4313 orrs r3, r2 8009a5c: 60cb str r3, [r1, #12] /* Get tick */ tickstart = HAL_GetTick (); 8009a5e: f7fb fae7 bl 8005030 8009a62: 60f8 str r0, [r7, #12] /* Wait till voltage level flag is set */ while (__HAL_PWR_GET_FLAG (PWR_FLAG_ACTVOSRDY) == 0U) 8009a64: e009 b.n 8009a7a { if ((HAL_GetTick () - tickstart) > PWR_FLAG_SETTING_DELAY) 8009a66: f7fb fae3 bl 8005030 8009a6a: 4602 mov r2, r0 8009a6c: 68fb ldr r3, [r7, #12] 8009a6e: 1ad3 subs r3, r2, r3 8009a70: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8 8009a74: d901 bls.n 8009a7a { return HAL_ERROR; 8009a76: 2301 movs r3, #1 8009a78: e007 b.n 8009a8a while (__HAL_PWR_GET_FLAG (PWR_FLAG_ACTVOSRDY) == 0U) 8009a7a: 4b06 ldr r3, [pc, #24] @ (8009a94 ) 8009a7c: 685b ldr r3, [r3, #4] 8009a7e: f403 5300 and.w r3, r3, #8192 @ 0x2000 8009a82: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 8009a86: d1ee bne.n 8009a66 } } } #endif /* defined (SMPS) */ return HAL_OK; 8009a88: 2300 movs r3, #0 } 8009a8a: 4618 mov r0, r3 8009a8c: 3710 adds r7, #16 8009a8e: 46bd mov sp, r7 8009a90: bd80 pop {r7, pc} 8009a92: bf00 nop 8009a94: 58024800 .word 0x58024800 08009a98 : * 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) { 8009a98: b580 push {r7, lr} 8009a9a: b08c sub sp, #48 @ 0x30 8009a9c: af00 add r7, sp, #0 8009a9e: 6078 str r0, [r7, #4] uint32_t tickstart; uint32_t temp1_pllckcfg, temp2_pllckcfg; /* Check Null pointer */ if (RCC_OscInitStruct == NULL) 8009aa0: 687b ldr r3, [r7, #4] 8009aa2: 2b00 cmp r3, #0 8009aa4: d102 bne.n 8009aac { return HAL_ERROR; 8009aa6: 2301 movs r3, #1 8009aa8: f000 bc48 b.w 800a33c } /* Check the parameters */ assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType)); /*------------------------------- HSE Configuration ------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE) 8009aac: 687b ldr r3, [r7, #4] 8009aae: 681b ldr r3, [r3, #0] 8009ab0: f003 0301 and.w r3, r3, #1 8009ab4: 2b00 cmp r3, #0 8009ab6: f000 8088 beq.w 8009bca { /* Check the parameters */ assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState)); const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); 8009aba: 4b99 ldr r3, [pc, #612] @ (8009d20 ) 8009abc: 691b ldr r3, [r3, #16] 8009abe: f003 0338 and.w r3, r3, #56 @ 0x38 8009ac2: 62fb str r3, [r7, #44] @ 0x2c const uint32_t temp_pllckselr = RCC->PLLCKSELR; 8009ac4: 4b96 ldr r3, [pc, #600] @ (8009d20 ) 8009ac6: 6a9b ldr r3, [r3, #40] @ 0x28 8009ac8: 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))) 8009aca: 6afb ldr r3, [r7, #44] @ 0x2c 8009acc: 2b10 cmp r3, #16 8009ace: d007 beq.n 8009ae0 8009ad0: 6afb ldr r3, [r7, #44] @ 0x2c 8009ad2: 2b18 cmp r3, #24 8009ad4: d111 bne.n 8009afa 8009ad6: 6abb ldr r3, [r7, #40] @ 0x28 8009ad8: f003 0303 and.w r3, r3, #3 8009adc: 2b02 cmp r3, #2 8009ade: d10c bne.n 8009afa { if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) 8009ae0: 4b8f ldr r3, [pc, #572] @ (8009d20 ) 8009ae2: 681b ldr r3, [r3, #0] 8009ae4: f403 3300 and.w r3, r3, #131072 @ 0x20000 8009ae8: 2b00 cmp r3, #0 8009aea: d06d beq.n 8009bc8 8009aec: 687b ldr r3, [r7, #4] 8009aee: 685b ldr r3, [r3, #4] 8009af0: 2b00 cmp r3, #0 8009af2: d169 bne.n 8009bc8 { return HAL_ERROR; 8009af4: 2301 movs r3, #1 8009af6: f000 bc21 b.w 800a33c } } else { /* Set the new HSE configuration ---------------------------------------*/ __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState); 8009afa: 687b ldr r3, [r7, #4] 8009afc: 685b ldr r3, [r3, #4] 8009afe: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8009b02: d106 bne.n 8009b12 8009b04: 4b86 ldr r3, [pc, #536] @ (8009d20 ) 8009b06: 681b ldr r3, [r3, #0] 8009b08: 4a85 ldr r2, [pc, #532] @ (8009d20 ) 8009b0a: f443 3380 orr.w r3, r3, #65536 @ 0x10000 8009b0e: 6013 str r3, [r2, #0] 8009b10: e02e b.n 8009b70 8009b12: 687b ldr r3, [r7, #4] 8009b14: 685b ldr r3, [r3, #4] 8009b16: 2b00 cmp r3, #0 8009b18: d10c bne.n 8009b34 8009b1a: 4b81 ldr r3, [pc, #516] @ (8009d20 ) 8009b1c: 681b ldr r3, [r3, #0] 8009b1e: 4a80 ldr r2, [pc, #512] @ (8009d20 ) 8009b20: f423 3380 bic.w r3, r3, #65536 @ 0x10000 8009b24: 6013 str r3, [r2, #0] 8009b26: 4b7e ldr r3, [pc, #504] @ (8009d20 ) 8009b28: 681b ldr r3, [r3, #0] 8009b2a: 4a7d ldr r2, [pc, #500] @ (8009d20 ) 8009b2c: f423 2380 bic.w r3, r3, #262144 @ 0x40000 8009b30: 6013 str r3, [r2, #0] 8009b32: e01d b.n 8009b70 8009b34: 687b ldr r3, [r7, #4] 8009b36: 685b ldr r3, [r3, #4] 8009b38: f5b3 2fa0 cmp.w r3, #327680 @ 0x50000 8009b3c: d10c bne.n 8009b58 8009b3e: 4b78 ldr r3, [pc, #480] @ (8009d20 ) 8009b40: 681b ldr r3, [r3, #0] 8009b42: 4a77 ldr r2, [pc, #476] @ (8009d20 ) 8009b44: f443 2380 orr.w r3, r3, #262144 @ 0x40000 8009b48: 6013 str r3, [r2, #0] 8009b4a: 4b75 ldr r3, [pc, #468] @ (8009d20 ) 8009b4c: 681b ldr r3, [r3, #0] 8009b4e: 4a74 ldr r2, [pc, #464] @ (8009d20 ) 8009b50: f443 3380 orr.w r3, r3, #65536 @ 0x10000 8009b54: 6013 str r3, [r2, #0] 8009b56: e00b b.n 8009b70 8009b58: 4b71 ldr r3, [pc, #452] @ (8009d20 ) 8009b5a: 681b ldr r3, [r3, #0] 8009b5c: 4a70 ldr r2, [pc, #448] @ (8009d20 ) 8009b5e: f423 3380 bic.w r3, r3, #65536 @ 0x10000 8009b62: 6013 str r3, [r2, #0] 8009b64: 4b6e ldr r3, [pc, #440] @ (8009d20 ) 8009b66: 681b ldr r3, [r3, #0] 8009b68: 4a6d ldr r2, [pc, #436] @ (8009d20 ) 8009b6a: f423 2380 bic.w r3, r3, #262144 @ 0x40000 8009b6e: 6013 str r3, [r2, #0] /* Check the HSE State */ if (RCC_OscInitStruct->HSEState != RCC_HSE_OFF) 8009b70: 687b ldr r3, [r7, #4] 8009b72: 685b ldr r3, [r3, #4] 8009b74: 2b00 cmp r3, #0 8009b76: d013 beq.n 8009ba0 { /* Get Start Tick*/ tickstart = HAL_GetTick(); 8009b78: f7fb fa5a bl 8005030 8009b7c: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U) 8009b7e: e008 b.n 8009b92 { if ((uint32_t)(HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) 8009b80: f7fb fa56 bl 8005030 8009b84: 4602 mov r2, r0 8009b86: 6a7b ldr r3, [r7, #36] @ 0x24 8009b88: 1ad3 subs r3, r2, r3 8009b8a: 2b64 cmp r3, #100 @ 0x64 8009b8c: d901 bls.n 8009b92 { return HAL_TIMEOUT; 8009b8e: 2303 movs r3, #3 8009b90: e3d4 b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U) 8009b92: 4b63 ldr r3, [pc, #396] @ (8009d20 ) 8009b94: 681b ldr r3, [r3, #0] 8009b96: f403 3300 and.w r3, r3, #131072 @ 0x20000 8009b9a: 2b00 cmp r3, #0 8009b9c: d0f0 beq.n 8009b80 8009b9e: e014 b.n 8009bca } } else { /* Get Start Tick*/ tickstart = HAL_GetTick(); 8009ba0: f7fb fa46 bl 8005030 8009ba4: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSE is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) 8009ba6: e008 b.n 8009bba { if ((uint32_t)(HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) 8009ba8: f7fb fa42 bl 8005030 8009bac: 4602 mov r2, r0 8009bae: 6a7b ldr r3, [r7, #36] @ 0x24 8009bb0: 1ad3 subs r3, r2, r3 8009bb2: 2b64 cmp r3, #100 @ 0x64 8009bb4: d901 bls.n 8009bba { return HAL_TIMEOUT; 8009bb6: 2303 movs r3, #3 8009bb8: e3c0 b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) 8009bba: 4b59 ldr r3, [pc, #356] @ (8009d20 ) 8009bbc: 681b ldr r3, [r3, #0] 8009bbe: f403 3300 and.w r3, r3, #131072 @ 0x20000 8009bc2: 2b00 cmp r3, #0 8009bc4: d1f0 bne.n 8009ba8 8009bc6: e000 b.n 8009bca if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) 8009bc8: bf00 nop } } } } /*----------------------------- HSI Configuration --------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI) 8009bca: 687b ldr r3, [r7, #4] 8009bcc: 681b ldr r3, [r3, #0] 8009bce: f003 0302 and.w r3, r3, #2 8009bd2: 2b00 cmp r3, #0 8009bd4: f000 80ca beq.w 8009d6c /* 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(); 8009bd8: 4b51 ldr r3, [pc, #324] @ (8009d20 ) 8009bda: 691b ldr r3, [r3, #16] 8009bdc: f003 0338 and.w r3, r3, #56 @ 0x38 8009be0: 623b str r3, [r7, #32] const uint32_t temp_pllckselr = RCC->PLLCKSELR; 8009be2: 4b4f ldr r3, [pc, #316] @ (8009d20 ) 8009be4: 6a9b ldr r3, [r3, #40] @ 0x28 8009be6: 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))) 8009be8: 6a3b ldr r3, [r7, #32] 8009bea: 2b00 cmp r3, #0 8009bec: d007 beq.n 8009bfe 8009bee: 6a3b ldr r3, [r7, #32] 8009bf0: 2b18 cmp r3, #24 8009bf2: d156 bne.n 8009ca2 8009bf4: 69fb ldr r3, [r7, #28] 8009bf6: f003 0303 and.w r3, r3, #3 8009bfa: 2b00 cmp r3, #0 8009bfc: d151 bne.n 8009ca2 { /* 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)) 8009bfe: 4b48 ldr r3, [pc, #288] @ (8009d20 ) 8009c00: 681b ldr r3, [r3, #0] 8009c02: f003 0304 and.w r3, r3, #4 8009c06: 2b00 cmp r3, #0 8009c08: d005 beq.n 8009c16 8009c0a: 687b ldr r3, [r7, #4] 8009c0c: 68db ldr r3, [r3, #12] 8009c0e: 2b00 cmp r3, #0 8009c10: d101 bne.n 8009c16 { return HAL_ERROR; 8009c12: 2301 movs r3, #1 8009c14: e392 b.n 800a33c } /* 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); 8009c16: 4b42 ldr r3, [pc, #264] @ (8009d20 ) 8009c18: 681b ldr r3, [r3, #0] 8009c1a: f023 0219 bic.w r2, r3, #25 8009c1e: 687b ldr r3, [r7, #4] 8009c20: 68db ldr r3, [r3, #12] 8009c22: 493f ldr r1, [pc, #252] @ (8009d20 ) 8009c24: 4313 orrs r3, r2 8009c26: 600b str r3, [r1, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 8009c28: f7fb fa02 bl 8005030 8009c2c: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 8009c2e: e008 b.n 8009c42 { if ((uint32_t)(HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 8009c30: f7fb f9fe bl 8005030 8009c34: 4602 mov r2, r0 8009c36: 6a7b ldr r3, [r7, #36] @ 0x24 8009c38: 1ad3 subs r3, r2, r3 8009c3a: 2b02 cmp r3, #2 8009c3c: d901 bls.n 8009c42 { return HAL_TIMEOUT; 8009c3e: 2303 movs r3, #3 8009c40: e37c b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 8009c42: 4b37 ldr r3, [pc, #220] @ (8009d20 ) 8009c44: 681b ldr r3, [r3, #0] 8009c46: f003 0304 and.w r3, r3, #4 8009c4a: 2b00 cmp r3, #0 8009c4c: d0f0 beq.n 8009c30 } } /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 8009c4e: f7fb fa1f bl 8005090 8009c52: 4603 mov r3, r0 8009c54: f241 0203 movw r2, #4099 @ 0x1003 8009c58: 4293 cmp r3, r2 8009c5a: d817 bhi.n 8009c8c 8009c5c: 687b ldr r3, [r7, #4] 8009c5e: 691b ldr r3, [r3, #16] 8009c60: 2b40 cmp r3, #64 @ 0x40 8009c62: d108 bne.n 8009c76 8009c64: 4b2e ldr r3, [pc, #184] @ (8009d20 ) 8009c66: 685b ldr r3, [r3, #4] 8009c68: f423 337c bic.w r3, r3, #258048 @ 0x3f000 8009c6c: 4a2c ldr r2, [pc, #176] @ (8009d20 ) 8009c6e: f443 3300 orr.w r3, r3, #131072 @ 0x20000 8009c72: 6053 str r3, [r2, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF)) 8009c74: e07a b.n 8009d6c __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 8009c76: 4b2a ldr r3, [pc, #168] @ (8009d20 ) 8009c78: 685b ldr r3, [r3, #4] 8009c7a: f423 327c bic.w r2, r3, #258048 @ 0x3f000 8009c7e: 687b ldr r3, [r7, #4] 8009c80: 691b ldr r3, [r3, #16] 8009c82: 031b lsls r3, r3, #12 8009c84: 4926 ldr r1, [pc, #152] @ (8009d20 ) 8009c86: 4313 orrs r3, r2 8009c88: 604b str r3, [r1, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF)) 8009c8a: e06f b.n 8009d6c __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 8009c8c: 4b24 ldr r3, [pc, #144] @ (8009d20 ) 8009c8e: 685b ldr r3, [r3, #4] 8009c90: f023 42fe bic.w r2, r3, #2130706432 @ 0x7f000000 8009c94: 687b ldr r3, [r7, #4] 8009c96: 691b ldr r3, [r3, #16] 8009c98: 061b lsls r3, r3, #24 8009c9a: 4921 ldr r1, [pc, #132] @ (8009d20 ) 8009c9c: 4313 orrs r3, r2 8009c9e: 604b str r3, [r1, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF)) 8009ca0: e064 b.n 8009d6c } else { /* Check the HSI State */ if ((RCC_OscInitStruct->HSIState) != RCC_HSI_OFF) 8009ca2: 687b ldr r3, [r7, #4] 8009ca4: 68db ldr r3, [r3, #12] 8009ca6: 2b00 cmp r3, #0 8009ca8: d047 beq.n 8009d3a { /* Enable the Internal High Speed oscillator (HSI, HSIDIV2,HSIDIV4, or HSIDIV8) */ __HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIState); 8009caa: 4b1d ldr r3, [pc, #116] @ (8009d20 ) 8009cac: 681b ldr r3, [r3, #0] 8009cae: f023 0219 bic.w r2, r3, #25 8009cb2: 687b ldr r3, [r7, #4] 8009cb4: 68db ldr r3, [r3, #12] 8009cb6: 491a ldr r1, [pc, #104] @ (8009d20 ) 8009cb8: 4313 orrs r3, r2 8009cba: 600b str r3, [r1, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 8009cbc: f7fb f9b8 bl 8005030 8009cc0: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 8009cc2: e008 b.n 8009cd6 { if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 8009cc4: f7fb f9b4 bl 8005030 8009cc8: 4602 mov r2, r0 8009cca: 6a7b ldr r3, [r7, #36] @ 0x24 8009ccc: 1ad3 subs r3, r2, r3 8009cce: 2b02 cmp r3, #2 8009cd0: d901 bls.n 8009cd6 { return HAL_TIMEOUT; 8009cd2: 2303 movs r3, #3 8009cd4: e332 b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 8009cd6: 4b12 ldr r3, [pc, #72] @ (8009d20 ) 8009cd8: 681b ldr r3, [r3, #0] 8009cda: f003 0304 and.w r3, r3, #4 8009cde: 2b00 cmp r3, #0 8009ce0: d0f0 beq.n 8009cc4 } } /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 8009ce2: f7fb f9d5 bl 8005090 8009ce6: 4603 mov r3, r0 8009ce8: f241 0203 movw r2, #4099 @ 0x1003 8009cec: 4293 cmp r3, r2 8009cee: d819 bhi.n 8009d24 8009cf0: 687b ldr r3, [r7, #4] 8009cf2: 691b ldr r3, [r3, #16] 8009cf4: 2b40 cmp r3, #64 @ 0x40 8009cf6: d108 bne.n 8009d0a 8009cf8: 4b09 ldr r3, [pc, #36] @ (8009d20 ) 8009cfa: 685b ldr r3, [r3, #4] 8009cfc: f423 337c bic.w r3, r3, #258048 @ 0x3f000 8009d00: 4a07 ldr r2, [pc, #28] @ (8009d20 ) 8009d02: f443 3300 orr.w r3, r3, #131072 @ 0x20000 8009d06: 6053 str r3, [r2, #4] 8009d08: e030 b.n 8009d6c 8009d0a: 4b05 ldr r3, [pc, #20] @ (8009d20 ) 8009d0c: 685b ldr r3, [r3, #4] 8009d0e: f423 327c bic.w r2, r3, #258048 @ 0x3f000 8009d12: 687b ldr r3, [r7, #4] 8009d14: 691b ldr r3, [r3, #16] 8009d16: 031b lsls r3, r3, #12 8009d18: 4901 ldr r1, [pc, #4] @ (8009d20 ) 8009d1a: 4313 orrs r3, r2 8009d1c: 604b str r3, [r1, #4] 8009d1e: e025 b.n 8009d6c 8009d20: 58024400 .word 0x58024400 8009d24: 4b9a ldr r3, [pc, #616] @ (8009f90 ) 8009d26: 685b ldr r3, [r3, #4] 8009d28: f023 42fe bic.w r2, r3, #2130706432 @ 0x7f000000 8009d2c: 687b ldr r3, [r7, #4] 8009d2e: 691b ldr r3, [r3, #16] 8009d30: 061b lsls r3, r3, #24 8009d32: 4997 ldr r1, [pc, #604] @ (8009f90 ) 8009d34: 4313 orrs r3, r2 8009d36: 604b str r3, [r1, #4] 8009d38: e018 b.n 8009d6c } else { /* Disable the Internal High Speed oscillator (HSI). */ __HAL_RCC_HSI_DISABLE(); 8009d3a: 4b95 ldr r3, [pc, #596] @ (8009f90 ) 8009d3c: 681b ldr r3, [r3, #0] 8009d3e: 4a94 ldr r2, [pc, #592] @ (8009f90 ) 8009d40: f023 0301 bic.w r3, r3, #1 8009d44: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 8009d46: f7fb f973 bl 8005030 8009d4a: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSI is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) 8009d4c: e008 b.n 8009d60 { if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 8009d4e: f7fb f96f bl 8005030 8009d52: 4602 mov r2, r0 8009d54: 6a7b ldr r3, [r7, #36] @ 0x24 8009d56: 1ad3 subs r3, r2, r3 8009d58: 2b02 cmp r3, #2 8009d5a: d901 bls.n 8009d60 { return HAL_TIMEOUT; 8009d5c: 2303 movs r3, #3 8009d5e: e2ed b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) 8009d60: 4b8b ldr r3, [pc, #556] @ (8009f90 ) 8009d62: 681b ldr r3, [r3, #0] 8009d64: f003 0304 and.w r3, r3, #4 8009d68: 2b00 cmp r3, #0 8009d6a: d1f0 bne.n 8009d4e } } } } /*----------------------------- CSI Configuration --------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_CSI) == RCC_OSCILLATORTYPE_CSI) 8009d6c: 687b ldr r3, [r7, #4] 8009d6e: 681b ldr r3, [r3, #0] 8009d70: f003 0310 and.w r3, r3, #16 8009d74: 2b00 cmp r3, #0 8009d76: f000 80a9 beq.w 8009ecc /* 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(); 8009d7a: 4b85 ldr r3, [pc, #532] @ (8009f90 ) 8009d7c: 691b ldr r3, [r3, #16] 8009d7e: f003 0338 and.w r3, r3, #56 @ 0x38 8009d82: 61bb str r3, [r7, #24] const uint32_t temp_pllckselr = RCC->PLLCKSELR; 8009d84: 4b82 ldr r3, [pc, #520] @ (8009f90 ) 8009d86: 6a9b ldr r3, [r3, #40] @ 0x28 8009d88: 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))) 8009d8a: 69bb ldr r3, [r7, #24] 8009d8c: 2b08 cmp r3, #8 8009d8e: d007 beq.n 8009da0 8009d90: 69bb ldr r3, [r7, #24] 8009d92: 2b18 cmp r3, #24 8009d94: d13a bne.n 8009e0c 8009d96: 697b ldr r3, [r7, #20] 8009d98: f003 0303 and.w r3, r3, #3 8009d9c: 2b01 cmp r3, #1 8009d9e: d135 bne.n 8009e0c { /* 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)) 8009da0: 4b7b ldr r3, [pc, #492] @ (8009f90 ) 8009da2: 681b ldr r3, [r3, #0] 8009da4: f403 7380 and.w r3, r3, #256 @ 0x100 8009da8: 2b00 cmp r3, #0 8009daa: d005 beq.n 8009db8 8009dac: 687b ldr r3, [r7, #4] 8009dae: 69db ldr r3, [r3, #28] 8009db0: 2b80 cmp r3, #128 @ 0x80 8009db2: d001 beq.n 8009db8 { return HAL_ERROR; 8009db4: 2301 movs r3, #1 8009db6: e2c1 b.n 800a33c } /* Otherwise, just the calibration is allowed */ else { /* Adjusts the Internal High Speed oscillator (CSI) calibration value.*/ __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 8009db8: f7fb f96a bl 8005090 8009dbc: 4603 mov r3, r0 8009dbe: f241 0203 movw r2, #4099 @ 0x1003 8009dc2: 4293 cmp r3, r2 8009dc4: d817 bhi.n 8009df6 8009dc6: 687b ldr r3, [r7, #4] 8009dc8: 6a1b ldr r3, [r3, #32] 8009dca: 2b20 cmp r3, #32 8009dcc: d108 bne.n 8009de0 8009dce: 4b70 ldr r3, [pc, #448] @ (8009f90 ) 8009dd0: 685b ldr r3, [r3, #4] 8009dd2: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000 8009dd6: 4a6e ldr r2, [pc, #440] @ (8009f90 ) 8009dd8: f043 4380 orr.w r3, r3, #1073741824 @ 0x40000000 8009ddc: 6053 str r3, [r2, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) && (RCC_OscInitStruct->CSIState != RCC_CSI_ON)) 8009dde: e075 b.n 8009ecc __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 8009de0: 4b6b ldr r3, [pc, #428] @ (8009f90 ) 8009de2: 685b ldr r3, [r3, #4] 8009de4: f023 42f8 bic.w r2, r3, #2080374784 @ 0x7c000000 8009de8: 687b ldr r3, [r7, #4] 8009dea: 6a1b ldr r3, [r3, #32] 8009dec: 069b lsls r3, r3, #26 8009dee: 4968 ldr r1, [pc, #416] @ (8009f90 ) 8009df0: 4313 orrs r3, r2 8009df2: 604b str r3, [r1, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) && (RCC_OscInitStruct->CSIState != RCC_CSI_ON)) 8009df4: e06a b.n 8009ecc __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 8009df6: 4b66 ldr r3, [pc, #408] @ (8009f90 ) 8009df8: 68db ldr r3, [r3, #12] 8009dfa: f023 527c bic.w r2, r3, #1056964608 @ 0x3f000000 8009dfe: 687b ldr r3, [r7, #4] 8009e00: 6a1b ldr r3, [r3, #32] 8009e02: 061b lsls r3, r3, #24 8009e04: 4962 ldr r1, [pc, #392] @ (8009f90 ) 8009e06: 4313 orrs r3, r2 8009e08: 60cb str r3, [r1, #12] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) && (RCC_OscInitStruct->CSIState != RCC_CSI_ON)) 8009e0a: e05f b.n 8009ecc } } else { /* Check the CSI State */ if ((RCC_OscInitStruct->CSIState) != RCC_CSI_OFF) 8009e0c: 687b ldr r3, [r7, #4] 8009e0e: 69db ldr r3, [r3, #28] 8009e10: 2b00 cmp r3, #0 8009e12: d042 beq.n 8009e9a { /* Enable the Internal High Speed oscillator (CSI). */ __HAL_RCC_CSI_ENABLE(); 8009e14: 4b5e ldr r3, [pc, #376] @ (8009f90 ) 8009e16: 681b ldr r3, [r3, #0] 8009e18: 4a5d ldr r2, [pc, #372] @ (8009f90 ) 8009e1a: f043 0380 orr.w r3, r3, #128 @ 0x80 8009e1e: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 8009e20: f7fb f906 bl 8005030 8009e24: 6278 str r0, [r7, #36] @ 0x24 /* Wait till CSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U) 8009e26: e008 b.n 8009e3a { if ((HAL_GetTick() - tickstart) > CSI_TIMEOUT_VALUE) 8009e28: f7fb f902 bl 8005030 8009e2c: 4602 mov r2, r0 8009e2e: 6a7b ldr r3, [r7, #36] @ 0x24 8009e30: 1ad3 subs r3, r2, r3 8009e32: 2b02 cmp r3, #2 8009e34: d901 bls.n 8009e3a { return HAL_TIMEOUT; 8009e36: 2303 movs r3, #3 8009e38: e280 b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U) 8009e3a: 4b55 ldr r3, [pc, #340] @ (8009f90 ) 8009e3c: 681b ldr r3, [r3, #0] 8009e3e: f403 7380 and.w r3, r3, #256 @ 0x100 8009e42: 2b00 cmp r3, #0 8009e44: d0f0 beq.n 8009e28 } } /* Adjusts the Internal High Speed oscillator (CSI) calibration value.*/ __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 8009e46: f7fb f923 bl 8005090 8009e4a: 4603 mov r3, r0 8009e4c: f241 0203 movw r2, #4099 @ 0x1003 8009e50: 4293 cmp r3, r2 8009e52: d817 bhi.n 8009e84 8009e54: 687b ldr r3, [r7, #4] 8009e56: 6a1b ldr r3, [r3, #32] 8009e58: 2b20 cmp r3, #32 8009e5a: d108 bne.n 8009e6e 8009e5c: 4b4c ldr r3, [pc, #304] @ (8009f90 ) 8009e5e: 685b ldr r3, [r3, #4] 8009e60: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000 8009e64: 4a4a ldr r2, [pc, #296] @ (8009f90 ) 8009e66: f043 4380 orr.w r3, r3, #1073741824 @ 0x40000000 8009e6a: 6053 str r3, [r2, #4] 8009e6c: e02e b.n 8009ecc 8009e6e: 4b48 ldr r3, [pc, #288] @ (8009f90 ) 8009e70: 685b ldr r3, [r3, #4] 8009e72: f023 42f8 bic.w r2, r3, #2080374784 @ 0x7c000000 8009e76: 687b ldr r3, [r7, #4] 8009e78: 6a1b ldr r3, [r3, #32] 8009e7a: 069b lsls r3, r3, #26 8009e7c: 4944 ldr r1, [pc, #272] @ (8009f90 ) 8009e7e: 4313 orrs r3, r2 8009e80: 604b str r3, [r1, #4] 8009e82: e023 b.n 8009ecc 8009e84: 4b42 ldr r3, [pc, #264] @ (8009f90 ) 8009e86: 68db ldr r3, [r3, #12] 8009e88: f023 527c bic.w r2, r3, #1056964608 @ 0x3f000000 8009e8c: 687b ldr r3, [r7, #4] 8009e8e: 6a1b ldr r3, [r3, #32] 8009e90: 061b lsls r3, r3, #24 8009e92: 493f ldr r1, [pc, #252] @ (8009f90 ) 8009e94: 4313 orrs r3, r2 8009e96: 60cb str r3, [r1, #12] 8009e98: e018 b.n 8009ecc } else { /* Disable the Internal High Speed oscillator (CSI). */ __HAL_RCC_CSI_DISABLE(); 8009e9a: 4b3d ldr r3, [pc, #244] @ (8009f90 ) 8009e9c: 681b ldr r3, [r3, #0] 8009e9e: 4a3c ldr r2, [pc, #240] @ (8009f90 ) 8009ea0: f023 0380 bic.w r3, r3, #128 @ 0x80 8009ea4: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 8009ea6: f7fb f8c3 bl 8005030 8009eaa: 6278 str r0, [r7, #36] @ 0x24 /* Wait till CSI is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) 8009eac: e008 b.n 8009ec0 { if ((HAL_GetTick() - tickstart) > CSI_TIMEOUT_VALUE) 8009eae: f7fb f8bf bl 8005030 8009eb2: 4602 mov r2, r0 8009eb4: 6a7b ldr r3, [r7, #36] @ 0x24 8009eb6: 1ad3 subs r3, r2, r3 8009eb8: 2b02 cmp r3, #2 8009eba: d901 bls.n 8009ec0 { return HAL_TIMEOUT; 8009ebc: 2303 movs r3, #3 8009ebe: e23d b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) 8009ec0: 4b33 ldr r3, [pc, #204] @ (8009f90 ) 8009ec2: 681b ldr r3, [r3, #0] 8009ec4: f403 7380 and.w r3, r3, #256 @ 0x100 8009ec8: 2b00 cmp r3, #0 8009eca: d1f0 bne.n 8009eae } } } } /*------------------------------ LSI Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI) 8009ecc: 687b ldr r3, [r7, #4] 8009ece: 681b ldr r3, [r3, #0] 8009ed0: f003 0308 and.w r3, r3, #8 8009ed4: 2b00 cmp r3, #0 8009ed6: d036 beq.n 8009f46 { /* Check the parameters */ assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState)); /* Check the LSI State */ if ((RCC_OscInitStruct->LSIState) != RCC_LSI_OFF) 8009ed8: 687b ldr r3, [r7, #4] 8009eda: 695b ldr r3, [r3, #20] 8009edc: 2b00 cmp r3, #0 8009ede: d019 beq.n 8009f14 { /* Enable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_ENABLE(); 8009ee0: 4b2b ldr r3, [pc, #172] @ (8009f90 ) 8009ee2: 6f5b ldr r3, [r3, #116] @ 0x74 8009ee4: 4a2a ldr r2, [pc, #168] @ (8009f90 ) 8009ee6: f043 0301 orr.w r3, r3, #1 8009eea: 6753 str r3, [r2, #116] @ 0x74 /* Get Start Tick*/ tickstart = HAL_GetTick(); 8009eec: f7fb f8a0 bl 8005030 8009ef0: 6278 str r0, [r7, #36] @ 0x24 /* Wait till LSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == 0U) 8009ef2: e008 b.n 8009f06 { if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE) 8009ef4: f7fb f89c bl 8005030 8009ef8: 4602 mov r2, r0 8009efa: 6a7b ldr r3, [r7, #36] @ 0x24 8009efc: 1ad3 subs r3, r2, r3 8009efe: 2b02 cmp r3, #2 8009f00: d901 bls.n 8009f06 { return HAL_TIMEOUT; 8009f02: 2303 movs r3, #3 8009f04: e21a b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == 0U) 8009f06: 4b22 ldr r3, [pc, #136] @ (8009f90 ) 8009f08: 6f5b ldr r3, [r3, #116] @ 0x74 8009f0a: f003 0302 and.w r3, r3, #2 8009f0e: 2b00 cmp r3, #0 8009f10: d0f0 beq.n 8009ef4 8009f12: e018 b.n 8009f46 } } else { /* Disable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_DISABLE(); 8009f14: 4b1e ldr r3, [pc, #120] @ (8009f90 ) 8009f16: 6f5b ldr r3, [r3, #116] @ 0x74 8009f18: 4a1d ldr r2, [pc, #116] @ (8009f90 ) 8009f1a: f023 0301 bic.w r3, r3, #1 8009f1e: 6753 str r3, [r2, #116] @ 0x74 /* Get Start Tick*/ tickstart = HAL_GetTick(); 8009f20: f7fb f886 bl 8005030 8009f24: 6278 str r0, [r7, #36] @ 0x24 /* Wait till LSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != 0U) 8009f26: e008 b.n 8009f3a { if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE) 8009f28: f7fb f882 bl 8005030 8009f2c: 4602 mov r2, r0 8009f2e: 6a7b ldr r3, [r7, #36] @ 0x24 8009f30: 1ad3 subs r3, r2, r3 8009f32: 2b02 cmp r3, #2 8009f34: d901 bls.n 8009f3a { return HAL_TIMEOUT; 8009f36: 2303 movs r3, #3 8009f38: e200 b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != 0U) 8009f3a: 4b15 ldr r3, [pc, #84] @ (8009f90 ) 8009f3c: 6f5b ldr r3, [r3, #116] @ 0x74 8009f3e: f003 0302 and.w r3, r3, #2 8009f42: 2b00 cmp r3, #0 8009f44: d1f0 bne.n 8009f28 } } } /*------------------------------ HSI48 Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI48) == RCC_OSCILLATORTYPE_HSI48) 8009f46: 687b ldr r3, [r7, #4] 8009f48: 681b ldr r3, [r3, #0] 8009f4a: f003 0320 and.w r3, r3, #32 8009f4e: 2b00 cmp r3, #0 8009f50: d039 beq.n 8009fc6 { /* Check the parameters */ assert_param(IS_RCC_HSI48(RCC_OscInitStruct->HSI48State)); /* Check the HSI48 State */ if ((RCC_OscInitStruct->HSI48State) != RCC_HSI48_OFF) 8009f52: 687b ldr r3, [r7, #4] 8009f54: 699b ldr r3, [r3, #24] 8009f56: 2b00 cmp r3, #0 8009f58: d01c beq.n 8009f94 { /* Enable the Internal Low Speed oscillator (HSI48). */ __HAL_RCC_HSI48_ENABLE(); 8009f5a: 4b0d ldr r3, [pc, #52] @ (8009f90 ) 8009f5c: 681b ldr r3, [r3, #0] 8009f5e: 4a0c ldr r2, [pc, #48] @ (8009f90 ) 8009f60: f443 5380 orr.w r3, r3, #4096 @ 0x1000 8009f64: 6013 str r3, [r2, #0] /* Get time-out */ tickstart = HAL_GetTick(); 8009f66: f7fb f863 bl 8005030 8009f6a: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSI48 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) == 0U) 8009f6c: e008 b.n 8009f80 { if ((HAL_GetTick() - tickstart) > HSI48_TIMEOUT_VALUE) 8009f6e: f7fb f85f bl 8005030 8009f72: 4602 mov r2, r0 8009f74: 6a7b ldr r3, [r7, #36] @ 0x24 8009f76: 1ad3 subs r3, r2, r3 8009f78: 2b02 cmp r3, #2 8009f7a: d901 bls.n 8009f80 { return HAL_TIMEOUT; 8009f7c: 2303 movs r3, #3 8009f7e: e1dd b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) == 0U) 8009f80: 4b03 ldr r3, [pc, #12] @ (8009f90 ) 8009f82: 681b ldr r3, [r3, #0] 8009f84: f403 5300 and.w r3, r3, #8192 @ 0x2000 8009f88: 2b00 cmp r3, #0 8009f8a: d0f0 beq.n 8009f6e 8009f8c: e01b b.n 8009fc6 8009f8e: bf00 nop 8009f90: 58024400 .word 0x58024400 } } else { /* Disable the Internal Low Speed oscillator (HSI48). */ __HAL_RCC_HSI48_DISABLE(); 8009f94: 4b9b ldr r3, [pc, #620] @ (800a204 ) 8009f96: 681b ldr r3, [r3, #0] 8009f98: 4a9a ldr r2, [pc, #616] @ (800a204 ) 8009f9a: f423 5380 bic.w r3, r3, #4096 @ 0x1000 8009f9e: 6013 str r3, [r2, #0] /* Get time-out */ tickstart = HAL_GetTick(); 8009fa0: f7fb f846 bl 8005030 8009fa4: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSI48 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) != 0U) 8009fa6: e008 b.n 8009fba { if ((HAL_GetTick() - tickstart) > HSI48_TIMEOUT_VALUE) 8009fa8: f7fb f842 bl 8005030 8009fac: 4602 mov r2, r0 8009fae: 6a7b ldr r3, [r7, #36] @ 0x24 8009fb0: 1ad3 subs r3, r2, r3 8009fb2: 2b02 cmp r3, #2 8009fb4: d901 bls.n 8009fba { return HAL_TIMEOUT; 8009fb6: 2303 movs r3, #3 8009fb8: e1c0 b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) != 0U) 8009fba: 4b92 ldr r3, [pc, #584] @ (800a204 ) 8009fbc: 681b ldr r3, [r3, #0] 8009fbe: f403 5300 and.w r3, r3, #8192 @ 0x2000 8009fc2: 2b00 cmp r3, #0 8009fc4: d1f0 bne.n 8009fa8 } } } } /*------------------------------ LSE Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE) 8009fc6: 687b ldr r3, [r7, #4] 8009fc8: 681b ldr r3, [r3, #0] 8009fca: f003 0304 and.w r3, r3, #4 8009fce: 2b00 cmp r3, #0 8009fd0: f000 8081 beq.w 800a0d6 { /* Check the parameters */ assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState)); /* Enable write access to Backup domain */ PWR->CR1 |= PWR_CR1_DBP; 8009fd4: 4b8c ldr r3, [pc, #560] @ (800a208 ) 8009fd6: 681b ldr r3, [r3, #0] 8009fd8: 4a8b ldr r2, [pc, #556] @ (800a208 ) 8009fda: f443 7380 orr.w r3, r3, #256 @ 0x100 8009fde: 6013 str r3, [r2, #0] /* Wait for Backup domain Write protection disable */ tickstart = HAL_GetTick(); 8009fe0: f7fb f826 bl 8005030 8009fe4: 6278 str r0, [r7, #36] @ 0x24 while ((PWR->CR1 & PWR_CR1_DBP) == 0U) 8009fe6: e008 b.n 8009ffa { if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) 8009fe8: f7fb f822 bl 8005030 8009fec: 4602 mov r2, r0 8009fee: 6a7b ldr r3, [r7, #36] @ 0x24 8009ff0: 1ad3 subs r3, r2, r3 8009ff2: 2b64 cmp r3, #100 @ 0x64 8009ff4: d901 bls.n 8009ffa { return HAL_TIMEOUT; 8009ff6: 2303 movs r3, #3 8009ff8: e1a0 b.n 800a33c while ((PWR->CR1 & PWR_CR1_DBP) == 0U) 8009ffa: 4b83 ldr r3, [pc, #524] @ (800a208 ) 8009ffc: 681b ldr r3, [r3, #0] 8009ffe: f403 7380 and.w r3, r3, #256 @ 0x100 800a002: 2b00 cmp r3, #0 800a004: d0f0 beq.n 8009fe8 } } /* Set the new LSE configuration -----------------------------------------*/ __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState); 800a006: 687b ldr r3, [r7, #4] 800a008: 689b ldr r3, [r3, #8] 800a00a: 2b01 cmp r3, #1 800a00c: d106 bne.n 800a01c 800a00e: 4b7d ldr r3, [pc, #500] @ (800a204 ) 800a010: 6f1b ldr r3, [r3, #112] @ 0x70 800a012: 4a7c ldr r2, [pc, #496] @ (800a204 ) 800a014: f043 0301 orr.w r3, r3, #1 800a018: 6713 str r3, [r2, #112] @ 0x70 800a01a: e02d b.n 800a078 800a01c: 687b ldr r3, [r7, #4] 800a01e: 689b ldr r3, [r3, #8] 800a020: 2b00 cmp r3, #0 800a022: d10c bne.n 800a03e 800a024: 4b77 ldr r3, [pc, #476] @ (800a204 ) 800a026: 6f1b ldr r3, [r3, #112] @ 0x70 800a028: 4a76 ldr r2, [pc, #472] @ (800a204 ) 800a02a: f023 0301 bic.w r3, r3, #1 800a02e: 6713 str r3, [r2, #112] @ 0x70 800a030: 4b74 ldr r3, [pc, #464] @ (800a204 ) 800a032: 6f1b ldr r3, [r3, #112] @ 0x70 800a034: 4a73 ldr r2, [pc, #460] @ (800a204 ) 800a036: f023 0304 bic.w r3, r3, #4 800a03a: 6713 str r3, [r2, #112] @ 0x70 800a03c: e01c b.n 800a078 800a03e: 687b ldr r3, [r7, #4] 800a040: 689b ldr r3, [r3, #8] 800a042: 2b05 cmp r3, #5 800a044: d10c bne.n 800a060 800a046: 4b6f ldr r3, [pc, #444] @ (800a204 ) 800a048: 6f1b ldr r3, [r3, #112] @ 0x70 800a04a: 4a6e ldr r2, [pc, #440] @ (800a204 ) 800a04c: f043 0304 orr.w r3, r3, #4 800a050: 6713 str r3, [r2, #112] @ 0x70 800a052: 4b6c ldr r3, [pc, #432] @ (800a204 ) 800a054: 6f1b ldr r3, [r3, #112] @ 0x70 800a056: 4a6b ldr r2, [pc, #428] @ (800a204 ) 800a058: f043 0301 orr.w r3, r3, #1 800a05c: 6713 str r3, [r2, #112] @ 0x70 800a05e: e00b b.n 800a078 800a060: 4b68 ldr r3, [pc, #416] @ (800a204 ) 800a062: 6f1b ldr r3, [r3, #112] @ 0x70 800a064: 4a67 ldr r2, [pc, #412] @ (800a204 ) 800a066: f023 0301 bic.w r3, r3, #1 800a06a: 6713 str r3, [r2, #112] @ 0x70 800a06c: 4b65 ldr r3, [pc, #404] @ (800a204 ) 800a06e: 6f1b ldr r3, [r3, #112] @ 0x70 800a070: 4a64 ldr r2, [pc, #400] @ (800a204 ) 800a072: f023 0304 bic.w r3, r3, #4 800a076: 6713 str r3, [r2, #112] @ 0x70 /* Check the LSE State */ if ((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF) 800a078: 687b ldr r3, [r7, #4] 800a07a: 689b ldr r3, [r3, #8] 800a07c: 2b00 cmp r3, #0 800a07e: d015 beq.n 800a0ac { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a080: f7fa ffd6 bl 8005030 800a084: 6278 str r0, [r7, #36] @ 0x24 /* Wait till LSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U) 800a086: e00a b.n 800a09e { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 800a088: f7fa ffd2 bl 8005030 800a08c: 4602 mov r2, r0 800a08e: 6a7b ldr r3, [r7, #36] @ 0x24 800a090: 1ad3 subs r3, r2, r3 800a092: f241 3288 movw r2, #5000 @ 0x1388 800a096: 4293 cmp r3, r2 800a098: d901 bls.n 800a09e { return HAL_TIMEOUT; 800a09a: 2303 movs r3, #3 800a09c: e14e b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U) 800a09e: 4b59 ldr r3, [pc, #356] @ (800a204 ) 800a0a0: 6f1b ldr r3, [r3, #112] @ 0x70 800a0a2: f003 0302 and.w r3, r3, #2 800a0a6: 2b00 cmp r3, #0 800a0a8: d0ee beq.n 800a088 800a0aa: e014 b.n 800a0d6 } } else { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a0ac: f7fa ffc0 bl 8005030 800a0b0: 6278 str r0, [r7, #36] @ 0x24 /* Wait till LSE is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != 0U) 800a0b2: e00a b.n 800a0ca { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 800a0b4: f7fa ffbc bl 8005030 800a0b8: 4602 mov r2, r0 800a0ba: 6a7b ldr r3, [r7, #36] @ 0x24 800a0bc: 1ad3 subs r3, r2, r3 800a0be: f241 3288 movw r2, #5000 @ 0x1388 800a0c2: 4293 cmp r3, r2 800a0c4: d901 bls.n 800a0ca { return HAL_TIMEOUT; 800a0c6: 2303 movs r3, #3 800a0c8: e138 b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != 0U) 800a0ca: 4b4e ldr r3, [pc, #312] @ (800a204 ) 800a0cc: 6f1b ldr r3, [r3, #112] @ 0x70 800a0ce: f003 0302 and.w r3, r3, #2 800a0d2: 2b00 cmp r3, #0 800a0d4: d1ee bne.n 800a0b4 } } /*-------------------------------- PLL Configuration -----------------------*/ /* Check the parameters */ assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState)); if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE) 800a0d6: 687b ldr r3, [r7, #4] 800a0d8: 6a5b ldr r3, [r3, #36] @ 0x24 800a0da: 2b00 cmp r3, #0 800a0dc: f000 812d beq.w 800a33a { /* Check if the PLL is used as system clock or not */ if (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_CFGR_SWS_PLL1) 800a0e0: 4b48 ldr r3, [pc, #288] @ (800a204 ) 800a0e2: 691b ldr r3, [r3, #16] 800a0e4: f003 0338 and.w r3, r3, #56 @ 0x38 800a0e8: 2b18 cmp r3, #24 800a0ea: f000 80bd beq.w 800a268 { if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON) 800a0ee: 687b ldr r3, [r7, #4] 800a0f0: 6a5b ldr r3, [r3, #36] @ 0x24 800a0f2: 2b02 cmp r3, #2 800a0f4: f040 809e bne.w 800a234 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(); 800a0f8: 4b42 ldr r3, [pc, #264] @ (800a204 ) 800a0fa: 681b ldr r3, [r3, #0] 800a0fc: 4a41 ldr r2, [pc, #260] @ (800a204 ) 800a0fe: f023 7380 bic.w r3, r3, #16777216 @ 0x1000000 800a102: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a104: f7fa ff94 bl 8005030 800a108: 6278 str r0, [r7, #36] @ 0x24 /* Wait till PLL is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 800a10a: e008 b.n 800a11e { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 800a10c: f7fa ff90 bl 8005030 800a110: 4602 mov r2, r0 800a112: 6a7b ldr r3, [r7, #36] @ 0x24 800a114: 1ad3 subs r3, r2, r3 800a116: 2b02 cmp r3, #2 800a118: d901 bls.n 800a11e { return HAL_TIMEOUT; 800a11a: 2303 movs r3, #3 800a11c: e10e b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 800a11e: 4b39 ldr r3, [pc, #228] @ (800a204 ) 800a120: 681b ldr r3, [r3, #0] 800a122: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 800a126: 2b00 cmp r3, #0 800a128: d1f0 bne.n 800a10c } } /* Configure the main PLL clock source, multiplication and division factors. */ __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource, 800a12a: 4b36 ldr r3, [pc, #216] @ (800a204 ) 800a12c: 6a9a ldr r2, [r3, #40] @ 0x28 800a12e: 4b37 ldr r3, [pc, #220] @ (800a20c ) 800a130: 4013 ands r3, r2 800a132: 687a ldr r2, [r7, #4] 800a134: 6a91 ldr r1, [r2, #40] @ 0x28 800a136: 687a ldr r2, [r7, #4] 800a138: 6ad2 ldr r2, [r2, #44] @ 0x2c 800a13a: 0112 lsls r2, r2, #4 800a13c: 430a orrs r2, r1 800a13e: 4931 ldr r1, [pc, #196] @ (800a204 ) 800a140: 4313 orrs r3, r2 800a142: 628b str r3, [r1, #40] @ 0x28 800a144: 687b ldr r3, [r7, #4] 800a146: 6b1b ldr r3, [r3, #48] @ 0x30 800a148: 3b01 subs r3, #1 800a14a: f3c3 0208 ubfx r2, r3, #0, #9 800a14e: 687b ldr r3, [r7, #4] 800a150: 6b5b ldr r3, [r3, #52] @ 0x34 800a152: 3b01 subs r3, #1 800a154: 025b lsls r3, r3, #9 800a156: b29b uxth r3, r3 800a158: 431a orrs r2, r3 800a15a: 687b ldr r3, [r7, #4] 800a15c: 6b9b ldr r3, [r3, #56] @ 0x38 800a15e: 3b01 subs r3, #1 800a160: 041b lsls r3, r3, #16 800a162: f403 03fe and.w r3, r3, #8323072 @ 0x7f0000 800a166: 431a orrs r2, r3 800a168: 687b ldr r3, [r7, #4] 800a16a: 6bdb ldr r3, [r3, #60] @ 0x3c 800a16c: 3b01 subs r3, #1 800a16e: 061b lsls r3, r3, #24 800a170: f003 43fe and.w r3, r3, #2130706432 @ 0x7f000000 800a174: 4923 ldr r1, [pc, #140] @ (800a204 ) 800a176: 4313 orrs r3, r2 800a178: 630b str r3, [r1, #48] @ 0x30 RCC_OscInitStruct->PLL.PLLP, RCC_OscInitStruct->PLL.PLLQ, RCC_OscInitStruct->PLL.PLLR); /* Disable PLLFRACN . */ __HAL_RCC_PLLFRACN_DISABLE(); 800a17a: 4b22 ldr r3, [pc, #136] @ (800a204 ) 800a17c: 6adb ldr r3, [r3, #44] @ 0x2c 800a17e: 4a21 ldr r2, [pc, #132] @ (800a204 ) 800a180: f023 0301 bic.w r3, r3, #1 800a184: 62d3 str r3, [r2, #44] @ 0x2c /* Configure PLL PLL1FRACN */ __HAL_RCC_PLLFRACN_CONFIG(RCC_OscInitStruct->PLL.PLLFRACN); 800a186: 4b1f ldr r3, [pc, #124] @ (800a204 ) 800a188: 6b5a ldr r2, [r3, #52] @ 0x34 800a18a: 4b21 ldr r3, [pc, #132] @ (800a210 ) 800a18c: 4013 ands r3, r2 800a18e: 687a ldr r2, [r7, #4] 800a190: 6c92 ldr r2, [r2, #72] @ 0x48 800a192: 00d2 lsls r2, r2, #3 800a194: 491b ldr r1, [pc, #108] @ (800a204 ) 800a196: 4313 orrs r3, r2 800a198: 634b str r3, [r1, #52] @ 0x34 /* Select PLL1 input reference frequency range: VCI */ __HAL_RCC_PLL_VCIRANGE(RCC_OscInitStruct->PLL.PLLRGE) ; 800a19a: 4b1a ldr r3, [pc, #104] @ (800a204 ) 800a19c: 6adb ldr r3, [r3, #44] @ 0x2c 800a19e: f023 020c bic.w r2, r3, #12 800a1a2: 687b ldr r3, [r7, #4] 800a1a4: 6c1b ldr r3, [r3, #64] @ 0x40 800a1a6: 4917 ldr r1, [pc, #92] @ (800a204 ) 800a1a8: 4313 orrs r3, r2 800a1aa: 62cb str r3, [r1, #44] @ 0x2c /* Select PLL1 output frequency range : VCO */ __HAL_RCC_PLL_VCORANGE(RCC_OscInitStruct->PLL.PLLVCOSEL) ; 800a1ac: 4b15 ldr r3, [pc, #84] @ (800a204 ) 800a1ae: 6adb ldr r3, [r3, #44] @ 0x2c 800a1b0: f023 0202 bic.w r2, r3, #2 800a1b4: 687b ldr r3, [r7, #4] 800a1b6: 6c5b ldr r3, [r3, #68] @ 0x44 800a1b8: 4912 ldr r1, [pc, #72] @ (800a204 ) 800a1ba: 4313 orrs r3, r2 800a1bc: 62cb str r3, [r1, #44] @ 0x2c /* Enable PLL System Clock output. */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVP); 800a1be: 4b11 ldr r3, [pc, #68] @ (800a204 ) 800a1c0: 6adb ldr r3, [r3, #44] @ 0x2c 800a1c2: 4a10 ldr r2, [pc, #64] @ (800a204 ) 800a1c4: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a1c8: 62d3 str r3, [r2, #44] @ 0x2c /* Enable PLL1Q Clock output. */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 800a1ca: 4b0e ldr r3, [pc, #56] @ (800a204 ) 800a1cc: 6adb ldr r3, [r3, #44] @ 0x2c 800a1ce: 4a0d ldr r2, [pc, #52] @ (800a204 ) 800a1d0: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800a1d4: 62d3 str r3, [r2, #44] @ 0x2c /* Enable PLL1R Clock output. */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVR); 800a1d6: 4b0b ldr r3, [pc, #44] @ (800a204 ) 800a1d8: 6adb ldr r3, [r3, #44] @ 0x2c 800a1da: 4a0a ldr r2, [pc, #40] @ (800a204 ) 800a1dc: f443 2380 orr.w r3, r3, #262144 @ 0x40000 800a1e0: 62d3 str r3, [r2, #44] @ 0x2c /* Enable PLL1FRACN . */ __HAL_RCC_PLLFRACN_ENABLE(); 800a1e2: 4b08 ldr r3, [pc, #32] @ (800a204 ) 800a1e4: 6adb ldr r3, [r3, #44] @ 0x2c 800a1e6: 4a07 ldr r2, [pc, #28] @ (800a204 ) 800a1e8: f043 0301 orr.w r3, r3, #1 800a1ec: 62d3 str r3, [r2, #44] @ 0x2c /* Enable the main PLL. */ __HAL_RCC_PLL_ENABLE(); 800a1ee: 4b05 ldr r3, [pc, #20] @ (800a204 ) 800a1f0: 681b ldr r3, [r3, #0] 800a1f2: 4a04 ldr r2, [pc, #16] @ (800a204 ) 800a1f4: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000 800a1f8: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a1fa: f7fa ff19 bl 8005030 800a1fe: 6278 str r0, [r7, #36] @ 0x24 /* Wait till PLL is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U) 800a200: e011 b.n 800a226 800a202: bf00 nop 800a204: 58024400 .word 0x58024400 800a208: 58024800 .word 0x58024800 800a20c: fffffc0c .word 0xfffffc0c 800a210: ffff0007 .word 0xffff0007 { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 800a214: f7fa ff0c bl 8005030 800a218: 4602 mov r2, r0 800a21a: 6a7b ldr r3, [r7, #36] @ 0x24 800a21c: 1ad3 subs r3, r2, r3 800a21e: 2b02 cmp r3, #2 800a220: d901 bls.n 800a226 { return HAL_TIMEOUT; 800a222: 2303 movs r3, #3 800a224: e08a b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U) 800a226: 4b47 ldr r3, [pc, #284] @ (800a344 ) 800a228: 681b ldr r3, [r3, #0] 800a22a: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 800a22e: 2b00 cmp r3, #0 800a230: d0f0 beq.n 800a214 800a232: e082 b.n 800a33a } } else { /* Disable the main PLL. */ __HAL_RCC_PLL_DISABLE(); 800a234: 4b43 ldr r3, [pc, #268] @ (800a344 ) 800a236: 681b ldr r3, [r3, #0] 800a238: 4a42 ldr r2, [pc, #264] @ (800a344 ) 800a23a: f023 7380 bic.w r3, r3, #16777216 @ 0x1000000 800a23e: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a240: f7fa fef6 bl 8005030 800a244: 6278 str r0, [r7, #36] @ 0x24 /* Wait till PLL is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 800a246: e008 b.n 800a25a { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 800a248: f7fa fef2 bl 8005030 800a24c: 4602 mov r2, r0 800a24e: 6a7b ldr r3, [r7, #36] @ 0x24 800a250: 1ad3 subs r3, r2, r3 800a252: 2b02 cmp r3, #2 800a254: d901 bls.n 800a25a { return HAL_TIMEOUT; 800a256: 2303 movs r3, #3 800a258: e070 b.n 800a33c while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 800a25a: 4b3a ldr r3, [pc, #232] @ (800a344 ) 800a25c: 681b ldr r3, [r3, #0] 800a25e: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 800a262: 2b00 cmp r3, #0 800a264: d1f0 bne.n 800a248 800a266: e068 b.n 800a33a } } else { /* Do not return HAL_ERROR if request repeats the current configuration */ temp1_pllckcfg = RCC->PLLCKSELR; 800a268: 4b36 ldr r3, [pc, #216] @ (800a344 ) 800a26a: 6a9b ldr r3, [r3, #40] @ 0x28 800a26c: 613b str r3, [r7, #16] temp2_pllckcfg = RCC->PLL1DIVR; 800a26e: 4b35 ldr r3, [pc, #212] @ (800a344 ) 800a270: 6b1b ldr r3, [r3, #48] @ 0x30 800a272: 60fb str r3, [r7, #12] if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) || 800a274: 687b ldr r3, [r7, #4] 800a276: 6a5b ldr r3, [r3, #36] @ 0x24 800a278: 2b01 cmp r3, #1 800a27a: d031 beq.n 800a2e0 (READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 800a27c: 693b ldr r3, [r7, #16] 800a27e: f003 0203 and.w r2, r3, #3 800a282: 687b ldr r3, [r7, #4] 800a284: 6a9b ldr r3, [r3, #40] @ 0x28 if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) || 800a286: 429a cmp r2, r3 800a288: d12a bne.n 800a2e0 ((READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos) != RCC_OscInitStruct->PLL.PLLM) || 800a28a: 693b ldr r3, [r7, #16] 800a28c: 091b lsrs r3, r3, #4 800a28e: f003 023f and.w r2, r3, #63 @ 0x3f 800a292: 687b ldr r3, [r7, #4] 800a294: 6adb ldr r3, [r3, #44] @ 0x2c (READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 800a296: 429a cmp r2, r3 800a298: d122 bne.n 800a2e0 (READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_N1) != (RCC_OscInitStruct->PLL.PLLN - 1U)) || 800a29a: 68fb ldr r3, [r7, #12] 800a29c: f3c3 0208 ubfx r2, r3, #0, #9 800a2a0: 687b ldr r3, [r7, #4] 800a2a2: 6b1b ldr r3, [r3, #48] @ 0x30 800a2a4: 3b01 subs r3, #1 ((READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos) != RCC_OscInitStruct->PLL.PLLM) || 800a2a6: 429a cmp r2, r3 800a2a8: d11a bne.n 800a2e0 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) != (RCC_OscInitStruct->PLL.PLLP - 1U)) || 800a2aa: 68fb ldr r3, [r7, #12] 800a2ac: 0a5b lsrs r3, r3, #9 800a2ae: f003 027f and.w r2, r3, #127 @ 0x7f 800a2b2: 687b ldr r3, [r7, #4] 800a2b4: 6b5b ldr r3, [r3, #52] @ 0x34 800a2b6: 3b01 subs r3, #1 (READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_N1) != (RCC_OscInitStruct->PLL.PLLN - 1U)) || 800a2b8: 429a cmp r2, r3 800a2ba: d111 bne.n 800a2e0 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) != (RCC_OscInitStruct->PLL.PLLQ - 1U)) || 800a2bc: 68fb ldr r3, [r7, #12] 800a2be: 0c1b lsrs r3, r3, #16 800a2c0: f003 027f and.w r2, r3, #127 @ 0x7f 800a2c4: 687b ldr r3, [r7, #4] 800a2c6: 6b9b ldr r3, [r3, #56] @ 0x38 800a2c8: 3b01 subs r3, #1 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) != (RCC_OscInitStruct->PLL.PLLP - 1U)) || 800a2ca: 429a cmp r2, r3 800a2cc: d108 bne.n 800a2e0 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_R1) >> RCC_PLL1DIVR_R1_Pos) != (RCC_OscInitStruct->PLL.PLLR - 1U))) 800a2ce: 68fb ldr r3, [r7, #12] 800a2d0: 0e1b lsrs r3, r3, #24 800a2d2: f003 027f and.w r2, r3, #127 @ 0x7f 800a2d6: 687b ldr r3, [r7, #4] 800a2d8: 6bdb ldr r3, [r3, #60] @ 0x3c 800a2da: 3b01 subs r3, #1 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) != (RCC_OscInitStruct->PLL.PLLQ - 1U)) || 800a2dc: 429a cmp r2, r3 800a2de: d001 beq.n 800a2e4 { return HAL_ERROR; 800a2e0: 2301 movs r3, #1 800a2e2: e02b b.n 800a33c } else { /* Check if only fractional part needs to be updated */ temp1_pllckcfg = ((RCC->PLL1FRACR & RCC_PLL1FRACR_FRACN1) >> RCC_PLL1FRACR_FRACN1_Pos); 800a2e4: 4b17 ldr r3, [pc, #92] @ (800a344 ) 800a2e6: 6b5b ldr r3, [r3, #52] @ 0x34 800a2e8: 08db lsrs r3, r3, #3 800a2ea: f3c3 030c ubfx r3, r3, #0, #13 800a2ee: 613b str r3, [r7, #16] if (RCC_OscInitStruct->PLL.PLLFRACN != temp1_pllckcfg) 800a2f0: 687b ldr r3, [r7, #4] 800a2f2: 6c9b ldr r3, [r3, #72] @ 0x48 800a2f4: 693a ldr r2, [r7, #16] 800a2f6: 429a cmp r2, r3 800a2f8: d01f beq.n 800a33a { assert_param(IS_RCC_PLLFRACN_VALUE(RCC_OscInitStruct->PLL.PLLFRACN)); /* Disable PLL1FRACEN */ __HAL_RCC_PLLFRACN_DISABLE(); 800a2fa: 4b12 ldr r3, [pc, #72] @ (800a344 ) 800a2fc: 6adb ldr r3, [r3, #44] @ 0x2c 800a2fe: 4a11 ldr r2, [pc, #68] @ (800a344 ) 800a300: f023 0301 bic.w r3, r3, #1 800a304: 62d3 str r3, [r2, #44] @ 0x2c /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a306: f7fa fe93 bl 8005030 800a30a: 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) 800a30c: bf00 nop 800a30e: f7fa fe8f bl 8005030 800a312: 4602 mov r2, r0 800a314: 6a7b ldr r3, [r7, #36] @ 0x24 800a316: 4293 cmp r3, r2 800a318: d0f9 beq.n 800a30e { } /* Configure PLL1 PLL1FRACN */ __HAL_RCC_PLLFRACN_CONFIG(RCC_OscInitStruct->PLL.PLLFRACN); 800a31a: 4b0a ldr r3, [pc, #40] @ (800a344 ) 800a31c: 6b5a ldr r2, [r3, #52] @ 0x34 800a31e: 4b0a ldr r3, [pc, #40] @ (800a348 ) 800a320: 4013 ands r3, r2 800a322: 687a ldr r2, [r7, #4] 800a324: 6c92 ldr r2, [r2, #72] @ 0x48 800a326: 00d2 lsls r2, r2, #3 800a328: 4906 ldr r1, [pc, #24] @ (800a344 ) 800a32a: 4313 orrs r3, r2 800a32c: 634b str r3, [r1, #52] @ 0x34 /* Enable PLL1FRACEN to latch new value. */ __HAL_RCC_PLLFRACN_ENABLE(); 800a32e: 4b05 ldr r3, [pc, #20] @ (800a344 ) 800a330: 6adb ldr r3, [r3, #44] @ 0x2c 800a332: 4a04 ldr r2, [pc, #16] @ (800a344 ) 800a334: f043 0301 orr.w r3, r3, #1 800a338: 62d3 str r3, [r2, #44] @ 0x2c } } } } return HAL_OK; 800a33a: 2300 movs r3, #0 } 800a33c: 4618 mov r0, r3 800a33e: 3730 adds r7, #48 @ 0x30 800a340: 46bd mov sp, r7 800a342: bd80 pop {r7, pc} 800a344: 58024400 .word 0x58024400 800a348: ffff0007 .word 0xffff0007 0800a34c : * 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) { 800a34c: b580 push {r7, lr} 800a34e: b086 sub sp, #24 800a350: af00 add r7, sp, #0 800a352: 6078 str r0, [r7, #4] 800a354: 6039 str r1, [r7, #0] HAL_StatusTypeDef halstatus; uint32_t tickstart; uint32_t common_system_clock; /* Check Null pointer */ if (RCC_ClkInitStruct == NULL) 800a356: 687b ldr r3, [r7, #4] 800a358: 2b00 cmp r3, #0 800a35a: d101 bne.n 800a360 { return HAL_ERROR; 800a35c: 2301 movs r3, #1 800a35e: e19c b.n 800a69a /* 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()) 800a360: 4b8a ldr r3, [pc, #552] @ (800a58c ) 800a362: 681b ldr r3, [r3, #0] 800a364: f003 030f and.w r3, r3, #15 800a368: 683a ldr r2, [r7, #0] 800a36a: 429a cmp r2, r3 800a36c: d910 bls.n 800a390 { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ __HAL_FLASH_SET_LATENCY(FLatency); 800a36e: 4b87 ldr r3, [pc, #540] @ (800a58c ) 800a370: 681b ldr r3, [r3, #0] 800a372: f023 020f bic.w r2, r3, #15 800a376: 4985 ldr r1, [pc, #532] @ (800a58c ) 800a378: 683b ldr r3, [r7, #0] 800a37a: 4313 orrs r3, r2 800a37c: 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) 800a37e: 4b83 ldr r3, [pc, #524] @ (800a58c ) 800a380: 681b ldr r3, [r3, #0] 800a382: f003 030f and.w r3, r3, #15 800a386: 683a ldr r2, [r7, #0] 800a388: 429a cmp r2, r3 800a38a: d001 beq.n 800a390 { return HAL_ERROR; 800a38c: 2301 movs r3, #1 800a38e: e184 b.n 800a69a } /* Increasing the BUS frequency divider */ /*-------------------------- D1PCLK1/CDPCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D1PCLK1) == RCC_CLOCKTYPE_D1PCLK1) 800a390: 687b ldr r3, [r7, #4] 800a392: 681b ldr r3, [r3, #0] 800a394: f003 0304 and.w r3, r3, #4 800a398: 2b00 cmp r3, #0 800a39a: d010 beq.n 800a3be { #if defined (RCC_D1CFGR_D1PPRE) if ((RCC_ClkInitStruct->APB3CLKDivider) > (RCC->D1CFGR & RCC_D1CFGR_D1PPRE)) 800a39c: 687b ldr r3, [r7, #4] 800a39e: 691a ldr r2, [r3, #16] 800a3a0: 4b7b ldr r3, [pc, #492] @ (800a590 ) 800a3a2: 699b ldr r3, [r3, #24] 800a3a4: f003 0370 and.w r3, r3, #112 @ 0x70 800a3a8: 429a cmp r2, r3 800a3aa: d908 bls.n 800a3be { assert_param(IS_RCC_D1PCLK1(RCC_ClkInitStruct->APB3CLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1PPRE, RCC_ClkInitStruct->APB3CLKDivider); 800a3ac: 4b78 ldr r3, [pc, #480] @ (800a590 ) 800a3ae: 699b ldr r3, [r3, #24] 800a3b0: f023 0270 bic.w r2, r3, #112 @ 0x70 800a3b4: 687b ldr r3, [r7, #4] 800a3b6: 691b ldr r3, [r3, #16] 800a3b8: 4975 ldr r1, [pc, #468] @ (800a590 ) 800a3ba: 4313 orrs r3, r2 800a3bc: 618b str r3, [r1, #24] } #endif } /*-------------------------- PCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) 800a3be: 687b ldr r3, [r7, #4] 800a3c0: 681b ldr r3, [r3, #0] 800a3c2: f003 0308 and.w r3, r3, #8 800a3c6: 2b00 cmp r3, #0 800a3c8: d010 beq.n 800a3ec { #if defined (RCC_D2CFGR_D2PPRE1) if ((RCC_ClkInitStruct->APB1CLKDivider) > (RCC->D2CFGR & RCC_D2CFGR_D2PPRE1)) 800a3ca: 687b ldr r3, [r7, #4] 800a3cc: 695a ldr r2, [r3, #20] 800a3ce: 4b70 ldr r3, [pc, #448] @ (800a590 ) 800a3d0: 69db ldr r3, [r3, #28] 800a3d2: f003 0370 and.w r3, r3, #112 @ 0x70 800a3d6: 429a cmp r2, r3 800a3d8: d908 bls.n 800a3ec { assert_param(IS_RCC_PCLK1(RCC_ClkInitStruct->APB1CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1, (RCC_ClkInitStruct->APB1CLKDivider)); 800a3da: 4b6d ldr r3, [pc, #436] @ (800a590 ) 800a3dc: 69db ldr r3, [r3, #28] 800a3de: f023 0270 bic.w r2, r3, #112 @ 0x70 800a3e2: 687b ldr r3, [r7, #4] 800a3e4: 695b ldr r3, [r3, #20] 800a3e6: 496a ldr r1, [pc, #424] @ (800a590 ) 800a3e8: 4313 orrs r3, r2 800a3ea: 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) 800a3ec: 687b ldr r3, [r7, #4] 800a3ee: 681b ldr r3, [r3, #0] 800a3f0: f003 0310 and.w r3, r3, #16 800a3f4: 2b00 cmp r3, #0 800a3f6: d010 beq.n 800a41a { #if defined(RCC_D2CFGR_D2PPRE2) if ((RCC_ClkInitStruct->APB2CLKDivider) > (RCC->D2CFGR & RCC_D2CFGR_D2PPRE2)) 800a3f8: 687b ldr r3, [r7, #4] 800a3fa: 699a ldr r2, [r3, #24] 800a3fc: 4b64 ldr r3, [pc, #400] @ (800a590 ) 800a3fe: 69db ldr r3, [r3, #28] 800a400: f403 63e0 and.w r3, r3, #1792 @ 0x700 800a404: 429a cmp r2, r3 800a406: d908 bls.n 800a41a { assert_param(IS_RCC_PCLK2(RCC_ClkInitStruct->APB2CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2, (RCC_ClkInitStruct->APB2CLKDivider)); 800a408: 4b61 ldr r3, [pc, #388] @ (800a590 ) 800a40a: 69db ldr r3, [r3, #28] 800a40c: f423 62e0 bic.w r2, r3, #1792 @ 0x700 800a410: 687b ldr r3, [r7, #4] 800a412: 699b ldr r3, [r3, #24] 800a414: 495e ldr r1, [pc, #376] @ (800a590 ) 800a416: 4313 orrs r3, r2 800a418: 61cb str r3, [r1, #28] } #endif } /*-------------------------- D3PCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D3PCLK1) == RCC_CLOCKTYPE_D3PCLK1) 800a41a: 687b ldr r3, [r7, #4] 800a41c: 681b ldr r3, [r3, #0] 800a41e: f003 0320 and.w r3, r3, #32 800a422: 2b00 cmp r3, #0 800a424: d010 beq.n 800a448 { #if defined(RCC_D3CFGR_D3PPRE) if ((RCC_ClkInitStruct->APB4CLKDivider) > (RCC->D3CFGR & RCC_D3CFGR_D3PPRE)) 800a426: 687b ldr r3, [r7, #4] 800a428: 69da ldr r2, [r3, #28] 800a42a: 4b59 ldr r3, [pc, #356] @ (800a590 ) 800a42c: 6a1b ldr r3, [r3, #32] 800a42e: f003 0370 and.w r3, r3, #112 @ 0x70 800a432: 429a cmp r2, r3 800a434: d908 bls.n 800a448 { assert_param(IS_RCC_D3PCLK1(RCC_ClkInitStruct->APB4CLKDivider)); MODIFY_REG(RCC->D3CFGR, RCC_D3CFGR_D3PPRE, (RCC_ClkInitStruct->APB4CLKDivider)); 800a436: 4b56 ldr r3, [pc, #344] @ (800a590 ) 800a438: 6a1b ldr r3, [r3, #32] 800a43a: f023 0270 bic.w r2, r3, #112 @ 0x70 800a43e: 687b ldr r3, [r7, #4] 800a440: 69db ldr r3, [r3, #28] 800a442: 4953 ldr r1, [pc, #332] @ (800a590 ) 800a444: 4313 orrs r3, r2 800a446: 620b str r3, [r1, #32] } #endif } /*-------------------------- HCLK Configuration --------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) 800a448: 687b ldr r3, [r7, #4] 800a44a: 681b ldr r3, [r3, #0] 800a44c: f003 0302 and.w r3, r3, #2 800a450: 2b00 cmp r3, #0 800a452: d010 beq.n 800a476 { #if defined (RCC_D1CFGR_HPRE) if ((RCC_ClkInitStruct->AHBCLKDivider) > (RCC->D1CFGR & RCC_D1CFGR_HPRE)) 800a454: 687b ldr r3, [r7, #4] 800a456: 68da ldr r2, [r3, #12] 800a458: 4b4d ldr r3, [pc, #308] @ (800a590 ) 800a45a: 699b ldr r3, [r3, #24] 800a45c: f003 030f and.w r3, r3, #15 800a460: 429a cmp r2, r3 800a462: d908 bls.n 800a476 { /* Set the new HCLK clock divider */ assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider); 800a464: 4b4a ldr r3, [pc, #296] @ (800a590 ) 800a466: 699b ldr r3, [r3, #24] 800a468: f023 020f bic.w r2, r3, #15 800a46c: 687b ldr r3, [r7, #4] 800a46e: 68db ldr r3, [r3, #12] 800a470: 4947 ldr r1, [pc, #284] @ (800a590 ) 800a472: 4313 orrs r3, r2 800a474: 618b str r3, [r1, #24] } #endif } /*------------------------- SYSCLK Configuration -------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK) 800a476: 687b ldr r3, [r7, #4] 800a478: 681b ldr r3, [r3, #0] 800a47a: f003 0301 and.w r3, r3, #1 800a47e: 2b00 cmp r3, #0 800a480: d055 beq.n 800a52e { 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); 800a482: 4b43 ldr r3, [pc, #268] @ (800a590 ) 800a484: 699b ldr r3, [r3, #24] 800a486: f423 6270 bic.w r2, r3, #3840 @ 0xf00 800a48a: 687b ldr r3, [r7, #4] 800a48c: 689b ldr r3, [r3, #8] 800a48e: 4940 ldr r1, [pc, #256] @ (800a590 ) 800a490: 4313 orrs r3, r2 800a492: 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) 800a494: 687b ldr r3, [r7, #4] 800a496: 685b ldr r3, [r3, #4] 800a498: 2b02 cmp r3, #2 800a49a: d107 bne.n 800a4ac { /* Check the HSE ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U) 800a49c: 4b3c ldr r3, [pc, #240] @ (800a590 ) 800a49e: 681b ldr r3, [r3, #0] 800a4a0: f403 3300 and.w r3, r3, #131072 @ 0x20000 800a4a4: 2b00 cmp r3, #0 800a4a6: d121 bne.n 800a4ec { return HAL_ERROR; 800a4a8: 2301 movs r3, #1 800a4aa: e0f6 b.n 800a69a } } /* PLL is selected as System Clock Source */ else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) 800a4ac: 687b ldr r3, [r7, #4] 800a4ae: 685b ldr r3, [r3, #4] 800a4b0: 2b03 cmp r3, #3 800a4b2: d107 bne.n 800a4c4 { /* Check the PLL ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U) 800a4b4: 4b36 ldr r3, [pc, #216] @ (800a590 ) 800a4b6: 681b ldr r3, [r3, #0] 800a4b8: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 800a4bc: 2b00 cmp r3, #0 800a4be: d115 bne.n 800a4ec { return HAL_ERROR; 800a4c0: 2301 movs r3, #1 800a4c2: e0ea b.n 800a69a } } /* CSI is selected as System Clock Source */ else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_CSI) 800a4c4: 687b ldr r3, [r7, #4] 800a4c6: 685b ldr r3, [r3, #4] 800a4c8: 2b01 cmp r3, #1 800a4ca: d107 bne.n 800a4dc { /* Check the PLL ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U) 800a4cc: 4b30 ldr r3, [pc, #192] @ (800a590 ) 800a4ce: 681b ldr r3, [r3, #0] 800a4d0: f403 7380 and.w r3, r3, #256 @ 0x100 800a4d4: 2b00 cmp r3, #0 800a4d6: d109 bne.n 800a4ec { return HAL_ERROR; 800a4d8: 2301 movs r3, #1 800a4da: e0de b.n 800a69a } /* HSI is selected as System Clock Source */ else { /* Check the HSI ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 800a4dc: 4b2c ldr r3, [pc, #176] @ (800a590 ) 800a4de: 681b ldr r3, [r3, #0] 800a4e0: f003 0304 and.w r3, r3, #4 800a4e4: 2b00 cmp r3, #0 800a4e6: d101 bne.n 800a4ec { return HAL_ERROR; 800a4e8: 2301 movs r3, #1 800a4ea: e0d6 b.n 800a69a } } MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, RCC_ClkInitStruct->SYSCLKSource); 800a4ec: 4b28 ldr r3, [pc, #160] @ (800a590 ) 800a4ee: 691b ldr r3, [r3, #16] 800a4f0: f023 0207 bic.w r2, r3, #7 800a4f4: 687b ldr r3, [r7, #4] 800a4f6: 685b ldr r3, [r3, #4] 800a4f8: 4925 ldr r1, [pc, #148] @ (800a590 ) 800a4fa: 4313 orrs r3, r2 800a4fc: 610b str r3, [r1, #16] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a4fe: f7fa fd97 bl 8005030 800a502: 6178 str r0, [r7, #20] while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) 800a504: e00a b.n 800a51c { if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE) 800a506: f7fa fd93 bl 8005030 800a50a: 4602 mov r2, r0 800a50c: 697b ldr r3, [r7, #20] 800a50e: 1ad3 subs r3, r2, r3 800a510: f241 3288 movw r2, #5000 @ 0x1388 800a514: 4293 cmp r3, r2 800a516: d901 bls.n 800a51c { return HAL_TIMEOUT; 800a518: 2303 movs r3, #3 800a51a: e0be b.n 800a69a while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) 800a51c: 4b1c ldr r3, [pc, #112] @ (800a590 ) 800a51e: 691b ldr r3, [r3, #16] 800a520: f003 0238 and.w r2, r3, #56 @ 0x38 800a524: 687b ldr r3, [r7, #4] 800a526: 685b ldr r3, [r3, #4] 800a528: 00db lsls r3, r3, #3 800a52a: 429a cmp r2, r3 800a52c: d1eb bne.n 800a506 } /* Decreasing the BUS frequency divider */ /*-------------------------- HCLK Configuration --------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) 800a52e: 687b ldr r3, [r7, #4] 800a530: 681b ldr r3, [r3, #0] 800a532: f003 0302 and.w r3, r3, #2 800a536: 2b00 cmp r3, #0 800a538: d010 beq.n 800a55c { #if defined(RCC_D1CFGR_HPRE) if ((RCC_ClkInitStruct->AHBCLKDivider) < (RCC->D1CFGR & RCC_D1CFGR_HPRE)) 800a53a: 687b ldr r3, [r7, #4] 800a53c: 68da ldr r2, [r3, #12] 800a53e: 4b14 ldr r3, [pc, #80] @ (800a590 ) 800a540: 699b ldr r3, [r3, #24] 800a542: f003 030f and.w r3, r3, #15 800a546: 429a cmp r2, r3 800a548: d208 bcs.n 800a55c { /* Set the new HCLK clock divider */ assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider); 800a54a: 4b11 ldr r3, [pc, #68] @ (800a590 ) 800a54c: 699b ldr r3, [r3, #24] 800a54e: f023 020f bic.w r2, r3, #15 800a552: 687b ldr r3, [r7, #4] 800a554: 68db ldr r3, [r3, #12] 800a556: 490e ldr r1, [pc, #56] @ (800a590 ) 800a558: 4313 orrs r3, r2 800a55a: 618b str r3, [r1, #24] } #endif } /* Decreasing the number of wait states because of lower CPU frequency */ if (FLatency < __HAL_FLASH_GET_LATENCY()) 800a55c: 4b0b ldr r3, [pc, #44] @ (800a58c ) 800a55e: 681b ldr r3, [r3, #0] 800a560: f003 030f and.w r3, r3, #15 800a564: 683a ldr r2, [r7, #0] 800a566: 429a cmp r2, r3 800a568: d214 bcs.n 800a594 { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ __HAL_FLASH_SET_LATENCY(FLatency); 800a56a: 4b08 ldr r3, [pc, #32] @ (800a58c ) 800a56c: 681b ldr r3, [r3, #0] 800a56e: f023 020f bic.w r2, r3, #15 800a572: 4906 ldr r1, [pc, #24] @ (800a58c ) 800a574: 683b ldr r3, [r7, #0] 800a576: 4313 orrs r3, r2 800a578: 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) 800a57a: 4b04 ldr r3, [pc, #16] @ (800a58c ) 800a57c: 681b ldr r3, [r3, #0] 800a57e: f003 030f and.w r3, r3, #15 800a582: 683a ldr r2, [r7, #0] 800a584: 429a cmp r2, r3 800a586: d005 beq.n 800a594 { return HAL_ERROR; 800a588: 2301 movs r3, #1 800a58a: e086 b.n 800a69a 800a58c: 52002000 .word 0x52002000 800a590: 58024400 .word 0x58024400 } } /*-------------------------- D1PCLK1/CDPCLK Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D1PCLK1) == RCC_CLOCKTYPE_D1PCLK1) 800a594: 687b ldr r3, [r7, #4] 800a596: 681b ldr r3, [r3, #0] 800a598: f003 0304 and.w r3, r3, #4 800a59c: 2b00 cmp r3, #0 800a59e: d010 beq.n 800a5c2 { #if defined(RCC_D1CFGR_D1PPRE) if ((RCC_ClkInitStruct->APB3CLKDivider) < (RCC->D1CFGR & RCC_D1CFGR_D1PPRE)) 800a5a0: 687b ldr r3, [r7, #4] 800a5a2: 691a ldr r2, [r3, #16] 800a5a4: 4b3f ldr r3, [pc, #252] @ (800a6a4 ) 800a5a6: 699b ldr r3, [r3, #24] 800a5a8: f003 0370 and.w r3, r3, #112 @ 0x70 800a5ac: 429a cmp r2, r3 800a5ae: d208 bcs.n 800a5c2 { assert_param(IS_RCC_D1PCLK1(RCC_ClkInitStruct->APB3CLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1PPRE, RCC_ClkInitStruct->APB3CLKDivider); 800a5b0: 4b3c ldr r3, [pc, #240] @ (800a6a4 ) 800a5b2: 699b ldr r3, [r3, #24] 800a5b4: f023 0270 bic.w r2, r3, #112 @ 0x70 800a5b8: 687b ldr r3, [r7, #4] 800a5ba: 691b ldr r3, [r3, #16] 800a5bc: 4939 ldr r1, [pc, #228] @ (800a6a4 ) 800a5be: 4313 orrs r3, r2 800a5c0: 618b str r3, [r1, #24] } #endif } /*-------------------------- PCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) 800a5c2: 687b ldr r3, [r7, #4] 800a5c4: 681b ldr r3, [r3, #0] 800a5c6: f003 0308 and.w r3, r3, #8 800a5ca: 2b00 cmp r3, #0 800a5cc: d010 beq.n 800a5f0 { #if defined(RCC_D2CFGR_D2PPRE1) if ((RCC_ClkInitStruct->APB1CLKDivider) < (RCC->D2CFGR & RCC_D2CFGR_D2PPRE1)) 800a5ce: 687b ldr r3, [r7, #4] 800a5d0: 695a ldr r2, [r3, #20] 800a5d2: 4b34 ldr r3, [pc, #208] @ (800a6a4 ) 800a5d4: 69db ldr r3, [r3, #28] 800a5d6: f003 0370 and.w r3, r3, #112 @ 0x70 800a5da: 429a cmp r2, r3 800a5dc: d208 bcs.n 800a5f0 { assert_param(IS_RCC_PCLK1(RCC_ClkInitStruct->APB1CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1, (RCC_ClkInitStruct->APB1CLKDivider)); 800a5de: 4b31 ldr r3, [pc, #196] @ (800a6a4 ) 800a5e0: 69db ldr r3, [r3, #28] 800a5e2: f023 0270 bic.w r2, r3, #112 @ 0x70 800a5e6: 687b ldr r3, [r7, #4] 800a5e8: 695b ldr r3, [r3, #20] 800a5ea: 492e ldr r1, [pc, #184] @ (800a6a4 ) 800a5ec: 4313 orrs r3, r2 800a5ee: 61cb str r3, [r1, #28] } #endif } /*-------------------------- PCLK2 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) 800a5f0: 687b ldr r3, [r7, #4] 800a5f2: 681b ldr r3, [r3, #0] 800a5f4: f003 0310 and.w r3, r3, #16 800a5f8: 2b00 cmp r3, #0 800a5fa: d010 beq.n 800a61e { #if defined (RCC_D2CFGR_D2PPRE2) if ((RCC_ClkInitStruct->APB2CLKDivider) < (RCC->D2CFGR & RCC_D2CFGR_D2PPRE2)) 800a5fc: 687b ldr r3, [r7, #4] 800a5fe: 699a ldr r2, [r3, #24] 800a600: 4b28 ldr r3, [pc, #160] @ (800a6a4 ) 800a602: 69db ldr r3, [r3, #28] 800a604: f403 63e0 and.w r3, r3, #1792 @ 0x700 800a608: 429a cmp r2, r3 800a60a: d208 bcs.n 800a61e { assert_param(IS_RCC_PCLK2(RCC_ClkInitStruct->APB2CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2, (RCC_ClkInitStruct->APB2CLKDivider)); 800a60c: 4b25 ldr r3, [pc, #148] @ (800a6a4 ) 800a60e: 69db ldr r3, [r3, #28] 800a610: f423 62e0 bic.w r2, r3, #1792 @ 0x700 800a614: 687b ldr r3, [r7, #4] 800a616: 699b ldr r3, [r3, #24] 800a618: 4922 ldr r1, [pc, #136] @ (800a6a4 ) 800a61a: 4313 orrs r3, r2 800a61c: 61cb str r3, [r1, #28] } #endif } /*-------------------------- D3PCLK1/SRDPCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D3PCLK1) == RCC_CLOCKTYPE_D3PCLK1) 800a61e: 687b ldr r3, [r7, #4] 800a620: 681b ldr r3, [r3, #0] 800a622: f003 0320 and.w r3, r3, #32 800a626: 2b00 cmp r3, #0 800a628: d010 beq.n 800a64c { #if defined(RCC_D3CFGR_D3PPRE) if ((RCC_ClkInitStruct->APB4CLKDivider) < (RCC->D3CFGR & RCC_D3CFGR_D3PPRE)) 800a62a: 687b ldr r3, [r7, #4] 800a62c: 69da ldr r2, [r3, #28] 800a62e: 4b1d ldr r3, [pc, #116] @ (800a6a4 ) 800a630: 6a1b ldr r3, [r3, #32] 800a632: f003 0370 and.w r3, r3, #112 @ 0x70 800a636: 429a cmp r2, r3 800a638: d208 bcs.n 800a64c { assert_param(IS_RCC_D3PCLK1(RCC_ClkInitStruct->APB4CLKDivider)); MODIFY_REG(RCC->D3CFGR, RCC_D3CFGR_D3PPRE, (RCC_ClkInitStruct->APB4CLKDivider)); 800a63a: 4b1a ldr r3, [pc, #104] @ (800a6a4 ) 800a63c: 6a1b ldr r3, [r3, #32] 800a63e: f023 0270 bic.w r2, r3, #112 @ 0x70 800a642: 687b ldr r3, [r7, #4] 800a644: 69db ldr r3, [r3, #28] 800a646: 4917 ldr r1, [pc, #92] @ (800a6a4 ) 800a648: 4313 orrs r3, r2 800a64a: 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); 800a64c: f000 f834 bl 800a6b8 800a650: 4602 mov r2, r0 800a652: 4b14 ldr r3, [pc, #80] @ (800a6a4 ) 800a654: 699b ldr r3, [r3, #24] 800a656: 0a1b lsrs r3, r3, #8 800a658: f003 030f and.w r3, r3, #15 800a65c: 4912 ldr r1, [pc, #72] @ (800a6a8 ) 800a65e: 5ccb ldrb r3, [r1, r3] 800a660: f003 031f and.w r3, r3, #31 800a664: fa22 f303 lsr.w r3, r2, r3 800a668: 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)); 800a66a: 4b0e ldr r3, [pc, #56] @ (800a6a4 ) 800a66c: 699b ldr r3, [r3, #24] 800a66e: f003 030f and.w r3, r3, #15 800a672: 4a0d ldr r2, [pc, #52] @ (800a6a8 ) 800a674: 5cd3 ldrb r3, [r2, r3] 800a676: f003 031f and.w r3, r3, #31 800a67a: 693a ldr r2, [r7, #16] 800a67c: fa22 f303 lsr.w r3, r2, r3 800a680: 4a0a ldr r2, [pc, #40] @ (800a6ac ) 800a682: 6013 str r3, [r2, #0] #endif #if defined(DUAL_CORE) && defined(CORE_CM4) SystemCoreClock = SystemD2Clock; #else SystemCoreClock = common_system_clock; 800a684: 4a0a ldr r2, [pc, #40] @ (800a6b0 ) 800a686: 693b ldr r3, [r7, #16] 800a688: 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); 800a68a: 4b0a ldr r3, [pc, #40] @ (800a6b4 ) 800a68c: 681b ldr r3, [r3, #0] 800a68e: 4618 mov r0, r3 800a690: f7f9 f922 bl 80038d8 800a694: 4603 mov r3, r0 800a696: 73fb strb r3, [r7, #15] return halstatus; 800a698: 7bfb ldrb r3, [r7, #15] } 800a69a: 4618 mov r0, r3 800a69c: 3718 adds r7, #24 800a69e: 46bd mov sp, r7 800a6a0: bd80 pop {r7, pc} 800a6a2: bf00 nop 800a6a4: 58024400 .word 0x58024400 800a6a8: 08030a24 .word 0x08030a24 800a6ac: 24000010 .word 0x24000010 800a6b0: 2400000c .word 0x2400000c 800a6b4: 2400002c .word 0x2400002c 0800a6b8 : * * * @retval SYSCLK frequency */ uint32_t HAL_RCC_GetSysClockFreq(void) { 800a6b8: b480 push {r7} 800a6ba: b089 sub sp, #36 @ 0x24 800a6bc: af00 add r7, sp, #0 float_t fracn1, pllvco; uint32_t sysclockfreq; /* Get SYSCLK source -------------------------------------------------------*/ switch (RCC->CFGR & RCC_CFGR_SWS) 800a6be: 4bb3 ldr r3, [pc, #716] @ (800a98c ) 800a6c0: 691b ldr r3, [r3, #16] 800a6c2: f003 0338 and.w r3, r3, #56 @ 0x38 800a6c6: 2b18 cmp r3, #24 800a6c8: f200 8155 bhi.w 800a976 800a6cc: a201 add r2, pc, #4 @ (adr r2, 800a6d4 ) 800a6ce: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800a6d2: bf00 nop 800a6d4: 0800a739 .word 0x0800a739 800a6d8: 0800a977 .word 0x0800a977 800a6dc: 0800a977 .word 0x0800a977 800a6e0: 0800a977 .word 0x0800a977 800a6e4: 0800a977 .word 0x0800a977 800a6e8: 0800a977 .word 0x0800a977 800a6ec: 0800a977 .word 0x0800a977 800a6f0: 0800a977 .word 0x0800a977 800a6f4: 0800a75f .word 0x0800a75f 800a6f8: 0800a977 .word 0x0800a977 800a6fc: 0800a977 .word 0x0800a977 800a700: 0800a977 .word 0x0800a977 800a704: 0800a977 .word 0x0800a977 800a708: 0800a977 .word 0x0800a977 800a70c: 0800a977 .word 0x0800a977 800a710: 0800a977 .word 0x0800a977 800a714: 0800a765 .word 0x0800a765 800a718: 0800a977 .word 0x0800a977 800a71c: 0800a977 .word 0x0800a977 800a720: 0800a977 .word 0x0800a977 800a724: 0800a977 .word 0x0800a977 800a728: 0800a977 .word 0x0800a977 800a72c: 0800a977 .word 0x0800a977 800a730: 0800a977 .word 0x0800a977 800a734: 0800a76b .word 0x0800a76b { case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800a738: 4b94 ldr r3, [pc, #592] @ (800a98c ) 800a73a: 681b ldr r3, [r3, #0] 800a73c: f003 0320 and.w r3, r3, #32 800a740: 2b00 cmp r3, #0 800a742: d009 beq.n 800a758 { sysclockfreq = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3)); 800a744: 4b91 ldr r3, [pc, #580] @ (800a98c ) 800a746: 681b ldr r3, [r3, #0] 800a748: 08db lsrs r3, r3, #3 800a74a: f003 0303 and.w r3, r3, #3 800a74e: 4a90 ldr r2, [pc, #576] @ (800a990 ) 800a750: fa22 f303 lsr.w r3, r2, r3 800a754: 61bb str r3, [r7, #24] else { sysclockfreq = (uint32_t) HSI_VALUE; } break; 800a756: e111 b.n 800a97c sysclockfreq = (uint32_t) HSI_VALUE; 800a758: 4b8d ldr r3, [pc, #564] @ (800a990 ) 800a75a: 61bb str r3, [r7, #24] break; 800a75c: e10e b.n 800a97c case RCC_CFGR_SWS_CSI: /* CSI used as system clock source */ sysclockfreq = CSI_VALUE; 800a75e: 4b8d ldr r3, [pc, #564] @ (800a994 ) 800a760: 61bb str r3, [r7, #24] break; 800a762: e10b b.n 800a97c case RCC_CFGR_SWS_HSE: /* HSE used as system clock source */ sysclockfreq = HSE_VALUE; 800a764: 4b8c ldr r3, [pc, #560] @ (800a998 ) 800a766: 61bb str r3, [r7, #24] break; 800a768: e108 b.n 800a97c 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); 800a76a: 4b88 ldr r3, [pc, #544] @ (800a98c ) 800a76c: 6a9b ldr r3, [r3, #40] @ 0x28 800a76e: f003 0303 and.w r3, r3, #3 800a772: 617b str r3, [r7, #20] pllm = ((RCC->PLLCKSELR & RCC_PLLCKSELR_DIVM1) >> 4) ; 800a774: 4b85 ldr r3, [pc, #532] @ (800a98c ) 800a776: 6a9b ldr r3, [r3, #40] @ 0x28 800a778: 091b lsrs r3, r3, #4 800a77a: f003 033f and.w r3, r3, #63 @ 0x3f 800a77e: 613b str r3, [r7, #16] pllfracen = ((RCC-> PLLCFGR & RCC_PLLCFGR_PLL1FRACEN) >> RCC_PLLCFGR_PLL1FRACEN_Pos); 800a780: 4b82 ldr r3, [pc, #520] @ (800a98c ) 800a782: 6adb ldr r3, [r3, #44] @ 0x2c 800a784: f003 0301 and.w r3, r3, #1 800a788: 60fb str r3, [r7, #12] fracn1 = (float_t)(uint32_t)(pllfracen * ((RCC->PLL1FRACR & RCC_PLL1FRACR_FRACN1) >> 3)); 800a78a: 4b80 ldr r3, [pc, #512] @ (800a98c ) 800a78c: 6b5b ldr r3, [r3, #52] @ 0x34 800a78e: 08db lsrs r3, r3, #3 800a790: f3c3 030c ubfx r3, r3, #0, #13 800a794: 68fa ldr r2, [r7, #12] 800a796: fb02 f303 mul.w r3, r2, r3 800a79a: ee07 3a90 vmov s15, r3 800a79e: eef8 7a67 vcvt.f32.u32 s15, s15 800a7a2: edc7 7a02 vstr s15, [r7, #8] if (pllm != 0U) 800a7a6: 693b ldr r3, [r7, #16] 800a7a8: 2b00 cmp r3, #0 800a7aa: f000 80e1 beq.w 800a970 800a7ae: 697b ldr r3, [r7, #20] 800a7b0: 2b02 cmp r3, #2 800a7b2: f000 8083 beq.w 800a8bc 800a7b6: 697b ldr r3, [r7, #20] 800a7b8: 2b02 cmp r3, #2 800a7ba: f200 80a1 bhi.w 800a900 800a7be: 697b ldr r3, [r7, #20] 800a7c0: 2b00 cmp r3, #0 800a7c2: d003 beq.n 800a7cc 800a7c4: 697b ldr r3, [r7, #20] 800a7c6: 2b01 cmp r3, #1 800a7c8: d056 beq.n 800a878 800a7ca: e099 b.n 800a900 { switch (pllsource) { case RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800a7cc: 4b6f ldr r3, [pc, #444] @ (800a98c ) 800a7ce: 681b ldr r3, [r3, #0] 800a7d0: f003 0320 and.w r3, r3, #32 800a7d4: 2b00 cmp r3, #0 800a7d6: d02d beq.n 800a834 { hsivalue = (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3)); 800a7d8: 4b6c ldr r3, [pc, #432] @ (800a98c ) 800a7da: 681b ldr r3, [r3, #0] 800a7dc: 08db lsrs r3, r3, #3 800a7de: f003 0303 and.w r3, r3, #3 800a7e2: 4a6b ldr r2, [pc, #428] @ (800a990 ) 800a7e4: fa22 f303 lsr.w r3, r2, r3 800a7e8: 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); 800a7ea: 687b ldr r3, [r7, #4] 800a7ec: ee07 3a90 vmov s15, r3 800a7f0: eef8 6a67 vcvt.f32.u32 s13, s15 800a7f4: 693b ldr r3, [r7, #16] 800a7f6: ee07 3a90 vmov s15, r3 800a7fa: eef8 7a67 vcvt.f32.u32 s15, s15 800a7fe: ee86 7aa7 vdiv.f32 s14, s13, s15 800a802: 4b62 ldr r3, [pc, #392] @ (800a98c ) 800a804: 6b1b ldr r3, [r3, #48] @ 0x30 800a806: f3c3 0308 ubfx r3, r3, #0, #9 800a80a: ee07 3a90 vmov s15, r3 800a80e: eef8 6a67 vcvt.f32.u32 s13, s15 800a812: ed97 6a02 vldr s12, [r7, #8] 800a816: eddf 5a61 vldr s11, [pc, #388] @ 800a99c 800a81a: eec6 7a25 vdiv.f32 s15, s12, s11 800a81e: ee76 7aa7 vadd.f32 s15, s13, s15 800a822: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800a826: ee77 7aa6 vadd.f32 s15, s15, s13 800a82a: ee67 7a27 vmul.f32 s15, s14, s15 800a82e: 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; 800a832: e087 b.n 800a944 pllvco = ((float_t)HSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1 / (float_t)0x2000) + (float_t)1); 800a834: 693b ldr r3, [r7, #16] 800a836: ee07 3a90 vmov s15, r3 800a83a: eef8 7a67 vcvt.f32.u32 s15, s15 800a83e: eddf 6a58 vldr s13, [pc, #352] @ 800a9a0 800a842: ee86 7aa7 vdiv.f32 s14, s13, s15 800a846: 4b51 ldr r3, [pc, #324] @ (800a98c ) 800a848: 6b1b ldr r3, [r3, #48] @ 0x30 800a84a: f3c3 0308 ubfx r3, r3, #0, #9 800a84e: ee07 3a90 vmov s15, r3 800a852: eef8 6a67 vcvt.f32.u32 s13, s15 800a856: ed97 6a02 vldr s12, [r7, #8] 800a85a: eddf 5a50 vldr s11, [pc, #320] @ 800a99c 800a85e: eec6 7a25 vdiv.f32 s15, s12, s11 800a862: ee76 7aa7 vadd.f32 s15, s13, s15 800a866: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800a86a: ee77 7aa6 vadd.f32 s15, s15, s13 800a86e: ee67 7a27 vmul.f32 s15, s14, s15 800a872: edc7 7a07 vstr s15, [r7, #28] break; 800a876: e065 b.n 800a944 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); 800a878: 693b ldr r3, [r7, #16] 800a87a: ee07 3a90 vmov s15, r3 800a87e: eef8 7a67 vcvt.f32.u32 s15, s15 800a882: eddf 6a48 vldr s13, [pc, #288] @ 800a9a4 800a886: ee86 7aa7 vdiv.f32 s14, s13, s15 800a88a: 4b40 ldr r3, [pc, #256] @ (800a98c ) 800a88c: 6b1b ldr r3, [r3, #48] @ 0x30 800a88e: f3c3 0308 ubfx r3, r3, #0, #9 800a892: ee07 3a90 vmov s15, r3 800a896: eef8 6a67 vcvt.f32.u32 s13, s15 800a89a: ed97 6a02 vldr s12, [r7, #8] 800a89e: eddf 5a3f vldr s11, [pc, #252] @ 800a99c 800a8a2: eec6 7a25 vdiv.f32 s15, s12, s11 800a8a6: ee76 7aa7 vadd.f32 s15, s13, s15 800a8aa: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800a8ae: ee77 7aa6 vadd.f32 s15, s15, s13 800a8b2: ee67 7a27 vmul.f32 s15, s14, s15 800a8b6: edc7 7a07 vstr s15, [r7, #28] break; 800a8ba: e043 b.n 800a944 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); 800a8bc: 693b ldr r3, [r7, #16] 800a8be: ee07 3a90 vmov s15, r3 800a8c2: eef8 7a67 vcvt.f32.u32 s15, s15 800a8c6: eddf 6a38 vldr s13, [pc, #224] @ 800a9a8 800a8ca: ee86 7aa7 vdiv.f32 s14, s13, s15 800a8ce: 4b2f ldr r3, [pc, #188] @ (800a98c ) 800a8d0: 6b1b ldr r3, [r3, #48] @ 0x30 800a8d2: f3c3 0308 ubfx r3, r3, #0, #9 800a8d6: ee07 3a90 vmov s15, r3 800a8da: eef8 6a67 vcvt.f32.u32 s13, s15 800a8de: ed97 6a02 vldr s12, [r7, #8] 800a8e2: eddf 5a2e vldr s11, [pc, #184] @ 800a99c 800a8e6: eec6 7a25 vdiv.f32 s15, s12, s11 800a8ea: ee76 7aa7 vadd.f32 s15, s13, s15 800a8ee: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800a8f2: ee77 7aa6 vadd.f32 s15, s15, s13 800a8f6: ee67 7a27 vmul.f32 s15, s14, s15 800a8fa: edc7 7a07 vstr s15, [r7, #28] break; 800a8fe: e021 b.n 800a944 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); 800a900: 693b ldr r3, [r7, #16] 800a902: ee07 3a90 vmov s15, r3 800a906: eef8 7a67 vcvt.f32.u32 s15, s15 800a90a: eddf 6a26 vldr s13, [pc, #152] @ 800a9a4 800a90e: ee86 7aa7 vdiv.f32 s14, s13, s15 800a912: 4b1e ldr r3, [pc, #120] @ (800a98c ) 800a914: 6b1b ldr r3, [r3, #48] @ 0x30 800a916: f3c3 0308 ubfx r3, r3, #0, #9 800a91a: ee07 3a90 vmov s15, r3 800a91e: eef8 6a67 vcvt.f32.u32 s13, s15 800a922: ed97 6a02 vldr s12, [r7, #8] 800a926: eddf 5a1d vldr s11, [pc, #116] @ 800a99c 800a92a: eec6 7a25 vdiv.f32 s15, s12, s11 800a92e: ee76 7aa7 vadd.f32 s15, s13, s15 800a932: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800a936: ee77 7aa6 vadd.f32 s15, s15, s13 800a93a: ee67 7a27 vmul.f32 s15, s14, s15 800a93e: edc7 7a07 vstr s15, [r7, #28] break; 800a942: bf00 nop } pllp = (((RCC->PLL1DIVR & RCC_PLL1DIVR_P1) >> 9) + 1U) ; 800a944: 4b11 ldr r3, [pc, #68] @ (800a98c ) 800a946: 6b1b ldr r3, [r3, #48] @ 0x30 800a948: 0a5b lsrs r3, r3, #9 800a94a: f003 037f and.w r3, r3, #127 @ 0x7f 800a94e: 3301 adds r3, #1 800a950: 603b str r3, [r7, #0] sysclockfreq = (uint32_t)(float_t)(pllvco / (float_t)pllp); 800a952: 683b ldr r3, [r7, #0] 800a954: ee07 3a90 vmov s15, r3 800a958: eeb8 7a67 vcvt.f32.u32 s14, s15 800a95c: edd7 6a07 vldr s13, [r7, #28] 800a960: eec6 7a87 vdiv.f32 s15, s13, s14 800a964: eefc 7ae7 vcvt.u32.f32 s15, s15 800a968: ee17 3a90 vmov r3, s15 800a96c: 61bb str r3, [r7, #24] } else { sysclockfreq = 0U; } break; 800a96e: e005 b.n 800a97c sysclockfreq = 0U; 800a970: 2300 movs r3, #0 800a972: 61bb str r3, [r7, #24] break; 800a974: e002 b.n 800a97c default: sysclockfreq = CSI_VALUE; 800a976: 4b07 ldr r3, [pc, #28] @ (800a994 ) 800a978: 61bb str r3, [r7, #24] break; 800a97a: bf00 nop } return sysclockfreq; 800a97c: 69bb ldr r3, [r7, #24] } 800a97e: 4618 mov r0, r3 800a980: 3724 adds r7, #36 @ 0x24 800a982: 46bd mov sp, r7 800a984: f85d 7b04 ldr.w r7, [sp], #4 800a988: 4770 bx lr 800a98a: bf00 nop 800a98c: 58024400 .word 0x58024400 800a990: 03d09000 .word 0x03d09000 800a994: 003d0900 .word 0x003d0900 800a998: 017d7840 .word 0x017d7840 800a99c: 46000000 .word 0x46000000 800a9a0: 4c742400 .word 0x4c742400 800a9a4: 4a742400 .word 0x4a742400 800a9a8: 4bbebc20 .word 0x4bbebc20 0800a9ac : * @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) { 800a9ac: b580 push {r7, lr} 800a9ae: b082 sub sp, #8 800a9b0: 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); 800a9b2: f7ff fe81 bl 800a6b8 800a9b6: 4602 mov r2, r0 800a9b8: 4b10 ldr r3, [pc, #64] @ (800a9fc ) 800a9ba: 699b ldr r3, [r3, #24] 800a9bc: 0a1b lsrs r3, r3, #8 800a9be: f003 030f and.w r3, r3, #15 800a9c2: 490f ldr r1, [pc, #60] @ (800aa00 ) 800a9c4: 5ccb ldrb r3, [r1, r3] 800a9c6: f003 031f and.w r3, r3, #31 800a9ca: fa22 f303 lsr.w r3, r2, r3 800a9ce: 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)); 800a9d0: 4b0a ldr r3, [pc, #40] @ (800a9fc ) 800a9d2: 699b ldr r3, [r3, #24] 800a9d4: f003 030f and.w r3, r3, #15 800a9d8: 4a09 ldr r2, [pc, #36] @ (800aa00 ) 800a9da: 5cd3 ldrb r3, [r2, r3] 800a9dc: f003 031f and.w r3, r3, #31 800a9e0: 687a ldr r2, [r7, #4] 800a9e2: fa22 f303 lsr.w r3, r2, r3 800a9e6: 4a07 ldr r2, [pc, #28] @ (800aa04 ) 800a9e8: 6013 str r3, [r2, #0] #endif #if defined(DUAL_CORE) && defined(CORE_CM4) SystemCoreClock = SystemD2Clock; #else SystemCoreClock = common_system_clock; 800a9ea: 4a07 ldr r2, [pc, #28] @ (800aa08 ) 800a9ec: 687b ldr r3, [r7, #4] 800a9ee: 6013 str r3, [r2, #0] #endif /* DUAL_CORE && CORE_CM4 */ return SystemD2Clock; 800a9f0: 4b04 ldr r3, [pc, #16] @ (800aa04 ) 800a9f2: 681b ldr r3, [r3, #0] } 800a9f4: 4618 mov r0, r3 800a9f6: 3708 adds r7, #8 800a9f8: 46bd mov sp, r7 800a9fa: bd80 pop {r7, pc} 800a9fc: 58024400 .word 0x58024400 800aa00: 08030a24 .word 0x08030a24 800aa04: 24000010 .word 0x24000010 800aa08: 2400000c .word 0x2400000c 0800aa0c : * @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) { 800aa0c: b580 push {r7, lr} 800aa0e: 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)); 800aa10: f7ff ffcc bl 800a9ac 800aa14: 4602 mov r2, r0 800aa16: 4b06 ldr r3, [pc, #24] @ (800aa30 ) 800aa18: 69db ldr r3, [r3, #28] 800aa1a: 091b lsrs r3, r3, #4 800aa1c: f003 0307 and.w r3, r3, #7 800aa20: 4904 ldr r1, [pc, #16] @ (800aa34 ) 800aa22: 5ccb ldrb r3, [r1, r3] 800aa24: f003 031f and.w r3, r3, #31 800aa28: 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 } 800aa2c: 4618 mov r0, r3 800aa2e: bd80 pop {r7, pc} 800aa30: 58024400 .word 0x58024400 800aa34: 08030a24 .word 0x08030a24 0800aa38 : * @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) { 800aa38: b580 push {r7, lr} 800aa3a: 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)); 800aa3c: f7ff ffb6 bl 800a9ac 800aa40: 4602 mov r2, r0 800aa42: 4b06 ldr r3, [pc, #24] @ (800aa5c ) 800aa44: 69db ldr r3, [r3, #28] 800aa46: 0a1b lsrs r3, r3, #8 800aa48: f003 0307 and.w r3, r3, #7 800aa4c: 4904 ldr r1, [pc, #16] @ (800aa60 ) 800aa4e: 5ccb ldrb r3, [r1, r3] 800aa50: f003 031f and.w r3, r3, #31 800aa54: fa22 f303 lsr.w r3, r2, r3 #else return (HAL_RCC_GetHCLKFreq() >> ((D1CorePrescTable[(RCC->CDCFGR2 & RCC_CDCFGR2_CDPPRE2) >> RCC_CDCFGR2_CDPPRE2_Pos]) & 0x1FU)); #endif } 800aa58: 4618 mov r0, r3 800aa5a: bd80 pop {r7, pc} 800aa5c: 58024400 .word 0x58024400 800aa60: 08030a24 .word 0x08030a24 0800aa64 : * will be configured. * @param pFLatency: Pointer on the Flash Latency. * @retval None */ void HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency) { 800aa64: b480 push {r7} 800aa66: b083 sub sp, #12 800aa68: af00 add r7, sp, #0 800aa6a: 6078 str r0, [r7, #4] 800aa6c: 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 | 800aa6e: 687b ldr r3, [r7, #4] 800aa70: 223f movs r2, #63 @ 0x3f 800aa72: 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); 800aa74: 4b1a ldr r3, [pc, #104] @ (800aae0 ) 800aa76: 691b ldr r3, [r3, #16] 800aa78: f003 0207 and.w r2, r3, #7 800aa7c: 687b ldr r3, [r7, #4] 800aa7e: 605a str r2, [r3, #4] #if defined(RCC_D1CFGR_D1CPRE) /* Get the SYSCLK configuration ----------------------------------------------*/ RCC_ClkInitStruct->SYSCLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_D1CPRE); 800aa80: 4b17 ldr r3, [pc, #92] @ (800aae0 ) 800aa82: 699b ldr r3, [r3, #24] 800aa84: f403 6270 and.w r2, r3, #3840 @ 0xf00 800aa88: 687b ldr r3, [r7, #4] 800aa8a: 609a str r2, [r3, #8] /* Get the D1HCLK configuration ----------------------------------------------*/ RCC_ClkInitStruct->AHBCLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_HPRE); 800aa8c: 4b14 ldr r3, [pc, #80] @ (800aae0 ) 800aa8e: 699b ldr r3, [r3, #24] 800aa90: f003 020f and.w r2, r3, #15 800aa94: 687b ldr r3, [r7, #4] 800aa96: 60da str r2, [r3, #12] /* Get the APB3 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB3CLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_D1PPRE); 800aa98: 4b11 ldr r3, [pc, #68] @ (800aae0 ) 800aa9a: 699b ldr r3, [r3, #24] 800aa9c: f003 0270 and.w r2, r3, #112 @ 0x70 800aaa0: 687b ldr r3, [r7, #4] 800aaa2: 611a str r2, [r3, #16] /* Get the APB1 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB1CLKDivider = (uint32_t)(RCC->D2CFGR & RCC_D2CFGR_D2PPRE1); 800aaa4: 4b0e ldr r3, [pc, #56] @ (800aae0 ) 800aaa6: 69db ldr r3, [r3, #28] 800aaa8: f003 0270 and.w r2, r3, #112 @ 0x70 800aaac: 687b ldr r3, [r7, #4] 800aaae: 615a str r2, [r3, #20] /* Get the APB2 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB2CLKDivider = (uint32_t)(RCC->D2CFGR & RCC_D2CFGR_D2PPRE2); 800aab0: 4b0b ldr r3, [pc, #44] @ (800aae0 ) 800aab2: 69db ldr r3, [r3, #28] 800aab4: f403 62e0 and.w r2, r3, #1792 @ 0x700 800aab8: 687b ldr r3, [r7, #4] 800aaba: 619a str r2, [r3, #24] /* Get the APB4 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB4CLKDivider = (uint32_t)(RCC->D3CFGR & RCC_D3CFGR_D3PPRE); 800aabc: 4b08 ldr r3, [pc, #32] @ (800aae0 ) 800aabe: 6a1b ldr r3, [r3, #32] 800aac0: f003 0270 and.w r2, r3, #112 @ 0x70 800aac4: 687b ldr r3, [r7, #4] 800aac6: 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); 800aac8: 4b06 ldr r3, [pc, #24] @ (800aae4 ) 800aaca: 681b ldr r3, [r3, #0] 800aacc: f003 020f and.w r2, r3, #15 800aad0: 683b ldr r3, [r7, #0] 800aad2: 601a str r2, [r3, #0] } 800aad4: bf00 nop 800aad6: 370c adds r7, #12 800aad8: 46bd mov sp, r7 800aada: f85d 7b04 ldr.w r7, [sp], #4 800aade: 4770 bx lr 800aae0: 58024400 .word 0x58024400 800aae4: 52002000 .word 0x52002000 0800aae8 : * (*) : Available on some STM32H7 lines only. * * @retval HAL status */ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit) { 800aae8: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr} 800aaec: b0c8 sub sp, #288 @ 0x120 800aaee: af00 add r7, sp, #0 800aaf0: f8c7 010c str.w r0, [r7, #268] @ 0x10c uint32_t tmpreg; uint32_t tickstart; HAL_StatusTypeDef ret = HAL_OK; /* Intermediate status */ 800aaf4: 2300 movs r3, #0 800aaf6: f887 311f strb.w r3, [r7, #287] @ 0x11f HAL_StatusTypeDef status = HAL_OK; /* Final status */ 800aafa: 2300 movs r3, #0 800aafc: f887 311e strb.w r3, [r7, #286] @ 0x11e /*---------------------------- SPDIFRX configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPDIFRX) == RCC_PERIPHCLK_SPDIFRX) 800ab00: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ab04: e9d3 2300 ldrd r2, r3, [r3] 800ab08: f002 6400 and.w r4, r2, #134217728 @ 0x8000000 800ab0c: 2500 movs r5, #0 800ab0e: ea54 0305 orrs.w r3, r4, r5 800ab12: d049 beq.n 800aba8 { switch (PeriphClkInit->SpdifrxClockSelection) 800ab14: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ab18: 6e9b ldr r3, [r3, #104] @ 0x68 800ab1a: f5b3 1f40 cmp.w r3, #3145728 @ 0x300000 800ab1e: d02f beq.n 800ab80 800ab20: f5b3 1f40 cmp.w r3, #3145728 @ 0x300000 800ab24: d828 bhi.n 800ab78 800ab26: f5b3 1f00 cmp.w r3, #2097152 @ 0x200000 800ab2a: d01a beq.n 800ab62 800ab2c: f5b3 1f00 cmp.w r3, #2097152 @ 0x200000 800ab30: d822 bhi.n 800ab78 800ab32: 2b00 cmp r3, #0 800ab34: d003 beq.n 800ab3e 800ab36: f5b3 1f80 cmp.w r3, #1048576 @ 0x100000 800ab3a: d007 beq.n 800ab4c 800ab3c: e01c b.n 800ab78 { 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); 800ab3e: 4bb8 ldr r3, [pc, #736] @ (800ae20 ) 800ab40: 6adb ldr r3, [r3, #44] @ 0x2c 800ab42: 4ab7 ldr r2, [pc, #732] @ (800ae20 ) 800ab44: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800ab48: 62d3 str r3, [r2, #44] @ 0x2c /* SPDIFRX clock source configuration done later after clock selection check */ break; 800ab4a: e01a b.n 800ab82 case RCC_SPDIFRXCLKSOURCE_PLL2: /* PLL2 is used as clock source for SPDIFRX*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_R_UPDATE); 800ab4c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ab50: 3308 adds r3, #8 800ab52: 2102 movs r1, #2 800ab54: 4618 mov r0, r3 800ab56: f001 fc73 bl 800c440 800ab5a: 4603 mov r3, r0 800ab5c: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPDIFRX clock source configuration done later after clock selection check */ break; 800ab60: e00f b.n 800ab82 case RCC_SPDIFRXCLKSOURCE_PLL3: /* PLL3 is used as clock source for SPDIFRX*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800ab62: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ab66: 3328 adds r3, #40 @ 0x28 800ab68: 2102 movs r1, #2 800ab6a: 4618 mov r0, r3 800ab6c: f001 fd1a bl 800c5a4 800ab70: 4603 mov r3, r0 800ab72: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPDIFRX clock source configuration done later after clock selection check */ break; 800ab76: e004 b.n 800ab82 /* 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; 800ab78: 2301 movs r3, #1 800ab7a: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800ab7e: e000 b.n 800ab82 break; 800ab80: bf00 nop } if (ret == HAL_OK) 800ab82: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800ab86: 2b00 cmp r3, #0 800ab88: d10a bne.n 800aba0 { /* Set the source of SPDIFRX clock*/ __HAL_RCC_SPDIFRX_CONFIG(PeriphClkInit->SpdifrxClockSelection); 800ab8a: 4ba5 ldr r3, [pc, #660] @ (800ae20 ) 800ab8c: 6d1b ldr r3, [r3, #80] @ 0x50 800ab8e: f423 1140 bic.w r1, r3, #3145728 @ 0x300000 800ab92: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ab96: 6e9b ldr r3, [r3, #104] @ 0x68 800ab98: 4aa1 ldr r2, [pc, #644] @ (800ae20 ) 800ab9a: 430b orrs r3, r1 800ab9c: 6513 str r3, [r2, #80] @ 0x50 800ab9e: e003 b.n 800aba8 } else { /* set overall return value */ status = ret; 800aba0: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800aba4: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- SAI1 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) 800aba8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800abac: e9d3 2300 ldrd r2, r3, [r3] 800abb0: f402 7880 and.w r8, r2, #256 @ 0x100 800abb4: f04f 0900 mov.w r9, #0 800abb8: ea58 0309 orrs.w r3, r8, r9 800abbc: d047 beq.n 800ac4e { switch (PeriphClkInit->Sai1ClockSelection) 800abbe: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800abc2: 6d9b ldr r3, [r3, #88] @ 0x58 800abc4: 2b04 cmp r3, #4 800abc6: d82a bhi.n 800ac1e 800abc8: a201 add r2, pc, #4 @ (adr r2, 800abd0 ) 800abca: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800abce: bf00 nop 800abd0: 0800abe5 .word 0x0800abe5 800abd4: 0800abf3 .word 0x0800abf3 800abd8: 0800ac09 .word 0x0800ac09 800abdc: 0800ac27 .word 0x0800ac27 800abe0: 0800ac27 .word 0x0800ac27 { 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); 800abe4: 4b8e ldr r3, [pc, #568] @ (800ae20 ) 800abe6: 6adb ldr r3, [r3, #44] @ 0x2c 800abe8: 4a8d ldr r2, [pc, #564] @ (800ae20 ) 800abea: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800abee: 62d3 str r3, [r2, #44] @ 0x2c /* SAI1 clock source configuration done later after clock selection check */ break; 800abf0: e01a b.n 800ac28 case RCC_SAI1CLKSOURCE_PLL2: /* PLL2 is used as clock source for SAI1*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800abf2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800abf6: 3308 adds r3, #8 800abf8: 2100 movs r1, #0 800abfa: 4618 mov r0, r3 800abfc: f001 fc20 bl 800c440 800ac00: 4603 mov r3, r0 800ac02: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI1 clock source configuration done later after clock selection check */ break; 800ac06: e00f b.n 800ac28 case RCC_SAI1CLKSOURCE_PLL3: /* PLL3 is used as clock source for SAI1*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800ac08: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ac0c: 3328 adds r3, #40 @ 0x28 800ac0e: 2100 movs r1, #0 800ac10: 4618 mov r0, r3 800ac12: f001 fcc7 bl 800c5a4 800ac16: 4603 mov r3, r0 800ac18: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI1 clock source configuration done later after clock selection check */ break; 800ac1c: e004 b.n 800ac28 /* 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; 800ac1e: 2301 movs r3, #1 800ac20: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800ac24: e000 b.n 800ac28 break; 800ac26: bf00 nop } if (ret == HAL_OK) 800ac28: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800ac2c: 2b00 cmp r3, #0 800ac2e: d10a bne.n 800ac46 { /* Set the source of SAI1 clock*/ __HAL_RCC_SAI1_CONFIG(PeriphClkInit->Sai1ClockSelection); 800ac30: 4b7b ldr r3, [pc, #492] @ (800ae20 ) 800ac32: 6d1b ldr r3, [r3, #80] @ 0x50 800ac34: f023 0107 bic.w r1, r3, #7 800ac38: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ac3c: 6d9b ldr r3, [r3, #88] @ 0x58 800ac3e: 4a78 ldr r2, [pc, #480] @ (800ae20 ) 800ac40: 430b orrs r3, r1 800ac42: 6513 str r3, [r2, #80] @ 0x50 800ac44: e003 b.n 800ac4e } else { /* set overall return value */ status = ret; 800ac46: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800ac4a: f887 311e strb.w r3, [r7, #286] @ 0x11e } } #if defined(SAI3) /*---------------------------- SAI2/3 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI23) == RCC_PERIPHCLK_SAI23) 800ac4e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ac52: e9d3 2300 ldrd r2, r3, [r3] 800ac56: f402 7a00 and.w sl, r2, #512 @ 0x200 800ac5a: f04f 0b00 mov.w fp, #0 800ac5e: ea5a 030b orrs.w r3, sl, fp 800ac62: d04c beq.n 800acfe { switch (PeriphClkInit->Sai23ClockSelection) 800ac64: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ac68: 6ddb ldr r3, [r3, #92] @ 0x5c 800ac6a: f5b3 7f80 cmp.w r3, #256 @ 0x100 800ac6e: d030 beq.n 800acd2 800ac70: f5b3 7f80 cmp.w r3, #256 @ 0x100 800ac74: d829 bhi.n 800acca 800ac76: 2bc0 cmp r3, #192 @ 0xc0 800ac78: d02d beq.n 800acd6 800ac7a: 2bc0 cmp r3, #192 @ 0xc0 800ac7c: d825 bhi.n 800acca 800ac7e: 2b80 cmp r3, #128 @ 0x80 800ac80: d018 beq.n 800acb4 800ac82: 2b80 cmp r3, #128 @ 0x80 800ac84: d821 bhi.n 800acca 800ac86: 2b00 cmp r3, #0 800ac88: d002 beq.n 800ac90 800ac8a: 2b40 cmp r3, #64 @ 0x40 800ac8c: d007 beq.n 800ac9e 800ac8e: e01c b.n 800acca { 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); 800ac90: 4b63 ldr r3, [pc, #396] @ (800ae20 ) 800ac92: 6adb ldr r3, [r3, #44] @ 0x2c 800ac94: 4a62 ldr r2, [pc, #392] @ (800ae20 ) 800ac96: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800ac9a: 62d3 str r3, [r2, #44] @ 0x2c /* SAI2/3 clock source configuration done later after clock selection check */ break; 800ac9c: e01c b.n 800acd8 case RCC_SAI23CLKSOURCE_PLL2: /* PLL2 is used as clock source for SAI2/3 */ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800ac9e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800aca2: 3308 adds r3, #8 800aca4: 2100 movs r1, #0 800aca6: 4618 mov r0, r3 800aca8: f001 fbca bl 800c440 800acac: 4603 mov r3, r0 800acae: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI2/3 clock source configuration done later after clock selection check */ break; 800acb2: e011 b.n 800acd8 case RCC_SAI23CLKSOURCE_PLL3: /* PLL3 is used as clock source for SAI2/3 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800acb4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800acb8: 3328 adds r3, #40 @ 0x28 800acba: 2100 movs r1, #0 800acbc: 4618 mov r0, r3 800acbe: f001 fc71 bl 800c5a4 800acc2: 4603 mov r3, r0 800acc4: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI2/3 clock source configuration done later after clock selection check */ break; 800acc8: e006 b.n 800acd8 /* 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; 800acca: 2301 movs r3, #1 800accc: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800acd0: e002 b.n 800acd8 break; 800acd2: bf00 nop 800acd4: e000 b.n 800acd8 break; 800acd6: bf00 nop } if (ret == HAL_OK) 800acd8: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800acdc: 2b00 cmp r3, #0 800acde: d10a bne.n 800acf6 { /* Set the source of SAI2/3 clock*/ __HAL_RCC_SAI23_CONFIG(PeriphClkInit->Sai23ClockSelection); 800ace0: 4b4f ldr r3, [pc, #316] @ (800ae20 ) 800ace2: 6d1b ldr r3, [r3, #80] @ 0x50 800ace4: f423 71e0 bic.w r1, r3, #448 @ 0x1c0 800ace8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800acec: 6ddb ldr r3, [r3, #92] @ 0x5c 800acee: 4a4c ldr r2, [pc, #304] @ (800ae20 ) 800acf0: 430b orrs r3, r1 800acf2: 6513 str r3, [r2, #80] @ 0x50 800acf4: e003 b.n 800acfe } else { /* set overall return value */ status = ret; 800acf6: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800acfa: f887 311e strb.w r3, [r7, #286] @ 0x11e } #endif /*SAI2B*/ #if defined(SAI4) /*---------------------------- SAI4A configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI4A) == RCC_PERIPHCLK_SAI4A) 800acfe: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ad02: e9d3 2300 ldrd r2, r3, [r3] 800ad06: f402 6380 and.w r3, r2, #1024 @ 0x400 800ad0a: f8c7 3100 str.w r3, [r7, #256] @ 0x100 800ad0e: 2300 movs r3, #0 800ad10: f8c7 3104 str.w r3, [r7, #260] @ 0x104 800ad14: e9d7 1240 ldrd r1, r2, [r7, #256] @ 0x100 800ad18: 460b mov r3, r1 800ad1a: 4313 orrs r3, r2 800ad1c: d053 beq.n 800adc6 { switch (PeriphClkInit->Sai4AClockSelection) 800ad1e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ad22: f8d3 30a8 ldr.w r3, [r3, #168] @ 0xa8 800ad26: f5b3 0f00 cmp.w r3, #8388608 @ 0x800000 800ad2a: d035 beq.n 800ad98 800ad2c: f5b3 0f00 cmp.w r3, #8388608 @ 0x800000 800ad30: d82e bhi.n 800ad90 800ad32: f5b3 0fc0 cmp.w r3, #6291456 @ 0x600000 800ad36: d031 beq.n 800ad9c 800ad38: f5b3 0fc0 cmp.w r3, #6291456 @ 0x600000 800ad3c: d828 bhi.n 800ad90 800ad3e: f5b3 0f80 cmp.w r3, #4194304 @ 0x400000 800ad42: d01a beq.n 800ad7a 800ad44: f5b3 0f80 cmp.w r3, #4194304 @ 0x400000 800ad48: d822 bhi.n 800ad90 800ad4a: 2b00 cmp r3, #0 800ad4c: d003 beq.n 800ad56 800ad4e: f5b3 1f00 cmp.w r3, #2097152 @ 0x200000 800ad52: d007 beq.n 800ad64 800ad54: e01c b.n 800ad90 { 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); 800ad56: 4b32 ldr r3, [pc, #200] @ (800ae20 ) 800ad58: 6adb ldr r3, [r3, #44] @ 0x2c 800ad5a: 4a31 ldr r2, [pc, #196] @ (800ae20 ) 800ad5c: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800ad60: 62d3 str r3, [r2, #44] @ 0x2c /* SAI1 clock source configuration done later after clock selection check */ break; 800ad62: e01c b.n 800ad9e case RCC_SAI4ACLKSOURCE_PLL2: /* PLL2 is used as clock source for SAI2*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800ad64: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ad68: 3308 adds r3, #8 800ad6a: 2100 movs r1, #0 800ad6c: 4618 mov r0, r3 800ad6e: f001 fb67 bl 800c440 800ad72: 4603 mov r3, r0 800ad74: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI2 clock source configuration done later after clock selection check */ break; 800ad78: e011 b.n 800ad9e case RCC_SAI4ACLKSOURCE_PLL3: /* PLL3 is used as clock source for SAI2*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800ad7a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ad7e: 3328 adds r3, #40 @ 0x28 800ad80: 2100 movs r1, #0 800ad82: 4618 mov r0, r3 800ad84: f001 fc0e bl 800c5a4 800ad88: 4603 mov r3, r0 800ad8a: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI1 clock source configuration done later after clock selection check */ break; 800ad8e: e006 b.n 800ad9e /* SAI4A clock source configuration done later after clock selection check */ break; #endif /* RCC_VER_3_0 */ default: ret = HAL_ERROR; 800ad90: 2301 movs r3, #1 800ad92: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800ad96: e002 b.n 800ad9e break; 800ad98: bf00 nop 800ad9a: e000 b.n 800ad9e break; 800ad9c: bf00 nop } if (ret == HAL_OK) 800ad9e: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800ada2: 2b00 cmp r3, #0 800ada4: d10b bne.n 800adbe { /* Set the source of SAI4A clock*/ __HAL_RCC_SAI4A_CONFIG(PeriphClkInit->Sai4AClockSelection); 800ada6: 4b1e ldr r3, [pc, #120] @ (800ae20 ) 800ada8: 6d9b ldr r3, [r3, #88] @ 0x58 800adaa: f423 0160 bic.w r1, r3, #14680064 @ 0xe00000 800adae: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800adb2: f8d3 30a8 ldr.w r3, [r3, #168] @ 0xa8 800adb6: 4a1a ldr r2, [pc, #104] @ (800ae20 ) 800adb8: 430b orrs r3, r1 800adba: 6593 str r3, [r2, #88] @ 0x58 800adbc: e003 b.n 800adc6 } else { /* set overall return value */ status = ret; 800adbe: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800adc2: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- SAI4B configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI4B) == RCC_PERIPHCLK_SAI4B) 800adc6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800adca: e9d3 2300 ldrd r2, r3, [r3] 800adce: f402 6300 and.w r3, r2, #2048 @ 0x800 800add2: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 800add6: 2300 movs r3, #0 800add8: f8c7 30fc str.w r3, [r7, #252] @ 0xfc 800addc: e9d7 123e ldrd r1, r2, [r7, #248] @ 0xf8 800ade0: 460b mov r3, r1 800ade2: 4313 orrs r3, r2 800ade4: d056 beq.n 800ae94 { switch (PeriphClkInit->Sai4BClockSelection) 800ade6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800adea: f8d3 30ac ldr.w r3, [r3, #172] @ 0xac 800adee: f1b3 6f80 cmp.w r3, #67108864 @ 0x4000000 800adf2: d038 beq.n 800ae66 800adf4: f1b3 6f80 cmp.w r3, #67108864 @ 0x4000000 800adf8: d831 bhi.n 800ae5e 800adfa: f1b3 7f40 cmp.w r3, #50331648 @ 0x3000000 800adfe: d034 beq.n 800ae6a 800ae00: f1b3 7f40 cmp.w r3, #50331648 @ 0x3000000 800ae04: d82b bhi.n 800ae5e 800ae06: f1b3 7f00 cmp.w r3, #33554432 @ 0x2000000 800ae0a: d01d beq.n 800ae48 800ae0c: f1b3 7f00 cmp.w r3, #33554432 @ 0x2000000 800ae10: d825 bhi.n 800ae5e 800ae12: 2b00 cmp r3, #0 800ae14: d006 beq.n 800ae24 800ae16: f1b3 7f80 cmp.w r3, #16777216 @ 0x1000000 800ae1a: d00a beq.n 800ae32 800ae1c: e01f b.n 800ae5e 800ae1e: bf00 nop 800ae20: 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); 800ae24: 4ba2 ldr r3, [pc, #648] @ (800b0b0 ) 800ae26: 6adb ldr r3, [r3, #44] @ 0x2c 800ae28: 4aa1 ldr r2, [pc, #644] @ (800b0b0 ) 800ae2a: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800ae2e: 62d3 str r3, [r2, #44] @ 0x2c /* SAI1 clock source configuration done later after clock selection check */ break; 800ae30: e01c b.n 800ae6c case RCC_SAI4BCLKSOURCE_PLL2: /* PLL2 is used as clock source for SAI2*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800ae32: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ae36: 3308 adds r3, #8 800ae38: 2100 movs r1, #0 800ae3a: 4618 mov r0, r3 800ae3c: f001 fb00 bl 800c440 800ae40: 4603 mov r3, r0 800ae42: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI2 clock source configuration done later after clock selection check */ break; 800ae46: e011 b.n 800ae6c case RCC_SAI4BCLKSOURCE_PLL3: /* PLL3 is used as clock source for SAI2*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800ae48: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ae4c: 3328 adds r3, #40 @ 0x28 800ae4e: 2100 movs r1, #0 800ae50: 4618 mov r0, r3 800ae52: f001 fba7 bl 800c5a4 800ae56: 4603 mov r3, r0 800ae58: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI1 clock source configuration done later after clock selection check */ break; 800ae5c: e006 b.n 800ae6c /* SAI4B clock source configuration done later after clock selection check */ break; #endif /* RCC_VER_3_0 */ default: ret = HAL_ERROR; 800ae5e: 2301 movs r3, #1 800ae60: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800ae64: e002 b.n 800ae6c break; 800ae66: bf00 nop 800ae68: e000 b.n 800ae6c break; 800ae6a: bf00 nop } if (ret == HAL_OK) 800ae6c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800ae70: 2b00 cmp r3, #0 800ae72: d10b bne.n 800ae8c { /* Set the source of SAI4B clock*/ __HAL_RCC_SAI4B_CONFIG(PeriphClkInit->Sai4BClockSelection); 800ae74: 4b8e ldr r3, [pc, #568] @ (800b0b0 ) 800ae76: 6d9b ldr r3, [r3, #88] @ 0x58 800ae78: f023 61e0 bic.w r1, r3, #117440512 @ 0x7000000 800ae7c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ae80: f8d3 30ac ldr.w r3, [r3, #172] @ 0xac 800ae84: 4a8a ldr r2, [pc, #552] @ (800b0b0 ) 800ae86: 430b orrs r3, r1 800ae88: 6593 str r3, [r2, #88] @ 0x58 800ae8a: e003 b.n 800ae94 } else { /* set overall return value */ status = ret; 800ae8c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800ae90: f887 311e strb.w r3, [r7, #286] @ 0x11e } #endif /*SAI4*/ #if defined(QUADSPI) /*---------------------------- QSPI configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_QSPI) == RCC_PERIPHCLK_QSPI) 800ae94: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ae98: e9d3 2300 ldrd r2, r3, [r3] 800ae9c: f002 7300 and.w r3, r2, #33554432 @ 0x2000000 800aea0: f8c7 30f0 str.w r3, [r7, #240] @ 0xf0 800aea4: 2300 movs r3, #0 800aea6: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 800aeaa: e9d7 123c ldrd r1, r2, [r7, #240] @ 0xf0 800aeae: 460b mov r3, r1 800aeb0: 4313 orrs r3, r2 800aeb2: d03a beq.n 800af2a { switch (PeriphClkInit->QspiClockSelection) 800aeb4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800aeb8: 6cdb ldr r3, [r3, #76] @ 0x4c 800aeba: 2b30 cmp r3, #48 @ 0x30 800aebc: d01f beq.n 800aefe 800aebe: 2b30 cmp r3, #48 @ 0x30 800aec0: d819 bhi.n 800aef6 800aec2: 2b20 cmp r3, #32 800aec4: d00c beq.n 800aee0 800aec6: 2b20 cmp r3, #32 800aec8: d815 bhi.n 800aef6 800aeca: 2b00 cmp r3, #0 800aecc: d019 beq.n 800af02 800aece: 2b10 cmp r3, #16 800aed0: d111 bne.n 800aef6 { 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); 800aed2: 4b77 ldr r3, [pc, #476] @ (800b0b0 ) 800aed4: 6adb ldr r3, [r3, #44] @ 0x2c 800aed6: 4a76 ldr r2, [pc, #472] @ (800b0b0 ) 800aed8: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800aedc: 62d3 str r3, [r2, #44] @ 0x2c /* QSPI clock source configuration done later after clock selection check */ break; 800aede: e011 b.n 800af04 case RCC_QSPICLKSOURCE_PLL2: /* PLL2 is used as clock source for QSPI*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_R_UPDATE); 800aee0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800aee4: 3308 adds r3, #8 800aee6: 2102 movs r1, #2 800aee8: 4618 mov r0, r3 800aeea: f001 faa9 bl 800c440 800aeee: 4603 mov r3, r0 800aef0: f887 311f strb.w r3, [r7, #287] @ 0x11f /* QSPI clock source configuration done later after clock selection check */ break; 800aef4: e006 b.n 800af04 case RCC_QSPICLKSOURCE_D1HCLK: /* Domain1 HCLK clock selected as QSPI kernel peripheral clock */ break; default: ret = HAL_ERROR; 800aef6: 2301 movs r3, #1 800aef8: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800aefc: e002 b.n 800af04 break; 800aefe: bf00 nop 800af00: e000 b.n 800af04 break; 800af02: bf00 nop } if (ret == HAL_OK) 800af04: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800af08: 2b00 cmp r3, #0 800af0a: d10a bne.n 800af22 { /* Set the source of QSPI clock*/ __HAL_RCC_QSPI_CONFIG(PeriphClkInit->QspiClockSelection); 800af0c: 4b68 ldr r3, [pc, #416] @ (800b0b0 ) 800af0e: 6cdb ldr r3, [r3, #76] @ 0x4c 800af10: f023 0130 bic.w r1, r3, #48 @ 0x30 800af14: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800af18: 6cdb ldr r3, [r3, #76] @ 0x4c 800af1a: 4a65 ldr r2, [pc, #404] @ (800b0b0 ) 800af1c: 430b orrs r3, r1 800af1e: 64d3 str r3, [r2, #76] @ 0x4c 800af20: e003 b.n 800af2a } else { /* set overall return value */ status = ret; 800af22: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800af26: f887 311e strb.w r3, [r7, #286] @ 0x11e } } #endif /*OCTOSPI*/ /*---------------------------- SPI1/2/3 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPI123) == RCC_PERIPHCLK_SPI123) 800af2a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800af2e: e9d3 2300 ldrd r2, r3, [r3] 800af32: f402 5380 and.w r3, r2, #4096 @ 0x1000 800af36: f8c7 30e8 str.w r3, [r7, #232] @ 0xe8 800af3a: 2300 movs r3, #0 800af3c: f8c7 30ec str.w r3, [r7, #236] @ 0xec 800af40: e9d7 123a ldrd r1, r2, [r7, #232] @ 0xe8 800af44: 460b mov r3, r1 800af46: 4313 orrs r3, r2 800af48: d051 beq.n 800afee { switch (PeriphClkInit->Spi123ClockSelection) 800af4a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800af4e: 6e1b ldr r3, [r3, #96] @ 0x60 800af50: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 800af54: d035 beq.n 800afc2 800af56: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 800af5a: d82e bhi.n 800afba 800af5c: f5b3 5f40 cmp.w r3, #12288 @ 0x3000 800af60: d031 beq.n 800afc6 800af62: f5b3 5f40 cmp.w r3, #12288 @ 0x3000 800af66: d828 bhi.n 800afba 800af68: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 800af6c: d01a beq.n 800afa4 800af6e: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 800af72: d822 bhi.n 800afba 800af74: 2b00 cmp r3, #0 800af76: d003 beq.n 800af80 800af78: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800af7c: d007 beq.n 800af8e 800af7e: e01c b.n 800afba { 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); 800af80: 4b4b ldr r3, [pc, #300] @ (800b0b0 ) 800af82: 6adb ldr r3, [r3, #44] @ 0x2c 800af84: 4a4a ldr r2, [pc, #296] @ (800b0b0 ) 800af86: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800af8a: 62d3 str r3, [r2, #44] @ 0x2c /* SPI1/2/3 clock source configuration done later after clock selection check */ break; 800af8c: e01c b.n 800afc8 case RCC_SPI123CLKSOURCE_PLL2: /* PLL2 is used as clock source for SPI1/2/3 */ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800af8e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800af92: 3308 adds r3, #8 800af94: 2100 movs r1, #0 800af96: 4618 mov r0, r3 800af98: f001 fa52 bl 800c440 800af9c: 4603 mov r3, r0 800af9e: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI1/2/3 clock source configuration done later after clock selection check */ break; 800afa2: e011 b.n 800afc8 case RCC_SPI123CLKSOURCE_PLL3: /* PLL3 is used as clock source for SPI1/2/3 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800afa4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800afa8: 3328 adds r3, #40 @ 0x28 800afaa: 2100 movs r1, #0 800afac: 4618 mov r0, r3 800afae: f001 faf9 bl 800c5a4 800afb2: 4603 mov r3, r0 800afb4: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI1/2/3 clock source configuration done later after clock selection check */ break; 800afb8: e006 b.n 800afc8 /* 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; 800afba: 2301 movs r3, #1 800afbc: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800afc0: e002 b.n 800afc8 break; 800afc2: bf00 nop 800afc4: e000 b.n 800afc8 break; 800afc6: bf00 nop } if (ret == HAL_OK) 800afc8: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800afcc: 2b00 cmp r3, #0 800afce: d10a bne.n 800afe6 { /* Set the source of SPI1/2/3 clock*/ __HAL_RCC_SPI123_CONFIG(PeriphClkInit->Spi123ClockSelection); 800afd0: 4b37 ldr r3, [pc, #220] @ (800b0b0 ) 800afd2: 6d1b ldr r3, [r3, #80] @ 0x50 800afd4: f423 41e0 bic.w r1, r3, #28672 @ 0x7000 800afd8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800afdc: 6e1b ldr r3, [r3, #96] @ 0x60 800afde: 4a34 ldr r2, [pc, #208] @ (800b0b0 ) 800afe0: 430b orrs r3, r1 800afe2: 6513 str r3, [r2, #80] @ 0x50 800afe4: e003 b.n 800afee } else { /* set overall return value */ status = ret; 800afe6: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800afea: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- SPI4/5 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPI45) == RCC_PERIPHCLK_SPI45) 800afee: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800aff2: e9d3 2300 ldrd r2, r3, [r3] 800aff6: f402 5300 and.w r3, r2, #8192 @ 0x2000 800affa: f8c7 30e0 str.w r3, [r7, #224] @ 0xe0 800affe: 2300 movs r3, #0 800b000: f8c7 30e4 str.w r3, [r7, #228] @ 0xe4 800b004: e9d7 1238 ldrd r1, r2, [r7, #224] @ 0xe0 800b008: 460b mov r3, r1 800b00a: 4313 orrs r3, r2 800b00c: d056 beq.n 800b0bc { switch (PeriphClkInit->Spi45ClockSelection) 800b00e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b012: 6e5b ldr r3, [r3, #100] @ 0x64 800b014: f5b3 2fa0 cmp.w r3, #327680 @ 0x50000 800b018: d033 beq.n 800b082 800b01a: f5b3 2fa0 cmp.w r3, #327680 @ 0x50000 800b01e: d82c bhi.n 800b07a 800b020: f5b3 2f80 cmp.w r3, #262144 @ 0x40000 800b024: d02f beq.n 800b086 800b026: f5b3 2f80 cmp.w r3, #262144 @ 0x40000 800b02a: d826 bhi.n 800b07a 800b02c: f5b3 3f40 cmp.w r3, #196608 @ 0x30000 800b030: d02b beq.n 800b08a 800b032: f5b3 3f40 cmp.w r3, #196608 @ 0x30000 800b036: d820 bhi.n 800b07a 800b038: f5b3 3f00 cmp.w r3, #131072 @ 0x20000 800b03c: d012 beq.n 800b064 800b03e: f5b3 3f00 cmp.w r3, #131072 @ 0x20000 800b042: d81a bhi.n 800b07a 800b044: 2b00 cmp r3, #0 800b046: d022 beq.n 800b08e 800b048: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800b04c: d115 bne.n 800b07a /* 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); 800b04e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b052: 3308 adds r3, #8 800b054: 2101 movs r1, #1 800b056: 4618 mov r0, r3 800b058: f001 f9f2 bl 800c440 800b05c: 4603 mov r3, r0 800b05e: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI4/5 clock source configuration done later after clock selection check */ break; 800b062: e015 b.n 800b090 case RCC_SPI45CLKSOURCE_PLL3: /* PLL3 is used as clock source for SPI4/5 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800b064: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b068: 3328 adds r3, #40 @ 0x28 800b06a: 2101 movs r1, #1 800b06c: 4618 mov r0, r3 800b06e: f001 fa99 bl 800c5a4 800b072: 4603 mov r3, r0 800b074: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI4/5 clock source configuration done later after clock selection check */ break; 800b078: e00a b.n 800b090 /* 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; 800b07a: 2301 movs r3, #1 800b07c: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b080: e006 b.n 800b090 break; 800b082: bf00 nop 800b084: e004 b.n 800b090 break; 800b086: bf00 nop 800b088: e002 b.n 800b090 break; 800b08a: bf00 nop 800b08c: e000 b.n 800b090 break; 800b08e: bf00 nop } if (ret == HAL_OK) 800b090: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b094: 2b00 cmp r3, #0 800b096: d10d bne.n 800b0b4 { /* Set the source of SPI4/5 clock*/ __HAL_RCC_SPI45_CONFIG(PeriphClkInit->Spi45ClockSelection); 800b098: 4b05 ldr r3, [pc, #20] @ (800b0b0 ) 800b09a: 6d1b ldr r3, [r3, #80] @ 0x50 800b09c: f423 21e0 bic.w r1, r3, #458752 @ 0x70000 800b0a0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b0a4: 6e5b ldr r3, [r3, #100] @ 0x64 800b0a6: 4a02 ldr r2, [pc, #8] @ (800b0b0 ) 800b0a8: 430b orrs r3, r1 800b0aa: 6513 str r3, [r2, #80] @ 0x50 800b0ac: e006 b.n 800b0bc 800b0ae: bf00 nop 800b0b0: 58024400 .word 0x58024400 } else { /* set overall return value */ status = ret; 800b0b4: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b0b8: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- SPI6 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPI6) == RCC_PERIPHCLK_SPI6) 800b0bc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b0c0: e9d3 2300 ldrd r2, r3, [r3] 800b0c4: f402 4380 and.w r3, r2, #16384 @ 0x4000 800b0c8: f8c7 30d8 str.w r3, [r7, #216] @ 0xd8 800b0cc: 2300 movs r3, #0 800b0ce: f8c7 30dc str.w r3, [r7, #220] @ 0xdc 800b0d2: e9d7 1236 ldrd r1, r2, [r7, #216] @ 0xd8 800b0d6: 460b mov r3, r1 800b0d8: 4313 orrs r3, r2 800b0da: d055 beq.n 800b188 { switch (PeriphClkInit->Spi6ClockSelection) 800b0dc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b0e0: f8d3 30b0 ldr.w r3, [r3, #176] @ 0xb0 800b0e4: f1b3 4fa0 cmp.w r3, #1342177280 @ 0x50000000 800b0e8: d033 beq.n 800b152 800b0ea: f1b3 4fa0 cmp.w r3, #1342177280 @ 0x50000000 800b0ee: d82c bhi.n 800b14a 800b0f0: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800b0f4: d02f beq.n 800b156 800b0f6: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800b0fa: d826 bhi.n 800b14a 800b0fc: f1b3 5f40 cmp.w r3, #805306368 @ 0x30000000 800b100: d02b beq.n 800b15a 800b102: f1b3 5f40 cmp.w r3, #805306368 @ 0x30000000 800b106: d820 bhi.n 800b14a 800b108: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800b10c: d012 beq.n 800b134 800b10e: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800b112: d81a bhi.n 800b14a 800b114: 2b00 cmp r3, #0 800b116: d022 beq.n 800b15e 800b118: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 800b11c: d115 bne.n 800b14a /* 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); 800b11e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b122: 3308 adds r3, #8 800b124: 2101 movs r1, #1 800b126: 4618 mov r0, r3 800b128: f001 f98a bl 800c440 800b12c: 4603 mov r3, r0 800b12e: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI6 clock source configuration done later after clock selection check */ break; 800b132: e015 b.n 800b160 case RCC_SPI6CLKSOURCE_PLL3: /* PLL3 is used as clock source for SPI6*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800b134: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b138: 3328 adds r3, #40 @ 0x28 800b13a: 2101 movs r1, #1 800b13c: 4618 mov r0, r3 800b13e: f001 fa31 bl 800c5a4 800b142: 4603 mov r3, r0 800b144: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI6 clock source configuration done later after clock selection check */ break; 800b148: e00a b.n 800b160 /* SPI6 clock source configuration done later after clock selection check */ break; #endif default: ret = HAL_ERROR; 800b14a: 2301 movs r3, #1 800b14c: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b150: e006 b.n 800b160 break; 800b152: bf00 nop 800b154: e004 b.n 800b160 break; 800b156: bf00 nop 800b158: e002 b.n 800b160 break; 800b15a: bf00 nop 800b15c: e000 b.n 800b160 break; 800b15e: bf00 nop } if (ret == HAL_OK) 800b160: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b164: 2b00 cmp r3, #0 800b166: d10b bne.n 800b180 { /* Set the source of SPI6 clock*/ __HAL_RCC_SPI6_CONFIG(PeriphClkInit->Spi6ClockSelection); 800b168: 4ba3 ldr r3, [pc, #652] @ (800b3f8 ) 800b16a: 6d9b ldr r3, [r3, #88] @ 0x58 800b16c: f023 41e0 bic.w r1, r3, #1879048192 @ 0x70000000 800b170: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b174: f8d3 30b0 ldr.w r3, [r3, #176] @ 0xb0 800b178: 4a9f ldr r2, [pc, #636] @ (800b3f8 ) 800b17a: 430b orrs r3, r1 800b17c: 6593 str r3, [r2, #88] @ 0x58 800b17e: e003 b.n 800b188 } else { /* set overall return value */ status = ret; 800b180: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b184: 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) 800b188: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b18c: e9d3 2300 ldrd r2, r3, [r3] 800b190: f402 4300 and.w r3, r2, #32768 @ 0x8000 800b194: f8c7 30d0 str.w r3, [r7, #208] @ 0xd0 800b198: 2300 movs r3, #0 800b19a: f8c7 30d4 str.w r3, [r7, #212] @ 0xd4 800b19e: e9d7 1234 ldrd r1, r2, [r7, #208] @ 0xd0 800b1a2: 460b mov r3, r1 800b1a4: 4313 orrs r3, r2 800b1a6: d037 beq.n 800b218 { switch (PeriphClkInit->FdcanClockSelection) 800b1a8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b1ac: 6f1b ldr r3, [r3, #112] @ 0x70 800b1ae: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800b1b2: d00e beq.n 800b1d2 800b1b4: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800b1b8: d816 bhi.n 800b1e8 800b1ba: 2b00 cmp r3, #0 800b1bc: d018 beq.n 800b1f0 800b1be: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 800b1c2: d111 bne.n 800b1e8 { 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); 800b1c4: 4b8c ldr r3, [pc, #560] @ (800b3f8 ) 800b1c6: 6adb ldr r3, [r3, #44] @ 0x2c 800b1c8: 4a8b ldr r2, [pc, #556] @ (800b3f8 ) 800b1ca: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800b1ce: 62d3 str r3, [r2, #44] @ 0x2c /* FDCAN clock source configuration done later after clock selection check */ break; 800b1d0: e00f b.n 800b1f2 case RCC_FDCANCLKSOURCE_PLL2: /* PLL2 is used as clock source for FDCAN*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_Q_UPDATE); 800b1d2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b1d6: 3308 adds r3, #8 800b1d8: 2101 movs r1, #1 800b1da: 4618 mov r0, r3 800b1dc: f001 f930 bl 800c440 800b1e0: 4603 mov r3, r0 800b1e2: f887 311f strb.w r3, [r7, #287] @ 0x11f /* FDCAN clock source configuration done later after clock selection check */ break; 800b1e6: e004 b.n 800b1f2 /* HSE is used as clock source for FDCAN*/ /* FDCAN clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800b1e8: 2301 movs r3, #1 800b1ea: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b1ee: e000 b.n 800b1f2 break; 800b1f0: bf00 nop } if (ret == HAL_OK) 800b1f2: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b1f6: 2b00 cmp r3, #0 800b1f8: d10a bne.n 800b210 { /* Set the source of FDCAN clock*/ __HAL_RCC_FDCAN_CONFIG(PeriphClkInit->FdcanClockSelection); 800b1fa: 4b7f ldr r3, [pc, #508] @ (800b3f8 ) 800b1fc: 6d1b ldr r3, [r3, #80] @ 0x50 800b1fe: f023 5140 bic.w r1, r3, #805306368 @ 0x30000000 800b202: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b206: 6f1b ldr r3, [r3, #112] @ 0x70 800b208: 4a7b ldr r2, [pc, #492] @ (800b3f8 ) 800b20a: 430b orrs r3, r1 800b20c: 6513 str r3, [r2, #80] @ 0x50 800b20e: e003 b.n 800b218 } else { /* set overall return value */ status = ret; 800b210: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b214: f887 311e strb.w r3, [r7, #286] @ 0x11e } } #endif /*FDCAN1 || FDCAN2*/ /*---------------------------- FMC configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_FMC) == RCC_PERIPHCLK_FMC) 800b218: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b21c: e9d3 2300 ldrd r2, r3, [r3] 800b220: f002 7380 and.w r3, r2, #16777216 @ 0x1000000 800b224: f8c7 30c8 str.w r3, [r7, #200] @ 0xc8 800b228: 2300 movs r3, #0 800b22a: f8c7 30cc str.w r3, [r7, #204] @ 0xcc 800b22e: e9d7 1232 ldrd r1, r2, [r7, #200] @ 0xc8 800b232: 460b mov r3, r1 800b234: 4313 orrs r3, r2 800b236: d039 beq.n 800b2ac { switch (PeriphClkInit->FmcClockSelection) 800b238: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b23c: 6c9b ldr r3, [r3, #72] @ 0x48 800b23e: 2b03 cmp r3, #3 800b240: d81c bhi.n 800b27c 800b242: a201 add r2, pc, #4 @ (adr r2, 800b248 ) 800b244: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800b248: 0800b285 .word 0x0800b285 800b24c: 0800b259 .word 0x0800b259 800b250: 0800b267 .word 0x0800b267 800b254: 0800b285 .word 0x0800b285 { 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); 800b258: 4b67 ldr r3, [pc, #412] @ (800b3f8 ) 800b25a: 6adb ldr r3, [r3, #44] @ 0x2c 800b25c: 4a66 ldr r2, [pc, #408] @ (800b3f8 ) 800b25e: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800b262: 62d3 str r3, [r2, #44] @ 0x2c /* FMC clock source configuration done later after clock selection check */ break; 800b264: e00f b.n 800b286 case RCC_FMCCLKSOURCE_PLL2: /* PLL2 is used as clock source for FMC*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_R_UPDATE); 800b266: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b26a: 3308 adds r3, #8 800b26c: 2102 movs r1, #2 800b26e: 4618 mov r0, r3 800b270: f001 f8e6 bl 800c440 800b274: 4603 mov r3, r0 800b276: f887 311f strb.w r3, [r7, #287] @ 0x11f /* FMC clock source configuration done later after clock selection check */ break; 800b27a: e004 b.n 800b286 case RCC_FMCCLKSOURCE_HCLK: /* D1/CD HCLK clock selected as FMC kernel peripheral clock */ break; default: ret = HAL_ERROR; 800b27c: 2301 movs r3, #1 800b27e: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b282: e000 b.n 800b286 break; 800b284: bf00 nop } if (ret == HAL_OK) 800b286: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b28a: 2b00 cmp r3, #0 800b28c: d10a bne.n 800b2a4 { /* Set the source of FMC clock*/ __HAL_RCC_FMC_CONFIG(PeriphClkInit->FmcClockSelection); 800b28e: 4b5a ldr r3, [pc, #360] @ (800b3f8 ) 800b290: 6cdb ldr r3, [r3, #76] @ 0x4c 800b292: f023 0103 bic.w r1, r3, #3 800b296: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b29a: 6c9b ldr r3, [r3, #72] @ 0x48 800b29c: 4a56 ldr r2, [pc, #344] @ (800b3f8 ) 800b29e: 430b orrs r3, r1 800b2a0: 64d3 str r3, [r2, #76] @ 0x4c 800b2a2: e003 b.n 800b2ac } else { /* set overall return value */ status = ret; 800b2a4: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b2a8: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- RTC configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RTC) == RCC_PERIPHCLK_RTC) 800b2ac: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b2b0: e9d3 2300 ldrd r2, r3, [r3] 800b2b4: f402 0380 and.w r3, r2, #4194304 @ 0x400000 800b2b8: f8c7 30c0 str.w r3, [r7, #192] @ 0xc0 800b2bc: 2300 movs r3, #0 800b2be: f8c7 30c4 str.w r3, [r7, #196] @ 0xc4 800b2c2: e9d7 1230 ldrd r1, r2, [r7, #192] @ 0xc0 800b2c6: 460b mov r3, r1 800b2c8: 4313 orrs r3, r2 800b2ca: f000 809f beq.w 800b40c { /* 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); 800b2ce: 4b4b ldr r3, [pc, #300] @ (800b3fc ) 800b2d0: 681b ldr r3, [r3, #0] 800b2d2: 4a4a ldr r2, [pc, #296] @ (800b3fc ) 800b2d4: f443 7380 orr.w r3, r3, #256 @ 0x100 800b2d8: 6013 str r3, [r2, #0] /* Wait for Backup domain Write protection disable */ tickstart = HAL_GetTick(); 800b2da: f7f9 fea9 bl 8005030 800b2de: f8c7 0118 str.w r0, [r7, #280] @ 0x118 while ((PWR->CR1 & PWR_CR1_DBP) == 0U) 800b2e2: e00b b.n 800b2fc { if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) 800b2e4: f7f9 fea4 bl 8005030 800b2e8: 4602 mov r2, r0 800b2ea: f8d7 3118 ldr.w r3, [r7, #280] @ 0x118 800b2ee: 1ad3 subs r3, r2, r3 800b2f0: 2b64 cmp r3, #100 @ 0x64 800b2f2: d903 bls.n 800b2fc { ret = HAL_TIMEOUT; 800b2f4: 2303 movs r3, #3 800b2f6: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b2fa: e005 b.n 800b308 while ((PWR->CR1 & PWR_CR1_DBP) == 0U) 800b2fc: 4b3f ldr r3, [pc, #252] @ (800b3fc ) 800b2fe: 681b ldr r3, [r3, #0] 800b300: f403 7380 and.w r3, r3, #256 @ 0x100 800b304: 2b00 cmp r3, #0 800b306: d0ed beq.n 800b2e4 } } if (ret == HAL_OK) 800b308: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b30c: 2b00 cmp r3, #0 800b30e: d179 bne.n 800b404 { /* Reset the Backup domain only if the RTC Clock source selection is modified */ if ((RCC->BDCR & RCC_BDCR_RTCSEL) != (PeriphClkInit->RTCClockSelection & RCC_BDCR_RTCSEL)) 800b310: 4b39 ldr r3, [pc, #228] @ (800b3f8 ) 800b312: 6f1a ldr r2, [r3, #112] @ 0x70 800b314: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b318: f8d3 30b4 ldr.w r3, [r3, #180] @ 0xb4 800b31c: 4053 eors r3, r2 800b31e: f403 7340 and.w r3, r3, #768 @ 0x300 800b322: 2b00 cmp r3, #0 800b324: d015 beq.n 800b352 { /* Store the content of BDCR register before the reset of Backup Domain */ tmpreg = (RCC->BDCR & ~(RCC_BDCR_RTCSEL)); 800b326: 4b34 ldr r3, [pc, #208] @ (800b3f8 ) 800b328: 6f1b ldr r3, [r3, #112] @ 0x70 800b32a: f423 7340 bic.w r3, r3, #768 @ 0x300 800b32e: 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(); 800b332: 4b31 ldr r3, [pc, #196] @ (800b3f8 ) 800b334: 6f1b ldr r3, [r3, #112] @ 0x70 800b336: 4a30 ldr r2, [pc, #192] @ (800b3f8 ) 800b338: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800b33c: 6713 str r3, [r2, #112] @ 0x70 __HAL_RCC_BACKUPRESET_RELEASE(); 800b33e: 4b2e ldr r3, [pc, #184] @ (800b3f8 ) 800b340: 6f1b ldr r3, [r3, #112] @ 0x70 800b342: 4a2d ldr r2, [pc, #180] @ (800b3f8 ) 800b344: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800b348: 6713 str r3, [r2, #112] @ 0x70 /* Restore the Content of BDCR register */ RCC->BDCR = tmpreg; 800b34a: 4a2b ldr r2, [pc, #172] @ (800b3f8 ) 800b34c: f8d7 3114 ldr.w r3, [r7, #276] @ 0x114 800b350: 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) 800b352: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b356: f8d3 30b4 ldr.w r3, [r3, #180] @ 0xb4 800b35a: f5b3 7f80 cmp.w r3, #256 @ 0x100 800b35e: d118 bne.n 800b392 { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800b360: f7f9 fe66 bl 8005030 800b364: f8c7 0118 str.w r0, [r7, #280] @ 0x118 /* Wait till LSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U) 800b368: e00d b.n 800b386 { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 800b36a: f7f9 fe61 bl 8005030 800b36e: 4602 mov r2, r0 800b370: f8d7 3118 ldr.w r3, [r7, #280] @ 0x118 800b374: 1ad2 subs r2, r2, r3 800b376: f241 3388 movw r3, #5000 @ 0x1388 800b37a: 429a cmp r2, r3 800b37c: d903 bls.n 800b386 { ret = HAL_TIMEOUT; 800b37e: 2303 movs r3, #3 800b380: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b384: e005 b.n 800b392 while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U) 800b386: 4b1c ldr r3, [pc, #112] @ (800b3f8 ) 800b388: 6f1b ldr r3, [r3, #112] @ 0x70 800b38a: f003 0302 and.w r3, r3, #2 800b38e: 2b00 cmp r3, #0 800b390: d0eb beq.n 800b36a } } } if (ret == HAL_OK) 800b392: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b396: 2b00 cmp r3, #0 800b398: d129 bne.n 800b3ee { __HAL_RCC_RTC_CONFIG(PeriphClkInit->RTCClockSelection); 800b39a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b39e: f8d3 30b4 ldr.w r3, [r3, #180] @ 0xb4 800b3a2: f403 7340 and.w r3, r3, #768 @ 0x300 800b3a6: f5b3 7f40 cmp.w r3, #768 @ 0x300 800b3aa: d10e bne.n 800b3ca 800b3ac: 4b12 ldr r3, [pc, #72] @ (800b3f8 ) 800b3ae: 691b ldr r3, [r3, #16] 800b3b0: f423 517c bic.w r1, r3, #16128 @ 0x3f00 800b3b4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b3b8: f8d3 30b4 ldr.w r3, [r3, #180] @ 0xb4 800b3bc: 091a lsrs r2, r3, #4 800b3be: 4b10 ldr r3, [pc, #64] @ (800b400 ) 800b3c0: 4013 ands r3, r2 800b3c2: 4a0d ldr r2, [pc, #52] @ (800b3f8 ) 800b3c4: 430b orrs r3, r1 800b3c6: 6113 str r3, [r2, #16] 800b3c8: e005 b.n 800b3d6 800b3ca: 4b0b ldr r3, [pc, #44] @ (800b3f8 ) 800b3cc: 691b ldr r3, [r3, #16] 800b3ce: 4a0a ldr r2, [pc, #40] @ (800b3f8 ) 800b3d0: f423 537c bic.w r3, r3, #16128 @ 0x3f00 800b3d4: 6113 str r3, [r2, #16] 800b3d6: 4b08 ldr r3, [pc, #32] @ (800b3f8 ) 800b3d8: 6f19 ldr r1, [r3, #112] @ 0x70 800b3da: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b3de: f8d3 30b4 ldr.w r3, [r3, #180] @ 0xb4 800b3e2: f3c3 030b ubfx r3, r3, #0, #12 800b3e6: 4a04 ldr r2, [pc, #16] @ (800b3f8 ) 800b3e8: 430b orrs r3, r1 800b3ea: 6713 str r3, [r2, #112] @ 0x70 800b3ec: e00e b.n 800b40c } else { /* set overall return value */ status = ret; 800b3ee: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b3f2: f887 311e strb.w r3, [r7, #286] @ 0x11e 800b3f6: e009 b.n 800b40c 800b3f8: 58024400 .word 0x58024400 800b3fc: 58024800 .word 0x58024800 800b400: 00ffffcf .word 0x00ffffcf } } else { /* set overall return value */ status = ret; 800b404: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b408: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*-------------------------- USART1/6 configuration --------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART16) == RCC_PERIPHCLK_USART16) 800b40c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b410: e9d3 2300 ldrd r2, r3, [r3] 800b414: f002 0301 and.w r3, r2, #1 800b418: f8c7 30b8 str.w r3, [r7, #184] @ 0xb8 800b41c: 2300 movs r3, #0 800b41e: f8c7 30bc str.w r3, [r7, #188] @ 0xbc 800b422: e9d7 122e ldrd r1, r2, [r7, #184] @ 0xb8 800b426: 460b mov r3, r1 800b428: 4313 orrs r3, r2 800b42a: f000 8089 beq.w 800b540 { switch (PeriphClkInit->Usart16ClockSelection) 800b42e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b432: 6fdb ldr r3, [r3, #124] @ 0x7c 800b434: 2b28 cmp r3, #40 @ 0x28 800b436: d86b bhi.n 800b510 800b438: a201 add r2, pc, #4 @ (adr r2, 800b440 ) 800b43a: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800b43e: bf00 nop 800b440: 0800b519 .word 0x0800b519 800b444: 0800b511 .word 0x0800b511 800b448: 0800b511 .word 0x0800b511 800b44c: 0800b511 .word 0x0800b511 800b450: 0800b511 .word 0x0800b511 800b454: 0800b511 .word 0x0800b511 800b458: 0800b511 .word 0x0800b511 800b45c: 0800b511 .word 0x0800b511 800b460: 0800b4e5 .word 0x0800b4e5 800b464: 0800b511 .word 0x0800b511 800b468: 0800b511 .word 0x0800b511 800b46c: 0800b511 .word 0x0800b511 800b470: 0800b511 .word 0x0800b511 800b474: 0800b511 .word 0x0800b511 800b478: 0800b511 .word 0x0800b511 800b47c: 0800b511 .word 0x0800b511 800b480: 0800b4fb .word 0x0800b4fb 800b484: 0800b511 .word 0x0800b511 800b488: 0800b511 .word 0x0800b511 800b48c: 0800b511 .word 0x0800b511 800b490: 0800b511 .word 0x0800b511 800b494: 0800b511 .word 0x0800b511 800b498: 0800b511 .word 0x0800b511 800b49c: 0800b511 .word 0x0800b511 800b4a0: 0800b519 .word 0x0800b519 800b4a4: 0800b511 .word 0x0800b511 800b4a8: 0800b511 .word 0x0800b511 800b4ac: 0800b511 .word 0x0800b511 800b4b0: 0800b511 .word 0x0800b511 800b4b4: 0800b511 .word 0x0800b511 800b4b8: 0800b511 .word 0x0800b511 800b4bc: 0800b511 .word 0x0800b511 800b4c0: 0800b519 .word 0x0800b519 800b4c4: 0800b511 .word 0x0800b511 800b4c8: 0800b511 .word 0x0800b511 800b4cc: 0800b511 .word 0x0800b511 800b4d0: 0800b511 .word 0x0800b511 800b4d4: 0800b511 .word 0x0800b511 800b4d8: 0800b511 .word 0x0800b511 800b4dc: 0800b511 .word 0x0800b511 800b4e0: 0800b519 .word 0x0800b519 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); 800b4e4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b4e8: 3308 adds r3, #8 800b4ea: 2101 movs r1, #1 800b4ec: 4618 mov r0, r3 800b4ee: f000 ffa7 bl 800c440 800b4f2: 4603 mov r3, r0 800b4f4: f887 311f strb.w r3, [r7, #287] @ 0x11f /* USART1/6 clock source configuration done later after clock selection check */ break; 800b4f8: e00f b.n 800b51a case RCC_USART16CLKSOURCE_PLL3: /* PLL3 is used as clock source for USART1/6 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800b4fa: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b4fe: 3328 adds r3, #40 @ 0x28 800b500: 2101 movs r1, #1 800b502: 4618 mov r0, r3 800b504: f001 f84e bl 800c5a4 800b508: 4603 mov r3, r0 800b50a: f887 311f strb.w r3, [r7, #287] @ 0x11f /* USART1/6 clock source configuration done later after clock selection check */ break; 800b50e: e004 b.n 800b51a /* 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; 800b510: 2301 movs r3, #1 800b512: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b516: e000 b.n 800b51a break; 800b518: bf00 nop } if (ret == HAL_OK) 800b51a: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b51e: 2b00 cmp r3, #0 800b520: d10a bne.n 800b538 { /* Set the source of USART1/6 clock */ __HAL_RCC_USART16_CONFIG(PeriphClkInit->Usart16ClockSelection); 800b522: 4bbf ldr r3, [pc, #764] @ (800b820 ) 800b524: 6d5b ldr r3, [r3, #84] @ 0x54 800b526: f023 0138 bic.w r1, r3, #56 @ 0x38 800b52a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b52e: 6fdb ldr r3, [r3, #124] @ 0x7c 800b530: 4abb ldr r2, [pc, #748] @ (800b820 ) 800b532: 430b orrs r3, r1 800b534: 6553 str r3, [r2, #84] @ 0x54 800b536: e003 b.n 800b540 } else { /* set overall return value */ status = ret; 800b538: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b53c: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*-------------------------- USART2/3/4/5/7/8 Configuration --------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART234578) == RCC_PERIPHCLK_USART234578) 800b540: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b544: e9d3 2300 ldrd r2, r3, [r3] 800b548: f002 0302 and.w r3, r2, #2 800b54c: f8c7 30b0 str.w r3, [r7, #176] @ 0xb0 800b550: 2300 movs r3, #0 800b552: f8c7 30b4 str.w r3, [r7, #180] @ 0xb4 800b556: e9d7 122c ldrd r1, r2, [r7, #176] @ 0xb0 800b55a: 460b mov r3, r1 800b55c: 4313 orrs r3, r2 800b55e: d041 beq.n 800b5e4 { switch (PeriphClkInit->Usart234578ClockSelection) 800b560: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b564: 6f9b ldr r3, [r3, #120] @ 0x78 800b566: 2b05 cmp r3, #5 800b568: d824 bhi.n 800b5b4 800b56a: a201 add r2, pc, #4 @ (adr r2, 800b570 ) 800b56c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800b570: 0800b5bd .word 0x0800b5bd 800b574: 0800b589 .word 0x0800b589 800b578: 0800b59f .word 0x0800b59f 800b57c: 0800b5bd .word 0x0800b5bd 800b580: 0800b5bd .word 0x0800b5bd 800b584: 0800b5bd .word 0x0800b5bd 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); 800b588: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b58c: 3308 adds r3, #8 800b58e: 2101 movs r1, #1 800b590: 4618 mov r0, r3 800b592: f000 ff55 bl 800c440 800b596: 4603 mov r3, r0 800b598: f887 311f strb.w r3, [r7, #287] @ 0x11f /* USART2/3/4/5/7/8 clock source configuration done later after clock selection check */ break; 800b59c: e00f b.n 800b5be 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); 800b59e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b5a2: 3328 adds r3, #40 @ 0x28 800b5a4: 2101 movs r1, #1 800b5a6: 4618 mov r0, r3 800b5a8: f000 fffc bl 800c5a4 800b5ac: 4603 mov r3, r0 800b5ae: f887 311f strb.w r3, [r7, #287] @ 0x11f /* USART2/3/4/5/7/8 clock source configuration done later after clock selection check */ break; 800b5b2: e004 b.n 800b5be /* 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; 800b5b4: 2301 movs r3, #1 800b5b6: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b5ba: e000 b.n 800b5be break; 800b5bc: bf00 nop } if (ret == HAL_OK) 800b5be: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b5c2: 2b00 cmp r3, #0 800b5c4: d10a bne.n 800b5dc { /* Set the source of USART2/3/4/5/7/8 clock */ __HAL_RCC_USART234578_CONFIG(PeriphClkInit->Usart234578ClockSelection); 800b5c6: 4b96 ldr r3, [pc, #600] @ (800b820 ) 800b5c8: 6d5b ldr r3, [r3, #84] @ 0x54 800b5ca: f023 0107 bic.w r1, r3, #7 800b5ce: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b5d2: 6f9b ldr r3, [r3, #120] @ 0x78 800b5d4: 4a92 ldr r2, [pc, #584] @ (800b820 ) 800b5d6: 430b orrs r3, r1 800b5d8: 6553 str r3, [r2, #84] @ 0x54 800b5da: e003 b.n 800b5e4 } else { /* set overall return value */ status = ret; 800b5dc: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b5e0: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*-------------------------- LPUART1 Configuration -------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPUART1) == RCC_PERIPHCLK_LPUART1) 800b5e4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b5e8: e9d3 2300 ldrd r2, r3, [r3] 800b5ec: f002 0304 and.w r3, r2, #4 800b5f0: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8 800b5f4: 2300 movs r3, #0 800b5f6: f8c7 30ac str.w r3, [r7, #172] @ 0xac 800b5fa: e9d7 122a ldrd r1, r2, [r7, #168] @ 0xa8 800b5fe: 460b mov r3, r1 800b600: 4313 orrs r3, r2 800b602: d044 beq.n 800b68e { switch (PeriphClkInit->Lpuart1ClockSelection) 800b604: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b608: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94 800b60c: 2b05 cmp r3, #5 800b60e: d825 bhi.n 800b65c 800b610: a201 add r2, pc, #4 @ (adr r2, 800b618 ) 800b612: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800b616: bf00 nop 800b618: 0800b665 .word 0x0800b665 800b61c: 0800b631 .word 0x0800b631 800b620: 0800b647 .word 0x0800b647 800b624: 0800b665 .word 0x0800b665 800b628: 0800b665 .word 0x0800b665 800b62c: 0800b665 .word 0x0800b665 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); 800b630: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b634: 3308 adds r3, #8 800b636: 2101 movs r1, #1 800b638: 4618 mov r0, r3 800b63a: f000 ff01 bl 800c440 800b63e: 4603 mov r3, r0 800b640: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPUART1 clock source configuration done later after clock selection check */ break; 800b644: e00f b.n 800b666 case RCC_LPUART1CLKSOURCE_PLL3: /* PLL3 is used as clock source for LPUART1 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800b646: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b64a: 3328 adds r3, #40 @ 0x28 800b64c: 2101 movs r1, #1 800b64e: 4618 mov r0, r3 800b650: f000 ffa8 bl 800c5a4 800b654: 4603 mov r3, r0 800b656: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPUART1 clock source configuration done later after clock selection check */ break; 800b65a: e004 b.n 800b666 /* LSE, oscillator is used as source of LPUART1 clock */ /* LPUART1 clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800b65c: 2301 movs r3, #1 800b65e: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b662: e000 b.n 800b666 break; 800b664: bf00 nop } if (ret == HAL_OK) 800b666: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b66a: 2b00 cmp r3, #0 800b66c: d10b bne.n 800b686 { /* Set the source of LPUART1 clock */ __HAL_RCC_LPUART1_CONFIG(PeriphClkInit->Lpuart1ClockSelection); 800b66e: 4b6c ldr r3, [pc, #432] @ (800b820 ) 800b670: 6d9b ldr r3, [r3, #88] @ 0x58 800b672: f023 0107 bic.w r1, r3, #7 800b676: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b67a: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94 800b67e: 4a68 ldr r2, [pc, #416] @ (800b820 ) 800b680: 430b orrs r3, r1 800b682: 6593 str r3, [r2, #88] @ 0x58 800b684: e003 b.n 800b68e } else { /* set overall return value */ status = ret; 800b686: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b68a: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- LPTIM1 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM1) == RCC_PERIPHCLK_LPTIM1) 800b68e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b692: e9d3 2300 ldrd r2, r3, [r3] 800b696: f002 0320 and.w r3, r2, #32 800b69a: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 800b69e: 2300 movs r3, #0 800b6a0: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 800b6a4: e9d7 1228 ldrd r1, r2, [r7, #160] @ 0xa0 800b6a8: 460b mov r3, r1 800b6aa: 4313 orrs r3, r2 800b6ac: d055 beq.n 800b75a { switch (PeriphClkInit->Lptim1ClockSelection) 800b6ae: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b6b2: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800b6b6: f1b3 4fa0 cmp.w r3, #1342177280 @ 0x50000000 800b6ba: d033 beq.n 800b724 800b6bc: f1b3 4fa0 cmp.w r3, #1342177280 @ 0x50000000 800b6c0: d82c bhi.n 800b71c 800b6c2: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800b6c6: d02f beq.n 800b728 800b6c8: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800b6cc: d826 bhi.n 800b71c 800b6ce: f1b3 5f40 cmp.w r3, #805306368 @ 0x30000000 800b6d2: d02b beq.n 800b72c 800b6d4: f1b3 5f40 cmp.w r3, #805306368 @ 0x30000000 800b6d8: d820 bhi.n 800b71c 800b6da: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800b6de: d012 beq.n 800b706 800b6e0: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800b6e4: d81a bhi.n 800b71c 800b6e6: 2b00 cmp r3, #0 800b6e8: d022 beq.n 800b730 800b6ea: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 800b6ee: d115 bne.n 800b71c /* 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); 800b6f0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b6f4: 3308 adds r3, #8 800b6f6: 2100 movs r1, #0 800b6f8: 4618 mov r0, r3 800b6fa: f000 fea1 bl 800c440 800b6fe: 4603 mov r3, r0 800b700: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM1 clock source configuration done later after clock selection check */ break; 800b704: e015 b.n 800b732 case RCC_LPTIM1CLKSOURCE_PLL3: /* PLL3 is used as clock source for LPTIM1*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800b706: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b70a: 3328 adds r3, #40 @ 0x28 800b70c: 2102 movs r1, #2 800b70e: 4618 mov r0, r3 800b710: f000 ff48 bl 800c5a4 800b714: 4603 mov r3, r0 800b716: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM1 clock source configuration done later after clock selection check */ break; 800b71a: e00a b.n 800b732 /* 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; 800b71c: 2301 movs r3, #1 800b71e: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b722: e006 b.n 800b732 break; 800b724: bf00 nop 800b726: e004 b.n 800b732 break; 800b728: bf00 nop 800b72a: e002 b.n 800b732 break; 800b72c: bf00 nop 800b72e: e000 b.n 800b732 break; 800b730: bf00 nop } if (ret == HAL_OK) 800b732: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b736: 2b00 cmp r3, #0 800b738: d10b bne.n 800b752 { /* Set the source of LPTIM1 clock*/ __HAL_RCC_LPTIM1_CONFIG(PeriphClkInit->Lptim1ClockSelection); 800b73a: 4b39 ldr r3, [pc, #228] @ (800b820 ) 800b73c: 6d5b ldr r3, [r3, #84] @ 0x54 800b73e: f023 41e0 bic.w r1, r3, #1879048192 @ 0x70000000 800b742: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b746: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800b74a: 4a35 ldr r2, [pc, #212] @ (800b820 ) 800b74c: 430b orrs r3, r1 800b74e: 6553 str r3, [r2, #84] @ 0x54 800b750: e003 b.n 800b75a } else { /* set overall return value */ status = ret; 800b752: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b756: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- LPTIM2 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM2) == RCC_PERIPHCLK_LPTIM2) 800b75a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b75e: e9d3 2300 ldrd r2, r3, [r3] 800b762: f002 0340 and.w r3, r2, #64 @ 0x40 800b766: f8c7 3098 str.w r3, [r7, #152] @ 0x98 800b76a: 2300 movs r3, #0 800b76c: f8c7 309c str.w r3, [r7, #156] @ 0x9c 800b770: e9d7 1226 ldrd r1, r2, [r7, #152] @ 0x98 800b774: 460b mov r3, r1 800b776: 4313 orrs r3, r2 800b778: d058 beq.n 800b82c { switch (PeriphClkInit->Lptim2ClockSelection) 800b77a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b77e: f8d3 309c ldr.w r3, [r3, #156] @ 0x9c 800b782: f5b3 5fa0 cmp.w r3, #5120 @ 0x1400 800b786: d033 beq.n 800b7f0 800b788: f5b3 5fa0 cmp.w r3, #5120 @ 0x1400 800b78c: d82c bhi.n 800b7e8 800b78e: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800b792: d02f beq.n 800b7f4 800b794: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800b798: d826 bhi.n 800b7e8 800b79a: f5b3 6f40 cmp.w r3, #3072 @ 0xc00 800b79e: d02b beq.n 800b7f8 800b7a0: f5b3 6f40 cmp.w r3, #3072 @ 0xc00 800b7a4: d820 bhi.n 800b7e8 800b7a6: f5b3 6f00 cmp.w r3, #2048 @ 0x800 800b7aa: d012 beq.n 800b7d2 800b7ac: f5b3 6f00 cmp.w r3, #2048 @ 0x800 800b7b0: d81a bhi.n 800b7e8 800b7b2: 2b00 cmp r3, #0 800b7b4: d022 beq.n 800b7fc 800b7b6: f5b3 6f80 cmp.w r3, #1024 @ 0x400 800b7ba: d115 bne.n 800b7e8 /* 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); 800b7bc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b7c0: 3308 adds r3, #8 800b7c2: 2100 movs r1, #0 800b7c4: 4618 mov r0, r3 800b7c6: f000 fe3b bl 800c440 800b7ca: 4603 mov r3, r0 800b7cc: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM2 clock source configuration done later after clock selection check */ break; 800b7d0: e015 b.n 800b7fe case RCC_LPTIM2CLKSOURCE_PLL3: /* PLL3 is used as clock source for LPTIM2*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800b7d2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b7d6: 3328 adds r3, #40 @ 0x28 800b7d8: 2102 movs r1, #2 800b7da: 4618 mov r0, r3 800b7dc: f000 fee2 bl 800c5a4 800b7e0: 4603 mov r3, r0 800b7e2: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM2 clock source configuration done later after clock selection check */ break; 800b7e6: e00a b.n 800b7fe /* 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; 800b7e8: 2301 movs r3, #1 800b7ea: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b7ee: e006 b.n 800b7fe break; 800b7f0: bf00 nop 800b7f2: e004 b.n 800b7fe break; 800b7f4: bf00 nop 800b7f6: e002 b.n 800b7fe break; 800b7f8: bf00 nop 800b7fa: e000 b.n 800b7fe break; 800b7fc: bf00 nop } if (ret == HAL_OK) 800b7fe: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b802: 2b00 cmp r3, #0 800b804: d10e bne.n 800b824 { /* Set the source of LPTIM2 clock*/ __HAL_RCC_LPTIM2_CONFIG(PeriphClkInit->Lptim2ClockSelection); 800b806: 4b06 ldr r3, [pc, #24] @ (800b820 ) 800b808: 6d9b ldr r3, [r3, #88] @ 0x58 800b80a: f423 51e0 bic.w r1, r3, #7168 @ 0x1c00 800b80e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b812: f8d3 309c ldr.w r3, [r3, #156] @ 0x9c 800b816: 4a02 ldr r2, [pc, #8] @ (800b820 ) 800b818: 430b orrs r3, r1 800b81a: 6593 str r3, [r2, #88] @ 0x58 800b81c: e006 b.n 800b82c 800b81e: bf00 nop 800b820: 58024400 .word 0x58024400 } else { /* set overall return value */ status = ret; 800b824: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b828: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- LPTIM345 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM345) == RCC_PERIPHCLK_LPTIM345) 800b82c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b830: e9d3 2300 ldrd r2, r3, [r3] 800b834: f002 0380 and.w r3, r2, #128 @ 0x80 800b838: f8c7 3090 str.w r3, [r7, #144] @ 0x90 800b83c: 2300 movs r3, #0 800b83e: f8c7 3094 str.w r3, [r7, #148] @ 0x94 800b842: e9d7 1224 ldrd r1, r2, [r7, #144] @ 0x90 800b846: 460b mov r3, r1 800b848: 4313 orrs r3, r2 800b84a: d055 beq.n 800b8f8 { switch (PeriphClkInit->Lptim345ClockSelection) 800b84c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b850: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 800b854: f5b3 4f20 cmp.w r3, #40960 @ 0xa000 800b858: d033 beq.n 800b8c2 800b85a: f5b3 4f20 cmp.w r3, #40960 @ 0xa000 800b85e: d82c bhi.n 800b8ba 800b860: f5b3 4f00 cmp.w r3, #32768 @ 0x8000 800b864: d02f beq.n 800b8c6 800b866: f5b3 4f00 cmp.w r3, #32768 @ 0x8000 800b86a: d826 bhi.n 800b8ba 800b86c: f5b3 4fc0 cmp.w r3, #24576 @ 0x6000 800b870: d02b beq.n 800b8ca 800b872: f5b3 4fc0 cmp.w r3, #24576 @ 0x6000 800b876: d820 bhi.n 800b8ba 800b878: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 800b87c: d012 beq.n 800b8a4 800b87e: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 800b882: d81a bhi.n 800b8ba 800b884: 2b00 cmp r3, #0 800b886: d022 beq.n 800b8ce 800b888: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 800b88c: d115 bne.n 800b8ba 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); 800b88e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b892: 3308 adds r3, #8 800b894: 2100 movs r1, #0 800b896: 4618 mov r0, r3 800b898: f000 fdd2 bl 800c440 800b89c: 4603 mov r3, r0 800b89e: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM3/4/5 clock source configuration done later after clock selection check */ break; 800b8a2: e015 b.n 800b8d0 case RCC_LPTIM345CLKSOURCE_PLL3: /* PLL3 is used as clock source for LPTIM3/4/5 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800b8a4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b8a8: 3328 adds r3, #40 @ 0x28 800b8aa: 2102 movs r1, #2 800b8ac: 4618 mov r0, r3 800b8ae: f000 fe79 bl 800c5a4 800b8b2: 4603 mov r3, r0 800b8b4: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM3/4/5 clock source configuration done later after clock selection check */ break; 800b8b8: e00a b.n 800b8d0 /* 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; 800b8ba: 2301 movs r3, #1 800b8bc: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b8c0: e006 b.n 800b8d0 break; 800b8c2: bf00 nop 800b8c4: e004 b.n 800b8d0 break; 800b8c6: bf00 nop 800b8c8: e002 b.n 800b8d0 break; 800b8ca: bf00 nop 800b8cc: e000 b.n 800b8d0 break; 800b8ce: bf00 nop } if (ret == HAL_OK) 800b8d0: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b8d4: 2b00 cmp r3, #0 800b8d6: d10b bne.n 800b8f0 { /* Set the source of LPTIM3/4/5 clock */ __HAL_RCC_LPTIM345_CONFIG(PeriphClkInit->Lptim345ClockSelection); 800b8d8: 4bbb ldr r3, [pc, #748] @ (800bbc8 ) 800b8da: 6d9b ldr r3, [r3, #88] @ 0x58 800b8dc: f423 4160 bic.w r1, r3, #57344 @ 0xe000 800b8e0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b8e4: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 800b8e8: 4ab7 ldr r2, [pc, #732] @ (800bbc8 ) 800b8ea: 430b orrs r3, r1 800b8ec: 6593 str r3, [r2, #88] @ 0x58 800b8ee: e003 b.n 800b8f8 } else { /* set overall return value */ status = ret; 800b8f0: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b8f4: f887 311e strb.w r3, [r7, #286] @ 0x11e __HAL_RCC_I2C1235_CONFIG(PeriphClkInit->I2c1235ClockSelection); } #else if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C123) == RCC_PERIPHCLK_I2C123) 800b8f8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b8fc: e9d3 2300 ldrd r2, r3, [r3] 800b900: f002 0308 and.w r3, r2, #8 800b904: f8c7 3088 str.w r3, [r7, #136] @ 0x88 800b908: 2300 movs r3, #0 800b90a: f8c7 308c str.w r3, [r7, #140] @ 0x8c 800b90e: e9d7 1222 ldrd r1, r2, [r7, #136] @ 0x88 800b912: 460b mov r3, r1 800b914: 4313 orrs r3, r2 800b916: d01e beq.n 800b956 { /* Check the parameters */ assert_param(IS_RCC_I2C123CLKSOURCE(PeriphClkInit->I2c123ClockSelection)); if ((PeriphClkInit->I2c123ClockSelection) == RCC_I2C123CLKSOURCE_PLL3) 800b918: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b91c: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800b920: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800b924: d10c bne.n 800b940 { if (RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE) != HAL_OK) 800b926: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b92a: 3328 adds r3, #40 @ 0x28 800b92c: 2102 movs r1, #2 800b92e: 4618 mov r0, r3 800b930: f000 fe38 bl 800c5a4 800b934: 4603 mov r3, r0 800b936: 2b00 cmp r3, #0 800b938: d002 beq.n 800b940 { status = HAL_ERROR; 800b93a: 2301 movs r3, #1 800b93c: f887 311e strb.w r3, [r7, #286] @ 0x11e } } __HAL_RCC_I2C123_CONFIG(PeriphClkInit->I2c123ClockSelection); 800b940: 4ba1 ldr r3, [pc, #644] @ (800bbc8 ) 800b942: 6d5b ldr r3, [r3, #84] @ 0x54 800b944: f423 5140 bic.w r1, r3, #12288 @ 0x3000 800b948: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b94c: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800b950: 4a9d ldr r2, [pc, #628] @ (800bbc8 ) 800b952: 430b orrs r3, r1 800b954: 6553 str r3, [r2, #84] @ 0x54 } #endif /* I2C5 */ /*------------------------------ I2C4 Configuration ------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C4) == RCC_PERIPHCLK_I2C4) 800b956: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b95a: e9d3 2300 ldrd r2, r3, [r3] 800b95e: f002 0310 and.w r3, r2, #16 800b962: f8c7 3080 str.w r3, [r7, #128] @ 0x80 800b966: 2300 movs r3, #0 800b968: f8c7 3084 str.w r3, [r7, #132] @ 0x84 800b96c: e9d7 1220 ldrd r1, r2, [r7, #128] @ 0x80 800b970: 460b mov r3, r1 800b972: 4313 orrs r3, r2 800b974: d01e beq.n 800b9b4 { /* Check the parameters */ assert_param(IS_RCC_I2C4CLKSOURCE(PeriphClkInit->I2c4ClockSelection)); if ((PeriphClkInit->I2c4ClockSelection) == RCC_I2C4CLKSOURCE_PLL3) 800b976: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b97a: f8d3 3098 ldr.w r3, [r3, #152] @ 0x98 800b97e: f5b3 7f80 cmp.w r3, #256 @ 0x100 800b982: d10c bne.n 800b99e { if (RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE) != HAL_OK) 800b984: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b988: 3328 adds r3, #40 @ 0x28 800b98a: 2102 movs r1, #2 800b98c: 4618 mov r0, r3 800b98e: f000 fe09 bl 800c5a4 800b992: 4603 mov r3, r0 800b994: 2b00 cmp r3, #0 800b996: d002 beq.n 800b99e { status = HAL_ERROR; 800b998: 2301 movs r3, #1 800b99a: f887 311e strb.w r3, [r7, #286] @ 0x11e } } __HAL_RCC_I2C4_CONFIG(PeriphClkInit->I2c4ClockSelection); 800b99e: 4b8a ldr r3, [pc, #552] @ (800bbc8 ) 800b9a0: 6d9b ldr r3, [r3, #88] @ 0x58 800b9a2: f423 7140 bic.w r1, r3, #768 @ 0x300 800b9a6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b9aa: f8d3 3098 ldr.w r3, [r3, #152] @ 0x98 800b9ae: 4a86 ldr r2, [pc, #536] @ (800bbc8 ) 800b9b0: 430b orrs r3, r1 800b9b2: 6593 str r3, [r2, #88] @ 0x58 } /*---------------------------- ADC configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_ADC) == RCC_PERIPHCLK_ADC) 800b9b4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b9b8: e9d3 2300 ldrd r2, r3, [r3] 800b9bc: f402 2300 and.w r3, r2, #524288 @ 0x80000 800b9c0: 67bb str r3, [r7, #120] @ 0x78 800b9c2: 2300 movs r3, #0 800b9c4: 67fb str r3, [r7, #124] @ 0x7c 800b9c6: e9d7 121e ldrd r1, r2, [r7, #120] @ 0x78 800b9ca: 460b mov r3, r1 800b9cc: 4313 orrs r3, r2 800b9ce: d03e beq.n 800ba4e { switch (PeriphClkInit->AdcClockSelection) 800b9d0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b9d4: f8d3 30a4 ldr.w r3, [r3, #164] @ 0xa4 800b9d8: f5b3 3f00 cmp.w r3, #131072 @ 0x20000 800b9dc: d022 beq.n 800ba24 800b9de: f5b3 3f00 cmp.w r3, #131072 @ 0x20000 800b9e2: d81b bhi.n 800ba1c 800b9e4: 2b00 cmp r3, #0 800b9e6: d003 beq.n 800b9f0 800b9e8: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800b9ec: d00b beq.n 800ba06 800b9ee: e015 b.n 800ba1c { case RCC_ADCCLKSOURCE_PLL2: /* PLL2 is used as clock source for ADC*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800b9f0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b9f4: 3308 adds r3, #8 800b9f6: 2100 movs r1, #0 800b9f8: 4618 mov r0, r3 800b9fa: f000 fd21 bl 800c440 800b9fe: 4603 mov r3, r0 800ba00: f887 311f strb.w r3, [r7, #287] @ 0x11f /* ADC clock source configuration done later after clock selection check */ break; 800ba04: e00f b.n 800ba26 case RCC_ADCCLKSOURCE_PLL3: /* PLL3 is used as clock source for ADC*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800ba06: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ba0a: 3328 adds r3, #40 @ 0x28 800ba0c: 2102 movs r1, #2 800ba0e: 4618 mov r0, r3 800ba10: f000 fdc8 bl 800c5a4 800ba14: 4603 mov r3, r0 800ba16: f887 311f strb.w r3, [r7, #287] @ 0x11f /* ADC clock source configuration done later after clock selection check */ break; 800ba1a: e004 b.n 800ba26 /* 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; 800ba1c: 2301 movs r3, #1 800ba1e: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800ba22: e000 b.n 800ba26 break; 800ba24: bf00 nop } if (ret == HAL_OK) 800ba26: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800ba2a: 2b00 cmp r3, #0 800ba2c: d10b bne.n 800ba46 { /* Set the source of ADC clock*/ __HAL_RCC_ADC_CONFIG(PeriphClkInit->AdcClockSelection); 800ba2e: 4b66 ldr r3, [pc, #408] @ (800bbc8 ) 800ba30: 6d9b ldr r3, [r3, #88] @ 0x58 800ba32: f423 3140 bic.w r1, r3, #196608 @ 0x30000 800ba36: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ba3a: f8d3 30a4 ldr.w r3, [r3, #164] @ 0xa4 800ba3e: 4a62 ldr r2, [pc, #392] @ (800bbc8 ) 800ba40: 430b orrs r3, r1 800ba42: 6593 str r3, [r2, #88] @ 0x58 800ba44: e003 b.n 800ba4e } else { /* set overall return value */ status = ret; 800ba46: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800ba4a: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*------------------------------ USB Configuration -------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USB) == RCC_PERIPHCLK_USB) 800ba4e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ba52: e9d3 2300 ldrd r2, r3, [r3] 800ba56: f402 2380 and.w r3, r2, #262144 @ 0x40000 800ba5a: 673b str r3, [r7, #112] @ 0x70 800ba5c: 2300 movs r3, #0 800ba5e: 677b str r3, [r7, #116] @ 0x74 800ba60: e9d7 121c ldrd r1, r2, [r7, #112] @ 0x70 800ba64: 460b mov r3, r1 800ba66: 4313 orrs r3, r2 800ba68: d03b beq.n 800bae2 { switch (PeriphClkInit->UsbClockSelection) 800ba6a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ba6e: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800ba72: f5b3 1f40 cmp.w r3, #3145728 @ 0x300000 800ba76: d01f beq.n 800bab8 800ba78: f5b3 1f40 cmp.w r3, #3145728 @ 0x300000 800ba7c: d818 bhi.n 800bab0 800ba7e: f5b3 1f80 cmp.w r3, #1048576 @ 0x100000 800ba82: d003 beq.n 800ba8c 800ba84: f5b3 1f00 cmp.w r3, #2097152 @ 0x200000 800ba88: d007 beq.n 800ba9a 800ba8a: e011 b.n 800bab0 { 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); 800ba8c: 4b4e ldr r3, [pc, #312] @ (800bbc8 ) 800ba8e: 6adb ldr r3, [r3, #44] @ 0x2c 800ba90: 4a4d ldr r2, [pc, #308] @ (800bbc8 ) 800ba92: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800ba96: 62d3 str r3, [r2, #44] @ 0x2c /* USB clock source configuration done later after clock selection check */ break; 800ba98: e00f b.n 800baba case RCC_USBCLKSOURCE_PLL3: /* PLL3 is used as clock source for USB*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800ba9a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ba9e: 3328 adds r3, #40 @ 0x28 800baa0: 2101 movs r1, #1 800baa2: 4618 mov r0, r3 800baa4: f000 fd7e bl 800c5a4 800baa8: 4603 mov r3, r0 800baaa: f887 311f strb.w r3, [r7, #287] @ 0x11f /* USB clock source configuration done later after clock selection check */ break; 800baae: e004 b.n 800baba /* HSI48 oscillator is used as source of USB clock */ /* USB clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800bab0: 2301 movs r3, #1 800bab2: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800bab6: e000 b.n 800baba break; 800bab8: bf00 nop } if (ret == HAL_OK) 800baba: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800babe: 2b00 cmp r3, #0 800bac0: d10b bne.n 800bada { /* Set the source of USB clock*/ __HAL_RCC_USB_CONFIG(PeriphClkInit->UsbClockSelection); 800bac2: 4b41 ldr r3, [pc, #260] @ (800bbc8 ) 800bac4: 6d5b ldr r3, [r3, #84] @ 0x54 800bac6: f423 1140 bic.w r1, r3, #3145728 @ 0x300000 800baca: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bace: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800bad2: 4a3d ldr r2, [pc, #244] @ (800bbc8 ) 800bad4: 430b orrs r3, r1 800bad6: 6553 str r3, [r2, #84] @ 0x54 800bad8: e003 b.n 800bae2 } else { /* set overall return value */ status = ret; 800bada: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bade: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*------------------------------------- SDMMC Configuration ------------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SDMMC) == RCC_PERIPHCLK_SDMMC) 800bae2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bae6: e9d3 2300 ldrd r2, r3, [r3] 800baea: f402 3380 and.w r3, r2, #65536 @ 0x10000 800baee: 66bb str r3, [r7, #104] @ 0x68 800baf0: 2300 movs r3, #0 800baf2: 66fb str r3, [r7, #108] @ 0x6c 800baf4: e9d7 121a ldrd r1, r2, [r7, #104] @ 0x68 800baf8: 460b mov r3, r1 800bafa: 4313 orrs r3, r2 800bafc: d031 beq.n 800bb62 { /* Check the parameters */ assert_param(IS_RCC_SDMMC(PeriphClkInit->SdmmcClockSelection)); switch (PeriphClkInit->SdmmcClockSelection) 800bafe: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bb02: 6d1b ldr r3, [r3, #80] @ 0x50 800bb04: 2b00 cmp r3, #0 800bb06: d003 beq.n 800bb10 800bb08: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800bb0c: d007 beq.n 800bb1e 800bb0e: e011 b.n 800bb34 { 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); 800bb10: 4b2d ldr r3, [pc, #180] @ (800bbc8 ) 800bb12: 6adb ldr r3, [r3, #44] @ 0x2c 800bb14: 4a2c ldr r2, [pc, #176] @ (800bbc8 ) 800bb16: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800bb1a: 62d3 str r3, [r2, #44] @ 0x2c /* SDMMC clock source configuration done later after clock selection check */ break; 800bb1c: e00e b.n 800bb3c case RCC_SDMMCCLKSOURCE_PLL2: /* PLL2 is used as clock source for SDMMC*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_R_UPDATE); 800bb1e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bb22: 3308 adds r3, #8 800bb24: 2102 movs r1, #2 800bb26: 4618 mov r0, r3 800bb28: f000 fc8a bl 800c440 800bb2c: 4603 mov r3, r0 800bb2e: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SDMMC clock source configuration done later after clock selection check */ break; 800bb32: e003 b.n 800bb3c default: ret = HAL_ERROR; 800bb34: 2301 movs r3, #1 800bb36: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800bb3a: bf00 nop } if (ret == HAL_OK) 800bb3c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bb40: 2b00 cmp r3, #0 800bb42: d10a bne.n 800bb5a { /* Set the source of SDMMC clock*/ __HAL_RCC_SDMMC_CONFIG(PeriphClkInit->SdmmcClockSelection); 800bb44: 4b20 ldr r3, [pc, #128] @ (800bbc8 ) 800bb46: 6cdb ldr r3, [r3, #76] @ 0x4c 800bb48: f423 3180 bic.w r1, r3, #65536 @ 0x10000 800bb4c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bb50: 6d1b ldr r3, [r3, #80] @ 0x50 800bb52: 4a1d ldr r2, [pc, #116] @ (800bbc8 ) 800bb54: 430b orrs r3, r1 800bb56: 64d3 str r3, [r2, #76] @ 0x4c 800bb58: e003 b.n 800bb62 } else { /* set overall return value */ status = ret; 800bb5a: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bb5e: f887 311e strb.w r3, [r7, #286] @ 0x11e } } #endif /* LTDC */ /*------------------------------ RNG Configuration -------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RNG) == RCC_PERIPHCLK_RNG) 800bb62: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bb66: e9d3 2300 ldrd r2, r3, [r3] 800bb6a: f402 3300 and.w r3, r2, #131072 @ 0x20000 800bb6e: 663b str r3, [r7, #96] @ 0x60 800bb70: 2300 movs r3, #0 800bb72: 667b str r3, [r7, #100] @ 0x64 800bb74: e9d7 1218 ldrd r1, r2, [r7, #96] @ 0x60 800bb78: 460b mov r3, r1 800bb7a: 4313 orrs r3, r2 800bb7c: d03b beq.n 800bbf6 { switch (PeriphClkInit->RngClockSelection) 800bb7e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bb82: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800bb86: f5b3 7f40 cmp.w r3, #768 @ 0x300 800bb8a: d018 beq.n 800bbbe 800bb8c: f5b3 7f40 cmp.w r3, #768 @ 0x300 800bb90: d811 bhi.n 800bbb6 800bb92: f5b3 7f00 cmp.w r3, #512 @ 0x200 800bb96: d014 beq.n 800bbc2 800bb98: f5b3 7f00 cmp.w r3, #512 @ 0x200 800bb9c: d80b bhi.n 800bbb6 800bb9e: 2b00 cmp r3, #0 800bba0: d014 beq.n 800bbcc 800bba2: f5b3 7f80 cmp.w r3, #256 @ 0x100 800bba6: d106 bne.n 800bbb6 { 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); 800bba8: 4b07 ldr r3, [pc, #28] @ (800bbc8 ) 800bbaa: 6adb ldr r3, [r3, #44] @ 0x2c 800bbac: 4a06 ldr r2, [pc, #24] @ (800bbc8 ) 800bbae: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800bbb2: 62d3 str r3, [r2, #44] @ 0x2c /* RNG clock source configuration done later after clock selection check */ break; 800bbb4: e00b b.n 800bbce /* HSI48 oscillator is used as source of RNG clock */ /* RNG clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800bbb6: 2301 movs r3, #1 800bbb8: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800bbbc: e007 b.n 800bbce break; 800bbbe: bf00 nop 800bbc0: e005 b.n 800bbce break; 800bbc2: bf00 nop 800bbc4: e003 b.n 800bbce 800bbc6: bf00 nop 800bbc8: 58024400 .word 0x58024400 break; 800bbcc: bf00 nop } if (ret == HAL_OK) 800bbce: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bbd2: 2b00 cmp r3, #0 800bbd4: d10b bne.n 800bbee { /* Set the source of RNG clock*/ __HAL_RCC_RNG_CONFIG(PeriphClkInit->RngClockSelection); 800bbd6: 4bba ldr r3, [pc, #744] @ (800bec0 ) 800bbd8: 6d5b ldr r3, [r3, #84] @ 0x54 800bbda: f423 7140 bic.w r1, r3, #768 @ 0x300 800bbde: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bbe2: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800bbe6: 4ab6 ldr r2, [pc, #728] @ (800bec0 ) 800bbe8: 430b orrs r3, r1 800bbea: 6553 str r3, [r2, #84] @ 0x54 800bbec: e003 b.n 800bbf6 } else { /* set overall return value */ status = ret; 800bbee: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bbf2: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*------------------------------ SWPMI1 Configuration ------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SWPMI1) == RCC_PERIPHCLK_SWPMI1) 800bbf6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bbfa: e9d3 2300 ldrd r2, r3, [r3] 800bbfe: f402 1380 and.w r3, r2, #1048576 @ 0x100000 800bc02: 65bb str r3, [r7, #88] @ 0x58 800bc04: 2300 movs r3, #0 800bc06: 65fb str r3, [r7, #92] @ 0x5c 800bc08: e9d7 1216 ldrd r1, r2, [r7, #88] @ 0x58 800bc0c: 460b mov r3, r1 800bc0e: 4313 orrs r3, r2 800bc10: d009 beq.n 800bc26 { /* Check the parameters */ assert_param(IS_RCC_SWPMI1CLKSOURCE(PeriphClkInit->Swpmi1ClockSelection)); /* Configure the SWPMI1 interface clock source */ __HAL_RCC_SWPMI1_CONFIG(PeriphClkInit->Swpmi1ClockSelection); 800bc12: 4bab ldr r3, [pc, #684] @ (800bec0 ) 800bc14: 6d1b ldr r3, [r3, #80] @ 0x50 800bc16: f023 4100 bic.w r1, r3, #2147483648 @ 0x80000000 800bc1a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bc1e: 6f5b ldr r3, [r3, #116] @ 0x74 800bc20: 4aa7 ldr r2, [pc, #668] @ (800bec0 ) 800bc22: 430b orrs r3, r1 800bc24: 6513 str r3, [r2, #80] @ 0x50 } #if defined(HRTIM1) /*------------------------------ HRTIM1 clock Configuration ----------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_HRTIM1) == RCC_PERIPHCLK_HRTIM1) 800bc26: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bc2a: e9d3 2300 ldrd r2, r3, [r3] 800bc2e: f002 5380 and.w r3, r2, #268435456 @ 0x10000000 800bc32: 653b str r3, [r7, #80] @ 0x50 800bc34: 2300 movs r3, #0 800bc36: 657b str r3, [r7, #84] @ 0x54 800bc38: e9d7 1214 ldrd r1, r2, [r7, #80] @ 0x50 800bc3c: 460b mov r3, r1 800bc3e: 4313 orrs r3, r2 800bc40: d00a beq.n 800bc58 { /* Check the parameters */ assert_param(IS_RCC_HRTIM1CLKSOURCE(PeriphClkInit->Hrtim1ClockSelection)); /* Configure the HRTIM1 clock source */ __HAL_RCC_HRTIM1_CONFIG(PeriphClkInit->Hrtim1ClockSelection); 800bc42: 4b9f ldr r3, [pc, #636] @ (800bec0 ) 800bc44: 691b ldr r3, [r3, #16] 800bc46: f423 4180 bic.w r1, r3, #16384 @ 0x4000 800bc4a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bc4e: f8d3 30b8 ldr.w r3, [r3, #184] @ 0xb8 800bc52: 4a9b ldr r2, [pc, #620] @ (800bec0 ) 800bc54: 430b orrs r3, r1 800bc56: 6113 str r3, [r2, #16] } #endif /*HRTIM1*/ /*------------------------------ DFSDM1 Configuration ------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_DFSDM1) == RCC_PERIPHCLK_DFSDM1) 800bc58: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bc5c: e9d3 2300 ldrd r2, r3, [r3] 800bc60: f402 1300 and.w r3, r2, #2097152 @ 0x200000 800bc64: 64bb str r3, [r7, #72] @ 0x48 800bc66: 2300 movs r3, #0 800bc68: 64fb str r3, [r7, #76] @ 0x4c 800bc6a: e9d7 1212 ldrd r1, r2, [r7, #72] @ 0x48 800bc6e: 460b mov r3, r1 800bc70: 4313 orrs r3, r2 800bc72: d009 beq.n 800bc88 { /* Check the parameters */ assert_param(IS_RCC_DFSDM1CLKSOURCE(PeriphClkInit->Dfsdm1ClockSelection)); /* Configure the DFSDM1 interface clock source */ __HAL_RCC_DFSDM1_CONFIG(PeriphClkInit->Dfsdm1ClockSelection); 800bc74: 4b92 ldr r3, [pc, #584] @ (800bec0 ) 800bc76: 6d1b ldr r3, [r3, #80] @ 0x50 800bc78: f023 7180 bic.w r1, r3, #16777216 @ 0x1000000 800bc7c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bc80: 6edb ldr r3, [r3, #108] @ 0x6c 800bc82: 4a8f ldr r2, [pc, #572] @ (800bec0 ) 800bc84: 430b orrs r3, r1 800bc86: 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) 800bc88: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bc8c: e9d3 2300 ldrd r2, r3, [r3] 800bc90: f002 4380 and.w r3, r2, #1073741824 @ 0x40000000 800bc94: 643b str r3, [r7, #64] @ 0x40 800bc96: 2300 movs r3, #0 800bc98: 647b str r3, [r7, #68] @ 0x44 800bc9a: e9d7 1210 ldrd r1, r2, [r7, #64] @ 0x40 800bc9e: 460b mov r3, r1 800bca0: 4313 orrs r3, r2 800bca2: d00e beq.n 800bcc2 { /* Check the parameters */ assert_param(IS_RCC_TIMPRES(PeriphClkInit->TIMPresSelection)); /* Configure Timer Prescaler */ __HAL_RCC_TIMCLKPRESCALER(PeriphClkInit->TIMPresSelection); 800bca4: 4b86 ldr r3, [pc, #536] @ (800bec0 ) 800bca6: 691b ldr r3, [r3, #16] 800bca8: 4a85 ldr r2, [pc, #532] @ (800bec0 ) 800bcaa: f423 4300 bic.w r3, r3, #32768 @ 0x8000 800bcae: 6113 str r3, [r2, #16] 800bcb0: 4b83 ldr r3, [pc, #524] @ (800bec0 ) 800bcb2: 6919 ldr r1, [r3, #16] 800bcb4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bcb8: f8d3 30bc ldr.w r3, [r3, #188] @ 0xbc 800bcbc: 4a80 ldr r2, [pc, #512] @ (800bec0 ) 800bcbe: 430b orrs r3, r1 800bcc0: 6113 str r3, [r2, #16] } /*------------------------------------ CKPER configuration --------------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CKPER) == RCC_PERIPHCLK_CKPER) 800bcc2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bcc6: e9d3 2300 ldrd r2, r3, [r3] 800bcca: f002 4300 and.w r3, r2, #2147483648 @ 0x80000000 800bcce: 63bb str r3, [r7, #56] @ 0x38 800bcd0: 2300 movs r3, #0 800bcd2: 63fb str r3, [r7, #60] @ 0x3c 800bcd4: e9d7 120e ldrd r1, r2, [r7, #56] @ 0x38 800bcd8: 460b mov r3, r1 800bcda: 4313 orrs r3, r2 800bcdc: d009 beq.n 800bcf2 { /* Check the parameters */ assert_param(IS_RCC_CLKPSOURCE(PeriphClkInit->CkperClockSelection)); /* Configure the CKPER clock source */ __HAL_RCC_CLKP_CONFIG(PeriphClkInit->CkperClockSelection); 800bcde: 4b78 ldr r3, [pc, #480] @ (800bec0 ) 800bce0: 6cdb ldr r3, [r3, #76] @ 0x4c 800bce2: f023 5140 bic.w r1, r3, #805306368 @ 0x30000000 800bce6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bcea: 6d5b ldr r3, [r3, #84] @ 0x54 800bcec: 4a74 ldr r2, [pc, #464] @ (800bec0 ) 800bcee: 430b orrs r3, r1 800bcf0: 64d3 str r3, [r2, #76] @ 0x4c } /*------------------------------ CEC Configuration ------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CEC) == RCC_PERIPHCLK_CEC) 800bcf2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bcf6: e9d3 2300 ldrd r2, r3, [r3] 800bcfa: f402 0300 and.w r3, r2, #8388608 @ 0x800000 800bcfe: 633b str r3, [r7, #48] @ 0x30 800bd00: 2300 movs r3, #0 800bd02: 637b str r3, [r7, #52] @ 0x34 800bd04: e9d7 120c ldrd r1, r2, [r7, #48] @ 0x30 800bd08: 460b mov r3, r1 800bd0a: 4313 orrs r3, r2 800bd0c: d00a beq.n 800bd24 { /* Check the parameters */ assert_param(IS_RCC_CECCLKSOURCE(PeriphClkInit->CecClockSelection)); /* Configure the CEC interface clock source */ __HAL_RCC_CEC_CONFIG(PeriphClkInit->CecClockSelection); 800bd0e: 4b6c ldr r3, [pc, #432] @ (800bec0 ) 800bd10: 6d5b ldr r3, [r3, #84] @ 0x54 800bd12: f423 0140 bic.w r1, r3, #12582912 @ 0xc00000 800bd16: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bd1a: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800bd1e: 4a68 ldr r2, [pc, #416] @ (800bec0 ) 800bd20: 430b orrs r3, r1 800bd22: 6553 str r3, [r2, #84] @ 0x54 } /*---------------------------- PLL2 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL2_DIVP) == RCC_PERIPHCLK_PLL2_DIVP) 800bd24: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bd28: e9d3 2300 ldrd r2, r3, [r3] 800bd2c: 2100 movs r1, #0 800bd2e: 62b9 str r1, [r7, #40] @ 0x28 800bd30: f003 0301 and.w r3, r3, #1 800bd34: 62fb str r3, [r7, #44] @ 0x2c 800bd36: e9d7 120a ldrd r1, r2, [r7, #40] @ 0x28 800bd3a: 460b mov r3, r1 800bd3c: 4313 orrs r3, r2 800bd3e: d011 beq.n 800bd64 { ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800bd40: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bd44: 3308 adds r3, #8 800bd46: 2100 movs r1, #0 800bd48: 4618 mov r0, r3 800bd4a: f000 fb79 bl 800c440 800bd4e: 4603 mov r3, r0 800bd50: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800bd54: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bd58: 2b00 cmp r3, #0 800bd5a: d003 beq.n 800bd64 /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800bd5c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bd60: f887 311e strb.w r3, [r7, #286] @ 0x11e } } if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL2_DIVQ) == RCC_PERIPHCLK_PLL2_DIVQ) 800bd64: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bd68: e9d3 2300 ldrd r2, r3, [r3] 800bd6c: 2100 movs r1, #0 800bd6e: 6239 str r1, [r7, #32] 800bd70: f003 0302 and.w r3, r3, #2 800bd74: 627b str r3, [r7, #36] @ 0x24 800bd76: e9d7 1208 ldrd r1, r2, [r7, #32] 800bd7a: 460b mov r3, r1 800bd7c: 4313 orrs r3, r2 800bd7e: d011 beq.n 800bda4 { ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_Q_UPDATE); 800bd80: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bd84: 3308 adds r3, #8 800bd86: 2101 movs r1, #1 800bd88: 4618 mov r0, r3 800bd8a: f000 fb59 bl 800c440 800bd8e: 4603 mov r3, r0 800bd90: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800bd94: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bd98: 2b00 cmp r3, #0 800bd9a: d003 beq.n 800bda4 /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800bd9c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bda0: f887 311e strb.w r3, [r7, #286] @ 0x11e } } if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL2_DIVR) == RCC_PERIPHCLK_PLL2_DIVR) 800bda4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bda8: e9d3 2300 ldrd r2, r3, [r3] 800bdac: 2100 movs r1, #0 800bdae: 61b9 str r1, [r7, #24] 800bdb0: f003 0304 and.w r3, r3, #4 800bdb4: 61fb str r3, [r7, #28] 800bdb6: e9d7 1206 ldrd r1, r2, [r7, #24] 800bdba: 460b mov r3, r1 800bdbc: 4313 orrs r3, r2 800bdbe: d011 beq.n 800bde4 { ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_R_UPDATE); 800bdc0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bdc4: 3308 adds r3, #8 800bdc6: 2102 movs r1, #2 800bdc8: 4618 mov r0, r3 800bdca: f000 fb39 bl 800c440 800bdce: 4603 mov r3, r0 800bdd0: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800bdd4: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bdd8: 2b00 cmp r3, #0 800bdda: d003 beq.n 800bde4 /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800bddc: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bde0: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- PLL3 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL3_DIVP) == RCC_PERIPHCLK_PLL3_DIVP) 800bde4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bde8: e9d3 2300 ldrd r2, r3, [r3] 800bdec: 2100 movs r1, #0 800bdee: 6139 str r1, [r7, #16] 800bdf0: f003 0308 and.w r3, r3, #8 800bdf4: 617b str r3, [r7, #20] 800bdf6: e9d7 1204 ldrd r1, r2, [r7, #16] 800bdfa: 460b mov r3, r1 800bdfc: 4313 orrs r3, r2 800bdfe: d011 beq.n 800be24 { ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800be00: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800be04: 3328 adds r3, #40 @ 0x28 800be06: 2100 movs r1, #0 800be08: 4618 mov r0, r3 800be0a: f000 fbcb bl 800c5a4 800be0e: 4603 mov r3, r0 800be10: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800be14: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800be18: 2b00 cmp r3, #0 800be1a: d003 beq.n 800be24 /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800be1c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800be20: f887 311e strb.w r3, [r7, #286] @ 0x11e } } if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL3_DIVQ) == RCC_PERIPHCLK_PLL3_DIVQ) 800be24: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800be28: e9d3 2300 ldrd r2, r3, [r3] 800be2c: 2100 movs r1, #0 800be2e: 60b9 str r1, [r7, #8] 800be30: f003 0310 and.w r3, r3, #16 800be34: 60fb str r3, [r7, #12] 800be36: e9d7 1202 ldrd r1, r2, [r7, #8] 800be3a: 460b mov r3, r1 800be3c: 4313 orrs r3, r2 800be3e: d011 beq.n 800be64 { ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800be40: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800be44: 3328 adds r3, #40 @ 0x28 800be46: 2101 movs r1, #1 800be48: 4618 mov r0, r3 800be4a: f000 fbab bl 800c5a4 800be4e: 4603 mov r3, r0 800be50: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800be54: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800be58: 2b00 cmp r3, #0 800be5a: d003 beq.n 800be64 /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800be5c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800be60: f887 311e strb.w r3, [r7, #286] @ 0x11e } } if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL3_DIVR) == RCC_PERIPHCLK_PLL3_DIVR) 800be64: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800be68: e9d3 2300 ldrd r2, r3, [r3] 800be6c: 2100 movs r1, #0 800be6e: 6039 str r1, [r7, #0] 800be70: f003 0320 and.w r3, r3, #32 800be74: 607b str r3, [r7, #4] 800be76: e9d7 1200 ldrd r1, r2, [r7] 800be7a: 460b mov r3, r1 800be7c: 4313 orrs r3, r2 800be7e: d011 beq.n 800bea4 { ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800be80: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800be84: 3328 adds r3, #40 @ 0x28 800be86: 2102 movs r1, #2 800be88: 4618 mov r0, r3 800be8a: f000 fb8b bl 800c5a4 800be8e: 4603 mov r3, r0 800be90: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800be94: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800be98: 2b00 cmp r3, #0 800be9a: d003 beq.n 800bea4 /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800be9c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bea0: f887 311e strb.w r3, [r7, #286] @ 0x11e } } if (status == HAL_OK) 800bea4: f897 311e ldrb.w r3, [r7, #286] @ 0x11e 800bea8: 2b00 cmp r3, #0 800beaa: d101 bne.n 800beb0 { return HAL_OK; 800beac: 2300 movs r3, #0 800beae: e000 b.n 800beb2 } return HAL_ERROR; 800beb0: 2301 movs r3, #1 } 800beb2: 4618 mov r0, r3 800beb4: f507 7790 add.w r7, r7, #288 @ 0x120 800beb8: 46bd mov sp, r7 800beba: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc} 800bebe: bf00 nop 800bec0: 58024400 .word 0x58024400 0800bec4 : * @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) { 800bec4: b580 push {r7, lr} 800bec6: 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)); 800bec8: f7fe fd70 bl 800a9ac 800becc: 4602 mov r2, r0 800bece: 4b06 ldr r3, [pc, #24] @ (800bee8 ) 800bed0: 6a1b ldr r3, [r3, #32] 800bed2: 091b lsrs r3, r3, #4 800bed4: f003 0307 and.w r3, r3, #7 800bed8: 4904 ldr r1, [pc, #16] @ (800beec ) 800beda: 5ccb ldrb r3, [r1, r3] 800bedc: f003 031f and.w r3, r3, #31 800bee0: 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 } 800bee4: 4618 mov r0, r3 800bee6: bd80 pop {r7, pc} 800bee8: 58024400 .word 0x58024400 800beec: 08030a24 .word 0x08030a24 0800bef0 : * 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) { 800bef0: b480 push {r7} 800bef2: b089 sub sp, #36 @ 0x24 800bef4: af00 add r7, sp, #0 800bef6: 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); 800bef8: 4ba1 ldr r3, [pc, #644] @ (800c180 ) 800befa: 6a9b ldr r3, [r3, #40] @ 0x28 800befc: f003 0303 and.w r3, r3, #3 800bf00: 61bb str r3, [r7, #24] pll2m = ((RCC->PLLCKSELR & RCC_PLLCKSELR_DIVM2) >> 12); 800bf02: 4b9f ldr r3, [pc, #636] @ (800c180 ) 800bf04: 6a9b ldr r3, [r3, #40] @ 0x28 800bf06: 0b1b lsrs r3, r3, #12 800bf08: f003 033f and.w r3, r3, #63 @ 0x3f 800bf0c: 617b str r3, [r7, #20] pll2fracen = (RCC->PLLCFGR & RCC_PLLCFGR_PLL2FRACEN) >> RCC_PLLCFGR_PLL2FRACEN_Pos; 800bf0e: 4b9c ldr r3, [pc, #624] @ (800c180 ) 800bf10: 6adb ldr r3, [r3, #44] @ 0x2c 800bf12: 091b lsrs r3, r3, #4 800bf14: f003 0301 and.w r3, r3, #1 800bf18: 613b str r3, [r7, #16] fracn2 = (float_t)(uint32_t)(pll2fracen * ((RCC->PLL2FRACR & RCC_PLL2FRACR_FRACN2) >> 3)); 800bf1a: 4b99 ldr r3, [pc, #612] @ (800c180 ) 800bf1c: 6bdb ldr r3, [r3, #60] @ 0x3c 800bf1e: 08db lsrs r3, r3, #3 800bf20: f3c3 030c ubfx r3, r3, #0, #13 800bf24: 693a ldr r2, [r7, #16] 800bf26: fb02 f303 mul.w r3, r2, r3 800bf2a: ee07 3a90 vmov s15, r3 800bf2e: eef8 7a67 vcvt.f32.u32 s15, s15 800bf32: edc7 7a03 vstr s15, [r7, #12] if (pll2m != 0U) 800bf36: 697b ldr r3, [r7, #20] 800bf38: 2b00 cmp r3, #0 800bf3a: f000 8111 beq.w 800c160 { switch (pllsource) 800bf3e: 69bb ldr r3, [r7, #24] 800bf40: 2b02 cmp r3, #2 800bf42: f000 8083 beq.w 800c04c 800bf46: 69bb ldr r3, [r7, #24] 800bf48: 2b02 cmp r3, #2 800bf4a: f200 80a1 bhi.w 800c090 800bf4e: 69bb ldr r3, [r7, #24] 800bf50: 2b00 cmp r3, #0 800bf52: d003 beq.n 800bf5c 800bf54: 69bb ldr r3, [r7, #24] 800bf56: 2b01 cmp r3, #1 800bf58: d056 beq.n 800c008 800bf5a: e099 b.n 800c090 { case RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800bf5c: 4b88 ldr r3, [pc, #544] @ (800c180 ) 800bf5e: 681b ldr r3, [r3, #0] 800bf60: f003 0320 and.w r3, r3, #32 800bf64: 2b00 cmp r3, #0 800bf66: d02d beq.n 800bfc4 { hsivalue = (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3)); 800bf68: 4b85 ldr r3, [pc, #532] @ (800c180 ) 800bf6a: 681b ldr r3, [r3, #0] 800bf6c: 08db lsrs r3, r3, #3 800bf6e: f003 0303 and.w r3, r3, #3 800bf72: 4a84 ldr r2, [pc, #528] @ (800c184 ) 800bf74: fa22 f303 lsr.w r3, r2, r3 800bf78: 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); 800bf7a: 68bb ldr r3, [r7, #8] 800bf7c: ee07 3a90 vmov s15, r3 800bf80: eef8 6a67 vcvt.f32.u32 s13, s15 800bf84: 697b ldr r3, [r7, #20] 800bf86: ee07 3a90 vmov s15, r3 800bf8a: eef8 7a67 vcvt.f32.u32 s15, s15 800bf8e: ee86 7aa7 vdiv.f32 s14, s13, s15 800bf92: 4b7b ldr r3, [pc, #492] @ (800c180 ) 800bf94: 6b9b ldr r3, [r3, #56] @ 0x38 800bf96: f3c3 0308 ubfx r3, r3, #0, #9 800bf9a: ee07 3a90 vmov s15, r3 800bf9e: eef8 6a67 vcvt.f32.u32 s13, s15 800bfa2: ed97 6a03 vldr s12, [r7, #12] 800bfa6: eddf 5a78 vldr s11, [pc, #480] @ 800c188 800bfaa: eec6 7a25 vdiv.f32 s15, s12, s11 800bfae: ee76 7aa7 vadd.f32 s15, s13, s15 800bfb2: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800bfb6: ee77 7aa6 vadd.f32 s15, s15, s13 800bfba: ee67 7a27 vmul.f32 s15, s14, s15 800bfbe: 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; 800bfc2: e087 b.n 800c0d4 pll2vco = ((float_t)HSI_VALUE / (float_t)pll2m) * ((float_t)(uint32_t)(RCC->PLL2DIVR & RCC_PLL2DIVR_N2) + (fracn2 / (float_t)0x2000) + (float_t)1); 800bfc4: 697b ldr r3, [r7, #20] 800bfc6: ee07 3a90 vmov s15, r3 800bfca: eef8 7a67 vcvt.f32.u32 s15, s15 800bfce: eddf 6a6f vldr s13, [pc, #444] @ 800c18c 800bfd2: ee86 7aa7 vdiv.f32 s14, s13, s15 800bfd6: 4b6a ldr r3, [pc, #424] @ (800c180 ) 800bfd8: 6b9b ldr r3, [r3, #56] @ 0x38 800bfda: f3c3 0308 ubfx r3, r3, #0, #9 800bfde: ee07 3a90 vmov s15, r3 800bfe2: eef8 6a67 vcvt.f32.u32 s13, s15 800bfe6: ed97 6a03 vldr s12, [r7, #12] 800bfea: eddf 5a67 vldr s11, [pc, #412] @ 800c188 800bfee: eec6 7a25 vdiv.f32 s15, s12, s11 800bff2: ee76 7aa7 vadd.f32 s15, s13, s15 800bff6: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800bffa: ee77 7aa6 vadd.f32 s15, s15, s13 800bffe: ee67 7a27 vmul.f32 s15, s14, s15 800c002: edc7 7a07 vstr s15, [r7, #28] break; 800c006: e065 b.n 800c0d4 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); 800c008: 697b ldr r3, [r7, #20] 800c00a: ee07 3a90 vmov s15, r3 800c00e: eef8 7a67 vcvt.f32.u32 s15, s15 800c012: eddf 6a5f vldr s13, [pc, #380] @ 800c190 800c016: ee86 7aa7 vdiv.f32 s14, s13, s15 800c01a: 4b59 ldr r3, [pc, #356] @ (800c180 ) 800c01c: 6b9b ldr r3, [r3, #56] @ 0x38 800c01e: f3c3 0308 ubfx r3, r3, #0, #9 800c022: ee07 3a90 vmov s15, r3 800c026: eef8 6a67 vcvt.f32.u32 s13, s15 800c02a: ed97 6a03 vldr s12, [r7, #12] 800c02e: eddf 5a56 vldr s11, [pc, #344] @ 800c188 800c032: eec6 7a25 vdiv.f32 s15, s12, s11 800c036: ee76 7aa7 vadd.f32 s15, s13, s15 800c03a: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800c03e: ee77 7aa6 vadd.f32 s15, s15, s13 800c042: ee67 7a27 vmul.f32 s15, s14, s15 800c046: edc7 7a07 vstr s15, [r7, #28] break; 800c04a: e043 b.n 800c0d4 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); 800c04c: 697b ldr r3, [r7, #20] 800c04e: ee07 3a90 vmov s15, r3 800c052: eef8 7a67 vcvt.f32.u32 s15, s15 800c056: eddf 6a4f vldr s13, [pc, #316] @ 800c194 800c05a: ee86 7aa7 vdiv.f32 s14, s13, s15 800c05e: 4b48 ldr r3, [pc, #288] @ (800c180 ) 800c060: 6b9b ldr r3, [r3, #56] @ 0x38 800c062: f3c3 0308 ubfx r3, r3, #0, #9 800c066: ee07 3a90 vmov s15, r3 800c06a: eef8 6a67 vcvt.f32.u32 s13, s15 800c06e: ed97 6a03 vldr s12, [r7, #12] 800c072: eddf 5a45 vldr s11, [pc, #276] @ 800c188 800c076: eec6 7a25 vdiv.f32 s15, s12, s11 800c07a: ee76 7aa7 vadd.f32 s15, s13, s15 800c07e: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800c082: ee77 7aa6 vadd.f32 s15, s15, s13 800c086: ee67 7a27 vmul.f32 s15, s14, s15 800c08a: edc7 7a07 vstr s15, [r7, #28] break; 800c08e: e021 b.n 800c0d4 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); 800c090: 697b ldr r3, [r7, #20] 800c092: ee07 3a90 vmov s15, r3 800c096: eef8 7a67 vcvt.f32.u32 s15, s15 800c09a: eddf 6a3d vldr s13, [pc, #244] @ 800c190 800c09e: ee86 7aa7 vdiv.f32 s14, s13, s15 800c0a2: 4b37 ldr r3, [pc, #220] @ (800c180 ) 800c0a4: 6b9b ldr r3, [r3, #56] @ 0x38 800c0a6: f3c3 0308 ubfx r3, r3, #0, #9 800c0aa: ee07 3a90 vmov s15, r3 800c0ae: eef8 6a67 vcvt.f32.u32 s13, s15 800c0b2: ed97 6a03 vldr s12, [r7, #12] 800c0b6: eddf 5a34 vldr s11, [pc, #208] @ 800c188 800c0ba: eec6 7a25 vdiv.f32 s15, s12, s11 800c0be: ee76 7aa7 vadd.f32 s15, s13, s15 800c0c2: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800c0c6: ee77 7aa6 vadd.f32 s15, s15, s13 800c0ca: ee67 7a27 vmul.f32 s15, s14, s15 800c0ce: edc7 7a07 vstr s15, [r7, #28] break; 800c0d2: 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)) ; 800c0d4: 4b2a ldr r3, [pc, #168] @ (800c180 ) 800c0d6: 6b9b ldr r3, [r3, #56] @ 0x38 800c0d8: 0a5b lsrs r3, r3, #9 800c0da: f003 037f and.w r3, r3, #127 @ 0x7f 800c0de: ee07 3a90 vmov s15, r3 800c0e2: eef8 7a67 vcvt.f32.u32 s15, s15 800c0e6: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800c0ea: ee37 7a87 vadd.f32 s14, s15, s14 800c0ee: edd7 6a07 vldr s13, [r7, #28] 800c0f2: eec6 7a87 vdiv.f32 s15, s13, s14 800c0f6: eefc 7ae7 vcvt.u32.f32 s15, s15 800c0fa: ee17 2a90 vmov r2, s15 800c0fe: 687b ldr r3, [r7, #4] 800c100: 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)) ; 800c102: 4b1f ldr r3, [pc, #124] @ (800c180 ) 800c104: 6b9b ldr r3, [r3, #56] @ 0x38 800c106: 0c1b lsrs r3, r3, #16 800c108: f003 037f and.w r3, r3, #127 @ 0x7f 800c10c: ee07 3a90 vmov s15, r3 800c110: eef8 7a67 vcvt.f32.u32 s15, s15 800c114: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800c118: ee37 7a87 vadd.f32 s14, s15, s14 800c11c: edd7 6a07 vldr s13, [r7, #28] 800c120: eec6 7a87 vdiv.f32 s15, s13, s14 800c124: eefc 7ae7 vcvt.u32.f32 s15, s15 800c128: ee17 2a90 vmov r2, s15 800c12c: 687b ldr r3, [r7, #4] 800c12e: 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)) ; 800c130: 4b13 ldr r3, [pc, #76] @ (800c180 ) 800c132: 6b9b ldr r3, [r3, #56] @ 0x38 800c134: 0e1b lsrs r3, r3, #24 800c136: f003 037f and.w r3, r3, #127 @ 0x7f 800c13a: ee07 3a90 vmov s15, r3 800c13e: eef8 7a67 vcvt.f32.u32 s15, s15 800c142: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800c146: ee37 7a87 vadd.f32 s14, s15, s14 800c14a: edd7 6a07 vldr s13, [r7, #28] 800c14e: eec6 7a87 vdiv.f32 s15, s13, s14 800c152: eefc 7ae7 vcvt.u32.f32 s15, s15 800c156: ee17 2a90 vmov r2, s15 800c15a: 687b ldr r3, [r7, #4] 800c15c: 609a str r2, [r3, #8] { PLL2_Clocks->PLL2_P_Frequency = 0U; PLL2_Clocks->PLL2_Q_Frequency = 0U; PLL2_Clocks->PLL2_R_Frequency = 0U; } } 800c15e: e008 b.n 800c172 PLL2_Clocks->PLL2_P_Frequency = 0U; 800c160: 687b ldr r3, [r7, #4] 800c162: 2200 movs r2, #0 800c164: 601a str r2, [r3, #0] PLL2_Clocks->PLL2_Q_Frequency = 0U; 800c166: 687b ldr r3, [r7, #4] 800c168: 2200 movs r2, #0 800c16a: 605a str r2, [r3, #4] PLL2_Clocks->PLL2_R_Frequency = 0U; 800c16c: 687b ldr r3, [r7, #4] 800c16e: 2200 movs r2, #0 800c170: 609a str r2, [r3, #8] } 800c172: bf00 nop 800c174: 3724 adds r7, #36 @ 0x24 800c176: 46bd mov sp, r7 800c178: f85d 7b04 ldr.w r7, [sp], #4 800c17c: 4770 bx lr 800c17e: bf00 nop 800c180: 58024400 .word 0x58024400 800c184: 03d09000 .word 0x03d09000 800c188: 46000000 .word 0x46000000 800c18c: 4c742400 .word 0x4c742400 800c190: 4a742400 .word 0x4a742400 800c194: 4bbebc20 .word 0x4bbebc20 0800c198 : * 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) { 800c198: b480 push {r7} 800c19a: b089 sub sp, #36 @ 0x24 800c19c: af00 add r7, sp, #0 800c19e: 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); 800c1a0: 4ba1 ldr r3, [pc, #644] @ (800c428 ) 800c1a2: 6a9b ldr r3, [r3, #40] @ 0x28 800c1a4: f003 0303 and.w r3, r3, #3 800c1a8: 61bb str r3, [r7, #24] pll3m = ((RCC->PLLCKSELR & RCC_PLLCKSELR_DIVM3) >> 20) ; 800c1aa: 4b9f ldr r3, [pc, #636] @ (800c428 ) 800c1ac: 6a9b ldr r3, [r3, #40] @ 0x28 800c1ae: 0d1b lsrs r3, r3, #20 800c1b0: f003 033f and.w r3, r3, #63 @ 0x3f 800c1b4: 617b str r3, [r7, #20] pll3fracen = (RCC->PLLCFGR & RCC_PLLCFGR_PLL3FRACEN) >> RCC_PLLCFGR_PLL3FRACEN_Pos; 800c1b6: 4b9c ldr r3, [pc, #624] @ (800c428 ) 800c1b8: 6adb ldr r3, [r3, #44] @ 0x2c 800c1ba: 0a1b lsrs r3, r3, #8 800c1bc: f003 0301 and.w r3, r3, #1 800c1c0: 613b str r3, [r7, #16] fracn3 = (float_t)(uint32_t)(pll3fracen * ((RCC->PLL3FRACR & RCC_PLL3FRACR_FRACN3) >> 3)); 800c1c2: 4b99 ldr r3, [pc, #612] @ (800c428 ) 800c1c4: 6c5b ldr r3, [r3, #68] @ 0x44 800c1c6: 08db lsrs r3, r3, #3 800c1c8: f3c3 030c ubfx r3, r3, #0, #13 800c1cc: 693a ldr r2, [r7, #16] 800c1ce: fb02 f303 mul.w r3, r2, r3 800c1d2: ee07 3a90 vmov s15, r3 800c1d6: eef8 7a67 vcvt.f32.u32 s15, s15 800c1da: edc7 7a03 vstr s15, [r7, #12] if (pll3m != 0U) 800c1de: 697b ldr r3, [r7, #20] 800c1e0: 2b00 cmp r3, #0 800c1e2: f000 8111 beq.w 800c408 { switch (pllsource) 800c1e6: 69bb ldr r3, [r7, #24] 800c1e8: 2b02 cmp r3, #2 800c1ea: f000 8083 beq.w 800c2f4 800c1ee: 69bb ldr r3, [r7, #24] 800c1f0: 2b02 cmp r3, #2 800c1f2: f200 80a1 bhi.w 800c338 800c1f6: 69bb ldr r3, [r7, #24] 800c1f8: 2b00 cmp r3, #0 800c1fa: d003 beq.n 800c204 800c1fc: 69bb ldr r3, [r7, #24] 800c1fe: 2b01 cmp r3, #1 800c200: d056 beq.n 800c2b0 800c202: e099 b.n 800c338 { case RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800c204: 4b88 ldr r3, [pc, #544] @ (800c428 ) 800c206: 681b ldr r3, [r3, #0] 800c208: f003 0320 and.w r3, r3, #32 800c20c: 2b00 cmp r3, #0 800c20e: d02d beq.n 800c26c { hsivalue = (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3)); 800c210: 4b85 ldr r3, [pc, #532] @ (800c428 ) 800c212: 681b ldr r3, [r3, #0] 800c214: 08db lsrs r3, r3, #3 800c216: f003 0303 and.w r3, r3, #3 800c21a: 4a84 ldr r2, [pc, #528] @ (800c42c ) 800c21c: fa22 f303 lsr.w r3, r2, r3 800c220: 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); 800c222: 68bb ldr r3, [r7, #8] 800c224: ee07 3a90 vmov s15, r3 800c228: eef8 6a67 vcvt.f32.u32 s13, s15 800c22c: 697b ldr r3, [r7, #20] 800c22e: ee07 3a90 vmov s15, r3 800c232: eef8 7a67 vcvt.f32.u32 s15, s15 800c236: ee86 7aa7 vdiv.f32 s14, s13, s15 800c23a: 4b7b ldr r3, [pc, #492] @ (800c428 ) 800c23c: 6c1b ldr r3, [r3, #64] @ 0x40 800c23e: f3c3 0308 ubfx r3, r3, #0, #9 800c242: ee07 3a90 vmov s15, r3 800c246: eef8 6a67 vcvt.f32.u32 s13, s15 800c24a: ed97 6a03 vldr s12, [r7, #12] 800c24e: eddf 5a78 vldr s11, [pc, #480] @ 800c430 800c252: eec6 7a25 vdiv.f32 s15, s12, s11 800c256: ee76 7aa7 vadd.f32 s15, s13, s15 800c25a: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800c25e: ee77 7aa6 vadd.f32 s15, s15, s13 800c262: ee67 7a27 vmul.f32 s15, s14, s15 800c266: 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; 800c26a: e087 b.n 800c37c pll3vco = ((float_t)HSI_VALUE / (float_t)pll3m) * ((float_t)(uint32_t)(RCC->PLL3DIVR & RCC_PLL3DIVR_N3) + (fracn3 / (float_t)0x2000) + (float_t)1); 800c26c: 697b ldr r3, [r7, #20] 800c26e: ee07 3a90 vmov s15, r3 800c272: eef8 7a67 vcvt.f32.u32 s15, s15 800c276: eddf 6a6f vldr s13, [pc, #444] @ 800c434 800c27a: ee86 7aa7 vdiv.f32 s14, s13, s15 800c27e: 4b6a ldr r3, [pc, #424] @ (800c428 ) 800c280: 6c1b ldr r3, [r3, #64] @ 0x40 800c282: f3c3 0308 ubfx r3, r3, #0, #9 800c286: ee07 3a90 vmov s15, r3 800c28a: eef8 6a67 vcvt.f32.u32 s13, s15 800c28e: ed97 6a03 vldr s12, [r7, #12] 800c292: eddf 5a67 vldr s11, [pc, #412] @ 800c430 800c296: eec6 7a25 vdiv.f32 s15, s12, s11 800c29a: ee76 7aa7 vadd.f32 s15, s13, s15 800c29e: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800c2a2: ee77 7aa6 vadd.f32 s15, s15, s13 800c2a6: ee67 7a27 vmul.f32 s15, s14, s15 800c2aa: edc7 7a07 vstr s15, [r7, #28] break; 800c2ae: e065 b.n 800c37c 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); 800c2b0: 697b ldr r3, [r7, #20] 800c2b2: ee07 3a90 vmov s15, r3 800c2b6: eef8 7a67 vcvt.f32.u32 s15, s15 800c2ba: eddf 6a5f vldr s13, [pc, #380] @ 800c438 800c2be: ee86 7aa7 vdiv.f32 s14, s13, s15 800c2c2: 4b59 ldr r3, [pc, #356] @ (800c428 ) 800c2c4: 6c1b ldr r3, [r3, #64] @ 0x40 800c2c6: f3c3 0308 ubfx r3, r3, #0, #9 800c2ca: ee07 3a90 vmov s15, r3 800c2ce: eef8 6a67 vcvt.f32.u32 s13, s15 800c2d2: ed97 6a03 vldr s12, [r7, #12] 800c2d6: eddf 5a56 vldr s11, [pc, #344] @ 800c430 800c2da: eec6 7a25 vdiv.f32 s15, s12, s11 800c2de: ee76 7aa7 vadd.f32 s15, s13, s15 800c2e2: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800c2e6: ee77 7aa6 vadd.f32 s15, s15, s13 800c2ea: ee67 7a27 vmul.f32 s15, s14, s15 800c2ee: edc7 7a07 vstr s15, [r7, #28] break; 800c2f2: e043 b.n 800c37c 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); 800c2f4: 697b ldr r3, [r7, #20] 800c2f6: ee07 3a90 vmov s15, r3 800c2fa: eef8 7a67 vcvt.f32.u32 s15, s15 800c2fe: eddf 6a4f vldr s13, [pc, #316] @ 800c43c 800c302: ee86 7aa7 vdiv.f32 s14, s13, s15 800c306: 4b48 ldr r3, [pc, #288] @ (800c428 ) 800c308: 6c1b ldr r3, [r3, #64] @ 0x40 800c30a: f3c3 0308 ubfx r3, r3, #0, #9 800c30e: ee07 3a90 vmov s15, r3 800c312: eef8 6a67 vcvt.f32.u32 s13, s15 800c316: ed97 6a03 vldr s12, [r7, #12] 800c31a: eddf 5a45 vldr s11, [pc, #276] @ 800c430 800c31e: eec6 7a25 vdiv.f32 s15, s12, s11 800c322: ee76 7aa7 vadd.f32 s15, s13, s15 800c326: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800c32a: ee77 7aa6 vadd.f32 s15, s15, s13 800c32e: ee67 7a27 vmul.f32 s15, s14, s15 800c332: edc7 7a07 vstr s15, [r7, #28] break; 800c336: e021 b.n 800c37c 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); 800c338: 697b ldr r3, [r7, #20] 800c33a: ee07 3a90 vmov s15, r3 800c33e: eef8 7a67 vcvt.f32.u32 s15, s15 800c342: eddf 6a3d vldr s13, [pc, #244] @ 800c438 800c346: ee86 7aa7 vdiv.f32 s14, s13, s15 800c34a: 4b37 ldr r3, [pc, #220] @ (800c428 ) 800c34c: 6c1b ldr r3, [r3, #64] @ 0x40 800c34e: f3c3 0308 ubfx r3, r3, #0, #9 800c352: ee07 3a90 vmov s15, r3 800c356: eef8 6a67 vcvt.f32.u32 s13, s15 800c35a: ed97 6a03 vldr s12, [r7, #12] 800c35e: eddf 5a34 vldr s11, [pc, #208] @ 800c430 800c362: eec6 7a25 vdiv.f32 s15, s12, s11 800c366: ee76 7aa7 vadd.f32 s15, s13, s15 800c36a: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800c36e: ee77 7aa6 vadd.f32 s15, s15, s13 800c372: ee67 7a27 vmul.f32 s15, s14, s15 800c376: edc7 7a07 vstr s15, [r7, #28] break; 800c37a: 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)) ; 800c37c: 4b2a ldr r3, [pc, #168] @ (800c428 ) 800c37e: 6c1b ldr r3, [r3, #64] @ 0x40 800c380: 0a5b lsrs r3, r3, #9 800c382: f003 037f and.w r3, r3, #127 @ 0x7f 800c386: ee07 3a90 vmov s15, r3 800c38a: eef8 7a67 vcvt.f32.u32 s15, s15 800c38e: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800c392: ee37 7a87 vadd.f32 s14, s15, s14 800c396: edd7 6a07 vldr s13, [r7, #28] 800c39a: eec6 7a87 vdiv.f32 s15, s13, s14 800c39e: eefc 7ae7 vcvt.u32.f32 s15, s15 800c3a2: ee17 2a90 vmov r2, s15 800c3a6: 687b ldr r3, [r7, #4] 800c3a8: 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)) ; 800c3aa: 4b1f ldr r3, [pc, #124] @ (800c428 ) 800c3ac: 6c1b ldr r3, [r3, #64] @ 0x40 800c3ae: 0c1b lsrs r3, r3, #16 800c3b0: f003 037f and.w r3, r3, #127 @ 0x7f 800c3b4: ee07 3a90 vmov s15, r3 800c3b8: eef8 7a67 vcvt.f32.u32 s15, s15 800c3bc: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800c3c0: ee37 7a87 vadd.f32 s14, s15, s14 800c3c4: edd7 6a07 vldr s13, [r7, #28] 800c3c8: eec6 7a87 vdiv.f32 s15, s13, s14 800c3cc: eefc 7ae7 vcvt.u32.f32 s15, s15 800c3d0: ee17 2a90 vmov r2, s15 800c3d4: 687b ldr r3, [r7, #4] 800c3d6: 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)) ; 800c3d8: 4b13 ldr r3, [pc, #76] @ (800c428 ) 800c3da: 6c1b ldr r3, [r3, #64] @ 0x40 800c3dc: 0e1b lsrs r3, r3, #24 800c3de: f003 037f and.w r3, r3, #127 @ 0x7f 800c3e2: ee07 3a90 vmov s15, r3 800c3e6: eef8 7a67 vcvt.f32.u32 s15, s15 800c3ea: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800c3ee: ee37 7a87 vadd.f32 s14, s15, s14 800c3f2: edd7 6a07 vldr s13, [r7, #28] 800c3f6: eec6 7a87 vdiv.f32 s15, s13, s14 800c3fa: eefc 7ae7 vcvt.u32.f32 s15, s15 800c3fe: ee17 2a90 vmov r2, s15 800c402: 687b ldr r3, [r7, #4] 800c404: 609a str r2, [r3, #8] PLL3_Clocks->PLL3_P_Frequency = 0U; PLL3_Clocks->PLL3_Q_Frequency = 0U; PLL3_Clocks->PLL3_R_Frequency = 0U; } } 800c406: e008 b.n 800c41a PLL3_Clocks->PLL3_P_Frequency = 0U; 800c408: 687b ldr r3, [r7, #4] 800c40a: 2200 movs r2, #0 800c40c: 601a str r2, [r3, #0] PLL3_Clocks->PLL3_Q_Frequency = 0U; 800c40e: 687b ldr r3, [r7, #4] 800c410: 2200 movs r2, #0 800c412: 605a str r2, [r3, #4] PLL3_Clocks->PLL3_R_Frequency = 0U; 800c414: 687b ldr r3, [r7, #4] 800c416: 2200 movs r2, #0 800c418: 609a str r2, [r3, #8] } 800c41a: bf00 nop 800c41c: 3724 adds r7, #36 @ 0x24 800c41e: 46bd mov sp, r7 800c420: f85d 7b04 ldr.w r7, [sp], #4 800c424: 4770 bx lr 800c426: bf00 nop 800c428: 58024400 .word 0x58024400 800c42c: 03d09000 .word 0x03d09000 800c430: 46000000 .word 0x46000000 800c434: 4c742400 .word 0x4c742400 800c438: 4a742400 .word 0x4a742400 800c43c: 4bbebc20 .word 0x4bbebc20 0800c440 : * @note PLL2 is temporary disabled to apply new parameters * * @retval HAL status */ static HAL_StatusTypeDef RCCEx_PLL2_Config(RCC_PLL2InitTypeDef *pll2, uint32_t Divider) { 800c440: b580 push {r7, lr} 800c442: b084 sub sp, #16 800c444: af00 add r7, sp, #0 800c446: 6078 str r0, [r7, #4] 800c448: 6039 str r1, [r7, #0] uint32_t tickstart; HAL_StatusTypeDef status = HAL_OK; 800c44a: 2300 movs r3, #0 800c44c: 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) 800c44e: 4b53 ldr r3, [pc, #332] @ (800c59c ) 800c450: 6a9b ldr r3, [r3, #40] @ 0x28 800c452: f003 0303 and.w r3, r3, #3 800c456: 2b03 cmp r3, #3 800c458: d101 bne.n 800c45e { return HAL_ERROR; 800c45a: 2301 movs r3, #1 800c45c: e099 b.n 800c592 else { /* Disable PLL2. */ __HAL_RCC_PLL2_DISABLE(); 800c45e: 4b4f ldr r3, [pc, #316] @ (800c59c ) 800c460: 681b ldr r3, [r3, #0] 800c462: 4a4e ldr r2, [pc, #312] @ (800c59c ) 800c464: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 800c468: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800c46a: f7f8 fde1 bl 8005030 800c46e: 60b8 str r0, [r7, #8] /* Wait till PLL is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL2RDY) != 0U) 800c470: e008 b.n 800c484 { if ((HAL_GetTick() - tickstart) > PLL2_TIMEOUT_VALUE) 800c472: f7f8 fddd bl 8005030 800c476: 4602 mov r2, r0 800c478: 68bb ldr r3, [r7, #8] 800c47a: 1ad3 subs r3, r2, r3 800c47c: 2b02 cmp r3, #2 800c47e: d901 bls.n 800c484 { return HAL_TIMEOUT; 800c480: 2303 movs r3, #3 800c482: e086 b.n 800c592 while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL2RDY) != 0U) 800c484: 4b45 ldr r3, [pc, #276] @ (800c59c ) 800c486: 681b ldr r3, [r3, #0] 800c488: f003 6300 and.w r3, r3, #134217728 @ 0x8000000 800c48c: 2b00 cmp r3, #0 800c48e: d1f0 bne.n 800c472 } } /* Configure PLL2 multiplication and division factors. */ __HAL_RCC_PLL2_CONFIG(pll2->PLL2M, 800c490: 4b42 ldr r3, [pc, #264] @ (800c59c ) 800c492: 6a9b ldr r3, [r3, #40] @ 0x28 800c494: f423 327c bic.w r2, r3, #258048 @ 0x3f000 800c498: 687b ldr r3, [r7, #4] 800c49a: 681b ldr r3, [r3, #0] 800c49c: 031b lsls r3, r3, #12 800c49e: 493f ldr r1, [pc, #252] @ (800c59c ) 800c4a0: 4313 orrs r3, r2 800c4a2: 628b str r3, [r1, #40] @ 0x28 800c4a4: 687b ldr r3, [r7, #4] 800c4a6: 685b ldr r3, [r3, #4] 800c4a8: 3b01 subs r3, #1 800c4aa: f3c3 0208 ubfx r2, r3, #0, #9 800c4ae: 687b ldr r3, [r7, #4] 800c4b0: 689b ldr r3, [r3, #8] 800c4b2: 3b01 subs r3, #1 800c4b4: 025b lsls r3, r3, #9 800c4b6: b29b uxth r3, r3 800c4b8: 431a orrs r2, r3 800c4ba: 687b ldr r3, [r7, #4] 800c4bc: 68db ldr r3, [r3, #12] 800c4be: 3b01 subs r3, #1 800c4c0: 041b lsls r3, r3, #16 800c4c2: f403 03fe and.w r3, r3, #8323072 @ 0x7f0000 800c4c6: 431a orrs r2, r3 800c4c8: 687b ldr r3, [r7, #4] 800c4ca: 691b ldr r3, [r3, #16] 800c4cc: 3b01 subs r3, #1 800c4ce: 061b lsls r3, r3, #24 800c4d0: f003 43fe and.w r3, r3, #2130706432 @ 0x7f000000 800c4d4: 4931 ldr r1, [pc, #196] @ (800c59c ) 800c4d6: 4313 orrs r3, r2 800c4d8: 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) ; 800c4da: 4b30 ldr r3, [pc, #192] @ (800c59c ) 800c4dc: 6adb ldr r3, [r3, #44] @ 0x2c 800c4de: f023 02c0 bic.w r2, r3, #192 @ 0xc0 800c4e2: 687b ldr r3, [r7, #4] 800c4e4: 695b ldr r3, [r3, #20] 800c4e6: 492d ldr r1, [pc, #180] @ (800c59c ) 800c4e8: 4313 orrs r3, r2 800c4ea: 62cb str r3, [r1, #44] @ 0x2c /* Select PLL2 output frequency range : VCO */ __HAL_RCC_PLL2_VCORANGE(pll2->PLL2VCOSEL) ; 800c4ec: 4b2b ldr r3, [pc, #172] @ (800c59c ) 800c4ee: 6adb ldr r3, [r3, #44] @ 0x2c 800c4f0: f023 0220 bic.w r2, r3, #32 800c4f4: 687b ldr r3, [r7, #4] 800c4f6: 699b ldr r3, [r3, #24] 800c4f8: 4928 ldr r1, [pc, #160] @ (800c59c ) 800c4fa: 4313 orrs r3, r2 800c4fc: 62cb str r3, [r1, #44] @ 0x2c /* Disable PLL2FRACN . */ __HAL_RCC_PLL2FRACN_DISABLE(); 800c4fe: 4b27 ldr r3, [pc, #156] @ (800c59c ) 800c500: 6adb ldr r3, [r3, #44] @ 0x2c 800c502: 4a26 ldr r2, [pc, #152] @ (800c59c ) 800c504: f023 0310 bic.w r3, r3, #16 800c508: 62d3 str r3, [r2, #44] @ 0x2c /* Configures PLL2 clock Fractional Part Of The Multiplication Factor */ __HAL_RCC_PLL2FRACN_CONFIG(pll2->PLL2FRACN); 800c50a: 4b24 ldr r3, [pc, #144] @ (800c59c ) 800c50c: 6bda ldr r2, [r3, #60] @ 0x3c 800c50e: 4b24 ldr r3, [pc, #144] @ (800c5a0 ) 800c510: 4013 ands r3, r2 800c512: 687a ldr r2, [r7, #4] 800c514: 69d2 ldr r2, [r2, #28] 800c516: 00d2 lsls r2, r2, #3 800c518: 4920 ldr r1, [pc, #128] @ (800c59c ) 800c51a: 4313 orrs r3, r2 800c51c: 63cb str r3, [r1, #60] @ 0x3c /* Enable PLL2FRACN . */ __HAL_RCC_PLL2FRACN_ENABLE(); 800c51e: 4b1f ldr r3, [pc, #124] @ (800c59c ) 800c520: 6adb ldr r3, [r3, #44] @ 0x2c 800c522: 4a1e ldr r2, [pc, #120] @ (800c59c ) 800c524: f043 0310 orr.w r3, r3, #16 800c528: 62d3 str r3, [r2, #44] @ 0x2c /* Enable the PLL2 clock output */ if (Divider == DIVIDER_P_UPDATE) 800c52a: 683b ldr r3, [r7, #0] 800c52c: 2b00 cmp r3, #0 800c52e: d106 bne.n 800c53e { __HAL_RCC_PLL2CLKOUT_ENABLE(RCC_PLL2_DIVP); 800c530: 4b1a ldr r3, [pc, #104] @ (800c59c ) 800c532: 6adb ldr r3, [r3, #44] @ 0x2c 800c534: 4a19 ldr r2, [pc, #100] @ (800c59c ) 800c536: f443 2300 orr.w r3, r3, #524288 @ 0x80000 800c53a: 62d3 str r3, [r2, #44] @ 0x2c 800c53c: e00f b.n 800c55e } else if (Divider == DIVIDER_Q_UPDATE) 800c53e: 683b ldr r3, [r7, #0] 800c540: 2b01 cmp r3, #1 800c542: d106 bne.n 800c552 { __HAL_RCC_PLL2CLKOUT_ENABLE(RCC_PLL2_DIVQ); 800c544: 4b15 ldr r3, [pc, #84] @ (800c59c ) 800c546: 6adb ldr r3, [r3, #44] @ 0x2c 800c548: 4a14 ldr r2, [pc, #80] @ (800c59c ) 800c54a: f443 1380 orr.w r3, r3, #1048576 @ 0x100000 800c54e: 62d3 str r3, [r2, #44] @ 0x2c 800c550: e005 b.n 800c55e } else { __HAL_RCC_PLL2CLKOUT_ENABLE(RCC_PLL2_DIVR); 800c552: 4b12 ldr r3, [pc, #72] @ (800c59c ) 800c554: 6adb ldr r3, [r3, #44] @ 0x2c 800c556: 4a11 ldr r2, [pc, #68] @ (800c59c ) 800c558: f443 1300 orr.w r3, r3, #2097152 @ 0x200000 800c55c: 62d3 str r3, [r2, #44] @ 0x2c } /* Enable PLL2. */ __HAL_RCC_PLL2_ENABLE(); 800c55e: 4b0f ldr r3, [pc, #60] @ (800c59c ) 800c560: 681b ldr r3, [r3, #0] 800c562: 4a0e ldr r2, [pc, #56] @ (800c59c ) 800c564: f043 6380 orr.w r3, r3, #67108864 @ 0x4000000 800c568: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800c56a: f7f8 fd61 bl 8005030 800c56e: 60b8 str r0, [r7, #8] /* Wait till PLL2 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL2RDY) == 0U) 800c570: e008 b.n 800c584 { if ((HAL_GetTick() - tickstart) > PLL2_TIMEOUT_VALUE) 800c572: f7f8 fd5d bl 8005030 800c576: 4602 mov r2, r0 800c578: 68bb ldr r3, [r7, #8] 800c57a: 1ad3 subs r3, r2, r3 800c57c: 2b02 cmp r3, #2 800c57e: d901 bls.n 800c584 { return HAL_TIMEOUT; 800c580: 2303 movs r3, #3 800c582: e006 b.n 800c592 while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL2RDY) == 0U) 800c584: 4b05 ldr r3, [pc, #20] @ (800c59c ) 800c586: 681b ldr r3, [r3, #0] 800c588: f003 6300 and.w r3, r3, #134217728 @ 0x8000000 800c58c: 2b00 cmp r3, #0 800c58e: d0f0 beq.n 800c572 } } return status; 800c590: 7bfb ldrb r3, [r7, #15] } 800c592: 4618 mov r0, r3 800c594: 3710 adds r7, #16 800c596: 46bd mov sp, r7 800c598: bd80 pop {r7, pc} 800c59a: bf00 nop 800c59c: 58024400 .word 0x58024400 800c5a0: ffff0007 .word 0xffff0007 0800c5a4 : * @note PLL3 is temporary disabled to apply new parameters * * @retval HAL status */ static HAL_StatusTypeDef RCCEx_PLL3_Config(RCC_PLL3InitTypeDef *pll3, uint32_t Divider) { 800c5a4: b580 push {r7, lr} 800c5a6: b084 sub sp, #16 800c5a8: af00 add r7, sp, #0 800c5aa: 6078 str r0, [r7, #4] 800c5ac: 6039 str r1, [r7, #0] uint32_t tickstart; HAL_StatusTypeDef status = HAL_OK; 800c5ae: 2300 movs r3, #0 800c5b0: 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) 800c5b2: 4b53 ldr r3, [pc, #332] @ (800c700 ) 800c5b4: 6a9b ldr r3, [r3, #40] @ 0x28 800c5b6: f003 0303 and.w r3, r3, #3 800c5ba: 2b03 cmp r3, #3 800c5bc: d101 bne.n 800c5c2 { return HAL_ERROR; 800c5be: 2301 movs r3, #1 800c5c0: e099 b.n 800c6f6 else { /* Disable PLL3. */ __HAL_RCC_PLL3_DISABLE(); 800c5c2: 4b4f ldr r3, [pc, #316] @ (800c700 ) 800c5c4: 681b ldr r3, [r3, #0] 800c5c6: 4a4e ldr r2, [pc, #312] @ (800c700 ) 800c5c8: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000 800c5cc: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800c5ce: f7f8 fd2f bl 8005030 800c5d2: 60b8 str r0, [r7, #8] /* Wait till PLL3 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL3RDY) != 0U) 800c5d4: e008 b.n 800c5e8 { if ((HAL_GetTick() - tickstart) > PLL3_TIMEOUT_VALUE) 800c5d6: f7f8 fd2b bl 8005030 800c5da: 4602 mov r2, r0 800c5dc: 68bb ldr r3, [r7, #8] 800c5de: 1ad3 subs r3, r2, r3 800c5e0: 2b02 cmp r3, #2 800c5e2: d901 bls.n 800c5e8 { return HAL_TIMEOUT; 800c5e4: 2303 movs r3, #3 800c5e6: e086 b.n 800c6f6 while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL3RDY) != 0U) 800c5e8: 4b45 ldr r3, [pc, #276] @ (800c700 ) 800c5ea: 681b ldr r3, [r3, #0] 800c5ec: f003 5300 and.w r3, r3, #536870912 @ 0x20000000 800c5f0: 2b00 cmp r3, #0 800c5f2: d1f0 bne.n 800c5d6 } } /* Configure the PLL3 multiplication and division factors. */ __HAL_RCC_PLL3_CONFIG(pll3->PLL3M, 800c5f4: 4b42 ldr r3, [pc, #264] @ (800c700 ) 800c5f6: 6a9b ldr r3, [r3, #40] @ 0x28 800c5f8: f023 727c bic.w r2, r3, #66060288 @ 0x3f00000 800c5fc: 687b ldr r3, [r7, #4] 800c5fe: 681b ldr r3, [r3, #0] 800c600: 051b lsls r3, r3, #20 800c602: 493f ldr r1, [pc, #252] @ (800c700 ) 800c604: 4313 orrs r3, r2 800c606: 628b str r3, [r1, #40] @ 0x28 800c608: 687b ldr r3, [r7, #4] 800c60a: 685b ldr r3, [r3, #4] 800c60c: 3b01 subs r3, #1 800c60e: f3c3 0208 ubfx r2, r3, #0, #9 800c612: 687b ldr r3, [r7, #4] 800c614: 689b ldr r3, [r3, #8] 800c616: 3b01 subs r3, #1 800c618: 025b lsls r3, r3, #9 800c61a: b29b uxth r3, r3 800c61c: 431a orrs r2, r3 800c61e: 687b ldr r3, [r7, #4] 800c620: 68db ldr r3, [r3, #12] 800c622: 3b01 subs r3, #1 800c624: 041b lsls r3, r3, #16 800c626: f403 03fe and.w r3, r3, #8323072 @ 0x7f0000 800c62a: 431a orrs r2, r3 800c62c: 687b ldr r3, [r7, #4] 800c62e: 691b ldr r3, [r3, #16] 800c630: 3b01 subs r3, #1 800c632: 061b lsls r3, r3, #24 800c634: f003 43fe and.w r3, r3, #2130706432 @ 0x7f000000 800c638: 4931 ldr r1, [pc, #196] @ (800c700 ) 800c63a: 4313 orrs r3, r2 800c63c: 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) ; 800c63e: 4b30 ldr r3, [pc, #192] @ (800c700 ) 800c640: 6adb ldr r3, [r3, #44] @ 0x2c 800c642: f423 6240 bic.w r2, r3, #3072 @ 0xc00 800c646: 687b ldr r3, [r7, #4] 800c648: 695b ldr r3, [r3, #20] 800c64a: 492d ldr r1, [pc, #180] @ (800c700 ) 800c64c: 4313 orrs r3, r2 800c64e: 62cb str r3, [r1, #44] @ 0x2c /* Select PLL3 output frequency range : VCO */ __HAL_RCC_PLL3_VCORANGE(pll3->PLL3VCOSEL) ; 800c650: 4b2b ldr r3, [pc, #172] @ (800c700 ) 800c652: 6adb ldr r3, [r3, #44] @ 0x2c 800c654: f423 7200 bic.w r2, r3, #512 @ 0x200 800c658: 687b ldr r3, [r7, #4] 800c65a: 699b ldr r3, [r3, #24] 800c65c: 4928 ldr r1, [pc, #160] @ (800c700 ) 800c65e: 4313 orrs r3, r2 800c660: 62cb str r3, [r1, #44] @ 0x2c /* Disable PLL3FRACN . */ __HAL_RCC_PLL3FRACN_DISABLE(); 800c662: 4b27 ldr r3, [pc, #156] @ (800c700 ) 800c664: 6adb ldr r3, [r3, #44] @ 0x2c 800c666: 4a26 ldr r2, [pc, #152] @ (800c700 ) 800c668: f423 7380 bic.w r3, r3, #256 @ 0x100 800c66c: 62d3 str r3, [r2, #44] @ 0x2c /* Configures PLL3 clock Fractional Part Of The Multiplication Factor */ __HAL_RCC_PLL3FRACN_CONFIG(pll3->PLL3FRACN); 800c66e: 4b24 ldr r3, [pc, #144] @ (800c700 ) 800c670: 6c5a ldr r2, [r3, #68] @ 0x44 800c672: 4b24 ldr r3, [pc, #144] @ (800c704 ) 800c674: 4013 ands r3, r2 800c676: 687a ldr r2, [r7, #4] 800c678: 69d2 ldr r2, [r2, #28] 800c67a: 00d2 lsls r2, r2, #3 800c67c: 4920 ldr r1, [pc, #128] @ (800c700 ) 800c67e: 4313 orrs r3, r2 800c680: 644b str r3, [r1, #68] @ 0x44 /* Enable PLL3FRACN . */ __HAL_RCC_PLL3FRACN_ENABLE(); 800c682: 4b1f ldr r3, [pc, #124] @ (800c700 ) 800c684: 6adb ldr r3, [r3, #44] @ 0x2c 800c686: 4a1e ldr r2, [pc, #120] @ (800c700 ) 800c688: f443 7380 orr.w r3, r3, #256 @ 0x100 800c68c: 62d3 str r3, [r2, #44] @ 0x2c /* Enable the PLL3 clock output */ if (Divider == DIVIDER_P_UPDATE) 800c68e: 683b ldr r3, [r7, #0] 800c690: 2b00 cmp r3, #0 800c692: d106 bne.n 800c6a2 { __HAL_RCC_PLL3CLKOUT_ENABLE(RCC_PLL3_DIVP); 800c694: 4b1a ldr r3, [pc, #104] @ (800c700 ) 800c696: 6adb ldr r3, [r3, #44] @ 0x2c 800c698: 4a19 ldr r2, [pc, #100] @ (800c700 ) 800c69a: f443 0380 orr.w r3, r3, #4194304 @ 0x400000 800c69e: 62d3 str r3, [r2, #44] @ 0x2c 800c6a0: e00f b.n 800c6c2 } else if (Divider == DIVIDER_Q_UPDATE) 800c6a2: 683b ldr r3, [r7, #0] 800c6a4: 2b01 cmp r3, #1 800c6a6: d106 bne.n 800c6b6 { __HAL_RCC_PLL3CLKOUT_ENABLE(RCC_PLL3_DIVQ); 800c6a8: 4b15 ldr r3, [pc, #84] @ (800c700 ) 800c6aa: 6adb ldr r3, [r3, #44] @ 0x2c 800c6ac: 4a14 ldr r2, [pc, #80] @ (800c700 ) 800c6ae: f443 0300 orr.w r3, r3, #8388608 @ 0x800000 800c6b2: 62d3 str r3, [r2, #44] @ 0x2c 800c6b4: e005 b.n 800c6c2 } else { __HAL_RCC_PLL3CLKOUT_ENABLE(RCC_PLL3_DIVR); 800c6b6: 4b12 ldr r3, [pc, #72] @ (800c700 ) 800c6b8: 6adb ldr r3, [r3, #44] @ 0x2c 800c6ba: 4a11 ldr r2, [pc, #68] @ (800c700 ) 800c6bc: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000 800c6c0: 62d3 str r3, [r2, #44] @ 0x2c } /* Enable PLL3. */ __HAL_RCC_PLL3_ENABLE(); 800c6c2: 4b0f ldr r3, [pc, #60] @ (800c700 ) 800c6c4: 681b ldr r3, [r3, #0] 800c6c6: 4a0e ldr r2, [pc, #56] @ (800c700 ) 800c6c8: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000 800c6cc: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800c6ce: f7f8 fcaf bl 8005030 800c6d2: 60b8 str r0, [r7, #8] /* Wait till PLL3 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL3RDY) == 0U) 800c6d4: e008 b.n 800c6e8 { if ((HAL_GetTick() - tickstart) > PLL3_TIMEOUT_VALUE) 800c6d6: f7f8 fcab bl 8005030 800c6da: 4602 mov r2, r0 800c6dc: 68bb ldr r3, [r7, #8] 800c6de: 1ad3 subs r3, r2, r3 800c6e0: 2b02 cmp r3, #2 800c6e2: d901 bls.n 800c6e8 { return HAL_TIMEOUT; 800c6e4: 2303 movs r3, #3 800c6e6: e006 b.n 800c6f6 while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL3RDY) == 0U) 800c6e8: 4b05 ldr r3, [pc, #20] @ (800c700 ) 800c6ea: 681b ldr r3, [r3, #0] 800c6ec: f003 5300 and.w r3, r3, #536870912 @ 0x20000000 800c6f0: 2b00 cmp r3, #0 800c6f2: d0f0 beq.n 800c6d6 } } return status; 800c6f4: 7bfb ldrb r3, [r7, #15] } 800c6f6: 4618 mov r0, r3 800c6f8: 3710 adds r7, #16 800c6fa: 46bd mov sp, r7 800c6fc: bd80 pop {r7, pc} 800c6fe: bf00 nop 800c700: 58024400 .word 0x58024400 800c704: ffff0007 .word 0xffff0007 0800c708 : * @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) { 800c708: b580 push {r7, lr} 800c70a: b084 sub sp, #16 800c70c: af00 add r7, sp, #0 800c70e: 6078 str r0, [r7, #4] uint32_t tickstart; /* Check the RNG handle allocation */ if (hrng == NULL) 800c710: 687b ldr r3, [r7, #4] 800c712: 2b00 cmp r3, #0 800c714: d101 bne.n 800c71a { return HAL_ERROR; 800c716: 2301 movs r3, #1 800c718: e054 b.n 800c7c4 /* Init the low level hardware */ hrng->MspInitCallback(hrng); } #else if (hrng->State == HAL_RNG_STATE_RESET) 800c71a: 687b ldr r3, [r7, #4] 800c71c: 7a5b ldrb r3, [r3, #9] 800c71e: b2db uxtb r3, r3 800c720: 2b00 cmp r3, #0 800c722: d105 bne.n 800c730 { /* Allocate lock resource and initialize it */ hrng->Lock = HAL_UNLOCKED; 800c724: 687b ldr r3, [r7, #4] 800c726: 2200 movs r2, #0 800c728: 721a strb r2, [r3, #8] /* Init the low level hardware */ HAL_RNG_MspInit(hrng); 800c72a: 6878 ldr r0, [r7, #4] 800c72c: f7f6 fe2e bl 800338c } #endif /* USE_HAL_RNG_REGISTER_CALLBACKS */ /* Change RNG peripheral state */ hrng->State = HAL_RNG_STATE_BUSY; 800c730: 687b ldr r3, [r7, #4] 800c732: 2202 movs r2, #2 800c734: 725a strb r2, [r3, #9] } } } #else /* Clock Error Detection Configuration */ MODIFY_REG(hrng->Instance->CR, RNG_CR_CED, hrng->Init.ClockErrorDetection); 800c736: 687b ldr r3, [r7, #4] 800c738: 681b ldr r3, [r3, #0] 800c73a: 681b ldr r3, [r3, #0] 800c73c: f023 0120 bic.w r1, r3, #32 800c740: 687b ldr r3, [r7, #4] 800c742: 685a ldr r2, [r3, #4] 800c744: 687b ldr r3, [r7, #4] 800c746: 681b ldr r3, [r3, #0] 800c748: 430a orrs r2, r1 800c74a: 601a str r2, [r3, #0] #endif /* RNG_CR_CONDRST */ /* Enable the RNG Peripheral */ __HAL_RNG_ENABLE(hrng); 800c74c: 687b ldr r3, [r7, #4] 800c74e: 681b ldr r3, [r3, #0] 800c750: 681a ldr r2, [r3, #0] 800c752: 687b ldr r3, [r7, #4] 800c754: 681b ldr r3, [r3, #0] 800c756: f042 0204 orr.w r2, r2, #4 800c75a: 601a str r2, [r3, #0] /* verify that no seed error */ if (__HAL_RNG_GET_IT(hrng, RNG_IT_SEI) != RESET) 800c75c: 687b ldr r3, [r7, #4] 800c75e: 681b ldr r3, [r3, #0] 800c760: 685b ldr r3, [r3, #4] 800c762: f003 0340 and.w r3, r3, #64 @ 0x40 800c766: 2b40 cmp r3, #64 @ 0x40 800c768: d104 bne.n 800c774 { hrng->State = HAL_RNG_STATE_ERROR; 800c76a: 687b ldr r3, [r7, #4] 800c76c: 2204 movs r2, #4 800c76e: 725a strb r2, [r3, #9] return HAL_ERROR; 800c770: 2301 movs r3, #1 800c772: e027 b.n 800c7c4 } /* Get tick */ tickstart = HAL_GetTick(); 800c774: f7f8 fc5c bl 8005030 800c778: 60f8 str r0, [r7, #12] /* Check if data register contains valid random data */ while (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_SECS) != RESET) 800c77a: e015 b.n 800c7a8 { if ((HAL_GetTick() - tickstart) > RNG_TIMEOUT_VALUE) 800c77c: f7f8 fc58 bl 8005030 800c780: 4602 mov r2, r0 800c782: 68fb ldr r3, [r7, #12] 800c784: 1ad3 subs r3, r2, r3 800c786: 2b02 cmp r3, #2 800c788: d90e bls.n 800c7a8 { /* New check to avoid false timeout detection in case of preemption */ if (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_SECS) != RESET) 800c78a: 687b ldr r3, [r7, #4] 800c78c: 681b ldr r3, [r3, #0] 800c78e: 685b ldr r3, [r3, #4] 800c790: f003 0304 and.w r3, r3, #4 800c794: 2b04 cmp r3, #4 800c796: d107 bne.n 800c7a8 { hrng->State = HAL_RNG_STATE_ERROR; 800c798: 687b ldr r3, [r7, #4] 800c79a: 2204 movs r2, #4 800c79c: 725a strb r2, [r3, #9] hrng->ErrorCode = HAL_RNG_ERROR_TIMEOUT; 800c79e: 687b ldr r3, [r7, #4] 800c7a0: 2202 movs r2, #2 800c7a2: 60da str r2, [r3, #12] return HAL_ERROR; 800c7a4: 2301 movs r3, #1 800c7a6: e00d b.n 800c7c4 while (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_SECS) != RESET) 800c7a8: 687b ldr r3, [r7, #4] 800c7aa: 681b ldr r3, [r3, #0] 800c7ac: 685b ldr r3, [r3, #4] 800c7ae: f003 0304 and.w r3, r3, #4 800c7b2: 2b04 cmp r3, #4 800c7b4: d0e2 beq.n 800c77c } } } /* Initialize the RNG state */ hrng->State = HAL_RNG_STATE_READY; 800c7b6: 687b ldr r3, [r7, #4] 800c7b8: 2201 movs r2, #1 800c7ba: 725a strb r2, [r3, #9] /* Initialise the error code */ hrng->ErrorCode = HAL_RNG_ERROR_NONE; 800c7bc: 687b ldr r3, [r7, #4] 800c7be: 2200 movs r2, #0 800c7c0: 60da str r2, [r3, #12] /* Return function status */ return HAL_OK; 800c7c2: 2300 movs r3, #0 } 800c7c4: 4618 mov r0, r3 800c7c6: 3710 adds r7, #16 800c7c8: 46bd mov sp, r7 800c7ca: bd80 pop {r7, pc} 0800c7cc : * @param random32bit pointer to generated random number variable if successful. * @retval HAL status */ HAL_StatusTypeDef HAL_RNG_GenerateRandomNumber(RNG_HandleTypeDef *hrng, uint32_t *random32bit) { 800c7cc: b580 push {r7, lr} 800c7ce: b084 sub sp, #16 800c7d0: af00 add r7, sp, #0 800c7d2: 6078 str r0, [r7, #4] 800c7d4: 6039 str r1, [r7, #0] uint32_t tickstart; HAL_StatusTypeDef status = HAL_OK; 800c7d6: 2300 movs r3, #0 800c7d8: 73fb strb r3, [r7, #15] /* Process Locked */ __HAL_LOCK(hrng); 800c7da: 687b ldr r3, [r7, #4] 800c7dc: 7a1b ldrb r3, [r3, #8] 800c7de: 2b01 cmp r3, #1 800c7e0: d101 bne.n 800c7e6 800c7e2: 2302 movs r3, #2 800c7e4: e044 b.n 800c870 800c7e6: 687b ldr r3, [r7, #4] 800c7e8: 2201 movs r2, #1 800c7ea: 721a strb r2, [r3, #8] /* Check RNG peripheral state */ if (hrng->State == HAL_RNG_STATE_READY) 800c7ec: 687b ldr r3, [r7, #4] 800c7ee: 7a5b ldrb r3, [r3, #9] 800c7f0: b2db uxtb r3, r3 800c7f2: 2b01 cmp r3, #1 800c7f4: d133 bne.n 800c85e { /* Change RNG peripheral state */ hrng->State = HAL_RNG_STATE_BUSY; 800c7f6: 687b ldr r3, [r7, #4] 800c7f8: 2202 movs r2, #2 800c7fa: 725a strb r2, [r3, #9] } } #endif /* RNG_CR_CONDRST */ /* Get tick */ tickstart = HAL_GetTick(); 800c7fc: f7f8 fc18 bl 8005030 800c800: 60b8 str r0, [r7, #8] /* Check if data register contains valid random data */ while (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_DRDY) == RESET) 800c802: e018 b.n 800c836 { if ((HAL_GetTick() - tickstart) > RNG_TIMEOUT_VALUE) 800c804: f7f8 fc14 bl 8005030 800c808: 4602 mov r2, r0 800c80a: 68bb ldr r3, [r7, #8] 800c80c: 1ad3 subs r3, r2, r3 800c80e: 2b02 cmp r3, #2 800c810: d911 bls.n 800c836 { /* New check to avoid false timeout detection in case of preemption */ if (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_DRDY) == RESET) 800c812: 687b ldr r3, [r7, #4] 800c814: 681b ldr r3, [r3, #0] 800c816: 685b ldr r3, [r3, #4] 800c818: f003 0301 and.w r3, r3, #1 800c81c: 2b01 cmp r3, #1 800c81e: d00a beq.n 800c836 { hrng->State = HAL_RNG_STATE_READY; 800c820: 687b ldr r3, [r7, #4] 800c822: 2201 movs r2, #1 800c824: 725a strb r2, [r3, #9] hrng->ErrorCode = HAL_RNG_ERROR_TIMEOUT; 800c826: 687b ldr r3, [r7, #4] 800c828: 2202 movs r2, #2 800c82a: 60da str r2, [r3, #12] /* Process Unlocked */ __HAL_UNLOCK(hrng); 800c82c: 687b ldr r3, [r7, #4] 800c82e: 2200 movs r2, #0 800c830: 721a strb r2, [r3, #8] return HAL_ERROR; 800c832: 2301 movs r3, #1 800c834: e01c b.n 800c870 while (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_DRDY) == RESET) 800c836: 687b ldr r3, [r7, #4] 800c838: 681b ldr r3, [r3, #0] 800c83a: 685b ldr r3, [r3, #4] 800c83c: f003 0301 and.w r3, r3, #1 800c840: 2b01 cmp r3, #1 800c842: d1df bne.n 800c804 } } } /* Get a 32bit Random number */ hrng->RandomNumber = hrng->Instance->DR; 800c844: 687b ldr r3, [r7, #4] 800c846: 681b ldr r3, [r3, #0] 800c848: 689a ldr r2, [r3, #8] 800c84a: 687b ldr r3, [r7, #4] 800c84c: 611a str r2, [r3, #16] else /* No seed error */ { *random32bit = hrng->RandomNumber; } #else *random32bit = hrng->RandomNumber; 800c84e: 687b ldr r3, [r7, #4] 800c850: 691a ldr r2, [r3, #16] 800c852: 683b ldr r3, [r7, #0] 800c854: 601a str r2, [r3, #0] #endif /* RNG_CR_CONDRST */ hrng->State = HAL_RNG_STATE_READY; 800c856: 687b ldr r3, [r7, #4] 800c858: 2201 movs r2, #1 800c85a: 725a strb r2, [r3, #9] 800c85c: e004 b.n 800c868 } else { hrng->ErrorCode = HAL_RNG_ERROR_BUSY; 800c85e: 687b ldr r3, [r7, #4] 800c860: 2204 movs r2, #4 800c862: 60da str r2, [r3, #12] status = HAL_ERROR; 800c864: 2301 movs r3, #1 800c866: 73fb strb r3, [r7, #15] } /* Process Unlocked */ __HAL_UNLOCK(hrng); 800c868: 687b ldr r3, [r7, #4] 800c86a: 2200 movs r2, #0 800c86c: 721a strb r2, [r3, #8] return status; 800c86e: 7bfb ldrb r3, [r7, #15] } 800c870: 4618 mov r0, r3 800c872: 3710 adds r7, #16 800c874: 46bd mov sp, r7 800c876: bd80 pop {r7, pc} 0800c878 : * 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) { 800c878: b580 push {r7, lr} 800c87a: b082 sub sp, #8 800c87c: af00 add r7, sp, #0 800c87e: 6078 str r0, [r7, #4] /* Check the TIM handle allocation */ if (htim == NULL) 800c880: 687b ldr r3, [r7, #4] 800c882: 2b00 cmp r3, #0 800c884: d101 bne.n 800c88a { return HAL_ERROR; 800c886: 2301 movs r3, #1 800c888: e049 b.n 800c91e 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) 800c88a: 687b ldr r3, [r7, #4] 800c88c: f893 303d ldrb.w r3, [r3, #61] @ 0x3d 800c890: b2db uxtb r3, r3 800c892: 2b00 cmp r3, #0 800c894: d106 bne.n 800c8a4 { /* Allocate lock resource and initialize it */ htim->Lock = HAL_UNLOCKED; 800c896: 687b ldr r3, [r7, #4] 800c898: 2200 movs r2, #0 800c89a: 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); 800c89e: 6878 ldr r0, [r7, #4] 800c8a0: f000 f841 bl 800c926 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } /* Set the TIM state */ htim->State = HAL_TIM_STATE_BUSY; 800c8a4: 687b ldr r3, [r7, #4] 800c8a6: 2202 movs r2, #2 800c8a8: f883 203d strb.w r2, [r3, #61] @ 0x3d /* Set the Time Base configuration */ TIM_Base_SetConfig(htim->Instance, &htim->Init); 800c8ac: 687b ldr r3, [r7, #4] 800c8ae: 681a ldr r2, [r3, #0] 800c8b0: 687b ldr r3, [r7, #4] 800c8b2: 3304 adds r3, #4 800c8b4: 4619 mov r1, r3 800c8b6: 4610 mov r0, r2 800c8b8: f000 f9e8 bl 800cc8c /* Initialize the DMA burst operation state */ htim->DMABurstState = HAL_DMA_BURST_STATE_READY; 800c8bc: 687b ldr r3, [r7, #4] 800c8be: 2201 movs r2, #1 800c8c0: f883 2048 strb.w r2, [r3, #72] @ 0x48 /* Initialize the TIM channels state */ TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); 800c8c4: 687b ldr r3, [r7, #4] 800c8c6: 2201 movs r2, #1 800c8c8: f883 203e strb.w r2, [r3, #62] @ 0x3e 800c8cc: 687b ldr r3, [r7, #4] 800c8ce: 2201 movs r2, #1 800c8d0: f883 203f strb.w r2, [r3, #63] @ 0x3f 800c8d4: 687b ldr r3, [r7, #4] 800c8d6: 2201 movs r2, #1 800c8d8: f883 2040 strb.w r2, [r3, #64] @ 0x40 800c8dc: 687b ldr r3, [r7, #4] 800c8de: 2201 movs r2, #1 800c8e0: f883 2041 strb.w r2, [r3, #65] @ 0x41 800c8e4: 687b ldr r3, [r7, #4] 800c8e6: 2201 movs r2, #1 800c8e8: f883 2042 strb.w r2, [r3, #66] @ 0x42 800c8ec: 687b ldr r3, [r7, #4] 800c8ee: 2201 movs r2, #1 800c8f0: f883 2043 strb.w r2, [r3, #67] @ 0x43 TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); 800c8f4: 687b ldr r3, [r7, #4] 800c8f6: 2201 movs r2, #1 800c8f8: f883 2044 strb.w r2, [r3, #68] @ 0x44 800c8fc: 687b ldr r3, [r7, #4] 800c8fe: 2201 movs r2, #1 800c900: f883 2045 strb.w r2, [r3, #69] @ 0x45 800c904: 687b ldr r3, [r7, #4] 800c906: 2201 movs r2, #1 800c908: f883 2046 strb.w r2, [r3, #70] @ 0x46 800c90c: 687b ldr r3, [r7, #4] 800c90e: 2201 movs r2, #1 800c910: f883 2047 strb.w r2, [r3, #71] @ 0x47 /* Initialize the TIM state*/ htim->State = HAL_TIM_STATE_READY; 800c914: 687b ldr r3, [r7, #4] 800c916: 2201 movs r2, #1 800c918: f883 203d strb.w r2, [r3, #61] @ 0x3d return HAL_OK; 800c91c: 2300 movs r3, #0 } 800c91e: 4618 mov r0, r3 800c920: 3708 adds r7, #8 800c922: 46bd mov sp, r7 800c924: bd80 pop {r7, pc} 0800c926 : * @brief Initializes the TIM Base MSP. * @param htim TIM Base handle * @retval None */ __weak void HAL_TIM_Base_MspInit(TIM_HandleTypeDef *htim) { 800c926: b480 push {r7} 800c928: b083 sub sp, #12 800c92a: af00 add r7, sp, #0 800c92c: 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 */ } 800c92e: bf00 nop 800c930: 370c adds r7, #12 800c932: 46bd mov sp, r7 800c934: f85d 7b04 ldr.w r7, [sp], #4 800c938: 4770 bx lr ... 0800c93c : * @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) { 800c93c: b480 push {r7} 800c93e: b085 sub sp, #20 800c940: af00 add r7, sp, #0 800c942: 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) 800c944: 687b ldr r3, [r7, #4] 800c946: f893 303d ldrb.w r3, [r3, #61] @ 0x3d 800c94a: b2db uxtb r3, r3 800c94c: 2b01 cmp r3, #1 800c94e: d001 beq.n 800c954 { return HAL_ERROR; 800c950: 2301 movs r3, #1 800c952: e054 b.n 800c9fe } /* Set the TIM state */ htim->State = HAL_TIM_STATE_BUSY; 800c954: 687b ldr r3, [r7, #4] 800c956: 2202 movs r2, #2 800c958: f883 203d strb.w r2, [r3, #61] @ 0x3d /* Enable the TIM Update interrupt */ __HAL_TIM_ENABLE_IT(htim, TIM_IT_UPDATE); 800c95c: 687b ldr r3, [r7, #4] 800c95e: 681b ldr r3, [r3, #0] 800c960: 68da ldr r2, [r3, #12] 800c962: 687b ldr r3, [r7, #4] 800c964: 681b ldr r3, [r3, #0] 800c966: f042 0201 orr.w r2, r2, #1 800c96a: 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)) 800c96c: 687b ldr r3, [r7, #4] 800c96e: 681b ldr r3, [r3, #0] 800c970: 4a26 ldr r2, [pc, #152] @ (800ca0c ) 800c972: 4293 cmp r3, r2 800c974: d022 beq.n 800c9bc 800c976: 687b ldr r3, [r7, #4] 800c978: 681b ldr r3, [r3, #0] 800c97a: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800c97e: d01d beq.n 800c9bc 800c980: 687b ldr r3, [r7, #4] 800c982: 681b ldr r3, [r3, #0] 800c984: 4a22 ldr r2, [pc, #136] @ (800ca10 ) 800c986: 4293 cmp r3, r2 800c988: d018 beq.n 800c9bc 800c98a: 687b ldr r3, [r7, #4] 800c98c: 681b ldr r3, [r3, #0] 800c98e: 4a21 ldr r2, [pc, #132] @ (800ca14 ) 800c990: 4293 cmp r3, r2 800c992: d013 beq.n 800c9bc 800c994: 687b ldr r3, [r7, #4] 800c996: 681b ldr r3, [r3, #0] 800c998: 4a1f ldr r2, [pc, #124] @ (800ca18 ) 800c99a: 4293 cmp r3, r2 800c99c: d00e beq.n 800c9bc 800c99e: 687b ldr r3, [r7, #4] 800c9a0: 681b ldr r3, [r3, #0] 800c9a2: 4a1e ldr r2, [pc, #120] @ (800ca1c ) 800c9a4: 4293 cmp r3, r2 800c9a6: d009 beq.n 800c9bc 800c9a8: 687b ldr r3, [r7, #4] 800c9aa: 681b ldr r3, [r3, #0] 800c9ac: 4a1c ldr r2, [pc, #112] @ (800ca20 ) 800c9ae: 4293 cmp r3, r2 800c9b0: d004 beq.n 800c9bc 800c9b2: 687b ldr r3, [r7, #4] 800c9b4: 681b ldr r3, [r3, #0] 800c9b6: 4a1b ldr r2, [pc, #108] @ (800ca24 ) 800c9b8: 4293 cmp r3, r2 800c9ba: d115 bne.n 800c9e8 { tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS; 800c9bc: 687b ldr r3, [r7, #4] 800c9be: 681b ldr r3, [r3, #0] 800c9c0: 689a ldr r2, [r3, #8] 800c9c2: 4b19 ldr r3, [pc, #100] @ (800ca28 ) 800c9c4: 4013 ands r3, r2 800c9c6: 60fb str r3, [r7, #12] if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr)) 800c9c8: 68fb ldr r3, [r7, #12] 800c9ca: 2b06 cmp r3, #6 800c9cc: d015 beq.n 800c9fa 800c9ce: 68fb ldr r3, [r7, #12] 800c9d0: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800c9d4: d011 beq.n 800c9fa { __HAL_TIM_ENABLE(htim); 800c9d6: 687b ldr r3, [r7, #4] 800c9d8: 681b ldr r3, [r3, #0] 800c9da: 681a ldr r2, [r3, #0] 800c9dc: 687b ldr r3, [r7, #4] 800c9de: 681b ldr r3, [r3, #0] 800c9e0: f042 0201 orr.w r2, r2, #1 800c9e4: 601a str r2, [r3, #0] if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr)) 800c9e6: e008 b.n 800c9fa } } else { __HAL_TIM_ENABLE(htim); 800c9e8: 687b ldr r3, [r7, #4] 800c9ea: 681b ldr r3, [r3, #0] 800c9ec: 681a ldr r2, [r3, #0] 800c9ee: 687b ldr r3, [r7, #4] 800c9f0: 681b ldr r3, [r3, #0] 800c9f2: f042 0201 orr.w r2, r2, #1 800c9f6: 601a str r2, [r3, #0] 800c9f8: e000 b.n 800c9fc if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr)) 800c9fa: bf00 nop } /* Return function status */ return HAL_OK; 800c9fc: 2300 movs r3, #0 } 800c9fe: 4618 mov r0, r3 800ca00: 3714 adds r7, #20 800ca02: 46bd mov sp, r7 800ca04: f85d 7b04 ldr.w r7, [sp], #4 800ca08: 4770 bx lr 800ca0a: bf00 nop 800ca0c: 40010000 .word 0x40010000 800ca10: 40000400 .word 0x40000400 800ca14: 40000800 .word 0x40000800 800ca18: 40000c00 .word 0x40000c00 800ca1c: 40010400 .word 0x40010400 800ca20: 40001800 .word 0x40001800 800ca24: 40014000 .word 0x40014000 800ca28: 00010007 .word 0x00010007 0800ca2c : * @brief This function handles TIM interrupts requests. * @param htim TIM handle * @retval None */ void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim) { 800ca2c: b580 push {r7, lr} 800ca2e: b084 sub sp, #16 800ca30: af00 add r7, sp, #0 800ca32: 6078 str r0, [r7, #4] uint32_t itsource = htim->Instance->DIER; 800ca34: 687b ldr r3, [r7, #4] 800ca36: 681b ldr r3, [r3, #0] 800ca38: 68db ldr r3, [r3, #12] 800ca3a: 60fb str r3, [r7, #12] uint32_t itflag = htim->Instance->SR; 800ca3c: 687b ldr r3, [r7, #4] 800ca3e: 681b ldr r3, [r3, #0] 800ca40: 691b ldr r3, [r3, #16] 800ca42: 60bb str r3, [r7, #8] /* Capture compare 1 event */ if ((itflag & (TIM_FLAG_CC1)) == (TIM_FLAG_CC1)) 800ca44: 68bb ldr r3, [r7, #8] 800ca46: f003 0302 and.w r3, r3, #2 800ca4a: 2b00 cmp r3, #0 800ca4c: d020 beq.n 800ca90 { if ((itsource & (TIM_IT_CC1)) == (TIM_IT_CC1)) 800ca4e: 68fb ldr r3, [r7, #12] 800ca50: f003 0302 and.w r3, r3, #2 800ca54: 2b00 cmp r3, #0 800ca56: d01b beq.n 800ca90 { { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC1); 800ca58: 687b ldr r3, [r7, #4] 800ca5a: 681b ldr r3, [r3, #0] 800ca5c: f06f 0202 mvn.w r2, #2 800ca60: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1; 800ca62: 687b ldr r3, [r7, #4] 800ca64: 2201 movs r2, #1 800ca66: 771a strb r2, [r3, #28] /* Input capture event */ if ((htim->Instance->CCMR1 & TIM_CCMR1_CC1S) != 0x00U) 800ca68: 687b ldr r3, [r7, #4] 800ca6a: 681b ldr r3, [r3, #0] 800ca6c: 699b ldr r3, [r3, #24] 800ca6e: f003 0303 and.w r3, r3, #3 800ca72: 2b00 cmp r3, #0 800ca74: d003 beq.n 800ca7e { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->IC_CaptureCallback(htim); #else HAL_TIM_IC_CaptureCallback(htim); 800ca76: 6878 ldr r0, [r7, #4] 800ca78: f000 f8e9 bl 800cc4e 800ca7c: e005 b.n 800ca8a { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->OC_DelayElapsedCallback(htim); htim->PWM_PulseFinishedCallback(htim); #else HAL_TIM_OC_DelayElapsedCallback(htim); 800ca7e: 6878 ldr r0, [r7, #4] 800ca80: f000 f8db bl 800cc3a HAL_TIM_PWM_PulseFinishedCallback(htim); 800ca84: 6878 ldr r0, [r7, #4] 800ca86: f000 f8ec bl 800cc62 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 800ca8a: 687b ldr r3, [r7, #4] 800ca8c: 2200 movs r2, #0 800ca8e: 771a strb r2, [r3, #28] } } } /* Capture compare 2 event */ if ((itflag & (TIM_FLAG_CC2)) == (TIM_FLAG_CC2)) 800ca90: 68bb ldr r3, [r7, #8] 800ca92: f003 0304 and.w r3, r3, #4 800ca96: 2b00 cmp r3, #0 800ca98: d020 beq.n 800cadc { if ((itsource & (TIM_IT_CC2)) == (TIM_IT_CC2)) 800ca9a: 68fb ldr r3, [r7, #12] 800ca9c: f003 0304 and.w r3, r3, #4 800caa0: 2b00 cmp r3, #0 800caa2: d01b beq.n 800cadc { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC2); 800caa4: 687b ldr r3, [r7, #4] 800caa6: 681b ldr r3, [r3, #0] 800caa8: f06f 0204 mvn.w r2, #4 800caac: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2; 800caae: 687b ldr r3, [r7, #4] 800cab0: 2202 movs r2, #2 800cab2: 771a strb r2, [r3, #28] /* Input capture event */ if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U) 800cab4: 687b ldr r3, [r7, #4] 800cab6: 681b ldr r3, [r3, #0] 800cab8: 699b ldr r3, [r3, #24] 800caba: f403 7340 and.w r3, r3, #768 @ 0x300 800cabe: 2b00 cmp r3, #0 800cac0: d003 beq.n 800caca { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->IC_CaptureCallback(htim); #else HAL_TIM_IC_CaptureCallback(htim); 800cac2: 6878 ldr r0, [r7, #4] 800cac4: f000 f8c3 bl 800cc4e 800cac8: e005 b.n 800cad6 { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->OC_DelayElapsedCallback(htim); htim->PWM_PulseFinishedCallback(htim); #else HAL_TIM_OC_DelayElapsedCallback(htim); 800caca: 6878 ldr r0, [r7, #4] 800cacc: f000 f8b5 bl 800cc3a HAL_TIM_PWM_PulseFinishedCallback(htim); 800cad0: 6878 ldr r0, [r7, #4] 800cad2: f000 f8c6 bl 800cc62 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 800cad6: 687b ldr r3, [r7, #4] 800cad8: 2200 movs r2, #0 800cada: 771a strb r2, [r3, #28] } } /* Capture compare 3 event */ if ((itflag & (TIM_FLAG_CC3)) == (TIM_FLAG_CC3)) 800cadc: 68bb ldr r3, [r7, #8] 800cade: f003 0308 and.w r3, r3, #8 800cae2: 2b00 cmp r3, #0 800cae4: d020 beq.n 800cb28 { if ((itsource & (TIM_IT_CC3)) == (TIM_IT_CC3)) 800cae6: 68fb ldr r3, [r7, #12] 800cae8: f003 0308 and.w r3, r3, #8 800caec: 2b00 cmp r3, #0 800caee: d01b beq.n 800cb28 { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC3); 800caf0: 687b ldr r3, [r7, #4] 800caf2: 681b ldr r3, [r3, #0] 800caf4: f06f 0208 mvn.w r2, #8 800caf8: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3; 800cafa: 687b ldr r3, [r7, #4] 800cafc: 2204 movs r2, #4 800cafe: 771a strb r2, [r3, #28] /* Input capture event */ if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U) 800cb00: 687b ldr r3, [r7, #4] 800cb02: 681b ldr r3, [r3, #0] 800cb04: 69db ldr r3, [r3, #28] 800cb06: f003 0303 and.w r3, r3, #3 800cb0a: 2b00 cmp r3, #0 800cb0c: d003 beq.n 800cb16 { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->IC_CaptureCallback(htim); #else HAL_TIM_IC_CaptureCallback(htim); 800cb0e: 6878 ldr r0, [r7, #4] 800cb10: f000 f89d bl 800cc4e 800cb14: e005 b.n 800cb22 { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->OC_DelayElapsedCallback(htim); htim->PWM_PulseFinishedCallback(htim); #else HAL_TIM_OC_DelayElapsedCallback(htim); 800cb16: 6878 ldr r0, [r7, #4] 800cb18: f000 f88f bl 800cc3a HAL_TIM_PWM_PulseFinishedCallback(htim); 800cb1c: 6878 ldr r0, [r7, #4] 800cb1e: f000 f8a0 bl 800cc62 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 800cb22: 687b ldr r3, [r7, #4] 800cb24: 2200 movs r2, #0 800cb26: 771a strb r2, [r3, #28] } } /* Capture compare 4 event */ if ((itflag & (TIM_FLAG_CC4)) == (TIM_FLAG_CC4)) 800cb28: 68bb ldr r3, [r7, #8] 800cb2a: f003 0310 and.w r3, r3, #16 800cb2e: 2b00 cmp r3, #0 800cb30: d020 beq.n 800cb74 { if ((itsource & (TIM_IT_CC4)) == (TIM_IT_CC4)) 800cb32: 68fb ldr r3, [r7, #12] 800cb34: f003 0310 and.w r3, r3, #16 800cb38: 2b00 cmp r3, #0 800cb3a: d01b beq.n 800cb74 { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC4); 800cb3c: 687b ldr r3, [r7, #4] 800cb3e: 681b ldr r3, [r3, #0] 800cb40: f06f 0210 mvn.w r2, #16 800cb44: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4; 800cb46: 687b ldr r3, [r7, #4] 800cb48: 2208 movs r2, #8 800cb4a: 771a strb r2, [r3, #28] /* Input capture event */ if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U) 800cb4c: 687b ldr r3, [r7, #4] 800cb4e: 681b ldr r3, [r3, #0] 800cb50: 69db ldr r3, [r3, #28] 800cb52: f403 7340 and.w r3, r3, #768 @ 0x300 800cb56: 2b00 cmp r3, #0 800cb58: d003 beq.n 800cb62 { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->IC_CaptureCallback(htim); #else HAL_TIM_IC_CaptureCallback(htim); 800cb5a: 6878 ldr r0, [r7, #4] 800cb5c: f000 f877 bl 800cc4e 800cb60: e005 b.n 800cb6e { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->OC_DelayElapsedCallback(htim); htim->PWM_PulseFinishedCallback(htim); #else HAL_TIM_OC_DelayElapsedCallback(htim); 800cb62: 6878 ldr r0, [r7, #4] 800cb64: f000 f869 bl 800cc3a HAL_TIM_PWM_PulseFinishedCallback(htim); 800cb68: 6878 ldr r0, [r7, #4] 800cb6a: f000 f87a bl 800cc62 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 800cb6e: 687b ldr r3, [r7, #4] 800cb70: 2200 movs r2, #0 800cb72: 771a strb r2, [r3, #28] } } /* TIM Update event */ if ((itflag & (TIM_FLAG_UPDATE)) == (TIM_FLAG_UPDATE)) 800cb74: 68bb ldr r3, [r7, #8] 800cb76: f003 0301 and.w r3, r3, #1 800cb7a: 2b00 cmp r3, #0 800cb7c: d00c beq.n 800cb98 { if ((itsource & (TIM_IT_UPDATE)) == (TIM_IT_UPDATE)) 800cb7e: 68fb ldr r3, [r7, #12] 800cb80: f003 0301 and.w r3, r3, #1 800cb84: 2b00 cmp r3, #0 800cb86: d007 beq.n 800cb98 { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_UPDATE); 800cb88: 687b ldr r3, [r7, #4] 800cb8a: 681b ldr r3, [r3, #0] 800cb8c: f06f 0201 mvn.w r2, #1 800cb90: 611a str r2, [r3, #16] #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->PeriodElapsedCallback(htim); #else HAL_TIM_PeriodElapsedCallback(htim); 800cb92: 6878 ldr r0, [r7, #4] 800cb94: f7f5 fc9a bl 80024cc #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } } /* TIM Break input event */ if (((itflag & (TIM_FLAG_BREAK)) == (TIM_FLAG_BREAK)) || \ 800cb98: 68bb ldr r3, [r7, #8] 800cb9a: f003 0380 and.w r3, r3, #128 @ 0x80 800cb9e: 2b00 cmp r3, #0 800cba0: d104 bne.n 800cbac ((itflag & (TIM_FLAG_SYSTEM_BREAK)) == (TIM_FLAG_SYSTEM_BREAK))) 800cba2: 68bb ldr r3, [r7, #8] 800cba4: f403 5300 and.w r3, r3, #8192 @ 0x2000 if (((itflag & (TIM_FLAG_BREAK)) == (TIM_FLAG_BREAK)) || \ 800cba8: 2b00 cmp r3, #0 800cbaa: d00c beq.n 800cbc6 { if ((itsource & (TIM_IT_BREAK)) == (TIM_IT_BREAK)) 800cbac: 68fb ldr r3, [r7, #12] 800cbae: f003 0380 and.w r3, r3, #128 @ 0x80 800cbb2: 2b00 cmp r3, #0 800cbb4: d007 beq.n 800cbc6 { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_BREAK | TIM_FLAG_SYSTEM_BREAK); 800cbb6: 687b ldr r3, [r7, #4] 800cbb8: 681b ldr r3, [r3, #0] 800cbba: f46f 5202 mvn.w r2, #8320 @ 0x2080 800cbbe: 611a str r2, [r3, #16] #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->BreakCallback(htim); #else HAL_TIMEx_BreakCallback(htim); 800cbc0: 6878 ldr r0, [r7, #4] 800cbc2: f000 f913 bl 800cdec #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } } /* TIM Break2 input event */ if ((itflag & (TIM_FLAG_BREAK2)) == (TIM_FLAG_BREAK2)) 800cbc6: 68bb ldr r3, [r7, #8] 800cbc8: f403 7380 and.w r3, r3, #256 @ 0x100 800cbcc: 2b00 cmp r3, #0 800cbce: d00c beq.n 800cbea { if ((itsource & (TIM_IT_BREAK)) == (TIM_IT_BREAK)) 800cbd0: 68fb ldr r3, [r7, #12] 800cbd2: f003 0380 and.w r3, r3, #128 @ 0x80 800cbd6: 2b00 cmp r3, #0 800cbd8: d007 beq.n 800cbea { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_BREAK2); 800cbda: 687b ldr r3, [r7, #4] 800cbdc: 681b ldr r3, [r3, #0] 800cbde: f46f 7280 mvn.w r2, #256 @ 0x100 800cbe2: 611a str r2, [r3, #16] #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->Break2Callback(htim); #else HAL_TIMEx_Break2Callback(htim); 800cbe4: 6878 ldr r0, [r7, #4] 800cbe6: f000 f90b bl 800ce00 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } } /* TIM Trigger detection event */ if ((itflag & (TIM_FLAG_TRIGGER)) == (TIM_FLAG_TRIGGER)) 800cbea: 68bb ldr r3, [r7, #8] 800cbec: f003 0340 and.w r3, r3, #64 @ 0x40 800cbf0: 2b00 cmp r3, #0 800cbf2: d00c beq.n 800cc0e { if ((itsource & (TIM_IT_TRIGGER)) == (TIM_IT_TRIGGER)) 800cbf4: 68fb ldr r3, [r7, #12] 800cbf6: f003 0340 and.w r3, r3, #64 @ 0x40 800cbfa: 2b00 cmp r3, #0 800cbfc: d007 beq.n 800cc0e { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_TRIGGER); 800cbfe: 687b ldr r3, [r7, #4] 800cc00: 681b ldr r3, [r3, #0] 800cc02: f06f 0240 mvn.w r2, #64 @ 0x40 800cc06: 611a str r2, [r3, #16] #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->TriggerCallback(htim); #else HAL_TIM_TriggerCallback(htim); 800cc08: 6878 ldr r0, [r7, #4] 800cc0a: f000 f834 bl 800cc76 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } } /* TIM commutation event */ if ((itflag & (TIM_FLAG_COM)) == (TIM_FLAG_COM)) 800cc0e: 68bb ldr r3, [r7, #8] 800cc10: f003 0320 and.w r3, r3, #32 800cc14: 2b00 cmp r3, #0 800cc16: d00c beq.n 800cc32 { if ((itsource & (TIM_IT_COM)) == (TIM_IT_COM)) 800cc18: 68fb ldr r3, [r7, #12] 800cc1a: f003 0320 and.w r3, r3, #32 800cc1e: 2b00 cmp r3, #0 800cc20: d007 beq.n 800cc32 { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_COM); 800cc22: 687b ldr r3, [r7, #4] 800cc24: 681b ldr r3, [r3, #0] 800cc26: f06f 0220 mvn.w r2, #32 800cc2a: 611a str r2, [r3, #16] #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->CommutationCallback(htim); #else HAL_TIMEx_CommutCallback(htim); 800cc2c: 6878 ldr r0, [r7, #4] 800cc2e: f000 f8d3 bl 800cdd8 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } } } 800cc32: bf00 nop 800cc34: 3710 adds r7, #16 800cc36: 46bd mov sp, r7 800cc38: bd80 pop {r7, pc} 0800cc3a : * @brief Output Compare callback in non-blocking mode * @param htim TIM OC handle * @retval None */ __weak void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef *htim) { 800cc3a: b480 push {r7} 800cc3c: b083 sub sp, #12 800cc3e: af00 add r7, sp, #0 800cc40: 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 */ } 800cc42: bf00 nop 800cc44: 370c adds r7, #12 800cc46: 46bd mov sp, r7 800cc48: f85d 7b04 ldr.w r7, [sp], #4 800cc4c: 4770 bx lr 0800cc4e : * @brief Input Capture callback in non-blocking mode * @param htim TIM IC handle * @retval None */ __weak void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim) { 800cc4e: b480 push {r7} 800cc50: b083 sub sp, #12 800cc52: af00 add r7, sp, #0 800cc54: 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 */ } 800cc56: bf00 nop 800cc58: 370c adds r7, #12 800cc5a: 46bd mov sp, r7 800cc5c: f85d 7b04 ldr.w r7, [sp], #4 800cc60: 4770 bx lr 0800cc62 : * @brief PWM Pulse finished callback in non-blocking mode * @param htim TIM handle * @retval None */ __weak void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim) { 800cc62: b480 push {r7} 800cc64: b083 sub sp, #12 800cc66: af00 add r7, sp, #0 800cc68: 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 */ } 800cc6a: bf00 nop 800cc6c: 370c adds r7, #12 800cc6e: 46bd mov sp, r7 800cc70: f85d 7b04 ldr.w r7, [sp], #4 800cc74: 4770 bx lr 0800cc76 : * @brief Hall Trigger detection callback in non-blocking mode * @param htim TIM handle * @retval None */ __weak void HAL_TIM_TriggerCallback(TIM_HandleTypeDef *htim) { 800cc76: b480 push {r7} 800cc78: b083 sub sp, #12 800cc7a: af00 add r7, sp, #0 800cc7c: 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 */ } 800cc7e: bf00 nop 800cc80: 370c adds r7, #12 800cc82: 46bd mov sp, r7 800cc84: f85d 7b04 ldr.w r7, [sp], #4 800cc88: 4770 bx lr ... 0800cc8c : * @param TIMx TIM peripheral * @param Structure TIM Base configuration structure * @retval None */ void TIM_Base_SetConfig(TIM_TypeDef *TIMx, const TIM_Base_InitTypeDef *Structure) { 800cc8c: b480 push {r7} 800cc8e: b085 sub sp, #20 800cc90: af00 add r7, sp, #0 800cc92: 6078 str r0, [r7, #4] 800cc94: 6039 str r1, [r7, #0] uint32_t tmpcr1; tmpcr1 = TIMx->CR1; 800cc96: 687b ldr r3, [r7, #4] 800cc98: 681b ldr r3, [r3, #0] 800cc9a: 60fb str r3, [r7, #12] /* Set TIM Time Base Unit parameters ---------------------------------------*/ if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx)) 800cc9c: 687b ldr r3, [r7, #4] 800cc9e: 4a46 ldr r2, [pc, #280] @ (800cdb8 ) 800cca0: 4293 cmp r3, r2 800cca2: d013 beq.n 800cccc 800cca4: 687b ldr r3, [r7, #4] 800cca6: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800ccaa: d00f beq.n 800cccc 800ccac: 687b ldr r3, [r7, #4] 800ccae: 4a43 ldr r2, [pc, #268] @ (800cdbc ) 800ccb0: 4293 cmp r3, r2 800ccb2: d00b beq.n 800cccc 800ccb4: 687b ldr r3, [r7, #4] 800ccb6: 4a42 ldr r2, [pc, #264] @ (800cdc0 ) 800ccb8: 4293 cmp r3, r2 800ccba: d007 beq.n 800cccc 800ccbc: 687b ldr r3, [r7, #4] 800ccbe: 4a41 ldr r2, [pc, #260] @ (800cdc4 ) 800ccc0: 4293 cmp r3, r2 800ccc2: d003 beq.n 800cccc 800ccc4: 687b ldr r3, [r7, #4] 800ccc6: 4a40 ldr r2, [pc, #256] @ (800cdc8 ) 800ccc8: 4293 cmp r3, r2 800ccca: d108 bne.n 800ccde { /* Select the Counter Mode */ tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS); 800cccc: 68fb ldr r3, [r7, #12] 800ccce: f023 0370 bic.w r3, r3, #112 @ 0x70 800ccd2: 60fb str r3, [r7, #12] tmpcr1 |= Structure->CounterMode; 800ccd4: 683b ldr r3, [r7, #0] 800ccd6: 685b ldr r3, [r3, #4] 800ccd8: 68fa ldr r2, [r7, #12] 800ccda: 4313 orrs r3, r2 800ccdc: 60fb str r3, [r7, #12] } if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx)) 800ccde: 687b ldr r3, [r7, #4] 800cce0: 4a35 ldr r2, [pc, #212] @ (800cdb8 ) 800cce2: 4293 cmp r3, r2 800cce4: d01f beq.n 800cd26 800cce6: 687b ldr r3, [r7, #4] 800cce8: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800ccec: d01b beq.n 800cd26 800ccee: 687b ldr r3, [r7, #4] 800ccf0: 4a32 ldr r2, [pc, #200] @ (800cdbc ) 800ccf2: 4293 cmp r3, r2 800ccf4: d017 beq.n 800cd26 800ccf6: 687b ldr r3, [r7, #4] 800ccf8: 4a31 ldr r2, [pc, #196] @ (800cdc0 ) 800ccfa: 4293 cmp r3, r2 800ccfc: d013 beq.n 800cd26 800ccfe: 687b ldr r3, [r7, #4] 800cd00: 4a30 ldr r2, [pc, #192] @ (800cdc4 ) 800cd02: 4293 cmp r3, r2 800cd04: d00f beq.n 800cd26 800cd06: 687b ldr r3, [r7, #4] 800cd08: 4a2f ldr r2, [pc, #188] @ (800cdc8 ) 800cd0a: 4293 cmp r3, r2 800cd0c: d00b beq.n 800cd26 800cd0e: 687b ldr r3, [r7, #4] 800cd10: 4a2e ldr r2, [pc, #184] @ (800cdcc ) 800cd12: 4293 cmp r3, r2 800cd14: d007 beq.n 800cd26 800cd16: 687b ldr r3, [r7, #4] 800cd18: 4a2d ldr r2, [pc, #180] @ (800cdd0 ) 800cd1a: 4293 cmp r3, r2 800cd1c: d003 beq.n 800cd26 800cd1e: 687b ldr r3, [r7, #4] 800cd20: 4a2c ldr r2, [pc, #176] @ (800cdd4 ) 800cd22: 4293 cmp r3, r2 800cd24: d108 bne.n 800cd38 { /* Set the clock division */ tmpcr1 &= ~TIM_CR1_CKD; 800cd26: 68fb ldr r3, [r7, #12] 800cd28: f423 7340 bic.w r3, r3, #768 @ 0x300 800cd2c: 60fb str r3, [r7, #12] tmpcr1 |= (uint32_t)Structure->ClockDivision; 800cd2e: 683b ldr r3, [r7, #0] 800cd30: 68db ldr r3, [r3, #12] 800cd32: 68fa ldr r2, [r7, #12] 800cd34: 4313 orrs r3, r2 800cd36: 60fb str r3, [r7, #12] } /* Set the auto-reload preload */ MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload); 800cd38: 68fb ldr r3, [r7, #12] 800cd3a: f023 0280 bic.w r2, r3, #128 @ 0x80 800cd3e: 683b ldr r3, [r7, #0] 800cd40: 695b ldr r3, [r3, #20] 800cd42: 4313 orrs r3, r2 800cd44: 60fb str r3, [r7, #12] TIMx->CR1 = tmpcr1; 800cd46: 687b ldr r3, [r7, #4] 800cd48: 68fa ldr r2, [r7, #12] 800cd4a: 601a str r2, [r3, #0] /* Set the Autoreload value */ TIMx->ARR = (uint32_t)Structure->Period ; 800cd4c: 683b ldr r3, [r7, #0] 800cd4e: 689a ldr r2, [r3, #8] 800cd50: 687b ldr r3, [r7, #4] 800cd52: 62da str r2, [r3, #44] @ 0x2c /* Set the Prescaler value */ TIMx->PSC = Structure->Prescaler; 800cd54: 683b ldr r3, [r7, #0] 800cd56: 681a ldr r2, [r3, #0] 800cd58: 687b ldr r3, [r7, #4] 800cd5a: 629a str r2, [r3, #40] @ 0x28 if (IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx)) 800cd5c: 687b ldr r3, [r7, #4] 800cd5e: 4a16 ldr r2, [pc, #88] @ (800cdb8 ) 800cd60: 4293 cmp r3, r2 800cd62: d00f beq.n 800cd84 800cd64: 687b ldr r3, [r7, #4] 800cd66: 4a18 ldr r2, [pc, #96] @ (800cdc8 ) 800cd68: 4293 cmp r3, r2 800cd6a: d00b beq.n 800cd84 800cd6c: 687b ldr r3, [r7, #4] 800cd6e: 4a17 ldr r2, [pc, #92] @ (800cdcc ) 800cd70: 4293 cmp r3, r2 800cd72: d007 beq.n 800cd84 800cd74: 687b ldr r3, [r7, #4] 800cd76: 4a16 ldr r2, [pc, #88] @ (800cdd0 ) 800cd78: 4293 cmp r3, r2 800cd7a: d003 beq.n 800cd84 800cd7c: 687b ldr r3, [r7, #4] 800cd7e: 4a15 ldr r2, [pc, #84] @ (800cdd4 ) 800cd80: 4293 cmp r3, r2 800cd82: d103 bne.n 800cd8c { /* Set the Repetition Counter value */ TIMx->RCR = Structure->RepetitionCounter; 800cd84: 683b ldr r3, [r7, #0] 800cd86: 691a ldr r2, [r3, #16] 800cd88: 687b ldr r3, [r7, #4] 800cd8a: 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; 800cd8c: 687b ldr r3, [r7, #4] 800cd8e: 2201 movs r2, #1 800cd90: 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)) 800cd92: 687b ldr r3, [r7, #4] 800cd94: 691b ldr r3, [r3, #16] 800cd96: f003 0301 and.w r3, r3, #1 800cd9a: 2b01 cmp r3, #1 800cd9c: d105 bne.n 800cdaa { /* Clear the update flag */ CLEAR_BIT(TIMx->SR, TIM_FLAG_UPDATE); 800cd9e: 687b ldr r3, [r7, #4] 800cda0: 691b ldr r3, [r3, #16] 800cda2: f023 0201 bic.w r2, r3, #1 800cda6: 687b ldr r3, [r7, #4] 800cda8: 611a str r2, [r3, #16] } } 800cdaa: bf00 nop 800cdac: 3714 adds r7, #20 800cdae: 46bd mov sp, r7 800cdb0: f85d 7b04 ldr.w r7, [sp], #4 800cdb4: 4770 bx lr 800cdb6: bf00 nop 800cdb8: 40010000 .word 0x40010000 800cdbc: 40000400 .word 0x40000400 800cdc0: 40000800 .word 0x40000800 800cdc4: 40000c00 .word 0x40000c00 800cdc8: 40010400 .word 0x40010400 800cdcc: 40014000 .word 0x40014000 800cdd0: 40014400 .word 0x40014400 800cdd4: 40014800 .word 0x40014800 0800cdd8 : * @brief Commutation callback in non-blocking mode * @param htim TIM handle * @retval None */ __weak void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim) { 800cdd8: b480 push {r7} 800cdda: b083 sub sp, #12 800cddc: af00 add r7, sp, #0 800cdde: 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 */ } 800cde0: bf00 nop 800cde2: 370c adds r7, #12 800cde4: 46bd mov sp, r7 800cde6: f85d 7b04 ldr.w r7, [sp], #4 800cdea: 4770 bx lr 0800cdec : * @brief Break detection callback in non-blocking mode * @param htim TIM handle * @retval None */ __weak void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim) { 800cdec: b480 push {r7} 800cdee: b083 sub sp, #12 800cdf0: af00 add r7, sp, #0 800cdf2: 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 */ } 800cdf4: bf00 nop 800cdf6: 370c adds r7, #12 800cdf8: 46bd mov sp, r7 800cdfa: f85d 7b04 ldr.w r7, [sp], #4 800cdfe: 4770 bx lr 0800ce00 : * @brief Break2 detection callback in non blocking mode * @param htim: TIM handle * @retval None */ __weak void HAL_TIMEx_Break2Callback(TIM_HandleTypeDef *htim) { 800ce00: b480 push {r7} 800ce02: b083 sub sp, #12 800ce04: af00 add r7, sp, #0 800ce06: 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 */ } 800ce08: bf00 nop 800ce0a: 370c adds r7, #12 800ce0c: 46bd mov sp, r7 800ce0e: f85d 7b04 ldr.w r7, [sp], #4 800ce12: 4770 bx lr 0800ce14 : * 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) { 800ce14: b580 push {r7, lr} 800ce16: b082 sub sp, #8 800ce18: af00 add r7, sp, #0 800ce1a: 6078 str r0, [r7, #4] /* Check the UART handle allocation */ if (huart == NULL) 800ce1c: 687b ldr r3, [r7, #4] 800ce1e: 2b00 cmp r3, #0 800ce20: d101 bne.n 800ce26 { return HAL_ERROR; 800ce22: 2301 movs r3, #1 800ce24: e042 b.n 800ceac { /* Check the parameters */ assert_param((IS_UART_INSTANCE(huart->Instance)) || (IS_LPUART_INSTANCE(huart->Instance))); } if (huart->gState == HAL_UART_STATE_RESET) 800ce26: 687b ldr r3, [r7, #4] 800ce28: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800ce2c: 2b00 cmp r3, #0 800ce2e: d106 bne.n 800ce3e { /* Allocate lock resource and initialize it */ huart->Lock = HAL_UNLOCKED; 800ce30: 687b ldr r3, [r7, #4] 800ce32: 2200 movs r2, #0 800ce34: 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); 800ce38: 6878 ldr r0, [r7, #4] 800ce3a: f7f6 fae1 bl 8003400 #endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */ } huart->gState = HAL_UART_STATE_BUSY; 800ce3e: 687b ldr r3, [r7, #4] 800ce40: 2224 movs r2, #36 @ 0x24 800ce42: f8c3 2088 str.w r2, [r3, #136] @ 0x88 __HAL_UART_DISABLE(huart); 800ce46: 687b ldr r3, [r7, #4] 800ce48: 681b ldr r3, [r3, #0] 800ce4a: 681a ldr r2, [r3, #0] 800ce4c: 687b ldr r3, [r7, #4] 800ce4e: 681b ldr r3, [r3, #0] 800ce50: f022 0201 bic.w r2, r2, #1 800ce54: 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) 800ce56: 687b ldr r3, [r7, #4] 800ce58: 6a9b ldr r3, [r3, #40] @ 0x28 800ce5a: 2b00 cmp r3, #0 800ce5c: d002 beq.n 800ce64 { UART_AdvFeatureConfig(huart); 800ce5e: 6878 ldr r0, [r7, #4] 800ce60: f001 f9e8 bl 800e234 } /* Set the UART Communication parameters */ if (UART_SetConfig(huart) == HAL_ERROR) 800ce64: 6878 ldr r0, [r7, #4] 800ce66: f000 fc7d bl 800d764 800ce6a: 4603 mov r3, r0 800ce6c: 2b01 cmp r3, #1 800ce6e: d101 bne.n 800ce74 { return HAL_ERROR; 800ce70: 2301 movs r3, #1 800ce72: e01b b.n 800ceac } /* 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)); 800ce74: 687b ldr r3, [r7, #4] 800ce76: 681b ldr r3, [r3, #0] 800ce78: 685a ldr r2, [r3, #4] 800ce7a: 687b ldr r3, [r7, #4] 800ce7c: 681b ldr r3, [r3, #0] 800ce7e: f422 4290 bic.w r2, r2, #18432 @ 0x4800 800ce82: 605a str r2, [r3, #4] CLEAR_BIT(huart->Instance->CR3, (USART_CR3_SCEN | USART_CR3_HDSEL | USART_CR3_IREN)); 800ce84: 687b ldr r3, [r7, #4] 800ce86: 681b ldr r3, [r3, #0] 800ce88: 689a ldr r2, [r3, #8] 800ce8a: 687b ldr r3, [r7, #4] 800ce8c: 681b ldr r3, [r3, #0] 800ce8e: f022 022a bic.w r2, r2, #42 @ 0x2a 800ce92: 609a str r2, [r3, #8] __HAL_UART_ENABLE(huart); 800ce94: 687b ldr r3, [r7, #4] 800ce96: 681b ldr r3, [r3, #0] 800ce98: 681a ldr r2, [r3, #0] 800ce9a: 687b ldr r3, [r7, #4] 800ce9c: 681b ldr r3, [r3, #0] 800ce9e: f042 0201 orr.w r2, r2, #1 800cea2: 601a str r2, [r3, #0] /* TEACK and/or REACK to check before moving huart->gState and huart->RxState to Ready */ return (UART_CheckIdleState(huart)); 800cea4: 6878 ldr r0, [r7, #4] 800cea6: f001 fa67 bl 800e378 800ceaa: 4603 mov r3, r0 } 800ceac: 4618 mov r0, r3 800ceae: 3708 adds r7, #8 800ceb0: 46bd mov sp, r7 800ceb2: bd80 pop {r7, pc} 0800ceb4 : * @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) { 800ceb4: b480 push {r7} 800ceb6: b091 sub sp, #68 @ 0x44 800ceb8: af00 add r7, sp, #0 800ceba: 60f8 str r0, [r7, #12] 800cebc: 60b9 str r1, [r7, #8] 800cebe: 4613 mov r3, r2 800cec0: 80fb strh r3, [r7, #6] /* Check that a Tx process is not already ongoing */ if (huart->gState == HAL_UART_STATE_READY) 800cec2: 68fb ldr r3, [r7, #12] 800cec4: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800cec8: 2b20 cmp r3, #32 800ceca: d178 bne.n 800cfbe { if ((pData == NULL) || (Size == 0U)) 800cecc: 68bb ldr r3, [r7, #8] 800cece: 2b00 cmp r3, #0 800ced0: d002 beq.n 800ced8 800ced2: 88fb ldrh r3, [r7, #6] 800ced4: 2b00 cmp r3, #0 800ced6: d101 bne.n 800cedc { return HAL_ERROR; 800ced8: 2301 movs r3, #1 800ceda: e071 b.n 800cfc0 } huart->pTxBuffPtr = pData; 800cedc: 68fb ldr r3, [r7, #12] 800cede: 68ba ldr r2, [r7, #8] 800cee0: 651a str r2, [r3, #80] @ 0x50 huart->TxXferSize = Size; 800cee2: 68fb ldr r3, [r7, #12] 800cee4: 88fa ldrh r2, [r7, #6] 800cee6: f8a3 2054 strh.w r2, [r3, #84] @ 0x54 huart->TxXferCount = Size; 800ceea: 68fb ldr r3, [r7, #12] 800ceec: 88fa ldrh r2, [r7, #6] 800ceee: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 huart->TxISR = NULL; 800cef2: 68fb ldr r3, [r7, #12] 800cef4: 2200 movs r2, #0 800cef6: 679a str r2, [r3, #120] @ 0x78 huart->ErrorCode = HAL_UART_ERROR_NONE; 800cef8: 68fb ldr r3, [r7, #12] 800cefa: 2200 movs r2, #0 800cefc: f8c3 2090 str.w r2, [r3, #144] @ 0x90 huart->gState = HAL_UART_STATE_BUSY_TX; 800cf00: 68fb ldr r3, [r7, #12] 800cf02: 2221 movs r2, #33 @ 0x21 800cf04: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Configure Tx interrupt processing */ if (huart->FifoMode == UART_FIFOMODE_ENABLE) 800cf08: 68fb ldr r3, [r7, #12] 800cf0a: 6e5b ldr r3, [r3, #100] @ 0x64 800cf0c: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800cf10: d12a bne.n 800cf68 { /* 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)) 800cf12: 68fb ldr r3, [r7, #12] 800cf14: 689b ldr r3, [r3, #8] 800cf16: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800cf1a: d107 bne.n 800cf2c 800cf1c: 68fb ldr r3, [r7, #12] 800cf1e: 691b ldr r3, [r3, #16] 800cf20: 2b00 cmp r3, #0 800cf22: d103 bne.n 800cf2c { huart->TxISR = UART_TxISR_16BIT_FIFOEN; 800cf24: 68fb ldr r3, [r7, #12] 800cf26: 4a29 ldr r2, [pc, #164] @ (800cfcc ) 800cf28: 679a str r2, [r3, #120] @ 0x78 800cf2a: e002 b.n 800cf32 } else { huart->TxISR = UART_TxISR_8BIT_FIFOEN; 800cf2c: 68fb ldr r3, [r7, #12] 800cf2e: 4a28 ldr r2, [pc, #160] @ (800cfd0 ) 800cf30: 679a str r2, [r3, #120] @ 0x78 } /* Enable the TX FIFO threshold interrupt */ ATOMIC_SET_BIT(huart->Instance->CR3, USART_CR3_TXFTIE); 800cf32: 68fb ldr r3, [r7, #12] 800cf34: 681b ldr r3, [r3, #0] 800cf36: 3308 adds r3, #8 800cf38: 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) ); 800cf3a: 6abb ldr r3, [r7, #40] @ 0x28 800cf3c: e853 3f00 ldrex r3, [r3] 800cf40: 627b str r3, [r7, #36] @ 0x24 return(result); 800cf42: 6a7b ldr r3, [r7, #36] @ 0x24 800cf44: f443 0300 orr.w r3, r3, #8388608 @ 0x800000 800cf48: 63bb str r3, [r7, #56] @ 0x38 800cf4a: 68fb ldr r3, [r7, #12] 800cf4c: 681b ldr r3, [r3, #0] 800cf4e: 3308 adds r3, #8 800cf50: 6bba ldr r2, [r7, #56] @ 0x38 800cf52: 637a str r2, [r7, #52] @ 0x34 800cf54: 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) ); 800cf56: 6b39 ldr r1, [r7, #48] @ 0x30 800cf58: 6b7a ldr r2, [r7, #52] @ 0x34 800cf5a: e841 2300 strex r3, r2, [r1] 800cf5e: 62fb str r3, [r7, #44] @ 0x2c return(result); 800cf60: 6afb ldr r3, [r7, #44] @ 0x2c 800cf62: 2b00 cmp r3, #0 800cf64: d1e5 bne.n 800cf32 800cf66: e028 b.n 800cfba } 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)) 800cf68: 68fb ldr r3, [r7, #12] 800cf6a: 689b ldr r3, [r3, #8] 800cf6c: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800cf70: d107 bne.n 800cf82 800cf72: 68fb ldr r3, [r7, #12] 800cf74: 691b ldr r3, [r3, #16] 800cf76: 2b00 cmp r3, #0 800cf78: d103 bne.n 800cf82 { huart->TxISR = UART_TxISR_16BIT; 800cf7a: 68fb ldr r3, [r7, #12] 800cf7c: 4a15 ldr r2, [pc, #84] @ (800cfd4 ) 800cf7e: 679a str r2, [r3, #120] @ 0x78 800cf80: e002 b.n 800cf88 } else { huart->TxISR = UART_TxISR_8BIT; 800cf82: 68fb ldr r3, [r7, #12] 800cf84: 4a14 ldr r2, [pc, #80] @ (800cfd8 ) 800cf86: 679a str r2, [r3, #120] @ 0x78 } /* Enable the Transmit Data Register Empty interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TXEIE_TXFNFIE); 800cf88: 68fb ldr r3, [r7, #12] 800cf8a: 681b ldr r3, [r3, #0] 800cf8c: 617b str r3, [r7, #20] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800cf8e: 697b ldr r3, [r7, #20] 800cf90: e853 3f00 ldrex r3, [r3] 800cf94: 613b str r3, [r7, #16] return(result); 800cf96: 693b ldr r3, [r7, #16] 800cf98: f043 0380 orr.w r3, r3, #128 @ 0x80 800cf9c: 63fb str r3, [r7, #60] @ 0x3c 800cf9e: 68fb ldr r3, [r7, #12] 800cfa0: 681b ldr r3, [r3, #0] 800cfa2: 461a mov r2, r3 800cfa4: 6bfb ldr r3, [r7, #60] @ 0x3c 800cfa6: 623b str r3, [r7, #32] 800cfa8: 61fa str r2, [r7, #28] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800cfaa: 69f9 ldr r1, [r7, #28] 800cfac: 6a3a ldr r2, [r7, #32] 800cfae: e841 2300 strex r3, r2, [r1] 800cfb2: 61bb str r3, [r7, #24] return(result); 800cfb4: 69bb ldr r3, [r7, #24] 800cfb6: 2b00 cmp r3, #0 800cfb8: d1e6 bne.n 800cf88 } return HAL_OK; 800cfba: 2300 movs r3, #0 800cfbc: e000 b.n 800cfc0 } else { return HAL_BUSY; 800cfbe: 2302 movs r3, #2 } } 800cfc0: 4618 mov r0, r3 800cfc2: 3744 adds r7, #68 @ 0x44 800cfc4: 46bd mov sp, r7 800cfc6: f85d 7b04 ldr.w r7, [sp], #4 800cfca: 4770 bx lr 800cfcc: 0800eb3f .word 0x0800eb3f 800cfd0: 0800ea5f .word 0x0800ea5f 800cfd4: 0800e99d .word 0x0800e99d 800cfd8: 0800e8e5 .word 0x0800e8e5 0800cfdc : * @brief Handle UART interrupt request. * @param huart UART handle. * @retval None */ void HAL_UART_IRQHandler(UART_HandleTypeDef *huart) { 800cfdc: b580 push {r7, lr} 800cfde: b0ba sub sp, #232 @ 0xe8 800cfe0: af00 add r7, sp, #0 800cfe2: 6078 str r0, [r7, #4] uint32_t isrflags = READ_REG(huart->Instance->ISR); 800cfe4: 687b ldr r3, [r7, #4] 800cfe6: 681b ldr r3, [r3, #0] 800cfe8: 69db ldr r3, [r3, #28] 800cfea: f8c7 30e4 str.w r3, [r7, #228] @ 0xe4 uint32_t cr1its = READ_REG(huart->Instance->CR1); 800cfee: 687b ldr r3, [r7, #4] 800cff0: 681b ldr r3, [r3, #0] 800cff2: 681b ldr r3, [r3, #0] 800cff4: f8c7 30e0 str.w r3, [r7, #224] @ 0xe0 uint32_t cr3its = READ_REG(huart->Instance->CR3); 800cff8: 687b ldr r3, [r7, #4] 800cffa: 681b ldr r3, [r3, #0] 800cffc: 689b ldr r3, [r3, #8] 800cffe: 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)); 800d002: f8d7 20e4 ldr.w r2, [r7, #228] @ 0xe4 800d006: f640 030f movw r3, #2063 @ 0x80f 800d00a: 4013 ands r3, r2 800d00c: f8c7 30d8 str.w r3, [r7, #216] @ 0xd8 if (errorflags == 0U) 800d010: f8d7 30d8 ldr.w r3, [r7, #216] @ 0xd8 800d014: 2b00 cmp r3, #0 800d016: d11b bne.n 800d050 { /* UART in mode Receiver ---------------------------------------------------*/ if (((isrflags & USART_ISR_RXNE_RXFNE) != 0U) 800d018: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800d01c: f003 0320 and.w r3, r3, #32 800d020: 2b00 cmp r3, #0 800d022: d015 beq.n 800d050 && (((cr1its & USART_CR1_RXNEIE_RXFNEIE) != 0U) 800d024: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800d028: f003 0320 and.w r3, r3, #32 800d02c: 2b00 cmp r3, #0 800d02e: d105 bne.n 800d03c || ((cr3its & USART_CR3_RXFTIE) != 0U))) 800d030: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800d034: f003 5380 and.w r3, r3, #268435456 @ 0x10000000 800d038: 2b00 cmp r3, #0 800d03a: d009 beq.n 800d050 { if (huart->RxISR != NULL) 800d03c: 687b ldr r3, [r7, #4] 800d03e: 6f5b ldr r3, [r3, #116] @ 0x74 800d040: 2b00 cmp r3, #0 800d042: f000 8377 beq.w 800d734 { huart->RxISR(huart); 800d046: 687b ldr r3, [r7, #4] 800d048: 6f5b ldr r3, [r3, #116] @ 0x74 800d04a: 6878 ldr r0, [r7, #4] 800d04c: 4798 blx r3 } return; 800d04e: e371 b.n 800d734 } } /* If some errors occur */ if ((errorflags != 0U) 800d050: f8d7 30d8 ldr.w r3, [r7, #216] @ 0xd8 800d054: 2b00 cmp r3, #0 800d056: f000 8123 beq.w 800d2a0 && ((((cr3its & (USART_CR3_RXFTIE | USART_CR3_EIE)) != 0U) 800d05a: f8d7 20dc ldr.w r2, [r7, #220] @ 0xdc 800d05e: 4b8d ldr r3, [pc, #564] @ (800d294 ) 800d060: 4013 ands r3, r2 800d062: 2b00 cmp r3, #0 800d064: d106 bne.n 800d074 || ((cr1its & (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE | USART_CR1_RTOIE)) != 0U)))) 800d066: f8d7 20e0 ldr.w r2, [r7, #224] @ 0xe0 800d06a: 4b8b ldr r3, [pc, #556] @ (800d298 ) 800d06c: 4013 ands r3, r2 800d06e: 2b00 cmp r3, #0 800d070: f000 8116 beq.w 800d2a0 { /* UART parity error interrupt occurred -------------------------------------*/ if (((isrflags & USART_ISR_PE) != 0U) && ((cr1its & USART_CR1_PEIE) != 0U)) 800d074: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800d078: f003 0301 and.w r3, r3, #1 800d07c: 2b00 cmp r3, #0 800d07e: d011 beq.n 800d0a4 800d080: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800d084: f403 7380 and.w r3, r3, #256 @ 0x100 800d088: 2b00 cmp r3, #0 800d08a: d00b beq.n 800d0a4 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_PEF); 800d08c: 687b ldr r3, [r7, #4] 800d08e: 681b ldr r3, [r3, #0] 800d090: 2201 movs r2, #1 800d092: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_PE; 800d094: 687b ldr r3, [r7, #4] 800d096: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800d09a: f043 0201 orr.w r2, r3, #1 800d09e: 687b ldr r3, [r7, #4] 800d0a0: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART frame error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_FE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800d0a4: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800d0a8: f003 0302 and.w r3, r3, #2 800d0ac: 2b00 cmp r3, #0 800d0ae: d011 beq.n 800d0d4 800d0b0: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800d0b4: f003 0301 and.w r3, r3, #1 800d0b8: 2b00 cmp r3, #0 800d0ba: d00b beq.n 800d0d4 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_FEF); 800d0bc: 687b ldr r3, [r7, #4] 800d0be: 681b ldr r3, [r3, #0] 800d0c0: 2202 movs r2, #2 800d0c2: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_FE; 800d0c4: 687b ldr r3, [r7, #4] 800d0c6: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800d0ca: f043 0204 orr.w r2, r3, #4 800d0ce: 687b ldr r3, [r7, #4] 800d0d0: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART noise error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_NE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800d0d4: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800d0d8: f003 0304 and.w r3, r3, #4 800d0dc: 2b00 cmp r3, #0 800d0de: d011 beq.n 800d104 800d0e0: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800d0e4: f003 0301 and.w r3, r3, #1 800d0e8: 2b00 cmp r3, #0 800d0ea: d00b beq.n 800d104 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_NEF); 800d0ec: 687b ldr r3, [r7, #4] 800d0ee: 681b ldr r3, [r3, #0] 800d0f0: 2204 movs r2, #4 800d0f2: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_NE; 800d0f4: 687b ldr r3, [r7, #4] 800d0f6: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800d0fa: f043 0202 orr.w r2, r3, #2 800d0fe: 687b ldr r3, [r7, #4] 800d100: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART Over-Run interrupt occurred -----------------------------------------*/ if (((isrflags & USART_ISR_ORE) != 0U) 800d104: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800d108: f003 0308 and.w r3, r3, #8 800d10c: 2b00 cmp r3, #0 800d10e: d017 beq.n 800d140 && (((cr1its & USART_CR1_RXNEIE_RXFNEIE) != 0U) || 800d110: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800d114: f003 0320 and.w r3, r3, #32 800d118: 2b00 cmp r3, #0 800d11a: d105 bne.n 800d128 ((cr3its & (USART_CR3_RXFTIE | USART_CR3_EIE)) != 0U))) 800d11c: f8d7 20dc ldr.w r2, [r7, #220] @ 0xdc 800d120: 4b5c ldr r3, [pc, #368] @ (800d294 ) 800d122: 4013 ands r3, r2 && (((cr1its & USART_CR1_RXNEIE_RXFNEIE) != 0U) || 800d124: 2b00 cmp r3, #0 800d126: d00b beq.n 800d140 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_OREF); 800d128: 687b ldr r3, [r7, #4] 800d12a: 681b ldr r3, [r3, #0] 800d12c: 2208 movs r2, #8 800d12e: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_ORE; 800d130: 687b ldr r3, [r7, #4] 800d132: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800d136: f043 0208 orr.w r2, r3, #8 800d13a: 687b ldr r3, [r7, #4] 800d13c: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART Receiver Timeout interrupt occurred ---------------------------------*/ if (((isrflags & USART_ISR_RTOF) != 0U) && ((cr1its & USART_CR1_RTOIE) != 0U)) 800d140: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800d144: f403 6300 and.w r3, r3, #2048 @ 0x800 800d148: 2b00 cmp r3, #0 800d14a: d012 beq.n 800d172 800d14c: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800d150: f003 6380 and.w r3, r3, #67108864 @ 0x4000000 800d154: 2b00 cmp r3, #0 800d156: d00c beq.n 800d172 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_RTOF); 800d158: 687b ldr r3, [r7, #4] 800d15a: 681b ldr r3, [r3, #0] 800d15c: f44f 6200 mov.w r2, #2048 @ 0x800 800d160: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_RTO; 800d162: 687b ldr r3, [r7, #4] 800d164: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800d168: f043 0220 orr.w r2, r3, #32 800d16c: 687b ldr r3, [r7, #4] 800d16e: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* Call UART Error Call back function if need be ----------------------------*/ if (huart->ErrorCode != HAL_UART_ERROR_NONE) 800d172: 687b ldr r3, [r7, #4] 800d174: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800d178: 2b00 cmp r3, #0 800d17a: f000 82dd beq.w 800d738 { /* UART in mode Receiver --------------------------------------------------*/ if (((isrflags & USART_ISR_RXNE_RXFNE) != 0U) 800d17e: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800d182: f003 0320 and.w r3, r3, #32 800d186: 2b00 cmp r3, #0 800d188: d013 beq.n 800d1b2 && (((cr1its & USART_CR1_RXNEIE_RXFNEIE) != 0U) 800d18a: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800d18e: f003 0320 and.w r3, r3, #32 800d192: 2b00 cmp r3, #0 800d194: d105 bne.n 800d1a2 || ((cr3its & USART_CR3_RXFTIE) != 0U))) 800d196: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800d19a: f003 5380 and.w r3, r3, #268435456 @ 0x10000000 800d19e: 2b00 cmp r3, #0 800d1a0: d007 beq.n 800d1b2 { if (huart->RxISR != NULL) 800d1a2: 687b ldr r3, [r7, #4] 800d1a4: 6f5b ldr r3, [r3, #116] @ 0x74 800d1a6: 2b00 cmp r3, #0 800d1a8: d003 beq.n 800d1b2 { huart->RxISR(huart); 800d1aa: 687b ldr r3, [r7, #4] 800d1ac: 6f5b ldr r3, [r3, #116] @ 0x74 800d1ae: 6878 ldr r0, [r7, #4] 800d1b0: 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; 800d1b2: 687b ldr r3, [r7, #4] 800d1b4: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800d1b8: f8c7 30d4 str.w r3, [r7, #212] @ 0xd4 if ((HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) || 800d1bc: 687b ldr r3, [r7, #4] 800d1be: 681b ldr r3, [r3, #0] 800d1c0: 689b ldr r3, [r3, #8] 800d1c2: f003 0340 and.w r3, r3, #64 @ 0x40 800d1c6: 2b40 cmp r3, #64 @ 0x40 800d1c8: d005 beq.n 800d1d6 ((errorcode & (HAL_UART_ERROR_RTO | HAL_UART_ERROR_ORE)) != 0U)) 800d1ca: f8d7 30d4 ldr.w r3, [r7, #212] @ 0xd4 800d1ce: f003 0328 and.w r3, r3, #40 @ 0x28 if ((HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) || 800d1d2: 2b00 cmp r3, #0 800d1d4: d054 beq.n 800d280 { /* 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); 800d1d6: 6878 ldr r0, [r7, #4] 800d1d8: f001 fb08 bl 800e7ec /* Abort the UART DMA Rx channel if enabled */ if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800d1dc: 687b ldr r3, [r7, #4] 800d1de: 681b ldr r3, [r3, #0] 800d1e0: 689b ldr r3, [r3, #8] 800d1e2: f003 0340 and.w r3, r3, #64 @ 0x40 800d1e6: 2b40 cmp r3, #64 @ 0x40 800d1e8: d146 bne.n 800d278 { /* Disable the UART DMA Rx request if enabled */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAR); 800d1ea: 687b ldr r3, [r7, #4] 800d1ec: 681b ldr r3, [r3, #0] 800d1ee: 3308 adds r3, #8 800d1f0: f8c7 309c str.w r3, [r7, #156] @ 0x9c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800d1f4: f8d7 309c ldr.w r3, [r7, #156] @ 0x9c 800d1f8: e853 3f00 ldrex r3, [r3] 800d1fc: f8c7 3098 str.w r3, [r7, #152] @ 0x98 return(result); 800d200: f8d7 3098 ldr.w r3, [r7, #152] @ 0x98 800d204: f023 0340 bic.w r3, r3, #64 @ 0x40 800d208: f8c7 30d0 str.w r3, [r7, #208] @ 0xd0 800d20c: 687b ldr r3, [r7, #4] 800d20e: 681b ldr r3, [r3, #0] 800d210: 3308 adds r3, #8 800d212: f8d7 20d0 ldr.w r2, [r7, #208] @ 0xd0 800d216: f8c7 20a8 str.w r2, [r7, #168] @ 0xa8 800d21a: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800d21e: f8d7 10a4 ldr.w r1, [r7, #164] @ 0xa4 800d222: f8d7 20a8 ldr.w r2, [r7, #168] @ 0xa8 800d226: e841 2300 strex r3, r2, [r1] 800d22a: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 return(result); 800d22e: f8d7 30a0 ldr.w r3, [r7, #160] @ 0xa0 800d232: 2b00 cmp r3, #0 800d234: d1d9 bne.n 800d1ea /* Abort the UART DMA Rx channel */ if (huart->hdmarx != NULL) 800d236: 687b ldr r3, [r7, #4] 800d238: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d23c: 2b00 cmp r3, #0 800d23e: d017 beq.n 800d270 { /* Set the UART DMA Abort callback : will lead to call HAL_UART_ErrorCallback() at end of DMA abort procedure */ huart->hdmarx->XferAbortCallback = UART_DMAAbortOnError; 800d240: 687b ldr r3, [r7, #4] 800d242: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d246: 4a15 ldr r2, [pc, #84] @ (800d29c ) 800d248: 651a str r2, [r3, #80] @ 0x50 /* Abort DMA RX */ if (HAL_DMA_Abort_IT(huart->hdmarx) != HAL_OK) 800d24a: 687b ldr r3, [r7, #4] 800d24c: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d250: 4618 mov r0, r3 800d252: f7f9 f915 bl 8006480 800d256: 4603 mov r3, r0 800d258: 2b00 cmp r3, #0 800d25a: d019 beq.n 800d290 { /* Call Directly huart->hdmarx->XferAbortCallback function in case of error */ huart->hdmarx->XferAbortCallback(huart->hdmarx); 800d25c: 687b ldr r3, [r7, #4] 800d25e: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d262: 6d1b ldr r3, [r3, #80] @ 0x50 800d264: 687a ldr r2, [r7, #4] 800d266: f8d2 2080 ldr.w r2, [r2, #128] @ 0x80 800d26a: 4610 mov r0, r2 800d26c: 4798 blx r3 if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800d26e: e00f b.n 800d290 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800d270: 6878 ldr r0, [r7, #4] 800d272: f000 fa6d bl 800d750 if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800d276: e00b b.n 800d290 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800d278: 6878 ldr r0, [r7, #4] 800d27a: f000 fa69 bl 800d750 if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800d27e: e007 b.n 800d290 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800d280: 6878 ldr r0, [r7, #4] 800d282: f000 fa65 bl 800d750 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ huart->ErrorCode = HAL_UART_ERROR_NONE; 800d286: 687b ldr r3, [r7, #4] 800d288: 2200 movs r2, #0 800d28a: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } } return; 800d28e: e253 b.n 800d738 if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800d290: bf00 nop return; 800d292: e251 b.n 800d738 800d294: 10000001 .word 0x10000001 800d298: 04000120 .word 0x04000120 800d29c: 0800e8b9 .word 0x0800e8b9 } /* End if some error occurs */ /* Check current reception Mode : If Reception till IDLE event has been selected : */ if ((huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800d2a0: 687b ldr r3, [r7, #4] 800d2a2: 6edb ldr r3, [r3, #108] @ 0x6c 800d2a4: 2b01 cmp r3, #1 800d2a6: f040 81e7 bne.w 800d678 && ((isrflags & USART_ISR_IDLE) != 0U) 800d2aa: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800d2ae: f003 0310 and.w r3, r3, #16 800d2b2: 2b00 cmp r3, #0 800d2b4: f000 81e0 beq.w 800d678 && ((cr1its & USART_ISR_IDLE) != 0U)) 800d2b8: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800d2bc: f003 0310 and.w r3, r3, #16 800d2c0: 2b00 cmp r3, #0 800d2c2: f000 81d9 beq.w 800d678 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 800d2c6: 687b ldr r3, [r7, #4] 800d2c8: 681b ldr r3, [r3, #0] 800d2ca: 2210 movs r2, #16 800d2cc: 621a str r2, [r3, #32] /* Check if DMA mode is enabled in UART */ if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800d2ce: 687b ldr r3, [r7, #4] 800d2d0: 681b ldr r3, [r3, #0] 800d2d2: 689b ldr r3, [r3, #8] 800d2d4: f003 0340 and.w r3, r3, #64 @ 0x40 800d2d8: 2b40 cmp r3, #64 @ 0x40 800d2da: f040 8151 bne.w 800d580 { /* 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); 800d2de: 687b ldr r3, [r7, #4] 800d2e0: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d2e4: 681b ldr r3, [r3, #0] 800d2e6: 4a96 ldr r2, [pc, #600] @ (800d540 ) 800d2e8: 4293 cmp r3, r2 800d2ea: d068 beq.n 800d3be 800d2ec: 687b ldr r3, [r7, #4] 800d2ee: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d2f2: 681b ldr r3, [r3, #0] 800d2f4: 4a93 ldr r2, [pc, #588] @ (800d544 ) 800d2f6: 4293 cmp r3, r2 800d2f8: d061 beq.n 800d3be 800d2fa: 687b ldr r3, [r7, #4] 800d2fc: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d300: 681b ldr r3, [r3, #0] 800d302: 4a91 ldr r2, [pc, #580] @ (800d548 ) 800d304: 4293 cmp r3, r2 800d306: d05a beq.n 800d3be 800d308: 687b ldr r3, [r7, #4] 800d30a: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d30e: 681b ldr r3, [r3, #0] 800d310: 4a8e ldr r2, [pc, #568] @ (800d54c ) 800d312: 4293 cmp r3, r2 800d314: d053 beq.n 800d3be 800d316: 687b ldr r3, [r7, #4] 800d318: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d31c: 681b ldr r3, [r3, #0] 800d31e: 4a8c ldr r2, [pc, #560] @ (800d550 ) 800d320: 4293 cmp r3, r2 800d322: d04c beq.n 800d3be 800d324: 687b ldr r3, [r7, #4] 800d326: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d32a: 681b ldr r3, [r3, #0] 800d32c: 4a89 ldr r2, [pc, #548] @ (800d554 ) 800d32e: 4293 cmp r3, r2 800d330: d045 beq.n 800d3be 800d332: 687b ldr r3, [r7, #4] 800d334: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d338: 681b ldr r3, [r3, #0] 800d33a: 4a87 ldr r2, [pc, #540] @ (800d558 ) 800d33c: 4293 cmp r3, r2 800d33e: d03e beq.n 800d3be 800d340: 687b ldr r3, [r7, #4] 800d342: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d346: 681b ldr r3, [r3, #0] 800d348: 4a84 ldr r2, [pc, #528] @ (800d55c ) 800d34a: 4293 cmp r3, r2 800d34c: d037 beq.n 800d3be 800d34e: 687b ldr r3, [r7, #4] 800d350: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d354: 681b ldr r3, [r3, #0] 800d356: 4a82 ldr r2, [pc, #520] @ (800d560 ) 800d358: 4293 cmp r3, r2 800d35a: d030 beq.n 800d3be 800d35c: 687b ldr r3, [r7, #4] 800d35e: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d362: 681b ldr r3, [r3, #0] 800d364: 4a7f ldr r2, [pc, #508] @ (800d564 ) 800d366: 4293 cmp r3, r2 800d368: d029 beq.n 800d3be 800d36a: 687b ldr r3, [r7, #4] 800d36c: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d370: 681b ldr r3, [r3, #0] 800d372: 4a7d ldr r2, [pc, #500] @ (800d568 ) 800d374: 4293 cmp r3, r2 800d376: d022 beq.n 800d3be 800d378: 687b ldr r3, [r7, #4] 800d37a: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d37e: 681b ldr r3, [r3, #0] 800d380: 4a7a ldr r2, [pc, #488] @ (800d56c ) 800d382: 4293 cmp r3, r2 800d384: d01b beq.n 800d3be 800d386: 687b ldr r3, [r7, #4] 800d388: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d38c: 681b ldr r3, [r3, #0] 800d38e: 4a78 ldr r2, [pc, #480] @ (800d570 ) 800d390: 4293 cmp r3, r2 800d392: d014 beq.n 800d3be 800d394: 687b ldr r3, [r7, #4] 800d396: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d39a: 681b ldr r3, [r3, #0] 800d39c: 4a75 ldr r2, [pc, #468] @ (800d574 ) 800d39e: 4293 cmp r3, r2 800d3a0: d00d beq.n 800d3be 800d3a2: 687b ldr r3, [r7, #4] 800d3a4: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d3a8: 681b ldr r3, [r3, #0] 800d3aa: 4a73 ldr r2, [pc, #460] @ (800d578 ) 800d3ac: 4293 cmp r3, r2 800d3ae: d006 beq.n 800d3be 800d3b0: 687b ldr r3, [r7, #4] 800d3b2: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d3b6: 681b ldr r3, [r3, #0] 800d3b8: 4a70 ldr r2, [pc, #448] @ (800d57c ) 800d3ba: 4293 cmp r3, r2 800d3bc: d106 bne.n 800d3cc 800d3be: 687b ldr r3, [r7, #4] 800d3c0: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d3c4: 681b ldr r3, [r3, #0] 800d3c6: 685b ldr r3, [r3, #4] 800d3c8: b29b uxth r3, r3 800d3ca: e005 b.n 800d3d8 800d3cc: 687b ldr r3, [r7, #4] 800d3ce: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d3d2: 681b ldr r3, [r3, #0] 800d3d4: 685b ldr r3, [r3, #4] 800d3d6: b29b uxth r3, r3 800d3d8: f8a7 30be strh.w r3, [r7, #190] @ 0xbe if ((nb_remaining_rx_data > 0U) 800d3dc: f8b7 30be ldrh.w r3, [r7, #190] @ 0xbe 800d3e0: 2b00 cmp r3, #0 800d3e2: f000 81ab beq.w 800d73c && (nb_remaining_rx_data < huart->RxXferSize)) 800d3e6: 687b ldr r3, [r7, #4] 800d3e8: f8b3 305c ldrh.w r3, [r3, #92] @ 0x5c 800d3ec: f8b7 20be ldrh.w r2, [r7, #190] @ 0xbe 800d3f0: 429a cmp r2, r3 800d3f2: f080 81a3 bcs.w 800d73c { /* Reception is not complete */ huart->RxXferCount = nb_remaining_rx_data; 800d3f6: 687b ldr r3, [r7, #4] 800d3f8: f8b7 20be ldrh.w r2, [r7, #190] @ 0xbe 800d3fc: 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) 800d400: 687b ldr r3, [r7, #4] 800d402: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d406: 69db ldr r3, [r3, #28] 800d408: f5b3 7f80 cmp.w r3, #256 @ 0x100 800d40c: f000 8087 beq.w 800d51e { /* Disable PE and ERR (Frame error, noise error, overrun error) interrupts */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_PEIE); 800d410: 687b ldr r3, [r7, #4] 800d412: 681b ldr r3, [r3, #0] 800d414: f8c7 3088 str.w r3, [r7, #136] @ 0x88 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800d418: f8d7 3088 ldr.w r3, [r7, #136] @ 0x88 800d41c: e853 3f00 ldrex r3, [r3] 800d420: f8c7 3084 str.w r3, [r7, #132] @ 0x84 return(result); 800d424: f8d7 3084 ldr.w r3, [r7, #132] @ 0x84 800d428: f423 7380 bic.w r3, r3, #256 @ 0x100 800d42c: f8c7 30b8 str.w r3, [r7, #184] @ 0xb8 800d430: 687b ldr r3, [r7, #4] 800d432: 681b ldr r3, [r3, #0] 800d434: 461a mov r2, r3 800d436: f8d7 30b8 ldr.w r3, [r7, #184] @ 0xb8 800d43a: f8c7 3094 str.w r3, [r7, #148] @ 0x94 800d43e: f8c7 2090 str.w r2, [r7, #144] @ 0x90 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800d442: f8d7 1090 ldr.w r1, [r7, #144] @ 0x90 800d446: f8d7 2094 ldr.w r2, [r7, #148] @ 0x94 800d44a: e841 2300 strex r3, r2, [r1] 800d44e: f8c7 308c str.w r3, [r7, #140] @ 0x8c return(result); 800d452: f8d7 308c ldr.w r3, [r7, #140] @ 0x8c 800d456: 2b00 cmp r3, #0 800d458: d1da bne.n 800d410 ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE); 800d45a: 687b ldr r3, [r7, #4] 800d45c: 681b ldr r3, [r3, #0] 800d45e: 3308 adds r3, #8 800d460: 677b str r3, [r7, #116] @ 0x74 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800d462: 6f7b ldr r3, [r7, #116] @ 0x74 800d464: e853 3f00 ldrex r3, [r3] 800d468: 673b str r3, [r7, #112] @ 0x70 return(result); 800d46a: 6f3b ldr r3, [r7, #112] @ 0x70 800d46c: f023 0301 bic.w r3, r3, #1 800d470: f8c7 30b4 str.w r3, [r7, #180] @ 0xb4 800d474: 687b ldr r3, [r7, #4] 800d476: 681b ldr r3, [r3, #0] 800d478: 3308 adds r3, #8 800d47a: f8d7 20b4 ldr.w r2, [r7, #180] @ 0xb4 800d47e: f8c7 2080 str.w r2, [r7, #128] @ 0x80 800d482: 67fb str r3, [r7, #124] @ 0x7c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800d484: 6ff9 ldr r1, [r7, #124] @ 0x7c 800d486: f8d7 2080 ldr.w r2, [r7, #128] @ 0x80 800d48a: e841 2300 strex r3, r2, [r1] 800d48e: 67bb str r3, [r7, #120] @ 0x78 return(result); 800d490: 6fbb ldr r3, [r7, #120] @ 0x78 800d492: 2b00 cmp r3, #0 800d494: d1e1 bne.n 800d45a /* 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); 800d496: 687b ldr r3, [r7, #4] 800d498: 681b ldr r3, [r3, #0] 800d49a: 3308 adds r3, #8 800d49c: 663b str r3, [r7, #96] @ 0x60 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800d49e: 6e3b ldr r3, [r7, #96] @ 0x60 800d4a0: e853 3f00 ldrex r3, [r3] 800d4a4: 65fb str r3, [r7, #92] @ 0x5c return(result); 800d4a6: 6dfb ldr r3, [r7, #92] @ 0x5c 800d4a8: f023 0340 bic.w r3, r3, #64 @ 0x40 800d4ac: f8c7 30b0 str.w r3, [r7, #176] @ 0xb0 800d4b0: 687b ldr r3, [r7, #4] 800d4b2: 681b ldr r3, [r3, #0] 800d4b4: 3308 adds r3, #8 800d4b6: f8d7 20b0 ldr.w r2, [r7, #176] @ 0xb0 800d4ba: 66fa str r2, [r7, #108] @ 0x6c 800d4bc: 66bb str r3, [r7, #104] @ 0x68 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800d4be: 6eb9 ldr r1, [r7, #104] @ 0x68 800d4c0: 6efa ldr r2, [r7, #108] @ 0x6c 800d4c2: e841 2300 strex r3, r2, [r1] 800d4c6: 667b str r3, [r7, #100] @ 0x64 return(result); 800d4c8: 6e7b ldr r3, [r7, #100] @ 0x64 800d4ca: 2b00 cmp r3, #0 800d4cc: d1e3 bne.n 800d496 /* At end of Rx process, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800d4ce: 687b ldr r3, [r7, #4] 800d4d0: 2220 movs r2, #32 800d4d2: f8c3 208c str.w r2, [r3, #140] @ 0x8c huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800d4d6: 687b ldr r3, [r7, #4] 800d4d8: 2200 movs r2, #0 800d4da: 66da str r2, [r3, #108] @ 0x6c ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800d4dc: 687b ldr r3, [r7, #4] 800d4de: 681b ldr r3, [r3, #0] 800d4e0: 64fb str r3, [r7, #76] @ 0x4c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800d4e2: 6cfb ldr r3, [r7, #76] @ 0x4c 800d4e4: e853 3f00 ldrex r3, [r3] 800d4e8: 64bb str r3, [r7, #72] @ 0x48 return(result); 800d4ea: 6cbb ldr r3, [r7, #72] @ 0x48 800d4ec: f023 0310 bic.w r3, r3, #16 800d4f0: f8c7 30ac str.w r3, [r7, #172] @ 0xac 800d4f4: 687b ldr r3, [r7, #4] 800d4f6: 681b ldr r3, [r3, #0] 800d4f8: 461a mov r2, r3 800d4fa: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800d4fe: 65bb str r3, [r7, #88] @ 0x58 800d500: 657a str r2, [r7, #84] @ 0x54 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800d502: 6d79 ldr r1, [r7, #84] @ 0x54 800d504: 6dba ldr r2, [r7, #88] @ 0x58 800d506: e841 2300 strex r3, r2, [r1] 800d50a: 653b str r3, [r7, #80] @ 0x50 return(result); 800d50c: 6d3b ldr r3, [r7, #80] @ 0x50 800d50e: 2b00 cmp r3, #0 800d510: d1e4 bne.n 800d4dc /* Last bytes received, so no need as the abort is immediate */ (void)HAL_DMA_Abort(huart->hdmarx); 800d512: 687b ldr r3, [r7, #4] 800d514: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800d518: 4618 mov r0, r3 800d51a: f7f8 fc93 bl 8005e44 } /* 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; 800d51e: 687b ldr r3, [r7, #4] 800d520: 2202 movs r2, #2 800d522: 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)); 800d524: 687b ldr r3, [r7, #4] 800d526: f8b3 205c ldrh.w r2, [r3, #92] @ 0x5c 800d52a: 687b ldr r3, [r7, #4] 800d52c: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800d530: b29b uxth r3, r3 800d532: 1ad3 subs r3, r2, r3 800d534: b29b uxth r3, r3 800d536: 4619 mov r1, r3 800d538: 6878 ldr r0, [r7, #4] 800d53a: f7f6 fd63 bl 8004004 #endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */ } return; 800d53e: e0fd b.n 800d73c 800d540: 40020010 .word 0x40020010 800d544: 40020028 .word 0x40020028 800d548: 40020040 .word 0x40020040 800d54c: 40020058 .word 0x40020058 800d550: 40020070 .word 0x40020070 800d554: 40020088 .word 0x40020088 800d558: 400200a0 .word 0x400200a0 800d55c: 400200b8 .word 0x400200b8 800d560: 40020410 .word 0x40020410 800d564: 40020428 .word 0x40020428 800d568: 40020440 .word 0x40020440 800d56c: 40020458 .word 0x40020458 800d570: 40020470 .word 0x40020470 800d574: 40020488 .word 0x40020488 800d578: 400204a0 .word 0x400204a0 800d57c: 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; 800d580: 687b ldr r3, [r7, #4] 800d582: f8b3 205c ldrh.w r2, [r3, #92] @ 0x5c 800d586: 687b ldr r3, [r7, #4] 800d588: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800d58c: b29b uxth r3, r3 800d58e: 1ad3 subs r3, r2, r3 800d590: f8a7 30ce strh.w r3, [r7, #206] @ 0xce if ((huart->RxXferCount > 0U) 800d594: 687b ldr r3, [r7, #4] 800d596: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800d59a: b29b uxth r3, r3 800d59c: 2b00 cmp r3, #0 800d59e: f000 80cf beq.w 800d740 && (nb_rx_data > 0U)) 800d5a2: f8b7 30ce ldrh.w r3, [r7, #206] @ 0xce 800d5a6: 2b00 cmp r3, #0 800d5a8: f000 80ca beq.w 800d740 { /* Disable the UART Parity Error Interrupt and RXNE interrupts */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE)); 800d5ac: 687b ldr r3, [r7, #4] 800d5ae: 681b ldr r3, [r3, #0] 800d5b0: 63bb str r3, [r7, #56] @ 0x38 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800d5b2: 6bbb ldr r3, [r7, #56] @ 0x38 800d5b4: e853 3f00 ldrex r3, [r3] 800d5b8: 637b str r3, [r7, #52] @ 0x34 return(result); 800d5ba: 6b7b ldr r3, [r7, #52] @ 0x34 800d5bc: f423 7390 bic.w r3, r3, #288 @ 0x120 800d5c0: f8c7 30c8 str.w r3, [r7, #200] @ 0xc8 800d5c4: 687b ldr r3, [r7, #4] 800d5c6: 681b ldr r3, [r3, #0] 800d5c8: 461a mov r2, r3 800d5ca: f8d7 30c8 ldr.w r3, [r7, #200] @ 0xc8 800d5ce: 647b str r3, [r7, #68] @ 0x44 800d5d0: 643a str r2, [r7, #64] @ 0x40 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800d5d2: 6c39 ldr r1, [r7, #64] @ 0x40 800d5d4: 6c7a ldr r2, [r7, #68] @ 0x44 800d5d6: e841 2300 strex r3, r2, [r1] 800d5da: 63fb str r3, [r7, #60] @ 0x3c return(result); 800d5dc: 6bfb ldr r3, [r7, #60] @ 0x3c 800d5de: 2b00 cmp r3, #0 800d5e0: d1e4 bne.n 800d5ac /* 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)); 800d5e2: 687b ldr r3, [r7, #4] 800d5e4: 681b ldr r3, [r3, #0] 800d5e6: 3308 adds r3, #8 800d5e8: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800d5ea: 6a7b ldr r3, [r7, #36] @ 0x24 800d5ec: e853 3f00 ldrex r3, [r3] 800d5f0: 623b str r3, [r7, #32] return(result); 800d5f2: 6a3a ldr r2, [r7, #32] 800d5f4: 4b55 ldr r3, [pc, #340] @ (800d74c ) 800d5f6: 4013 ands r3, r2 800d5f8: f8c7 30c4 str.w r3, [r7, #196] @ 0xc4 800d5fc: 687b ldr r3, [r7, #4] 800d5fe: 681b ldr r3, [r3, #0] 800d600: 3308 adds r3, #8 800d602: f8d7 20c4 ldr.w r2, [r7, #196] @ 0xc4 800d606: 633a str r2, [r7, #48] @ 0x30 800d608: 62fb str r3, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800d60a: 6af9 ldr r1, [r7, #44] @ 0x2c 800d60c: 6b3a ldr r2, [r7, #48] @ 0x30 800d60e: e841 2300 strex r3, r2, [r1] 800d612: 62bb str r3, [r7, #40] @ 0x28 return(result); 800d614: 6abb ldr r3, [r7, #40] @ 0x28 800d616: 2b00 cmp r3, #0 800d618: d1e3 bne.n 800d5e2 /* Rx process is completed, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800d61a: 687b ldr r3, [r7, #4] 800d61c: 2220 movs r2, #32 800d61e: f8c3 208c str.w r2, [r3, #140] @ 0x8c huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800d622: 687b ldr r3, [r7, #4] 800d624: 2200 movs r2, #0 800d626: 66da str r2, [r3, #108] @ 0x6c /* Clear RxISR function pointer */ huart->RxISR = NULL; 800d628: 687b ldr r3, [r7, #4] 800d62a: 2200 movs r2, #0 800d62c: 675a str r2, [r3, #116] @ 0x74 ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800d62e: 687b ldr r3, [r7, #4] 800d630: 681b ldr r3, [r3, #0] 800d632: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800d634: 693b ldr r3, [r7, #16] 800d636: e853 3f00 ldrex r3, [r3] 800d63a: 60fb str r3, [r7, #12] return(result); 800d63c: 68fb ldr r3, [r7, #12] 800d63e: f023 0310 bic.w r3, r3, #16 800d642: f8c7 30c0 str.w r3, [r7, #192] @ 0xc0 800d646: 687b ldr r3, [r7, #4] 800d648: 681b ldr r3, [r3, #0] 800d64a: 461a mov r2, r3 800d64c: f8d7 30c0 ldr.w r3, [r7, #192] @ 0xc0 800d650: 61fb str r3, [r7, #28] 800d652: 61ba str r2, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800d654: 69b9 ldr r1, [r7, #24] 800d656: 69fa ldr r2, [r7, #28] 800d658: e841 2300 strex r3, r2, [r1] 800d65c: 617b str r3, [r7, #20] return(result); 800d65e: 697b ldr r3, [r7, #20] 800d660: 2b00 cmp r3, #0 800d662: d1e4 bne.n 800d62e /* 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; 800d664: 687b ldr r3, [r7, #4] 800d666: 2202 movs r2, #2 800d668: 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); 800d66a: f8b7 30ce ldrh.w r3, [r7, #206] @ 0xce 800d66e: 4619 mov r1, r3 800d670: 6878 ldr r0, [r7, #4] 800d672: f7f6 fcc7 bl 8004004 #endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */ } return; 800d676: e063 b.n 800d740 } } /* UART wakeup from Stop mode interrupt occurred ---------------------------*/ if (((isrflags & USART_ISR_WUF) != 0U) && ((cr3its & USART_CR3_WUFIE) != 0U)) 800d678: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800d67c: f403 1380 and.w r3, r3, #1048576 @ 0x100000 800d680: 2b00 cmp r3, #0 800d682: d00e beq.n 800d6a2 800d684: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800d688: f403 0380 and.w r3, r3, #4194304 @ 0x400000 800d68c: 2b00 cmp r3, #0 800d68e: d008 beq.n 800d6a2 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_WUF); 800d690: 687b ldr r3, [r7, #4] 800d692: 681b ldr r3, [r3, #0] 800d694: f44f 1280 mov.w r2, #1048576 @ 0x100000 800d698: 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); 800d69a: 6878 ldr r0, [r7, #4] 800d69c: f002 f80c bl 800f6b8 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ return; 800d6a0: e051 b.n 800d746 } /* UART in mode Transmitter ------------------------------------------------*/ if (((isrflags & USART_ISR_TXE_TXFNF) != 0U) 800d6a2: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800d6a6: f003 0380 and.w r3, r3, #128 @ 0x80 800d6aa: 2b00 cmp r3, #0 800d6ac: d014 beq.n 800d6d8 && (((cr1its & USART_CR1_TXEIE_TXFNFIE) != 0U) 800d6ae: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800d6b2: f003 0380 and.w r3, r3, #128 @ 0x80 800d6b6: 2b00 cmp r3, #0 800d6b8: d105 bne.n 800d6c6 || ((cr3its & USART_CR3_TXFTIE) != 0U))) 800d6ba: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800d6be: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800d6c2: 2b00 cmp r3, #0 800d6c4: d008 beq.n 800d6d8 { if (huart->TxISR != NULL) 800d6c6: 687b ldr r3, [r7, #4] 800d6c8: 6f9b ldr r3, [r3, #120] @ 0x78 800d6ca: 2b00 cmp r3, #0 800d6cc: d03a beq.n 800d744 { huart->TxISR(huart); 800d6ce: 687b ldr r3, [r7, #4] 800d6d0: 6f9b ldr r3, [r3, #120] @ 0x78 800d6d2: 6878 ldr r0, [r7, #4] 800d6d4: 4798 blx r3 } return; 800d6d6: e035 b.n 800d744 } /* UART in mode Transmitter (transmission end) -----------------------------*/ if (((isrflags & USART_ISR_TC) != 0U) && ((cr1its & USART_CR1_TCIE) != 0U)) 800d6d8: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800d6dc: f003 0340 and.w r3, r3, #64 @ 0x40 800d6e0: 2b00 cmp r3, #0 800d6e2: d009 beq.n 800d6f8 800d6e4: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800d6e8: f003 0340 and.w r3, r3, #64 @ 0x40 800d6ec: 2b00 cmp r3, #0 800d6ee: d003 beq.n 800d6f8 { UART_EndTransmit_IT(huart); 800d6f0: 6878 ldr r0, [r7, #4] 800d6f2: f001 fa99 bl 800ec28 return; 800d6f6: e026 b.n 800d746 } /* UART TX Fifo Empty occurred ----------------------------------------------*/ if (((isrflags & USART_ISR_TXFE) != 0U) && ((cr1its & USART_CR1_TXFEIE) != 0U)) 800d6f8: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800d6fc: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800d700: 2b00 cmp r3, #0 800d702: d009 beq.n 800d718 800d704: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800d708: f003 4380 and.w r3, r3, #1073741824 @ 0x40000000 800d70c: 2b00 cmp r3, #0 800d70e: d003 beq.n 800d718 #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); 800d710: 6878 ldr r0, [r7, #4] 800d712: f001 ffe5 bl 800f6e0 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ return; 800d716: e016 b.n 800d746 } /* UART RX Fifo Full occurred ----------------------------------------------*/ if (((isrflags & USART_ISR_RXFF) != 0U) && ((cr1its & USART_CR1_RXFFIE) != 0U)) 800d718: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800d71c: f003 7380 and.w r3, r3, #16777216 @ 0x1000000 800d720: 2b00 cmp r3, #0 800d722: d010 beq.n 800d746 800d724: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800d728: 2b00 cmp r3, #0 800d72a: da0c bge.n 800d746 #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); 800d72c: 6878 ldr r0, [r7, #4] 800d72e: f001 ffcd bl 800f6cc #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ return; 800d732: e008 b.n 800d746 return; 800d734: bf00 nop 800d736: e006 b.n 800d746 return; 800d738: bf00 nop 800d73a: e004 b.n 800d746 return; 800d73c: bf00 nop 800d73e: e002 b.n 800d746 return; 800d740: bf00 nop 800d742: e000 b.n 800d746 return; 800d744: bf00 nop } } 800d746: 37e8 adds r7, #232 @ 0xe8 800d748: 46bd mov sp, r7 800d74a: bd80 pop {r7, pc} 800d74c: effffffe .word 0xeffffffe 0800d750 : * @brief UART error callback. * @param huart UART handle. * @retval None */ __weak void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart) { 800d750: b480 push {r7} 800d752: b083 sub sp, #12 800d754: af00 add r7, sp, #0 800d756: 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. */ } 800d758: bf00 nop 800d75a: 370c adds r7, #12 800d75c: 46bd mov sp, r7 800d75e: f85d 7b04 ldr.w r7, [sp], #4 800d762: 4770 bx lr 0800d764 : * @brief Configure the UART peripheral. * @param huart UART handle. * @retval HAL status */ HAL_StatusTypeDef UART_SetConfig(UART_HandleTypeDef *huart) { 800d764: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr} 800d768: b092 sub sp, #72 @ 0x48 800d76a: af00 add r7, sp, #0 800d76c: 6178 str r0, [r7, #20] uint32_t tmpreg; uint16_t brrtemp; UART_ClockSourceTypeDef clocksource; uint32_t usartdiv; HAL_StatusTypeDef ret = HAL_OK; 800d76e: 2300 movs r3, #0 800d770: 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 ; 800d774: 697b ldr r3, [r7, #20] 800d776: 689a ldr r2, [r3, #8] 800d778: 697b ldr r3, [r7, #20] 800d77a: 691b ldr r3, [r3, #16] 800d77c: 431a orrs r2, r3 800d77e: 697b ldr r3, [r7, #20] 800d780: 695b ldr r3, [r3, #20] 800d782: 431a orrs r2, r3 800d784: 697b ldr r3, [r7, #20] 800d786: 69db ldr r3, [r3, #28] 800d788: 4313 orrs r3, r2 800d78a: 647b str r3, [r7, #68] @ 0x44 MODIFY_REG(huart->Instance->CR1, USART_CR1_FIELDS, tmpreg); 800d78c: 697b ldr r3, [r7, #20] 800d78e: 681b ldr r3, [r3, #0] 800d790: 681a ldr r2, [r3, #0] 800d792: 4bbe ldr r3, [pc, #760] @ (800da8c ) 800d794: 4013 ands r3, r2 800d796: 697a ldr r2, [r7, #20] 800d798: 6812 ldr r2, [r2, #0] 800d79a: 6c79 ldr r1, [r7, #68] @ 0x44 800d79c: 430b orrs r3, r1 800d79e: 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); 800d7a0: 697b ldr r3, [r7, #20] 800d7a2: 681b ldr r3, [r3, #0] 800d7a4: 685b ldr r3, [r3, #4] 800d7a6: f423 5140 bic.w r1, r3, #12288 @ 0x3000 800d7aa: 697b ldr r3, [r7, #20] 800d7ac: 68da ldr r2, [r3, #12] 800d7ae: 697b ldr r3, [r7, #20] 800d7b0: 681b ldr r3, [r3, #0] 800d7b2: 430a orrs r2, r1 800d7b4: 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; 800d7b6: 697b ldr r3, [r7, #20] 800d7b8: 699b ldr r3, [r3, #24] 800d7ba: 647b str r3, [r7, #68] @ 0x44 if (!(UART_INSTANCE_LOWPOWER(huart))) 800d7bc: 697b ldr r3, [r7, #20] 800d7be: 681b ldr r3, [r3, #0] 800d7c0: 4ab3 ldr r2, [pc, #716] @ (800da90 ) 800d7c2: 4293 cmp r3, r2 800d7c4: d004 beq.n 800d7d0 { tmpreg |= huart->Init.OneBitSampling; 800d7c6: 697b ldr r3, [r7, #20] 800d7c8: 6a1b ldr r3, [r3, #32] 800d7ca: 6c7a ldr r2, [r7, #68] @ 0x44 800d7cc: 4313 orrs r3, r2 800d7ce: 647b str r3, [r7, #68] @ 0x44 } MODIFY_REG(huart->Instance->CR3, USART_CR3_FIELDS, tmpreg); 800d7d0: 697b ldr r3, [r7, #20] 800d7d2: 681b ldr r3, [r3, #0] 800d7d4: 689a ldr r2, [r3, #8] 800d7d6: 4baf ldr r3, [pc, #700] @ (800da94 ) 800d7d8: 4013 ands r3, r2 800d7da: 697a ldr r2, [r7, #20] 800d7dc: 6812 ldr r2, [r2, #0] 800d7de: 6c79 ldr r1, [r7, #68] @ 0x44 800d7e0: 430b orrs r3, r1 800d7e2: 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); 800d7e4: 697b ldr r3, [r7, #20] 800d7e6: 681b ldr r3, [r3, #0] 800d7e8: 6adb ldr r3, [r3, #44] @ 0x2c 800d7ea: f023 010f bic.w r1, r3, #15 800d7ee: 697b ldr r3, [r7, #20] 800d7f0: 6a5a ldr r2, [r3, #36] @ 0x24 800d7f2: 697b ldr r3, [r7, #20] 800d7f4: 681b ldr r3, [r3, #0] 800d7f6: 430a orrs r2, r1 800d7f8: 62da str r2, [r3, #44] @ 0x2c /*-------------------------- USART BRR Configuration -----------------------*/ UART_GETCLOCKSOURCE(huart, clocksource); 800d7fa: 697b ldr r3, [r7, #20] 800d7fc: 681b ldr r3, [r3, #0] 800d7fe: 4aa6 ldr r2, [pc, #664] @ (800da98 ) 800d800: 4293 cmp r3, r2 800d802: d177 bne.n 800d8f4 800d804: 4ba5 ldr r3, [pc, #660] @ (800da9c ) 800d806: 6d5b ldr r3, [r3, #84] @ 0x54 800d808: f003 0338 and.w r3, r3, #56 @ 0x38 800d80c: 2b28 cmp r3, #40 @ 0x28 800d80e: d86d bhi.n 800d8ec 800d810: a201 add r2, pc, #4 @ (adr r2, 800d818 ) 800d812: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800d816: bf00 nop 800d818: 0800d8bd .word 0x0800d8bd 800d81c: 0800d8ed .word 0x0800d8ed 800d820: 0800d8ed .word 0x0800d8ed 800d824: 0800d8ed .word 0x0800d8ed 800d828: 0800d8ed .word 0x0800d8ed 800d82c: 0800d8ed .word 0x0800d8ed 800d830: 0800d8ed .word 0x0800d8ed 800d834: 0800d8ed .word 0x0800d8ed 800d838: 0800d8c5 .word 0x0800d8c5 800d83c: 0800d8ed .word 0x0800d8ed 800d840: 0800d8ed .word 0x0800d8ed 800d844: 0800d8ed .word 0x0800d8ed 800d848: 0800d8ed .word 0x0800d8ed 800d84c: 0800d8ed .word 0x0800d8ed 800d850: 0800d8ed .word 0x0800d8ed 800d854: 0800d8ed .word 0x0800d8ed 800d858: 0800d8cd .word 0x0800d8cd 800d85c: 0800d8ed .word 0x0800d8ed 800d860: 0800d8ed .word 0x0800d8ed 800d864: 0800d8ed .word 0x0800d8ed 800d868: 0800d8ed .word 0x0800d8ed 800d86c: 0800d8ed .word 0x0800d8ed 800d870: 0800d8ed .word 0x0800d8ed 800d874: 0800d8ed .word 0x0800d8ed 800d878: 0800d8d5 .word 0x0800d8d5 800d87c: 0800d8ed .word 0x0800d8ed 800d880: 0800d8ed .word 0x0800d8ed 800d884: 0800d8ed .word 0x0800d8ed 800d888: 0800d8ed .word 0x0800d8ed 800d88c: 0800d8ed .word 0x0800d8ed 800d890: 0800d8ed .word 0x0800d8ed 800d894: 0800d8ed .word 0x0800d8ed 800d898: 0800d8dd .word 0x0800d8dd 800d89c: 0800d8ed .word 0x0800d8ed 800d8a0: 0800d8ed .word 0x0800d8ed 800d8a4: 0800d8ed .word 0x0800d8ed 800d8a8: 0800d8ed .word 0x0800d8ed 800d8ac: 0800d8ed .word 0x0800d8ed 800d8b0: 0800d8ed .word 0x0800d8ed 800d8b4: 0800d8ed .word 0x0800d8ed 800d8b8: 0800d8e5 .word 0x0800d8e5 800d8bc: 2301 movs r3, #1 800d8be: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d8c2: e222 b.n 800dd0a 800d8c4: 2304 movs r3, #4 800d8c6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d8ca: e21e b.n 800dd0a 800d8cc: 2308 movs r3, #8 800d8ce: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d8d2: e21a b.n 800dd0a 800d8d4: 2310 movs r3, #16 800d8d6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d8da: e216 b.n 800dd0a 800d8dc: 2320 movs r3, #32 800d8de: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d8e2: e212 b.n 800dd0a 800d8e4: 2340 movs r3, #64 @ 0x40 800d8e6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d8ea: e20e b.n 800dd0a 800d8ec: 2380 movs r3, #128 @ 0x80 800d8ee: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d8f2: e20a b.n 800dd0a 800d8f4: 697b ldr r3, [r7, #20] 800d8f6: 681b ldr r3, [r3, #0] 800d8f8: 4a69 ldr r2, [pc, #420] @ (800daa0 ) 800d8fa: 4293 cmp r3, r2 800d8fc: d130 bne.n 800d960 800d8fe: 4b67 ldr r3, [pc, #412] @ (800da9c ) 800d900: 6d5b ldr r3, [r3, #84] @ 0x54 800d902: f003 0307 and.w r3, r3, #7 800d906: 2b05 cmp r3, #5 800d908: d826 bhi.n 800d958 800d90a: a201 add r2, pc, #4 @ (adr r2, 800d910 ) 800d90c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800d910: 0800d929 .word 0x0800d929 800d914: 0800d931 .word 0x0800d931 800d918: 0800d939 .word 0x0800d939 800d91c: 0800d941 .word 0x0800d941 800d920: 0800d949 .word 0x0800d949 800d924: 0800d951 .word 0x0800d951 800d928: 2300 movs r3, #0 800d92a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d92e: e1ec b.n 800dd0a 800d930: 2304 movs r3, #4 800d932: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d936: e1e8 b.n 800dd0a 800d938: 2308 movs r3, #8 800d93a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d93e: e1e4 b.n 800dd0a 800d940: 2310 movs r3, #16 800d942: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d946: e1e0 b.n 800dd0a 800d948: 2320 movs r3, #32 800d94a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d94e: e1dc b.n 800dd0a 800d950: 2340 movs r3, #64 @ 0x40 800d952: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d956: e1d8 b.n 800dd0a 800d958: 2380 movs r3, #128 @ 0x80 800d95a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d95e: e1d4 b.n 800dd0a 800d960: 697b ldr r3, [r7, #20] 800d962: 681b ldr r3, [r3, #0] 800d964: 4a4f ldr r2, [pc, #316] @ (800daa4 ) 800d966: 4293 cmp r3, r2 800d968: d130 bne.n 800d9cc 800d96a: 4b4c ldr r3, [pc, #304] @ (800da9c ) 800d96c: 6d5b ldr r3, [r3, #84] @ 0x54 800d96e: f003 0307 and.w r3, r3, #7 800d972: 2b05 cmp r3, #5 800d974: d826 bhi.n 800d9c4 800d976: a201 add r2, pc, #4 @ (adr r2, 800d97c ) 800d978: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800d97c: 0800d995 .word 0x0800d995 800d980: 0800d99d .word 0x0800d99d 800d984: 0800d9a5 .word 0x0800d9a5 800d988: 0800d9ad .word 0x0800d9ad 800d98c: 0800d9b5 .word 0x0800d9b5 800d990: 0800d9bd .word 0x0800d9bd 800d994: 2300 movs r3, #0 800d996: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d99a: e1b6 b.n 800dd0a 800d99c: 2304 movs r3, #4 800d99e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d9a2: e1b2 b.n 800dd0a 800d9a4: 2308 movs r3, #8 800d9a6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d9aa: e1ae b.n 800dd0a 800d9ac: 2310 movs r3, #16 800d9ae: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d9b2: e1aa b.n 800dd0a 800d9b4: 2320 movs r3, #32 800d9b6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d9ba: e1a6 b.n 800dd0a 800d9bc: 2340 movs r3, #64 @ 0x40 800d9be: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d9c2: e1a2 b.n 800dd0a 800d9c4: 2380 movs r3, #128 @ 0x80 800d9c6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800d9ca: e19e b.n 800dd0a 800d9cc: 697b ldr r3, [r7, #20] 800d9ce: 681b ldr r3, [r3, #0] 800d9d0: 4a35 ldr r2, [pc, #212] @ (800daa8 ) 800d9d2: 4293 cmp r3, r2 800d9d4: d130 bne.n 800da38 800d9d6: 4b31 ldr r3, [pc, #196] @ (800da9c ) 800d9d8: 6d5b ldr r3, [r3, #84] @ 0x54 800d9da: f003 0307 and.w r3, r3, #7 800d9de: 2b05 cmp r3, #5 800d9e0: d826 bhi.n 800da30 800d9e2: a201 add r2, pc, #4 @ (adr r2, 800d9e8 ) 800d9e4: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800d9e8: 0800da01 .word 0x0800da01 800d9ec: 0800da09 .word 0x0800da09 800d9f0: 0800da11 .word 0x0800da11 800d9f4: 0800da19 .word 0x0800da19 800d9f8: 0800da21 .word 0x0800da21 800d9fc: 0800da29 .word 0x0800da29 800da00: 2300 movs r3, #0 800da02: f887 3043 strb.w r3, [r7, #67] @ 0x43 800da06: e180 b.n 800dd0a 800da08: 2304 movs r3, #4 800da0a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800da0e: e17c b.n 800dd0a 800da10: 2308 movs r3, #8 800da12: f887 3043 strb.w r3, [r7, #67] @ 0x43 800da16: e178 b.n 800dd0a 800da18: 2310 movs r3, #16 800da1a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800da1e: e174 b.n 800dd0a 800da20: 2320 movs r3, #32 800da22: f887 3043 strb.w r3, [r7, #67] @ 0x43 800da26: e170 b.n 800dd0a 800da28: 2340 movs r3, #64 @ 0x40 800da2a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800da2e: e16c b.n 800dd0a 800da30: 2380 movs r3, #128 @ 0x80 800da32: f887 3043 strb.w r3, [r7, #67] @ 0x43 800da36: e168 b.n 800dd0a 800da38: 697b ldr r3, [r7, #20] 800da3a: 681b ldr r3, [r3, #0] 800da3c: 4a1b ldr r2, [pc, #108] @ (800daac ) 800da3e: 4293 cmp r3, r2 800da40: d142 bne.n 800dac8 800da42: 4b16 ldr r3, [pc, #88] @ (800da9c ) 800da44: 6d5b ldr r3, [r3, #84] @ 0x54 800da46: f003 0307 and.w r3, r3, #7 800da4a: 2b05 cmp r3, #5 800da4c: d838 bhi.n 800dac0 800da4e: a201 add r2, pc, #4 @ (adr r2, 800da54 ) 800da50: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800da54: 0800da6d .word 0x0800da6d 800da58: 0800da75 .word 0x0800da75 800da5c: 0800da7d .word 0x0800da7d 800da60: 0800da85 .word 0x0800da85 800da64: 0800dab1 .word 0x0800dab1 800da68: 0800dab9 .word 0x0800dab9 800da6c: 2300 movs r3, #0 800da6e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800da72: e14a b.n 800dd0a 800da74: 2304 movs r3, #4 800da76: f887 3043 strb.w r3, [r7, #67] @ 0x43 800da7a: e146 b.n 800dd0a 800da7c: 2308 movs r3, #8 800da7e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800da82: e142 b.n 800dd0a 800da84: 2310 movs r3, #16 800da86: f887 3043 strb.w r3, [r7, #67] @ 0x43 800da8a: e13e b.n 800dd0a 800da8c: cfff69f3 .word 0xcfff69f3 800da90: 58000c00 .word 0x58000c00 800da94: 11fff4ff .word 0x11fff4ff 800da98: 40011000 .word 0x40011000 800da9c: 58024400 .word 0x58024400 800daa0: 40004400 .word 0x40004400 800daa4: 40004800 .word 0x40004800 800daa8: 40004c00 .word 0x40004c00 800daac: 40005000 .word 0x40005000 800dab0: 2320 movs r3, #32 800dab2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dab6: e128 b.n 800dd0a 800dab8: 2340 movs r3, #64 @ 0x40 800daba: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dabe: e124 b.n 800dd0a 800dac0: 2380 movs r3, #128 @ 0x80 800dac2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dac6: e120 b.n 800dd0a 800dac8: 697b ldr r3, [r7, #20] 800daca: 681b ldr r3, [r3, #0] 800dacc: 4acb ldr r2, [pc, #812] @ (800ddfc ) 800dace: 4293 cmp r3, r2 800dad0: d176 bne.n 800dbc0 800dad2: 4bcb ldr r3, [pc, #812] @ (800de00 ) 800dad4: 6d5b ldr r3, [r3, #84] @ 0x54 800dad6: f003 0338 and.w r3, r3, #56 @ 0x38 800dada: 2b28 cmp r3, #40 @ 0x28 800dadc: d86c bhi.n 800dbb8 800dade: a201 add r2, pc, #4 @ (adr r2, 800dae4 ) 800dae0: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800dae4: 0800db89 .word 0x0800db89 800dae8: 0800dbb9 .word 0x0800dbb9 800daec: 0800dbb9 .word 0x0800dbb9 800daf0: 0800dbb9 .word 0x0800dbb9 800daf4: 0800dbb9 .word 0x0800dbb9 800daf8: 0800dbb9 .word 0x0800dbb9 800dafc: 0800dbb9 .word 0x0800dbb9 800db00: 0800dbb9 .word 0x0800dbb9 800db04: 0800db91 .word 0x0800db91 800db08: 0800dbb9 .word 0x0800dbb9 800db0c: 0800dbb9 .word 0x0800dbb9 800db10: 0800dbb9 .word 0x0800dbb9 800db14: 0800dbb9 .word 0x0800dbb9 800db18: 0800dbb9 .word 0x0800dbb9 800db1c: 0800dbb9 .word 0x0800dbb9 800db20: 0800dbb9 .word 0x0800dbb9 800db24: 0800db99 .word 0x0800db99 800db28: 0800dbb9 .word 0x0800dbb9 800db2c: 0800dbb9 .word 0x0800dbb9 800db30: 0800dbb9 .word 0x0800dbb9 800db34: 0800dbb9 .word 0x0800dbb9 800db38: 0800dbb9 .word 0x0800dbb9 800db3c: 0800dbb9 .word 0x0800dbb9 800db40: 0800dbb9 .word 0x0800dbb9 800db44: 0800dba1 .word 0x0800dba1 800db48: 0800dbb9 .word 0x0800dbb9 800db4c: 0800dbb9 .word 0x0800dbb9 800db50: 0800dbb9 .word 0x0800dbb9 800db54: 0800dbb9 .word 0x0800dbb9 800db58: 0800dbb9 .word 0x0800dbb9 800db5c: 0800dbb9 .word 0x0800dbb9 800db60: 0800dbb9 .word 0x0800dbb9 800db64: 0800dba9 .word 0x0800dba9 800db68: 0800dbb9 .word 0x0800dbb9 800db6c: 0800dbb9 .word 0x0800dbb9 800db70: 0800dbb9 .word 0x0800dbb9 800db74: 0800dbb9 .word 0x0800dbb9 800db78: 0800dbb9 .word 0x0800dbb9 800db7c: 0800dbb9 .word 0x0800dbb9 800db80: 0800dbb9 .word 0x0800dbb9 800db84: 0800dbb1 .word 0x0800dbb1 800db88: 2301 movs r3, #1 800db8a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800db8e: e0bc b.n 800dd0a 800db90: 2304 movs r3, #4 800db92: f887 3043 strb.w r3, [r7, #67] @ 0x43 800db96: e0b8 b.n 800dd0a 800db98: 2308 movs r3, #8 800db9a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800db9e: e0b4 b.n 800dd0a 800dba0: 2310 movs r3, #16 800dba2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dba6: e0b0 b.n 800dd0a 800dba8: 2320 movs r3, #32 800dbaa: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dbae: e0ac b.n 800dd0a 800dbb0: 2340 movs r3, #64 @ 0x40 800dbb2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dbb6: e0a8 b.n 800dd0a 800dbb8: 2380 movs r3, #128 @ 0x80 800dbba: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dbbe: e0a4 b.n 800dd0a 800dbc0: 697b ldr r3, [r7, #20] 800dbc2: 681b ldr r3, [r3, #0] 800dbc4: 4a8f ldr r2, [pc, #572] @ (800de04 ) 800dbc6: 4293 cmp r3, r2 800dbc8: d130 bne.n 800dc2c 800dbca: 4b8d ldr r3, [pc, #564] @ (800de00 ) 800dbcc: 6d5b ldr r3, [r3, #84] @ 0x54 800dbce: f003 0307 and.w r3, r3, #7 800dbd2: 2b05 cmp r3, #5 800dbd4: d826 bhi.n 800dc24 800dbd6: a201 add r2, pc, #4 @ (adr r2, 800dbdc ) 800dbd8: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800dbdc: 0800dbf5 .word 0x0800dbf5 800dbe0: 0800dbfd .word 0x0800dbfd 800dbe4: 0800dc05 .word 0x0800dc05 800dbe8: 0800dc0d .word 0x0800dc0d 800dbec: 0800dc15 .word 0x0800dc15 800dbf0: 0800dc1d .word 0x0800dc1d 800dbf4: 2300 movs r3, #0 800dbf6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dbfa: e086 b.n 800dd0a 800dbfc: 2304 movs r3, #4 800dbfe: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dc02: e082 b.n 800dd0a 800dc04: 2308 movs r3, #8 800dc06: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dc0a: e07e b.n 800dd0a 800dc0c: 2310 movs r3, #16 800dc0e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dc12: e07a b.n 800dd0a 800dc14: 2320 movs r3, #32 800dc16: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dc1a: e076 b.n 800dd0a 800dc1c: 2340 movs r3, #64 @ 0x40 800dc1e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dc22: e072 b.n 800dd0a 800dc24: 2380 movs r3, #128 @ 0x80 800dc26: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dc2a: e06e b.n 800dd0a 800dc2c: 697b ldr r3, [r7, #20] 800dc2e: 681b ldr r3, [r3, #0] 800dc30: 4a75 ldr r2, [pc, #468] @ (800de08 ) 800dc32: 4293 cmp r3, r2 800dc34: d130 bne.n 800dc98 800dc36: 4b72 ldr r3, [pc, #456] @ (800de00 ) 800dc38: 6d5b ldr r3, [r3, #84] @ 0x54 800dc3a: f003 0307 and.w r3, r3, #7 800dc3e: 2b05 cmp r3, #5 800dc40: d826 bhi.n 800dc90 800dc42: a201 add r2, pc, #4 @ (adr r2, 800dc48 ) 800dc44: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800dc48: 0800dc61 .word 0x0800dc61 800dc4c: 0800dc69 .word 0x0800dc69 800dc50: 0800dc71 .word 0x0800dc71 800dc54: 0800dc79 .word 0x0800dc79 800dc58: 0800dc81 .word 0x0800dc81 800dc5c: 0800dc89 .word 0x0800dc89 800dc60: 2300 movs r3, #0 800dc62: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dc66: e050 b.n 800dd0a 800dc68: 2304 movs r3, #4 800dc6a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dc6e: e04c b.n 800dd0a 800dc70: 2308 movs r3, #8 800dc72: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dc76: e048 b.n 800dd0a 800dc78: 2310 movs r3, #16 800dc7a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dc7e: e044 b.n 800dd0a 800dc80: 2320 movs r3, #32 800dc82: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dc86: e040 b.n 800dd0a 800dc88: 2340 movs r3, #64 @ 0x40 800dc8a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dc8e: e03c b.n 800dd0a 800dc90: 2380 movs r3, #128 @ 0x80 800dc92: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dc96: e038 b.n 800dd0a 800dc98: 697b ldr r3, [r7, #20] 800dc9a: 681b ldr r3, [r3, #0] 800dc9c: 4a5b ldr r2, [pc, #364] @ (800de0c ) 800dc9e: 4293 cmp r3, r2 800dca0: d130 bne.n 800dd04 800dca2: 4b57 ldr r3, [pc, #348] @ (800de00 ) 800dca4: 6d9b ldr r3, [r3, #88] @ 0x58 800dca6: f003 0307 and.w r3, r3, #7 800dcaa: 2b05 cmp r3, #5 800dcac: d826 bhi.n 800dcfc 800dcae: a201 add r2, pc, #4 @ (adr r2, 800dcb4 ) 800dcb0: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800dcb4: 0800dccd .word 0x0800dccd 800dcb8: 0800dcd5 .word 0x0800dcd5 800dcbc: 0800dcdd .word 0x0800dcdd 800dcc0: 0800dce5 .word 0x0800dce5 800dcc4: 0800dced .word 0x0800dced 800dcc8: 0800dcf5 .word 0x0800dcf5 800dccc: 2302 movs r3, #2 800dcce: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dcd2: e01a b.n 800dd0a 800dcd4: 2304 movs r3, #4 800dcd6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dcda: e016 b.n 800dd0a 800dcdc: 2308 movs r3, #8 800dcde: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dce2: e012 b.n 800dd0a 800dce4: 2310 movs r3, #16 800dce6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dcea: e00e b.n 800dd0a 800dcec: 2320 movs r3, #32 800dcee: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dcf2: e00a b.n 800dd0a 800dcf4: 2340 movs r3, #64 @ 0x40 800dcf6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dcfa: e006 b.n 800dd0a 800dcfc: 2380 movs r3, #128 @ 0x80 800dcfe: f887 3043 strb.w r3, [r7, #67] @ 0x43 800dd02: e002 b.n 800dd0a 800dd04: 2380 movs r3, #128 @ 0x80 800dd06: f887 3043 strb.w r3, [r7, #67] @ 0x43 /* Check LPUART instance */ if (UART_INSTANCE_LOWPOWER(huart)) 800dd0a: 697b ldr r3, [r7, #20] 800dd0c: 681b ldr r3, [r3, #0] 800dd0e: 4a3f ldr r2, [pc, #252] @ (800de0c ) 800dd10: 4293 cmp r3, r2 800dd12: f040 80f8 bne.w 800df06 { /* Retrieve frequency clock */ switch (clocksource) 800dd16: f897 3043 ldrb.w r3, [r7, #67] @ 0x43 800dd1a: 2b20 cmp r3, #32 800dd1c: dc46 bgt.n 800ddac 800dd1e: 2b02 cmp r3, #2 800dd20: f2c0 8082 blt.w 800de28 800dd24: 3b02 subs r3, #2 800dd26: 2b1e cmp r3, #30 800dd28: d87e bhi.n 800de28 800dd2a: a201 add r2, pc, #4 @ (adr r2, 800dd30 ) 800dd2c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800dd30: 0800ddb3 .word 0x0800ddb3 800dd34: 0800de29 .word 0x0800de29 800dd38: 0800ddbb .word 0x0800ddbb 800dd3c: 0800de29 .word 0x0800de29 800dd40: 0800de29 .word 0x0800de29 800dd44: 0800de29 .word 0x0800de29 800dd48: 0800ddcb .word 0x0800ddcb 800dd4c: 0800de29 .word 0x0800de29 800dd50: 0800de29 .word 0x0800de29 800dd54: 0800de29 .word 0x0800de29 800dd58: 0800de29 .word 0x0800de29 800dd5c: 0800de29 .word 0x0800de29 800dd60: 0800de29 .word 0x0800de29 800dd64: 0800de29 .word 0x0800de29 800dd68: 0800dddb .word 0x0800dddb 800dd6c: 0800de29 .word 0x0800de29 800dd70: 0800de29 .word 0x0800de29 800dd74: 0800de29 .word 0x0800de29 800dd78: 0800de29 .word 0x0800de29 800dd7c: 0800de29 .word 0x0800de29 800dd80: 0800de29 .word 0x0800de29 800dd84: 0800de29 .word 0x0800de29 800dd88: 0800de29 .word 0x0800de29 800dd8c: 0800de29 .word 0x0800de29 800dd90: 0800de29 .word 0x0800de29 800dd94: 0800de29 .word 0x0800de29 800dd98: 0800de29 .word 0x0800de29 800dd9c: 0800de29 .word 0x0800de29 800dda0: 0800de29 .word 0x0800de29 800dda4: 0800de29 .word 0x0800de29 800dda8: 0800de1b .word 0x0800de1b 800ddac: 2b40 cmp r3, #64 @ 0x40 800ddae: d037 beq.n 800de20 800ddb0: e03a b.n 800de28 { case UART_CLOCKSOURCE_D3PCLK1: pclk = HAL_RCCEx_GetD3PCLK1Freq(); 800ddb2: f7fe f887 bl 800bec4 800ddb6: 63f8 str r0, [r7, #60] @ 0x3c break; 800ddb8: e03c b.n 800de34 case UART_CLOCKSOURCE_PLL2: HAL_RCCEx_GetPLL2ClockFreq(&pll2_clocks); 800ddba: f107 0324 add.w r3, r7, #36 @ 0x24 800ddbe: 4618 mov r0, r3 800ddc0: f7fe f896 bl 800bef0 pclk = pll2_clocks.PLL2_Q_Frequency; 800ddc4: 6abb ldr r3, [r7, #40] @ 0x28 800ddc6: 63fb str r3, [r7, #60] @ 0x3c break; 800ddc8: e034 b.n 800de34 case UART_CLOCKSOURCE_PLL3: HAL_RCCEx_GetPLL3ClockFreq(&pll3_clocks); 800ddca: f107 0318 add.w r3, r7, #24 800ddce: 4618 mov r0, r3 800ddd0: f7fe f9e2 bl 800c198 pclk = pll3_clocks.PLL3_Q_Frequency; 800ddd4: 69fb ldr r3, [r7, #28] 800ddd6: 63fb str r3, [r7, #60] @ 0x3c break; 800ddd8: e02c b.n 800de34 case UART_CLOCKSOURCE_HSI: if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800ddda: 4b09 ldr r3, [pc, #36] @ (800de00 ) 800dddc: 681b ldr r3, [r3, #0] 800ddde: f003 0320 and.w r3, r3, #32 800dde2: 2b00 cmp r3, #0 800dde4: d016 beq.n 800de14 { pclk = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)); 800dde6: 4b06 ldr r3, [pc, #24] @ (800de00 ) 800dde8: 681b ldr r3, [r3, #0] 800ddea: 08db lsrs r3, r3, #3 800ddec: f003 0303 and.w r3, r3, #3 800ddf0: 4a07 ldr r2, [pc, #28] @ (800de10 ) 800ddf2: fa22 f303 lsr.w r3, r2, r3 800ddf6: 63fb str r3, [r7, #60] @ 0x3c } else { pclk = (uint32_t) HSI_VALUE; } break; 800ddf8: e01c b.n 800de34 800ddfa: bf00 nop 800ddfc: 40011400 .word 0x40011400 800de00: 58024400 .word 0x58024400 800de04: 40007800 .word 0x40007800 800de08: 40007c00 .word 0x40007c00 800de0c: 58000c00 .word 0x58000c00 800de10: 03d09000 .word 0x03d09000 pclk = (uint32_t) HSI_VALUE; 800de14: 4b9d ldr r3, [pc, #628] @ (800e08c ) 800de16: 63fb str r3, [r7, #60] @ 0x3c break; 800de18: e00c b.n 800de34 case UART_CLOCKSOURCE_CSI: pclk = (uint32_t) CSI_VALUE; 800de1a: 4b9d ldr r3, [pc, #628] @ (800e090 ) 800de1c: 63fb str r3, [r7, #60] @ 0x3c break; 800de1e: e009 b.n 800de34 case UART_CLOCKSOURCE_LSE: pclk = (uint32_t) LSE_VALUE; 800de20: f44f 4300 mov.w r3, #32768 @ 0x8000 800de24: 63fb str r3, [r7, #60] @ 0x3c break; 800de26: e005 b.n 800de34 default: pclk = 0U; 800de28: 2300 movs r3, #0 800de2a: 63fb str r3, [r7, #60] @ 0x3c ret = HAL_ERROR; 800de2c: 2301 movs r3, #1 800de2e: f887 3042 strb.w r3, [r7, #66] @ 0x42 break; 800de32: bf00 nop } /* If proper clock source reported */ if (pclk != 0U) 800de34: 6bfb ldr r3, [r7, #60] @ 0x3c 800de36: 2b00 cmp r3, #0 800de38: f000 81de beq.w 800e1f8 { /* Compute clock after Prescaler */ lpuart_ker_ck_pres = (pclk / UARTPrescTable[huart->Init.ClockPrescaler]); 800de3c: 697b ldr r3, [r7, #20] 800de3e: 6a5b ldr r3, [r3, #36] @ 0x24 800de40: 4a94 ldr r2, [pc, #592] @ (800e094 ) 800de42: f832 3013 ldrh.w r3, [r2, r3, lsl #1] 800de46: 461a mov r2, r3 800de48: 6bfb ldr r3, [r7, #60] @ 0x3c 800de4a: fbb3 f3f2 udiv r3, r3, r2 800de4e: 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)) || 800de50: 697b ldr r3, [r7, #20] 800de52: 685a ldr r2, [r3, #4] 800de54: 4613 mov r3, r2 800de56: 005b lsls r3, r3, #1 800de58: 4413 add r3, r2 800de5a: 6b3a ldr r2, [r7, #48] @ 0x30 800de5c: 429a cmp r2, r3 800de5e: d305 bcc.n 800de6c (lpuart_ker_ck_pres > (4096U * huart->Init.BaudRate))) 800de60: 697b ldr r3, [r7, #20] 800de62: 685b ldr r3, [r3, #4] 800de64: 031b lsls r3, r3, #12 if ((lpuart_ker_ck_pres < (3U * huart->Init.BaudRate)) || 800de66: 6b3a ldr r2, [r7, #48] @ 0x30 800de68: 429a cmp r2, r3 800de6a: d903 bls.n 800de74 { ret = HAL_ERROR; 800de6c: 2301 movs r3, #1 800de6e: f887 3042 strb.w r3, [r7, #66] @ 0x42 800de72: e1c1 b.n 800e1f8 } 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)); 800de74: 6bfb ldr r3, [r7, #60] @ 0x3c 800de76: 2200 movs r2, #0 800de78: 60bb str r3, [r7, #8] 800de7a: 60fa str r2, [r7, #12] 800de7c: 697b ldr r3, [r7, #20] 800de7e: 6a5b ldr r3, [r3, #36] @ 0x24 800de80: 4a84 ldr r2, [pc, #528] @ (800e094 ) 800de82: f832 3013 ldrh.w r3, [r2, r3, lsl #1] 800de86: b29b uxth r3, r3 800de88: 2200 movs r2, #0 800de8a: 603b str r3, [r7, #0] 800de8c: 607a str r2, [r7, #4] 800de8e: e9d7 2300 ldrd r2, r3, [r7] 800de92: e9d7 0102 ldrd r0, r1, [r7, #8] 800de96: f7f2 fc47 bl 8000728 <__aeabi_uldivmod> 800de9a: 4602 mov r2, r0 800de9c: 460b mov r3, r1 800de9e: 4610 mov r0, r2 800dea0: 4619 mov r1, r3 800dea2: f04f 0200 mov.w r2, #0 800dea6: f04f 0300 mov.w r3, #0 800deaa: 020b lsls r3, r1, #8 800deac: ea43 6310 orr.w r3, r3, r0, lsr #24 800deb0: 0202 lsls r2, r0, #8 800deb2: 6979 ldr r1, [r7, #20] 800deb4: 6849 ldr r1, [r1, #4] 800deb6: 0849 lsrs r1, r1, #1 800deb8: 2000 movs r0, #0 800deba: 460c mov r4, r1 800debc: 4605 mov r5, r0 800debe: eb12 0804 adds.w r8, r2, r4 800dec2: eb43 0905 adc.w r9, r3, r5 800dec6: 697b ldr r3, [r7, #20] 800dec8: 685b ldr r3, [r3, #4] 800deca: 2200 movs r2, #0 800decc: 469a mov sl, r3 800dece: 4693 mov fp, r2 800ded0: 4652 mov r2, sl 800ded2: 465b mov r3, fp 800ded4: 4640 mov r0, r8 800ded6: 4649 mov r1, r9 800ded8: f7f2 fc26 bl 8000728 <__aeabi_uldivmod> 800dedc: 4602 mov r2, r0 800dede: 460b mov r3, r1 800dee0: 4613 mov r3, r2 800dee2: 63bb str r3, [r7, #56] @ 0x38 if ((usartdiv >= LPUART_BRR_MIN) && (usartdiv <= LPUART_BRR_MAX)) 800dee4: 6bbb ldr r3, [r7, #56] @ 0x38 800dee6: f5b3 7f40 cmp.w r3, #768 @ 0x300 800deea: d308 bcc.n 800defe 800deec: 6bbb ldr r3, [r7, #56] @ 0x38 800deee: f5b3 1f80 cmp.w r3, #1048576 @ 0x100000 800def2: d204 bcs.n 800defe { huart->Instance->BRR = usartdiv; 800def4: 697b ldr r3, [r7, #20] 800def6: 681b ldr r3, [r3, #0] 800def8: 6bba ldr r2, [r7, #56] @ 0x38 800defa: 60da str r2, [r3, #12] 800defc: e17c b.n 800e1f8 } else { ret = HAL_ERROR; 800defe: 2301 movs r3, #1 800df00: f887 3042 strb.w r3, [r7, #66] @ 0x42 800df04: e178 b.n 800e1f8 } /* 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) 800df06: 697b ldr r3, [r7, #20] 800df08: 69db ldr r3, [r3, #28] 800df0a: f5b3 4f00 cmp.w r3, #32768 @ 0x8000 800df0e: f040 80c5 bne.w 800e09c { switch (clocksource) 800df12: f897 3043 ldrb.w r3, [r7, #67] @ 0x43 800df16: 2b20 cmp r3, #32 800df18: dc48 bgt.n 800dfac 800df1a: 2b00 cmp r3, #0 800df1c: db7b blt.n 800e016 800df1e: 2b20 cmp r3, #32 800df20: d879 bhi.n 800e016 800df22: a201 add r2, pc, #4 @ (adr r2, 800df28 ) 800df24: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800df28: 0800dfb3 .word 0x0800dfb3 800df2c: 0800dfbb .word 0x0800dfbb 800df30: 0800e017 .word 0x0800e017 800df34: 0800e017 .word 0x0800e017 800df38: 0800dfc3 .word 0x0800dfc3 800df3c: 0800e017 .word 0x0800e017 800df40: 0800e017 .word 0x0800e017 800df44: 0800e017 .word 0x0800e017 800df48: 0800dfd3 .word 0x0800dfd3 800df4c: 0800e017 .word 0x0800e017 800df50: 0800e017 .word 0x0800e017 800df54: 0800e017 .word 0x0800e017 800df58: 0800e017 .word 0x0800e017 800df5c: 0800e017 .word 0x0800e017 800df60: 0800e017 .word 0x0800e017 800df64: 0800e017 .word 0x0800e017 800df68: 0800dfe3 .word 0x0800dfe3 800df6c: 0800e017 .word 0x0800e017 800df70: 0800e017 .word 0x0800e017 800df74: 0800e017 .word 0x0800e017 800df78: 0800e017 .word 0x0800e017 800df7c: 0800e017 .word 0x0800e017 800df80: 0800e017 .word 0x0800e017 800df84: 0800e017 .word 0x0800e017 800df88: 0800e017 .word 0x0800e017 800df8c: 0800e017 .word 0x0800e017 800df90: 0800e017 .word 0x0800e017 800df94: 0800e017 .word 0x0800e017 800df98: 0800e017 .word 0x0800e017 800df9c: 0800e017 .word 0x0800e017 800dfa0: 0800e017 .word 0x0800e017 800dfa4: 0800e017 .word 0x0800e017 800dfa8: 0800e009 .word 0x0800e009 800dfac: 2b40 cmp r3, #64 @ 0x40 800dfae: d02e beq.n 800e00e 800dfb0: e031 b.n 800e016 { case UART_CLOCKSOURCE_D2PCLK1: pclk = HAL_RCC_GetPCLK1Freq(); 800dfb2: f7fc fd2b bl 800aa0c 800dfb6: 63f8 str r0, [r7, #60] @ 0x3c break; 800dfb8: e033 b.n 800e022 case UART_CLOCKSOURCE_D2PCLK2: pclk = HAL_RCC_GetPCLK2Freq(); 800dfba: f7fc fd3d bl 800aa38 800dfbe: 63f8 str r0, [r7, #60] @ 0x3c break; 800dfc0: e02f b.n 800e022 case UART_CLOCKSOURCE_PLL2: HAL_RCCEx_GetPLL2ClockFreq(&pll2_clocks); 800dfc2: f107 0324 add.w r3, r7, #36 @ 0x24 800dfc6: 4618 mov r0, r3 800dfc8: f7fd ff92 bl 800bef0 pclk = pll2_clocks.PLL2_Q_Frequency; 800dfcc: 6abb ldr r3, [r7, #40] @ 0x28 800dfce: 63fb str r3, [r7, #60] @ 0x3c break; 800dfd0: e027 b.n 800e022 case UART_CLOCKSOURCE_PLL3: HAL_RCCEx_GetPLL3ClockFreq(&pll3_clocks); 800dfd2: f107 0318 add.w r3, r7, #24 800dfd6: 4618 mov r0, r3 800dfd8: f7fe f8de bl 800c198 pclk = pll3_clocks.PLL3_Q_Frequency; 800dfdc: 69fb ldr r3, [r7, #28] 800dfde: 63fb str r3, [r7, #60] @ 0x3c break; 800dfe0: e01f b.n 800e022 case UART_CLOCKSOURCE_HSI: if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800dfe2: 4b2d ldr r3, [pc, #180] @ (800e098 ) 800dfe4: 681b ldr r3, [r3, #0] 800dfe6: f003 0320 and.w r3, r3, #32 800dfea: 2b00 cmp r3, #0 800dfec: d009 beq.n 800e002 { pclk = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)); 800dfee: 4b2a ldr r3, [pc, #168] @ (800e098 ) 800dff0: 681b ldr r3, [r3, #0] 800dff2: 08db lsrs r3, r3, #3 800dff4: f003 0303 and.w r3, r3, #3 800dff8: 4a24 ldr r2, [pc, #144] @ (800e08c ) 800dffa: fa22 f303 lsr.w r3, r2, r3 800dffe: 63fb str r3, [r7, #60] @ 0x3c } else { pclk = (uint32_t) HSI_VALUE; } break; 800e000: e00f b.n 800e022 pclk = (uint32_t) HSI_VALUE; 800e002: 4b22 ldr r3, [pc, #136] @ (800e08c ) 800e004: 63fb str r3, [r7, #60] @ 0x3c break; 800e006: e00c b.n 800e022 case UART_CLOCKSOURCE_CSI: pclk = (uint32_t) CSI_VALUE; 800e008: 4b21 ldr r3, [pc, #132] @ (800e090 ) 800e00a: 63fb str r3, [r7, #60] @ 0x3c break; 800e00c: e009 b.n 800e022 case UART_CLOCKSOURCE_LSE: pclk = (uint32_t) LSE_VALUE; 800e00e: f44f 4300 mov.w r3, #32768 @ 0x8000 800e012: 63fb str r3, [r7, #60] @ 0x3c break; 800e014: e005 b.n 800e022 default: pclk = 0U; 800e016: 2300 movs r3, #0 800e018: 63fb str r3, [r7, #60] @ 0x3c ret = HAL_ERROR; 800e01a: 2301 movs r3, #1 800e01c: f887 3042 strb.w r3, [r7, #66] @ 0x42 break; 800e020: bf00 nop } /* USARTDIV must be greater than or equal to 0d16 */ if (pclk != 0U) 800e022: 6bfb ldr r3, [r7, #60] @ 0x3c 800e024: 2b00 cmp r3, #0 800e026: f000 80e7 beq.w 800e1f8 { usartdiv = (uint32_t)(UART_DIV_SAMPLING8(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler)); 800e02a: 697b ldr r3, [r7, #20] 800e02c: 6a5b ldr r3, [r3, #36] @ 0x24 800e02e: 4a19 ldr r2, [pc, #100] @ (800e094 ) 800e030: f832 3013 ldrh.w r3, [r2, r3, lsl #1] 800e034: 461a mov r2, r3 800e036: 6bfb ldr r3, [r7, #60] @ 0x3c 800e038: fbb3 f3f2 udiv r3, r3, r2 800e03c: 005a lsls r2, r3, #1 800e03e: 697b ldr r3, [r7, #20] 800e040: 685b ldr r3, [r3, #4] 800e042: 085b lsrs r3, r3, #1 800e044: 441a add r2, r3 800e046: 697b ldr r3, [r7, #20] 800e048: 685b ldr r3, [r3, #4] 800e04a: fbb2 f3f3 udiv r3, r2, r3 800e04e: 63bb str r3, [r7, #56] @ 0x38 if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX)) 800e050: 6bbb ldr r3, [r7, #56] @ 0x38 800e052: 2b0f cmp r3, #15 800e054: d916 bls.n 800e084 800e056: 6bbb ldr r3, [r7, #56] @ 0x38 800e058: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800e05c: d212 bcs.n 800e084 { brrtemp = (uint16_t)(usartdiv & 0xFFF0U); 800e05e: 6bbb ldr r3, [r7, #56] @ 0x38 800e060: b29b uxth r3, r3 800e062: f023 030f bic.w r3, r3, #15 800e066: 86fb strh r3, [r7, #54] @ 0x36 brrtemp |= (uint16_t)((usartdiv & (uint16_t)0x000FU) >> 1U); 800e068: 6bbb ldr r3, [r7, #56] @ 0x38 800e06a: 085b lsrs r3, r3, #1 800e06c: b29b uxth r3, r3 800e06e: f003 0307 and.w r3, r3, #7 800e072: b29a uxth r2, r3 800e074: 8efb ldrh r3, [r7, #54] @ 0x36 800e076: 4313 orrs r3, r2 800e078: 86fb strh r3, [r7, #54] @ 0x36 huart->Instance->BRR = brrtemp; 800e07a: 697b ldr r3, [r7, #20] 800e07c: 681b ldr r3, [r3, #0] 800e07e: 8efa ldrh r2, [r7, #54] @ 0x36 800e080: 60da str r2, [r3, #12] 800e082: e0b9 b.n 800e1f8 } else { ret = HAL_ERROR; 800e084: 2301 movs r3, #1 800e086: f887 3042 strb.w r3, [r7, #66] @ 0x42 800e08a: e0b5 b.n 800e1f8 800e08c: 03d09000 .word 0x03d09000 800e090: 003d0900 .word 0x003d0900 800e094: 08030a3c .word 0x08030a3c 800e098: 58024400 .word 0x58024400 } } } else { switch (clocksource) 800e09c: f897 3043 ldrb.w r3, [r7, #67] @ 0x43 800e0a0: 2b20 cmp r3, #32 800e0a2: dc49 bgt.n 800e138 800e0a4: 2b00 cmp r3, #0 800e0a6: db7c blt.n 800e1a2 800e0a8: 2b20 cmp r3, #32 800e0aa: d87a bhi.n 800e1a2 800e0ac: a201 add r2, pc, #4 @ (adr r2, 800e0b4 ) 800e0ae: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e0b2: bf00 nop 800e0b4: 0800e13f .word 0x0800e13f 800e0b8: 0800e147 .word 0x0800e147 800e0bc: 0800e1a3 .word 0x0800e1a3 800e0c0: 0800e1a3 .word 0x0800e1a3 800e0c4: 0800e14f .word 0x0800e14f 800e0c8: 0800e1a3 .word 0x0800e1a3 800e0cc: 0800e1a3 .word 0x0800e1a3 800e0d0: 0800e1a3 .word 0x0800e1a3 800e0d4: 0800e15f .word 0x0800e15f 800e0d8: 0800e1a3 .word 0x0800e1a3 800e0dc: 0800e1a3 .word 0x0800e1a3 800e0e0: 0800e1a3 .word 0x0800e1a3 800e0e4: 0800e1a3 .word 0x0800e1a3 800e0e8: 0800e1a3 .word 0x0800e1a3 800e0ec: 0800e1a3 .word 0x0800e1a3 800e0f0: 0800e1a3 .word 0x0800e1a3 800e0f4: 0800e16f .word 0x0800e16f 800e0f8: 0800e1a3 .word 0x0800e1a3 800e0fc: 0800e1a3 .word 0x0800e1a3 800e100: 0800e1a3 .word 0x0800e1a3 800e104: 0800e1a3 .word 0x0800e1a3 800e108: 0800e1a3 .word 0x0800e1a3 800e10c: 0800e1a3 .word 0x0800e1a3 800e110: 0800e1a3 .word 0x0800e1a3 800e114: 0800e1a3 .word 0x0800e1a3 800e118: 0800e1a3 .word 0x0800e1a3 800e11c: 0800e1a3 .word 0x0800e1a3 800e120: 0800e1a3 .word 0x0800e1a3 800e124: 0800e1a3 .word 0x0800e1a3 800e128: 0800e1a3 .word 0x0800e1a3 800e12c: 0800e1a3 .word 0x0800e1a3 800e130: 0800e1a3 .word 0x0800e1a3 800e134: 0800e195 .word 0x0800e195 800e138: 2b40 cmp r3, #64 @ 0x40 800e13a: d02e beq.n 800e19a 800e13c: e031 b.n 800e1a2 { case UART_CLOCKSOURCE_D2PCLK1: pclk = HAL_RCC_GetPCLK1Freq(); 800e13e: f7fc fc65 bl 800aa0c 800e142: 63f8 str r0, [r7, #60] @ 0x3c break; 800e144: e033 b.n 800e1ae case UART_CLOCKSOURCE_D2PCLK2: pclk = HAL_RCC_GetPCLK2Freq(); 800e146: f7fc fc77 bl 800aa38 800e14a: 63f8 str r0, [r7, #60] @ 0x3c break; 800e14c: e02f b.n 800e1ae case UART_CLOCKSOURCE_PLL2: HAL_RCCEx_GetPLL2ClockFreq(&pll2_clocks); 800e14e: f107 0324 add.w r3, r7, #36 @ 0x24 800e152: 4618 mov r0, r3 800e154: f7fd fecc bl 800bef0 pclk = pll2_clocks.PLL2_Q_Frequency; 800e158: 6abb ldr r3, [r7, #40] @ 0x28 800e15a: 63fb str r3, [r7, #60] @ 0x3c break; 800e15c: e027 b.n 800e1ae case UART_CLOCKSOURCE_PLL3: HAL_RCCEx_GetPLL3ClockFreq(&pll3_clocks); 800e15e: f107 0318 add.w r3, r7, #24 800e162: 4618 mov r0, r3 800e164: f7fe f818 bl 800c198 pclk = pll3_clocks.PLL3_Q_Frequency; 800e168: 69fb ldr r3, [r7, #28] 800e16a: 63fb str r3, [r7, #60] @ 0x3c break; 800e16c: e01f b.n 800e1ae case UART_CLOCKSOURCE_HSI: if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800e16e: 4b2d ldr r3, [pc, #180] @ (800e224 ) 800e170: 681b ldr r3, [r3, #0] 800e172: f003 0320 and.w r3, r3, #32 800e176: 2b00 cmp r3, #0 800e178: d009 beq.n 800e18e { pclk = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)); 800e17a: 4b2a ldr r3, [pc, #168] @ (800e224 ) 800e17c: 681b ldr r3, [r3, #0] 800e17e: 08db lsrs r3, r3, #3 800e180: f003 0303 and.w r3, r3, #3 800e184: 4a28 ldr r2, [pc, #160] @ (800e228 ) 800e186: fa22 f303 lsr.w r3, r2, r3 800e18a: 63fb str r3, [r7, #60] @ 0x3c } else { pclk = (uint32_t) HSI_VALUE; } break; 800e18c: e00f b.n 800e1ae pclk = (uint32_t) HSI_VALUE; 800e18e: 4b26 ldr r3, [pc, #152] @ (800e228 ) 800e190: 63fb str r3, [r7, #60] @ 0x3c break; 800e192: e00c b.n 800e1ae case UART_CLOCKSOURCE_CSI: pclk = (uint32_t) CSI_VALUE; 800e194: 4b25 ldr r3, [pc, #148] @ (800e22c ) 800e196: 63fb str r3, [r7, #60] @ 0x3c break; 800e198: e009 b.n 800e1ae case UART_CLOCKSOURCE_LSE: pclk = (uint32_t) LSE_VALUE; 800e19a: f44f 4300 mov.w r3, #32768 @ 0x8000 800e19e: 63fb str r3, [r7, #60] @ 0x3c break; 800e1a0: e005 b.n 800e1ae default: pclk = 0U; 800e1a2: 2300 movs r3, #0 800e1a4: 63fb str r3, [r7, #60] @ 0x3c ret = HAL_ERROR; 800e1a6: 2301 movs r3, #1 800e1a8: f887 3042 strb.w r3, [r7, #66] @ 0x42 break; 800e1ac: bf00 nop } if (pclk != 0U) 800e1ae: 6bfb ldr r3, [r7, #60] @ 0x3c 800e1b0: 2b00 cmp r3, #0 800e1b2: d021 beq.n 800e1f8 { /* USARTDIV must be greater than or equal to 0d16 */ usartdiv = (uint32_t)(UART_DIV_SAMPLING16(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler)); 800e1b4: 697b ldr r3, [r7, #20] 800e1b6: 6a5b ldr r3, [r3, #36] @ 0x24 800e1b8: 4a1d ldr r2, [pc, #116] @ (800e230 ) 800e1ba: f832 3013 ldrh.w r3, [r2, r3, lsl #1] 800e1be: 461a mov r2, r3 800e1c0: 6bfb ldr r3, [r7, #60] @ 0x3c 800e1c2: fbb3 f2f2 udiv r2, r3, r2 800e1c6: 697b ldr r3, [r7, #20] 800e1c8: 685b ldr r3, [r3, #4] 800e1ca: 085b lsrs r3, r3, #1 800e1cc: 441a add r2, r3 800e1ce: 697b ldr r3, [r7, #20] 800e1d0: 685b ldr r3, [r3, #4] 800e1d2: fbb2 f3f3 udiv r3, r2, r3 800e1d6: 63bb str r3, [r7, #56] @ 0x38 if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX)) 800e1d8: 6bbb ldr r3, [r7, #56] @ 0x38 800e1da: 2b0f cmp r3, #15 800e1dc: d909 bls.n 800e1f2 800e1de: 6bbb ldr r3, [r7, #56] @ 0x38 800e1e0: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800e1e4: d205 bcs.n 800e1f2 { huart->Instance->BRR = (uint16_t)usartdiv; 800e1e6: 6bbb ldr r3, [r7, #56] @ 0x38 800e1e8: b29a uxth r2, r3 800e1ea: 697b ldr r3, [r7, #20] 800e1ec: 681b ldr r3, [r3, #0] 800e1ee: 60da str r2, [r3, #12] 800e1f0: e002 b.n 800e1f8 } else { ret = HAL_ERROR; 800e1f2: 2301 movs r3, #1 800e1f4: f887 3042 strb.w r3, [r7, #66] @ 0x42 } } } /* Initialize the number of data to process during RX/TX ISR execution */ huart->NbTxDataToProcess = 1; 800e1f8: 697b ldr r3, [r7, #20] 800e1fa: 2201 movs r2, #1 800e1fc: f8a3 206a strh.w r2, [r3, #106] @ 0x6a huart->NbRxDataToProcess = 1; 800e200: 697b ldr r3, [r7, #20] 800e202: 2201 movs r2, #1 800e204: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 /* Clear ISR function pointers */ huart->RxISR = NULL; 800e208: 697b ldr r3, [r7, #20] 800e20a: 2200 movs r2, #0 800e20c: 675a str r2, [r3, #116] @ 0x74 huart->TxISR = NULL; 800e20e: 697b ldr r3, [r7, #20] 800e210: 2200 movs r2, #0 800e212: 679a str r2, [r3, #120] @ 0x78 return ret; 800e214: f897 3042 ldrb.w r3, [r7, #66] @ 0x42 } 800e218: 4618 mov r0, r3 800e21a: 3748 adds r7, #72 @ 0x48 800e21c: 46bd mov sp, r7 800e21e: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc} 800e222: bf00 nop 800e224: 58024400 .word 0x58024400 800e228: 03d09000 .word 0x03d09000 800e22c: 003d0900 .word 0x003d0900 800e230: 08030a3c .word 0x08030a3c 0800e234 : * @brief Configure the UART peripheral advanced features. * @param huart UART handle. * @retval None */ void UART_AdvFeatureConfig(UART_HandleTypeDef *huart) { 800e234: b480 push {r7} 800e236: b083 sub sp, #12 800e238: af00 add r7, sp, #0 800e23a: 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)) 800e23c: 687b ldr r3, [r7, #4] 800e23e: 6a9b ldr r3, [r3, #40] @ 0x28 800e240: f003 0308 and.w r3, r3, #8 800e244: 2b00 cmp r3, #0 800e246: d00a beq.n 800e25e { assert_param(IS_UART_ADVFEATURE_SWAP(huart->AdvancedInit.Swap)); MODIFY_REG(huart->Instance->CR2, USART_CR2_SWAP, huart->AdvancedInit.Swap); 800e248: 687b ldr r3, [r7, #4] 800e24a: 681b ldr r3, [r3, #0] 800e24c: 685b ldr r3, [r3, #4] 800e24e: f423 4100 bic.w r1, r3, #32768 @ 0x8000 800e252: 687b ldr r3, [r7, #4] 800e254: 6b9a ldr r2, [r3, #56] @ 0x38 800e256: 687b ldr r3, [r7, #4] 800e258: 681b ldr r3, [r3, #0] 800e25a: 430a orrs r2, r1 800e25c: 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)) 800e25e: 687b ldr r3, [r7, #4] 800e260: 6a9b ldr r3, [r3, #40] @ 0x28 800e262: f003 0301 and.w r3, r3, #1 800e266: 2b00 cmp r3, #0 800e268: d00a beq.n 800e280 { assert_param(IS_UART_ADVFEATURE_TXINV(huart->AdvancedInit.TxPinLevelInvert)); MODIFY_REG(huart->Instance->CR2, USART_CR2_TXINV, huart->AdvancedInit.TxPinLevelInvert); 800e26a: 687b ldr r3, [r7, #4] 800e26c: 681b ldr r3, [r3, #0] 800e26e: 685b ldr r3, [r3, #4] 800e270: f423 3100 bic.w r1, r3, #131072 @ 0x20000 800e274: 687b ldr r3, [r7, #4] 800e276: 6ada ldr r2, [r3, #44] @ 0x2c 800e278: 687b ldr r3, [r7, #4] 800e27a: 681b ldr r3, [r3, #0] 800e27c: 430a orrs r2, r1 800e27e: 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)) 800e280: 687b ldr r3, [r7, #4] 800e282: 6a9b ldr r3, [r3, #40] @ 0x28 800e284: f003 0302 and.w r3, r3, #2 800e288: 2b00 cmp r3, #0 800e28a: d00a beq.n 800e2a2 { assert_param(IS_UART_ADVFEATURE_RXINV(huart->AdvancedInit.RxPinLevelInvert)); MODIFY_REG(huart->Instance->CR2, USART_CR2_RXINV, huart->AdvancedInit.RxPinLevelInvert); 800e28c: 687b ldr r3, [r7, #4] 800e28e: 681b ldr r3, [r3, #0] 800e290: 685b ldr r3, [r3, #4] 800e292: f423 3180 bic.w r1, r3, #65536 @ 0x10000 800e296: 687b ldr r3, [r7, #4] 800e298: 6b1a ldr r2, [r3, #48] @ 0x30 800e29a: 687b ldr r3, [r7, #4] 800e29c: 681b ldr r3, [r3, #0] 800e29e: 430a orrs r2, r1 800e2a0: 605a str r2, [r3, #4] } /* if required, configure data inversion */ if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_DATAINVERT_INIT)) 800e2a2: 687b ldr r3, [r7, #4] 800e2a4: 6a9b ldr r3, [r3, #40] @ 0x28 800e2a6: f003 0304 and.w r3, r3, #4 800e2aa: 2b00 cmp r3, #0 800e2ac: d00a beq.n 800e2c4 { assert_param(IS_UART_ADVFEATURE_DATAINV(huart->AdvancedInit.DataInvert)); MODIFY_REG(huart->Instance->CR2, USART_CR2_DATAINV, huart->AdvancedInit.DataInvert); 800e2ae: 687b ldr r3, [r7, #4] 800e2b0: 681b ldr r3, [r3, #0] 800e2b2: 685b ldr r3, [r3, #4] 800e2b4: f423 2180 bic.w r1, r3, #262144 @ 0x40000 800e2b8: 687b ldr r3, [r7, #4] 800e2ba: 6b5a ldr r2, [r3, #52] @ 0x34 800e2bc: 687b ldr r3, [r7, #4] 800e2be: 681b ldr r3, [r3, #0] 800e2c0: 430a orrs r2, r1 800e2c2: 605a str r2, [r3, #4] } /* if required, configure RX overrun detection disabling */ if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_RXOVERRUNDISABLE_INIT)) 800e2c4: 687b ldr r3, [r7, #4] 800e2c6: 6a9b ldr r3, [r3, #40] @ 0x28 800e2c8: f003 0310 and.w r3, r3, #16 800e2cc: 2b00 cmp r3, #0 800e2ce: d00a beq.n 800e2e6 { assert_param(IS_UART_OVERRUN(huart->AdvancedInit.OverrunDisable)); MODIFY_REG(huart->Instance->CR3, USART_CR3_OVRDIS, huart->AdvancedInit.OverrunDisable); 800e2d0: 687b ldr r3, [r7, #4] 800e2d2: 681b ldr r3, [r3, #0] 800e2d4: 689b ldr r3, [r3, #8] 800e2d6: f423 5180 bic.w r1, r3, #4096 @ 0x1000 800e2da: 687b ldr r3, [r7, #4] 800e2dc: 6bda ldr r2, [r3, #60] @ 0x3c 800e2de: 687b ldr r3, [r7, #4] 800e2e0: 681b ldr r3, [r3, #0] 800e2e2: 430a orrs r2, r1 800e2e4: 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)) 800e2e6: 687b ldr r3, [r7, #4] 800e2e8: 6a9b ldr r3, [r3, #40] @ 0x28 800e2ea: f003 0320 and.w r3, r3, #32 800e2ee: 2b00 cmp r3, #0 800e2f0: d00a beq.n 800e308 { assert_param(IS_UART_ADVFEATURE_DMAONRXERROR(huart->AdvancedInit.DMADisableonRxError)); MODIFY_REG(huart->Instance->CR3, USART_CR3_DDRE, huart->AdvancedInit.DMADisableonRxError); 800e2f2: 687b ldr r3, [r7, #4] 800e2f4: 681b ldr r3, [r3, #0] 800e2f6: 689b ldr r3, [r3, #8] 800e2f8: f423 5100 bic.w r1, r3, #8192 @ 0x2000 800e2fc: 687b ldr r3, [r7, #4] 800e2fe: 6c1a ldr r2, [r3, #64] @ 0x40 800e300: 687b ldr r3, [r7, #4] 800e302: 681b ldr r3, [r3, #0] 800e304: 430a orrs r2, r1 800e306: 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)) 800e308: 687b ldr r3, [r7, #4] 800e30a: 6a9b ldr r3, [r3, #40] @ 0x28 800e30c: f003 0340 and.w r3, r3, #64 @ 0x40 800e310: 2b00 cmp r3, #0 800e312: d01a beq.n 800e34a { 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); 800e314: 687b ldr r3, [r7, #4] 800e316: 681b ldr r3, [r3, #0] 800e318: 685b ldr r3, [r3, #4] 800e31a: f423 1180 bic.w r1, r3, #1048576 @ 0x100000 800e31e: 687b ldr r3, [r7, #4] 800e320: 6c5a ldr r2, [r3, #68] @ 0x44 800e322: 687b ldr r3, [r7, #4] 800e324: 681b ldr r3, [r3, #0] 800e326: 430a orrs r2, r1 800e328: 605a str r2, [r3, #4] /* set auto Baudrate detection parameters if detection is enabled */ if (huart->AdvancedInit.AutoBaudRateEnable == UART_ADVFEATURE_AUTOBAUDRATE_ENABLE) 800e32a: 687b ldr r3, [r7, #4] 800e32c: 6c5b ldr r3, [r3, #68] @ 0x44 800e32e: f5b3 1f80 cmp.w r3, #1048576 @ 0x100000 800e332: d10a bne.n 800e34a { assert_param(IS_UART_ADVFEATURE_AUTOBAUDRATEMODE(huart->AdvancedInit.AutoBaudRateMode)); MODIFY_REG(huart->Instance->CR2, USART_CR2_ABRMODE, huart->AdvancedInit.AutoBaudRateMode); 800e334: 687b ldr r3, [r7, #4] 800e336: 681b ldr r3, [r3, #0] 800e338: 685b ldr r3, [r3, #4] 800e33a: f423 01c0 bic.w r1, r3, #6291456 @ 0x600000 800e33e: 687b ldr r3, [r7, #4] 800e340: 6c9a ldr r2, [r3, #72] @ 0x48 800e342: 687b ldr r3, [r7, #4] 800e344: 681b ldr r3, [r3, #0] 800e346: 430a orrs r2, r1 800e348: 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)) 800e34a: 687b ldr r3, [r7, #4] 800e34c: 6a9b ldr r3, [r3, #40] @ 0x28 800e34e: f003 0380 and.w r3, r3, #128 @ 0x80 800e352: 2b00 cmp r3, #0 800e354: d00a beq.n 800e36c { assert_param(IS_UART_ADVFEATURE_MSBFIRST(huart->AdvancedInit.MSBFirst)); MODIFY_REG(huart->Instance->CR2, USART_CR2_MSBFIRST, huart->AdvancedInit.MSBFirst); 800e356: 687b ldr r3, [r7, #4] 800e358: 681b ldr r3, [r3, #0] 800e35a: 685b ldr r3, [r3, #4] 800e35c: f423 2100 bic.w r1, r3, #524288 @ 0x80000 800e360: 687b ldr r3, [r7, #4] 800e362: 6cda ldr r2, [r3, #76] @ 0x4c 800e364: 687b ldr r3, [r7, #4] 800e366: 681b ldr r3, [r3, #0] 800e368: 430a orrs r2, r1 800e36a: 605a str r2, [r3, #4] } } 800e36c: bf00 nop 800e36e: 370c adds r7, #12 800e370: 46bd mov sp, r7 800e372: f85d 7b04 ldr.w r7, [sp], #4 800e376: 4770 bx lr 0800e378 : * @brief Check the UART Idle State. * @param huart UART handle. * @retval HAL status */ HAL_StatusTypeDef UART_CheckIdleState(UART_HandleTypeDef *huart) { 800e378: b580 push {r7, lr} 800e37a: b098 sub sp, #96 @ 0x60 800e37c: af02 add r7, sp, #8 800e37e: 6078 str r0, [r7, #4] uint32_t tickstart; /* Initialize the UART ErrorCode */ huart->ErrorCode = HAL_UART_ERROR_NONE; 800e380: 687b ldr r3, [r7, #4] 800e382: 2200 movs r2, #0 800e384: f8c3 2090 str.w r2, [r3, #144] @ 0x90 /* Init tickstart for timeout management */ tickstart = HAL_GetTick(); 800e388: f7f6 fe52 bl 8005030 800e38c: 6578 str r0, [r7, #84] @ 0x54 /* Check if the Transmitter is enabled */ if ((huart->Instance->CR1 & USART_CR1_TE) == USART_CR1_TE) 800e38e: 687b ldr r3, [r7, #4] 800e390: 681b ldr r3, [r3, #0] 800e392: 681b ldr r3, [r3, #0] 800e394: f003 0308 and.w r3, r3, #8 800e398: 2b08 cmp r3, #8 800e39a: d12f bne.n 800e3fc { /* Wait until TEACK flag is set */ if (UART_WaitOnFlagUntilTimeout(huart, USART_ISR_TEACK, RESET, tickstart, HAL_UART_TIMEOUT_VALUE) != HAL_OK) 800e39c: f06f 437e mvn.w r3, #4261412864 @ 0xfe000000 800e3a0: 9300 str r3, [sp, #0] 800e3a2: 6d7b ldr r3, [r7, #84] @ 0x54 800e3a4: 2200 movs r2, #0 800e3a6: f44f 1100 mov.w r1, #2097152 @ 0x200000 800e3aa: 6878 ldr r0, [r7, #4] 800e3ac: f000 f88e bl 800e4cc 800e3b0: 4603 mov r3, r0 800e3b2: 2b00 cmp r3, #0 800e3b4: d022 beq.n 800e3fc { /* Disable TXE interrupt for the interrupt process */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_TXEIE_TXFNFIE)); 800e3b6: 687b ldr r3, [r7, #4] 800e3b8: 681b ldr r3, [r3, #0] 800e3ba: 63bb str r3, [r7, #56] @ 0x38 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e3bc: 6bbb ldr r3, [r7, #56] @ 0x38 800e3be: e853 3f00 ldrex r3, [r3] 800e3c2: 637b str r3, [r7, #52] @ 0x34 return(result); 800e3c4: 6b7b ldr r3, [r7, #52] @ 0x34 800e3c6: f023 0380 bic.w r3, r3, #128 @ 0x80 800e3ca: 653b str r3, [r7, #80] @ 0x50 800e3cc: 687b ldr r3, [r7, #4] 800e3ce: 681b ldr r3, [r3, #0] 800e3d0: 461a mov r2, r3 800e3d2: 6d3b ldr r3, [r7, #80] @ 0x50 800e3d4: 647b str r3, [r7, #68] @ 0x44 800e3d6: 643a str r2, [r7, #64] @ 0x40 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e3d8: 6c39 ldr r1, [r7, #64] @ 0x40 800e3da: 6c7a ldr r2, [r7, #68] @ 0x44 800e3dc: e841 2300 strex r3, r2, [r1] 800e3e0: 63fb str r3, [r7, #60] @ 0x3c return(result); 800e3e2: 6bfb ldr r3, [r7, #60] @ 0x3c 800e3e4: 2b00 cmp r3, #0 800e3e6: d1e6 bne.n 800e3b6 huart->gState = HAL_UART_STATE_READY; 800e3e8: 687b ldr r3, [r7, #4] 800e3ea: 2220 movs r2, #32 800e3ec: f8c3 2088 str.w r2, [r3, #136] @ 0x88 __HAL_UNLOCK(huart); 800e3f0: 687b ldr r3, [r7, #4] 800e3f2: 2200 movs r2, #0 800e3f4: f883 2084 strb.w r2, [r3, #132] @ 0x84 /* Timeout occurred */ return HAL_TIMEOUT; 800e3f8: 2303 movs r3, #3 800e3fa: e063 b.n 800e4c4 } } /* Check if the Receiver is enabled */ if ((huart->Instance->CR1 & USART_CR1_RE) == USART_CR1_RE) 800e3fc: 687b ldr r3, [r7, #4] 800e3fe: 681b ldr r3, [r3, #0] 800e400: 681b ldr r3, [r3, #0] 800e402: f003 0304 and.w r3, r3, #4 800e406: 2b04 cmp r3, #4 800e408: d149 bne.n 800e49e { /* Wait until REACK flag is set */ if (UART_WaitOnFlagUntilTimeout(huart, USART_ISR_REACK, RESET, tickstart, HAL_UART_TIMEOUT_VALUE) != HAL_OK) 800e40a: f06f 437e mvn.w r3, #4261412864 @ 0xfe000000 800e40e: 9300 str r3, [sp, #0] 800e410: 6d7b ldr r3, [r7, #84] @ 0x54 800e412: 2200 movs r2, #0 800e414: f44f 0180 mov.w r1, #4194304 @ 0x400000 800e418: 6878 ldr r0, [r7, #4] 800e41a: f000 f857 bl 800e4cc 800e41e: 4603 mov r3, r0 800e420: 2b00 cmp r3, #0 800e422: d03c beq.n 800e49e { /* 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)); 800e424: 687b ldr r3, [r7, #4] 800e426: 681b ldr r3, [r3, #0] 800e428: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e42a: 6a7b ldr r3, [r7, #36] @ 0x24 800e42c: e853 3f00 ldrex r3, [r3] 800e430: 623b str r3, [r7, #32] return(result); 800e432: 6a3b ldr r3, [r7, #32] 800e434: f423 7390 bic.w r3, r3, #288 @ 0x120 800e438: 64fb str r3, [r7, #76] @ 0x4c 800e43a: 687b ldr r3, [r7, #4] 800e43c: 681b ldr r3, [r3, #0] 800e43e: 461a mov r2, r3 800e440: 6cfb ldr r3, [r7, #76] @ 0x4c 800e442: 633b str r3, [r7, #48] @ 0x30 800e444: 62fa str r2, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e446: 6af9 ldr r1, [r7, #44] @ 0x2c 800e448: 6b3a ldr r2, [r7, #48] @ 0x30 800e44a: e841 2300 strex r3, r2, [r1] 800e44e: 62bb str r3, [r7, #40] @ 0x28 return(result); 800e450: 6abb ldr r3, [r7, #40] @ 0x28 800e452: 2b00 cmp r3, #0 800e454: d1e6 bne.n 800e424 ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE); 800e456: 687b ldr r3, [r7, #4] 800e458: 681b ldr r3, [r3, #0] 800e45a: 3308 adds r3, #8 800e45c: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e45e: 693b ldr r3, [r7, #16] 800e460: e853 3f00 ldrex r3, [r3] 800e464: 60fb str r3, [r7, #12] return(result); 800e466: 68fb ldr r3, [r7, #12] 800e468: f023 0301 bic.w r3, r3, #1 800e46c: 64bb str r3, [r7, #72] @ 0x48 800e46e: 687b ldr r3, [r7, #4] 800e470: 681b ldr r3, [r3, #0] 800e472: 3308 adds r3, #8 800e474: 6cba ldr r2, [r7, #72] @ 0x48 800e476: 61fa str r2, [r7, #28] 800e478: 61bb str r3, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e47a: 69b9 ldr r1, [r7, #24] 800e47c: 69fa ldr r2, [r7, #28] 800e47e: e841 2300 strex r3, r2, [r1] 800e482: 617b str r3, [r7, #20] return(result); 800e484: 697b ldr r3, [r7, #20] 800e486: 2b00 cmp r3, #0 800e488: d1e5 bne.n 800e456 huart->RxState = HAL_UART_STATE_READY; 800e48a: 687b ldr r3, [r7, #4] 800e48c: 2220 movs r2, #32 800e48e: f8c3 208c str.w r2, [r3, #140] @ 0x8c __HAL_UNLOCK(huart); 800e492: 687b ldr r3, [r7, #4] 800e494: 2200 movs r2, #0 800e496: f883 2084 strb.w r2, [r3, #132] @ 0x84 /* Timeout occurred */ return HAL_TIMEOUT; 800e49a: 2303 movs r3, #3 800e49c: e012 b.n 800e4c4 } } /* Initialize the UART State */ huart->gState = HAL_UART_STATE_READY; 800e49e: 687b ldr r3, [r7, #4] 800e4a0: 2220 movs r2, #32 800e4a2: f8c3 2088 str.w r2, [r3, #136] @ 0x88 huart->RxState = HAL_UART_STATE_READY; 800e4a6: 687b ldr r3, [r7, #4] 800e4a8: 2220 movs r2, #32 800e4aa: f8c3 208c str.w r2, [r3, #140] @ 0x8c huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800e4ae: 687b ldr r3, [r7, #4] 800e4b0: 2200 movs r2, #0 800e4b2: 66da str r2, [r3, #108] @ 0x6c huart->RxEventType = HAL_UART_RXEVENT_TC; 800e4b4: 687b ldr r3, [r7, #4] 800e4b6: 2200 movs r2, #0 800e4b8: 671a str r2, [r3, #112] @ 0x70 __HAL_UNLOCK(huart); 800e4ba: 687b ldr r3, [r7, #4] 800e4bc: 2200 movs r2, #0 800e4be: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_OK; 800e4c2: 2300 movs r3, #0 } 800e4c4: 4618 mov r0, r3 800e4c6: 3758 adds r7, #88 @ 0x58 800e4c8: 46bd mov sp, r7 800e4ca: bd80 pop {r7, pc} 0800e4cc : * @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) { 800e4cc: b580 push {r7, lr} 800e4ce: b084 sub sp, #16 800e4d0: af00 add r7, sp, #0 800e4d2: 60f8 str r0, [r7, #12] 800e4d4: 60b9 str r1, [r7, #8] 800e4d6: 603b str r3, [r7, #0] 800e4d8: 4613 mov r3, r2 800e4da: 71fb strb r3, [r7, #7] /* Wait until flag is set */ while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status) 800e4dc: e04f b.n 800e57e { /* Check for the Timeout */ if (Timeout != HAL_MAX_DELAY) 800e4de: 69bb ldr r3, [r7, #24] 800e4e0: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 800e4e4: d04b beq.n 800e57e { if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U)) 800e4e6: f7f6 fda3 bl 8005030 800e4ea: 4602 mov r2, r0 800e4ec: 683b ldr r3, [r7, #0] 800e4ee: 1ad3 subs r3, r2, r3 800e4f0: 69ba ldr r2, [r7, #24] 800e4f2: 429a cmp r2, r3 800e4f4: d302 bcc.n 800e4fc 800e4f6: 69bb ldr r3, [r7, #24] 800e4f8: 2b00 cmp r3, #0 800e4fa: d101 bne.n 800e500 { return HAL_TIMEOUT; 800e4fc: 2303 movs r3, #3 800e4fe: e04e b.n 800e59e } if ((READ_BIT(huart->Instance->CR1, USART_CR1_RE) != 0U) && (Flag != UART_FLAG_TXE) && (Flag != UART_FLAG_TC)) 800e500: 68fb ldr r3, [r7, #12] 800e502: 681b ldr r3, [r3, #0] 800e504: 681b ldr r3, [r3, #0] 800e506: f003 0304 and.w r3, r3, #4 800e50a: 2b00 cmp r3, #0 800e50c: d037 beq.n 800e57e 800e50e: 68bb ldr r3, [r7, #8] 800e510: 2b80 cmp r3, #128 @ 0x80 800e512: d034 beq.n 800e57e 800e514: 68bb ldr r3, [r7, #8] 800e516: 2b40 cmp r3, #64 @ 0x40 800e518: d031 beq.n 800e57e { if (__HAL_UART_GET_FLAG(huart, UART_FLAG_ORE) == SET) 800e51a: 68fb ldr r3, [r7, #12] 800e51c: 681b ldr r3, [r3, #0] 800e51e: 69db ldr r3, [r3, #28] 800e520: f003 0308 and.w r3, r3, #8 800e524: 2b08 cmp r3, #8 800e526: d110 bne.n 800e54a { /* Clear Overrun Error flag*/ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_OREF); 800e528: 68fb ldr r3, [r7, #12] 800e52a: 681b ldr r3, [r3, #0] 800e52c: 2208 movs r2, #8 800e52e: 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); 800e530: 68f8 ldr r0, [r7, #12] 800e532: f000 f95b bl 800e7ec huart->ErrorCode = HAL_UART_ERROR_ORE; 800e536: 68fb ldr r3, [r7, #12] 800e538: 2208 movs r2, #8 800e53a: f8c3 2090 str.w r2, [r3, #144] @ 0x90 /* Process Unlocked */ __HAL_UNLOCK(huart); 800e53e: 68fb ldr r3, [r7, #12] 800e540: 2200 movs r2, #0 800e542: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_ERROR; 800e546: 2301 movs r3, #1 800e548: e029 b.n 800e59e } if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RTOF) == SET) 800e54a: 68fb ldr r3, [r7, #12] 800e54c: 681b ldr r3, [r3, #0] 800e54e: 69db ldr r3, [r3, #28] 800e550: f403 6300 and.w r3, r3, #2048 @ 0x800 800e554: f5b3 6f00 cmp.w r3, #2048 @ 0x800 800e558: d111 bne.n 800e57e { /* Clear Receiver Timeout flag*/ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_RTOF); 800e55a: 68fb ldr r3, [r7, #12] 800e55c: 681b ldr r3, [r3, #0] 800e55e: f44f 6200 mov.w r2, #2048 @ 0x800 800e562: 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); 800e564: 68f8 ldr r0, [r7, #12] 800e566: f000 f941 bl 800e7ec huart->ErrorCode = HAL_UART_ERROR_RTO; 800e56a: 68fb ldr r3, [r7, #12] 800e56c: 2220 movs r2, #32 800e56e: f8c3 2090 str.w r2, [r3, #144] @ 0x90 /* Process Unlocked */ __HAL_UNLOCK(huart); 800e572: 68fb ldr r3, [r7, #12] 800e574: 2200 movs r2, #0 800e576: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_TIMEOUT; 800e57a: 2303 movs r3, #3 800e57c: e00f b.n 800e59e while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status) 800e57e: 68fb ldr r3, [r7, #12] 800e580: 681b ldr r3, [r3, #0] 800e582: 69da ldr r2, [r3, #28] 800e584: 68bb ldr r3, [r7, #8] 800e586: 4013 ands r3, r2 800e588: 68ba ldr r2, [r7, #8] 800e58a: 429a cmp r2, r3 800e58c: bf0c ite eq 800e58e: 2301 moveq r3, #1 800e590: 2300 movne r3, #0 800e592: b2db uxtb r3, r3 800e594: 461a mov r2, r3 800e596: 79fb ldrb r3, [r7, #7] 800e598: 429a cmp r2, r3 800e59a: d0a0 beq.n 800e4de } } } } return HAL_OK; 800e59c: 2300 movs r3, #0 } 800e59e: 4618 mov r0, r3 800e5a0: 3710 adds r7, #16 800e5a2: 46bd mov sp, r7 800e5a4: bd80 pop {r7, pc} ... 0800e5a8 : * @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) { 800e5a8: b480 push {r7} 800e5aa: b0a3 sub sp, #140 @ 0x8c 800e5ac: af00 add r7, sp, #0 800e5ae: 60f8 str r0, [r7, #12] 800e5b0: 60b9 str r1, [r7, #8] 800e5b2: 4613 mov r3, r2 800e5b4: 80fb strh r3, [r7, #6] huart->pRxBuffPtr = pData; 800e5b6: 68fb ldr r3, [r7, #12] 800e5b8: 68ba ldr r2, [r7, #8] 800e5ba: 659a str r2, [r3, #88] @ 0x58 huart->RxXferSize = Size; 800e5bc: 68fb ldr r3, [r7, #12] 800e5be: 88fa ldrh r2, [r7, #6] 800e5c0: f8a3 205c strh.w r2, [r3, #92] @ 0x5c huart->RxXferCount = Size; 800e5c4: 68fb ldr r3, [r7, #12] 800e5c6: 88fa ldrh r2, [r7, #6] 800e5c8: f8a3 205e strh.w r2, [r3, #94] @ 0x5e huart->RxISR = NULL; 800e5cc: 68fb ldr r3, [r7, #12] 800e5ce: 2200 movs r2, #0 800e5d0: 675a str r2, [r3, #116] @ 0x74 /* Computation of UART mask to apply to RDR register */ UART_MASK_COMPUTATION(huart); 800e5d2: 68fb ldr r3, [r7, #12] 800e5d4: 689b ldr r3, [r3, #8] 800e5d6: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800e5da: d10e bne.n 800e5fa 800e5dc: 68fb ldr r3, [r7, #12] 800e5de: 691b ldr r3, [r3, #16] 800e5e0: 2b00 cmp r3, #0 800e5e2: d105 bne.n 800e5f0 800e5e4: 68fb ldr r3, [r7, #12] 800e5e6: f240 12ff movw r2, #511 @ 0x1ff 800e5ea: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800e5ee: e02d b.n 800e64c 800e5f0: 68fb ldr r3, [r7, #12] 800e5f2: 22ff movs r2, #255 @ 0xff 800e5f4: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800e5f8: e028 b.n 800e64c 800e5fa: 68fb ldr r3, [r7, #12] 800e5fc: 689b ldr r3, [r3, #8] 800e5fe: 2b00 cmp r3, #0 800e600: d10d bne.n 800e61e 800e602: 68fb ldr r3, [r7, #12] 800e604: 691b ldr r3, [r3, #16] 800e606: 2b00 cmp r3, #0 800e608: d104 bne.n 800e614 800e60a: 68fb ldr r3, [r7, #12] 800e60c: 22ff movs r2, #255 @ 0xff 800e60e: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800e612: e01b b.n 800e64c 800e614: 68fb ldr r3, [r7, #12] 800e616: 227f movs r2, #127 @ 0x7f 800e618: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800e61c: e016 b.n 800e64c 800e61e: 68fb ldr r3, [r7, #12] 800e620: 689b ldr r3, [r3, #8] 800e622: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 800e626: d10d bne.n 800e644 800e628: 68fb ldr r3, [r7, #12] 800e62a: 691b ldr r3, [r3, #16] 800e62c: 2b00 cmp r3, #0 800e62e: d104 bne.n 800e63a 800e630: 68fb ldr r3, [r7, #12] 800e632: 227f movs r2, #127 @ 0x7f 800e634: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800e638: e008 b.n 800e64c 800e63a: 68fb ldr r3, [r7, #12] 800e63c: 223f movs r2, #63 @ 0x3f 800e63e: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800e642: e003 b.n 800e64c 800e644: 68fb ldr r3, [r7, #12] 800e646: 2200 movs r2, #0 800e648: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 huart->ErrorCode = HAL_UART_ERROR_NONE; 800e64c: 68fb ldr r3, [r7, #12] 800e64e: 2200 movs r2, #0 800e650: f8c3 2090 str.w r2, [r3, #144] @ 0x90 huart->RxState = HAL_UART_STATE_BUSY_RX; 800e654: 68fb ldr r3, [r7, #12] 800e656: 2222 movs r2, #34 @ 0x22 800e658: 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); 800e65c: 68fb ldr r3, [r7, #12] 800e65e: 681b ldr r3, [r3, #0] 800e660: 3308 adds r3, #8 800e662: 667b str r3, [r7, #100] @ 0x64 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e664: 6e7b ldr r3, [r7, #100] @ 0x64 800e666: e853 3f00 ldrex r3, [r3] 800e66a: 663b str r3, [r7, #96] @ 0x60 return(result); 800e66c: 6e3b ldr r3, [r7, #96] @ 0x60 800e66e: f043 0301 orr.w r3, r3, #1 800e672: f8c7 3084 str.w r3, [r7, #132] @ 0x84 800e676: 68fb ldr r3, [r7, #12] 800e678: 681b ldr r3, [r3, #0] 800e67a: 3308 adds r3, #8 800e67c: f8d7 2084 ldr.w r2, [r7, #132] @ 0x84 800e680: 673a str r2, [r7, #112] @ 0x70 800e682: 66fb str r3, [r7, #108] @ 0x6c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e684: 6ef9 ldr r1, [r7, #108] @ 0x6c 800e686: 6f3a ldr r2, [r7, #112] @ 0x70 800e688: e841 2300 strex r3, r2, [r1] 800e68c: 66bb str r3, [r7, #104] @ 0x68 return(result); 800e68e: 6ebb ldr r3, [r7, #104] @ 0x68 800e690: 2b00 cmp r3, #0 800e692: d1e3 bne.n 800e65c /* Configure Rx interrupt processing */ if ((huart->FifoMode == UART_FIFOMODE_ENABLE) && (Size >= huart->NbRxDataToProcess)) 800e694: 68fb ldr r3, [r7, #12] 800e696: 6e5b ldr r3, [r3, #100] @ 0x64 800e698: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800e69c: d14f bne.n 800e73e 800e69e: 68fb ldr r3, [r7, #12] 800e6a0: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 800e6a4: 88fa ldrh r2, [r7, #6] 800e6a6: 429a cmp r2, r3 800e6a8: d349 bcc.n 800e73e { /* 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)) 800e6aa: 68fb ldr r3, [r7, #12] 800e6ac: 689b ldr r3, [r3, #8] 800e6ae: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800e6b2: d107 bne.n 800e6c4 800e6b4: 68fb ldr r3, [r7, #12] 800e6b6: 691b ldr r3, [r3, #16] 800e6b8: 2b00 cmp r3, #0 800e6ba: d103 bne.n 800e6c4 { huart->RxISR = UART_RxISR_16BIT_FIFOEN; 800e6bc: 68fb ldr r3, [r7, #12] 800e6be: 4a47 ldr r2, [pc, #284] @ (800e7dc ) 800e6c0: 675a str r2, [r3, #116] @ 0x74 800e6c2: e002 b.n 800e6ca } else { huart->RxISR = UART_RxISR_8BIT_FIFOEN; 800e6c4: 68fb ldr r3, [r7, #12] 800e6c6: 4a46 ldr r2, [pc, #280] @ (800e7e0 ) 800e6c8: 675a str r2, [r3, #116] @ 0x74 } /* Enable the UART Parity Error interrupt and RX FIFO Threshold interrupt */ if (huart->Init.Parity != UART_PARITY_NONE) 800e6ca: 68fb ldr r3, [r7, #12] 800e6cc: 691b ldr r3, [r3, #16] 800e6ce: 2b00 cmp r3, #0 800e6d0: d01a beq.n 800e708 { ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_PEIE); 800e6d2: 68fb ldr r3, [r7, #12] 800e6d4: 681b ldr r3, [r3, #0] 800e6d6: 653b str r3, [r7, #80] @ 0x50 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e6d8: 6d3b ldr r3, [r7, #80] @ 0x50 800e6da: e853 3f00 ldrex r3, [r3] 800e6de: 64fb str r3, [r7, #76] @ 0x4c return(result); 800e6e0: 6cfb ldr r3, [r7, #76] @ 0x4c 800e6e2: f443 7380 orr.w r3, r3, #256 @ 0x100 800e6e6: f8c7 3080 str.w r3, [r7, #128] @ 0x80 800e6ea: 68fb ldr r3, [r7, #12] 800e6ec: 681b ldr r3, [r3, #0] 800e6ee: 461a mov r2, r3 800e6f0: f8d7 3080 ldr.w r3, [r7, #128] @ 0x80 800e6f4: 65fb str r3, [r7, #92] @ 0x5c 800e6f6: 65ba str r2, [r7, #88] @ 0x58 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e6f8: 6db9 ldr r1, [r7, #88] @ 0x58 800e6fa: 6dfa ldr r2, [r7, #92] @ 0x5c 800e6fc: e841 2300 strex r3, r2, [r1] 800e700: 657b str r3, [r7, #84] @ 0x54 return(result); 800e702: 6d7b ldr r3, [r7, #84] @ 0x54 800e704: 2b00 cmp r3, #0 800e706: d1e4 bne.n 800e6d2 } ATOMIC_SET_BIT(huart->Instance->CR3, USART_CR3_RXFTIE); 800e708: 68fb ldr r3, [r7, #12] 800e70a: 681b ldr r3, [r3, #0] 800e70c: 3308 adds r3, #8 800e70e: 63fb str r3, [r7, #60] @ 0x3c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e710: 6bfb ldr r3, [r7, #60] @ 0x3c 800e712: e853 3f00 ldrex r3, [r3] 800e716: 63bb str r3, [r7, #56] @ 0x38 return(result); 800e718: 6bbb ldr r3, [r7, #56] @ 0x38 800e71a: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000 800e71e: 67fb str r3, [r7, #124] @ 0x7c 800e720: 68fb ldr r3, [r7, #12] 800e722: 681b ldr r3, [r3, #0] 800e724: 3308 adds r3, #8 800e726: 6ffa ldr r2, [r7, #124] @ 0x7c 800e728: 64ba str r2, [r7, #72] @ 0x48 800e72a: 647b str r3, [r7, #68] @ 0x44 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e72c: 6c79 ldr r1, [r7, #68] @ 0x44 800e72e: 6cba ldr r2, [r7, #72] @ 0x48 800e730: e841 2300 strex r3, r2, [r1] 800e734: 643b str r3, [r7, #64] @ 0x40 return(result); 800e736: 6c3b ldr r3, [r7, #64] @ 0x40 800e738: 2b00 cmp r3, #0 800e73a: d1e5 bne.n 800e708 800e73c: e046 b.n 800e7cc } 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)) 800e73e: 68fb ldr r3, [r7, #12] 800e740: 689b ldr r3, [r3, #8] 800e742: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800e746: d107 bne.n 800e758 800e748: 68fb ldr r3, [r7, #12] 800e74a: 691b ldr r3, [r3, #16] 800e74c: 2b00 cmp r3, #0 800e74e: d103 bne.n 800e758 { huart->RxISR = UART_RxISR_16BIT; 800e750: 68fb ldr r3, [r7, #12] 800e752: 4a24 ldr r2, [pc, #144] @ (800e7e4 ) 800e754: 675a str r2, [r3, #116] @ 0x74 800e756: e002 b.n 800e75e } else { huart->RxISR = UART_RxISR_8BIT; 800e758: 68fb ldr r3, [r7, #12] 800e75a: 4a23 ldr r2, [pc, #140] @ (800e7e8 ) 800e75c: 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) 800e75e: 68fb ldr r3, [r7, #12] 800e760: 691b ldr r3, [r3, #16] 800e762: 2b00 cmp r3, #0 800e764: d019 beq.n 800e79a { ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_PEIE | USART_CR1_RXNEIE_RXFNEIE); 800e766: 68fb ldr r3, [r7, #12] 800e768: 681b ldr r3, [r3, #0] 800e76a: 62bb str r3, [r7, #40] @ 0x28 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e76c: 6abb ldr r3, [r7, #40] @ 0x28 800e76e: e853 3f00 ldrex r3, [r3] 800e772: 627b str r3, [r7, #36] @ 0x24 return(result); 800e774: 6a7b ldr r3, [r7, #36] @ 0x24 800e776: f443 7390 orr.w r3, r3, #288 @ 0x120 800e77a: 677b str r3, [r7, #116] @ 0x74 800e77c: 68fb ldr r3, [r7, #12] 800e77e: 681b ldr r3, [r3, #0] 800e780: 461a mov r2, r3 800e782: 6f7b ldr r3, [r7, #116] @ 0x74 800e784: 637b str r3, [r7, #52] @ 0x34 800e786: 633a str r2, [r7, #48] @ 0x30 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e788: 6b39 ldr r1, [r7, #48] @ 0x30 800e78a: 6b7a ldr r2, [r7, #52] @ 0x34 800e78c: e841 2300 strex r3, r2, [r1] 800e790: 62fb str r3, [r7, #44] @ 0x2c return(result); 800e792: 6afb ldr r3, [r7, #44] @ 0x2c 800e794: 2b00 cmp r3, #0 800e796: d1e6 bne.n 800e766 800e798: e018 b.n 800e7cc } else { ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_RXNEIE_RXFNEIE); 800e79a: 68fb ldr r3, [r7, #12] 800e79c: 681b ldr r3, [r3, #0] 800e79e: 617b str r3, [r7, #20] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e7a0: 697b ldr r3, [r7, #20] 800e7a2: e853 3f00 ldrex r3, [r3] 800e7a6: 613b str r3, [r7, #16] return(result); 800e7a8: 693b ldr r3, [r7, #16] 800e7aa: f043 0320 orr.w r3, r3, #32 800e7ae: 67bb str r3, [r7, #120] @ 0x78 800e7b0: 68fb ldr r3, [r7, #12] 800e7b2: 681b ldr r3, [r3, #0] 800e7b4: 461a mov r2, r3 800e7b6: 6fbb ldr r3, [r7, #120] @ 0x78 800e7b8: 623b str r3, [r7, #32] 800e7ba: 61fa str r2, [r7, #28] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e7bc: 69f9 ldr r1, [r7, #28] 800e7be: 6a3a ldr r2, [r7, #32] 800e7c0: e841 2300 strex r3, r2, [r1] 800e7c4: 61bb str r3, [r7, #24] return(result); 800e7c6: 69bb ldr r3, [r7, #24] 800e7c8: 2b00 cmp r3, #0 800e7ca: d1e6 bne.n 800e79a } } return HAL_OK; 800e7cc: 2300 movs r3, #0 } 800e7ce: 4618 mov r0, r3 800e7d0: 378c adds r7, #140 @ 0x8c 800e7d2: 46bd mov sp, r7 800e7d4: f85d 7b04 ldr.w r7, [sp], #4 800e7d8: 4770 bx lr 800e7da: bf00 nop 800e7dc: 0800f351 .word 0x0800f351 800e7e0: 0800eff1 .word 0x0800eff1 800e7e4: 0800ee39 .word 0x0800ee39 800e7e8: 0800ec81 .word 0x0800ec81 0800e7ec : * @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) { 800e7ec: b480 push {r7} 800e7ee: b095 sub sp, #84 @ 0x54 800e7f0: af00 add r7, sp, #0 800e7f2: 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)); 800e7f4: 687b ldr r3, [r7, #4] 800e7f6: 681b ldr r3, [r3, #0] 800e7f8: 637b str r3, [r7, #52] @ 0x34 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e7fa: 6b7b ldr r3, [r7, #52] @ 0x34 800e7fc: e853 3f00 ldrex r3, [r3] 800e800: 633b str r3, [r7, #48] @ 0x30 return(result); 800e802: 6b3b ldr r3, [r7, #48] @ 0x30 800e804: f423 7390 bic.w r3, r3, #288 @ 0x120 800e808: 64fb str r3, [r7, #76] @ 0x4c 800e80a: 687b ldr r3, [r7, #4] 800e80c: 681b ldr r3, [r3, #0] 800e80e: 461a mov r2, r3 800e810: 6cfb ldr r3, [r7, #76] @ 0x4c 800e812: 643b str r3, [r7, #64] @ 0x40 800e814: 63fa str r2, [r7, #60] @ 0x3c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e816: 6bf9 ldr r1, [r7, #60] @ 0x3c 800e818: 6c3a ldr r2, [r7, #64] @ 0x40 800e81a: e841 2300 strex r3, r2, [r1] 800e81e: 63bb str r3, [r7, #56] @ 0x38 return(result); 800e820: 6bbb ldr r3, [r7, #56] @ 0x38 800e822: 2b00 cmp r3, #0 800e824: d1e6 bne.n 800e7f4 ATOMIC_CLEAR_BIT(huart->Instance->CR3, (USART_CR3_EIE | USART_CR3_RXFTIE)); 800e826: 687b ldr r3, [r7, #4] 800e828: 681b ldr r3, [r3, #0] 800e82a: 3308 adds r3, #8 800e82c: 623b str r3, [r7, #32] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e82e: 6a3b ldr r3, [r7, #32] 800e830: e853 3f00 ldrex r3, [r3] 800e834: 61fb str r3, [r7, #28] return(result); 800e836: 69fa ldr r2, [r7, #28] 800e838: 4b1e ldr r3, [pc, #120] @ (800e8b4 ) 800e83a: 4013 ands r3, r2 800e83c: 64bb str r3, [r7, #72] @ 0x48 800e83e: 687b ldr r3, [r7, #4] 800e840: 681b ldr r3, [r3, #0] 800e842: 3308 adds r3, #8 800e844: 6cba ldr r2, [r7, #72] @ 0x48 800e846: 62fa str r2, [r7, #44] @ 0x2c 800e848: 62bb str r3, [r7, #40] @ 0x28 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e84a: 6ab9 ldr r1, [r7, #40] @ 0x28 800e84c: 6afa ldr r2, [r7, #44] @ 0x2c 800e84e: e841 2300 strex r3, r2, [r1] 800e852: 627b str r3, [r7, #36] @ 0x24 return(result); 800e854: 6a7b ldr r3, [r7, #36] @ 0x24 800e856: 2b00 cmp r3, #0 800e858: d1e5 bne.n 800e826 /* In case of reception waiting for IDLE event, disable also the IDLE IE interrupt source */ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800e85a: 687b ldr r3, [r7, #4] 800e85c: 6edb ldr r3, [r3, #108] @ 0x6c 800e85e: 2b01 cmp r3, #1 800e860: d118 bne.n 800e894 { ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800e862: 687b ldr r3, [r7, #4] 800e864: 681b ldr r3, [r3, #0] 800e866: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e868: 68fb ldr r3, [r7, #12] 800e86a: e853 3f00 ldrex r3, [r3] 800e86e: 60bb str r3, [r7, #8] return(result); 800e870: 68bb ldr r3, [r7, #8] 800e872: f023 0310 bic.w r3, r3, #16 800e876: 647b str r3, [r7, #68] @ 0x44 800e878: 687b ldr r3, [r7, #4] 800e87a: 681b ldr r3, [r3, #0] 800e87c: 461a mov r2, r3 800e87e: 6c7b ldr r3, [r7, #68] @ 0x44 800e880: 61bb str r3, [r7, #24] 800e882: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e884: 6979 ldr r1, [r7, #20] 800e886: 69ba ldr r2, [r7, #24] 800e888: e841 2300 strex r3, r2, [r1] 800e88c: 613b str r3, [r7, #16] return(result); 800e88e: 693b ldr r3, [r7, #16] 800e890: 2b00 cmp r3, #0 800e892: d1e6 bne.n 800e862 } /* At end of Rx process, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800e894: 687b ldr r3, [r7, #4] 800e896: 2220 movs r2, #32 800e898: f8c3 208c str.w r2, [r3, #140] @ 0x8c huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800e89c: 687b ldr r3, [r7, #4] 800e89e: 2200 movs r2, #0 800e8a0: 66da str r2, [r3, #108] @ 0x6c /* Reset RxIsr function pointer */ huart->RxISR = NULL; 800e8a2: 687b ldr r3, [r7, #4] 800e8a4: 2200 movs r2, #0 800e8a6: 675a str r2, [r3, #116] @ 0x74 } 800e8a8: bf00 nop 800e8aa: 3754 adds r7, #84 @ 0x54 800e8ac: 46bd mov sp, r7 800e8ae: f85d 7b04 ldr.w r7, [sp], #4 800e8b2: 4770 bx lr 800e8b4: effffffe .word 0xeffffffe 0800e8b8 : * (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) { 800e8b8: b580 push {r7, lr} 800e8ba: b084 sub sp, #16 800e8bc: af00 add r7, sp, #0 800e8be: 6078 str r0, [r7, #4] UART_HandleTypeDef *huart = (UART_HandleTypeDef *)(hdma->Parent); 800e8c0: 687b ldr r3, [r7, #4] 800e8c2: 6b9b ldr r3, [r3, #56] @ 0x38 800e8c4: 60fb str r3, [r7, #12] huart->RxXferCount = 0U; 800e8c6: 68fb ldr r3, [r7, #12] 800e8c8: 2200 movs r2, #0 800e8ca: f8a3 205e strh.w r2, [r3, #94] @ 0x5e huart->TxXferCount = 0U; 800e8ce: 68fb ldr r3, [r7, #12] 800e8d0: 2200 movs r2, #0 800e8d2: 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); 800e8d6: 68f8 ldr r0, [r7, #12] 800e8d8: f7fe ff3a bl 800d750 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ } 800e8dc: bf00 nop 800e8de: 3710 adds r7, #16 800e8e0: 46bd mov sp, r7 800e8e2: bd80 pop {r7, pc} 0800e8e4 : * interruptions have been enabled by HAL_UART_Transmit_IT(). * @param huart UART handle. * @retval None */ static void UART_TxISR_8BIT(UART_HandleTypeDef *huart) { 800e8e4: b480 push {r7} 800e8e6: b08f sub sp, #60 @ 0x3c 800e8e8: af00 add r7, sp, #0 800e8ea: 6078 str r0, [r7, #4] /* Check that a Tx process is ongoing */ if (huart->gState == HAL_UART_STATE_BUSY_TX) 800e8ec: 687b ldr r3, [r7, #4] 800e8ee: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800e8f2: 2b21 cmp r3, #33 @ 0x21 800e8f4: d14c bne.n 800e990 { if (huart->TxXferCount == 0U) 800e8f6: 687b ldr r3, [r7, #4] 800e8f8: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800e8fc: b29b uxth r3, r3 800e8fe: 2b00 cmp r3, #0 800e900: d132 bne.n 800e968 { /* Disable the UART Transmit Data Register Empty Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_TXEIE_TXFNFIE); 800e902: 687b ldr r3, [r7, #4] 800e904: 681b ldr r3, [r3, #0] 800e906: 623b str r3, [r7, #32] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e908: 6a3b ldr r3, [r7, #32] 800e90a: e853 3f00 ldrex r3, [r3] 800e90e: 61fb str r3, [r7, #28] return(result); 800e910: 69fb ldr r3, [r7, #28] 800e912: f023 0380 bic.w r3, r3, #128 @ 0x80 800e916: 637b str r3, [r7, #52] @ 0x34 800e918: 687b ldr r3, [r7, #4] 800e91a: 681b ldr r3, [r3, #0] 800e91c: 461a mov r2, r3 800e91e: 6b7b ldr r3, [r7, #52] @ 0x34 800e920: 62fb str r3, [r7, #44] @ 0x2c 800e922: 62ba str r2, [r7, #40] @ 0x28 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e924: 6ab9 ldr r1, [r7, #40] @ 0x28 800e926: 6afa ldr r2, [r7, #44] @ 0x2c 800e928: e841 2300 strex r3, r2, [r1] 800e92c: 627b str r3, [r7, #36] @ 0x24 return(result); 800e92e: 6a7b ldr r3, [r7, #36] @ 0x24 800e930: 2b00 cmp r3, #0 800e932: d1e6 bne.n 800e902 /* Enable the UART Transmit Complete Interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TCIE); 800e934: 687b ldr r3, [r7, #4] 800e936: 681b ldr r3, [r3, #0] 800e938: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e93a: 68fb ldr r3, [r7, #12] 800e93c: e853 3f00 ldrex r3, [r3] 800e940: 60bb str r3, [r7, #8] return(result); 800e942: 68bb ldr r3, [r7, #8] 800e944: f043 0340 orr.w r3, r3, #64 @ 0x40 800e948: 633b str r3, [r7, #48] @ 0x30 800e94a: 687b ldr r3, [r7, #4] 800e94c: 681b ldr r3, [r3, #0] 800e94e: 461a mov r2, r3 800e950: 6b3b ldr r3, [r7, #48] @ 0x30 800e952: 61bb str r3, [r7, #24] 800e954: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e956: 6979 ldr r1, [r7, #20] 800e958: 69ba ldr r2, [r7, #24] 800e95a: e841 2300 strex r3, r2, [r1] 800e95e: 613b str r3, [r7, #16] return(result); 800e960: 693b ldr r3, [r7, #16] 800e962: 2b00 cmp r3, #0 800e964: d1e6 bne.n 800e934 huart->Instance->TDR = (uint8_t)(*huart->pTxBuffPtr & (uint8_t)0xFF); huart->pTxBuffPtr++; huart->TxXferCount--; } } } 800e966: e013 b.n 800e990 huart->Instance->TDR = (uint8_t)(*huart->pTxBuffPtr & (uint8_t)0xFF); 800e968: 687b ldr r3, [r7, #4] 800e96a: 6d1b ldr r3, [r3, #80] @ 0x50 800e96c: 781a ldrb r2, [r3, #0] 800e96e: 687b ldr r3, [r7, #4] 800e970: 681b ldr r3, [r3, #0] 800e972: 629a str r2, [r3, #40] @ 0x28 huart->pTxBuffPtr++; 800e974: 687b ldr r3, [r7, #4] 800e976: 6d1b ldr r3, [r3, #80] @ 0x50 800e978: 1c5a adds r2, r3, #1 800e97a: 687b ldr r3, [r7, #4] 800e97c: 651a str r2, [r3, #80] @ 0x50 huart->TxXferCount--; 800e97e: 687b ldr r3, [r7, #4] 800e980: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800e984: b29b uxth r3, r3 800e986: 3b01 subs r3, #1 800e988: b29a uxth r2, r3 800e98a: 687b ldr r3, [r7, #4] 800e98c: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 } 800e990: bf00 nop 800e992: 373c adds r7, #60 @ 0x3c 800e994: 46bd mov sp, r7 800e996: f85d 7b04 ldr.w r7, [sp], #4 800e99a: 4770 bx lr 0800e99c : * interruptions have been enabled by HAL_UART_Transmit_IT(). * @param huart UART handle. * @retval None */ static void UART_TxISR_16BIT(UART_HandleTypeDef *huart) { 800e99c: b480 push {r7} 800e99e: b091 sub sp, #68 @ 0x44 800e9a0: af00 add r7, sp, #0 800e9a2: 6078 str r0, [r7, #4] const uint16_t *tmp; /* Check that a Tx process is ongoing */ if (huart->gState == HAL_UART_STATE_BUSY_TX) 800e9a4: 687b ldr r3, [r7, #4] 800e9a6: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800e9aa: 2b21 cmp r3, #33 @ 0x21 800e9ac: d151 bne.n 800ea52 { if (huart->TxXferCount == 0U) 800e9ae: 687b ldr r3, [r7, #4] 800e9b0: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800e9b4: b29b uxth r3, r3 800e9b6: 2b00 cmp r3, #0 800e9b8: d132 bne.n 800ea20 { /* Disable the UART Transmit Data Register Empty Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_TXEIE_TXFNFIE); 800e9ba: 687b ldr r3, [r7, #4] 800e9bc: 681b ldr r3, [r3, #0] 800e9be: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e9c0: 6a7b ldr r3, [r7, #36] @ 0x24 800e9c2: e853 3f00 ldrex r3, [r3] 800e9c6: 623b str r3, [r7, #32] return(result); 800e9c8: 6a3b ldr r3, [r7, #32] 800e9ca: f023 0380 bic.w r3, r3, #128 @ 0x80 800e9ce: 63bb str r3, [r7, #56] @ 0x38 800e9d0: 687b ldr r3, [r7, #4] 800e9d2: 681b ldr r3, [r3, #0] 800e9d4: 461a mov r2, r3 800e9d6: 6bbb ldr r3, [r7, #56] @ 0x38 800e9d8: 633b str r3, [r7, #48] @ 0x30 800e9da: 62fa str r2, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e9dc: 6af9 ldr r1, [r7, #44] @ 0x2c 800e9de: 6b3a ldr r2, [r7, #48] @ 0x30 800e9e0: e841 2300 strex r3, r2, [r1] 800e9e4: 62bb str r3, [r7, #40] @ 0x28 return(result); 800e9e6: 6abb ldr r3, [r7, #40] @ 0x28 800e9e8: 2b00 cmp r3, #0 800e9ea: d1e6 bne.n 800e9ba /* Enable the UART Transmit Complete Interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TCIE); 800e9ec: 687b ldr r3, [r7, #4] 800e9ee: 681b ldr r3, [r3, #0] 800e9f0: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e9f2: 693b ldr r3, [r7, #16] 800e9f4: e853 3f00 ldrex r3, [r3] 800e9f8: 60fb str r3, [r7, #12] return(result); 800e9fa: 68fb ldr r3, [r7, #12] 800e9fc: f043 0340 orr.w r3, r3, #64 @ 0x40 800ea00: 637b str r3, [r7, #52] @ 0x34 800ea02: 687b ldr r3, [r7, #4] 800ea04: 681b ldr r3, [r3, #0] 800ea06: 461a mov r2, r3 800ea08: 6b7b ldr r3, [r7, #52] @ 0x34 800ea0a: 61fb str r3, [r7, #28] 800ea0c: 61ba str r2, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800ea0e: 69b9 ldr r1, [r7, #24] 800ea10: 69fa ldr r2, [r7, #28] 800ea12: e841 2300 strex r3, r2, [r1] 800ea16: 617b str r3, [r7, #20] return(result); 800ea18: 697b ldr r3, [r7, #20] 800ea1a: 2b00 cmp r3, #0 800ea1c: d1e6 bne.n 800e9ec huart->Instance->TDR = (((uint32_t)(*tmp)) & 0x01FFUL); huart->pTxBuffPtr += 2U; huart->TxXferCount--; } } } 800ea1e: e018 b.n 800ea52 tmp = (const uint16_t *) huart->pTxBuffPtr; 800ea20: 687b ldr r3, [r7, #4] 800ea22: 6d1b ldr r3, [r3, #80] @ 0x50 800ea24: 63fb str r3, [r7, #60] @ 0x3c huart->Instance->TDR = (((uint32_t)(*tmp)) & 0x01FFUL); 800ea26: 6bfb ldr r3, [r7, #60] @ 0x3c 800ea28: 881b ldrh r3, [r3, #0] 800ea2a: 461a mov r2, r3 800ea2c: 687b ldr r3, [r7, #4] 800ea2e: 681b ldr r3, [r3, #0] 800ea30: f3c2 0208 ubfx r2, r2, #0, #9 800ea34: 629a str r2, [r3, #40] @ 0x28 huart->pTxBuffPtr += 2U; 800ea36: 687b ldr r3, [r7, #4] 800ea38: 6d1b ldr r3, [r3, #80] @ 0x50 800ea3a: 1c9a adds r2, r3, #2 800ea3c: 687b ldr r3, [r7, #4] 800ea3e: 651a str r2, [r3, #80] @ 0x50 huart->TxXferCount--; 800ea40: 687b ldr r3, [r7, #4] 800ea42: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800ea46: b29b uxth r3, r3 800ea48: 3b01 subs r3, #1 800ea4a: b29a uxth r2, r3 800ea4c: 687b ldr r3, [r7, #4] 800ea4e: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 } 800ea52: bf00 nop 800ea54: 3744 adds r7, #68 @ 0x44 800ea56: 46bd mov sp, r7 800ea58: f85d 7b04 ldr.w r7, [sp], #4 800ea5c: 4770 bx lr 0800ea5e : * interruptions have been enabled by HAL_UART_Transmit_IT(). * @param huart UART handle. * @retval None */ static void UART_TxISR_8BIT_FIFOEN(UART_HandleTypeDef *huart) { 800ea5e: b480 push {r7} 800ea60: b091 sub sp, #68 @ 0x44 800ea62: af00 add r7, sp, #0 800ea64: 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) 800ea66: 687b ldr r3, [r7, #4] 800ea68: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800ea6c: 2b21 cmp r3, #33 @ 0x21 800ea6e: d160 bne.n 800eb32 { for (nb_tx_data = huart->NbTxDataToProcess ; nb_tx_data > 0U ; nb_tx_data--) 800ea70: 687b ldr r3, [r7, #4] 800ea72: f8b3 306a ldrh.w r3, [r3, #106] @ 0x6a 800ea76: 87fb strh r3, [r7, #62] @ 0x3e 800ea78: e057 b.n 800eb2a { if (huart->TxXferCount == 0U) 800ea7a: 687b ldr r3, [r7, #4] 800ea7c: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800ea80: b29b uxth r3, r3 800ea82: 2b00 cmp r3, #0 800ea84: d133 bne.n 800eaee { /* Disable the TX FIFO threshold interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_TXFTIE); 800ea86: 687b ldr r3, [r7, #4] 800ea88: 681b ldr r3, [r3, #0] 800ea8a: 3308 adds r3, #8 800ea8c: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800ea8e: 6a7b ldr r3, [r7, #36] @ 0x24 800ea90: e853 3f00 ldrex r3, [r3] 800ea94: 623b str r3, [r7, #32] return(result); 800ea96: 6a3b ldr r3, [r7, #32] 800ea98: f423 0300 bic.w r3, r3, #8388608 @ 0x800000 800ea9c: 63bb str r3, [r7, #56] @ 0x38 800ea9e: 687b ldr r3, [r7, #4] 800eaa0: 681b ldr r3, [r3, #0] 800eaa2: 3308 adds r3, #8 800eaa4: 6bba ldr r2, [r7, #56] @ 0x38 800eaa6: 633a str r2, [r7, #48] @ 0x30 800eaa8: 62fb str r3, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800eaaa: 6af9 ldr r1, [r7, #44] @ 0x2c 800eaac: 6b3a ldr r2, [r7, #48] @ 0x30 800eaae: e841 2300 strex r3, r2, [r1] 800eab2: 62bb str r3, [r7, #40] @ 0x28 return(result); 800eab4: 6abb ldr r3, [r7, #40] @ 0x28 800eab6: 2b00 cmp r3, #0 800eab8: d1e5 bne.n 800ea86 /* Enable the UART Transmit Complete Interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TCIE); 800eaba: 687b ldr r3, [r7, #4] 800eabc: 681b ldr r3, [r3, #0] 800eabe: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800eac0: 693b ldr r3, [r7, #16] 800eac2: e853 3f00 ldrex r3, [r3] 800eac6: 60fb str r3, [r7, #12] return(result); 800eac8: 68fb ldr r3, [r7, #12] 800eaca: f043 0340 orr.w r3, r3, #64 @ 0x40 800eace: 637b str r3, [r7, #52] @ 0x34 800ead0: 687b ldr r3, [r7, #4] 800ead2: 681b ldr r3, [r3, #0] 800ead4: 461a mov r2, r3 800ead6: 6b7b ldr r3, [r7, #52] @ 0x34 800ead8: 61fb str r3, [r7, #28] 800eada: 61ba str r2, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800eadc: 69b9 ldr r1, [r7, #24] 800eade: 69fa ldr r2, [r7, #28] 800eae0: e841 2300 strex r3, r2, [r1] 800eae4: 617b str r3, [r7, #20] return(result); 800eae6: 697b ldr r3, [r7, #20] 800eae8: 2b00 cmp r3, #0 800eaea: d1e6 bne.n 800eaba break; /* force exit loop */ 800eaec: e021 b.n 800eb32 } else if (READ_BIT(huart->Instance->ISR, USART_ISR_TXE_TXFNF) != 0U) 800eaee: 687b ldr r3, [r7, #4] 800eaf0: 681b ldr r3, [r3, #0] 800eaf2: 69db ldr r3, [r3, #28] 800eaf4: f003 0380 and.w r3, r3, #128 @ 0x80 800eaf8: 2b00 cmp r3, #0 800eafa: d013 beq.n 800eb24 { huart->Instance->TDR = (uint8_t)(*huart->pTxBuffPtr & (uint8_t)0xFF); 800eafc: 687b ldr r3, [r7, #4] 800eafe: 6d1b ldr r3, [r3, #80] @ 0x50 800eb00: 781a ldrb r2, [r3, #0] 800eb02: 687b ldr r3, [r7, #4] 800eb04: 681b ldr r3, [r3, #0] 800eb06: 629a str r2, [r3, #40] @ 0x28 huart->pTxBuffPtr++; 800eb08: 687b ldr r3, [r7, #4] 800eb0a: 6d1b ldr r3, [r3, #80] @ 0x50 800eb0c: 1c5a adds r2, r3, #1 800eb0e: 687b ldr r3, [r7, #4] 800eb10: 651a str r2, [r3, #80] @ 0x50 huart->TxXferCount--; 800eb12: 687b ldr r3, [r7, #4] 800eb14: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800eb18: b29b uxth r3, r3 800eb1a: 3b01 subs r3, #1 800eb1c: b29a uxth r2, r3 800eb1e: 687b ldr r3, [r7, #4] 800eb20: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 for (nb_tx_data = huart->NbTxDataToProcess ; nb_tx_data > 0U ; nb_tx_data--) 800eb24: 8ffb ldrh r3, [r7, #62] @ 0x3e 800eb26: 3b01 subs r3, #1 800eb28: 87fb strh r3, [r7, #62] @ 0x3e 800eb2a: 8ffb ldrh r3, [r7, #62] @ 0x3e 800eb2c: 2b00 cmp r3, #0 800eb2e: d1a4 bne.n 800ea7a { /* Nothing to do */ } } } } 800eb30: e7ff b.n 800eb32 800eb32: bf00 nop 800eb34: 3744 adds r7, #68 @ 0x44 800eb36: 46bd mov sp, r7 800eb38: f85d 7b04 ldr.w r7, [sp], #4 800eb3c: 4770 bx lr 0800eb3e : * interruptions have been enabled by HAL_UART_Transmit_IT(). * @param huart UART handle. * @retval None */ static void UART_TxISR_16BIT_FIFOEN(UART_HandleTypeDef *huart) { 800eb3e: b480 push {r7} 800eb40: b091 sub sp, #68 @ 0x44 800eb42: af00 add r7, sp, #0 800eb44: 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) 800eb46: 687b ldr r3, [r7, #4] 800eb48: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800eb4c: 2b21 cmp r3, #33 @ 0x21 800eb4e: d165 bne.n 800ec1c { for (nb_tx_data = huart->NbTxDataToProcess ; nb_tx_data > 0U ; nb_tx_data--) 800eb50: 687b ldr r3, [r7, #4] 800eb52: f8b3 306a ldrh.w r3, [r3, #106] @ 0x6a 800eb56: 87fb strh r3, [r7, #62] @ 0x3e 800eb58: e05c b.n 800ec14 { if (huart->TxXferCount == 0U) 800eb5a: 687b ldr r3, [r7, #4] 800eb5c: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800eb60: b29b uxth r3, r3 800eb62: 2b00 cmp r3, #0 800eb64: d133 bne.n 800ebce { /* Disable the TX FIFO threshold interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_TXFTIE); 800eb66: 687b ldr r3, [r7, #4] 800eb68: 681b ldr r3, [r3, #0] 800eb6a: 3308 adds r3, #8 800eb6c: 623b str r3, [r7, #32] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800eb6e: 6a3b ldr r3, [r7, #32] 800eb70: e853 3f00 ldrex r3, [r3] 800eb74: 61fb str r3, [r7, #28] return(result); 800eb76: 69fb ldr r3, [r7, #28] 800eb78: f423 0300 bic.w r3, r3, #8388608 @ 0x800000 800eb7c: 637b str r3, [r7, #52] @ 0x34 800eb7e: 687b ldr r3, [r7, #4] 800eb80: 681b ldr r3, [r3, #0] 800eb82: 3308 adds r3, #8 800eb84: 6b7a ldr r2, [r7, #52] @ 0x34 800eb86: 62fa str r2, [r7, #44] @ 0x2c 800eb88: 62bb str r3, [r7, #40] @ 0x28 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800eb8a: 6ab9 ldr r1, [r7, #40] @ 0x28 800eb8c: 6afa ldr r2, [r7, #44] @ 0x2c 800eb8e: e841 2300 strex r3, r2, [r1] 800eb92: 627b str r3, [r7, #36] @ 0x24 return(result); 800eb94: 6a7b ldr r3, [r7, #36] @ 0x24 800eb96: 2b00 cmp r3, #0 800eb98: d1e5 bne.n 800eb66 /* Enable the UART Transmit Complete Interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TCIE); 800eb9a: 687b ldr r3, [r7, #4] 800eb9c: 681b ldr r3, [r3, #0] 800eb9e: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800eba0: 68fb ldr r3, [r7, #12] 800eba2: e853 3f00 ldrex r3, [r3] 800eba6: 60bb str r3, [r7, #8] return(result); 800eba8: 68bb ldr r3, [r7, #8] 800ebaa: f043 0340 orr.w r3, r3, #64 @ 0x40 800ebae: 633b str r3, [r7, #48] @ 0x30 800ebb0: 687b ldr r3, [r7, #4] 800ebb2: 681b ldr r3, [r3, #0] 800ebb4: 461a mov r2, r3 800ebb6: 6b3b ldr r3, [r7, #48] @ 0x30 800ebb8: 61bb str r3, [r7, #24] 800ebba: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800ebbc: 6979 ldr r1, [r7, #20] 800ebbe: 69ba ldr r2, [r7, #24] 800ebc0: e841 2300 strex r3, r2, [r1] 800ebc4: 613b str r3, [r7, #16] return(result); 800ebc6: 693b ldr r3, [r7, #16] 800ebc8: 2b00 cmp r3, #0 800ebca: d1e6 bne.n 800eb9a break; /* force exit loop */ 800ebcc: e026 b.n 800ec1c } else if (READ_BIT(huart->Instance->ISR, USART_ISR_TXE_TXFNF) != 0U) 800ebce: 687b ldr r3, [r7, #4] 800ebd0: 681b ldr r3, [r3, #0] 800ebd2: 69db ldr r3, [r3, #28] 800ebd4: f003 0380 and.w r3, r3, #128 @ 0x80 800ebd8: 2b00 cmp r3, #0 800ebda: d018 beq.n 800ec0e { tmp = (const uint16_t *) huart->pTxBuffPtr; 800ebdc: 687b ldr r3, [r7, #4] 800ebde: 6d1b ldr r3, [r3, #80] @ 0x50 800ebe0: 63bb str r3, [r7, #56] @ 0x38 huart->Instance->TDR = (((uint32_t)(*tmp)) & 0x01FFUL); 800ebe2: 6bbb ldr r3, [r7, #56] @ 0x38 800ebe4: 881b ldrh r3, [r3, #0] 800ebe6: 461a mov r2, r3 800ebe8: 687b ldr r3, [r7, #4] 800ebea: 681b ldr r3, [r3, #0] 800ebec: f3c2 0208 ubfx r2, r2, #0, #9 800ebf0: 629a str r2, [r3, #40] @ 0x28 huart->pTxBuffPtr += 2U; 800ebf2: 687b ldr r3, [r7, #4] 800ebf4: 6d1b ldr r3, [r3, #80] @ 0x50 800ebf6: 1c9a adds r2, r3, #2 800ebf8: 687b ldr r3, [r7, #4] 800ebfa: 651a str r2, [r3, #80] @ 0x50 huart->TxXferCount--; 800ebfc: 687b ldr r3, [r7, #4] 800ebfe: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800ec02: b29b uxth r3, r3 800ec04: 3b01 subs r3, #1 800ec06: b29a uxth r2, r3 800ec08: 687b ldr r3, [r7, #4] 800ec0a: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 for (nb_tx_data = huart->NbTxDataToProcess ; nb_tx_data > 0U ; nb_tx_data--) 800ec0e: 8ffb ldrh r3, [r7, #62] @ 0x3e 800ec10: 3b01 subs r3, #1 800ec12: 87fb strh r3, [r7, #62] @ 0x3e 800ec14: 8ffb ldrh r3, [r7, #62] @ 0x3e 800ec16: 2b00 cmp r3, #0 800ec18: d19f bne.n 800eb5a { /* Nothing to do */ } } } } 800ec1a: e7ff b.n 800ec1c 800ec1c: bf00 nop 800ec1e: 3744 adds r7, #68 @ 0x44 800ec20: 46bd mov sp, r7 800ec22: f85d 7b04 ldr.w r7, [sp], #4 800ec26: 4770 bx lr 0800ec28 : * @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) { 800ec28: b580 push {r7, lr} 800ec2a: b088 sub sp, #32 800ec2c: af00 add r7, sp, #0 800ec2e: 6078 str r0, [r7, #4] /* Disable the UART Transmit Complete Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_TCIE); 800ec30: 687b ldr r3, [r7, #4] 800ec32: 681b ldr r3, [r3, #0] 800ec34: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800ec36: 68fb ldr r3, [r7, #12] 800ec38: e853 3f00 ldrex r3, [r3] 800ec3c: 60bb str r3, [r7, #8] return(result); 800ec3e: 68bb ldr r3, [r7, #8] 800ec40: f023 0340 bic.w r3, r3, #64 @ 0x40 800ec44: 61fb str r3, [r7, #28] 800ec46: 687b ldr r3, [r7, #4] 800ec48: 681b ldr r3, [r3, #0] 800ec4a: 461a mov r2, r3 800ec4c: 69fb ldr r3, [r7, #28] 800ec4e: 61bb str r3, [r7, #24] 800ec50: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800ec52: 6979 ldr r1, [r7, #20] 800ec54: 69ba ldr r2, [r7, #24] 800ec56: e841 2300 strex r3, r2, [r1] 800ec5a: 613b str r3, [r7, #16] return(result); 800ec5c: 693b ldr r3, [r7, #16] 800ec5e: 2b00 cmp r3, #0 800ec60: d1e6 bne.n 800ec30 /* Tx process is ended, restore huart->gState to Ready */ huart->gState = HAL_UART_STATE_READY; 800ec62: 687b ldr r3, [r7, #4] 800ec64: 2220 movs r2, #32 800ec66: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Cleat TxISR function pointer */ huart->TxISR = NULL; 800ec6a: 687b ldr r3, [r7, #4] 800ec6c: 2200 movs r2, #0 800ec6e: 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); 800ec70: 6878 ldr r0, [r7, #4] 800ec72: f7f5 fa21 bl 80040b8 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ } 800ec76: bf00 nop 800ec78: 3720 adds r7, #32 800ec7a: 46bd mov sp, r7 800ec7c: bd80 pop {r7, pc} ... 0800ec80 : * @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) { 800ec80: b580 push {r7, lr} 800ec82: b09c sub sp, #112 @ 0x70 800ec84: af00 add r7, sp, #0 800ec86: 6078 str r0, [r7, #4] uint16_t uhMask = huart->Mask; 800ec88: 687b ldr r3, [r7, #4] 800ec8a: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 800ec8e: 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) 800ec92: 687b ldr r3, [r7, #4] 800ec94: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800ec98: 2b22 cmp r3, #34 @ 0x22 800ec9a: f040 80be bne.w 800ee1a { uhdata = (uint16_t) READ_REG(huart->Instance->RDR); 800ec9e: 687b ldr r3, [r7, #4] 800eca0: 681b ldr r3, [r3, #0] 800eca2: 6a5b ldr r3, [r3, #36] @ 0x24 800eca4: f8a7 306c strh.w r3, [r7, #108] @ 0x6c *huart->pRxBuffPtr = (uint8_t)(uhdata & (uint8_t)uhMask); 800eca8: f8b7 306c ldrh.w r3, [r7, #108] @ 0x6c 800ecac: b2d9 uxtb r1, r3 800ecae: f8b7 306e ldrh.w r3, [r7, #110] @ 0x6e 800ecb2: b2da uxtb r2, r3 800ecb4: 687b ldr r3, [r7, #4] 800ecb6: 6d9b ldr r3, [r3, #88] @ 0x58 800ecb8: 400a ands r2, r1 800ecba: b2d2 uxtb r2, r2 800ecbc: 701a strb r2, [r3, #0] huart->pRxBuffPtr++; 800ecbe: 687b ldr r3, [r7, #4] 800ecc0: 6d9b ldr r3, [r3, #88] @ 0x58 800ecc2: 1c5a adds r2, r3, #1 800ecc4: 687b ldr r3, [r7, #4] 800ecc6: 659a str r2, [r3, #88] @ 0x58 huart->RxXferCount--; 800ecc8: 687b ldr r3, [r7, #4] 800ecca: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800ecce: b29b uxth r3, r3 800ecd0: 3b01 subs r3, #1 800ecd2: b29a uxth r2, r3 800ecd4: 687b ldr r3, [r7, #4] 800ecd6: f8a3 205e strh.w r2, [r3, #94] @ 0x5e if (huart->RxXferCount == 0U) 800ecda: 687b ldr r3, [r7, #4] 800ecdc: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800ece0: b29b uxth r3, r3 800ece2: 2b00 cmp r3, #0 800ece4: f040 80a1 bne.w 800ee2a { /* Disable the UART Parity Error Interrupt and RXNE interrupts */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE)); 800ece8: 687b ldr r3, [r7, #4] 800ecea: 681b ldr r3, [r3, #0] 800ecec: 64fb str r3, [r7, #76] @ 0x4c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800ecee: 6cfb ldr r3, [r7, #76] @ 0x4c 800ecf0: e853 3f00 ldrex r3, [r3] 800ecf4: 64bb str r3, [r7, #72] @ 0x48 return(result); 800ecf6: 6cbb ldr r3, [r7, #72] @ 0x48 800ecf8: f423 7390 bic.w r3, r3, #288 @ 0x120 800ecfc: 66bb str r3, [r7, #104] @ 0x68 800ecfe: 687b ldr r3, [r7, #4] 800ed00: 681b ldr r3, [r3, #0] 800ed02: 461a mov r2, r3 800ed04: 6ebb ldr r3, [r7, #104] @ 0x68 800ed06: 65bb str r3, [r7, #88] @ 0x58 800ed08: 657a str r2, [r7, #84] @ 0x54 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800ed0a: 6d79 ldr r1, [r7, #84] @ 0x54 800ed0c: 6dba ldr r2, [r7, #88] @ 0x58 800ed0e: e841 2300 strex r3, r2, [r1] 800ed12: 653b str r3, [r7, #80] @ 0x50 return(result); 800ed14: 6d3b ldr r3, [r7, #80] @ 0x50 800ed16: 2b00 cmp r3, #0 800ed18: d1e6 bne.n 800ece8 /* Disable the UART Error Interrupt: (Frame error, noise error, overrun error) */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE); 800ed1a: 687b ldr r3, [r7, #4] 800ed1c: 681b ldr r3, [r3, #0] 800ed1e: 3308 adds r3, #8 800ed20: 63bb str r3, [r7, #56] @ 0x38 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800ed22: 6bbb ldr r3, [r7, #56] @ 0x38 800ed24: e853 3f00 ldrex r3, [r3] 800ed28: 637b str r3, [r7, #52] @ 0x34 return(result); 800ed2a: 6b7b ldr r3, [r7, #52] @ 0x34 800ed2c: f023 0301 bic.w r3, r3, #1 800ed30: 667b str r3, [r7, #100] @ 0x64 800ed32: 687b ldr r3, [r7, #4] 800ed34: 681b ldr r3, [r3, #0] 800ed36: 3308 adds r3, #8 800ed38: 6e7a ldr r2, [r7, #100] @ 0x64 800ed3a: 647a str r2, [r7, #68] @ 0x44 800ed3c: 643b str r3, [r7, #64] @ 0x40 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800ed3e: 6c39 ldr r1, [r7, #64] @ 0x40 800ed40: 6c7a ldr r2, [r7, #68] @ 0x44 800ed42: e841 2300 strex r3, r2, [r1] 800ed46: 63fb str r3, [r7, #60] @ 0x3c return(result); 800ed48: 6bfb ldr r3, [r7, #60] @ 0x3c 800ed4a: 2b00 cmp r3, #0 800ed4c: d1e5 bne.n 800ed1a /* Rx process is completed, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800ed4e: 687b ldr r3, [r7, #4] 800ed50: 2220 movs r2, #32 800ed52: f8c3 208c str.w r2, [r3, #140] @ 0x8c /* Clear RxISR function pointer */ huart->RxISR = NULL; 800ed56: 687b ldr r3, [r7, #4] 800ed58: 2200 movs r2, #0 800ed5a: 675a str r2, [r3, #116] @ 0x74 /* Initialize type of RxEvent to Transfer Complete */ huart->RxEventType = HAL_UART_RXEVENT_TC; 800ed5c: 687b ldr r3, [r7, #4] 800ed5e: 2200 movs r2, #0 800ed60: 671a str r2, [r3, #112] @ 0x70 if (!(IS_LPUART_INSTANCE(huart->Instance))) 800ed62: 687b ldr r3, [r7, #4] 800ed64: 681b ldr r3, [r3, #0] 800ed66: 4a33 ldr r2, [pc, #204] @ (800ee34 ) 800ed68: 4293 cmp r3, r2 800ed6a: d01f beq.n 800edac { /* Check that USART RTOEN bit is set */ if (READ_BIT(huart->Instance->CR2, USART_CR2_RTOEN) != 0U) 800ed6c: 687b ldr r3, [r7, #4] 800ed6e: 681b ldr r3, [r3, #0] 800ed70: 685b ldr r3, [r3, #4] 800ed72: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800ed76: 2b00 cmp r3, #0 800ed78: d018 beq.n 800edac { /* Enable the UART Receiver Timeout Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_RTOIE); 800ed7a: 687b ldr r3, [r7, #4] 800ed7c: 681b ldr r3, [r3, #0] 800ed7e: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800ed80: 6a7b ldr r3, [r7, #36] @ 0x24 800ed82: e853 3f00 ldrex r3, [r3] 800ed86: 623b str r3, [r7, #32] return(result); 800ed88: 6a3b ldr r3, [r7, #32] 800ed8a: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 800ed8e: 663b str r3, [r7, #96] @ 0x60 800ed90: 687b ldr r3, [r7, #4] 800ed92: 681b ldr r3, [r3, #0] 800ed94: 461a mov r2, r3 800ed96: 6e3b ldr r3, [r7, #96] @ 0x60 800ed98: 633b str r3, [r7, #48] @ 0x30 800ed9a: 62fa str r2, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800ed9c: 6af9 ldr r1, [r7, #44] @ 0x2c 800ed9e: 6b3a ldr r2, [r7, #48] @ 0x30 800eda0: e841 2300 strex r3, r2, [r1] 800eda4: 62bb str r3, [r7, #40] @ 0x28 return(result); 800eda6: 6abb ldr r3, [r7, #40] @ 0x28 800eda8: 2b00 cmp r3, #0 800edaa: d1e6 bne.n 800ed7a } } /* Check current reception Mode : If Reception till IDLE event has been selected : */ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800edac: 687b ldr r3, [r7, #4] 800edae: 6edb ldr r3, [r3, #108] @ 0x6c 800edb0: 2b01 cmp r3, #1 800edb2: d12e bne.n 800ee12 { /* Set reception type to Standard */ huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800edb4: 687b ldr r3, [r7, #4] 800edb6: 2200 movs r2, #0 800edb8: 66da str r2, [r3, #108] @ 0x6c /* Disable IDLE interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800edba: 687b ldr r3, [r7, #4] 800edbc: 681b ldr r3, [r3, #0] 800edbe: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800edc0: 693b ldr r3, [r7, #16] 800edc2: e853 3f00 ldrex r3, [r3] 800edc6: 60fb str r3, [r7, #12] return(result); 800edc8: 68fb ldr r3, [r7, #12] 800edca: f023 0310 bic.w r3, r3, #16 800edce: 65fb str r3, [r7, #92] @ 0x5c 800edd0: 687b ldr r3, [r7, #4] 800edd2: 681b ldr r3, [r3, #0] 800edd4: 461a mov r2, r3 800edd6: 6dfb ldr r3, [r7, #92] @ 0x5c 800edd8: 61fb str r3, [r7, #28] 800edda: 61ba str r2, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800eddc: 69b9 ldr r1, [r7, #24] 800edde: 69fa ldr r2, [r7, #28] 800ede0: e841 2300 strex r3, r2, [r1] 800ede4: 617b str r3, [r7, #20] return(result); 800ede6: 697b ldr r3, [r7, #20] 800ede8: 2b00 cmp r3, #0 800edea: d1e6 bne.n 800edba if (__HAL_UART_GET_FLAG(huart, UART_FLAG_IDLE) == SET) 800edec: 687b ldr r3, [r7, #4] 800edee: 681b ldr r3, [r3, #0] 800edf0: 69db ldr r3, [r3, #28] 800edf2: f003 0310 and.w r3, r3, #16 800edf6: 2b10 cmp r3, #16 800edf8: d103 bne.n 800ee02 { /* Clear IDLE Flag */ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 800edfa: 687b ldr r3, [r7, #4] 800edfc: 681b ldr r3, [r3, #0] 800edfe: 2210 movs r2, #16 800ee00: 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); 800ee02: 687b ldr r3, [r7, #4] 800ee04: f8b3 305c ldrh.w r3, [r3, #92] @ 0x5c 800ee08: 4619 mov r1, r3 800ee0a: 6878 ldr r0, [r7, #4] 800ee0c: f7f5 f8fa bl 8004004 else { /* Clear RXNE interrupt flag */ __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); } } 800ee10: e00b b.n 800ee2a HAL_UART_RxCpltCallback(huart); 800ee12: 6878 ldr r0, [r7, #4] 800ee14: f7f5 f8ec bl 8003ff0 } 800ee18: e007 b.n 800ee2a __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); 800ee1a: 687b ldr r3, [r7, #4] 800ee1c: 681b ldr r3, [r3, #0] 800ee1e: 699a ldr r2, [r3, #24] 800ee20: 687b ldr r3, [r7, #4] 800ee22: 681b ldr r3, [r3, #0] 800ee24: f042 0208 orr.w r2, r2, #8 800ee28: 619a str r2, [r3, #24] } 800ee2a: bf00 nop 800ee2c: 3770 adds r7, #112 @ 0x70 800ee2e: 46bd mov sp, r7 800ee30: bd80 pop {r7, pc} 800ee32: bf00 nop 800ee34: 58000c00 .word 0x58000c00 0800ee38 : * interruptions have been enabled by HAL_UART_Receive_IT() * @param huart UART handle. * @retval None */ static void UART_RxISR_16BIT(UART_HandleTypeDef *huart) { 800ee38: b580 push {r7, lr} 800ee3a: b09c sub sp, #112 @ 0x70 800ee3c: af00 add r7, sp, #0 800ee3e: 6078 str r0, [r7, #4] uint16_t *tmp; uint16_t uhMask = huart->Mask; 800ee40: 687b ldr r3, [r7, #4] 800ee42: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 800ee46: 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) 800ee4a: 687b ldr r3, [r7, #4] 800ee4c: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800ee50: 2b22 cmp r3, #34 @ 0x22 800ee52: f040 80be bne.w 800efd2 { uhdata = (uint16_t) READ_REG(huart->Instance->RDR); 800ee56: 687b ldr r3, [r7, #4] 800ee58: 681b ldr r3, [r3, #0] 800ee5a: 6a5b ldr r3, [r3, #36] @ 0x24 800ee5c: f8a7 306c strh.w r3, [r7, #108] @ 0x6c tmp = (uint16_t *) huart->pRxBuffPtr ; 800ee60: 687b ldr r3, [r7, #4] 800ee62: 6d9b ldr r3, [r3, #88] @ 0x58 800ee64: 66bb str r3, [r7, #104] @ 0x68 *tmp = (uint16_t)(uhdata & uhMask); 800ee66: f8b7 206c ldrh.w r2, [r7, #108] @ 0x6c 800ee6a: f8b7 306e ldrh.w r3, [r7, #110] @ 0x6e 800ee6e: 4013 ands r3, r2 800ee70: b29a uxth r2, r3 800ee72: 6ebb ldr r3, [r7, #104] @ 0x68 800ee74: 801a strh r2, [r3, #0] huart->pRxBuffPtr += 2U; 800ee76: 687b ldr r3, [r7, #4] 800ee78: 6d9b ldr r3, [r3, #88] @ 0x58 800ee7a: 1c9a adds r2, r3, #2 800ee7c: 687b ldr r3, [r7, #4] 800ee7e: 659a str r2, [r3, #88] @ 0x58 huart->RxXferCount--; 800ee80: 687b ldr r3, [r7, #4] 800ee82: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800ee86: b29b uxth r3, r3 800ee88: 3b01 subs r3, #1 800ee8a: b29a uxth r2, r3 800ee8c: 687b ldr r3, [r7, #4] 800ee8e: f8a3 205e strh.w r2, [r3, #94] @ 0x5e if (huart->RxXferCount == 0U) 800ee92: 687b ldr r3, [r7, #4] 800ee94: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800ee98: b29b uxth r3, r3 800ee9a: 2b00 cmp r3, #0 800ee9c: f040 80a1 bne.w 800efe2 { /* Disable the UART Parity Error Interrupt and RXNE interrupt*/ ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE)); 800eea0: 687b ldr r3, [r7, #4] 800eea2: 681b ldr r3, [r3, #0] 800eea4: 64bb str r3, [r7, #72] @ 0x48 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800eea6: 6cbb ldr r3, [r7, #72] @ 0x48 800eea8: e853 3f00 ldrex r3, [r3] 800eeac: 647b str r3, [r7, #68] @ 0x44 return(result); 800eeae: 6c7b ldr r3, [r7, #68] @ 0x44 800eeb0: f423 7390 bic.w r3, r3, #288 @ 0x120 800eeb4: 667b str r3, [r7, #100] @ 0x64 800eeb6: 687b ldr r3, [r7, #4] 800eeb8: 681b ldr r3, [r3, #0] 800eeba: 461a mov r2, r3 800eebc: 6e7b ldr r3, [r7, #100] @ 0x64 800eebe: 657b str r3, [r7, #84] @ 0x54 800eec0: 653a str r2, [r7, #80] @ 0x50 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800eec2: 6d39 ldr r1, [r7, #80] @ 0x50 800eec4: 6d7a ldr r2, [r7, #84] @ 0x54 800eec6: e841 2300 strex r3, r2, [r1] 800eeca: 64fb str r3, [r7, #76] @ 0x4c return(result); 800eecc: 6cfb ldr r3, [r7, #76] @ 0x4c 800eece: 2b00 cmp r3, #0 800eed0: d1e6 bne.n 800eea0 /* Disable the UART Error Interrupt: (Frame error, noise error, overrun error) */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE); 800eed2: 687b ldr r3, [r7, #4] 800eed4: 681b ldr r3, [r3, #0] 800eed6: 3308 adds r3, #8 800eed8: 637b str r3, [r7, #52] @ 0x34 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800eeda: 6b7b ldr r3, [r7, #52] @ 0x34 800eedc: e853 3f00 ldrex r3, [r3] 800eee0: 633b str r3, [r7, #48] @ 0x30 return(result); 800eee2: 6b3b ldr r3, [r7, #48] @ 0x30 800eee4: f023 0301 bic.w r3, r3, #1 800eee8: 663b str r3, [r7, #96] @ 0x60 800eeea: 687b ldr r3, [r7, #4] 800eeec: 681b ldr r3, [r3, #0] 800eeee: 3308 adds r3, #8 800eef0: 6e3a ldr r2, [r7, #96] @ 0x60 800eef2: 643a str r2, [r7, #64] @ 0x40 800eef4: 63fb str r3, [r7, #60] @ 0x3c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800eef6: 6bf9 ldr r1, [r7, #60] @ 0x3c 800eef8: 6c3a ldr r2, [r7, #64] @ 0x40 800eefa: e841 2300 strex r3, r2, [r1] 800eefe: 63bb str r3, [r7, #56] @ 0x38 return(result); 800ef00: 6bbb ldr r3, [r7, #56] @ 0x38 800ef02: 2b00 cmp r3, #0 800ef04: d1e5 bne.n 800eed2 /* Rx process is completed, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800ef06: 687b ldr r3, [r7, #4] 800ef08: 2220 movs r2, #32 800ef0a: f8c3 208c str.w r2, [r3, #140] @ 0x8c /* Clear RxISR function pointer */ huart->RxISR = NULL; 800ef0e: 687b ldr r3, [r7, #4] 800ef10: 2200 movs r2, #0 800ef12: 675a str r2, [r3, #116] @ 0x74 /* Initialize type of RxEvent to Transfer Complete */ huart->RxEventType = HAL_UART_RXEVENT_TC; 800ef14: 687b ldr r3, [r7, #4] 800ef16: 2200 movs r2, #0 800ef18: 671a str r2, [r3, #112] @ 0x70 if (!(IS_LPUART_INSTANCE(huart->Instance))) 800ef1a: 687b ldr r3, [r7, #4] 800ef1c: 681b ldr r3, [r3, #0] 800ef1e: 4a33 ldr r2, [pc, #204] @ (800efec ) 800ef20: 4293 cmp r3, r2 800ef22: d01f beq.n 800ef64 { /* Check that USART RTOEN bit is set */ if (READ_BIT(huart->Instance->CR2, USART_CR2_RTOEN) != 0U) 800ef24: 687b ldr r3, [r7, #4] 800ef26: 681b ldr r3, [r3, #0] 800ef28: 685b ldr r3, [r3, #4] 800ef2a: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800ef2e: 2b00 cmp r3, #0 800ef30: d018 beq.n 800ef64 { /* Enable the UART Receiver Timeout Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_RTOIE); 800ef32: 687b ldr r3, [r7, #4] 800ef34: 681b ldr r3, [r3, #0] 800ef36: 623b str r3, [r7, #32] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800ef38: 6a3b ldr r3, [r7, #32] 800ef3a: e853 3f00 ldrex r3, [r3] 800ef3e: 61fb str r3, [r7, #28] return(result); 800ef40: 69fb ldr r3, [r7, #28] 800ef42: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 800ef46: 65fb str r3, [r7, #92] @ 0x5c 800ef48: 687b ldr r3, [r7, #4] 800ef4a: 681b ldr r3, [r3, #0] 800ef4c: 461a mov r2, r3 800ef4e: 6dfb ldr r3, [r7, #92] @ 0x5c 800ef50: 62fb str r3, [r7, #44] @ 0x2c 800ef52: 62ba str r2, [r7, #40] @ 0x28 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800ef54: 6ab9 ldr r1, [r7, #40] @ 0x28 800ef56: 6afa ldr r2, [r7, #44] @ 0x2c 800ef58: e841 2300 strex r3, r2, [r1] 800ef5c: 627b str r3, [r7, #36] @ 0x24 return(result); 800ef5e: 6a7b ldr r3, [r7, #36] @ 0x24 800ef60: 2b00 cmp r3, #0 800ef62: d1e6 bne.n 800ef32 } } /* Check current reception Mode : If Reception till IDLE event has been selected : */ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800ef64: 687b ldr r3, [r7, #4] 800ef66: 6edb ldr r3, [r3, #108] @ 0x6c 800ef68: 2b01 cmp r3, #1 800ef6a: d12e bne.n 800efca { /* Set reception type to Standard */ huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800ef6c: 687b ldr r3, [r7, #4] 800ef6e: 2200 movs r2, #0 800ef70: 66da str r2, [r3, #108] @ 0x6c /* Disable IDLE interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800ef72: 687b ldr r3, [r7, #4] 800ef74: 681b ldr r3, [r3, #0] 800ef76: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800ef78: 68fb ldr r3, [r7, #12] 800ef7a: e853 3f00 ldrex r3, [r3] 800ef7e: 60bb str r3, [r7, #8] return(result); 800ef80: 68bb ldr r3, [r7, #8] 800ef82: f023 0310 bic.w r3, r3, #16 800ef86: 65bb str r3, [r7, #88] @ 0x58 800ef88: 687b ldr r3, [r7, #4] 800ef8a: 681b ldr r3, [r3, #0] 800ef8c: 461a mov r2, r3 800ef8e: 6dbb ldr r3, [r7, #88] @ 0x58 800ef90: 61bb str r3, [r7, #24] 800ef92: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800ef94: 6979 ldr r1, [r7, #20] 800ef96: 69ba ldr r2, [r7, #24] 800ef98: e841 2300 strex r3, r2, [r1] 800ef9c: 613b str r3, [r7, #16] return(result); 800ef9e: 693b ldr r3, [r7, #16] 800efa0: 2b00 cmp r3, #0 800efa2: d1e6 bne.n 800ef72 if (__HAL_UART_GET_FLAG(huart, UART_FLAG_IDLE) == SET) 800efa4: 687b ldr r3, [r7, #4] 800efa6: 681b ldr r3, [r3, #0] 800efa8: 69db ldr r3, [r3, #28] 800efaa: f003 0310 and.w r3, r3, #16 800efae: 2b10 cmp r3, #16 800efb0: d103 bne.n 800efba { /* Clear IDLE Flag */ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 800efb2: 687b ldr r3, [r7, #4] 800efb4: 681b ldr r3, [r3, #0] 800efb6: 2210 movs r2, #16 800efb8: 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); 800efba: 687b ldr r3, [r7, #4] 800efbc: f8b3 305c ldrh.w r3, [r3, #92] @ 0x5c 800efc0: 4619 mov r1, r3 800efc2: 6878 ldr r0, [r7, #4] 800efc4: f7f5 f81e bl 8004004 else { /* Clear RXNE interrupt flag */ __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); } } 800efc8: e00b b.n 800efe2 HAL_UART_RxCpltCallback(huart); 800efca: 6878 ldr r0, [r7, #4] 800efcc: f7f5 f810 bl 8003ff0 } 800efd0: e007 b.n 800efe2 __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); 800efd2: 687b ldr r3, [r7, #4] 800efd4: 681b ldr r3, [r3, #0] 800efd6: 699a ldr r2, [r3, #24] 800efd8: 687b ldr r3, [r7, #4] 800efda: 681b ldr r3, [r3, #0] 800efdc: f042 0208 orr.w r2, r2, #8 800efe0: 619a str r2, [r3, #24] } 800efe2: bf00 nop 800efe4: 3770 adds r7, #112 @ 0x70 800efe6: 46bd mov sp, r7 800efe8: bd80 pop {r7, pc} 800efea: bf00 nop 800efec: 58000c00 .word 0x58000c00 0800eff0 : * interruptions have been enabled by HAL_UART_Receive_IT() * @param huart UART handle. * @retval None */ static void UART_RxISR_8BIT_FIFOEN(UART_HandleTypeDef *huart) { 800eff0: b580 push {r7, lr} 800eff2: b0ac sub sp, #176 @ 0xb0 800eff4: af00 add r7, sp, #0 800eff6: 6078 str r0, [r7, #4] uint16_t uhMask = huart->Mask; 800eff8: 687b ldr r3, [r7, #4] 800effa: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 800effe: 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); 800f002: 687b ldr r3, [r7, #4] 800f004: 681b ldr r3, [r3, #0] 800f006: 69db ldr r3, [r3, #28] 800f008: f8c7 30ac str.w r3, [r7, #172] @ 0xac uint32_t cr1its = READ_REG(huart->Instance->CR1); 800f00c: 687b ldr r3, [r7, #4] 800f00e: 681b ldr r3, [r3, #0] 800f010: 681b ldr r3, [r3, #0] 800f012: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 uint32_t cr3its = READ_REG(huart->Instance->CR3); 800f016: 687b ldr r3, [r7, #4] 800f018: 681b ldr r3, [r3, #0] 800f01a: 689b ldr r3, [r3, #8] 800f01c: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 /* Check that a Rx process is ongoing */ if (huart->RxState == HAL_UART_STATE_BUSY_RX) 800f020: 687b ldr r3, [r7, #4] 800f022: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800f026: 2b22 cmp r3, #34 @ 0x22 800f028: f040 8180 bne.w 800f32c { nb_rx_data = huart->NbRxDataToProcess; 800f02c: 687b ldr r3, [r7, #4] 800f02e: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 800f032: f8a7 309e strh.w r3, [r7, #158] @ 0x9e while ((nb_rx_data > 0U) && ((isrflags & USART_ISR_RXNE_RXFNE) != 0U)) 800f036: e123 b.n 800f280 { uhdata = (uint16_t) READ_REG(huart->Instance->RDR); 800f038: 687b ldr r3, [r7, #4] 800f03a: 681b ldr r3, [r3, #0] 800f03c: 6a5b ldr r3, [r3, #36] @ 0x24 800f03e: f8a7 309c strh.w r3, [r7, #156] @ 0x9c *huart->pRxBuffPtr = (uint8_t)(uhdata & (uint8_t)uhMask); 800f042: f8b7 309c ldrh.w r3, [r7, #156] @ 0x9c 800f046: b2d9 uxtb r1, r3 800f048: f8b7 30aa ldrh.w r3, [r7, #170] @ 0xaa 800f04c: b2da uxtb r2, r3 800f04e: 687b ldr r3, [r7, #4] 800f050: 6d9b ldr r3, [r3, #88] @ 0x58 800f052: 400a ands r2, r1 800f054: b2d2 uxtb r2, r2 800f056: 701a strb r2, [r3, #0] huart->pRxBuffPtr++; 800f058: 687b ldr r3, [r7, #4] 800f05a: 6d9b ldr r3, [r3, #88] @ 0x58 800f05c: 1c5a adds r2, r3, #1 800f05e: 687b ldr r3, [r7, #4] 800f060: 659a str r2, [r3, #88] @ 0x58 huart->RxXferCount--; 800f062: 687b ldr r3, [r7, #4] 800f064: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800f068: b29b uxth r3, r3 800f06a: 3b01 subs r3, #1 800f06c: b29a uxth r2, r3 800f06e: 687b ldr r3, [r7, #4] 800f070: f8a3 205e strh.w r2, [r3, #94] @ 0x5e isrflags = READ_REG(huart->Instance->ISR); 800f074: 687b ldr r3, [r7, #4] 800f076: 681b ldr r3, [r3, #0] 800f078: 69db ldr r3, [r3, #28] 800f07a: 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) 800f07e: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800f082: f003 0307 and.w r3, r3, #7 800f086: 2b00 cmp r3, #0 800f088: d053 beq.n 800f132 { /* UART parity error interrupt occurred -------------------------------------*/ if (((isrflags & USART_ISR_PE) != 0U) && ((cr1its & USART_CR1_PEIE) != 0U)) 800f08a: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800f08e: f003 0301 and.w r3, r3, #1 800f092: 2b00 cmp r3, #0 800f094: d011 beq.n 800f0ba 800f096: f8d7 30a4 ldr.w r3, [r7, #164] @ 0xa4 800f09a: f403 7380 and.w r3, r3, #256 @ 0x100 800f09e: 2b00 cmp r3, #0 800f0a0: d00b beq.n 800f0ba { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_PEF); 800f0a2: 687b ldr r3, [r7, #4] 800f0a4: 681b ldr r3, [r3, #0] 800f0a6: 2201 movs r2, #1 800f0a8: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_PE; 800f0aa: 687b ldr r3, [r7, #4] 800f0ac: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800f0b0: f043 0201 orr.w r2, r3, #1 800f0b4: 687b ldr r3, [r7, #4] 800f0b6: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART frame error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_FE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800f0ba: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800f0be: f003 0302 and.w r3, r3, #2 800f0c2: 2b00 cmp r3, #0 800f0c4: d011 beq.n 800f0ea 800f0c6: f8d7 30a0 ldr.w r3, [r7, #160] @ 0xa0 800f0ca: f003 0301 and.w r3, r3, #1 800f0ce: 2b00 cmp r3, #0 800f0d0: d00b beq.n 800f0ea { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_FEF); 800f0d2: 687b ldr r3, [r7, #4] 800f0d4: 681b ldr r3, [r3, #0] 800f0d6: 2202 movs r2, #2 800f0d8: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_FE; 800f0da: 687b ldr r3, [r7, #4] 800f0dc: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800f0e0: f043 0204 orr.w r2, r3, #4 800f0e4: 687b ldr r3, [r7, #4] 800f0e6: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART noise error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_NE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800f0ea: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800f0ee: f003 0304 and.w r3, r3, #4 800f0f2: 2b00 cmp r3, #0 800f0f4: d011 beq.n 800f11a 800f0f6: f8d7 30a0 ldr.w r3, [r7, #160] @ 0xa0 800f0fa: f003 0301 and.w r3, r3, #1 800f0fe: 2b00 cmp r3, #0 800f100: d00b beq.n 800f11a { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_NEF); 800f102: 687b ldr r3, [r7, #4] 800f104: 681b ldr r3, [r3, #0] 800f106: 2204 movs r2, #4 800f108: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_NE; 800f10a: 687b ldr r3, [r7, #4] 800f10c: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800f110: f043 0202 orr.w r2, r3, #2 800f114: 687b ldr r3, [r7, #4] 800f116: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* Call UART Error Call back function if need be ----------------------------*/ if (huart->ErrorCode != HAL_UART_ERROR_NONE) 800f11a: 687b ldr r3, [r7, #4] 800f11c: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800f120: 2b00 cmp r3, #0 800f122: d006 beq.n 800f132 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800f124: 6878 ldr r0, [r7, #4] 800f126: f7fe fb13 bl 800d750 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ huart->ErrorCode = HAL_UART_ERROR_NONE; 800f12a: 687b ldr r3, [r7, #4] 800f12c: 2200 movs r2, #0 800f12e: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } } if (huart->RxXferCount == 0U) 800f132: 687b ldr r3, [r7, #4] 800f134: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800f138: b29b uxth r3, r3 800f13a: 2b00 cmp r3, #0 800f13c: f040 80a0 bne.w 800f280 { /* Disable the UART Parity Error Interrupt and RXFT interrupt*/ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_PEIE); 800f140: 687b ldr r3, [r7, #4] 800f142: 681b ldr r3, [r3, #0] 800f144: 673b str r3, [r7, #112] @ 0x70 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f146: 6f3b ldr r3, [r7, #112] @ 0x70 800f148: e853 3f00 ldrex r3, [r3] 800f14c: 66fb str r3, [r7, #108] @ 0x6c return(result); 800f14e: 6efb ldr r3, [r7, #108] @ 0x6c 800f150: f423 7380 bic.w r3, r3, #256 @ 0x100 800f154: f8c7 3098 str.w r3, [r7, #152] @ 0x98 800f158: 687b ldr r3, [r7, #4] 800f15a: 681b ldr r3, [r3, #0] 800f15c: 461a mov r2, r3 800f15e: f8d7 3098 ldr.w r3, [r7, #152] @ 0x98 800f162: 67fb str r3, [r7, #124] @ 0x7c 800f164: 67ba str r2, [r7, #120] @ 0x78 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f166: 6fb9 ldr r1, [r7, #120] @ 0x78 800f168: 6ffa ldr r2, [r7, #124] @ 0x7c 800f16a: e841 2300 strex r3, r2, [r1] 800f16e: 677b str r3, [r7, #116] @ 0x74 return(result); 800f170: 6f7b ldr r3, [r7, #116] @ 0x74 800f172: 2b00 cmp r3, #0 800f174: d1e4 bne.n 800f140 /* 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)); 800f176: 687b ldr r3, [r7, #4] 800f178: 681b ldr r3, [r3, #0] 800f17a: 3308 adds r3, #8 800f17c: 65fb str r3, [r7, #92] @ 0x5c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f17e: 6dfb ldr r3, [r7, #92] @ 0x5c 800f180: e853 3f00 ldrex r3, [r3] 800f184: 65bb str r3, [r7, #88] @ 0x58 return(result); 800f186: 6dba ldr r2, [r7, #88] @ 0x58 800f188: 4b6e ldr r3, [pc, #440] @ (800f344 ) 800f18a: 4013 ands r3, r2 800f18c: f8c7 3094 str.w r3, [r7, #148] @ 0x94 800f190: 687b ldr r3, [r7, #4] 800f192: 681b ldr r3, [r3, #0] 800f194: 3308 adds r3, #8 800f196: f8d7 2094 ldr.w r2, [r7, #148] @ 0x94 800f19a: 66ba str r2, [r7, #104] @ 0x68 800f19c: 667b str r3, [r7, #100] @ 0x64 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f19e: 6e79 ldr r1, [r7, #100] @ 0x64 800f1a0: 6eba ldr r2, [r7, #104] @ 0x68 800f1a2: e841 2300 strex r3, r2, [r1] 800f1a6: 663b str r3, [r7, #96] @ 0x60 return(result); 800f1a8: 6e3b ldr r3, [r7, #96] @ 0x60 800f1aa: 2b00 cmp r3, #0 800f1ac: d1e3 bne.n 800f176 /* Rx process is completed, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800f1ae: 687b ldr r3, [r7, #4] 800f1b0: 2220 movs r2, #32 800f1b2: f8c3 208c str.w r2, [r3, #140] @ 0x8c /* Clear RxISR function pointer */ huart->RxISR = NULL; 800f1b6: 687b ldr r3, [r7, #4] 800f1b8: 2200 movs r2, #0 800f1ba: 675a str r2, [r3, #116] @ 0x74 /* Initialize type of RxEvent to Transfer Complete */ huart->RxEventType = HAL_UART_RXEVENT_TC; 800f1bc: 687b ldr r3, [r7, #4] 800f1be: 2200 movs r2, #0 800f1c0: 671a str r2, [r3, #112] @ 0x70 if (!(IS_LPUART_INSTANCE(huart->Instance))) 800f1c2: 687b ldr r3, [r7, #4] 800f1c4: 681b ldr r3, [r3, #0] 800f1c6: 4a60 ldr r2, [pc, #384] @ (800f348 ) 800f1c8: 4293 cmp r3, r2 800f1ca: d021 beq.n 800f210 { /* Check that USART RTOEN bit is set */ if (READ_BIT(huart->Instance->CR2, USART_CR2_RTOEN) != 0U) 800f1cc: 687b ldr r3, [r7, #4] 800f1ce: 681b ldr r3, [r3, #0] 800f1d0: 685b ldr r3, [r3, #4] 800f1d2: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800f1d6: 2b00 cmp r3, #0 800f1d8: d01a beq.n 800f210 { /* Enable the UART Receiver Timeout Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_RTOIE); 800f1da: 687b ldr r3, [r7, #4] 800f1dc: 681b ldr r3, [r3, #0] 800f1de: 64bb str r3, [r7, #72] @ 0x48 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f1e0: 6cbb ldr r3, [r7, #72] @ 0x48 800f1e2: e853 3f00 ldrex r3, [r3] 800f1e6: 647b str r3, [r7, #68] @ 0x44 return(result); 800f1e8: 6c7b ldr r3, [r7, #68] @ 0x44 800f1ea: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 800f1ee: f8c7 3090 str.w r3, [r7, #144] @ 0x90 800f1f2: 687b ldr r3, [r7, #4] 800f1f4: 681b ldr r3, [r3, #0] 800f1f6: 461a mov r2, r3 800f1f8: f8d7 3090 ldr.w r3, [r7, #144] @ 0x90 800f1fc: 657b str r3, [r7, #84] @ 0x54 800f1fe: 653a str r2, [r7, #80] @ 0x50 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f200: 6d39 ldr r1, [r7, #80] @ 0x50 800f202: 6d7a ldr r2, [r7, #84] @ 0x54 800f204: e841 2300 strex r3, r2, [r1] 800f208: 64fb str r3, [r7, #76] @ 0x4c return(result); 800f20a: 6cfb ldr r3, [r7, #76] @ 0x4c 800f20c: 2b00 cmp r3, #0 800f20e: d1e4 bne.n 800f1da } } /* Check current reception Mode : If Reception till IDLE event has been selected : */ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800f210: 687b ldr r3, [r7, #4] 800f212: 6edb ldr r3, [r3, #108] @ 0x6c 800f214: 2b01 cmp r3, #1 800f216: d130 bne.n 800f27a { /* Set reception type to Standard */ huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800f218: 687b ldr r3, [r7, #4] 800f21a: 2200 movs r2, #0 800f21c: 66da str r2, [r3, #108] @ 0x6c /* Disable IDLE interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800f21e: 687b ldr r3, [r7, #4] 800f220: 681b ldr r3, [r3, #0] 800f222: 637b str r3, [r7, #52] @ 0x34 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f224: 6b7b ldr r3, [r7, #52] @ 0x34 800f226: e853 3f00 ldrex r3, [r3] 800f22a: 633b str r3, [r7, #48] @ 0x30 return(result); 800f22c: 6b3b ldr r3, [r7, #48] @ 0x30 800f22e: f023 0310 bic.w r3, r3, #16 800f232: f8c7 308c str.w r3, [r7, #140] @ 0x8c 800f236: 687b ldr r3, [r7, #4] 800f238: 681b ldr r3, [r3, #0] 800f23a: 461a mov r2, r3 800f23c: f8d7 308c ldr.w r3, [r7, #140] @ 0x8c 800f240: 643b str r3, [r7, #64] @ 0x40 800f242: 63fa str r2, [r7, #60] @ 0x3c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f244: 6bf9 ldr r1, [r7, #60] @ 0x3c 800f246: 6c3a ldr r2, [r7, #64] @ 0x40 800f248: e841 2300 strex r3, r2, [r1] 800f24c: 63bb str r3, [r7, #56] @ 0x38 return(result); 800f24e: 6bbb ldr r3, [r7, #56] @ 0x38 800f250: 2b00 cmp r3, #0 800f252: d1e4 bne.n 800f21e if (__HAL_UART_GET_FLAG(huart, UART_FLAG_IDLE) == SET) 800f254: 687b ldr r3, [r7, #4] 800f256: 681b ldr r3, [r3, #0] 800f258: 69db ldr r3, [r3, #28] 800f25a: f003 0310 and.w r3, r3, #16 800f25e: 2b10 cmp r3, #16 800f260: d103 bne.n 800f26a { /* Clear IDLE Flag */ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 800f262: 687b ldr r3, [r7, #4] 800f264: 681b ldr r3, [r3, #0] 800f266: 2210 movs r2, #16 800f268: 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); 800f26a: 687b ldr r3, [r7, #4] 800f26c: f8b3 305c ldrh.w r3, [r3, #92] @ 0x5c 800f270: 4619 mov r1, r3 800f272: 6878 ldr r0, [r7, #4] 800f274: f7f4 fec6 bl 8004004 800f278: e002 b.n 800f280 #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); 800f27a: 6878 ldr r0, [r7, #4] 800f27c: f7f4 feb8 bl 8003ff0 while ((nb_rx_data > 0U) && ((isrflags & USART_ISR_RXNE_RXFNE) != 0U)) 800f280: f8b7 309e ldrh.w r3, [r7, #158] @ 0x9e 800f284: 2b00 cmp r3, #0 800f286: d006 beq.n 800f296 800f288: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800f28c: f003 0320 and.w r3, r3, #32 800f290: 2b00 cmp r3, #0 800f292: f47f aed1 bne.w 800f038 /* 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; 800f296: 687b ldr r3, [r7, #4] 800f298: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800f29c: f8a7 308a strh.w r3, [r7, #138] @ 0x8a if ((rxdatacount != 0U) && (rxdatacount < huart->NbRxDataToProcess)) 800f2a0: f8b7 308a ldrh.w r3, [r7, #138] @ 0x8a 800f2a4: 2b00 cmp r3, #0 800f2a6: d049 beq.n 800f33c 800f2a8: 687b ldr r3, [r7, #4] 800f2aa: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 800f2ae: f8b7 208a ldrh.w r2, [r7, #138] @ 0x8a 800f2b2: 429a cmp r2, r3 800f2b4: d242 bcs.n 800f33c { /* Disable the UART RXFT interrupt*/ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_RXFTIE); 800f2b6: 687b ldr r3, [r7, #4] 800f2b8: 681b ldr r3, [r3, #0] 800f2ba: 3308 adds r3, #8 800f2bc: 623b str r3, [r7, #32] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f2be: 6a3b ldr r3, [r7, #32] 800f2c0: e853 3f00 ldrex r3, [r3] 800f2c4: 61fb str r3, [r7, #28] return(result); 800f2c6: 69fb ldr r3, [r7, #28] 800f2c8: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000 800f2cc: f8c7 3084 str.w r3, [r7, #132] @ 0x84 800f2d0: 687b ldr r3, [r7, #4] 800f2d2: 681b ldr r3, [r3, #0] 800f2d4: 3308 adds r3, #8 800f2d6: f8d7 2084 ldr.w r2, [r7, #132] @ 0x84 800f2da: 62fa str r2, [r7, #44] @ 0x2c 800f2dc: 62bb str r3, [r7, #40] @ 0x28 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f2de: 6ab9 ldr r1, [r7, #40] @ 0x28 800f2e0: 6afa ldr r2, [r7, #44] @ 0x2c 800f2e2: e841 2300 strex r3, r2, [r1] 800f2e6: 627b str r3, [r7, #36] @ 0x24 return(result); 800f2e8: 6a7b ldr r3, [r7, #36] @ 0x24 800f2ea: 2b00 cmp r3, #0 800f2ec: d1e3 bne.n 800f2b6 /* Update the RxISR function pointer */ huart->RxISR = UART_RxISR_8BIT; 800f2ee: 687b ldr r3, [r7, #4] 800f2f0: 4a16 ldr r2, [pc, #88] @ (800f34c ) 800f2f2: 675a str r2, [r3, #116] @ 0x74 /* Enable the UART Data Register Not Empty interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_RXNEIE_RXFNEIE); 800f2f4: 687b ldr r3, [r7, #4] 800f2f6: 681b ldr r3, [r3, #0] 800f2f8: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f2fa: 68fb ldr r3, [r7, #12] 800f2fc: e853 3f00 ldrex r3, [r3] 800f300: 60bb str r3, [r7, #8] return(result); 800f302: 68bb ldr r3, [r7, #8] 800f304: f043 0320 orr.w r3, r3, #32 800f308: f8c7 3080 str.w r3, [r7, #128] @ 0x80 800f30c: 687b ldr r3, [r7, #4] 800f30e: 681b ldr r3, [r3, #0] 800f310: 461a mov r2, r3 800f312: f8d7 3080 ldr.w r3, [r7, #128] @ 0x80 800f316: 61bb str r3, [r7, #24] 800f318: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f31a: 6979 ldr r1, [r7, #20] 800f31c: 69ba ldr r2, [r7, #24] 800f31e: e841 2300 strex r3, r2, [r1] 800f322: 613b str r3, [r7, #16] return(result); 800f324: 693b ldr r3, [r7, #16] 800f326: 2b00 cmp r3, #0 800f328: d1e4 bne.n 800f2f4 else { /* Clear RXNE interrupt flag */ __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); } } 800f32a: e007 b.n 800f33c __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); 800f32c: 687b ldr r3, [r7, #4] 800f32e: 681b ldr r3, [r3, #0] 800f330: 699a ldr r2, [r3, #24] 800f332: 687b ldr r3, [r7, #4] 800f334: 681b ldr r3, [r3, #0] 800f336: f042 0208 orr.w r2, r2, #8 800f33a: 619a str r2, [r3, #24] } 800f33c: bf00 nop 800f33e: 37b0 adds r7, #176 @ 0xb0 800f340: 46bd mov sp, r7 800f342: bd80 pop {r7, pc} 800f344: effffffe .word 0xeffffffe 800f348: 58000c00 .word 0x58000c00 800f34c: 0800ec81 .word 0x0800ec81 0800f350 : * interruptions have been enabled by HAL_UART_Receive_IT() * @param huart UART handle. * @retval None */ static void UART_RxISR_16BIT_FIFOEN(UART_HandleTypeDef *huart) { 800f350: b580 push {r7, lr} 800f352: b0ae sub sp, #184 @ 0xb8 800f354: af00 add r7, sp, #0 800f356: 6078 str r0, [r7, #4] uint16_t *tmp; uint16_t uhMask = huart->Mask; 800f358: 687b ldr r3, [r7, #4] 800f35a: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 800f35e: 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); 800f362: 687b ldr r3, [r7, #4] 800f364: 681b ldr r3, [r3, #0] 800f366: 69db ldr r3, [r3, #28] 800f368: f8c7 30b4 str.w r3, [r7, #180] @ 0xb4 uint32_t cr1its = READ_REG(huart->Instance->CR1); 800f36c: 687b ldr r3, [r7, #4] 800f36e: 681b ldr r3, [r3, #0] 800f370: 681b ldr r3, [r3, #0] 800f372: f8c7 30ac str.w r3, [r7, #172] @ 0xac uint32_t cr3its = READ_REG(huart->Instance->CR3); 800f376: 687b ldr r3, [r7, #4] 800f378: 681b ldr r3, [r3, #0] 800f37a: 689b ldr r3, [r3, #8] 800f37c: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8 /* Check that a Rx process is ongoing */ if (huart->RxState == HAL_UART_STATE_BUSY_RX) 800f380: 687b ldr r3, [r7, #4] 800f382: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800f386: 2b22 cmp r3, #34 @ 0x22 800f388: f040 8184 bne.w 800f694 { nb_rx_data = huart->NbRxDataToProcess; 800f38c: 687b ldr r3, [r7, #4] 800f38e: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 800f392: f8a7 30a6 strh.w r3, [r7, #166] @ 0xa6 while ((nb_rx_data > 0U) && ((isrflags & USART_ISR_RXNE_RXFNE) != 0U)) 800f396: e127 b.n 800f5e8 { uhdata = (uint16_t) READ_REG(huart->Instance->RDR); 800f398: 687b ldr r3, [r7, #4] 800f39a: 681b ldr r3, [r3, #0] 800f39c: 6a5b ldr r3, [r3, #36] @ 0x24 800f39e: f8a7 30a4 strh.w r3, [r7, #164] @ 0xa4 tmp = (uint16_t *) huart->pRxBuffPtr ; 800f3a2: 687b ldr r3, [r7, #4] 800f3a4: 6d9b ldr r3, [r3, #88] @ 0x58 800f3a6: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 *tmp = (uint16_t)(uhdata & uhMask); 800f3aa: f8b7 20a4 ldrh.w r2, [r7, #164] @ 0xa4 800f3ae: f8b7 30b2 ldrh.w r3, [r7, #178] @ 0xb2 800f3b2: 4013 ands r3, r2 800f3b4: b29a uxth r2, r3 800f3b6: f8d7 30a0 ldr.w r3, [r7, #160] @ 0xa0 800f3ba: 801a strh r2, [r3, #0] huart->pRxBuffPtr += 2U; 800f3bc: 687b ldr r3, [r7, #4] 800f3be: 6d9b ldr r3, [r3, #88] @ 0x58 800f3c0: 1c9a adds r2, r3, #2 800f3c2: 687b ldr r3, [r7, #4] 800f3c4: 659a str r2, [r3, #88] @ 0x58 huart->RxXferCount--; 800f3c6: 687b ldr r3, [r7, #4] 800f3c8: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800f3cc: b29b uxth r3, r3 800f3ce: 3b01 subs r3, #1 800f3d0: b29a uxth r2, r3 800f3d2: 687b ldr r3, [r7, #4] 800f3d4: f8a3 205e strh.w r2, [r3, #94] @ 0x5e isrflags = READ_REG(huart->Instance->ISR); 800f3d8: 687b ldr r3, [r7, #4] 800f3da: 681b ldr r3, [r3, #0] 800f3dc: 69db ldr r3, [r3, #28] 800f3de: 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) 800f3e2: f8d7 30b4 ldr.w r3, [r7, #180] @ 0xb4 800f3e6: f003 0307 and.w r3, r3, #7 800f3ea: 2b00 cmp r3, #0 800f3ec: d053 beq.n 800f496 { /* UART parity error interrupt occurred -------------------------------------*/ if (((isrflags & USART_ISR_PE) != 0U) && ((cr1its & USART_CR1_PEIE) != 0U)) 800f3ee: f8d7 30b4 ldr.w r3, [r7, #180] @ 0xb4 800f3f2: f003 0301 and.w r3, r3, #1 800f3f6: 2b00 cmp r3, #0 800f3f8: d011 beq.n 800f41e 800f3fa: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800f3fe: f403 7380 and.w r3, r3, #256 @ 0x100 800f402: 2b00 cmp r3, #0 800f404: d00b beq.n 800f41e { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_PEF); 800f406: 687b ldr r3, [r7, #4] 800f408: 681b ldr r3, [r3, #0] 800f40a: 2201 movs r2, #1 800f40c: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_PE; 800f40e: 687b ldr r3, [r7, #4] 800f410: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800f414: f043 0201 orr.w r2, r3, #1 800f418: 687b ldr r3, [r7, #4] 800f41a: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART frame error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_FE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800f41e: f8d7 30b4 ldr.w r3, [r7, #180] @ 0xb4 800f422: f003 0302 and.w r3, r3, #2 800f426: 2b00 cmp r3, #0 800f428: d011 beq.n 800f44e 800f42a: f8d7 30a8 ldr.w r3, [r7, #168] @ 0xa8 800f42e: f003 0301 and.w r3, r3, #1 800f432: 2b00 cmp r3, #0 800f434: d00b beq.n 800f44e { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_FEF); 800f436: 687b ldr r3, [r7, #4] 800f438: 681b ldr r3, [r3, #0] 800f43a: 2202 movs r2, #2 800f43c: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_FE; 800f43e: 687b ldr r3, [r7, #4] 800f440: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800f444: f043 0204 orr.w r2, r3, #4 800f448: 687b ldr r3, [r7, #4] 800f44a: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART noise error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_NE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800f44e: f8d7 30b4 ldr.w r3, [r7, #180] @ 0xb4 800f452: f003 0304 and.w r3, r3, #4 800f456: 2b00 cmp r3, #0 800f458: d011 beq.n 800f47e 800f45a: f8d7 30a8 ldr.w r3, [r7, #168] @ 0xa8 800f45e: f003 0301 and.w r3, r3, #1 800f462: 2b00 cmp r3, #0 800f464: d00b beq.n 800f47e { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_NEF); 800f466: 687b ldr r3, [r7, #4] 800f468: 681b ldr r3, [r3, #0] 800f46a: 2204 movs r2, #4 800f46c: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_NE; 800f46e: 687b ldr r3, [r7, #4] 800f470: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800f474: f043 0202 orr.w r2, r3, #2 800f478: 687b ldr r3, [r7, #4] 800f47a: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* Call UART Error Call back function if need be ----------------------------*/ if (huart->ErrorCode != HAL_UART_ERROR_NONE) 800f47e: 687b ldr r3, [r7, #4] 800f480: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800f484: 2b00 cmp r3, #0 800f486: d006 beq.n 800f496 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800f488: 6878 ldr r0, [r7, #4] 800f48a: f7fe f961 bl 800d750 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ huart->ErrorCode = HAL_UART_ERROR_NONE; 800f48e: 687b ldr r3, [r7, #4] 800f490: 2200 movs r2, #0 800f492: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } } if (huart->RxXferCount == 0U) 800f496: 687b ldr r3, [r7, #4] 800f498: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800f49c: b29b uxth r3, r3 800f49e: 2b00 cmp r3, #0 800f4a0: f040 80a2 bne.w 800f5e8 { /* Disable the UART Parity Error Interrupt and RXFT interrupt*/ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_PEIE); 800f4a4: 687b ldr r3, [r7, #4] 800f4a6: 681b ldr r3, [r3, #0] 800f4a8: 677b str r3, [r7, #116] @ 0x74 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f4aa: 6f7b ldr r3, [r7, #116] @ 0x74 800f4ac: e853 3f00 ldrex r3, [r3] 800f4b0: 673b str r3, [r7, #112] @ 0x70 return(result); 800f4b2: 6f3b ldr r3, [r7, #112] @ 0x70 800f4b4: f423 7380 bic.w r3, r3, #256 @ 0x100 800f4b8: f8c7 309c str.w r3, [r7, #156] @ 0x9c 800f4bc: 687b ldr r3, [r7, #4] 800f4be: 681b ldr r3, [r3, #0] 800f4c0: 461a mov r2, r3 800f4c2: f8d7 309c ldr.w r3, [r7, #156] @ 0x9c 800f4c6: f8c7 3080 str.w r3, [r7, #128] @ 0x80 800f4ca: 67fa str r2, [r7, #124] @ 0x7c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f4cc: 6ff9 ldr r1, [r7, #124] @ 0x7c 800f4ce: f8d7 2080 ldr.w r2, [r7, #128] @ 0x80 800f4d2: e841 2300 strex r3, r2, [r1] 800f4d6: 67bb str r3, [r7, #120] @ 0x78 return(result); 800f4d8: 6fbb ldr r3, [r7, #120] @ 0x78 800f4da: 2b00 cmp r3, #0 800f4dc: d1e2 bne.n 800f4a4 /* 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)); 800f4de: 687b ldr r3, [r7, #4] 800f4e0: 681b ldr r3, [r3, #0] 800f4e2: 3308 adds r3, #8 800f4e4: 663b str r3, [r7, #96] @ 0x60 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f4e6: 6e3b ldr r3, [r7, #96] @ 0x60 800f4e8: e853 3f00 ldrex r3, [r3] 800f4ec: 65fb str r3, [r7, #92] @ 0x5c return(result); 800f4ee: 6dfa ldr r2, [r7, #92] @ 0x5c 800f4f0: 4b6e ldr r3, [pc, #440] @ (800f6ac ) 800f4f2: 4013 ands r3, r2 800f4f4: f8c7 3098 str.w r3, [r7, #152] @ 0x98 800f4f8: 687b ldr r3, [r7, #4] 800f4fa: 681b ldr r3, [r3, #0] 800f4fc: 3308 adds r3, #8 800f4fe: f8d7 2098 ldr.w r2, [r7, #152] @ 0x98 800f502: 66fa str r2, [r7, #108] @ 0x6c 800f504: 66bb str r3, [r7, #104] @ 0x68 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f506: 6eb9 ldr r1, [r7, #104] @ 0x68 800f508: 6efa ldr r2, [r7, #108] @ 0x6c 800f50a: e841 2300 strex r3, r2, [r1] 800f50e: 667b str r3, [r7, #100] @ 0x64 return(result); 800f510: 6e7b ldr r3, [r7, #100] @ 0x64 800f512: 2b00 cmp r3, #0 800f514: d1e3 bne.n 800f4de /* Rx process is completed, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800f516: 687b ldr r3, [r7, #4] 800f518: 2220 movs r2, #32 800f51a: f8c3 208c str.w r2, [r3, #140] @ 0x8c /* Clear RxISR function pointer */ huart->RxISR = NULL; 800f51e: 687b ldr r3, [r7, #4] 800f520: 2200 movs r2, #0 800f522: 675a str r2, [r3, #116] @ 0x74 /* Initialize type of RxEvent to Transfer Complete */ huart->RxEventType = HAL_UART_RXEVENT_TC; 800f524: 687b ldr r3, [r7, #4] 800f526: 2200 movs r2, #0 800f528: 671a str r2, [r3, #112] @ 0x70 if (!(IS_LPUART_INSTANCE(huart->Instance))) 800f52a: 687b ldr r3, [r7, #4] 800f52c: 681b ldr r3, [r3, #0] 800f52e: 4a60 ldr r2, [pc, #384] @ (800f6b0 ) 800f530: 4293 cmp r3, r2 800f532: d021 beq.n 800f578 { /* Check that USART RTOEN bit is set */ if (READ_BIT(huart->Instance->CR2, USART_CR2_RTOEN) != 0U) 800f534: 687b ldr r3, [r7, #4] 800f536: 681b ldr r3, [r3, #0] 800f538: 685b ldr r3, [r3, #4] 800f53a: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800f53e: 2b00 cmp r3, #0 800f540: d01a beq.n 800f578 { /* Enable the UART Receiver Timeout Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_RTOIE); 800f542: 687b ldr r3, [r7, #4] 800f544: 681b ldr r3, [r3, #0] 800f546: 64fb str r3, [r7, #76] @ 0x4c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f548: 6cfb ldr r3, [r7, #76] @ 0x4c 800f54a: e853 3f00 ldrex r3, [r3] 800f54e: 64bb str r3, [r7, #72] @ 0x48 return(result); 800f550: 6cbb ldr r3, [r7, #72] @ 0x48 800f552: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 800f556: f8c7 3094 str.w r3, [r7, #148] @ 0x94 800f55a: 687b ldr r3, [r7, #4] 800f55c: 681b ldr r3, [r3, #0] 800f55e: 461a mov r2, r3 800f560: f8d7 3094 ldr.w r3, [r7, #148] @ 0x94 800f564: 65bb str r3, [r7, #88] @ 0x58 800f566: 657a str r2, [r7, #84] @ 0x54 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f568: 6d79 ldr r1, [r7, #84] @ 0x54 800f56a: 6dba ldr r2, [r7, #88] @ 0x58 800f56c: e841 2300 strex r3, r2, [r1] 800f570: 653b str r3, [r7, #80] @ 0x50 return(result); 800f572: 6d3b ldr r3, [r7, #80] @ 0x50 800f574: 2b00 cmp r3, #0 800f576: d1e4 bne.n 800f542 } } /* Check current reception Mode : If Reception till IDLE event has been selected : */ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800f578: 687b ldr r3, [r7, #4] 800f57a: 6edb ldr r3, [r3, #108] @ 0x6c 800f57c: 2b01 cmp r3, #1 800f57e: d130 bne.n 800f5e2 { /* Set reception type to Standard */ huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800f580: 687b ldr r3, [r7, #4] 800f582: 2200 movs r2, #0 800f584: 66da str r2, [r3, #108] @ 0x6c /* Disable IDLE interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800f586: 687b ldr r3, [r7, #4] 800f588: 681b ldr r3, [r3, #0] 800f58a: 63bb str r3, [r7, #56] @ 0x38 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f58c: 6bbb ldr r3, [r7, #56] @ 0x38 800f58e: e853 3f00 ldrex r3, [r3] 800f592: 637b str r3, [r7, #52] @ 0x34 return(result); 800f594: 6b7b ldr r3, [r7, #52] @ 0x34 800f596: f023 0310 bic.w r3, r3, #16 800f59a: f8c7 3090 str.w r3, [r7, #144] @ 0x90 800f59e: 687b ldr r3, [r7, #4] 800f5a0: 681b ldr r3, [r3, #0] 800f5a2: 461a mov r2, r3 800f5a4: f8d7 3090 ldr.w r3, [r7, #144] @ 0x90 800f5a8: 647b str r3, [r7, #68] @ 0x44 800f5aa: 643a str r2, [r7, #64] @ 0x40 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f5ac: 6c39 ldr r1, [r7, #64] @ 0x40 800f5ae: 6c7a ldr r2, [r7, #68] @ 0x44 800f5b0: e841 2300 strex r3, r2, [r1] 800f5b4: 63fb str r3, [r7, #60] @ 0x3c return(result); 800f5b6: 6bfb ldr r3, [r7, #60] @ 0x3c 800f5b8: 2b00 cmp r3, #0 800f5ba: d1e4 bne.n 800f586 if (__HAL_UART_GET_FLAG(huart, UART_FLAG_IDLE) == SET) 800f5bc: 687b ldr r3, [r7, #4] 800f5be: 681b ldr r3, [r3, #0] 800f5c0: 69db ldr r3, [r3, #28] 800f5c2: f003 0310 and.w r3, r3, #16 800f5c6: 2b10 cmp r3, #16 800f5c8: d103 bne.n 800f5d2 { /* Clear IDLE Flag */ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 800f5ca: 687b ldr r3, [r7, #4] 800f5cc: 681b ldr r3, [r3, #0] 800f5ce: 2210 movs r2, #16 800f5d0: 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); 800f5d2: 687b ldr r3, [r7, #4] 800f5d4: f8b3 305c ldrh.w r3, [r3, #92] @ 0x5c 800f5d8: 4619 mov r1, r3 800f5da: 6878 ldr r0, [r7, #4] 800f5dc: f7f4 fd12 bl 8004004 800f5e0: e002 b.n 800f5e8 #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); 800f5e2: 6878 ldr r0, [r7, #4] 800f5e4: f7f4 fd04 bl 8003ff0 while ((nb_rx_data > 0U) && ((isrflags & USART_ISR_RXNE_RXFNE) != 0U)) 800f5e8: f8b7 30a6 ldrh.w r3, [r7, #166] @ 0xa6 800f5ec: 2b00 cmp r3, #0 800f5ee: d006 beq.n 800f5fe 800f5f0: f8d7 30b4 ldr.w r3, [r7, #180] @ 0xb4 800f5f4: f003 0320 and.w r3, r3, #32 800f5f8: 2b00 cmp r3, #0 800f5fa: f47f aecd bne.w 800f398 /* 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; 800f5fe: 687b ldr r3, [r7, #4] 800f600: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800f604: f8a7 308e strh.w r3, [r7, #142] @ 0x8e if ((rxdatacount != 0U) && (rxdatacount < huart->NbRxDataToProcess)) 800f608: f8b7 308e ldrh.w r3, [r7, #142] @ 0x8e 800f60c: 2b00 cmp r3, #0 800f60e: d049 beq.n 800f6a4 800f610: 687b ldr r3, [r7, #4] 800f612: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 800f616: f8b7 208e ldrh.w r2, [r7, #142] @ 0x8e 800f61a: 429a cmp r2, r3 800f61c: d242 bcs.n 800f6a4 { /* Disable the UART RXFT interrupt*/ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_RXFTIE); 800f61e: 687b ldr r3, [r7, #4] 800f620: 681b ldr r3, [r3, #0] 800f622: 3308 adds r3, #8 800f624: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f626: 6a7b ldr r3, [r7, #36] @ 0x24 800f628: e853 3f00 ldrex r3, [r3] 800f62c: 623b str r3, [r7, #32] return(result); 800f62e: 6a3b ldr r3, [r7, #32] 800f630: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000 800f634: f8c7 3088 str.w r3, [r7, #136] @ 0x88 800f638: 687b ldr r3, [r7, #4] 800f63a: 681b ldr r3, [r3, #0] 800f63c: 3308 adds r3, #8 800f63e: f8d7 2088 ldr.w r2, [r7, #136] @ 0x88 800f642: 633a str r2, [r7, #48] @ 0x30 800f644: 62fb str r3, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f646: 6af9 ldr r1, [r7, #44] @ 0x2c 800f648: 6b3a ldr r2, [r7, #48] @ 0x30 800f64a: e841 2300 strex r3, r2, [r1] 800f64e: 62bb str r3, [r7, #40] @ 0x28 return(result); 800f650: 6abb ldr r3, [r7, #40] @ 0x28 800f652: 2b00 cmp r3, #0 800f654: d1e3 bne.n 800f61e /* Update the RxISR function pointer */ huart->RxISR = UART_RxISR_16BIT; 800f656: 687b ldr r3, [r7, #4] 800f658: 4a16 ldr r2, [pc, #88] @ (800f6b4 ) 800f65a: 675a str r2, [r3, #116] @ 0x74 /* Enable the UART Data Register Not Empty interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_RXNEIE_RXFNEIE); 800f65c: 687b ldr r3, [r7, #4] 800f65e: 681b ldr r3, [r3, #0] 800f660: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f662: 693b ldr r3, [r7, #16] 800f664: e853 3f00 ldrex r3, [r3] 800f668: 60fb str r3, [r7, #12] return(result); 800f66a: 68fb ldr r3, [r7, #12] 800f66c: f043 0320 orr.w r3, r3, #32 800f670: f8c7 3084 str.w r3, [r7, #132] @ 0x84 800f674: 687b ldr r3, [r7, #4] 800f676: 681b ldr r3, [r3, #0] 800f678: 461a mov r2, r3 800f67a: f8d7 3084 ldr.w r3, [r7, #132] @ 0x84 800f67e: 61fb str r3, [r7, #28] 800f680: 61ba str r2, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f682: 69b9 ldr r1, [r7, #24] 800f684: 69fa ldr r2, [r7, #28] 800f686: e841 2300 strex r3, r2, [r1] 800f68a: 617b str r3, [r7, #20] return(result); 800f68c: 697b ldr r3, [r7, #20] 800f68e: 2b00 cmp r3, #0 800f690: d1e4 bne.n 800f65c else { /* Clear RXNE interrupt flag */ __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); } } 800f692: e007 b.n 800f6a4 __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); 800f694: 687b ldr r3, [r7, #4] 800f696: 681b ldr r3, [r3, #0] 800f698: 699a ldr r2, [r3, #24] 800f69a: 687b ldr r3, [r7, #4] 800f69c: 681b ldr r3, [r3, #0] 800f69e: f042 0208 orr.w r2, r2, #8 800f6a2: 619a str r2, [r3, #24] } 800f6a4: bf00 nop 800f6a6: 37b8 adds r7, #184 @ 0xb8 800f6a8: 46bd mov sp, r7 800f6aa: bd80 pop {r7, pc} 800f6ac: effffffe .word 0xeffffffe 800f6b0: 58000c00 .word 0x58000c00 800f6b4: 0800ee39 .word 0x0800ee39 0800f6b8 : * @brief UART wakeup from Stop mode callback. * @param huart UART handle. * @retval None */ __weak void HAL_UARTEx_WakeupCallback(UART_HandleTypeDef *huart) { 800f6b8: b480 push {r7} 800f6ba: b083 sub sp, #12 800f6bc: af00 add r7, sp, #0 800f6be: 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. */ } 800f6c0: bf00 nop 800f6c2: 370c adds r7, #12 800f6c4: 46bd mov sp, r7 800f6c6: f85d 7b04 ldr.w r7, [sp], #4 800f6ca: 4770 bx lr 0800f6cc : * @brief UART RX Fifo full callback. * @param huart UART handle. * @retval None */ __weak void HAL_UARTEx_RxFifoFullCallback(UART_HandleTypeDef *huart) { 800f6cc: b480 push {r7} 800f6ce: b083 sub sp, #12 800f6d0: af00 add r7, sp, #0 800f6d2: 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. */ } 800f6d4: bf00 nop 800f6d6: 370c adds r7, #12 800f6d8: 46bd mov sp, r7 800f6da: f85d 7b04 ldr.w r7, [sp], #4 800f6de: 4770 bx lr 0800f6e0 : * @brief UART TX Fifo empty callback. * @param huart UART handle. * @retval None */ __weak void HAL_UARTEx_TxFifoEmptyCallback(UART_HandleTypeDef *huart) { 800f6e0: b480 push {r7} 800f6e2: b083 sub sp, #12 800f6e4: af00 add r7, sp, #0 800f6e6: 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. */ } 800f6e8: bf00 nop 800f6ea: 370c adds r7, #12 800f6ec: 46bd mov sp, r7 800f6ee: f85d 7b04 ldr.w r7, [sp], #4 800f6f2: 4770 bx lr 0800f6f4 : * @brief Disable the FIFO mode. * @param huart UART handle. * @retval HAL status */ HAL_StatusTypeDef HAL_UARTEx_DisableFifoMode(UART_HandleTypeDef *huart) { 800f6f4: b480 push {r7} 800f6f6: b085 sub sp, #20 800f6f8: af00 add r7, sp, #0 800f6fa: 6078 str r0, [r7, #4] /* Check parameters */ assert_param(IS_UART_FIFO_INSTANCE(huart->Instance)); /* Process Locked */ __HAL_LOCK(huart); 800f6fc: 687b ldr r3, [r7, #4] 800f6fe: f893 3084 ldrb.w r3, [r3, #132] @ 0x84 800f702: 2b01 cmp r3, #1 800f704: d101 bne.n 800f70a 800f706: 2302 movs r3, #2 800f708: e027 b.n 800f75a 800f70a: 687b ldr r3, [r7, #4] 800f70c: 2201 movs r2, #1 800f70e: f883 2084 strb.w r2, [r3, #132] @ 0x84 huart->gState = HAL_UART_STATE_BUSY; 800f712: 687b ldr r3, [r7, #4] 800f714: 2224 movs r2, #36 @ 0x24 800f716: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Save actual UART configuration */ tmpcr1 = READ_REG(huart->Instance->CR1); 800f71a: 687b ldr r3, [r7, #4] 800f71c: 681b ldr r3, [r3, #0] 800f71e: 681b ldr r3, [r3, #0] 800f720: 60fb str r3, [r7, #12] /* Disable UART */ __HAL_UART_DISABLE(huart); 800f722: 687b ldr r3, [r7, #4] 800f724: 681b ldr r3, [r3, #0] 800f726: 681a ldr r2, [r3, #0] 800f728: 687b ldr r3, [r7, #4] 800f72a: 681b ldr r3, [r3, #0] 800f72c: f022 0201 bic.w r2, r2, #1 800f730: 601a str r2, [r3, #0] /* Enable FIFO mode */ CLEAR_BIT(tmpcr1, USART_CR1_FIFOEN); 800f732: 68fb ldr r3, [r7, #12] 800f734: f023 5300 bic.w r3, r3, #536870912 @ 0x20000000 800f738: 60fb str r3, [r7, #12] huart->FifoMode = UART_FIFOMODE_DISABLE; 800f73a: 687b ldr r3, [r7, #4] 800f73c: 2200 movs r2, #0 800f73e: 665a str r2, [r3, #100] @ 0x64 /* Restore UART configuration */ WRITE_REG(huart->Instance->CR1, tmpcr1); 800f740: 687b ldr r3, [r7, #4] 800f742: 681b ldr r3, [r3, #0] 800f744: 68fa ldr r2, [r7, #12] 800f746: 601a str r2, [r3, #0] huart->gState = HAL_UART_STATE_READY; 800f748: 687b ldr r3, [r7, #4] 800f74a: 2220 movs r2, #32 800f74c: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Process Unlocked */ __HAL_UNLOCK(huart); 800f750: 687b ldr r3, [r7, #4] 800f752: 2200 movs r2, #0 800f754: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_OK; 800f758: 2300 movs r3, #0 } 800f75a: 4618 mov r0, r3 800f75c: 3714 adds r7, #20 800f75e: 46bd mov sp, r7 800f760: f85d 7b04 ldr.w r7, [sp], #4 800f764: 4770 bx lr 0800f766 : * @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) { 800f766: b580 push {r7, lr} 800f768: b084 sub sp, #16 800f76a: af00 add r7, sp, #0 800f76c: 6078 str r0, [r7, #4] 800f76e: 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); 800f770: 687b ldr r3, [r7, #4] 800f772: f893 3084 ldrb.w r3, [r3, #132] @ 0x84 800f776: 2b01 cmp r3, #1 800f778: d101 bne.n 800f77e 800f77a: 2302 movs r3, #2 800f77c: e02d b.n 800f7da 800f77e: 687b ldr r3, [r7, #4] 800f780: 2201 movs r2, #1 800f782: f883 2084 strb.w r2, [r3, #132] @ 0x84 huart->gState = HAL_UART_STATE_BUSY; 800f786: 687b ldr r3, [r7, #4] 800f788: 2224 movs r2, #36 @ 0x24 800f78a: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Save actual UART configuration */ tmpcr1 = READ_REG(huart->Instance->CR1); 800f78e: 687b ldr r3, [r7, #4] 800f790: 681b ldr r3, [r3, #0] 800f792: 681b ldr r3, [r3, #0] 800f794: 60fb str r3, [r7, #12] /* Disable UART */ __HAL_UART_DISABLE(huart); 800f796: 687b ldr r3, [r7, #4] 800f798: 681b ldr r3, [r3, #0] 800f79a: 681a ldr r2, [r3, #0] 800f79c: 687b ldr r3, [r7, #4] 800f79e: 681b ldr r3, [r3, #0] 800f7a0: f022 0201 bic.w r2, r2, #1 800f7a4: 601a str r2, [r3, #0] /* Update TX threshold configuration */ MODIFY_REG(huart->Instance->CR3, USART_CR3_TXFTCFG, Threshold); 800f7a6: 687b ldr r3, [r7, #4] 800f7a8: 681b ldr r3, [r3, #0] 800f7aa: 689b ldr r3, [r3, #8] 800f7ac: f023 4160 bic.w r1, r3, #3758096384 @ 0xe0000000 800f7b0: 687b ldr r3, [r7, #4] 800f7b2: 681b ldr r3, [r3, #0] 800f7b4: 683a ldr r2, [r7, #0] 800f7b6: 430a orrs r2, r1 800f7b8: 609a str r2, [r3, #8] /* Determine the number of data to process during RX/TX ISR execution */ UARTEx_SetNbDataToProcess(huart); 800f7ba: 6878 ldr r0, [r7, #4] 800f7bc: f000 f8a0 bl 800f900 /* Restore UART configuration */ WRITE_REG(huart->Instance->CR1, tmpcr1); 800f7c0: 687b ldr r3, [r7, #4] 800f7c2: 681b ldr r3, [r3, #0] 800f7c4: 68fa ldr r2, [r7, #12] 800f7c6: 601a str r2, [r3, #0] huart->gState = HAL_UART_STATE_READY; 800f7c8: 687b ldr r3, [r7, #4] 800f7ca: 2220 movs r2, #32 800f7cc: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Process Unlocked */ __HAL_UNLOCK(huart); 800f7d0: 687b ldr r3, [r7, #4] 800f7d2: 2200 movs r2, #0 800f7d4: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_OK; 800f7d8: 2300 movs r3, #0 } 800f7da: 4618 mov r0, r3 800f7dc: 3710 adds r7, #16 800f7de: 46bd mov sp, r7 800f7e0: bd80 pop {r7, pc} 0800f7e2 : * @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) { 800f7e2: b580 push {r7, lr} 800f7e4: b084 sub sp, #16 800f7e6: af00 add r7, sp, #0 800f7e8: 6078 str r0, [r7, #4] 800f7ea: 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); 800f7ec: 687b ldr r3, [r7, #4] 800f7ee: f893 3084 ldrb.w r3, [r3, #132] @ 0x84 800f7f2: 2b01 cmp r3, #1 800f7f4: d101 bne.n 800f7fa 800f7f6: 2302 movs r3, #2 800f7f8: e02d b.n 800f856 800f7fa: 687b ldr r3, [r7, #4] 800f7fc: 2201 movs r2, #1 800f7fe: f883 2084 strb.w r2, [r3, #132] @ 0x84 huart->gState = HAL_UART_STATE_BUSY; 800f802: 687b ldr r3, [r7, #4] 800f804: 2224 movs r2, #36 @ 0x24 800f806: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Save actual UART configuration */ tmpcr1 = READ_REG(huart->Instance->CR1); 800f80a: 687b ldr r3, [r7, #4] 800f80c: 681b ldr r3, [r3, #0] 800f80e: 681b ldr r3, [r3, #0] 800f810: 60fb str r3, [r7, #12] /* Disable UART */ __HAL_UART_DISABLE(huart); 800f812: 687b ldr r3, [r7, #4] 800f814: 681b ldr r3, [r3, #0] 800f816: 681a ldr r2, [r3, #0] 800f818: 687b ldr r3, [r7, #4] 800f81a: 681b ldr r3, [r3, #0] 800f81c: f022 0201 bic.w r2, r2, #1 800f820: 601a str r2, [r3, #0] /* Update RX threshold configuration */ MODIFY_REG(huart->Instance->CR3, USART_CR3_RXFTCFG, Threshold); 800f822: 687b ldr r3, [r7, #4] 800f824: 681b ldr r3, [r3, #0] 800f826: 689b ldr r3, [r3, #8] 800f828: f023 6160 bic.w r1, r3, #234881024 @ 0xe000000 800f82c: 687b ldr r3, [r7, #4] 800f82e: 681b ldr r3, [r3, #0] 800f830: 683a ldr r2, [r7, #0] 800f832: 430a orrs r2, r1 800f834: 609a str r2, [r3, #8] /* Determine the number of data to process during RX/TX ISR execution */ UARTEx_SetNbDataToProcess(huart); 800f836: 6878 ldr r0, [r7, #4] 800f838: f000 f862 bl 800f900 /* Restore UART configuration */ WRITE_REG(huart->Instance->CR1, tmpcr1); 800f83c: 687b ldr r3, [r7, #4] 800f83e: 681b ldr r3, [r3, #0] 800f840: 68fa ldr r2, [r7, #12] 800f842: 601a str r2, [r3, #0] huart->gState = HAL_UART_STATE_READY; 800f844: 687b ldr r3, [r7, #4] 800f846: 2220 movs r2, #32 800f848: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Process Unlocked */ __HAL_UNLOCK(huart); 800f84c: 687b ldr r3, [r7, #4] 800f84e: 2200 movs r2, #0 800f850: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_OK; 800f854: 2300 movs r3, #0 } 800f856: 4618 mov r0, r3 800f858: 3710 adds r7, #16 800f85a: 46bd mov sp, r7 800f85c: bd80 pop {r7, pc} 0800f85e : * @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) { 800f85e: b580 push {r7, lr} 800f860: b08c sub sp, #48 @ 0x30 800f862: af00 add r7, sp, #0 800f864: 60f8 str r0, [r7, #12] 800f866: 60b9 str r1, [r7, #8] 800f868: 4613 mov r3, r2 800f86a: 80fb strh r3, [r7, #6] HAL_StatusTypeDef status = HAL_OK; 800f86c: 2300 movs r3, #0 800f86e: f887 302f strb.w r3, [r7, #47] @ 0x2f /* Check that a Rx process is not already ongoing */ if (huart->RxState == HAL_UART_STATE_READY) 800f872: 68fb ldr r3, [r7, #12] 800f874: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800f878: 2b20 cmp r3, #32 800f87a: d13b bne.n 800f8f4 { if ((pData == NULL) || (Size == 0U)) 800f87c: 68bb ldr r3, [r7, #8] 800f87e: 2b00 cmp r3, #0 800f880: d002 beq.n 800f888 800f882: 88fb ldrh r3, [r7, #6] 800f884: 2b00 cmp r3, #0 800f886: d101 bne.n 800f88c { return HAL_ERROR; 800f888: 2301 movs r3, #1 800f88a: e034 b.n 800f8f6 } /* Set Reception type to reception till IDLE Event*/ huart->ReceptionType = HAL_UART_RECEPTION_TOIDLE; 800f88c: 68fb ldr r3, [r7, #12] 800f88e: 2201 movs r2, #1 800f890: 66da str r2, [r3, #108] @ 0x6c huart->RxEventType = HAL_UART_RXEVENT_TC; 800f892: 68fb ldr r3, [r7, #12] 800f894: 2200 movs r2, #0 800f896: 671a str r2, [r3, #112] @ 0x70 (void)UART_Start_Receive_IT(huart, pData, Size); 800f898: 88fb ldrh r3, [r7, #6] 800f89a: 461a mov r2, r3 800f89c: 68b9 ldr r1, [r7, #8] 800f89e: 68f8 ldr r0, [r7, #12] 800f8a0: f7fe fe82 bl 800e5a8 if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800f8a4: 68fb ldr r3, [r7, #12] 800f8a6: 6edb ldr r3, [r3, #108] @ 0x6c 800f8a8: 2b01 cmp r3, #1 800f8aa: d11d bne.n 800f8e8 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 800f8ac: 68fb ldr r3, [r7, #12] 800f8ae: 681b ldr r3, [r3, #0] 800f8b0: 2210 movs r2, #16 800f8b2: 621a str r2, [r3, #32] ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800f8b4: 68fb ldr r3, [r7, #12] 800f8b6: 681b ldr r3, [r3, #0] 800f8b8: 61bb str r3, [r7, #24] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f8ba: 69bb ldr r3, [r7, #24] 800f8bc: e853 3f00 ldrex r3, [r3] 800f8c0: 617b str r3, [r7, #20] return(result); 800f8c2: 697b ldr r3, [r7, #20] 800f8c4: f043 0310 orr.w r3, r3, #16 800f8c8: 62bb str r3, [r7, #40] @ 0x28 800f8ca: 68fb ldr r3, [r7, #12] 800f8cc: 681b ldr r3, [r3, #0] 800f8ce: 461a mov r2, r3 800f8d0: 6abb ldr r3, [r7, #40] @ 0x28 800f8d2: 627b str r3, [r7, #36] @ 0x24 800f8d4: 623a str r2, [r7, #32] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f8d6: 6a39 ldr r1, [r7, #32] 800f8d8: 6a7a ldr r2, [r7, #36] @ 0x24 800f8da: e841 2300 strex r3, r2, [r1] 800f8de: 61fb str r3, [r7, #28] return(result); 800f8e0: 69fb ldr r3, [r7, #28] 800f8e2: 2b00 cmp r3, #0 800f8e4: d1e6 bne.n 800f8b4 800f8e6: e002 b.n 800f8ee { /* 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; 800f8e8: 2301 movs r3, #1 800f8ea: f887 302f strb.w r3, [r7, #47] @ 0x2f } return status; 800f8ee: f897 302f ldrb.w r3, [r7, #47] @ 0x2f 800f8f2: e000 b.n 800f8f6 } else { return HAL_BUSY; 800f8f4: 2302 movs r3, #2 } } 800f8f6: 4618 mov r0, r3 800f8f8: 3730 adds r7, #48 @ 0x30 800f8fa: 46bd mov sp, r7 800f8fc: bd80 pop {r7, pc} ... 0800f900 : * the UART configuration registers. * @param huart UART handle. * @retval None */ static void UARTEx_SetNbDataToProcess(UART_HandleTypeDef *huart) { 800f900: b480 push {r7} 800f902: b085 sub sp, #20 800f904: af00 add r7, sp, #0 800f906: 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) 800f908: 687b ldr r3, [r7, #4] 800f90a: 6e5b ldr r3, [r3, #100] @ 0x64 800f90c: 2b00 cmp r3, #0 800f90e: d108 bne.n 800f922 { huart->NbTxDataToProcess = 1U; 800f910: 687b ldr r3, [r7, #4] 800f912: 2201 movs r2, #1 800f914: f8a3 206a strh.w r2, [r3, #106] @ 0x6a huart->NbRxDataToProcess = 1U; 800f918: 687b ldr r3, [r7, #4] 800f91a: 2201 movs r2, #1 800f91c: 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]; } } 800f920: e031 b.n 800f986 rx_fifo_depth = RX_FIFO_DEPTH; 800f922: 2310 movs r3, #16 800f924: 73fb strb r3, [r7, #15] tx_fifo_depth = TX_FIFO_DEPTH; 800f926: 2310 movs r3, #16 800f928: 73bb strb r3, [r7, #14] rx_fifo_threshold = (uint8_t)(READ_BIT(huart->Instance->CR3, USART_CR3_RXFTCFG) >> USART_CR3_RXFTCFG_Pos); 800f92a: 687b ldr r3, [r7, #4] 800f92c: 681b ldr r3, [r3, #0] 800f92e: 689b ldr r3, [r3, #8] 800f930: 0e5b lsrs r3, r3, #25 800f932: b2db uxtb r3, r3 800f934: f003 0307 and.w r3, r3, #7 800f938: 737b strb r3, [r7, #13] tx_fifo_threshold = (uint8_t)(READ_BIT(huart->Instance->CR3, USART_CR3_TXFTCFG) >> USART_CR3_TXFTCFG_Pos); 800f93a: 687b ldr r3, [r7, #4] 800f93c: 681b ldr r3, [r3, #0] 800f93e: 689b ldr r3, [r3, #8] 800f940: 0f5b lsrs r3, r3, #29 800f942: b2db uxtb r3, r3 800f944: f003 0307 and.w r3, r3, #7 800f948: 733b strb r3, [r7, #12] huart->NbTxDataToProcess = ((uint16_t)tx_fifo_depth * numerator[tx_fifo_threshold]) / 800f94a: 7bbb ldrb r3, [r7, #14] 800f94c: 7b3a ldrb r2, [r7, #12] 800f94e: 4911 ldr r1, [pc, #68] @ (800f994 ) 800f950: 5c8a ldrb r2, [r1, r2] 800f952: fb02 f303 mul.w r3, r2, r3 (uint16_t)denominator[tx_fifo_threshold]; 800f956: 7b3a ldrb r2, [r7, #12] 800f958: 490f ldr r1, [pc, #60] @ (800f998 ) 800f95a: 5c8a ldrb r2, [r1, r2] huart->NbTxDataToProcess = ((uint16_t)tx_fifo_depth * numerator[tx_fifo_threshold]) / 800f95c: fb93 f3f2 sdiv r3, r3, r2 800f960: b29a uxth r2, r3 800f962: 687b ldr r3, [r7, #4] 800f964: f8a3 206a strh.w r2, [r3, #106] @ 0x6a huart->NbRxDataToProcess = ((uint16_t)rx_fifo_depth * numerator[rx_fifo_threshold]) / 800f968: 7bfb ldrb r3, [r7, #15] 800f96a: 7b7a ldrb r2, [r7, #13] 800f96c: 4909 ldr r1, [pc, #36] @ (800f994 ) 800f96e: 5c8a ldrb r2, [r1, r2] 800f970: fb02 f303 mul.w r3, r2, r3 (uint16_t)denominator[rx_fifo_threshold]; 800f974: 7b7a ldrb r2, [r7, #13] 800f976: 4908 ldr r1, [pc, #32] @ (800f998 ) 800f978: 5c8a ldrb r2, [r1, r2] huart->NbRxDataToProcess = ((uint16_t)rx_fifo_depth * numerator[rx_fifo_threshold]) / 800f97a: fb93 f3f2 sdiv r3, r3, r2 800f97e: b29a uxth r2, r3 800f980: 687b ldr r3, [r7, #4] 800f982: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 } 800f986: bf00 nop 800f988: 3714 adds r7, #20 800f98a: 46bd mov sp, r7 800f98c: f85d 7b04 ldr.w r7, [sp], #4 800f990: 4770 bx lr 800f992: bf00 nop 800f994: 08030a54 .word 0x08030a54 800f998: 08030a5c .word 0x08030a5c 0800f99c : /* 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){ 800f99c: b580 push {r7, lr} 800f99e: b082 sub sp, #8 800f9a0: af00 add r7, sp, #0 800f9a2: 6078 str r0, [r7, #4] 800f9a4: 6039 str r1, [r7, #0] tcpip_init(tcpip_init_done, arg); 800f9a6: 6839 ldr r1, [r7, #0] 800f9a8: 6878 ldr r0, [r7, #4] 800f9aa: f009 f86b bl 8018a84 LOCK_TCPIP_CORE(); 800f9ae: f000 fda1 bl 80104f4 } 800f9b2: bf00 nop 800f9b4: 3708 adds r7, #8 800f9b6: 46bd mov sp, r7 800f9b8: bd80 pop {r7, pc} ... 0800f9bc : #define tcpip_init tcpip_init_wrap uint8_t is_link_up(void) { 800f9bc: b480 push {r7} 800f9be: af00 add r7, sp, #0 return netif_is_up(&gnetif); 800f9c0: 4b05 ldr r3, [pc, #20] @ (800f9d8 ) 800f9c2: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 800f9c6: f003 0301 and.w r3, r3, #1 800f9ca: b2db uxtb r3, r3 } 800f9cc: 4618 mov r0, r3 800f9ce: 46bd mov sp, r7 800f9d0: f85d 7b04 ldr.w r7, [sp], #4 800f9d4: 4770 bx lr 800f9d6: bf00 nop 800f9d8: 24002174 .word 0x24002174 0800f9dc : /** * LwIP initialization function */ void MX_LWIP_Init(void) { 800f9dc: b580 push {r7, lr} 800f9de: b084 sub sp, #16 800f9e0: 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); 800f9e2: 4b27 ldr r3, [pc, #156] @ (800fa80 ) 800f9e4: 2200 movs r2, #0 800f9e6: 601a str r2, [r3, #0] ip_addr_set_zero_ip4(&netmask); 800f9e8: 4b26 ldr r3, [pc, #152] @ (800fa84 ) 800f9ea: 2200 movs r2, #0 800f9ec: 601a str r2, [r3, #0] ip_addr_set_zero_ip4(&gw); 800f9ee: 4b26 ldr r3, [pc, #152] @ (800fa88 ) 800f9f0: 2200 movs r2, #0 800f9f2: 601a str r2, [r3, #0] #endif /* USER CODE END IP_ADDRESSES */ /* Initilialize the LwIP stack with RTOS */ tcpip_init( NULL, NULL ); 800f9f4: 2100 movs r1, #0 800f9f6: 2000 movs r0, #0 800f9f8: f7ff ffd0 bl 800f99c // 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); 800f9fc: 4b23 ldr r3, [pc, #140] @ (800fa8c ) 800f9fe: 9302 str r3, [sp, #8] 800fa00: 4b23 ldr r3, [pc, #140] @ (800fa90 ) 800fa02: 9301 str r3, [sp, #4] 800fa04: 2300 movs r3, #0 800fa06: 9300 str r3, [sp, #0] 800fa08: 4b1f ldr r3, [pc, #124] @ (800fa88 ) 800fa0a: 4a1e ldr r2, [pc, #120] @ (800fa84 ) 800fa0c: 491c ldr r1, [pc, #112] @ (800fa80 ) 800fa0e: 4821 ldr r0, [pc, #132] @ (800fa94 ) 800fa10: f009 fea8 bl 8019764 /* Registers the default network interface */ netif_set_default(&gnetif); 800fa14: 481f ldr r0, [pc, #124] @ (800fa94 ) 800fa16: f00a f863 bl 8019ae0 if (netif_is_link_up(&gnetif)) 800fa1a: 4b1e ldr r3, [pc, #120] @ (800fa94 ) 800fa1c: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 800fa20: 089b lsrs r3, r3, #2 800fa22: f003 0301 and.w r3, r3, #1 800fa26: b2db uxtb r3, r3 800fa28: 2b00 cmp r3, #0 800fa2a: d003 beq.n 800fa34 { /* When the netif is fully configured this function must be called */ netif_set_up(&gnetif); 800fa2c: 4819 ldr r0, [pc, #100] @ (800fa94 ) 800fa2e: f00a f867 bl 8019b00 800fa32: e002 b.n 800fa3a } else { /* When the netif link is down this function must be called */ netif_set_down(&gnetif); 800fa34: 4817 ldr r0, [pc, #92] @ (800fa94 ) 800fa36: f00a f8d1 bl 8019bdc } /* Set the link callback function, this function is called on change of link status*/ netif_set_link_callback(&gnetif, ethernet_link_status_updated); 800fa3a: 4917 ldr r1, [pc, #92] @ (800fa98 ) 800fa3c: 4815 ldr r0, [pc, #84] @ (800fa94 ) 800fa3e: f00a f96d bl 8019d1c /* Create the Ethernet link handler thread */ /* USER CODE BEGIN H7_OS_THREAD_NEW_CMSIS_RTOS_V2 */ memset(&attributes, 0x0, sizeof(osThreadAttr_t)); 800fa42: 2224 movs r2, #36 @ 0x24 800fa44: 2100 movs r1, #0 800fa46: 4815 ldr r0, [pc, #84] @ (800fa9c ) 800fa48: f01a f952 bl 8029cf0 attributes.name = "EthLink"; 800fa4c: 4b13 ldr r3, [pc, #76] @ (800fa9c ) 800fa4e: 4a14 ldr r2, [pc, #80] @ (800faa0 ) 800fa50: 601a str r2, [r3, #0] attributes.stack_size = INTERFACE_THREAD_STACK_SIZE * 2; 800fa52: 4b12 ldr r3, [pc, #72] @ (800fa9c ) 800fa54: f44f 6200 mov.w r2, #2048 @ 0x800 800fa58: 615a str r2, [r3, #20] attributes.priority = osPriorityBelowNormal; 800fa5a: 4b10 ldr r3, [pc, #64] @ (800fa9c ) 800fa5c: 2210 movs r2, #16 800fa5e: 619a str r2, [r3, #24] osThreadNew(ethernet_link_thread, &gnetif, &attributes); 800fa60: 4a0e ldr r2, [pc, #56] @ (800fa9c ) 800fa62: 490c ldr r1, [pc, #48] @ (800fa94 ) 800fa64: 480f ldr r0, [pc, #60] @ (800faa4 ) 800fa66: f000 feee bl 8010846 /* 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); 800fa6a: 480a ldr r0, [pc, #40] @ (800fa94 ) 800fa6c: f00a f848 bl 8019b00 dhcp_start(&gnetif); 800fa70: 4808 ldr r0, [pc, #32] @ (800fa94 ) 800fa72: f012 fb35 bl 80220e0 #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(); 800fa76: f000 fd4d bl 8010514 /* USER CODE END 3 */ } 800fa7a: bf00 nop 800fa7c: 46bd mov sp, r7 800fa7e: bd80 pop {r7, pc} 800fa80: 240021ac .word 0x240021ac 800fa84: 240021b0 .word 0x240021b0 800fa88: 240021b4 .word 0x240021b4 800fa8c: 0801899d .word 0x0801899d 800fa90: 0800ff5d .word 0x0800ff5d 800fa94: 24002174 .word 0x24002174 800fa98: 0800faa9 .word 0x0800faa9 800fa9c: 240021b8 .word 0x240021b8 800faa0: 0802c9d8 .word 0x0802c9d8 800faa4: 0801022d .word 0x0801022d 0800faa8 : * @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) { 800faa8: b480 push {r7} 800faaa: b083 sub sp, #12 800faac: af00 add r7, sp, #0 800faae: 6078 str r0, [r7, #4] else /* netif is down */ { /* USER CODE BEGIN 6 */ /* USER CODE END 6 */ } } 800fab0: bf00 nop 800fab2: 370c adds r7, #12 800fab4: 46bd mov sp, r7 800fab6: f85d 7b04 ldr.w r7, [sp], #4 800faba: 4770 bx lr 0800fabc : * @brief Ethernet Rx Transfer completed callback * @param handlerEth: ETH handler * @retval None */ void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *handlerEth) { 800fabc: b580 push {r7, lr} 800fabe: b082 sub sp, #8 800fac0: af00 add r7, sp, #0 800fac2: 6078 str r0, [r7, #4] osSemaphoreRelease(RxPktSemaphore); 800fac4: 4b04 ldr r3, [pc, #16] @ (800fad8 ) 800fac6: 681b ldr r3, [r3, #0] 800fac8: 4618 mov r0, r3 800faca: f001 f95f bl 8010d8c } 800face: bf00 nop 800fad0: 3708 adds r7, #8 800fad2: 46bd mov sp, r7 800fad4: bd80 pop {r7, pc} 800fad6: bf00 nop 800fad8: 240021e4 .word 0x240021e4 0800fadc : * @brief Ethernet Tx Transfer completed callback * @param handlerEth: ETH handler * @retval None */ void HAL_ETH_TxCpltCallback(ETH_HandleTypeDef *handlerEth) { 800fadc: b580 push {r7, lr} 800fade: b082 sub sp, #8 800fae0: af00 add r7, sp, #0 800fae2: 6078 str r0, [r7, #4] osSemaphoreRelease(TxPktSemaphore); 800fae4: 4b04 ldr r3, [pc, #16] @ (800faf8 ) 800fae6: 681b ldr r3, [r3, #0] 800fae8: 4618 mov r0, r3 800faea: f001 f94f bl 8010d8c } 800faee: bf00 nop 800faf0: 3708 adds r7, #8 800faf2: 46bd mov sp, r7 800faf4: bd80 pop {r7, pc} 800faf6: bf00 nop 800faf8: 240021e8 .word 0x240021e8 0800fafc : * @brief Ethernet DMA transfer error callback * @param handlerEth: ETH handler * @retval None */ void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *handlerEth) { 800fafc: b580 push {r7, lr} 800fafe: b082 sub sp, #8 800fb00: af00 add r7, sp, #0 800fb02: 6078 str r0, [r7, #4] if((HAL_ETH_GetDMAError(handlerEth) & ETH_DMACSR_RBU) == ETH_DMACSR_RBU) 800fb04: 6878 ldr r0, [r7, #4] 800fb06: f7f9 f833 bl 8008b70 800fb0a: 4603 mov r3, r0 800fb0c: f003 0380 and.w r3, r3, #128 @ 0x80 800fb10: 2b80 cmp r3, #128 @ 0x80 800fb12: d104 bne.n 800fb1e { osSemaphoreRelease(RxPktSemaphore); 800fb14: 4b04 ldr r3, [pc, #16] @ (800fb28 ) 800fb16: 681b ldr r3, [r3, #0] 800fb18: 4618 mov r0, r3 800fb1a: f001 f937 bl 8010d8c } } 800fb1e: bf00 nop 800fb20: 3708 adds r7, #8 800fb22: 46bd mov sp, r7 800fb24: bd80 pop {r7, pc} 800fb26: bf00 nop 800fb28: 240021e4 .word 0x240021e4 0800fb2c : * * @param netif the already initialized lwip network interface structure * for this ethernetif */ static void low_level_init(struct netif *netif) { 800fb2c: b580 push {r7, lr} 800fb2e: b0aa sub sp, #168 @ 0xa8 800fb30: af00 add r7, sp, #0 800fb32: 6078 str r0, [r7, #4] HAL_StatusTypeDef hal_eth_init_status = HAL_OK; 800fb34: 2300 movs r3, #0 800fb36: 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; 800fb3a: 2300 movs r3, #0 800fb3c: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 int32_t PHYLinkState = 0; 800fb40: 2300 movs r3, #0 800fb42: f8c7 3098 str.w r3, [r7, #152] @ 0x98 ETH_MACConfigTypeDef MACConf = {0}; 800fb46: f107 0310 add.w r3, r7, #16 800fb4a: 2264 movs r2, #100 @ 0x64 800fb4c: 2100 movs r1, #0 800fb4e: 4618 mov r0, r3 800fb50: f01a f8ce bl 8029cf0 /* Start ETH HAL Init */ uint8_t MACAddr[6] ; heth.Instance = ETH; 800fb54: 4b86 ldr r3, [pc, #536] @ (800fd70 ) 800fb56: 4a87 ldr r2, [pc, #540] @ (800fd74 ) 800fb58: 601a str r2, [r3, #0] // MACAddr[1] = 0x80; // MACAddr[2] = 0xE1; // MACAddr[3] = 0x00; // MACAddr[4] = 0x00; // MACAddr[5] = 0x00; MACAddr[0] = 0x7C; 800fb5a: 237c movs r3, #124 @ 0x7c 800fb5c: 723b strb r3, [r7, #8] MACAddr[1] = 0xF6; 800fb5e: 23f6 movs r3, #246 @ 0xf6 800fb60: 727b strb r3, [r7, #9] MACAddr[2] = 0x66; 800fb62: 2366 movs r3, #102 @ 0x66 800fb64: 72bb strb r3, [r7, #10] MACAddr[3] = 0xE4; 800fb66: 23e4 movs r3, #228 @ 0xe4 800fb68: 72fb strb r3, [r7, #11] MACAddr[4] = 0xB5; 800fb6a: 23b5 movs r3, #181 @ 0xb5 800fb6c: 733b strb r3, [r7, #12] MACAddr[5] = 0x41; 800fb6e: 2341 movs r3, #65 @ 0x41 800fb70: 737b strb r3, [r7, #13] heth.Init.MACAddr = &MACAddr[0]; 800fb72: 4a7f ldr r2, [pc, #508] @ (800fd70 ) 800fb74: f107 0308 add.w r3, r7, #8 800fb78: 6053 str r3, [r2, #4] heth.Init.MediaInterface = HAL_ETH_MII_MODE; 800fb7a: 4b7d ldr r3, [pc, #500] @ (800fd70 ) 800fb7c: 2200 movs r2, #0 800fb7e: 721a strb r2, [r3, #8] heth.Init.TxDesc = DMATxDscrTab; 800fb80: 4b7b ldr r3, [pc, #492] @ (800fd70 ) 800fb82: 4a7d ldr r2, [pc, #500] @ (800fd78 ) 800fb84: 60da str r2, [r3, #12] heth.Init.RxDesc = DMARxDscrTab; 800fb86: 4b7a ldr r3, [pc, #488] @ (800fd70 ) 800fb88: 4a7c ldr r2, [pc, #496] @ (800fd7c ) 800fb8a: 611a str r2, [r3, #16] heth.Init.RxBuffLen = 1536; 800fb8c: 4b78 ldr r3, [pc, #480] @ (800fd70 ) 800fb8e: f44f 62c0 mov.w r2, #1536 @ 0x600 800fb92: 615a str r2, [r3, #20] /* USER CODE BEGIN MACADDRESS */ /* USER CODE END MACADDRESS */ hal_eth_init_status = HAL_ETH_Init(&heth); 800fb94: 4876 ldr r0, [pc, #472] @ (800fd70 ) 800fb96: f7f8 f81f bl 8007bd8 800fb9a: 4603 mov r3, r0 800fb9c: f887 309f strb.w r3, [r7, #159] @ 0x9f memset(&TxConfig, 0 , sizeof(ETH_TxPacketConfig)); 800fba0: 2238 movs r2, #56 @ 0x38 800fba2: 2100 movs r1, #0 800fba4: 4876 ldr r0, [pc, #472] @ (800fd80 ) 800fba6: f01a f8a3 bl 8029cf0 TxConfig.Attributes = ETH_TX_PACKETS_FEATURES_CSUM | ETH_TX_PACKETS_FEATURES_CRCPAD; 800fbaa: 4b75 ldr r3, [pc, #468] @ (800fd80 ) 800fbac: 2221 movs r2, #33 @ 0x21 800fbae: 601a str r2, [r3, #0] TxConfig.ChecksumCtrl = ETH_CHECKSUM_IPHDR_PAYLOAD_INSERT_PHDR_CALC; 800fbb0: 4b73 ldr r3, [pc, #460] @ (800fd80 ) 800fbb2: f44f 3240 mov.w r2, #196608 @ 0x30000 800fbb6: 615a str r2, [r3, #20] TxConfig.CRCPadCtrl = ETH_CRC_PAD_INSERT; 800fbb8: 4b71 ldr r3, [pc, #452] @ (800fd80 ) 800fbba: 2200 movs r2, #0 800fbbc: 611a str r2, [r3, #16] /* End ETH HAL Init */ /* Initialize the RX POOL */ LWIP_MEMPOOL_INIT(RX_POOL); 800fbbe: 4871 ldr r0, [pc, #452] @ (800fd84 ) 800fbc0: f009 fc8a bl 80194d8 #if LWIP_ARP || LWIP_ETHERNET /* set MAC hardware address length */ netif->hwaddr_len = ETH_HWADDR_LEN; 800fbc4: 687b ldr r3, [r7, #4] 800fbc6: 2206 movs r2, #6 800fbc8: f883 2030 strb.w r2, [r3, #48] @ 0x30 /* set MAC hardware address */ netif->hwaddr[0] = heth.Init.MACAddr[0]; 800fbcc: 4b68 ldr r3, [pc, #416] @ (800fd70 ) 800fbce: 685b ldr r3, [r3, #4] 800fbd0: 781a ldrb r2, [r3, #0] 800fbd2: 687b ldr r3, [r7, #4] 800fbd4: f883 202a strb.w r2, [r3, #42] @ 0x2a netif->hwaddr[1] = heth.Init.MACAddr[1]; 800fbd8: 4b65 ldr r3, [pc, #404] @ (800fd70 ) 800fbda: 685b ldr r3, [r3, #4] 800fbdc: 785a ldrb r2, [r3, #1] 800fbde: 687b ldr r3, [r7, #4] 800fbe0: f883 202b strb.w r2, [r3, #43] @ 0x2b netif->hwaddr[2] = heth.Init.MACAddr[2]; 800fbe4: 4b62 ldr r3, [pc, #392] @ (800fd70 ) 800fbe6: 685b ldr r3, [r3, #4] 800fbe8: 789a ldrb r2, [r3, #2] 800fbea: 687b ldr r3, [r7, #4] 800fbec: f883 202c strb.w r2, [r3, #44] @ 0x2c netif->hwaddr[3] = heth.Init.MACAddr[3]; 800fbf0: 4b5f ldr r3, [pc, #380] @ (800fd70 ) 800fbf2: 685b ldr r3, [r3, #4] 800fbf4: 78da ldrb r2, [r3, #3] 800fbf6: 687b ldr r3, [r7, #4] 800fbf8: f883 202d strb.w r2, [r3, #45] @ 0x2d netif->hwaddr[4] = heth.Init.MACAddr[4]; 800fbfc: 4b5c ldr r3, [pc, #368] @ (800fd70 ) 800fbfe: 685b ldr r3, [r3, #4] 800fc00: 791a ldrb r2, [r3, #4] 800fc02: 687b ldr r3, [r7, #4] 800fc04: f883 202e strb.w r2, [r3, #46] @ 0x2e netif->hwaddr[5] = heth.Init.MACAddr[5]; 800fc08: 4b59 ldr r3, [pc, #356] @ (800fd70 ) 800fc0a: 685b ldr r3, [r3, #4] 800fc0c: 795a ldrb r2, [r3, #5] 800fc0e: 687b ldr r3, [r7, #4] 800fc10: f883 202f strb.w r2, [r3, #47] @ 0x2f /* maximum transfer unit */ netif->mtu = ETH_MAX_PAYLOAD; 800fc14: 687b ldr r3, [r7, #4] 800fc16: f240 52dc movw r2, #1500 @ 0x5dc 800fc1a: 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; 800fc1c: 687b ldr r3, [r7, #4] 800fc1e: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 800fc22: f043 030a orr.w r3, r3, #10 800fc26: b2da uxtb r2, r3 800fc28: 687b ldr r3, [r7, #4] 800fc2a: 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); 800fc2e: 2200 movs r2, #0 800fc30: 2101 movs r1, #1 800fc32: 2001 movs r0, #1 800fc34: f000 ffce bl 8010bd4 800fc38: 4603 mov r3, r0 800fc3a: 4a53 ldr r2, [pc, #332] @ (800fd88 ) 800fc3c: 6013 str r3, [r2, #0] /* create a binary semaphore used for informing ethernetif of frame transmission */ TxPktSemaphore = osSemaphoreNew(1, 1, NULL); 800fc3e: 2200 movs r2, #0 800fc40: 2101 movs r1, #1 800fc42: 2001 movs r0, #1 800fc44: f000 ffc6 bl 8010bd4 800fc48: 4603 mov r3, r0 800fc4a: 4a50 ldr r2, [pc, #320] @ (800fd8c ) 800fc4c: 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)); 800fc4e: f107 0374 add.w r3, r7, #116 @ 0x74 800fc52: 2224 movs r2, #36 @ 0x24 800fc54: 2100 movs r1, #0 800fc56: 4618 mov r0, r3 800fc58: f01a f84a bl 8029cf0 attributes.name = "EthIf"; 800fc5c: 4b4c ldr r3, [pc, #304] @ (800fd90 ) 800fc5e: 677b str r3, [r7, #116] @ 0x74 attributes.stack_size = INTERFACE_THREAD_STACK_SIZE; 800fc60: f44f 6380 mov.w r3, #1024 @ 0x400 800fc64: f8c7 3088 str.w r3, [r7, #136] @ 0x88 attributes.priority = osPriorityRealtime; 800fc68: 2330 movs r3, #48 @ 0x30 800fc6a: f8c7 308c str.w r3, [r7, #140] @ 0x8c osThreadNew(ethernetif_input, netif, &attributes); 800fc6e: f107 0374 add.w r3, r7, #116 @ 0x74 800fc72: 461a mov r2, r3 800fc74: 6879 ldr r1, [r7, #4] 800fc76: 4847 ldr r0, [pc, #284] @ (800fd94 ) 800fc78: f000 fde5 bl 8010846 /* USER CODE BEGIN PHY_PRE_CONFIG */ /* USER CODE END PHY_PRE_CONFIG */ /* Set PHY IO functions */ DP83848_RegisterBusIO(&DP83848, &DP83848_IOCtx); 800fc7c: 4946 ldr r1, [pc, #280] @ (800fd98 ) 800fc7e: 4847 ldr r0, [pc, #284] @ (800fd9c ) 800fc80: f7f5 f87f bl 8004d82 /* Initialize the DP83848 ETH PHY */ DP83848_Init(&DP83848); 800fc84: 4845 ldr r0, [pc, #276] @ (800fd9c ) 800fc86: f7f5 f8ae bl 8004de6 if (hal_eth_init_status == HAL_OK) 800fc8a: f897 309f ldrb.w r3, [r7, #159] @ 0x9f 800fc8e: 2b00 cmp r3, #0 800fc90: d168 bne.n 800fd64 { PHYLinkState = DP83848_GetLinkState(&DP83848); 800fc92: 4842 ldr r0, [pc, #264] @ (800fd9c ) 800fc94: f7f5 f8f4 bl 8004e80 800fc98: f8c7 0098 str.w r0, [r7, #152] @ 0x98 /* Get link state */ if(PHYLinkState <= DP83848_STATUS_LINK_DOWN) 800fc9c: f8d7 3098 ldr.w r3, [r7, #152] @ 0x98 800fca0: 2b01 cmp r3, #1 800fca2: dc06 bgt.n 800fcb2 { netif_set_link_down(netif); 800fca4: 6878 ldr r0, [r7, #4] 800fca6: f00a f807 bl 8019cb8 netif_set_down(netif); 800fcaa: 6878 ldr r0, [r7, #4] 800fcac: f009 ff96 bl 8019bdc #endif /* LWIP_ARP || LWIP_ETHERNET */ /* USER CODE BEGIN LOW_LEVEL_INIT */ /* USER CODE END LOW_LEVEL_INIT */ } 800fcb0: e05a b.n 800fd68 switch (PHYLinkState) 800fcb2: f8d7 3098 ldr.w r3, [r7, #152] @ 0x98 800fcb6: 3b02 subs r3, #2 800fcb8: 2b03 cmp r3, #3 800fcba: d82b bhi.n 800fd14 800fcbc: a201 add r2, pc, #4 @ (adr r2, 800fcc4 ) 800fcbe: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800fcc2: bf00 nop 800fcc4: 0800fcd5 .word 0x0800fcd5 800fcc8: 0800fce7 .word 0x0800fce7 800fccc: 0800fcf7 .word 0x0800fcf7 800fcd0: 0800fd07 .word 0x0800fd07 duplex = ETH_FULLDUPLEX_MODE; 800fcd4: f44f 5300 mov.w r3, #8192 @ 0x2000 800fcd8: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 speed = ETH_SPEED_100M; 800fcdc: f44f 4380 mov.w r3, #16384 @ 0x4000 800fce0: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 break; 800fce4: e01f b.n 800fd26 duplex = ETH_HALFDUPLEX_MODE; 800fce6: 2300 movs r3, #0 800fce8: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 speed = ETH_SPEED_100M; 800fcec: f44f 4380 mov.w r3, #16384 @ 0x4000 800fcf0: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 break; 800fcf4: e017 b.n 800fd26 duplex = ETH_FULLDUPLEX_MODE; 800fcf6: f44f 5300 mov.w r3, #8192 @ 0x2000 800fcfa: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 speed = ETH_SPEED_10M; 800fcfe: 2300 movs r3, #0 800fd00: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 break; 800fd04: e00f b.n 800fd26 duplex = ETH_HALFDUPLEX_MODE; 800fd06: 2300 movs r3, #0 800fd08: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 speed = ETH_SPEED_10M; 800fd0c: 2300 movs r3, #0 800fd0e: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 break; 800fd12: e008 b.n 800fd26 duplex = ETH_FULLDUPLEX_MODE; 800fd14: f44f 5300 mov.w r3, #8192 @ 0x2000 800fd18: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 speed = ETH_SPEED_100M; 800fd1c: f44f 4380 mov.w r3, #16384 @ 0x4000 800fd20: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 break; 800fd24: bf00 nop HAL_ETH_GetMACConfig(&heth, &MACConf); 800fd26: f107 0310 add.w r3, r7, #16 800fd2a: 4619 mov r1, r3 800fd2c: 4810 ldr r0, [pc, #64] @ (800fd70 ) 800fd2e: f7f8 fce1 bl 80086f4 MACConf.DuplexMode = duplex; 800fd32: f8d7 30a4 ldr.w r3, [r7, #164] @ 0xa4 800fd36: 62bb str r3, [r7, #40] @ 0x28 MACConf.Speed = speed; 800fd38: f8d7 30a0 ldr.w r3, [r7, #160] @ 0xa0 800fd3c: 627b str r3, [r7, #36] @ 0x24 HAL_ETH_SetMACConfig(&heth, &MACConf); 800fd3e: f107 0310 add.w r3, r7, #16 800fd42: 4619 mov r1, r3 800fd44: 480a ldr r0, [pc, #40] @ (800fd70 ) 800fd46: f7f8 fea9 bl 8008a9c HAL_ETH_Start_IT(&heth); 800fd4a: 4809 ldr r0, [pc, #36] @ (800fd70 ) 800fd4c: f7f8 f842 bl 8007dd4 netif_set_up(netif); 800fd50: 6878 ldr r0, [r7, #4] 800fd52: f009 fed5 bl 8019b00 netif_set_link_up(netif); 800fd56: 6878 ldr r0, [r7, #4] 800fd58: f009 ff74 bl 8019c44 ethernetif_notify_conn_changed(netif); 800fd5c: 6878 ldr r0, [r7, #4] 800fd5e: f000 fb1b bl 8010398 } 800fd62: e001 b.n 800fd68 Error_Handler(); 800fd64: f7f2 fbd0 bl 8002508 } 800fd68: bf00 nop 800fd6a: 37a8 adds r7, #168 @ 0xa8 800fd6c: 46bd mov sp, r7 800fd6e: bd80 pop {r7, pc} 800fd70: 240021ec .word 0x240021ec 800fd74: 40028000 .word 0x40028000 800fd78: 24040100 .word 0x24040100 800fd7c: 24040000 .word 0x24040000 800fd80: 2400229c .word 0x2400229c 800fd84: 08030a64 .word 0x08030a64 800fd88: 240021e4 .word 0x240021e4 800fd8c: 240021e8 .word 0x240021e8 800fd90: 0802c9f8 .word 0x0802c9f8 800fd94: 0800ff09 .word 0x0800ff09 800fd98: 24000034 .word 0x24000034 800fd9c: 240022d4 .word 0x240022d4 0800fda0 : * 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) { 800fda0: b580 push {r7, lr} 800fda2: b092 sub sp, #72 @ 0x48 800fda4: af00 add r7, sp, #0 800fda6: 6078 str r0, [r7, #4] 800fda8: 6039 str r1, [r7, #0] uint32_t i = 0U; 800fdaa: 2300 movs r3, #0 800fdac: 647b str r3, [r7, #68] @ 0x44 struct pbuf *q = NULL; 800fdae: 2300 movs r3, #0 800fdb0: 643b str r3, [r7, #64] @ 0x40 err_t errval = ERR_OK; 800fdb2: 2300 movs r3, #0 800fdb4: f887 303f strb.w r3, [r7, #63] @ 0x3f ETH_BufferTypeDef Txbuffer[ETH_TX_DESC_CNT] = {0}; 800fdb8: f107 030c add.w r3, r7, #12 800fdbc: 2230 movs r2, #48 @ 0x30 800fdbe: 2100 movs r1, #0 800fdc0: 4618 mov r0, r3 800fdc2: f019 ff95 bl 8029cf0 memset(Txbuffer, 0 , ETH_TX_DESC_CNT*sizeof(ETH_BufferTypeDef)); 800fdc6: f107 030c add.w r3, r7, #12 800fdca: 2230 movs r2, #48 @ 0x30 800fdcc: 2100 movs r1, #0 800fdce: 4618 mov r0, r3 800fdd0: f019 ff8e bl 8029cf0 for(q = p; q != NULL; q = q->next) 800fdd4: 683b ldr r3, [r7, #0] 800fdd6: 643b str r3, [r7, #64] @ 0x40 800fdd8: e045 b.n 800fe66 { if(i >= ETH_TX_DESC_CNT) 800fdda: 6c7b ldr r3, [r7, #68] @ 0x44 800fddc: 2b03 cmp r3, #3 800fdde: d902 bls.n 800fde6 return ERR_IF; 800fde0: f06f 030b mvn.w r3, #11 800fde4: e06c b.n 800fec0 Txbuffer[i].buffer = q->payload; 800fde6: 6c3b ldr r3, [r7, #64] @ 0x40 800fde8: 6859 ldr r1, [r3, #4] 800fdea: 6c7a ldr r2, [r7, #68] @ 0x44 800fdec: 4613 mov r3, r2 800fdee: 005b lsls r3, r3, #1 800fdf0: 4413 add r3, r2 800fdf2: 009b lsls r3, r3, #2 800fdf4: 3348 adds r3, #72 @ 0x48 800fdf6: 443b add r3, r7 800fdf8: 3b3c subs r3, #60 @ 0x3c 800fdfa: 6019 str r1, [r3, #0] Txbuffer[i].len = q->len; 800fdfc: 6c3b ldr r3, [r7, #64] @ 0x40 800fdfe: 895b ldrh r3, [r3, #10] 800fe00: 4619 mov r1, r3 800fe02: 6c7a ldr r2, [r7, #68] @ 0x44 800fe04: 4613 mov r3, r2 800fe06: 005b lsls r3, r3, #1 800fe08: 4413 add r3, r2 800fe0a: 009b lsls r3, r3, #2 800fe0c: 3348 adds r3, #72 @ 0x48 800fe0e: 443b add r3, r7 800fe10: 3b38 subs r3, #56 @ 0x38 800fe12: 6019 str r1, [r3, #0] if(i>0) 800fe14: 6c7b ldr r3, [r7, #68] @ 0x44 800fe16: 2b00 cmp r3, #0 800fe18: d011 beq.n 800fe3e { Txbuffer[i-1].next = &Txbuffer[i]; 800fe1a: 6c7b ldr r3, [r7, #68] @ 0x44 800fe1c: 1e5a subs r2, r3, #1 800fe1e: f107 000c add.w r0, r7, #12 800fe22: 6c79 ldr r1, [r7, #68] @ 0x44 800fe24: 460b mov r3, r1 800fe26: 005b lsls r3, r3, #1 800fe28: 440b add r3, r1 800fe2a: 009b lsls r3, r3, #2 800fe2c: 18c1 adds r1, r0, r3 800fe2e: 4613 mov r3, r2 800fe30: 005b lsls r3, r3, #1 800fe32: 4413 add r3, r2 800fe34: 009b lsls r3, r3, #2 800fe36: 3348 adds r3, #72 @ 0x48 800fe38: 443b add r3, r7 800fe3a: 3b34 subs r3, #52 @ 0x34 800fe3c: 6019 str r1, [r3, #0] } if(q->next == NULL) 800fe3e: 6c3b ldr r3, [r7, #64] @ 0x40 800fe40: 681b ldr r3, [r3, #0] 800fe42: 2b00 cmp r3, #0 800fe44: d109 bne.n 800fe5a { Txbuffer[i].next = NULL; 800fe46: 6c7a ldr r2, [r7, #68] @ 0x44 800fe48: 4613 mov r3, r2 800fe4a: 005b lsls r3, r3, #1 800fe4c: 4413 add r3, r2 800fe4e: 009b lsls r3, r3, #2 800fe50: 3348 adds r3, #72 @ 0x48 800fe52: 443b add r3, r7 800fe54: 3b34 subs r3, #52 @ 0x34 800fe56: 2200 movs r2, #0 800fe58: 601a str r2, [r3, #0] } i++; 800fe5a: 6c7b ldr r3, [r7, #68] @ 0x44 800fe5c: 3301 adds r3, #1 800fe5e: 647b str r3, [r7, #68] @ 0x44 for(q = p; q != NULL; q = q->next) 800fe60: 6c3b ldr r3, [r7, #64] @ 0x40 800fe62: 681b ldr r3, [r3, #0] 800fe64: 643b str r3, [r7, #64] @ 0x40 800fe66: 6c3b ldr r3, [r7, #64] @ 0x40 800fe68: 2b00 cmp r3, #0 800fe6a: d1b6 bne.n 800fdda } TxConfig.Length = p->tot_len; 800fe6c: 683b ldr r3, [r7, #0] 800fe6e: 891b ldrh r3, [r3, #8] 800fe70: 461a mov r2, r3 800fe72: 4b15 ldr r3, [pc, #84] @ (800fec8 ) 800fe74: 605a str r2, [r3, #4] TxConfig.TxBuffer = Txbuffer; 800fe76: 4a14 ldr r2, [pc, #80] @ (800fec8 ) 800fe78: f107 030c add.w r3, r7, #12 800fe7c: 6093 str r3, [r2, #8] TxConfig.pData = p; 800fe7e: 4a12 ldr r2, [pc, #72] @ (800fec8 ) 800fe80: 683b ldr r3, [r7, #0] 800fe82: 6353 str r3, [r2, #52] @ 0x34 pbuf_ref(p); 800fe84: 6838 ldr r0, [r7, #0] 800fe86: f00a fbcf bl 801a628 #if 1 if (HAL_ETH_Transmit_IT(&heth, &TxConfig) == HAL_OK) { 800fe8a: 490f ldr r1, [pc, #60] @ (800fec8 ) 800fe8c: 480f ldr r0, [pc, #60] @ (800fecc ) 800fe8e: f7f8 f88d bl 8007fac 800fe92: 4603 mov r3, r0 800fe94: 2b00 cmp r3, #0 800fe96: d10e bne.n 800feb6 while(osSemaphoreAcquire(TxPktSemaphore, TIME_WAITING_FOR_INPUT)!=osOK) 800fe98: bf00 nop 800fe9a: 4b0d ldr r3, [pc, #52] @ (800fed0 ) 800fe9c: 681b ldr r3, [r3, #0] 800fe9e: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 800fea2: 4618 mov r0, r3 800fea4: f000 ff20 bl 8010ce8 800fea8: 4603 mov r3, r0 800feaa: 2b00 cmp r3, #0 800feac: d1f5 bne.n 800fe9a { } // osSemaphoreAcquire(TxPktSemaphore, pdMS_TO_TICKS(1000)); HAL_ETH_ReleaseTxPacket(&heth); 800feae: 4807 ldr r0, [pc, #28] @ (800fecc ) 800feb0: f7f8 fa03 bl 80082ba 800feb4: e002 b.n 800febc } else { pbuf_free(p); 800feb6: 6838 ldr r0, [r7, #0] 800feb8: f00a fb10 bl 801a4dc HAL_ETH_Transmit_IT(&heth, &TxConfig); osSemaphoreAcquire(TxPktSemaphore, pdMS_TO_TICKS(100)); HAL_ETH_ReleaseTxPacket(&heth); #endif return errval; 800febc: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f } 800fec0: 4618 mov r0, r3 800fec2: 3748 adds r7, #72 @ 0x48 800fec4: 46bd mov sp, r7 800fec6: bd80 pop {r7, pc} 800fec8: 2400229c .word 0x2400229c 800fecc: 240021ec .word 0x240021ec 800fed0: 240021e8 .word 0x240021e8 0800fed4 : * @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) { 800fed4: b580 push {r7, lr} 800fed6: b084 sub sp, #16 800fed8: af00 add r7, sp, #0 800feda: 6078 str r0, [r7, #4] struct pbuf *p = NULL; 800fedc: 2300 movs r3, #0 800fede: 60fb str r3, [r7, #12] if(RxAllocStatus == RX_ALLOC_OK) 800fee0: 4b07 ldr r3, [pc, #28] @ (800ff00 ) 800fee2: 781b ldrb r3, [r3, #0] 800fee4: 2b00 cmp r3, #0 800fee6: d105 bne.n 800fef4 { HAL_ETH_ReadData(&heth, (void **)&p); 800fee8: f107 030c add.w r3, r7, #12 800feec: 4619 mov r1, r3 800feee: 4805 ldr r0, [pc, #20] @ (800ff04 ) 800fef0: f7f8 f8ad bl 800804e } return p; 800fef4: 68fb ldr r3, [r7, #12] } 800fef6: 4618 mov r0, r3 800fef8: 3710 adds r7, #16 800fefa: 46bd mov sp, r7 800fefc: bd80 pop {r7, pc} 800fefe: bf00 nop 800ff00: 240021e0 .word 0x240021e0 800ff04: 240021ec .word 0x240021ec 0800ff08 : * the appropriate input function is called. * * @param netif the lwip network interface structure for this ethernetif */ void ethernetif_input(void* argument) { 800ff08: b580 push {r7, lr} 800ff0a: b084 sub sp, #16 800ff0c: af00 add r7, sp, #0 800ff0e: 6078 str r0, [r7, #4] struct pbuf *p = NULL; 800ff10: 2300 movs r3, #0 800ff12: 60fb str r3, [r7, #12] struct netif *netif = (struct netif *) argument; 800ff14: 687b ldr r3, [r7, #4] 800ff16: 60bb str r3, [r7, #8] for( ;; ) { if (osSemaphoreAcquire(RxPktSemaphore, TIME_WAITING_FOR_INPUT) == osOK) 800ff18: 4b0f ldr r3, [pc, #60] @ (800ff58 ) 800ff1a: 681b ldr r3, [r3, #0] 800ff1c: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 800ff20: 4618 mov r0, r3 800ff22: f000 fee1 bl 8010ce8 800ff26: 4603 mov r3, r0 800ff28: 2b00 cmp r3, #0 800ff2a: d1f5 bne.n 800ff18 { do { p = low_level_input( netif ); 800ff2c: 68b8 ldr r0, [r7, #8] 800ff2e: f7ff ffd1 bl 800fed4 800ff32: 60f8 str r0, [r7, #12] if (p != NULL) 800ff34: 68fb ldr r3, [r7, #12] 800ff36: 2b00 cmp r3, #0 800ff38: d00a beq.n 800ff50 { if (netif->input( p, netif) != ERR_OK ) 800ff3a: 68bb ldr r3, [r7, #8] 800ff3c: 691b ldr r3, [r3, #16] 800ff3e: 68b9 ldr r1, [r7, #8] 800ff40: 68f8 ldr r0, [r7, #12] 800ff42: 4798 blx r3 800ff44: 4603 mov r3, r0 800ff46: 2b00 cmp r3, #0 800ff48: d002 beq.n 800ff50 { pbuf_free(p); 800ff4a: 68f8 ldr r0, [r7, #12] 800ff4c: f00a fac6 bl 801a4dc } } } while(p!=NULL); 800ff50: 68fb ldr r3, [r7, #12] 800ff52: 2b00 cmp r3, #0 800ff54: d1ea bne.n 800ff2c if (osSemaphoreAcquire(RxPktSemaphore, TIME_WAITING_FOR_INPUT) == osOK) 800ff56: e7df b.n 800ff18 800ff58: 240021e4 .word 0x240021e4 0800ff5c : * @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) { 800ff5c: b580 push {r7, lr} 800ff5e: b082 sub sp, #8 800ff60: af00 add r7, sp, #0 800ff62: 6078 str r0, [r7, #4] LWIP_ASSERT("netif != NULL", (netif != NULL)); 800ff64: 687b ldr r3, [r7, #4] 800ff66: 2b00 cmp r3, #0 800ff68: d106 bne.n 800ff78 800ff6a: 4b0e ldr r3, [pc, #56] @ (800ffa4 ) 800ff6c: f240 2235 movw r2, #565 @ 0x235 800ff70: 490d ldr r1, [pc, #52] @ (800ffa8 ) 800ff72: 480e ldr r0, [pc, #56] @ (800ffac ) 800ff74: f019 fd2a bl 80299cc * 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; 800ff78: 687b ldr r3, [r7, #4] 800ff7a: 2273 movs r2, #115 @ 0x73 800ff7c: f883 2032 strb.w r2, [r3, #50] @ 0x32 netif->name[1] = IFNAME1; 800ff80: 687b ldr r3, [r7, #4] 800ff82: 2274 movs r2, #116 @ 0x74 800ff84: 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; 800ff88: 687b ldr r3, [r7, #4] 800ff8a: 4a09 ldr r2, [pc, #36] @ (800ffb0 ) 800ff8c: 615a str r2, [r3, #20] #if LWIP_IPV6 netif->output_ip6 = ethip6_output; #endif /* LWIP_IPV6 */ netif->linkoutput = low_level_output; 800ff8e: 687b ldr r3, [r7, #4] 800ff90: 4a08 ldr r2, [pc, #32] @ (800ffb4 ) 800ff92: 619a str r2, [r3, #24] /* initialize the hardware */ low_level_init(netif); 800ff94: 6878 ldr r0, [r7, #4] 800ff96: f7ff fdc9 bl 800fb2c return ERR_OK; 800ff9a: 2300 movs r3, #0 } 800ff9c: 4618 mov r0, r3 800ff9e: 3708 adds r7, #8 800ffa0: 46bd mov sp, r7 800ffa2: bd80 pop {r7, pc} 800ffa4: 0802ca00 .word 0x0802ca00 800ffa8: 0802ca1c .word 0x0802ca1c 800ffac: 0802ca2c .word 0x0802ca2c 800ffb0: 0802403d .word 0x0802403d 800ffb4: 0800fda1 .word 0x0800fda1 0800ffb8 : * @brief Custom Rx pbuf free callback * @param pbuf: pbuf to be freed * @retval None */ void pbuf_free_custom(struct pbuf *p) { 800ffb8: b580 push {r7, lr} 800ffba: b084 sub sp, #16 800ffbc: af00 add r7, sp, #0 800ffbe: 6078 str r0, [r7, #4] struct pbuf_custom* custom_pbuf = (struct pbuf_custom*)p; 800ffc0: 687b ldr r3, [r7, #4] 800ffc2: 60fb str r3, [r7, #12] LWIP_MEMPOOL_FREE(RX_POOL, custom_pbuf); 800ffc4: 68f9 ldr r1, [r7, #12] 800ffc6: 4809 ldr r0, [pc, #36] @ (800ffec ) 800ffc8: f009 fb76 bl 80196b8 /* 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) 800ffcc: 4b08 ldr r3, [pc, #32] @ (800fff0 ) 800ffce: 781b ldrb r3, [r3, #0] 800ffd0: 2b01 cmp r3, #1 800ffd2: d107 bne.n 800ffe4 { RxAllocStatus = RX_ALLOC_OK; 800ffd4: 4b06 ldr r3, [pc, #24] @ (800fff0 ) 800ffd6: 2200 movs r2, #0 800ffd8: 701a strb r2, [r3, #0] osSemaphoreRelease(RxPktSemaphore); 800ffda: 4b06 ldr r3, [pc, #24] @ (800fff4 ) 800ffdc: 681b ldr r3, [r3, #0] 800ffde: 4618 mov r0, r3 800ffe0: f000 fed4 bl 8010d8c } } 800ffe4: bf00 nop 800ffe6: 3710 adds r7, #16 800ffe8: 46bd mov sp, r7 800ffea: bd80 pop {r7, pc} 800ffec: 08030a64 .word 0x08030a64 800fff0: 240021e0 .word 0x240021e0 800fff4: 240021e4 .word 0x240021e4 0800fff8 : * when LWIP_TIMERS == 1 and NO_SYS == 1 * @param None * @retval Current Time value */ u32_t sys_now(void) { 800fff8: b580 push {r7, lr} 800fffa: af00 add r7, sp, #0 return HAL_GetTick(); 800fffc: f7f5 f818 bl 8005030 8010000: 4603 mov r3, r0 } 8010002: 4618 mov r0, r3 8010004: bd80 pop {r7, pc} ... 08010008 : * @param ethHandle: ETH handle * @retval None */ void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle) { 8010008: b580 push {r7, lr} 801000a: b08e sub sp, #56 @ 0x38 801000c: af00 add r7, sp, #0 801000e: 6078 str r0, [r7, #4] GPIO_InitTypeDef GPIO_InitStruct = {0}; 8010010: f107 0324 add.w r3, r7, #36 @ 0x24 8010014: 2200 movs r2, #0 8010016: 601a str r2, [r3, #0] 8010018: 605a str r2, [r3, #4] 801001a: 609a str r2, [r3, #8] 801001c: 60da str r2, [r3, #12] 801001e: 611a str r2, [r3, #16] if(ethHandle->Instance==ETH) 8010020: 687b ldr r3, [r7, #4] 8010022: 681b ldr r3, [r3, #0] 8010024: 4a55 ldr r2, [pc, #340] @ (801017c ) 8010026: 4293 cmp r3, r2 8010028: f040 80a4 bne.w 8010174 { /* USER CODE BEGIN ETH_MspInit 0 */ /* USER CODE END ETH_MspInit 0 */ /* Enable Peripheral clock */ __HAL_RCC_ETH1MAC_CLK_ENABLE(); 801002c: 4b54 ldr r3, [pc, #336] @ (8010180 ) 801002e: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010032: 4a53 ldr r2, [pc, #332] @ (8010180 ) 8010034: f443 4300 orr.w r3, r3, #32768 @ 0x8000 8010038: f8c2 30d8 str.w r3, [r2, #216] @ 0xd8 801003c: 4b50 ldr r3, [pc, #320] @ (8010180 ) 801003e: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010042: f403 4300 and.w r3, r3, #32768 @ 0x8000 8010046: 623b str r3, [r7, #32] 8010048: 6a3b ldr r3, [r7, #32] __HAL_RCC_ETH1TX_CLK_ENABLE(); 801004a: 4b4d ldr r3, [pc, #308] @ (8010180 ) 801004c: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010050: 4a4b ldr r2, [pc, #300] @ (8010180 ) 8010052: f443 3380 orr.w r3, r3, #65536 @ 0x10000 8010056: f8c2 30d8 str.w r3, [r2, #216] @ 0xd8 801005a: 4b49 ldr r3, [pc, #292] @ (8010180 ) 801005c: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010060: f403 3380 and.w r3, r3, #65536 @ 0x10000 8010064: 61fb str r3, [r7, #28] 8010066: 69fb ldr r3, [r7, #28] __HAL_RCC_ETH1RX_CLK_ENABLE(); 8010068: 4b45 ldr r3, [pc, #276] @ (8010180 ) 801006a: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 801006e: 4a44 ldr r2, [pc, #272] @ (8010180 ) 8010070: f443 3300 orr.w r3, r3, #131072 @ 0x20000 8010074: f8c2 30d8 str.w r3, [r2, #216] @ 0xd8 8010078: 4b41 ldr r3, [pc, #260] @ (8010180 ) 801007a: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 801007e: f403 3300 and.w r3, r3, #131072 @ 0x20000 8010082: 61bb str r3, [r7, #24] 8010084: 69bb ldr r3, [r7, #24] __HAL_RCC_GPIOC_CLK_ENABLE(); 8010086: 4b3e ldr r3, [pc, #248] @ (8010180 ) 8010088: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 801008c: 4a3c ldr r2, [pc, #240] @ (8010180 ) 801008e: f043 0304 orr.w r3, r3, #4 8010092: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8010096: 4b3a ldr r3, [pc, #232] @ (8010180 ) 8010098: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 801009c: f003 0304 and.w r3, r3, #4 80100a0: 617b str r3, [r7, #20] 80100a2: 697b ldr r3, [r7, #20] __HAL_RCC_GPIOA_CLK_ENABLE(); 80100a4: 4b36 ldr r3, [pc, #216] @ (8010180 ) 80100a6: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80100aa: 4a35 ldr r2, [pc, #212] @ (8010180 ) 80100ac: f043 0301 orr.w r3, r3, #1 80100b0: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 80100b4: 4b32 ldr r3, [pc, #200] @ (8010180 ) 80100b6: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80100ba: f003 0301 and.w r3, r3, #1 80100be: 613b str r3, [r7, #16] 80100c0: 693b ldr r3, [r7, #16] __HAL_RCC_GPIOB_CLK_ENABLE(); 80100c2: 4b2f ldr r3, [pc, #188] @ (8010180 ) 80100c4: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80100c8: 4a2d ldr r2, [pc, #180] @ (8010180 ) 80100ca: f043 0302 orr.w r3, r3, #2 80100ce: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 80100d2: 4b2b ldr r3, [pc, #172] @ (8010180 ) 80100d4: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80100d8: f003 0302 and.w r3, r3, #2 80100dc: 60fb str r3, [r7, #12] 80100de: 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 80100e0: 233e movs r3, #62 @ 0x3e 80100e2: 627b str r3, [r7, #36] @ 0x24 |GPIO_PIN_5; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 80100e4: 2302 movs r3, #2 80100e6: 62bb str r3, [r7, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 80100e8: 2300 movs r3, #0 80100ea: 62fb str r3, [r7, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 80100ec: 2303 movs r3, #3 80100ee: 633b str r3, [r7, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 80100f0: 230b movs r3, #11 80100f2: 637b str r3, [r7, #52] @ 0x34 HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); 80100f4: f107 0324 add.w r3, r7, #36 @ 0x24 80100f8: 4619 mov r1, r3 80100fa: 4822 ldr r0, [pc, #136] @ (8010184 ) 80100fc: f7f9 fac8 bl 8009690 GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3 8010100: 238f movs r3, #143 @ 0x8f 8010102: 627b str r3, [r7, #36] @ 0x24 |GPIO_PIN_7; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8010104: 2302 movs r3, #2 8010106: 62bb str r3, [r7, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 8010108: 2300 movs r3, #0 801010a: 62fb str r3, [r7, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 801010c: 2303 movs r3, #3 801010e: 633b str r3, [r7, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 8010110: 230b movs r3, #11 8010112: 637b str r3, [r7, #52] @ 0x34 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); 8010114: f107 0324 add.w r3, r7, #36 @ 0x24 8010118: 4619 mov r1, r3 801011a: 481b ldr r0, [pc, #108] @ (8010188 ) 801011c: f7f9 fab8 bl 8009690 GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_11|GPIO_PIN_12 8010120: f643 1303 movw r3, #14595 @ 0x3903 8010124: 627b str r3, [r7, #36] @ 0x24 |GPIO_PIN_13|GPIO_PIN_8; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8010126: 2302 movs r3, #2 8010128: 62bb str r3, [r7, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 801012a: 2300 movs r3, #0 801012c: 62fb str r3, [r7, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 801012e: 2303 movs r3, #3 8010130: 633b str r3, [r7, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 8010132: 230b movs r3, #11 8010134: 637b str r3, [r7, #52] @ 0x34 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); 8010136: f107 0324 add.w r3, r7, #36 @ 0x24 801013a: 4619 mov r1, r3 801013c: 4813 ldr r0, [pc, #76] @ (801018c ) 801013e: f7f9 faa7 bl 8009690 GPIO_InitStruct.Pin = GPIO_PIN_10; 8010142: f44f 6380 mov.w r3, #1024 @ 0x400 8010146: 627b str r3, [r7, #36] @ 0x24 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8010148: 2302 movs r3, #2 801014a: 62bb str r3, [r7, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 801014c: 2300 movs r3, #0 801014e: 62fb str r3, [r7, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 8010150: 2303 movs r3, #3 8010152: 633b str r3, [r7, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 8010154: 230b movs r3, #11 8010156: 637b str r3, [r7, #52] @ 0x34 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); 8010158: f107 0324 add.w r3, r7, #36 @ 0x24 801015c: 4619 mov r1, r3 801015e: 480b ldr r0, [pc, #44] @ (801018c ) 8010160: f7f9 fa96 bl 8009690 /* Peripheral interrupt init */ HAL_NVIC_SetPriority(ETH_IRQn, 5, 0); 8010164: 2200 movs r2, #0 8010166: 2105 movs r1, #5 8010168: 203d movs r0, #61 @ 0x3d 801016a: f7f5 f869 bl 8005240 HAL_NVIC_EnableIRQ(ETH_IRQn); 801016e: 203d movs r0, #61 @ 0x3d 8010170: f7f5 f880 bl 8005274 /* USER CODE BEGIN ETH_MspInit 1 */ /* USER CODE END ETH_MspInit 1 */ } } 8010174: bf00 nop 8010176: 3738 adds r7, #56 @ 0x38 8010178: 46bd mov sp, r7 801017a: bd80 pop {r7, pc} 801017c: 40028000 .word 0x40028000 8010180: 58024400 .word 0x58024400 8010184: 58020800 .word 0x58020800 8010188: 58020000 .word 0x58020000 801018c: 58020400 .word 0x58020400 08010190 : * @brief Initializes the MDIO interface GPIO and clocks. * @param None * @retval 0 if OK, -1 if ERROR */ int32_t ETH_PHY_IO_Init(void) { 8010190: b580 push {r7, lr} 8010192: 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); 8010194: 4802 ldr r0, [pc, #8] @ (80101a0 ) 8010196: f7f8 fc9b bl 8008ad0 return 0; 801019a: 2300 movs r3, #0 } 801019c: 4618 mov r0, r3 801019e: bd80 pop {r7, pc} 80101a0: 240021ec .word 0x240021ec 080101a4 : * @brief De-Initializes the MDIO interface . * @param None * @retval 0 if OK, -1 if ERROR */ int32_t ETH_PHY_IO_DeInit (void) { 80101a4: b480 push {r7} 80101a6: af00 add r7, sp, #0 return 0; 80101a8: 2300 movs r3, #0 } 80101aa: 4618 mov r0, r3 80101ac: 46bd mov sp, r7 80101ae: f85d 7b04 ldr.w r7, [sp], #4 80101b2: 4770 bx lr 080101b4 : * @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) { 80101b4: b580 push {r7, lr} 80101b6: b084 sub sp, #16 80101b8: af00 add r7, sp, #0 80101ba: 60f8 str r0, [r7, #12] 80101bc: 60b9 str r1, [r7, #8] 80101be: 607a str r2, [r7, #4] if(HAL_ETH_ReadPHYRegister(&heth, DevAddr, RegAddr, pRegVal) != HAL_OK) 80101c0: 687b ldr r3, [r7, #4] 80101c2: 68ba ldr r2, [r7, #8] 80101c4: 68f9 ldr r1, [r7, #12] 80101c6: 4807 ldr r0, [pc, #28] @ (80101e4 ) 80101c8: f7f8 f9ec bl 80085a4 80101cc: 4603 mov r3, r0 80101ce: 2b00 cmp r3, #0 80101d0: d002 beq.n 80101d8 { return -1; 80101d2: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80101d6: e000 b.n 80101da } return 0; 80101d8: 2300 movs r3, #0 } 80101da: 4618 mov r0, r3 80101dc: 3710 adds r7, #16 80101de: 46bd mov sp, r7 80101e0: bd80 pop {r7, pc} 80101e2: bf00 nop 80101e4: 240021ec .word 0x240021ec 080101e8 : * @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) { 80101e8: b580 push {r7, lr} 80101ea: b084 sub sp, #16 80101ec: af00 add r7, sp, #0 80101ee: 60f8 str r0, [r7, #12] 80101f0: 60b9 str r1, [r7, #8] 80101f2: 607a str r2, [r7, #4] if(HAL_ETH_WritePHYRegister(&heth, DevAddr, RegAddr, RegVal) != HAL_OK) 80101f4: 687b ldr r3, [r7, #4] 80101f6: 68ba ldr r2, [r7, #8] 80101f8: 68f9 ldr r1, [r7, #12] 80101fa: 4807 ldr r0, [pc, #28] @ (8010218 ) 80101fc: f7f8 fa26 bl 800864c 8010200: 4603 mov r3, r0 8010202: 2b00 cmp r3, #0 8010204: d002 beq.n 801020c { return -1; 8010206: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801020a: e000 b.n 801020e } return 0; 801020c: 2300 movs r3, #0 } 801020e: 4618 mov r0, r3 8010210: 3710 adds r7, #16 8010212: 46bd mov sp, r7 8010214: bd80 pop {r7, pc} 8010216: bf00 nop 8010218: 240021ec .word 0x240021ec 0801021c : /** * @brief Get the time in millisecons used for internal PHY driver process. * @retval Time value */ int32_t ETH_PHY_IO_GetTick(void) { 801021c: b580 push {r7, lr} 801021e: af00 add r7, sp, #0 return HAL_GetTick(); 8010220: f7f4 ff06 bl 8005030 8010224: 4603 mov r3, r0 } 8010226: 4618 mov r0, r3 8010228: bd80 pop {r7, pc} ... 0801022c : /** * @brief Check the ETH link state then update ETH driver and netif link accordingly. * @retval None */ void ethernet_link_thread(void* argument) { 801022c: b580 push {r7, lr} 801022e: b0a2 sub sp, #136 @ 0x88 8010230: af00 add r7, sp, #0 8010232: 6078 str r0, [r7, #4] ETH_MACConfigTypeDef MACConf = {0}; 8010234: f107 0310 add.w r3, r7, #16 8010238: 2264 movs r2, #100 @ 0x64 801023a: 2100 movs r1, #0 801023c: 4618 mov r0, r3 801023e: f019 fd57 bl 8029cf0 int32_t PHYLinkState = 0; 8010242: 2300 movs r3, #0 8010244: 67bb str r3, [r7, #120] @ 0x78 uint32_t linkchanged = 0U, speed = 0U, duplex = 0U; 8010246: 2300 movs r3, #0 8010248: f8c7 3084 str.w r3, [r7, #132] @ 0x84 801024c: 2300 movs r3, #0 801024e: f8c7 3080 str.w r3, [r7, #128] @ 0x80 8010252: 2300 movs r3, #0 8010254: 67fb str r3, [r7, #124] @ 0x7c struct netif *netif = (struct netif *) argument; 8010256: 687b ldr r3, [r7, #4] 8010258: 677b str r3, [r7, #116] @ 0x74 /* USER CODE BEGIN ETH link init */ #if USE_DHCP enum dhcp_states DHCP_state = DHCP_START; 801025a: 2301 movs r3, #1 801025c: 73fb strb r3, [r7, #15] // LOCK_TCPIP_CORE(); /* USER CODE END ETH link init */ for(;;) { PHYLinkState = DP83848_GetLinkState(&DP83848); 801025e: 484a ldr r0, [pc, #296] @ (8010388 ) 8010260: f7f4 fe0e bl 8004e80 8010264: 67b8 str r0, [r7, #120] @ 0x78 if(netif_is_link_up(netif) && (PHYLinkState <= DP83848_STATUS_LINK_DOWN)) 8010266: 6f7b ldr r3, [r7, #116] @ 0x74 8010268: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801026c: 089b lsrs r3, r3, #2 801026e: f003 0301 and.w r3, r3, #1 8010272: b2db uxtb r3, r3 8010274: 2b00 cmp r3, #0 8010276: d013 beq.n 80102a0 8010278: 6fbb ldr r3, [r7, #120] @ 0x78 801027a: 2b01 cmp r3, #1 801027c: dc10 bgt.n 80102a0 { HAL_ETH_Stop_IT(&heth); 801027e: 4843 ldr r0, [pc, #268] @ (801038c ) 8010280: f7f7 fe1c bl 8007ebc LOCK_TCPIP_CORE(); 8010284: f000 f936 bl 80104f4 netif_set_down(netif); 8010288: 6f78 ldr r0, [r7, #116] @ 0x74 801028a: f009 fca7 bl 8019bdc netif_set_link_down(netif); 801028e: 6f78 ldr r0, [r7, #116] @ 0x74 8010290: f009 fd12 bl 8019cb8 UNLOCK_TCPIP_CORE(); 8010294: f000 f93e bl 8010514 printf("Link down...\r\n"); 8010298: 483d ldr r0, [pc, #244] @ (8010390 ) 801029a: f019 fbff bl 8029a9c 801029e: e067 b.n 8010370 } else if(!netif_is_link_up(netif) && (PHYLinkState > DP83848_STATUS_LINK_DOWN)) 80102a0: 6f7b ldr r3, [r7, #116] @ 0x74 80102a2: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 80102a6: f003 0304 and.w r3, r3, #4 80102aa: 2b00 cmp r3, #0 80102ac: d160 bne.n 8010370 80102ae: 6fbb ldr r3, [r7, #120] @ 0x78 80102b0: 2b01 cmp r3, #1 80102b2: dd5d ble.n 8010370 { switch (PHYLinkState) 80102b4: 6fbb ldr r3, [r7, #120] @ 0x78 80102b6: 3b02 subs r3, #2 80102b8: 2b03 cmp r3, #3 80102ba: d833 bhi.n 8010324 80102bc: a201 add r2, pc, #4 @ (adr r2, 80102c4 ) 80102be: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80102c2: bf00 nop 80102c4: 080102d5 .word 0x080102d5 80102c8: 080102eb .word 0x080102eb 80102cc: 080102ff .word 0x080102ff 80102d0: 08010313 .word 0x08010313 { case DP83848_STATUS_100MBITS_FULLDUPLEX: duplex = ETH_FULLDUPLEX_MODE; 80102d4: f44f 5300 mov.w r3, #8192 @ 0x2000 80102d8: 67fb str r3, [r7, #124] @ 0x7c speed = ETH_SPEED_100M; 80102da: f44f 4380 mov.w r3, #16384 @ 0x4000 80102de: f8c7 3080 str.w r3, [r7, #128] @ 0x80 linkchanged = 1; 80102e2: 2301 movs r3, #1 80102e4: f8c7 3084 str.w r3, [r7, #132] @ 0x84 break; 80102e8: e01d b.n 8010326 case DP83848_STATUS_100MBITS_HALFDUPLEX: duplex = ETH_HALFDUPLEX_MODE; 80102ea: 2300 movs r3, #0 80102ec: 67fb str r3, [r7, #124] @ 0x7c speed = ETH_SPEED_100M; 80102ee: f44f 4380 mov.w r3, #16384 @ 0x4000 80102f2: f8c7 3080 str.w r3, [r7, #128] @ 0x80 linkchanged = 1; 80102f6: 2301 movs r3, #1 80102f8: f8c7 3084 str.w r3, [r7, #132] @ 0x84 break; 80102fc: e013 b.n 8010326 case DP83848_STATUS_10MBITS_FULLDUPLEX: duplex = ETH_FULLDUPLEX_MODE; 80102fe: f44f 5300 mov.w r3, #8192 @ 0x2000 8010302: 67fb str r3, [r7, #124] @ 0x7c speed = ETH_SPEED_10M; 8010304: 2300 movs r3, #0 8010306: f8c7 3080 str.w r3, [r7, #128] @ 0x80 linkchanged = 1; 801030a: 2301 movs r3, #1 801030c: f8c7 3084 str.w r3, [r7, #132] @ 0x84 break; 8010310: e009 b.n 8010326 case DP83848_STATUS_10MBITS_HALFDUPLEX: duplex = ETH_HALFDUPLEX_MODE; 8010312: 2300 movs r3, #0 8010314: 67fb str r3, [r7, #124] @ 0x7c speed = ETH_SPEED_10M; 8010316: 2300 movs r3, #0 8010318: f8c7 3080 str.w r3, [r7, #128] @ 0x80 linkchanged = 1; 801031c: 2301 movs r3, #1 801031e: f8c7 3084 str.w r3, [r7, #132] @ 0x84 break; 8010322: e000 b.n 8010326 default: break; 8010324: bf00 nop } if(linkchanged) 8010326: f8d7 3084 ldr.w r3, [r7, #132] @ 0x84 801032a: 2b00 cmp r3, #0 801032c: d020 beq.n 8010370 { /* Get MAC Config MAC */ HAL_ETH_GetMACConfig(&heth, &MACConf); 801032e: f107 0310 add.w r3, r7, #16 8010332: 4619 mov r1, r3 8010334: 4815 ldr r0, [pc, #84] @ (801038c ) 8010336: f7f8 f9dd bl 80086f4 MACConf.DuplexMode = duplex; 801033a: 6ffb ldr r3, [r7, #124] @ 0x7c 801033c: 62bb str r3, [r7, #40] @ 0x28 MACConf.Speed = speed; 801033e: f8d7 3080 ldr.w r3, [r7, #128] @ 0x80 8010342: 627b str r3, [r7, #36] @ 0x24 HAL_ETH_SetMACConfig(&heth, &MACConf); 8010344: f107 0310 add.w r3, r7, #16 8010348: 4619 mov r1, r3 801034a: 4810 ldr r0, [pc, #64] @ (801038c ) 801034c: f7f8 fba6 bl 8008a9c HAL_ETH_Start_IT(&heth); 8010350: 480e ldr r0, [pc, #56] @ (801038c ) 8010352: f7f7 fd3f bl 8007dd4 LOCK_TCPIP_CORE(); 8010356: f000 f8cd bl 80104f4 netif_set_up(netif); 801035a: 6f78 ldr r0, [r7, #116] @ 0x74 801035c: f009 fbd0 bl 8019b00 netif_set_link_up(netif); 8010360: 6f78 ldr r0, [r7, #116] @ 0x74 8010362: f009 fc6f bl 8019c44 UNLOCK_TCPIP_CORE(); 8010366: f000 f8d5 bl 8010514 printf("Link up...\r\n"); 801036a: 480a ldr r0, [pc, #40] @ (8010394 ) 801036c: f019 fb96 bl 8029a9c } } /* USER CODE BEGIN ETH link Thread core code for User BSP */ #if USE_DHCP dhcp_sm(netif, &DHCP_state); 8010370: f107 030f add.w r3, r7, #15 8010374: 4619 mov r1, r3 8010376: 6f78 ldr r0, [r7, #116] @ 0x74 8010378: f000 f922 bl 80105c0 #endif /* ETH_CODE: workaround to call LOCK_TCPIP_CORE when accessing netif link functions*/ // UNLOCK_TCPIP_CORE(); osDelay(pdMS_TO_TICKS(500)); 801037c: f44f 70fa mov.w r0, #500 @ 0x1f4 8010380: f000 faff bl 8010982 // LOCK_TCPIP_CORE(); continue; /* skip next osDelay */ 8010384: bf00 nop PHYLinkState = DP83848_GetLinkState(&DP83848); 8010386: e76a b.n 801025e 8010388: 240022d4 .word 0x240022d4 801038c: 240021ec .word 0x240021ec 8010390: 0802ca54 .word 0x0802ca54 8010394: 0802ca64 .word 0x0802ca64 08010398 : * @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) { 8010398: b480 push {r7} 801039a: b083 sub sp, #12 801039c: af00 add r7, sp, #0 801039e: 6078 str r0, [r7, #4] /* NOTE : This is function could be implemented in user file when the callback is needed, */ } 80103a0: bf00 nop 80103a2: 370c adds r7, #12 80103a4: 46bd mov sp, r7 80103a6: f85d 7b04 ldr.w r7, [sp], #4 80103aa: 4770 bx lr 080103ac : void HAL_ETH_RxAllocateCallback(uint8_t **buff) { 80103ac: b580 push {r7, lr} 80103ae: b086 sub sp, #24 80103b0: af02 add r7, sp, #8 80103b2: 6078 str r0, [r7, #4] /* USER CODE BEGIN HAL ETH RxAllocateCallback */ struct pbuf_custom *p = LWIP_MEMPOOL_ALLOC(RX_POOL); 80103b4: 4812 ldr r0, [pc, #72] @ (8010400 ) 80103b6: f009 f90b bl 80195d0 80103ba: 60f8 str r0, [r7, #12] if (p) 80103bc: 68fb ldr r3, [r7, #12] 80103be: 2b00 cmp r3, #0 80103c0: d014 beq.n 80103ec { /* Get the buff from the struct pbuf address. */ *buff = (uint8_t *)p + offsetof(RxBuff_t, buff); 80103c2: 68fb ldr r3, [r7, #12] 80103c4: f103 0220 add.w r2, r3, #32 80103c8: 687b ldr r3, [r7, #4] 80103ca: 601a str r2, [r3, #0] p->custom_free_function = pbuf_free_custom; 80103cc: 68fb ldr r3, [r7, #12] 80103ce: 4a0d ldr r2, [pc, #52] @ (8010404 ) 80103d0: 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); 80103d2: 687b ldr r3, [r7, #4] 80103d4: 681b ldr r3, [r3, #0] 80103d6: f44f 62c0 mov.w r2, #1536 @ 0x600 80103da: 9201 str r2, [sp, #4] 80103dc: 9300 str r3, [sp, #0] 80103de: 68fb ldr r3, [r7, #12] 80103e0: 2241 movs r2, #65 @ 0x41 80103e2: 2100 movs r1, #0 80103e4: 2000 movs r0, #0 80103e6: f009 fe8f bl 801a108 { RxAllocStatus = RX_ALLOC_ERROR; *buff = NULL; } /* USER CODE END HAL ETH RxAllocateCallback */ } 80103ea: e005 b.n 80103f8 RxAllocStatus = RX_ALLOC_ERROR; 80103ec: 4b06 ldr r3, [pc, #24] @ (8010408 ) 80103ee: 2201 movs r2, #1 80103f0: 701a strb r2, [r3, #0] *buff = NULL; 80103f2: 687b ldr r3, [r7, #4] 80103f4: 2200 movs r2, #0 80103f6: 601a str r2, [r3, #0] } 80103f8: bf00 nop 80103fa: 3710 adds r7, #16 80103fc: 46bd mov sp, r7 80103fe: bd80 pop {r7, pc} 8010400: 08030a64 .word 0x08030a64 8010404: 0800ffb9 .word 0x0800ffb9 8010408: 240021e0 .word 0x240021e0 0801040c : void HAL_ETH_RxLinkCallback(void **pStart, void **pEnd, uint8_t *buff, uint16_t Length) { 801040c: b480 push {r7} 801040e: b08d sub sp, #52 @ 0x34 8010410: af00 add r7, sp, #0 8010412: 60f8 str r0, [r7, #12] 8010414: 60b9 str r1, [r7, #8] 8010416: 607a str r2, [r7, #4] 8010418: 807b strh r3, [r7, #2] /* USER CODE BEGIN HAL ETH RxLinkCallback */ struct pbuf **ppStart = (struct pbuf **)pStart; 801041a: 68fb ldr r3, [r7, #12] 801041c: 62bb str r3, [r7, #40] @ 0x28 struct pbuf **ppEnd = (struct pbuf **)pEnd; 801041e: 68bb ldr r3, [r7, #8] 8010420: 627b str r3, [r7, #36] @ 0x24 struct pbuf *p = NULL; 8010422: 2300 movs r3, #0 8010424: 62fb str r3, [r7, #44] @ 0x2c /* Get the struct pbuf from the buff address. */ p = (struct pbuf *)(buff - offsetof(RxBuff_t, buff)); 8010426: 687b ldr r3, [r7, #4] 8010428: 3b20 subs r3, #32 801042a: 62fb str r3, [r7, #44] @ 0x2c p->next = NULL; 801042c: 6afb ldr r3, [r7, #44] @ 0x2c 801042e: 2200 movs r2, #0 8010430: 601a str r2, [r3, #0] p->tot_len = 0; 8010432: 6afb ldr r3, [r7, #44] @ 0x2c 8010434: 2200 movs r2, #0 8010436: 811a strh r2, [r3, #8] p->len = Length; 8010438: 6afb ldr r3, [r7, #44] @ 0x2c 801043a: 887a ldrh r2, [r7, #2] 801043c: 815a strh r2, [r3, #10] /* Chain the buffer. */ if (!*ppStart) 801043e: 6abb ldr r3, [r7, #40] @ 0x28 8010440: 681b ldr r3, [r3, #0] 8010442: 2b00 cmp r3, #0 8010444: d103 bne.n 801044e { /* The first buffer of the packet. */ *ppStart = p; 8010446: 6abb ldr r3, [r7, #40] @ 0x28 8010448: 6afa ldr r2, [r7, #44] @ 0x2c 801044a: 601a str r2, [r3, #0] 801044c: e003 b.n 8010456 } else { /* Chain the buffer to the end of the packet. */ (*ppEnd)->next = p; 801044e: 6a7b ldr r3, [r7, #36] @ 0x24 8010450: 681b ldr r3, [r3, #0] 8010452: 6afa ldr r2, [r7, #44] @ 0x2c 8010454: 601a str r2, [r3, #0] } *ppEnd = p; 8010456: 6a7b ldr r3, [r7, #36] @ 0x24 8010458: 6afa ldr r2, [r7, #44] @ 0x2c 801045a: 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) 801045c: 6abb ldr r3, [r7, #40] @ 0x28 801045e: 681b ldr r3, [r3, #0] 8010460: 62fb str r3, [r7, #44] @ 0x2c 8010462: e009 b.n 8010478 { p->tot_len += Length; 8010464: 6afb ldr r3, [r7, #44] @ 0x2c 8010466: 891a ldrh r2, [r3, #8] 8010468: 887b ldrh r3, [r7, #2] 801046a: 4413 add r3, r2 801046c: b29a uxth r2, r3 801046e: 6afb ldr r3, [r7, #44] @ 0x2c 8010470: 811a strh r2, [r3, #8] for (p = *ppStart; p != NULL; p = p->next) 8010472: 6afb ldr r3, [r7, #44] @ 0x2c 8010474: 681b ldr r3, [r3, #0] 8010476: 62fb str r3, [r7, #44] @ 0x2c 8010478: 6afb ldr r3, [r7, #44] @ 0x2c 801047a: 2b00 cmp r3, #0 801047c: d1f2 bne.n 8010464 } /* Invalidate data cache because Rx DMA's writing to physical memory makes it stale. */ SCB_InvalidateDCache_by_Addr((uint32_t *)buff, Length); 801047e: 887b ldrh r3, [r7, #2] 8010480: 687a ldr r2, [r7, #4] 8010482: 623a str r2, [r7, #32] 8010484: 61fb str r3, [r7, #28] if ( dsize > 0 ) { 8010486: 69fb ldr r3, [r7, #28] 8010488: 2b00 cmp r3, #0 801048a: dd1d ble.n 80104c8 int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U)); 801048c: 6a3b ldr r3, [r7, #32] 801048e: f003 021f and.w r2, r3, #31 8010492: 69fb ldr r3, [r7, #28] 8010494: 4413 add r3, r2 8010496: 61bb str r3, [r7, #24] uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */; 8010498: 6a3b ldr r3, [r7, #32] 801049a: 617b str r3, [r7, #20] __ASM volatile ("dsb 0xF":::"memory"); 801049c: f3bf 8f4f dsb sy } 80104a0: bf00 nop SCB->DCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */ 80104a2: 4a0d ldr r2, [pc, #52] @ (80104d8 ) 80104a4: 697b ldr r3, [r7, #20] 80104a6: f8c2 325c str.w r3, [r2, #604] @ 0x25c op_addr += __SCB_DCACHE_LINE_SIZE; 80104aa: 697b ldr r3, [r7, #20] 80104ac: 3320 adds r3, #32 80104ae: 617b str r3, [r7, #20] op_size -= __SCB_DCACHE_LINE_SIZE; 80104b0: 69bb ldr r3, [r7, #24] 80104b2: 3b20 subs r3, #32 80104b4: 61bb str r3, [r7, #24] } while ( op_size > 0 ); 80104b6: 69bb ldr r3, [r7, #24] 80104b8: 2b00 cmp r3, #0 80104ba: dcf2 bgt.n 80104a2 __ASM volatile ("dsb 0xF":::"memory"); 80104bc: f3bf 8f4f dsb sy } 80104c0: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 80104c2: f3bf 8f6f isb sy } 80104c6: bf00 nop } 80104c8: bf00 nop /* USER CODE END HAL ETH RxLinkCallback */ } 80104ca: bf00 nop 80104cc: 3734 adds r7, #52 @ 0x34 80104ce: 46bd mov sp, r7 80104d0: f85d 7b04 ldr.w r7, [sp], #4 80104d4: 4770 bx lr 80104d6: bf00 nop 80104d8: e000ed00 .word 0xe000ed00 080104dc : void HAL_ETH_TxFreeCallback(uint32_t * buff) { 80104dc: b580 push {r7, lr} 80104de: b082 sub sp, #8 80104e0: af00 add r7, sp, #0 80104e2: 6078 str r0, [r7, #4] /* USER CODE BEGIN HAL ETH TxFreeCallback */ pbuf_free((struct pbuf *)buff); 80104e4: 6878 ldr r0, [r7, #4] 80104e6: f009 fff9 bl 801a4dc /* USER CODE END HAL ETH TxFreeCallback */ } 80104ea: bf00 nop 80104ec: 3708 adds r7, #8 80104ee: 46bd mov sp, r7 80104f0: bd80 pop {r7, pc} ... 080104f4 : /* 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){ 80104f4: b580 push {r7, lr} 80104f6: af00 add r7, sp, #0 sys_mutex_lock(&lock_tcpip_core); 80104f8: 4804 ldr r0, [pc, #16] @ (801050c ) 80104fa: f015 ff95 bl 8026428 lwip_core_lock_holder_thread_id = osThreadGetId(); 80104fe: f000 fa35 bl 801096c 8010502: 4603 mov r3, r0 8010504: 4a02 ldr r2, [pc, #8] @ (8010510 ) 8010506: 6013 str r3, [r2, #0] } 8010508: bf00 nop 801050a: bd80 pop {r7, pc} 801050c: 24024334 .word 0x24024334 8010510: 240022f4 .word 0x240022f4 08010514 : void sys_unlock_tcpip_core(void){ 8010514: b580 push {r7, lr} 8010516: af00 add r7, sp, #0 lwip_core_lock_holder_thread_id = 0; 8010518: 4b03 ldr r3, [pc, #12] @ (8010528 ) 801051a: 2200 movs r2, #0 801051c: 601a str r2, [r3, #0] sys_mutex_unlock(&lock_tcpip_core); 801051e: 4803 ldr r0, [pc, #12] @ (801052c ) 8010520: f015 ff91 bl 8026446 } 8010524: bf00 nop 8010526: bd80 pop {r7, pc} 8010528: 240022f4 .word 0x240022f4 801052c: 24024334 .word 0x24024334 08010530 : void sys_check_core_locking(void){ 8010530: b580 push {r7, lr} 8010532: b082 sub sp, #8 8010534: 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); 8010536: 4b15 ldr r3, [pc, #84] @ (801058c ) 8010538: 685b ldr r3, [r3, #4] 801053a: f3c3 0308 ubfx r3, r3, #0, #9 801053e: 2b00 cmp r3, #0 8010540: d006 beq.n 8010550 8010542: 4b13 ldr r3, [pc, #76] @ (8010590 ) 8010544: f240 4216 movw r2, #1046 @ 0x416 8010548: 4912 ldr r1, [pc, #72] @ (8010594 ) 801054a: 4813 ldr r0, [pc, #76] @ (8010598 ) 801054c: f019 fa3e bl 80299cc if (lwip_tcpip_thread_id != 0) { 8010550: 4b12 ldr r3, [pc, #72] @ (801059c ) 8010552: 681b ldr r3, [r3, #0] 8010554: 2b00 cmp r3, #0 8010556: d014 beq.n 8010582 osThreadId_t current_thread_id = osThreadGetId(); 8010558: f000 fa08 bl 801096c 801055c: 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); 801055e: 4b10 ldr r3, [pc, #64] @ (80105a0 ) 8010560: 681b ldr r3, [r3, #0] 8010562: 687a ldr r2, [r7, #4] 8010564: 429a cmp r2, r3 8010566: d006 beq.n 8010576 8010568: 4b09 ldr r3, [pc, #36] @ (8010590 ) 801056a: f240 421c movw r2, #1052 @ 0x41c 801056e: 490d ldr r1, [pc, #52] @ (80105a4 ) 8010570: 4809 ldr r0, [pc, #36] @ (8010598 ) 8010572: f019 fa2b bl 80299cc /* 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); 8010576: 4b0a ldr r3, [pc, #40] @ (80105a0 ) 8010578: 681b ldr r3, [r3, #0] 801057a: 687a ldr r2, [r7, #4] 801057c: 429a cmp r2, r3 801057e: d000 beq.n 8010582 8010580: 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 */ } } 8010582: bf00 nop 8010584: 3708 adds r7, #8 8010586: 46bd mov sp, r7 8010588: bd80 pop {r7, pc} 801058a: bf00 nop 801058c: e000ed00 .word 0xe000ed00 8010590: 0802ca00 .word 0x0802ca00 8010594: 0802ca70 .word 0x0802ca70 8010598: 0802ca2c .word 0x0802ca2c 801059c: 240022f8 .word 0x240022f8 80105a0: 240022f4 .word 0x240022f4 80105a4: 0802ca98 .word 0x0802ca98 080105a8 : void sys_mark_tcpip_thread(void){ 80105a8: b580 push {r7, lr} 80105aa: af00 add r7, sp, #0 lwip_tcpip_thread_id = osThreadGetId(); 80105ac: f000 f9de bl 801096c 80105b0: 4603 mov r3, r0 80105b2: 4a02 ldr r2, [pc, #8] @ (80105bc ) 80105b4: 6013 str r3, [r2, #0] } 80105b6: bf00 nop 80105b8: bd80 pop {r7, pc} 80105ba: bf00 nop 80105bc: 240022f8 .word 0x240022f8 080105c0 : #if USE_DHCP void dhcp_sm(struct netif *netif, enum dhcp_states *state) { 80105c0: b580 push {r7, lr} 80105c2: b08c sub sp, #48 @ 0x30 80105c4: af00 add r7, sp, #0 80105c6: 6078 str r0, [r7, #4] 80105c8: 6039 str r1, [r7, #0] ip_addr_t gw; #ifdef DHCP_USER_LOGS uint8_t iptxt[20]; #endif switch(*state) 80105ca: 683b ldr r3, [r7, #0] 80105cc: 781b ldrb r3, [r3, #0] 80105ce: 2b03 cmp r3, #3 80105d0: d072 beq.n 80106b8 80105d2: 2b03 cmp r3, #3 80105d4: dc7b bgt.n 80106ce 80105d6: 2b01 cmp r3, #1 80105d8: d002 beq.n 80105e0 80105da: 2b02 cmp r3, #2 80105dc: d00a beq.n 80105f4 { *state = DHCP_START; } break; default: break; 80105de: e076 b.n 80106ce *state = DHCP_WAIT_ADDRESS; 80105e0: 683b ldr r3, [r7, #0] 80105e2: 2202 movs r2, #2 80105e4: 701a strb r2, [r3, #0] dhcp = (struct dhcp *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP); 80105e6: 687b ldr r3, [r7, #4] 80105e8: 6a5b ldr r3, [r3, #36] @ 0x24 80105ea: 62fb str r3, [r7, #44] @ 0x2c printf(" State: Looking for DHCP server ...\n"); 80105ec: 483c ldr r0, [pc, #240] @ (80106e0 ) 80105ee: f019 fa55 bl 8029a9c break; 80105f2: e071 b.n 80106d8 if (dhcp_supplied_address(netif)) 80105f4: 6878 ldr r0, [r7, #4] 80105f6: f013 f87b bl 80236f0 80105fa: 4603 mov r3, r0 80105fc: 2b00 cmp r3, #0 80105fe: d015 beq.n 801062c *state = DHCP_ADDRESS_ASSIGNED; 8010600: 683b ldr r3, [r7, #0] 8010602: 2203 movs r2, #3 8010604: 701a strb r2, [r3, #0] sprintf((char *)iptxt, "%s", ip4addr_ntoa((const ip4_addr_t *)&netif->ip_addr)); 8010606: 687b ldr r3, [r7, #4] 8010608: 3304 adds r3, #4 801060a: 4618 mov r0, r3 801060c: f014 fe08 bl 8025220 8010610: 4602 mov r2, r0 8010612: f107 030c add.w r3, r7, #12 8010616: 4933 ldr r1, [pc, #204] @ (80106e4 ) 8010618: 4618 mov r0, r3 801061a: f019 fa47 bl 8029aac printf("IP address assigned by a DHCP server: %s\n", iptxt); 801061e: f107 030c add.w r3, r7, #12 8010622: 4619 mov r1, r3 8010624: 4830 ldr r0, [pc, #192] @ (80106e8 ) 8010626: f019 f9d1 bl 80299cc break; 801062a: e052 b.n 80106d2 dhcp = (struct dhcp *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP); 801062c: 687b ldr r3, [r7, #4] 801062e: 6a5b ldr r3, [r3, #36] @ 0x24 8010630: 62fb str r3, [r7, #44] @ 0x2c if (dhcp->tries > MAX_DHCP_TRIES) 8010632: 6afb ldr r3, [r7, #44] @ 0x2c 8010634: 799b ldrb r3, [r3, #6] 8010636: 2b04 cmp r3, #4 8010638: d94b bls.n 80106d2 *state = DHCP_TIMEOUT; 801063a: 683b ldr r3, [r7, #0] 801063c: 2204 movs r2, #4 801063e: 701a strb r2, [r3, #0] LOCK_TCPIP_CORE(); 8010640: f7ff ff58 bl 80104f4 dhcp_stop(netif); 8010644: 6878 ldr r0, [r7, #4] 8010646: f012 faab bl 8022ba0 UNLOCK_TCPIP_CORE(); 801064a: f7ff ff63 bl 8010514 ipaddr_aton(STATIC_IP, &ipaddr); 801064e: f107 0328 add.w r3, r7, #40 @ 0x28 8010652: 4619 mov r1, r3 8010654: 4825 ldr r0, [pc, #148] @ (80106ec ) 8010656: f014 fcb9 bl 8024fcc ipaddr_aton(STATIC_MASK, &netmask); 801065a: f107 0324 add.w r3, r7, #36 @ 0x24 801065e: 4619 mov r1, r3 8010660: 4823 ldr r0, [pc, #140] @ (80106f0 ) 8010662: f014 fcb3 bl 8024fcc ipaddr_aton(STATIC_GW, &gw); 8010666: f107 0320 add.w r3, r7, #32 801066a: 4619 mov r1, r3 801066c: 4821 ldr r0, [pc, #132] @ (80106f4 ) 801066e: f014 fcad bl 8024fcc LOCK_TCPIP_CORE(); 8010672: f7ff ff3f bl 80104f4 netif_set_addr(netif, ip_2_ip4(&ipaddr), ip_2_ip4(&netmask), ip_2_ip4(&gw)); 8010676: f107 0320 add.w r3, r7, #32 801067a: f107 0224 add.w r2, r7, #36 @ 0x24 801067e: f107 0128 add.w r1, r7, #40 @ 0x28 8010682: 6878 ldr r0, [r7, #4] 8010684: f009 f9e0 bl 8019a48 UNLOCK_TCPIP_CORE(); 8010688: f7ff ff44 bl 8010514 sprintf((char *)iptxt, "%s", ip4addr_ntoa((const ip4_addr_t *)&netif->ip_addr)); 801068c: 687b ldr r3, [r7, #4] 801068e: 3304 adds r3, #4 8010690: 4618 mov r0, r3 8010692: f014 fdc5 bl 8025220 8010696: 4602 mov r2, r0 8010698: f107 030c add.w r3, r7, #12 801069c: 4911 ldr r1, [pc, #68] @ (80106e4 ) 801069e: 4618 mov r0, r3 80106a0: f019 fa04 bl 8029aac printf("DHCP Timeout !! \n"); 80106a4: 4814 ldr r0, [pc, #80] @ (80106f8 ) 80106a6: f019 f9f9 bl 8029a9c printf("Static IP address: %s\n", iptxt); 80106aa: f107 030c add.w r3, r7, #12 80106ae: 4619 mov r1, r3 80106b0: 4812 ldr r0, [pc, #72] @ (80106fc ) 80106b2: f019 f98b bl 80299cc break; 80106b6: e00c b.n 80106d2 dhcp = (struct dhcp *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP); 80106b8: 687b ldr r3, [r7, #4] 80106ba: 6a5b ldr r3, [r3, #36] @ 0x24 80106bc: 62fb str r3, [r7, #44] @ 0x2c if(dhcp->state == 3) 80106be: 6afb ldr r3, [r7, #44] @ 0x2c 80106c0: 795b ldrb r3, [r3, #5] 80106c2: 2b03 cmp r3, #3 80106c4: d107 bne.n 80106d6 *state = DHCP_START; 80106c6: 683b ldr r3, [r7, #0] 80106c8: 2201 movs r2, #1 80106ca: 701a strb r2, [r3, #0] break; 80106cc: e003 b.n 80106d6 break; 80106ce: bf00 nop 80106d0: e002 b.n 80106d8 break; 80106d2: bf00 nop 80106d4: e000 b.n 80106d8 break; 80106d6: bf00 nop } } 80106d8: bf00 nop 80106da: 3730 adds r7, #48 @ 0x30 80106dc: 46bd mov sp, r7 80106de: bd80 pop {r7, pc} 80106e0: 0802cabc .word 0x0802cabc 80106e4: 0802cae4 .word 0x0802cae4 80106e8: 0802cae8 .word 0x0802cae8 80106ec: 0802cb14 .word 0x0802cb14 80106f0: 0802cb24 .word 0x0802cb24 80106f4: 0802cb34 .word 0x0802cb34 80106f8: 0802cb40 .word 0x0802cb40 80106fc: 0802cb54 .word 0x0802cb54 08010700 <__NVIC_SetPriority>: { 8010700: b480 push {r7} 8010702: b083 sub sp, #12 8010704: af00 add r7, sp, #0 8010706: 4603 mov r3, r0 8010708: 6039 str r1, [r7, #0] 801070a: 80fb strh r3, [r7, #6] if ((int32_t)(IRQn) >= 0) 801070c: f9b7 3006 ldrsh.w r3, [r7, #6] 8010710: 2b00 cmp r3, #0 8010712: db0a blt.n 801072a <__NVIC_SetPriority+0x2a> NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 8010714: 683b ldr r3, [r7, #0] 8010716: b2da uxtb r2, r3 8010718: 490c ldr r1, [pc, #48] @ (801074c <__NVIC_SetPriority+0x4c>) 801071a: f9b7 3006 ldrsh.w r3, [r7, #6] 801071e: 0112 lsls r2, r2, #4 8010720: b2d2 uxtb r2, r2 8010722: 440b add r3, r1 8010724: f883 2300 strb.w r2, [r3, #768] @ 0x300 } 8010728: e00a b.n 8010740 <__NVIC_SetPriority+0x40> SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 801072a: 683b ldr r3, [r7, #0] 801072c: b2da uxtb r2, r3 801072e: 4908 ldr r1, [pc, #32] @ (8010750 <__NVIC_SetPriority+0x50>) 8010730: 88fb ldrh r3, [r7, #6] 8010732: f003 030f and.w r3, r3, #15 8010736: 3b04 subs r3, #4 8010738: 0112 lsls r2, r2, #4 801073a: b2d2 uxtb r2, r2 801073c: 440b add r3, r1 801073e: 761a strb r2, [r3, #24] } 8010740: bf00 nop 8010742: 370c adds r7, #12 8010744: 46bd mov sp, r7 8010746: f85d 7b04 ldr.w r7, [sp], #4 801074a: 4770 bx lr 801074c: e000e100 .word 0xe000e100 8010750: e000ed00 .word 0xe000ed00 08010754 : /* SysTick handler implementation that also clears overflow flag. */ #if (USE_CUSTOM_SYSTICK_HANDLER_IMPLEMENTATION == 0) void SysTick_Handler (void) { 8010754: b580 push {r7, lr} 8010756: af00 add r7, sp, #0 /* Clear overflow flag */ SysTick->CTRL; 8010758: 4b05 ldr r3, [pc, #20] @ (8010770 ) 801075a: 681b ldr r3, [r3, #0] if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) { 801075c: f003 f946 bl 80139ec 8010760: 4603 mov r3, r0 8010762: 2b01 cmp r3, #1 8010764: d001 beq.n 801076a /* Call tick handler */ xPortSysTickHandler(); 8010766: f004 fa6f bl 8014c48 } } 801076a: bf00 nop 801076c: bd80 pop {r7, pc} 801076e: bf00 nop 8010770: e000e010 .word 0xe000e010 08010774 : #endif /* SysTick */ /* Setup SVC to reset value. */ __STATIC_INLINE void SVC_Setup (void) { 8010774: b580 push {r7, lr} 8010776: 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); 8010778: 2100 movs r1, #0 801077a: f06f 0004 mvn.w r0, #4 801077e: f7ff ffbf bl 8010700 <__NVIC_SetPriority> #endif } 8010782: bf00 nop 8010784: bd80 pop {r7, pc} ... 08010788 : static uint32_t OS_Tick_GetOverflow (void); /* Get OS Tick interval */ static uint32_t OS_Tick_GetInterval (void); /*---------------------------------------------------------------------------*/ osStatus_t osKernelInitialize (void) { 8010788: b480 push {r7} 801078a: b083 sub sp, #12 801078c: af00 add r7, sp, #0 __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 801078e: f3ef 8305 mrs r3, IPSR 8010792: 603b str r3, [r7, #0] return(result); 8010794: 683b ldr r3, [r7, #0] osStatus_t stat; if (IS_IRQ()) { 8010796: 2b00 cmp r3, #0 8010798: d003 beq.n 80107a2 stat = osErrorISR; 801079a: f06f 0305 mvn.w r3, #5 801079e: 607b str r3, [r7, #4] 80107a0: e00c b.n 80107bc } else { if (KernelState == osKernelInactive) { 80107a2: 4b0a ldr r3, [pc, #40] @ (80107cc ) 80107a4: 681b ldr r3, [r3, #0] 80107a6: 2b00 cmp r3, #0 80107a8: d105 bne.n 80107b6 EvrFreeRTOSSetup(0U); #endif #if defined(USE_FreeRTOS_HEAP_5) && (HEAP_5_REGION_SETUP == 1) vPortDefineHeapRegions (configHEAP_5_REGIONS); #endif KernelState = osKernelReady; 80107aa: 4b08 ldr r3, [pc, #32] @ (80107cc ) 80107ac: 2201 movs r2, #1 80107ae: 601a str r2, [r3, #0] stat = osOK; 80107b0: 2300 movs r3, #0 80107b2: 607b str r3, [r7, #4] 80107b4: e002 b.n 80107bc } else { stat = osError; 80107b6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80107ba: 607b str r3, [r7, #4] } } return (stat); 80107bc: 687b ldr r3, [r7, #4] } 80107be: 4618 mov r0, r3 80107c0: 370c adds r7, #12 80107c2: 46bd mov sp, r7 80107c4: f85d 7b04 ldr.w r7, [sp], #4 80107c8: 4770 bx lr 80107ca: bf00 nop 80107cc: 240022fc .word 0x240022fc 080107d0 : } return (state); } osStatus_t osKernelStart (void) { 80107d0: b580 push {r7, lr} 80107d2: b082 sub sp, #8 80107d4: af00 add r7, sp, #0 __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 80107d6: f3ef 8305 mrs r3, IPSR 80107da: 603b str r3, [r7, #0] return(result); 80107dc: 683b ldr r3, [r7, #0] osStatus_t stat; if (IS_IRQ()) { 80107de: 2b00 cmp r3, #0 80107e0: d003 beq.n 80107ea stat = osErrorISR; 80107e2: f06f 0305 mvn.w r3, #5 80107e6: 607b str r3, [r7, #4] 80107e8: e010 b.n 801080c } else { if (KernelState == osKernelReady) { 80107ea: 4b0b ldr r3, [pc, #44] @ (8010818 ) 80107ec: 681b ldr r3, [r3, #0] 80107ee: 2b01 cmp r3, #1 80107f0: d109 bne.n 8010806 /* Ensure SVC priority is at the reset value */ SVC_Setup(); 80107f2: f7ff ffbf bl 8010774 /* Change state to enable IRQ masking check */ KernelState = osKernelRunning; 80107f6: 4b08 ldr r3, [pc, #32] @ (8010818 ) 80107f8: 2202 movs r2, #2 80107fa: 601a str r2, [r3, #0] /* Start the kernel scheduler */ vTaskStartScheduler(); 80107fc: f002 fc3a bl 8013074 stat = osOK; 8010800: 2300 movs r3, #0 8010802: 607b str r3, [r7, #4] 8010804: e002 b.n 801080c } else { stat = osError; 8010806: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801080a: 607b str r3, [r7, #4] } } return (stat); 801080c: 687b ldr r3, [r7, #4] } 801080e: 4618 mov r0, r3 8010810: 3708 adds r7, #8 8010812: 46bd mov sp, r7 8010814: bd80 pop {r7, pc} 8010816: bf00 nop 8010818: 240022fc .word 0x240022fc 0801081c : } return (lock); } uint32_t osKernelGetTickCount (void) { 801081c: b580 push {r7, lr} 801081e: b082 sub sp, #8 8010820: af00 add r7, sp, #0 __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8010822: f3ef 8305 mrs r3, IPSR 8010826: 603b str r3, [r7, #0] return(result); 8010828: 683b ldr r3, [r7, #0] TickType_t ticks; if (IS_IRQ()) { 801082a: 2b00 cmp r3, #0 801082c: d003 beq.n 8010836 ticks = xTaskGetTickCountFromISR(); 801082e: f002 fd4d bl 80132cc 8010832: 6078 str r0, [r7, #4] 8010834: e002 b.n 801083c } else { ticks = xTaskGetTickCount(); 8010836: f002 fd39 bl 80132ac 801083a: 6078 str r0, [r7, #4] } return (ticks); 801083c: 687b ldr r3, [r7, #4] } 801083e: 4618 mov r0, r3 8010840: 3708 adds r7, #8 8010842: 46bd mov sp, r7 8010844: bd80 pop {r7, pc} 08010846 : return (configCPU_CLOCK_HZ); } /*---------------------------------------------------------------------------*/ osThreadId_t osThreadNew (osThreadFunc_t func, void *argument, const osThreadAttr_t *attr) { 8010846: b580 push {r7, lr} 8010848: b08e sub sp, #56 @ 0x38 801084a: af04 add r7, sp, #16 801084c: 60f8 str r0, [r7, #12] 801084e: 60b9 str r1, [r7, #8] 8010850: 607a str r2, [r7, #4] uint32_t stack; TaskHandle_t hTask; UBaseType_t prio; int32_t mem; hTask = NULL; 8010852: 2300 movs r3, #0 8010854: 613b str r3, [r7, #16] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8010856: f3ef 8305 mrs r3, IPSR 801085a: 617b str r3, [r7, #20] return(result); 801085c: 697b ldr r3, [r7, #20] if (!IS_IRQ() && (func != NULL)) { 801085e: 2b00 cmp r3, #0 8010860: d17f bne.n 8010962 8010862: 68fb ldr r3, [r7, #12] 8010864: 2b00 cmp r3, #0 8010866: d07c beq.n 8010962 stack = configMINIMAL_STACK_SIZE; 8010868: f44f 7300 mov.w r3, #512 @ 0x200 801086c: 623b str r3, [r7, #32] prio = (UBaseType_t)osPriorityNormal; 801086e: 2318 movs r3, #24 8010870: 61fb str r3, [r7, #28] name = NULL; 8010872: 2300 movs r3, #0 8010874: 627b str r3, [r7, #36] @ 0x24 mem = -1; 8010876: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801087a: 61bb str r3, [r7, #24] if (attr != NULL) { 801087c: 687b ldr r3, [r7, #4] 801087e: 2b00 cmp r3, #0 8010880: d045 beq.n 801090e if (attr->name != NULL) { 8010882: 687b ldr r3, [r7, #4] 8010884: 681b ldr r3, [r3, #0] 8010886: 2b00 cmp r3, #0 8010888: d002 beq.n 8010890 name = attr->name; 801088a: 687b ldr r3, [r7, #4] 801088c: 681b ldr r3, [r3, #0] 801088e: 627b str r3, [r7, #36] @ 0x24 } if (attr->priority != osPriorityNone) { 8010890: 687b ldr r3, [r7, #4] 8010892: 699b ldr r3, [r3, #24] 8010894: 2b00 cmp r3, #0 8010896: d002 beq.n 801089e prio = (UBaseType_t)attr->priority; 8010898: 687b ldr r3, [r7, #4] 801089a: 699b ldr r3, [r3, #24] 801089c: 61fb str r3, [r7, #28] } if ((prio < osPriorityIdle) || (prio > osPriorityISR) || ((attr->attr_bits & osThreadJoinable) == osThreadJoinable)) { 801089e: 69fb ldr r3, [r7, #28] 80108a0: 2b00 cmp r3, #0 80108a2: d008 beq.n 80108b6 80108a4: 69fb ldr r3, [r7, #28] 80108a6: 2b38 cmp r3, #56 @ 0x38 80108a8: d805 bhi.n 80108b6 80108aa: 687b ldr r3, [r7, #4] 80108ac: 685b ldr r3, [r3, #4] 80108ae: f003 0301 and.w r3, r3, #1 80108b2: 2b00 cmp r3, #0 80108b4: d001 beq.n 80108ba return (NULL); 80108b6: 2300 movs r3, #0 80108b8: e054 b.n 8010964 } if (attr->stack_size > 0U) { 80108ba: 687b ldr r3, [r7, #4] 80108bc: 695b ldr r3, [r3, #20] 80108be: 2b00 cmp r3, #0 80108c0: d003 beq.n 80108ca /* 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); 80108c2: 687b ldr r3, [r7, #4] 80108c4: 695b ldr r3, [r3, #20] 80108c6: 089b lsrs r3, r3, #2 80108c8: 623b str r3, [r7, #32] } if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticTask_t)) && 80108ca: 687b ldr r3, [r7, #4] 80108cc: 689b ldr r3, [r3, #8] 80108ce: 2b00 cmp r3, #0 80108d0: d00e beq.n 80108f0 80108d2: 687b ldr r3, [r7, #4] 80108d4: 68db ldr r3, [r3, #12] 80108d6: 2ba7 cmp r3, #167 @ 0xa7 80108d8: d90a bls.n 80108f0 (attr->stack_mem != NULL) && (attr->stack_size > 0U)) { 80108da: 687b ldr r3, [r7, #4] 80108dc: 691b ldr r3, [r3, #16] if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticTask_t)) && 80108de: 2b00 cmp r3, #0 80108e0: d006 beq.n 80108f0 (attr->stack_mem != NULL) && (attr->stack_size > 0U)) { 80108e2: 687b ldr r3, [r7, #4] 80108e4: 695b ldr r3, [r3, #20] 80108e6: 2b00 cmp r3, #0 80108e8: d002 beq.n 80108f0 mem = 1; 80108ea: 2301 movs r3, #1 80108ec: 61bb str r3, [r7, #24] 80108ee: e010 b.n 8010912 } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && (attr->stack_mem == NULL)) { 80108f0: 687b ldr r3, [r7, #4] 80108f2: 689b ldr r3, [r3, #8] 80108f4: 2b00 cmp r3, #0 80108f6: d10c bne.n 8010912 80108f8: 687b ldr r3, [r7, #4] 80108fa: 68db ldr r3, [r3, #12] 80108fc: 2b00 cmp r3, #0 80108fe: d108 bne.n 8010912 8010900: 687b ldr r3, [r7, #4] 8010902: 691b ldr r3, [r3, #16] 8010904: 2b00 cmp r3, #0 8010906: d104 bne.n 8010912 mem = 0; 8010908: 2300 movs r3, #0 801090a: 61bb str r3, [r7, #24] 801090c: e001 b.n 8010912 } } } else { mem = 0; 801090e: 2300 movs r3, #0 8010910: 61bb str r3, [r7, #24] } if (mem == 1) { 8010912: 69bb ldr r3, [r7, #24] 8010914: 2b01 cmp r3, #1 8010916: d110 bne.n 801093a #if (configSUPPORT_STATIC_ALLOCATION == 1) hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem, 8010918: 687b ldr r3, [r7, #4] 801091a: 691b ldr r3, [r3, #16] (StaticTask_t *)attr->cb_mem); 801091c: 687a ldr r2, [r7, #4] 801091e: 6892 ldr r2, [r2, #8] hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem, 8010920: 9202 str r2, [sp, #8] 8010922: 9301 str r3, [sp, #4] 8010924: 69fb ldr r3, [r7, #28] 8010926: 9300 str r3, [sp, #0] 8010928: 68bb ldr r3, [r7, #8] 801092a: 6a3a ldr r2, [r7, #32] 801092c: 6a79 ldr r1, [r7, #36] @ 0x24 801092e: 68f8 ldr r0, [r7, #12] 8010930: f002 f9ac bl 8012c8c 8010934: 4603 mov r3, r0 8010936: 613b str r3, [r7, #16] 8010938: e013 b.n 8010962 #endif } else { if (mem == 0) { 801093a: 69bb ldr r3, [r7, #24] 801093c: 2b00 cmp r3, #0 801093e: d110 bne.n 8010962 #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) if (xTaskCreate ((TaskFunction_t)func, name, (uint16_t)stack, argument, prio, &hTask) != pdPASS) { 8010940: 6a3b ldr r3, [r7, #32] 8010942: b29a uxth r2, r3 8010944: f107 0310 add.w r3, r7, #16 8010948: 9301 str r3, [sp, #4] 801094a: 69fb ldr r3, [r7, #28] 801094c: 9300 str r3, [sp, #0] 801094e: 68bb ldr r3, [r7, #8] 8010950: 6a79 ldr r1, [r7, #36] @ 0x24 8010952: 68f8 ldr r0, [r7, #12] 8010954: f002 f9fa bl 8012d4c 8010958: 4603 mov r3, r0 801095a: 2b01 cmp r3, #1 801095c: d001 beq.n 8010962 hTask = NULL; 801095e: 2300 movs r3, #0 8010960: 613b str r3, [r7, #16] #endif } } } return ((osThreadId_t)hTask); 8010962: 693b ldr r3, [r7, #16] } 8010964: 4618 mov r0, r3 8010966: 3728 adds r7, #40 @ 0x28 8010968: 46bd mov sp, r7 801096a: bd80 pop {r7, pc} 0801096c : } return (name); } osThreadId_t osThreadGetId (void) { 801096c: b580 push {r7, lr} 801096e: b082 sub sp, #8 8010970: af00 add r7, sp, #0 osThreadId_t id; id = (osThreadId_t)xTaskGetCurrentTaskHandle(); 8010972: f003 f82b bl 80139cc 8010976: 6078 str r0, [r7, #4] return (id); 8010978: 687b ldr r3, [r7, #4] } 801097a: 4618 mov r0, r3 801097c: 3708 adds r7, #8 801097e: 46bd mov sp, r7 8010980: bd80 pop {r7, pc} 08010982 : /* Return flags before clearing */ return (rflags); } #endif /* (configUSE_OS2_THREAD_FLAGS == 1) */ osStatus_t osDelay (uint32_t ticks) { 8010982: b580 push {r7, lr} 8010984: b084 sub sp, #16 8010986: af00 add r7, sp, #0 8010988: 6078 str r0, [r7, #4] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 801098a: f3ef 8305 mrs r3, IPSR 801098e: 60bb str r3, [r7, #8] return(result); 8010990: 68bb ldr r3, [r7, #8] osStatus_t stat; if (IS_IRQ()) { 8010992: 2b00 cmp r3, #0 8010994: d003 beq.n 801099e stat = osErrorISR; 8010996: f06f 0305 mvn.w r3, #5 801099a: 60fb str r3, [r7, #12] 801099c: e007 b.n 80109ae } else { stat = osOK; 801099e: 2300 movs r3, #0 80109a0: 60fb str r3, [r7, #12] if (ticks != 0U) { 80109a2: 687b ldr r3, [r7, #4] 80109a4: 2b00 cmp r3, #0 80109a6: d002 beq.n 80109ae vTaskDelay(ticks); 80109a8: 6878 ldr r0, [r7, #4] 80109aa: f002 fb2d bl 8013008 } } return (stat); 80109ae: 68fb ldr r3, [r7, #12] } 80109b0: 4618 mov r0, r3 80109b2: 3710 adds r7, #16 80109b4: 46bd mov sp, r7 80109b6: bd80 pop {r7, pc} 080109b8 : } /*---------------------------------------------------------------------------*/ #if (configUSE_OS2_MUTEX == 1) osMutexId_t osMutexNew (const osMutexAttr_t *attr) { 80109b8: b580 push {r7, lr} 80109ba: b088 sub sp, #32 80109bc: af00 add r7, sp, #0 80109be: 6078 str r0, [r7, #4] int32_t mem; #if (configQUEUE_REGISTRY_SIZE > 0) const char *name; #endif hMutex = NULL; 80109c0: 2300 movs r3, #0 80109c2: 61fb str r3, [r7, #28] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 80109c4: f3ef 8305 mrs r3, IPSR 80109c8: 60bb str r3, [r7, #8] return(result); 80109ca: 68bb ldr r3, [r7, #8] if (!IS_IRQ()) { 80109cc: 2b00 cmp r3, #0 80109ce: d174 bne.n 8010aba if (attr != NULL) { 80109d0: 687b ldr r3, [r7, #4] 80109d2: 2b00 cmp r3, #0 80109d4: d003 beq.n 80109de type = attr->attr_bits; 80109d6: 687b ldr r3, [r7, #4] 80109d8: 685b ldr r3, [r3, #4] 80109da: 61bb str r3, [r7, #24] 80109dc: e001 b.n 80109e2 } else { type = 0U; 80109de: 2300 movs r3, #0 80109e0: 61bb str r3, [r7, #24] } if ((type & osMutexRecursive) == osMutexRecursive) { 80109e2: 69bb ldr r3, [r7, #24] 80109e4: f003 0301 and.w r3, r3, #1 80109e8: 2b00 cmp r3, #0 80109ea: d002 beq.n 80109f2 rmtx = 1U; 80109ec: 2301 movs r3, #1 80109ee: 617b str r3, [r7, #20] 80109f0: e001 b.n 80109f6 } else { rmtx = 0U; 80109f2: 2300 movs r3, #0 80109f4: 617b str r3, [r7, #20] } if ((type & osMutexRobust) != osMutexRobust) { 80109f6: 69bb ldr r3, [r7, #24] 80109f8: f003 0308 and.w r3, r3, #8 80109fc: 2b00 cmp r3, #0 80109fe: d15c bne.n 8010aba mem = -1; 8010a00: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8010a04: 613b str r3, [r7, #16] if (attr != NULL) { 8010a06: 687b ldr r3, [r7, #4] 8010a08: 2b00 cmp r3, #0 8010a0a: d015 beq.n 8010a38 if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticSemaphore_t))) { 8010a0c: 687b ldr r3, [r7, #4] 8010a0e: 689b ldr r3, [r3, #8] 8010a10: 2b00 cmp r3, #0 8010a12: d006 beq.n 8010a22 8010a14: 687b ldr r3, [r7, #4] 8010a16: 68db ldr r3, [r3, #12] 8010a18: 2b4f cmp r3, #79 @ 0x4f 8010a1a: d902 bls.n 8010a22 mem = 1; 8010a1c: 2301 movs r3, #1 8010a1e: 613b str r3, [r7, #16] 8010a20: e00c b.n 8010a3c } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) { 8010a22: 687b ldr r3, [r7, #4] 8010a24: 689b ldr r3, [r3, #8] 8010a26: 2b00 cmp r3, #0 8010a28: d108 bne.n 8010a3c 8010a2a: 687b ldr r3, [r7, #4] 8010a2c: 68db ldr r3, [r3, #12] 8010a2e: 2b00 cmp r3, #0 8010a30: d104 bne.n 8010a3c mem = 0; 8010a32: 2300 movs r3, #0 8010a34: 613b str r3, [r7, #16] 8010a36: e001 b.n 8010a3c } } } else { mem = 0; 8010a38: 2300 movs r3, #0 8010a3a: 613b str r3, [r7, #16] } if (mem == 1) { 8010a3c: 693b ldr r3, [r7, #16] 8010a3e: 2b01 cmp r3, #1 8010a40: d112 bne.n 8010a68 #if (configSUPPORT_STATIC_ALLOCATION == 1) if (rmtx != 0U) { 8010a42: 697b ldr r3, [r7, #20] 8010a44: 2b00 cmp r3, #0 8010a46: d007 beq.n 8010a58 #if (configUSE_RECURSIVE_MUTEXES == 1) hMutex = xSemaphoreCreateRecursiveMutexStatic (attr->cb_mem); 8010a48: 687b ldr r3, [r7, #4] 8010a4a: 689b ldr r3, [r3, #8] 8010a4c: 4619 mov r1, r3 8010a4e: 2004 movs r0, #4 8010a50: f000 fdd9 bl 8011606 8010a54: 61f8 str r0, [r7, #28] 8010a56: e016 b.n 8010a86 #endif } else { hMutex = xSemaphoreCreateMutexStatic (attr->cb_mem); 8010a58: 687b ldr r3, [r7, #4] 8010a5a: 689b ldr r3, [r3, #8] 8010a5c: 4619 mov r1, r3 8010a5e: 2001 movs r0, #1 8010a60: f000 fdd1 bl 8011606 8010a64: 61f8 str r0, [r7, #28] 8010a66: e00e b.n 8010a86 } #endif } else { if (mem == 0) { 8010a68: 693b ldr r3, [r7, #16] 8010a6a: 2b00 cmp r3, #0 8010a6c: d10b bne.n 8010a86 #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) if (rmtx != 0U) { 8010a6e: 697b ldr r3, [r7, #20] 8010a70: 2b00 cmp r3, #0 8010a72: d004 beq.n 8010a7e #if (configUSE_RECURSIVE_MUTEXES == 1) hMutex = xSemaphoreCreateRecursiveMutex (); 8010a74: 2004 movs r0, #4 8010a76: f000 fdae bl 80115d6 8010a7a: 61f8 str r0, [r7, #28] 8010a7c: e003 b.n 8010a86 #endif } else { hMutex = xSemaphoreCreateMutex (); 8010a7e: 2001 movs r0, #1 8010a80: f000 fda9 bl 80115d6 8010a84: 61f8 str r0, [r7, #28] #endif } } #if (configQUEUE_REGISTRY_SIZE > 0) if (hMutex != NULL) { 8010a86: 69fb ldr r3, [r7, #28] 8010a88: 2b00 cmp r3, #0 8010a8a: d00c beq.n 8010aa6 if (attr != NULL) { 8010a8c: 687b ldr r3, [r7, #4] 8010a8e: 2b00 cmp r3, #0 8010a90: d003 beq.n 8010a9a name = attr->name; 8010a92: 687b ldr r3, [r7, #4] 8010a94: 681b ldr r3, [r3, #0] 8010a96: 60fb str r3, [r7, #12] 8010a98: e001 b.n 8010a9e } else { name = NULL; 8010a9a: 2300 movs r3, #0 8010a9c: 60fb str r3, [r7, #12] } vQueueAddToRegistry (hMutex, name); 8010a9e: 68f9 ldr r1, [r7, #12] 8010aa0: 69f8 ldr r0, [r7, #28] 8010aa2: f001 fcd3 bl 801244c } #endif if ((hMutex != NULL) && (rmtx != 0U)) { 8010aa6: 69fb ldr r3, [r7, #28] 8010aa8: 2b00 cmp r3, #0 8010aaa: d006 beq.n 8010aba 8010aac: 697b ldr r3, [r7, #20] 8010aae: 2b00 cmp r3, #0 8010ab0: d003 beq.n 8010aba hMutex = (SemaphoreHandle_t)((uint32_t)hMutex | 1U); 8010ab2: 69fb ldr r3, [r7, #28] 8010ab4: f043 0301 orr.w r3, r3, #1 8010ab8: 61fb str r3, [r7, #28] } } } return ((osMutexId_t)hMutex); 8010aba: 69fb ldr r3, [r7, #28] } 8010abc: 4618 mov r0, r3 8010abe: 3720 adds r7, #32 8010ac0: 46bd mov sp, r7 8010ac2: bd80 pop {r7, pc} 08010ac4 : osStatus_t osMutexAcquire (osMutexId_t mutex_id, uint32_t timeout) { 8010ac4: b580 push {r7, lr} 8010ac6: b086 sub sp, #24 8010ac8: af00 add r7, sp, #0 8010aca: 6078 str r0, [r7, #4] 8010acc: 6039 str r1, [r7, #0] SemaphoreHandle_t hMutex; osStatus_t stat; uint32_t rmtx; hMutex = (SemaphoreHandle_t)((uint32_t)mutex_id & ~1U); 8010ace: 687b ldr r3, [r7, #4] 8010ad0: f023 0301 bic.w r3, r3, #1 8010ad4: 613b str r3, [r7, #16] rmtx = (uint32_t)mutex_id & 1U; 8010ad6: 687b ldr r3, [r7, #4] 8010ad8: f003 0301 and.w r3, r3, #1 8010adc: 60fb str r3, [r7, #12] stat = osOK; 8010ade: 2300 movs r3, #0 8010ae0: 617b str r3, [r7, #20] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8010ae2: f3ef 8305 mrs r3, IPSR 8010ae6: 60bb str r3, [r7, #8] return(result); 8010ae8: 68bb ldr r3, [r7, #8] if (IS_IRQ()) { 8010aea: 2b00 cmp r3, #0 8010aec: d003 beq.n 8010af6 stat = osErrorISR; 8010aee: f06f 0305 mvn.w r3, #5 8010af2: 617b str r3, [r7, #20] 8010af4: e02c b.n 8010b50 } else if (hMutex == NULL) { 8010af6: 693b ldr r3, [r7, #16] 8010af8: 2b00 cmp r3, #0 8010afa: d103 bne.n 8010b04 stat = osErrorParameter; 8010afc: f06f 0303 mvn.w r3, #3 8010b00: 617b str r3, [r7, #20] 8010b02: e025 b.n 8010b50 } else { if (rmtx != 0U) { 8010b04: 68fb ldr r3, [r7, #12] 8010b06: 2b00 cmp r3, #0 8010b08: d011 beq.n 8010b2e #if (configUSE_RECURSIVE_MUTEXES == 1) if (xSemaphoreTakeRecursive (hMutex, timeout) != pdPASS) { 8010b0a: 6839 ldr r1, [r7, #0] 8010b0c: 6938 ldr r0, [r7, #16] 8010b0e: f000 fdca bl 80116a6 8010b12: 4603 mov r3, r0 8010b14: 2b01 cmp r3, #1 8010b16: d01b beq.n 8010b50 if (timeout != 0U) { 8010b18: 683b ldr r3, [r7, #0] 8010b1a: 2b00 cmp r3, #0 8010b1c: d003 beq.n 8010b26 stat = osErrorTimeout; 8010b1e: f06f 0301 mvn.w r3, #1 8010b22: 617b str r3, [r7, #20] 8010b24: e014 b.n 8010b50 } else { stat = osErrorResource; 8010b26: f06f 0302 mvn.w r3, #2 8010b2a: 617b str r3, [r7, #20] 8010b2c: e010 b.n 8010b50 } } #endif } else { if (xSemaphoreTake (hMutex, timeout) != pdPASS) { 8010b2e: 6839 ldr r1, [r7, #0] 8010b30: 6938 ldr r0, [r7, #16] 8010b32: f001 f96f bl 8011e14 8010b36: 4603 mov r3, r0 8010b38: 2b01 cmp r3, #1 8010b3a: d009 beq.n 8010b50 if (timeout != 0U) { 8010b3c: 683b ldr r3, [r7, #0] 8010b3e: 2b00 cmp r3, #0 8010b40: d003 beq.n 8010b4a stat = osErrorTimeout; 8010b42: f06f 0301 mvn.w r3, #1 8010b46: 617b str r3, [r7, #20] 8010b48: e002 b.n 8010b50 } else { stat = osErrorResource; 8010b4a: f06f 0302 mvn.w r3, #2 8010b4e: 617b str r3, [r7, #20] } } } } return (stat); 8010b50: 697b ldr r3, [r7, #20] } 8010b52: 4618 mov r0, r3 8010b54: 3718 adds r7, #24 8010b56: 46bd mov sp, r7 8010b58: bd80 pop {r7, pc} 08010b5a : osStatus_t osMutexRelease (osMutexId_t mutex_id) { 8010b5a: b580 push {r7, lr} 8010b5c: b086 sub sp, #24 8010b5e: af00 add r7, sp, #0 8010b60: 6078 str r0, [r7, #4] SemaphoreHandle_t hMutex; osStatus_t stat; uint32_t rmtx; hMutex = (SemaphoreHandle_t)((uint32_t)mutex_id & ~1U); 8010b62: 687b ldr r3, [r7, #4] 8010b64: f023 0301 bic.w r3, r3, #1 8010b68: 613b str r3, [r7, #16] rmtx = (uint32_t)mutex_id & 1U; 8010b6a: 687b ldr r3, [r7, #4] 8010b6c: f003 0301 and.w r3, r3, #1 8010b70: 60fb str r3, [r7, #12] stat = osOK; 8010b72: 2300 movs r3, #0 8010b74: 617b str r3, [r7, #20] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8010b76: f3ef 8305 mrs r3, IPSR 8010b7a: 60bb str r3, [r7, #8] return(result); 8010b7c: 68bb ldr r3, [r7, #8] if (IS_IRQ()) { 8010b7e: 2b00 cmp r3, #0 8010b80: d003 beq.n 8010b8a stat = osErrorISR; 8010b82: f06f 0305 mvn.w r3, #5 8010b86: 617b str r3, [r7, #20] 8010b88: e01f b.n 8010bca } else if (hMutex == NULL) { 8010b8a: 693b ldr r3, [r7, #16] 8010b8c: 2b00 cmp r3, #0 8010b8e: d103 bne.n 8010b98 stat = osErrorParameter; 8010b90: f06f 0303 mvn.w r3, #3 8010b94: 617b str r3, [r7, #20] 8010b96: e018 b.n 8010bca } else { if (rmtx != 0U) { 8010b98: 68fb ldr r3, [r7, #12] 8010b9a: 2b00 cmp r3, #0 8010b9c: d009 beq.n 8010bb2 #if (configUSE_RECURSIVE_MUTEXES == 1) if (xSemaphoreGiveRecursive (hMutex) != pdPASS) { 8010b9e: 6938 ldr r0, [r7, #16] 8010ba0: f000 fd4c bl 801163c 8010ba4: 4603 mov r3, r0 8010ba6: 2b01 cmp r3, #1 8010ba8: d00f beq.n 8010bca stat = osErrorResource; 8010baa: f06f 0302 mvn.w r3, #2 8010bae: 617b str r3, [r7, #20] 8010bb0: e00b b.n 8010bca } #endif } else { if (xSemaphoreGive (hMutex) != pdPASS) { 8010bb2: 2300 movs r3, #0 8010bb4: 2200 movs r2, #0 8010bb6: 2100 movs r1, #0 8010bb8: 6938 ldr r0, [r7, #16] 8010bba: f000 fe19 bl 80117f0 8010bbe: 4603 mov r3, r0 8010bc0: 2b01 cmp r3, #1 8010bc2: d002 beq.n 8010bca stat = osErrorResource; 8010bc4: f06f 0302 mvn.w r3, #2 8010bc8: 617b str r3, [r7, #20] } } } return (stat); 8010bca: 697b ldr r3, [r7, #20] } 8010bcc: 4618 mov r0, r3 8010bce: 3718 adds r7, #24 8010bd0: 46bd mov sp, r7 8010bd2: bd80 pop {r7, pc} 08010bd4 : } #endif /* (configUSE_OS2_MUTEX == 1) */ /*---------------------------------------------------------------------------*/ osSemaphoreId_t osSemaphoreNew (uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr) { 8010bd4: b580 push {r7, lr} 8010bd6: b08a sub sp, #40 @ 0x28 8010bd8: af02 add r7, sp, #8 8010bda: 60f8 str r0, [r7, #12] 8010bdc: 60b9 str r1, [r7, #8] 8010bde: 607a str r2, [r7, #4] int32_t mem; #if (configQUEUE_REGISTRY_SIZE > 0) const char *name; #endif hSemaphore = NULL; 8010be0: 2300 movs r3, #0 8010be2: 61fb str r3, [r7, #28] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8010be4: f3ef 8305 mrs r3, IPSR 8010be8: 613b str r3, [r7, #16] return(result); 8010bea: 693b ldr r3, [r7, #16] if (!IS_IRQ() && (max_count > 0U) && (initial_count <= max_count)) { 8010bec: 2b00 cmp r3, #0 8010bee: d175 bne.n 8010cdc 8010bf0: 68fb ldr r3, [r7, #12] 8010bf2: 2b00 cmp r3, #0 8010bf4: d072 beq.n 8010cdc 8010bf6: 68ba ldr r2, [r7, #8] 8010bf8: 68fb ldr r3, [r7, #12] 8010bfa: 429a cmp r2, r3 8010bfc: d86e bhi.n 8010cdc mem = -1; 8010bfe: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8010c02: 61bb str r3, [r7, #24] if (attr != NULL) { 8010c04: 687b ldr r3, [r7, #4] 8010c06: 2b00 cmp r3, #0 8010c08: d015 beq.n 8010c36 if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticSemaphore_t))) { 8010c0a: 687b ldr r3, [r7, #4] 8010c0c: 689b ldr r3, [r3, #8] 8010c0e: 2b00 cmp r3, #0 8010c10: d006 beq.n 8010c20 8010c12: 687b ldr r3, [r7, #4] 8010c14: 68db ldr r3, [r3, #12] 8010c16: 2b4f cmp r3, #79 @ 0x4f 8010c18: d902 bls.n 8010c20 mem = 1; 8010c1a: 2301 movs r3, #1 8010c1c: 61bb str r3, [r7, #24] 8010c1e: e00c b.n 8010c3a } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) { 8010c20: 687b ldr r3, [r7, #4] 8010c22: 689b ldr r3, [r3, #8] 8010c24: 2b00 cmp r3, #0 8010c26: d108 bne.n 8010c3a 8010c28: 687b ldr r3, [r7, #4] 8010c2a: 68db ldr r3, [r3, #12] 8010c2c: 2b00 cmp r3, #0 8010c2e: d104 bne.n 8010c3a mem = 0; 8010c30: 2300 movs r3, #0 8010c32: 61bb str r3, [r7, #24] 8010c34: e001 b.n 8010c3a } } } else { mem = 0; 8010c36: 2300 movs r3, #0 8010c38: 61bb str r3, [r7, #24] } if (mem != -1) { 8010c3a: 69bb ldr r3, [r7, #24] 8010c3c: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8010c40: d04c beq.n 8010cdc if (max_count == 1U) { 8010c42: 68fb ldr r3, [r7, #12] 8010c44: 2b01 cmp r3, #1 8010c46: d128 bne.n 8010c9a if (mem == 1) { 8010c48: 69bb ldr r3, [r7, #24] 8010c4a: 2b01 cmp r3, #1 8010c4c: d10a bne.n 8010c64 #if (configSUPPORT_STATIC_ALLOCATION == 1) hSemaphore = xSemaphoreCreateBinaryStatic ((StaticSemaphore_t *)attr->cb_mem); 8010c4e: 687b ldr r3, [r7, #4] 8010c50: 689b ldr r3, [r3, #8] 8010c52: 2203 movs r2, #3 8010c54: 9200 str r2, [sp, #0] 8010c56: 2200 movs r2, #0 8010c58: 2100 movs r1, #0 8010c5a: 2001 movs r0, #1 8010c5c: f000 fbc6 bl 80113ec 8010c60: 61f8 str r0, [r7, #28] 8010c62: e005 b.n 8010c70 #endif } else { #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) hSemaphore = xSemaphoreCreateBinary(); 8010c64: 2203 movs r2, #3 8010c66: 2100 movs r1, #0 8010c68: 2001 movs r0, #1 8010c6a: f000 fc3c bl 80114e6 8010c6e: 61f8 str r0, [r7, #28] #endif } if ((hSemaphore != NULL) && (initial_count != 0U)) { 8010c70: 69fb ldr r3, [r7, #28] 8010c72: 2b00 cmp r3, #0 8010c74: d022 beq.n 8010cbc 8010c76: 68bb ldr r3, [r7, #8] 8010c78: 2b00 cmp r3, #0 8010c7a: d01f beq.n 8010cbc if (xSemaphoreGive (hSemaphore) != pdPASS) { 8010c7c: 2300 movs r3, #0 8010c7e: 2200 movs r2, #0 8010c80: 2100 movs r1, #0 8010c82: 69f8 ldr r0, [r7, #28] 8010c84: f000 fdb4 bl 80117f0 8010c88: 4603 mov r3, r0 8010c8a: 2b01 cmp r3, #1 8010c8c: d016 beq.n 8010cbc vSemaphoreDelete (hSemaphore); 8010c8e: 69f8 ldr r0, [r7, #28] 8010c90: f001 fa90 bl 80121b4 hSemaphore = NULL; 8010c94: 2300 movs r3, #0 8010c96: 61fb str r3, [r7, #28] 8010c98: e010 b.n 8010cbc } } } else { if (mem == 1) { 8010c9a: 69bb ldr r3, [r7, #24] 8010c9c: 2b01 cmp r3, #1 8010c9e: d108 bne.n 8010cb2 #if (configSUPPORT_STATIC_ALLOCATION == 1) hSemaphore = xSemaphoreCreateCountingStatic (max_count, initial_count, (StaticSemaphore_t *)attr->cb_mem); 8010ca0: 687b ldr r3, [r7, #4] 8010ca2: 689b ldr r3, [r3, #8] 8010ca4: 461a mov r2, r3 8010ca6: 68b9 ldr r1, [r7, #8] 8010ca8: 68f8 ldr r0, [r7, #12] 8010caa: f000 fd33 bl 8011714 8010cae: 61f8 str r0, [r7, #28] 8010cb0: e004 b.n 8010cbc #endif } else { #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) hSemaphore = xSemaphoreCreateCounting (max_count, initial_count); 8010cb2: 68b9 ldr r1, [r7, #8] 8010cb4: 68f8 ldr r0, [r7, #12] 8010cb6: f000 fd66 bl 8011786 8010cba: 61f8 str r0, [r7, #28] #endif } } #if (configQUEUE_REGISTRY_SIZE > 0) if (hSemaphore != NULL) { 8010cbc: 69fb ldr r3, [r7, #28] 8010cbe: 2b00 cmp r3, #0 8010cc0: d00c beq.n 8010cdc if (attr != NULL) { 8010cc2: 687b ldr r3, [r7, #4] 8010cc4: 2b00 cmp r3, #0 8010cc6: d003 beq.n 8010cd0 name = attr->name; 8010cc8: 687b ldr r3, [r7, #4] 8010cca: 681b ldr r3, [r3, #0] 8010ccc: 617b str r3, [r7, #20] 8010cce: e001 b.n 8010cd4 } else { name = NULL; 8010cd0: 2300 movs r3, #0 8010cd2: 617b str r3, [r7, #20] } vQueueAddToRegistry (hSemaphore, name); 8010cd4: 6979 ldr r1, [r7, #20] 8010cd6: 69f8 ldr r0, [r7, #28] 8010cd8: f001 fbb8 bl 801244c } #endif } } return ((osSemaphoreId_t)hSemaphore); 8010cdc: 69fb ldr r3, [r7, #28] } 8010cde: 4618 mov r0, r3 8010ce0: 3720 adds r7, #32 8010ce2: 46bd mov sp, r7 8010ce4: bd80 pop {r7, pc} ... 08010ce8 : osStatus_t osSemaphoreAcquire (osSemaphoreId_t semaphore_id, uint32_t timeout) { 8010ce8: b580 push {r7, lr} 8010cea: b086 sub sp, #24 8010cec: af00 add r7, sp, #0 8010cee: 6078 str r0, [r7, #4] 8010cf0: 6039 str r1, [r7, #0] SemaphoreHandle_t hSemaphore = (SemaphoreHandle_t)semaphore_id; 8010cf2: 687b ldr r3, [r7, #4] 8010cf4: 613b str r3, [r7, #16] osStatus_t stat; BaseType_t yield; stat = osOK; 8010cf6: 2300 movs r3, #0 8010cf8: 617b str r3, [r7, #20] if (hSemaphore == NULL) { 8010cfa: 693b ldr r3, [r7, #16] 8010cfc: 2b00 cmp r3, #0 8010cfe: d103 bne.n 8010d08 stat = osErrorParameter; 8010d00: f06f 0303 mvn.w r3, #3 8010d04: 617b str r3, [r7, #20] 8010d06: e039 b.n 8010d7c __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8010d08: f3ef 8305 mrs r3, IPSR 8010d0c: 60fb str r3, [r7, #12] return(result); 8010d0e: 68fb ldr r3, [r7, #12] } else if (IS_IRQ()) { 8010d10: 2b00 cmp r3, #0 8010d12: d022 beq.n 8010d5a if (timeout != 0U) { 8010d14: 683b ldr r3, [r7, #0] 8010d16: 2b00 cmp r3, #0 8010d18: d003 beq.n 8010d22 stat = osErrorParameter; 8010d1a: f06f 0303 mvn.w r3, #3 8010d1e: 617b str r3, [r7, #20] 8010d20: e02c b.n 8010d7c } else { yield = pdFALSE; 8010d22: 2300 movs r3, #0 8010d24: 60bb str r3, [r7, #8] if (xSemaphoreTakeFromISR (hSemaphore, &yield) != pdPASS) { 8010d26: f107 0308 add.w r3, r7, #8 8010d2a: 461a mov r2, r3 8010d2c: 2100 movs r1, #0 8010d2e: 6938 ldr r0, [r7, #16] 8010d30: f001 f980 bl 8012034 8010d34: 4603 mov r3, r0 8010d36: 2b01 cmp r3, #1 8010d38: d003 beq.n 8010d42 stat = osErrorResource; 8010d3a: f06f 0302 mvn.w r3, #2 8010d3e: 617b str r3, [r7, #20] 8010d40: e01c b.n 8010d7c } else { portYIELD_FROM_ISR (yield); 8010d42: 68bb ldr r3, [r7, #8] 8010d44: 2b00 cmp r3, #0 8010d46: d019 beq.n 8010d7c 8010d48: 4b0f ldr r3, [pc, #60] @ (8010d88 ) 8010d4a: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8010d4e: 601a str r2, [r3, #0] 8010d50: f3bf 8f4f dsb sy 8010d54: f3bf 8f6f isb sy 8010d58: e010 b.n 8010d7c } } } else { if (xSemaphoreTake (hSemaphore, (TickType_t)timeout) != pdPASS) { 8010d5a: 6839 ldr r1, [r7, #0] 8010d5c: 6938 ldr r0, [r7, #16] 8010d5e: f001 f859 bl 8011e14 8010d62: 4603 mov r3, r0 8010d64: 2b01 cmp r3, #1 8010d66: d009 beq.n 8010d7c if (timeout != 0U) { 8010d68: 683b ldr r3, [r7, #0] 8010d6a: 2b00 cmp r3, #0 8010d6c: d003 beq.n 8010d76 stat = osErrorTimeout; 8010d6e: f06f 0301 mvn.w r3, #1 8010d72: 617b str r3, [r7, #20] 8010d74: e002 b.n 8010d7c } else { stat = osErrorResource; 8010d76: f06f 0302 mvn.w r3, #2 8010d7a: 617b str r3, [r7, #20] } } } return (stat); 8010d7c: 697b ldr r3, [r7, #20] } 8010d7e: 4618 mov r0, r3 8010d80: 3718 adds r7, #24 8010d82: 46bd mov sp, r7 8010d84: bd80 pop {r7, pc} 8010d86: bf00 nop 8010d88: e000ed04 .word 0xe000ed04 08010d8c : osStatus_t osSemaphoreRelease (osSemaphoreId_t semaphore_id) { 8010d8c: b580 push {r7, lr} 8010d8e: b086 sub sp, #24 8010d90: af00 add r7, sp, #0 8010d92: 6078 str r0, [r7, #4] SemaphoreHandle_t hSemaphore = (SemaphoreHandle_t)semaphore_id; 8010d94: 687b ldr r3, [r7, #4] 8010d96: 613b str r3, [r7, #16] osStatus_t stat; BaseType_t yield; stat = osOK; 8010d98: 2300 movs r3, #0 8010d9a: 617b str r3, [r7, #20] if (hSemaphore == NULL) { 8010d9c: 693b ldr r3, [r7, #16] 8010d9e: 2b00 cmp r3, #0 8010da0: d103 bne.n 8010daa stat = osErrorParameter; 8010da2: f06f 0303 mvn.w r3, #3 8010da6: 617b str r3, [r7, #20] 8010da8: e02c b.n 8010e04 __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8010daa: f3ef 8305 mrs r3, IPSR 8010dae: 60fb str r3, [r7, #12] return(result); 8010db0: 68fb ldr r3, [r7, #12] } else if (IS_IRQ()) { 8010db2: 2b00 cmp r3, #0 8010db4: d01a beq.n 8010dec yield = pdFALSE; 8010db6: 2300 movs r3, #0 8010db8: 60bb str r3, [r7, #8] if (xSemaphoreGiveFromISR (hSemaphore, &yield) != pdTRUE) { 8010dba: f107 0308 add.w r3, r7, #8 8010dbe: 4619 mov r1, r3 8010dc0: 6938 ldr r0, [r7, #16] 8010dc2: f000 feb5 bl 8011b30 8010dc6: 4603 mov r3, r0 8010dc8: 2b01 cmp r3, #1 8010dca: d003 beq.n 8010dd4 stat = osErrorResource; 8010dcc: f06f 0302 mvn.w r3, #2 8010dd0: 617b str r3, [r7, #20] 8010dd2: e017 b.n 8010e04 } else { portYIELD_FROM_ISR (yield); 8010dd4: 68bb ldr r3, [r7, #8] 8010dd6: 2b00 cmp r3, #0 8010dd8: d014 beq.n 8010e04 8010dda: 4b0d ldr r3, [pc, #52] @ (8010e10 ) 8010ddc: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8010de0: 601a str r2, [r3, #0] 8010de2: f3bf 8f4f dsb sy 8010de6: f3bf 8f6f isb sy 8010dea: e00b b.n 8010e04 } } else { if (xSemaphoreGive (hSemaphore) != pdPASS) { 8010dec: 2300 movs r3, #0 8010dee: 2200 movs r2, #0 8010df0: 2100 movs r1, #0 8010df2: 6938 ldr r0, [r7, #16] 8010df4: f000 fcfc bl 80117f0 8010df8: 4603 mov r3, r0 8010dfa: 2b01 cmp r3, #1 8010dfc: d002 beq.n 8010e04 stat = osErrorResource; 8010dfe: f06f 0302 mvn.w r3, #2 8010e02: 617b str r3, [r7, #20] } } return (stat); 8010e04: 697b ldr r3, [r7, #20] } 8010e06: 4618 mov r0, r3 8010e08: 3718 adds r7, #24 8010e0a: 46bd mov sp, r7 8010e0c: bd80 pop {r7, pc} 8010e0e: bf00 nop 8010e10: e000ed04 .word 0xe000ed04 08010e14 : } return (count); } osStatus_t osSemaphoreDelete (osSemaphoreId_t semaphore_id) { 8010e14: b580 push {r7, lr} 8010e16: b086 sub sp, #24 8010e18: af00 add r7, sp, #0 8010e1a: 6078 str r0, [r7, #4] SemaphoreHandle_t hSemaphore = (SemaphoreHandle_t)semaphore_id; 8010e1c: 687b ldr r3, [r7, #4] 8010e1e: 613b str r3, [r7, #16] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8010e20: f3ef 8305 mrs r3, IPSR 8010e24: 60fb str r3, [r7, #12] return(result); 8010e26: 68fb ldr r3, [r7, #12] osStatus_t stat; #ifndef USE_FreeRTOS_HEAP_1 if (IS_IRQ()) { 8010e28: 2b00 cmp r3, #0 8010e2a: d003 beq.n 8010e34 stat = osErrorISR; 8010e2c: f06f 0305 mvn.w r3, #5 8010e30: 617b str r3, [r7, #20] 8010e32: e00e b.n 8010e52 } else if (hSemaphore == NULL) { 8010e34: 693b ldr r3, [r7, #16] 8010e36: 2b00 cmp r3, #0 8010e38: d103 bne.n 8010e42 stat = osErrorParameter; 8010e3a: f06f 0303 mvn.w r3, #3 8010e3e: 617b str r3, [r7, #20] 8010e40: e007 b.n 8010e52 } else { #if (configQUEUE_REGISTRY_SIZE > 0) vQueueUnregisterQueue (hSemaphore); 8010e42: 6938 ldr r0, [r7, #16] 8010e44: f001 fb2c bl 80124a0 #endif stat = osOK; 8010e48: 2300 movs r3, #0 8010e4a: 617b str r3, [r7, #20] vSemaphoreDelete (hSemaphore); 8010e4c: 6938 ldr r0, [r7, #16] 8010e4e: f001 f9b1 bl 80121b4 } #else stat = osError; #endif return (stat); 8010e52: 697b ldr r3, [r7, #20] } 8010e54: 4618 mov r0, r3 8010e56: 3718 adds r7, #24 8010e58: 46bd mov sp, r7 8010e5a: bd80 pop {r7, pc} 08010e5c : /*---------------------------------------------------------------------------*/ osMessageQueueId_t osMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr) { 8010e5c: b580 push {r7, lr} 8010e5e: b08a sub sp, #40 @ 0x28 8010e60: af02 add r7, sp, #8 8010e62: 60f8 str r0, [r7, #12] 8010e64: 60b9 str r1, [r7, #8] 8010e66: 607a str r2, [r7, #4] int32_t mem; #if (configQUEUE_REGISTRY_SIZE > 0) const char *name; #endif hQueue = NULL; 8010e68: 2300 movs r3, #0 8010e6a: 61fb str r3, [r7, #28] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8010e6c: f3ef 8305 mrs r3, IPSR 8010e70: 613b str r3, [r7, #16] return(result); 8010e72: 693b ldr r3, [r7, #16] if (!IS_IRQ() && (msg_count > 0U) && (msg_size > 0U)) { 8010e74: 2b00 cmp r3, #0 8010e76: d15f bne.n 8010f38 8010e78: 68fb ldr r3, [r7, #12] 8010e7a: 2b00 cmp r3, #0 8010e7c: d05c beq.n 8010f38 8010e7e: 68bb ldr r3, [r7, #8] 8010e80: 2b00 cmp r3, #0 8010e82: d059 beq.n 8010f38 mem = -1; 8010e84: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8010e88: 61bb str r3, [r7, #24] if (attr != NULL) { 8010e8a: 687b ldr r3, [r7, #4] 8010e8c: 2b00 cmp r3, #0 8010e8e: d029 beq.n 8010ee4 if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticQueue_t)) && 8010e90: 687b ldr r3, [r7, #4] 8010e92: 689b ldr r3, [r3, #8] 8010e94: 2b00 cmp r3, #0 8010e96: d012 beq.n 8010ebe 8010e98: 687b ldr r3, [r7, #4] 8010e9a: 68db ldr r3, [r3, #12] 8010e9c: 2b4f cmp r3, #79 @ 0x4f 8010e9e: d90e bls.n 8010ebe (attr->mq_mem != NULL) && (attr->mq_size >= (msg_count * msg_size))) { 8010ea0: 687b ldr r3, [r7, #4] 8010ea2: 691b ldr r3, [r3, #16] if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticQueue_t)) && 8010ea4: 2b00 cmp r3, #0 8010ea6: d00a beq.n 8010ebe (attr->mq_mem != NULL) && (attr->mq_size >= (msg_count * msg_size))) { 8010ea8: 687b ldr r3, [r7, #4] 8010eaa: 695a ldr r2, [r3, #20] 8010eac: 68fb ldr r3, [r7, #12] 8010eae: 68b9 ldr r1, [r7, #8] 8010eb0: fb01 f303 mul.w r3, r1, r3 8010eb4: 429a cmp r2, r3 8010eb6: d302 bcc.n 8010ebe mem = 1; 8010eb8: 2301 movs r3, #1 8010eba: 61bb str r3, [r7, #24] 8010ebc: e014 b.n 8010ee8 } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && 8010ebe: 687b ldr r3, [r7, #4] 8010ec0: 689b ldr r3, [r3, #8] 8010ec2: 2b00 cmp r3, #0 8010ec4: d110 bne.n 8010ee8 8010ec6: 687b ldr r3, [r7, #4] 8010ec8: 68db ldr r3, [r3, #12] 8010eca: 2b00 cmp r3, #0 8010ecc: d10c bne.n 8010ee8 (attr->mq_mem == NULL) && (attr->mq_size == 0U)) { 8010ece: 687b ldr r3, [r7, #4] 8010ed0: 691b ldr r3, [r3, #16] if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && 8010ed2: 2b00 cmp r3, #0 8010ed4: d108 bne.n 8010ee8 (attr->mq_mem == NULL) && (attr->mq_size == 0U)) { 8010ed6: 687b ldr r3, [r7, #4] 8010ed8: 695b ldr r3, [r3, #20] 8010eda: 2b00 cmp r3, #0 8010edc: d104 bne.n 8010ee8 mem = 0; 8010ede: 2300 movs r3, #0 8010ee0: 61bb str r3, [r7, #24] 8010ee2: e001 b.n 8010ee8 } } } else { mem = 0; 8010ee4: 2300 movs r3, #0 8010ee6: 61bb str r3, [r7, #24] } if (mem == 1) { 8010ee8: 69bb ldr r3, [r7, #24] 8010eea: 2b01 cmp r3, #1 8010eec: d10b bne.n 8010f06 #if (configSUPPORT_STATIC_ALLOCATION == 1) hQueue = xQueueCreateStatic (msg_count, msg_size, attr->mq_mem, attr->cb_mem); 8010eee: 687b ldr r3, [r7, #4] 8010ef0: 691a ldr r2, [r3, #16] 8010ef2: 687b ldr r3, [r7, #4] 8010ef4: 689b ldr r3, [r3, #8] 8010ef6: 2100 movs r1, #0 8010ef8: 9100 str r1, [sp, #0] 8010efa: 68b9 ldr r1, [r7, #8] 8010efc: 68f8 ldr r0, [r7, #12] 8010efe: f000 fa75 bl 80113ec 8010f02: 61f8 str r0, [r7, #28] 8010f04: e008 b.n 8010f18 #endif } else { if (mem == 0) { 8010f06: 69bb ldr r3, [r7, #24] 8010f08: 2b00 cmp r3, #0 8010f0a: d105 bne.n 8010f18 #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) hQueue = xQueueCreate (msg_count, msg_size); 8010f0c: 2200 movs r2, #0 8010f0e: 68b9 ldr r1, [r7, #8] 8010f10: 68f8 ldr r0, [r7, #12] 8010f12: f000 fae8 bl 80114e6 8010f16: 61f8 str r0, [r7, #28] #endif } } #if (configQUEUE_REGISTRY_SIZE > 0) if (hQueue != NULL) { 8010f18: 69fb ldr r3, [r7, #28] 8010f1a: 2b00 cmp r3, #0 8010f1c: d00c beq.n 8010f38 if (attr != NULL) { 8010f1e: 687b ldr r3, [r7, #4] 8010f20: 2b00 cmp r3, #0 8010f22: d003 beq.n 8010f2c name = attr->name; 8010f24: 687b ldr r3, [r7, #4] 8010f26: 681b ldr r3, [r3, #0] 8010f28: 617b str r3, [r7, #20] 8010f2a: e001 b.n 8010f30 } else { name = NULL; 8010f2c: 2300 movs r3, #0 8010f2e: 617b str r3, [r7, #20] } vQueueAddToRegistry (hQueue, name); 8010f30: 6979 ldr r1, [r7, #20] 8010f32: 69f8 ldr r0, [r7, #28] 8010f34: f001 fa8a bl 801244c } #endif } return ((osMessageQueueId_t)hQueue); 8010f38: 69fb ldr r3, [r7, #28] } 8010f3a: 4618 mov r0, r3 8010f3c: 3720 adds r7, #32 8010f3e: 46bd mov sp, r7 8010f40: bd80 pop {r7, pc} ... 08010f44 : osStatus_t osMessageQueuePut (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout) { 8010f44: b580 push {r7, lr} 8010f46: b088 sub sp, #32 8010f48: af00 add r7, sp, #0 8010f4a: 60f8 str r0, [r7, #12] 8010f4c: 60b9 str r1, [r7, #8] 8010f4e: 603b str r3, [r7, #0] 8010f50: 4613 mov r3, r2 8010f52: 71fb strb r3, [r7, #7] QueueHandle_t hQueue = (QueueHandle_t)mq_id; 8010f54: 68fb ldr r3, [r7, #12] 8010f56: 61bb str r3, [r7, #24] osStatus_t stat; BaseType_t yield; (void)msg_prio; /* Message priority is ignored */ stat = osOK; 8010f58: 2300 movs r3, #0 8010f5a: 61fb str r3, [r7, #28] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8010f5c: f3ef 8305 mrs r3, IPSR 8010f60: 617b str r3, [r7, #20] return(result); 8010f62: 697b ldr r3, [r7, #20] if (IS_IRQ()) { 8010f64: 2b00 cmp r3, #0 8010f66: d028 beq.n 8010fba if ((hQueue == NULL) || (msg_ptr == NULL) || (timeout != 0U)) { 8010f68: 69bb ldr r3, [r7, #24] 8010f6a: 2b00 cmp r3, #0 8010f6c: d005 beq.n 8010f7a 8010f6e: 68bb ldr r3, [r7, #8] 8010f70: 2b00 cmp r3, #0 8010f72: d002 beq.n 8010f7a 8010f74: 683b ldr r3, [r7, #0] 8010f76: 2b00 cmp r3, #0 8010f78: d003 beq.n 8010f82 stat = osErrorParameter; 8010f7a: f06f 0303 mvn.w r3, #3 8010f7e: 61fb str r3, [r7, #28] 8010f80: e038 b.n 8010ff4 } else { yield = pdFALSE; 8010f82: 2300 movs r3, #0 8010f84: 613b str r3, [r7, #16] if (xQueueSendToBackFromISR (hQueue, msg_ptr, &yield) != pdTRUE) { 8010f86: f107 0210 add.w r2, r7, #16 8010f8a: 2300 movs r3, #0 8010f8c: 68b9 ldr r1, [r7, #8] 8010f8e: 69b8 ldr r0, [r7, #24] 8010f90: f000 fd30 bl 80119f4 8010f94: 4603 mov r3, r0 8010f96: 2b01 cmp r3, #1 8010f98: d003 beq.n 8010fa2 stat = osErrorResource; 8010f9a: f06f 0302 mvn.w r3, #2 8010f9e: 61fb str r3, [r7, #28] 8010fa0: e028 b.n 8010ff4 } else { portYIELD_FROM_ISR (yield); 8010fa2: 693b ldr r3, [r7, #16] 8010fa4: 2b00 cmp r3, #0 8010fa6: d025 beq.n 8010ff4 8010fa8: 4b15 ldr r3, [pc, #84] @ (8011000 ) 8010faa: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8010fae: 601a str r2, [r3, #0] 8010fb0: f3bf 8f4f dsb sy 8010fb4: f3bf 8f6f isb sy 8010fb8: e01c b.n 8010ff4 } } } else { if ((hQueue == NULL) || (msg_ptr == NULL)) { 8010fba: 69bb ldr r3, [r7, #24] 8010fbc: 2b00 cmp r3, #0 8010fbe: d002 beq.n 8010fc6 8010fc0: 68bb ldr r3, [r7, #8] 8010fc2: 2b00 cmp r3, #0 8010fc4: d103 bne.n 8010fce stat = osErrorParameter; 8010fc6: f06f 0303 mvn.w r3, #3 8010fca: 61fb str r3, [r7, #28] 8010fcc: e012 b.n 8010ff4 } else { if (xQueueSendToBack (hQueue, msg_ptr, (TickType_t)timeout) != pdPASS) { 8010fce: 2300 movs r3, #0 8010fd0: 683a ldr r2, [r7, #0] 8010fd2: 68b9 ldr r1, [r7, #8] 8010fd4: 69b8 ldr r0, [r7, #24] 8010fd6: f000 fc0b bl 80117f0 8010fda: 4603 mov r3, r0 8010fdc: 2b01 cmp r3, #1 8010fde: d009 beq.n 8010ff4 if (timeout != 0U) { 8010fe0: 683b ldr r3, [r7, #0] 8010fe2: 2b00 cmp r3, #0 8010fe4: d003 beq.n 8010fee stat = osErrorTimeout; 8010fe6: f06f 0301 mvn.w r3, #1 8010fea: 61fb str r3, [r7, #28] 8010fec: e002 b.n 8010ff4 } else { stat = osErrorResource; 8010fee: f06f 0302 mvn.w r3, #2 8010ff2: 61fb str r3, [r7, #28] } } } } return (stat); 8010ff4: 69fb ldr r3, [r7, #28] } 8010ff6: 4618 mov r0, r3 8010ff8: 3720 adds r7, #32 8010ffa: 46bd mov sp, r7 8010ffc: bd80 pop {r7, pc} 8010ffe: bf00 nop 8011000: e000ed04 .word 0xe000ed04 08011004 : osStatus_t osMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout) { 8011004: b580 push {r7, lr} 8011006: b088 sub sp, #32 8011008: af00 add r7, sp, #0 801100a: 60f8 str r0, [r7, #12] 801100c: 60b9 str r1, [r7, #8] 801100e: 607a str r2, [r7, #4] 8011010: 603b str r3, [r7, #0] QueueHandle_t hQueue = (QueueHandle_t)mq_id; 8011012: 68fb ldr r3, [r7, #12] 8011014: 61bb str r3, [r7, #24] osStatus_t stat; BaseType_t yield; (void)msg_prio; /* Message priority is ignored */ stat = osOK; 8011016: 2300 movs r3, #0 8011018: 61fb str r3, [r7, #28] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 801101a: f3ef 8305 mrs r3, IPSR 801101e: 617b str r3, [r7, #20] return(result); 8011020: 697b ldr r3, [r7, #20] if (IS_IRQ()) { 8011022: 2b00 cmp r3, #0 8011024: d028 beq.n 8011078 if ((hQueue == NULL) || (msg_ptr == NULL) || (timeout != 0U)) { 8011026: 69bb ldr r3, [r7, #24] 8011028: 2b00 cmp r3, #0 801102a: d005 beq.n 8011038 801102c: 68bb ldr r3, [r7, #8] 801102e: 2b00 cmp r3, #0 8011030: d002 beq.n 8011038 8011032: 683b ldr r3, [r7, #0] 8011034: 2b00 cmp r3, #0 8011036: d003 beq.n 8011040 stat = osErrorParameter; 8011038: f06f 0303 mvn.w r3, #3 801103c: 61fb str r3, [r7, #28] 801103e: e037 b.n 80110b0 } else { yield = pdFALSE; 8011040: 2300 movs r3, #0 8011042: 613b str r3, [r7, #16] if (xQueueReceiveFromISR (hQueue, msg_ptr, &yield) != pdPASS) { 8011044: f107 0310 add.w r3, r7, #16 8011048: 461a mov r2, r3 801104a: 68b9 ldr r1, [r7, #8] 801104c: 69b8 ldr r0, [r7, #24] 801104e: f000 fff1 bl 8012034 8011052: 4603 mov r3, r0 8011054: 2b01 cmp r3, #1 8011056: d003 beq.n 8011060 stat = osErrorResource; 8011058: f06f 0302 mvn.w r3, #2 801105c: 61fb str r3, [r7, #28] 801105e: e027 b.n 80110b0 } else { portYIELD_FROM_ISR (yield); 8011060: 693b ldr r3, [r7, #16] 8011062: 2b00 cmp r3, #0 8011064: d024 beq.n 80110b0 8011066: 4b15 ldr r3, [pc, #84] @ (80110bc ) 8011068: f04f 5280 mov.w r2, #268435456 @ 0x10000000 801106c: 601a str r2, [r3, #0] 801106e: f3bf 8f4f dsb sy 8011072: f3bf 8f6f isb sy 8011076: e01b b.n 80110b0 } } } else { if ((hQueue == NULL) || (msg_ptr == NULL)) { 8011078: 69bb ldr r3, [r7, #24] 801107a: 2b00 cmp r3, #0 801107c: d002 beq.n 8011084 801107e: 68bb ldr r3, [r7, #8] 8011080: 2b00 cmp r3, #0 8011082: d103 bne.n 801108c stat = osErrorParameter; 8011084: f06f 0303 mvn.w r3, #3 8011088: 61fb str r3, [r7, #28] 801108a: e011 b.n 80110b0 } else { if (xQueueReceive (hQueue, msg_ptr, (TickType_t)timeout) != pdPASS) { 801108c: 683a ldr r2, [r7, #0] 801108e: 68b9 ldr r1, [r7, #8] 8011090: 69b8 ldr r0, [r7, #24] 8011092: f000 fddd bl 8011c50 8011096: 4603 mov r3, r0 8011098: 2b01 cmp r3, #1 801109a: d009 beq.n 80110b0 if (timeout != 0U) { 801109c: 683b ldr r3, [r7, #0] 801109e: 2b00 cmp r3, #0 80110a0: d003 beq.n 80110aa stat = osErrorTimeout; 80110a2: f06f 0301 mvn.w r3, #1 80110a6: 61fb str r3, [r7, #28] 80110a8: e002 b.n 80110b0 } else { stat = osErrorResource; 80110aa: f06f 0302 mvn.w r3, #2 80110ae: 61fb str r3, [r7, #28] } } } } return (stat); 80110b0: 69fb ldr r3, [r7, #28] } 80110b2: 4618 mov r0, r3 80110b4: 3720 adds r7, #32 80110b6: 46bd mov sp, r7 80110b8: bd80 pop {r7, pc} 80110ba: bf00 nop 80110bc: e000ed04 .word 0xe000ed04 080110c0 : } return (size); } uint32_t osMessageQueueGetCount (osMessageQueueId_t mq_id) { 80110c0: b580 push {r7, lr} 80110c2: b086 sub sp, #24 80110c4: af00 add r7, sp, #0 80110c6: 6078 str r0, [r7, #4] QueueHandle_t hQueue = (QueueHandle_t)mq_id; 80110c8: 687b ldr r3, [r7, #4] 80110ca: 613b str r3, [r7, #16] UBaseType_t count; if (hQueue == NULL) { 80110cc: 693b ldr r3, [r7, #16] 80110ce: 2b00 cmp r3, #0 80110d0: d102 bne.n 80110d8 count = 0U; 80110d2: 2300 movs r3, #0 80110d4: 617b str r3, [r7, #20] 80110d6: e00e b.n 80110f6 __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 80110d8: f3ef 8305 mrs r3, IPSR 80110dc: 60fb str r3, [r7, #12] return(result); 80110de: 68fb ldr r3, [r7, #12] } else if (IS_IRQ()) { 80110e0: 2b00 cmp r3, #0 80110e2: d004 beq.n 80110ee count = uxQueueMessagesWaitingFromISR (hQueue); 80110e4: 6938 ldr r0, [r7, #16] 80110e6: f001 f846 bl 8012176 80110ea: 6178 str r0, [r7, #20] 80110ec: e003 b.n 80110f6 } else { count = uxQueueMessagesWaiting (hQueue); 80110ee: 6938 ldr r0, [r7, #16] 80110f0: f001 f822 bl 8012138 80110f4: 6178 str r0, [r7, #20] } return ((uint32_t)count); 80110f6: 697b ldr r3, [r7, #20] } 80110f8: 4618 mov r0, r3 80110fa: 3718 adds r7, #24 80110fc: 46bd mov sp, r7 80110fe: bd80 pop {r7, pc} 08011100 : } return (stat); } osStatus_t osMessageQueueDelete (osMessageQueueId_t mq_id) { 8011100: b580 push {r7, lr} 8011102: b086 sub sp, #24 8011104: af00 add r7, sp, #0 8011106: 6078 str r0, [r7, #4] QueueHandle_t hQueue = (QueueHandle_t)mq_id; 8011108: 687b ldr r3, [r7, #4] 801110a: 613b str r3, [r7, #16] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 801110c: f3ef 8305 mrs r3, IPSR 8011110: 60fb str r3, [r7, #12] return(result); 8011112: 68fb ldr r3, [r7, #12] osStatus_t stat; #ifndef USE_FreeRTOS_HEAP_1 if (IS_IRQ()) { 8011114: 2b00 cmp r3, #0 8011116: d003 beq.n 8011120 stat = osErrorISR; 8011118: f06f 0305 mvn.w r3, #5 801111c: 617b str r3, [r7, #20] 801111e: e00e b.n 801113e } else if (hQueue == NULL) { 8011120: 693b ldr r3, [r7, #16] 8011122: 2b00 cmp r3, #0 8011124: d103 bne.n 801112e stat = osErrorParameter; 8011126: f06f 0303 mvn.w r3, #3 801112a: 617b str r3, [r7, #20] 801112c: e007 b.n 801113e } else { #if (configQUEUE_REGISTRY_SIZE > 0) vQueueUnregisterQueue (hQueue); 801112e: 6938 ldr r0, [r7, #16] 8011130: f001 f9b6 bl 80124a0 #endif stat = osOK; 8011134: 2300 movs r3, #0 8011136: 617b str r3, [r7, #20] vQueueDelete (hQueue); 8011138: 6938 ldr r0, [r7, #16] 801113a: f001 f83b bl 80121b4 } #else stat = osError; #endif return (stat); 801113e: 697b ldr r3, [r7, #20] } 8011140: 4618 mov r0, r3 8011142: 3718 adds r7, #24 8011144: 46bd mov sp, r7 8011146: bd80 pop {r7, pc} 08011148 : /* 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) { 8011148: b480 push {r7} 801114a: b085 sub sp, #20 801114c: af00 add r7, sp, #0 801114e: 60f8 str r0, [r7, #12] 8011150: 60b9 str r1, [r7, #8] 8011152: 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; 8011154: 68fb ldr r3, [r7, #12] 8011156: 4a07 ldr r2, [pc, #28] @ (8011174 ) 8011158: 601a str r2, [r3, #0] *ppxIdleTaskStackBuffer = &Idle_Stack[0]; 801115a: 68bb ldr r3, [r7, #8] 801115c: 4a06 ldr r2, [pc, #24] @ (8011178 ) 801115e: 601a str r2, [r3, #0] *pulIdleTaskStackSize = (uint32_t)configMINIMAL_STACK_SIZE; 8011160: 687b ldr r3, [r7, #4] 8011162: f44f 7200 mov.w r2, #512 @ 0x200 8011166: 601a str r2, [r3, #0] } 8011168: bf00 nop 801116a: 3714 adds r7, #20 801116c: 46bd mov sp, r7 801116e: f85d 7b04 ldr.w r7, [sp], #4 8011172: 4770 bx lr 8011174: 24002300 .word 0x24002300 8011178: 240023a8 .word 0x240023a8 0801117c : /* 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) { 801117c: b480 push {r7} 801117e: b085 sub sp, #20 8011180: af00 add r7, sp, #0 8011182: 60f8 str r0, [r7, #12] 8011184: 60b9 str r1, [r7, #8] 8011186: 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; 8011188: 68fb ldr r3, [r7, #12] 801118a: 4a07 ldr r2, [pc, #28] @ (80111a8 ) 801118c: 601a str r2, [r3, #0] *ppxTimerTaskStackBuffer = &Timer_Stack[0]; 801118e: 68bb ldr r3, [r7, #8] 8011190: 4a06 ldr r2, [pc, #24] @ (80111ac ) 8011192: 601a str r2, [r3, #0] *pulTimerTaskStackSize = (uint32_t)configTIMER_TASK_STACK_DEPTH; 8011194: 687b ldr r3, [r7, #4] 8011196: f44f 6280 mov.w r2, #1024 @ 0x400 801119a: 601a str r2, [r3, #0] } 801119c: bf00 nop 801119e: 3714 adds r7, #20 80111a0: 46bd mov sp, r7 80111a2: f85d 7b04 ldr.w r7, [sp], #4 80111a6: 4770 bx lr 80111a8: 24002ba8 .word 0x24002ba8 80111ac: 24002c50 .word 0x24002c50 080111b0 : /*----------------------------------------------------------- * PUBLIC LIST API documented in list.h *----------------------------------------------------------*/ void vListInitialise( List_t * const pxList ) { 80111b0: b480 push {r7} 80111b2: b083 sub sp, #12 80111b4: af00 add r7, sp, #0 80111b6: 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. */ 80111b8: 687b ldr r3, [r7, #4] 80111ba: f103 0208 add.w r2, r3, #8 80111be: 687b ldr r3, [r7, #4] 80111c0: 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; 80111c2: 687b ldr r3, [r7, #4] 80111c4: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 80111c8: 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. */ 80111ca: 687b ldr r3, [r7, #4] 80111cc: f103 0208 add.w r2, r3, #8 80111d0: 687b ldr r3, [r7, #4] 80111d2: 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. */ 80111d4: 687b ldr r3, [r7, #4] 80111d6: f103 0208 add.w r2, r3, #8 80111da: 687b ldr r3, [r7, #4] 80111dc: 611a str r2, [r3, #16] pxList->uxNumberOfItems = ( UBaseType_t ) 0U; 80111de: 687b ldr r3, [r7, #4] 80111e0: 2200 movs r2, #0 80111e2: 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 ); } 80111e4: bf00 nop 80111e6: 370c adds r7, #12 80111e8: 46bd mov sp, r7 80111ea: f85d 7b04 ldr.w r7, [sp], #4 80111ee: 4770 bx lr 080111f0 : /*-----------------------------------------------------------*/ void vListInitialiseItem( ListItem_t * const pxItem ) { 80111f0: b480 push {r7} 80111f2: b083 sub sp, #12 80111f4: af00 add r7, sp, #0 80111f6: 6078 str r0, [r7, #4] /* Make sure the list item is not recorded as being on a list. */ pxItem->pxContainer = NULL; 80111f8: 687b ldr r3, [r7, #4] 80111fa: 2200 movs r2, #0 80111fc: 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 ); } 80111fe: bf00 nop 8011200: 370c adds r7, #12 8011202: 46bd mov sp, r7 8011204: f85d 7b04 ldr.w r7, [sp], #4 8011208: 4770 bx lr 0801120a : /*-----------------------------------------------------------*/ void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) { 801120a: b480 push {r7} 801120c: b085 sub sp, #20 801120e: af00 add r7, sp, #0 8011210: 6078 str r0, [r7, #4] 8011212: 6039 str r1, [r7, #0] ListItem_t * const pxIndex = pxList->pxIndex; 8011214: 687b ldr r3, [r7, #4] 8011216: 685b ldr r3, [r3, #4] 8011218: 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; 801121a: 683b ldr r3, [r7, #0] 801121c: 68fa ldr r2, [r7, #12] 801121e: 605a str r2, [r3, #4] pxNewListItem->pxPrevious = pxIndex->pxPrevious; 8011220: 68fb ldr r3, [r7, #12] 8011222: 689a ldr r2, [r3, #8] 8011224: 683b ldr r3, [r7, #0] 8011226: 609a str r2, [r3, #8] /* Only used during decision coverage testing. */ mtCOVERAGE_TEST_DELAY(); pxIndex->pxPrevious->pxNext = pxNewListItem; 8011228: 68fb ldr r3, [r7, #12] 801122a: 689b ldr r3, [r3, #8] 801122c: 683a ldr r2, [r7, #0] 801122e: 605a str r2, [r3, #4] pxIndex->pxPrevious = pxNewListItem; 8011230: 68fb ldr r3, [r7, #12] 8011232: 683a ldr r2, [r7, #0] 8011234: 609a str r2, [r3, #8] /* Remember which list the item is in. */ pxNewListItem->pxContainer = pxList; 8011236: 683b ldr r3, [r7, #0] 8011238: 687a ldr r2, [r7, #4] 801123a: 611a str r2, [r3, #16] ( pxList->uxNumberOfItems )++; 801123c: 687b ldr r3, [r7, #4] 801123e: 681b ldr r3, [r3, #0] 8011240: 1c5a adds r2, r3, #1 8011242: 687b ldr r3, [r7, #4] 8011244: 601a str r2, [r3, #0] } 8011246: bf00 nop 8011248: 3714 adds r7, #20 801124a: 46bd mov sp, r7 801124c: f85d 7b04 ldr.w r7, [sp], #4 8011250: 4770 bx lr 08011252 : /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { 8011252: b480 push {r7} 8011254: b085 sub sp, #20 8011256: af00 add r7, sp, #0 8011258: 6078 str r0, [r7, #4] 801125a: 6039 str r1, [r7, #0] ListItem_t *pxIterator; const TickType_t xValueOfInsertion = pxNewListItem->xItemValue; 801125c: 683b ldr r3, [r7, #0] 801125e: 681b ldr r3, [r3, #0] 8011260: 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 ) 8011262: 68bb ldr r3, [r7, #8] 8011264: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8011268: d103 bne.n 8011272 { pxIterator = pxList->xListEnd.pxPrevious; 801126a: 687b ldr r3, [r7, #4] 801126c: 691b ldr r3, [r3, #16] 801126e: 60fb str r3, [r7, #12] 8011270: e00c b.n 801128c 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. */ 8011272: 687b ldr r3, [r7, #4] 8011274: 3308 adds r3, #8 8011276: 60fb str r3, [r7, #12] 8011278: e002 b.n 8011280 801127a: 68fb ldr r3, [r7, #12] 801127c: 685b ldr r3, [r3, #4] 801127e: 60fb str r3, [r7, #12] 8011280: 68fb ldr r3, [r7, #12] 8011282: 685b ldr r3, [r3, #4] 8011284: 681b ldr r3, [r3, #0] 8011286: 68ba ldr r2, [r7, #8] 8011288: 429a cmp r2, r3 801128a: d2f6 bcs.n 801127a /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 801128c: 68fb ldr r3, [r7, #12] 801128e: 685a ldr r2, [r3, #4] 8011290: 683b ldr r3, [r7, #0] 8011292: 605a str r2, [r3, #4] pxNewListItem->pxNext->pxPrevious = pxNewListItem; 8011294: 683b ldr r3, [r7, #0] 8011296: 685b ldr r3, [r3, #4] 8011298: 683a ldr r2, [r7, #0] 801129a: 609a str r2, [r3, #8] pxNewListItem->pxPrevious = pxIterator; 801129c: 683b ldr r3, [r7, #0] 801129e: 68fa ldr r2, [r7, #12] 80112a0: 609a str r2, [r3, #8] pxIterator->pxNext = pxNewListItem; 80112a2: 68fb ldr r3, [r7, #12] 80112a4: 683a ldr r2, [r7, #0] 80112a6: 605a str r2, [r3, #4] /* Remember which list the item is in. This allows fast removal of the item later. */ pxNewListItem->pxContainer = pxList; 80112a8: 683b ldr r3, [r7, #0] 80112aa: 687a ldr r2, [r7, #4] 80112ac: 611a str r2, [r3, #16] ( pxList->uxNumberOfItems )++; 80112ae: 687b ldr r3, [r7, #4] 80112b0: 681b ldr r3, [r3, #0] 80112b2: 1c5a adds r2, r3, #1 80112b4: 687b ldr r3, [r7, #4] 80112b6: 601a str r2, [r3, #0] } 80112b8: bf00 nop 80112ba: 3714 adds r7, #20 80112bc: 46bd mov sp, r7 80112be: f85d 7b04 ldr.w r7, [sp], #4 80112c2: 4770 bx lr 080112c4 : /*-----------------------------------------------------------*/ UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove ) { 80112c4: b480 push {r7} 80112c6: b085 sub sp, #20 80112c8: af00 add r7, sp, #0 80112ca: 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; 80112cc: 687b ldr r3, [r7, #4] 80112ce: 691b ldr r3, [r3, #16] 80112d0: 60fb str r3, [r7, #12] pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious; 80112d2: 687b ldr r3, [r7, #4] 80112d4: 685b ldr r3, [r3, #4] 80112d6: 687a ldr r2, [r7, #4] 80112d8: 6892 ldr r2, [r2, #8] 80112da: 609a str r2, [r3, #8] pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext; 80112dc: 687b ldr r3, [r7, #4] 80112de: 689b ldr r3, [r3, #8] 80112e0: 687a ldr r2, [r7, #4] 80112e2: 6852 ldr r2, [r2, #4] 80112e4: 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 ) 80112e6: 68fb ldr r3, [r7, #12] 80112e8: 685b ldr r3, [r3, #4] 80112ea: 687a ldr r2, [r7, #4] 80112ec: 429a cmp r2, r3 80112ee: d103 bne.n 80112f8 { pxList->pxIndex = pxItemToRemove->pxPrevious; 80112f0: 687b ldr r3, [r7, #4] 80112f2: 689a ldr r2, [r3, #8] 80112f4: 68fb ldr r3, [r7, #12] 80112f6: 605a str r2, [r3, #4] else { mtCOVERAGE_TEST_MARKER(); } pxItemToRemove->pxContainer = NULL; 80112f8: 687b ldr r3, [r7, #4] 80112fa: 2200 movs r2, #0 80112fc: 611a str r2, [r3, #16] ( pxList->uxNumberOfItems )--; 80112fe: 68fb ldr r3, [r7, #12] 8011300: 681b ldr r3, [r3, #0] 8011302: 1e5a subs r2, r3, #1 8011304: 68fb ldr r3, [r7, #12] 8011306: 601a str r2, [r3, #0] return pxList->uxNumberOfItems; 8011308: 68fb ldr r3, [r7, #12] 801130a: 681b ldr r3, [r3, #0] } 801130c: 4618 mov r0, r3 801130e: 3714 adds r7, #20 8011310: 46bd mov sp, r7 8011312: f85d 7b04 ldr.w r7, [sp], #4 8011316: 4770 bx lr 08011318 : } \ taskEXIT_CRITICAL() /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue ) { 8011318: b580 push {r7, lr} 801131a: b084 sub sp, #16 801131c: af00 add r7, sp, #0 801131e: 6078 str r0, [r7, #4] 8011320: 6039 str r1, [r7, #0] Queue_t * const pxQueue = xQueue; 8011322: 687b ldr r3, [r7, #4] 8011324: 60fb str r3, [r7, #12] configASSERT( pxQueue ); 8011326: 68fb ldr r3, [r7, #12] 8011328: 2b00 cmp r3, #0 801132a: d10b bne.n 8011344 portFORCE_INLINE static void vPortRaiseBASEPRI( void ) { uint32_t ulNewBASEPRI; __asm volatile 801132c: f04f 0350 mov.w r3, #80 @ 0x50 8011330: f383 8811 msr BASEPRI, r3 8011334: f3bf 8f6f isb sy 8011338: f3bf 8f4f dsb sy 801133c: 60bb str r3, [r7, #8] " msr basepri, %0 \n" \ " isb \n" \ " dsb \n" \ :"=r" (ulNewBASEPRI) : "i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY ) : "memory" ); } 801133e: bf00 nop 8011340: bf00 nop 8011342: e7fd b.n 8011340 taskENTER_CRITICAL(); 8011344: f003 fbf0 bl 8014b28 { pxQueue->u.xQueue.pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */ 8011348: 68fb ldr r3, [r7, #12] 801134a: 681a ldr r2, [r3, #0] 801134c: 68fb ldr r3, [r7, #12] 801134e: 6bdb ldr r3, [r3, #60] @ 0x3c 8011350: 68f9 ldr r1, [r7, #12] 8011352: 6c09 ldr r1, [r1, #64] @ 0x40 8011354: fb01 f303 mul.w r3, r1, r3 8011358: 441a add r2, r3 801135a: 68fb ldr r3, [r7, #12] 801135c: 609a str r2, [r3, #8] pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 801135e: 68fb ldr r3, [r7, #12] 8011360: 2200 movs r2, #0 8011362: 639a str r2, [r3, #56] @ 0x38 pxQueue->pcWriteTo = pxQueue->pcHead; 8011364: 68fb ldr r3, [r7, #12] 8011366: 681a ldr r2, [r3, #0] 8011368: 68fb ldr r3, [r7, #12] 801136a: 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. */ 801136c: 68fb ldr r3, [r7, #12] 801136e: 681a ldr r2, [r3, #0] 8011370: 68fb ldr r3, [r7, #12] 8011372: 6bdb ldr r3, [r3, #60] @ 0x3c 8011374: 3b01 subs r3, #1 8011376: 68f9 ldr r1, [r7, #12] 8011378: 6c09 ldr r1, [r1, #64] @ 0x40 801137a: fb01 f303 mul.w r3, r1, r3 801137e: 441a add r2, r3 8011380: 68fb ldr r3, [r7, #12] 8011382: 60da str r2, [r3, #12] pxQueue->cRxLock = queueUNLOCKED; 8011384: 68fb ldr r3, [r7, #12] 8011386: 22ff movs r2, #255 @ 0xff 8011388: f883 2044 strb.w r2, [r3, #68] @ 0x44 pxQueue->cTxLock = queueUNLOCKED; 801138c: 68fb ldr r3, [r7, #12] 801138e: 22ff movs r2, #255 @ 0xff 8011390: f883 2045 strb.w r2, [r3, #69] @ 0x45 if( xNewQueue == pdFALSE ) 8011394: 683b ldr r3, [r7, #0] 8011396: 2b00 cmp r3, #0 8011398: d114 bne.n 80113c4 /* 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 ) 801139a: 68fb ldr r3, [r7, #12] 801139c: 691b ldr r3, [r3, #16] 801139e: 2b00 cmp r3, #0 80113a0: d01a beq.n 80113d8 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 80113a2: 68fb ldr r3, [r7, #12] 80113a4: 3310 adds r3, #16 80113a6: 4618 mov r0, r3 80113a8: f002 f922 bl 80135f0 80113ac: 4603 mov r3, r0 80113ae: 2b00 cmp r3, #0 80113b0: d012 beq.n 80113d8 { queueYIELD_IF_USING_PREEMPTION(); 80113b2: 4b0d ldr r3, [pc, #52] @ (80113e8 ) 80113b4: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80113b8: 601a str r2, [r3, #0] 80113ba: f3bf 8f4f dsb sy 80113be: f3bf 8f6f isb sy 80113c2: e009 b.n 80113d8 } } else { /* Ensure the event queues start in the correct state. */ vListInitialise( &( pxQueue->xTasksWaitingToSend ) ); 80113c4: 68fb ldr r3, [r7, #12] 80113c6: 3310 adds r3, #16 80113c8: 4618 mov r0, r3 80113ca: f7ff fef1 bl 80111b0 vListInitialise( &( pxQueue->xTasksWaitingToReceive ) ); 80113ce: 68fb ldr r3, [r7, #12] 80113d0: 3324 adds r3, #36 @ 0x24 80113d2: 4618 mov r0, r3 80113d4: f7ff feec bl 80111b0 } } taskEXIT_CRITICAL(); 80113d8: f003 fbd8 bl 8014b8c /* A value is returned for calling semantic consistency with previous versions. */ return pdPASS; 80113dc: 2301 movs r3, #1 } 80113de: 4618 mov r0, r3 80113e0: 3710 adds r7, #16 80113e2: 46bd mov sp, r7 80113e4: bd80 pop {r7, pc} 80113e6: bf00 nop 80113e8: e000ed04 .word 0xe000ed04 080113ec : /*-----------------------------------------------------------*/ #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 ) { 80113ec: b580 push {r7, lr} 80113ee: b08e sub sp, #56 @ 0x38 80113f0: af02 add r7, sp, #8 80113f2: 60f8 str r0, [r7, #12] 80113f4: 60b9 str r1, [r7, #8] 80113f6: 607a str r2, [r7, #4] 80113f8: 603b str r3, [r7, #0] Queue_t *pxNewQueue; configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); 80113fa: 68fb ldr r3, [r7, #12] 80113fc: 2b00 cmp r3, #0 80113fe: d10b bne.n 8011418 __asm volatile 8011400: f04f 0350 mov.w r3, #80 @ 0x50 8011404: f383 8811 msr BASEPRI, r3 8011408: f3bf 8f6f isb sy 801140c: f3bf 8f4f dsb sy 8011410: 62bb str r3, [r7, #40] @ 0x28 } 8011412: bf00 nop 8011414: bf00 nop 8011416: e7fd b.n 8011414 /* The StaticQueue_t structure and the queue storage area must be supplied. */ configASSERT( pxStaticQueue != NULL ); 8011418: 683b ldr r3, [r7, #0] 801141a: 2b00 cmp r3, #0 801141c: d10b bne.n 8011436 __asm volatile 801141e: f04f 0350 mov.w r3, #80 @ 0x50 8011422: f383 8811 msr BASEPRI, r3 8011426: f3bf 8f6f isb sy 801142a: f3bf 8f4f dsb sy 801142e: 627b str r3, [r7, #36] @ 0x24 } 8011430: bf00 nop 8011432: bf00 nop 8011434: e7fd b.n 8011432 /* 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 ) ) ); 8011436: 687b ldr r3, [r7, #4] 8011438: 2b00 cmp r3, #0 801143a: d002 beq.n 8011442 801143c: 68bb ldr r3, [r7, #8] 801143e: 2b00 cmp r3, #0 8011440: d001 beq.n 8011446 8011442: 2301 movs r3, #1 8011444: e000 b.n 8011448 8011446: 2300 movs r3, #0 8011448: 2b00 cmp r3, #0 801144a: d10b bne.n 8011464 __asm volatile 801144c: f04f 0350 mov.w r3, #80 @ 0x50 8011450: f383 8811 msr BASEPRI, r3 8011454: f3bf 8f6f isb sy 8011458: f3bf 8f4f dsb sy 801145c: 623b str r3, [r7, #32] } 801145e: bf00 nop 8011460: bf00 nop 8011462: e7fd b.n 8011460 configASSERT( !( ( pucQueueStorage == NULL ) && ( uxItemSize != 0 ) ) ); 8011464: 687b ldr r3, [r7, #4] 8011466: 2b00 cmp r3, #0 8011468: d102 bne.n 8011470 801146a: 68bb ldr r3, [r7, #8] 801146c: 2b00 cmp r3, #0 801146e: d101 bne.n 8011474 8011470: 2301 movs r3, #1 8011472: e000 b.n 8011476 8011474: 2300 movs r3, #0 8011476: 2b00 cmp r3, #0 8011478: d10b bne.n 8011492 __asm volatile 801147a: f04f 0350 mov.w r3, #80 @ 0x50 801147e: f383 8811 msr BASEPRI, r3 8011482: f3bf 8f6f isb sy 8011486: f3bf 8f4f dsb sy 801148a: 61fb str r3, [r7, #28] } 801148c: bf00 nop 801148e: bf00 nop 8011490: e7fd b.n 801148e #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 ); 8011492: 2350 movs r3, #80 @ 0x50 8011494: 617b str r3, [r7, #20] configASSERT( xSize == sizeof( Queue_t ) ); 8011496: 697b ldr r3, [r7, #20] 8011498: 2b50 cmp r3, #80 @ 0x50 801149a: d00b beq.n 80114b4 __asm volatile 801149c: f04f 0350 mov.w r3, #80 @ 0x50 80114a0: f383 8811 msr BASEPRI, r3 80114a4: f3bf 8f6f isb sy 80114a8: f3bf 8f4f dsb sy 80114ac: 61bb str r3, [r7, #24] } 80114ae: bf00 nop 80114b0: bf00 nop 80114b2: e7fd b.n 80114b0 ( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */ 80114b4: 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. */ 80114b6: 683b ldr r3, [r7, #0] 80114b8: 62fb str r3, [r7, #44] @ 0x2c if( pxNewQueue != NULL ) 80114ba: 6afb ldr r3, [r7, #44] @ 0x2c 80114bc: 2b00 cmp r3, #0 80114be: d00d beq.n 80114dc #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; 80114c0: 6afb ldr r3, [r7, #44] @ 0x2c 80114c2: 2201 movs r2, #1 80114c4: f883 2046 strb.w r2, [r3, #70] @ 0x46 } #endif /* configSUPPORT_DYNAMIC_ALLOCATION */ prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue ); 80114c8: f897 2038 ldrb.w r2, [r7, #56] @ 0x38 80114cc: 6afb ldr r3, [r7, #44] @ 0x2c 80114ce: 9300 str r3, [sp, #0] 80114d0: 4613 mov r3, r2 80114d2: 687a ldr r2, [r7, #4] 80114d4: 68b9 ldr r1, [r7, #8] 80114d6: 68f8 ldr r0, [r7, #12] 80114d8: f000 f840 bl 801155c { traceQUEUE_CREATE_FAILED( ucQueueType ); mtCOVERAGE_TEST_MARKER(); } return pxNewQueue; 80114dc: 6afb ldr r3, [r7, #44] @ 0x2c } 80114de: 4618 mov r0, r3 80114e0: 3730 adds r7, #48 @ 0x30 80114e2: 46bd mov sp, r7 80114e4: bd80 pop {r7, pc} 080114e6 : /*-----------------------------------------------------------*/ #if( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType ) { 80114e6: b580 push {r7, lr} 80114e8: b08a sub sp, #40 @ 0x28 80114ea: af02 add r7, sp, #8 80114ec: 60f8 str r0, [r7, #12] 80114ee: 60b9 str r1, [r7, #8] 80114f0: 4613 mov r3, r2 80114f2: 71fb strb r3, [r7, #7] Queue_t *pxNewQueue; size_t xQueueSizeInBytes; uint8_t *pucQueueStorage; configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); 80114f4: 68fb ldr r3, [r7, #12] 80114f6: 2b00 cmp r3, #0 80114f8: d10b bne.n 8011512 __asm volatile 80114fa: f04f 0350 mov.w r3, #80 @ 0x50 80114fe: f383 8811 msr BASEPRI, r3 8011502: f3bf 8f6f isb sy 8011506: f3bf 8f4f dsb sy 801150a: 613b str r3, [r7, #16] } 801150c: bf00 nop 801150e: bf00 nop 8011510: e7fd b.n 801150e /* 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. */ 8011512: 68fb ldr r3, [r7, #12] 8011514: 68ba ldr r2, [r7, #8] 8011516: fb02 f303 mul.w r3, r2, r3 801151a: 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. */ 801151c: 69fb ldr r3, [r7, #28] 801151e: 3350 adds r3, #80 @ 0x50 8011520: 4618 mov r0, r3 8011522: f003 fc23 bl 8014d6c 8011526: 61b8 str r0, [r7, #24] if( pxNewQueue != NULL ) 8011528: 69bb ldr r3, [r7, #24] 801152a: 2b00 cmp r3, #0 801152c: d011 beq.n 8011552 { /* Jump past the queue structure to find the location of the queue storage area. */ pucQueueStorage = ( uint8_t * ) pxNewQueue; 801152e: 69bb ldr r3, [r7, #24] 8011530: 617b str r3, [r7, #20] pucQueueStorage += sizeof( Queue_t ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */ 8011532: 697b ldr r3, [r7, #20] 8011534: 3350 adds r3, #80 @ 0x50 8011536: 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; 8011538: 69bb ldr r3, [r7, #24] 801153a: 2200 movs r2, #0 801153c: f883 2046 strb.w r2, [r3, #70] @ 0x46 } #endif /* configSUPPORT_STATIC_ALLOCATION */ prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue ); 8011540: 79fa ldrb r2, [r7, #7] 8011542: 69bb ldr r3, [r7, #24] 8011544: 9300 str r3, [sp, #0] 8011546: 4613 mov r3, r2 8011548: 697a ldr r2, [r7, #20] 801154a: 68b9 ldr r1, [r7, #8] 801154c: 68f8 ldr r0, [r7, #12] 801154e: f000 f805 bl 801155c { traceQUEUE_CREATE_FAILED( ucQueueType ); mtCOVERAGE_TEST_MARKER(); } return pxNewQueue; 8011552: 69bb ldr r3, [r7, #24] } 8011554: 4618 mov r0, r3 8011556: 3720 adds r7, #32 8011558: 46bd mov sp, r7 801155a: bd80 pop {r7, pc} 0801155c : #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 ) { 801155c: b580 push {r7, lr} 801155e: b084 sub sp, #16 8011560: af00 add r7, sp, #0 8011562: 60f8 str r0, [r7, #12] 8011564: 60b9 str r1, [r7, #8] 8011566: 607a str r2, [r7, #4] 8011568: 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 ) 801156a: 68bb ldr r3, [r7, #8] 801156c: 2b00 cmp r3, #0 801156e: d103 bne.n 8011578 { /* 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; 8011570: 69bb ldr r3, [r7, #24] 8011572: 69ba ldr r2, [r7, #24] 8011574: 601a str r2, [r3, #0] 8011576: e002 b.n 801157e } else { /* Set the head to the start of the queue storage area. */ pxNewQueue->pcHead = ( int8_t * ) pucQueueStorage; 8011578: 69bb ldr r3, [r7, #24] 801157a: 687a ldr r2, [r7, #4] 801157c: 601a str r2, [r3, #0] } /* Initialise the queue members as described where the queue type is defined. */ pxNewQueue->uxLength = uxQueueLength; 801157e: 69bb ldr r3, [r7, #24] 8011580: 68fa ldr r2, [r7, #12] 8011582: 63da str r2, [r3, #60] @ 0x3c pxNewQueue->uxItemSize = uxItemSize; 8011584: 69bb ldr r3, [r7, #24] 8011586: 68ba ldr r2, [r7, #8] 8011588: 641a str r2, [r3, #64] @ 0x40 ( void ) xQueueGenericReset( pxNewQueue, pdTRUE ); 801158a: 2101 movs r1, #1 801158c: 69b8 ldr r0, [r7, #24] 801158e: f7ff fec3 bl 8011318 #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; 8011592: 69bb ldr r3, [r7, #24] 8011594: 78fa ldrb r2, [r7, #3] 8011596: f883 204c strb.w r2, [r3, #76] @ 0x4c pxNewQueue->pxQueueSetContainer = NULL; } #endif /* configUSE_QUEUE_SETS */ traceQUEUE_CREATE( pxNewQueue ); } 801159a: bf00 nop 801159c: 3710 adds r7, #16 801159e: 46bd mov sp, r7 80115a0: bd80 pop {r7, pc} 080115a2 : /*-----------------------------------------------------------*/ #if( configUSE_MUTEXES == 1 ) static void prvInitialiseMutex( Queue_t *pxNewQueue ) { 80115a2: b580 push {r7, lr} 80115a4: b082 sub sp, #8 80115a6: af00 add r7, sp, #0 80115a8: 6078 str r0, [r7, #4] if( pxNewQueue != NULL ) 80115aa: 687b ldr r3, [r7, #4] 80115ac: 2b00 cmp r3, #0 80115ae: d00e beq.n 80115ce { /* 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; 80115b0: 687b ldr r3, [r7, #4] 80115b2: 2200 movs r2, #0 80115b4: 609a str r2, [r3, #8] pxNewQueue->uxQueueType = queueQUEUE_IS_MUTEX; 80115b6: 687b ldr r3, [r7, #4] 80115b8: 2200 movs r2, #0 80115ba: 601a str r2, [r3, #0] /* In case this is a recursive mutex. */ pxNewQueue->u.xSemaphore.uxRecursiveCallCount = 0; 80115bc: 687b ldr r3, [r7, #4] 80115be: 2200 movs r2, #0 80115c0: 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 ); 80115c2: 2300 movs r3, #0 80115c4: 2200 movs r2, #0 80115c6: 2100 movs r1, #0 80115c8: 6878 ldr r0, [r7, #4] 80115ca: f000 f911 bl 80117f0 } else { traceCREATE_MUTEX_FAILED(); } } 80115ce: bf00 nop 80115d0: 3708 adds r7, #8 80115d2: 46bd mov sp, r7 80115d4: bd80 pop {r7, pc} 080115d6 : /*-----------------------------------------------------------*/ #if( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) QueueHandle_t xQueueCreateMutex( const uint8_t ucQueueType ) { 80115d6: b580 push {r7, lr} 80115d8: b086 sub sp, #24 80115da: af00 add r7, sp, #0 80115dc: 4603 mov r3, r0 80115de: 71fb strb r3, [r7, #7] QueueHandle_t xNewQueue; const UBaseType_t uxMutexLength = ( UBaseType_t ) 1, uxMutexSize = ( UBaseType_t ) 0; 80115e0: 2301 movs r3, #1 80115e2: 617b str r3, [r7, #20] 80115e4: 2300 movs r3, #0 80115e6: 613b str r3, [r7, #16] xNewQueue = xQueueGenericCreate( uxMutexLength, uxMutexSize, ucQueueType ); 80115e8: 79fb ldrb r3, [r7, #7] 80115ea: 461a mov r2, r3 80115ec: 6939 ldr r1, [r7, #16] 80115ee: 6978 ldr r0, [r7, #20] 80115f0: f7ff ff79 bl 80114e6 80115f4: 60f8 str r0, [r7, #12] prvInitialiseMutex( ( Queue_t * ) xNewQueue ); 80115f6: 68f8 ldr r0, [r7, #12] 80115f8: f7ff ffd3 bl 80115a2 return xNewQueue; 80115fc: 68fb ldr r3, [r7, #12] } 80115fe: 4618 mov r0, r3 8011600: 3718 adds r7, #24 8011602: 46bd mov sp, r7 8011604: bd80 pop {r7, pc} 08011606 : /*-----------------------------------------------------------*/ #if( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) QueueHandle_t xQueueCreateMutexStatic( const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue ) { 8011606: b580 push {r7, lr} 8011608: b088 sub sp, #32 801160a: af02 add r7, sp, #8 801160c: 4603 mov r3, r0 801160e: 6039 str r1, [r7, #0] 8011610: 71fb strb r3, [r7, #7] QueueHandle_t xNewQueue; const UBaseType_t uxMutexLength = ( UBaseType_t ) 1, uxMutexSize = ( UBaseType_t ) 0; 8011612: 2301 movs r3, #1 8011614: 617b str r3, [r7, #20] 8011616: 2300 movs r3, #0 8011618: 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 ); 801161a: 79fb ldrb r3, [r7, #7] 801161c: 9300 str r3, [sp, #0] 801161e: 683b ldr r3, [r7, #0] 8011620: 2200 movs r2, #0 8011622: 6939 ldr r1, [r7, #16] 8011624: 6978 ldr r0, [r7, #20] 8011626: f7ff fee1 bl 80113ec 801162a: 60f8 str r0, [r7, #12] prvInitialiseMutex( ( Queue_t * ) xNewQueue ); 801162c: 68f8 ldr r0, [r7, #12] 801162e: f7ff ffb8 bl 80115a2 return xNewQueue; 8011632: 68fb ldr r3, [r7, #12] } 8011634: 4618 mov r0, r3 8011636: 3718 adds r7, #24 8011638: 46bd mov sp, r7 801163a: bd80 pop {r7, pc} 0801163c : /*-----------------------------------------------------------*/ #if ( configUSE_RECURSIVE_MUTEXES == 1 ) BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) { 801163c: b590 push {r4, r7, lr} 801163e: b087 sub sp, #28 8011640: af00 add r7, sp, #0 8011642: 6078 str r0, [r7, #4] BaseType_t xReturn; Queue_t * const pxMutex = ( Queue_t * ) xMutex; 8011644: 687b ldr r3, [r7, #4] 8011646: 613b str r3, [r7, #16] configASSERT( pxMutex ); 8011648: 693b ldr r3, [r7, #16] 801164a: 2b00 cmp r3, #0 801164c: d10b bne.n 8011666 __asm volatile 801164e: f04f 0350 mov.w r3, #80 @ 0x50 8011652: f383 8811 msr BASEPRI, r3 8011656: f3bf 8f6f isb sy 801165a: f3bf 8f4f dsb sy 801165e: 60fb str r3, [r7, #12] } 8011660: bf00 nop 8011662: bf00 nop 8011664: e7fd b.n 8011662 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() ) 8011666: 693b ldr r3, [r7, #16] 8011668: 689c ldr r4, [r3, #8] 801166a: f002 f9af bl 80139cc 801166e: 4603 mov r3, r0 8011670: 429c cmp r4, r3 8011672: d111 bne.n 8011698 /* 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 )--; 8011674: 693b ldr r3, [r7, #16] 8011676: 68db ldr r3, [r3, #12] 8011678: 1e5a subs r2, r3, #1 801167a: 693b ldr r3, [r7, #16] 801167c: 60da str r2, [r3, #12] /* Has the recursive call count unwound to 0? */ if( pxMutex->u.xSemaphore.uxRecursiveCallCount == ( UBaseType_t ) 0 ) 801167e: 693b ldr r3, [r7, #16] 8011680: 68db ldr r3, [r3, #12] 8011682: 2b00 cmp r3, #0 8011684: d105 bne.n 8011692 { /* 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 ); 8011686: 2300 movs r3, #0 8011688: 2200 movs r2, #0 801168a: 2100 movs r1, #0 801168c: 6938 ldr r0, [r7, #16] 801168e: f000 f8af bl 80117f0 else { mtCOVERAGE_TEST_MARKER(); } xReturn = pdPASS; 8011692: 2301 movs r3, #1 8011694: 617b str r3, [r7, #20] 8011696: e001 b.n 801169c } else { /* The mutex cannot be given because the calling task is not the holder. */ xReturn = pdFAIL; 8011698: 2300 movs r3, #0 801169a: 617b str r3, [r7, #20] traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex ); } return xReturn; 801169c: 697b ldr r3, [r7, #20] } 801169e: 4618 mov r0, r3 80116a0: 371c adds r7, #28 80116a2: 46bd mov sp, r7 80116a4: bd90 pop {r4, r7, pc} 080116a6 : /*-----------------------------------------------------------*/ #if ( configUSE_RECURSIVE_MUTEXES == 1 ) BaseType_t xQueueTakeMutexRecursive( QueueHandle_t xMutex, TickType_t xTicksToWait ) { 80116a6: b590 push {r4, r7, lr} 80116a8: b087 sub sp, #28 80116aa: af00 add r7, sp, #0 80116ac: 6078 str r0, [r7, #4] 80116ae: 6039 str r1, [r7, #0] BaseType_t xReturn; Queue_t * const pxMutex = ( Queue_t * ) xMutex; 80116b0: 687b ldr r3, [r7, #4] 80116b2: 613b str r3, [r7, #16] configASSERT( pxMutex ); 80116b4: 693b ldr r3, [r7, #16] 80116b6: 2b00 cmp r3, #0 80116b8: d10b bne.n 80116d2 __asm volatile 80116ba: f04f 0350 mov.w r3, #80 @ 0x50 80116be: f383 8811 msr BASEPRI, r3 80116c2: f3bf 8f6f isb sy 80116c6: f3bf 8f4f dsb sy 80116ca: 60fb str r3, [r7, #12] } 80116cc: bf00 nop 80116ce: bf00 nop 80116d0: e7fd b.n 80116ce /* Comments regarding mutual exclusion as per those within xQueueGiveMutexRecursive(). */ traceTAKE_MUTEX_RECURSIVE( pxMutex ); if( pxMutex->u.xSemaphore.xMutexHolder == xTaskGetCurrentTaskHandle() ) 80116d2: 693b ldr r3, [r7, #16] 80116d4: 689c ldr r4, [r3, #8] 80116d6: f002 f979 bl 80139cc 80116da: 4603 mov r3, r0 80116dc: 429c cmp r4, r3 80116de: d107 bne.n 80116f0 { ( pxMutex->u.xSemaphore.uxRecursiveCallCount )++; 80116e0: 693b ldr r3, [r7, #16] 80116e2: 68db ldr r3, [r3, #12] 80116e4: 1c5a adds r2, r3, #1 80116e6: 693b ldr r3, [r7, #16] 80116e8: 60da str r2, [r3, #12] xReturn = pdPASS; 80116ea: 2301 movs r3, #1 80116ec: 617b str r3, [r7, #20] 80116ee: e00c b.n 801170a } else { xReturn = xQueueSemaphoreTake( pxMutex, xTicksToWait ); 80116f0: 6839 ldr r1, [r7, #0] 80116f2: 6938 ldr r0, [r7, #16] 80116f4: f000 fb8e bl 8011e14 80116f8: 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 ) 80116fa: 697b ldr r3, [r7, #20] 80116fc: 2b00 cmp r3, #0 80116fe: d004 beq.n 801170a { ( pxMutex->u.xSemaphore.uxRecursiveCallCount )++; 8011700: 693b ldr r3, [r7, #16] 8011702: 68db ldr r3, [r3, #12] 8011704: 1c5a adds r2, r3, #1 8011706: 693b ldr r3, [r7, #16] 8011708: 60da str r2, [r3, #12] { traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex ); } } return xReturn; 801170a: 697b ldr r3, [r7, #20] } 801170c: 4618 mov r0, r3 801170e: 371c adds r7, #28 8011710: 46bd mov sp, r7 8011712: bd90 pop {r4, r7, pc} 08011714 : /*-----------------------------------------------------------*/ #if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) QueueHandle_t xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue ) { 8011714: b580 push {r7, lr} 8011716: b08a sub sp, #40 @ 0x28 8011718: af02 add r7, sp, #8 801171a: 60f8 str r0, [r7, #12] 801171c: 60b9 str r1, [r7, #8] 801171e: 607a str r2, [r7, #4] QueueHandle_t xHandle; configASSERT( uxMaxCount != 0 ); 8011720: 68fb ldr r3, [r7, #12] 8011722: 2b00 cmp r3, #0 8011724: d10b bne.n 801173e __asm volatile 8011726: f04f 0350 mov.w r3, #80 @ 0x50 801172a: f383 8811 msr BASEPRI, r3 801172e: f3bf 8f6f isb sy 8011732: f3bf 8f4f dsb sy 8011736: 61bb str r3, [r7, #24] } 8011738: bf00 nop 801173a: bf00 nop 801173c: e7fd b.n 801173a configASSERT( uxInitialCount <= uxMaxCount ); 801173e: 68ba ldr r2, [r7, #8] 8011740: 68fb ldr r3, [r7, #12] 8011742: 429a cmp r2, r3 8011744: d90b bls.n 801175e __asm volatile 8011746: f04f 0350 mov.w r3, #80 @ 0x50 801174a: f383 8811 msr BASEPRI, r3 801174e: f3bf 8f6f isb sy 8011752: f3bf 8f4f dsb sy 8011756: 617b str r3, [r7, #20] } 8011758: bf00 nop 801175a: bf00 nop 801175c: e7fd b.n 801175a xHandle = xQueueGenericCreateStatic( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, NULL, pxStaticQueue, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); 801175e: 2302 movs r3, #2 8011760: 9300 str r3, [sp, #0] 8011762: 687b ldr r3, [r7, #4] 8011764: 2200 movs r2, #0 8011766: 2100 movs r1, #0 8011768: 68f8 ldr r0, [r7, #12] 801176a: f7ff fe3f bl 80113ec 801176e: 61f8 str r0, [r7, #28] if( xHandle != NULL ) 8011770: 69fb ldr r3, [r7, #28] 8011772: 2b00 cmp r3, #0 8011774: d002 beq.n 801177c { ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; 8011776: 69fb ldr r3, [r7, #28] 8011778: 68ba ldr r2, [r7, #8] 801177a: 639a str r2, [r3, #56] @ 0x38 else { traceCREATE_COUNTING_SEMAPHORE_FAILED(); } return xHandle; 801177c: 69fb ldr r3, [r7, #28] } 801177e: 4618 mov r0, r3 8011780: 3720 adds r7, #32 8011782: 46bd mov sp, r7 8011784: bd80 pop {r7, pc} 08011786 : /*-----------------------------------------------------------*/ #if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) { 8011786: b580 push {r7, lr} 8011788: b086 sub sp, #24 801178a: af00 add r7, sp, #0 801178c: 6078 str r0, [r7, #4] 801178e: 6039 str r1, [r7, #0] QueueHandle_t xHandle; configASSERT( uxMaxCount != 0 ); 8011790: 687b ldr r3, [r7, #4] 8011792: 2b00 cmp r3, #0 8011794: d10b bne.n 80117ae __asm volatile 8011796: f04f 0350 mov.w r3, #80 @ 0x50 801179a: f383 8811 msr BASEPRI, r3 801179e: f3bf 8f6f isb sy 80117a2: f3bf 8f4f dsb sy 80117a6: 613b str r3, [r7, #16] } 80117a8: bf00 nop 80117aa: bf00 nop 80117ac: e7fd b.n 80117aa configASSERT( uxInitialCount <= uxMaxCount ); 80117ae: 683a ldr r2, [r7, #0] 80117b0: 687b ldr r3, [r7, #4] 80117b2: 429a cmp r2, r3 80117b4: d90b bls.n 80117ce __asm volatile 80117b6: f04f 0350 mov.w r3, #80 @ 0x50 80117ba: f383 8811 msr BASEPRI, r3 80117be: f3bf 8f6f isb sy 80117c2: f3bf 8f4f dsb sy 80117c6: 60fb str r3, [r7, #12] } 80117c8: bf00 nop 80117ca: bf00 nop 80117cc: e7fd b.n 80117ca xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); 80117ce: 2202 movs r2, #2 80117d0: 2100 movs r1, #0 80117d2: 6878 ldr r0, [r7, #4] 80117d4: f7ff fe87 bl 80114e6 80117d8: 6178 str r0, [r7, #20] if( xHandle != NULL ) 80117da: 697b ldr r3, [r7, #20] 80117dc: 2b00 cmp r3, #0 80117de: d002 beq.n 80117e6 { ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; 80117e0: 697b ldr r3, [r7, #20] 80117e2: 683a ldr r2, [r7, #0] 80117e4: 639a str r2, [r3, #56] @ 0x38 else { traceCREATE_COUNTING_SEMAPHORE_FAILED(); } return xHandle; 80117e6: 697b ldr r3, [r7, #20] } 80117e8: 4618 mov r0, r3 80117ea: 3718 adds r7, #24 80117ec: 46bd mov sp, r7 80117ee: bd80 pop {r7, pc} 080117f0 : #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 ) { 80117f0: b580 push {r7, lr} 80117f2: b08e sub sp, #56 @ 0x38 80117f4: af00 add r7, sp, #0 80117f6: 60f8 str r0, [r7, #12] 80117f8: 60b9 str r1, [r7, #8] 80117fa: 607a str r2, [r7, #4] 80117fc: 603b str r3, [r7, #0] BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired; 80117fe: 2300 movs r3, #0 8011800: 637b str r3, [r7, #52] @ 0x34 TimeOut_t xTimeOut; Queue_t * const pxQueue = xQueue; 8011802: 68fb ldr r3, [r7, #12] 8011804: 633b str r3, [r7, #48] @ 0x30 configASSERT( pxQueue ); 8011806: 6b3b ldr r3, [r7, #48] @ 0x30 8011808: 2b00 cmp r3, #0 801180a: d10b bne.n 8011824 __asm volatile 801180c: f04f 0350 mov.w r3, #80 @ 0x50 8011810: f383 8811 msr BASEPRI, r3 8011814: f3bf 8f6f isb sy 8011818: f3bf 8f4f dsb sy 801181c: 62bb str r3, [r7, #40] @ 0x28 } 801181e: bf00 nop 8011820: bf00 nop 8011822: e7fd b.n 8011820 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8011824: 68bb ldr r3, [r7, #8] 8011826: 2b00 cmp r3, #0 8011828: d103 bne.n 8011832 801182a: 6b3b ldr r3, [r7, #48] @ 0x30 801182c: 6c1b ldr r3, [r3, #64] @ 0x40 801182e: 2b00 cmp r3, #0 8011830: d101 bne.n 8011836 8011832: 2301 movs r3, #1 8011834: e000 b.n 8011838 8011836: 2300 movs r3, #0 8011838: 2b00 cmp r3, #0 801183a: d10b bne.n 8011854 __asm volatile 801183c: f04f 0350 mov.w r3, #80 @ 0x50 8011840: f383 8811 msr BASEPRI, r3 8011844: f3bf 8f6f isb sy 8011848: f3bf 8f4f dsb sy 801184c: 627b str r3, [r7, #36] @ 0x24 } 801184e: bf00 nop 8011850: bf00 nop 8011852: e7fd b.n 8011850 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 8011854: 683b ldr r3, [r7, #0] 8011856: 2b02 cmp r3, #2 8011858: d103 bne.n 8011862 801185a: 6b3b ldr r3, [r7, #48] @ 0x30 801185c: 6bdb ldr r3, [r3, #60] @ 0x3c 801185e: 2b01 cmp r3, #1 8011860: d101 bne.n 8011866 8011862: 2301 movs r3, #1 8011864: e000 b.n 8011868 8011866: 2300 movs r3, #0 8011868: 2b00 cmp r3, #0 801186a: d10b bne.n 8011884 __asm volatile 801186c: f04f 0350 mov.w r3, #80 @ 0x50 8011870: f383 8811 msr BASEPRI, r3 8011874: f3bf 8f6f isb sy 8011878: f3bf 8f4f dsb sy 801187c: 623b str r3, [r7, #32] } 801187e: bf00 nop 8011880: bf00 nop 8011882: e7fd b.n 8011880 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 8011884: f002 f8b2 bl 80139ec 8011888: 4603 mov r3, r0 801188a: 2b00 cmp r3, #0 801188c: d102 bne.n 8011894 801188e: 687b ldr r3, [r7, #4] 8011890: 2b00 cmp r3, #0 8011892: d101 bne.n 8011898 8011894: 2301 movs r3, #1 8011896: e000 b.n 801189a 8011898: 2300 movs r3, #0 801189a: 2b00 cmp r3, #0 801189c: d10b bne.n 80118b6 __asm volatile 801189e: f04f 0350 mov.w r3, #80 @ 0x50 80118a2: f383 8811 msr BASEPRI, r3 80118a6: f3bf 8f6f isb sy 80118aa: f3bf 8f4f dsb sy 80118ae: 61fb str r3, [r7, #28] } 80118b0: bf00 nop 80118b2: bf00 nop 80118b4: e7fd b.n 80118b2 /*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(); 80118b6: f003 f937 bl 8014b28 { /* 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 ) ) 80118ba: 6b3b ldr r3, [r7, #48] @ 0x30 80118bc: 6b9a ldr r2, [r3, #56] @ 0x38 80118be: 6b3b ldr r3, [r7, #48] @ 0x30 80118c0: 6bdb ldr r3, [r3, #60] @ 0x3c 80118c2: 429a cmp r2, r3 80118c4: d302 bcc.n 80118cc 80118c6: 683b ldr r3, [r7, #0] 80118c8: 2b02 cmp r3, #2 80118ca: d129 bne.n 8011920 } } } #else /* configUSE_QUEUE_SETS */ { xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); 80118cc: 683a ldr r2, [r7, #0] 80118ce: 68b9 ldr r1, [r7, #8] 80118d0: 6b38 ldr r0, [r7, #48] @ 0x30 80118d2: f000 fcab bl 801222c 80118d6: 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 ) 80118d8: 6b3b ldr r3, [r7, #48] @ 0x30 80118da: 6a5b ldr r3, [r3, #36] @ 0x24 80118dc: 2b00 cmp r3, #0 80118de: d010 beq.n 8011902 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 80118e0: 6b3b ldr r3, [r7, #48] @ 0x30 80118e2: 3324 adds r3, #36 @ 0x24 80118e4: 4618 mov r0, r3 80118e6: f001 fe83 bl 80135f0 80118ea: 4603 mov r3, r0 80118ec: 2b00 cmp r3, #0 80118ee: d013 beq.n 8011918 { /* 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(); 80118f0: 4b3f ldr r3, [pc, #252] @ (80119f0 ) 80118f2: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80118f6: 601a str r2, [r3, #0] 80118f8: f3bf 8f4f dsb sy 80118fc: f3bf 8f6f isb sy 8011900: e00a b.n 8011918 else { mtCOVERAGE_TEST_MARKER(); } } else if( xYieldRequired != pdFALSE ) 8011902: 6afb ldr r3, [r7, #44] @ 0x2c 8011904: 2b00 cmp r3, #0 8011906: d007 beq.n 8011918 { /* 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(); 8011908: 4b39 ldr r3, [pc, #228] @ (80119f0 ) 801190a: f04f 5280 mov.w r2, #268435456 @ 0x10000000 801190e: 601a str r2, [r3, #0] 8011910: f3bf 8f4f dsb sy 8011914: f3bf 8f6f isb sy mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_QUEUE_SETS */ taskEXIT_CRITICAL(); 8011918: f003 f938 bl 8014b8c return pdPASS; 801191c: 2301 movs r3, #1 801191e: e063 b.n 80119e8 } else { if( xTicksToWait == ( TickType_t ) 0 ) 8011920: 687b ldr r3, [r7, #4] 8011922: 2b00 cmp r3, #0 8011924: d103 bne.n 801192e { /* The queue was full and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 8011926: f003 f931 bl 8014b8c /* Return to the original privilege level before exiting the function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; 801192a: 2300 movs r3, #0 801192c: e05c b.n 80119e8 } else if( xEntryTimeSet == pdFALSE ) 801192e: 6b7b ldr r3, [r7, #52] @ 0x34 8011930: 2b00 cmp r3, #0 8011932: d106 bne.n 8011942 { /* The queue was full and a block time was specified so configure the timeout structure. */ vTaskInternalSetTimeOutState( &xTimeOut ); 8011934: f107 0314 add.w r3, r7, #20 8011938: 4618 mov r0, r3 801193a: f001 fee5 bl 8013708 xEntryTimeSet = pdTRUE; 801193e: 2301 movs r3, #1 8011940: 637b str r3, [r7, #52] @ 0x34 /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 8011942: f003 f923 bl 8014b8c /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 8011946: f001 fc05 bl 8013154 prvLockQueue( pxQueue ); 801194a: f003 f8ed bl 8014b28 801194e: 6b3b ldr r3, [r7, #48] @ 0x30 8011950: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 8011954: b25b sxtb r3, r3 8011956: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 801195a: d103 bne.n 8011964 801195c: 6b3b ldr r3, [r7, #48] @ 0x30 801195e: 2200 movs r2, #0 8011960: f883 2044 strb.w r2, [r3, #68] @ 0x44 8011964: 6b3b ldr r3, [r7, #48] @ 0x30 8011966: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 801196a: b25b sxtb r3, r3 801196c: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8011970: d103 bne.n 801197a 8011972: 6b3b ldr r3, [r7, #48] @ 0x30 8011974: 2200 movs r2, #0 8011976: f883 2045 strb.w r2, [r3, #69] @ 0x45 801197a: f003 f907 bl 8014b8c /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 801197e: 1d3a adds r2, r7, #4 8011980: f107 0314 add.w r3, r7, #20 8011984: 4611 mov r1, r2 8011986: 4618 mov r0, r3 8011988: f001 fed4 bl 8013734 801198c: 4603 mov r3, r0 801198e: 2b00 cmp r3, #0 8011990: d124 bne.n 80119dc { if( prvIsQueueFull( pxQueue ) != pdFALSE ) 8011992: 6b38 ldr r0, [r7, #48] @ 0x30 8011994: f000 fd42 bl 801241c 8011998: 4603 mov r3, r0 801199a: 2b00 cmp r3, #0 801199c: d018 beq.n 80119d0 { traceBLOCKING_ON_QUEUE_SEND( pxQueue ); vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait ); 801199e: 6b3b ldr r3, [r7, #48] @ 0x30 80119a0: 3310 adds r3, #16 80119a2: 687a ldr r2, [r7, #4] 80119a4: 4611 mov r1, r2 80119a6: 4618 mov r0, r3 80119a8: f001 fdd0 bl 801354c /* 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 ); 80119ac: 6b38 ldr r0, [r7, #48] @ 0x30 80119ae: f000 fccd bl 801234c /* 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 ) 80119b2: f001 fbdd bl 8013170 80119b6: 4603 mov r3, r0 80119b8: 2b00 cmp r3, #0 80119ba: f47f af7c bne.w 80118b6 { portYIELD_WITHIN_API(); 80119be: 4b0c ldr r3, [pc, #48] @ (80119f0 ) 80119c0: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80119c4: 601a str r2, [r3, #0] 80119c6: f3bf 8f4f dsb sy 80119ca: f3bf 8f6f isb sy 80119ce: e772 b.n 80118b6 } } else { /* Try again. */ prvUnlockQueue( pxQueue ); 80119d0: 6b38 ldr r0, [r7, #48] @ 0x30 80119d2: f000 fcbb bl 801234c ( void ) xTaskResumeAll(); 80119d6: f001 fbcb bl 8013170 80119da: e76c b.n 80118b6 } } else { /* The timeout has expired. */ prvUnlockQueue( pxQueue ); 80119dc: 6b38 ldr r0, [r7, #48] @ 0x30 80119de: f000 fcb5 bl 801234c ( void ) xTaskResumeAll(); 80119e2: f001 fbc5 bl 8013170 traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; 80119e6: 2300 movs r3, #0 } } /*lint -restore */ } 80119e8: 4618 mov r0, r3 80119ea: 3738 adds r7, #56 @ 0x38 80119ec: 46bd mov sp, r7 80119ee: bd80 pop {r7, pc} 80119f0: e000ed04 .word 0xe000ed04 080119f4 : /*-----------------------------------------------------------*/ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition ) { 80119f4: b580 push {r7, lr} 80119f6: b090 sub sp, #64 @ 0x40 80119f8: af00 add r7, sp, #0 80119fa: 60f8 str r0, [r7, #12] 80119fc: 60b9 str r1, [r7, #8] 80119fe: 607a str r2, [r7, #4] 8011a00: 603b str r3, [r7, #0] BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = xQueue; 8011a02: 68fb ldr r3, [r7, #12] 8011a04: 63bb str r3, [r7, #56] @ 0x38 configASSERT( pxQueue ); 8011a06: 6bbb ldr r3, [r7, #56] @ 0x38 8011a08: 2b00 cmp r3, #0 8011a0a: d10b bne.n 8011a24 __asm volatile 8011a0c: f04f 0350 mov.w r3, #80 @ 0x50 8011a10: f383 8811 msr BASEPRI, r3 8011a14: f3bf 8f6f isb sy 8011a18: f3bf 8f4f dsb sy 8011a1c: 62bb str r3, [r7, #40] @ 0x28 } 8011a1e: bf00 nop 8011a20: bf00 nop 8011a22: e7fd b.n 8011a20 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8011a24: 68bb ldr r3, [r7, #8] 8011a26: 2b00 cmp r3, #0 8011a28: d103 bne.n 8011a32 8011a2a: 6bbb ldr r3, [r7, #56] @ 0x38 8011a2c: 6c1b ldr r3, [r3, #64] @ 0x40 8011a2e: 2b00 cmp r3, #0 8011a30: d101 bne.n 8011a36 8011a32: 2301 movs r3, #1 8011a34: e000 b.n 8011a38 8011a36: 2300 movs r3, #0 8011a38: 2b00 cmp r3, #0 8011a3a: d10b bne.n 8011a54 __asm volatile 8011a3c: f04f 0350 mov.w r3, #80 @ 0x50 8011a40: f383 8811 msr BASEPRI, r3 8011a44: f3bf 8f6f isb sy 8011a48: f3bf 8f4f dsb sy 8011a4c: 627b str r3, [r7, #36] @ 0x24 } 8011a4e: bf00 nop 8011a50: bf00 nop 8011a52: e7fd b.n 8011a50 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 8011a54: 683b ldr r3, [r7, #0] 8011a56: 2b02 cmp r3, #2 8011a58: d103 bne.n 8011a62 8011a5a: 6bbb ldr r3, [r7, #56] @ 0x38 8011a5c: 6bdb ldr r3, [r3, #60] @ 0x3c 8011a5e: 2b01 cmp r3, #1 8011a60: d101 bne.n 8011a66 8011a62: 2301 movs r3, #1 8011a64: e000 b.n 8011a68 8011a66: 2300 movs r3, #0 8011a68: 2b00 cmp r3, #0 8011a6a: d10b bne.n 8011a84 __asm volatile 8011a6c: f04f 0350 mov.w r3, #80 @ 0x50 8011a70: f383 8811 msr BASEPRI, r3 8011a74: f3bf 8f6f isb sy 8011a78: f3bf 8f4f dsb sy 8011a7c: 623b str r3, [r7, #32] } 8011a7e: bf00 nop 8011a80: bf00 nop 8011a82: e7fd b.n 8011a80 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(); 8011a84: f003 f930 bl 8014ce8 portFORCE_INLINE static uint32_t ulPortRaiseBASEPRI( void ) { uint32_t ulOriginalBASEPRI, ulNewBASEPRI; __asm volatile 8011a88: f3ef 8211 mrs r2, BASEPRI 8011a8c: f04f 0350 mov.w r3, #80 @ 0x50 8011a90: f383 8811 msr BASEPRI, r3 8011a94: f3bf 8f6f isb sy 8011a98: f3bf 8f4f dsb sy 8011a9c: 61fa str r2, [r7, #28] 8011a9e: 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; 8011aa0: 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(); 8011aa2: 637b str r3, [r7, #52] @ 0x34 { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 8011aa4: 6bbb ldr r3, [r7, #56] @ 0x38 8011aa6: 6b9a ldr r2, [r3, #56] @ 0x38 8011aa8: 6bbb ldr r3, [r7, #56] @ 0x38 8011aaa: 6bdb ldr r3, [r3, #60] @ 0x3c 8011aac: 429a cmp r2, r3 8011aae: d302 bcc.n 8011ab6 8011ab0: 683b ldr r3, [r7, #0] 8011ab2: 2b02 cmp r3, #2 8011ab4: d12f bne.n 8011b16 { const int8_t cTxLock = pxQueue->cTxLock; 8011ab6: 6bbb ldr r3, [r7, #56] @ 0x38 8011ab8: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 8011abc: f887 3033 strb.w r3, [r7, #51] @ 0x33 const UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting; 8011ac0: 6bbb ldr r3, [r7, #56] @ 0x38 8011ac2: 6b9b ldr r3, [r3, #56] @ 0x38 8011ac4: 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 ); 8011ac6: 683a ldr r2, [r7, #0] 8011ac8: 68b9 ldr r1, [r7, #8] 8011aca: 6bb8 ldr r0, [r7, #56] @ 0x38 8011acc: f000 fbae bl 801222c /* The event list is not altered if the queue is locked. This will be done when the queue is unlocked later. */ if( cTxLock == queueUNLOCKED ) 8011ad0: f997 3033 ldrsb.w r3, [r7, #51] @ 0x33 8011ad4: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8011ad8: d112 bne.n 8011b00 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 8011ada: 6bbb ldr r3, [r7, #56] @ 0x38 8011adc: 6a5b ldr r3, [r3, #36] @ 0x24 8011ade: 2b00 cmp r3, #0 8011ae0: d016 beq.n 8011b10 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 8011ae2: 6bbb ldr r3, [r7, #56] @ 0x38 8011ae4: 3324 adds r3, #36 @ 0x24 8011ae6: 4618 mov r0, r3 8011ae8: f001 fd82 bl 80135f0 8011aec: 4603 mov r3, r0 8011aee: 2b00 cmp r3, #0 8011af0: d00e beq.n 8011b10 { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 8011af2: 687b ldr r3, [r7, #4] 8011af4: 2b00 cmp r3, #0 8011af6: d00b beq.n 8011b10 { *pxHigherPriorityTaskWoken = pdTRUE; 8011af8: 687b ldr r3, [r7, #4] 8011afa: 2201 movs r2, #1 8011afc: 601a str r2, [r3, #0] 8011afe: e007 b.n 8011b10 } 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 ); 8011b00: f897 3033 ldrb.w r3, [r7, #51] @ 0x33 8011b04: 3301 adds r3, #1 8011b06: b2db uxtb r3, r3 8011b08: b25a sxtb r2, r3 8011b0a: 6bbb ldr r3, [r7, #56] @ 0x38 8011b0c: f883 2045 strb.w r2, [r3, #69] @ 0x45 } xReturn = pdPASS; 8011b10: 2301 movs r3, #1 8011b12: 63fb str r3, [r7, #60] @ 0x3c { 8011b14: e001 b.n 8011b1a } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 8011b16: 2300 movs r3, #0 8011b18: 63fb str r3, [r7, #60] @ 0x3c 8011b1a: 6b7b ldr r3, [r7, #52] @ 0x34 8011b1c: 617b str r3, [r7, #20] } /*-----------------------------------------------------------*/ portFORCE_INLINE static void vPortSetBASEPRI( uint32_t ulNewMaskValue ) { __asm volatile 8011b1e: 697b ldr r3, [r7, #20] 8011b20: f383 8811 msr BASEPRI, r3 ( " msr basepri, %0 " :: "r" ( ulNewMaskValue ) : "memory" ); } 8011b24: bf00 nop } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; 8011b26: 6bfb ldr r3, [r7, #60] @ 0x3c } 8011b28: 4618 mov r0, r3 8011b2a: 3740 adds r7, #64 @ 0x40 8011b2c: 46bd mov sp, r7 8011b2e: bd80 pop {r7, pc} 08011b30 : /*-----------------------------------------------------------*/ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * const pxHigherPriorityTaskWoken ) { 8011b30: b580 push {r7, lr} 8011b32: b08e sub sp, #56 @ 0x38 8011b34: af00 add r7, sp, #0 8011b36: 6078 str r0, [r7, #4] 8011b38: 6039 str r1, [r7, #0] BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = xQueue; 8011b3a: 687b ldr r3, [r7, #4] 8011b3c: 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 ); 8011b3e: 6b3b ldr r3, [r7, #48] @ 0x30 8011b40: 2b00 cmp r3, #0 8011b42: d10b bne.n 8011b5c __asm volatile 8011b44: f04f 0350 mov.w r3, #80 @ 0x50 8011b48: f383 8811 msr BASEPRI, r3 8011b4c: f3bf 8f6f isb sy 8011b50: f3bf 8f4f dsb sy 8011b54: 623b str r3, [r7, #32] } 8011b56: bf00 nop 8011b58: bf00 nop 8011b5a: e7fd b.n 8011b58 /* xQueueGenericSendFromISR() should be used instead of xQueueGiveFromISR() if the item size is not 0. */ configASSERT( pxQueue->uxItemSize == 0 ); 8011b5c: 6b3b ldr r3, [r7, #48] @ 0x30 8011b5e: 6c1b ldr r3, [r3, #64] @ 0x40 8011b60: 2b00 cmp r3, #0 8011b62: d00b beq.n 8011b7c __asm volatile 8011b64: f04f 0350 mov.w r3, #80 @ 0x50 8011b68: f383 8811 msr BASEPRI, r3 8011b6c: f3bf 8f6f isb sy 8011b70: f3bf 8f4f dsb sy 8011b74: 61fb str r3, [r7, #28] } 8011b76: bf00 nop 8011b78: bf00 nop 8011b7a: e7fd b.n 8011b78 /* 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 ) ) ); 8011b7c: 6b3b ldr r3, [r7, #48] @ 0x30 8011b7e: 681b ldr r3, [r3, #0] 8011b80: 2b00 cmp r3, #0 8011b82: d103 bne.n 8011b8c 8011b84: 6b3b ldr r3, [r7, #48] @ 0x30 8011b86: 689b ldr r3, [r3, #8] 8011b88: 2b00 cmp r3, #0 8011b8a: d101 bne.n 8011b90 8011b8c: 2301 movs r3, #1 8011b8e: e000 b.n 8011b92 8011b90: 2300 movs r3, #0 8011b92: 2b00 cmp r3, #0 8011b94: d10b bne.n 8011bae __asm volatile 8011b96: f04f 0350 mov.w r3, #80 @ 0x50 8011b9a: f383 8811 msr BASEPRI, r3 8011b9e: f3bf 8f6f isb sy 8011ba2: f3bf 8f4f dsb sy 8011ba6: 61bb str r3, [r7, #24] } 8011ba8: bf00 nop 8011baa: bf00 nop 8011bac: e7fd b.n 8011baa 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(); 8011bae: f003 f89b bl 8014ce8 __asm volatile 8011bb2: f3ef 8211 mrs r2, BASEPRI 8011bb6: f04f 0350 mov.w r3, #80 @ 0x50 8011bba: f383 8811 msr BASEPRI, r3 8011bbe: f3bf 8f6f isb sy 8011bc2: f3bf 8f4f dsb sy 8011bc6: 617a str r2, [r7, #20] 8011bc8: 613b str r3, [r7, #16] return ulOriginalBASEPRI; 8011bca: 697b ldr r3, [r7, #20] uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 8011bcc: 62fb str r3, [r7, #44] @ 0x2c { const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; 8011bce: 6b3b ldr r3, [r7, #48] @ 0x30 8011bd0: 6b9b ldr r3, [r3, #56] @ 0x38 8011bd2: 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 ) 8011bd4: 6b3b ldr r3, [r7, #48] @ 0x30 8011bd6: 6bdb ldr r3, [r3, #60] @ 0x3c 8011bd8: 6aba ldr r2, [r7, #40] @ 0x28 8011bda: 429a cmp r2, r3 8011bdc: d22b bcs.n 8011c36 { const int8_t cTxLock = pxQueue->cTxLock; 8011bde: 6b3b ldr r3, [r7, #48] @ 0x30 8011be0: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 8011be4: 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; 8011be8: 6abb ldr r3, [r7, #40] @ 0x28 8011bea: 1c5a adds r2, r3, #1 8011bec: 6b3b ldr r3, [r7, #48] @ 0x30 8011bee: 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 ) 8011bf0: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 8011bf4: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8011bf8: d112 bne.n 8011c20 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 8011bfa: 6b3b ldr r3, [r7, #48] @ 0x30 8011bfc: 6a5b ldr r3, [r3, #36] @ 0x24 8011bfe: 2b00 cmp r3, #0 8011c00: d016 beq.n 8011c30 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 8011c02: 6b3b ldr r3, [r7, #48] @ 0x30 8011c04: 3324 adds r3, #36 @ 0x24 8011c06: 4618 mov r0, r3 8011c08: f001 fcf2 bl 80135f0 8011c0c: 4603 mov r3, r0 8011c0e: 2b00 cmp r3, #0 8011c10: d00e beq.n 8011c30 { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 8011c12: 683b ldr r3, [r7, #0] 8011c14: 2b00 cmp r3, #0 8011c16: d00b beq.n 8011c30 { *pxHigherPriorityTaskWoken = pdTRUE; 8011c18: 683b ldr r3, [r7, #0] 8011c1a: 2201 movs r2, #1 8011c1c: 601a str r2, [r3, #0] 8011c1e: e007 b.n 8011c30 } 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 ); 8011c20: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 8011c24: 3301 adds r3, #1 8011c26: b2db uxtb r3, r3 8011c28: b25a sxtb r2, r3 8011c2a: 6b3b ldr r3, [r7, #48] @ 0x30 8011c2c: f883 2045 strb.w r2, [r3, #69] @ 0x45 } xReturn = pdPASS; 8011c30: 2301 movs r3, #1 8011c32: 637b str r3, [r7, #52] @ 0x34 8011c34: e001 b.n 8011c3a } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 8011c36: 2300 movs r3, #0 8011c38: 637b str r3, [r7, #52] @ 0x34 8011c3a: 6afb ldr r3, [r7, #44] @ 0x2c 8011c3c: 60fb str r3, [r7, #12] __asm volatile 8011c3e: 68fb ldr r3, [r7, #12] 8011c40: f383 8811 msr BASEPRI, r3 } 8011c44: bf00 nop } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; 8011c46: 6b7b ldr r3, [r7, #52] @ 0x34 } 8011c48: 4618 mov r0, r3 8011c4a: 3738 adds r7, #56 @ 0x38 8011c4c: 46bd mov sp, r7 8011c4e: bd80 pop {r7, pc} 08011c50 : /*-----------------------------------------------------------*/ BaseType_t xQueueReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait ) { 8011c50: b580 push {r7, lr} 8011c52: b08c sub sp, #48 @ 0x30 8011c54: af00 add r7, sp, #0 8011c56: 60f8 str r0, [r7, #12] 8011c58: 60b9 str r1, [r7, #8] 8011c5a: 607a str r2, [r7, #4] BaseType_t xEntryTimeSet = pdFALSE; 8011c5c: 2300 movs r3, #0 8011c5e: 62fb str r3, [r7, #44] @ 0x2c TimeOut_t xTimeOut; Queue_t * const pxQueue = xQueue; 8011c60: 68fb ldr r3, [r7, #12] 8011c62: 62bb str r3, [r7, #40] @ 0x28 /* Check the pointer is not NULL. */ configASSERT( ( pxQueue ) ); 8011c64: 6abb ldr r3, [r7, #40] @ 0x28 8011c66: 2b00 cmp r3, #0 8011c68: d10b bne.n 8011c82 __asm volatile 8011c6a: f04f 0350 mov.w r3, #80 @ 0x50 8011c6e: f383 8811 msr BASEPRI, r3 8011c72: f3bf 8f6f isb sy 8011c76: f3bf 8f4f dsb sy 8011c7a: 623b str r3, [r7, #32] } 8011c7c: bf00 nop 8011c7e: bf00 nop 8011c80: e7fd b.n 8011c7e /* 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 ) ) ); 8011c82: 68bb ldr r3, [r7, #8] 8011c84: 2b00 cmp r3, #0 8011c86: d103 bne.n 8011c90 8011c88: 6abb ldr r3, [r7, #40] @ 0x28 8011c8a: 6c1b ldr r3, [r3, #64] @ 0x40 8011c8c: 2b00 cmp r3, #0 8011c8e: d101 bne.n 8011c94 8011c90: 2301 movs r3, #1 8011c92: e000 b.n 8011c96 8011c94: 2300 movs r3, #0 8011c96: 2b00 cmp r3, #0 8011c98: d10b bne.n 8011cb2 __asm volatile 8011c9a: f04f 0350 mov.w r3, #80 @ 0x50 8011c9e: f383 8811 msr BASEPRI, r3 8011ca2: f3bf 8f6f isb sy 8011ca6: f3bf 8f4f dsb sy 8011caa: 61fb str r3, [r7, #28] } 8011cac: bf00 nop 8011cae: bf00 nop 8011cb0: e7fd b.n 8011cae /* Cannot block if the scheduler is suspended. */ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 8011cb2: f001 fe9b bl 80139ec 8011cb6: 4603 mov r3, r0 8011cb8: 2b00 cmp r3, #0 8011cba: d102 bne.n 8011cc2 8011cbc: 687b ldr r3, [r7, #4] 8011cbe: 2b00 cmp r3, #0 8011cc0: d101 bne.n 8011cc6 8011cc2: 2301 movs r3, #1 8011cc4: e000 b.n 8011cc8 8011cc6: 2300 movs r3, #0 8011cc8: 2b00 cmp r3, #0 8011cca: d10b bne.n 8011ce4 __asm volatile 8011ccc: f04f 0350 mov.w r3, #80 @ 0x50 8011cd0: f383 8811 msr BASEPRI, r3 8011cd4: f3bf 8f6f isb sy 8011cd8: f3bf 8f4f dsb sy 8011cdc: 61bb str r3, [r7, #24] } 8011cde: bf00 nop 8011ce0: bf00 nop 8011ce2: e7fd b.n 8011ce0 /*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(); 8011ce4: f002 ff20 bl 8014b28 { const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; 8011ce8: 6abb ldr r3, [r7, #40] @ 0x28 8011cea: 6b9b ldr r3, [r3, #56] @ 0x38 8011cec: 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 ) 8011cee: 6a7b ldr r3, [r7, #36] @ 0x24 8011cf0: 2b00 cmp r3, #0 8011cf2: d01f beq.n 8011d34 { /* Data available, remove one item. */ prvCopyDataFromQueue( pxQueue, pvBuffer ); 8011cf4: 68b9 ldr r1, [r7, #8] 8011cf6: 6ab8 ldr r0, [r7, #40] @ 0x28 8011cf8: f000 fb02 bl 8012300 traceQUEUE_RECEIVE( pxQueue ); pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1; 8011cfc: 6a7b ldr r3, [r7, #36] @ 0x24 8011cfe: 1e5a subs r2, r3, #1 8011d00: 6abb ldr r3, [r7, #40] @ 0x28 8011d02: 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 ) 8011d04: 6abb ldr r3, [r7, #40] @ 0x28 8011d06: 691b ldr r3, [r3, #16] 8011d08: 2b00 cmp r3, #0 8011d0a: d00f beq.n 8011d2c { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 8011d0c: 6abb ldr r3, [r7, #40] @ 0x28 8011d0e: 3310 adds r3, #16 8011d10: 4618 mov r0, r3 8011d12: f001 fc6d bl 80135f0 8011d16: 4603 mov r3, r0 8011d18: 2b00 cmp r3, #0 8011d1a: d007 beq.n 8011d2c { queueYIELD_IF_USING_PREEMPTION(); 8011d1c: 4b3c ldr r3, [pc, #240] @ (8011e10 ) 8011d1e: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8011d22: 601a str r2, [r3, #0] 8011d24: f3bf 8f4f dsb sy 8011d28: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } taskEXIT_CRITICAL(); 8011d2c: f002 ff2e bl 8014b8c return pdPASS; 8011d30: 2301 movs r3, #1 8011d32: e069 b.n 8011e08 } else { if( xTicksToWait == ( TickType_t ) 0 ) 8011d34: 687b ldr r3, [r7, #4] 8011d36: 2b00 cmp r3, #0 8011d38: d103 bne.n 8011d42 { /* The queue was empty and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 8011d3a: f002 ff27 bl 8014b8c traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 8011d3e: 2300 movs r3, #0 8011d40: e062 b.n 8011e08 } else if( xEntryTimeSet == pdFALSE ) 8011d42: 6afb ldr r3, [r7, #44] @ 0x2c 8011d44: 2b00 cmp r3, #0 8011d46: d106 bne.n 8011d56 { /* The queue was empty and a block time was specified so configure the timeout structure. */ vTaskInternalSetTimeOutState( &xTimeOut ); 8011d48: f107 0310 add.w r3, r7, #16 8011d4c: 4618 mov r0, r3 8011d4e: f001 fcdb bl 8013708 xEntryTimeSet = pdTRUE; 8011d52: 2301 movs r3, #1 8011d54: 62fb str r3, [r7, #44] @ 0x2c /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 8011d56: f002 ff19 bl 8014b8c /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 8011d5a: f001 f9fb bl 8013154 prvLockQueue( pxQueue ); 8011d5e: f002 fee3 bl 8014b28 8011d62: 6abb ldr r3, [r7, #40] @ 0x28 8011d64: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 8011d68: b25b sxtb r3, r3 8011d6a: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8011d6e: d103 bne.n 8011d78 8011d70: 6abb ldr r3, [r7, #40] @ 0x28 8011d72: 2200 movs r2, #0 8011d74: f883 2044 strb.w r2, [r3, #68] @ 0x44 8011d78: 6abb ldr r3, [r7, #40] @ 0x28 8011d7a: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 8011d7e: b25b sxtb r3, r3 8011d80: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8011d84: d103 bne.n 8011d8e 8011d86: 6abb ldr r3, [r7, #40] @ 0x28 8011d88: 2200 movs r2, #0 8011d8a: f883 2045 strb.w r2, [r3, #69] @ 0x45 8011d8e: f002 fefd bl 8014b8c /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 8011d92: 1d3a adds r2, r7, #4 8011d94: f107 0310 add.w r3, r7, #16 8011d98: 4611 mov r1, r2 8011d9a: 4618 mov r0, r3 8011d9c: f001 fcca bl 8013734 8011da0: 4603 mov r3, r0 8011da2: 2b00 cmp r3, #0 8011da4: d123 bne.n 8011dee { /* 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 ) 8011da6: 6ab8 ldr r0, [r7, #40] @ 0x28 8011da8: f000 fb22 bl 80123f0 8011dac: 4603 mov r3, r0 8011dae: 2b00 cmp r3, #0 8011db0: d017 beq.n 8011de2 { traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ); vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 8011db2: 6abb ldr r3, [r7, #40] @ 0x28 8011db4: 3324 adds r3, #36 @ 0x24 8011db6: 687a ldr r2, [r7, #4] 8011db8: 4611 mov r1, r2 8011dba: 4618 mov r0, r3 8011dbc: f001 fbc6 bl 801354c prvUnlockQueue( pxQueue ); 8011dc0: 6ab8 ldr r0, [r7, #40] @ 0x28 8011dc2: f000 fac3 bl 801234c if( xTaskResumeAll() == pdFALSE ) 8011dc6: f001 f9d3 bl 8013170 8011dca: 4603 mov r3, r0 8011dcc: 2b00 cmp r3, #0 8011dce: d189 bne.n 8011ce4 { portYIELD_WITHIN_API(); 8011dd0: 4b0f ldr r3, [pc, #60] @ (8011e10 ) 8011dd2: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8011dd6: 601a str r2, [r3, #0] 8011dd8: f3bf 8f4f dsb sy 8011ddc: f3bf 8f6f isb sy 8011de0: e780 b.n 8011ce4 } else { /* The queue contains data again. Loop back to try and read the data. */ prvUnlockQueue( pxQueue ); 8011de2: 6ab8 ldr r0, [r7, #40] @ 0x28 8011de4: f000 fab2 bl 801234c ( void ) xTaskResumeAll(); 8011de8: f001 f9c2 bl 8013170 8011dec: e77a b.n 8011ce4 } else { /* Timed out. If there is no data in the queue exit, otherwise loop back and attempt to read the data. */ prvUnlockQueue( pxQueue ); 8011dee: 6ab8 ldr r0, [r7, #40] @ 0x28 8011df0: f000 faac bl 801234c ( void ) xTaskResumeAll(); 8011df4: f001 f9bc bl 8013170 if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) 8011df8: 6ab8 ldr r0, [r7, #40] @ 0x28 8011dfa: f000 faf9 bl 80123f0 8011dfe: 4603 mov r3, r0 8011e00: 2b00 cmp r3, #0 8011e02: f43f af6f beq.w 8011ce4 { traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 8011e06: 2300 movs r3, #0 { mtCOVERAGE_TEST_MARKER(); } } } /*lint -restore */ } 8011e08: 4618 mov r0, r3 8011e0a: 3730 adds r7, #48 @ 0x30 8011e0c: 46bd mov sp, r7 8011e0e: bd80 pop {r7, pc} 8011e10: e000ed04 .word 0xe000ed04 08011e14 : /*-----------------------------------------------------------*/ BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue, TickType_t xTicksToWait ) { 8011e14: b580 push {r7, lr} 8011e16: b08e sub sp, #56 @ 0x38 8011e18: af00 add r7, sp, #0 8011e1a: 6078 str r0, [r7, #4] 8011e1c: 6039 str r1, [r7, #0] BaseType_t xEntryTimeSet = pdFALSE; 8011e1e: 2300 movs r3, #0 8011e20: 637b str r3, [r7, #52] @ 0x34 TimeOut_t xTimeOut; Queue_t * const pxQueue = xQueue; 8011e22: 687b ldr r3, [r7, #4] 8011e24: 62fb str r3, [r7, #44] @ 0x2c #if( configUSE_MUTEXES == 1 ) BaseType_t xInheritanceOccurred = pdFALSE; 8011e26: 2300 movs r3, #0 8011e28: 633b str r3, [r7, #48] @ 0x30 #endif /* Check the queue pointer is not NULL. */ configASSERT( ( pxQueue ) ); 8011e2a: 6afb ldr r3, [r7, #44] @ 0x2c 8011e2c: 2b00 cmp r3, #0 8011e2e: d10b bne.n 8011e48 __asm volatile 8011e30: f04f 0350 mov.w r3, #80 @ 0x50 8011e34: f383 8811 msr BASEPRI, r3 8011e38: f3bf 8f6f isb sy 8011e3c: f3bf 8f4f dsb sy 8011e40: 623b str r3, [r7, #32] } 8011e42: bf00 nop 8011e44: bf00 nop 8011e46: e7fd b.n 8011e44 /* Check this really is a semaphore, in which case the item size will be 0. */ configASSERT( pxQueue->uxItemSize == 0 ); 8011e48: 6afb ldr r3, [r7, #44] @ 0x2c 8011e4a: 6c1b ldr r3, [r3, #64] @ 0x40 8011e4c: 2b00 cmp r3, #0 8011e4e: d00b beq.n 8011e68 __asm volatile 8011e50: f04f 0350 mov.w r3, #80 @ 0x50 8011e54: f383 8811 msr BASEPRI, r3 8011e58: f3bf 8f6f isb sy 8011e5c: f3bf 8f4f dsb sy 8011e60: 61fb str r3, [r7, #28] } 8011e62: bf00 nop 8011e64: bf00 nop 8011e66: e7fd b.n 8011e64 /* Cannot block if the scheduler is suspended. */ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 8011e68: f001 fdc0 bl 80139ec 8011e6c: 4603 mov r3, r0 8011e6e: 2b00 cmp r3, #0 8011e70: d102 bne.n 8011e78 8011e72: 683b ldr r3, [r7, #0] 8011e74: 2b00 cmp r3, #0 8011e76: d101 bne.n 8011e7c 8011e78: 2301 movs r3, #1 8011e7a: e000 b.n 8011e7e 8011e7c: 2300 movs r3, #0 8011e7e: 2b00 cmp r3, #0 8011e80: d10b bne.n 8011e9a __asm volatile 8011e82: f04f 0350 mov.w r3, #80 @ 0x50 8011e86: f383 8811 msr BASEPRI, r3 8011e8a: f3bf 8f6f isb sy 8011e8e: f3bf 8f4f dsb sy 8011e92: 61bb str r3, [r7, #24] } 8011e94: bf00 nop 8011e96: bf00 nop 8011e98: e7fd b.n 8011e96 /*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(); 8011e9a: f002 fe45 bl 8014b28 { /* 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; 8011e9e: 6afb ldr r3, [r7, #44] @ 0x2c 8011ea0: 6b9b ldr r3, [r3, #56] @ 0x38 8011ea2: 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 ) 8011ea4: 6abb ldr r3, [r7, #40] @ 0x28 8011ea6: 2b00 cmp r3, #0 8011ea8: d024 beq.n 8011ef4 { 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; 8011eaa: 6abb ldr r3, [r7, #40] @ 0x28 8011eac: 1e5a subs r2, r3, #1 8011eae: 6afb ldr r3, [r7, #44] @ 0x2c 8011eb0: 639a str r2, [r3, #56] @ 0x38 #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 8011eb2: 6afb ldr r3, [r7, #44] @ 0x2c 8011eb4: 681b ldr r3, [r3, #0] 8011eb6: 2b00 cmp r3, #0 8011eb8: d104 bne.n 8011ec4 { /* Record the information required to implement priority inheritance should it become necessary. */ pxQueue->u.xSemaphore.xMutexHolder = pvTaskIncrementMutexHeldCount(); 8011eba: f001 ff11 bl 8013ce0 8011ebe: 4602 mov r2, r0 8011ec0: 6afb ldr r3, [r7, #44] @ 0x2c 8011ec2: 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 ) 8011ec4: 6afb ldr r3, [r7, #44] @ 0x2c 8011ec6: 691b ldr r3, [r3, #16] 8011ec8: 2b00 cmp r3, #0 8011eca: d00f beq.n 8011eec { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 8011ecc: 6afb ldr r3, [r7, #44] @ 0x2c 8011ece: 3310 adds r3, #16 8011ed0: 4618 mov r0, r3 8011ed2: f001 fb8d bl 80135f0 8011ed6: 4603 mov r3, r0 8011ed8: 2b00 cmp r3, #0 8011eda: d007 beq.n 8011eec { queueYIELD_IF_USING_PREEMPTION(); 8011edc: 4b54 ldr r3, [pc, #336] @ (8012030 ) 8011ede: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8011ee2: 601a str r2, [r3, #0] 8011ee4: f3bf 8f4f dsb sy 8011ee8: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } taskEXIT_CRITICAL(); 8011eec: f002 fe4e bl 8014b8c return pdPASS; 8011ef0: 2301 movs r3, #1 8011ef2: e098 b.n 8012026 } else { if( xTicksToWait == ( TickType_t ) 0 ) 8011ef4: 683b ldr r3, [r7, #0] 8011ef6: 2b00 cmp r3, #0 8011ef8: d112 bne.n 8011f20 /* 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 ); 8011efa: 6b3b ldr r3, [r7, #48] @ 0x30 8011efc: 2b00 cmp r3, #0 8011efe: d00b beq.n 8011f18 __asm volatile 8011f00: f04f 0350 mov.w r3, #80 @ 0x50 8011f04: f383 8811 msr BASEPRI, r3 8011f08: f3bf 8f6f isb sy 8011f0c: f3bf 8f4f dsb sy 8011f10: 617b str r3, [r7, #20] } 8011f12: bf00 nop 8011f14: bf00 nop 8011f16: e7fd b.n 8011f14 } #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(); 8011f18: f002 fe38 bl 8014b8c traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 8011f1c: 2300 movs r3, #0 8011f1e: e082 b.n 8012026 } else if( xEntryTimeSet == pdFALSE ) 8011f20: 6b7b ldr r3, [r7, #52] @ 0x34 8011f22: 2b00 cmp r3, #0 8011f24: d106 bne.n 8011f34 { /* The semaphore count was 0 and a block time was specified so configure the timeout structure ready to block. */ vTaskInternalSetTimeOutState( &xTimeOut ); 8011f26: f107 030c add.w r3, r7, #12 8011f2a: 4618 mov r0, r3 8011f2c: f001 fbec bl 8013708 xEntryTimeSet = pdTRUE; 8011f30: 2301 movs r3, #1 8011f32: 637b str r3, [r7, #52] @ 0x34 /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 8011f34: f002 fe2a bl 8014b8c /* Interrupts and other tasks can give to and take from the semaphore now the critical section has been exited. */ vTaskSuspendAll(); 8011f38: f001 f90c bl 8013154 prvLockQueue( pxQueue ); 8011f3c: f002 fdf4 bl 8014b28 8011f40: 6afb ldr r3, [r7, #44] @ 0x2c 8011f42: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 8011f46: b25b sxtb r3, r3 8011f48: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8011f4c: d103 bne.n 8011f56 8011f4e: 6afb ldr r3, [r7, #44] @ 0x2c 8011f50: 2200 movs r2, #0 8011f52: f883 2044 strb.w r2, [r3, #68] @ 0x44 8011f56: 6afb ldr r3, [r7, #44] @ 0x2c 8011f58: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 8011f5c: b25b sxtb r3, r3 8011f5e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8011f62: d103 bne.n 8011f6c 8011f64: 6afb ldr r3, [r7, #44] @ 0x2c 8011f66: 2200 movs r2, #0 8011f68: f883 2045 strb.w r2, [r3, #69] @ 0x45 8011f6c: f002 fe0e bl 8014b8c /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 8011f70: 463a mov r2, r7 8011f72: f107 030c add.w r3, r7, #12 8011f76: 4611 mov r1, r2 8011f78: 4618 mov r0, r3 8011f7a: f001 fbdb bl 8013734 8011f7e: 4603 mov r3, r0 8011f80: 2b00 cmp r3, #0 8011f82: d132 bne.n 8011fea { /* 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 ) 8011f84: 6af8 ldr r0, [r7, #44] @ 0x2c 8011f86: f000 fa33 bl 80123f0 8011f8a: 4603 mov r3, r0 8011f8c: 2b00 cmp r3, #0 8011f8e: d026 beq.n 8011fde { traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ); #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 8011f90: 6afb ldr r3, [r7, #44] @ 0x2c 8011f92: 681b ldr r3, [r3, #0] 8011f94: 2b00 cmp r3, #0 8011f96: d109 bne.n 8011fac { taskENTER_CRITICAL(); 8011f98: f002 fdc6 bl 8014b28 { xInheritanceOccurred = xTaskPriorityInherit( pxQueue->u.xSemaphore.xMutexHolder ); 8011f9c: 6afb ldr r3, [r7, #44] @ 0x2c 8011f9e: 689b ldr r3, [r3, #8] 8011fa0: 4618 mov r0, r3 8011fa2: f001 fd41 bl 8013a28 8011fa6: 6338 str r0, [r7, #48] @ 0x30 } taskEXIT_CRITICAL(); 8011fa8: f002 fdf0 bl 8014b8c mtCOVERAGE_TEST_MARKER(); } } #endif vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 8011fac: 6afb ldr r3, [r7, #44] @ 0x2c 8011fae: 3324 adds r3, #36 @ 0x24 8011fb0: 683a ldr r2, [r7, #0] 8011fb2: 4611 mov r1, r2 8011fb4: 4618 mov r0, r3 8011fb6: f001 fac9 bl 801354c prvUnlockQueue( pxQueue ); 8011fba: 6af8 ldr r0, [r7, #44] @ 0x2c 8011fbc: f000 f9c6 bl 801234c if( xTaskResumeAll() == pdFALSE ) 8011fc0: f001 f8d6 bl 8013170 8011fc4: 4603 mov r3, r0 8011fc6: 2b00 cmp r3, #0 8011fc8: f47f af67 bne.w 8011e9a { portYIELD_WITHIN_API(); 8011fcc: 4b18 ldr r3, [pc, #96] @ (8012030 ) 8011fce: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8011fd2: 601a str r2, [r3, #0] 8011fd4: f3bf 8f4f dsb sy 8011fd8: f3bf 8f6f isb sy 8011fdc: e75d b.n 8011e9a } else { /* There was no timeout and the semaphore count was not 0, so attempt to take the semaphore again. */ prvUnlockQueue( pxQueue ); 8011fde: 6af8 ldr r0, [r7, #44] @ 0x2c 8011fe0: f000 f9b4 bl 801234c ( void ) xTaskResumeAll(); 8011fe4: f001 f8c4 bl 8013170 8011fe8: e757 b.n 8011e9a } } else { /* Timed out. */ prvUnlockQueue( pxQueue ); 8011fea: 6af8 ldr r0, [r7, #44] @ 0x2c 8011fec: f000 f9ae bl 801234c ( void ) xTaskResumeAll(); 8011ff0: f001 f8be bl 8013170 /* 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 ) 8011ff4: 6af8 ldr r0, [r7, #44] @ 0x2c 8011ff6: f000 f9fb bl 80123f0 8011ffa: 4603 mov r3, r0 8011ffc: 2b00 cmp r3, #0 8011ffe: f43f af4c beq.w 8011e9a #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 ) 8012002: 6b3b ldr r3, [r7, #48] @ 0x30 8012004: 2b00 cmp r3, #0 8012006: d00d beq.n 8012024 { taskENTER_CRITICAL(); 8012008: f002 fd8e bl 8014b28 /* 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 ); 801200c: 6af8 ldr r0, [r7, #44] @ 0x2c 801200e: f000 f8f5 bl 80121fc 8012012: 6278 str r0, [r7, #36] @ 0x24 vTaskPriorityDisinheritAfterTimeout( pxQueue->u.xSemaphore.xMutexHolder, uxHighestWaitingPriority ); 8012014: 6afb ldr r3, [r7, #44] @ 0x2c 8012016: 689b ldr r3, [r3, #8] 8012018: 6a79 ldr r1, [r7, #36] @ 0x24 801201a: 4618 mov r0, r3 801201c: f001 fddc bl 8013bd8 } taskEXIT_CRITICAL(); 8012020: f002 fdb4 bl 8014b8c } } #endif /* configUSE_MUTEXES */ traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 8012024: 2300 movs r3, #0 { mtCOVERAGE_TEST_MARKER(); } } } /*lint -restore */ } 8012026: 4618 mov r0, r3 8012028: 3738 adds r7, #56 @ 0x38 801202a: 46bd mov sp, r7 801202c: bd80 pop {r7, pc} 801202e: bf00 nop 8012030: e000ed04 .word 0xe000ed04 08012034 : } /*lint -restore */ } /*-----------------------------------------------------------*/ BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue, void * const pvBuffer, BaseType_t * const pxHigherPriorityTaskWoken ) { 8012034: b580 push {r7, lr} 8012036: b08e sub sp, #56 @ 0x38 8012038: af00 add r7, sp, #0 801203a: 60f8 str r0, [r7, #12] 801203c: 60b9 str r1, [r7, #8] 801203e: 607a str r2, [r7, #4] BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = xQueue; 8012040: 68fb ldr r3, [r7, #12] 8012042: 633b str r3, [r7, #48] @ 0x30 configASSERT( pxQueue ); 8012044: 6b3b ldr r3, [r7, #48] @ 0x30 8012046: 2b00 cmp r3, #0 8012048: d10b bne.n 8012062 __asm volatile 801204a: f04f 0350 mov.w r3, #80 @ 0x50 801204e: f383 8811 msr BASEPRI, r3 8012052: f3bf 8f6f isb sy 8012056: f3bf 8f4f dsb sy 801205a: 623b str r3, [r7, #32] } 801205c: bf00 nop 801205e: bf00 nop 8012060: e7fd b.n 801205e configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8012062: 68bb ldr r3, [r7, #8] 8012064: 2b00 cmp r3, #0 8012066: d103 bne.n 8012070 8012068: 6b3b ldr r3, [r7, #48] @ 0x30 801206a: 6c1b ldr r3, [r3, #64] @ 0x40 801206c: 2b00 cmp r3, #0 801206e: d101 bne.n 8012074 8012070: 2301 movs r3, #1 8012072: e000 b.n 8012076 8012074: 2300 movs r3, #0 8012076: 2b00 cmp r3, #0 8012078: d10b bne.n 8012092 __asm volatile 801207a: f04f 0350 mov.w r3, #80 @ 0x50 801207e: f383 8811 msr BASEPRI, r3 8012082: f3bf 8f6f isb sy 8012086: f3bf 8f4f dsb sy 801208a: 61fb str r3, [r7, #28] } 801208c: bf00 nop 801208e: bf00 nop 8012090: e7fd b.n 801208e 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(); 8012092: f002 fe29 bl 8014ce8 __asm volatile 8012096: f3ef 8211 mrs r2, BASEPRI 801209a: f04f 0350 mov.w r3, #80 @ 0x50 801209e: f383 8811 msr BASEPRI, r3 80120a2: f3bf 8f6f isb sy 80120a6: f3bf 8f4f dsb sy 80120aa: 61ba str r2, [r7, #24] 80120ac: 617b str r3, [r7, #20] return ulOriginalBASEPRI; 80120ae: 69bb ldr r3, [r7, #24] uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 80120b0: 62fb str r3, [r7, #44] @ 0x2c { const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; 80120b2: 6b3b ldr r3, [r7, #48] @ 0x30 80120b4: 6b9b ldr r3, [r3, #56] @ 0x38 80120b6: 62bb str r3, [r7, #40] @ 0x28 /* Cannot block in an ISR, so check there is data available. */ if( uxMessagesWaiting > ( UBaseType_t ) 0 ) 80120b8: 6abb ldr r3, [r7, #40] @ 0x28 80120ba: 2b00 cmp r3, #0 80120bc: d02f beq.n 801211e { const int8_t cRxLock = pxQueue->cRxLock; 80120be: 6b3b ldr r3, [r7, #48] @ 0x30 80120c0: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 80120c4: f887 3027 strb.w r3, [r7, #39] @ 0x27 traceQUEUE_RECEIVE_FROM_ISR( pxQueue ); prvCopyDataFromQueue( pxQueue, pvBuffer ); 80120c8: 68b9 ldr r1, [r7, #8] 80120ca: 6b38 ldr r0, [r7, #48] @ 0x30 80120cc: f000 f918 bl 8012300 pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1; 80120d0: 6abb ldr r3, [r7, #40] @ 0x28 80120d2: 1e5a subs r2, r3, #1 80120d4: 6b3b ldr r3, [r7, #48] @ 0x30 80120d6: 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 ) 80120d8: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 80120dc: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80120e0: d112 bne.n 8012108 { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 80120e2: 6b3b ldr r3, [r7, #48] @ 0x30 80120e4: 691b ldr r3, [r3, #16] 80120e6: 2b00 cmp r3, #0 80120e8: d016 beq.n 8012118 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 80120ea: 6b3b ldr r3, [r7, #48] @ 0x30 80120ec: 3310 adds r3, #16 80120ee: 4618 mov r0, r3 80120f0: f001 fa7e bl 80135f0 80120f4: 4603 mov r3, r0 80120f6: 2b00 cmp r3, #0 80120f8: d00e beq.n 8012118 { /* The task waiting has a higher priority than us so force a context switch. */ if( pxHigherPriorityTaskWoken != NULL ) 80120fa: 687b ldr r3, [r7, #4] 80120fc: 2b00 cmp r3, #0 80120fe: d00b beq.n 8012118 { *pxHigherPriorityTaskWoken = pdTRUE; 8012100: 687b ldr r3, [r7, #4] 8012102: 2201 movs r2, #1 8012104: 601a str r2, [r3, #0] 8012106: e007 b.n 8012118 } 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 ); 8012108: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801210c: 3301 adds r3, #1 801210e: b2db uxtb r3, r3 8012110: b25a sxtb r2, r3 8012112: 6b3b ldr r3, [r7, #48] @ 0x30 8012114: f883 2044 strb.w r2, [r3, #68] @ 0x44 } xReturn = pdPASS; 8012118: 2301 movs r3, #1 801211a: 637b str r3, [r7, #52] @ 0x34 801211c: e001 b.n 8012122 } else { xReturn = pdFAIL; 801211e: 2300 movs r3, #0 8012120: 637b str r3, [r7, #52] @ 0x34 8012122: 6afb ldr r3, [r7, #44] @ 0x2c 8012124: 613b str r3, [r7, #16] __asm volatile 8012126: 693b ldr r3, [r7, #16] 8012128: f383 8811 msr BASEPRI, r3 } 801212c: bf00 nop traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue ); } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; 801212e: 6b7b ldr r3, [r7, #52] @ 0x34 } 8012130: 4618 mov r0, r3 8012132: 3738 adds r7, #56 @ 0x38 8012134: 46bd mov sp, r7 8012136: bd80 pop {r7, pc} 08012138 : return xReturn; } /*-----------------------------------------------------------*/ UBaseType_t uxQueueMessagesWaiting( const QueueHandle_t xQueue ) { 8012138: b580 push {r7, lr} 801213a: b084 sub sp, #16 801213c: af00 add r7, sp, #0 801213e: 6078 str r0, [r7, #4] UBaseType_t uxReturn; configASSERT( xQueue ); 8012140: 687b ldr r3, [r7, #4] 8012142: 2b00 cmp r3, #0 8012144: d10b bne.n 801215e __asm volatile 8012146: f04f 0350 mov.w r3, #80 @ 0x50 801214a: f383 8811 msr BASEPRI, r3 801214e: f3bf 8f6f isb sy 8012152: f3bf 8f4f dsb sy 8012156: 60bb str r3, [r7, #8] } 8012158: bf00 nop 801215a: bf00 nop 801215c: e7fd b.n 801215a taskENTER_CRITICAL(); 801215e: f002 fce3 bl 8014b28 { uxReturn = ( ( Queue_t * ) xQueue )->uxMessagesWaiting; 8012162: 687b ldr r3, [r7, #4] 8012164: 6b9b ldr r3, [r3, #56] @ 0x38 8012166: 60fb str r3, [r7, #12] } taskEXIT_CRITICAL(); 8012168: f002 fd10 bl 8014b8c return uxReturn; 801216c: 68fb ldr r3, [r7, #12] } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 801216e: 4618 mov r0, r3 8012170: 3710 adds r7, #16 8012172: 46bd mov sp, r7 8012174: bd80 pop {r7, pc} 08012176 : return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ /*-----------------------------------------------------------*/ UBaseType_t uxQueueMessagesWaitingFromISR( const QueueHandle_t xQueue ) { 8012176: b480 push {r7} 8012178: b087 sub sp, #28 801217a: af00 add r7, sp, #0 801217c: 6078 str r0, [r7, #4] UBaseType_t uxReturn; Queue_t * const pxQueue = xQueue; 801217e: 687b ldr r3, [r7, #4] 8012180: 617b str r3, [r7, #20] configASSERT( pxQueue ); 8012182: 697b ldr r3, [r7, #20] 8012184: 2b00 cmp r3, #0 8012186: d10b bne.n 80121a0 __asm volatile 8012188: f04f 0350 mov.w r3, #80 @ 0x50 801218c: f383 8811 msr BASEPRI, r3 8012190: f3bf 8f6f isb sy 8012194: f3bf 8f4f dsb sy 8012198: 60fb str r3, [r7, #12] } 801219a: bf00 nop 801219c: bf00 nop 801219e: e7fd b.n 801219c uxReturn = pxQueue->uxMessagesWaiting; 80121a0: 697b ldr r3, [r7, #20] 80121a2: 6b9b ldr r3, [r3, #56] @ 0x38 80121a4: 613b str r3, [r7, #16] return uxReturn; 80121a6: 693b ldr r3, [r7, #16] } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 80121a8: 4618 mov r0, r3 80121aa: 371c adds r7, #28 80121ac: 46bd mov sp, r7 80121ae: f85d 7b04 ldr.w r7, [sp], #4 80121b2: 4770 bx lr 080121b4 : /*-----------------------------------------------------------*/ void vQueueDelete( QueueHandle_t xQueue ) { 80121b4: b580 push {r7, lr} 80121b6: b084 sub sp, #16 80121b8: af00 add r7, sp, #0 80121ba: 6078 str r0, [r7, #4] Queue_t * const pxQueue = xQueue; 80121bc: 687b ldr r3, [r7, #4] 80121be: 60fb str r3, [r7, #12] configASSERT( pxQueue ); 80121c0: 68fb ldr r3, [r7, #12] 80121c2: 2b00 cmp r3, #0 80121c4: d10b bne.n 80121de __asm volatile 80121c6: f04f 0350 mov.w r3, #80 @ 0x50 80121ca: f383 8811 msr BASEPRI, r3 80121ce: f3bf 8f6f isb sy 80121d2: f3bf 8f4f dsb sy 80121d6: 60bb str r3, [r7, #8] } 80121d8: bf00 nop 80121da: bf00 nop 80121dc: e7fd b.n 80121da traceQUEUE_DELETE( pxQueue ); #if ( configQUEUE_REGISTRY_SIZE > 0 ) { vQueueUnregisterQueue( pxQueue ); 80121de: 68f8 ldr r0, [r7, #12] 80121e0: f000 f95e bl 80124a0 } #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 ) 80121e4: 68fb ldr r3, [r7, #12] 80121e6: f893 3046 ldrb.w r3, [r3, #70] @ 0x46 80121ea: 2b00 cmp r3, #0 80121ec: d102 bne.n 80121f4 { vPortFree( pxQueue ); 80121ee: 68f8 ldr r0, [r7, #12] 80121f0: f002 fe8a bl 8014f08 /* 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 */ } 80121f4: bf00 nop 80121f6: 3710 adds r7, #16 80121f8: 46bd mov sp, r7 80121fa: bd80 pop {r7, pc} 080121fc : /*-----------------------------------------------------------*/ #if( configUSE_MUTEXES == 1 ) static UBaseType_t prvGetDisinheritPriorityAfterTimeout( const Queue_t * const pxQueue ) { 80121fc: b480 push {r7} 80121fe: b085 sub sp, #20 8012200: af00 add r7, sp, #0 8012202: 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 ) 8012204: 687b ldr r3, [r7, #4] 8012206: 6a5b ldr r3, [r3, #36] @ 0x24 8012208: 2b00 cmp r3, #0 801220a: d006 beq.n 801221a { uxHighestPriorityOfWaitingTasks = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) listGET_ITEM_VALUE_OF_HEAD_ENTRY( &( pxQueue->xTasksWaitingToReceive ) ); 801220c: 687b ldr r3, [r7, #4] 801220e: 6b1b ldr r3, [r3, #48] @ 0x30 8012210: 681b ldr r3, [r3, #0] 8012212: f1c3 0338 rsb r3, r3, #56 @ 0x38 8012216: 60fb str r3, [r7, #12] 8012218: e001 b.n 801221e } else { uxHighestPriorityOfWaitingTasks = tskIDLE_PRIORITY; 801221a: 2300 movs r3, #0 801221c: 60fb str r3, [r7, #12] } return uxHighestPriorityOfWaitingTasks; 801221e: 68fb ldr r3, [r7, #12] } 8012220: 4618 mov r0, r3 8012222: 3714 adds r7, #20 8012224: 46bd mov sp, r7 8012226: f85d 7b04 ldr.w r7, [sp], #4 801222a: 4770 bx lr 0801222c : #endif /* configUSE_MUTEXES */ /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { 801222c: b580 push {r7, lr} 801222e: b086 sub sp, #24 8012230: af00 add r7, sp, #0 8012232: 60f8 str r0, [r7, #12] 8012234: 60b9 str r1, [r7, #8] 8012236: 607a str r2, [r7, #4] BaseType_t xReturn = pdFALSE; 8012238: 2300 movs r3, #0 801223a: 617b str r3, [r7, #20] UBaseType_t uxMessagesWaiting; /* This function is called from a critical section. */ uxMessagesWaiting = pxQueue->uxMessagesWaiting; 801223c: 68fb ldr r3, [r7, #12] 801223e: 6b9b ldr r3, [r3, #56] @ 0x38 8012240: 613b str r3, [r7, #16] if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 8012242: 68fb ldr r3, [r7, #12] 8012244: 6c1b ldr r3, [r3, #64] @ 0x40 8012246: 2b00 cmp r3, #0 8012248: d10d bne.n 8012266 { #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 801224a: 68fb ldr r3, [r7, #12] 801224c: 681b ldr r3, [r3, #0] 801224e: 2b00 cmp r3, #0 8012250: d14d bne.n 80122ee { /* The mutex is no longer being held. */ xReturn = xTaskPriorityDisinherit( pxQueue->u.xSemaphore.xMutexHolder ); 8012252: 68fb ldr r3, [r7, #12] 8012254: 689b ldr r3, [r3, #8] 8012256: 4618 mov r0, r3 8012258: f001 fc4e bl 8013af8 801225c: 6178 str r0, [r7, #20] pxQueue->u.xSemaphore.xMutexHolder = NULL; 801225e: 68fb ldr r3, [r7, #12] 8012260: 2200 movs r2, #0 8012262: 609a str r2, [r3, #8] 8012264: e043 b.n 80122ee mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ } else if( xPosition == queueSEND_TO_BACK ) 8012266: 687b ldr r3, [r7, #4] 8012268: 2b00 cmp r3, #0 801226a: d119 bne.n 80122a0 { ( 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. */ 801226c: 68fb ldr r3, [r7, #12] 801226e: 6858 ldr r0, [r3, #4] 8012270: 68fb ldr r3, [r7, #12] 8012272: 6c1b ldr r3, [r3, #64] @ 0x40 8012274: 461a mov r2, r3 8012276: 68b9 ldr r1, [r7, #8] 8012278: f017 fe31 bl 8029ede 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. */ 801227c: 68fb ldr r3, [r7, #12] 801227e: 685a ldr r2, [r3, #4] 8012280: 68fb ldr r3, [r7, #12] 8012282: 6c1b ldr r3, [r3, #64] @ 0x40 8012284: 441a add r2, r3 8012286: 68fb ldr r3, [r7, #12] 8012288: 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. */ 801228a: 68fb ldr r3, [r7, #12] 801228c: 685a ldr r2, [r3, #4] 801228e: 68fb ldr r3, [r7, #12] 8012290: 689b ldr r3, [r3, #8] 8012292: 429a cmp r2, r3 8012294: d32b bcc.n 80122ee { pxQueue->pcWriteTo = pxQueue->pcHead; 8012296: 68fb ldr r3, [r7, #12] 8012298: 681a ldr r2, [r3, #0] 801229a: 68fb ldr r3, [r7, #12] 801229c: 605a str r2, [r3, #4] 801229e: e026 b.n 80122ee 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. */ 80122a0: 68fb ldr r3, [r7, #12] 80122a2: 68d8 ldr r0, [r3, #12] 80122a4: 68fb ldr r3, [r7, #12] 80122a6: 6c1b ldr r3, [r3, #64] @ 0x40 80122a8: 461a mov r2, r3 80122aa: 68b9 ldr r1, [r7, #8] 80122ac: f017 fe17 bl 8029ede pxQueue->u.xQueue.pcReadFrom -= pxQueue->uxItemSize; 80122b0: 68fb ldr r3, [r7, #12] 80122b2: 68da ldr r2, [r3, #12] 80122b4: 68fb ldr r3, [r7, #12] 80122b6: 6c1b ldr r3, [r3, #64] @ 0x40 80122b8: 425b negs r3, r3 80122ba: 441a add r2, r3 80122bc: 68fb ldr r3, [r7, #12] 80122be: 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. */ 80122c0: 68fb ldr r3, [r7, #12] 80122c2: 68da ldr r2, [r3, #12] 80122c4: 68fb ldr r3, [r7, #12] 80122c6: 681b ldr r3, [r3, #0] 80122c8: 429a cmp r2, r3 80122ca: d207 bcs.n 80122dc { pxQueue->u.xQueue.pcReadFrom = ( pxQueue->u.xQueue.pcTail - pxQueue->uxItemSize ); 80122cc: 68fb ldr r3, [r7, #12] 80122ce: 689a ldr r2, [r3, #8] 80122d0: 68fb ldr r3, [r7, #12] 80122d2: 6c1b ldr r3, [r3, #64] @ 0x40 80122d4: 425b negs r3, r3 80122d6: 441a add r2, r3 80122d8: 68fb ldr r3, [r7, #12] 80122da: 60da str r2, [r3, #12] else { mtCOVERAGE_TEST_MARKER(); } if( xPosition == queueOVERWRITE ) 80122dc: 687b ldr r3, [r7, #4] 80122de: 2b02 cmp r3, #2 80122e0: d105 bne.n 80122ee { if( uxMessagesWaiting > ( UBaseType_t ) 0 ) 80122e2: 693b ldr r3, [r7, #16] 80122e4: 2b00 cmp r3, #0 80122e6: d002 beq.n 80122ee { /* 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; 80122e8: 693b ldr r3, [r7, #16] 80122ea: 3b01 subs r3, #1 80122ec: 613b str r3, [r7, #16] { mtCOVERAGE_TEST_MARKER(); } } pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1; 80122ee: 693b ldr r3, [r7, #16] 80122f0: 1c5a adds r2, r3, #1 80122f2: 68fb ldr r3, [r7, #12] 80122f4: 639a str r2, [r3, #56] @ 0x38 return xReturn; 80122f6: 697b ldr r3, [r7, #20] } 80122f8: 4618 mov r0, r3 80122fa: 3718 adds r7, #24 80122fc: 46bd mov sp, r7 80122fe: bd80 pop {r7, pc} 08012300 : /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { 8012300: b580 push {r7, lr} 8012302: b082 sub sp, #8 8012304: af00 add r7, sp, #0 8012306: 6078 str r0, [r7, #4] 8012308: 6039 str r1, [r7, #0] if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 801230a: 687b ldr r3, [r7, #4] 801230c: 6c1b ldr r3, [r3, #64] @ 0x40 801230e: 2b00 cmp r3, #0 8012310: d018 beq.n 8012344 { 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. */ 8012312: 687b ldr r3, [r7, #4] 8012314: 68da ldr r2, [r3, #12] 8012316: 687b ldr r3, [r7, #4] 8012318: 6c1b ldr r3, [r3, #64] @ 0x40 801231a: 441a add r2, r3 801231c: 687b ldr r3, [r7, #4] 801231e: 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. */ 8012320: 687b ldr r3, [r7, #4] 8012322: 68da ldr r2, [r3, #12] 8012324: 687b ldr r3, [r7, #4] 8012326: 689b ldr r3, [r3, #8] 8012328: 429a cmp r2, r3 801232a: d303 bcc.n 8012334 { pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead; 801232c: 687b ldr r3, [r7, #4] 801232e: 681a ldr r2, [r3, #0] 8012330: 687b ldr r3, [r7, #4] 8012332: 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. */ 8012334: 687b ldr r3, [r7, #4] 8012336: 68d9 ldr r1, [r3, #12] 8012338: 687b ldr r3, [r7, #4] 801233a: 6c1b ldr r3, [r3, #64] @ 0x40 801233c: 461a mov r2, r3 801233e: 6838 ldr r0, [r7, #0] 8012340: f017 fdcd bl 8029ede } } 8012344: bf00 nop 8012346: 3708 adds r7, #8 8012348: 46bd mov sp, r7 801234a: bd80 pop {r7, pc} 0801234c : /*-----------------------------------------------------------*/ static void prvUnlockQueue( Queue_t * const pxQueue ) { 801234c: b580 push {r7, lr} 801234e: b084 sub sp, #16 8012350: af00 add r7, sp, #0 8012352: 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(); 8012354: f002 fbe8 bl 8014b28 { int8_t cTxLock = pxQueue->cTxLock; 8012358: 687b ldr r3, [r7, #4] 801235a: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 801235e: 73fb strb r3, [r7, #15] /* See if data was added to the queue while it was locked. */ while( cTxLock > queueLOCKED_UNMODIFIED ) 8012360: e011 b.n 8012386 } #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 ) 8012362: 687b ldr r3, [r7, #4] 8012364: 6a5b ldr r3, [r3, #36] @ 0x24 8012366: 2b00 cmp r3, #0 8012368: d012 beq.n 8012390 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 801236a: 687b ldr r3, [r7, #4] 801236c: 3324 adds r3, #36 @ 0x24 801236e: 4618 mov r0, r3 8012370: f001 f93e bl 80135f0 8012374: 4603 mov r3, r0 8012376: 2b00 cmp r3, #0 8012378: d001 beq.n 801237e { /* The task waiting has a higher priority so record that a context switch is required. */ vTaskMissedYield(); 801237a: f001 fa3f bl 80137fc break; } } #endif /* configUSE_QUEUE_SETS */ --cTxLock; 801237e: 7bfb ldrb r3, [r7, #15] 8012380: 3b01 subs r3, #1 8012382: b2db uxtb r3, r3 8012384: 73fb strb r3, [r7, #15] while( cTxLock > queueLOCKED_UNMODIFIED ) 8012386: f997 300f ldrsb.w r3, [r7, #15] 801238a: 2b00 cmp r3, #0 801238c: dce9 bgt.n 8012362 801238e: e000 b.n 8012392 break; 8012390: bf00 nop } pxQueue->cTxLock = queueUNLOCKED; 8012392: 687b ldr r3, [r7, #4] 8012394: 22ff movs r2, #255 @ 0xff 8012396: f883 2045 strb.w r2, [r3, #69] @ 0x45 } taskEXIT_CRITICAL(); 801239a: f002 fbf7 bl 8014b8c /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); 801239e: f002 fbc3 bl 8014b28 { int8_t cRxLock = pxQueue->cRxLock; 80123a2: 687b ldr r3, [r7, #4] 80123a4: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 80123a8: 73bb strb r3, [r7, #14] while( cRxLock > queueLOCKED_UNMODIFIED ) 80123aa: e011 b.n 80123d0 { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 80123ac: 687b ldr r3, [r7, #4] 80123ae: 691b ldr r3, [r3, #16] 80123b0: 2b00 cmp r3, #0 80123b2: d012 beq.n 80123da { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 80123b4: 687b ldr r3, [r7, #4] 80123b6: 3310 adds r3, #16 80123b8: 4618 mov r0, r3 80123ba: f001 f919 bl 80135f0 80123be: 4603 mov r3, r0 80123c0: 2b00 cmp r3, #0 80123c2: d001 beq.n 80123c8 { vTaskMissedYield(); 80123c4: f001 fa1a bl 80137fc else { mtCOVERAGE_TEST_MARKER(); } --cRxLock; 80123c8: 7bbb ldrb r3, [r7, #14] 80123ca: 3b01 subs r3, #1 80123cc: b2db uxtb r3, r3 80123ce: 73bb strb r3, [r7, #14] while( cRxLock > queueLOCKED_UNMODIFIED ) 80123d0: f997 300e ldrsb.w r3, [r7, #14] 80123d4: 2b00 cmp r3, #0 80123d6: dce9 bgt.n 80123ac 80123d8: e000 b.n 80123dc } else { break; 80123da: bf00 nop } } pxQueue->cRxLock = queueUNLOCKED; 80123dc: 687b ldr r3, [r7, #4] 80123de: 22ff movs r2, #255 @ 0xff 80123e0: f883 2044 strb.w r2, [r3, #68] @ 0x44 } taskEXIT_CRITICAL(); 80123e4: f002 fbd2 bl 8014b8c } 80123e8: bf00 nop 80123ea: 3710 adds r7, #16 80123ec: 46bd mov sp, r7 80123ee: bd80 pop {r7, pc} 080123f0 : /*-----------------------------------------------------------*/ static BaseType_t prvIsQueueEmpty( const Queue_t *pxQueue ) { 80123f0: b580 push {r7, lr} 80123f2: b084 sub sp, #16 80123f4: af00 add r7, sp, #0 80123f6: 6078 str r0, [r7, #4] BaseType_t xReturn; taskENTER_CRITICAL(); 80123f8: f002 fb96 bl 8014b28 { if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 ) 80123fc: 687b ldr r3, [r7, #4] 80123fe: 6b9b ldr r3, [r3, #56] @ 0x38 8012400: 2b00 cmp r3, #0 8012402: d102 bne.n 801240a { xReturn = pdTRUE; 8012404: 2301 movs r3, #1 8012406: 60fb str r3, [r7, #12] 8012408: e001 b.n 801240e } else { xReturn = pdFALSE; 801240a: 2300 movs r3, #0 801240c: 60fb str r3, [r7, #12] } } taskEXIT_CRITICAL(); 801240e: f002 fbbd bl 8014b8c return xReturn; 8012412: 68fb ldr r3, [r7, #12] } 8012414: 4618 mov r0, r3 8012416: 3710 adds r7, #16 8012418: 46bd mov sp, r7 801241a: bd80 pop {r7, pc} 0801241c : return xReturn; } /*lint !e818 xQueue could not be pointer to const because it is a typedef. */ /*-----------------------------------------------------------*/ static BaseType_t prvIsQueueFull( const Queue_t *pxQueue ) { 801241c: b580 push {r7, lr} 801241e: b084 sub sp, #16 8012420: af00 add r7, sp, #0 8012422: 6078 str r0, [r7, #4] BaseType_t xReturn; taskENTER_CRITICAL(); 8012424: f002 fb80 bl 8014b28 { if( pxQueue->uxMessagesWaiting == pxQueue->uxLength ) 8012428: 687b ldr r3, [r7, #4] 801242a: 6b9a ldr r2, [r3, #56] @ 0x38 801242c: 687b ldr r3, [r7, #4] 801242e: 6bdb ldr r3, [r3, #60] @ 0x3c 8012430: 429a cmp r2, r3 8012432: d102 bne.n 801243a { xReturn = pdTRUE; 8012434: 2301 movs r3, #1 8012436: 60fb str r3, [r7, #12] 8012438: e001 b.n 801243e } else { xReturn = pdFALSE; 801243a: 2300 movs r3, #0 801243c: 60fb str r3, [r7, #12] } } taskEXIT_CRITICAL(); 801243e: f002 fba5 bl 8014b8c return xReturn; 8012442: 68fb ldr r3, [r7, #12] } 8012444: 4618 mov r0, r3 8012446: 3710 adds r7, #16 8012448: 46bd mov sp, r7 801244a: bd80 pop {r7, pc} 0801244c : /*-----------------------------------------------------------*/ #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. */ { 801244c: b480 push {r7} 801244e: b085 sub sp, #20 8012450: af00 add r7, sp, #0 8012452: 6078 str r0, [r7, #4] 8012454: 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++ ) 8012456: 2300 movs r3, #0 8012458: 60fb str r3, [r7, #12] 801245a: e014 b.n 8012486 { if( xQueueRegistry[ ux ].pcQueueName == NULL ) 801245c: 4a0f ldr r2, [pc, #60] @ (801249c ) 801245e: 68fb ldr r3, [r7, #12] 8012460: f852 3033 ldr.w r3, [r2, r3, lsl #3] 8012464: 2b00 cmp r3, #0 8012466: d10b bne.n 8012480 { /* Store the information on this queue. */ xQueueRegistry[ ux ].pcQueueName = pcQueueName; 8012468: 490c ldr r1, [pc, #48] @ (801249c ) 801246a: 68fb ldr r3, [r7, #12] 801246c: 683a ldr r2, [r7, #0] 801246e: f841 2033 str.w r2, [r1, r3, lsl #3] xQueueRegistry[ ux ].xHandle = xQueue; 8012472: 4a0a ldr r2, [pc, #40] @ (801249c ) 8012474: 68fb ldr r3, [r7, #12] 8012476: 00db lsls r3, r3, #3 8012478: 4413 add r3, r2 801247a: 687a ldr r2, [r7, #4] 801247c: 605a str r2, [r3, #4] traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName ); break; 801247e: e006 b.n 801248e for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ ) 8012480: 68fb ldr r3, [r7, #12] 8012482: 3301 adds r3, #1 8012484: 60fb str r3, [r7, #12] 8012486: 68fb ldr r3, [r7, #12] 8012488: 2b07 cmp r3, #7 801248a: d9e7 bls.n 801245c else { mtCOVERAGE_TEST_MARKER(); } } } 801248c: bf00 nop 801248e: bf00 nop 8012490: 3714 adds r7, #20 8012492: 46bd mov sp, r7 8012494: f85d 7b04 ldr.w r7, [sp], #4 8012498: 4770 bx lr 801249a: bf00 nop 801249c: 24003c50 .word 0x24003c50 080124a0 : /*-----------------------------------------------------------*/ #if ( configQUEUE_REGISTRY_SIZE > 0 ) void vQueueUnregisterQueue( QueueHandle_t xQueue ) { 80124a0: b480 push {r7} 80124a2: b085 sub sp, #20 80124a4: af00 add r7, sp, #0 80124a6: 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++ ) 80124a8: 2300 movs r3, #0 80124aa: 60fb str r3, [r7, #12] 80124ac: e016 b.n 80124dc { if( xQueueRegistry[ ux ].xHandle == xQueue ) 80124ae: 4a10 ldr r2, [pc, #64] @ (80124f0 ) 80124b0: 68fb ldr r3, [r7, #12] 80124b2: 00db lsls r3, r3, #3 80124b4: 4413 add r3, r2 80124b6: 685b ldr r3, [r3, #4] 80124b8: 687a ldr r2, [r7, #4] 80124ba: 429a cmp r2, r3 80124bc: d10b bne.n 80124d6 { /* Set the name to NULL to show that this slot if free again. */ xQueueRegistry[ ux ].pcQueueName = NULL; 80124be: 4a0c ldr r2, [pc, #48] @ (80124f0 ) 80124c0: 68fb ldr r3, [r7, #12] 80124c2: 2100 movs r1, #0 80124c4: 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; 80124c8: 4a09 ldr r2, [pc, #36] @ (80124f0 ) 80124ca: 68fb ldr r3, [r7, #12] 80124cc: 00db lsls r3, r3, #3 80124ce: 4413 add r3, r2 80124d0: 2200 movs r2, #0 80124d2: 605a str r2, [r3, #4] break; 80124d4: e006 b.n 80124e4 for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ ) 80124d6: 68fb ldr r3, [r7, #12] 80124d8: 3301 adds r3, #1 80124da: 60fb str r3, [r7, #12] 80124dc: 68fb ldr r3, [r7, #12] 80124de: 2b07 cmp r3, #7 80124e0: d9e5 bls.n 80124ae { mtCOVERAGE_TEST_MARKER(); } } } /*lint !e818 xQueue could not be pointer to const because it is a typedef. */ 80124e2: bf00 nop 80124e4: bf00 nop 80124e6: 3714 adds r7, #20 80124e8: 46bd mov sp, r7 80124ea: f85d 7b04 ldr.w r7, [sp], #4 80124ee: 4770 bx lr 80124f0: 24003c50 .word 0x24003c50 080124f4 : /*-----------------------------------------------------------*/ #if ( configUSE_TIMERS == 1 ) void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely ) { 80124f4: b580 push {r7, lr} 80124f6: b086 sub sp, #24 80124f8: af00 add r7, sp, #0 80124fa: 60f8 str r0, [r7, #12] 80124fc: 60b9 str r1, [r7, #8] 80124fe: 607a str r2, [r7, #4] Queue_t * const pxQueue = xQueue; 8012500: 68fb ldr r3, [r7, #12] 8012502: 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 ); 8012504: f002 fb10 bl 8014b28 8012508: 697b ldr r3, [r7, #20] 801250a: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 801250e: b25b sxtb r3, r3 8012510: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8012514: d103 bne.n 801251e 8012516: 697b ldr r3, [r7, #20] 8012518: 2200 movs r2, #0 801251a: f883 2044 strb.w r2, [r3, #68] @ 0x44 801251e: 697b ldr r3, [r7, #20] 8012520: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 8012524: b25b sxtb r3, r3 8012526: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 801252a: d103 bne.n 8012534 801252c: 697b ldr r3, [r7, #20] 801252e: 2200 movs r2, #0 8012530: f883 2045 strb.w r2, [r3, #69] @ 0x45 8012534: f002 fb2a bl 8014b8c if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0U ) 8012538: 697b ldr r3, [r7, #20] 801253a: 6b9b ldr r3, [r3, #56] @ 0x38 801253c: 2b00 cmp r3, #0 801253e: d106 bne.n 801254e { /* There is nothing in the queue, block for the specified period. */ vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait, xWaitIndefinitely ); 8012540: 697b ldr r3, [r7, #20] 8012542: 3324 adds r3, #36 @ 0x24 8012544: 687a ldr r2, [r7, #4] 8012546: 68b9 ldr r1, [r7, #8] 8012548: 4618 mov r0, r3 801254a: f001 f825 bl 8013598 } else { mtCOVERAGE_TEST_MARKER(); } prvUnlockQueue( pxQueue ); 801254e: 6978 ldr r0, [r7, #20] 8012550: f7ff fefc bl 801234c } 8012554: bf00 nop 8012556: 3718 adds r7, #24 8012558: 46bd mov sp, r7 801255a: bd80 pop {r7, pc} 0801255c : /*-----------------------------------------------------------*/ #if( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) StreamBufferHandle_t xStreamBufferGenericCreate( size_t xBufferSizeBytes, size_t xTriggerLevelBytes, BaseType_t xIsMessageBuffer ) { 801255c: b580 push {r7, lr} 801255e: b08c sub sp, #48 @ 0x30 8012560: af02 add r7, sp, #8 8012562: 60f8 str r0, [r7, #12] 8012564: 60b9 str r1, [r7, #8] 8012566: 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 ) 8012568: 687b ldr r3, [r7, #4] 801256a: 2b01 cmp r3, #1 801256c: d111 bne.n 8012592 { /* Is a message buffer but not statically allocated. */ ucFlags = sbFLAGS_IS_MESSAGE_BUFFER; 801256e: 2301 movs r3, #1 8012570: f887 3027 strb.w r3, [r7, #39] @ 0x27 configASSERT( xBufferSizeBytes > sbBYTES_TO_STORE_MESSAGE_LENGTH ); 8012574: 68fb ldr r3, [r7, #12] 8012576: 2b04 cmp r3, #4 8012578: d81d bhi.n 80125b6 __asm volatile 801257a: f04f 0350 mov.w r3, #80 @ 0x50 801257e: f383 8811 msr BASEPRI, r3 8012582: f3bf 8f6f isb sy 8012586: f3bf 8f4f dsb sy 801258a: 61fb str r3, [r7, #28] } 801258c: bf00 nop 801258e: bf00 nop 8012590: e7fd b.n 801258e } else { /* Not a message buffer and not statically allocated. */ ucFlags = 0; 8012592: 2300 movs r3, #0 8012594: f887 3027 strb.w r3, [r7, #39] @ 0x27 configASSERT( xBufferSizeBytes > 0 ); 8012598: 68fb ldr r3, [r7, #12] 801259a: 2b00 cmp r3, #0 801259c: d10b bne.n 80125b6 __asm volatile 801259e: f04f 0350 mov.w r3, #80 @ 0x50 80125a2: f383 8811 msr BASEPRI, r3 80125a6: f3bf 8f6f isb sy 80125aa: f3bf 8f4f dsb sy 80125ae: 61bb str r3, [r7, #24] } 80125b0: bf00 nop 80125b2: bf00 nop 80125b4: e7fd b.n 80125b2 } configASSERT( xTriggerLevelBytes <= xBufferSizeBytes ); 80125b6: 68ba ldr r2, [r7, #8] 80125b8: 68fb ldr r3, [r7, #12] 80125ba: 429a cmp r2, r3 80125bc: d90b bls.n 80125d6 __asm volatile 80125be: f04f 0350 mov.w r3, #80 @ 0x50 80125c2: f383 8811 msr BASEPRI, r3 80125c6: f3bf 8f6f isb sy 80125ca: f3bf 8f4f dsb sy 80125ce: 617b str r3, [r7, #20] } 80125d0: bf00 nop 80125d2: bf00 nop 80125d4: e7fd b.n 80125d2 /* A trigger level of 0 would cause a waiting task to unblock even when the buffer was empty. */ if( xTriggerLevelBytes == ( size_t ) 0 ) 80125d6: 68bb ldr r3, [r7, #8] 80125d8: 2b00 cmp r3, #0 80125da: d101 bne.n 80125e0 { xTriggerLevelBytes = ( size_t ) 1; 80125dc: 2301 movs r3, #1 80125de: 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++; 80125e0: 68fb ldr r3, [r7, #12] 80125e2: 3301 adds r3, #1 80125e4: 60fb str r3, [r7, #12] pucAllocatedMemory = ( uint8_t * ) pvPortMalloc( xBufferSizeBytes + sizeof( StreamBuffer_t ) ); /*lint !e9079 malloc() only returns void*. */ 80125e6: 68fb ldr r3, [r7, #12] 80125e8: 3324 adds r3, #36 @ 0x24 80125ea: 4618 mov r0, r3 80125ec: f002 fbbe bl 8014d6c 80125f0: 6238 str r0, [r7, #32] if( pucAllocatedMemory != NULL ) 80125f2: 6a3b ldr r3, [r7, #32] 80125f4: 2b00 cmp r3, #0 80125f6: d00a beq.n 801260e { 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. */ 80125f8: 6a3b ldr r3, [r7, #32] 80125fa: f103 0124 add.w r1, r3, #36 @ 0x24 80125fe: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 8012602: 9300 str r3, [sp, #0] 8012604: 68bb ldr r3, [r7, #8] 8012606: 68fa ldr r2, [r7, #12] 8012608: 6a38 ldr r0, [r7, #32] 801260a: f000 fb0b bl 8012c24 else { traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer ); } return ( StreamBufferHandle_t ) pucAllocatedMemory; /*lint !e9087 !e826 Safe cast as allocated memory is aligned. */ 801260e: 6a3b ldr r3, [r7, #32] } 8012610: 4618 mov r0, r3 8012612: 3728 adds r7, #40 @ 0x28 8012614: 46bd mov sp, r7 8012616: bd80 pop {r7, pc} 08012618 : return xReturn; } /*-----------------------------------------------------------*/ size_t xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) { 8012618: b480 push {r7} 801261a: b087 sub sp, #28 801261c: af00 add r7, sp, #0 801261e: 6078 str r0, [r7, #4] const StreamBuffer_t * const pxStreamBuffer = xStreamBuffer; 8012620: 687b ldr r3, [r7, #4] 8012622: 613b str r3, [r7, #16] size_t xSpace; configASSERT( pxStreamBuffer ); 8012624: 693b ldr r3, [r7, #16] 8012626: 2b00 cmp r3, #0 8012628: d10b bne.n 8012642 __asm volatile 801262a: f04f 0350 mov.w r3, #80 @ 0x50 801262e: f383 8811 msr BASEPRI, r3 8012632: f3bf 8f6f isb sy 8012636: f3bf 8f4f dsb sy 801263a: 60fb str r3, [r7, #12] } 801263c: bf00 nop 801263e: bf00 nop 8012640: e7fd b.n 801263e xSpace = pxStreamBuffer->xLength + pxStreamBuffer->xTail; 8012642: 693b ldr r3, [r7, #16] 8012644: 689a ldr r2, [r3, #8] 8012646: 693b ldr r3, [r7, #16] 8012648: 681b ldr r3, [r3, #0] 801264a: 4413 add r3, r2 801264c: 617b str r3, [r7, #20] xSpace -= pxStreamBuffer->xHead; 801264e: 693b ldr r3, [r7, #16] 8012650: 685b ldr r3, [r3, #4] 8012652: 697a ldr r2, [r7, #20] 8012654: 1ad3 subs r3, r2, r3 8012656: 617b str r3, [r7, #20] xSpace -= ( size_t ) 1; 8012658: 697b ldr r3, [r7, #20] 801265a: 3b01 subs r3, #1 801265c: 617b str r3, [r7, #20] if( xSpace >= pxStreamBuffer->xLength ) 801265e: 693b ldr r3, [r7, #16] 8012660: 689b ldr r3, [r3, #8] 8012662: 697a ldr r2, [r7, #20] 8012664: 429a cmp r2, r3 8012666: d304 bcc.n 8012672 { xSpace -= pxStreamBuffer->xLength; 8012668: 693b ldr r3, [r7, #16] 801266a: 689b ldr r3, [r3, #8] 801266c: 697a ldr r2, [r7, #20] 801266e: 1ad3 subs r3, r2, r3 8012670: 617b str r3, [r7, #20] else { mtCOVERAGE_TEST_MARKER(); } return xSpace; 8012672: 697b ldr r3, [r7, #20] } 8012674: 4618 mov r0, r3 8012676: 371c adds r7, #28 8012678: 46bd mov sp, r7 801267a: f85d 7b04 ldr.w r7, [sp], #4 801267e: 4770 bx lr 08012680 : size_t xStreamBufferSend( StreamBufferHandle_t xStreamBuffer, const void *pvTxData, size_t xDataLengthBytes, TickType_t xTicksToWait ) { 8012680: b580 push {r7, lr} 8012682: b090 sub sp, #64 @ 0x40 8012684: af02 add r7, sp, #8 8012686: 60f8 str r0, [r7, #12] 8012688: 60b9 str r1, [r7, #8] 801268a: 607a str r2, [r7, #4] 801268c: 603b str r3, [r7, #0] StreamBuffer_t * const pxStreamBuffer = xStreamBuffer; 801268e: 68fb ldr r3, [r7, #12] 8012690: 62fb str r3, [r7, #44] @ 0x2c size_t xReturn, xSpace = 0; 8012692: 2300 movs r3, #0 8012694: 637b str r3, [r7, #52] @ 0x34 size_t xRequiredSpace = xDataLengthBytes; 8012696: 687b ldr r3, [r7, #4] 8012698: 633b str r3, [r7, #48] @ 0x30 TimeOut_t xTimeOut; configASSERT( pvTxData ); 801269a: 68bb ldr r3, [r7, #8] 801269c: 2b00 cmp r3, #0 801269e: d10b bne.n 80126b8 __asm volatile 80126a0: f04f 0350 mov.w r3, #80 @ 0x50 80126a4: f383 8811 msr BASEPRI, r3 80126a8: f3bf 8f6f isb sy 80126ac: f3bf 8f4f dsb sy 80126b0: 627b str r3, [r7, #36] @ 0x24 } 80126b2: bf00 nop 80126b4: bf00 nop 80126b6: e7fd b.n 80126b4 configASSERT( pxStreamBuffer ); 80126b8: 6afb ldr r3, [r7, #44] @ 0x2c 80126ba: 2b00 cmp r3, #0 80126bc: d10b bne.n 80126d6 __asm volatile 80126be: f04f 0350 mov.w r3, #80 @ 0x50 80126c2: f383 8811 msr BASEPRI, r3 80126c6: f3bf 8f6f isb sy 80126ca: f3bf 8f4f dsb sy 80126ce: 623b str r3, [r7, #32] } 80126d0: bf00 nop 80126d2: bf00 nop 80126d4: e7fd b.n 80126d2 /* 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 ) 80126d6: 6afb ldr r3, [r7, #44] @ 0x2c 80126d8: 7f1b ldrb r3, [r3, #28] 80126da: f003 0301 and.w r3, r3, #1 80126de: 2b00 cmp r3, #0 80126e0: d012 beq.n 8012708 { xRequiredSpace += sbBYTES_TO_STORE_MESSAGE_LENGTH; 80126e2: 6b3b ldr r3, [r7, #48] @ 0x30 80126e4: 3304 adds r3, #4 80126e6: 633b str r3, [r7, #48] @ 0x30 /* Overflow? */ configASSERT( xRequiredSpace > xDataLengthBytes ); 80126e8: 6b3a ldr r2, [r7, #48] @ 0x30 80126ea: 687b ldr r3, [r7, #4] 80126ec: 429a cmp r2, r3 80126ee: d80b bhi.n 8012708 __asm volatile 80126f0: f04f 0350 mov.w r3, #80 @ 0x50 80126f4: f383 8811 msr BASEPRI, r3 80126f8: f3bf 8f6f isb sy 80126fc: f3bf 8f4f dsb sy 8012700: 61fb str r3, [r7, #28] } 8012702: bf00 nop 8012704: bf00 nop 8012706: e7fd b.n 8012704 else { mtCOVERAGE_TEST_MARKER(); } if( xTicksToWait != ( TickType_t ) 0 ) 8012708: 683b ldr r3, [r7, #0] 801270a: 2b00 cmp r3, #0 801270c: d03f beq.n 801278e { vTaskSetTimeOutState( &xTimeOut ); 801270e: f107 0310 add.w r3, r7, #16 8012712: 4618 mov r0, r3 8012714: f000 ffd0 bl 80136b8 do { /* Wait until the required number of bytes are free in the message buffer. */ taskENTER_CRITICAL(); 8012718: f002 fa06 bl 8014b28 { xSpace = xStreamBufferSpacesAvailable( pxStreamBuffer ); 801271c: 6af8 ldr r0, [r7, #44] @ 0x2c 801271e: f7ff ff7b bl 8012618 8012722: 6378 str r0, [r7, #52] @ 0x34 if( xSpace < xRequiredSpace ) 8012724: 6b7a ldr r2, [r7, #52] @ 0x34 8012726: 6b3b ldr r3, [r7, #48] @ 0x30 8012728: 429a cmp r2, r3 801272a: d218 bcs.n 801275e { /* Clear notification state as going to wait for space. */ ( void ) xTaskNotifyStateClear( NULL ); 801272c: 2000 movs r0, #0 801272e: f001 fcf3 bl 8014118 /* Should only be one writer. */ configASSERT( pxStreamBuffer->xTaskWaitingToSend == NULL ); 8012732: 6afb ldr r3, [r7, #44] @ 0x2c 8012734: 695b ldr r3, [r3, #20] 8012736: 2b00 cmp r3, #0 8012738: d00b beq.n 8012752 __asm volatile 801273a: f04f 0350 mov.w r3, #80 @ 0x50 801273e: f383 8811 msr BASEPRI, r3 8012742: f3bf 8f6f isb sy 8012746: f3bf 8f4f dsb sy 801274a: 61bb str r3, [r7, #24] } 801274c: bf00 nop 801274e: bf00 nop 8012750: e7fd b.n 801274e pxStreamBuffer->xTaskWaitingToSend = xTaskGetCurrentTaskHandle(); 8012752: f001 f93b bl 80139cc 8012756: 4602 mov r2, r0 8012758: 6afb ldr r3, [r7, #44] @ 0x2c 801275a: 615a str r2, [r3, #20] 801275c: e002 b.n 8012764 } else { taskEXIT_CRITICAL(); 801275e: f002 fa15 bl 8014b8c break; 8012762: e014 b.n 801278e } } taskEXIT_CRITICAL(); 8012764: f002 fa12 bl 8014b8c traceBLOCKING_ON_STREAM_BUFFER_SEND( xStreamBuffer ); ( void ) xTaskNotifyWait( ( uint32_t ) 0, ( uint32_t ) 0, NULL, xTicksToWait ); 8012768: 683b ldr r3, [r7, #0] 801276a: 2200 movs r2, #0 801276c: 2100 movs r1, #0 801276e: 2000 movs r0, #0 8012770: f001 faca bl 8013d08 pxStreamBuffer->xTaskWaitingToSend = NULL; 8012774: 6afb ldr r3, [r7, #44] @ 0x2c 8012776: 2200 movs r2, #0 8012778: 615a str r2, [r3, #20] } while( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ); 801277a: 463a mov r2, r7 801277c: f107 0310 add.w r3, r7, #16 8012780: 4611 mov r1, r2 8012782: 4618 mov r0, r3 8012784: f000 ffd6 bl 8013734 8012788: 4603 mov r3, r0 801278a: 2b00 cmp r3, #0 801278c: d0c4 beq.n 8012718 else { mtCOVERAGE_TEST_MARKER(); } if( xSpace == ( size_t ) 0 ) 801278e: 6b7b ldr r3, [r7, #52] @ 0x34 8012790: 2b00 cmp r3, #0 8012792: d103 bne.n 801279c { xSpace = xStreamBufferSpacesAvailable( pxStreamBuffer ); 8012794: 6af8 ldr r0, [r7, #44] @ 0x2c 8012796: f7ff ff3f bl 8012618 801279a: 6378 str r0, [r7, #52] @ 0x34 else { mtCOVERAGE_TEST_MARKER(); } xReturn = prvWriteMessageToBuffer( pxStreamBuffer, pvTxData, xDataLengthBytes, xSpace, xRequiredSpace ); 801279c: 6b3b ldr r3, [r7, #48] @ 0x30 801279e: 9300 str r3, [sp, #0] 80127a0: 6b7b ldr r3, [r7, #52] @ 0x34 80127a2: 687a ldr r2, [r7, #4] 80127a4: 68b9 ldr r1, [r7, #8] 80127a6: 6af8 ldr r0, [r7, #44] @ 0x2c 80127a8: f000 f823 bl 80127f2 80127ac: 62b8 str r0, [r7, #40] @ 0x28 if( xReturn > ( size_t ) 0 ) 80127ae: 6abb ldr r3, [r7, #40] @ 0x28 80127b0: 2b00 cmp r3, #0 80127b2: d019 beq.n 80127e8 { traceSTREAM_BUFFER_SEND( xStreamBuffer, xReturn ); /* Was a task waiting for the data? */ if( prvBytesInBuffer( pxStreamBuffer ) >= pxStreamBuffer->xTriggerLevelBytes ) 80127b4: 6af8 ldr r0, [r7, #44] @ 0x2c 80127b6: f000 fa15 bl 8012be4 80127ba: 4602 mov r2, r0 80127bc: 6afb ldr r3, [r7, #44] @ 0x2c 80127be: 68db ldr r3, [r3, #12] 80127c0: 429a cmp r2, r3 80127c2: d311 bcc.n 80127e8 { sbSEND_COMPLETED( pxStreamBuffer ); 80127c4: f000 fcc6 bl 8013154 80127c8: 6afb ldr r3, [r7, #44] @ 0x2c 80127ca: 691b ldr r3, [r3, #16] 80127cc: 2b00 cmp r3, #0 80127ce: d009 beq.n 80127e4 80127d0: 6afb ldr r3, [r7, #44] @ 0x2c 80127d2: 6918 ldr r0, [r3, #16] 80127d4: 2300 movs r3, #0 80127d6: 2200 movs r2, #0 80127d8: 2100 movs r1, #0 80127da: f001 faf5 bl 8013dc8 80127de: 6afb ldr r3, [r7, #44] @ 0x2c 80127e0: 2200 movs r2, #0 80127e2: 611a str r2, [r3, #16] 80127e4: f000 fcc4 bl 8013170 { mtCOVERAGE_TEST_MARKER(); traceSTREAM_BUFFER_SEND_FAILED( xStreamBuffer ); } return xReturn; 80127e8: 6abb ldr r3, [r7, #40] @ 0x28 } 80127ea: 4618 mov r0, r3 80127ec: 3738 adds r7, #56 @ 0x38 80127ee: 46bd mov sp, r7 80127f0: bd80 pop {r7, pc} 080127f2 : static size_t prvWriteMessageToBuffer( StreamBuffer_t * const pxStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, size_t xSpace, size_t xRequiredSpace ) { 80127f2: b580 push {r7, lr} 80127f4: b086 sub sp, #24 80127f6: af00 add r7, sp, #0 80127f8: 60f8 str r0, [r7, #12] 80127fa: 60b9 str r1, [r7, #8] 80127fc: 607a str r2, [r7, #4] 80127fe: 603b str r3, [r7, #0] BaseType_t xShouldWrite; size_t xReturn; if( xSpace == ( size_t ) 0 ) 8012800: 683b ldr r3, [r7, #0] 8012802: 2b00 cmp r3, #0 8012804: d102 bne.n 801280c { /* Doesn't matter if this is a stream buffer or a message buffer, there is no space to write. */ xShouldWrite = pdFALSE; 8012806: 2300 movs r3, #0 8012808: 617b str r3, [r7, #20] 801280a: e01d b.n 8012848 } else if( ( pxStreamBuffer->ucFlags & sbFLAGS_IS_MESSAGE_BUFFER ) == ( uint8_t ) 0 ) 801280c: 68fb ldr r3, [r7, #12] 801280e: 7f1b ldrb r3, [r3, #28] 8012810: f003 0301 and.w r3, r3, #1 8012814: 2b00 cmp r3, #0 8012816: d108 bne.n 801282a { /* 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; 8012818: 2301 movs r3, #1 801281a: 617b str r3, [r7, #20] xDataLengthBytes = configMIN( xDataLengthBytes, xSpace ); 801281c: 687a ldr r2, [r7, #4] 801281e: 683b ldr r3, [r7, #0] 8012820: 4293 cmp r3, r2 8012822: bf28 it cs 8012824: 4613 movcs r3, r2 8012826: 607b str r3, [r7, #4] 8012828: e00e b.n 8012848 } else if( xSpace >= xRequiredSpace ) 801282a: 683a ldr r2, [r7, #0] 801282c: 6a3b ldr r3, [r7, #32] 801282e: 429a cmp r2, r3 8012830: d308 bcc.n 8012844 { /* 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; 8012832: 2301 movs r3, #1 8012834: 617b str r3, [r7, #20] ( void ) prvWriteBytesToBuffer( pxStreamBuffer, ( const uint8_t * ) &( xDataLengthBytes ), sbBYTES_TO_STORE_MESSAGE_LENGTH ); 8012836: 1d3b adds r3, r7, #4 8012838: 2204 movs r2, #4 801283a: 4619 mov r1, r3 801283c: 68f8 ldr r0, [r7, #12] 801283e: f000 f8df bl 8012a00 8012842: e001 b.n 8012848 } else { /* There is space available, but not enough space. */ xShouldWrite = pdFALSE; 8012844: 2300 movs r3, #0 8012846: 617b str r3, [r7, #20] } if( xShouldWrite != pdFALSE ) 8012848: 697b ldr r3, [r7, #20] 801284a: 2b00 cmp r3, #0 801284c: d007 beq.n 801285e { /* 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. */ 801284e: 687b ldr r3, [r7, #4] 8012850: 461a mov r2, r3 8012852: 68b9 ldr r1, [r7, #8] 8012854: 68f8 ldr r0, [r7, #12] 8012856: f000 f8d3 bl 8012a00 801285a: 6138 str r0, [r7, #16] 801285c: e001 b.n 8012862 } else { xReturn = 0; 801285e: 2300 movs r3, #0 8012860: 613b str r3, [r7, #16] } return xReturn; 8012862: 693b ldr r3, [r7, #16] } 8012864: 4618 mov r0, r3 8012866: 3718 adds r7, #24 8012868: 46bd mov sp, r7 801286a: bd80 pop {r7, pc} 0801286c : size_t xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, TickType_t xTicksToWait ) { 801286c: b580 push {r7, lr} 801286e: b08e sub sp, #56 @ 0x38 8012870: af02 add r7, sp, #8 8012872: 60f8 str r0, [r7, #12] 8012874: 60b9 str r1, [r7, #8] 8012876: 607a str r2, [r7, #4] 8012878: 603b str r3, [r7, #0] StreamBuffer_t * const pxStreamBuffer = xStreamBuffer; 801287a: 68fb ldr r3, [r7, #12] 801287c: 623b str r3, [r7, #32] size_t xReceivedLength = 0, xBytesAvailable, xBytesToStoreMessageLength; 801287e: 2300 movs r3, #0 8012880: 62fb str r3, [r7, #44] @ 0x2c configASSERT( pvRxData ); 8012882: 68bb ldr r3, [r7, #8] 8012884: 2b00 cmp r3, #0 8012886: d10b bne.n 80128a0 __asm volatile 8012888: f04f 0350 mov.w r3, #80 @ 0x50 801288c: f383 8811 msr BASEPRI, r3 8012890: f3bf 8f6f isb sy 8012894: f3bf 8f4f dsb sy 8012898: 61fb str r3, [r7, #28] } 801289a: bf00 nop 801289c: bf00 nop 801289e: e7fd b.n 801289c configASSERT( pxStreamBuffer ); 80128a0: 6a3b ldr r3, [r7, #32] 80128a2: 2b00 cmp r3, #0 80128a4: d10b bne.n 80128be __asm volatile 80128a6: f04f 0350 mov.w r3, #80 @ 0x50 80128aa: f383 8811 msr BASEPRI, r3 80128ae: f3bf 8f6f isb sy 80128b2: f3bf 8f4f dsb sy 80128b6: 61bb str r3, [r7, #24] } 80128b8: bf00 nop 80128ba: bf00 nop 80128bc: e7fd b.n 80128ba /* 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 ) 80128be: 6a3b ldr r3, [r7, #32] 80128c0: 7f1b ldrb r3, [r3, #28] 80128c2: f003 0301 and.w r3, r3, #1 80128c6: 2b00 cmp r3, #0 80128c8: d002 beq.n 80128d0 { xBytesToStoreMessageLength = sbBYTES_TO_STORE_MESSAGE_LENGTH; 80128ca: 2304 movs r3, #4 80128cc: 627b str r3, [r7, #36] @ 0x24 80128ce: e001 b.n 80128d4 } else { xBytesToStoreMessageLength = 0; 80128d0: 2300 movs r3, #0 80128d2: 627b str r3, [r7, #36] @ 0x24 } if( xTicksToWait != ( TickType_t ) 0 ) 80128d4: 683b ldr r3, [r7, #0] 80128d6: 2b00 cmp r3, #0 80128d8: d035 beq.n 8012946 { /* Checking if there is data and clearing the notification state must be performed atomically. */ taskENTER_CRITICAL(); 80128da: f002 f925 bl 8014b28 { xBytesAvailable = prvBytesInBuffer( pxStreamBuffer ); 80128de: 6a38 ldr r0, [r7, #32] 80128e0: f000 f980 bl 8012be4 80128e4: 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 ) 80128e6: 6aba ldr r2, [r7, #40] @ 0x28 80128e8: 6a7b ldr r3, [r7, #36] @ 0x24 80128ea: 429a cmp r2, r3 80128ec: d817 bhi.n 801291e { /* Clear notification state as going to wait for data. */ ( void ) xTaskNotifyStateClear( NULL ); 80128ee: 2000 movs r0, #0 80128f0: f001 fc12 bl 8014118 /* Should only be one reader. */ configASSERT( pxStreamBuffer->xTaskWaitingToReceive == NULL ); 80128f4: 6a3b ldr r3, [r7, #32] 80128f6: 691b ldr r3, [r3, #16] 80128f8: 2b00 cmp r3, #0 80128fa: d00b beq.n 8012914 __asm volatile 80128fc: f04f 0350 mov.w r3, #80 @ 0x50 8012900: f383 8811 msr BASEPRI, r3 8012904: f3bf 8f6f isb sy 8012908: f3bf 8f4f dsb sy 801290c: 617b str r3, [r7, #20] } 801290e: bf00 nop 8012910: bf00 nop 8012912: e7fd b.n 8012910 pxStreamBuffer->xTaskWaitingToReceive = xTaskGetCurrentTaskHandle(); 8012914: f001 f85a bl 80139cc 8012918: 4602 mov r2, r0 801291a: 6a3b ldr r3, [r7, #32] 801291c: 611a str r2, [r3, #16] else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 801291e: f002 f935 bl 8014b8c if( xBytesAvailable <= xBytesToStoreMessageLength ) 8012922: 6aba ldr r2, [r7, #40] @ 0x28 8012924: 6a7b ldr r3, [r7, #36] @ 0x24 8012926: 429a cmp r2, r3 8012928: d811 bhi.n 801294e { /* Wait for data to be available. */ traceBLOCKING_ON_STREAM_BUFFER_RECEIVE( xStreamBuffer ); ( void ) xTaskNotifyWait( ( uint32_t ) 0, ( uint32_t ) 0, NULL, xTicksToWait ); 801292a: 683b ldr r3, [r7, #0] 801292c: 2200 movs r2, #0 801292e: 2100 movs r1, #0 8012930: 2000 movs r0, #0 8012932: f001 f9e9 bl 8013d08 pxStreamBuffer->xTaskWaitingToReceive = NULL; 8012936: 6a3b ldr r3, [r7, #32] 8012938: 2200 movs r2, #0 801293a: 611a str r2, [r3, #16] /* Recheck the data available after blocking. */ xBytesAvailable = prvBytesInBuffer( pxStreamBuffer ); 801293c: 6a38 ldr r0, [r7, #32] 801293e: f000 f951 bl 8012be4 8012942: 62b8 str r0, [r7, #40] @ 0x28 8012944: e003 b.n 801294e mtCOVERAGE_TEST_MARKER(); } } else { xBytesAvailable = prvBytesInBuffer( pxStreamBuffer ); 8012946: 6a38 ldr r0, [r7, #32] 8012948: f000 f94c bl 8012be4 801294c: 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 ) 801294e: 6aba ldr r2, [r7, #40] @ 0x28 8012950: 6a7b ldr r3, [r7, #36] @ 0x24 8012952: 429a cmp r2, r3 8012954: d91d bls.n 8012992 { xReceivedLength = prvReadMessageFromBuffer( pxStreamBuffer, pvRxData, xBufferLengthBytes, xBytesAvailable, xBytesToStoreMessageLength ); 8012956: 6a7b ldr r3, [r7, #36] @ 0x24 8012958: 9300 str r3, [sp, #0] 801295a: 6abb ldr r3, [r7, #40] @ 0x28 801295c: 687a ldr r2, [r7, #4] 801295e: 68b9 ldr r1, [r7, #8] 8012960: 6a38 ldr r0, [r7, #32] 8012962: f000 f81b bl 801299c 8012966: 62f8 str r0, [r7, #44] @ 0x2c /* Was a task waiting for space in the buffer? */ if( xReceivedLength != ( size_t ) 0 ) 8012968: 6afb ldr r3, [r7, #44] @ 0x2c 801296a: 2b00 cmp r3, #0 801296c: d011 beq.n 8012992 { traceSTREAM_BUFFER_RECEIVE( xStreamBuffer, xReceivedLength ); sbRECEIVE_COMPLETED( pxStreamBuffer ); 801296e: f000 fbf1 bl 8013154 8012972: 6a3b ldr r3, [r7, #32] 8012974: 695b ldr r3, [r3, #20] 8012976: 2b00 cmp r3, #0 8012978: d009 beq.n 801298e 801297a: 6a3b ldr r3, [r7, #32] 801297c: 6958 ldr r0, [r3, #20] 801297e: 2300 movs r3, #0 8012980: 2200 movs r2, #0 8012982: 2100 movs r1, #0 8012984: f001 fa20 bl 8013dc8 8012988: 6a3b ldr r3, [r7, #32] 801298a: 2200 movs r2, #0 801298c: 615a str r2, [r3, #20] 801298e: f000 fbef bl 8013170 { traceSTREAM_BUFFER_RECEIVE_FAILED( xStreamBuffer ); mtCOVERAGE_TEST_MARKER(); } return xReceivedLength; 8012992: 6afb ldr r3, [r7, #44] @ 0x2c } 8012994: 4618 mov r0, r3 8012996: 3730 adds r7, #48 @ 0x30 8012998: 46bd mov sp, r7 801299a: bd80 pop {r7, pc} 0801299c : static size_t prvReadMessageFromBuffer( StreamBuffer_t *pxStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, size_t xBytesAvailable, size_t xBytesToStoreMessageLength ) { 801299c: b580 push {r7, lr} 801299e: b088 sub sp, #32 80129a0: af00 add r7, sp, #0 80129a2: 60f8 str r0, [r7, #12] 80129a4: 60b9 str r1, [r7, #8] 80129a6: 607a str r2, [r7, #4] 80129a8: 603b str r3, [r7, #0] size_t xOriginalTail, xReceivedLength, xNextMessageLength; configMESSAGE_BUFFER_LENGTH_TYPE xTempNextMessageLength; if( xBytesToStoreMessageLength != ( size_t ) 0 ) 80129aa: 6abb ldr r3, [r7, #40] @ 0x28 80129ac: 2b00 cmp r3, #0 80129ae: d019 beq.n 80129e4 { /* 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; 80129b0: 68fb ldr r3, [r7, #12] 80129b2: 681b ldr r3, [r3, #0] 80129b4: 61bb str r3, [r7, #24] ( void ) prvReadBytesFromBuffer( pxStreamBuffer, ( uint8_t * ) &xTempNextMessageLength, xBytesToStoreMessageLength, xBytesAvailable ); 80129b6: f107 0110 add.w r1, r7, #16 80129ba: 683b ldr r3, [r7, #0] 80129bc: 6aba ldr r2, [r7, #40] @ 0x28 80129be: 68f8 ldr r0, [r7, #12] 80129c0: f000 f893 bl 8012aea xNextMessageLength = ( size_t ) xTempNextMessageLength; 80129c4: 693b ldr r3, [r7, #16] 80129c6: 61fb str r3, [r7, #28] /* Reduce the number of bytes available by the number of bytes just read out. */ xBytesAvailable -= xBytesToStoreMessageLength; 80129c8: 683a ldr r2, [r7, #0] 80129ca: 6abb ldr r3, [r7, #40] @ 0x28 80129cc: 1ad3 subs r3, r2, r3 80129ce: 603b str r3, [r7, #0] /* Check there is enough space in the buffer provided by the user. */ if( xNextMessageLength > xBufferLengthBytes ) 80129d0: 69fa ldr r2, [r7, #28] 80129d2: 687b ldr r3, [r7, #4] 80129d4: 429a cmp r2, r3 80129d6: d907 bls.n 80129e8 { /* 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; 80129d8: 68fb ldr r3, [r7, #12] 80129da: 69ba ldr r2, [r7, #24] 80129dc: 601a str r2, [r3, #0] xNextMessageLength = 0; 80129de: 2300 movs r3, #0 80129e0: 61fb str r3, [r7, #28] 80129e2: e001 b.n 80129e8 } else { /* A stream of bytes is being received (as opposed to a discrete message), so read as many bytes as possible. */ xNextMessageLength = xBufferLengthBytes; 80129e4: 687b ldr r3, [r7, #4] 80129e6: 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. */ 80129e8: 683b ldr r3, [r7, #0] 80129ea: 69fa ldr r2, [r7, #28] 80129ec: 68b9 ldr r1, [r7, #8] 80129ee: 68f8 ldr r0, [r7, #12] 80129f0: f000 f87b bl 8012aea 80129f4: 6178 str r0, [r7, #20] return xReceivedLength; 80129f6: 697b ldr r3, [r7, #20] } 80129f8: 4618 mov r0, r3 80129fa: 3720 adds r7, #32 80129fc: 46bd mov sp, r7 80129fe: bd80 pop {r7, pc} 08012a00 : return xReturn; } /*-----------------------------------------------------------*/ static size_t prvWriteBytesToBuffer( StreamBuffer_t * const pxStreamBuffer, const uint8_t *pucData, size_t xCount ) { 8012a00: b580 push {r7, lr} 8012a02: b08a sub sp, #40 @ 0x28 8012a04: af00 add r7, sp, #0 8012a06: 60f8 str r0, [r7, #12] 8012a08: 60b9 str r1, [r7, #8] 8012a0a: 607a str r2, [r7, #4] size_t xNextHead, xFirstLength; configASSERT( xCount > ( size_t ) 0 ); 8012a0c: 687b ldr r3, [r7, #4] 8012a0e: 2b00 cmp r3, #0 8012a10: d10b bne.n 8012a2a __asm volatile 8012a12: f04f 0350 mov.w r3, #80 @ 0x50 8012a16: f383 8811 msr BASEPRI, r3 8012a1a: f3bf 8f6f isb sy 8012a1e: f3bf 8f4f dsb sy 8012a22: 61fb str r3, [r7, #28] } 8012a24: bf00 nop 8012a26: bf00 nop 8012a28: e7fd b.n 8012a26 xNextHead = pxStreamBuffer->xHead; 8012a2a: 68fb ldr r3, [r7, #12] 8012a2c: 685b ldr r3, [r3, #4] 8012a2e: 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 ); 8012a30: 68fb ldr r3, [r7, #12] 8012a32: 689a ldr r2, [r3, #8] 8012a34: 6a7b ldr r3, [r7, #36] @ 0x24 8012a36: 1ad3 subs r3, r2, r3 8012a38: 687a ldr r2, [r7, #4] 8012a3a: 4293 cmp r3, r2 8012a3c: bf28 it cs 8012a3e: 4613 movcs r3, r2 8012a40: 623b str r3, [r7, #32] /* Write as many bytes as can be written in the first write. */ configASSERT( ( xNextHead + xFirstLength ) <= pxStreamBuffer->xLength ); 8012a42: 6a7a ldr r2, [r7, #36] @ 0x24 8012a44: 6a3b ldr r3, [r7, #32] 8012a46: 441a add r2, r3 8012a48: 68fb ldr r3, [r7, #12] 8012a4a: 689b ldr r3, [r3, #8] 8012a4c: 429a cmp r2, r3 8012a4e: d90b bls.n 8012a68 __asm volatile 8012a50: f04f 0350 mov.w r3, #80 @ 0x50 8012a54: f383 8811 msr BASEPRI, r3 8012a58: f3bf 8f6f isb sy 8012a5c: f3bf 8f4f dsb sy 8012a60: 61bb str r3, [r7, #24] } 8012a62: bf00 nop 8012a64: bf00 nop 8012a66: e7fd b.n 8012a64 ( void ) memcpy( ( void* ) ( &( pxStreamBuffer->pucBuffer[ xNextHead ] ) ), ( const void * ) pucData, xFirstLength ); /*lint !e9087 memcpy() requires void *. */ 8012a68: 68fb ldr r3, [r7, #12] 8012a6a: 699a ldr r2, [r3, #24] 8012a6c: 6a7b ldr r3, [r7, #36] @ 0x24 8012a6e: 4413 add r3, r2 8012a70: 6a3a ldr r2, [r7, #32] 8012a72: 68b9 ldr r1, [r7, #8] 8012a74: 4618 mov r0, r3 8012a76: f017 fa32 bl 8029ede /* If the number of bytes written was less than the number that could be written in the first write... */ if( xCount > xFirstLength ) 8012a7a: 687a ldr r2, [r7, #4] 8012a7c: 6a3b ldr r3, [r7, #32] 8012a7e: 429a cmp r2, r3 8012a80: d91d bls.n 8012abe { /* ...then write the remaining bytes to the start of the buffer. */ configASSERT( ( xCount - xFirstLength ) <= pxStreamBuffer->xLength ); 8012a82: 687a ldr r2, [r7, #4] 8012a84: 6a3b ldr r3, [r7, #32] 8012a86: 1ad2 subs r2, r2, r3 8012a88: 68fb ldr r3, [r7, #12] 8012a8a: 689b ldr r3, [r3, #8] 8012a8c: 429a cmp r2, r3 8012a8e: d90b bls.n 8012aa8 __asm volatile 8012a90: f04f 0350 mov.w r3, #80 @ 0x50 8012a94: f383 8811 msr BASEPRI, r3 8012a98: f3bf 8f6f isb sy 8012a9c: f3bf 8f4f dsb sy 8012aa0: 617b str r3, [r7, #20] } 8012aa2: bf00 nop 8012aa4: bf00 nop 8012aa6: e7fd b.n 8012aa4 ( void ) memcpy( ( void * ) pxStreamBuffer->pucBuffer, ( const void * ) &( pucData[ xFirstLength ] ), xCount - xFirstLength ); /*lint !e9087 memcpy() requires void *. */ 8012aa8: 68fb ldr r3, [r7, #12] 8012aaa: 6998 ldr r0, [r3, #24] 8012aac: 68ba ldr r2, [r7, #8] 8012aae: 6a3b ldr r3, [r7, #32] 8012ab0: 18d1 adds r1, r2, r3 8012ab2: 687a ldr r2, [r7, #4] 8012ab4: 6a3b ldr r3, [r7, #32] 8012ab6: 1ad3 subs r3, r2, r3 8012ab8: 461a mov r2, r3 8012aba: f017 fa10 bl 8029ede else { mtCOVERAGE_TEST_MARKER(); } xNextHead += xCount; 8012abe: 6a7a ldr r2, [r7, #36] @ 0x24 8012ac0: 687b ldr r3, [r7, #4] 8012ac2: 4413 add r3, r2 8012ac4: 627b str r3, [r7, #36] @ 0x24 if( xNextHead >= pxStreamBuffer->xLength ) 8012ac6: 68fb ldr r3, [r7, #12] 8012ac8: 689b ldr r3, [r3, #8] 8012aca: 6a7a ldr r2, [r7, #36] @ 0x24 8012acc: 429a cmp r2, r3 8012ace: d304 bcc.n 8012ada { xNextHead -= pxStreamBuffer->xLength; 8012ad0: 68fb ldr r3, [r7, #12] 8012ad2: 689b ldr r3, [r3, #8] 8012ad4: 6a7a ldr r2, [r7, #36] @ 0x24 8012ad6: 1ad3 subs r3, r2, r3 8012ad8: 627b str r3, [r7, #36] @ 0x24 else { mtCOVERAGE_TEST_MARKER(); } pxStreamBuffer->xHead = xNextHead; 8012ada: 68fb ldr r3, [r7, #12] 8012adc: 6a7a ldr r2, [r7, #36] @ 0x24 8012ade: 605a str r2, [r3, #4] return xCount; 8012ae0: 687b ldr r3, [r7, #4] } 8012ae2: 4618 mov r0, r3 8012ae4: 3728 adds r7, #40 @ 0x28 8012ae6: 46bd mov sp, r7 8012ae8: bd80 pop {r7, pc} 08012aea : /*-----------------------------------------------------------*/ static size_t prvReadBytesFromBuffer( StreamBuffer_t *pxStreamBuffer, uint8_t *pucData, size_t xMaxCount, size_t xBytesAvailable ) { 8012aea: b580 push {r7, lr} 8012aec: b08a sub sp, #40 @ 0x28 8012aee: af00 add r7, sp, #0 8012af0: 60f8 str r0, [r7, #12] 8012af2: 60b9 str r1, [r7, #8] 8012af4: 607a str r2, [r7, #4] 8012af6: 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 ); 8012af8: 687a ldr r2, [r7, #4] 8012afa: 683b ldr r3, [r7, #0] 8012afc: 4293 cmp r3, r2 8012afe: bf28 it cs 8012b00: 4613 movcs r3, r2 8012b02: 623b str r3, [r7, #32] if( xCount > ( size_t ) 0 ) 8012b04: 6a3b ldr r3, [r7, #32] 8012b06: 2b00 cmp r3, #0 8012b08: d067 beq.n 8012bda { xNextTail = pxStreamBuffer->xTail; 8012b0a: 68fb ldr r3, [r7, #12] 8012b0c: 681b ldr r3, [r3, #0] 8012b0e: 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 ); 8012b10: 68fb ldr r3, [r7, #12] 8012b12: 689a ldr r2, [r3, #8] 8012b14: 6a7b ldr r3, [r7, #36] @ 0x24 8012b16: 1ad3 subs r3, r2, r3 8012b18: 6a3a ldr r2, [r7, #32] 8012b1a: 4293 cmp r3, r2 8012b1c: bf28 it cs 8012b1e: 4613 movcs r3, r2 8012b20: 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 ); 8012b22: 69fa ldr r2, [r7, #28] 8012b24: 687b ldr r3, [r7, #4] 8012b26: 429a cmp r2, r3 8012b28: d90b bls.n 8012b42 __asm volatile 8012b2a: f04f 0350 mov.w r3, #80 @ 0x50 8012b2e: f383 8811 msr BASEPRI, r3 8012b32: f3bf 8f6f isb sy 8012b36: f3bf 8f4f dsb sy 8012b3a: 61bb str r3, [r7, #24] } 8012b3c: bf00 nop 8012b3e: bf00 nop 8012b40: e7fd b.n 8012b3e configASSERT( ( xNextTail + xFirstLength ) <= pxStreamBuffer->xLength ); 8012b42: 6a7a ldr r2, [r7, #36] @ 0x24 8012b44: 69fb ldr r3, [r7, #28] 8012b46: 441a add r2, r3 8012b48: 68fb ldr r3, [r7, #12] 8012b4a: 689b ldr r3, [r3, #8] 8012b4c: 429a cmp r2, r3 8012b4e: d90b bls.n 8012b68 __asm volatile 8012b50: f04f 0350 mov.w r3, #80 @ 0x50 8012b54: f383 8811 msr BASEPRI, r3 8012b58: f3bf 8f6f isb sy 8012b5c: f3bf 8f4f dsb sy 8012b60: 617b str r3, [r7, #20] } 8012b62: bf00 nop 8012b64: bf00 nop 8012b66: e7fd b.n 8012b64 ( void ) memcpy( ( void * ) pucData, ( const void * ) &( pxStreamBuffer->pucBuffer[ xNextTail ] ), xFirstLength ); /*lint !e9087 memcpy() requires void *. */ 8012b68: 68fb ldr r3, [r7, #12] 8012b6a: 699a ldr r2, [r3, #24] 8012b6c: 6a7b ldr r3, [r7, #36] @ 0x24 8012b6e: 4413 add r3, r2 8012b70: 69fa ldr r2, [r7, #28] 8012b72: 4619 mov r1, r3 8012b74: 68b8 ldr r0, [r7, #8] 8012b76: f017 f9b2 bl 8029ede /* If the total number of wanted bytes is greater than the number that could be read in the first read... */ if( xCount > xFirstLength ) 8012b7a: 6a3a ldr r2, [r7, #32] 8012b7c: 69fb ldr r3, [r7, #28] 8012b7e: 429a cmp r2, r3 8012b80: d91a bls.n 8012bb8 { /*...then read the remaining bytes from the start of the buffer. */ configASSERT( xCount <= xMaxCount ); 8012b82: 6a3a ldr r2, [r7, #32] 8012b84: 687b ldr r3, [r7, #4] 8012b86: 429a cmp r2, r3 8012b88: d90b bls.n 8012ba2 __asm volatile 8012b8a: f04f 0350 mov.w r3, #80 @ 0x50 8012b8e: f383 8811 msr BASEPRI, r3 8012b92: f3bf 8f6f isb sy 8012b96: f3bf 8f4f dsb sy 8012b9a: 613b str r3, [r7, #16] } 8012b9c: bf00 nop 8012b9e: bf00 nop 8012ba0: e7fd b.n 8012b9e ( void ) memcpy( ( void * ) &( pucData[ xFirstLength ] ), ( void * ) ( pxStreamBuffer->pucBuffer ), xCount - xFirstLength ); /*lint !e9087 memcpy() requires void *. */ 8012ba2: 68ba ldr r2, [r7, #8] 8012ba4: 69fb ldr r3, [r7, #28] 8012ba6: 18d0 adds r0, r2, r3 8012ba8: 68fb ldr r3, [r7, #12] 8012baa: 6999 ldr r1, [r3, #24] 8012bac: 6a3a ldr r2, [r7, #32] 8012bae: 69fb ldr r3, [r7, #28] 8012bb0: 1ad3 subs r3, r2, r3 8012bb2: 461a mov r2, r3 8012bb4: f017 f993 bl 8029ede mtCOVERAGE_TEST_MARKER(); } /* Move the tail pointer to effectively remove the data read from the buffer. */ xNextTail += xCount; 8012bb8: 6a7a ldr r2, [r7, #36] @ 0x24 8012bba: 6a3b ldr r3, [r7, #32] 8012bbc: 4413 add r3, r2 8012bbe: 627b str r3, [r7, #36] @ 0x24 if( xNextTail >= pxStreamBuffer->xLength ) 8012bc0: 68fb ldr r3, [r7, #12] 8012bc2: 689b ldr r3, [r3, #8] 8012bc4: 6a7a ldr r2, [r7, #36] @ 0x24 8012bc6: 429a cmp r2, r3 8012bc8: d304 bcc.n 8012bd4 { xNextTail -= pxStreamBuffer->xLength; 8012bca: 68fb ldr r3, [r7, #12] 8012bcc: 689b ldr r3, [r3, #8] 8012bce: 6a7a ldr r2, [r7, #36] @ 0x24 8012bd0: 1ad3 subs r3, r2, r3 8012bd2: 627b str r3, [r7, #36] @ 0x24 } pxStreamBuffer->xTail = xNextTail; 8012bd4: 68fb ldr r3, [r7, #12] 8012bd6: 6a7a ldr r2, [r7, #36] @ 0x24 8012bd8: 601a str r2, [r3, #0] else { mtCOVERAGE_TEST_MARKER(); } return xCount; 8012bda: 6a3b ldr r3, [r7, #32] } 8012bdc: 4618 mov r0, r3 8012bde: 3728 adds r7, #40 @ 0x28 8012be0: 46bd mov sp, r7 8012be2: bd80 pop {r7, pc} 08012be4 : /*-----------------------------------------------------------*/ static size_t prvBytesInBuffer( const StreamBuffer_t * const pxStreamBuffer ) { 8012be4: b480 push {r7} 8012be6: b085 sub sp, #20 8012be8: af00 add r7, sp, #0 8012bea: 6078 str r0, [r7, #4] /* Returns the distance between xTail and xHead. */ size_t xCount; xCount = pxStreamBuffer->xLength + pxStreamBuffer->xHead; 8012bec: 687b ldr r3, [r7, #4] 8012bee: 689a ldr r2, [r3, #8] 8012bf0: 687b ldr r3, [r7, #4] 8012bf2: 685b ldr r3, [r3, #4] 8012bf4: 4413 add r3, r2 8012bf6: 60fb str r3, [r7, #12] xCount -= pxStreamBuffer->xTail; 8012bf8: 687b ldr r3, [r7, #4] 8012bfa: 681b ldr r3, [r3, #0] 8012bfc: 68fa ldr r2, [r7, #12] 8012bfe: 1ad3 subs r3, r2, r3 8012c00: 60fb str r3, [r7, #12] if ( xCount >= pxStreamBuffer->xLength ) 8012c02: 687b ldr r3, [r7, #4] 8012c04: 689b ldr r3, [r3, #8] 8012c06: 68fa ldr r2, [r7, #12] 8012c08: 429a cmp r2, r3 8012c0a: d304 bcc.n 8012c16 { xCount -= pxStreamBuffer->xLength; 8012c0c: 687b ldr r3, [r7, #4] 8012c0e: 689b ldr r3, [r3, #8] 8012c10: 68fa ldr r2, [r7, #12] 8012c12: 1ad3 subs r3, r2, r3 8012c14: 60fb str r3, [r7, #12] else { mtCOVERAGE_TEST_MARKER(); } return xCount; 8012c16: 68fb ldr r3, [r7, #12] } 8012c18: 4618 mov r0, r3 8012c1a: 3714 adds r7, #20 8012c1c: 46bd mov sp, r7 8012c1e: f85d 7b04 ldr.w r7, [sp], #4 8012c22: 4770 bx lr 08012c24 : static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer, uint8_t * const pucBuffer, size_t xBufferSizeBytes, size_t xTriggerLevelBytes, uint8_t ucFlags ) { 8012c24: b580 push {r7, lr} 8012c26: b086 sub sp, #24 8012c28: af00 add r7, sp, #0 8012c2a: 60f8 str r0, [r7, #12] 8012c2c: 60b9 str r1, [r7, #8] 8012c2e: 607a str r2, [r7, #4] 8012c30: 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; 8012c32: 2355 movs r3, #85 @ 0x55 8012c34: 617b str r3, [r7, #20] configASSERT( memset( pucBuffer, ( int ) xWriteValue, xBufferSizeBytes ) == pucBuffer ); 8012c36: 687a ldr r2, [r7, #4] 8012c38: 6979 ldr r1, [r7, #20] 8012c3a: 68b8 ldr r0, [r7, #8] 8012c3c: f017 f858 bl 8029cf0 8012c40: 4602 mov r2, r0 8012c42: 68bb ldr r3, [r7, #8] 8012c44: 4293 cmp r3, r2 8012c46: d00b beq.n 8012c60 __asm volatile 8012c48: f04f 0350 mov.w r3, #80 @ 0x50 8012c4c: f383 8811 msr BASEPRI, r3 8012c50: f3bf 8f6f isb sy 8012c54: f3bf 8f4f dsb sy 8012c58: 613b str r3, [r7, #16] } 8012c5a: bf00 nop 8012c5c: bf00 nop 8012c5e: e7fd b.n 8012c5c } /*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 *. */ 8012c60: 2224 movs r2, #36 @ 0x24 8012c62: 2100 movs r1, #0 8012c64: 68f8 ldr r0, [r7, #12] 8012c66: f017 f843 bl 8029cf0 pxStreamBuffer->pucBuffer = pucBuffer; 8012c6a: 68fb ldr r3, [r7, #12] 8012c6c: 68ba ldr r2, [r7, #8] 8012c6e: 619a str r2, [r3, #24] pxStreamBuffer->xLength = xBufferSizeBytes; 8012c70: 68fb ldr r3, [r7, #12] 8012c72: 687a ldr r2, [r7, #4] 8012c74: 609a str r2, [r3, #8] pxStreamBuffer->xTriggerLevelBytes = xTriggerLevelBytes; 8012c76: 68fb ldr r3, [r7, #12] 8012c78: 683a ldr r2, [r7, #0] 8012c7a: 60da str r2, [r3, #12] pxStreamBuffer->ucFlags = ucFlags; 8012c7c: 68fb ldr r3, [r7, #12] 8012c7e: f897 2020 ldrb.w r2, [r7, #32] 8012c82: 771a strb r2, [r3, #28] } 8012c84: bf00 nop 8012c86: 3718 adds r7, #24 8012c88: 46bd mov sp, r7 8012c8a: bd80 pop {r7, pc} 08012c8c : const uint32_t ulStackDepth, void * const pvParameters, UBaseType_t uxPriority, StackType_t * const puxStackBuffer, StaticTask_t * const pxTaskBuffer ) { 8012c8c: b580 push {r7, lr} 8012c8e: b08e sub sp, #56 @ 0x38 8012c90: af04 add r7, sp, #16 8012c92: 60f8 str r0, [r7, #12] 8012c94: 60b9 str r1, [r7, #8] 8012c96: 607a str r2, [r7, #4] 8012c98: 603b str r3, [r7, #0] TCB_t *pxNewTCB; TaskHandle_t xReturn; configASSERT( puxStackBuffer != NULL ); 8012c9a: 6b7b ldr r3, [r7, #52] @ 0x34 8012c9c: 2b00 cmp r3, #0 8012c9e: d10b bne.n 8012cb8 __asm volatile 8012ca0: f04f 0350 mov.w r3, #80 @ 0x50 8012ca4: f383 8811 msr BASEPRI, r3 8012ca8: f3bf 8f6f isb sy 8012cac: f3bf 8f4f dsb sy 8012cb0: 623b str r3, [r7, #32] } 8012cb2: bf00 nop 8012cb4: bf00 nop 8012cb6: e7fd b.n 8012cb4 configASSERT( pxTaskBuffer != NULL ); 8012cb8: 6bbb ldr r3, [r7, #56] @ 0x38 8012cba: 2b00 cmp r3, #0 8012cbc: d10b bne.n 8012cd6 __asm volatile 8012cbe: f04f 0350 mov.w r3, #80 @ 0x50 8012cc2: f383 8811 msr BASEPRI, r3 8012cc6: f3bf 8f6f isb sy 8012cca: f3bf 8f4f dsb sy 8012cce: 61fb str r3, [r7, #28] } 8012cd0: bf00 nop 8012cd2: bf00 nop 8012cd4: e7fd b.n 8012cd2 #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 ); 8012cd6: 23a8 movs r3, #168 @ 0xa8 8012cd8: 613b str r3, [r7, #16] configASSERT( xSize == sizeof( TCB_t ) ); 8012cda: 693b ldr r3, [r7, #16] 8012cdc: 2ba8 cmp r3, #168 @ 0xa8 8012cde: d00b beq.n 8012cf8 __asm volatile 8012ce0: f04f 0350 mov.w r3, #80 @ 0x50 8012ce4: f383 8811 msr BASEPRI, r3 8012ce8: f3bf 8f6f isb sy 8012cec: f3bf 8f4f dsb sy 8012cf0: 61bb str r3, [r7, #24] } 8012cf2: bf00 nop 8012cf4: bf00 nop 8012cf6: e7fd b.n 8012cf4 ( void ) xSize; /* Prevent lint warning when configASSERT() is not used. */ 8012cf8: 693b ldr r3, [r7, #16] } #endif /* configASSERT_DEFINED */ if( ( pxTaskBuffer != NULL ) && ( puxStackBuffer != NULL ) ) 8012cfa: 6bbb ldr r3, [r7, #56] @ 0x38 8012cfc: 2b00 cmp r3, #0 8012cfe: d01e beq.n 8012d3e 8012d00: 6b7b ldr r3, [r7, #52] @ 0x34 8012d02: 2b00 cmp r3, #0 8012d04: d01b beq.n 8012d3e { /* 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. */ 8012d06: 6bbb ldr r3, [r7, #56] @ 0x38 8012d08: 627b str r3, [r7, #36] @ 0x24 pxNewTCB->pxStack = ( StackType_t * ) puxStackBuffer; 8012d0a: 6a7b ldr r3, [r7, #36] @ 0x24 8012d0c: 6b7a ldr r2, [r7, #52] @ 0x34 8012d0e: 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; 8012d10: 6a7b ldr r3, [r7, #36] @ 0x24 8012d12: 2202 movs r2, #2 8012d14: f883 20a5 strb.w r2, [r3, #165] @ 0xa5 } #endif /* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE */ prvInitialiseNewTask( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, &xReturn, pxNewTCB, NULL ); 8012d18: 2300 movs r3, #0 8012d1a: 9303 str r3, [sp, #12] 8012d1c: 6a7b ldr r3, [r7, #36] @ 0x24 8012d1e: 9302 str r3, [sp, #8] 8012d20: f107 0314 add.w r3, r7, #20 8012d24: 9301 str r3, [sp, #4] 8012d26: 6b3b ldr r3, [r7, #48] @ 0x30 8012d28: 9300 str r3, [sp, #0] 8012d2a: 683b ldr r3, [r7, #0] 8012d2c: 687a ldr r2, [r7, #4] 8012d2e: 68b9 ldr r1, [r7, #8] 8012d30: 68f8 ldr r0, [r7, #12] 8012d32: f000 f851 bl 8012dd8 prvAddNewTaskToReadyList( pxNewTCB ); 8012d36: 6a78 ldr r0, [r7, #36] @ 0x24 8012d38: f000 f8f6 bl 8012f28 8012d3c: e001 b.n 8012d42 } else { xReturn = NULL; 8012d3e: 2300 movs r3, #0 8012d40: 617b str r3, [r7, #20] } return xReturn; 8012d42: 697b ldr r3, [r7, #20] } 8012d44: 4618 mov r0, r3 8012d46: 3728 adds r7, #40 @ 0x28 8012d48: 46bd mov sp, r7 8012d4a: bd80 pop {r7, pc} 08012d4c : 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 ) { 8012d4c: b580 push {r7, lr} 8012d4e: b08c sub sp, #48 @ 0x30 8012d50: af04 add r7, sp, #16 8012d52: 60f8 str r0, [r7, #12] 8012d54: 60b9 str r1, [r7, #8] 8012d56: 603b str r3, [r7, #0] 8012d58: 4613 mov r3, r2 8012d5a: 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. */ 8012d5c: 88fb ldrh r3, [r7, #6] 8012d5e: 009b lsls r3, r3, #2 8012d60: 4618 mov r0, r3 8012d62: f002 f803 bl 8014d6c 8012d66: 6178 str r0, [r7, #20] if( pxStack != NULL ) 8012d68: 697b ldr r3, [r7, #20] 8012d6a: 2b00 cmp r3, #0 8012d6c: d00e beq.n 8012d8c { /* 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. */ 8012d6e: 20a8 movs r0, #168 @ 0xa8 8012d70: f001 fffc bl 8014d6c 8012d74: 61f8 str r0, [r7, #28] if( pxNewTCB != NULL ) 8012d76: 69fb ldr r3, [r7, #28] 8012d78: 2b00 cmp r3, #0 8012d7a: d003 beq.n 8012d84 { /* Store the stack location in the TCB. */ pxNewTCB->pxStack = pxStack; 8012d7c: 69fb ldr r3, [r7, #28] 8012d7e: 697a ldr r2, [r7, #20] 8012d80: 631a str r2, [r3, #48] @ 0x30 8012d82: e005 b.n 8012d90 } else { /* The stack cannot be used as the TCB was not created. Free it again. */ vPortFree( pxStack ); 8012d84: 6978 ldr r0, [r7, #20] 8012d86: f002 f8bf bl 8014f08 8012d8a: e001 b.n 8012d90 } } else { pxNewTCB = NULL; 8012d8c: 2300 movs r3, #0 8012d8e: 61fb str r3, [r7, #28] } } #endif /* portSTACK_GROWTH */ if( pxNewTCB != NULL ) 8012d90: 69fb ldr r3, [r7, #28] 8012d92: 2b00 cmp r3, #0 8012d94: d017 beq.n 8012dc6 { #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; 8012d96: 69fb ldr r3, [r7, #28] 8012d98: 2200 movs r2, #0 8012d9a: 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 ); 8012d9e: 88fa ldrh r2, [r7, #6] 8012da0: 2300 movs r3, #0 8012da2: 9303 str r3, [sp, #12] 8012da4: 69fb ldr r3, [r7, #28] 8012da6: 9302 str r3, [sp, #8] 8012da8: 6afb ldr r3, [r7, #44] @ 0x2c 8012daa: 9301 str r3, [sp, #4] 8012dac: 6abb ldr r3, [r7, #40] @ 0x28 8012dae: 9300 str r3, [sp, #0] 8012db0: 683b ldr r3, [r7, #0] 8012db2: 68b9 ldr r1, [r7, #8] 8012db4: 68f8 ldr r0, [r7, #12] 8012db6: f000 f80f bl 8012dd8 prvAddNewTaskToReadyList( pxNewTCB ); 8012dba: 69f8 ldr r0, [r7, #28] 8012dbc: f000 f8b4 bl 8012f28 xReturn = pdPASS; 8012dc0: 2301 movs r3, #1 8012dc2: 61bb str r3, [r7, #24] 8012dc4: e002 b.n 8012dcc } else { xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY; 8012dc6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8012dca: 61bb str r3, [r7, #24] } return xReturn; 8012dcc: 69bb ldr r3, [r7, #24] } 8012dce: 4618 mov r0, r3 8012dd0: 3720 adds r7, #32 8012dd2: 46bd mov sp, r7 8012dd4: bd80 pop {r7, pc} ... 08012dd8 : void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, TCB_t *pxNewTCB, const MemoryRegion_t * const xRegions ) { 8012dd8: b580 push {r7, lr} 8012dda: b088 sub sp, #32 8012ddc: af00 add r7, sp, #0 8012dde: 60f8 str r0, [r7, #12] 8012de0: 60b9 str r1, [r7, #8] 8012de2: 607a str r2, [r7, #4] 8012de4: 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 ) ); 8012de6: 6b3b ldr r3, [r7, #48] @ 0x30 8012de8: 6b18 ldr r0, [r3, #48] @ 0x30 8012dea: 687b ldr r3, [r7, #4] 8012dec: 009b lsls r3, r3, #2 8012dee: 461a mov r2, r3 8012df0: 21a5 movs r1, #165 @ 0xa5 8012df2: f016 ff7d bl 8029cf0 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 ] ); 8012df6: 6b3b ldr r3, [r7, #48] @ 0x30 8012df8: 6b1a ldr r2, [r3, #48] @ 0x30 8012dfa: 6879 ldr r1, [r7, #4] 8012dfc: f06f 4340 mvn.w r3, #3221225472 @ 0xc0000000 8012e00: 440b add r3, r1 8012e02: 009b lsls r3, r3, #2 8012e04: 4413 add r3, r2 8012e06: 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(). */ 8012e08: 69bb ldr r3, [r7, #24] 8012e0a: f023 0307 bic.w r3, r3, #7 8012e0e: 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 ) ); 8012e10: 69bb ldr r3, [r7, #24] 8012e12: f003 0307 and.w r3, r3, #7 8012e16: 2b00 cmp r3, #0 8012e18: d00b beq.n 8012e32 __asm volatile 8012e1a: f04f 0350 mov.w r3, #80 @ 0x50 8012e1e: f383 8811 msr BASEPRI, r3 8012e22: f3bf 8f6f isb sy 8012e26: f3bf 8f4f dsb sy 8012e2a: 617b str r3, [r7, #20] } 8012e2c: bf00 nop 8012e2e: bf00 nop 8012e30: e7fd b.n 8012e2e pxNewTCB->pxEndOfStack = pxNewTCB->pxStack + ( ulStackDepth - ( uint32_t ) 1 ); } #endif /* portSTACK_GROWTH */ /* Store the task name in the TCB. */ if( pcName != NULL ) 8012e32: 68bb ldr r3, [r7, #8] 8012e34: 2b00 cmp r3, #0 8012e36: d01f beq.n 8012e78 { for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) 8012e38: 2300 movs r3, #0 8012e3a: 61fb str r3, [r7, #28] 8012e3c: e012 b.n 8012e64 { pxNewTCB->pcTaskName[ x ] = pcName[ x ]; 8012e3e: 68ba ldr r2, [r7, #8] 8012e40: 69fb ldr r3, [r7, #28] 8012e42: 4413 add r3, r2 8012e44: 7819 ldrb r1, [r3, #0] 8012e46: 6b3a ldr r2, [r7, #48] @ 0x30 8012e48: 69fb ldr r3, [r7, #28] 8012e4a: 4413 add r3, r2 8012e4c: 3334 adds r3, #52 @ 0x34 8012e4e: 460a mov r2, r1 8012e50: 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 ) 8012e52: 68ba ldr r2, [r7, #8] 8012e54: 69fb ldr r3, [r7, #28] 8012e56: 4413 add r3, r2 8012e58: 781b ldrb r3, [r3, #0] 8012e5a: 2b00 cmp r3, #0 8012e5c: d006 beq.n 8012e6c for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) 8012e5e: 69fb ldr r3, [r7, #28] 8012e60: 3301 adds r3, #1 8012e62: 61fb str r3, [r7, #28] 8012e64: 69fb ldr r3, [r7, #28] 8012e66: 2b0f cmp r3, #15 8012e68: d9e9 bls.n 8012e3e 8012e6a: e000 b.n 8012e6e { break; 8012e6c: 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'; 8012e6e: 6b3b ldr r3, [r7, #48] @ 0x30 8012e70: 2200 movs r2, #0 8012e72: f883 2043 strb.w r2, [r3, #67] @ 0x43 8012e76: e003 b.n 8012e80 } 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; 8012e78: 6b3b ldr r3, [r7, #48] @ 0x30 8012e7a: 2200 movs r2, #0 8012e7c: 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 ) 8012e80: 6abb ldr r3, [r7, #40] @ 0x28 8012e82: 2b37 cmp r3, #55 @ 0x37 8012e84: d901 bls.n 8012e8a { uxPriority = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) 1U; 8012e86: 2337 movs r3, #55 @ 0x37 8012e88: 62bb str r3, [r7, #40] @ 0x28 else { mtCOVERAGE_TEST_MARKER(); } pxNewTCB->uxPriority = uxPriority; 8012e8a: 6b3b ldr r3, [r7, #48] @ 0x30 8012e8c: 6aba ldr r2, [r7, #40] @ 0x28 8012e8e: 62da str r2, [r3, #44] @ 0x2c #if ( configUSE_MUTEXES == 1 ) { pxNewTCB->uxBasePriority = uxPriority; 8012e90: 6b3b ldr r3, [r7, #48] @ 0x30 8012e92: 6aba ldr r2, [r7, #40] @ 0x28 8012e94: 64da str r2, [r3, #76] @ 0x4c pxNewTCB->uxMutexesHeld = 0; 8012e96: 6b3b ldr r3, [r7, #48] @ 0x30 8012e98: 2200 movs r2, #0 8012e9a: 651a str r2, [r3, #80] @ 0x50 } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxNewTCB->xStateListItem ) ); 8012e9c: 6b3b ldr r3, [r7, #48] @ 0x30 8012e9e: 3304 adds r3, #4 8012ea0: 4618 mov r0, r3 8012ea2: f7fe f9a5 bl 80111f0 vListInitialiseItem( &( pxNewTCB->xEventListItem ) ); 8012ea6: 6b3b ldr r3, [r7, #48] @ 0x30 8012ea8: 3318 adds r3, #24 8012eaa: 4618 mov r0, r3 8012eac: f7fe f9a0 bl 80111f0 /* 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 ); 8012eb0: 6b3b ldr r3, [r7, #48] @ 0x30 8012eb2: 6b3a ldr r2, [r7, #48] @ 0x30 8012eb4: 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. */ 8012eb6: 6abb ldr r3, [r7, #40] @ 0x28 8012eb8: f1c3 0238 rsb r2, r3, #56 @ 0x38 8012ebc: 6b3b ldr r3, [r7, #48] @ 0x30 8012ebe: 619a str r2, [r3, #24] listSET_LIST_ITEM_OWNER( &( pxNewTCB->xEventListItem ), pxNewTCB ); 8012ec0: 6b3b ldr r3, [r7, #48] @ 0x30 8012ec2: 6b3a ldr r2, [r7, #48] @ 0x30 8012ec4: 625a str r2, [r3, #36] @ 0x24 } #endif #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { pxNewTCB->ulNotifiedValue = 0; 8012ec6: 6b3b ldr r3, [r7, #48] @ 0x30 8012ec8: 2200 movs r2, #0 8012eca: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 pxNewTCB->ucNotifyState = taskNOT_WAITING_NOTIFICATION; 8012ece: 6b3b ldr r3, [r7, #48] @ 0x30 8012ed0: 2200 movs r2, #0 8012ed2: 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 ) ) ); 8012ed6: 6b3b ldr r3, [r7, #48] @ 0x30 8012ed8: 3354 adds r3, #84 @ 0x54 8012eda: 224c movs r2, #76 @ 0x4c 8012edc: 2100 movs r1, #0 8012ede: 4618 mov r0, r3 8012ee0: f016 ff06 bl 8029cf0 8012ee4: 6b3b ldr r3, [r7, #48] @ 0x30 8012ee6: 4a0d ldr r2, [pc, #52] @ (8012f1c ) 8012ee8: 659a str r2, [r3, #88] @ 0x58 8012eea: 6b3b ldr r3, [r7, #48] @ 0x30 8012eec: 4a0c ldr r2, [pc, #48] @ (8012f20 ) 8012eee: 65da str r2, [r3, #92] @ 0x5c 8012ef0: 6b3b ldr r3, [r7, #48] @ 0x30 8012ef2: 4a0c ldr r2, [pc, #48] @ (8012f24 ) 8012ef4: 661a str r2, [r3, #96] @ 0x60 } #endif /* portSTACK_GROWTH */ } #else /* portHAS_STACK_OVERFLOW_CHECKING */ { pxNewTCB->pxTopOfStack = pxPortInitialiseStack( pxTopOfStack, pxTaskCode, pvParameters ); 8012ef6: 683a ldr r2, [r7, #0] 8012ef8: 68f9 ldr r1, [r7, #12] 8012efa: 69b8 ldr r0, [r7, #24] 8012efc: f001 fce0 bl 80148c0 8012f00: 4602 mov r2, r0 8012f02: 6b3b ldr r3, [r7, #48] @ 0x30 8012f04: 601a str r2, [r3, #0] } #endif /* portHAS_STACK_OVERFLOW_CHECKING */ } #endif /* portUSING_MPU_WRAPPERS */ if( pxCreatedTask != NULL ) 8012f06: 6afb ldr r3, [r7, #44] @ 0x2c 8012f08: 2b00 cmp r3, #0 8012f0a: d002 beq.n 8012f12 { /* 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; 8012f0c: 6afb ldr r3, [r7, #44] @ 0x2c 8012f0e: 6b3a ldr r2, [r7, #48] @ 0x30 8012f10: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } } 8012f12: bf00 nop 8012f14: 3720 adds r7, #32 8012f16: 46bd mov sp, r7 8012f18: bd80 pop {r7, pc} 8012f1a: bf00 nop 8012f1c: 2402b044 .word 0x2402b044 8012f20: 2402b0ac .word 0x2402b0ac 8012f24: 2402b114 .word 0x2402b114 08012f28 : /*-----------------------------------------------------------*/ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB ) { 8012f28: b580 push {r7, lr} 8012f2a: b082 sub sp, #8 8012f2c: af00 add r7, sp, #0 8012f2e: 6078 str r0, [r7, #4] /* Ensure interrupts don't access the task lists while the lists are being updated. */ taskENTER_CRITICAL(); 8012f30: f001 fdfa bl 8014b28 { uxCurrentNumberOfTasks++; 8012f34: 4b2d ldr r3, [pc, #180] @ (8012fec ) 8012f36: 681b ldr r3, [r3, #0] 8012f38: 3301 adds r3, #1 8012f3a: 4a2c ldr r2, [pc, #176] @ (8012fec ) 8012f3c: 6013 str r3, [r2, #0] if( pxCurrentTCB == NULL ) 8012f3e: 4b2c ldr r3, [pc, #176] @ (8012ff0 ) 8012f40: 681b ldr r3, [r3, #0] 8012f42: 2b00 cmp r3, #0 8012f44: d109 bne.n 8012f5a { /* There are no other tasks, or all the other tasks are in the suspended state - make this the current task. */ pxCurrentTCB = pxNewTCB; 8012f46: 4a2a ldr r2, [pc, #168] @ (8012ff0 ) 8012f48: 687b ldr r3, [r7, #4] 8012f4a: 6013 str r3, [r2, #0] if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 ) 8012f4c: 4b27 ldr r3, [pc, #156] @ (8012fec ) 8012f4e: 681b ldr r3, [r3, #0] 8012f50: 2b01 cmp r3, #1 8012f52: d110 bne.n 8012f76 { /* 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(); 8012f54: f000 fc76 bl 8013844 8012f58: e00d b.n 8012f76 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 ) 8012f5a: 4b26 ldr r3, [pc, #152] @ (8012ff4 ) 8012f5c: 681b ldr r3, [r3, #0] 8012f5e: 2b00 cmp r3, #0 8012f60: d109 bne.n 8012f76 { if( pxCurrentTCB->uxPriority <= pxNewTCB->uxPriority ) 8012f62: 4b23 ldr r3, [pc, #140] @ (8012ff0 ) 8012f64: 681b ldr r3, [r3, #0] 8012f66: 6ada ldr r2, [r3, #44] @ 0x2c 8012f68: 687b ldr r3, [r7, #4] 8012f6a: 6adb ldr r3, [r3, #44] @ 0x2c 8012f6c: 429a cmp r2, r3 8012f6e: d802 bhi.n 8012f76 { pxCurrentTCB = pxNewTCB; 8012f70: 4a1f ldr r2, [pc, #124] @ (8012ff0 ) 8012f72: 687b ldr r3, [r7, #4] 8012f74: 6013 str r3, [r2, #0] { mtCOVERAGE_TEST_MARKER(); } } uxTaskNumber++; 8012f76: 4b20 ldr r3, [pc, #128] @ (8012ff8 ) 8012f78: 681b ldr r3, [r3, #0] 8012f7a: 3301 adds r3, #1 8012f7c: 4a1e ldr r2, [pc, #120] @ (8012ff8 ) 8012f7e: 6013 str r3, [r2, #0] #if ( configUSE_TRACE_FACILITY == 1 ) { /* Add a counter into the TCB for tracing only. */ pxNewTCB->uxTCBNumber = uxTaskNumber; 8012f80: 4b1d ldr r3, [pc, #116] @ (8012ff8 ) 8012f82: 681a ldr r2, [r3, #0] 8012f84: 687b ldr r3, [r7, #4] 8012f86: 645a str r2, [r3, #68] @ 0x44 } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); 8012f88: 687b ldr r3, [r7, #4] 8012f8a: 6ada ldr r2, [r3, #44] @ 0x2c 8012f8c: 4b1b ldr r3, [pc, #108] @ (8012ffc ) 8012f8e: 681b ldr r3, [r3, #0] 8012f90: 429a cmp r2, r3 8012f92: d903 bls.n 8012f9c 8012f94: 687b ldr r3, [r7, #4] 8012f96: 6adb ldr r3, [r3, #44] @ 0x2c 8012f98: 4a18 ldr r2, [pc, #96] @ (8012ffc ) 8012f9a: 6013 str r3, [r2, #0] 8012f9c: 687b ldr r3, [r7, #4] 8012f9e: 6ada ldr r2, [r3, #44] @ 0x2c 8012fa0: 4613 mov r3, r2 8012fa2: 009b lsls r3, r3, #2 8012fa4: 4413 add r3, r2 8012fa6: 009b lsls r3, r3, #2 8012fa8: 4a15 ldr r2, [pc, #84] @ (8013000 ) 8012faa: 441a add r2, r3 8012fac: 687b ldr r3, [r7, #4] 8012fae: 3304 adds r3, #4 8012fb0: 4619 mov r1, r3 8012fb2: 4610 mov r0, r2 8012fb4: f7fe f929 bl 801120a portSETUP_TCB( pxNewTCB ); } taskEXIT_CRITICAL(); 8012fb8: f001 fde8 bl 8014b8c if( xSchedulerRunning != pdFALSE ) 8012fbc: 4b0d ldr r3, [pc, #52] @ (8012ff4 ) 8012fbe: 681b ldr r3, [r3, #0] 8012fc0: 2b00 cmp r3, #0 8012fc2: d00e beq.n 8012fe2 { /* If the created task is of a higher priority than the current task then it should run now. */ if( pxCurrentTCB->uxPriority < pxNewTCB->uxPriority ) 8012fc4: 4b0a ldr r3, [pc, #40] @ (8012ff0 ) 8012fc6: 681b ldr r3, [r3, #0] 8012fc8: 6ada ldr r2, [r3, #44] @ 0x2c 8012fca: 687b ldr r3, [r7, #4] 8012fcc: 6adb ldr r3, [r3, #44] @ 0x2c 8012fce: 429a cmp r2, r3 8012fd0: d207 bcs.n 8012fe2 { taskYIELD_IF_USING_PREEMPTION(); 8012fd2: 4b0c ldr r3, [pc, #48] @ (8013004 ) 8012fd4: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8012fd8: 601a str r2, [r3, #0] 8012fda: f3bf 8f4f dsb sy 8012fde: f3bf 8f6f isb sy } else { mtCOVERAGE_TEST_MARKER(); } } 8012fe2: bf00 nop 8012fe4: 3708 adds r7, #8 8012fe6: 46bd mov sp, r7 8012fe8: bd80 pop {r7, pc} 8012fea: bf00 nop 8012fec: 24004164 .word 0x24004164 8012ff0: 24003c90 .word 0x24003c90 8012ff4: 24004170 .word 0x24004170 8012ff8: 24004180 .word 0x24004180 8012ffc: 2400416c .word 0x2400416c 8013000: 24003c94 .word 0x24003c94 8013004: e000ed04 .word 0xe000ed04 08013008 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelay == 1 ) void vTaskDelay( const TickType_t xTicksToDelay ) { 8013008: b580 push {r7, lr} 801300a: b084 sub sp, #16 801300c: af00 add r7, sp, #0 801300e: 6078 str r0, [r7, #4] BaseType_t xAlreadyYielded = pdFALSE; 8013010: 2300 movs r3, #0 8013012: 60fb str r3, [r7, #12] /* A delay time of zero just forces a reschedule. */ if( xTicksToDelay > ( TickType_t ) 0U ) 8013014: 687b ldr r3, [r7, #4] 8013016: 2b00 cmp r3, #0 8013018: d018 beq.n 801304c { configASSERT( uxSchedulerSuspended == 0 ); 801301a: 4b14 ldr r3, [pc, #80] @ (801306c ) 801301c: 681b ldr r3, [r3, #0] 801301e: 2b00 cmp r3, #0 8013020: d00b beq.n 801303a __asm volatile 8013022: f04f 0350 mov.w r3, #80 @ 0x50 8013026: f383 8811 msr BASEPRI, r3 801302a: f3bf 8f6f isb sy 801302e: f3bf 8f4f dsb sy 8013032: 60bb str r3, [r7, #8] } 8013034: bf00 nop 8013036: bf00 nop 8013038: e7fd b.n 8013036 vTaskSuspendAll(); 801303a: f000 f88b bl 8013154 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 ); 801303e: 2100 movs r1, #0 8013040: 6878 ldr r0, [r7, #4] 8013042: f001 f88f bl 8014164 } xAlreadyYielded = xTaskResumeAll(); 8013046: f000 f893 bl 8013170 801304a: 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 ) 801304c: 68fb ldr r3, [r7, #12] 801304e: 2b00 cmp r3, #0 8013050: d107 bne.n 8013062 { portYIELD_WITHIN_API(); 8013052: 4b07 ldr r3, [pc, #28] @ (8013070 ) 8013054: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8013058: 601a str r2, [r3, #0] 801305a: f3bf 8f4f dsb sy 801305e: f3bf 8f6f isb sy } else { mtCOVERAGE_TEST_MARKER(); } } 8013062: bf00 nop 8013064: 3710 adds r7, #16 8013066: 46bd mov sp, r7 8013068: bd80 pop {r7, pc} 801306a: bf00 nop 801306c: 2400418c .word 0x2400418c 8013070: e000ed04 .word 0xe000ed04 08013074 : #endif /* ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) ) */ /*-----------------------------------------------------------*/ void vTaskStartScheduler( void ) { 8013074: b580 push {r7, lr} 8013076: b08a sub sp, #40 @ 0x28 8013078: 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; 801307a: 2300 movs r3, #0 801307c: 60bb str r3, [r7, #8] StackType_t *pxIdleTaskStackBuffer = NULL; 801307e: 2300 movs r3, #0 8013080: 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 ); 8013082: 463a mov r2, r7 8013084: 1d39 adds r1, r7, #4 8013086: f107 0308 add.w r3, r7, #8 801308a: 4618 mov r0, r3 801308c: f7fe f85c bl 8011148 xIdleTaskHandle = xTaskCreateStatic( prvIdleTask, 8013090: 6839 ldr r1, [r7, #0] 8013092: 687b ldr r3, [r7, #4] 8013094: 68ba ldr r2, [r7, #8] 8013096: 9202 str r2, [sp, #8] 8013098: 9301 str r3, [sp, #4] 801309a: 2300 movs r3, #0 801309c: 9300 str r3, [sp, #0] 801309e: 2300 movs r3, #0 80130a0: 460a mov r2, r1 80130a2: 4924 ldr r1, [pc, #144] @ (8013134 ) 80130a4: 4824 ldr r0, [pc, #144] @ (8013138 ) 80130a6: f7ff fdf1 bl 8012c8c 80130aa: 4603 mov r3, r0 80130ac: 4a23 ldr r2, [pc, #140] @ (801313c ) 80130ae: 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 ) 80130b0: 4b22 ldr r3, [pc, #136] @ (801313c ) 80130b2: 681b ldr r3, [r3, #0] 80130b4: 2b00 cmp r3, #0 80130b6: d002 beq.n 80130be { xReturn = pdPASS; 80130b8: 2301 movs r3, #1 80130ba: 617b str r3, [r7, #20] 80130bc: e001 b.n 80130c2 } else { xReturn = pdFAIL; 80130be: 2300 movs r3, #0 80130c0: 617b str r3, [r7, #20] } #endif /* configSUPPORT_STATIC_ALLOCATION */ #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) 80130c2: 697b ldr r3, [r7, #20] 80130c4: 2b01 cmp r3, #1 80130c6: d102 bne.n 80130ce { xReturn = xTimerCreateTimerTask(); 80130c8: f001 f8a0 bl 801420c 80130cc: 6178 str r0, [r7, #20] mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) 80130ce: 697b ldr r3, [r7, #20] 80130d0: 2b01 cmp r3, #1 80130d2: d11b bne.n 801310c __asm volatile 80130d4: f04f 0350 mov.w r3, #80 @ 0x50 80130d8: f383 8811 msr BASEPRI, r3 80130dc: f3bf 8f6f isb sy 80130e0: f3bf 8f4f dsb sy 80130e4: 613b str r3, [r7, #16] } 80130e6: 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 ); 80130e8: 4b15 ldr r3, [pc, #84] @ (8013140 ) 80130ea: 681b ldr r3, [r3, #0] 80130ec: 3354 adds r3, #84 @ 0x54 80130ee: 4a15 ldr r2, [pc, #84] @ (8013144 ) 80130f0: 6013 str r3, [r2, #0] } #endif /* configUSE_NEWLIB_REENTRANT */ xNextTaskUnblockTime = portMAX_DELAY; 80130f2: 4b15 ldr r3, [pc, #84] @ (8013148 ) 80130f4: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 80130f8: 601a str r2, [r3, #0] xSchedulerRunning = pdTRUE; 80130fa: 4b14 ldr r3, [pc, #80] @ (801314c ) 80130fc: 2201 movs r2, #1 80130fe: 601a str r2, [r3, #0] xTickCount = ( TickType_t ) configINITIAL_TICK_COUNT; 8013100: 4b13 ldr r3, [pc, #76] @ (8013150 ) 8013102: 2200 movs r2, #0 8013104: 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 ) 8013106: f001 fc6b bl 80149e0 } /* Prevent compiler warnings if INCLUDE_xTaskGetIdleTaskHandle is set to 0, meaning xIdleTaskHandle is not used anywhere else. */ ( void ) xIdleTaskHandle; } 801310a: e00f b.n 801312c configASSERT( xReturn != errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY ); 801310c: 697b ldr r3, [r7, #20] 801310e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8013112: d10b bne.n 801312c __asm volatile 8013114: f04f 0350 mov.w r3, #80 @ 0x50 8013118: f383 8811 msr BASEPRI, r3 801311c: f3bf 8f6f isb sy 8013120: f3bf 8f4f dsb sy 8013124: 60fb str r3, [r7, #12] } 8013126: bf00 nop 8013128: bf00 nop 801312a: e7fd b.n 8013128 } 801312c: bf00 nop 801312e: 3718 adds r7, #24 8013130: 46bd mov sp, r7 8013132: bd80 pop {r7, pc} 8013134: 0802cb6c .word 0x0802cb6c 8013138: 08013815 .word 0x08013815 801313c: 24004188 .word 0x24004188 8013140: 24003c90 .word 0x24003c90 8013144: 240001d4 .word 0x240001d4 8013148: 24004184 .word 0x24004184 801314c: 24004170 .word 0x24004170 8013150: 24004168 .word 0x24004168 08013154 : vPortEndScheduler(); } /*----------------------------------------------------------*/ void vTaskSuspendAll( void ) { 8013154: b480 push {r7} 8013156: 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; 8013158: 4b04 ldr r3, [pc, #16] @ (801316c ) 801315a: 681b ldr r3, [r3, #0] 801315c: 3301 adds r3, #1 801315e: 4a03 ldr r2, [pc, #12] @ (801316c ) 8013160: 6013 str r3, [r2, #0] /* Enforces ordering for ports and optimised compilers that may otherwise place the above increment elsewhere. */ portMEMORY_BARRIER(); } 8013162: bf00 nop 8013164: 46bd mov sp, r7 8013166: f85d 7b04 ldr.w r7, [sp], #4 801316a: 4770 bx lr 801316c: 2400418c .word 0x2400418c 08013170 : #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { 8013170: b580 push {r7, lr} 8013172: b084 sub sp, #16 8013174: af00 add r7, sp, #0 TCB_t *pxTCB = NULL; 8013176: 2300 movs r3, #0 8013178: 60fb str r3, [r7, #12] BaseType_t xAlreadyYielded = pdFALSE; 801317a: 2300 movs r3, #0 801317c: 60bb str r3, [r7, #8] /* If uxSchedulerSuspended is zero then this function does not match a previous call to vTaskSuspendAll(). */ configASSERT( uxSchedulerSuspended ); 801317e: 4b42 ldr r3, [pc, #264] @ (8013288 ) 8013180: 681b ldr r3, [r3, #0] 8013182: 2b00 cmp r3, #0 8013184: d10b bne.n 801319e __asm volatile 8013186: f04f 0350 mov.w r3, #80 @ 0x50 801318a: f383 8811 msr BASEPRI, r3 801318e: f3bf 8f6f isb sy 8013192: f3bf 8f4f dsb sy 8013196: 603b str r3, [r7, #0] } 8013198: bf00 nop 801319a: bf00 nop 801319c: e7fd b.n 801319a /* 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(); 801319e: f001 fcc3 bl 8014b28 { --uxSchedulerSuspended; 80131a2: 4b39 ldr r3, [pc, #228] @ (8013288 ) 80131a4: 681b ldr r3, [r3, #0] 80131a6: 3b01 subs r3, #1 80131a8: 4a37 ldr r2, [pc, #220] @ (8013288 ) 80131aa: 6013 str r3, [r2, #0] if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 80131ac: 4b36 ldr r3, [pc, #216] @ (8013288 ) 80131ae: 681b ldr r3, [r3, #0] 80131b0: 2b00 cmp r3, #0 80131b2: d162 bne.n 801327a { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) 80131b4: 4b35 ldr r3, [pc, #212] @ (801328c ) 80131b6: 681b ldr r3, [r3, #0] 80131b8: 2b00 cmp r3, #0 80131ba: d05e beq.n 801327a { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 80131bc: e02f b.n 801321e { 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. */ 80131be: 4b34 ldr r3, [pc, #208] @ (8013290 ) 80131c0: 68db ldr r3, [r3, #12] 80131c2: 68db ldr r3, [r3, #12] 80131c4: 60fb str r3, [r7, #12] ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 80131c6: 68fb ldr r3, [r7, #12] 80131c8: 3318 adds r3, #24 80131ca: 4618 mov r0, r3 80131cc: f7fe f87a bl 80112c4 ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 80131d0: 68fb ldr r3, [r7, #12] 80131d2: 3304 adds r3, #4 80131d4: 4618 mov r0, r3 80131d6: f7fe f875 bl 80112c4 prvAddTaskToReadyList( pxTCB ); 80131da: 68fb ldr r3, [r7, #12] 80131dc: 6ada ldr r2, [r3, #44] @ 0x2c 80131de: 4b2d ldr r3, [pc, #180] @ (8013294 ) 80131e0: 681b ldr r3, [r3, #0] 80131e2: 429a cmp r2, r3 80131e4: d903 bls.n 80131ee 80131e6: 68fb ldr r3, [r7, #12] 80131e8: 6adb ldr r3, [r3, #44] @ 0x2c 80131ea: 4a2a ldr r2, [pc, #168] @ (8013294 ) 80131ec: 6013 str r3, [r2, #0] 80131ee: 68fb ldr r3, [r7, #12] 80131f0: 6ada ldr r2, [r3, #44] @ 0x2c 80131f2: 4613 mov r3, r2 80131f4: 009b lsls r3, r3, #2 80131f6: 4413 add r3, r2 80131f8: 009b lsls r3, r3, #2 80131fa: 4a27 ldr r2, [pc, #156] @ (8013298 ) 80131fc: 441a add r2, r3 80131fe: 68fb ldr r3, [r7, #12] 8013200: 3304 adds r3, #4 8013202: 4619 mov r1, r3 8013204: 4610 mov r0, r2 8013206: f7fe f800 bl 801120a /* If the moved task has a priority higher than the current task then a yield must be performed. */ if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority ) 801320a: 68fb ldr r3, [r7, #12] 801320c: 6ada ldr r2, [r3, #44] @ 0x2c 801320e: 4b23 ldr r3, [pc, #140] @ (801329c ) 8013210: 681b ldr r3, [r3, #0] 8013212: 6adb ldr r3, [r3, #44] @ 0x2c 8013214: 429a cmp r2, r3 8013216: d302 bcc.n 801321e { xYieldPending = pdTRUE; 8013218: 4b21 ldr r3, [pc, #132] @ (80132a0 ) 801321a: 2201 movs r2, #1 801321c: 601a str r2, [r3, #0] while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 801321e: 4b1c ldr r3, [pc, #112] @ (8013290 ) 8013220: 681b ldr r3, [r3, #0] 8013222: 2b00 cmp r3, #0 8013224: d1cb bne.n 80131be { mtCOVERAGE_TEST_MARKER(); } } if( pxTCB != NULL ) 8013226: 68fb ldr r3, [r7, #12] 8013228: 2b00 cmp r3, #0 801322a: d001 beq.n 8013230 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(); 801322c: f000 fbae bl 801398c /* 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. */ 8013230: 4b1c ldr r3, [pc, #112] @ (80132a4 ) 8013232: 681b ldr r3, [r3, #0] 8013234: 607b str r3, [r7, #4] if( xPendedCounts > ( TickType_t ) 0U ) 8013236: 687b ldr r3, [r7, #4] 8013238: 2b00 cmp r3, #0 801323a: d010 beq.n 801325e { do { if( xTaskIncrementTick() != pdFALSE ) 801323c: f000 f858 bl 80132f0 8013240: 4603 mov r3, r0 8013242: 2b00 cmp r3, #0 8013244: d002 beq.n 801324c { xYieldPending = pdTRUE; 8013246: 4b16 ldr r3, [pc, #88] @ (80132a0 ) 8013248: 2201 movs r2, #1 801324a: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } --xPendedCounts; 801324c: 687b ldr r3, [r7, #4] 801324e: 3b01 subs r3, #1 8013250: 607b str r3, [r7, #4] } while( xPendedCounts > ( TickType_t ) 0U ); 8013252: 687b ldr r3, [r7, #4] 8013254: 2b00 cmp r3, #0 8013256: d1f1 bne.n 801323c xPendedTicks = 0; 8013258: 4b12 ldr r3, [pc, #72] @ (80132a4 ) 801325a: 2200 movs r2, #0 801325c: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } } if( xYieldPending != pdFALSE ) 801325e: 4b10 ldr r3, [pc, #64] @ (80132a0 ) 8013260: 681b ldr r3, [r3, #0] 8013262: 2b00 cmp r3, #0 8013264: d009 beq.n 801327a { #if( configUSE_PREEMPTION != 0 ) { xAlreadyYielded = pdTRUE; 8013266: 2301 movs r3, #1 8013268: 60bb str r3, [r7, #8] } #endif taskYIELD_IF_USING_PREEMPTION(); 801326a: 4b0f ldr r3, [pc, #60] @ (80132a8 ) 801326c: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8013270: 601a str r2, [r3, #0] 8013272: f3bf 8f4f dsb sy 8013276: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 801327a: f001 fc87 bl 8014b8c return xAlreadyYielded; 801327e: 68bb ldr r3, [r7, #8] } 8013280: 4618 mov r0, r3 8013282: 3710 adds r7, #16 8013284: 46bd mov sp, r7 8013286: bd80 pop {r7, pc} 8013288: 2400418c .word 0x2400418c 801328c: 24004164 .word 0x24004164 8013290: 24004124 .word 0x24004124 8013294: 2400416c .word 0x2400416c 8013298: 24003c94 .word 0x24003c94 801329c: 24003c90 .word 0x24003c90 80132a0: 24004178 .word 0x24004178 80132a4: 24004174 .word 0x24004174 80132a8: e000ed04 .word 0xe000ed04 080132ac : /*-----------------------------------------------------------*/ TickType_t xTaskGetTickCount( void ) { 80132ac: b480 push {r7} 80132ae: b083 sub sp, #12 80132b0: af00 add r7, sp, #0 TickType_t xTicks; /* Critical section required if running on a 16 bit processor. */ portTICK_TYPE_ENTER_CRITICAL(); { xTicks = xTickCount; 80132b2: 4b05 ldr r3, [pc, #20] @ (80132c8 ) 80132b4: 681b ldr r3, [r3, #0] 80132b6: 607b str r3, [r7, #4] } portTICK_TYPE_EXIT_CRITICAL(); return xTicks; 80132b8: 687b ldr r3, [r7, #4] } 80132ba: 4618 mov r0, r3 80132bc: 370c adds r7, #12 80132be: 46bd mov sp, r7 80132c0: f85d 7b04 ldr.w r7, [sp], #4 80132c4: 4770 bx lr 80132c6: bf00 nop 80132c8: 24004168 .word 0x24004168 080132cc : /*-----------------------------------------------------------*/ TickType_t xTaskGetTickCountFromISR( void ) { 80132cc: b580 push {r7, lr} 80132ce: b082 sub sp, #8 80132d0: 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(); 80132d2: f001 fd09 bl 8014ce8 uxSavedInterruptStatus = portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR(); 80132d6: 2300 movs r3, #0 80132d8: 607b str r3, [r7, #4] { xReturn = xTickCount; 80132da: 4b04 ldr r3, [pc, #16] @ (80132ec ) 80132dc: 681b ldr r3, [r3, #0] 80132de: 603b str r3, [r7, #0] } portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; 80132e0: 683b ldr r3, [r7, #0] } 80132e2: 4618 mov r0, r3 80132e4: 3708 adds r7, #8 80132e6: 46bd mov sp, r7 80132e8: bd80 pop {r7, pc} 80132ea: bf00 nop 80132ec: 24004168 .word 0x24004168 080132f0 : #endif /* INCLUDE_xTaskAbortDelay */ /*----------------------------------------------------------*/ BaseType_t xTaskIncrementTick( void ) { 80132f0: b580 push {r7, lr} 80132f2: b086 sub sp, #24 80132f4: af00 add r7, sp, #0 TCB_t * pxTCB; TickType_t xItemValue; BaseType_t xSwitchRequired = pdFALSE; 80132f6: 2300 movs r3, #0 80132f8: 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 ) 80132fa: 4b4f ldr r3, [pc, #316] @ (8013438 ) 80132fc: 681b ldr r3, [r3, #0] 80132fe: 2b00 cmp r3, #0 8013300: f040 8090 bne.w 8013424 { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount + ( TickType_t ) 1; 8013304: 4b4d ldr r3, [pc, #308] @ (801343c ) 8013306: 681b ldr r3, [r3, #0] 8013308: 3301 adds r3, #1 801330a: 613b str r3, [r7, #16] /* Increment the RTOS tick, switching the delayed and overflowed delayed lists if it wraps to 0. */ xTickCount = xConstTickCount; 801330c: 4a4b ldr r2, [pc, #300] @ (801343c ) 801330e: 693b ldr r3, [r7, #16] 8013310: 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. */ 8013312: 693b ldr r3, [r7, #16] 8013314: 2b00 cmp r3, #0 8013316: d121 bne.n 801335c { taskSWITCH_DELAYED_LISTS(); 8013318: 4b49 ldr r3, [pc, #292] @ (8013440 ) 801331a: 681b ldr r3, [r3, #0] 801331c: 681b ldr r3, [r3, #0] 801331e: 2b00 cmp r3, #0 8013320: d00b beq.n 801333a __asm volatile 8013322: f04f 0350 mov.w r3, #80 @ 0x50 8013326: f383 8811 msr BASEPRI, r3 801332a: f3bf 8f6f isb sy 801332e: f3bf 8f4f dsb sy 8013332: 603b str r3, [r7, #0] } 8013334: bf00 nop 8013336: bf00 nop 8013338: e7fd b.n 8013336 801333a: 4b41 ldr r3, [pc, #260] @ (8013440 ) 801333c: 681b ldr r3, [r3, #0] 801333e: 60fb str r3, [r7, #12] 8013340: 4b40 ldr r3, [pc, #256] @ (8013444 ) 8013342: 681b ldr r3, [r3, #0] 8013344: 4a3e ldr r2, [pc, #248] @ (8013440 ) 8013346: 6013 str r3, [r2, #0] 8013348: 4a3e ldr r2, [pc, #248] @ (8013444 ) 801334a: 68fb ldr r3, [r7, #12] 801334c: 6013 str r3, [r2, #0] 801334e: 4b3e ldr r3, [pc, #248] @ (8013448 ) 8013350: 681b ldr r3, [r3, #0] 8013352: 3301 adds r3, #1 8013354: 4a3c ldr r2, [pc, #240] @ (8013448 ) 8013356: 6013 str r3, [r2, #0] 8013358: f000 fb18 bl 801398c /* 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 ) 801335c: 4b3b ldr r3, [pc, #236] @ (801344c ) 801335e: 681b ldr r3, [r3, #0] 8013360: 693a ldr r2, [r7, #16] 8013362: 429a cmp r2, r3 8013364: d349 bcc.n 80133fa { for( ;; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 8013366: 4b36 ldr r3, [pc, #216] @ (8013440 ) 8013368: 681b ldr r3, [r3, #0] 801336a: 681b ldr r3, [r3, #0] 801336c: 2b00 cmp r3, #0 801336e: d104 bne.n 801337a /* 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. */ 8013370: 4b36 ldr r3, [pc, #216] @ (801344c ) 8013372: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 8013376: 601a str r2, [r3, #0] break; 8013378: e03f b.n 80133fa { /* 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. */ 801337a: 4b31 ldr r3, [pc, #196] @ (8013440 ) 801337c: 681b ldr r3, [r3, #0] 801337e: 68db ldr r3, [r3, #12] 8013380: 68db ldr r3, [r3, #12] 8013382: 60bb str r3, [r7, #8] xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xStateListItem ) ); 8013384: 68bb ldr r3, [r7, #8] 8013386: 685b ldr r3, [r3, #4] 8013388: 607b str r3, [r7, #4] if( xConstTickCount < xItemValue ) 801338a: 693a ldr r2, [r7, #16] 801338c: 687b ldr r3, [r7, #4] 801338e: 429a cmp r2, r3 8013390: d203 bcs.n 801339a /* 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; 8013392: 4a2e ldr r2, [pc, #184] @ (801344c ) 8013394: 687b ldr r3, [r7, #4] 8013396: 6013 str r3, [r2, #0] break; /*lint !e9011 Code structure here is deedmed easier to understand with multiple breaks. */ 8013398: e02f b.n 80133fa { mtCOVERAGE_TEST_MARKER(); } /* It is time to remove the item from the Blocked state. */ ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 801339a: 68bb ldr r3, [r7, #8] 801339c: 3304 adds r3, #4 801339e: 4618 mov r0, r3 80133a0: f7fd ff90 bl 80112c4 /* Is the task waiting on an event also? If so remove it from the event list. */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 80133a4: 68bb ldr r3, [r7, #8] 80133a6: 6a9b ldr r3, [r3, #40] @ 0x28 80133a8: 2b00 cmp r3, #0 80133aa: d004 beq.n 80133b6 { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 80133ac: 68bb ldr r3, [r7, #8] 80133ae: 3318 adds r3, #24 80133b0: 4618 mov r0, r3 80133b2: f7fd ff87 bl 80112c4 mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready list. */ prvAddTaskToReadyList( pxTCB ); 80133b6: 68bb ldr r3, [r7, #8] 80133b8: 6ada ldr r2, [r3, #44] @ 0x2c 80133ba: 4b25 ldr r3, [pc, #148] @ (8013450 ) 80133bc: 681b ldr r3, [r3, #0] 80133be: 429a cmp r2, r3 80133c0: d903 bls.n 80133ca 80133c2: 68bb ldr r3, [r7, #8] 80133c4: 6adb ldr r3, [r3, #44] @ 0x2c 80133c6: 4a22 ldr r2, [pc, #136] @ (8013450 ) 80133c8: 6013 str r3, [r2, #0] 80133ca: 68bb ldr r3, [r7, #8] 80133cc: 6ada ldr r2, [r3, #44] @ 0x2c 80133ce: 4613 mov r3, r2 80133d0: 009b lsls r3, r3, #2 80133d2: 4413 add r3, r2 80133d4: 009b lsls r3, r3, #2 80133d6: 4a1f ldr r2, [pc, #124] @ (8013454 ) 80133d8: 441a add r2, r3 80133da: 68bb ldr r3, [r7, #8] 80133dc: 3304 adds r3, #4 80133de: 4619 mov r1, r3 80133e0: 4610 mov r0, r2 80133e2: f7fd ff12 bl 801120a { /* 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 ) 80133e6: 68bb ldr r3, [r7, #8] 80133e8: 6ada ldr r2, [r3, #44] @ 0x2c 80133ea: 4b1b ldr r3, [pc, #108] @ (8013458 ) 80133ec: 681b ldr r3, [r3, #0] 80133ee: 6adb ldr r3, [r3, #44] @ 0x2c 80133f0: 429a cmp r2, r3 80133f2: d3b8 bcc.n 8013366 { xSwitchRequired = pdTRUE; 80133f4: 2301 movs r3, #1 80133f6: 617b str r3, [r7, #20] if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 80133f8: e7b5 b.n 8013366 /* 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 ) 80133fa: 4b17 ldr r3, [pc, #92] @ (8013458 ) 80133fc: 681b ldr r3, [r3, #0] 80133fe: 6ada ldr r2, [r3, #44] @ 0x2c 8013400: 4914 ldr r1, [pc, #80] @ (8013454 ) 8013402: 4613 mov r3, r2 8013404: 009b lsls r3, r3, #2 8013406: 4413 add r3, r2 8013408: 009b lsls r3, r3, #2 801340a: 440b add r3, r1 801340c: 681b ldr r3, [r3, #0] 801340e: 2b01 cmp r3, #1 8013410: d901 bls.n 8013416 { xSwitchRequired = pdTRUE; 8013412: 2301 movs r3, #1 8013414: 617b str r3, [r7, #20] } #endif /* configUSE_TICK_HOOK */ #if ( configUSE_PREEMPTION == 1 ) { if( xYieldPending != pdFALSE ) 8013416: 4b11 ldr r3, [pc, #68] @ (801345c ) 8013418: 681b ldr r3, [r3, #0] 801341a: 2b00 cmp r3, #0 801341c: d007 beq.n 801342e { xSwitchRequired = pdTRUE; 801341e: 2301 movs r3, #1 8013420: 617b str r3, [r7, #20] 8013422: e004 b.n 801342e } #endif /* configUSE_PREEMPTION */ } else { ++xPendedTicks; 8013424: 4b0e ldr r3, [pc, #56] @ (8013460 ) 8013426: 681b ldr r3, [r3, #0] 8013428: 3301 adds r3, #1 801342a: 4a0d ldr r2, [pc, #52] @ (8013460 ) 801342c: 6013 str r3, [r2, #0] vApplicationTickHook(); } #endif } return xSwitchRequired; 801342e: 697b ldr r3, [r7, #20] } 8013430: 4618 mov r0, r3 8013432: 3718 adds r7, #24 8013434: 46bd mov sp, r7 8013436: bd80 pop {r7, pc} 8013438: 2400418c .word 0x2400418c 801343c: 24004168 .word 0x24004168 8013440: 2400411c .word 0x2400411c 8013444: 24004120 .word 0x24004120 8013448: 2400417c .word 0x2400417c 801344c: 24004184 .word 0x24004184 8013450: 2400416c .word 0x2400416c 8013454: 24003c94 .word 0x24003c94 8013458: 24003c90 .word 0x24003c90 801345c: 24004178 .word 0x24004178 8013460: 24004174 .word 0x24004174 08013464 : #endif /* configUSE_APPLICATION_TASK_TAG */ /*-----------------------------------------------------------*/ void vTaskSwitchContext( void ) { 8013464: b580 push {r7, lr} 8013466: b084 sub sp, #16 8013468: af00 add r7, sp, #0 if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE ) 801346a: 4b32 ldr r3, [pc, #200] @ (8013534 ) 801346c: 681b ldr r3, [r3, #0] 801346e: 2b00 cmp r3, #0 8013470: d003 beq.n 801347a { /* The scheduler is currently suspended - do not allow a context switch. */ xYieldPending = pdTRUE; 8013472: 4b31 ldr r3, [pc, #196] @ (8013538 ) 8013474: 2201 movs r2, #1 8013476: 601a str r2, [r3, #0] for additional information. */ _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); } #endif /* configUSE_NEWLIB_REENTRANT */ } } 8013478: e058 b.n 801352c xYieldPending = pdFALSE; 801347a: 4b2f ldr r3, [pc, #188] @ (8013538 ) 801347c: 2200 movs r2, #0 801347e: 601a str r2, [r3, #0] taskCHECK_FOR_STACK_OVERFLOW(); 8013480: 4b2e ldr r3, [pc, #184] @ (801353c ) 8013482: 681b ldr r3, [r3, #0] 8013484: 681a ldr r2, [r3, #0] 8013486: 4b2d ldr r3, [pc, #180] @ (801353c ) 8013488: 681b ldr r3, [r3, #0] 801348a: 6b1b ldr r3, [r3, #48] @ 0x30 801348c: 429a cmp r2, r3 801348e: d808 bhi.n 80134a2 8013490: 4b2a ldr r3, [pc, #168] @ (801353c ) 8013492: 681a ldr r2, [r3, #0] 8013494: 4b29 ldr r3, [pc, #164] @ (801353c ) 8013496: 681b ldr r3, [r3, #0] 8013498: 3334 adds r3, #52 @ 0x34 801349a: 4619 mov r1, r3 801349c: 4610 mov r0, r2 801349e: f7ee fc00 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. */ 80134a2: 4b27 ldr r3, [pc, #156] @ (8013540 ) 80134a4: 681b ldr r3, [r3, #0] 80134a6: 60fb str r3, [r7, #12] 80134a8: e011 b.n 80134ce 80134aa: 68fb ldr r3, [r7, #12] 80134ac: 2b00 cmp r3, #0 80134ae: d10b bne.n 80134c8 __asm volatile 80134b0: f04f 0350 mov.w r3, #80 @ 0x50 80134b4: f383 8811 msr BASEPRI, r3 80134b8: f3bf 8f6f isb sy 80134bc: f3bf 8f4f dsb sy 80134c0: 607b str r3, [r7, #4] } 80134c2: bf00 nop 80134c4: bf00 nop 80134c6: e7fd b.n 80134c4 80134c8: 68fb ldr r3, [r7, #12] 80134ca: 3b01 subs r3, #1 80134cc: 60fb str r3, [r7, #12] 80134ce: 491d ldr r1, [pc, #116] @ (8013544 ) 80134d0: 68fa ldr r2, [r7, #12] 80134d2: 4613 mov r3, r2 80134d4: 009b lsls r3, r3, #2 80134d6: 4413 add r3, r2 80134d8: 009b lsls r3, r3, #2 80134da: 440b add r3, r1 80134dc: 681b ldr r3, [r3, #0] 80134de: 2b00 cmp r3, #0 80134e0: d0e3 beq.n 80134aa 80134e2: 68fa ldr r2, [r7, #12] 80134e4: 4613 mov r3, r2 80134e6: 009b lsls r3, r3, #2 80134e8: 4413 add r3, r2 80134ea: 009b lsls r3, r3, #2 80134ec: 4a15 ldr r2, [pc, #84] @ (8013544 ) 80134ee: 4413 add r3, r2 80134f0: 60bb str r3, [r7, #8] 80134f2: 68bb ldr r3, [r7, #8] 80134f4: 685b ldr r3, [r3, #4] 80134f6: 685a ldr r2, [r3, #4] 80134f8: 68bb ldr r3, [r7, #8] 80134fa: 605a str r2, [r3, #4] 80134fc: 68bb ldr r3, [r7, #8] 80134fe: 685a ldr r2, [r3, #4] 8013500: 68bb ldr r3, [r7, #8] 8013502: 3308 adds r3, #8 8013504: 429a cmp r2, r3 8013506: d104 bne.n 8013512 8013508: 68bb ldr r3, [r7, #8] 801350a: 685b ldr r3, [r3, #4] 801350c: 685a ldr r2, [r3, #4] 801350e: 68bb ldr r3, [r7, #8] 8013510: 605a str r2, [r3, #4] 8013512: 68bb ldr r3, [r7, #8] 8013514: 685b ldr r3, [r3, #4] 8013516: 68db ldr r3, [r3, #12] 8013518: 4a08 ldr r2, [pc, #32] @ (801353c ) 801351a: 6013 str r3, [r2, #0] 801351c: 4a08 ldr r2, [pc, #32] @ (8013540 ) 801351e: 68fb ldr r3, [r7, #12] 8013520: 6013 str r3, [r2, #0] _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); 8013522: 4b06 ldr r3, [pc, #24] @ (801353c ) 8013524: 681b ldr r3, [r3, #0] 8013526: 3354 adds r3, #84 @ 0x54 8013528: 4a07 ldr r2, [pc, #28] @ (8013548 ) 801352a: 6013 str r3, [r2, #0] } 801352c: bf00 nop 801352e: 3710 adds r7, #16 8013530: 46bd mov sp, r7 8013532: bd80 pop {r7, pc} 8013534: 2400418c .word 0x2400418c 8013538: 24004178 .word 0x24004178 801353c: 24003c90 .word 0x24003c90 8013540: 2400416c .word 0x2400416c 8013544: 24003c94 .word 0x24003c94 8013548: 240001d4 .word 0x240001d4 0801354c : /*-----------------------------------------------------------*/ void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait ) { 801354c: b580 push {r7, lr} 801354e: b084 sub sp, #16 8013550: af00 add r7, sp, #0 8013552: 6078 str r0, [r7, #4] 8013554: 6039 str r1, [r7, #0] configASSERT( pxEventList ); 8013556: 687b ldr r3, [r7, #4] 8013558: 2b00 cmp r3, #0 801355a: d10b bne.n 8013574 __asm volatile 801355c: f04f 0350 mov.w r3, #80 @ 0x50 8013560: f383 8811 msr BASEPRI, r3 8013564: f3bf 8f6f isb sy 8013568: f3bf 8f4f dsb sy 801356c: 60fb str r3, [r7, #12] } 801356e: bf00 nop 8013570: bf00 nop 8013572: e7fd b.n 8013570 /* 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 ) ); 8013574: 4b07 ldr r3, [pc, #28] @ (8013594 ) 8013576: 681b ldr r3, [r3, #0] 8013578: 3318 adds r3, #24 801357a: 4619 mov r1, r3 801357c: 6878 ldr r0, [r7, #4] 801357e: f7fd fe68 bl 8011252 prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE ); 8013582: 2101 movs r1, #1 8013584: 6838 ldr r0, [r7, #0] 8013586: f000 fded bl 8014164 } 801358a: bf00 nop 801358c: 3710 adds r7, #16 801358e: 46bd mov sp, r7 8013590: bd80 pop {r7, pc} 8013592: bf00 nop 8013594: 24003c90 .word 0x24003c90 08013598 : /*-----------------------------------------------------------*/ #if( configUSE_TIMERS == 1 ) void vTaskPlaceOnEventListRestricted( List_t * const pxEventList, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely ) { 8013598: b580 push {r7, lr} 801359a: b086 sub sp, #24 801359c: af00 add r7, sp, #0 801359e: 60f8 str r0, [r7, #12] 80135a0: 60b9 str r1, [r7, #8] 80135a2: 607a str r2, [r7, #4] configASSERT( pxEventList ); 80135a4: 68fb ldr r3, [r7, #12] 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: 617b str r3, [r7, #20] } 80135bc: bf00 nop 80135be: bf00 nop 80135c0: e7fd b.n 80135be /* 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 ) ); 80135c2: 4b0a ldr r3, [pc, #40] @ (80135ec ) 80135c4: 681b ldr r3, [r3, #0] 80135c6: 3318 adds r3, #24 80135c8: 4619 mov r1, r3 80135ca: 68f8 ldr r0, [r7, #12] 80135cc: f7fd fe1d bl 801120a /* 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 ) 80135d0: 687b ldr r3, [r7, #4] 80135d2: 2b00 cmp r3, #0 80135d4: d002 beq.n 80135dc { xTicksToWait = portMAX_DELAY; 80135d6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80135da: 60bb str r3, [r7, #8] } traceTASK_DELAY_UNTIL( ( xTickCount + xTicksToWait ) ); prvAddCurrentTaskToDelayedList( xTicksToWait, xWaitIndefinitely ); 80135dc: 6879 ldr r1, [r7, #4] 80135de: 68b8 ldr r0, [r7, #8] 80135e0: f000 fdc0 bl 8014164 } 80135e4: bf00 nop 80135e6: 3718 adds r7, #24 80135e8: 46bd mov sp, r7 80135ea: bd80 pop {r7, pc} 80135ec: 24003c90 .word 0x24003c90 080135f0 : #endif /* configUSE_TIMERS */ /*-----------------------------------------------------------*/ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList ) { 80135f0: b580 push {r7, lr} 80135f2: b086 sub sp, #24 80135f4: af00 add r7, sp, #0 80135f6: 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. */ 80135f8: 687b ldr r3, [r7, #4] 80135fa: 68db ldr r3, [r3, #12] 80135fc: 68db ldr r3, [r3, #12] 80135fe: 613b str r3, [r7, #16] configASSERT( pxUnblockedTCB ); 8013600: 693b ldr r3, [r7, #16] 8013602: 2b00 cmp r3, #0 8013604: d10b bne.n 801361e __asm volatile 8013606: f04f 0350 mov.w r3, #80 @ 0x50 801360a: f383 8811 msr BASEPRI, r3 801360e: f3bf 8f6f isb sy 8013612: f3bf 8f4f dsb sy 8013616: 60fb str r3, [r7, #12] } 8013618: bf00 nop 801361a: bf00 nop 801361c: e7fd b.n 801361a ( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) ); 801361e: 693b ldr r3, [r7, #16] 8013620: 3318 adds r3, #24 8013622: 4618 mov r0, r3 8013624: f7fd fe4e bl 80112c4 if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 8013628: 4b1d ldr r3, [pc, #116] @ (80136a0 ) 801362a: 681b ldr r3, [r3, #0] 801362c: 2b00 cmp r3, #0 801362e: d11d bne.n 801366c { ( void ) uxListRemove( &( pxUnblockedTCB->xStateListItem ) ); 8013630: 693b ldr r3, [r7, #16] 8013632: 3304 adds r3, #4 8013634: 4618 mov r0, r3 8013636: f7fd fe45 bl 80112c4 prvAddTaskToReadyList( pxUnblockedTCB ); 801363a: 693b ldr r3, [r7, #16] 801363c: 6ada ldr r2, [r3, #44] @ 0x2c 801363e: 4b19 ldr r3, [pc, #100] @ (80136a4 ) 8013640: 681b ldr r3, [r3, #0] 8013642: 429a cmp r2, r3 8013644: d903 bls.n 801364e 8013646: 693b ldr r3, [r7, #16] 8013648: 6adb ldr r3, [r3, #44] @ 0x2c 801364a: 4a16 ldr r2, [pc, #88] @ (80136a4 ) 801364c: 6013 str r3, [r2, #0] 801364e: 693b ldr r3, [r7, #16] 8013650: 6ada ldr r2, [r3, #44] @ 0x2c 8013652: 4613 mov r3, r2 8013654: 009b lsls r3, r3, #2 8013656: 4413 add r3, r2 8013658: 009b lsls r3, r3, #2 801365a: 4a13 ldr r2, [pc, #76] @ (80136a8 ) 801365c: 441a add r2, r3 801365e: 693b ldr r3, [r7, #16] 8013660: 3304 adds r3, #4 8013662: 4619 mov r1, r3 8013664: 4610 mov r0, r2 8013666: f7fd fdd0 bl 801120a 801366a: e005 b.n 8013678 } else { /* The delayed and ready lists cannot be accessed, so hold this task pending until the scheduler is resumed. */ vListInsertEnd( &( xPendingReadyList ), &( pxUnblockedTCB->xEventListItem ) ); 801366c: 693b ldr r3, [r7, #16] 801366e: 3318 adds r3, #24 8013670: 4619 mov r1, r3 8013672: 480e ldr r0, [pc, #56] @ (80136ac ) 8013674: f7fd fdc9 bl 801120a } if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority ) 8013678: 693b ldr r3, [r7, #16] 801367a: 6ada ldr r2, [r3, #44] @ 0x2c 801367c: 4b0c ldr r3, [pc, #48] @ (80136b0 ) 801367e: 681b ldr r3, [r3, #0] 8013680: 6adb ldr r3, [r3, #44] @ 0x2c 8013682: 429a cmp r2, r3 8013684: d905 bls.n 8013692 { /* 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; 8013686: 2301 movs r3, #1 8013688: 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; 801368a: 4b0a ldr r3, [pc, #40] @ (80136b4 ) 801368c: 2201 movs r2, #1 801368e: 601a str r2, [r3, #0] 8013690: e001 b.n 8013696 } else { xReturn = pdFALSE; 8013692: 2300 movs r3, #0 8013694: 617b str r3, [r7, #20] } return xReturn; 8013696: 697b ldr r3, [r7, #20] } 8013698: 4618 mov r0, r3 801369a: 3718 adds r7, #24 801369c: 46bd mov sp, r7 801369e: bd80 pop {r7, pc} 80136a0: 2400418c .word 0x2400418c 80136a4: 2400416c .word 0x2400416c 80136a8: 24003c94 .word 0x24003c94 80136ac: 24004124 .word 0x24004124 80136b0: 24003c90 .word 0x24003c90 80136b4: 24004178 .word 0x24004178 080136b8 : } } /*-----------------------------------------------------------*/ void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) { 80136b8: b580 push {r7, lr} 80136ba: b084 sub sp, #16 80136bc: af00 add r7, sp, #0 80136be: 6078 str r0, [r7, #4] configASSERT( pxTimeOut ); 80136c0: 687b ldr r3, [r7, #4] 80136c2: 2b00 cmp r3, #0 80136c4: d10b bne.n 80136de __asm volatile 80136c6: f04f 0350 mov.w r3, #80 @ 0x50 80136ca: f383 8811 msr BASEPRI, r3 80136ce: f3bf 8f6f isb sy 80136d2: f3bf 8f4f dsb sy 80136d6: 60fb str r3, [r7, #12] } 80136d8: bf00 nop 80136da: bf00 nop 80136dc: e7fd b.n 80136da taskENTER_CRITICAL(); 80136de: f001 fa23 bl 8014b28 { pxTimeOut->xOverflowCount = xNumOfOverflows; 80136e2: 4b07 ldr r3, [pc, #28] @ (8013700 ) 80136e4: 681a ldr r2, [r3, #0] 80136e6: 687b ldr r3, [r7, #4] 80136e8: 601a str r2, [r3, #0] pxTimeOut->xTimeOnEntering = xTickCount; 80136ea: 4b06 ldr r3, [pc, #24] @ (8013704 ) 80136ec: 681a ldr r2, [r3, #0] 80136ee: 687b ldr r3, [r7, #4] 80136f0: 605a str r2, [r3, #4] } taskEXIT_CRITICAL(); 80136f2: f001 fa4b bl 8014b8c } 80136f6: bf00 nop 80136f8: 3710 adds r7, #16 80136fa: 46bd mov sp, r7 80136fc: bd80 pop {r7, pc} 80136fe: bf00 nop 8013700: 2400417c .word 0x2400417c 8013704: 24004168 .word 0x24004168 08013708 : /*-----------------------------------------------------------*/ void vTaskInternalSetTimeOutState( TimeOut_t * const pxTimeOut ) { 8013708: b480 push {r7} 801370a: b083 sub sp, #12 801370c: af00 add r7, sp, #0 801370e: 6078 str r0, [r7, #4] /* For internal use only as it does not use a critical section. */ pxTimeOut->xOverflowCount = xNumOfOverflows; 8013710: 4b06 ldr r3, [pc, #24] @ (801372c ) 8013712: 681a ldr r2, [r3, #0] 8013714: 687b ldr r3, [r7, #4] 8013716: 601a str r2, [r3, #0] pxTimeOut->xTimeOnEntering = xTickCount; 8013718: 4b05 ldr r3, [pc, #20] @ (8013730 ) 801371a: 681a ldr r2, [r3, #0] 801371c: 687b ldr r3, [r7, #4] 801371e: 605a str r2, [r3, #4] } 8013720: bf00 nop 8013722: 370c adds r7, #12 8013724: 46bd mov sp, r7 8013726: f85d 7b04 ldr.w r7, [sp], #4 801372a: 4770 bx lr 801372c: 2400417c .word 0x2400417c 8013730: 24004168 .word 0x24004168 08013734 : /*-----------------------------------------------------------*/ BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait ) { 8013734: b580 push {r7, lr} 8013736: b088 sub sp, #32 8013738: af00 add r7, sp, #0 801373a: 6078 str r0, [r7, #4] 801373c: 6039 str r1, [r7, #0] BaseType_t xReturn; configASSERT( pxTimeOut ); 801373e: 687b ldr r3, [r7, #4] 8013740: 2b00 cmp r3, #0 8013742: d10b bne.n 801375c __asm volatile 8013744: f04f 0350 mov.w r3, #80 @ 0x50 8013748: f383 8811 msr BASEPRI, r3 801374c: f3bf 8f6f isb sy 8013750: f3bf 8f4f dsb sy 8013754: 613b str r3, [r7, #16] } 8013756: bf00 nop 8013758: bf00 nop 801375a: e7fd b.n 8013758 configASSERT( pxTicksToWait ); 801375c: 683b ldr r3, [r7, #0] 801375e: 2b00 cmp r3, #0 8013760: d10b bne.n 801377a __asm volatile 8013762: f04f 0350 mov.w r3, #80 @ 0x50 8013766: f383 8811 msr BASEPRI, r3 801376a: f3bf 8f6f isb sy 801376e: f3bf 8f4f dsb sy 8013772: 60fb str r3, [r7, #12] } 8013774: bf00 nop 8013776: bf00 nop 8013778: e7fd b.n 8013776 taskENTER_CRITICAL(); 801377a: f001 f9d5 bl 8014b28 { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 801377e: 4b1d ldr r3, [pc, #116] @ (80137f4 ) 8013780: 681b ldr r3, [r3, #0] 8013782: 61bb str r3, [r7, #24] const TickType_t xElapsedTime = xConstTickCount - pxTimeOut->xTimeOnEntering; 8013784: 687b ldr r3, [r7, #4] 8013786: 685b ldr r3, [r3, #4] 8013788: 69ba ldr r2, [r7, #24] 801378a: 1ad3 subs r3, r2, r3 801378c: 617b str r3, [r7, #20] } else #endif #if ( INCLUDE_vTaskSuspend == 1 ) if( *pxTicksToWait == portMAX_DELAY ) 801378e: 683b ldr r3, [r7, #0] 8013790: 681b ldr r3, [r3, #0] 8013792: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8013796: d102 bne.n 801379e { /* 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; 8013798: 2300 movs r3, #0 801379a: 61fb str r3, [r7, #28] 801379c: e023 b.n 80137e6 } else #endif if( ( xNumOfOverflows != pxTimeOut->xOverflowCount ) && ( xConstTickCount >= pxTimeOut->xTimeOnEntering ) ) /*lint !e525 Indentation preferred as is to make code within pre-processor directives clearer. */ 801379e: 687b ldr r3, [r7, #4] 80137a0: 681a ldr r2, [r3, #0] 80137a2: 4b15 ldr r3, [pc, #84] @ (80137f8 ) 80137a4: 681b ldr r3, [r3, #0] 80137a6: 429a cmp r2, r3 80137a8: d007 beq.n 80137ba 80137aa: 687b ldr r3, [r7, #4] 80137ac: 685b ldr r3, [r3, #4] 80137ae: 69ba ldr r2, [r7, #24] 80137b0: 429a cmp r2, r3 80137b2: d302 bcc.n 80137ba /* 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; 80137b4: 2301 movs r3, #1 80137b6: 61fb str r3, [r7, #28] 80137b8: e015 b.n 80137e6 } else if( xElapsedTime < *pxTicksToWait ) /*lint !e961 Explicit casting is only redundant with some compilers, whereas others require it to prevent integer conversion errors. */ 80137ba: 683b ldr r3, [r7, #0] 80137bc: 681b ldr r3, [r3, #0] 80137be: 697a ldr r2, [r7, #20] 80137c0: 429a cmp r2, r3 80137c2: d20b bcs.n 80137dc { /* Not a genuine timeout. Adjust parameters for time remaining. */ *pxTicksToWait -= xElapsedTime; 80137c4: 683b ldr r3, [r7, #0] 80137c6: 681a ldr r2, [r3, #0] 80137c8: 697b ldr r3, [r7, #20] 80137ca: 1ad2 subs r2, r2, r3 80137cc: 683b ldr r3, [r7, #0] 80137ce: 601a str r2, [r3, #0] vTaskInternalSetTimeOutState( pxTimeOut ); 80137d0: 6878 ldr r0, [r7, #4] 80137d2: f7ff ff99 bl 8013708 xReturn = pdFALSE; 80137d6: 2300 movs r3, #0 80137d8: 61fb str r3, [r7, #28] 80137da: e004 b.n 80137e6 } else { *pxTicksToWait = 0; 80137dc: 683b ldr r3, [r7, #0] 80137de: 2200 movs r2, #0 80137e0: 601a str r2, [r3, #0] xReturn = pdTRUE; 80137e2: 2301 movs r3, #1 80137e4: 61fb str r3, [r7, #28] } } taskEXIT_CRITICAL(); 80137e6: f001 f9d1 bl 8014b8c return xReturn; 80137ea: 69fb ldr r3, [r7, #28] } 80137ec: 4618 mov r0, r3 80137ee: 3720 adds r7, #32 80137f0: 46bd mov sp, r7 80137f2: bd80 pop {r7, pc} 80137f4: 24004168 .word 0x24004168 80137f8: 2400417c .word 0x2400417c 080137fc : /*-----------------------------------------------------------*/ void vTaskMissedYield( void ) { 80137fc: b480 push {r7} 80137fe: af00 add r7, sp, #0 xYieldPending = pdTRUE; 8013800: 4b03 ldr r3, [pc, #12] @ (8013810 ) 8013802: 2201 movs r2, #1 8013804: 601a str r2, [r3, #0] } 8013806: bf00 nop 8013808: 46bd mov sp, r7 801380a: f85d 7b04 ldr.w r7, [sp], #4 801380e: 4770 bx lr 8013810: 24004178 .word 0x24004178 08013814 : * * void prvIdleTask( void *pvParameters ); * */ static portTASK_FUNCTION( prvIdleTask, pvParameters ) { 8013814: b580 push {r7, lr} 8013816: b082 sub sp, #8 8013818: af00 add r7, sp, #0 801381a: 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(); 801381c: f000 f852 bl 80138c4 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 ) 8013820: 4b06 ldr r3, [pc, #24] @ (801383c ) 8013822: 681b ldr r3, [r3, #0] 8013824: 2b01 cmp r3, #1 8013826: d9f9 bls.n 801381c { taskYIELD(); 8013828: 4b05 ldr r3, [pc, #20] @ (8013840 ) 801382a: f04f 5280 mov.w r2, #268435456 @ 0x10000000 801382e: 601a str r2, [r3, #0] 8013830: f3bf 8f4f dsb sy 8013834: f3bf 8f6f isb sy prvCheckTasksWaitingTermination(); 8013838: e7f0 b.n 801381c 801383a: bf00 nop 801383c: 24003c94 .word 0x24003c94 8013840: e000ed04 .word 0xe000ed04 08013844 : #endif /* portUSING_MPU_WRAPPERS */ /*-----------------------------------------------------------*/ static void prvInitialiseTaskLists( void ) { 8013844: b580 push {r7, lr} 8013846: b082 sub sp, #8 8013848: af00 add r7, sp, #0 UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 801384a: 2300 movs r3, #0 801384c: 607b str r3, [r7, #4] 801384e: e00c b.n 801386a { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 8013850: 687a ldr r2, [r7, #4] 8013852: 4613 mov r3, r2 8013854: 009b lsls r3, r3, #2 8013856: 4413 add r3, r2 8013858: 009b lsls r3, r3, #2 801385a: 4a12 ldr r2, [pc, #72] @ (80138a4 ) 801385c: 4413 add r3, r2 801385e: 4618 mov r0, r3 8013860: f7fd fca6 bl 80111b0 for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 8013864: 687b ldr r3, [r7, #4] 8013866: 3301 adds r3, #1 8013868: 607b str r3, [r7, #4] 801386a: 687b ldr r3, [r7, #4] 801386c: 2b37 cmp r3, #55 @ 0x37 801386e: d9ef bls.n 8013850 } vListInitialise( &xDelayedTaskList1 ); 8013870: 480d ldr r0, [pc, #52] @ (80138a8 ) 8013872: f7fd fc9d bl 80111b0 vListInitialise( &xDelayedTaskList2 ); 8013876: 480d ldr r0, [pc, #52] @ (80138ac ) 8013878: f7fd fc9a bl 80111b0 vListInitialise( &xPendingReadyList ); 801387c: 480c ldr r0, [pc, #48] @ (80138b0 ) 801387e: f7fd fc97 bl 80111b0 #if ( INCLUDE_vTaskDelete == 1 ) { vListInitialise( &xTasksWaitingTermination ); 8013882: 480c ldr r0, [pc, #48] @ (80138b4 ) 8013884: f7fd fc94 bl 80111b0 } #endif /* INCLUDE_vTaskDelete */ #if ( INCLUDE_vTaskSuspend == 1 ) { vListInitialise( &xSuspendedTaskList ); 8013888: 480b ldr r0, [pc, #44] @ (80138b8 ) 801388a: f7fd fc91 bl 80111b0 } #endif /* INCLUDE_vTaskSuspend */ /* Start with pxDelayedTaskList using list1 and the pxOverflowDelayedTaskList using list2. */ pxDelayedTaskList = &xDelayedTaskList1; 801388e: 4b0b ldr r3, [pc, #44] @ (80138bc ) 8013890: 4a05 ldr r2, [pc, #20] @ (80138a8 ) 8013892: 601a str r2, [r3, #0] pxOverflowDelayedTaskList = &xDelayedTaskList2; 8013894: 4b0a ldr r3, [pc, #40] @ (80138c0 ) 8013896: 4a05 ldr r2, [pc, #20] @ (80138ac ) 8013898: 601a str r2, [r3, #0] } 801389a: bf00 nop 801389c: 3708 adds r7, #8 801389e: 46bd mov sp, r7 80138a0: bd80 pop {r7, pc} 80138a2: bf00 nop 80138a4: 24003c94 .word 0x24003c94 80138a8: 240040f4 .word 0x240040f4 80138ac: 24004108 .word 0x24004108 80138b0: 24004124 .word 0x24004124 80138b4: 24004138 .word 0x24004138 80138b8: 24004150 .word 0x24004150 80138bc: 2400411c .word 0x2400411c 80138c0: 24004120 .word 0x24004120 080138c4 : /*-----------------------------------------------------------*/ static void prvCheckTasksWaitingTermination( void ) { 80138c4: b580 push {r7, lr} 80138c6: b082 sub sp, #8 80138c8: 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 ) 80138ca: e019 b.n 8013900 { taskENTER_CRITICAL(); 80138cc: f001 f92c bl 8014b28 { 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. */ 80138d0: 4b10 ldr r3, [pc, #64] @ (8013914 ) 80138d2: 68db ldr r3, [r3, #12] 80138d4: 68db ldr r3, [r3, #12] 80138d6: 607b str r3, [r7, #4] ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 80138d8: 687b ldr r3, [r7, #4] 80138da: 3304 adds r3, #4 80138dc: 4618 mov r0, r3 80138de: f7fd fcf1 bl 80112c4 --uxCurrentNumberOfTasks; 80138e2: 4b0d ldr r3, [pc, #52] @ (8013918 ) 80138e4: 681b ldr r3, [r3, #0] 80138e6: 3b01 subs r3, #1 80138e8: 4a0b ldr r2, [pc, #44] @ (8013918 ) 80138ea: 6013 str r3, [r2, #0] --uxDeletedTasksWaitingCleanUp; 80138ec: 4b0b ldr r3, [pc, #44] @ (801391c ) 80138ee: 681b ldr r3, [r3, #0] 80138f0: 3b01 subs r3, #1 80138f2: 4a0a ldr r2, [pc, #40] @ (801391c ) 80138f4: 6013 str r3, [r2, #0] } taskEXIT_CRITICAL(); 80138f6: f001 f949 bl 8014b8c prvDeleteTCB( pxTCB ); 80138fa: 6878 ldr r0, [r7, #4] 80138fc: f000 f810 bl 8013920 while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U ) 8013900: 4b06 ldr r3, [pc, #24] @ (801391c ) 8013902: 681b ldr r3, [r3, #0] 8013904: 2b00 cmp r3, #0 8013906: d1e1 bne.n 80138cc } } #endif /* INCLUDE_vTaskDelete */ } 8013908: bf00 nop 801390a: bf00 nop 801390c: 3708 adds r7, #8 801390e: 46bd mov sp, r7 8013910: bd80 pop {r7, pc} 8013912: bf00 nop 8013914: 24004138 .word 0x24004138 8013918: 24004164 .word 0x24004164 801391c: 2400414c .word 0x2400414c 08013920 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelete == 1 ) static void prvDeleteTCB( TCB_t *pxTCB ) { 8013920: b580 push {r7, lr} 8013922: b084 sub sp, #16 8013924: af00 add r7, sp, #0 8013926: 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 ) ); 8013928: 687b ldr r3, [r7, #4] 801392a: 3354 adds r3, #84 @ 0x54 801392c: 4618 mov r0, r3 801392e: f016 fa0d bl 8029d4c <_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 ) 8013932: 687b ldr r3, [r7, #4] 8013934: f893 30a5 ldrb.w r3, [r3, #165] @ 0xa5 8013938: 2b00 cmp r3, #0 801393a: d108 bne.n 801394e { /* Both the stack and TCB were allocated dynamically, so both must be freed. */ vPortFree( pxTCB->pxStack ); 801393c: 687b ldr r3, [r7, #4] 801393e: 6b1b ldr r3, [r3, #48] @ 0x30 8013940: 4618 mov r0, r3 8013942: f001 fae1 bl 8014f08 vPortFree( pxTCB ); 8013946: 6878 ldr r0, [r7, #4] 8013948: f001 fade bl 8014f08 configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB ); mtCOVERAGE_TEST_MARKER(); } } #endif /* configSUPPORT_DYNAMIC_ALLOCATION */ } 801394c: e019 b.n 8013982 else if( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_ONLY ) 801394e: 687b ldr r3, [r7, #4] 8013950: f893 30a5 ldrb.w r3, [r3, #165] @ 0xa5 8013954: 2b01 cmp r3, #1 8013956: d103 bne.n 8013960 vPortFree( pxTCB ); 8013958: 6878 ldr r0, [r7, #4] 801395a: f001 fad5 bl 8014f08 } 801395e: e010 b.n 8013982 configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB ); 8013960: 687b ldr r3, [r7, #4] 8013962: f893 30a5 ldrb.w r3, [r3, #165] @ 0xa5 8013966: 2b02 cmp r3, #2 8013968: d00b beq.n 8013982 __asm volatile 801396a: f04f 0350 mov.w r3, #80 @ 0x50 801396e: f383 8811 msr BASEPRI, r3 8013972: f3bf 8f6f isb sy 8013976: f3bf 8f4f dsb sy 801397a: 60fb str r3, [r7, #12] } 801397c: bf00 nop 801397e: bf00 nop 8013980: e7fd b.n 801397e } 8013982: bf00 nop 8013984: 3710 adds r7, #16 8013986: 46bd mov sp, r7 8013988: bd80 pop {r7, pc} ... 0801398c : #endif /* INCLUDE_vTaskDelete */ /*-----------------------------------------------------------*/ static void prvResetNextTaskUnblockTime( void ) { 801398c: b480 push {r7} 801398e: b083 sub sp, #12 8013990: af00 add r7, sp, #0 TCB_t *pxTCB; if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 8013992: 4b0c ldr r3, [pc, #48] @ (80139c4 ) 8013994: 681b ldr r3, [r3, #0] 8013996: 681b ldr r3, [r3, #0] 8013998: 2b00 cmp r3, #0 801399a: d104 bne.n 80139a6 { /* 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; 801399c: 4b0a ldr r3, [pc, #40] @ (80139c8 ) 801399e: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 80139a2: 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 ) ); } } 80139a4: e008 b.n 80139b8 ( 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. */ 80139a6: 4b07 ldr r3, [pc, #28] @ (80139c4 ) 80139a8: 681b ldr r3, [r3, #0] 80139aa: 68db ldr r3, [r3, #12] 80139ac: 68db ldr r3, [r3, #12] 80139ae: 607b str r3, [r7, #4] xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xStateListItem ) ); 80139b0: 687b ldr r3, [r7, #4] 80139b2: 685b ldr r3, [r3, #4] 80139b4: 4a04 ldr r2, [pc, #16] @ (80139c8 ) 80139b6: 6013 str r3, [r2, #0] } 80139b8: bf00 nop 80139ba: 370c adds r7, #12 80139bc: 46bd mov sp, r7 80139be: f85d 7b04 ldr.w r7, [sp], #4 80139c2: 4770 bx lr 80139c4: 2400411c .word 0x2400411c 80139c8: 24004184 .word 0x24004184 080139cc : /*-----------------------------------------------------------*/ #if ( ( INCLUDE_xTaskGetCurrentTaskHandle == 1 ) || ( configUSE_MUTEXES == 1 ) ) TaskHandle_t xTaskGetCurrentTaskHandle( void ) { 80139cc: b480 push {r7} 80139ce: b083 sub sp, #12 80139d0: 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; 80139d2: 4b05 ldr r3, [pc, #20] @ (80139e8 ) 80139d4: 681b ldr r3, [r3, #0] 80139d6: 607b str r3, [r7, #4] return xReturn; 80139d8: 687b ldr r3, [r7, #4] } 80139da: 4618 mov r0, r3 80139dc: 370c adds r7, #12 80139de: 46bd mov sp, r7 80139e0: f85d 7b04 ldr.w r7, [sp], #4 80139e4: 4770 bx lr 80139e6: bf00 nop 80139e8: 24003c90 .word 0x24003c90 080139ec : /*-----------------------------------------------------------*/ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) BaseType_t xTaskGetSchedulerState( void ) { 80139ec: b480 push {r7} 80139ee: b083 sub sp, #12 80139f0: af00 add r7, sp, #0 BaseType_t xReturn; if( xSchedulerRunning == pdFALSE ) 80139f2: 4b0b ldr r3, [pc, #44] @ (8013a20 ) 80139f4: 681b ldr r3, [r3, #0] 80139f6: 2b00 cmp r3, #0 80139f8: d102 bne.n 8013a00 { xReturn = taskSCHEDULER_NOT_STARTED; 80139fa: 2301 movs r3, #1 80139fc: 607b str r3, [r7, #4] 80139fe: e008 b.n 8013a12 } else { if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 8013a00: 4b08 ldr r3, [pc, #32] @ (8013a24 ) 8013a02: 681b ldr r3, [r3, #0] 8013a04: 2b00 cmp r3, #0 8013a06: d102 bne.n 8013a0e { xReturn = taskSCHEDULER_RUNNING; 8013a08: 2302 movs r3, #2 8013a0a: 607b str r3, [r7, #4] 8013a0c: e001 b.n 8013a12 } else { xReturn = taskSCHEDULER_SUSPENDED; 8013a0e: 2300 movs r3, #0 8013a10: 607b str r3, [r7, #4] } } return xReturn; 8013a12: 687b ldr r3, [r7, #4] } 8013a14: 4618 mov r0, r3 8013a16: 370c adds r7, #12 8013a18: 46bd mov sp, r7 8013a1a: f85d 7b04 ldr.w r7, [sp], #4 8013a1e: 4770 bx lr 8013a20: 24004170 .word 0x24004170 8013a24: 2400418c .word 0x2400418c 08013a28 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityInherit( TaskHandle_t const pxMutexHolder ) { 8013a28: b580 push {r7, lr} 8013a2a: b084 sub sp, #16 8013a2c: af00 add r7, sp, #0 8013a2e: 6078 str r0, [r7, #4] TCB_t * const pxMutexHolderTCB = pxMutexHolder; 8013a30: 687b ldr r3, [r7, #4] 8013a32: 60bb str r3, [r7, #8] BaseType_t xReturn = pdFALSE; 8013a34: 2300 movs r3, #0 8013a36: 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 ) 8013a38: 687b ldr r3, [r7, #4] 8013a3a: 2b00 cmp r3, #0 8013a3c: d051 beq.n 8013ae2 { /* 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 ) 8013a3e: 68bb ldr r3, [r7, #8] 8013a40: 6ada ldr r2, [r3, #44] @ 0x2c 8013a42: 4b2a ldr r3, [pc, #168] @ (8013aec ) 8013a44: 681b ldr r3, [r3, #0] 8013a46: 6adb ldr r3, [r3, #44] @ 0x2c 8013a48: 429a cmp r2, r3 8013a4a: d241 bcs.n 8013ad0 { /* 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 ) 8013a4c: 68bb ldr r3, [r7, #8] 8013a4e: 699b ldr r3, [r3, #24] 8013a50: 2b00 cmp r3, #0 8013a52: db06 blt.n 8013a62 { 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. */ 8013a54: 4b25 ldr r3, [pc, #148] @ (8013aec ) 8013a56: 681b ldr r3, [r3, #0] 8013a58: 6adb ldr r3, [r3, #44] @ 0x2c 8013a5a: f1c3 0238 rsb r2, r3, #56 @ 0x38 8013a5e: 68bb ldr r3, [r7, #8] 8013a60: 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 ) 8013a62: 68bb ldr r3, [r7, #8] 8013a64: 6959 ldr r1, [r3, #20] 8013a66: 68bb ldr r3, [r7, #8] 8013a68: 6ada ldr r2, [r3, #44] @ 0x2c 8013a6a: 4613 mov r3, r2 8013a6c: 009b lsls r3, r3, #2 8013a6e: 4413 add r3, r2 8013a70: 009b lsls r3, r3, #2 8013a72: 4a1f ldr r2, [pc, #124] @ (8013af0 ) 8013a74: 4413 add r3, r2 8013a76: 4299 cmp r1, r3 8013a78: d122 bne.n 8013ac0 { if( uxListRemove( &( pxMutexHolderTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) 8013a7a: 68bb ldr r3, [r7, #8] 8013a7c: 3304 adds r3, #4 8013a7e: 4618 mov r0, r3 8013a80: f7fd fc20 bl 80112c4 { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority; 8013a84: 4b19 ldr r3, [pc, #100] @ (8013aec ) 8013a86: 681b ldr r3, [r3, #0] 8013a88: 6ada ldr r2, [r3, #44] @ 0x2c 8013a8a: 68bb ldr r3, [r7, #8] 8013a8c: 62da str r2, [r3, #44] @ 0x2c prvAddTaskToReadyList( pxMutexHolderTCB ); 8013a8e: 68bb ldr r3, [r7, #8] 8013a90: 6ada ldr r2, [r3, #44] @ 0x2c 8013a92: 4b18 ldr r3, [pc, #96] @ (8013af4 ) 8013a94: 681b ldr r3, [r3, #0] 8013a96: 429a cmp r2, r3 8013a98: d903 bls.n 8013aa2 8013a9a: 68bb ldr r3, [r7, #8] 8013a9c: 6adb ldr r3, [r3, #44] @ 0x2c 8013a9e: 4a15 ldr r2, [pc, #84] @ (8013af4 ) 8013aa0: 6013 str r3, [r2, #0] 8013aa2: 68bb ldr r3, [r7, #8] 8013aa4: 6ada ldr r2, [r3, #44] @ 0x2c 8013aa6: 4613 mov r3, r2 8013aa8: 009b lsls r3, r3, #2 8013aaa: 4413 add r3, r2 8013aac: 009b lsls r3, r3, #2 8013aae: 4a10 ldr r2, [pc, #64] @ (8013af0 ) 8013ab0: 441a add r2, r3 8013ab2: 68bb ldr r3, [r7, #8] 8013ab4: 3304 adds r3, #4 8013ab6: 4619 mov r1, r3 8013ab8: 4610 mov r0, r2 8013aba: f7fd fba6 bl 801120a 8013abe: e004 b.n 8013aca } else { /* Just inherit the priority. */ pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority; 8013ac0: 4b0a ldr r3, [pc, #40] @ (8013aec ) 8013ac2: 681b ldr r3, [r3, #0] 8013ac4: 6ada ldr r2, [r3, #44] @ 0x2c 8013ac6: 68bb ldr r3, [r7, #8] 8013ac8: 62da str r2, [r3, #44] @ 0x2c } traceTASK_PRIORITY_INHERIT( pxMutexHolderTCB, pxCurrentTCB->uxPriority ); /* Inheritance occurred. */ xReturn = pdTRUE; 8013aca: 2301 movs r3, #1 8013acc: 60fb str r3, [r7, #12] 8013ace: e008 b.n 8013ae2 } else { if( pxMutexHolderTCB->uxBasePriority < pxCurrentTCB->uxPriority ) 8013ad0: 68bb ldr r3, [r7, #8] 8013ad2: 6cda ldr r2, [r3, #76] @ 0x4c 8013ad4: 4b05 ldr r3, [pc, #20] @ (8013aec ) 8013ad6: 681b ldr r3, [r3, #0] 8013ad8: 6adb ldr r3, [r3, #44] @ 0x2c 8013ada: 429a cmp r2, r3 8013adc: d201 bcs.n 8013ae2 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; 8013ade: 2301 movs r3, #1 8013ae0: 60fb str r3, [r7, #12] else { mtCOVERAGE_TEST_MARKER(); } return xReturn; 8013ae2: 68fb ldr r3, [r7, #12] } 8013ae4: 4618 mov r0, r3 8013ae6: 3710 adds r7, #16 8013ae8: 46bd mov sp, r7 8013aea: bd80 pop {r7, pc} 8013aec: 24003c90 .word 0x24003c90 8013af0: 24003c94 .word 0x24003c94 8013af4: 2400416c .word 0x2400416c 08013af8 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { 8013af8: b580 push {r7, lr} 8013afa: b086 sub sp, #24 8013afc: af00 add r7, sp, #0 8013afe: 6078 str r0, [r7, #4] TCB_t * const pxTCB = pxMutexHolder; 8013b00: 687b ldr r3, [r7, #4] 8013b02: 613b str r3, [r7, #16] BaseType_t xReturn = pdFALSE; 8013b04: 2300 movs r3, #0 8013b06: 617b str r3, [r7, #20] if( pxMutexHolder != NULL ) 8013b08: 687b ldr r3, [r7, #4] 8013b0a: 2b00 cmp r3, #0 8013b0c: d058 beq.n 8013bc0 { /* 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 ); 8013b0e: 4b2f ldr r3, [pc, #188] @ (8013bcc ) 8013b10: 681b ldr r3, [r3, #0] 8013b12: 693a ldr r2, [r7, #16] 8013b14: 429a cmp r2, r3 8013b16: d00b beq.n 8013b30 __asm volatile 8013b18: f04f 0350 mov.w r3, #80 @ 0x50 8013b1c: f383 8811 msr BASEPRI, r3 8013b20: f3bf 8f6f isb sy 8013b24: f3bf 8f4f dsb sy 8013b28: 60fb str r3, [r7, #12] } 8013b2a: bf00 nop 8013b2c: bf00 nop 8013b2e: e7fd b.n 8013b2c configASSERT( pxTCB->uxMutexesHeld ); 8013b30: 693b ldr r3, [r7, #16] 8013b32: 6d1b ldr r3, [r3, #80] @ 0x50 8013b34: 2b00 cmp r3, #0 8013b36: d10b bne.n 8013b50 __asm volatile 8013b38: f04f 0350 mov.w r3, #80 @ 0x50 8013b3c: f383 8811 msr BASEPRI, r3 8013b40: f3bf 8f6f isb sy 8013b44: f3bf 8f4f dsb sy 8013b48: 60bb str r3, [r7, #8] } 8013b4a: bf00 nop 8013b4c: bf00 nop 8013b4e: e7fd b.n 8013b4c ( pxTCB->uxMutexesHeld )--; 8013b50: 693b ldr r3, [r7, #16] 8013b52: 6d1b ldr r3, [r3, #80] @ 0x50 8013b54: 1e5a subs r2, r3, #1 8013b56: 693b ldr r3, [r7, #16] 8013b58: 651a str r2, [r3, #80] @ 0x50 /* Has the holder of the mutex inherited the priority of another task? */ if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 8013b5a: 693b ldr r3, [r7, #16] 8013b5c: 6ada ldr r2, [r3, #44] @ 0x2c 8013b5e: 693b ldr r3, [r7, #16] 8013b60: 6cdb ldr r3, [r3, #76] @ 0x4c 8013b62: 429a cmp r2, r3 8013b64: d02c beq.n 8013bc0 { /* Only disinherit if no other mutexes are held. */ if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 ) 8013b66: 693b ldr r3, [r7, #16] 8013b68: 6d1b ldr r3, [r3, #80] @ 0x50 8013b6a: 2b00 cmp r3, #0 8013b6c: d128 bne.n 8013bc0 /* 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 ) 8013b6e: 693b ldr r3, [r7, #16] 8013b70: 3304 adds r3, #4 8013b72: 4618 mov r0, r3 8013b74: f7fd fba6 bl 80112c4 } /* Disinherit the priority before adding the task into the new ready list. */ traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); pxTCB->uxPriority = pxTCB->uxBasePriority; 8013b78: 693b ldr r3, [r7, #16] 8013b7a: 6cda ldr r2, [r3, #76] @ 0x4c 8013b7c: 693b ldr r3, [r7, #16] 8013b7e: 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. */ 8013b80: 693b ldr r3, [r7, #16] 8013b82: 6adb ldr r3, [r3, #44] @ 0x2c 8013b84: f1c3 0238 rsb r2, r3, #56 @ 0x38 8013b88: 693b ldr r3, [r7, #16] 8013b8a: 619a str r2, [r3, #24] prvAddTaskToReadyList( pxTCB ); 8013b8c: 693b ldr r3, [r7, #16] 8013b8e: 6ada ldr r2, [r3, #44] @ 0x2c 8013b90: 4b0f ldr r3, [pc, #60] @ (8013bd0 ) 8013b92: 681b ldr r3, [r3, #0] 8013b94: 429a cmp r2, r3 8013b96: d903 bls.n 8013ba0 8013b98: 693b ldr r3, [r7, #16] 8013b9a: 6adb ldr r3, [r3, #44] @ 0x2c 8013b9c: 4a0c ldr r2, [pc, #48] @ (8013bd0 ) 8013b9e: 6013 str r3, [r2, #0] 8013ba0: 693b ldr r3, [r7, #16] 8013ba2: 6ada ldr r2, [r3, #44] @ 0x2c 8013ba4: 4613 mov r3, r2 8013ba6: 009b lsls r3, r3, #2 8013ba8: 4413 add r3, r2 8013baa: 009b lsls r3, r3, #2 8013bac: 4a09 ldr r2, [pc, #36] @ (8013bd4 ) 8013bae: 441a add r2, r3 8013bb0: 693b ldr r3, [r7, #16] 8013bb2: 3304 adds r3, #4 8013bb4: 4619 mov r1, r3 8013bb6: 4610 mov r0, r2 8013bb8: f7fd fb27 bl 801120a 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; 8013bbc: 2301 movs r3, #1 8013bbe: 617b str r3, [r7, #20] else { mtCOVERAGE_TEST_MARKER(); } return xReturn; 8013bc0: 697b ldr r3, [r7, #20] } 8013bc2: 4618 mov r0, r3 8013bc4: 3718 adds r7, #24 8013bc6: 46bd mov sp, r7 8013bc8: bd80 pop {r7, pc} 8013bca: bf00 nop 8013bcc: 24003c90 .word 0x24003c90 8013bd0: 2400416c .word 0x2400416c 8013bd4: 24003c94 .word 0x24003c94 08013bd8 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) void vTaskPriorityDisinheritAfterTimeout( TaskHandle_t const pxMutexHolder, UBaseType_t uxHighestPriorityWaitingTask ) { 8013bd8: b580 push {r7, lr} 8013bda: b088 sub sp, #32 8013bdc: af00 add r7, sp, #0 8013bde: 6078 str r0, [r7, #4] 8013be0: 6039 str r1, [r7, #0] TCB_t * const pxTCB = pxMutexHolder; 8013be2: 687b ldr r3, [r7, #4] 8013be4: 61bb str r3, [r7, #24] UBaseType_t uxPriorityUsedOnEntry, uxPriorityToUse; const UBaseType_t uxOnlyOneMutexHeld = ( UBaseType_t ) 1; 8013be6: 2301 movs r3, #1 8013be8: 617b str r3, [r7, #20] if( pxMutexHolder != NULL ) 8013bea: 687b ldr r3, [r7, #4] 8013bec: 2b00 cmp r3, #0 8013bee: d06c beq.n 8013cca { /* If pxMutexHolder is not NULL then the holder must hold at least one mutex. */ configASSERT( pxTCB->uxMutexesHeld ); 8013bf0: 69bb ldr r3, [r7, #24] 8013bf2: 6d1b ldr r3, [r3, #80] @ 0x50 8013bf4: 2b00 cmp r3, #0 8013bf6: d10b bne.n 8013c10 __asm volatile 8013bf8: f04f 0350 mov.w r3, #80 @ 0x50 8013bfc: f383 8811 msr BASEPRI, r3 8013c00: f3bf 8f6f isb sy 8013c04: f3bf 8f4f dsb sy 8013c08: 60fb str r3, [r7, #12] } 8013c0a: bf00 nop 8013c0c: bf00 nop 8013c0e: e7fd b.n 8013c0c /* 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 ) 8013c10: 69bb ldr r3, [r7, #24] 8013c12: 6cdb ldr r3, [r3, #76] @ 0x4c 8013c14: 683a ldr r2, [r7, #0] 8013c16: 429a cmp r2, r3 8013c18: d902 bls.n 8013c20 { uxPriorityToUse = uxHighestPriorityWaitingTask; 8013c1a: 683b ldr r3, [r7, #0] 8013c1c: 61fb str r3, [r7, #28] 8013c1e: e002 b.n 8013c26 } else { uxPriorityToUse = pxTCB->uxBasePriority; 8013c20: 69bb ldr r3, [r7, #24] 8013c22: 6cdb ldr r3, [r3, #76] @ 0x4c 8013c24: 61fb str r3, [r7, #28] } /* Does the priority need to change? */ if( pxTCB->uxPriority != uxPriorityToUse ) 8013c26: 69bb ldr r3, [r7, #24] 8013c28: 6adb ldr r3, [r3, #44] @ 0x2c 8013c2a: 69fa ldr r2, [r7, #28] 8013c2c: 429a cmp r2, r3 8013c2e: d04c beq.n 8013cca { /* 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 ) 8013c30: 69bb ldr r3, [r7, #24] 8013c32: 6d1b ldr r3, [r3, #80] @ 0x50 8013c34: 697a ldr r2, [r7, #20] 8013c36: 429a cmp r2, r3 8013c38: d147 bne.n 8013cca { /* 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 ); 8013c3a: 4b26 ldr r3, [pc, #152] @ (8013cd4 ) 8013c3c: 681b ldr r3, [r3, #0] 8013c3e: 69ba ldr r2, [r7, #24] 8013c40: 429a cmp r2, r3 8013c42: d10b bne.n 8013c5c __asm volatile 8013c44: f04f 0350 mov.w r3, #80 @ 0x50 8013c48: f383 8811 msr BASEPRI, r3 8013c4c: f3bf 8f6f isb sy 8013c50: f3bf 8f4f dsb sy 8013c54: 60bb str r3, [r7, #8] } 8013c56: bf00 nop 8013c58: bf00 nop 8013c5a: e7fd b.n 8013c58 /* Disinherit the priority, remembering the previous priority to facilitate determining the subject task's state. */ traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); uxPriorityUsedOnEntry = pxTCB->uxPriority; 8013c5c: 69bb ldr r3, [r7, #24] 8013c5e: 6adb ldr r3, [r3, #44] @ 0x2c 8013c60: 613b str r3, [r7, #16] pxTCB->uxPriority = uxPriorityToUse; 8013c62: 69bb ldr r3, [r7, #24] 8013c64: 69fa ldr r2, [r7, #28] 8013c66: 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 ) 8013c68: 69bb ldr r3, [r7, #24] 8013c6a: 699b ldr r3, [r3, #24] 8013c6c: 2b00 cmp r3, #0 8013c6e: db04 blt.n 8013c7a { 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. */ 8013c70: 69fb ldr r3, [r7, #28] 8013c72: f1c3 0238 rsb r2, r3, #56 @ 0x38 8013c76: 69bb ldr r3, [r7, #24] 8013c78: 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 ) 8013c7a: 69bb ldr r3, [r7, #24] 8013c7c: 6959 ldr r1, [r3, #20] 8013c7e: 693a ldr r2, [r7, #16] 8013c80: 4613 mov r3, r2 8013c82: 009b lsls r3, r3, #2 8013c84: 4413 add r3, r2 8013c86: 009b lsls r3, r3, #2 8013c88: 4a13 ldr r2, [pc, #76] @ (8013cd8 ) 8013c8a: 4413 add r3, r2 8013c8c: 4299 cmp r1, r3 8013c8e: d11c bne.n 8013cca { if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) 8013c90: 69bb ldr r3, [r7, #24] 8013c92: 3304 adds r3, #4 8013c94: 4618 mov r0, r3 8013c96: f7fd fb15 bl 80112c4 else { mtCOVERAGE_TEST_MARKER(); } prvAddTaskToReadyList( pxTCB ); 8013c9a: 69bb ldr r3, [r7, #24] 8013c9c: 6ada ldr r2, [r3, #44] @ 0x2c 8013c9e: 4b0f ldr r3, [pc, #60] @ (8013cdc ) 8013ca0: 681b ldr r3, [r3, #0] 8013ca2: 429a cmp r2, r3 8013ca4: d903 bls.n 8013cae 8013ca6: 69bb ldr r3, [r7, #24] 8013ca8: 6adb ldr r3, [r3, #44] @ 0x2c 8013caa: 4a0c ldr r2, [pc, #48] @ (8013cdc ) 8013cac: 6013 str r3, [r2, #0] 8013cae: 69bb ldr r3, [r7, #24] 8013cb0: 6ada ldr r2, [r3, #44] @ 0x2c 8013cb2: 4613 mov r3, r2 8013cb4: 009b lsls r3, r3, #2 8013cb6: 4413 add r3, r2 8013cb8: 009b lsls r3, r3, #2 8013cba: 4a07 ldr r2, [pc, #28] @ (8013cd8 ) 8013cbc: 441a add r2, r3 8013cbe: 69bb ldr r3, [r7, #24] 8013cc0: 3304 adds r3, #4 8013cc2: 4619 mov r1, r3 8013cc4: 4610 mov r0, r2 8013cc6: f7fd faa0 bl 801120a } else { mtCOVERAGE_TEST_MARKER(); } } 8013cca: bf00 nop 8013ccc: 3720 adds r7, #32 8013cce: 46bd mov sp, r7 8013cd0: bd80 pop {r7, pc} 8013cd2: bf00 nop 8013cd4: 24003c90 .word 0x24003c90 8013cd8: 24003c94 .word 0x24003c94 8013cdc: 2400416c .word 0x2400416c 08013ce0 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) TaskHandle_t pvTaskIncrementMutexHeldCount( void ) { 8013ce0: b480 push {r7} 8013ce2: af00 add r7, sp, #0 /* If xSemaphoreCreateMutex() is called before any tasks have been created then pxCurrentTCB will be NULL. */ if( pxCurrentTCB != NULL ) 8013ce4: 4b07 ldr r3, [pc, #28] @ (8013d04 ) 8013ce6: 681b ldr r3, [r3, #0] 8013ce8: 2b00 cmp r3, #0 8013cea: d004 beq.n 8013cf6 { ( pxCurrentTCB->uxMutexesHeld )++; 8013cec: 4b05 ldr r3, [pc, #20] @ (8013d04 ) 8013cee: 681b ldr r3, [r3, #0] 8013cf0: 6d1a ldr r2, [r3, #80] @ 0x50 8013cf2: 3201 adds r2, #1 8013cf4: 651a str r2, [r3, #80] @ 0x50 } return pxCurrentTCB; 8013cf6: 4b03 ldr r3, [pc, #12] @ (8013d04 ) 8013cf8: 681b ldr r3, [r3, #0] } 8013cfa: 4618 mov r0, r3 8013cfc: 46bd mov sp, r7 8013cfe: f85d 7b04 ldr.w r7, [sp], #4 8013d02: 4770 bx lr 8013d04: 24003c90 .word 0x24003c90 08013d08 : /*-----------------------------------------------------------*/ #if( configUSE_TASK_NOTIFICATIONS == 1 ) BaseType_t xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait ) { 8013d08: b580 push {r7, lr} 8013d0a: b086 sub sp, #24 8013d0c: af00 add r7, sp, #0 8013d0e: 60f8 str r0, [r7, #12] 8013d10: 60b9 str r1, [r7, #8] 8013d12: 607a str r2, [r7, #4] 8013d14: 603b str r3, [r7, #0] BaseType_t xReturn; taskENTER_CRITICAL(); 8013d16: f000 ff07 bl 8014b28 { /* Only block if a notification is not already pending. */ if( pxCurrentTCB->ucNotifyState != taskNOTIFICATION_RECEIVED ) 8013d1a: 4b29 ldr r3, [pc, #164] @ (8013dc0 ) 8013d1c: 681b ldr r3, [r3, #0] 8013d1e: f893 30a4 ldrb.w r3, [r3, #164] @ 0xa4 8013d22: b2db uxtb r3, r3 8013d24: 2b02 cmp r3, #2 8013d26: d01c beq.n 8013d62 { /* 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; 8013d28: 4b25 ldr r3, [pc, #148] @ (8013dc0 ) 8013d2a: 681b ldr r3, [r3, #0] 8013d2c: f8d3 10a0 ldr.w r1, [r3, #160] @ 0xa0 8013d30: 68fa ldr r2, [r7, #12] 8013d32: 43d2 mvns r2, r2 8013d34: 400a ands r2, r1 8013d36: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 /* Mark this task as waiting for a notification. */ pxCurrentTCB->ucNotifyState = taskWAITING_NOTIFICATION; 8013d3a: 4b21 ldr r3, [pc, #132] @ (8013dc0 ) 8013d3c: 681b ldr r3, [r3, #0] 8013d3e: 2201 movs r2, #1 8013d40: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 if( xTicksToWait > ( TickType_t ) 0 ) 8013d44: 683b ldr r3, [r7, #0] 8013d46: 2b00 cmp r3, #0 8013d48: d00b beq.n 8013d62 { prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE ); 8013d4a: 2101 movs r1, #1 8013d4c: 6838 ldr r0, [r7, #0] 8013d4e: f000 fa09 bl 8014164 /* 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(); 8013d52: 4b1c ldr r3, [pc, #112] @ (8013dc4 ) 8013d54: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8013d58: 601a str r2, [r3, #0] 8013d5a: f3bf 8f4f dsb sy 8013d5e: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 8013d62: f000 ff13 bl 8014b8c taskENTER_CRITICAL(); 8013d66: f000 fedf bl 8014b28 { traceTASK_NOTIFY_WAIT(); if( pulNotificationValue != NULL ) 8013d6a: 687b ldr r3, [r7, #4] 8013d6c: 2b00 cmp r3, #0 8013d6e: d005 beq.n 8013d7c { /* Output the current notification value, which may or may not have changed. */ *pulNotificationValue = pxCurrentTCB->ulNotifiedValue; 8013d70: 4b13 ldr r3, [pc, #76] @ (8013dc0 ) 8013d72: 681b ldr r3, [r3, #0] 8013d74: f8d3 20a0 ldr.w r2, [r3, #160] @ 0xa0 8013d78: 687b ldr r3, [r7, #4] 8013d7a: 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 ) 8013d7c: 4b10 ldr r3, [pc, #64] @ (8013dc0 ) 8013d7e: 681b ldr r3, [r3, #0] 8013d80: f893 30a4 ldrb.w r3, [r3, #164] @ 0xa4 8013d84: b2db uxtb r3, r3 8013d86: 2b02 cmp r3, #2 8013d88: d002 beq.n 8013d90 { /* A notification was not received. */ xReturn = pdFALSE; 8013d8a: 2300 movs r3, #0 8013d8c: 617b str r3, [r7, #20] 8013d8e: e00a b.n 8013da6 } else { /* A notification was already pending or a notification was received while the task was waiting. */ pxCurrentTCB->ulNotifiedValue &= ~ulBitsToClearOnExit; 8013d90: 4b0b ldr r3, [pc, #44] @ (8013dc0 ) 8013d92: 681b ldr r3, [r3, #0] 8013d94: f8d3 10a0 ldr.w r1, [r3, #160] @ 0xa0 8013d98: 68ba ldr r2, [r7, #8] 8013d9a: 43d2 mvns r2, r2 8013d9c: 400a ands r2, r1 8013d9e: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 xReturn = pdTRUE; 8013da2: 2301 movs r3, #1 8013da4: 617b str r3, [r7, #20] } pxCurrentTCB->ucNotifyState = taskNOT_WAITING_NOTIFICATION; 8013da6: 4b06 ldr r3, [pc, #24] @ (8013dc0 ) 8013da8: 681b ldr r3, [r3, #0] 8013daa: 2200 movs r2, #0 8013dac: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 } taskEXIT_CRITICAL(); 8013db0: f000 feec bl 8014b8c return xReturn; 8013db4: 697b ldr r3, [r7, #20] } 8013db6: 4618 mov r0, r3 8013db8: 3718 adds r7, #24 8013dba: 46bd mov sp, r7 8013dbc: bd80 pop {r7, pc} 8013dbe: bf00 nop 8013dc0: 24003c90 .word 0x24003c90 8013dc4: e000ed04 .word 0xe000ed04 08013dc8 : /*-----------------------------------------------------------*/ #if( configUSE_TASK_NOTIFICATIONS == 1 ) BaseType_t xTaskGenericNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue ) { 8013dc8: b580 push {r7, lr} 8013dca: b08a sub sp, #40 @ 0x28 8013dcc: af00 add r7, sp, #0 8013dce: 60f8 str r0, [r7, #12] 8013dd0: 60b9 str r1, [r7, #8] 8013dd2: 603b str r3, [r7, #0] 8013dd4: 4613 mov r3, r2 8013dd6: 71fb strb r3, [r7, #7] TCB_t * pxTCB; BaseType_t xReturn = pdPASS; 8013dd8: 2301 movs r3, #1 8013dda: 627b str r3, [r7, #36] @ 0x24 uint8_t ucOriginalNotifyState; configASSERT( xTaskToNotify ); 8013ddc: 68fb ldr r3, [r7, #12] 8013dde: 2b00 cmp r3, #0 8013de0: d10b bne.n 8013dfa __asm volatile 8013de2: f04f 0350 mov.w r3, #80 @ 0x50 8013de6: f383 8811 msr BASEPRI, r3 8013dea: f3bf 8f6f isb sy 8013dee: f3bf 8f4f dsb sy 8013df2: 61bb str r3, [r7, #24] } 8013df4: bf00 nop 8013df6: bf00 nop 8013df8: e7fd b.n 8013df6 pxTCB = xTaskToNotify; 8013dfa: 68fb ldr r3, [r7, #12] 8013dfc: 623b str r3, [r7, #32] taskENTER_CRITICAL(); 8013dfe: f000 fe93 bl 8014b28 { if( pulPreviousNotificationValue != NULL ) 8013e02: 683b ldr r3, [r7, #0] 8013e04: 2b00 cmp r3, #0 8013e06: d004 beq.n 8013e12 { *pulPreviousNotificationValue = pxTCB->ulNotifiedValue; 8013e08: 6a3b ldr r3, [r7, #32] 8013e0a: f8d3 20a0 ldr.w r2, [r3, #160] @ 0xa0 8013e0e: 683b ldr r3, [r7, #0] 8013e10: 601a str r2, [r3, #0] } ucOriginalNotifyState = pxTCB->ucNotifyState; 8013e12: 6a3b ldr r3, [r7, #32] 8013e14: f893 30a4 ldrb.w r3, [r3, #164] @ 0xa4 8013e18: 77fb strb r3, [r7, #31] pxTCB->ucNotifyState = taskNOTIFICATION_RECEIVED; 8013e1a: 6a3b ldr r3, [r7, #32] 8013e1c: 2202 movs r2, #2 8013e1e: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 switch( eAction ) 8013e22: 79fb ldrb r3, [r7, #7] 8013e24: 2b04 cmp r3, #4 8013e26: d82e bhi.n 8013e86 8013e28: a201 add r2, pc, #4 @ (adr r2, 8013e30 ) 8013e2a: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8013e2e: bf00 nop 8013e30: 08013eab .word 0x08013eab 8013e34: 08013e45 .word 0x08013e45 8013e38: 08013e57 .word 0x08013e57 8013e3c: 08013e67 .word 0x08013e67 8013e40: 08013e71 .word 0x08013e71 { case eSetBits : pxTCB->ulNotifiedValue |= ulValue; 8013e44: 6a3b ldr r3, [r7, #32] 8013e46: f8d3 20a0 ldr.w r2, [r3, #160] @ 0xa0 8013e4a: 68bb ldr r3, [r7, #8] 8013e4c: 431a orrs r2, r3 8013e4e: 6a3b ldr r3, [r7, #32] 8013e50: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8013e54: e02c b.n 8013eb0 case eIncrement : ( pxTCB->ulNotifiedValue )++; 8013e56: 6a3b ldr r3, [r7, #32] 8013e58: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 8013e5c: 1c5a adds r2, r3, #1 8013e5e: 6a3b ldr r3, [r7, #32] 8013e60: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8013e64: e024 b.n 8013eb0 case eSetValueWithOverwrite : pxTCB->ulNotifiedValue = ulValue; 8013e66: 6a3b ldr r3, [r7, #32] 8013e68: 68ba ldr r2, [r7, #8] 8013e6a: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8013e6e: e01f b.n 8013eb0 case eSetValueWithoutOverwrite : if( ucOriginalNotifyState != taskNOTIFICATION_RECEIVED ) 8013e70: 7ffb ldrb r3, [r7, #31] 8013e72: 2b02 cmp r3, #2 8013e74: d004 beq.n 8013e80 { pxTCB->ulNotifiedValue = ulValue; 8013e76: 6a3b ldr r3, [r7, #32] 8013e78: 68ba ldr r2, [r7, #8] 8013e7a: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 else { /* The value could not be written to the task. */ xReturn = pdFAIL; } break; 8013e7e: e017 b.n 8013eb0 xReturn = pdFAIL; 8013e80: 2300 movs r3, #0 8013e82: 627b str r3, [r7, #36] @ 0x24 break; 8013e84: e014 b.n 8013eb0 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 ); 8013e86: 6a3b ldr r3, [r7, #32] 8013e88: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 8013e8c: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8013e90: d00d beq.n 8013eae __asm volatile 8013e92: f04f 0350 mov.w r3, #80 @ 0x50 8013e96: f383 8811 msr BASEPRI, r3 8013e9a: f3bf 8f6f isb sy 8013e9e: f3bf 8f4f dsb sy 8013ea2: 617b str r3, [r7, #20] } 8013ea4: bf00 nop 8013ea6: bf00 nop 8013ea8: e7fd b.n 8013ea6 break; 8013eaa: bf00 nop 8013eac: e000 b.n 8013eb0 break; 8013eae: 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 ) 8013eb0: 7ffb ldrb r3, [r7, #31] 8013eb2: 2b01 cmp r3, #1 8013eb4: d13b bne.n 8013f2e { ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 8013eb6: 6a3b ldr r3, [r7, #32] 8013eb8: 3304 adds r3, #4 8013eba: 4618 mov r0, r3 8013ebc: f7fd fa02 bl 80112c4 prvAddTaskToReadyList( pxTCB ); 8013ec0: 6a3b ldr r3, [r7, #32] 8013ec2: 6ada ldr r2, [r3, #44] @ 0x2c 8013ec4: 4b1d ldr r3, [pc, #116] @ (8013f3c ) 8013ec6: 681b ldr r3, [r3, #0] 8013ec8: 429a cmp r2, r3 8013eca: d903 bls.n 8013ed4 8013ecc: 6a3b ldr r3, [r7, #32] 8013ece: 6adb ldr r3, [r3, #44] @ 0x2c 8013ed0: 4a1a ldr r2, [pc, #104] @ (8013f3c ) 8013ed2: 6013 str r3, [r2, #0] 8013ed4: 6a3b ldr r3, [r7, #32] 8013ed6: 6ada ldr r2, [r3, #44] @ 0x2c 8013ed8: 4613 mov r3, r2 8013eda: 009b lsls r3, r3, #2 8013edc: 4413 add r3, r2 8013ede: 009b lsls r3, r3, #2 8013ee0: 4a17 ldr r2, [pc, #92] @ (8013f40 ) 8013ee2: 441a add r2, r3 8013ee4: 6a3b ldr r3, [r7, #32] 8013ee6: 3304 adds r3, #4 8013ee8: 4619 mov r1, r3 8013eea: 4610 mov r0, r2 8013eec: f7fd f98d bl 801120a /* The task should not have been on an event list. */ configASSERT( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) == NULL ); 8013ef0: 6a3b ldr r3, [r7, #32] 8013ef2: 6a9b ldr r3, [r3, #40] @ 0x28 8013ef4: 2b00 cmp r3, #0 8013ef6: d00b beq.n 8013f10 __asm volatile 8013ef8: f04f 0350 mov.w r3, #80 @ 0x50 8013efc: f383 8811 msr BASEPRI, r3 8013f00: f3bf 8f6f isb sy 8013f04: f3bf 8f4f dsb sy 8013f08: 613b str r3, [r7, #16] } 8013f0a: bf00 nop 8013f0c: bf00 nop 8013f0e: e7fd b.n 8013f0c earliest possible time. */ prvResetNextTaskUnblockTime(); } #endif if( pxTCB->uxPriority > pxCurrentTCB->uxPriority ) 8013f10: 6a3b ldr r3, [r7, #32] 8013f12: 6ada ldr r2, [r3, #44] @ 0x2c 8013f14: 4b0b ldr r3, [pc, #44] @ (8013f44 ) 8013f16: 681b ldr r3, [r3, #0] 8013f18: 6adb ldr r3, [r3, #44] @ 0x2c 8013f1a: 429a cmp r2, r3 8013f1c: d907 bls.n 8013f2e { /* The notified task has a priority above the currently executing task so a yield is required. */ taskYIELD_IF_USING_PREEMPTION(); 8013f1e: 4b0a ldr r3, [pc, #40] @ (8013f48 ) 8013f20: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8013f24: 601a str r2, [r3, #0] 8013f26: f3bf 8f4f dsb sy 8013f2a: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 8013f2e: f000 fe2d bl 8014b8c return xReturn; 8013f32: 6a7b ldr r3, [r7, #36] @ 0x24 } 8013f34: 4618 mov r0, r3 8013f36: 3728 adds r7, #40 @ 0x28 8013f38: 46bd mov sp, r7 8013f3a: bd80 pop {r7, pc} 8013f3c: 2400416c .word 0x2400416c 8013f40: 24003c94 .word 0x24003c94 8013f44: 24003c90 .word 0x24003c90 8013f48: e000ed04 .word 0xe000ed04 08013f4c : /*-----------------------------------------------------------*/ #if( configUSE_TASK_NOTIFICATIONS == 1 ) BaseType_t xTaskGenericNotifyFromISR( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue, BaseType_t *pxHigherPriorityTaskWoken ) { 8013f4c: b580 push {r7, lr} 8013f4e: b08e sub sp, #56 @ 0x38 8013f50: af00 add r7, sp, #0 8013f52: 60f8 str r0, [r7, #12] 8013f54: 60b9 str r1, [r7, #8] 8013f56: 603b str r3, [r7, #0] 8013f58: 4613 mov r3, r2 8013f5a: 71fb strb r3, [r7, #7] TCB_t * pxTCB; uint8_t ucOriginalNotifyState; BaseType_t xReturn = pdPASS; 8013f5c: 2301 movs r3, #1 8013f5e: 637b str r3, [r7, #52] @ 0x34 UBaseType_t uxSavedInterruptStatus; configASSERT( xTaskToNotify ); 8013f60: 68fb ldr r3, [r7, #12] 8013f62: 2b00 cmp r3, #0 8013f64: d10b bne.n 8013f7e __asm volatile 8013f66: f04f 0350 mov.w r3, #80 @ 0x50 8013f6a: f383 8811 msr BASEPRI, r3 8013f6e: f3bf 8f6f isb sy 8013f72: f3bf 8f4f dsb sy 8013f76: 627b str r3, [r7, #36] @ 0x24 } 8013f78: bf00 nop 8013f7a: bf00 nop 8013f7c: e7fd b.n 8013f7a 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(); 8013f7e: f000 feb3 bl 8014ce8 pxTCB = xTaskToNotify; 8013f82: 68fb ldr r3, [r7, #12] 8013f84: 633b str r3, [r7, #48] @ 0x30 __asm volatile 8013f86: f3ef 8211 mrs r2, BASEPRI 8013f8a: f04f 0350 mov.w r3, #80 @ 0x50 8013f8e: f383 8811 msr BASEPRI, r3 8013f92: f3bf 8f6f isb sy 8013f96: f3bf 8f4f dsb sy 8013f9a: 623a str r2, [r7, #32] 8013f9c: 61fb str r3, [r7, #28] return ulOriginalBASEPRI; 8013f9e: 6a3b ldr r3, [r7, #32] uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 8013fa0: 62fb str r3, [r7, #44] @ 0x2c { if( pulPreviousNotificationValue != NULL ) 8013fa2: 683b ldr r3, [r7, #0] 8013fa4: 2b00 cmp r3, #0 8013fa6: d004 beq.n 8013fb2 { *pulPreviousNotificationValue = pxTCB->ulNotifiedValue; 8013fa8: 6b3b ldr r3, [r7, #48] @ 0x30 8013faa: f8d3 20a0 ldr.w r2, [r3, #160] @ 0xa0 8013fae: 683b ldr r3, [r7, #0] 8013fb0: 601a str r2, [r3, #0] } ucOriginalNotifyState = pxTCB->ucNotifyState; 8013fb2: 6b3b ldr r3, [r7, #48] @ 0x30 8013fb4: f893 30a4 ldrb.w r3, [r3, #164] @ 0xa4 8013fb8: f887 302b strb.w r3, [r7, #43] @ 0x2b pxTCB->ucNotifyState = taskNOTIFICATION_RECEIVED; 8013fbc: 6b3b ldr r3, [r7, #48] @ 0x30 8013fbe: 2202 movs r2, #2 8013fc0: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 switch( eAction ) 8013fc4: 79fb ldrb r3, [r7, #7] 8013fc6: 2b04 cmp r3, #4 8013fc8: d82e bhi.n 8014028 8013fca: a201 add r2, pc, #4 @ (adr r2, 8013fd0 ) 8013fcc: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8013fd0: 0801404d .word 0x0801404d 8013fd4: 08013fe5 .word 0x08013fe5 8013fd8: 08013ff7 .word 0x08013ff7 8013fdc: 08014007 .word 0x08014007 8013fe0: 08014011 .word 0x08014011 { case eSetBits : pxTCB->ulNotifiedValue |= ulValue; 8013fe4: 6b3b ldr r3, [r7, #48] @ 0x30 8013fe6: f8d3 20a0 ldr.w r2, [r3, #160] @ 0xa0 8013fea: 68bb ldr r3, [r7, #8] 8013fec: 431a orrs r2, r3 8013fee: 6b3b ldr r3, [r7, #48] @ 0x30 8013ff0: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8013ff4: e02d b.n 8014052 case eIncrement : ( pxTCB->ulNotifiedValue )++; 8013ff6: 6b3b ldr r3, [r7, #48] @ 0x30 8013ff8: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 8013ffc: 1c5a adds r2, r3, #1 8013ffe: 6b3b ldr r3, [r7, #48] @ 0x30 8014000: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8014004: e025 b.n 8014052 case eSetValueWithOverwrite : pxTCB->ulNotifiedValue = ulValue; 8014006: 6b3b ldr r3, [r7, #48] @ 0x30 8014008: 68ba ldr r2, [r7, #8] 801400a: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 801400e: e020 b.n 8014052 case eSetValueWithoutOverwrite : if( ucOriginalNotifyState != taskNOTIFICATION_RECEIVED ) 8014010: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8014014: 2b02 cmp r3, #2 8014016: d004 beq.n 8014022 { pxTCB->ulNotifiedValue = ulValue; 8014018: 6b3b ldr r3, [r7, #48] @ 0x30 801401a: 68ba ldr r2, [r7, #8] 801401c: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 else { /* The value could not be written to the task. */ xReturn = pdFAIL; } break; 8014020: e017 b.n 8014052 xReturn = pdFAIL; 8014022: 2300 movs r3, #0 8014024: 637b str r3, [r7, #52] @ 0x34 break; 8014026: e014 b.n 8014052 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 ); 8014028: 6b3b ldr r3, [r7, #48] @ 0x30 801402a: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 801402e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8014032: d00d beq.n 8014050 __asm volatile 8014034: f04f 0350 mov.w r3, #80 @ 0x50 8014038: f383 8811 msr BASEPRI, r3 801403c: f3bf 8f6f isb sy 8014040: f3bf 8f4f dsb sy 8014044: 61bb str r3, [r7, #24] } 8014046: bf00 nop 8014048: bf00 nop 801404a: e7fd b.n 8014048 break; 801404c: bf00 nop 801404e: e000 b.n 8014052 break; 8014050: 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 ) 8014052: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8014056: 2b01 cmp r3, #1 8014058: d147 bne.n 80140ea { /* The task should not have been on an event list. */ configASSERT( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) == NULL ); 801405a: 6b3b ldr r3, [r7, #48] @ 0x30 801405c: 6a9b ldr r3, [r3, #40] @ 0x28 801405e: 2b00 cmp r3, #0 8014060: d00b beq.n 801407a __asm volatile 8014062: f04f 0350 mov.w r3, #80 @ 0x50 8014066: f383 8811 msr BASEPRI, r3 801406a: f3bf 8f6f isb sy 801406e: f3bf 8f4f dsb sy 8014072: 617b str r3, [r7, #20] } 8014074: bf00 nop 8014076: bf00 nop 8014078: e7fd b.n 8014076 if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 801407a: 4b21 ldr r3, [pc, #132] @ (8014100 ) 801407c: 681b ldr r3, [r3, #0] 801407e: 2b00 cmp r3, #0 8014080: d11d bne.n 80140be { ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 8014082: 6b3b ldr r3, [r7, #48] @ 0x30 8014084: 3304 adds r3, #4 8014086: 4618 mov r0, r3 8014088: f7fd f91c bl 80112c4 prvAddTaskToReadyList( pxTCB ); 801408c: 6b3b ldr r3, [r7, #48] @ 0x30 801408e: 6ada ldr r2, [r3, #44] @ 0x2c 8014090: 4b1c ldr r3, [pc, #112] @ (8014104 ) 8014092: 681b ldr r3, [r3, #0] 8014094: 429a cmp r2, r3 8014096: d903 bls.n 80140a0 8014098: 6b3b ldr r3, [r7, #48] @ 0x30 801409a: 6adb ldr r3, [r3, #44] @ 0x2c 801409c: 4a19 ldr r2, [pc, #100] @ (8014104 ) 801409e: 6013 str r3, [r2, #0] 80140a0: 6b3b ldr r3, [r7, #48] @ 0x30 80140a2: 6ada ldr r2, [r3, #44] @ 0x2c 80140a4: 4613 mov r3, r2 80140a6: 009b lsls r3, r3, #2 80140a8: 4413 add r3, r2 80140aa: 009b lsls r3, r3, #2 80140ac: 4a16 ldr r2, [pc, #88] @ (8014108 ) 80140ae: 441a add r2, r3 80140b0: 6b3b ldr r3, [r7, #48] @ 0x30 80140b2: 3304 adds r3, #4 80140b4: 4619 mov r1, r3 80140b6: 4610 mov r0, r2 80140b8: f7fd f8a7 bl 801120a 80140bc: e005 b.n 80140ca } else { /* The delayed and ready lists cannot be accessed, so hold this task pending until the scheduler is resumed. */ vListInsertEnd( &( xPendingReadyList ), &( pxTCB->xEventListItem ) ); 80140be: 6b3b ldr r3, [r7, #48] @ 0x30 80140c0: 3318 adds r3, #24 80140c2: 4619 mov r1, r3 80140c4: 4811 ldr r0, [pc, #68] @ (801410c ) 80140c6: f7fd f8a0 bl 801120a } if( pxTCB->uxPriority > pxCurrentTCB->uxPriority ) 80140ca: 6b3b ldr r3, [r7, #48] @ 0x30 80140cc: 6ada ldr r2, [r3, #44] @ 0x2c 80140ce: 4b10 ldr r3, [pc, #64] @ (8014110 ) 80140d0: 681b ldr r3, [r3, #0] 80140d2: 6adb ldr r3, [r3, #44] @ 0x2c 80140d4: 429a cmp r2, r3 80140d6: d908 bls.n 80140ea { /* The notified task has a priority above the currently executing task so a yield is required. */ if( pxHigherPriorityTaskWoken != NULL ) 80140d8: 6c3b ldr r3, [r7, #64] @ 0x40 80140da: 2b00 cmp r3, #0 80140dc: d002 beq.n 80140e4 { *pxHigherPriorityTaskWoken = pdTRUE; 80140de: 6c3b ldr r3, [r7, #64] @ 0x40 80140e0: 2201 movs r2, #1 80140e2: 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; 80140e4: 4b0b ldr r3, [pc, #44] @ (8014114 ) 80140e6: 2201 movs r2, #1 80140e8: 601a str r2, [r3, #0] 80140ea: 6afb ldr r3, [r7, #44] @ 0x2c 80140ec: 613b str r3, [r7, #16] __asm volatile 80140ee: 693b ldr r3, [r7, #16] 80140f0: f383 8811 msr BASEPRI, r3 } 80140f4: bf00 nop } } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; 80140f6: 6b7b ldr r3, [r7, #52] @ 0x34 } 80140f8: 4618 mov r0, r3 80140fa: 3738 adds r7, #56 @ 0x38 80140fc: 46bd mov sp, r7 80140fe: bd80 pop {r7, pc} 8014100: 2400418c .word 0x2400418c 8014104: 2400416c .word 0x2400416c 8014108: 24003c94 .word 0x24003c94 801410c: 24004124 .word 0x24004124 8014110: 24003c90 .word 0x24003c90 8014114: 24004178 .word 0x24004178 08014118 : /*-----------------------------------------------------------*/ #if( configUSE_TASK_NOTIFICATIONS == 1 ) BaseType_t xTaskNotifyStateClear( TaskHandle_t xTask ) { 8014118: b580 push {r7, lr} 801411a: b084 sub sp, #16 801411c: af00 add r7, sp, #0 801411e: 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 ); 8014120: 687b ldr r3, [r7, #4] 8014122: 2b00 cmp r3, #0 8014124: d102 bne.n 801412c 8014126: 4b0e ldr r3, [pc, #56] @ (8014160 ) 8014128: 681b ldr r3, [r3, #0] 801412a: e000 b.n 801412e 801412c: 687b ldr r3, [r7, #4] 801412e: 60bb str r3, [r7, #8] taskENTER_CRITICAL(); 8014130: f000 fcfa bl 8014b28 { if( pxTCB->ucNotifyState == taskNOTIFICATION_RECEIVED ) 8014134: 68bb ldr r3, [r7, #8] 8014136: f893 30a4 ldrb.w r3, [r3, #164] @ 0xa4 801413a: b2db uxtb r3, r3 801413c: 2b02 cmp r3, #2 801413e: d106 bne.n 801414e { pxTCB->ucNotifyState = taskNOT_WAITING_NOTIFICATION; 8014140: 68bb ldr r3, [r7, #8] 8014142: 2200 movs r2, #0 8014144: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 xReturn = pdPASS; 8014148: 2301 movs r3, #1 801414a: 60fb str r3, [r7, #12] 801414c: e001 b.n 8014152 } else { xReturn = pdFAIL; 801414e: 2300 movs r3, #0 8014150: 60fb str r3, [r7, #12] } } taskEXIT_CRITICAL(); 8014152: f000 fd1b bl 8014b8c return xReturn; 8014156: 68fb ldr r3, [r7, #12] } 8014158: 4618 mov r0, r3 801415a: 3710 adds r7, #16 801415c: 46bd mov sp, r7 801415e: bd80 pop {r7, pc} 8014160: 24003c90 .word 0x24003c90 08014164 : #endif /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, const BaseType_t xCanBlockIndefinitely ) { 8014164: b580 push {r7, lr} 8014166: b084 sub sp, #16 8014168: af00 add r7, sp, #0 801416a: 6078 str r0, [r7, #4] 801416c: 6039 str r1, [r7, #0] TickType_t xTimeToWake; const TickType_t xConstTickCount = xTickCount; 801416e: 4b21 ldr r3, [pc, #132] @ (80141f4 ) 8014170: 681b ldr r3, [r3, #0] 8014172: 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 ) 8014174: 4b20 ldr r3, [pc, #128] @ (80141f8 ) 8014176: 681b ldr r3, [r3, #0] 8014178: 3304 adds r3, #4 801417a: 4618 mov r0, r3 801417c: f7fd f8a2 bl 80112c4 mtCOVERAGE_TEST_MARKER(); } #if ( INCLUDE_vTaskSuspend == 1 ) { if( ( xTicksToWait == portMAX_DELAY ) && ( xCanBlockIndefinitely != pdFALSE ) ) 8014180: 687b ldr r3, [r7, #4] 8014182: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8014186: d10a bne.n 801419e 8014188: 683b ldr r3, [r7, #0] 801418a: 2b00 cmp r3, #0 801418c: d007 beq.n 801419e { /* 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 ) ); 801418e: 4b1a ldr r3, [pc, #104] @ (80141f8 ) 8014190: 681b ldr r3, [r3, #0] 8014192: 3304 adds r3, #4 8014194: 4619 mov r1, r3 8014196: 4819 ldr r0, [pc, #100] @ (80141fc ) 8014198: f7fd f837 bl 801120a /* Avoid compiler warning when INCLUDE_vTaskSuspend is not 1. */ ( void ) xCanBlockIndefinitely; } #endif /* INCLUDE_vTaskSuspend */ } 801419c: e026 b.n 80141ec xTimeToWake = xConstTickCount + xTicksToWait; 801419e: 68fa ldr r2, [r7, #12] 80141a0: 687b ldr r3, [r7, #4] 80141a2: 4413 add r3, r2 80141a4: 60bb str r3, [r7, #8] listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xStateListItem ), xTimeToWake ); 80141a6: 4b14 ldr r3, [pc, #80] @ (80141f8 ) 80141a8: 681b ldr r3, [r3, #0] 80141aa: 68ba ldr r2, [r7, #8] 80141ac: 605a str r2, [r3, #4] if( xTimeToWake < xConstTickCount ) 80141ae: 68ba ldr r2, [r7, #8] 80141b0: 68fb ldr r3, [r7, #12] 80141b2: 429a cmp r2, r3 80141b4: d209 bcs.n 80141ca vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); 80141b6: 4b12 ldr r3, [pc, #72] @ (8014200 ) 80141b8: 681a ldr r2, [r3, #0] 80141ba: 4b0f ldr r3, [pc, #60] @ (80141f8 ) 80141bc: 681b ldr r3, [r3, #0] 80141be: 3304 adds r3, #4 80141c0: 4619 mov r1, r3 80141c2: 4610 mov r0, r2 80141c4: f7fd f845 bl 8011252 } 80141c8: e010 b.n 80141ec vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); 80141ca: 4b0e ldr r3, [pc, #56] @ (8014204 ) 80141cc: 681a ldr r2, [r3, #0] 80141ce: 4b0a ldr r3, [pc, #40] @ (80141f8 ) 80141d0: 681b ldr r3, [r3, #0] 80141d2: 3304 adds r3, #4 80141d4: 4619 mov r1, r3 80141d6: 4610 mov r0, r2 80141d8: f7fd f83b bl 8011252 if( xTimeToWake < xNextTaskUnblockTime ) 80141dc: 4b0a ldr r3, [pc, #40] @ (8014208 ) 80141de: 681b ldr r3, [r3, #0] 80141e0: 68ba ldr r2, [r7, #8] 80141e2: 429a cmp r2, r3 80141e4: d202 bcs.n 80141ec xNextTaskUnblockTime = xTimeToWake; 80141e6: 4a08 ldr r2, [pc, #32] @ (8014208 ) 80141e8: 68bb ldr r3, [r7, #8] 80141ea: 6013 str r3, [r2, #0] } 80141ec: bf00 nop 80141ee: 3710 adds r7, #16 80141f0: 46bd mov sp, r7 80141f2: bd80 pop {r7, pc} 80141f4: 24004168 .word 0x24004168 80141f8: 24003c90 .word 0x24003c90 80141fc: 24004150 .word 0x24004150 8014200: 24004120 .word 0x24004120 8014204: 2400411c .word 0x2400411c 8014208: 24004184 .word 0x24004184 0801420c : TimerCallbackFunction_t pxCallbackFunction, Timer_t *pxNewTimer ) PRIVILEGED_FUNCTION; /*-----------------------------------------------------------*/ BaseType_t xTimerCreateTimerTask( void ) { 801420c: b580 push {r7, lr} 801420e: b08a sub sp, #40 @ 0x28 8014210: af04 add r7, sp, #16 BaseType_t xReturn = pdFAIL; 8014212: 2300 movs r3, #0 8014214: 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(); 8014216: f000 fb13 bl 8014840 if( xTimerQueue != NULL ) 801421a: 4b1d ldr r3, [pc, #116] @ (8014290 ) 801421c: 681b ldr r3, [r3, #0] 801421e: 2b00 cmp r3, #0 8014220: d021 beq.n 8014266 { #if( configSUPPORT_STATIC_ALLOCATION == 1 ) { StaticTask_t *pxTimerTaskTCBBuffer = NULL; 8014222: 2300 movs r3, #0 8014224: 60fb str r3, [r7, #12] StackType_t *pxTimerTaskStackBuffer = NULL; 8014226: 2300 movs r3, #0 8014228: 60bb str r3, [r7, #8] uint32_t ulTimerTaskStackSize; vApplicationGetTimerTaskMemory( &pxTimerTaskTCBBuffer, &pxTimerTaskStackBuffer, &ulTimerTaskStackSize ); 801422a: 1d3a adds r2, r7, #4 801422c: f107 0108 add.w r1, r7, #8 8014230: f107 030c add.w r3, r7, #12 8014234: 4618 mov r0, r3 8014236: f7fc ffa1 bl 801117c xTimerTaskHandle = xTaskCreateStatic( prvTimerTask, 801423a: 6879 ldr r1, [r7, #4] 801423c: 68bb ldr r3, [r7, #8] 801423e: 68fa ldr r2, [r7, #12] 8014240: 9202 str r2, [sp, #8] 8014242: 9301 str r3, [sp, #4] 8014244: 2302 movs r3, #2 8014246: 9300 str r3, [sp, #0] 8014248: 2300 movs r3, #0 801424a: 460a mov r2, r1 801424c: 4911 ldr r1, [pc, #68] @ (8014294 ) 801424e: 4812 ldr r0, [pc, #72] @ (8014298 ) 8014250: f7fe fd1c bl 8012c8c 8014254: 4603 mov r3, r0 8014256: 4a11 ldr r2, [pc, #68] @ (801429c ) 8014258: 6013 str r3, [r2, #0] NULL, ( ( UBaseType_t ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT, pxTimerTaskStackBuffer, pxTimerTaskTCBBuffer ); if( xTimerTaskHandle != NULL ) 801425a: 4b10 ldr r3, [pc, #64] @ (801429c ) 801425c: 681b ldr r3, [r3, #0] 801425e: 2b00 cmp r3, #0 8014260: d001 beq.n 8014266 { xReturn = pdPASS; 8014262: 2301 movs r3, #1 8014264: 617b str r3, [r7, #20] else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 8014266: 697b ldr r3, [r7, #20] 8014268: 2b00 cmp r3, #0 801426a: d10b bne.n 8014284 __asm volatile 801426c: f04f 0350 mov.w r3, #80 @ 0x50 8014270: f383 8811 msr BASEPRI, r3 8014274: f3bf 8f6f isb sy 8014278: f3bf 8f4f dsb sy 801427c: 613b str r3, [r7, #16] } 801427e: bf00 nop 8014280: bf00 nop 8014282: e7fd b.n 8014280 return xReturn; 8014284: 697b ldr r3, [r7, #20] } 8014286: 4618 mov r0, r3 8014288: 3718 adds r7, #24 801428a: 46bd mov sp, r7 801428c: bd80 pop {r7, pc} 801428e: bf00 nop 8014290: 240041c0 .word 0x240041c0 8014294: 0802cb74 .word 0x0802cb74 8014298: 080143d9 .word 0x080143d9 801429c: 240041c4 .word 0x240041c4 080142a0 : } } /*-----------------------------------------------------------*/ BaseType_t xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait ) { 80142a0: b580 push {r7, lr} 80142a2: b08a sub sp, #40 @ 0x28 80142a4: af00 add r7, sp, #0 80142a6: 60f8 str r0, [r7, #12] 80142a8: 60b9 str r1, [r7, #8] 80142aa: 607a str r2, [r7, #4] 80142ac: 603b str r3, [r7, #0] BaseType_t xReturn = pdFAIL; 80142ae: 2300 movs r3, #0 80142b0: 627b str r3, [r7, #36] @ 0x24 DaemonTaskMessage_t xMessage; configASSERT( xTimer ); 80142b2: 68fb ldr r3, [r7, #12] 80142b4: 2b00 cmp r3, #0 80142b6: d10b bne.n 80142d0 __asm volatile 80142b8: f04f 0350 mov.w r3, #80 @ 0x50 80142bc: f383 8811 msr BASEPRI, r3 80142c0: f3bf 8f6f isb sy 80142c4: f3bf 8f4f dsb sy 80142c8: 623b str r3, [r7, #32] } 80142ca: bf00 nop 80142cc: bf00 nop 80142ce: e7fd b.n 80142cc /* Send a message to the timer service task to perform a particular action on a particular timer definition. */ if( xTimerQueue != NULL ) 80142d0: 4b19 ldr r3, [pc, #100] @ (8014338 ) 80142d2: 681b ldr r3, [r3, #0] 80142d4: 2b00 cmp r3, #0 80142d6: d02a beq.n 801432e { /* Send a command to the timer service task to start the xTimer timer. */ xMessage.xMessageID = xCommandID; 80142d8: 68bb ldr r3, [r7, #8] 80142da: 613b str r3, [r7, #16] xMessage.u.xTimerParameters.xMessageValue = xOptionalValue; 80142dc: 687b ldr r3, [r7, #4] 80142de: 617b str r3, [r7, #20] xMessage.u.xTimerParameters.pxTimer = xTimer; 80142e0: 68fb ldr r3, [r7, #12] 80142e2: 61bb str r3, [r7, #24] if( xCommandID < tmrFIRST_FROM_ISR_COMMAND ) 80142e4: 68bb ldr r3, [r7, #8] 80142e6: 2b05 cmp r3, #5 80142e8: dc18 bgt.n 801431c { if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING ) 80142ea: f7ff fb7f bl 80139ec 80142ee: 4603 mov r3, r0 80142f0: 2b02 cmp r3, #2 80142f2: d109 bne.n 8014308 { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait ); 80142f4: 4b10 ldr r3, [pc, #64] @ (8014338 ) 80142f6: 6818 ldr r0, [r3, #0] 80142f8: f107 0110 add.w r1, r7, #16 80142fc: 2300 movs r3, #0 80142fe: 6b3a ldr r2, [r7, #48] @ 0x30 8014300: f7fd fa76 bl 80117f0 8014304: 6278 str r0, [r7, #36] @ 0x24 8014306: e012 b.n 801432e } else { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, tmrNO_DELAY ); 8014308: 4b0b ldr r3, [pc, #44] @ (8014338 ) 801430a: 6818 ldr r0, [r3, #0] 801430c: f107 0110 add.w r1, r7, #16 8014310: 2300 movs r3, #0 8014312: 2200 movs r2, #0 8014314: f7fd fa6c bl 80117f0 8014318: 6278 str r0, [r7, #36] @ 0x24 801431a: e008 b.n 801432e } } else { xReturn = xQueueSendToBackFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken ); 801431c: 4b06 ldr r3, [pc, #24] @ (8014338 ) 801431e: 6818 ldr r0, [r3, #0] 8014320: f107 0110 add.w r1, r7, #16 8014324: 2300 movs r3, #0 8014326: 683a ldr r2, [r7, #0] 8014328: f7fd fb64 bl 80119f4 801432c: 6278 str r0, [r7, #36] @ 0x24 else { mtCOVERAGE_TEST_MARKER(); } return xReturn; 801432e: 6a7b ldr r3, [r7, #36] @ 0x24 } 8014330: 4618 mov r0, r3 8014332: 3728 adds r7, #40 @ 0x28 8014334: 46bd mov sp, r7 8014336: bd80 pop {r7, pc} 8014338: 240041c0 .word 0x240041c0 0801433c : return pxTimer->pcTimerName; } /*-----------------------------------------------------------*/ static void prvProcessExpiredTimer( const TickType_t xNextExpireTime, const TickType_t xTimeNow ) { 801433c: b580 push {r7, lr} 801433e: b088 sub sp, #32 8014340: af02 add r7, sp, #8 8014342: 6078 str r0, [r7, #4] 8014344: 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. */ 8014346: 4b23 ldr r3, [pc, #140] @ (80143d4 ) 8014348: 681b ldr r3, [r3, #0] 801434a: 68db ldr r3, [r3, #12] 801434c: 68db ldr r3, [r3, #12] 801434e: 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 ) ); 8014350: 697b ldr r3, [r7, #20] 8014352: 3304 adds r3, #4 8014354: 4618 mov r0, r3 8014356: f7fc ffb5 bl 80112c4 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 ) 801435a: 697b ldr r3, [r7, #20] 801435c: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8014360: f003 0304 and.w r3, r3, #4 8014364: 2b00 cmp r3, #0 8014366: d023 beq.n 80143b0 { /* 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 ) 8014368: 697b ldr r3, [r7, #20] 801436a: 699a ldr r2, [r3, #24] 801436c: 687b ldr r3, [r7, #4] 801436e: 18d1 adds r1, r2, r3 8014370: 687b ldr r3, [r7, #4] 8014372: 683a ldr r2, [r7, #0] 8014374: 6978 ldr r0, [r7, #20] 8014376: f000 f8d5 bl 8014524 801437a: 4603 mov r3, r0 801437c: 2b00 cmp r3, #0 801437e: d020 beq.n 80143c2 { /* 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 ); 8014380: 2300 movs r3, #0 8014382: 9300 str r3, [sp, #0] 8014384: 2300 movs r3, #0 8014386: 687a ldr r2, [r7, #4] 8014388: 2100 movs r1, #0 801438a: 6978 ldr r0, [r7, #20] 801438c: f7ff ff88 bl 80142a0 8014390: 6138 str r0, [r7, #16] configASSERT( xResult ); 8014392: 693b ldr r3, [r7, #16] 8014394: 2b00 cmp r3, #0 8014396: d114 bne.n 80143c2 __asm volatile 8014398: f04f 0350 mov.w r3, #80 @ 0x50 801439c: f383 8811 msr BASEPRI, r3 80143a0: f3bf 8f6f isb sy 80143a4: f3bf 8f4f dsb sy 80143a8: 60fb str r3, [r7, #12] } 80143aa: bf00 nop 80143ac: bf00 nop 80143ae: e7fd b.n 80143ac mtCOVERAGE_TEST_MARKER(); } } else { pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; 80143b0: 697b ldr r3, [r7, #20] 80143b2: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80143b6: f023 0301 bic.w r3, r3, #1 80143ba: b2da uxtb r2, r3 80143bc: 697b ldr r3, [r7, #20] 80143be: f883 2028 strb.w r2, [r3, #40] @ 0x28 mtCOVERAGE_TEST_MARKER(); } /* Call the timer callback. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 80143c2: 697b ldr r3, [r7, #20] 80143c4: 6a1b ldr r3, [r3, #32] 80143c6: 6978 ldr r0, [r7, #20] 80143c8: 4798 blx r3 } 80143ca: bf00 nop 80143cc: 3718 adds r7, #24 80143ce: 46bd mov sp, r7 80143d0: bd80 pop {r7, pc} 80143d2: bf00 nop 80143d4: 240041b8 .word 0x240041b8 080143d8 : /*-----------------------------------------------------------*/ static portTASK_FUNCTION( prvTimerTask, pvParameters ) { 80143d8: b580 push {r7, lr} 80143da: b084 sub sp, #16 80143dc: af00 add r7, sp, #0 80143de: 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 ); 80143e0: f107 0308 add.w r3, r7, #8 80143e4: 4618 mov r0, r3 80143e6: f000 f859 bl 801449c 80143ea: 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 ); 80143ec: 68bb ldr r3, [r7, #8] 80143ee: 4619 mov r1, r3 80143f0: 68f8 ldr r0, [r7, #12] 80143f2: f000 f805 bl 8014400 /* Empty the command queue. */ prvProcessReceivedCommands(); 80143f6: f000 f8d7 bl 80145a8 xNextExpireTime = prvGetNextExpireTime( &xListWasEmpty ); 80143fa: bf00 nop 80143fc: e7f0 b.n 80143e0 ... 08014400 : } } /*-----------------------------------------------------------*/ static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, BaseType_t xListWasEmpty ) { 8014400: b580 push {r7, lr} 8014402: b084 sub sp, #16 8014404: af00 add r7, sp, #0 8014406: 6078 str r0, [r7, #4] 8014408: 6039 str r1, [r7, #0] TickType_t xTimeNow; BaseType_t xTimerListsWereSwitched; vTaskSuspendAll(); 801440a: f7fe fea3 bl 8013154 /* 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 ); 801440e: f107 0308 add.w r3, r7, #8 8014412: 4618 mov r0, r3 8014414: f000 f866 bl 80144e4 8014418: 60f8 str r0, [r7, #12] if( xTimerListsWereSwitched == pdFALSE ) 801441a: 68bb ldr r3, [r7, #8] 801441c: 2b00 cmp r3, #0 801441e: d130 bne.n 8014482 { /* The tick count has not overflowed, has the timer expired? */ if( ( xListWasEmpty == pdFALSE ) && ( xNextExpireTime <= xTimeNow ) ) 8014420: 683b ldr r3, [r7, #0] 8014422: 2b00 cmp r3, #0 8014424: d10a bne.n 801443c 8014426: 687a ldr r2, [r7, #4] 8014428: 68fb ldr r3, [r7, #12] 801442a: 429a cmp r2, r3 801442c: d806 bhi.n 801443c { ( void ) xTaskResumeAll(); 801442e: f7fe fe9f bl 8013170 prvProcessExpiredTimer( xNextExpireTime, xTimeNow ); 8014432: 68f9 ldr r1, [r7, #12] 8014434: 6878 ldr r0, [r7, #4] 8014436: f7ff ff81 bl 801433c else { ( void ) xTaskResumeAll(); } } } 801443a: e024 b.n 8014486 if( xListWasEmpty != pdFALSE ) 801443c: 683b ldr r3, [r7, #0] 801443e: 2b00 cmp r3, #0 8014440: d008 beq.n 8014454 xListWasEmpty = listLIST_IS_EMPTY( pxOverflowTimerList ); 8014442: 4b13 ldr r3, [pc, #76] @ (8014490 ) 8014444: 681b ldr r3, [r3, #0] 8014446: 681b ldr r3, [r3, #0] 8014448: 2b00 cmp r3, #0 801444a: d101 bne.n 8014450 801444c: 2301 movs r3, #1 801444e: e000 b.n 8014452 8014450: 2300 movs r3, #0 8014452: 603b str r3, [r7, #0] vQueueWaitForMessageRestricted( xTimerQueue, ( xNextExpireTime - xTimeNow ), xListWasEmpty ); 8014454: 4b0f ldr r3, [pc, #60] @ (8014494 ) 8014456: 6818 ldr r0, [r3, #0] 8014458: 687a ldr r2, [r7, #4] 801445a: 68fb ldr r3, [r7, #12] 801445c: 1ad3 subs r3, r2, r3 801445e: 683a ldr r2, [r7, #0] 8014460: 4619 mov r1, r3 8014462: f7fe f847 bl 80124f4 if( xTaskResumeAll() == pdFALSE ) 8014466: f7fe fe83 bl 8013170 801446a: 4603 mov r3, r0 801446c: 2b00 cmp r3, #0 801446e: d10a bne.n 8014486 portYIELD_WITHIN_API(); 8014470: 4b09 ldr r3, [pc, #36] @ (8014498 ) 8014472: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8014476: 601a str r2, [r3, #0] 8014478: f3bf 8f4f dsb sy 801447c: f3bf 8f6f isb sy } 8014480: e001 b.n 8014486 ( void ) xTaskResumeAll(); 8014482: f7fe fe75 bl 8013170 } 8014486: bf00 nop 8014488: 3710 adds r7, #16 801448a: 46bd mov sp, r7 801448c: bd80 pop {r7, pc} 801448e: bf00 nop 8014490: 240041bc .word 0x240041bc 8014494: 240041c0 .word 0x240041c0 8014498: e000ed04 .word 0xe000ed04 0801449c : /*-----------------------------------------------------------*/ static TickType_t prvGetNextExpireTime( BaseType_t * const pxListWasEmpty ) { 801449c: b480 push {r7} 801449e: b085 sub sp, #20 80144a0: af00 add r7, sp, #0 80144a2: 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 ); 80144a4: 4b0e ldr r3, [pc, #56] @ (80144e0 ) 80144a6: 681b ldr r3, [r3, #0] 80144a8: 681b ldr r3, [r3, #0] 80144aa: 2b00 cmp r3, #0 80144ac: d101 bne.n 80144b2 80144ae: 2201 movs r2, #1 80144b0: e000 b.n 80144b4 80144b2: 2200 movs r2, #0 80144b4: 687b ldr r3, [r7, #4] 80144b6: 601a str r2, [r3, #0] if( *pxListWasEmpty == pdFALSE ) 80144b8: 687b ldr r3, [r7, #4] 80144ba: 681b ldr r3, [r3, #0] 80144bc: 2b00 cmp r3, #0 80144be: d105 bne.n 80144cc { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); 80144c0: 4b07 ldr r3, [pc, #28] @ (80144e0 ) 80144c2: 681b ldr r3, [r3, #0] 80144c4: 68db ldr r3, [r3, #12] 80144c6: 681b ldr r3, [r3, #0] 80144c8: 60fb str r3, [r7, #12] 80144ca: e001 b.n 80144d0 } else { /* Ensure the task unblocks when the tick count rolls over. */ xNextExpireTime = ( TickType_t ) 0U; 80144cc: 2300 movs r3, #0 80144ce: 60fb str r3, [r7, #12] } return xNextExpireTime; 80144d0: 68fb ldr r3, [r7, #12] } 80144d2: 4618 mov r0, r3 80144d4: 3714 adds r7, #20 80144d6: 46bd mov sp, r7 80144d8: f85d 7b04 ldr.w r7, [sp], #4 80144dc: 4770 bx lr 80144de: bf00 nop 80144e0: 240041b8 .word 0x240041b8 080144e4 : /*-----------------------------------------------------------*/ static TickType_t prvSampleTimeNow( BaseType_t * const pxTimerListsWereSwitched ) { 80144e4: b580 push {r7, lr} 80144e6: b084 sub sp, #16 80144e8: af00 add r7, sp, #0 80144ea: 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(); 80144ec: f7fe fede bl 80132ac 80144f0: 60f8 str r0, [r7, #12] if( xTimeNow < xLastTime ) 80144f2: 4b0b ldr r3, [pc, #44] @ (8014520 ) 80144f4: 681b ldr r3, [r3, #0] 80144f6: 68fa ldr r2, [r7, #12] 80144f8: 429a cmp r2, r3 80144fa: d205 bcs.n 8014508 { prvSwitchTimerLists(); 80144fc: f000 f93a bl 8014774 *pxTimerListsWereSwitched = pdTRUE; 8014500: 687b ldr r3, [r7, #4] 8014502: 2201 movs r2, #1 8014504: 601a str r2, [r3, #0] 8014506: e002 b.n 801450e } else { *pxTimerListsWereSwitched = pdFALSE; 8014508: 687b ldr r3, [r7, #4] 801450a: 2200 movs r2, #0 801450c: 601a str r2, [r3, #0] } xLastTime = xTimeNow; 801450e: 4a04 ldr r2, [pc, #16] @ (8014520 ) 8014510: 68fb ldr r3, [r7, #12] 8014512: 6013 str r3, [r2, #0] return xTimeNow; 8014514: 68fb ldr r3, [r7, #12] } 8014516: 4618 mov r0, r3 8014518: 3710 adds r7, #16 801451a: 46bd mov sp, r7 801451c: bd80 pop {r7, pc} 801451e: bf00 nop 8014520: 240041c8 .word 0x240041c8 08014524 : /*-----------------------------------------------------------*/ static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { 8014524: b580 push {r7, lr} 8014526: b086 sub sp, #24 8014528: af00 add r7, sp, #0 801452a: 60f8 str r0, [r7, #12] 801452c: 60b9 str r1, [r7, #8] 801452e: 607a str r2, [r7, #4] 8014530: 603b str r3, [r7, #0] BaseType_t xProcessTimerNow = pdFALSE; 8014532: 2300 movs r3, #0 8014534: 617b str r3, [r7, #20] listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xNextExpiryTime ); 8014536: 68fb ldr r3, [r7, #12] 8014538: 68ba ldr r2, [r7, #8] 801453a: 605a str r2, [r3, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 801453c: 68fb ldr r3, [r7, #12] 801453e: 68fa ldr r2, [r7, #12] 8014540: 611a str r2, [r3, #16] if( xNextExpiryTime <= xTimeNow ) 8014542: 68ba ldr r2, [r7, #8] 8014544: 687b ldr r3, [r7, #4] 8014546: 429a cmp r2, r3 8014548: d812 bhi.n 8014570 { /* 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. */ 801454a: 687a ldr r2, [r7, #4] 801454c: 683b ldr r3, [r7, #0] 801454e: 1ad2 subs r2, r2, r3 8014550: 68fb ldr r3, [r7, #12] 8014552: 699b ldr r3, [r3, #24] 8014554: 429a cmp r2, r3 8014556: d302 bcc.n 801455e { /* The time between a command being issued and the command being processed actually exceeds the timers period. */ xProcessTimerNow = pdTRUE; 8014558: 2301 movs r3, #1 801455a: 617b str r3, [r7, #20] 801455c: e01b b.n 8014596 } else { vListInsert( pxOverflowTimerList, &( pxTimer->xTimerListItem ) ); 801455e: 4b10 ldr r3, [pc, #64] @ (80145a0 ) 8014560: 681a ldr r2, [r3, #0] 8014562: 68fb ldr r3, [r7, #12] 8014564: 3304 adds r3, #4 8014566: 4619 mov r1, r3 8014568: 4610 mov r0, r2 801456a: f7fc fe72 bl 8011252 801456e: e012 b.n 8014596 } } else { if( ( xTimeNow < xCommandTime ) && ( xNextExpiryTime >= xCommandTime ) ) 8014570: 687a ldr r2, [r7, #4] 8014572: 683b ldr r3, [r7, #0] 8014574: 429a cmp r2, r3 8014576: d206 bcs.n 8014586 8014578: 68ba ldr r2, [r7, #8] 801457a: 683b ldr r3, [r7, #0] 801457c: 429a cmp r2, r3 801457e: d302 bcc.n 8014586 { /* 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; 8014580: 2301 movs r3, #1 8014582: 617b str r3, [r7, #20] 8014584: e007 b.n 8014596 } else { vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 8014586: 4b07 ldr r3, [pc, #28] @ (80145a4 ) 8014588: 681a ldr r2, [r3, #0] 801458a: 68fb ldr r3, [r7, #12] 801458c: 3304 adds r3, #4 801458e: 4619 mov r1, r3 8014590: 4610 mov r0, r2 8014592: f7fc fe5e bl 8011252 } } return xProcessTimerNow; 8014596: 697b ldr r3, [r7, #20] } 8014598: 4618 mov r0, r3 801459a: 3718 adds r7, #24 801459c: 46bd mov sp, r7 801459e: bd80 pop {r7, pc} 80145a0: 240041bc .word 0x240041bc 80145a4: 240041b8 .word 0x240041b8 080145a8 : /*-----------------------------------------------------------*/ static void prvProcessReceivedCommands( void ) { 80145a8: b580 push {r7, lr} 80145aa: b08e sub sp, #56 @ 0x38 80145ac: 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. */ 80145ae: e0ce b.n 801474e { #if ( INCLUDE_xTimerPendFunctionCall == 1 ) { /* Negative commands are pended function calls rather than timer commands. */ if( xMessage.xMessageID < ( BaseType_t ) 0 ) 80145b0: 687b ldr r3, [r7, #4] 80145b2: 2b00 cmp r3, #0 80145b4: da19 bge.n 80145ea { const CallbackParameters_t * const pxCallback = &( xMessage.u.xCallbackParameters ); 80145b6: 1d3b adds r3, r7, #4 80145b8: 3304 adds r3, #4 80145ba: 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 ); 80145bc: 6afb ldr r3, [r7, #44] @ 0x2c 80145be: 2b00 cmp r3, #0 80145c0: d10b bne.n 80145da __asm volatile 80145c2: f04f 0350 mov.w r3, #80 @ 0x50 80145c6: f383 8811 msr BASEPRI, r3 80145ca: f3bf 8f6f isb sy 80145ce: f3bf 8f4f dsb sy 80145d2: 61fb str r3, [r7, #28] } 80145d4: bf00 nop 80145d6: bf00 nop 80145d8: e7fd b.n 80145d6 /* Call the function. */ pxCallback->pxCallbackFunction( pxCallback->pvParameter1, pxCallback->ulParameter2 ); 80145da: 6afb ldr r3, [r7, #44] @ 0x2c 80145dc: 681b ldr r3, [r3, #0] 80145de: 6afa ldr r2, [r7, #44] @ 0x2c 80145e0: 6850 ldr r0, [r2, #4] 80145e2: 6afa ldr r2, [r7, #44] @ 0x2c 80145e4: 6892 ldr r2, [r2, #8] 80145e6: 4611 mov r1, r2 80145e8: 4798 blx r3 } #endif /* INCLUDE_xTimerPendFunctionCall */ /* Commands that are positive are timer commands rather than pended function calls. */ if( xMessage.xMessageID >= ( BaseType_t ) 0 ) 80145ea: 687b ldr r3, [r7, #4] 80145ec: 2b00 cmp r3, #0 80145ee: f2c0 80ae blt.w 801474e { /* The messages uses the xTimerParameters member to work on a software timer. */ pxTimer = xMessage.u.xTimerParameters.pxTimer; 80145f2: 68fb ldr r3, [r7, #12] 80145f4: 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. */ 80145f6: 6abb ldr r3, [r7, #40] @ 0x28 80145f8: 695b ldr r3, [r3, #20] 80145fa: 2b00 cmp r3, #0 80145fc: d004 beq.n 8014608 { /* The timer is in a list, remove it. */ ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 80145fe: 6abb ldr r3, [r7, #40] @ 0x28 8014600: 3304 adds r3, #4 8014602: 4618 mov r0, r3 8014604: f7fc fe5e bl 80112c4 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 ); 8014608: 463b mov r3, r7 801460a: 4618 mov r0, r3 801460c: f7ff ff6a bl 80144e4 8014610: 6278 str r0, [r7, #36] @ 0x24 switch( xMessage.xMessageID ) 8014612: 687b ldr r3, [r7, #4] 8014614: 2b09 cmp r3, #9 8014616: f200 8097 bhi.w 8014748 801461a: a201 add r2, pc, #4 @ (adr r2, 8014620 ) 801461c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8014620: 08014649 .word 0x08014649 8014624: 08014649 .word 0x08014649 8014628: 08014649 .word 0x08014649 801462c: 080146bf .word 0x080146bf 8014630: 080146d3 .word 0x080146d3 8014634: 0801471f .word 0x0801471f 8014638: 08014649 .word 0x08014649 801463c: 08014649 .word 0x08014649 8014640: 080146bf .word 0x080146bf 8014644: 080146d3 .word 0x080146d3 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; 8014648: 6abb ldr r3, [r7, #40] @ 0x28 801464a: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801464e: f043 0301 orr.w r3, r3, #1 8014652: b2da uxtb r2, r3 8014654: 6abb ldr r3, [r7, #40] @ 0x28 8014656: f883 2028 strb.w r2, [r3, #40] @ 0x28 if( prvInsertTimerInActiveList( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) != pdFALSE ) 801465a: 68ba ldr r2, [r7, #8] 801465c: 6abb ldr r3, [r7, #40] @ 0x28 801465e: 699b ldr r3, [r3, #24] 8014660: 18d1 adds r1, r2, r3 8014662: 68bb ldr r3, [r7, #8] 8014664: 6a7a ldr r2, [r7, #36] @ 0x24 8014666: 6ab8 ldr r0, [r7, #40] @ 0x28 8014668: f7ff ff5c bl 8014524 801466c: 4603 mov r3, r0 801466e: 2b00 cmp r3, #0 8014670: d06c beq.n 801474c { /* The timer expired before it was added to the active timer list. Process it now. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 8014672: 6abb ldr r3, [r7, #40] @ 0x28 8014674: 6a1b ldr r3, [r3, #32] 8014676: 6ab8 ldr r0, [r7, #40] @ 0x28 8014678: 4798 blx r3 traceTIMER_EXPIRED( pxTimer ); if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 ) 801467a: 6abb ldr r3, [r7, #40] @ 0x28 801467c: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8014680: f003 0304 and.w r3, r3, #4 8014684: 2b00 cmp r3, #0 8014686: d061 beq.n 801474c { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY ); 8014688: 68ba ldr r2, [r7, #8] 801468a: 6abb ldr r3, [r7, #40] @ 0x28 801468c: 699b ldr r3, [r3, #24] 801468e: 441a add r2, r3 8014690: 2300 movs r3, #0 8014692: 9300 str r3, [sp, #0] 8014694: 2300 movs r3, #0 8014696: 2100 movs r1, #0 8014698: 6ab8 ldr r0, [r7, #40] @ 0x28 801469a: f7ff fe01 bl 80142a0 801469e: 6238 str r0, [r7, #32] configASSERT( xResult ); 80146a0: 6a3b ldr r3, [r7, #32] 80146a2: 2b00 cmp r3, #0 80146a4: d152 bne.n 801474c __asm volatile 80146a6: f04f 0350 mov.w r3, #80 @ 0x50 80146aa: f383 8811 msr BASEPRI, r3 80146ae: f3bf 8f6f isb sy 80146b2: f3bf 8f4f dsb sy 80146b6: 61bb str r3, [r7, #24] } 80146b8: bf00 nop 80146ba: bf00 nop 80146bc: e7fd b.n 80146ba break; case tmrCOMMAND_STOP : case tmrCOMMAND_STOP_FROM_ISR : /* The timer has already been removed from the active list. */ pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; 80146be: 6abb ldr r3, [r7, #40] @ 0x28 80146c0: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80146c4: f023 0301 bic.w r3, r3, #1 80146c8: b2da uxtb r2, r3 80146ca: 6abb ldr r3, [r7, #40] @ 0x28 80146cc: f883 2028 strb.w r2, [r3, #40] @ 0x28 break; 80146d0: e03d b.n 801474e case tmrCOMMAND_CHANGE_PERIOD : case tmrCOMMAND_CHANGE_PERIOD_FROM_ISR : pxTimer->ucStatus |= tmrSTATUS_IS_ACTIVE; 80146d2: 6abb ldr r3, [r7, #40] @ 0x28 80146d4: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80146d8: f043 0301 orr.w r3, r3, #1 80146dc: b2da uxtb r2, r3 80146de: 6abb ldr r3, [r7, #40] @ 0x28 80146e0: f883 2028 strb.w r2, [r3, #40] @ 0x28 pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue; 80146e4: 68ba ldr r2, [r7, #8] 80146e6: 6abb ldr r3, [r7, #40] @ 0x28 80146e8: 619a str r2, [r3, #24] configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) ); 80146ea: 6abb ldr r3, [r7, #40] @ 0x28 80146ec: 699b ldr r3, [r3, #24] 80146ee: 2b00 cmp r3, #0 80146f0: d10b bne.n 801470a __asm volatile 80146f2: f04f 0350 mov.w r3, #80 @ 0x50 80146f6: f383 8811 msr BASEPRI, r3 80146fa: f3bf 8f6f isb sy 80146fe: f3bf 8f4f dsb sy 8014702: 617b str r3, [r7, #20] } 8014704: bf00 nop 8014706: bf00 nop 8014708: e7fd b.n 8014706 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 ); 801470a: 6abb ldr r3, [r7, #40] @ 0x28 801470c: 699a ldr r2, [r3, #24] 801470e: 6a7b ldr r3, [r7, #36] @ 0x24 8014710: 18d1 adds r1, r2, r3 8014712: 6a7b ldr r3, [r7, #36] @ 0x24 8014714: 6a7a ldr r2, [r7, #36] @ 0x24 8014716: 6ab8 ldr r0, [r7, #40] @ 0x28 8014718: f7ff ff04 bl 8014524 break; 801471c: e017 b.n 801474e #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 ) 801471e: 6abb ldr r3, [r7, #40] @ 0x28 8014720: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8014724: f003 0302 and.w r3, r3, #2 8014728: 2b00 cmp r3, #0 801472a: d103 bne.n 8014734 { vPortFree( pxTimer ); 801472c: 6ab8 ldr r0, [r7, #40] @ 0x28 801472e: f000 fbeb bl 8014f08 no need to free the memory - just mark the timer as "not active". */ pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; } #endif /* configSUPPORT_DYNAMIC_ALLOCATION */ break; 8014732: e00c b.n 801474e pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; 8014734: 6abb ldr r3, [r7, #40] @ 0x28 8014736: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801473a: f023 0301 bic.w r3, r3, #1 801473e: b2da uxtb r2, r3 8014740: 6abb ldr r3, [r7, #40] @ 0x28 8014742: f883 2028 strb.w r2, [r3, #40] @ 0x28 break; 8014746: e002 b.n 801474e default : /* Don't expect to get here. */ break; 8014748: bf00 nop 801474a: e000 b.n 801474e break; 801474c: 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. */ 801474e: 4b08 ldr r3, [pc, #32] @ (8014770 ) 8014750: 681b ldr r3, [r3, #0] 8014752: 1d39 adds r1, r7, #4 8014754: 2200 movs r2, #0 8014756: 4618 mov r0, r3 8014758: f7fd fa7a bl 8011c50 801475c: 4603 mov r3, r0 801475e: 2b00 cmp r3, #0 8014760: f47f af26 bne.w 80145b0 } } } } 8014764: bf00 nop 8014766: bf00 nop 8014768: 3730 adds r7, #48 @ 0x30 801476a: 46bd mov sp, r7 801476c: bd80 pop {r7, pc} 801476e: bf00 nop 8014770: 240041c0 .word 0x240041c0 08014774 : /*-----------------------------------------------------------*/ static void prvSwitchTimerLists( void ) { 8014774: b580 push {r7, lr} 8014776: b088 sub sp, #32 8014778: 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 ) 801477a: e049 b.n 8014810 { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); 801477c: 4b2e ldr r3, [pc, #184] @ (8014838 ) 801477e: 681b ldr r3, [r3, #0] 8014780: 68db ldr r3, [r3, #12] 8014782: 681b ldr r3, [r3, #0] 8014784: 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. */ 8014786: 4b2c ldr r3, [pc, #176] @ (8014838 ) 8014788: 681b ldr r3, [r3, #0] 801478a: 68db ldr r3, [r3, #12] 801478c: 68db ldr r3, [r3, #12] 801478e: 60fb str r3, [r7, #12] ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 8014790: 68fb ldr r3, [r7, #12] 8014792: 3304 adds r3, #4 8014794: 4618 mov r0, r3 8014796: f7fc fd95 bl 80112c4 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 ); 801479a: 68fb ldr r3, [r7, #12] 801479c: 6a1b ldr r3, [r3, #32] 801479e: 68f8 ldr r0, [r7, #12] 80147a0: 4798 blx r3 if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 ) 80147a2: 68fb ldr r3, [r7, #12] 80147a4: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80147a8: f003 0304 and.w r3, r3, #4 80147ac: 2b00 cmp r3, #0 80147ae: d02f beq.n 8014810 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 ); 80147b0: 68fb ldr r3, [r7, #12] 80147b2: 699b ldr r3, [r3, #24] 80147b4: 693a ldr r2, [r7, #16] 80147b6: 4413 add r3, r2 80147b8: 60bb str r3, [r7, #8] if( xReloadTime > xNextExpireTime ) 80147ba: 68ba ldr r2, [r7, #8] 80147bc: 693b ldr r3, [r7, #16] 80147be: 429a cmp r2, r3 80147c0: d90e bls.n 80147e0 { listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xReloadTime ); 80147c2: 68fb ldr r3, [r7, #12] 80147c4: 68ba ldr r2, [r7, #8] 80147c6: 605a str r2, [r3, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 80147c8: 68fb ldr r3, [r7, #12] 80147ca: 68fa ldr r2, [r7, #12] 80147cc: 611a str r2, [r3, #16] vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 80147ce: 4b1a ldr r3, [pc, #104] @ (8014838 ) 80147d0: 681a ldr r2, [r3, #0] 80147d2: 68fb ldr r3, [r7, #12] 80147d4: 3304 adds r3, #4 80147d6: 4619 mov r1, r3 80147d8: 4610 mov r0, r2 80147da: f7fc fd3a bl 8011252 80147de: e017 b.n 8014810 } else { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 80147e0: 2300 movs r3, #0 80147e2: 9300 str r3, [sp, #0] 80147e4: 2300 movs r3, #0 80147e6: 693a ldr r2, [r7, #16] 80147e8: 2100 movs r1, #0 80147ea: 68f8 ldr r0, [r7, #12] 80147ec: f7ff fd58 bl 80142a0 80147f0: 6078 str r0, [r7, #4] configASSERT( xResult ); 80147f2: 687b ldr r3, [r7, #4] 80147f4: 2b00 cmp r3, #0 80147f6: d10b bne.n 8014810 __asm volatile 80147f8: f04f 0350 mov.w r3, #80 @ 0x50 80147fc: f383 8811 msr BASEPRI, r3 8014800: f3bf 8f6f isb sy 8014804: f3bf 8f4f dsb sy 8014808: 603b str r3, [r7, #0] } 801480a: bf00 nop 801480c: bf00 nop 801480e: e7fd b.n 801480c while( listLIST_IS_EMPTY( pxCurrentTimerList ) == pdFALSE ) 8014810: 4b09 ldr r3, [pc, #36] @ (8014838 ) 8014812: 681b ldr r3, [r3, #0] 8014814: 681b ldr r3, [r3, #0] 8014816: 2b00 cmp r3, #0 8014818: d1b0 bne.n 801477c { mtCOVERAGE_TEST_MARKER(); } } pxTemp = pxCurrentTimerList; 801481a: 4b07 ldr r3, [pc, #28] @ (8014838 ) 801481c: 681b ldr r3, [r3, #0] 801481e: 617b str r3, [r7, #20] pxCurrentTimerList = pxOverflowTimerList; 8014820: 4b06 ldr r3, [pc, #24] @ (801483c ) 8014822: 681b ldr r3, [r3, #0] 8014824: 4a04 ldr r2, [pc, #16] @ (8014838 ) 8014826: 6013 str r3, [r2, #0] pxOverflowTimerList = pxTemp; 8014828: 4a04 ldr r2, [pc, #16] @ (801483c ) 801482a: 697b ldr r3, [r7, #20] 801482c: 6013 str r3, [r2, #0] } 801482e: bf00 nop 8014830: 3718 adds r7, #24 8014832: 46bd mov sp, r7 8014834: bd80 pop {r7, pc} 8014836: bf00 nop 8014838: 240041b8 .word 0x240041b8 801483c: 240041bc .word 0x240041bc 08014840 : /*-----------------------------------------------------------*/ static void prvCheckForValidListAndQueue( void ) { 8014840: b580 push {r7, lr} 8014842: b082 sub sp, #8 8014844: 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(); 8014846: f000 f96f bl 8014b28 { if( xTimerQueue == NULL ) 801484a: 4b15 ldr r3, [pc, #84] @ (80148a0 ) 801484c: 681b ldr r3, [r3, #0] 801484e: 2b00 cmp r3, #0 8014850: d120 bne.n 8014894 { vListInitialise( &xActiveTimerList1 ); 8014852: 4814 ldr r0, [pc, #80] @ (80148a4 ) 8014854: f7fc fcac bl 80111b0 vListInitialise( &xActiveTimerList2 ); 8014858: 4813 ldr r0, [pc, #76] @ (80148a8 ) 801485a: f7fc fca9 bl 80111b0 pxCurrentTimerList = &xActiveTimerList1; 801485e: 4b13 ldr r3, [pc, #76] @ (80148ac ) 8014860: 4a10 ldr r2, [pc, #64] @ (80148a4 ) 8014862: 601a str r2, [r3, #0] pxOverflowTimerList = &xActiveTimerList2; 8014864: 4b12 ldr r3, [pc, #72] @ (80148b0 ) 8014866: 4a10 ldr r2, [pc, #64] @ (80148a8 ) 8014868: 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 ); 801486a: 2300 movs r3, #0 801486c: 9300 str r3, [sp, #0] 801486e: 4b11 ldr r3, [pc, #68] @ (80148b4 ) 8014870: 4a11 ldr r2, [pc, #68] @ (80148b8 ) 8014872: 2110 movs r1, #16 8014874: 200a movs r0, #10 8014876: f7fc fdb9 bl 80113ec 801487a: 4603 mov r3, r0 801487c: 4a08 ldr r2, [pc, #32] @ (80148a0 ) 801487e: 6013 str r3, [r2, #0] } #endif #if ( configQUEUE_REGISTRY_SIZE > 0 ) { if( xTimerQueue != NULL ) 8014880: 4b07 ldr r3, [pc, #28] @ (80148a0 ) 8014882: 681b ldr r3, [r3, #0] 8014884: 2b00 cmp r3, #0 8014886: d005 beq.n 8014894 { vQueueAddToRegistry( xTimerQueue, "TmrQ" ); 8014888: 4b05 ldr r3, [pc, #20] @ (80148a0 ) 801488a: 681b ldr r3, [r3, #0] 801488c: 490b ldr r1, [pc, #44] @ (80148bc ) 801488e: 4618 mov r0, r3 8014890: f7fd fddc bl 801244c else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 8014894: f000 f97a bl 8014b8c } 8014898: bf00 nop 801489a: 46bd mov sp, r7 801489c: bd80 pop {r7, pc} 801489e: bf00 nop 80148a0: 240041c0 .word 0x240041c0 80148a4: 24004190 .word 0x24004190 80148a8: 240041a4 .word 0x240041a4 80148ac: 240041b8 .word 0x240041b8 80148b0: 240041bc .word 0x240041bc 80148b4: 2400426c .word 0x2400426c 80148b8: 240041cc .word 0x240041cc 80148bc: 0802cb7c .word 0x0802cb7c 080148c0 : /* * See header file for description. */ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters ) { 80148c0: b480 push {r7} 80148c2: b085 sub sp, #20 80148c4: af00 add r7, sp, #0 80148c6: 60f8 str r0, [r7, #12] 80148c8: 60b9 str r1, [r7, #8] 80148ca: 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--; 80148cc: 68fb ldr r3, [r7, #12] 80148ce: 3b04 subs r3, #4 80148d0: 60fb str r3, [r7, #12] *pxTopOfStack = portINITIAL_XPSR; /* xPSR */ 80148d2: 68fb ldr r3, [r7, #12] 80148d4: f04f 7280 mov.w r2, #16777216 @ 0x1000000 80148d8: 601a str r2, [r3, #0] pxTopOfStack--; 80148da: 68fb ldr r3, [r7, #12] 80148dc: 3b04 subs r3, #4 80148de: 60fb str r3, [r7, #12] *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */ 80148e0: 68bb ldr r3, [r7, #8] 80148e2: f023 0201 bic.w r2, r3, #1 80148e6: 68fb ldr r3, [r7, #12] 80148e8: 601a str r2, [r3, #0] pxTopOfStack--; 80148ea: 68fb ldr r3, [r7, #12] 80148ec: 3b04 subs r3, #4 80148ee: 60fb str r3, [r7, #12] *pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */ 80148f0: 4a0c ldr r2, [pc, #48] @ (8014924 ) 80148f2: 68fb ldr r3, [r7, #12] 80148f4: 601a str r2, [r3, #0] /* Save code space by skipping register initialisation. */ pxTopOfStack -= 5; /* R12, R3, R2 and R1. */ 80148f6: 68fb ldr r3, [r7, #12] 80148f8: 3b14 subs r3, #20 80148fa: 60fb str r3, [r7, #12] *pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */ 80148fc: 687a ldr r2, [r7, #4] 80148fe: 68fb ldr r3, [r7, #12] 8014900: 601a str r2, [r3, #0] /* A save method is being used that requires each task to maintain its own exec return value. */ pxTopOfStack--; 8014902: 68fb ldr r3, [r7, #12] 8014904: 3b04 subs r3, #4 8014906: 60fb str r3, [r7, #12] *pxTopOfStack = portINITIAL_EXC_RETURN; 8014908: 68fb ldr r3, [r7, #12] 801490a: f06f 0202 mvn.w r2, #2 801490e: 601a str r2, [r3, #0] pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */ 8014910: 68fb ldr r3, [r7, #12] 8014912: 3b20 subs r3, #32 8014914: 60fb str r3, [r7, #12] return pxTopOfStack; 8014916: 68fb ldr r3, [r7, #12] } 8014918: 4618 mov r0, r3 801491a: 3714 adds r7, #20 801491c: 46bd mov sp, r7 801491e: f85d 7b04 ldr.w r7, [sp], #4 8014922: 4770 bx lr 8014924: 08014929 .word 0x08014929 08014928 : /*-----------------------------------------------------------*/ static void prvTaskExitError( void ) { 8014928: b480 push {r7} 801492a: b085 sub sp, #20 801492c: af00 add r7, sp, #0 volatile uint32_t ulDummy = 0; 801492e: 2300 movs r3, #0 8014930: 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 ); 8014932: 4b13 ldr r3, [pc, #76] @ (8014980 ) 8014934: 681b ldr r3, [r3, #0] 8014936: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 801493a: d00b beq.n 8014954 __asm volatile 801493c: f04f 0350 mov.w r3, #80 @ 0x50 8014940: f383 8811 msr BASEPRI, r3 8014944: f3bf 8f6f isb sy 8014948: f3bf 8f4f dsb sy 801494c: 60fb str r3, [r7, #12] } 801494e: bf00 nop 8014950: bf00 nop 8014952: e7fd b.n 8014950 __asm volatile 8014954: f04f 0350 mov.w r3, #80 @ 0x50 8014958: f383 8811 msr BASEPRI, r3 801495c: f3bf 8f6f isb sy 8014960: f3bf 8f4f dsb sy 8014964: 60bb str r3, [r7, #8] } 8014966: bf00 nop portDISABLE_INTERRUPTS(); while( ulDummy == 0 ) 8014968: bf00 nop 801496a: 687b ldr r3, [r7, #4] 801496c: 2b00 cmp r3, #0 801496e: d0fc beq.n 801496a 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. */ } } 8014970: bf00 nop 8014972: bf00 nop 8014974: 3714 adds r7, #20 8014976: 46bd mov sp, r7 8014978: f85d 7b04 ldr.w r7, [sp], #4 801497c: 4770 bx lr 801497e: bf00 nop 8014980: 24000048 .word 0x24000048 ... 08014990 : /*-----------------------------------------------------------*/ void vPortSVCHandler( void ) { __asm volatile ( 8014990: 4b07 ldr r3, [pc, #28] @ (80149b0 ) 8014992: 6819 ldr r1, [r3, #0] 8014994: 6808 ldr r0, [r1, #0] 8014996: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 801499a: f380 8809 msr PSP, r0 801499e: f3bf 8f6f isb sy 80149a2: f04f 0000 mov.w r0, #0 80149a6: f380 8811 msr BASEPRI, r0 80149aa: 4770 bx lr 80149ac: f3af 8000 nop.w 080149b0 : 80149b0: 24003c90 .word 0x24003c90 " bx r14 \n" " \n" " .align 4 \n" "pxCurrentTCBConst2: .word pxCurrentTCB \n" ); } 80149b4: bf00 nop 80149b6: bf00 nop 080149b8 : { /* 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( 80149b8: 4808 ldr r0, [pc, #32] @ (80149dc ) 80149ba: 6800 ldr r0, [r0, #0] 80149bc: 6800 ldr r0, [r0, #0] 80149be: f380 8808 msr MSP, r0 80149c2: f04f 0000 mov.w r0, #0 80149c6: f380 8814 msr CONTROL, r0 80149ca: b662 cpsie i 80149cc: b661 cpsie f 80149ce: f3bf 8f4f dsb sy 80149d2: f3bf 8f6f isb sy 80149d6: df00 svc 0 80149d8: bf00 nop " dsb \n" " isb \n" " svc 0 \n" /* System call to start first task. */ " nop \n" ); } 80149da: bf00 nop 80149dc: e000ed08 .word 0xe000ed08 080149e0 : /* * See header file for description. */ BaseType_t xPortStartScheduler( void ) { 80149e0: b580 push {r7, lr} 80149e2: b086 sub sp, #24 80149e4: 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 ); 80149e6: 4b47 ldr r3, [pc, #284] @ (8014b04 ) 80149e8: 681b ldr r3, [r3, #0] 80149ea: 4a47 ldr r2, [pc, #284] @ (8014b08 ) 80149ec: 4293 cmp r3, r2 80149ee: d10b bne.n 8014a08 __asm volatile 80149f0: f04f 0350 mov.w r3, #80 @ 0x50 80149f4: f383 8811 msr BASEPRI, r3 80149f8: f3bf 8f6f isb sy 80149fc: f3bf 8f4f dsb sy 8014a00: 613b str r3, [r7, #16] } 8014a02: bf00 nop 8014a04: bf00 nop 8014a06: e7fd b.n 8014a04 configASSERT( portCPUID != portCORTEX_M7_r0p0_ID ); 8014a08: 4b3e ldr r3, [pc, #248] @ (8014b04 ) 8014a0a: 681b ldr r3, [r3, #0] 8014a0c: 4a3f ldr r2, [pc, #252] @ (8014b0c ) 8014a0e: 4293 cmp r3, r2 8014a10: d10b bne.n 8014a2a __asm volatile 8014a12: f04f 0350 mov.w r3, #80 @ 0x50 8014a16: f383 8811 msr BASEPRI, r3 8014a1a: f3bf 8f6f isb sy 8014a1e: f3bf 8f4f dsb sy 8014a22: 60fb str r3, [r7, #12] } 8014a24: bf00 nop 8014a26: bf00 nop 8014a28: e7fd b.n 8014a26 #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 ); 8014a2a: 4b39 ldr r3, [pc, #228] @ (8014b10 ) 8014a2c: 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; 8014a2e: 697b ldr r3, [r7, #20] 8014a30: 781b ldrb r3, [r3, #0] 8014a32: b2db uxtb r3, r3 8014a34: 607b str r3, [r7, #4] /* Determine the number of priority bits available. First write to all possible bits. */ *pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE; 8014a36: 697b ldr r3, [r7, #20] 8014a38: 22ff movs r2, #255 @ 0xff 8014a3a: 701a strb r2, [r3, #0] /* Read the value back to see how many bits stuck. */ ucMaxPriorityValue = *pucFirstUserPriorityRegister; 8014a3c: 697b ldr r3, [r7, #20] 8014a3e: 781b ldrb r3, [r3, #0] 8014a40: b2db uxtb r3, r3 8014a42: 70fb strb r3, [r7, #3] /* Use the same mask on the maximum system call priority. */ ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue; 8014a44: 78fb ldrb r3, [r7, #3] 8014a46: b2db uxtb r3, r3 8014a48: f003 0350 and.w r3, r3, #80 @ 0x50 8014a4c: b2da uxtb r2, r3 8014a4e: 4b31 ldr r3, [pc, #196] @ (8014b14 ) 8014a50: 701a strb r2, [r3, #0] /* Calculate the maximum acceptable priority group value for the number of bits read back. */ ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS; 8014a52: 4b31 ldr r3, [pc, #196] @ (8014b18 ) 8014a54: 2207 movs r2, #7 8014a56: 601a str r2, [r3, #0] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 8014a58: e009 b.n 8014a6e { ulMaxPRIGROUPValue--; 8014a5a: 4b2f ldr r3, [pc, #188] @ (8014b18 ) 8014a5c: 681b ldr r3, [r3, #0] 8014a5e: 3b01 subs r3, #1 8014a60: 4a2d ldr r2, [pc, #180] @ (8014b18 ) 8014a62: 6013 str r3, [r2, #0] ucMaxPriorityValue <<= ( uint8_t ) 0x01; 8014a64: 78fb ldrb r3, [r7, #3] 8014a66: b2db uxtb r3, r3 8014a68: 005b lsls r3, r3, #1 8014a6a: b2db uxtb r3, r3 8014a6c: 70fb strb r3, [r7, #3] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 8014a6e: 78fb ldrb r3, [r7, #3] 8014a70: b2db uxtb r3, r3 8014a72: f003 0380 and.w r3, r3, #128 @ 0x80 8014a76: 2b80 cmp r3, #128 @ 0x80 8014a78: d0ef beq.n 8014a5a #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 ); 8014a7a: 4b27 ldr r3, [pc, #156] @ (8014b18 ) 8014a7c: 681b ldr r3, [r3, #0] 8014a7e: f1c3 0307 rsb r3, r3, #7 8014a82: 2b04 cmp r3, #4 8014a84: d00b beq.n 8014a9e __asm volatile 8014a86: f04f 0350 mov.w r3, #80 @ 0x50 8014a8a: f383 8811 msr BASEPRI, r3 8014a8e: f3bf 8f6f isb sy 8014a92: f3bf 8f4f dsb sy 8014a96: 60bb str r3, [r7, #8] } 8014a98: bf00 nop 8014a9a: bf00 nop 8014a9c: e7fd b.n 8014a9a } #endif /* Shift the priority group value back to its position within the AIRCR register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; 8014a9e: 4b1e ldr r3, [pc, #120] @ (8014b18 ) 8014aa0: 681b ldr r3, [r3, #0] 8014aa2: 021b lsls r3, r3, #8 8014aa4: 4a1c ldr r2, [pc, #112] @ (8014b18 ) 8014aa6: 6013 str r3, [r2, #0] ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 8014aa8: 4b1b ldr r3, [pc, #108] @ (8014b18 ) 8014aaa: 681b ldr r3, [r3, #0] 8014aac: f403 63e0 and.w r3, r3, #1792 @ 0x700 8014ab0: 4a19 ldr r2, [pc, #100] @ (8014b18 ) 8014ab2: 6013 str r3, [r2, #0] /* Restore the clobbered interrupt priority register to its original value. */ *pucFirstUserPriorityRegister = ulOriginalPriority; 8014ab4: 687b ldr r3, [r7, #4] 8014ab6: b2da uxtb r2, r3 8014ab8: 697b ldr r3, [r7, #20] 8014aba: 701a strb r2, [r3, #0] } #endif /* conifgASSERT_DEFINED */ /* Make PendSV and SysTick the lowest priority interrupts. */ portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI; 8014abc: 4b17 ldr r3, [pc, #92] @ (8014b1c ) 8014abe: 681b ldr r3, [r3, #0] 8014ac0: 4a16 ldr r2, [pc, #88] @ (8014b1c ) 8014ac2: f443 0370 orr.w r3, r3, #15728640 @ 0xf00000 8014ac6: 6013 str r3, [r2, #0] portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI; 8014ac8: 4b14 ldr r3, [pc, #80] @ (8014b1c ) 8014aca: 681b ldr r3, [r3, #0] 8014acc: 4a13 ldr r2, [pc, #76] @ (8014b1c ) 8014ace: f043 4370 orr.w r3, r3, #4026531840 @ 0xf0000000 8014ad2: 6013 str r3, [r2, #0] /* Start the timer that generates the tick ISR. Interrupts are disabled here already. */ vPortSetupTimerInterrupt(); 8014ad4: f000 f8da bl 8014c8c /* Initialise the critical nesting count ready for the first task. */ uxCriticalNesting = 0; 8014ad8: 4b11 ldr r3, [pc, #68] @ (8014b20 ) 8014ada: 2200 movs r2, #0 8014adc: 601a str r2, [r3, #0] /* Ensure the VFP is enabled - it should be anyway. */ vPortEnableVFP(); 8014ade: f000 f8f9 bl 8014cd4 /* Lazy save always. */ *( portFPCCR ) |= portASPEN_AND_LSPEN_BITS; 8014ae2: 4b10 ldr r3, [pc, #64] @ (8014b24 ) 8014ae4: 681b ldr r3, [r3, #0] 8014ae6: 4a0f ldr r2, [pc, #60] @ (8014b24 ) 8014ae8: f043 4340 orr.w r3, r3, #3221225472 @ 0xc0000000 8014aec: 6013 str r3, [r2, #0] /* Start the first task. */ prvPortStartFirstTask(); 8014aee: f7ff ff63 bl 80149b8 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(); 8014af2: f7fe fcb7 bl 8013464 prvTaskExitError(); 8014af6: f7ff ff17 bl 8014928 /* Should not get here! */ return 0; 8014afa: 2300 movs r3, #0 } 8014afc: 4618 mov r0, r3 8014afe: 3718 adds r7, #24 8014b00: 46bd mov sp, r7 8014b02: bd80 pop {r7, pc} 8014b04: e000ed00 .word 0xe000ed00 8014b08: 410fc271 .word 0x410fc271 8014b0c: 410fc270 .word 0x410fc270 8014b10: e000e400 .word 0xe000e400 8014b14: 240042bc .word 0x240042bc 8014b18: 240042c0 .word 0x240042c0 8014b1c: e000ed20 .word 0xe000ed20 8014b20: 24000048 .word 0x24000048 8014b24: e000ef34 .word 0xe000ef34 08014b28 : configASSERT( uxCriticalNesting == 1000UL ); } /*-----------------------------------------------------------*/ void vPortEnterCritical( void ) { 8014b28: b480 push {r7} 8014b2a: b083 sub sp, #12 8014b2c: af00 add r7, sp, #0 __asm volatile 8014b2e: f04f 0350 mov.w r3, #80 @ 0x50 8014b32: f383 8811 msr BASEPRI, r3 8014b36: f3bf 8f6f isb sy 8014b3a: f3bf 8f4f dsb sy 8014b3e: 607b str r3, [r7, #4] } 8014b40: bf00 nop portDISABLE_INTERRUPTS(); uxCriticalNesting++; 8014b42: 4b10 ldr r3, [pc, #64] @ (8014b84 ) 8014b44: 681b ldr r3, [r3, #0] 8014b46: 3301 adds r3, #1 8014b48: 4a0e ldr r2, [pc, #56] @ (8014b84 ) 8014b4a: 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 ) 8014b4c: 4b0d ldr r3, [pc, #52] @ (8014b84 ) 8014b4e: 681b ldr r3, [r3, #0] 8014b50: 2b01 cmp r3, #1 8014b52: d110 bne.n 8014b76 { configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 ); 8014b54: 4b0c ldr r3, [pc, #48] @ (8014b88 ) 8014b56: 681b ldr r3, [r3, #0] 8014b58: b2db uxtb r3, r3 8014b5a: 2b00 cmp r3, #0 8014b5c: d00b beq.n 8014b76 __asm volatile 8014b5e: f04f 0350 mov.w r3, #80 @ 0x50 8014b62: f383 8811 msr BASEPRI, r3 8014b66: f3bf 8f6f isb sy 8014b6a: f3bf 8f4f dsb sy 8014b6e: 603b str r3, [r7, #0] } 8014b70: bf00 nop 8014b72: bf00 nop 8014b74: e7fd b.n 8014b72 } } 8014b76: bf00 nop 8014b78: 370c adds r7, #12 8014b7a: 46bd mov sp, r7 8014b7c: f85d 7b04 ldr.w r7, [sp], #4 8014b80: 4770 bx lr 8014b82: bf00 nop 8014b84: 24000048 .word 0x24000048 8014b88: e000ed04 .word 0xe000ed04 08014b8c : /*-----------------------------------------------------------*/ void vPortExitCritical( void ) { 8014b8c: b480 push {r7} 8014b8e: b083 sub sp, #12 8014b90: af00 add r7, sp, #0 configASSERT( uxCriticalNesting ); 8014b92: 4b12 ldr r3, [pc, #72] @ (8014bdc ) 8014b94: 681b ldr r3, [r3, #0] 8014b96: 2b00 cmp r3, #0 8014b98: d10b bne.n 8014bb2 __asm volatile 8014b9a: f04f 0350 mov.w r3, #80 @ 0x50 8014b9e: f383 8811 msr BASEPRI, r3 8014ba2: f3bf 8f6f isb sy 8014ba6: f3bf 8f4f dsb sy 8014baa: 607b str r3, [r7, #4] } 8014bac: bf00 nop 8014bae: bf00 nop 8014bb0: e7fd b.n 8014bae uxCriticalNesting--; 8014bb2: 4b0a ldr r3, [pc, #40] @ (8014bdc ) 8014bb4: 681b ldr r3, [r3, #0] 8014bb6: 3b01 subs r3, #1 8014bb8: 4a08 ldr r2, [pc, #32] @ (8014bdc ) 8014bba: 6013 str r3, [r2, #0] if( uxCriticalNesting == 0 ) 8014bbc: 4b07 ldr r3, [pc, #28] @ (8014bdc ) 8014bbe: 681b ldr r3, [r3, #0] 8014bc0: 2b00 cmp r3, #0 8014bc2: d105 bne.n 8014bd0 8014bc4: 2300 movs r3, #0 8014bc6: 603b str r3, [r7, #0] __asm volatile 8014bc8: 683b ldr r3, [r7, #0] 8014bca: f383 8811 msr BASEPRI, r3 } 8014bce: bf00 nop { portENABLE_INTERRUPTS(); } } 8014bd0: bf00 nop 8014bd2: 370c adds r7, #12 8014bd4: 46bd mov sp, r7 8014bd6: f85d 7b04 ldr.w r7, [sp], #4 8014bda: 4770 bx lr 8014bdc: 24000048 .word 0x24000048 08014be0 : void xPortPendSVHandler( void ) { /* This is a naked function. */ __asm volatile 8014be0: f3ef 8009 mrs r0, PSP 8014be4: f3bf 8f6f isb sy 8014be8: 4b15 ldr r3, [pc, #84] @ (8014c40 ) 8014bea: 681a ldr r2, [r3, #0] 8014bec: f01e 0f10 tst.w lr, #16 8014bf0: bf08 it eq 8014bf2: ed20 8a10 vstmdbeq r0!, {s16-s31} 8014bf6: e920 4ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8014bfa: 6010 str r0, [r2, #0] 8014bfc: e92d 0009 stmdb sp!, {r0, r3} 8014c00: f04f 0050 mov.w r0, #80 @ 0x50 8014c04: f380 8811 msr BASEPRI, r0 8014c08: f3bf 8f4f dsb sy 8014c0c: f3bf 8f6f isb sy 8014c10: f7fe fc28 bl 8013464 8014c14: f04f 0000 mov.w r0, #0 8014c18: f380 8811 msr BASEPRI, r0 8014c1c: bc09 pop {r0, r3} 8014c1e: 6819 ldr r1, [r3, #0] 8014c20: 6808 ldr r0, [r1, #0] 8014c22: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8014c26: f01e 0f10 tst.w lr, #16 8014c2a: bf08 it eq 8014c2c: ecb0 8a10 vldmiaeq r0!, {s16-s31} 8014c30: f380 8809 msr PSP, r0 8014c34: f3bf 8f6f isb sy 8014c38: 4770 bx lr 8014c3a: bf00 nop 8014c3c: f3af 8000 nop.w 08014c40 : 8014c40: 24003c90 .word 0x24003c90 " \n" " .align 4 \n" "pxCurrentTCBConst: .word pxCurrentTCB \n" ::"i"(configMAX_SYSCALL_INTERRUPT_PRIORITY) ); } 8014c44: bf00 nop 8014c46: bf00 nop 08014c48 : /*-----------------------------------------------------------*/ void xPortSysTickHandler( void ) { 8014c48: b580 push {r7, lr} 8014c4a: b082 sub sp, #8 8014c4c: af00 add r7, sp, #0 __asm volatile 8014c4e: f04f 0350 mov.w r3, #80 @ 0x50 8014c52: f383 8811 msr BASEPRI, r3 8014c56: f3bf 8f6f isb sy 8014c5a: f3bf 8f4f dsb sy 8014c5e: 607b str r3, [r7, #4] } 8014c60: 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 ) 8014c62: f7fe fb45 bl 80132f0 8014c66: 4603 mov r3, r0 8014c68: 2b00 cmp r3, #0 8014c6a: d003 beq.n 8014c74 { /* A context switch is required. Context switching is performed in the PendSV interrupt. Pend the PendSV interrupt. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 8014c6c: 4b06 ldr r3, [pc, #24] @ (8014c88 ) 8014c6e: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8014c72: 601a str r2, [r3, #0] 8014c74: 2300 movs r3, #0 8014c76: 603b str r3, [r7, #0] __asm volatile 8014c78: 683b ldr r3, [r7, #0] 8014c7a: f383 8811 msr BASEPRI, r3 } 8014c7e: bf00 nop } } portENABLE_INTERRUPTS(); } 8014c80: bf00 nop 8014c82: 3708 adds r7, #8 8014c84: 46bd mov sp, r7 8014c86: bd80 pop {r7, pc} 8014c88: e000ed04 .word 0xe000ed04 08014c8c : /* * Setup the systick timer to generate the tick interrupts at the required * frequency. */ __attribute__(( weak )) void vPortSetupTimerInterrupt( void ) { 8014c8c: b480 push {r7} 8014c8e: 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; 8014c90: 4b0b ldr r3, [pc, #44] @ (8014cc0 ) 8014c92: 2200 movs r2, #0 8014c94: 601a str r2, [r3, #0] portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL; 8014c96: 4b0b ldr r3, [pc, #44] @ (8014cc4 ) 8014c98: 2200 movs r2, #0 8014c9a: 601a str r2, [r3, #0] /* Configure SysTick to interrupt at the requested rate. */ portNVIC_SYSTICK_LOAD_REG = ( configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL; 8014c9c: 4b0a ldr r3, [pc, #40] @ (8014cc8 ) 8014c9e: 681b ldr r3, [r3, #0] 8014ca0: 4a0a ldr r2, [pc, #40] @ (8014ccc ) 8014ca2: fba2 2303 umull r2, r3, r2, r3 8014ca6: 099b lsrs r3, r3, #6 8014ca8: 4a09 ldr r2, [pc, #36] @ (8014cd0 ) 8014caa: 3b01 subs r3, #1 8014cac: 6013 str r3, [r2, #0] portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT ); 8014cae: 4b04 ldr r3, [pc, #16] @ (8014cc0 ) 8014cb0: 2207 movs r2, #7 8014cb2: 601a str r2, [r3, #0] } 8014cb4: bf00 nop 8014cb6: 46bd mov sp, r7 8014cb8: f85d 7b04 ldr.w r7, [sp], #4 8014cbc: 4770 bx lr 8014cbe: bf00 nop 8014cc0: e000e010 .word 0xe000e010 8014cc4: e000e018 .word 0xe000e018 8014cc8: 2400000c .word 0x2400000c 8014ccc: 10624dd3 .word 0x10624dd3 8014cd0: e000e014 .word 0xe000e014 08014cd4 : /*-----------------------------------------------------------*/ /* This is a naked function. */ static void vPortEnableVFP( void ) { __asm volatile 8014cd4: f8df 000c ldr.w r0, [pc, #12] @ 8014ce4 8014cd8: 6801 ldr r1, [r0, #0] 8014cda: f441 0170 orr.w r1, r1, #15728640 @ 0xf00000 8014cde: 6001 str r1, [r0, #0] 8014ce0: 4770 bx lr " \n" " orr r1, r1, #( 0xf << 20 ) \n" /* Enable CP10 and CP11 coprocessors, then save back. */ " str r1, [r0] \n" " bx r14 " ); } 8014ce2: bf00 nop 8014ce4: e000ed88 .word 0xe000ed88 08014ce8 : /*-----------------------------------------------------------*/ #if( configASSERT_DEFINED == 1 ) void vPortValidateInterruptPriority( void ) { 8014ce8: b480 push {r7} 8014cea: b085 sub sp, #20 8014cec: 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" ); 8014cee: f3ef 8305 mrs r3, IPSR 8014cf2: 60fb str r3, [r7, #12] /* Is the interrupt number a user defined interrupt? */ if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER ) 8014cf4: 68fb ldr r3, [r7, #12] 8014cf6: 2b0f cmp r3, #15 8014cf8: d915 bls.n 8014d26 { /* Look up the interrupt's priority. */ ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ]; 8014cfa: 4a18 ldr r2, [pc, #96] @ (8014d5c ) 8014cfc: 68fb ldr r3, [r7, #12] 8014cfe: 4413 add r3, r2 8014d00: 781b ldrb r3, [r3, #0] 8014d02: 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 ); 8014d04: 4b16 ldr r3, [pc, #88] @ (8014d60 ) 8014d06: 781b ldrb r3, [r3, #0] 8014d08: 7afa ldrb r2, [r7, #11] 8014d0a: 429a cmp r2, r3 8014d0c: d20b bcs.n 8014d26 __asm volatile 8014d0e: f04f 0350 mov.w r3, #80 @ 0x50 8014d12: f383 8811 msr BASEPRI, r3 8014d16: f3bf 8f6f isb sy 8014d1a: f3bf 8f4f dsb sy 8014d1e: 607b str r3, [r7, #4] } 8014d20: bf00 nop 8014d22: bf00 nop 8014d24: e7fd b.n 8014d22 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 ); 8014d26: 4b0f ldr r3, [pc, #60] @ (8014d64 ) 8014d28: 681b ldr r3, [r3, #0] 8014d2a: f403 62e0 and.w r2, r3, #1792 @ 0x700 8014d2e: 4b0e ldr r3, [pc, #56] @ (8014d68 ) 8014d30: 681b ldr r3, [r3, #0] 8014d32: 429a cmp r2, r3 8014d34: d90b bls.n 8014d4e __asm volatile 8014d36: f04f 0350 mov.w r3, #80 @ 0x50 8014d3a: f383 8811 msr BASEPRI, r3 8014d3e: f3bf 8f6f isb sy 8014d42: f3bf 8f4f dsb sy 8014d46: 603b str r3, [r7, #0] } 8014d48: bf00 nop 8014d4a: bf00 nop 8014d4c: e7fd b.n 8014d4a } 8014d4e: bf00 nop 8014d50: 3714 adds r7, #20 8014d52: 46bd mov sp, r7 8014d54: f85d 7b04 ldr.w r7, [sp], #4 8014d58: 4770 bx lr 8014d5a: bf00 nop 8014d5c: e000e3f0 .word 0xe000e3f0 8014d60: 240042bc .word 0x240042bc 8014d64: e000ed0c .word 0xe000ed0c 8014d68: 240042c0 .word 0x240042c0 08014d6c : static size_t xBlockAllocatedBit = 0; /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { 8014d6c: b580 push {r7, lr} 8014d6e: b08a sub sp, #40 @ 0x28 8014d70: af00 add r7, sp, #0 8014d72: 6078 str r0, [r7, #4] BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; 8014d74: 2300 movs r3, #0 8014d76: 61fb str r3, [r7, #28] vTaskSuspendAll(); 8014d78: f7fe f9ec bl 8013154 { /* If this is the first call to malloc then the heap will require initialisation to setup the list of free blocks. */ if( pxEnd == NULL ) 8014d7c: 4b5c ldr r3, [pc, #368] @ (8014ef0 ) 8014d7e: 681b ldr r3, [r3, #0] 8014d80: 2b00 cmp r3, #0 8014d82: d101 bne.n 8014d88 { prvHeapInit(); 8014d84: f000 f924 bl 8014fd0 /* 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 ) 8014d88: 4b5a ldr r3, [pc, #360] @ (8014ef4 ) 8014d8a: 681a ldr r2, [r3, #0] 8014d8c: 687b ldr r3, [r7, #4] 8014d8e: 4013 ands r3, r2 8014d90: 2b00 cmp r3, #0 8014d92: f040 8095 bne.w 8014ec0 { /* The wanted size is increased so it can contain a BlockLink_t structure in addition to the requested amount of bytes. */ if( xWantedSize > 0 ) 8014d96: 687b ldr r3, [r7, #4] 8014d98: 2b00 cmp r3, #0 8014d9a: d01e beq.n 8014dda { xWantedSize += xHeapStructSize; 8014d9c: 2208 movs r2, #8 8014d9e: 687b ldr r3, [r7, #4] 8014da0: 4413 add r3, r2 8014da2: 607b str r3, [r7, #4] /* Ensure that blocks are always aligned to the required number of bytes. */ if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 ) 8014da4: 687b ldr r3, [r7, #4] 8014da6: f003 0307 and.w r3, r3, #7 8014daa: 2b00 cmp r3, #0 8014dac: d015 beq.n 8014dda { /* Byte alignment required. */ xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) ); 8014dae: 687b ldr r3, [r7, #4] 8014db0: f023 0307 bic.w r3, r3, #7 8014db4: 3308 adds r3, #8 8014db6: 607b str r3, [r7, #4] configASSERT( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) == 0 ); 8014db8: 687b ldr r3, [r7, #4] 8014dba: f003 0307 and.w r3, r3, #7 8014dbe: 2b00 cmp r3, #0 8014dc0: d00b beq.n 8014dda __asm volatile 8014dc2: f04f 0350 mov.w r3, #80 @ 0x50 8014dc6: f383 8811 msr BASEPRI, r3 8014dca: f3bf 8f6f isb sy 8014dce: f3bf 8f4f dsb sy 8014dd2: 617b str r3, [r7, #20] } 8014dd4: bf00 nop 8014dd6: bf00 nop 8014dd8: e7fd b.n 8014dd6 else { mtCOVERAGE_TEST_MARKER(); } if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) 8014dda: 687b ldr r3, [r7, #4] 8014ddc: 2b00 cmp r3, #0 8014dde: d06f beq.n 8014ec0 8014de0: 4b45 ldr r3, [pc, #276] @ (8014ef8 ) 8014de2: 681b ldr r3, [r3, #0] 8014de4: 687a ldr r2, [r7, #4] 8014de6: 429a cmp r2, r3 8014de8: d86a bhi.n 8014ec0 { /* Traverse the list from the start (lowest address) block until one of adequate size is found. */ pxPreviousBlock = &xStart; 8014dea: 4b44 ldr r3, [pc, #272] @ (8014efc ) 8014dec: 623b str r3, [r7, #32] pxBlock = xStart.pxNextFreeBlock; 8014dee: 4b43 ldr r3, [pc, #268] @ (8014efc ) 8014df0: 681b ldr r3, [r3, #0] 8014df2: 627b str r3, [r7, #36] @ 0x24 while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 8014df4: e004 b.n 8014e00 { pxPreviousBlock = pxBlock; 8014df6: 6a7b ldr r3, [r7, #36] @ 0x24 8014df8: 623b str r3, [r7, #32] pxBlock = pxBlock->pxNextFreeBlock; 8014dfa: 6a7b ldr r3, [r7, #36] @ 0x24 8014dfc: 681b ldr r3, [r3, #0] 8014dfe: 627b str r3, [r7, #36] @ 0x24 while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 8014e00: 6a7b ldr r3, [r7, #36] @ 0x24 8014e02: 685b ldr r3, [r3, #4] 8014e04: 687a ldr r2, [r7, #4] 8014e06: 429a cmp r2, r3 8014e08: d903 bls.n 8014e12 8014e0a: 6a7b ldr r3, [r7, #36] @ 0x24 8014e0c: 681b ldr r3, [r3, #0] 8014e0e: 2b00 cmp r3, #0 8014e10: d1f1 bne.n 8014df6 } /* If the end marker was reached then a block of adequate size was not found. */ if( pxBlock != pxEnd ) 8014e12: 4b37 ldr r3, [pc, #220] @ (8014ef0 ) 8014e14: 681b ldr r3, [r3, #0] 8014e16: 6a7a ldr r2, [r7, #36] @ 0x24 8014e18: 429a cmp r2, r3 8014e1a: d051 beq.n 8014ec0 { /* Return the memory space pointed to - jumping over the BlockLink_t structure at its start. */ pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize ); 8014e1c: 6a3b ldr r3, [r7, #32] 8014e1e: 681b ldr r3, [r3, #0] 8014e20: 2208 movs r2, #8 8014e22: 4413 add r3, r2 8014e24: 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; 8014e26: 6a7b ldr r3, [r7, #36] @ 0x24 8014e28: 681a ldr r2, [r3, #0] 8014e2a: 6a3b ldr r3, [r7, #32] 8014e2c: 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 ) 8014e2e: 6a7b ldr r3, [r7, #36] @ 0x24 8014e30: 685a ldr r2, [r3, #4] 8014e32: 687b ldr r3, [r7, #4] 8014e34: 1ad2 subs r2, r2, r3 8014e36: 2308 movs r3, #8 8014e38: 005b lsls r3, r3, #1 8014e3a: 429a cmp r2, r3 8014e3c: d920 bls.n 8014e80 { /* 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 ); 8014e3e: 6a7a ldr r2, [r7, #36] @ 0x24 8014e40: 687b ldr r3, [r7, #4] 8014e42: 4413 add r3, r2 8014e44: 61bb str r3, [r7, #24] configASSERT( ( ( ( size_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 8014e46: 69bb ldr r3, [r7, #24] 8014e48: f003 0307 and.w r3, r3, #7 8014e4c: 2b00 cmp r3, #0 8014e4e: d00b beq.n 8014e68 __asm volatile 8014e50: f04f 0350 mov.w r3, #80 @ 0x50 8014e54: f383 8811 msr BASEPRI, r3 8014e58: f3bf 8f6f isb sy 8014e5c: f3bf 8f4f dsb sy 8014e60: 613b str r3, [r7, #16] } 8014e62: bf00 nop 8014e64: bf00 nop 8014e66: e7fd b.n 8014e64 /* Calculate the sizes of two blocks split from the single block. */ pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; 8014e68: 6a7b ldr r3, [r7, #36] @ 0x24 8014e6a: 685a ldr r2, [r3, #4] 8014e6c: 687b ldr r3, [r7, #4] 8014e6e: 1ad2 subs r2, r2, r3 8014e70: 69bb ldr r3, [r7, #24] 8014e72: 605a str r2, [r3, #4] pxBlock->xBlockSize = xWantedSize; 8014e74: 6a7b ldr r3, [r7, #36] @ 0x24 8014e76: 687a ldr r2, [r7, #4] 8014e78: 605a str r2, [r3, #4] /* Insert the new block into the list of free blocks. */ prvInsertBlockIntoFreeList( pxNewBlockLink ); 8014e7a: 69b8 ldr r0, [r7, #24] 8014e7c: f000 f90a bl 8015094 else { mtCOVERAGE_TEST_MARKER(); } xFreeBytesRemaining -= pxBlock->xBlockSize; 8014e80: 4b1d ldr r3, [pc, #116] @ (8014ef8 ) 8014e82: 681a ldr r2, [r3, #0] 8014e84: 6a7b ldr r3, [r7, #36] @ 0x24 8014e86: 685b ldr r3, [r3, #4] 8014e88: 1ad3 subs r3, r2, r3 8014e8a: 4a1b ldr r2, [pc, #108] @ (8014ef8 ) 8014e8c: 6013 str r3, [r2, #0] if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining ) 8014e8e: 4b1a ldr r3, [pc, #104] @ (8014ef8 ) 8014e90: 681a ldr r2, [r3, #0] 8014e92: 4b1b ldr r3, [pc, #108] @ (8014f00 ) 8014e94: 681b ldr r3, [r3, #0] 8014e96: 429a cmp r2, r3 8014e98: d203 bcs.n 8014ea2 { xMinimumEverFreeBytesRemaining = xFreeBytesRemaining; 8014e9a: 4b17 ldr r3, [pc, #92] @ (8014ef8 ) 8014e9c: 681b ldr r3, [r3, #0] 8014e9e: 4a18 ldr r2, [pc, #96] @ (8014f00 ) 8014ea0: 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; 8014ea2: 6a7b ldr r3, [r7, #36] @ 0x24 8014ea4: 685a ldr r2, [r3, #4] 8014ea6: 4b13 ldr r3, [pc, #76] @ (8014ef4 ) 8014ea8: 681b ldr r3, [r3, #0] 8014eaa: 431a orrs r2, r3 8014eac: 6a7b ldr r3, [r7, #36] @ 0x24 8014eae: 605a str r2, [r3, #4] pxBlock->pxNextFreeBlock = NULL; 8014eb0: 6a7b ldr r3, [r7, #36] @ 0x24 8014eb2: 2200 movs r2, #0 8014eb4: 601a str r2, [r3, #0] xNumberOfSuccessfulAllocations++; 8014eb6: 4b13 ldr r3, [pc, #76] @ (8014f04 ) 8014eb8: 681b ldr r3, [r3, #0] 8014eba: 3301 adds r3, #1 8014ebc: 4a11 ldr r2, [pc, #68] @ (8014f04 ) 8014ebe: 6013 str r3, [r2, #0] mtCOVERAGE_TEST_MARKER(); } traceMALLOC( pvReturn, xWantedSize ); } ( void ) xTaskResumeAll(); 8014ec0: f7fe f956 bl 8013170 mtCOVERAGE_TEST_MARKER(); } } #endif configASSERT( ( ( ( size_t ) pvReturn ) & ( size_t ) portBYTE_ALIGNMENT_MASK ) == 0 ); 8014ec4: 69fb ldr r3, [r7, #28] 8014ec6: f003 0307 and.w r3, r3, #7 8014eca: 2b00 cmp r3, #0 8014ecc: d00b beq.n 8014ee6 __asm volatile 8014ece: f04f 0350 mov.w r3, #80 @ 0x50 8014ed2: f383 8811 msr BASEPRI, r3 8014ed6: f3bf 8f6f isb sy 8014eda: f3bf 8f4f dsb sy 8014ede: 60fb str r3, [r7, #12] } 8014ee0: bf00 nop 8014ee2: bf00 nop 8014ee4: e7fd b.n 8014ee2 return pvReturn; 8014ee6: 69fb ldr r3, [r7, #28] } 8014ee8: 4618 mov r0, r3 8014eea: 3728 adds r7, #40 @ 0x28 8014eec: 46bd mov sp, r7 8014eee: bd80 pop {r7, pc} 8014ef0: 240242cc .word 0x240242cc 8014ef4: 240242e0 .word 0x240242e0 8014ef8: 240242d0 .word 0x240242d0 8014efc: 240242c4 .word 0x240242c4 8014f00: 240242d4 .word 0x240242d4 8014f04: 240242d8 .word 0x240242d8 08014f08 : /*-----------------------------------------------------------*/ void vPortFree( void *pv ) { 8014f08: b580 push {r7, lr} 8014f0a: b086 sub sp, #24 8014f0c: af00 add r7, sp, #0 8014f0e: 6078 str r0, [r7, #4] uint8_t *puc = ( uint8_t * ) pv; 8014f10: 687b ldr r3, [r7, #4] 8014f12: 617b str r3, [r7, #20] BlockLink_t *pxLink; if( pv != NULL ) 8014f14: 687b ldr r3, [r7, #4] 8014f16: 2b00 cmp r3, #0 8014f18: d04f beq.n 8014fba { /* The memory being freed will have an BlockLink_t structure immediately before it. */ puc -= xHeapStructSize; 8014f1a: 2308 movs r3, #8 8014f1c: 425b negs r3, r3 8014f1e: 697a ldr r2, [r7, #20] 8014f20: 4413 add r3, r2 8014f22: 617b str r3, [r7, #20] /* This casting is to keep the compiler from issuing warnings. */ pxLink = ( void * ) puc; 8014f24: 697b ldr r3, [r7, #20] 8014f26: 613b str r3, [r7, #16] /* Check the block is actually allocated. */ configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ); 8014f28: 693b ldr r3, [r7, #16] 8014f2a: 685a ldr r2, [r3, #4] 8014f2c: 4b25 ldr r3, [pc, #148] @ (8014fc4 ) 8014f2e: 681b ldr r3, [r3, #0] 8014f30: 4013 ands r3, r2 8014f32: 2b00 cmp r3, #0 8014f34: d10b bne.n 8014f4e __asm volatile 8014f36: f04f 0350 mov.w r3, #80 @ 0x50 8014f3a: f383 8811 msr BASEPRI, r3 8014f3e: f3bf 8f6f isb sy 8014f42: f3bf 8f4f dsb sy 8014f46: 60fb str r3, [r7, #12] } 8014f48: bf00 nop 8014f4a: bf00 nop 8014f4c: e7fd b.n 8014f4a configASSERT( pxLink->pxNextFreeBlock == NULL ); 8014f4e: 693b ldr r3, [r7, #16] 8014f50: 681b ldr r3, [r3, #0] 8014f52: 2b00 cmp r3, #0 8014f54: d00b beq.n 8014f6e __asm volatile 8014f56: f04f 0350 mov.w r3, #80 @ 0x50 8014f5a: f383 8811 msr BASEPRI, r3 8014f5e: f3bf 8f6f isb sy 8014f62: f3bf 8f4f dsb sy 8014f66: 60bb str r3, [r7, #8] } 8014f68: bf00 nop 8014f6a: bf00 nop 8014f6c: e7fd b.n 8014f6a if( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ) 8014f6e: 693b ldr r3, [r7, #16] 8014f70: 685a ldr r2, [r3, #4] 8014f72: 4b14 ldr r3, [pc, #80] @ (8014fc4 ) 8014f74: 681b ldr r3, [r3, #0] 8014f76: 4013 ands r3, r2 8014f78: 2b00 cmp r3, #0 8014f7a: d01e beq.n 8014fba { if( pxLink->pxNextFreeBlock == NULL ) 8014f7c: 693b ldr r3, [r7, #16] 8014f7e: 681b ldr r3, [r3, #0] 8014f80: 2b00 cmp r3, #0 8014f82: d11a bne.n 8014fba { /* The block is being returned to the heap - it is no longer allocated. */ pxLink->xBlockSize &= ~xBlockAllocatedBit; 8014f84: 693b ldr r3, [r7, #16] 8014f86: 685a ldr r2, [r3, #4] 8014f88: 4b0e ldr r3, [pc, #56] @ (8014fc4 ) 8014f8a: 681b ldr r3, [r3, #0] 8014f8c: 43db mvns r3, r3 8014f8e: 401a ands r2, r3 8014f90: 693b ldr r3, [r7, #16] 8014f92: 605a str r2, [r3, #4] vTaskSuspendAll(); 8014f94: f7fe f8de bl 8013154 { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; 8014f98: 693b ldr r3, [r7, #16] 8014f9a: 685a ldr r2, [r3, #4] 8014f9c: 4b0a ldr r3, [pc, #40] @ (8014fc8 ) 8014f9e: 681b ldr r3, [r3, #0] 8014fa0: 4413 add r3, r2 8014fa2: 4a09 ldr r2, [pc, #36] @ (8014fc8 ) 8014fa4: 6013 str r3, [r2, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 8014fa6: 6938 ldr r0, [r7, #16] 8014fa8: f000 f874 bl 8015094 xNumberOfSuccessfulFrees++; 8014fac: 4b07 ldr r3, [pc, #28] @ (8014fcc ) 8014fae: 681b ldr r3, [r3, #0] 8014fb0: 3301 adds r3, #1 8014fb2: 4a06 ldr r2, [pc, #24] @ (8014fcc ) 8014fb4: 6013 str r3, [r2, #0] } ( void ) xTaskResumeAll(); 8014fb6: f7fe f8db bl 8013170 else { mtCOVERAGE_TEST_MARKER(); } } } 8014fba: bf00 nop 8014fbc: 3718 adds r7, #24 8014fbe: 46bd mov sp, r7 8014fc0: bd80 pop {r7, pc} 8014fc2: bf00 nop 8014fc4: 240242e0 .word 0x240242e0 8014fc8: 240242d0 .word 0x240242d0 8014fcc: 240242dc .word 0x240242dc 08014fd0 : /* This just exists to keep the linker quiet. */ } /*-----------------------------------------------------------*/ static void prvHeapInit( void ) { 8014fd0: b480 push {r7} 8014fd2: b085 sub sp, #20 8014fd4: af00 add r7, sp, #0 BlockLink_t *pxFirstFreeBlock; uint8_t *pucAlignedHeap; size_t uxAddress; size_t xTotalHeapSize = configTOTAL_HEAP_SIZE; 8014fd6: f44f 3300 mov.w r3, #131072 @ 0x20000 8014fda: 60bb str r3, [r7, #8] /* Ensure the heap starts on a correctly aligned boundary. */ uxAddress = ( size_t ) ucHeap; 8014fdc: 4b27 ldr r3, [pc, #156] @ (801507c ) 8014fde: 60fb str r3, [r7, #12] if( ( uxAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) 8014fe0: 68fb ldr r3, [r7, #12] 8014fe2: f003 0307 and.w r3, r3, #7 8014fe6: 2b00 cmp r3, #0 8014fe8: d00c beq.n 8015004 { uxAddress += ( portBYTE_ALIGNMENT - 1 ); 8014fea: 68fb ldr r3, [r7, #12] 8014fec: 3307 adds r3, #7 8014fee: 60fb str r3, [r7, #12] uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK ); 8014ff0: 68fb ldr r3, [r7, #12] 8014ff2: f023 0307 bic.w r3, r3, #7 8014ff6: 60fb str r3, [r7, #12] xTotalHeapSize -= uxAddress - ( size_t ) ucHeap; 8014ff8: 68ba ldr r2, [r7, #8] 8014ffa: 68fb ldr r3, [r7, #12] 8014ffc: 1ad3 subs r3, r2, r3 8014ffe: 4a1f ldr r2, [pc, #124] @ (801507c ) 8015000: 4413 add r3, r2 8015002: 60bb str r3, [r7, #8] } pucAlignedHeap = ( uint8_t * ) uxAddress; 8015004: 68fb ldr r3, [r7, #12] 8015006: 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; 8015008: 4a1d ldr r2, [pc, #116] @ (8015080 ) 801500a: 687b ldr r3, [r7, #4] 801500c: 6013 str r3, [r2, #0] xStart.xBlockSize = ( size_t ) 0; 801500e: 4b1c ldr r3, [pc, #112] @ (8015080 ) 8015010: 2200 movs r2, #0 8015012: 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; 8015014: 687b ldr r3, [r7, #4] 8015016: 68ba ldr r2, [r7, #8] 8015018: 4413 add r3, r2 801501a: 60fb str r3, [r7, #12] uxAddress -= xHeapStructSize; 801501c: 2208 movs r2, #8 801501e: 68fb ldr r3, [r7, #12] 8015020: 1a9b subs r3, r3, r2 8015022: 60fb str r3, [r7, #12] uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK ); 8015024: 68fb ldr r3, [r7, #12] 8015026: f023 0307 bic.w r3, r3, #7 801502a: 60fb str r3, [r7, #12] pxEnd = ( void * ) uxAddress; 801502c: 68fb ldr r3, [r7, #12] 801502e: 4a15 ldr r2, [pc, #84] @ (8015084 ) 8015030: 6013 str r3, [r2, #0] pxEnd->xBlockSize = 0; 8015032: 4b14 ldr r3, [pc, #80] @ (8015084 ) 8015034: 681b ldr r3, [r3, #0] 8015036: 2200 movs r2, #0 8015038: 605a str r2, [r3, #4] pxEnd->pxNextFreeBlock = NULL; 801503a: 4b12 ldr r3, [pc, #72] @ (8015084 ) 801503c: 681b ldr r3, [r3, #0] 801503e: 2200 movs r2, #0 8015040: 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; 8015042: 687b ldr r3, [r7, #4] 8015044: 603b str r3, [r7, #0] pxFirstFreeBlock->xBlockSize = uxAddress - ( size_t ) pxFirstFreeBlock; 8015046: 683b ldr r3, [r7, #0] 8015048: 68fa ldr r2, [r7, #12] 801504a: 1ad2 subs r2, r2, r3 801504c: 683b ldr r3, [r7, #0] 801504e: 605a str r2, [r3, #4] pxFirstFreeBlock->pxNextFreeBlock = pxEnd; 8015050: 4b0c ldr r3, [pc, #48] @ (8015084 ) 8015052: 681a ldr r2, [r3, #0] 8015054: 683b ldr r3, [r7, #0] 8015056: 601a str r2, [r3, #0] /* Only one block exists - and it covers the entire usable heap space. */ xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 8015058: 683b ldr r3, [r7, #0] 801505a: 685b ldr r3, [r3, #4] 801505c: 4a0a ldr r2, [pc, #40] @ (8015088 ) 801505e: 6013 str r3, [r2, #0] xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 8015060: 683b ldr r3, [r7, #0] 8015062: 685b ldr r3, [r3, #4] 8015064: 4a09 ldr r2, [pc, #36] @ (801508c ) 8015066: 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 ); 8015068: 4b09 ldr r3, [pc, #36] @ (8015090 ) 801506a: f04f 4200 mov.w r2, #2147483648 @ 0x80000000 801506e: 601a str r2, [r3, #0] } 8015070: bf00 nop 8015072: 3714 adds r7, #20 8015074: 46bd mov sp, r7 8015076: f85d 7b04 ldr.w r7, [sp], #4 801507a: 4770 bx lr 801507c: 240042c4 .word 0x240042c4 8015080: 240242c4 .word 0x240242c4 8015084: 240242cc .word 0x240242cc 8015088: 240242d4 .word 0x240242d4 801508c: 240242d0 .word 0x240242d0 8015090: 240242e0 .word 0x240242e0 08015094 : /*-----------------------------------------------------------*/ static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ) { 8015094: b480 push {r7} 8015096: b085 sub sp, #20 8015098: af00 add r7, sp, #0 801509a: 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 ) 801509c: 4b28 ldr r3, [pc, #160] @ (8015140 ) 801509e: 60fb str r3, [r7, #12] 80150a0: e002 b.n 80150a8 80150a2: 68fb ldr r3, [r7, #12] 80150a4: 681b ldr r3, [r3, #0] 80150a6: 60fb str r3, [r7, #12] 80150a8: 68fb ldr r3, [r7, #12] 80150aa: 681b ldr r3, [r3, #0] 80150ac: 687a ldr r2, [r7, #4] 80150ae: 429a cmp r2, r3 80150b0: d8f7 bhi.n 80150a2 /* 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; 80150b2: 68fb ldr r3, [r7, #12] 80150b4: 60bb str r3, [r7, #8] if( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert ) 80150b6: 68fb ldr r3, [r7, #12] 80150b8: 685b ldr r3, [r3, #4] 80150ba: 68ba ldr r2, [r7, #8] 80150bc: 4413 add r3, r2 80150be: 687a ldr r2, [r7, #4] 80150c0: 429a cmp r2, r3 80150c2: d108 bne.n 80150d6 { pxIterator->xBlockSize += pxBlockToInsert->xBlockSize; 80150c4: 68fb ldr r3, [r7, #12] 80150c6: 685a ldr r2, [r3, #4] 80150c8: 687b ldr r3, [r7, #4] 80150ca: 685b ldr r3, [r3, #4] 80150cc: 441a add r2, r3 80150ce: 68fb ldr r3, [r7, #12] 80150d0: 605a str r2, [r3, #4] pxBlockToInsert = pxIterator; 80150d2: 68fb ldr r3, [r7, #12] 80150d4: 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; 80150d6: 687b ldr r3, [r7, #4] 80150d8: 60bb str r3, [r7, #8] if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock ) 80150da: 687b ldr r3, [r7, #4] 80150dc: 685b ldr r3, [r3, #4] 80150de: 68ba ldr r2, [r7, #8] 80150e0: 441a add r2, r3 80150e2: 68fb ldr r3, [r7, #12] 80150e4: 681b ldr r3, [r3, #0] 80150e6: 429a cmp r2, r3 80150e8: d118 bne.n 801511c { if( pxIterator->pxNextFreeBlock != pxEnd ) 80150ea: 68fb ldr r3, [r7, #12] 80150ec: 681a ldr r2, [r3, #0] 80150ee: 4b15 ldr r3, [pc, #84] @ (8015144 ) 80150f0: 681b ldr r3, [r3, #0] 80150f2: 429a cmp r2, r3 80150f4: d00d beq.n 8015112 { /* Form one big block from the two blocks. */ pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize; 80150f6: 687b ldr r3, [r7, #4] 80150f8: 685a ldr r2, [r3, #4] 80150fa: 68fb ldr r3, [r7, #12] 80150fc: 681b ldr r3, [r3, #0] 80150fe: 685b ldr r3, [r3, #4] 8015100: 441a add r2, r3 8015102: 687b ldr r3, [r7, #4] 8015104: 605a str r2, [r3, #4] pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock; 8015106: 68fb ldr r3, [r7, #12] 8015108: 681b ldr r3, [r3, #0] 801510a: 681a ldr r2, [r3, #0] 801510c: 687b ldr r3, [r7, #4] 801510e: 601a str r2, [r3, #0] 8015110: e008 b.n 8015124 } else { pxBlockToInsert->pxNextFreeBlock = pxEnd; 8015112: 4b0c ldr r3, [pc, #48] @ (8015144 ) 8015114: 681a ldr r2, [r3, #0] 8015116: 687b ldr r3, [r7, #4] 8015118: 601a str r2, [r3, #0] 801511a: e003 b.n 8015124 } } else { pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock; 801511c: 68fb ldr r3, [r7, #12] 801511e: 681a ldr r2, [r3, #0] 8015120: 687b ldr r3, [r7, #4] 8015122: 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 ) 8015124: 68fa ldr r2, [r7, #12] 8015126: 687b ldr r3, [r7, #4] 8015128: 429a cmp r2, r3 801512a: d002 beq.n 8015132 { pxIterator->pxNextFreeBlock = pxBlockToInsert; 801512c: 68fb ldr r3, [r7, #12] 801512e: 687a ldr r2, [r7, #4] 8015130: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } } 8015132: bf00 nop 8015134: 3714 adds r7, #20 8015136: 46bd mov sp, r7 8015138: f85d 7b04 ldr.w r7, [sp], #4 801513c: 4770 bx lr 801513e: bf00 nop 8015140: 240242c4 .word 0x240242c4 8015144: 240242cc .word 0x240242cc 08015148 : * @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) { 8015148: b580 push {r7, lr} 801514a: b084 sub sp, #16 801514c: af00 add r7, sp, #0 801514e: 6078 str r0, [r7, #4] 8015150: 6039 str r1, [r7, #0] err_t err; #ifdef LWIP_DEBUG /* catch functions that don't set err */ apimsg->err = ERR_VAL; 8015152: 683b ldr r3, [r7, #0] 8015154: 22fa movs r2, #250 @ 0xfa 8015156: 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)); 8015158: 683b ldr r3, [r7, #0] 801515a: 681b ldr r3, [r3, #0] 801515c: 330c adds r3, #12 801515e: 461a mov r2, r3 8015160: 6839 ldr r1, [r7, #0] 8015162: 6878 ldr r0, [r7, #4] 8015164: f003 fc7c bl 8018a60 8015168: 4603 mov r3, r0 801516a: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801516c: f997 300f ldrsb.w r3, [r7, #15] 8015170: 2b00 cmp r3, #0 8015172: d103 bne.n 801517c return apimsg->err; 8015174: 683b ldr r3, [r7, #0] 8015176: f993 3004 ldrsb.w r3, [r3, #4] 801517a: e001 b.n 8015180 } return err; 801517c: f997 300f ldrsb.w r3, [r7, #15] } 8015180: 4618 mov r0, r3 8015182: 3710 adds r7, #16 8015184: 46bd mov sp, r7 8015186: bd80 pop {r7, pc} 08015188 : * @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) { 8015188: b580 push {r7, lr} 801518a: b08c sub sp, #48 @ 0x30 801518c: af00 add r7, sp, #0 801518e: 4603 mov r3, r0 8015190: 603a str r2, [r7, #0] 8015192: 71fb strb r3, [r7, #7] 8015194: 460b mov r3, r1 8015196: 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); 8015198: 79fb ldrb r3, [r7, #7] 801519a: 6839 ldr r1, [r7, #0] 801519c: 4618 mov r0, r3 801519e: f001 f8ad bl 80162fc 80151a2: 62f8 str r0, [r7, #44] @ 0x2c if (conn != NULL) { 80151a4: 6afb ldr r3, [r7, #44] @ 0x2c 80151a6: 2b00 cmp r3, #0 80151a8: d054 beq.n 8015254 err_t err; API_MSG_VAR_REF(msg).msg.n.proto = proto; 80151aa: 79bb ldrb r3, [r7, #6] 80151ac: 743b strb r3, [r7, #16] API_MSG_VAR_REF(msg).conn = conn; 80151ae: 6afb ldr r3, [r7, #44] @ 0x2c 80151b0: 60bb str r3, [r7, #8] err = netconn_apimsg(lwip_netconn_do_newconn, &API_MSG_VAR_REF(msg)); 80151b2: f107 0308 add.w r3, r7, #8 80151b6: 4619 mov r1, r3 80151b8: 4829 ldr r0, [pc, #164] @ (8015260 ) 80151ba: f7ff ffc5 bl 8015148 80151be: 4603 mov r3, r0 80151c0: f887 302b strb.w r3, [r7, #43] @ 0x2b if (err != ERR_OK) { 80151c4: f997 302b ldrsb.w r3, [r7, #43] @ 0x2b 80151c8: 2b00 cmp r3, #0 80151ca: d043 beq.n 8015254 LWIP_ASSERT("freeing conn without freeing pcb", conn->pcb.tcp == NULL); 80151cc: 6afb ldr r3, [r7, #44] @ 0x2c 80151ce: 685b ldr r3, [r3, #4] 80151d0: 2b00 cmp r3, #0 80151d2: d005 beq.n 80151e0 80151d4: 4b23 ldr r3, [pc, #140] @ (8015264 ) 80151d6: 22a3 movs r2, #163 @ 0xa3 80151d8: 4923 ldr r1, [pc, #140] @ (8015268 ) 80151da: 4824 ldr r0, [pc, #144] @ (801526c ) 80151dc: f014 fbf6 bl 80299cc LWIP_ASSERT("conn has no recvmbox", sys_mbox_valid(&conn->recvmbox)); 80151e0: 6afb ldr r3, [r7, #44] @ 0x2c 80151e2: 3310 adds r3, #16 80151e4: 4618 mov r0, r3 80151e6: f011 f851 bl 802628c 80151ea: 4603 mov r3, r0 80151ec: 2b00 cmp r3, #0 80151ee: d105 bne.n 80151fc 80151f0: 4b1c ldr r3, [pc, #112] @ (8015264 ) 80151f2: 22a4 movs r2, #164 @ 0xa4 80151f4: 491e ldr r1, [pc, #120] @ (8015270 ) 80151f6: 481d ldr r0, [pc, #116] @ (801526c ) 80151f8: f014 fbe8 bl 80299cc #if LWIP_TCP LWIP_ASSERT("conn->acceptmbox shouldn't exist", !sys_mbox_valid(&conn->acceptmbox)); 80151fc: 6afb ldr r3, [r7, #44] @ 0x2c 80151fe: 3314 adds r3, #20 8015200: 4618 mov r0, r3 8015202: f011 f843 bl 802628c 8015206: 4603 mov r3, r0 8015208: 2b00 cmp r3, #0 801520a: d005 beq.n 8015218 801520c: 4b15 ldr r3, [pc, #84] @ (8015264 ) 801520e: 22a6 movs r2, #166 @ 0xa6 8015210: 4918 ldr r1, [pc, #96] @ (8015274 ) 8015212: 4816 ldr r0, [pc, #88] @ (801526c ) 8015214: f014 fbda bl 80299cc #endif /* LWIP_TCP */ #if !LWIP_NETCONN_SEM_PER_THREAD LWIP_ASSERT("conn has no op_completed", sys_sem_valid(&conn->op_completed)); 8015218: 6afb ldr r3, [r7, #44] @ 0x2c 801521a: 330c adds r3, #12 801521c: 4618 mov r0, r3 801521e: f011 f8c3 bl 80263a8 8015222: 4603 mov r3, r0 8015224: 2b00 cmp r3, #0 8015226: d105 bne.n 8015234 8015228: 4b0e ldr r3, [pc, #56] @ (8015264 ) 801522a: 22a9 movs r2, #169 @ 0xa9 801522c: 4912 ldr r1, [pc, #72] @ (8015278 ) 801522e: 480f ldr r0, [pc, #60] @ (801526c ) 8015230: f014 fbcc bl 80299cc sys_sem_free(&conn->op_completed); 8015234: 6afb ldr r3, [r7, #44] @ 0x2c 8015236: 330c adds r3, #12 8015238: 4618 mov r0, r3 801523a: f011 f8a8 bl 802638e #endif /* !LWIP_NETCONN_SEM_PER_THREAD */ sys_mbox_free(&conn->recvmbox); 801523e: 6afb ldr r3, [r7, #44] @ 0x2c 8015240: 3310 adds r3, #16 8015242: 4618 mov r0, r3 8015244: f010 ffae bl 80261a4 memp_free(MEMP_NETCONN, conn); 8015248: 6af9 ldr r1, [r7, #44] @ 0x2c 801524a: 2007 movs r0, #7 801524c: f004 fa58 bl 8019700 API_MSG_VAR_FREE(msg); return NULL; 8015250: 2300 movs r3, #0 8015252: e000 b.n 8015256 } } API_MSG_VAR_FREE(msg); return conn; 8015254: 6afb ldr r3, [r7, #44] @ 0x2c } 8015256: 4618 mov r0, r3 8015258: 3730 adds r7, #48 @ 0x30 801525a: 46bd mov sp, r7 801525c: bd80 pop {r7, pc} 801525e: bf00 nop 8015260: 080162d1 .word 0x080162d1 8015264: 0802cb84 .word 0x0802cb84 8015268: 0802cbb8 .word 0x0802cbb8 801526c: 0802cbdc .word 0x0802cbdc 8015270: 0802cc04 .word 0x0802cc04 8015274: 0802cc1c .word 0x0802cc1c 8015278: 0802cc40 .word 0x0802cc40 0801527c : * @param conn the netconn to delete * @return ERR_OK if the connection was deleted */ err_t netconn_prepare_delete(struct netconn *conn) { 801527c: b580 push {r7, lr} 801527e: b08c sub sp, #48 @ 0x30 8015280: af00 add r7, sp, #0 8015282: 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) { 8015284: 687b ldr r3, [r7, #4] 8015286: 2b00 cmp r3, #0 8015288: d101 bne.n 801528e return ERR_OK; 801528a: 2300 movs r3, #0 801528c: e014 b.n 80152b8 } API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 801528e: 687b ldr r3, [r7, #4] 8015290: 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 = 8015292: 2329 movs r3, #41 @ 0x29 8015294: 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)); 8015296: f107 030c add.w r3, r7, #12 801529a: 4619 mov r1, r3 801529c: 4808 ldr r0, [pc, #32] @ (80152c0 ) 801529e: f7ff ff53 bl 8015148 80152a2: 4603 mov r3, r0 80152a4: f887 302f strb.w r3, [r7, #47] @ 0x2f API_MSG_VAR_FREE(msg); if (err != ERR_OK) { 80152a8: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f 80152ac: 2b00 cmp r3, #0 80152ae: d002 beq.n 80152b6 return err; 80152b0: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f 80152b4: e000 b.n 80152b8 } return ERR_OK; 80152b6: 2300 movs r3, #0 } 80152b8: 4618 mov r0, r3 80152ba: 3730 adds r7, #48 @ 0x30 80152bc: 46bd mov sp, r7 80152be: bd80 pop {r7, pc} 80152c0: 08016855 .word 0x08016855 080152c4 : * @param conn the netconn to delete * @return ERR_OK if the connection was deleted */ err_t netconn_delete(struct netconn *conn) { 80152c4: b580 push {r7, lr} 80152c6: b084 sub sp, #16 80152c8: af00 add r7, sp, #0 80152ca: 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) { 80152cc: 687b ldr r3, [r7, #4] 80152ce: 2b00 cmp r3, #0 80152d0: d101 bne.n 80152d6 return ERR_OK; 80152d2: 2300 movs r3, #0 80152d4: e00d b.n 80152f2 /* Already called netconn_prepare_delete() before */ err = ERR_OK; } else #endif /* LWIP_NETCONN_FULLDUPLEX */ { err = netconn_prepare_delete(conn); 80152d6: 6878 ldr r0, [r7, #4] 80152d8: f7ff ffd0 bl 801527c 80152dc: 4603 mov r3, r0 80152de: 73fb strb r3, [r7, #15] } if (err == ERR_OK) { 80152e0: f997 300f ldrsb.w r3, [r7, #15] 80152e4: 2b00 cmp r3, #0 80152e6: d102 bne.n 80152ee netconn_free(conn); 80152e8: 6878 ldr r0, [r7, #4] 80152ea: f001 f881 bl 80163f0 } return err; 80152ee: f997 300f ldrsb.w r3, [r7, #15] } 80152f2: 4618 mov r0, r3 80152f4: 3710 adds r7, #16 80152f6: 46bd mov sp, r7 80152f8: bd80 pop {r7, pc} ... 080152fc : * @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) { 80152fc: b580 push {r7, lr} 80152fe: b08e sub sp, #56 @ 0x38 8015300: af00 add r7, sp, #0 8015302: 60f8 str r0, [r7, #12] 8015304: 60b9 str r1, [r7, #8] 8015306: 607a str r2, [r7, #4] 8015308: 70fb strb r3, [r7, #3] API_MSG_VAR_DECLARE(msg); err_t err; LWIP_ERROR("netconn_getaddr: invalid conn", (conn != NULL), return ERR_ARG;); 801530a: 68fb ldr r3, [r7, #12] 801530c: 2b00 cmp r3, #0 801530e: d109 bne.n 8015324 8015310: 4b1d ldr r3, [pc, #116] @ (8015388 ) 8015312: f44f 7289 mov.w r2, #274 @ 0x112 8015316: 491d ldr r1, [pc, #116] @ (801538c ) 8015318: 481d ldr r0, [pc, #116] @ (8015390 ) 801531a: f014 fb57 bl 80299cc 801531e: f06f 030f mvn.w r3, #15 8015322: e02d b.n 8015380 LWIP_ERROR("netconn_getaddr: invalid addr", (addr != NULL), return ERR_ARG;); 8015324: 68bb ldr r3, [r7, #8] 8015326: 2b00 cmp r3, #0 8015328: d109 bne.n 801533e 801532a: 4b17 ldr r3, [pc, #92] @ (8015388 ) 801532c: f240 1213 movw r2, #275 @ 0x113 8015330: 4918 ldr r1, [pc, #96] @ (8015394 ) 8015332: 4817 ldr r0, [pc, #92] @ (8015390 ) 8015334: f014 fb4a bl 80299cc 8015338: f06f 030f mvn.w r3, #15 801533c: e020 b.n 8015380 LWIP_ERROR("netconn_getaddr: invalid port", (port != NULL), return ERR_ARG;); 801533e: 687b ldr r3, [r7, #4] 8015340: 2b00 cmp r3, #0 8015342: d109 bne.n 8015358 8015344: 4b10 ldr r3, [pc, #64] @ (8015388 ) 8015346: f44f 728a mov.w r2, #276 @ 0x114 801534a: 4913 ldr r1, [pc, #76] @ (8015398 ) 801534c: 4810 ldr r0, [pc, #64] @ (8015390 ) 801534e: f014 fb3d bl 80299cc 8015352: f06f 030f mvn.w r3, #15 8015356: e013 b.n 8015380 API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 8015358: 68fb ldr r3, [r7, #12] 801535a: 617b str r3, [r7, #20] API_MSG_VAR_REF(msg).msg.ad.local = local; 801535c: 78fb ldrb r3, [r7, #3] 801535e: 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; 8015362: 68bb ldr r3, [r7, #8] 8015364: 61fb str r3, [r7, #28] msg.msg.ad.port = port; 8015366: 687b ldr r3, [r7, #4] 8015368: 623b str r3, [r7, #32] err = netconn_apimsg(lwip_netconn_do_getaddr, &msg); 801536a: f107 0314 add.w r3, r7, #20 801536e: 4619 mov r1, r3 8015370: 480a ldr r0, [pc, #40] @ (801539c ) 8015372: f7ff fee9 bl 8015148 8015376: 4603 mov r3, r0 8015378: f887 3037 strb.w r3, [r7, #55] @ 0x37 #endif /* LWIP_MPU_COMPATIBLE */ API_MSG_VAR_FREE(msg); return err; 801537c: f997 3037 ldrsb.w r3, [r7, #55] @ 0x37 } 8015380: 4618 mov r0, r3 8015382: 3738 adds r7, #56 @ 0x38 8015384: 46bd mov sp, r7 8015386: bd80 pop {r7, pc} 8015388: 0802cb84 .word 0x0802cb84 801538c: 0802cc5c .word 0x0802cc5c 8015390: 0802cbdc .word 0x0802cbdc 8015394: 0802cc7c .word 0x0802cc7c 8015398: 0802cc9c .word 0x0802cc9c 801539c: 080172b1 .word 0x080172b1 080153a0 : * @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) { 80153a0: b580 push {r7, lr} 80153a2: b08e sub sp, #56 @ 0x38 80153a4: af00 add r7, sp, #0 80153a6: 60f8 str r0, [r7, #12] 80153a8: 60b9 str r1, [r7, #8] 80153aa: 4613 mov r3, r2 80153ac: 80fb strh r3, [r7, #6] API_MSG_VAR_DECLARE(msg); err_t err; LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;); 80153ae: 68fb ldr r3, [r7, #12] 80153b0: 2b00 cmp r3, #0 80153b2: d109 bne.n 80153c8 80153b4: 4b11 ldr r3, [pc, #68] @ (80153fc ) 80153b6: f44f 72bf mov.w r2, #382 @ 0x17e 80153ba: 4911 ldr r1, [pc, #68] @ (8015400 ) 80153bc: 4811 ldr r0, [pc, #68] @ (8015404 ) 80153be: f014 fb05 bl 80299cc 80153c2: f06f 030f mvn.w r3, #15 80153c6: e015 b.n 80153f4 #if LWIP_IPV4 /* Don't propagate NULL pointer (IP_ADDR_ANY alias) to subsequent functions */ if (addr == NULL) { 80153c8: 68bb ldr r3, [r7, #8] 80153ca: 2b00 cmp r3, #0 80153cc: d101 bne.n 80153d2 addr = IP4_ADDR_ANY; 80153ce: 4b0e ldr r3, [pc, #56] @ (8015408 ) 80153d0: 60bb str r3, [r7, #8] } #endif /* LWIP_IPV4 */ API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 80153d2: 68fb ldr r3, [r7, #12] 80153d4: 617b str r3, [r7, #20] API_MSG_VAR_REF(msg).msg.bc.ipaddr = API_MSG_VAR_REF(addr); 80153d6: 68bb ldr r3, [r7, #8] 80153d8: 61fb str r3, [r7, #28] API_MSG_VAR_REF(msg).msg.bc.port = port; 80153da: 88fb ldrh r3, [r7, #6] 80153dc: 843b strh r3, [r7, #32] err = netconn_apimsg(lwip_netconn_do_connect, &API_MSG_VAR_REF(msg)); 80153de: f107 0314 add.w r3, r7, #20 80153e2: 4619 mov r1, r3 80153e4: 4809 ldr r0, [pc, #36] @ (801540c ) 80153e6: f7ff feaf bl 8015148 80153ea: 4603 mov r3, r0 80153ec: f887 3037 strb.w r3, [r7, #55] @ 0x37 API_MSG_VAR_FREE(msg); return err; 80153f0: f997 3037 ldrsb.w r3, [r7, #55] @ 0x37 } 80153f4: 4618 mov r0, r3 80153f6: 3738 adds r7, #56 @ 0x38 80153f8: 46bd mov sp, r7 80153fa: bd80 pop {r7, pc} 80153fc: 0802cb84 .word 0x0802cb84 8015400: 0802ccf8 .word 0x0802ccf8 8015404: 0802cbdc .word 0x0802cbdc 8015408: 08030c10 .word 0x08030c10 801540c: 08016b41 .word 0x08016b41 08015410 : * @param conn the netconn to disconnect * @return See @ref err_t */ err_t netconn_disconnect(struct netconn *conn) { 8015410: b580 push {r7, lr} 8015412: b08c sub sp, #48 @ 0x30 8015414: af00 add r7, sp, #0 8015416: 6078 str r0, [r7, #4] API_MSG_VAR_DECLARE(msg); err_t err; LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;); 8015418: 687b ldr r3, [r7, #4] 801541a: 2b00 cmp r3, #0 801541c: d109 bne.n 8015432 801541e: 4b0d ldr r3, [pc, #52] @ (8015454 ) 8015420: f44f 72cf mov.w r2, #414 @ 0x19e 8015424: 490c ldr r1, [pc, #48] @ (8015458 ) 8015426: 480d ldr r0, [pc, #52] @ (801545c ) 8015428: f014 fad0 bl 80299cc 801542c: f06f 030f mvn.w r3, #15 8015430: e00c b.n 801544c API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 8015432: 687b ldr r3, [r7, #4] 8015434: 60fb str r3, [r7, #12] err = netconn_apimsg(lwip_netconn_do_disconnect, &API_MSG_VAR_REF(msg)); 8015436: f107 030c add.w r3, r7, #12 801543a: 4619 mov r1, r3 801543c: 4808 ldr r0, [pc, #32] @ (8015460 ) 801543e: f7ff fe83 bl 8015148 8015442: 4603 mov r3, r0 8015444: f887 302f strb.w r3, [r7, #47] @ 0x2f API_MSG_VAR_FREE(msg); return err; 8015448: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f } 801544c: 4618 mov r0, r3 801544e: 3730 adds r7, #48 @ 0x30 8015450: 46bd mov sp, r7 8015452: bd80 pop {r7, pc} 8015454: 0802cb84 .word 0x0802cb84 8015458: 0802cd18 .word 0x0802cd18 801545c: 0802cbdc .word 0x0802cbdc 8015460: 08016cc1 .word 0x08016cc1 08015464 : * 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) { 8015464: b580 push {r7, lr} 8015466: b08a sub sp, #40 @ 0x28 8015468: af00 add r7, sp, #0 801546a: 60f8 str r0, [r7, #12] 801546c: 60b9 str r1, [r7, #8] 801546e: 4613 mov r3, r2 8015470: 71fb strb r3, [r7, #7] void *buf = NULL; 8015472: 2300 movs r3, #0 8015474: 61bb str r3, [r7, #24] u16_t len; LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;); 8015476: 68bb ldr r3, [r7, #8] 8015478: 2b00 cmp r3, #0 801547a: d109 bne.n 8015490 801547c: 4b64 ldr r3, [pc, #400] @ (8015610 ) 801547e: f44f 7212 mov.w r2, #584 @ 0x248 8015482: 4964 ldr r1, [pc, #400] @ (8015614 ) 8015484: 4864 ldr r0, [pc, #400] @ (8015618 ) 8015486: f014 faa1 bl 80299cc 801548a: f06f 030f mvn.w r3, #15 801548e: e0bb b.n 8015608 *new_buf = NULL; 8015490: 68bb ldr r3, [r7, #8] 8015492: 2200 movs r2, #0 8015494: 601a str r2, [r3, #0] LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); 8015496: 68fb ldr r3, [r7, #12] 8015498: 2b00 cmp r3, #0 801549a: d109 bne.n 80154b0 801549c: 4b5c ldr r3, [pc, #368] @ (8015610 ) 801549e: f240 224a movw r2, #586 @ 0x24a 80154a2: 495e ldr r1, [pc, #376] @ (801561c ) 80154a4: 485c ldr r0, [pc, #368] @ (8015618 ) 80154a6: f014 fa91 bl 80299cc 80154aa: f06f 030f mvn.w r3, #15 80154ae: e0ab b.n 8015608 if (!NETCONN_RECVMBOX_WAITABLE(conn)) { 80154b0: 68fb ldr r3, [r7, #12] 80154b2: 3310 adds r3, #16 80154b4: 4618 mov r0, r3 80154b6: f010 fee9 bl 802628c 80154ba: 4603 mov r3, r0 80154bc: 2b00 cmp r3, #0 80154be: d10e bne.n 80154de err_t err = netconn_err(conn); 80154c0: 68f8 ldr r0, [r7, #12] 80154c2: f000 fb1f bl 8015b04 80154c6: 4603 mov r3, r0 80154c8: 77fb strb r3, [r7, #31] if (err != ERR_OK) { 80154ca: f997 301f ldrsb.w r3, [r7, #31] 80154ce: 2b00 cmp r3, #0 80154d0: d002 beq.n 80154d8 /* return pending error */ return err; 80154d2: f997 301f ldrsb.w r3, [r7, #31] 80154d6: e097 b.n 8015608 } return ERR_CONN; 80154d8: f06f 030a mvn.w r3, #10 80154dc: e094 b.n 8015608 } NETCONN_MBOX_WAITING_INC(conn); if (netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK) || 80154de: 68fb ldr r3, [r7, #12] 80154e0: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80154e4: f003 0302 and.w r3, r3, #2 80154e8: 2b00 cmp r3, #0 80154ea: d110 bne.n 801550e 80154ec: 79fb ldrb r3, [r7, #7] 80154ee: f003 0304 and.w r3, r3, #4 80154f2: 2b00 cmp r3, #0 80154f4: d10b bne.n 801550e (conn->flags & NETCONN_FLAG_MBOXCLOSED) || (conn->pending_err != ERR_OK)) { 80154f6: 68fb ldr r3, [r7, #12] 80154f8: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80154fc: f003 0301 and.w r3, r3, #1 if (netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK) || 8015500: 2b00 cmp r3, #0 8015502: d104 bne.n 801550e (conn->flags & NETCONN_FLAG_MBOXCLOSED) || (conn->pending_err != ERR_OK)) { 8015504: 68fb ldr r3, [r7, #12] 8015506: f993 3008 ldrsb.w r3, [r3, #8] 801550a: 2b00 cmp r3, #0 801550c: d025 beq.n 801555a if (sys_arch_mbox_tryfetch(&conn->recvmbox, &buf) == SYS_ARCH_TIMEOUT) { 801550e: 68fb ldr r3, [r7, #12] 8015510: 3310 adds r3, #16 8015512: f107 0218 add.w r2, r7, #24 8015516: 4611 mov r1, r2 8015518: 4618 mov r0, r3 801551a: f010 fea0 bl 802625e 801551e: 4603 mov r3, r0 8015520: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8015524: d12a bne.n 801557c err_t err; NETCONN_MBOX_WAITING_DEC(conn); err = netconn_err(conn); 8015526: 68f8 ldr r0, [r7, #12] 8015528: f000 faec bl 8015b04 801552c: 4603 mov r3, r0 801552e: f887 3025 strb.w r3, [r7, #37] @ 0x25 if (err != ERR_OK) { 8015532: f997 3025 ldrsb.w r3, [r7, #37] @ 0x25 8015536: 2b00 cmp r3, #0 8015538: d002 beq.n 8015540 /* return pending error */ return err; 801553a: f997 3025 ldrsb.w r3, [r7, #37] @ 0x25 801553e: e063 b.n 8015608 } if (conn->flags & NETCONN_FLAG_MBOXCLOSED) { 8015540: 68fb ldr r3, [r7, #12] 8015542: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8015546: f003 0301 and.w r3, r3, #1 801554a: 2b00 cmp r3, #0 801554c: d002 beq.n 8015554 return ERR_CONN; 801554e: f06f 030a mvn.w r3, #10 8015552: e059 b.n 8015608 } return ERR_WOULDBLOCK; 8015554: f06f 0306 mvn.w r3, #6 8015558: e056 b.n 8015608 } } else { #if LWIP_SO_RCVTIMEO if (sys_arch_mbox_fetch(&conn->recvmbox, &buf, conn->recv_timeout) == SYS_ARCH_TIMEOUT) { 801555a: 68fb ldr r3, [r7, #12] 801555c: f103 0010 add.w r0, r3, #16 8015560: 68fb ldr r3, [r7, #12] 8015562: 69da ldr r2, [r3, #28] 8015564: f107 0318 add.w r3, r7, #24 8015568: 4619 mov r1, r3 801556a: f010 fe47 bl 80261fc 801556e: 4603 mov r3, r0 8015570: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8015574: d102 bne.n 801557c NETCONN_MBOX_WAITING_DEC(conn); return ERR_TIMEOUT; 8015576: f06f 0302 mvn.w r3, #2 801557a: e045 b.n 8015608 } #endif #if LWIP_TCP #if (LWIP_UDP || LWIP_RAW) if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) 801557c: 68fb ldr r3, [r7, #12] 801557e: 781b ldrb r3, [r3, #0] 8015580: f003 03f0 and.w r3, r3, #240 @ 0xf0 8015584: 2b10 cmp r3, #16 8015586: d117 bne.n 80155b8 #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)) { 8015588: 69bb ldr r3, [r7, #24] 801558a: f107 0217 add.w r2, r7, #23 801558e: 4611 mov r1, r2 8015590: 4618 mov r0, r3 8015592: f000 fb09 bl 8015ba8 8015596: 4603 mov r3, r0 8015598: 2b00 cmp r3, #0 801559a: d009 beq.n 80155b0 /* new_buf has been zeroed above already */ if (err == ERR_CLSD) { 801559c: f997 3017 ldrsb.w r3, [r7, #23] 80155a0: f113 0f0f cmn.w r3, #15 80155a4: d101 bne.n 80155aa /* connection closed translates to ERR_OK with *new_buf == NULL */ return ERR_OK; 80155a6: 2300 movs r3, #0 80155a8: e02e b.n 8015608 } return err; 80155aa: f997 3017 ldrsb.w r3, [r7, #23] 80155ae: e02b b.n 8015608 } len = ((struct pbuf *)buf)->tot_len; 80155b0: 69bb ldr r3, [r7, #24] 80155b2: 891b ldrh r3, [r3, #8] 80155b4: 84fb strh r3, [r7, #38] @ 0x26 80155b6: e00d b.n 80155d4 #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); 80155b8: 69bb ldr r3, [r7, #24] 80155ba: 2b00 cmp r3, #0 80155bc: d106 bne.n 80155cc 80155be: 4b14 ldr r3, [pc, #80] @ (8015610 ) 80155c0: f240 2291 movw r2, #657 @ 0x291 80155c4: 4916 ldr r1, [pc, #88] @ (8015620 ) 80155c6: 4814 ldr r0, [pc, #80] @ (8015618 ) 80155c8: f014 fa00 bl 80299cc len = netbuf_len((struct netbuf *)buf); 80155cc: 69bb ldr r3, [r7, #24] 80155ce: 681b ldr r3, [r3, #0] 80155d0: 891b ldrh r3, [r3, #8] 80155d2: 84fb strh r3, [r7, #38] @ 0x26 } #endif /* (LWIP_UDP || LWIP_RAW) */ #if LWIP_SO_RCVBUF SYS_ARCH_DEC(conn->recv_avail, len); 80155d4: f010 ff64 bl 80264a0 80155d8: 6238 str r0, [r7, #32] 80155da: 68fb ldr r3, [r7, #12] 80155dc: 6a5a ldr r2, [r3, #36] @ 0x24 80155de: 8cfb ldrh r3, [r7, #38] @ 0x26 80155e0: 1ad2 subs r2, r2, r3 80155e2: 68fb ldr r3, [r7, #12] 80155e4: 625a str r2, [r3, #36] @ 0x24 80155e6: 6a38 ldr r0, [r7, #32] 80155e8: f010 ff68 bl 80264bc #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVMINUS, len); 80155ec: 68fb ldr r3, [r7, #12] 80155ee: 6b1b ldr r3, [r3, #48] @ 0x30 80155f0: 2b00 cmp r3, #0 80155f2: d005 beq.n 8015600 80155f4: 68fb ldr r3, [r7, #12] 80155f6: 6b1b ldr r3, [r3, #48] @ 0x30 80155f8: 8cfa ldrh r2, [r7, #38] @ 0x26 80155fa: 2101 movs r1, #1 80155fc: 68f8 ldr r0, [r7, #12] 80155fe: 4798 blx r3 LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_recv_data: received %p, len=%"U16_F"\n", buf, len)); *new_buf = buf; 8015600: 69ba ldr r2, [r7, #24] 8015602: 68bb ldr r3, [r7, #8] 8015604: 601a str r2, [r3, #0] /* don't set conn->last_err: it's only ERR_OK, anyway */ return ERR_OK; 8015606: 2300 movs r3, #0 } 8015608: 4618 mov r0, r3 801560a: 3728 adds r7, #40 @ 0x28 801560c: 46bd mov sp, r7 801560e: bd80 pop {r7, pc} 8015610: 0802cb84 .word 0x0802cb84 8015614: 0802cd9c .word 0x0802cd9c 8015618: 0802cbdc .word 0x0802cbdc 801561c: 0802cdbc .word 0x0802cdbc 8015620: 0802cdd8 .word 0x0802cdd8 08015624 : #if LWIP_TCP static err_t netconn_tcp_recvd_msg(struct netconn *conn, size_t len, struct api_msg *msg) { 8015624: b580 push {r7, lr} 8015626: b084 sub sp, #16 8015628: af00 add r7, sp, #0 801562a: 60f8 str r0, [r7, #12] 801562c: 60b9 str r1, [r7, #8] 801562e: 607a str r2, [r7, #4] LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && 8015630: 68fb ldr r3, [r7, #12] 8015632: 2b00 cmp r3, #0 8015634: d005 beq.n 8015642 8015636: 68fb ldr r3, [r7, #12] 8015638: 781b ldrb r3, [r3, #0] 801563a: f003 03f0 and.w r3, r3, #240 @ 0xf0 801563e: 2b10 cmp r3, #16 8015640: d009 beq.n 8015656 8015642: 4b0c ldr r3, [pc, #48] @ (8015674 ) 8015644: f240 22a7 movw r2, #679 @ 0x2a7 8015648: 490b ldr r1, [pc, #44] @ (8015678 ) 801564a: 480c ldr r0, [pc, #48] @ (801567c ) 801564c: f014 f9be bl 80299cc 8015650: f06f 030f mvn.w r3, #15 8015654: e00a b.n 801566c NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;); msg->conn = conn; 8015656: 687b ldr r3, [r7, #4] 8015658: 68fa ldr r2, [r7, #12] 801565a: 601a str r2, [r3, #0] msg->msg.r.len = len; 801565c: 687b ldr r3, [r7, #4] 801565e: 68ba ldr r2, [r7, #8] 8015660: 609a str r2, [r3, #8] return netconn_apimsg(lwip_netconn_do_recv, msg); 8015662: 6879 ldr r1, [r7, #4] 8015664: 4806 ldr r0, [pc, #24] @ (8015680 ) 8015666: f7ff fd6f bl 8015148 801566a: 4603 mov r3, r0 } 801566c: 4618 mov r0, r3 801566e: 3710 adds r7, #16 8015670: 46bd mov sp, r7 8015672: bd80 pop {r7, pc} 8015674: 0802cb84 .word 0x0802cb84 8015678: 0802cde4 .word 0x0802cde4 801567c: 0802cbdc .word 0x0802cbdc 8015680: 08016d97 .word 0x08016d97 08015684 : err_t netconn_tcp_recvd(struct netconn *conn, size_t len) { 8015684: b580 push {r7, lr} 8015686: b08c sub sp, #48 @ 0x30 8015688: af00 add r7, sp, #0 801568a: 6078 str r0, [r7, #4] 801568c: 6039 str r1, [r7, #0] err_t err; API_MSG_VAR_DECLARE(msg); LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && 801568e: 687b ldr r3, [r7, #4] 8015690: 2b00 cmp r3, #0 8015692: d005 beq.n 80156a0 8015694: 687b ldr r3, [r7, #4] 8015696: 781b ldrb r3, [r3, #0] 8015698: f003 03f0 and.w r3, r3, #240 @ 0xf0 801569c: 2b10 cmp r3, #16 801569e: d009 beq.n 80156b4 80156a0: 4b0c ldr r3, [pc, #48] @ (80156d4 ) 80156a2: f240 22b5 movw r2, #693 @ 0x2b5 80156a6: 490c ldr r1, [pc, #48] @ (80156d8 ) 80156a8: 480c ldr r0, [pc, #48] @ (80156dc ) 80156aa: f014 f98f bl 80299cc 80156ae: f06f 030f mvn.w r3, #15 80156b2: e00b b.n 80156cc 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)); 80156b4: f107 030c add.w r3, r7, #12 80156b8: 461a mov r2, r3 80156ba: 6839 ldr r1, [r7, #0] 80156bc: 6878 ldr r0, [r7, #4] 80156be: f7ff ffb1 bl 8015624 80156c2: 4603 mov r3, r0 80156c4: f887 302f strb.w r3, [r7, #47] @ 0x2f API_MSG_VAR_FREE(msg); return err; 80156c8: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f } 80156cc: 4618 mov r0, r3 80156ce: 3730 adds r7, #48 @ 0x30 80156d0: 46bd mov sp, r7 80156d2: bd80 pop {r7, pc} 80156d4: 0802cb84 .word 0x0802cb84 80156d8: 0802cde4 .word 0x0802cde4 80156dc: 0802cbdc .word 0x0802cbdc 080156e0 : static err_t netconn_recv_data_tcp(struct netconn *conn, struct pbuf **new_buf, u8_t apiflags) { 80156e0: b580 push {r7, lr} 80156e2: b090 sub sp, #64 @ 0x40 80156e4: af00 add r7, sp, #0 80156e6: 60f8 str r0, [r7, #12] 80156e8: 60b9 str r1, [r7, #8] 80156ea: 4613 mov r3, r2 80156ec: 71fb strb r3, [r7, #7] API_MSG_VAR_DECLARE(msg); #if LWIP_MPU_COMPATIBLE msg = NULL; #endif if (!NETCONN_RECVMBOX_WAITABLE(conn)) { 80156ee: 68fb ldr r3, [r7, #12] 80156f0: 3310 adds r3, #16 80156f2: 4618 mov r0, r3 80156f4: f010 fdca bl 802628c 80156f8: 4603 mov r3, r0 80156fa: 2b00 cmp r3, #0 80156fc: d102 bne.n 8015704 /* This only happens when calling this function more than once *after* receiving FIN */ return ERR_CONN; 80156fe: f06f 030a mvn.w r3, #10 8015702: e072 b.n 80157ea } if (netconn_is_flag_set(conn, NETCONN_FIN_RX_PENDING)) { 8015704: 68fb ldr r3, [r7, #12] 8015706: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801570a: b25b sxtb r3, r3 801570c: 2b00 cmp r3, #0 801570e: da09 bge.n 8015724 netconn_clear_flags(conn, NETCONN_FIN_RX_PENDING); 8015710: 68fb ldr r3, [r7, #12] 8015712: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8015716: f003 037f and.w r3, r3, #127 @ 0x7f 801571a: b2da uxtb r2, r3 801571c: 68fb ldr r3, [r7, #12] 801571e: f883 2028 strb.w r2, [r3, #40] @ 0x28 goto handle_fin; 8015722: e03b b.n 801579c /* 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); 8015724: 79fb ldrb r3, [r7, #7] 8015726: 461a mov r2, r3 8015728: 68b9 ldr r1, [r7, #8] 801572a: 68f8 ldr r0, [r7, #12] 801572c: f7ff fe9a bl 8015464 8015730: 4603 mov r3, r0 8015732: f887 303f strb.w r3, [r7, #63] @ 0x3f if (err != ERR_OK) { 8015736: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f 801573a: 2b00 cmp r3, #0 801573c: d002 beq.n 8015744 if (!(apiflags & NETCONN_NOAUTORCVD)) { API_MSG_VAR_FREE(msg); } return err; 801573e: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f 8015742: e052 b.n 80157ea } buf = *new_buf; 8015744: 68bb ldr r3, [r7, #8] 8015746: 681b ldr r3, [r3, #0] 8015748: 63bb str r3, [r7, #56] @ 0x38 if (!(apiflags & NETCONN_NOAUTORCVD)) { 801574a: 79fb ldrb r3, [r7, #7] 801574c: f003 0308 and.w r3, r3, #8 8015750: 2b00 cmp r3, #0 8015752: d10e bne.n 8015772 /* Let the stack know that we have taken the data. */ u16_t len = buf ? buf->tot_len : 1; 8015754: 6bbb ldr r3, [r7, #56] @ 0x38 8015756: 2b00 cmp r3, #0 8015758: d002 beq.n 8015760 801575a: 6bbb ldr r3, [r7, #56] @ 0x38 801575c: 891b ldrh r3, [r3, #8] 801575e: e000 b.n 8015762 8015760: 2301 movs r3, #1 8015762: 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)); 8015764: 8efb ldrh r3, [r7, #54] @ 0x36 8015766: f107 0214 add.w r2, r7, #20 801576a: 4619 mov r1, r3 801576c: 68f8 ldr r0, [r7, #12] 801576e: f7ff ff59 bl 8015624 API_MSG_VAR_FREE(msg); } /* If we are closed, we indicate that we no longer wish to use the socket */ if (buf == NULL) { 8015772: 6bbb ldr r3, [r7, #56] @ 0x38 8015774: 2b00 cmp r3, #0 8015776: d136 bne.n 80157e6 if (apiflags & NETCONN_NOFIN) { 8015778: 79fb ldrb r3, [r7, #7] 801577a: f003 0310 and.w r3, r3, #16 801577e: 2b00 cmp r3, #0 8015780: d00b beq.n 801579a /* 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); 8015782: 68fb ldr r3, [r7, #12] 8015784: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8015788: f063 037f orn r3, r3, #127 @ 0x7f 801578c: b2da uxtb r2, r3 801578e: 68fb ldr r3, [r7, #12] 8015790: f883 2028 strb.w r2, [r3, #40] @ 0x28 return ERR_WOULDBLOCK; 8015794: f06f 0306 mvn.w r3, #6 8015798: e027 b.n 80157ea } else { handle_fin: 801579a: bf00 nop API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0); 801579c: 68fb ldr r3, [r7, #12] 801579e: 6b1b ldr r3, [r3, #48] @ 0x30 80157a0: 2b00 cmp r3, #0 80157a2: d005 beq.n 80157b0 80157a4: 68fb ldr r3, [r7, #12] 80157a6: 6b1b ldr r3, [r3, #48] @ 0x30 80157a8: 2200 movs r2, #0 80157aa: 2101 movs r1, #1 80157ac: 68f8 ldr r0, [r7, #12] 80157ae: 4798 blx r3 if (conn->pcb.ip == NULL) { 80157b0: 68fb ldr r3, [r7, #12] 80157b2: 685b ldr r3, [r3, #4] 80157b4: 2b00 cmp r3, #0 80157b6: d10f bne.n 80157d8 /* race condition: RST during recv */ err = netconn_err(conn); 80157b8: 68f8 ldr r0, [r7, #12] 80157ba: f000 f9a3 bl 8015b04 80157be: 4603 mov r3, r0 80157c0: f887 303f strb.w r3, [r7, #63] @ 0x3f if (err != ERR_OK) { 80157c4: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f 80157c8: 2b00 cmp r3, #0 80157ca: d002 beq.n 80157d2 return err; 80157cc: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f 80157d0: e00b b.n 80157ea } return ERR_RST; 80157d2: f06f 030d mvn.w r3, #13 80157d6: e008 b.n 80157ea } /* RX side is closed, so deallocate the recvmbox */ netconn_close_shutdown(conn, NETCONN_SHUT_RD); 80157d8: 2101 movs r1, #1 80157da: 68f8 ldr r0, [r7, #12] 80157dc: f000 f962 bl 8015aa4 /* Don' store ERR_CLSD as conn->err since we are only half-closed */ return ERR_CLSD; 80157e0: f06f 030e mvn.w r3, #14 80157e4: e001 b.n 80157ea } } return err; 80157e6: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f } 80157ea: 4618 mov r0, r3 80157ec: 3740 adds r7, #64 @ 0x40 80157ee: 46bd mov sp, r7 80157f0: bd80 pop {r7, pc} ... 080157f4 : * 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) { 80157f4: b580 push {r7, lr} 80157f6: b084 sub sp, #16 80157f8: af00 add r7, sp, #0 80157fa: 60f8 str r0, [r7, #12] 80157fc: 60b9 str r1, [r7, #8] 80157fe: 4613 mov r3, r2 8015800: 71fb strb r3, [r7, #7] LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && 8015802: 68fb ldr r3, [r7, #12] 8015804: 2b00 cmp r3, #0 8015806: d005 beq.n 8015814 8015808: 68fb ldr r3, [r7, #12] 801580a: 781b ldrb r3, [r3, #0] 801580c: f003 03f0 and.w r3, r3, #240 @ 0xf0 8015810: 2b10 cmp r3, #16 8015812: d009 beq.n 8015828 8015814: 4b0a ldr r3, [pc, #40] @ (8015840 ) 8015816: f240 3225 movw r2, #805 @ 0x325 801581a: 490a ldr r1, [pc, #40] @ (8015844 ) 801581c: 480a ldr r0, [pc, #40] @ (8015848 ) 801581e: f014 f8d5 bl 80299cc 8015822: f06f 030f mvn.w r3, #15 8015826: e006 b.n 8015836 NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;); return netconn_recv_data_tcp(conn, new_buf, apiflags); 8015828: 79fb ldrb r3, [r7, #7] 801582a: 461a mov r2, r3 801582c: 68b9 ldr r1, [r7, #8] 801582e: 68f8 ldr r0, [r7, #12] 8015830: f7ff ff56 bl 80156e0 8015834: 4603 mov r3, r0 } 8015836: 4618 mov r0, r3 8015838: 3710 adds r7, #16 801583a: 46bd mov sp, r7 801583c: bd80 pop {r7, pc} 801583e: bf00 nop 8015840: 0802cb84 .word 0x0802cb84 8015844: 0802cde4 .word 0x0802cde4 8015848: 0802cbdc .word 0x0802cbdc 0801584c : * 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) { 801584c: b580 push {r7, lr} 801584e: b084 sub sp, #16 8015850: af00 add r7, sp, #0 8015852: 60f8 str r0, [r7, #12] 8015854: 60b9 str r1, [r7, #8] 8015856: 4613 mov r3, r2 8015858: 71fb strb r3, [r7, #7] LWIP_ERROR("netconn_recv_udp_raw_netbuf: invalid conn", (conn != NULL) && 801585a: 68fb ldr r3, [r7, #12] 801585c: 2b00 cmp r3, #0 801585e: d005 beq.n 801586c 8015860: 68fb ldr r3, [r7, #12] 8015862: 781b ldrb r3, [r3, #0] 8015864: f003 03f0 and.w r3, r3, #240 @ 0xf0 8015868: 2b10 cmp r3, #16 801586a: d109 bne.n 8015880 801586c: 4b0a ldr r3, [pc, #40] @ (8015898 ) 801586e: f44f 7253 mov.w r2, #844 @ 0x34c 8015872: 490a ldr r1, [pc, #40] @ (801589c ) 8015874: 480a ldr r0, [pc, #40] @ (80158a0 ) 8015876: f014 f8a9 bl 80299cc 801587a: f06f 030f mvn.w r3, #15 801587e: e006 b.n 801588e NETCONNTYPE_GROUP(netconn_type(conn)) != NETCONN_TCP, return ERR_ARG;); return netconn_recv_data(conn, (void **)new_buf, apiflags); 8015880: 79fb ldrb r3, [r7, #7] 8015882: 461a mov r2, r3 8015884: 68b9 ldr r1, [r7, #8] 8015886: 68f8 ldr r0, [r7, #12] 8015888: f7ff fdec bl 8015464 801588c: 4603 mov r3, r0 } 801588e: 4618 mov r0, r3 8015890: 3710 adds r7, #16 8015892: 46bd mov sp, r7 8015894: bd80 pop {r7, pc} 8015896: bf00 nop 8015898: 0802cb84 .word 0x0802cb84 801589c: 0802ce08 .word 0x0802ce08 80158a0: 0802cbdc .word 0x0802cbdc 080158a4 : * @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) { 80158a4: b580 push {r7, lr} 80158a6: b08c sub sp, #48 @ 0x30 80158a8: af00 add r7, sp, #0 80158aa: 6078 str r0, [r7, #4] 80158ac: 6039 str r1, [r7, #0] API_MSG_VAR_DECLARE(msg); err_t err; LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;); 80158ae: 687b ldr r3, [r7, #4] 80158b0: 2b00 cmp r3, #0 80158b2: d109 bne.n 80158c8 80158b4: 4b0e ldr r3, [pc, #56] @ (80158f0 ) 80158b6: f240 32b2 movw r2, #946 @ 0x3b2 80158ba: 490e ldr r1, [pc, #56] @ (80158f4 ) 80158bc: 480e ldr r0, [pc, #56] @ (80158f8 ) 80158be: f014 f885 bl 80299cc 80158c2: f06f 030f mvn.w r3, #15 80158c6: e00e b.n 80158e6 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; 80158c8: 687b ldr r3, [r7, #4] 80158ca: 60fb str r3, [r7, #12] API_MSG_VAR_REF(msg).msg.b = buf; 80158cc: 683b ldr r3, [r7, #0] 80158ce: 617b str r3, [r7, #20] err = netconn_apimsg(lwip_netconn_do_send, &API_MSG_VAR_REF(msg)); 80158d0: f107 030c add.w r3, r7, #12 80158d4: 4619 mov r1, r3 80158d6: 4809 ldr r0, [pc, #36] @ (80158fc ) 80158d8: f7ff fc36 bl 8015148 80158dc: 4603 mov r3, r0 80158de: f887 302f strb.w r3, [r7, #47] @ 0x2f API_MSG_VAR_FREE(msg); return err; 80158e2: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f } 80158e6: 4618 mov r0, r3 80158e8: 3730 adds r7, #48 @ 0x30 80158ea: 46bd mov sp, r7 80158ec: bd80 pop {r7, pc} 80158ee: bf00 nop 80158f0: 0802cb84 .word 0x0802cb84 80158f4: 0802ce40 .word 0x0802ce40 80158f8: 0802cbdc .word 0x0802cbdc 80158fc: 08016cfd .word 0x08016cfd 08015900 : * @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) { 8015900: b580 push {r7, lr} 8015902: b088 sub sp, #32 8015904: af02 add r7, sp, #8 8015906: 60f8 str r0, [r7, #12] 8015908: 60b9 str r1, [r7, #8] 801590a: 607a str r2, [r7, #4] 801590c: 70fb strb r3, [r7, #3] struct netvector vector; vector.ptr = dataptr; 801590e: 68bb ldr r3, [r7, #8] 8015910: 613b str r3, [r7, #16] vector.len = size; 8015912: 687b ldr r3, [r7, #4] 8015914: 617b str r3, [r7, #20] return netconn_write_vectors_partly(conn, &vector, 1, apiflags, bytes_written); 8015916: 78fa ldrb r2, [r7, #3] 8015918: f107 0110 add.w r1, r7, #16 801591c: 6a3b ldr r3, [r7, #32] 801591e: 9300 str r3, [sp, #0] 8015920: 4613 mov r3, r2 8015922: 2201 movs r2, #1 8015924: 68f8 ldr r0, [r7, #12] 8015926: f000 f805 bl 8015934 801592a: 4603 mov r3, r0 } 801592c: 4618 mov r0, r3 801592e: 3718 adds r7, #24 8015930: 46bd mov sp, r7 8015932: bd80 pop {r7, pc} 08015934 : * @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) { 8015934: b580 push {r7, lr} 8015936: b092 sub sp, #72 @ 0x48 8015938: af00 add r7, sp, #0 801593a: 60f8 str r0, [r7, #12] 801593c: 60b9 str r1, [r7, #8] 801593e: 4611 mov r1, r2 8015940: 461a mov r2, r3 8015942: 460b mov r3, r1 8015944: 80fb strh r3, [r7, #6] 8015946: 4613 mov r3, r2 8015948: 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;); 801594a: 68fb ldr r3, [r7, #12] 801594c: 2b00 cmp r3, #0 801594e: d109 bne.n 8015964 8015950: 4b4e ldr r3, [pc, #312] @ (8015a8c ) 8015952: f240 32ee movw r2, #1006 @ 0x3ee 8015956: 494e ldr r1, [pc, #312] @ (8015a90 ) 8015958: 484e ldr r0, [pc, #312] @ (8015a94 ) 801595a: f014 f837 bl 80299cc 801595e: f06f 030f mvn.w r3, #15 8015962: e08f b.n 8015a84 LWIP_ERROR("netconn_write: invalid conn->type", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP), return ERR_VAL;); 8015964: 68fb ldr r3, [r7, #12] 8015966: 781b ldrb r3, [r3, #0] 8015968: f003 03f0 and.w r3, r3, #240 @ 0xf0 801596c: 2b10 cmp r3, #16 801596e: d009 beq.n 8015984 8015970: 4b46 ldr r3, [pc, #280] @ (8015a8c ) 8015972: f240 32ef movw r2, #1007 @ 0x3ef 8015976: 4948 ldr r1, [pc, #288] @ (8015a98 ) 8015978: 4846 ldr r0, [pc, #280] @ (8015a94 ) 801597a: f014 f827 bl 80299cc 801597e: f06f 0305 mvn.w r3, #5 8015982: e07f b.n 8015a84 dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); 8015984: 68fb ldr r3, [r7, #12] 8015986: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801598a: f003 0302 and.w r3, r3, #2 801598e: 2b00 cmp r3, #0 8015990: d104 bne.n 801599c 8015992: 797b ldrb r3, [r7, #5] 8015994: f003 0304 and.w r3, r3, #4 8015998: 2b00 cmp r3, #0 801599a: d001 beq.n 80159a0 801599c: 2301 movs r3, #1 801599e: e000 b.n 80159a2 80159a0: 2300 movs r3, #0 80159a2: 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) { 80159a6: f897 303f ldrb.w r3, [r7, #63] @ 0x3f 80159aa: 2b00 cmp r3, #0 80159ac: d005 beq.n 80159ba 80159ae: 6d3b ldr r3, [r7, #80] @ 0x50 80159b0: 2b00 cmp r3, #0 80159b2: d102 bne.n 80159ba /* 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; 80159b4: f06f 0305 mvn.w r3, #5 80159b8: e064 b.n 8015a84 } /* sum up the total size */ size = 0; 80159ba: 2300 movs r3, #0 80159bc: 647b str r3, [r7, #68] @ 0x44 for (i = 0; i < vectorcnt; i++) { 80159be: 2300 movs r3, #0 80159c0: 643b str r3, [r7, #64] @ 0x40 80159c2: e015 b.n 80159f0 size += vectors[i].len; 80159c4: 6c3b ldr r3, [r7, #64] @ 0x40 80159c6: 00db lsls r3, r3, #3 80159c8: 68ba ldr r2, [r7, #8] 80159ca: 4413 add r3, r2 80159cc: 685b ldr r3, [r3, #4] 80159ce: 6c7a ldr r2, [r7, #68] @ 0x44 80159d0: 4413 add r3, r2 80159d2: 647b str r3, [r7, #68] @ 0x44 if (size < vectors[i].len) { 80159d4: 6c3b ldr r3, [r7, #64] @ 0x40 80159d6: 00db lsls r3, r3, #3 80159d8: 68ba ldr r2, [r7, #8] 80159da: 4413 add r3, r2 80159dc: 685b ldr r3, [r3, #4] 80159de: 6c7a ldr r2, [r7, #68] @ 0x44 80159e0: 429a cmp r2, r3 80159e2: d202 bcs.n 80159ea /* overflow */ return ERR_VAL; 80159e4: f06f 0305 mvn.w r3, #5 80159e8: e04c b.n 8015a84 for (i = 0; i < vectorcnt; i++) { 80159ea: 6c3b ldr r3, [r7, #64] @ 0x40 80159ec: 3301 adds r3, #1 80159ee: 643b str r3, [r7, #64] @ 0x40 80159f0: 88fb ldrh r3, [r7, #6] 80159f2: 6c3a ldr r2, [r7, #64] @ 0x40 80159f4: 429a cmp r2, r3 80159f6: dbe5 blt.n 80159c4 } } if (size == 0) { 80159f8: 6c7b ldr r3, [r7, #68] @ 0x44 80159fa: 2b00 cmp r3, #0 80159fc: d101 bne.n 8015a02 return ERR_OK; 80159fe: 2300 movs r3, #0 8015a00: e040 b.n 8015a84 } else if (size > SSIZE_MAX) { 8015a02: 6c7b ldr r3, [r7, #68] @ 0x44 8015a04: 2b00 cmp r3, #0 8015a06: da0a bge.n 8015a1e ssize_t limited; /* this is required by the socket layer (cannot send full size_t range) */ if (!bytes_written) { 8015a08: 6d3b ldr r3, [r7, #80] @ 0x50 8015a0a: 2b00 cmp r3, #0 8015a0c: d102 bne.n 8015a14 return ERR_VAL; 8015a0e: f06f 0305 mvn.w r3, #5 8015a12: e037 b.n 8015a84 } /* limit the amount of data to send */ limited = SSIZE_MAX; 8015a14: f06f 4300 mvn.w r3, #2147483648 @ 0x80000000 8015a18: 63bb str r3, [r7, #56] @ 0x38 size = (size_t)limited; 8015a1a: 6bbb ldr r3, [r7, #56] @ 0x38 8015a1c: 647b str r3, [r7, #68] @ 0x44 } API_MSG_VAR_ALLOC(msg); /* non-blocking write sends as much */ API_MSG_VAR_REF(msg).conn = conn; 8015a1e: 68fb ldr r3, [r7, #12] 8015a20: 617b str r3, [r7, #20] API_MSG_VAR_REF(msg).msg.w.vector = vectors; 8015a22: 68bb ldr r3, [r7, #8] 8015a24: 61fb str r3, [r7, #28] API_MSG_VAR_REF(msg).msg.w.vector_cnt = vectorcnt; 8015a26: 88fb ldrh r3, [r7, #6] 8015a28: 843b strh r3, [r7, #32] API_MSG_VAR_REF(msg).msg.w.vector_off = 0; 8015a2a: 2300 movs r3, #0 8015a2c: 627b str r3, [r7, #36] @ 0x24 API_MSG_VAR_REF(msg).msg.w.apiflags = apiflags; 8015a2e: 797b ldrb r3, [r7, #5] 8015a30: f887 3030 strb.w r3, [r7, #48] @ 0x30 API_MSG_VAR_REF(msg).msg.w.len = size; 8015a34: 6c7b ldr r3, [r7, #68] @ 0x44 8015a36: 62bb str r3, [r7, #40] @ 0x28 API_MSG_VAR_REF(msg).msg.w.offset = 0; 8015a38: 2300 movs r3, #0 8015a3a: 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)); 8015a3c: f107 0314 add.w r3, r7, #20 8015a40: 4619 mov r1, r3 8015a42: 4816 ldr r0, [pc, #88] @ (8015a9c ) 8015a44: f7ff fb80 bl 8015148 8015a48: 4603 mov r3, r0 8015a4a: f887 3037 strb.w r3, [r7, #55] @ 0x37 if (err == ERR_OK) { 8015a4e: f997 3037 ldrsb.w r3, [r7, #55] @ 0x37 8015a52: 2b00 cmp r3, #0 8015a54: d114 bne.n 8015a80 if (bytes_written != NULL) { 8015a56: 6d3b ldr r3, [r7, #80] @ 0x50 8015a58: 2b00 cmp r3, #0 8015a5a: d002 beq.n 8015a62 *bytes_written = API_MSG_VAR_REF(msg).msg.w.offset; 8015a5c: 6afa ldr r2, [r7, #44] @ 0x2c 8015a5e: 6d3b ldr r3, [r7, #80] @ 0x50 8015a60: 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) { 8015a62: f897 303f ldrb.w r3, [r7, #63] @ 0x3f 8015a66: 2b00 cmp r3, #0 8015a68: d10a bne.n 8015a80 LWIP_ASSERT("do_write failed to write all bytes", API_MSG_VAR_REF(msg).msg.w.offset == size); 8015a6a: 6afb ldr r3, [r7, #44] @ 0x2c 8015a6c: 6c7a ldr r2, [r7, #68] @ 0x44 8015a6e: 429a cmp r2, r3 8015a70: d006 beq.n 8015a80 8015a72: 4b06 ldr r3, [pc, #24] @ (8015a8c ) 8015a74: f44f 6286 mov.w r2, #1072 @ 0x430 8015a78: 4909 ldr r1, [pc, #36] @ (8015aa0 ) 8015a7a: 4806 ldr r0, [pc, #24] @ (8015a94 ) 8015a7c: f013 ffa6 bl 80299cc } } API_MSG_VAR_FREE(msg); return err; 8015a80: f997 3037 ldrsb.w r3, [r7, #55] @ 0x37 } 8015a84: 4618 mov r0, r3 8015a86: 3748 adds r7, #72 @ 0x48 8015a88: 46bd mov sp, r7 8015a8a: bd80 pop {r7, pc} 8015a8c: 0802cb84 .word 0x0802cb84 8015a90: 0802ce5c .word 0x0802ce5c 8015a94: 0802cbdc .word 0x0802cbdc 8015a98: 0802ce78 .word 0x0802ce78 8015a9c: 080171a1 .word 0x080171a1 8015aa0: 0802ce9c .word 0x0802ce9c 08015aa4 : * @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) { 8015aa4: b580 push {r7, lr} 8015aa6: b08c sub sp, #48 @ 0x30 8015aa8: af00 add r7, sp, #0 8015aaa: 6078 str r0, [r7, #4] 8015aac: 460b mov r3, r1 8015aae: 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;); 8015ab0: 687b ldr r3, [r7, #4] 8015ab2: 2b00 cmp r3, #0 8015ab4: d109 bne.n 8015aca 8015ab6: 4b0f ldr r3, [pc, #60] @ (8015af4 ) 8015ab8: f240 4247 movw r2, #1095 @ 0x447 8015abc: 490e ldr r1, [pc, #56] @ (8015af8 ) 8015abe: 480f ldr r0, [pc, #60] @ (8015afc ) 8015ac0: f013 ff84 bl 80299cc 8015ac4: f06f 030f mvn.w r3, #15 8015ac8: e010 b.n 8015aec API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 8015aca: 687b ldr r3, [r7, #4] 8015acc: 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; 8015ace: 78fb ldrb r3, [r7, #3] 8015ad0: 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 = 8015ad2: 2329 movs r3, #41 @ 0x29 8015ad4: 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)); 8015ad6: f107 030c add.w r3, r7, #12 8015ada: 4619 mov r1, r3 8015adc: 4808 ldr r0, [pc, #32] @ (8015b00 ) 8015ade: f7ff fb33 bl 8015148 8015ae2: 4603 mov r3, r0 8015ae4: f887 302f strb.w r3, [r7, #47] @ 0x2f API_MSG_VAR_FREE(msg); return err; 8015ae8: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f } 8015aec: 4618 mov r0, r3 8015aee: 3730 adds r7, #48 @ 0x30 8015af0: 46bd mov sp, r7 8015af2: bd80 pop {r7, pc} 8015af4: 0802cb84 .word 0x0802cb84 8015af8: 0802cec0 .word 0x0802cec0 8015afc: 0802cbdc .word 0x0802cbdc 8015b00: 080173bd .word 0x080173bd 08015b04 : * @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) { 8015b04: b580 push {r7, lr} 8015b06: b084 sub sp, #16 8015b08: af00 add r7, sp, #0 8015b0a: 6078 str r0, [r7, #4] err_t err; SYS_ARCH_DECL_PROTECT(lev); if (conn == NULL) { 8015b0c: 687b ldr r3, [r7, #4] 8015b0e: 2b00 cmp r3, #0 8015b10: d101 bne.n 8015b16 return ERR_OK; 8015b12: 2300 movs r3, #0 8015b14: e00d b.n 8015b32 } SYS_ARCH_PROTECT(lev); 8015b16: f010 fcc3 bl 80264a0 8015b1a: 60f8 str r0, [r7, #12] err = conn->pending_err; 8015b1c: 687b ldr r3, [r7, #4] 8015b1e: 7a1b ldrb r3, [r3, #8] 8015b20: 72fb strb r3, [r7, #11] conn->pending_err = ERR_OK; 8015b22: 687b ldr r3, [r7, #4] 8015b24: 2200 movs r2, #0 8015b26: 721a strb r2, [r3, #8] SYS_ARCH_UNPROTECT(lev); 8015b28: 68f8 ldr r0, [r7, #12] 8015b2a: f010 fcc7 bl 80264bc return err; 8015b2e: f997 300b ldrsb.w r3, [r7, #11] } 8015b32: 4618 mov r0, r3 8015b34: 3710 adds r7, #16 8015b36: 46bd mov sp, r7 8015b38: bd80 pop {r7, pc} ... 08015b3c : 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) { 8015b3c: b580 push {r7, lr} 8015b3e: b082 sub sp, #8 8015b40: af00 add r7, sp, #0 8015b42: 4603 mov r3, r0 8015b44: 71fb strb r3, [r7, #7] switch (err) { 8015b46: f997 3007 ldrsb.w r3, [r7, #7] 8015b4a: f113 0f0d cmn.w r3, #13 8015b4e: d009 beq.n 8015b64 8015b50: f113 0f0d cmn.w r3, #13 8015b54: dc0c bgt.n 8015b70 8015b56: f113 0f0f cmn.w r3, #15 8015b5a: d007 beq.n 8015b6c 8015b5c: f113 0f0e cmn.w r3, #14 8015b60: d002 beq.n 8015b68 8015b62: e005 b.n 8015b70 case ERR_ABRT: return LWIP_CONST_CAST(void *, &netconn_aborted); 8015b64: 4b0a ldr r3, [pc, #40] @ (8015b90 ) 8015b66: e00e b.n 8015b86 case ERR_RST: return LWIP_CONST_CAST(void *, &netconn_reset); 8015b68: 4b0a ldr r3, [pc, #40] @ (8015b94 ) 8015b6a: e00c b.n 8015b86 case ERR_CLSD: return LWIP_CONST_CAST(void *, &netconn_closed); 8015b6c: 4b0a ldr r3, [pc, #40] @ (8015b98 ) 8015b6e: e00a b.n 8015b86 default: LWIP_ASSERT("unhandled error", err == ERR_OK); 8015b70: f997 3007 ldrsb.w r3, [r7, #7] 8015b74: 2b00 cmp r3, #0 8015b76: d005 beq.n 8015b84 8015b78: 4b08 ldr r3, [pc, #32] @ (8015b9c ) 8015b7a: 227d movs r2, #125 @ 0x7d 8015b7c: 4908 ldr r1, [pc, #32] @ (8015ba0 ) 8015b7e: 4809 ldr r0, [pc, #36] @ (8015ba4 ) 8015b80: f013 ff24 bl 80299cc return NULL; 8015b84: 2300 movs r3, #0 } } 8015b86: 4618 mov r0, r3 8015b88: 3708 adds r7, #8 8015b8a: 46bd mov sp, r7 8015b8c: bd80 pop {r7, pc} 8015b8e: bf00 nop 8015b90: 08030a74 .word 0x08030a74 8015b94: 08030a75 .word 0x08030a75 8015b98: 08030a76 .word 0x08030a76 8015b9c: 0802cedc .word 0x0802cedc 8015ba0: 0802cf10 .word 0x0802cf10 8015ba4: 0802cf20 .word 0x0802cf20 08015ba8 : int lwip_netconn_is_err_msg(void *msg, err_t *err) { 8015ba8: b580 push {r7, lr} 8015baa: b082 sub sp, #8 8015bac: af00 add r7, sp, #0 8015bae: 6078 str r0, [r7, #4] 8015bb0: 6039 str r1, [r7, #0] LWIP_ASSERT("err != NULL", err != NULL); 8015bb2: 683b ldr r3, [r7, #0] 8015bb4: 2b00 cmp r3, #0 8015bb6: d105 bne.n 8015bc4 8015bb8: 4b12 ldr r3, [pc, #72] @ (8015c04 ) 8015bba: 2285 movs r2, #133 @ 0x85 8015bbc: 4912 ldr r1, [pc, #72] @ (8015c08 ) 8015bbe: 4813 ldr r0, [pc, #76] @ (8015c0c ) 8015bc0: f013 ff04 bl 80299cc if (msg == &netconn_aborted) { 8015bc4: 687b ldr r3, [r7, #4] 8015bc6: 4a12 ldr r2, [pc, #72] @ (8015c10 ) 8015bc8: 4293 cmp r3, r2 8015bca: d104 bne.n 8015bd6 *err = ERR_ABRT; 8015bcc: 683b ldr r3, [r7, #0] 8015bce: 22f3 movs r2, #243 @ 0xf3 8015bd0: 701a strb r2, [r3, #0] return 1; 8015bd2: 2301 movs r3, #1 8015bd4: e012 b.n 8015bfc } else if (msg == &netconn_reset) { 8015bd6: 687b ldr r3, [r7, #4] 8015bd8: 4a0e ldr r2, [pc, #56] @ (8015c14 ) 8015bda: 4293 cmp r3, r2 8015bdc: d104 bne.n 8015be8 *err = ERR_RST; 8015bde: 683b ldr r3, [r7, #0] 8015be0: 22f2 movs r2, #242 @ 0xf2 8015be2: 701a strb r2, [r3, #0] return 1; 8015be4: 2301 movs r3, #1 8015be6: e009 b.n 8015bfc } else if (msg == &netconn_closed) { 8015be8: 687b ldr r3, [r7, #4] 8015bea: 4a0b ldr r2, [pc, #44] @ (8015c18 ) 8015bec: 4293 cmp r3, r2 8015bee: d104 bne.n 8015bfa *err = ERR_CLSD; 8015bf0: 683b ldr r3, [r7, #0] 8015bf2: 22f1 movs r2, #241 @ 0xf1 8015bf4: 701a strb r2, [r3, #0] return 1; 8015bf6: 2301 movs r3, #1 8015bf8: e000 b.n 8015bfc } return 0; 8015bfa: 2300 movs r3, #0 } 8015bfc: 4618 mov r0, r3 8015bfe: 3708 adds r7, #8 8015c00: 46bd mov sp, r7 8015c02: bd80 pop {r7, pc} 8015c04: 0802cedc .word 0x0802cedc 8015c08: 0802cf48 .word 0x0802cf48 8015c0c: 0802cf20 .word 0x0802cf20 8015c10: 08030a74 .word 0x08030a74 8015c14: 08030a75 .word 0x08030a75 8015c18: 08030a76 .word 0x08030a76 08015c1c : * @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) { 8015c1c: b580 push {r7, lr} 8015c1e: b08a sub sp, #40 @ 0x28 8015c20: af00 add r7, sp, #0 8015c22: 60f8 str r0, [r7, #12] 8015c24: 60b9 str r1, [r7, #8] 8015c26: 607a str r2, [r7, #4] 8015c28: 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); 8015c2a: 68bb ldr r3, [r7, #8] 8015c2c: 2b00 cmp r3, #0 8015c2e: d105 bne.n 8015c3c 8015c30: 4b43 ldr r3, [pc, #268] @ (8015d40 ) 8015c32: 22e5 movs r2, #229 @ 0xe5 8015c34: 4943 ldr r1, [pc, #268] @ (8015d44 ) 8015c36: 4844 ldr r0, [pc, #272] @ (8015d48 ) 8015c38: f013 fec8 bl 80299cc LWIP_ASSERT("recv_udp must have an argument", arg != NULL); 8015c3c: 68fb ldr r3, [r7, #12] 8015c3e: 2b00 cmp r3, #0 8015c40: d105 bne.n 8015c4e 8015c42: 4b3f ldr r3, [pc, #252] @ (8015d40 ) 8015c44: 22e6 movs r2, #230 @ 0xe6 8015c46: 4941 ldr r1, [pc, #260] @ (8015d4c ) 8015c48: 483f ldr r0, [pc, #252] @ (8015d48 ) 8015c4a: f013 febf bl 80299cc conn = (struct netconn *)arg; 8015c4e: 68fb ldr r3, [r7, #12] 8015c50: 627b str r3, [r7, #36] @ 0x24 if (conn == NULL) { 8015c52: 6a7b ldr r3, [r7, #36] @ 0x24 8015c54: 2b00 cmp r3, #0 8015c56: d103 bne.n 8015c60 pbuf_free(p); 8015c58: 6878 ldr r0, [r7, #4] 8015c5a: f004 fc3f bl 801a4dc return; 8015c5e: e06b b.n 8015d38 } LWIP_ASSERT("recv_udp: recv for wrong pcb!", conn->pcb.udp == pcb); 8015c60: 6a7b ldr r3, [r7, #36] @ 0x24 8015c62: 685b ldr r3, [r3, #4] 8015c64: 68ba ldr r2, [r7, #8] 8015c66: 429a cmp r2, r3 8015c68: d005 beq.n 8015c76 8015c6a: 4b35 ldr r3, [pc, #212] @ (8015d40 ) 8015c6c: 22ee movs r2, #238 @ 0xee 8015c6e: 4938 ldr r1, [pc, #224] @ (8015d50 ) 8015c70: 4835 ldr r0, [pc, #212] @ (8015d48 ) 8015c72: f013 feab bl 80299cc #if LWIP_SO_RCVBUF SYS_ARCH_GET(conn->recv_avail, recv_avail); 8015c76: f010 fc13 bl 80264a0 8015c7a: 6238 str r0, [r7, #32] 8015c7c: 6a7b ldr r3, [r7, #36] @ 0x24 8015c7e: 6a5b ldr r3, [r3, #36] @ 0x24 8015c80: 61fb str r3, [r7, #28] 8015c82: 6a38 ldr r0, [r7, #32] 8015c84: f010 fc1a bl 80264bc if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox) || 8015c88: 6a7b ldr r3, [r7, #36] @ 0x24 8015c8a: 3310 adds r3, #16 8015c8c: 4618 mov r0, r3 8015c8e: f010 fafd bl 802628c 8015c92: 4603 mov r3, r0 8015c94: 2b00 cmp r3, #0 8015c96: d008 beq.n 8015caa ((recv_avail + (int)(p->tot_len)) > conn->recv_bufsize)) { 8015c98: 687b ldr r3, [r7, #4] 8015c9a: 891b ldrh r3, [r3, #8] 8015c9c: 461a mov r2, r3 8015c9e: 69fb ldr r3, [r7, #28] 8015ca0: 441a add r2, r3 8015ca2: 6a7b ldr r3, [r7, #36] @ 0x24 8015ca4: 6a1b ldr r3, [r3, #32] if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox) || 8015ca6: 429a cmp r2, r3 8015ca8: dd03 ble.n 8015cb2 #else /* LWIP_SO_RCVBUF */ if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { #endif /* LWIP_SO_RCVBUF */ pbuf_free(p); 8015caa: 6878 ldr r0, [r7, #4] 8015cac: f004 fc16 bl 801a4dc return; 8015cb0: e042 b.n 8015d38 } buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); 8015cb2: 2006 movs r0, #6 8015cb4: f003 fcae bl 8019614 8015cb8: 61b8 str r0, [r7, #24] if (buf == NULL) { 8015cba: 69bb ldr r3, [r7, #24] 8015cbc: 2b00 cmp r3, #0 8015cbe: d103 bne.n 8015cc8 pbuf_free(p); 8015cc0: 6878 ldr r0, [r7, #4] 8015cc2: f004 fc0b bl 801a4dc return; 8015cc6: e037 b.n 8015d38 } else { buf->p = p; 8015cc8: 69bb ldr r3, [r7, #24] 8015cca: 687a ldr r2, [r7, #4] 8015ccc: 601a str r2, [r3, #0] buf->ptr = p; 8015cce: 69bb ldr r3, [r7, #24] 8015cd0: 687a ldr r2, [r7, #4] 8015cd2: 605a str r2, [r3, #4] ip_addr_set(&buf->addr, addr); 8015cd4: 683b ldr r3, [r7, #0] 8015cd6: 2b00 cmp r3, #0 8015cd8: d002 beq.n 8015ce0 8015cda: 683b ldr r3, [r7, #0] 8015cdc: 681b ldr r3, [r3, #0] 8015cde: e000 b.n 8015ce2 8015ce0: 2300 movs r3, #0 8015ce2: 69ba ldr r2, [r7, #24] 8015ce4: 6093 str r3, [r2, #8] buf->port = port; 8015ce6: 69bb ldr r3, [r7, #24] 8015ce8: 8e3a ldrh r2, [r7, #48] @ 0x30 8015cea: 819a strh r2, [r3, #12] buf->toport_chksum = udphdr->dest; } #endif /* LWIP_NETBUF_RECVINFO */ } len = p->tot_len; 8015cec: 687b ldr r3, [r7, #4] 8015cee: 891b ldrh r3, [r3, #8] 8015cf0: 82fb strh r3, [r7, #22] if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { 8015cf2: 6a7b ldr r3, [r7, #36] @ 0x24 8015cf4: 3310 adds r3, #16 8015cf6: 69b9 ldr r1, [r7, #24] 8015cf8: 4618 mov r0, r3 8015cfa: f010 fa65 bl 80261c8 8015cfe: 4603 mov r3, r0 8015d00: 2b00 cmp r3, #0 8015d02: d003 beq.n 8015d0c netbuf_delete(buf); 8015d04: 69b8 ldr r0, [r7, #24] 8015d06: f001 fbff bl 8017508 return; 8015d0a: e015 b.n 8015d38 } else { #if LWIP_SO_RCVBUF SYS_ARCH_INC(conn->recv_avail, len); 8015d0c: f010 fbc8 bl 80264a0 8015d10: 6138 str r0, [r7, #16] 8015d12: 6a7b ldr r3, [r7, #36] @ 0x24 8015d14: 6a5a ldr r2, [r3, #36] @ 0x24 8015d16: 8afb ldrh r3, [r7, #22] 8015d18: 441a add r2, r3 8015d1a: 6a7b ldr r3, [r7, #36] @ 0x24 8015d1c: 625a str r2, [r3, #36] @ 0x24 8015d1e: 6938 ldr r0, [r7, #16] 8015d20: f010 fbcc bl 80264bc #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); 8015d24: 6a7b ldr r3, [r7, #36] @ 0x24 8015d26: 6b1b ldr r3, [r3, #48] @ 0x30 8015d28: 2b00 cmp r3, #0 8015d2a: d005 beq.n 8015d38 8015d2c: 6a7b ldr r3, [r7, #36] @ 0x24 8015d2e: 6b1b ldr r3, [r3, #48] @ 0x30 8015d30: 8afa ldrh r2, [r7, #22] 8015d32: 2100 movs r1, #0 8015d34: 6a78 ldr r0, [r7, #36] @ 0x24 8015d36: 4798 blx r3 } } 8015d38: 3728 adds r7, #40 @ 0x28 8015d3a: 46bd mov sp, r7 8015d3c: bd80 pop {r7, pc} 8015d3e: bf00 nop 8015d40: 0802cedc .word 0x0802cedc 8015d44: 0802cf54 .word 0x0802cf54 8015d48: 0802cf20 .word 0x0802cf20 8015d4c: 0802cf78 .word 0x0802cf78 8015d50: 0802cf98 .word 0x0802cf98 08015d54 : * * @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) { 8015d54: b580 push {r7, lr} 8015d56: b088 sub sp, #32 8015d58: af00 add r7, sp, #0 8015d5a: 60f8 str r0, [r7, #12] 8015d5c: 60b9 str r1, [r7, #8] 8015d5e: 607a str r2, [r7, #4] 8015d60: 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); 8015d62: 68bb ldr r3, [r7, #8] 8015d64: 2b00 cmp r3, #0 8015d66: d106 bne.n 8015d76 8015d68: 4b3c ldr r3, [pc, #240] @ (8015e5c ) 8015d6a: f44f 7296 mov.w r2, #300 @ 0x12c 8015d6e: 493c ldr r1, [pc, #240] @ (8015e60 ) 8015d70: 483c ldr r0, [pc, #240] @ (8015e64 ) 8015d72: f013 fe2b bl 80299cc LWIP_ASSERT("recv_tcp must have an argument", arg != NULL); 8015d76: 68fb ldr r3, [r7, #12] 8015d78: 2b00 cmp r3, #0 8015d7a: d106 bne.n 8015d8a 8015d7c: 4b37 ldr r3, [pc, #220] @ (8015e5c ) 8015d7e: f240 122d movw r2, #301 @ 0x12d 8015d82: 4939 ldr r1, [pc, #228] @ (8015e68 ) 8015d84: 4837 ldr r0, [pc, #220] @ (8015e64 ) 8015d86: f013 fe21 bl 80299cc LWIP_ASSERT("err != ERR_OK unhandled", err == ERR_OK); 8015d8a: f997 3003 ldrsb.w r3, [r7, #3] 8015d8e: 2b00 cmp r3, #0 8015d90: d006 beq.n 8015da0 8015d92: 4b32 ldr r3, [pc, #200] @ (8015e5c ) 8015d94: f44f 7297 mov.w r2, #302 @ 0x12e 8015d98: 4934 ldr r1, [pc, #208] @ (8015e6c ) 8015d9a: 4832 ldr r0, [pc, #200] @ (8015e64 ) 8015d9c: f013 fe16 bl 80299cc LWIP_UNUSED_ARG(err); /* for LWIP_NOASSERT */ conn = (struct netconn *)arg; 8015da0: 68fb ldr r3, [r7, #12] 8015da2: 617b str r3, [r7, #20] if (conn == NULL) { 8015da4: 697b ldr r3, [r7, #20] 8015da6: 2b00 cmp r3, #0 8015da8: d102 bne.n 8015db0 return ERR_VAL; 8015daa: f06f 0305 mvn.w r3, #5 8015dae: e051 b.n 8015e54 } LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb); 8015db0: 697b ldr r3, [r7, #20] 8015db2: 685b ldr r3, [r3, #4] 8015db4: 68ba ldr r2, [r7, #8] 8015db6: 429a cmp r2, r3 8015db8: d006 beq.n 8015dc8 8015dba: 4b28 ldr r3, [pc, #160] @ (8015e5c ) 8015dbc: f240 1235 movw r2, #309 @ 0x135 8015dc0: 492b ldr r1, [pc, #172] @ (8015e70 ) 8015dc2: 4828 ldr r0, [pc, #160] @ (8015e64 ) 8015dc4: f013 fe02 bl 80299cc if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { 8015dc8: 697b ldr r3, [r7, #20] 8015dca: 3310 adds r3, #16 8015dcc: 4618 mov r0, r3 8015dce: f010 fa5d bl 802628c 8015dd2: 4603 mov r3, r0 8015dd4: 2b00 cmp r3, #0 8015dd6: d10d bne.n 8015df4 /* recvmbox already deleted */ if (p != NULL) { 8015dd8: 687b ldr r3, [r7, #4] 8015dda: 2b00 cmp r3, #0 8015ddc: d008 beq.n 8015df0 tcp_recved(pcb, p->tot_len); 8015dde: 687b ldr r3, [r7, #4] 8015de0: 891b ldrh r3, [r3, #8] 8015de2: 4619 mov r1, r3 8015de4: 68b8 ldr r0, [r7, #8] 8015de6: f005 f9e5 bl 801b1b4 pbuf_free(p); 8015dea: 6878 ldr r0, [r7, #4] 8015dec: f004 fb76 bl 801a4dc } return ERR_OK; 8015df0: 2300 movs r3, #0 8015df2: e02f b.n 8015e54 } /* 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) { 8015df4: 687b ldr r3, [r7, #4] 8015df6: 2b00 cmp r3, #0 8015df8: d005 beq.n 8015e06 msg = p; 8015dfa: 687b ldr r3, [r7, #4] 8015dfc: 61bb str r3, [r7, #24] len = p->tot_len; 8015dfe: 687b ldr r3, [r7, #4] 8015e00: 891b ldrh r3, [r3, #8] 8015e02: 83fb strh r3, [r7, #30] 8015e04: e003 b.n 8015e0e } else { msg = LWIP_CONST_CAST(void *, &netconn_closed); 8015e06: 4b1b ldr r3, [pc, #108] @ (8015e74 ) 8015e08: 61bb str r3, [r7, #24] len = 0; 8015e0a: 2300 movs r3, #0 8015e0c: 83fb strh r3, [r7, #30] } if (sys_mbox_trypost(&conn->recvmbox, msg) != ERR_OK) { 8015e0e: 697b ldr r3, [r7, #20] 8015e10: 3310 adds r3, #16 8015e12: 69b9 ldr r1, [r7, #24] 8015e14: 4618 mov r0, r3 8015e16: f010 f9d7 bl 80261c8 8015e1a: 4603 mov r3, r0 8015e1c: 2b00 cmp r3, #0 8015e1e: d002 beq.n 8015e26 /* don't deallocate p: it is presented to us later again from tcp_fasttmr! */ return ERR_MEM; 8015e20: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8015e24: e016 b.n 8015e54 } else { #if LWIP_SO_RCVBUF SYS_ARCH_INC(conn->recv_avail, len); 8015e26: f010 fb3b bl 80264a0 8015e2a: 6138 str r0, [r7, #16] 8015e2c: 697b ldr r3, [r7, #20] 8015e2e: 6a5a ldr r2, [r3, #36] @ 0x24 8015e30: 8bfb ldrh r3, [r7, #30] 8015e32: 441a add r2, r3 8015e34: 697b ldr r3, [r7, #20] 8015e36: 625a str r2, [r3, #36] @ 0x24 8015e38: 6938 ldr r0, [r7, #16] 8015e3a: f010 fb3f bl 80264bc #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); 8015e3e: 697b ldr r3, [r7, #20] 8015e40: 6b1b ldr r3, [r3, #48] @ 0x30 8015e42: 2b00 cmp r3, #0 8015e44: d005 beq.n 8015e52 8015e46: 697b ldr r3, [r7, #20] 8015e48: 6b1b ldr r3, [r3, #48] @ 0x30 8015e4a: 8bfa ldrh r2, [r7, #30] 8015e4c: 2100 movs r1, #0 8015e4e: 6978 ldr r0, [r7, #20] 8015e50: 4798 blx r3 } return ERR_OK; 8015e52: 2300 movs r3, #0 } 8015e54: 4618 mov r0, r3 8015e56: 3720 adds r7, #32 8015e58: 46bd mov sp, r7 8015e5a: bd80 pop {r7, pc} 8015e5c: 0802cedc .word 0x0802cedc 8015e60: 0802cfb8 .word 0x0802cfb8 8015e64: 0802cf20 .word 0x0802cf20 8015e68: 0802cfdc .word 0x0802cfdc 8015e6c: 0802cffc .word 0x0802cffc 8015e70: 0802d014 .word 0x0802d014 8015e74: 08030a76 .word 0x08030a76 08015e78 : * * @see tcp.h (struct tcp_pcb.poll) for parameters and return value */ static err_t poll_tcp(void *arg, struct tcp_pcb *pcb) { 8015e78: b580 push {r7, lr} 8015e7a: b084 sub sp, #16 8015e7c: af00 add r7, sp, #0 8015e7e: 6078 str r0, [r7, #4] 8015e80: 6039 str r1, [r7, #0] struct netconn *conn = (struct netconn *)arg; 8015e82: 687b ldr r3, [r7, #4] 8015e84: 60fb str r3, [r7, #12] LWIP_UNUSED_ARG(pcb); LWIP_ASSERT("conn != NULL", (conn != NULL)); 8015e86: 68fb ldr r3, [r7, #12] 8015e88: 2b00 cmp r3, #0 8015e8a: d106 bne.n 8015e9a 8015e8c: 4b2b ldr r3, [pc, #172] @ (8015f3c ) 8015e8e: f44f 72b5 mov.w r2, #362 @ 0x16a 8015e92: 492b ldr r1, [pc, #172] @ (8015f40 ) 8015e94: 482b ldr r0, [pc, #172] @ (8015f44 ) 8015e96: f013 fd99 bl 80299cc if (conn->state == NETCONN_WRITE) { 8015e9a: 68fb ldr r3, [r7, #12] 8015e9c: 785b ldrb r3, [r3, #1] 8015e9e: 2b01 cmp r3, #1 8015ea0: d104 bne.n 8015eac lwip_netconn_do_writemore(conn WRITE_DELAYED); 8015ea2: 2101 movs r1, #1 8015ea4: 68f8 ldr r0, [r7, #12] 8015ea6: f000 ffab bl 8016e00 8015eaa: e016 b.n 8015eda } else if (conn->state == NETCONN_CLOSE) { 8015eac: 68fb ldr r3, [r7, #12] 8015eae: 785b ldrb r3, [r3, #1] 8015eb0: 2b04 cmp r3, #4 8015eb2: d112 bne.n 8015eda #if !LWIP_SO_SNDTIMEO && !LWIP_SO_LINGER if (conn->current_msg && conn->current_msg->msg.sd.polls_left) { 8015eb4: 68fb ldr r3, [r7, #12] 8015eb6: 6adb ldr r3, [r3, #44] @ 0x2c 8015eb8: 2b00 cmp r3, #0 8015eba: d00a beq.n 8015ed2 8015ebc: 68fb ldr r3, [r7, #12] 8015ebe: 6adb ldr r3, [r3, #44] @ 0x2c 8015ec0: 7a5b ldrb r3, [r3, #9] 8015ec2: 2b00 cmp r3, #0 8015ec4: d005 beq.n 8015ed2 conn->current_msg->msg.sd.polls_left--; 8015ec6: 68fb ldr r3, [r7, #12] 8015ec8: 6adb ldr r3, [r3, #44] @ 0x2c 8015eca: 7a5a ldrb r2, [r3, #9] 8015ecc: 3a01 subs r2, #1 8015ece: b2d2 uxtb r2, r2 8015ed0: 725a strb r2, [r3, #9] } #endif /* !LWIP_SO_SNDTIMEO && !LWIP_SO_LINGER */ lwip_netconn_do_close_internal(conn WRITE_DELAYED); 8015ed2: 2101 movs r1, #1 8015ed4: 68f8 ldr r0, [r7, #12] 8015ed6: f000 fb53 bl 8016580 } /* @todo: implement connect timeout here? */ /* Did a nonblocking write fail before? Then check available write-space. */ if (conn->flags & NETCONN_FLAG_CHECK_WRITESPACE) { 8015eda: 68fb ldr r3, [r7, #12] 8015edc: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8015ee0: f003 0310 and.w r3, r3, #16 8015ee4: 2b00 cmp r3, #0 8015ee6: d024 beq.n 8015f32 /* 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) && 8015ee8: 68fb ldr r3, [r7, #12] 8015eea: 685b ldr r3, [r3, #4] 8015eec: 2b00 cmp r3, #0 8015eee: d020 beq.n 8015f32 8015ef0: 68fb ldr r3, [r7, #12] 8015ef2: 685b ldr r3, [r3, #4] 8015ef4: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 8015ef8: f640 3269 movw r2, #2921 @ 0xb69 8015efc: 4293 cmp r3, r2 8015efe: d918 bls.n 8015f32 (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { 8015f00: 68fb ldr r3, [r7, #12] 8015f02: 685b ldr r3, [r3, #4] 8015f04: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && 8015f08: 2b07 cmp r3, #7 8015f0a: d812 bhi.n 8015f32 netconn_clear_flags(conn, NETCONN_FLAG_CHECK_WRITESPACE); 8015f0c: 68fb ldr r3, [r7, #12] 8015f0e: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8015f12: f023 0310 bic.w r3, r3, #16 8015f16: b2da uxtb r2, r3 8015f18: 68fb ldr r3, [r7, #12] 8015f1a: f883 2028 strb.w r2, [r3, #40] @ 0x28 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 8015f1e: 68fb ldr r3, [r7, #12] 8015f20: 6b1b ldr r3, [r3, #48] @ 0x30 8015f22: 2b00 cmp r3, #0 8015f24: d005 beq.n 8015f32 8015f26: 68fb ldr r3, [r7, #12] 8015f28: 6b1b ldr r3, [r3, #48] @ 0x30 8015f2a: 2200 movs r2, #0 8015f2c: 2102 movs r1, #2 8015f2e: 68f8 ldr r0, [r7, #12] 8015f30: 4798 blx r3 } } return ERR_OK; 8015f32: 2300 movs r3, #0 } 8015f34: 4618 mov r0, r3 8015f36: 3710 adds r7, #16 8015f38: 46bd mov sp, r7 8015f3a: bd80 pop {r7, pc} 8015f3c: 0802cedc .word 0x0802cedc 8015f40: 0802d034 .word 0x0802d034 8015f44: 0802cf20 .word 0x0802cf20 08015f48 : * * @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) { 8015f48: b580 push {r7, lr} 8015f4a: b086 sub sp, #24 8015f4c: af00 add r7, sp, #0 8015f4e: 60f8 str r0, [r7, #12] 8015f50: 60b9 str r1, [r7, #8] 8015f52: 4613 mov r3, r2 8015f54: 80fb strh r3, [r7, #6] struct netconn *conn = (struct netconn *)arg; 8015f56: 68fb ldr r3, [r7, #12] 8015f58: 617b str r3, [r7, #20] LWIP_UNUSED_ARG(pcb); LWIP_ASSERT("conn != NULL", (conn != NULL)); 8015f5a: 697b ldr r3, [r7, #20] 8015f5c: 2b00 cmp r3, #0 8015f5e: d106 bne.n 8015f6e 8015f60: 4b22 ldr r3, [pc, #136] @ (8015fec ) 8015f62: f240 1293 movw r2, #403 @ 0x193 8015f66: 4922 ldr r1, [pc, #136] @ (8015ff0 ) 8015f68: 4822 ldr r0, [pc, #136] @ (8015ff4 ) 8015f6a: f013 fd2f bl 80299cc if (conn) { 8015f6e: 697b ldr r3, [r7, #20] 8015f70: 2b00 cmp r3, #0 8015f72: d035 beq.n 8015fe0 if (conn->state == NETCONN_WRITE) { 8015f74: 697b ldr r3, [r7, #20] 8015f76: 785b ldrb r3, [r3, #1] 8015f78: 2b01 cmp r3, #1 8015f7a: d104 bne.n 8015f86 lwip_netconn_do_writemore(conn WRITE_DELAYED); 8015f7c: 2101 movs r1, #1 8015f7e: 6978 ldr r0, [r7, #20] 8015f80: f000 ff3e bl 8016e00 8015f84: e007 b.n 8015f96 } else if (conn->state == NETCONN_CLOSE) { 8015f86: 697b ldr r3, [r7, #20] 8015f88: 785b ldrb r3, [r3, #1] 8015f8a: 2b04 cmp r3, #4 8015f8c: d103 bne.n 8015f96 lwip_netconn_do_close_internal(conn WRITE_DELAYED); 8015f8e: 2101 movs r1, #1 8015f90: 6978 ldr r0, [r7, #20] 8015f92: f000 faf5 bl 8016580 } /* 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) && 8015f96: 697b ldr r3, [r7, #20] 8015f98: 685b ldr r3, [r3, #4] 8015f9a: 2b00 cmp r3, #0 8015f9c: d020 beq.n 8015fe0 8015f9e: 697b ldr r3, [r7, #20] 8015fa0: 685b ldr r3, [r3, #4] 8015fa2: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 8015fa6: f640 3269 movw r2, #2921 @ 0xb69 8015faa: 4293 cmp r3, r2 8015fac: d918 bls.n 8015fe0 (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { 8015fae: 697b ldr r3, [r7, #20] 8015fb0: 685b ldr r3, [r3, #4] 8015fb2: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && 8015fb6: 2b07 cmp r3, #7 8015fb8: d812 bhi.n 8015fe0 netconn_clear_flags(conn, NETCONN_FLAG_CHECK_WRITESPACE); 8015fba: 697b ldr r3, [r7, #20] 8015fbc: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8015fc0: f023 0310 bic.w r3, r3, #16 8015fc4: b2da uxtb r2, r3 8015fc6: 697b ldr r3, [r7, #20] 8015fc8: f883 2028 strb.w r2, [r3, #40] @ 0x28 API_EVENT(conn, NETCONN_EVT_SENDPLUS, len); 8015fcc: 697b ldr r3, [r7, #20] 8015fce: 6b1b ldr r3, [r3, #48] @ 0x30 8015fd0: 2b00 cmp r3, #0 8015fd2: d005 beq.n 8015fe0 8015fd4: 697b ldr r3, [r7, #20] 8015fd6: 6b1b ldr r3, [r3, #48] @ 0x30 8015fd8: 88fa ldrh r2, [r7, #6] 8015fda: 2102 movs r1, #2 8015fdc: 6978 ldr r0, [r7, #20] 8015fde: 4798 blx r3 } } return ERR_OK; 8015fe0: 2300 movs r3, #0 } 8015fe2: 4618 mov r0, r3 8015fe4: 3718 adds r7, #24 8015fe6: 46bd mov sp, r7 8015fe8: bd80 pop {r7, pc} 8015fea: bf00 nop 8015fec: 0802cedc .word 0x0802cedc 8015ff0: 0802d034 .word 0x0802d034 8015ff4: 0802cf20 .word 0x0802cf20 08015ff8 : * * @see tcp.h (struct tcp_pcb.err) for parameters */ static void err_tcp(void *arg, err_t err) { 8015ff8: b580 push {r7, lr} 8015ffa: b088 sub sp, #32 8015ffc: af00 add r7, sp, #0 8015ffe: 6078 str r0, [r7, #4] 8016000: 460b mov r3, r1 8016002: 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; 8016004: 687b ldr r3, [r7, #4] 8016006: 61fb str r3, [r7, #28] LWIP_ASSERT("conn != NULL", (conn != NULL)); 8016008: 69fb ldr r3, [r7, #28] 801600a: 2b00 cmp r3, #0 801600c: d106 bne.n 801601c 801600e: 4b61 ldr r3, [pc, #388] @ (8016194 ) 8016010: f44f 72dc mov.w r2, #440 @ 0x1b8 8016014: 4960 ldr r1, [pc, #384] @ (8016198 ) 8016016: 4861 ldr r0, [pc, #388] @ (801619c ) 8016018: f013 fcd8 bl 80299cc SYS_ARCH_PROTECT(lev); 801601c: f010 fa40 bl 80264a0 8016020: 61b8 str r0, [r7, #24] /* when err is called, the pcb is deallocated, so delete the reference */ conn->pcb.tcp = NULL; 8016022: 69fb ldr r3, [r7, #28] 8016024: 2200 movs r2, #0 8016026: 605a str r2, [r3, #4] /* store pending error */ conn->pending_err = err; 8016028: 69fb ldr r3, [r7, #28] 801602a: 78fa ldrb r2, [r7, #3] 801602c: 721a strb r2, [r3, #8] /* prevent application threads from blocking on 'recvmbox'/'acceptmbox' */ conn->flags |= NETCONN_FLAG_MBOXCLOSED; 801602e: 69fb ldr r3, [r7, #28] 8016030: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016034: f043 0301 orr.w r3, r3, #1 8016038: b2da uxtb r2, r3 801603a: 69fb ldr r3, [r7, #28] 801603c: f883 2028 strb.w r2, [r3, #40] @ 0x28 /* reset conn->state now before waking up other threads */ old_state = conn->state; 8016040: 69fb ldr r3, [r7, #28] 8016042: 785b ldrb r3, [r3, #1] 8016044: 75fb strb r3, [r7, #23] conn->state = NETCONN_NONE; 8016046: 69fb ldr r3, [r7, #28] 8016048: 2200 movs r2, #0 801604a: 705a strb r2, [r3, #1] SYS_ARCH_UNPROTECT(lev); 801604c: 69b8 ldr r0, [r7, #24] 801604e: f010 fa35 bl 80264bc /* Notify the user layer about a connection error. Used to signal select. */ API_EVENT(conn, NETCONN_EVT_ERROR, 0); 8016052: 69fb ldr r3, [r7, #28] 8016054: 6b1b ldr r3, [r3, #48] @ 0x30 8016056: 2b00 cmp r3, #0 8016058: d005 beq.n 8016066 801605a: 69fb ldr r3, [r7, #28] 801605c: 6b1b ldr r3, [r3, #48] @ 0x30 801605e: 2200 movs r2, #0 8016060: 2104 movs r1, #4 8016062: 69f8 ldr r0, [r7, #28] 8016064: 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); 8016066: 69fb ldr r3, [r7, #28] 8016068: 6b1b ldr r3, [r3, #48] @ 0x30 801606a: 2b00 cmp r3, #0 801606c: d005 beq.n 801607a 801606e: 69fb ldr r3, [r7, #28] 8016070: 6b1b ldr r3, [r3, #48] @ 0x30 8016072: 2200 movs r2, #0 8016074: 2100 movs r1, #0 8016076: 69f8 ldr r0, [r7, #28] 8016078: 4798 blx r3 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 801607a: 69fb ldr r3, [r7, #28] 801607c: 6b1b ldr r3, [r3, #48] @ 0x30 801607e: 2b00 cmp r3, #0 8016080: d005 beq.n 801608e 8016082: 69fb ldr r3, [r7, #28] 8016084: 6b1b ldr r3, [r3, #48] @ 0x30 8016086: 2200 movs r2, #0 8016088: 2102 movs r1, #2 801608a: 69f8 ldr r0, [r7, #28] 801608c: 4798 blx r3 mbox_msg = lwip_netconn_err_to_msg(err); 801608e: f997 3003 ldrsb.w r3, [r7, #3] 8016092: 4618 mov r0, r3 8016094: f7ff fd52 bl 8015b3c 8016098: 6138 str r0, [r7, #16] /* pass error message to recvmbox to wake up pending recv */ if (NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { 801609a: 69fb ldr r3, [r7, #28] 801609c: 3310 adds r3, #16 801609e: 4618 mov r0, r3 80160a0: f010 f8f4 bl 802628c 80160a4: 4603 mov r3, r0 80160a6: 2b00 cmp r3, #0 80160a8: d005 beq.n 80160b6 /* use trypost to prevent deadlock */ sys_mbox_trypost(&conn->recvmbox, mbox_msg); 80160aa: 69fb ldr r3, [r7, #28] 80160ac: 3310 adds r3, #16 80160ae: 6939 ldr r1, [r7, #16] 80160b0: 4618 mov r0, r3 80160b2: f010 f889 bl 80261c8 } /* pass error message to acceptmbox to wake up pending accept */ if (NETCONN_MBOX_VALID(conn, &conn->acceptmbox)) { 80160b6: 69fb ldr r3, [r7, #28] 80160b8: 3314 adds r3, #20 80160ba: 4618 mov r0, r3 80160bc: f010 f8e6 bl 802628c 80160c0: 4603 mov r3, r0 80160c2: 2b00 cmp r3, #0 80160c4: d005 beq.n 80160d2 /* use trypost to preven deadlock */ sys_mbox_trypost(&conn->acceptmbox, mbox_msg); 80160c6: 69fb ldr r3, [r7, #28] 80160c8: 3314 adds r3, #20 80160ca: 6939 ldr r1, [r7, #16] 80160cc: 4618 mov r0, r3 80160ce: f010 f87b bl 80261c8 } if ((old_state == NETCONN_WRITE) || (old_state == NETCONN_CLOSE) || 80160d2: 7dfb ldrb r3, [r7, #23] 80160d4: 2b01 cmp r3, #1 80160d6: d005 beq.n 80160e4 80160d8: 7dfb ldrb r3, [r7, #23] 80160da: 2b04 cmp r3, #4 80160dc: d002 beq.n 80160e4 80160de: 7dfb ldrb r3, [r7, #23] 80160e0: 2b03 cmp r3, #3 80160e2: d146 bne.n 8016172 (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); 80160e4: 69fb ldr r3, [r7, #28] 80160e6: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80160ea: f003 0304 and.w r3, r3, #4 80160ee: 2b00 cmp r3, #0 80160f0: bf14 ite ne 80160f2: 2301 movne r3, #1 80160f4: 2300 moveq r3, #0 80160f6: b2db uxtb r3, r3 80160f8: 60fb str r3, [r7, #12] SET_NONBLOCKING_CONNECT(conn, 0); 80160fa: 69fb ldr r3, [r7, #28] 80160fc: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016100: f023 0304 bic.w r3, r3, #4 8016104: b2da uxtb r2, r3 8016106: 69fb ldr r3, [r7, #28] 8016108: f883 2028 strb.w r2, [r3, #40] @ 0x28 if (!was_nonblocking_connect) { 801610c: 68fb ldr r3, [r7, #12] 801610e: 2b00 cmp r3, #0 8016110: d13b bne.n 801618a sys_sem_t *op_completed_sem; /* set error return code */ LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); 8016112: 69fb ldr r3, [r7, #28] 8016114: 6adb ldr r3, [r3, #44] @ 0x2c 8016116: 2b00 cmp r3, #0 8016118: d106 bne.n 8016128 801611a: 4b1e ldr r3, [pc, #120] @ (8016194 ) 801611c: f44f 72f3 mov.w r2, #486 @ 0x1e6 8016120: 491f ldr r1, [pc, #124] @ (80161a0 ) 8016122: 481e ldr r0, [pc, #120] @ (801619c ) 8016124: f013 fc52 bl 80299cc if (old_state == NETCONN_CLOSE) { 8016128: 7dfb ldrb r3, [r7, #23] 801612a: 2b04 cmp r3, #4 801612c: d104 bne.n 8016138 /* let close succeed: the connection is closed after all... */ conn->current_msg->err = ERR_OK; 801612e: 69fb ldr r3, [r7, #28] 8016130: 6adb ldr r3, [r3, #44] @ 0x2c 8016132: 2200 movs r2, #0 8016134: 711a strb r2, [r3, #4] 8016136: e003 b.n 8016140 } else { /* Write and connect fail */ conn->current_msg->err = err; 8016138: 69fb ldr r3, [r7, #28] 801613a: 6adb ldr r3, [r3, #44] @ 0x2c 801613c: 78fa ldrb r2, [r7, #3] 801613e: 711a strb r2, [r3, #4] } op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); 8016140: 69fb ldr r3, [r7, #28] 8016142: 6adb ldr r3, [r3, #44] @ 0x2c 8016144: 681b ldr r3, [r3, #0] 8016146: 330c adds r3, #12 8016148: 60bb str r3, [r7, #8] LWIP_ASSERT("inavlid op_completed_sem", sys_sem_valid(op_completed_sem)); 801614a: 68b8 ldr r0, [r7, #8] 801614c: f010 f92c bl 80263a8 8016150: 4603 mov r3, r0 8016152: 2b00 cmp r3, #0 8016154: d106 bne.n 8016164 8016156: 4b0f ldr r3, [pc, #60] @ (8016194 ) 8016158: f240 12ef movw r2, #495 @ 0x1ef 801615c: 4911 ldr r1, [pc, #68] @ (80161a4 ) 801615e: 480f ldr r0, [pc, #60] @ (801619c ) 8016160: f013 fc34 bl 80299cc conn->current_msg = NULL; 8016164: 69fb ldr r3, [r7, #28] 8016166: 2200 movs r2, #0 8016168: 62da str r2, [r3, #44] @ 0x2c /* wake up the waiting task */ sys_sem_signal(op_completed_sem); 801616a: 68b8 ldr r0, [r7, #8] 801616c: f010 f902 bl 8026374 (old_state == NETCONN_CONNECT)) { 8016170: e00b b.n 801618a } else { /* @todo: test what happens for error on nonblocking connect */ } } else { LWIP_ASSERT("conn->current_msg == NULL", conn->current_msg == NULL); 8016172: 69fb ldr r3, [r7, #28] 8016174: 6adb ldr r3, [r3, #44] @ 0x2c 8016176: 2b00 cmp r3, #0 8016178: d008 beq.n 801618c 801617a: 4b06 ldr r3, [pc, #24] @ (8016194 ) 801617c: f240 12f7 movw r2, #503 @ 0x1f7 8016180: 4909 ldr r1, [pc, #36] @ (80161a8 ) 8016182: 4806 ldr r0, [pc, #24] @ (801619c ) 8016184: f013 fc22 bl 80299cc } } 8016188: e000 b.n 801618c (old_state == NETCONN_CONNECT)) { 801618a: bf00 nop } 801618c: bf00 nop 801618e: 3720 adds r7, #32 8016190: 46bd mov sp, r7 8016192: bd80 pop {r7, pc} 8016194: 0802cedc .word 0x0802cedc 8016198: 0802d034 .word 0x0802d034 801619c: 0802cf20 .word 0x0802cf20 80161a0: 0802d044 .word 0x0802d044 80161a4: 0802d060 .word 0x0802d060 80161a8: 0802d07c .word 0x0802d07c 080161ac : * * @param conn the TCP netconn to setup */ static void setup_tcp(struct netconn *conn) { 80161ac: b580 push {r7, lr} 80161ae: b084 sub sp, #16 80161b0: af00 add r7, sp, #0 80161b2: 6078 str r0, [r7, #4] struct tcp_pcb *pcb; pcb = conn->pcb.tcp; 80161b4: 687b ldr r3, [r7, #4] 80161b6: 685b ldr r3, [r3, #4] 80161b8: 60fb str r3, [r7, #12] tcp_arg(pcb, conn); 80161ba: 6879 ldr r1, [r7, #4] 80161bc: 68f8 ldr r0, [r7, #12] 80161be: f005 ffe3 bl 801c188 tcp_recv(pcb, recv_tcp); 80161c2: 490a ldr r1, [pc, #40] @ (80161ec ) 80161c4: 68f8 ldr r0, [r7, #12] 80161c6: f005 fff1 bl 801c1ac tcp_sent(pcb, sent_tcp); 80161ca: 4909 ldr r1, [pc, #36] @ (80161f0 ) 80161cc: 68f8 ldr r0, [r7, #12] 80161ce: f006 f811 bl 801c1f4 tcp_poll(pcb, poll_tcp, NETCONN_TCP_POLL_INTERVAL); 80161d2: 2202 movs r2, #2 80161d4: 4907 ldr r1, [pc, #28] @ (80161f4 ) 80161d6: 68f8 ldr r0, [r7, #12] 80161d8: f006 f86c bl 801c2b4 tcp_err(pcb, err_tcp); 80161dc: 4906 ldr r1, [pc, #24] @ (80161f8 ) 80161de: 68f8 ldr r0, [r7, #12] 80161e0: f006 f82c bl 801c23c } 80161e4: bf00 nop 80161e6: 3710 adds r7, #16 80161e8: 46bd mov sp, r7 80161ea: bd80 pop {r7, pc} 80161ec: 08015d55 .word 0x08015d55 80161f0: 08015f49 .word 0x08015f49 80161f4: 08015e79 .word 0x08015e79 80161f8: 08015ff9 .word 0x08015ff9 080161fc : * * @param msg the api_msg describing the connection type */ static void pcb_new(struct api_msg *msg) { 80161fc: b590 push {r4, r7, lr} 80161fe: b085 sub sp, #20 8016200: af00 add r7, sp, #0 8016202: 6078 str r0, [r7, #4] enum lwip_ip_addr_type iptype = IPADDR_TYPE_V4; 8016204: 2300 movs r3, #0 8016206: 73fb strb r3, [r7, #15] LWIP_ASSERT("pcb_new: pcb already allocated", msg->conn->pcb.tcp == NULL); 8016208: 687b ldr r3, [r7, #4] 801620a: 681b ldr r3, [r3, #0] 801620c: 685b ldr r3, [r3, #4] 801620e: 2b00 cmp r3, #0 8016210: d006 beq.n 8016220 8016212: 4b2b ldr r3, [pc, #172] @ (80162c0 ) 8016214: f240 2265 movw r2, #613 @ 0x265 8016218: 492a ldr r1, [pc, #168] @ (80162c4 ) 801621a: 482b ldr r0, [pc, #172] @ (80162c8 ) 801621c: f013 fbd6 bl 80299cc iptype = IPADDR_TYPE_ANY; } #endif /* Allocate a PCB for this connection */ switch (NETCONNTYPE_GROUP(msg->conn->type)) { 8016220: 687b ldr r3, [r7, #4] 8016222: 681b ldr r3, [r3, #0] 8016224: 781b ldrb r3, [r3, #0] 8016226: f003 03f0 and.w r3, r3, #240 @ 0xf0 801622a: 2b10 cmp r3, #16 801622c: d022 beq.n 8016274 801622e: 2b20 cmp r3, #32 8016230: d133 bne.n 801629a } break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: msg->conn->pcb.udp = udp_new_ip_type(iptype); 8016232: 687b ldr r3, [r7, #4] 8016234: 681c ldr r4, [r3, #0] 8016236: 7bfb ldrb r3, [r7, #15] 8016238: 4618 mov r0, r3 801623a: f00b fb94 bl 8021966 801623e: 4603 mov r3, r0 8016240: 6063 str r3, [r4, #4] if (msg->conn->pcb.udp != NULL) { 8016242: 687b ldr r3, [r7, #4] 8016244: 681b ldr r3, [r3, #0] 8016246: 685b ldr r3, [r3, #4] 8016248: 2b00 cmp r3, #0 801624a: d02a beq.n 80162a2 #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)) { 801624c: 687b ldr r3, [r7, #4] 801624e: 681b ldr r3, [r3, #0] 8016250: 781b ldrb r3, [r3, #0] 8016252: 2b22 cmp r3, #34 @ 0x22 8016254: d104 bne.n 8016260 udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM); 8016256: 687b ldr r3, [r7, #4] 8016258: 681b ldr r3, [r3, #0] 801625a: 685b ldr r3, [r3, #4] 801625c: 2201 movs r2, #1 801625e: 741a strb r2, [r3, #16] } udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn); 8016260: 687b ldr r3, [r7, #4] 8016262: 681b ldr r3, [r3, #0] 8016264: 6858 ldr r0, [r3, #4] 8016266: 687b ldr r3, [r7, #4] 8016268: 681b ldr r3, [r3, #0] 801626a: 461a mov r2, r3 801626c: 4917 ldr r1, [pc, #92] @ (80162cc ) 801626e: f00b fafb bl 8021868 } break; 8016272: e016 b.n 80162a2 #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: msg->conn->pcb.tcp = tcp_new_ip_type(iptype); 8016274: 687b ldr r3, [r7, #4] 8016276: 681c ldr r4, [r3, #0] 8016278: 7bfb ldrb r3, [r7, #15] 801627a: 4618 mov r0, r3 801627c: f005 ff76 bl 801c16c 8016280: 4603 mov r3, r0 8016282: 6063 str r3, [r4, #4] if (msg->conn->pcb.tcp != NULL) { 8016284: 687b ldr r3, [r7, #4] 8016286: 681b ldr r3, [r3, #0] 8016288: 685b ldr r3, [r3, #4] 801628a: 2b00 cmp r3, #0 801628c: d00b beq.n 80162a6 setup_tcp(msg->conn); 801628e: 687b ldr r3, [r7, #4] 8016290: 681b ldr r3, [r3, #0] 8016292: 4618 mov r0, r3 8016294: f7ff ff8a bl 80161ac } break; 8016298: e005 b.n 80162a6 #endif /* LWIP_TCP */ default: /* Unsupported netconn type, e.g. protocol disabled */ msg->err = ERR_VAL; 801629a: 687b ldr r3, [r7, #4] 801629c: 22fa movs r2, #250 @ 0xfa 801629e: 711a strb r2, [r3, #4] return; 80162a0: e00a b.n 80162b8 break; 80162a2: bf00 nop 80162a4: e000 b.n 80162a8 break; 80162a6: bf00 nop } if (msg->conn->pcb.ip == NULL) { 80162a8: 687b ldr r3, [r7, #4] 80162aa: 681b ldr r3, [r3, #0] 80162ac: 685b ldr r3, [r3, #4] 80162ae: 2b00 cmp r3, #0 80162b0: d102 bne.n 80162b8 msg->err = ERR_MEM; 80162b2: 687b ldr r3, [r7, #4] 80162b4: 22ff movs r2, #255 @ 0xff 80162b6: 711a strb r2, [r3, #4] } } 80162b8: 3714 adds r7, #20 80162ba: 46bd mov sp, r7 80162bc: bd90 pop {r4, r7, pc} 80162be: bf00 nop 80162c0: 0802cedc .word 0x0802cedc 80162c4: 0802d0c0 .word 0x0802d0c0 80162c8: 0802cf20 .word 0x0802cf20 80162cc: 08015c1d .word 0x08015c1d 080162d0 : * * @param m the api_msg describing the connection type */ void lwip_netconn_do_newconn(void *m) { 80162d0: b580 push {r7, lr} 80162d2: b084 sub sp, #16 80162d4: af00 add r7, sp, #0 80162d6: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 80162d8: 687b ldr r3, [r7, #4] 80162da: 60fb str r3, [r7, #12] msg->err = ERR_OK; 80162dc: 68fb ldr r3, [r7, #12] 80162de: 2200 movs r2, #0 80162e0: 711a strb r2, [r3, #4] if (msg->conn->pcb.tcp == NULL) { 80162e2: 68fb ldr r3, [r7, #12] 80162e4: 681b ldr r3, [r3, #0] 80162e6: 685b ldr r3, [r3, #4] 80162e8: 2b00 cmp r3, #0 80162ea: d102 bne.n 80162f2 pcb_new(msg); 80162ec: 68f8 ldr r0, [r7, #12] 80162ee: f7ff ff85 bl 80161fc /* 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); } 80162f2: bf00 nop 80162f4: 3710 adds r7, #16 80162f6: 46bd mov sp, r7 80162f8: bd80 pop {r7, pc} ... 080162fc : * @return a newly allocated struct netconn or * NULL on memory error */ struct netconn * netconn_alloc(enum netconn_type t, netconn_callback callback) { 80162fc: b580 push {r7, lr} 80162fe: b086 sub sp, #24 8016300: af00 add r7, sp, #0 8016302: 4603 mov r3, r0 8016304: 6039 str r1, [r7, #0] 8016306: 71fb strb r3, [r7, #7] struct netconn *conn; int size; u8_t init_flags = 0; 8016308: 2300 movs r3, #0 801630a: 74fb strb r3, [r7, #19] conn = (struct netconn *)memp_malloc(MEMP_NETCONN); 801630c: 2007 movs r0, #7 801630e: f003 f981 bl 8019614 8016312: 60f8 str r0, [r7, #12] if (conn == NULL) { 8016314: 68fb ldr r3, [r7, #12] 8016316: 2b00 cmp r3, #0 8016318: d101 bne.n 801631e return NULL; 801631a: 2300 movs r3, #0 801631c: e05c b.n 80163d8 } conn->pending_err = ERR_OK; 801631e: 68fb ldr r3, [r7, #12] 8016320: 2200 movs r2, #0 8016322: 721a strb r2, [r3, #8] conn->type = t; 8016324: 68fb ldr r3, [r7, #12] 8016326: 79fa ldrb r2, [r7, #7] 8016328: 701a strb r2, [r3, #0] conn->pcb.tcp = NULL; 801632a: 68fb ldr r3, [r7, #12] 801632c: 2200 movs r2, #0 801632e: 605a str r2, [r3, #4] /* If all sizes are the same, every compiler should optimize this switch to nothing */ switch (NETCONNTYPE_GROUP(t)) { 8016330: 79fb ldrb r3, [r7, #7] 8016332: f003 03f0 and.w r3, r3, #240 @ 0xf0 8016336: 2b10 cmp r3, #16 8016338: d004 beq.n 8016344 801633a: 2b20 cmp r3, #32 801633c: d105 bne.n 801634a size = DEFAULT_RAW_RECVMBOX_SIZE; break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: size = DEFAULT_UDP_RECVMBOX_SIZE; 801633e: 2306 movs r3, #6 8016340: 617b str r3, [r7, #20] #if LWIP_NETBUF_RECVINFO init_flags |= NETCONN_FLAG_PKTINFO; #endif /* LWIP_NETBUF_RECVINFO */ break; 8016342: e00a b.n 801635a #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: size = DEFAULT_TCP_RECVMBOX_SIZE; 8016344: 2306 movs r3, #6 8016346: 617b str r3, [r7, #20] break; 8016348: e007 b.n 801635a #endif /* LWIP_TCP */ default: LWIP_ASSERT("netconn_alloc: undefined netconn_type", 0); 801634a: 4b25 ldr r3, [pc, #148] @ (80163e0 ) 801634c: f240 22e5 movw r2, #741 @ 0x2e5 8016350: 4924 ldr r1, [pc, #144] @ (80163e4 ) 8016352: 4825 ldr r0, [pc, #148] @ (80163e8 ) 8016354: f013 fb3a bl 80299cc goto free_and_return; 8016358: e039 b.n 80163ce } if (sys_mbox_new(&conn->recvmbox, size) != ERR_OK) { 801635a: 68fb ldr r3, [r7, #12] 801635c: 3310 adds r3, #16 801635e: 6979 ldr r1, [r7, #20] 8016360: 4618 mov r0, r3 8016362: f00f ff05 bl 8026170 8016366: 4603 mov r3, r0 8016368: 2b00 cmp r3, #0 801636a: d12f bne.n 80163cc goto free_and_return; } #if !LWIP_NETCONN_SEM_PER_THREAD if (sys_sem_new(&conn->op_completed, 0) != ERR_OK) { 801636c: 68fb ldr r3, [r7, #12] 801636e: 330c adds r3, #12 8016370: 2100 movs r1, #0 8016372: 4618 mov r0, r3 8016374: f00f ffa8 bl 80262c8 8016378: 4603 mov r3, r0 801637a: 2b00 cmp r3, #0 801637c: d005 beq.n 801638a sys_mbox_free(&conn->recvmbox); 801637e: 68fb ldr r3, [r7, #12] 8016380: 3310 adds r3, #16 8016382: 4618 mov r0, r3 8016384: f00f ff0e bl 80261a4 goto free_and_return; 8016388: e021 b.n 80163ce } #endif #if LWIP_TCP sys_mbox_set_invalid(&conn->acceptmbox); 801638a: 68fb ldr r3, [r7, #12] 801638c: 3314 adds r3, #20 801638e: 4618 mov r0, r3 8016390: f00f ff8d bl 80262ae #endif conn->state = NETCONN_NONE; 8016394: 68fb ldr r3, [r7, #12] 8016396: 2200 movs r2, #0 8016398: 705a strb r2, [r3, #1] #if LWIP_SOCKET /* initialize socket to -1 since 0 is a valid socket */ conn->socket = -1; 801639a: 68fb ldr r3, [r7, #12] 801639c: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 80163a0: 619a str r2, [r3, #24] #endif /* LWIP_SOCKET */ conn->callback = callback; 80163a2: 68fb ldr r3, [r7, #12] 80163a4: 683a ldr r2, [r7, #0] 80163a6: 631a str r2, [r3, #48] @ 0x30 #if LWIP_TCP conn->current_msg = NULL; 80163a8: 68fb ldr r3, [r7, #12] 80163aa: 2200 movs r2, #0 80163ac: 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; 80163ae: 68fb ldr r3, [r7, #12] 80163b0: 2200 movs r2, #0 80163b2: 61da str r2, [r3, #28] #endif /* LWIP_SO_RCVTIMEO */ #if LWIP_SO_RCVBUF conn->recv_bufsize = RECV_BUFSIZE_DEFAULT; 80163b4: 68fb ldr r3, [r7, #12] 80163b6: 4a0d ldr r2, [pc, #52] @ (80163ec ) 80163b8: 621a str r2, [r3, #32] conn->recv_avail = 0; 80163ba: 68fb ldr r3, [r7, #12] 80163bc: 2200 movs r2, #0 80163be: 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; 80163c0: 68fb ldr r3, [r7, #12] 80163c2: 7cfa ldrb r2, [r7, #19] 80163c4: f883 2028 strb.w r2, [r3, #40] @ 0x28 return conn; 80163c8: 68fb ldr r3, [r7, #12] 80163ca: e005 b.n 80163d8 goto free_and_return; 80163cc: bf00 nop free_and_return: memp_free(MEMP_NETCONN, conn); 80163ce: 68f9 ldr r1, [r7, #12] 80163d0: 2007 movs r0, #7 80163d2: f003 f995 bl 8019700 return NULL; 80163d6: 2300 movs r3, #0 } 80163d8: 4618 mov r0, r3 80163da: 3718 adds r7, #24 80163dc: 46bd mov sp, r7 80163de: bd80 pop {r7, pc} 80163e0: 0802cedc .word 0x0802cedc 80163e4: 0802d0e0 .word 0x0802d0e0 80163e8: 0802cf20 .word 0x0802cf20 80163ec: 77359400 .word 0x77359400 080163f0 : * * @param conn the netconn to free */ void netconn_free(struct netconn *conn) { 80163f0: b580 push {r7, lr} 80163f2: b082 sub sp, #8 80163f4: af00 add r7, sp, #0 80163f6: 6078 str r0, [r7, #4] LWIP_ASSERT("PCB must be deallocated outside this function", conn->pcb.tcp == NULL); 80163f8: 687b ldr r3, [r7, #4] 80163fa: 685b ldr r3, [r3, #4] 80163fc: 2b00 cmp r3, #0 80163fe: d006 beq.n 801640e 8016400: 4b1b ldr r3, [pc, #108] @ (8016470 ) 8016402: f44f 7247 mov.w r2, #796 @ 0x31c 8016406: 491b ldr r1, [pc, #108] @ (8016474 ) 8016408: 481b ldr r0, [pc, #108] @ (8016478 ) 801640a: f013 fadf bl 80299cc #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", 801640e: 687b ldr r3, [r7, #4] 8016410: 3310 adds r3, #16 8016412: 4618 mov r0, r3 8016414: f00f ff3a bl 802628c 8016418: 4603 mov r3, r0 801641a: 2b00 cmp r3, #0 801641c: d006 beq.n 801642c 801641e: 4b14 ldr r3, [pc, #80] @ (8016470 ) 8016420: f240 3223 movw r2, #803 @ 0x323 8016424: 4915 ldr r1, [pc, #84] @ (801647c ) 8016426: 4814 ldr r0, [pc, #80] @ (8016478 ) 8016428: f013 fad0 bl 80299cc !sys_mbox_valid(&conn->recvmbox)); #if LWIP_TCP LWIP_ASSERT("acceptmbox must be deallocated before calling this function", 801642c: 687b ldr r3, [r7, #4] 801642e: 3314 adds r3, #20 8016430: 4618 mov r0, r3 8016432: f00f ff2b bl 802628c 8016436: 4603 mov r3, r0 8016438: 2b00 cmp r3, #0 801643a: d006 beq.n 801644a 801643c: 4b0c ldr r3, [pc, #48] @ (8016470 ) 801643e: f240 3226 movw r2, #806 @ 0x326 8016442: 490f ldr r1, [pc, #60] @ (8016480 ) 8016444: 480c ldr r0, [pc, #48] @ (8016478 ) 8016446: f013 fac1 bl 80299cc !sys_mbox_valid(&conn->acceptmbox)); #endif /* LWIP_TCP */ #if !LWIP_NETCONN_SEM_PER_THREAD sys_sem_free(&conn->op_completed); 801644a: 687b ldr r3, [r7, #4] 801644c: 330c adds r3, #12 801644e: 4618 mov r0, r3 8016450: f00f ff9d bl 802638e sys_sem_set_invalid(&conn->op_completed); 8016454: 687b ldr r3, [r7, #4] 8016456: 330c adds r3, #12 8016458: 4618 mov r0, r3 801645a: f00f ffb6 bl 80263ca #endif memp_free(MEMP_NETCONN, conn); 801645e: 6879 ldr r1, [r7, #4] 8016460: 2007 movs r0, #7 8016462: f003 f94d bl 8019700 } 8016466: bf00 nop 8016468: 3708 adds r7, #8 801646a: 46bd mov sp, r7 801646c: bd80 pop {r7, pc} 801646e: bf00 nop 8016470: 0802cedc .word 0x0802cedc 8016474: 0802d108 .word 0x0802d108 8016478: 0802cf20 .word 0x0802cf20 801647c: 0802d138 .word 0x0802d138 8016480: 0802d174 .word 0x0802d174 08016484 : * @bytes_drained bytes drained from recvmbox * @accepts_drained pending connections drained from acceptmbox */ static void netconn_drain(struct netconn *conn) { 8016484: b580 push {r7, lr} 8016486: b086 sub sp, #24 8016488: af00 add r7, sp, #0 801648a: 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)) { 801648c: 687b ldr r3, [r7, #4] 801648e: 3310 adds r3, #16 8016490: 4618 mov r0, r3 8016492: f00f fefb bl 802628c 8016496: 4603 mov r3, r0 8016498: 2b00 cmp r3, #0 801649a: d02f beq.n 80164fc while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) { 801649c: e018 b.n 80164d0 #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) { 801649e: 687b ldr r3, [r7, #4] 80164a0: 781b ldrb r3, [r3, #0] 80164a2: f003 03f0 and.w r3, r3, #240 @ 0xf0 80164a6: 2b10 cmp r3, #16 80164a8: d10e bne.n 80164c8 err_t err; if (!lwip_netconn_is_err_msg(mem, &err)) { 80164aa: 693b ldr r3, [r7, #16] 80164ac: f107 020f add.w r2, r7, #15 80164b0: 4611 mov r1, r2 80164b2: 4618 mov r0, r3 80164b4: f7ff fb78 bl 8015ba8 80164b8: 4603 mov r3, r0 80164ba: 2b00 cmp r3, #0 80164bc: d108 bne.n 80164d0 pbuf_free((struct pbuf *)mem); 80164be: 693b ldr r3, [r7, #16] 80164c0: 4618 mov r0, r3 80164c2: f004 f80b bl 801a4dc 80164c6: e003 b.n 80164d0 } } else #endif /* LWIP_TCP */ { netbuf_delete((struct netbuf *)mem); 80164c8: 693b ldr r3, [r7, #16] 80164ca: 4618 mov r0, r3 80164cc: f001 f81c bl 8017508 while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) { 80164d0: 687b ldr r3, [r7, #4] 80164d2: 3310 adds r3, #16 80164d4: f107 0210 add.w r2, r7, #16 80164d8: 4611 mov r1, r2 80164da: 4618 mov r0, r3 80164dc: f00f febf bl 802625e 80164e0: 4603 mov r3, r0 80164e2: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80164e6: d1da bne.n 801649e } } } sys_mbox_free(&conn->recvmbox); 80164e8: 687b ldr r3, [r7, #4] 80164ea: 3310 adds r3, #16 80164ec: 4618 mov r0, r3 80164ee: f00f fe59 bl 80261a4 sys_mbox_set_invalid(&conn->recvmbox); 80164f2: 687b ldr r3, [r7, #4] 80164f4: 3310 adds r3, #16 80164f6: 4618 mov r0, r3 80164f8: f00f fed9 bl 80262ae } /* Delete and drain the acceptmbox. */ #if LWIP_TCP if (sys_mbox_valid(&conn->acceptmbox)) { 80164fc: 687b ldr r3, [r7, #4] 80164fe: 3314 adds r3, #20 8016500: 4618 mov r0, r3 8016502: f00f fec3 bl 802628c 8016506: 4603 mov r3, r0 8016508: 2b00 cmp r3, #0 801650a: d034 beq.n 8016576 while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) { 801650c: e01d b.n 801654a #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)) { 801650e: 693b ldr r3, [r7, #16] 8016510: f107 020e add.w r2, r7, #14 8016514: 4611 mov r1, r2 8016516: 4618 mov r0, r3 8016518: f7ff fb46 bl 8015ba8 801651c: 4603 mov r3, r0 801651e: 2b00 cmp r3, #0 8016520: d113 bne.n 801654a struct netconn *newconn = (struct netconn *)mem; 8016522: 693b ldr r3, [r7, #16] 8016524: 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); 8016526: 6978 ldr r0, [r7, #20] 8016528: f7ff ffac bl 8016484 if (newconn->pcb.tcp != NULL) { 801652c: 697b ldr r3, [r7, #20] 801652e: 685b ldr r3, [r3, #4] 8016530: 2b00 cmp r3, #0 8016532: d007 beq.n 8016544 tcp_abort(newconn->pcb.tcp); 8016534: 697b ldr r3, [r7, #20] 8016536: 685b ldr r3, [r3, #4] 8016538: 4618 mov r0, r3 801653a: f004 fdd5 bl 801b0e8 newconn->pcb.tcp = NULL; 801653e: 697b ldr r3, [r7, #20] 8016540: 2200 movs r2, #0 8016542: 605a str r2, [r3, #4] } netconn_free(newconn); 8016544: 6978 ldr r0, [r7, #20] 8016546: f7ff ff53 bl 80163f0 while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) { 801654a: 687b ldr r3, [r7, #4] 801654c: 3314 adds r3, #20 801654e: f107 0210 add.w r2, r7, #16 8016552: 4611 mov r1, r2 8016554: 4618 mov r0, r3 8016556: f00f fe82 bl 802625e 801655a: 4603 mov r3, r0 801655c: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8016560: d1d5 bne.n 801650e } } } sys_mbox_free(&conn->acceptmbox); 8016562: 687b ldr r3, [r7, #4] 8016564: 3314 adds r3, #20 8016566: 4618 mov r0, r3 8016568: f00f fe1c bl 80261a4 sys_mbox_set_invalid(&conn->acceptmbox); 801656c: 687b ldr r3, [r7, #4] 801656e: 3314 adds r3, #20 8016570: 4618 mov r0, r3 8016572: f00f fe9c bl 80262ae } #endif /* LWIP_TCP */ } 8016576: bf00 nop 8016578: 3718 adds r7, #24 801657a: 46bd mov sp, r7 801657c: bd80 pop {r7, pc} ... 08016580 : * * @param conn the TCP netconn to close */ static err_t lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM) { 8016580: b580 push {r7, lr} 8016582: b086 sub sp, #24 8016584: af00 add r7, sp, #0 8016586: 6078 str r0, [r7, #4] 8016588: 460b mov r3, r1 801658a: 70fb strb r3, [r7, #3] err_t err; u8_t shut, shut_rx, shut_tx, shut_close; u8_t close_finished = 0; 801658c: 2300 movs r3, #0 801658e: 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)); 8016590: 687b ldr r3, [r7, #4] 8016592: 2b00 cmp r3, #0 8016594: d106 bne.n 80165a4 8016596: 4b87 ldr r3, [pc, #540] @ (80167b4 ) 8016598: f240 32a2 movw r2, #930 @ 0x3a2 801659c: 4986 ldr r1, [pc, #536] @ (80167b8 ) 801659e: 4887 ldr r0, [pc, #540] @ (80167bc ) 80165a0: f013 fa14 bl 80299cc LWIP_ASSERT("this is for tcp netconns only", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP)); 80165a4: 687b ldr r3, [r7, #4] 80165a6: 781b ldrb r3, [r3, #0] 80165a8: f003 03f0 and.w r3, r3, #240 @ 0xf0 80165ac: 2b10 cmp r3, #16 80165ae: d006 beq.n 80165be 80165b0: 4b80 ldr r3, [pc, #512] @ (80167b4 ) 80165b2: f240 32a3 movw r2, #931 @ 0x3a3 80165b6: 4982 ldr r1, [pc, #520] @ (80167c0 ) 80165b8: 4880 ldr r0, [pc, #512] @ (80167bc ) 80165ba: f013 fa07 bl 80299cc LWIP_ASSERT("conn must be in state NETCONN_CLOSE", (conn->state == NETCONN_CLOSE)); 80165be: 687b ldr r3, [r7, #4] 80165c0: 785b ldrb r3, [r3, #1] 80165c2: 2b04 cmp r3, #4 80165c4: d006 beq.n 80165d4 80165c6: 4b7b ldr r3, [pc, #492] @ (80167b4 ) 80165c8: f44f 7269 mov.w r2, #932 @ 0x3a4 80165cc: 497d ldr r1, [pc, #500] @ (80167c4 ) 80165ce: 487b ldr r0, [pc, #492] @ (80167bc ) 80165d0: f013 f9fc bl 80299cc LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL)); 80165d4: 687b ldr r3, [r7, #4] 80165d6: 685b ldr r3, [r3, #4] 80165d8: 2b00 cmp r3, #0 80165da: d106 bne.n 80165ea 80165dc: 4b75 ldr r3, [pc, #468] @ (80167b4 ) 80165de: f240 32a5 movw r2, #933 @ 0x3a5 80165e2: 4979 ldr r1, [pc, #484] @ (80167c8 ) 80165e4: 4875 ldr r0, [pc, #468] @ (80167bc ) 80165e6: f013 f9f1 bl 80299cc LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); 80165ea: 687b ldr r3, [r7, #4] 80165ec: 6adb ldr r3, [r3, #44] @ 0x2c 80165ee: 2b00 cmp r3, #0 80165f0: d106 bne.n 8016600 80165f2: 4b70 ldr r3, [pc, #448] @ (80167b4 ) 80165f4: f240 32a6 movw r2, #934 @ 0x3a6 80165f8: 4974 ldr r1, [pc, #464] @ (80167cc ) 80165fa: 4870 ldr r0, [pc, #448] @ (80167bc ) 80165fc: f013 f9e6 bl 80299cc tpcb = conn->pcb.tcp; 8016600: 687b ldr r3, [r7, #4] 8016602: 685b ldr r3, [r3, #4] 8016604: 613b str r3, [r7, #16] shut = conn->current_msg->msg.sd.shut; 8016606: 687b ldr r3, [r7, #4] 8016608: 6adb ldr r3, [r3, #44] @ 0x2c 801660a: 7a1b ldrb r3, [r3, #8] 801660c: 73fb strb r3, [r7, #15] shut_rx = shut & NETCONN_SHUT_RD; 801660e: 7bfb ldrb r3, [r7, #15] 8016610: f003 0301 and.w r3, r3, #1 8016614: 73bb strb r3, [r7, #14] shut_tx = shut & NETCONN_SHUT_WR; 8016616: 7bfb ldrb r3, [r7, #15] 8016618: f003 0302 and.w r3, r3, #2 801661c: 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) { 801661e: 7bfb ldrb r3, [r7, #15] 8016620: 2b03 cmp r3, #3 8016622: d102 bne.n 801662a shut_close = 1; 8016624: 2301 movs r3, #1 8016626: 75bb strb r3, [r7, #22] 8016628: e01f b.n 801666a } else if (shut_rx && 801662a: 7bbb ldrb r3, [r7, #14] 801662c: 2b00 cmp r3, #0 801662e: d00e beq.n 801664e ((tpcb->state == FIN_WAIT_1) || 8016630: 693b ldr r3, [r7, #16] 8016632: 7d1b ldrb r3, [r3, #20] } else if (shut_rx && 8016634: 2b05 cmp r3, #5 8016636: d007 beq.n 8016648 (tpcb->state == FIN_WAIT_2) || 8016638: 693b ldr r3, [r7, #16] 801663a: 7d1b ldrb r3, [r3, #20] ((tpcb->state == FIN_WAIT_1) || 801663c: 2b06 cmp r3, #6 801663e: d003 beq.n 8016648 (tpcb->state == CLOSING))) { 8016640: 693b ldr r3, [r7, #16] 8016642: 7d1b ldrb r3, [r3, #20] (tpcb->state == FIN_WAIT_2) || 8016644: 2b08 cmp r3, #8 8016646: d102 bne.n 801664e shut_close = 1; 8016648: 2301 movs r3, #1 801664a: 75bb strb r3, [r7, #22] 801664c: e00d b.n 801666a } else if (shut_tx && ((tpcb->flags & TF_RXCLOSED) != 0)) { 801664e: 7b7b ldrb r3, [r7, #13] 8016650: 2b00 cmp r3, #0 8016652: d008 beq.n 8016666 8016654: 693b ldr r3, [r7, #16] 8016656: 8b5b ldrh r3, [r3, #26] 8016658: f003 0310 and.w r3, r3, #16 801665c: 2b00 cmp r3, #0 801665e: d002 beq.n 8016666 shut_close = 1; 8016660: 2301 movs r3, #1 8016662: 75bb strb r3, [r7, #22] 8016664: e001 b.n 801666a } else { shut_close = 0; 8016666: 2300 movs r3, #0 8016668: 75bb strb r3, [r7, #22] } /* Set back some callback pointers */ if (shut_close) { 801666a: 7dbb ldrb r3, [r7, #22] 801666c: 2b00 cmp r3, #0 801666e: d003 beq.n 8016678 tcp_arg(tpcb, NULL); 8016670: 2100 movs r1, #0 8016672: 6938 ldr r0, [r7, #16] 8016674: f005 fd88 bl 801c188 } if (tpcb->state == LISTEN) { 8016678: 693b ldr r3, [r7, #16] 801667a: 7d1b ldrb r3, [r3, #20] 801667c: 2b01 cmp r3, #1 801667e: d104 bne.n 801668a tcp_accept(tpcb, NULL); 8016680: 2100 movs r1, #0 8016682: 6938 ldr r0, [r7, #16] 8016684: f005 fdfe bl 801c284 8016688: e01d b.n 80166c6 } else { /* some callbacks have to be reset if tcp_close is not successful */ if (shut_rx) { 801668a: 7bbb ldrb r3, [r7, #14] 801668c: 2b00 cmp r3, #0 801668e: d007 beq.n 80166a0 tcp_recv(tpcb, NULL); 8016690: 2100 movs r1, #0 8016692: 6938 ldr r0, [r7, #16] 8016694: f005 fd8a bl 801c1ac tcp_accept(tpcb, NULL); 8016698: 2100 movs r1, #0 801669a: 6938 ldr r0, [r7, #16] 801669c: f005 fdf2 bl 801c284 } if (shut_tx) { 80166a0: 7b7b ldrb r3, [r7, #13] 80166a2: 2b00 cmp r3, #0 80166a4: d003 beq.n 80166ae tcp_sent(tpcb, NULL); 80166a6: 2100 movs r1, #0 80166a8: 6938 ldr r0, [r7, #16] 80166aa: f005 fda3 bl 801c1f4 } if (shut_close) { 80166ae: 7dbb ldrb r3, [r7, #22] 80166b0: 2b00 cmp r3, #0 80166b2: d008 beq.n 80166c6 tcp_poll(tpcb, NULL, 0); 80166b4: 2200 movs r2, #0 80166b6: 2100 movs r1, #0 80166b8: 6938 ldr r0, [r7, #16] 80166ba: f005 fdfb bl 801c2b4 tcp_err(tpcb, NULL); 80166be: 2100 movs r1, #0 80166c0: 6938 ldr r0, [r7, #16] 80166c2: f005 fdbb bl 801c23c } } /* Try to close the connection */ if (shut_close) { 80166c6: 7dbb ldrb r3, [r7, #22] 80166c8: 2b00 cmp r3, #0 80166ca: d005 beq.n 80166d8 } } if ((err == ERR_OK) && (tpcb != NULL)) #endif /* LWIP_SO_LINGER */ { err = tcp_close(tpcb); 80166cc: 6938 ldr r0, [r7, #16] 80166ce: f004 fbbf bl 801ae50 80166d2: 4603 mov r3, r0 80166d4: 75fb strb r3, [r7, #23] 80166d6: e007 b.n 80166e8 } } else { err = tcp_shutdown(tpcb, shut_rx, shut_tx); 80166d8: 7bbb ldrb r3, [r7, #14] 80166da: 7b7a ldrb r2, [r7, #13] 80166dc: 4619 mov r1, r3 80166de: 6938 ldr r0, [r7, #16] 80166e0: f004 fbe4 bl 801aeac 80166e4: 4603 mov r3, r0 80166e6: 75fb strb r3, [r7, #23] } if (err == ERR_OK) { 80166e8: f997 3017 ldrsb.w r3, [r7, #23] 80166ec: 2b00 cmp r3, #0 80166ee: d102 bne.n 80166f6 close_finished = 1; 80166f0: 2301 movs r3, #1 80166f2: 757b strb r3, [r7, #21] 80166f4: e016 b.n 8016724 close_finished = 0; err = ERR_INPROGRESS; } #endif /* LWIP_SO_LINGER */ } else { if (err == ERR_MEM) { 80166f6: f997 3017 ldrsb.w r3, [r7, #23] 80166fa: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80166fe: d10f bne.n 8016720 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) { 8016700: 687b ldr r3, [r7, #4] 8016702: 6adb ldr r3, [r3, #44] @ 0x2c 8016704: 7a5b ldrb r3, [r3, #9] 8016706: 2b00 cmp r3, #0 8016708: d10c bne.n 8016724 #endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ close_finished = 1; 801670a: 2301 movs r3, #1 801670c: 757b strb r3, [r7, #21] if (shut_close) { 801670e: 7dbb ldrb r3, [r7, #22] 8016710: 2b00 cmp r3, #0 8016712: d007 beq.n 8016724 /* in this case, we want to RST the connection */ tcp_abort(tpcb); 8016714: 6938 ldr r0, [r7, #16] 8016716: f004 fce7 bl 801b0e8 err = ERR_OK; 801671a: 2300 movs r3, #0 801671c: 75fb strb r3, [r7, #23] 801671e: e001 b.n 8016724 } } } else { /* Closing failed for a non-memory error: give up */ close_finished = 1; 8016720: 2301 movs r3, #1 8016722: 757b strb r3, [r7, #21] } } if (close_finished) { 8016724: 7d7b ldrb r3, [r7, #21] 8016726: 2b00 cmp r3, #0 8016728: d052 beq.n 80167d0 /* Closing done (succeeded, non-memory error, nonblocking error or timeout) */ sys_sem_t *op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); 801672a: 687b ldr r3, [r7, #4] 801672c: 6adb ldr r3, [r3, #44] @ 0x2c 801672e: 681b ldr r3, [r3, #0] 8016730: 330c adds r3, #12 8016732: 60bb str r3, [r7, #8] conn->current_msg->err = err; 8016734: 687b ldr r3, [r7, #4] 8016736: 6adb ldr r3, [r3, #44] @ 0x2c 8016738: 7dfa ldrb r2, [r7, #23] 801673a: 711a strb r2, [r3, #4] conn->current_msg = NULL; 801673c: 687b ldr r3, [r7, #4] 801673e: 2200 movs r2, #0 8016740: 62da str r2, [r3, #44] @ 0x2c conn->state = NETCONN_NONE; 8016742: 687b ldr r3, [r7, #4] 8016744: 2200 movs r2, #0 8016746: 705a strb r2, [r3, #1] if (err == ERR_OK) { 8016748: f997 3017 ldrsb.w r3, [r7, #23] 801674c: 2b00 cmp r3, #0 801674e: d129 bne.n 80167a4 if (shut_close) { 8016750: 7dbb ldrb r3, [r7, #22] 8016752: 2b00 cmp r3, #0 8016754: d00c beq.n 8016770 /* Set back some callback pointers as conn is going away */ conn->pcb.tcp = NULL; 8016756: 687b ldr r3, [r7, #4] 8016758: 2200 movs r2, #0 801675a: 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); 801675c: 687b ldr r3, [r7, #4] 801675e: 6b1b ldr r3, [r3, #48] @ 0x30 8016760: 2b00 cmp r3, #0 8016762: d005 beq.n 8016770 8016764: 687b ldr r3, [r7, #4] 8016766: 6b1b ldr r3, [r3, #48] @ 0x30 8016768: 2200 movs r2, #0 801676a: 2104 movs r1, #4 801676c: 6878 ldr r0, [r7, #4] 801676e: 4798 blx r3 } if (shut_rx) { 8016770: 7bbb ldrb r3, [r7, #14] 8016772: 2b00 cmp r3, #0 8016774: d009 beq.n 801678a API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); 8016776: 687b ldr r3, [r7, #4] 8016778: 6b1b ldr r3, [r3, #48] @ 0x30 801677a: 2b00 cmp r3, #0 801677c: d005 beq.n 801678a 801677e: 687b ldr r3, [r7, #4] 8016780: 6b1b ldr r3, [r3, #48] @ 0x30 8016782: 2200 movs r2, #0 8016784: 2100 movs r1, #0 8016786: 6878 ldr r0, [r7, #4] 8016788: 4798 blx r3 } if (shut_tx) { 801678a: 7b7b ldrb r3, [r7, #13] 801678c: 2b00 cmp r3, #0 801678e: d009 beq.n 80167a4 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 8016790: 687b ldr r3, [r7, #4] 8016792: 6b1b ldr r3, [r3, #48] @ 0x30 8016794: 2b00 cmp r3, #0 8016796: d005 beq.n 80167a4 8016798: 687b ldr r3, [r7, #4] 801679a: 6b1b ldr r3, [r3, #48] @ 0x30 801679c: 2200 movs r2, #0 801679e: 2102 movs r1, #2 80167a0: 6878 ldr r0, [r7, #4] 80167a2: 4798 blx r3 } } #if LWIP_TCPIP_CORE_LOCKING if (delayed) 80167a4: 78fb ldrb r3, [r7, #3] 80167a6: 2b00 cmp r3, #0 80167a8: d002 beq.n 80167b0 #endif { /* wake up the application task */ sys_sem_signal(op_completed_sem); 80167aa: 68b8 ldr r0, [r7, #8] 80167ac: f00f fde2 bl 8026374 } return ERR_OK; 80167b0: 2300 movs r3, #0 80167b2: e03c b.n 801682e 80167b4: 0802cedc .word 0x0802cedc 80167b8: 0802d1b0 .word 0x0802d1b0 80167bc: 0802cf20 .word 0x0802cf20 80167c0: 0802d1c0 .word 0x0802d1c0 80167c4: 0802d1e0 .word 0x0802d1e0 80167c8: 0802d204 .word 0x0802d204 80167cc: 0802d044 .word 0x0802d044 } if (!close_finished) { 80167d0: 7d7b ldrb r3, [r7, #21] 80167d2: 2b00 cmp r3, #0 80167d4: d11e bne.n 8016814 /* 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)); 80167d6: 693b ldr r3, [r7, #16] 80167d8: 7d1b ldrb r3, [r3, #20] 80167da: 2b01 cmp r3, #1 80167dc: d106 bne.n 80167ec 80167de: 4b16 ldr r3, [pc, #88] @ (8016838 ) 80167e0: f240 4241 movw r2, #1089 @ 0x441 80167e4: 4915 ldr r1, [pc, #84] @ (801683c ) 80167e6: 4816 ldr r0, [pc, #88] @ (8016840 ) 80167e8: f013 f8f0 bl 80299cc if (shut_tx) { 80167ec: 7b7b ldrb r3, [r7, #13] 80167ee: 2b00 cmp r3, #0 80167f0: d003 beq.n 80167fa tcp_sent(tpcb, sent_tcp); 80167f2: 4914 ldr r1, [pc, #80] @ (8016844 ) 80167f4: 6938 ldr r0, [r7, #16] 80167f6: f005 fcfd bl 801c1f4 } /* when waiting for close, set up poll interval to 500ms */ tcp_poll(tpcb, poll_tcp, 1); 80167fa: 2201 movs r2, #1 80167fc: 4912 ldr r1, [pc, #72] @ (8016848 ) 80167fe: 6938 ldr r0, [r7, #16] 8016800: f005 fd58 bl 801c2b4 tcp_err(tpcb, err_tcp); 8016804: 4911 ldr r1, [pc, #68] @ (801684c ) 8016806: 6938 ldr r0, [r7, #16] 8016808: f005 fd18 bl 801c23c tcp_arg(tpcb, conn); 801680c: 6879 ldr r1, [r7, #4] 801680e: 6938 ldr r0, [r7, #16] 8016810: f005 fcba bl 801c188 /* 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); 8016814: f997 3017 ldrsb.w r3, [r7, #23] 8016818: 2b00 cmp r3, #0 801681a: d106 bne.n 801682a 801681c: 4b06 ldr r3, [pc, #24] @ (8016838 ) 801681e: f240 424d movw r2, #1101 @ 0x44d 8016822: 490b ldr r1, [pc, #44] @ (8016850 ) 8016824: 4806 ldr r0, [pc, #24] @ (8016840 ) 8016826: f013 f8d1 bl 80299cc return err; 801682a: f997 3017 ldrsb.w r3, [r7, #23] } 801682e: 4618 mov r0, r3 8016830: 3718 adds r7, #24 8016832: 46bd mov sp, r7 8016834: bd80 pop {r7, pc} 8016836: bf00 nop 8016838: 0802cedc .word 0x0802cedc 801683c: 0802d218 .word 0x0802d218 8016840: 0802cf20 .word 0x0802cf20 8016844: 08015f49 .word 0x08015f49 8016848: 08015e79 .word 0x08015e79 801684c: 08015ff9 .word 0x08015ff9 8016850: 0802d23c .word 0x0802d23c 08016854 : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_delconn(void *m) { 8016854: b580 push {r7, lr} 8016856: b084 sub sp, #16 8016858: af00 add r7, sp, #0 801685a: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 801685c: 687b ldr r3, [r7, #4] 801685e: 60fb str r3, [r7, #12] enum netconn_state state = msg->conn->state; 8016860: 68fb ldr r3, [r7, #12] 8016862: 681b ldr r3, [r3, #0] 8016864: 785b ldrb r3, [r3, #1] 8016866: 72fb strb r3, [r7, #11] LWIP_ASSERT("netconn state error", /* this only happens for TCP netconns */ 8016868: 7afb ldrb r3, [r7, #11] 801686a: 2b00 cmp r3, #0 801686c: d00d beq.n 801688a 801686e: 68fb ldr r3, [r7, #12] 8016870: 681b ldr r3, [r3, #0] 8016872: 781b ldrb r3, [r3, #0] 8016874: f003 03f0 and.w r3, r3, #240 @ 0xf0 8016878: 2b10 cmp r3, #16 801687a: d006 beq.n 801688a 801687c: 4b60 ldr r3, [pc, #384] @ (8016a00 ) 801687e: f240 425e movw r2, #1118 @ 0x45e 8016882: 4960 ldr r1, [pc, #384] @ (8016a04 ) 8016884: 4860 ldr r0, [pc, #384] @ (8016a08 ) 8016886: f013 f8a1 bl 80299cc msg->conn->state = NETCONN_NONE; sys_sem_signal(op_completed_sem); } } #else /* LWIP_NETCONN_FULLDUPLEX */ if (((state != NETCONN_NONE) && 801688a: 7afb ldrb r3, [r7, #11] 801688c: 2b00 cmp r3, #0 801688e: d005 beq.n 801689c 8016890: 7afb ldrb r3, [r7, #11] 8016892: 2b02 cmp r3, #2 8016894: d002 beq.n 801689c (state != NETCONN_LISTEN) && 8016896: 7afb ldrb r3, [r7, #11] 8016898: 2b03 cmp r3, #3 801689a: d10a bne.n 80168b2 (state != NETCONN_CONNECT)) || 801689c: 7afb ldrb r3, [r7, #11] 801689e: 2b03 cmp r3, #3 80168a0: d10b bne.n 80168ba ((state == NETCONN_CONNECT) && !IN_NONBLOCKING_CONNECT(msg->conn))) { 80168a2: 68fb ldr r3, [r7, #12] 80168a4: 681b ldr r3, [r3, #0] 80168a6: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80168aa: f003 0304 and.w r3, r3, #4 80168ae: 2b00 cmp r3, #0 80168b0: d103 bne.n 80168ba /* This means either a blocking write or blocking connect is running (nonblocking write returns and sets state to NONE) */ msg->err = ERR_INPROGRESS; 80168b2: 68fb ldr r3, [r7, #12] 80168b4: 22fb movs r2, #251 @ 0xfb 80168b6: 711a strb r2, [r3, #4] 80168b8: e096 b.n 80169e8 } else #endif /* LWIP_NETCONN_FULLDUPLEX */ { LWIP_ASSERT("blocking connect in progress", 80168ba: 7afb ldrb r3, [r7, #11] 80168bc: 2b03 cmp r3, #3 80168be: d10e bne.n 80168de 80168c0: 68fb ldr r3, [r7, #12] 80168c2: 681b ldr r3, [r3, #0] 80168c4: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80168c8: f003 0304 and.w r3, r3, #4 80168cc: 2b00 cmp r3, #0 80168ce: d106 bne.n 80168de 80168d0: 4b4b ldr r3, [pc, #300] @ (8016a00 ) 80168d2: f240 427a movw r2, #1146 @ 0x47a 80168d6: 494d ldr r1, [pc, #308] @ (8016a0c ) 80168d8: 484b ldr r0, [pc, #300] @ (8016a08 ) 80168da: f013 f877 bl 80299cc (state != NETCONN_CONNECT) || IN_NONBLOCKING_CONNECT(msg->conn)); msg->err = ERR_OK; 80168de: 68fb ldr r3, [r7, #12] 80168e0: 2200 movs r2, #0 80168e2: 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); 80168e4: 68fb ldr r3, [r7, #12] 80168e6: 681b ldr r3, [r3, #0] 80168e8: 4618 mov r0, r3 80168ea: f7ff fdcb bl 8016484 #endif /* LWIP_NETCONN_FULLDUPLEX */ if (msg->conn->pcb.tcp != NULL) { 80168ee: 68fb ldr r3, [r7, #12] 80168f0: 681b ldr r3, [r3, #0] 80168f2: 685b ldr r3, [r3, #4] 80168f4: 2b00 cmp r3, #0 80168f6: d05d beq.n 80169b4 switch (NETCONNTYPE_GROUP(msg->conn->type)) { 80168f8: 68fb ldr r3, [r7, #12] 80168fa: 681b ldr r3, [r3, #0] 80168fc: 781b ldrb r3, [r3, #0] 80168fe: f003 03f0 and.w r3, r3, #240 @ 0xf0 8016902: 2b10 cmp r3, #16 8016904: d00d beq.n 8016922 8016906: 2b20 cmp r3, #32 8016908: d14f bne.n 80169aa raw_remove(msg->conn->pcb.raw); break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: msg->conn->pcb.udp->recv_arg = NULL; 801690a: 68fb ldr r3, [r7, #12] 801690c: 681b ldr r3, [r3, #0] 801690e: 685b ldr r3, [r3, #4] 8016910: 2200 movs r2, #0 8016912: 61da str r2, [r3, #28] udp_remove(msg->conn->pcb.udp); 8016914: 68fb ldr r3, [r7, #12] 8016916: 681b ldr r3, [r3, #0] 8016918: 685b ldr r3, [r3, #4] 801691a: 4618 mov r0, r3 801691c: f00a ffc6 bl 80218ac break; 8016920: e044 b.n 80169ac #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL); 8016922: 68fb ldr r3, [r7, #12] 8016924: 681b ldr r3, [r3, #0] 8016926: 6adb ldr r3, [r3, #44] @ 0x2c 8016928: 2b00 cmp r3, #0 801692a: d006 beq.n 801693a 801692c: 4b34 ldr r3, [pc, #208] @ (8016a00 ) 801692e: f240 4294 movw r2, #1172 @ 0x494 8016932: 4937 ldr r1, [pc, #220] @ (8016a10 ) 8016934: 4834 ldr r0, [pc, #208] @ (8016a08 ) 8016936: f013 f849 bl 80299cc msg->conn->state = NETCONN_CLOSE; 801693a: 68fb ldr r3, [r7, #12] 801693c: 681b ldr r3, [r3, #0] 801693e: 2204 movs r2, #4 8016940: 705a strb r2, [r3, #1] msg->msg.sd.shut = NETCONN_SHUT_RDWR; 8016942: 68fb ldr r3, [r7, #12] 8016944: 2203 movs r2, #3 8016946: 721a strb r2, [r3, #8] msg->conn->current_msg = msg; 8016948: 68fb ldr r3, [r7, #12] 801694a: 681b ldr r3, [r3, #0] 801694c: 68fa ldr r2, [r7, #12] 801694e: 62da str r2, [r3, #44] @ 0x2c #if LWIP_TCPIP_CORE_LOCKING if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) { 8016950: 68fb ldr r3, [r7, #12] 8016952: 681b ldr r3, [r3, #0] 8016954: 2100 movs r1, #0 8016956: 4618 mov r0, r3 8016958: f7ff fe12 bl 8016580 801695c: 4603 mov r3, r0 801695e: 2b00 cmp r3, #0 8016960: d049 beq.n 80169f6 LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); 8016962: 68fb ldr r3, [r7, #12] 8016964: 681b ldr r3, [r3, #0] 8016966: 785b ldrb r3, [r3, #1] 8016968: 2b04 cmp r3, #4 801696a: d006 beq.n 801697a 801696c: 4b24 ldr r3, [pc, #144] @ (8016a00 ) 801696e: f240 429a movw r2, #1178 @ 0x49a 8016972: 4928 ldr r1, [pc, #160] @ (8016a14 ) 8016974: 4824 ldr r0, [pc, #144] @ (8016a08 ) 8016976: f013 f829 bl 80299cc UNLOCK_TCPIP_CORE(); 801697a: f7f9 fdcb bl 8010514 sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 801697e: 68fb ldr r3, [r7, #12] 8016980: 681b ldr r3, [r3, #0] 8016982: 330c adds r3, #12 8016984: 2100 movs r1, #0 8016986: 4618 mov r0, r3 8016988: f00f fcc3 bl 8026312 LOCK_TCPIP_CORE(); 801698c: f7f9 fdb2 bl 80104f4 LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE); 8016990: 68fb ldr r3, [r7, #12] 8016992: 681b ldr r3, [r3, #0] 8016994: 785b ldrb r3, [r3, #1] 8016996: 2b00 cmp r3, #0 8016998: d02d beq.n 80169f6 801699a: 4b19 ldr r3, [pc, #100] @ (8016a00 ) 801699c: f240 429e movw r2, #1182 @ 0x49e 80169a0: 491c ldr r1, [pc, #112] @ (8016a14 ) 80169a2: 4819 ldr r0, [pc, #100] @ (8016a08 ) 80169a4: f013 f812 bl 80299cc #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; 80169a8: e025 b.n 80169f6 #endif /* LWIP_TCP */ default: break; 80169aa: bf00 nop } msg->conn->pcb.tcp = NULL; 80169ac: 68fb ldr r3, [r7, #12] 80169ae: 681b ldr r3, [r3, #0] 80169b0: 2200 movs r2, #0 80169b2: 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); 80169b4: 68fb ldr r3, [r7, #12] 80169b6: 681b ldr r3, [r3, #0] 80169b8: 6b1b ldr r3, [r3, #48] @ 0x30 80169ba: 2b00 cmp r3, #0 80169bc: d007 beq.n 80169ce 80169be: 68fb ldr r3, [r7, #12] 80169c0: 681b ldr r3, [r3, #0] 80169c2: 6b1b ldr r3, [r3, #48] @ 0x30 80169c4: 68fa ldr r2, [r7, #12] 80169c6: 6810 ldr r0, [r2, #0] 80169c8: 2200 movs r2, #0 80169ca: 2100 movs r1, #0 80169cc: 4798 blx r3 API_EVENT(msg->conn, NETCONN_EVT_SENDPLUS, 0); 80169ce: 68fb ldr r3, [r7, #12] 80169d0: 681b ldr r3, [r3, #0] 80169d2: 6b1b ldr r3, [r3, #48] @ 0x30 80169d4: 2b00 cmp r3, #0 80169d6: d007 beq.n 80169e8 80169d8: 68fb ldr r3, [r7, #12] 80169da: 681b ldr r3, [r3, #0] 80169dc: 6b1b ldr r3, [r3, #48] @ 0x30 80169de: 68fa ldr r2, [r7, #12] 80169e0: 6810 ldr r0, [r2, #0] 80169e2: 2200 movs r2, #0 80169e4: 2102 movs r1, #2 80169e6: 4798 blx r3 } if (sys_sem_valid(LWIP_API_MSG_SEM(msg))) { 80169e8: 68fb ldr r3, [r7, #12] 80169ea: 681b ldr r3, [r3, #0] 80169ec: 330c adds r3, #12 80169ee: 4618 mov r0, r3 80169f0: f00f fcda bl 80263a8 80169f4: e000 b.n 80169f8 return; 80169f6: bf00 nop TCPIP_APIMSG_ACK(msg); } } 80169f8: 3710 adds r7, #16 80169fa: 46bd mov sp, r7 80169fc: bd80 pop {r7, pc} 80169fe: bf00 nop 8016a00: 0802cedc .word 0x0802cedc 8016a04: 0802d24c .word 0x0802d24c 8016a08: 0802cf20 .word 0x0802cf20 8016a0c: 0802d260 .word 0x0802d260 8016a10: 0802d280 .word 0x0802d280 8016a14: 0802d29c .word 0x0802d29c 08016a18 : * * @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) { 8016a18: b580 push {r7, lr} 8016a1a: b088 sub sp, #32 8016a1c: af00 add r7, sp, #0 8016a1e: 60f8 str r0, [r7, #12] 8016a20: 60b9 str r1, [r7, #8] 8016a22: 4613 mov r3, r2 8016a24: 71fb strb r3, [r7, #7] struct netconn *conn; int was_blocking; sys_sem_t *op_completed_sem = NULL; 8016a26: 2300 movs r3, #0 8016a28: 61fb str r3, [r7, #28] LWIP_UNUSED_ARG(pcb); conn = (struct netconn *)arg; 8016a2a: 68fb ldr r3, [r7, #12] 8016a2c: 61bb str r3, [r7, #24] if (conn == NULL) { 8016a2e: 69bb ldr r3, [r7, #24] 8016a30: 2b00 cmp r3, #0 8016a32: d102 bne.n 8016a3a return ERR_VAL; 8016a34: f06f 0305 mvn.w r3, #5 8016a38: e074 b.n 8016b24 } LWIP_ASSERT("conn->state == NETCONN_CONNECT", conn->state == NETCONN_CONNECT); 8016a3a: 69bb ldr r3, [r7, #24] 8016a3c: 785b ldrb r3, [r3, #1] 8016a3e: 2b03 cmp r3, #3 8016a40: d006 beq.n 8016a50 8016a42: 4b3a ldr r3, [pc, #232] @ (8016b2c ) 8016a44: f240 5223 movw r2, #1315 @ 0x523 8016a48: 4939 ldr r1, [pc, #228] @ (8016b30 ) 8016a4a: 483a ldr r0, [pc, #232] @ (8016b34 ) 8016a4c: f012 ffbe bl 80299cc LWIP_ASSERT("(conn->current_msg != NULL) || conn->in_non_blocking_connect", 8016a50: 69bb ldr r3, [r7, #24] 8016a52: 6adb ldr r3, [r3, #44] @ 0x2c 8016a54: 2b00 cmp r3, #0 8016a56: d10d bne.n 8016a74 8016a58: 69bb ldr r3, [r7, #24] 8016a5a: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016a5e: f003 0304 and.w r3, r3, #4 8016a62: 2b00 cmp r3, #0 8016a64: d106 bne.n 8016a74 8016a66: 4b31 ldr r3, [pc, #196] @ (8016b2c ) 8016a68: f240 5224 movw r2, #1316 @ 0x524 8016a6c: 4932 ldr r1, [pc, #200] @ (8016b38 ) 8016a6e: 4831 ldr r0, [pc, #196] @ (8016b34 ) 8016a70: f012 ffac bl 80299cc (conn->current_msg != NULL) || IN_NONBLOCKING_CONNECT(conn)); if (conn->current_msg != NULL) { 8016a74: 69bb ldr r3, [r7, #24] 8016a76: 6adb ldr r3, [r3, #44] @ 0x2c 8016a78: 2b00 cmp r3, #0 8016a7a: d008 beq.n 8016a8e conn->current_msg->err = err; 8016a7c: 69bb ldr r3, [r7, #24] 8016a7e: 6adb ldr r3, [r3, #44] @ 0x2c 8016a80: 79fa ldrb r2, [r7, #7] 8016a82: 711a strb r2, [r3, #4] op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); 8016a84: 69bb ldr r3, [r7, #24] 8016a86: 6adb ldr r3, [r3, #44] @ 0x2c 8016a88: 681b ldr r3, [r3, #0] 8016a8a: 330c adds r3, #12 8016a8c: 61fb str r3, [r7, #28] } if ((NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) && (err == ERR_OK)) { 8016a8e: 69bb ldr r3, [r7, #24] 8016a90: 781b ldrb r3, [r3, #0] 8016a92: f003 03f0 and.w r3, r3, #240 @ 0xf0 8016a96: 2b10 cmp r3, #16 8016a98: d106 bne.n 8016aa8 8016a9a: f997 3007 ldrsb.w r3, [r7, #7] 8016a9e: 2b00 cmp r3, #0 8016aa0: d102 bne.n 8016aa8 setup_tcp(conn); 8016aa2: 69b8 ldr r0, [r7, #24] 8016aa4: f7ff fb82 bl 80161ac } was_blocking = !IN_NONBLOCKING_CONNECT(conn); 8016aa8: 69bb ldr r3, [r7, #24] 8016aaa: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016aae: f003 0304 and.w r3, r3, #4 8016ab2: 2b00 cmp r3, #0 8016ab4: bf0c ite eq 8016ab6: 2301 moveq r3, #1 8016ab8: 2300 movne r3, #0 8016aba: b2db uxtb r3, r3 8016abc: 617b str r3, [r7, #20] SET_NONBLOCKING_CONNECT(conn, 0); 8016abe: 69bb ldr r3, [r7, #24] 8016ac0: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016ac4: f023 0304 bic.w r3, r3, #4 8016ac8: b2da uxtb r2, r3 8016aca: 69bb ldr r3, [r7, #24] 8016acc: f883 2028 strb.w r2, [r3, #40] @ 0x28 LWIP_ASSERT("blocking connect state error", 8016ad0: 697b ldr r3, [r7, #20] 8016ad2: 2b00 cmp r3, #0 8016ad4: d002 beq.n 8016adc 8016ad6: 69fb ldr r3, [r7, #28] 8016ad8: 2b00 cmp r3, #0 8016ada: d10c bne.n 8016af6 8016adc: 697b ldr r3, [r7, #20] 8016ade: 2b00 cmp r3, #0 8016ae0: d102 bne.n 8016ae8 8016ae2: 69fb ldr r3, [r7, #28] 8016ae4: 2b00 cmp r3, #0 8016ae6: d006 beq.n 8016af6 8016ae8: 4b10 ldr r3, [pc, #64] @ (8016b2c ) 8016aea: f44f 62a6 mov.w r2, #1328 @ 0x530 8016aee: 4913 ldr r1, [pc, #76] @ (8016b3c ) 8016af0: 4810 ldr r0, [pc, #64] @ (8016b34 ) 8016af2: f012 ff6b bl 80299cc (was_blocking && op_completed_sem != NULL) || (!was_blocking && op_completed_sem == NULL)); conn->current_msg = NULL; 8016af6: 69bb ldr r3, [r7, #24] 8016af8: 2200 movs r2, #0 8016afa: 62da str r2, [r3, #44] @ 0x2c conn->state = NETCONN_NONE; 8016afc: 69bb ldr r3, [r7, #24] 8016afe: 2200 movs r2, #0 8016b00: 705a strb r2, [r3, #1] API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 8016b02: 69bb ldr r3, [r7, #24] 8016b04: 6b1b ldr r3, [r3, #48] @ 0x30 8016b06: 2b00 cmp r3, #0 8016b08: d005 beq.n 8016b16 8016b0a: 69bb ldr r3, [r7, #24] 8016b0c: 6b1b ldr r3, [r3, #48] @ 0x30 8016b0e: 2200 movs r2, #0 8016b10: 2102 movs r1, #2 8016b12: 69b8 ldr r0, [r7, #24] 8016b14: 4798 blx r3 if (was_blocking) { 8016b16: 697b ldr r3, [r7, #20] 8016b18: 2b00 cmp r3, #0 8016b1a: d002 beq.n 8016b22 sys_sem_signal(op_completed_sem); 8016b1c: 69f8 ldr r0, [r7, #28] 8016b1e: f00f fc29 bl 8026374 } return ERR_OK; 8016b22: 2300 movs r3, #0 } 8016b24: 4618 mov r0, r3 8016b26: 3720 adds r7, #32 8016b28: 46bd mov sp, r7 8016b2a: bd80 pop {r7, pc} 8016b2c: 0802cedc .word 0x0802cedc 8016b30: 0802d2a4 .word 0x0802d2a4 8016b34: 0802cf20 .word 0x0802cf20 8016b38: 0802d2c4 .word 0x0802d2c4 8016b3c: 0802d304 .word 0x0802d304 08016b40 : * @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) { 8016b40: b580 push {r7, lr} 8016b42: b086 sub sp, #24 8016b44: af00 add r7, sp, #0 8016b46: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8016b48: 687b ldr r3, [r7, #4] 8016b4a: 613b str r3, [r7, #16] err_t err; if (msg->conn->pcb.tcp == NULL) { 8016b4c: 693b ldr r3, [r7, #16] 8016b4e: 681b ldr r3, [r3, #0] 8016b50: 685b ldr r3, [r3, #4] 8016b52: 2b00 cmp r3, #0 8016b54: d102 bne.n 8016b5c /* This may happen when calling netconn_connect() a second time */ err = ERR_CLSD; 8016b56: 23f1 movs r3, #241 @ 0xf1 8016b58: 75fb strb r3, [r7, #23] 8016b5a: e09e b.n 8016c9a } else { switch (NETCONNTYPE_GROUP(msg->conn->type)) { 8016b5c: 693b ldr r3, [r7, #16] 8016b5e: 681b ldr r3, [r3, #0] 8016b60: 781b ldrb r3, [r3, #0] 8016b62: f003 03f0 and.w r3, r3, #240 @ 0xf0 8016b66: 2b10 cmp r3, #16 8016b68: d00f beq.n 8016b8a 8016b6a: 2b20 cmp r3, #32 8016b6c: f040 808a bne.w 8016c84 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); 8016b70: 693b ldr r3, [r7, #16] 8016b72: 681b ldr r3, [r3, #0] 8016b74: 6858 ldr r0, [r3, #4] 8016b76: 693b ldr r3, [r7, #16] 8016b78: 6899 ldr r1, [r3, #8] 8016b7a: 693b ldr r3, [r7, #16] 8016b7c: 899b ldrh r3, [r3, #12] 8016b7e: 461a mov r2, r3 8016b80: f00a fdd8 bl 8021734 8016b84: 4603 mov r3, r0 8016b86: 75fb strb r3, [r7, #23] break; 8016b88: e087 b.n 8016c9a #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: /* Prevent connect while doing any other action. */ if (msg->conn->state == NETCONN_CONNECT) { 8016b8a: 693b ldr r3, [r7, #16] 8016b8c: 681b ldr r3, [r3, #0] 8016b8e: 785b ldrb r3, [r3, #1] 8016b90: 2b03 cmp r3, #3 8016b92: d102 bne.n 8016b9a err = ERR_ALREADY; 8016b94: 23f7 movs r3, #247 @ 0xf7 8016b96: 75fb strb r3, [r7, #23] #endif /* LWIP_TCPIP_CORE_LOCKING */ return; } } } break; 8016b98: e07e b.n 8016c98 } else if (msg->conn->state != NETCONN_NONE) { 8016b9a: 693b ldr r3, [r7, #16] 8016b9c: 681b ldr r3, [r3, #0] 8016b9e: 785b ldrb r3, [r3, #1] 8016ba0: 2b00 cmp r3, #0 8016ba2: d002 beq.n 8016baa err = ERR_ISCONN; 8016ba4: 23f6 movs r3, #246 @ 0xf6 8016ba6: 75fb strb r3, [r7, #23] break; 8016ba8: e076 b.n 8016c98 setup_tcp(msg->conn); 8016baa: 693b ldr r3, [r7, #16] 8016bac: 681b ldr r3, [r3, #0] 8016bae: 4618 mov r0, r3 8016bb0: f7ff fafc bl 80161ac err = tcp_connect(msg->conn->pcb.tcp, API_EXPR_REF(msg->msg.bc.ipaddr), 8016bb4: 693b ldr r3, [r7, #16] 8016bb6: 681b ldr r3, [r3, #0] 8016bb8: 6858 ldr r0, [r3, #4] 8016bba: 693b ldr r3, [r7, #16] 8016bbc: 6899 ldr r1, [r3, #8] 8016bbe: 693b ldr r3, [r7, #16] 8016bc0: 899a ldrh r2, [r3, #12] 8016bc2: 4b3a ldr r3, [pc, #232] @ (8016cac ) 8016bc4: f004 fb90 bl 801b2e8 8016bc8: 4603 mov r3, r0 8016bca: 75fb strb r3, [r7, #23] if (err == ERR_OK) { 8016bcc: f997 3017 ldrsb.w r3, [r7, #23] 8016bd0: 2b00 cmp r3, #0 8016bd2: d161 bne.n 8016c98 u8_t non_blocking = netconn_is_nonblocking(msg->conn); 8016bd4: 693b ldr r3, [r7, #16] 8016bd6: 681b ldr r3, [r3, #0] 8016bd8: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016bdc: f003 0302 and.w r3, r3, #2 8016be0: 2b00 cmp r3, #0 8016be2: bf14 ite ne 8016be4: 2301 movne r3, #1 8016be6: 2300 moveq r3, #0 8016be8: b2db uxtb r3, r3 8016bea: 73fb strb r3, [r7, #15] msg->conn->state = NETCONN_CONNECT; 8016bec: 693b ldr r3, [r7, #16] 8016bee: 681b ldr r3, [r3, #0] 8016bf0: 2203 movs r2, #3 8016bf2: 705a strb r2, [r3, #1] SET_NONBLOCKING_CONNECT(msg->conn, non_blocking); 8016bf4: 7bfb ldrb r3, [r7, #15] 8016bf6: 2b00 cmp r3, #0 8016bf8: d00b beq.n 8016c12 8016bfa: 693b ldr r3, [r7, #16] 8016bfc: 681b ldr r3, [r3, #0] 8016bfe: f893 2028 ldrb.w r2, [r3, #40] @ 0x28 8016c02: 693b ldr r3, [r7, #16] 8016c04: 681b ldr r3, [r3, #0] 8016c06: f042 0204 orr.w r2, r2, #4 8016c0a: b2d2 uxtb r2, r2 8016c0c: f883 2028 strb.w r2, [r3, #40] @ 0x28 8016c10: e00a b.n 8016c28 8016c12: 693b ldr r3, [r7, #16] 8016c14: 681b ldr r3, [r3, #0] 8016c16: f893 2028 ldrb.w r2, [r3, #40] @ 0x28 8016c1a: 693b ldr r3, [r7, #16] 8016c1c: 681b ldr r3, [r3, #0] 8016c1e: f022 0204 bic.w r2, r2, #4 8016c22: b2d2 uxtb r2, r2 8016c24: f883 2028 strb.w r2, [r3, #40] @ 0x28 if (non_blocking) { 8016c28: 7bfb ldrb r3, [r7, #15] 8016c2a: 2b00 cmp r3, #0 8016c2c: d002 beq.n 8016c34 err = ERR_INPROGRESS; 8016c2e: 23fb movs r3, #251 @ 0xfb 8016c30: 75fb strb r3, [r7, #23] break; 8016c32: e031 b.n 8016c98 msg->conn->current_msg = msg; 8016c34: 693b ldr r3, [r7, #16] 8016c36: 681b ldr r3, [r3, #0] 8016c38: 693a ldr r2, [r7, #16] 8016c3a: 62da str r2, [r3, #44] @ 0x2c LWIP_ASSERT("state!", msg->conn->state == NETCONN_CONNECT); 8016c3c: 693b ldr r3, [r7, #16] 8016c3e: 681b ldr r3, [r3, #0] 8016c40: 785b ldrb r3, [r3, #1] 8016c42: 2b03 cmp r3, #3 8016c44: d006 beq.n 8016c54 8016c46: 4b1a ldr r3, [pc, #104] @ (8016cb0 ) 8016c48: f44f 62ae mov.w r2, #1392 @ 0x570 8016c4c: 4919 ldr r1, [pc, #100] @ (8016cb4 ) 8016c4e: 481a ldr r0, [pc, #104] @ (8016cb8 ) 8016c50: f012 febc bl 80299cc UNLOCK_TCPIP_CORE(); 8016c54: f7f9 fc5e bl 8010514 sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 8016c58: 693b ldr r3, [r7, #16] 8016c5a: 681b ldr r3, [r3, #0] 8016c5c: 330c adds r3, #12 8016c5e: 2100 movs r1, #0 8016c60: 4618 mov r0, r3 8016c62: f00f fb56 bl 8026312 LOCK_TCPIP_CORE(); 8016c66: f7f9 fc45 bl 80104f4 LWIP_ASSERT("state!", msg->conn->state != NETCONN_CONNECT); 8016c6a: 693b ldr r3, [r7, #16] 8016c6c: 681b ldr r3, [r3, #0] 8016c6e: 785b ldrb r3, [r3, #1] 8016c70: 2b03 cmp r3, #3 8016c72: d116 bne.n 8016ca2 8016c74: 4b0e ldr r3, [pc, #56] @ (8016cb0 ) 8016c76: f240 5274 movw r2, #1396 @ 0x574 8016c7a: 490e ldr r1, [pc, #56] @ (8016cb4 ) 8016c7c: 480e ldr r0, [pc, #56] @ (8016cb8 ) 8016c7e: f012 fea5 bl 80299cc return; 8016c82: e00e b.n 8016ca2 #endif /* LWIP_TCP */ default: LWIP_ERROR("Invalid netconn type", 0, do { 8016c84: 4b0a ldr r3, [pc, #40] @ (8016cb0 ) 8016c86: f240 527d movw r2, #1405 @ 0x57d 8016c8a: 490c ldr r1, [pc, #48] @ (8016cbc ) 8016c8c: 480a ldr r0, [pc, #40] @ (8016cb8 ) 8016c8e: f012 fe9d bl 80299cc 8016c92: 23fa movs r3, #250 @ 0xfa 8016c94: 75fb strb r3, [r7, #23] err = ERR_VAL; } while (0)); break; 8016c96: e000 b.n 8016c9a break; 8016c98: bf00 nop } } msg->err = err; 8016c9a: 693b ldr r3, [r7, #16] 8016c9c: 7dfa ldrb r2, [r7, #23] 8016c9e: 711a strb r2, [r3, #4] 8016ca0: e000 b.n 8016ca4 return; 8016ca2: bf00 nop /* For all other protocols, netconn_connect() calls netconn_apimsg(), so use TCPIP_APIMSG_ACK() here. */ TCPIP_APIMSG_ACK(msg); } 8016ca4: 3718 adds r7, #24 8016ca6: 46bd mov sp, r7 8016ca8: bd80 pop {r7, pc} 8016caa: bf00 nop 8016cac: 08016a19 .word 0x08016a19 8016cb0: 0802cedc .word 0x0802cedc 8016cb4: 0802d29c .word 0x0802d29c 8016cb8: 0802cf20 .word 0x0802cf20 8016cbc: 0802d324 .word 0x0802d324 08016cc0 : * * @param m the api_msg pointing to the connection to disconnect */ void lwip_netconn_do_disconnect(void *m) { 8016cc0: b580 push {r7, lr} 8016cc2: b084 sub sp, #16 8016cc4: af00 add r7, sp, #0 8016cc6: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8016cc8: 687b ldr r3, [r7, #4] 8016cca: 60fb str r3, [r7, #12] #if LWIP_UDP if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { 8016ccc: 68fb ldr r3, [r7, #12] 8016cce: 681b ldr r3, [r3, #0] 8016cd0: 781b ldrb r3, [r3, #0] 8016cd2: f003 03f0 and.w r3, r3, #240 @ 0xf0 8016cd6: 2b20 cmp r3, #32 8016cd8: d109 bne.n 8016cee udp_disconnect(msg->conn->pcb.udp); 8016cda: 68fb ldr r3, [r7, #12] 8016cdc: 681b ldr r3, [r3, #0] 8016cde: 685b ldr r3, [r3, #4] 8016ce0: 4618 mov r0, r3 8016ce2: f00a fd97 bl 8021814 msg->err = ERR_OK; 8016ce6: 68fb ldr r3, [r7, #12] 8016ce8: 2200 movs r2, #0 8016cea: 711a strb r2, [r3, #4] #endif /* LWIP_UDP */ { msg->err = ERR_VAL; } TCPIP_APIMSG_ACK(msg); } 8016cec: e002 b.n 8016cf4 msg->err = ERR_VAL; 8016cee: 68fb ldr r3, [r7, #12] 8016cf0: 22fa movs r2, #250 @ 0xfa 8016cf2: 711a strb r2, [r3, #4] } 8016cf4: bf00 nop 8016cf6: 3710 adds r7, #16 8016cf8: 46bd mov sp, r7 8016cfa: bd80 pop {r7, pc} 08016cfc : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_send(void *m) { 8016cfc: b580 push {r7, lr} 8016cfe: b084 sub sp, #16 8016d00: af00 add r7, sp, #0 8016d02: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8016d04: 687b ldr r3, [r7, #4] 8016d06: 60bb str r3, [r7, #8] err_t err = netconn_err(msg->conn); 8016d08: 68bb ldr r3, [r7, #8] 8016d0a: 681b ldr r3, [r3, #0] 8016d0c: 4618 mov r0, r3 8016d0e: f7fe fef9 bl 8015b04 8016d12: 4603 mov r3, r0 8016d14: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 8016d16: f997 300f ldrsb.w r3, [r7, #15] 8016d1a: 2b00 cmp r3, #0 8016d1c: d134 bne.n 8016d88 if (msg->conn->pcb.tcp != NULL) { 8016d1e: 68bb ldr r3, [r7, #8] 8016d20: 681b ldr r3, [r3, #0] 8016d22: 685b ldr r3, [r3, #4] 8016d24: 2b00 cmp r3, #0 8016d26: d02d beq.n 8016d84 switch (NETCONNTYPE_GROUP(msg->conn->type)) { 8016d28: 68bb ldr r3, [r7, #8] 8016d2a: 681b ldr r3, [r3, #0] 8016d2c: 781b ldrb r3, [r3, #0] 8016d2e: f003 03f0 and.w r3, r3, #240 @ 0xf0 8016d32: 2b20 cmp r3, #32 8016d34: d123 bne.n 8016d7e 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)) { 8016d36: 68bb ldr r3, [r7, #8] 8016d38: 689b ldr r3, [r3, #8] 8016d3a: 689b ldr r3, [r3, #8] 8016d3c: 2b00 cmp r3, #0 8016d3e: d10c bne.n 8016d5a err = udp_send(msg->conn->pcb.udp, msg->msg.b->p); 8016d40: 68bb ldr r3, [r7, #8] 8016d42: 681b ldr r3, [r3, #0] 8016d44: 685a ldr r2, [r3, #4] 8016d46: 68bb ldr r3, [r7, #8] 8016d48: 689b ldr r3, [r3, #8] 8016d4a: 681b ldr r3, [r3, #0] 8016d4c: 4619 mov r1, r3 8016d4e: 4610 mov r0, r2 8016d50: f00a fa7a bl 8021248 8016d54: 4603 mov r3, r0 8016d56: 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; 8016d58: e016 b.n 8016d88 err = udp_sendto(msg->conn->pcb.udp, msg->msg.b->p, &msg->msg.b->addr, msg->msg.b->port); 8016d5a: 68bb ldr r3, [r7, #8] 8016d5c: 681b ldr r3, [r3, #0] 8016d5e: 6858 ldr r0, [r3, #4] 8016d60: 68bb ldr r3, [r7, #8] 8016d62: 689b ldr r3, [r3, #8] 8016d64: 6819 ldr r1, [r3, #0] 8016d66: 68bb ldr r3, [r7, #8] 8016d68: 689b ldr r3, [r3, #8] 8016d6a: f103 0208 add.w r2, r3, #8 8016d6e: 68bb ldr r3, [r7, #8] 8016d70: 689b ldr r3, [r3, #8] 8016d72: 899b ldrh r3, [r3, #12] 8016d74: f00a fa9c bl 80212b0 8016d78: 4603 mov r3, r0 8016d7a: 73fb strb r3, [r7, #15] break; 8016d7c: e004 b.n 8016d88 #endif /* LWIP_UDP */ default: err = ERR_CONN; 8016d7e: 23f5 movs r3, #245 @ 0xf5 8016d80: 73fb strb r3, [r7, #15] break; 8016d82: e001 b.n 8016d88 } } else { err = ERR_CONN; 8016d84: 23f5 movs r3, #245 @ 0xf5 8016d86: 73fb strb r3, [r7, #15] } } msg->err = err; 8016d88: 68bb ldr r3, [r7, #8] 8016d8a: 7bfa ldrb r2, [r7, #15] 8016d8c: 711a strb r2, [r3, #4] TCPIP_APIMSG_ACK(msg); } 8016d8e: bf00 nop 8016d90: 3710 adds r7, #16 8016d92: 46bd mov sp, r7 8016d94: bd80 pop {r7, pc} 08016d96 : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_recv(void *m) { 8016d96: b580 push {r7, lr} 8016d98: b086 sub sp, #24 8016d9a: af00 add r7, sp, #0 8016d9c: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8016d9e: 687b ldr r3, [r7, #4] 8016da0: 613b str r3, [r7, #16] msg->err = ERR_OK; 8016da2: 693b ldr r3, [r7, #16] 8016da4: 2200 movs r2, #0 8016da6: 711a strb r2, [r3, #4] if (msg->conn->pcb.tcp != NULL) { 8016da8: 693b ldr r3, [r7, #16] 8016daa: 681b ldr r3, [r3, #0] 8016dac: 685b ldr r3, [r3, #4] 8016dae: 2b00 cmp r3, #0 8016db0: d022 beq.n 8016df8 if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { 8016db2: 693b ldr r3, [r7, #16] 8016db4: 681b ldr r3, [r3, #0] 8016db6: 781b ldrb r3, [r3, #0] 8016db8: f003 03f0 and.w r3, r3, #240 @ 0xf0 8016dbc: 2b10 cmp r3, #16 8016dbe: d11b bne.n 8016df8 size_t remaining = msg->msg.r.len; 8016dc0: 693b ldr r3, [r7, #16] 8016dc2: 689b ldr r3, [r3, #8] 8016dc4: 617b str r3, [r7, #20] do { u16_t recved = (u16_t)((remaining > 0xffff) ? 0xffff : remaining); 8016dc6: 697b ldr r3, [r7, #20] 8016dc8: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8016dcc: d202 bcs.n 8016dd4 8016dce: 697b ldr r3, [r7, #20] 8016dd0: b29b uxth r3, r3 8016dd2: e001 b.n 8016dd8 8016dd4: f64f 73ff movw r3, #65535 @ 0xffff 8016dd8: 81fb strh r3, [r7, #14] tcp_recved(msg->conn->pcb.tcp, recved); 8016dda: 693b ldr r3, [r7, #16] 8016ddc: 681b ldr r3, [r3, #0] 8016dde: 685b ldr r3, [r3, #4] 8016de0: 89fa ldrh r2, [r7, #14] 8016de2: 4611 mov r1, r2 8016de4: 4618 mov r0, r3 8016de6: f004 f9e5 bl 801b1b4 remaining -= recved; 8016dea: 89fb ldrh r3, [r7, #14] 8016dec: 697a ldr r2, [r7, #20] 8016dee: 1ad3 subs r3, r2, r3 8016df0: 617b str r3, [r7, #20] } while (remaining != 0); 8016df2: 697b ldr r3, [r7, #20] 8016df4: 2b00 cmp r3, #0 8016df6: d1e6 bne.n 8016dc6 } } TCPIP_APIMSG_ACK(msg); } 8016df8: bf00 nop 8016dfa: 3718 adds r7, #24 8016dfc: 46bd mov sp, r7 8016dfe: bd80 pop {r7, pc} 08016e00 : * @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) { 8016e00: b580 push {r7, lr} 8016e02: b088 sub sp, #32 8016e04: af00 add r7, sp, #0 8016e06: 6078 str r0, [r7, #4] 8016e08: 460b mov r3, r1 8016e0a: 70fb strb r3, [r7, #3] err_t err; const void *dataptr; u16_t len, available; u8_t write_finished = 0; 8016e0c: 2300 movs r3, #0 8016e0e: 76fb strb r3, [r7, #27] size_t diff; u8_t dontblock; u8_t apiflags; u8_t write_more; LWIP_ASSERT("conn != NULL", conn != NULL); 8016e10: 687b ldr r3, [r7, #4] 8016e12: 2b00 cmp r3, #0 8016e14: d106 bne.n 8016e24 8016e16: 4b61 ldr r3, [pc, #388] @ (8016f9c ) 8016e18: f240 6273 movw r2, #1651 @ 0x673 8016e1c: 4960 ldr r1, [pc, #384] @ (8016fa0 ) 8016e1e: 4861 ldr r0, [pc, #388] @ (8016fa4 ) 8016e20: f012 fdd4 bl 80299cc LWIP_ASSERT("conn->state == NETCONN_WRITE", (conn->state == NETCONN_WRITE)); 8016e24: 687b ldr r3, [r7, #4] 8016e26: 785b ldrb r3, [r3, #1] 8016e28: 2b01 cmp r3, #1 8016e2a: d006 beq.n 8016e3a 8016e2c: 4b5b ldr r3, [pc, #364] @ (8016f9c ) 8016e2e: f240 6274 movw r2, #1652 @ 0x674 8016e32: 495d ldr r1, [pc, #372] @ (8016fa8 ) 8016e34: 485b ldr r0, [pc, #364] @ (8016fa4 ) 8016e36: f012 fdc9 bl 80299cc LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); 8016e3a: 687b ldr r3, [r7, #4] 8016e3c: 6adb ldr r3, [r3, #44] @ 0x2c 8016e3e: 2b00 cmp r3, #0 8016e40: d106 bne.n 8016e50 8016e42: 4b56 ldr r3, [pc, #344] @ (8016f9c ) 8016e44: f240 6275 movw r2, #1653 @ 0x675 8016e48: 4958 ldr r1, [pc, #352] @ (8016fac ) 8016e4a: 4856 ldr r0, [pc, #344] @ (8016fa4 ) 8016e4c: f012 fdbe bl 80299cc LWIP_ASSERT("conn->pcb.tcp != NULL", conn->pcb.tcp != NULL); 8016e50: 687b ldr r3, [r7, #4] 8016e52: 685b ldr r3, [r3, #4] 8016e54: 2b00 cmp r3, #0 8016e56: d106 bne.n 8016e66 8016e58: 4b50 ldr r3, [pc, #320] @ (8016f9c ) 8016e5a: f240 6276 movw r2, #1654 @ 0x676 8016e5e: 4954 ldr r1, [pc, #336] @ (8016fb0 ) 8016e60: 4850 ldr r0, [pc, #320] @ (8016fa4 ) 8016e62: f012 fdb3 bl 80299cc LWIP_ASSERT("conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len", 8016e66: 687b ldr r3, [r7, #4] 8016e68: 6adb ldr r3, [r3, #44] @ 0x2c 8016e6a: 699a ldr r2, [r3, #24] 8016e6c: 687b ldr r3, [r7, #4] 8016e6e: 6adb ldr r3, [r3, #44] @ 0x2c 8016e70: 695b ldr r3, [r3, #20] 8016e72: 429a cmp r2, r3 8016e74: d306 bcc.n 8016e84 8016e76: 4b49 ldr r3, [pc, #292] @ (8016f9c ) 8016e78: f240 6277 movw r2, #1655 @ 0x677 8016e7c: 494d ldr r1, [pc, #308] @ (8016fb4 ) 8016e7e: 4849 ldr r0, [pc, #292] @ (8016fa4 ) 8016e80: f012 fda4 bl 80299cc 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); 8016e84: 687b ldr r3, [r7, #4] 8016e86: 6adb ldr r3, [r3, #44] @ 0x2c 8016e88: 899b ldrh r3, [r3, #12] 8016e8a: 2b00 cmp r3, #0 8016e8c: d106 bne.n 8016e9c 8016e8e: 4b43 ldr r3, [pc, #268] @ (8016f9c ) 8016e90: f240 6279 movw r2, #1657 @ 0x679 8016e94: 4948 ldr r1, [pc, #288] @ (8016fb8 ) 8016e96: 4843 ldr r0, [pc, #268] @ (8016fa4 ) 8016e98: f012 fd98 bl 80299cc apiflags = conn->current_msg->msg.w.apiflags; 8016e9c: 687b ldr r3, [r7, #4] 8016e9e: 6adb ldr r3, [r3, #44] @ 0x2c 8016ea0: 7f1b ldrb r3, [r3, #28] 8016ea2: 76bb strb r3, [r7, #26] dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); 8016ea4: 687b ldr r3, [r7, #4] 8016ea6: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016eaa: f003 0302 and.w r3, r3, #2 8016eae: 2b00 cmp r3, #0 8016eb0: d104 bne.n 8016ebc 8016eb2: 7ebb ldrb r3, [r7, #26] 8016eb4: f003 0304 and.w r3, r3, #4 8016eb8: 2b00 cmp r3, #0 8016eba: d001 beq.n 8016ec0 8016ebc: 2301 movs r3, #1 8016ebe: e000 b.n 8016ec2 8016ec0: 2300 movs r3, #0 8016ec2: 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; 8016ec4: 687b ldr r3, [r7, #4] 8016ec6: 6adb ldr r3, [r3, #44] @ 0x2c 8016ec8: 689b ldr r3, [r3, #8] 8016eca: 681a ldr r2, [r3, #0] 8016ecc: 687b ldr r3, [r7, #4] 8016ece: 6adb ldr r3, [r3, #44] @ 0x2c 8016ed0: 691b ldr r3, [r3, #16] 8016ed2: 4413 add r3, r2 8016ed4: 617b str r3, [r7, #20] diff = conn->current_msg->msg.w.vector->len - conn->current_msg->msg.w.vector_off; 8016ed6: 687b ldr r3, [r7, #4] 8016ed8: 6adb ldr r3, [r3, #44] @ 0x2c 8016eda: 689b ldr r3, [r3, #8] 8016edc: 685a ldr r2, [r3, #4] 8016ede: 687b ldr r3, [r7, #4] 8016ee0: 6adb ldr r3, [r3, #44] @ 0x2c 8016ee2: 691b ldr r3, [r3, #16] 8016ee4: 1ad3 subs r3, r2, r3 8016ee6: 613b str r3, [r7, #16] if (diff > 0xffffUL) { /* max_u16_t */ 8016ee8: 693b ldr r3, [r7, #16] 8016eea: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8016eee: d307 bcc.n 8016f00 len = 0xffff; 8016ef0: f64f 73ff movw r3, #65535 @ 0xffff 8016ef4: 83bb strh r3, [r7, #28] apiflags |= TCP_WRITE_FLAG_MORE; 8016ef6: 7ebb ldrb r3, [r7, #26] 8016ef8: f043 0302 orr.w r3, r3, #2 8016efc: 76bb strb r3, [r7, #26] 8016efe: e001 b.n 8016f04 } else { len = (u16_t)diff; 8016f00: 693b ldr r3, [r7, #16] 8016f02: 83bb strh r3, [r7, #28] } available = tcp_sndbuf(conn->pcb.tcp); 8016f04: 687b ldr r3, [r7, #4] 8016f06: 685b ldr r3, [r3, #4] 8016f08: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 8016f0c: 81fb strh r3, [r7, #14] if (available < len) { 8016f0e: 89fa ldrh r2, [r7, #14] 8016f10: 8bbb ldrh r3, [r7, #28] 8016f12: 429a cmp r2, r3 8016f14: d216 bcs.n 8016f44 /* don't try to write more than sendbuf */ len = available; 8016f16: 89fb ldrh r3, [r7, #14] 8016f18: 83bb strh r3, [r7, #28] if (dontblock) { 8016f1a: 7e3b ldrb r3, [r7, #24] 8016f1c: 2b00 cmp r3, #0 8016f1e: d00d beq.n 8016f3c if (!len) { 8016f20: 8bbb ldrh r3, [r7, #28] 8016f22: 2b00 cmp r3, #0 8016f24: d10e bne.n 8016f44 /* set error according to partial write or not */ err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK; 8016f26: 687b ldr r3, [r7, #4] 8016f28: 6adb ldr r3, [r3, #44] @ 0x2c 8016f2a: 699b ldr r3, [r3, #24] 8016f2c: 2b00 cmp r3, #0 8016f2e: d102 bne.n 8016f36 8016f30: f06f 0306 mvn.w r3, #6 8016f34: e000 b.n 8016f38 8016f36: 2300 movs r3, #0 8016f38: 77fb strb r3, [r7, #31] goto err_mem; 8016f3a: e08f b.n 801705c } } else { apiflags |= TCP_WRITE_FLAG_MORE; 8016f3c: 7ebb ldrb r3, [r7, #26] 8016f3e: f043 0302 orr.w r3, r3, #2 8016f42: 76bb strb r3, [r7, #26] } } LWIP_ASSERT("lwip_netconn_do_writemore: invalid length!", 8016f44: 687b ldr r3, [r7, #4] 8016f46: 6adb ldr r3, [r3, #44] @ 0x2c 8016f48: 691a ldr r2, [r3, #16] 8016f4a: 8bbb ldrh r3, [r7, #28] 8016f4c: 441a add r2, r3 8016f4e: 687b ldr r3, [r7, #4] 8016f50: 6adb ldr r3, [r3, #44] @ 0x2c 8016f52: 689b ldr r3, [r3, #8] 8016f54: 685b ldr r3, [r3, #4] 8016f56: 429a cmp r2, r3 8016f58: d906 bls.n 8016f68 8016f5a: 4b10 ldr r3, [pc, #64] @ (8016f9c ) 8016f5c: f240 62a3 movw r2, #1699 @ 0x6a3 8016f60: 4916 ldr r1, [pc, #88] @ (8016fbc ) 8016f62: 4810 ldr r0, [pc, #64] @ (8016fa4 ) 8016f64: f012 fd32 bl 80299cc ((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) || 8016f68: 8bbb ldrh r3, [r7, #28] 8016f6a: f64f 72ff movw r2, #65535 @ 0xffff 8016f6e: 4293 cmp r3, r2 8016f70: d103 bne.n 8016f7a 8016f72: 693b ldr r3, [r7, #16] 8016f74: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8016f78: d209 bcs.n 8016f8e (len == (u16_t)diff && conn->current_msg->msg.w.vector_cnt > 1)) { 8016f7a: 693b ldr r3, [r7, #16] 8016f7c: b29b uxth r3, r3 if ((len == 0xffff && diff > 0xffffUL) || 8016f7e: 8bba ldrh r2, [r7, #28] 8016f80: 429a cmp r2, r3 8016f82: d11d bne.n 8016fc0 (len == (u16_t)diff && conn->current_msg->msg.w.vector_cnt > 1)) { 8016f84: 687b ldr r3, [r7, #4] 8016f86: 6adb ldr r3, [r3, #44] @ 0x2c 8016f88: 899b ldrh r3, [r3, #12] 8016f8a: 2b01 cmp r3, #1 8016f8c: d918 bls.n 8016fc0 write_more = 1; 8016f8e: 2301 movs r3, #1 8016f90: 767b strb r3, [r7, #25] apiflags |= TCP_WRITE_FLAG_MORE; 8016f92: 7ebb ldrb r3, [r7, #26] 8016f94: f043 0302 orr.w r3, r3, #2 8016f98: 76bb strb r3, [r7, #26] 8016f9a: e013 b.n 8016fc4 8016f9c: 0802cedc .word 0x0802cedc 8016fa0: 0802d034 .word 0x0802d034 8016fa4: 0802cf20 .word 0x0802cf20 8016fa8: 0802d33c .word 0x0802d33c 8016fac: 0802d044 .word 0x0802d044 8016fb0: 0802d35c .word 0x0802d35c 8016fb4: 0802d374 .word 0x0802d374 8016fb8: 0802d3b4 .word 0x0802d3b4 8016fbc: 0802d3dc .word 0x0802d3dc } else { write_more = 0; 8016fc0: 2300 movs r3, #0 8016fc2: 767b strb r3, [r7, #25] } err = tcp_write(conn->pcb.tcp, dataptr, len, apiflags); 8016fc4: 687b ldr r3, [r7, #4] 8016fc6: 6858 ldr r0, [r3, #4] 8016fc8: 7ebb ldrb r3, [r7, #26] 8016fca: 8bba ldrh r2, [r7, #28] 8016fcc: 6979 ldr r1, [r7, #20] 8016fce: f008 f827 bl 801f020 8016fd2: 4603 mov r3, r0 8016fd4: 77fb strb r3, [r7, #31] if (err == ERR_OK) { 8016fd6: f997 301f ldrsb.w r3, [r7, #31] 8016fda: 2b00 cmp r3, #0 8016fdc: d12c bne.n 8017038 conn->current_msg->msg.w.offset += len; 8016fde: 687b ldr r3, [r7, #4] 8016fe0: 6adb ldr r3, [r3, #44] @ 0x2c 8016fe2: 6999 ldr r1, [r3, #24] 8016fe4: 8bba ldrh r2, [r7, #28] 8016fe6: 687b ldr r3, [r7, #4] 8016fe8: 6adb ldr r3, [r3, #44] @ 0x2c 8016fea: 440a add r2, r1 8016fec: 619a str r2, [r3, #24] conn->current_msg->msg.w.vector_off += len; 8016fee: 687b ldr r3, [r7, #4] 8016ff0: 6adb ldr r3, [r3, #44] @ 0x2c 8016ff2: 6919 ldr r1, [r3, #16] 8016ff4: 8bba ldrh r2, [r7, #28] 8016ff6: 687b ldr r3, [r7, #4] 8016ff8: 6adb ldr r3, [r3, #44] @ 0x2c 8016ffa: 440a add r2, r1 8016ffc: 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) { 8016ffe: 687b ldr r3, [r7, #4] 8017000: 6adb ldr r3, [r3, #44] @ 0x2c 8017002: 691a ldr r2, [r3, #16] 8017004: 687b ldr r3, [r7, #4] 8017006: 6adb ldr r3, [r3, #44] @ 0x2c 8017008: 689b ldr r3, [r3, #8] 801700a: 685b ldr r3, [r3, #4] 801700c: 429a cmp r2, r3 801700e: d113 bne.n 8017038 conn->current_msg->msg.w.vector_cnt--; 8017010: 687b ldr r3, [r7, #4] 8017012: 6adb ldr r3, [r3, #44] @ 0x2c 8017014: 899a ldrh r2, [r3, #12] 8017016: 3a01 subs r2, #1 8017018: b292 uxth r2, r2 801701a: 819a strh r2, [r3, #12] /* if we have additional vectors, move on to them */ if (conn->current_msg->msg.w.vector_cnt > 0) { 801701c: 687b ldr r3, [r7, #4] 801701e: 6adb ldr r3, [r3, #44] @ 0x2c 8017020: 899b ldrh r3, [r3, #12] 8017022: 2b00 cmp r3, #0 8017024: d008 beq.n 8017038 conn->current_msg->msg.w.vector++; 8017026: 687b ldr r3, [r7, #4] 8017028: 6adb ldr r3, [r3, #44] @ 0x2c 801702a: 689a ldr r2, [r3, #8] 801702c: 3208 adds r2, #8 801702e: 609a str r2, [r3, #8] conn->current_msg->msg.w.vector_off = 0; 8017030: 687b ldr r3, [r7, #4] 8017032: 6adb ldr r3, [r3, #44] @ 0x2c 8017034: 2200 movs r2, #0 8017036: 611a str r2, [r3, #16] } } } } while (write_more && err == ERR_OK); 8017038: 7e7b ldrb r3, [r7, #25] 801703a: 2b00 cmp r3, #0 801703c: d004 beq.n 8017048 801703e: f997 301f ldrsb.w r3, [r7, #31] 8017042: 2b00 cmp r3, #0 8017044: f43f af3e beq.w 8016ec4 /* if OK or memory error, check available space */ if ((err == ERR_OK) || (err == ERR_MEM)) { 8017048: f997 301f ldrsb.w r3, [r7, #31] 801704c: 2b00 cmp r3, #0 801704e: d004 beq.n 801705a 8017050: f997 301f ldrsb.w r3, [r7, #31] 8017054: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8017058: d137 bne.n 80170ca err_mem: 801705a: bf00 nop if (dontblock && (conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len)) { 801705c: 7e3b ldrb r3, [r7, #24] 801705e: 2b00 cmp r3, #0 8017060: d01b beq.n 801709a 8017062: 687b ldr r3, [r7, #4] 8017064: 6adb ldr r3, [r3, #44] @ 0x2c 8017066: 699a ldr r2, [r3, #24] 8017068: 687b ldr r3, [r7, #4] 801706a: 6adb ldr r3, [r3, #44] @ 0x2c 801706c: 695b ldr r3, [r3, #20] 801706e: 429a cmp r2, r3 8017070: d213 bcs.n 801709a /* 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); 8017072: 687b ldr r3, [r7, #4] 8017074: 6b1b ldr r3, [r3, #48] @ 0x30 8017076: 2b00 cmp r3, #0 8017078: d005 beq.n 8017086 801707a: 687b ldr r3, [r7, #4] 801707c: 6b1b ldr r3, [r3, #48] @ 0x30 801707e: 2200 movs r2, #0 8017080: 2103 movs r1, #3 8017082: 6878 ldr r0, [r7, #4] 8017084: 4798 blx r3 conn->flags |= NETCONN_FLAG_CHECK_WRITESPACE; 8017086: 687b ldr r3, [r7, #4] 8017088: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801708c: f043 0310 orr.w r3, r3, #16 8017090: b2da uxtb r2, r3 8017092: 687b ldr r3, [r7, #4] 8017094: f883 2028 strb.w r2, [r3, #40] @ 0x28 8017098: e017 b.n 80170ca } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) || 801709a: 687b ldr r3, [r7, #4] 801709c: 685b ldr r3, [r3, #4] 801709e: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 80170a2: f640 3269 movw r2, #2921 @ 0xb69 80170a6: 4293 cmp r3, r2 80170a8: d905 bls.n 80170b6 (tcp_sndqueuelen(conn->pcb.tcp) >= TCP_SNDQUEUELOWAT)) { 80170aa: 687b ldr r3, [r7, #4] 80170ac: 685b ldr r3, [r3, #4] 80170ae: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) || 80170b2: 2b07 cmp r3, #7 80170b4: d909 bls.n 80170ca /* 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); 80170b6: 687b ldr r3, [r7, #4] 80170b8: 6b1b ldr r3, [r3, #48] @ 0x30 80170ba: 2b00 cmp r3, #0 80170bc: d005 beq.n 80170ca 80170be: 687b ldr r3, [r7, #4] 80170c0: 6b1b ldr r3, [r3, #48] @ 0x30 80170c2: 2200 movs r2, #0 80170c4: 2103 movs r1, #3 80170c6: 6878 ldr r0, [r7, #4] 80170c8: 4798 blx r3 } } if (err == ERR_OK) { 80170ca: f997 301f ldrsb.w r3, [r7, #31] 80170ce: 2b00 cmp r3, #0 80170d0: d11d bne.n 801710e err_t out_err; if ((conn->current_msg->msg.w.offset == conn->current_msg->msg.w.len) || dontblock) { 80170d2: 687b ldr r3, [r7, #4] 80170d4: 6adb ldr r3, [r3, #44] @ 0x2c 80170d6: 699a ldr r2, [r3, #24] 80170d8: 687b ldr r3, [r7, #4] 80170da: 6adb ldr r3, [r3, #44] @ 0x2c 80170dc: 695b ldr r3, [r3, #20] 80170de: 429a cmp r2, r3 80170e0: d002 beq.n 80170e8 80170e2: 7e3b ldrb r3, [r7, #24] 80170e4: 2b00 cmp r3, #0 80170e6: d001 beq.n 80170ec /* return sent length (caller reads length from msg.w.offset) */ write_finished = 1; 80170e8: 2301 movs r3, #1 80170ea: 76fb strb r3, [r7, #27] } out_err = tcp_output(conn->pcb.tcp); 80170ec: 687b ldr r3, [r7, #4] 80170ee: 685b ldr r3, [r3, #4] 80170f0: 4618 mov r0, r3 80170f2: f008 fddf bl 801fcb4 80170f6: 4603 mov r3, r0 80170f8: 733b strb r3, [r7, #12] if (out_err == ERR_RTE) { 80170fa: f997 300c ldrsb.w r3, [r7, #12] 80170fe: f113 0f04 cmn.w r3, #4 8017102: d12c bne.n 801715e /* 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; 8017104: 7b3b ldrb r3, [r7, #12] 8017106: 77fb strb r3, [r7, #31] write_finished = 1; 8017108: 2301 movs r3, #1 801710a: 76fb strb r3, [r7, #27] 801710c: e027 b.n 801715e } } else if (err == ERR_MEM) { 801710e: f997 301f ldrsb.w r3, [r7, #31] 8017112: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8017116: d120 bne.n 801715a 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); 8017118: 687b ldr r3, [r7, #4] 801711a: 685b ldr r3, [r3, #4] 801711c: 4618 mov r0, r3 801711e: f008 fdc9 bl 801fcb4 8017122: 4603 mov r3, r0 8017124: 737b strb r3, [r7, #13] if (out_err == ERR_RTE) { 8017126: f997 300d ldrsb.w r3, [r7, #13] 801712a: f113 0f04 cmn.w r3, #4 801712e: d104 bne.n 801713a /* 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; 8017130: 7b7b ldrb r3, [r7, #13] 8017132: 77fb strb r3, [r7, #31] write_finished = 1; 8017134: 2301 movs r3, #1 8017136: 76fb strb r3, [r7, #27] 8017138: e011 b.n 801715e } else if (dontblock) { 801713a: 7e3b ldrb r3, [r7, #24] 801713c: 2b00 cmp r3, #0 801713e: d00e beq.n 801715e /* 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; 8017140: 687b ldr r3, [r7, #4] 8017142: 6adb ldr r3, [r3, #44] @ 0x2c 8017144: 699b ldr r3, [r3, #24] 8017146: 2b00 cmp r3, #0 8017148: d102 bne.n 8017150 801714a: f06f 0306 mvn.w r3, #6 801714e: e000 b.n 8017152 8017150: 2300 movs r3, #0 8017152: 77fb strb r3, [r7, #31] write_finished = 1; 8017154: 2301 movs r3, #1 8017156: 76fb strb r3, [r7, #27] 8017158: e001 b.n 801715e } } else { /* On errors != ERR_MEM, we don't try writing any more but return the error to the application thread. */ write_finished = 1; 801715a: 2301 movs r3, #1 801715c: 76fb strb r3, [r7, #27] } } if (write_finished) { 801715e: 7efb ldrb r3, [r7, #27] 8017160: 2b00 cmp r3, #0 8017162: d015 beq.n 8017190 /* 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); 8017164: 687b ldr r3, [r7, #4] 8017166: 6adb ldr r3, [r3, #44] @ 0x2c 8017168: 681b ldr r3, [r3, #0] 801716a: 330c adds r3, #12 801716c: 60bb str r3, [r7, #8] conn->current_msg->err = err; 801716e: 687b ldr r3, [r7, #4] 8017170: 6adb ldr r3, [r3, #44] @ 0x2c 8017172: 7ffa ldrb r2, [r7, #31] 8017174: 711a strb r2, [r3, #4] conn->current_msg = NULL; 8017176: 687b ldr r3, [r7, #4] 8017178: 2200 movs r2, #0 801717a: 62da str r2, [r3, #44] @ 0x2c conn->state = NETCONN_NONE; 801717c: 687b ldr r3, [r7, #4] 801717e: 2200 movs r2, #0 8017180: 705a strb r2, [r3, #1] #if LWIP_TCPIP_CORE_LOCKING if (delayed) 8017182: 78fb ldrb r3, [r7, #3] 8017184: 2b00 cmp r3, #0 8017186: d006 beq.n 8017196 #endif { sys_sem_signal(op_completed_sem); 8017188: 68b8 ldr r0, [r7, #8] 801718a: f00f f8f3 bl 8026374 801718e: e002 b.n 8017196 } } #if LWIP_TCPIP_CORE_LOCKING else { return ERR_MEM; 8017190: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8017194: e000 b.n 8017198 } #endif return ERR_OK; 8017196: 2300 movs r3, #0 } 8017198: 4618 mov r0, r3 801719a: 3720 adds r7, #32 801719c: 46bd mov sp, r7 801719e: bd80 pop {r7, pc} 080171a0 : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_write(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: 60bb str r3, [r7, #8] err_t err = netconn_err(msg->conn); 80171ac: 68bb ldr r3, [r7, #8] 80171ae: 681b ldr r3, [r3, #0] 80171b0: 4618 mov r0, r3 80171b2: f7fe fca7 bl 8015b04 80171b6: 4603 mov r3, r0 80171b8: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 80171ba: f997 300f ldrsb.w r3, [r7, #15] 80171be: 2b00 cmp r3, #0 80171c0: d164 bne.n 801728c if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { 80171c2: 68bb ldr r3, [r7, #8] 80171c4: 681b ldr r3, [r3, #0] 80171c6: 781b ldrb r3, [r3, #0] 80171c8: f003 03f0 and.w r3, r3, #240 @ 0xf0 80171cc: 2b10 cmp r3, #16 80171ce: d15b bne.n 8017288 #if LWIP_TCP if (msg->conn->state != NETCONN_NONE) { 80171d0: 68bb ldr r3, [r7, #8] 80171d2: 681b ldr r3, [r3, #0] 80171d4: 785b ldrb r3, [r3, #1] 80171d6: 2b00 cmp r3, #0 80171d8: d002 beq.n 80171e0 /* netconn is connecting, closing or in blocking write */ err = ERR_INPROGRESS; 80171da: 23fb movs r3, #251 @ 0xfb 80171dc: 73fb strb r3, [r7, #15] 80171de: e055 b.n 801728c } else if (msg->conn->pcb.tcp != NULL) { 80171e0: 68bb ldr r3, [r7, #8] 80171e2: 681b ldr r3, [r3, #0] 80171e4: 685b ldr r3, [r3, #4] 80171e6: 2b00 cmp r3, #0 80171e8: d04b beq.n 8017282 msg->conn->state = NETCONN_WRITE; 80171ea: 68bb ldr r3, [r7, #8] 80171ec: 681b ldr r3, [r3, #0] 80171ee: 2201 movs r2, #1 80171f0: 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); 80171f2: 68bb ldr r3, [r7, #8] 80171f4: 681b ldr r3, [r3, #0] 80171f6: 6adb ldr r3, [r3, #44] @ 0x2c 80171f8: 2b00 cmp r3, #0 80171fa: d006 beq.n 801720a 80171fc: 4b27 ldr r3, [pc, #156] @ (801729c ) 80171fe: f240 7223 movw r2, #1827 @ 0x723 8017202: 4927 ldr r1, [pc, #156] @ (80172a0 ) 8017204: 4827 ldr r0, [pc, #156] @ (80172a4 ) 8017206: f012 fbe1 bl 80299cc LWIP_ASSERT("msg->msg.w.len != 0", msg->msg.w.len != 0); 801720a: 68bb ldr r3, [r7, #8] 801720c: 695b ldr r3, [r3, #20] 801720e: 2b00 cmp r3, #0 8017210: d106 bne.n 8017220 8017212: 4b22 ldr r3, [pc, #136] @ (801729c ) 8017214: f240 7224 movw r2, #1828 @ 0x724 8017218: 4923 ldr r1, [pc, #140] @ (80172a8 ) 801721a: 4822 ldr r0, [pc, #136] @ (80172a4 ) 801721c: f012 fbd6 bl 80299cc msg->conn->current_msg = msg; 8017220: 68bb ldr r3, [r7, #8] 8017222: 681b ldr r3, [r3, #0] 8017224: 68ba ldr r2, [r7, #8] 8017226: 62da str r2, [r3, #44] @ 0x2c #if LWIP_TCPIP_CORE_LOCKING if (lwip_netconn_do_writemore(msg->conn, 0) != ERR_OK) { 8017228: 68bb ldr r3, [r7, #8] 801722a: 681b ldr r3, [r3, #0] 801722c: 2100 movs r1, #0 801722e: 4618 mov r0, r3 8017230: f7ff fde6 bl 8016e00 8017234: 4603 mov r3, r0 8017236: 2b00 cmp r3, #0 8017238: d02c beq.n 8017294 LWIP_ASSERT("state!", msg->conn->state == NETCONN_WRITE); 801723a: 68bb ldr r3, [r7, #8] 801723c: 681b ldr r3, [r3, #0] 801723e: 785b ldrb r3, [r3, #1] 8017240: 2b01 cmp r3, #1 8017242: d006 beq.n 8017252 8017244: 4b15 ldr r3, [pc, #84] @ (801729c ) 8017246: f44f 62e5 mov.w r2, #1832 @ 0x728 801724a: 4918 ldr r1, [pc, #96] @ (80172ac ) 801724c: 4815 ldr r0, [pc, #84] @ (80172a4 ) 801724e: f012 fbbd bl 80299cc UNLOCK_TCPIP_CORE(); 8017252: f7f9 f95f bl 8010514 sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 8017256: 68bb ldr r3, [r7, #8] 8017258: 681b ldr r3, [r3, #0] 801725a: 330c adds r3, #12 801725c: 2100 movs r1, #0 801725e: 4618 mov r0, r3 8017260: f00f f857 bl 8026312 LOCK_TCPIP_CORE(); 8017264: f7f9 f946 bl 80104f4 LWIP_ASSERT("state!", msg->conn->state != NETCONN_WRITE); 8017268: 68bb ldr r3, [r7, #8] 801726a: 681b ldr r3, [r3, #0] 801726c: 785b ldrb r3, [r3, #1] 801726e: 2b01 cmp r3, #1 8017270: d110 bne.n 8017294 8017272: 4b0a ldr r3, [pc, #40] @ (801729c ) 8017274: f240 722c movw r2, #1836 @ 0x72c 8017278: 490c ldr r1, [pc, #48] @ (80172ac ) 801727a: 480a ldr r0, [pc, #40] @ (80172a4 ) 801727c: f012 fba6 bl 80299cc #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; 8017280: e008 b.n 8017294 } else { err = ERR_CONN; 8017282: 23f5 movs r3, #245 @ 0xf5 8017284: 73fb strb r3, [r7, #15] 8017286: e001 b.n 801728c #else /* LWIP_TCP */ err = ERR_VAL; #endif /* LWIP_TCP */ #if (LWIP_UDP || LWIP_RAW) } else { err = ERR_VAL; 8017288: 23fa movs r3, #250 @ 0xfa 801728a: 73fb strb r3, [r7, #15] #endif /* (LWIP_UDP || LWIP_RAW) */ } } msg->err = err; 801728c: 68bb ldr r3, [r7, #8] 801728e: 7bfa ldrb r2, [r7, #15] 8017290: 711a strb r2, [r3, #4] 8017292: e000 b.n 8017296 return; 8017294: bf00 nop TCPIP_APIMSG_ACK(msg); } 8017296: 3710 adds r7, #16 8017298: 46bd mov sp, r7 801729a: bd80 pop {r7, pc} 801729c: 0802cedc .word 0x0802cedc 80172a0: 0802d280 .word 0x0802d280 80172a4: 0802cf20 .word 0x0802cf20 80172a8: 0802d408 .word 0x0802d408 80172ac: 0802d29c .word 0x0802d29c 080172b0 : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_getaddr(void *m) { 80172b0: b580 push {r7, lr} 80172b2: b084 sub sp, #16 80172b4: af00 add r7, sp, #0 80172b6: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 80172b8: 687b ldr r3, [r7, #4] 80172ba: 60fb str r3, [r7, #12] if (msg->conn->pcb.ip != NULL) { 80172bc: 68fb ldr r3, [r7, #12] 80172be: 681b ldr r3, [r3, #0] 80172c0: 685b ldr r3, [r3, #4] 80172c2: 2b00 cmp r3, #0 80172c4: d06b beq.n 801739e if (msg->msg.ad.local) { 80172c6: 68fb ldr r3, [r7, #12] 80172c8: 7c1b ldrb r3, [r3, #16] 80172ca: 2b00 cmp r3, #0 80172cc: d007 beq.n 80172de ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr), 80172ce: 68fb ldr r3, [r7, #12] 80172d0: 681b ldr r3, [r3, #0] 80172d2: 685a ldr r2, [r3, #4] 80172d4: 68fb ldr r3, [r7, #12] 80172d6: 689b ldr r3, [r3, #8] 80172d8: 6812 ldr r2, [r2, #0] 80172da: 601a str r2, [r3, #0] 80172dc: e006 b.n 80172ec msg->conn->pcb.ip->local_ip); } else { ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr), 80172de: 68fb ldr r3, [r7, #12] 80172e0: 681b ldr r3, [r3, #0] 80172e2: 685a ldr r2, [r3, #4] 80172e4: 68fb ldr r3, [r7, #12] 80172e6: 689b ldr r3, [r3, #8] 80172e8: 6852 ldr r2, [r2, #4] 80172ea: 601a str r2, [r3, #0] msg->conn->pcb.ip->remote_ip); } msg->err = ERR_OK; 80172ec: 68fb ldr r3, [r7, #12] 80172ee: 2200 movs r2, #0 80172f0: 711a strb r2, [r3, #4] switch (NETCONNTYPE_GROUP(msg->conn->type)) { 80172f2: 68fb ldr r3, [r7, #12] 80172f4: 681b ldr r3, [r3, #0] 80172f6: 781b ldrb r3, [r3, #0] 80172f8: f003 03f0 and.w r3, r3, #240 @ 0xf0 80172fc: 2b10 cmp r3, #16 80172fe: d021 beq.n 8017344 8017300: 2b20 cmp r3, #32 8017302: d144 bne.n 801738e } break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: if (msg->msg.ad.local) { 8017304: 68fb ldr r3, [r7, #12] 8017306: 7c1b ldrb r3, [r3, #16] 8017308: 2b00 cmp r3, #0 801730a: d007 beq.n 801731c API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->local_port; 801730c: 68fb ldr r3, [r7, #12] 801730e: 681b ldr r3, [r3, #0] 8017310: 685a ldr r2, [r3, #4] 8017312: 68fb ldr r3, [r7, #12] 8017314: 68db ldr r3, [r3, #12] 8017316: 8a52 ldrh r2, [r2, #18] 8017318: 801a strh r2, [r3, #0] msg->err = ERR_CONN; } else { API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->remote_port; } } break; 801731a: e044 b.n 80173a6 if ((msg->conn->pcb.udp->flags & UDP_FLAGS_CONNECTED) == 0) { 801731c: 68fb ldr r3, [r7, #12] 801731e: 681b ldr r3, [r3, #0] 8017320: 685b ldr r3, [r3, #4] 8017322: 7c1b ldrb r3, [r3, #16] 8017324: f003 0304 and.w r3, r3, #4 8017328: 2b00 cmp r3, #0 801732a: d103 bne.n 8017334 msg->err = ERR_CONN; 801732c: 68fb ldr r3, [r7, #12] 801732e: 22f5 movs r2, #245 @ 0xf5 8017330: 711a strb r2, [r3, #4] break; 8017332: e038 b.n 80173a6 API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->remote_port; 8017334: 68fb ldr r3, [r7, #12] 8017336: 681b ldr r3, [r3, #0] 8017338: 685a ldr r2, [r3, #4] 801733a: 68fb ldr r3, [r7, #12] 801733c: 68db ldr r3, [r3, #12] 801733e: 8a92 ldrh r2, [r2, #20] 8017340: 801a strh r2, [r3, #0] break; 8017342: e030 b.n 80173a6 #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: if ((msg->msg.ad.local == 0) && 8017344: 68fb ldr r3, [r7, #12] 8017346: 7c1b ldrb r3, [r3, #16] 8017348: 2b00 cmp r3, #0 801734a: d10f bne.n 801736c ((msg->conn->pcb.tcp->state == CLOSED) || (msg->conn->pcb.tcp->state == LISTEN))) { 801734c: 68fb ldr r3, [r7, #12] 801734e: 681b ldr r3, [r3, #0] 8017350: 685b ldr r3, [r3, #4] 8017352: 7d1b ldrb r3, [r3, #20] if ((msg->msg.ad.local == 0) && 8017354: 2b00 cmp r3, #0 8017356: d005 beq.n 8017364 ((msg->conn->pcb.tcp->state == CLOSED) || (msg->conn->pcb.tcp->state == LISTEN))) { 8017358: 68fb ldr r3, [r7, #12] 801735a: 681b ldr r3, [r3, #0] 801735c: 685b ldr r3, [r3, #4] 801735e: 7d1b ldrb r3, [r3, #20] 8017360: 2b01 cmp r3, #1 8017362: d103 bne.n 801736c /* pcb is not connected and remote name is requested */ msg->err = ERR_CONN; 8017364: 68fb ldr r3, [r7, #12] 8017366: 22f5 movs r2, #245 @ 0xf5 8017368: 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; 801736a: e01c b.n 80173a6 API_EXPR_DEREF(msg->msg.ad.port) = (msg->msg.ad.local ? msg->conn->pcb.tcp->local_port : msg->conn->pcb.tcp->remote_port); 801736c: 68fb ldr r3, [r7, #12] 801736e: 7c1b ldrb r3, [r3, #16] 8017370: 2b00 cmp r3, #0 8017372: d004 beq.n 801737e 8017374: 68fb ldr r3, [r7, #12] 8017376: 681b ldr r3, [r3, #0] 8017378: 685b ldr r3, [r3, #4] 801737a: 8adb ldrh r3, [r3, #22] 801737c: e003 b.n 8017386 801737e: 68fb ldr r3, [r7, #12] 8017380: 681b ldr r3, [r3, #0] 8017382: 685b ldr r3, [r3, #4] 8017384: 8b1b ldrh r3, [r3, #24] 8017386: 68fa ldr r2, [r7, #12] 8017388: 68d2 ldr r2, [r2, #12] 801738a: 8013 strh r3, [r2, #0] break; 801738c: e00b b.n 80173a6 #endif /* LWIP_TCP */ default: LWIP_ASSERT("invalid netconn_type", 0); 801738e: 4b08 ldr r3, [pc, #32] @ (80173b0 ) 8017390: f240 727d movw r2, #1917 @ 0x77d 8017394: 4907 ldr r1, [pc, #28] @ (80173b4 ) 8017396: 4808 ldr r0, [pc, #32] @ (80173b8 ) 8017398: f012 fb18 bl 80299cc break; 801739c: e003 b.n 80173a6 } } else { msg->err = ERR_CONN; 801739e: 68fb ldr r3, [r7, #12] 80173a0: 22f5 movs r2, #245 @ 0xf5 80173a2: 711a strb r2, [r3, #4] } TCPIP_APIMSG_ACK(msg); } 80173a4: bf00 nop 80173a6: bf00 nop 80173a8: 3710 adds r7, #16 80173aa: 46bd mov sp, r7 80173ac: bd80 pop {r7, pc} 80173ae: bf00 nop 80173b0: 0802cedc .word 0x0802cedc 80173b4: 0802d41c .word 0x0802d41c 80173b8: 0802cf20 .word 0x0802cf20 080173bc : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_close(void *m) { 80173bc: b580 push {r7, lr} 80173be: b084 sub sp, #16 80173c0: af00 add r7, sp, #0 80173c2: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 80173c4: 687b ldr r3, [r7, #4] 80173c6: 60fb str r3, [r7, #12] #if LWIP_TCP enum netconn_state state = msg->conn->state; 80173c8: 68fb ldr r3, [r7, #12] 80173ca: 681b ldr r3, [r3, #0] 80173cc: 785b ldrb r3, [r3, #1] 80173ce: 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) && 80173d0: 68fb ldr r3, [r7, #12] 80173d2: 681b ldr r3, [r3, #0] 80173d4: 685b ldr r3, [r3, #4] 80173d6: 2b00 cmp r3, #0 80173d8: d067 beq.n 80174aa (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) && 80173da: 68fb ldr r3, [r7, #12] 80173dc: 681b ldr r3, [r3, #0] 80173de: 781b ldrb r3, [r3, #0] 80173e0: f003 03f0 and.w r3, r3, #240 @ 0xf0 if ((msg->conn->pcb.tcp != NULL) && 80173e4: 2b10 cmp r3, #16 80173e6: d160 bne.n 80174aa ((msg->msg.sd.shut == NETCONN_SHUT_RDWR) || (state != NETCONN_LISTEN))) { 80173e8: 68fb ldr r3, [r7, #12] 80173ea: 7a1b ldrb r3, [r3, #8] (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) && 80173ec: 2b03 cmp r3, #3 80173ee: d002 beq.n 80173f6 ((msg->msg.sd.shut == NETCONN_SHUT_RDWR) || (state != NETCONN_LISTEN))) { 80173f0: 7afb ldrb r3, [r7, #11] 80173f2: 2b02 cmp r3, #2 80173f4: d059 beq.n 80174aa /* Check if we are in a connected state */ if (state == NETCONN_CONNECT) { 80173f6: 7afb ldrb r3, [r7, #11] 80173f8: 2b03 cmp r3, #3 80173fa: d103 bne.n 8017404 /* TCP connect in progress: cannot shutdown */ msg->err = ERR_CONN; 80173fc: 68fb ldr r3, [r7, #12] 80173fe: 22f5 movs r2, #245 @ 0xf5 8017400: 711a strb r2, [r3, #4] if (state == NETCONN_CONNECT) { 8017402: e057 b.n 80174b4 } else if (state == NETCONN_WRITE) { 8017404: 7afb ldrb r3, [r7, #11] 8017406: 2b01 cmp r3, #1 8017408: d103 bne.n 8017412 msg->err = tcp_shutdown(msg->conn->pcb.tcp, 1, 0); } } if (state == NETCONN_NONE) { #else /* LWIP_NETCONN_FULLDUPLEX */ msg->err = ERR_INPROGRESS; 801740a: 68fb ldr r3, [r7, #12] 801740c: 22fb movs r2, #251 @ 0xfb 801740e: 711a strb r2, [r3, #4] if (state == NETCONN_CONNECT) { 8017410: e050 b.n 80174b4 } else { #endif /* LWIP_NETCONN_FULLDUPLEX */ if (msg->msg.sd.shut & NETCONN_SHUT_RD) { 8017412: 68fb ldr r3, [r7, #12] 8017414: 7a1b ldrb r3, [r3, #8] 8017416: f003 0301 and.w r3, r3, #1 801741a: 2b00 cmp r3, #0 801741c: d004 beq.n 8017428 #if LWIP_NETCONN_FULLDUPLEX /* Mark mboxes invalid */ netconn_mark_mbox_invalid(msg->conn); #else /* LWIP_NETCONN_FULLDUPLEX */ netconn_drain(msg->conn); 801741e: 68fb ldr r3, [r7, #12] 8017420: 681b ldr r3, [r3, #0] 8017422: 4618 mov r0, r3 8017424: f7ff f82e bl 8016484 #endif /* LWIP_NETCONN_FULLDUPLEX */ } LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL); 8017428: 68fb ldr r3, [r7, #12] 801742a: 681b ldr r3, [r3, #0] 801742c: 6adb ldr r3, [r3, #44] @ 0x2c 801742e: 2b00 cmp r3, #0 8017430: d006 beq.n 8017440 8017432: 4b22 ldr r3, [pc, #136] @ (80174bc ) 8017434: f240 72bd movw r2, #1981 @ 0x7bd 8017438: 4921 ldr r1, [pc, #132] @ (80174c0 ) 801743a: 4822 ldr r0, [pc, #136] @ (80174c4 ) 801743c: f012 fac6 bl 80299cc msg->conn->state = NETCONN_CLOSE; 8017440: 68fb ldr r3, [r7, #12] 8017442: 681b ldr r3, [r3, #0] 8017444: 2204 movs r2, #4 8017446: 705a strb r2, [r3, #1] msg->conn->current_msg = msg; 8017448: 68fb ldr r3, [r7, #12] 801744a: 681b ldr r3, [r3, #0] 801744c: 68fa ldr r2, [r7, #12] 801744e: 62da str r2, [r3, #44] @ 0x2c #if LWIP_TCPIP_CORE_LOCKING if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) { 8017450: 68fb ldr r3, [r7, #12] 8017452: 681b ldr r3, [r3, #0] 8017454: 2100 movs r1, #0 8017456: 4618 mov r0, r3 8017458: f7ff f892 bl 8016580 801745c: 4603 mov r3, r0 801745e: 2b00 cmp r3, #0 8017460: d027 beq.n 80174b2 LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); 8017462: 68fb ldr r3, [r7, #12] 8017464: 681b ldr r3, [r3, #0] 8017466: 785b ldrb r3, [r3, #1] 8017468: 2b04 cmp r3, #4 801746a: d006 beq.n 801747a 801746c: 4b13 ldr r3, [pc, #76] @ (80174bc ) 801746e: f240 72c2 movw r2, #1986 @ 0x7c2 8017472: 4915 ldr r1, [pc, #84] @ (80174c8 ) 8017474: 4813 ldr r0, [pc, #76] @ (80174c4 ) 8017476: f012 faa9 bl 80299cc UNLOCK_TCPIP_CORE(); 801747a: f7f9 f84b bl 8010514 sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 801747e: 68fb ldr r3, [r7, #12] 8017480: 681b ldr r3, [r3, #0] 8017482: 330c adds r3, #12 8017484: 2100 movs r1, #0 8017486: 4618 mov r0, r3 8017488: f00e ff43 bl 8026312 LOCK_TCPIP_CORE(); 801748c: f7f9 f832 bl 80104f4 LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE); 8017490: 68fb ldr r3, [r7, #12] 8017492: 681b ldr r3, [r3, #0] 8017494: 785b ldrb r3, [r3, #1] 8017496: 2b00 cmp r3, #0 8017498: d00b beq.n 80174b2 801749a: 4b08 ldr r3, [pc, #32] @ (80174bc ) 801749c: f240 72c6 movw r2, #1990 @ 0x7c6 80174a0: 4909 ldr r1, [pc, #36] @ (80174c8 ) 80174a2: 4808 ldr r0, [pc, #32] @ (80174c4 ) 80174a4: f012 fa92 bl 80299cc } #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; 80174a8: e003 b.n 80174b2 } } else #endif /* LWIP_TCP */ { msg->err = ERR_CONN; 80174aa: 68fb ldr r3, [r7, #12] 80174ac: 22f5 movs r2, #245 @ 0xf5 80174ae: 711a strb r2, [r3, #4] 80174b0: e000 b.n 80174b4 return; 80174b2: bf00 nop } TCPIP_APIMSG_ACK(msg); } 80174b4: 3710 adds r7, #16 80174b6: 46bd mov sp, r7 80174b8: bd80 pop {r7, pc} 80174ba: bf00 nop 80174bc: 0802cedc .word 0x0802cedc 80174c0: 0802d280 .word 0x0802d280 80174c4: 0802cf20 .word 0x0802cf20 80174c8: 0802d29c .word 0x0802d29c 080174cc : EIO /* ERR_ARG -16 Illegal argument. */ }; int err_to_errno(err_t err) { 80174cc: b480 push {r7} 80174ce: b083 sub sp, #12 80174d0: af00 add r7, sp, #0 80174d2: 4603 mov r3, r0 80174d4: 71fb strb r3, [r7, #7] if ((err > 0) || (-err >= (err_t)LWIP_ARRAYSIZE(err_to_errno_table))) { 80174d6: f997 3007 ldrsb.w r3, [r7, #7] 80174da: 2b00 cmp r3, #0 80174dc: dc04 bgt.n 80174e8 80174de: f997 3007 ldrsb.w r3, [r7, #7] 80174e2: f113 0f10 cmn.w r3, #16 80174e6: da01 bge.n 80174ec return EIO; 80174e8: 2305 movs r3, #5 80174ea: e005 b.n 80174f8 } return err_to_errno_table[-err]; 80174ec: f997 3007 ldrsb.w r3, [r7, #7] 80174f0: 425b negs r3, r3 80174f2: 4a04 ldr r2, [pc, #16] @ (8017504 ) 80174f4: f852 3023 ldr.w r3, [r2, r3, lsl #2] } 80174f8: 4618 mov r0, r3 80174fa: 370c adds r7, #12 80174fc: 46bd mov sp, r7 80174fe: f85d 7b04 ldr.w r7, [sp], #4 8017502: 4770 bx lr 8017504: 08030a78 .word 0x08030a78 08017508 : * * @param buf pointer to a netbuf allocated by netbuf_new() */ void netbuf_delete(struct netbuf *buf) { 8017508: b580 push {r7, lr} 801750a: b082 sub sp, #8 801750c: af00 add r7, sp, #0 801750e: 6078 str r0, [r7, #4] if (buf != NULL) { 8017510: 687b ldr r3, [r7, #4] 8017512: 2b00 cmp r3, #0 8017514: d013 beq.n 801753e if (buf->p != NULL) { 8017516: 687b ldr r3, [r7, #4] 8017518: 681b ldr r3, [r3, #0] 801751a: 2b00 cmp r3, #0 801751c: d00b beq.n 8017536 pbuf_free(buf->p); 801751e: 687b ldr r3, [r7, #4] 8017520: 681b ldr r3, [r3, #0] 8017522: 4618 mov r0, r3 8017524: f002 ffda bl 801a4dc buf->p = buf->ptr = NULL; 8017528: 687b ldr r3, [r7, #4] 801752a: 2200 movs r2, #0 801752c: 605a str r2, [r3, #4] 801752e: 687b ldr r3, [r7, #4] 8017530: 685a ldr r2, [r3, #4] 8017532: 687b ldr r3, [r7, #4] 8017534: 601a str r2, [r3, #0] } memp_free(MEMP_NETBUF, buf); 8017536: 6879 ldr r1, [r7, #4] 8017538: 2006 movs r0, #6 801753a: f002 f8e1 bl 8019700 } } 801753e: bf00 nop 8017540: 3708 adds r7, #8 8017542: 46bd mov sp, r7 8017544: bd80 pop {r7, pc} ... 08017548 : * * @param buf pointer to the netbuf which contains the packet buffer to free */ void netbuf_free(struct netbuf *buf) { 8017548: b580 push {r7, lr} 801754a: b082 sub sp, #8 801754c: af00 add r7, sp, #0 801754e: 6078 str r0, [r7, #4] LWIP_ERROR("netbuf_free: invalid buf", (buf != NULL), return;); 8017550: 687b ldr r3, [r7, #4] 8017552: 2b00 cmp r3, #0 8017554: d106 bne.n 8017564 8017556: 4b0d ldr r3, [pc, #52] @ (801758c ) 8017558: 2281 movs r2, #129 @ 0x81 801755a: 490d ldr r1, [pc, #52] @ (8017590 ) 801755c: 480d ldr r0, [pc, #52] @ (8017594 ) 801755e: f012 fa35 bl 80299cc 8017562: e00f b.n 8017584 if (buf->p != NULL) { 8017564: 687b ldr r3, [r7, #4] 8017566: 681b ldr r3, [r3, #0] 8017568: 2b00 cmp r3, #0 801756a: d004 beq.n 8017576 pbuf_free(buf->p); 801756c: 687b ldr r3, [r7, #4] 801756e: 681b ldr r3, [r3, #0] 8017570: 4618 mov r0, r3 8017572: f002 ffb3 bl 801a4dc } buf->p = buf->ptr = NULL; 8017576: 687b ldr r3, [r7, #4] 8017578: 2200 movs r2, #0 801757a: 605a str r2, [r3, #4] 801757c: 687b ldr r3, [r7, #4] 801757e: 685a ldr r2, [r3, #4] 8017580: 687b ldr r3, [r7, #4] 8017582: 601a str r2, [r3, #0] #if LWIP_CHECKSUM_ON_COPY buf->flags = 0; buf->toport_chksum = 0; #endif /* LWIP_CHECKSUM_ON_COPY */ } 8017584: 3708 adds r7, #8 8017586: 46bd mov sp, r7 8017588: bd80 pop {r7, pc} 801758a: bf00 nop 801758c: 0802d434 .word 0x0802d434 8017590: 0802d4d0 .word 0x0802d4d0 8017594: 0802d484 .word 0x0802d484 08017598 : * @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) { 8017598: b580 push {r7, lr} 801759a: b084 sub sp, #16 801759c: af00 add r7, sp, #0 801759e: 60f8 str r0, [r7, #12] 80175a0: 60b9 str r1, [r7, #8] 80175a2: 4613 mov r3, r2 80175a4: 80fb strh r3, [r7, #6] LWIP_ERROR("netbuf_ref: invalid buf", (buf != NULL), return ERR_ARG;); 80175a6: 68fb ldr r3, [r7, #12] 80175a8: 2b00 cmp r3, #0 80175aa: d108 bne.n 80175be 80175ac: 4b1c ldr r3, [pc, #112] @ (8017620 ) 80175ae: 2299 movs r2, #153 @ 0x99 80175b0: 491c ldr r1, [pc, #112] @ (8017624 ) 80175b2: 481d ldr r0, [pc, #116] @ (8017628 ) 80175b4: f012 fa0a bl 80299cc 80175b8: f06f 030f mvn.w r3, #15 80175bc: e02b b.n 8017616 if (buf->p != NULL) { 80175be: 68fb ldr r3, [r7, #12] 80175c0: 681b ldr r3, [r3, #0] 80175c2: 2b00 cmp r3, #0 80175c4: d004 beq.n 80175d0 pbuf_free(buf->p); 80175c6: 68fb ldr r3, [r7, #12] 80175c8: 681b ldr r3, [r3, #0] 80175ca: 4618 mov r0, r3 80175cc: f002 ff86 bl 801a4dc } buf->p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF); 80175d0: 2241 movs r2, #65 @ 0x41 80175d2: 2100 movs r1, #0 80175d4: 2036 movs r0, #54 @ 0x36 80175d6: f002 fc6b bl 8019eb0 80175da: 4602 mov r2, r0 80175dc: 68fb ldr r3, [r7, #12] 80175de: 601a str r2, [r3, #0] if (buf->p == NULL) { 80175e0: 68fb ldr r3, [r7, #12] 80175e2: 681b ldr r3, [r3, #0] 80175e4: 2b00 cmp r3, #0 80175e6: d105 bne.n 80175f4 buf->ptr = NULL; 80175e8: 68fb ldr r3, [r7, #12] 80175ea: 2200 movs r2, #0 80175ec: 605a str r2, [r3, #4] return ERR_MEM; 80175ee: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80175f2: e010 b.n 8017616 } ((struct pbuf_rom *)buf->p)->payload = dataptr; 80175f4: 68fb ldr r3, [r7, #12] 80175f6: 681b ldr r3, [r3, #0] 80175f8: 68ba ldr r2, [r7, #8] 80175fa: 605a str r2, [r3, #4] buf->p->len = buf->p->tot_len = size; 80175fc: 68fb ldr r3, [r7, #12] 80175fe: 681b ldr r3, [r3, #0] 8017600: 88fa ldrh r2, [r7, #6] 8017602: 811a strh r2, [r3, #8] 8017604: 68fa ldr r2, [r7, #12] 8017606: 6812 ldr r2, [r2, #0] 8017608: 891b ldrh r3, [r3, #8] 801760a: 8153 strh r3, [r2, #10] buf->ptr = buf->p; 801760c: 68fb ldr r3, [r7, #12] 801760e: 681a ldr r2, [r3, #0] 8017610: 68fb ldr r3, [r7, #12] 8017612: 605a str r2, [r3, #4] return ERR_OK; 8017614: 2300 movs r3, #0 } 8017616: 4618 mov r0, r3 8017618: 3710 adds r7, #16 801761a: 46bd mov sp, r7 801761c: bd80 pop {r7, pc} 801761e: bf00 nop 8017620: 0802d434 .word 0x0802d434 8017624: 0802d4ec .word 0x0802d4ec 8017628: 0802d484 .word 0x0802d484 0801762c : #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) { 801762c: b480 push {r7} 801762e: b085 sub sp, #20 8017630: af00 add r7, sp, #0 8017632: 6078 str r0, [r7, #4] int s = fd - LWIP_SOCKET_OFFSET; 8017634: 687b ldr r3, [r7, #4] 8017636: 60fb str r3, [r7, #12] if ((s < 0) || (s >= NUM_SOCKETS)) { 8017638: 68fb ldr r3, [r7, #12] 801763a: 2b00 cmp r3, #0 801763c: db02 blt.n 8017644 801763e: 68fb ldr r3, [r7, #12] 8017640: 2b03 cmp r3, #3 8017642: dd01 ble.n 8017648 LWIP_DEBUGF(SOCKETS_DEBUG, ("tryget_socket_unconn(%d): invalid\n", fd)); return NULL; 8017644: 2300 movs r3, #0 8017646: e003 b.n 8017650 } return &sockets[s]; 8017648: 68fb ldr r3, [r7, #12] 801764a: 011b lsls r3, r3, #4 801764c: 4a03 ldr r2, [pc, #12] @ (801765c ) 801764e: 4413 add r3, r2 } 8017650: 4618 mov r0, r3 8017652: 3714 adds r7, #20 8017654: 46bd mov sp, r7 8017656: f85d 7b04 ldr.w r7, [sp], #4 801765a: 4770 bx lr 801765c: 240242e4 .word 0x240242e4 08017660 : } /* Translate a socket 'int' into a pointer (only fails if the index is invalid) */ static struct lwip_sock * tryget_socket_unconn(int fd) { 8017660: b580 push {r7, lr} 8017662: b084 sub sp, #16 8017664: af00 add r7, sp, #0 8017666: 6078 str r0, [r7, #4] struct lwip_sock *ret = tryget_socket_unconn_nouse(fd); 8017668: 6878 ldr r0, [r7, #4] 801766a: f7ff ffdf bl 801762c 801766e: 60f8 str r0, [r7, #12] if (ret != NULL) { if (!sock_inc_used(ret)) { return NULL; } } return ret; 8017670: 68fb ldr r3, [r7, #12] } 8017672: 4618 mov r0, r3 8017674: 3710 adds r7, #16 8017676: 46bd mov sp, r7 8017678: bd80 pop {r7, pc} 0801767a : * @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) { 801767a: b580 push {r7, lr} 801767c: b084 sub sp, #16 801767e: af00 add r7, sp, #0 8017680: 6078 str r0, [r7, #4] struct lwip_sock *sock = tryget_socket_unconn(fd); 8017682: 6878 ldr r0, [r7, #4] 8017684: f7ff ffec bl 8017660 8017688: 60f8 str r0, [r7, #12] if (sock != NULL) { 801768a: 68fb ldr r3, [r7, #12] 801768c: 2b00 cmp r3, #0 801768e: d005 beq.n 801769c if (sock->conn) { 8017690: 68fb ldr r3, [r7, #12] 8017692: 681b ldr r3, [r3, #0] 8017694: 2b00 cmp r3, #0 8017696: d001 beq.n 801769c return sock; 8017698: 68fb ldr r3, [r7, #12] 801769a: e000 b.n 801769e } done_socket(sock); } return NULL; 801769c: 2300 movs r3, #0 } 801769e: 4618 mov r0, r3 80176a0: 3710 adds r7, #16 80176a2: 46bd mov sp, r7 80176a4: bd80 pop {r7, pc} ... 080176a8 : * @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) { 80176a8: b580 push {r7, lr} 80176aa: b084 sub sp, #16 80176ac: af00 add r7, sp, #0 80176ae: 6078 str r0, [r7, #4] struct lwip_sock *sock = tryget_socket(fd); 80176b0: 6878 ldr r0, [r7, #4] 80176b2: f7ff ffe2 bl 801767a 80176b6: 60f8 str r0, [r7, #12] if (!sock) { 80176b8: 68fb ldr r3, [r7, #12] 80176ba: 2b00 cmp r3, #0 80176bc: d104 bne.n 80176c8 if ((fd < LWIP_SOCKET_OFFSET) || (fd >= (LWIP_SOCKET_OFFSET + NUM_SOCKETS))) { LWIP_DEBUGF(SOCKETS_DEBUG, ("get_socket(%d): invalid\n", fd)); } set_errno(EBADF); 80176be: 4b05 ldr r3, [pc, #20] @ (80176d4 ) 80176c0: 2209 movs r2, #9 80176c2: 601a str r2, [r3, #0] return NULL; 80176c4: 2300 movs r3, #0 80176c6: e000 b.n 80176ca } return sock; 80176c8: 68fb ldr r3, [r7, #12] } 80176ca: 4618 mov r0, r3 80176cc: 3710 adds r7, #16 80176ce: 46bd mov sp, r7 80176d0: bd80 pop {r7, pc} 80176d2: bf00 nop 80176d4: 2402b180 .word 0x2402b180 080176d8 : * 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) { 80176d8: b580 push {r7, lr} 80176da: b084 sub sp, #16 80176dc: af00 add r7, sp, #0 80176de: 6078 str r0, [r7, #4] 80176e0: 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) { 80176e2: 2300 movs r3, #0 80176e4: 60fb str r3, [r7, #12] 80176e6: e052 b.n 801778e /* Protect socket array */ SYS_ARCH_PROTECT(lev); 80176e8: f00e feda bl 80264a0 80176ec: 60b8 str r0, [r7, #8] if (!sockets[i].conn) { 80176ee: 4a2c ldr r2, [pc, #176] @ (80177a0 ) 80176f0: 68fb ldr r3, [r7, #12] 80176f2: 011b lsls r3, r3, #4 80176f4: 4413 add r3, r2 80176f6: 681b ldr r3, [r3, #0] 80176f8: 2b00 cmp r3, #0 80176fa: d142 bne.n 8017782 continue; } sockets[i].fd_used = 1; sockets[i].fd_free_pending = 0; #endif sockets[i].conn = newconn; 80176fc: 4a28 ldr r2, [pc, #160] @ (80177a0 ) 80176fe: 68fb ldr r3, [r7, #12] 8017700: 011b lsls r3, r3, #4 8017702: 4413 add r3, r2 8017704: 687a ldr r2, [r7, #4] 8017706: 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); 8017708: 68b8 ldr r0, [r7, #8] 801770a: f00e fed7 bl 80264bc sockets[i].lastdata.pbuf = NULL; 801770e: 4a24 ldr r2, [pc, #144] @ (80177a0 ) 8017710: 68fb ldr r3, [r7, #12] 8017712: 011b lsls r3, r3, #4 8017714: 4413 add r3, r2 8017716: 3304 adds r3, #4 8017718: 2200 movs r2, #0 801771a: 601a str r2, [r3, #0] #if LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL LWIP_ASSERT("sockets[i].select_waiting == 0", sockets[i].select_waiting == 0); 801771c: 4a20 ldr r2, [pc, #128] @ (80177a0 ) 801771e: 68fb ldr r3, [r7, #12] 8017720: 011b lsls r3, r3, #4 8017722: 4413 add r3, r2 8017724: 330e adds r3, #14 8017726: 781b ldrb r3, [r3, #0] 8017728: 2b00 cmp r3, #0 801772a: d006 beq.n 801773a 801772c: 4b1d ldr r3, [pc, #116] @ (80177a4 ) 801772e: f240 220e movw r2, #526 @ 0x20e 8017732: 491d ldr r1, [pc, #116] @ (80177a8 ) 8017734: 481d ldr r0, [pc, #116] @ (80177ac ) 8017736: f012 f949 bl 80299cc sockets[i].rcvevent = 0; 801773a: 4a19 ldr r2, [pc, #100] @ (80177a0 ) 801773c: 68fb ldr r3, [r7, #12] 801773e: 011b lsls r3, r3, #4 8017740: 4413 add r3, r2 8017742: 3308 adds r3, #8 8017744: 2200 movs r2, #0 8017746: 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); 8017748: 687b ldr r3, [r7, #4] 801774a: 781b ldrb r3, [r3, #0] 801774c: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017750: 2b10 cmp r3, #16 8017752: d102 bne.n 801775a 8017754: 683b ldr r3, [r7, #0] 8017756: 2b00 cmp r3, #0 8017758: d001 beq.n 801775e 801775a: 2301 movs r3, #1 801775c: e000 b.n 8017760 801775e: 2300 movs r3, #0 8017760: b299 uxth r1, r3 8017762: 4a0f ldr r2, [pc, #60] @ (80177a0 ) 8017764: 68fb ldr r3, [r7, #12] 8017766: 011b lsls r3, r3, #4 8017768: 4413 add r3, r2 801776a: 330a adds r3, #10 801776c: 460a mov r2, r1 801776e: 801a strh r2, [r3, #0] sockets[i].errevent = 0; 8017770: 4a0b ldr r2, [pc, #44] @ (80177a0 ) 8017772: 68fb ldr r3, [r7, #12] 8017774: 011b lsls r3, r3, #4 8017776: 4413 add r3, r2 8017778: 330c adds r3, #12 801777a: 2200 movs r2, #0 801777c: 801a strh r2, [r3, #0] #endif /* LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL */ return i + LWIP_SOCKET_OFFSET; 801777e: 68fb ldr r3, [r7, #12] 8017780: e00a b.n 8017798 } SYS_ARCH_UNPROTECT(lev); 8017782: 68b8 ldr r0, [r7, #8] 8017784: f00e fe9a bl 80264bc for (i = 0; i < NUM_SOCKETS; ++i) { 8017788: 68fb ldr r3, [r7, #12] 801778a: 3301 adds r3, #1 801778c: 60fb str r3, [r7, #12] 801778e: 68fb ldr r3, [r7, #12] 8017790: 2b03 cmp r3, #3 8017792: dda9 ble.n 80176e8 } return -1; 8017794: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8017798: 4618 mov r0, r3 801779a: 3710 adds r7, #16 801779c: 46bd mov sp, r7 801779e: bd80 pop {r7, pc} 80177a0: 240242e4 .word 0x240242e4 80177a4: 0802d5cc .word 0x0802d5cc 80177a8: 0802d600 .word 0x0802d600 80177ac: 0802d620 .word 0x0802d620 080177b0 : * @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) { 80177b0: b480 push {r7} 80177b2: b085 sub sp, #20 80177b4: af00 add r7, sp, #0 80177b6: 60f8 str r0, [r7, #12] 80177b8: 60b9 str r1, [r7, #8] 80177ba: 607a str r2, [r7, #4] 80177bc: 603b str r3, [r7, #0] } #else /* LWIP_NETCONN_FULLDUPLEX */ LWIP_UNUSED_ARG(is_tcp); #endif /* LWIP_NETCONN_FULLDUPLEX */ *lastdata = sock->lastdata; 80177be: 683b ldr r3, [r7, #0] 80177c0: 68fa ldr r2, [r7, #12] 80177c2: 6852 ldr r2, [r2, #4] 80177c4: 601a str r2, [r3, #0] sock->lastdata.pbuf = NULL; 80177c6: 68fb ldr r3, [r7, #12] 80177c8: 2200 movs r2, #0 80177ca: 605a str r2, [r3, #4] *conn = sock->conn; 80177cc: 68fb ldr r3, [r7, #12] 80177ce: 681a ldr r2, [r3, #0] 80177d0: 687b ldr r3, [r7, #4] 80177d2: 601a str r2, [r3, #0] sock->conn = NULL; 80177d4: 68fb ldr r3, [r7, #12] 80177d6: 2200 movs r2, #0 80177d8: 601a str r2, [r3, #0] return 1; 80177da: 2301 movs r3, #1 } 80177dc: 4618 mov r0, r3 80177de: 3714 adds r7, #20 80177e0: 46bd mov sp, r7 80177e2: f85d 7b04 ldr.w r7, [sp], #4 80177e6: 4770 bx lr 080177e8 : /** Free a socket's leftover members. */ static void free_socket_free_elements(int is_tcp, struct netconn *conn, union lwip_sock_lastdata *lastdata) { 80177e8: b580 push {r7, lr} 80177ea: b084 sub sp, #16 80177ec: af00 add r7, sp, #0 80177ee: 60f8 str r0, [r7, #12] 80177f0: 60b9 str r1, [r7, #8] 80177f2: 607a str r2, [r7, #4] if (lastdata->pbuf != NULL) { 80177f4: 687b ldr r3, [r7, #4] 80177f6: 681b ldr r3, [r3, #0] 80177f8: 2b00 cmp r3, #0 80177fa: d00d beq.n 8017818 if (is_tcp) { 80177fc: 68fb ldr r3, [r7, #12] 80177fe: 2b00 cmp r3, #0 8017800: d005 beq.n 801780e pbuf_free(lastdata->pbuf); 8017802: 687b ldr r3, [r7, #4] 8017804: 681b ldr r3, [r3, #0] 8017806: 4618 mov r0, r3 8017808: f002 fe68 bl 801a4dc 801780c: e004 b.n 8017818 } else { netbuf_delete(lastdata->netbuf); 801780e: 687b ldr r3, [r7, #4] 8017810: 681b ldr r3, [r3, #0] 8017812: 4618 mov r0, r3 8017814: f7ff fe78 bl 8017508 } } if (conn != NULL) { 8017818: 68bb ldr r3, [r7, #8] 801781a: 2b00 cmp r3, #0 801781c: d002 beq.n 8017824 /* netconn_prepare_delete() has already been called, here we only free the conn */ netconn_delete(conn); 801781e: 68b8 ldr r0, [r7, #8] 8017820: f7fd fd50 bl 80152c4 } } 8017824: bf00 nop 8017826: 3710 adds r7, #16 8017828: 46bd mov sp, r7 801782a: bd80 pop {r7, pc} 0801782c : * @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) { 801782c: b580 push {r7, lr} 801782e: b086 sub sp, #24 8017830: af00 add r7, sp, #0 8017832: 6078 str r0, [r7, #4] 8017834: 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); 8017836: f00e fe33 bl 80264a0 801783a: 6178 str r0, [r7, #20] freed = free_socket_locked(sock, is_tcp, &conn, &lastdata); 801783c: f107 0308 add.w r3, r7, #8 8017840: f107 020c add.w r2, r7, #12 8017844: 6839 ldr r1, [r7, #0] 8017846: 6878 ldr r0, [r7, #4] 8017848: f7ff ffb2 bl 80177b0 801784c: 6138 str r0, [r7, #16] SYS_ARCH_UNPROTECT(lev); 801784e: 6978 ldr r0, [r7, #20] 8017850: f00e fe34 bl 80264bc /* don't use 'sock' after this line, as another task might have allocated it */ if (freed) { 8017854: 693b ldr r3, [r7, #16] 8017856: 2b00 cmp r3, #0 8017858: d006 beq.n 8017868 free_socket_free_elements(is_tcp, conn, &lastdata); 801785a: 68fb ldr r3, [r7, #12] 801785c: f107 0208 add.w r2, r7, #8 8017860: 4619 mov r1, r3 8017862: 6838 ldr r0, [r7, #0] 8017864: f7ff ffc0 bl 80177e8 } } 8017868: bf00 nop 801786a: 3718 adds r7, #24 801786c: 46bd mov sp, r7 801786e: bd80 pop {r7, pc} 08017870 : return 0; } int lwip_close(int s) { 8017870: b580 push {r7, lr} 8017872: b086 sub sp, #24 8017874: af00 add r7, sp, #0 8017876: 6078 str r0, [r7, #4] struct lwip_sock *sock; int is_tcp = 0; 8017878: 2300 movs r3, #0 801787a: 617b str r3, [r7, #20] err_t err; LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_close(%d)\n", s)); sock = get_socket(s); 801787c: 6878 ldr r0, [r7, #4] 801787e: f7ff ff13 bl 80176a8 8017882: 6138 str r0, [r7, #16] if (!sock) { 8017884: 693b ldr r3, [r7, #16] 8017886: 2b00 cmp r3, #0 8017888: d102 bne.n 8017890 return -1; 801788a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801788e: e039 b.n 8017904 } if (sock->conn != NULL) { 8017890: 693b ldr r3, [r7, #16] 8017892: 681b ldr r3, [r3, #0] 8017894: 2b00 cmp r3, #0 8017896: d00b beq.n 80178b0 is_tcp = NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP; 8017898: 693b ldr r3, [r7, #16] 801789a: 681b ldr r3, [r3, #0] 801789c: 781b ldrb r3, [r3, #0] 801789e: f003 03f0 and.w r3, r3, #240 @ 0xf0 80178a2: 2b10 cmp r3, #16 80178a4: bf0c ite eq 80178a6: 2301 moveq r3, #1 80178a8: 2300 movne r3, #0 80178aa: b2db uxtb r3, r3 80178ac: 617b str r3, [r7, #20] 80178ae: e00a b.n 80178c6 } else { LWIP_ASSERT("sock->lastdata == NULL", sock->lastdata.pbuf == NULL); 80178b0: 693b ldr r3, [r7, #16] 80178b2: 685b ldr r3, [r3, #4] 80178b4: 2b00 cmp r3, #0 80178b6: d006 beq.n 80178c6 80178b8: 4b14 ldr r3, [pc, #80] @ (801790c ) 80178ba: f44f 7245 mov.w r2, #788 @ 0x314 80178be: 4914 ldr r1, [pc, #80] @ (8017910 ) 80178c0: 4814 ldr r0, [pc, #80] @ (8017914 ) 80178c2: f012 f883 bl 80299cc #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); 80178c6: 693b ldr r3, [r7, #16] 80178c8: 681b ldr r3, [r3, #0] 80178ca: 4618 mov r0, r3 80178cc: f7fd fcd6 bl 801527c 80178d0: 4603 mov r3, r0 80178d2: 73fb strb r3, [r7, #15] if (err != ERR_OK) { 80178d4: f997 300f ldrsb.w r3, [r7, #15] 80178d8: 2b00 cmp r3, #0 80178da: d00e beq.n 80178fa sock_set_errno(sock, err_to_errno(err)); 80178dc: f997 300f ldrsb.w r3, [r7, #15] 80178e0: 4618 mov r0, r3 80178e2: f7ff fdf3 bl 80174cc 80178e6: 60b8 str r0, [r7, #8] 80178e8: 68bb ldr r3, [r7, #8] 80178ea: 2b00 cmp r3, #0 80178ec: d002 beq.n 80178f4 80178ee: 4a0a ldr r2, [pc, #40] @ (8017918 ) 80178f0: 68bb ldr r3, [r7, #8] 80178f2: 6013 str r3, [r2, #0] done_socket(sock); return -1; 80178f4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80178f8: e004 b.n 8017904 } free_socket(sock, is_tcp); 80178fa: 6979 ldr r1, [r7, #20] 80178fc: 6938 ldr r0, [r7, #16] 80178fe: f7ff ff95 bl 801782c set_errno(0); return 0; 8017902: 2300 movs r3, #0 } 8017904: 4618 mov r0, r3 8017906: 3718 adds r7, #24 8017908: 46bd mov sp, r7 801790a: bd80 pop {r7, pc} 801790c: 0802d5cc .word 0x0802d5cc 8017910: 0802d68c .word 0x0802d68c 8017914: 0802d620 .word 0x0802d620 8017918: 2402b180 .word 0x2402b180 0801791c : int lwip_connect(int s, const struct sockaddr *name, socklen_t namelen) { 801791c: b580 push {r7, lr} 801791e: b08a sub sp, #40 @ 0x28 8017920: af00 add r7, sp, #0 8017922: 60f8 str r0, [r7, #12] 8017924: 60b9 str r1, [r7, #8] 8017926: 607a str r2, [r7, #4] struct lwip_sock *sock; err_t err; sock = get_socket(s); 8017928: 68f8 ldr r0, [r7, #12] 801792a: f7ff febd bl 80176a8 801792e: 6278 str r0, [r7, #36] @ 0x24 if (!sock) { 8017930: 6a7b ldr r3, [r7, #36] @ 0x24 8017932: 2b00 cmp r3, #0 8017934: d102 bne.n 801793c return -1; 8017936: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801793a: e062 b.n 8017a02 done_socket(sock); return -1; } LWIP_UNUSED_ARG(namelen); if (name->sa_family == AF_UNSPEC) { 801793c: 68bb ldr r3, [r7, #8] 801793e: 785b ldrb r3, [r3, #1] 8017940: 2b00 cmp r3, #0 8017942: d108 bne.n 8017956 LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d, AF_UNSPEC)\n", s)); err = netconn_disconnect(sock->conn); 8017944: 6a7b ldr r3, [r7, #36] @ 0x24 8017946: 681b ldr r3, [r3, #0] 8017948: 4618 mov r0, r3 801794a: f7fd fd61 bl 8015410 801794e: 4603 mov r3, r0 8017950: f887 3021 strb.w r3, [r7, #33] @ 0x21 8017954: e039 b.n 80179ca } 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) && 8017956: 687b ldr r3, [r7, #4] 8017958: 2b10 cmp r3, #16 801795a: d10c bne.n 8017976 801795c: 68bb ldr r3, [r7, #8] 801795e: 785b ldrb r3, [r3, #1] 8017960: 2b00 cmp r3, #0 8017962: d003 beq.n 801796c 8017964: 68bb ldr r3, [r7, #8] 8017966: 785b ldrb r3, [r3, #1] 8017968: 2b02 cmp r3, #2 801796a: d104 bne.n 8017976 801796c: 68bb ldr r3, [r7, #8] 801796e: f003 0303 and.w r3, r3, #3 8017972: 2b00 cmp r3, #0 8017974: d014 beq.n 80179a0 8017976: 4b25 ldr r3, [pc, #148] @ (8017a0c ) 8017978: f240 3247 movw r2, #839 @ 0x347 801797c: 4924 ldr r1, [pc, #144] @ (8017a10 ) 801797e: 4825 ldr r0, [pc, #148] @ (8017a14 ) 8017980: f012 f824 bl 80299cc 8017984: f06f 000f mvn.w r0, #15 8017988: f7ff fda0 bl 80174cc 801798c: 61f8 str r0, [r7, #28] 801798e: 69fb ldr r3, [r7, #28] 8017990: 2b00 cmp r3, #0 8017992: d002 beq.n 801799a 8017994: 4a20 ldr r2, [pc, #128] @ (8017a18 ) 8017996: 69fb ldr r3, [r7, #28] 8017998: 6013 str r3, [r2, #0] 801799a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801799e: e030 b.n 8017a02 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); 80179a0: 68bb ldr r3, [r7, #8] 80179a2: 685b ldr r3, [r3, #4] 80179a4: 613b str r3, [r7, #16] 80179a6: 68bb ldr r3, [r7, #8] 80179a8: 885b ldrh r3, [r3, #2] 80179aa: 4618 mov r0, r3 80179ac: f001 f8b4 bl 8018b18 80179b0: 4603 mov r3, r0 80179b2: 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); 80179b4: 6a7b ldr r3, [r7, #36] @ 0x24 80179b6: 681b ldr r3, [r3, #0] 80179b8: 8c7a ldrh r2, [r7, #34] @ 0x22 80179ba: f107 0110 add.w r1, r7, #16 80179be: 4618 mov r0, r3 80179c0: f7fd fcee bl 80153a0 80179c4: 4603 mov r3, r0 80179c6: f887 3021 strb.w r3, [r7, #33] @ 0x21 } if (err != ERR_OK) { 80179ca: f997 3021 ldrsb.w r3, [r7, #33] @ 0x21 80179ce: 2b00 cmp r3, #0 80179d0: d00e beq.n 80179f0 LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d) failed, err=%d\n", s, err)); sock_set_errno(sock, err_to_errno(err)); 80179d2: f997 3021 ldrsb.w r3, [r7, #33] @ 0x21 80179d6: 4618 mov r0, r3 80179d8: f7ff fd78 bl 80174cc 80179dc: 6178 str r0, [r7, #20] 80179de: 697b ldr r3, [r7, #20] 80179e0: 2b00 cmp r3, #0 80179e2: d002 beq.n 80179ea 80179e4: 4a0c ldr r2, [pc, #48] @ (8017a18 ) 80179e6: 697b ldr r3, [r7, #20] 80179e8: 6013 str r3, [r2, #0] done_socket(sock); return -1; 80179ea: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80179ee: e008 b.n 8017a02 } LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d) succeeded\n", s)); sock_set_errno(sock, 0); 80179f0: 2300 movs r3, #0 80179f2: 61bb str r3, [r7, #24] 80179f4: 69bb ldr r3, [r7, #24] 80179f6: 2b00 cmp r3, #0 80179f8: d002 beq.n 8017a00 80179fa: 4a07 ldr r2, [pc, #28] @ (8017a18 ) 80179fc: 69bb ldr r3, [r7, #24] 80179fe: 6013 str r3, [r2, #0] done_socket(sock); return 0; 8017a00: 2300 movs r3, #0 } 8017a02: 4618 mov r0, r3 8017a04: 3728 adds r7, #40 @ 0x28 8017a06: 46bd mov sp, r7 8017a08: bd80 pop {r7, pc} 8017a0a: bf00 nop 8017a0c: 0802d5cc .word 0x0802d5cc 8017a10: 0802d6a4 .word 0x0802d6a4 8017a14: 0802d620 .word 0x0802d620 8017a18: 2402b180 .word 0x2402b180 08017a1c : * 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) { 8017a1c: b580 push {r7, lr} 8017a1e: b08c sub sp, #48 @ 0x30 8017a20: af00 add r7, sp, #0 8017a22: 60f8 str r0, [r7, #12] 8017a24: 60b9 str r1, [r7, #8] 8017a26: 607a str r2, [r7, #4] 8017a28: 603b str r3, [r7, #0] u8_t apiflags = NETCONN_NOAUTORCVD; 8017a2a: 2308 movs r3, #8 8017a2c: f887 3023 strb.w r3, [r7, #35] @ 0x23 ssize_t recvd = 0; 8017a30: 2300 movs r3, #0 8017a32: 62bb str r3, [r7, #40] @ 0x28 ssize_t recv_left = (len <= SSIZE_MAX) ? (ssize_t)len : SSIZE_MAX; 8017a34: 687b ldr r3, [r7, #4] 8017a36: 2b00 cmp r3, #0 8017a38: db01 blt.n 8017a3e 8017a3a: 687b ldr r3, [r7, #4] 8017a3c: e001 b.n 8017a42 8017a3e: f06f 4300 mvn.w r3, #2147483648 @ 0x80000000 8017a42: 627b str r3, [r7, #36] @ 0x24 LWIP_ASSERT("no socket given", sock != NULL); 8017a44: 68fb ldr r3, [r7, #12] 8017a46: 2b00 cmp r3, #0 8017a48: d106 bne.n 8017a58 8017a4a: 4b74 ldr r3, [pc, #464] @ (8017c1c ) 8017a4c: f240 329e movw r2, #926 @ 0x39e 8017a50: 4973 ldr r1, [pc, #460] @ (8017c20 ) 8017a52: 4874 ldr r0, [pc, #464] @ (8017c24 ) 8017a54: f011 ffba bl 80299cc LWIP_ASSERT("this should be checked internally", NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP); 8017a58: 68fb ldr r3, [r7, #12] 8017a5a: 681b ldr r3, [r3, #0] 8017a5c: 781b ldrb r3, [r3, #0] 8017a5e: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017a62: 2b10 cmp r3, #16 8017a64: d006 beq.n 8017a74 8017a66: 4b6d ldr r3, [pc, #436] @ (8017c1c ) 8017a68: f240 329f movw r2, #927 @ 0x39f 8017a6c: 496e ldr r1, [pc, #440] @ (8017c28 ) 8017a6e: 486d ldr r0, [pc, #436] @ (8017c24 ) 8017a70: f011 ffac bl 80299cc if (flags & MSG_DONTWAIT) { 8017a74: 683b ldr r3, [r7, #0] 8017a76: f003 0308 and.w r3, r3, #8 8017a7a: 2b00 cmp r3, #0 8017a7c: d005 beq.n 8017a8a apiflags |= NETCONN_DONTBLOCK; 8017a7e: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8017a82: f043 0304 orr.w r3, r3, #4 8017a86: 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) { 8017a8a: 68fb ldr r3, [r7, #12] 8017a8c: 685b ldr r3, [r3, #4] 8017a8e: 2b00 cmp r3, #0 8017a90: d003 beq.n 8017a9a p = sock->lastdata.pbuf; 8017a92: 68fb ldr r3, [r7, #12] 8017a94: 685b ldr r3, [r3, #4] 8017a96: 617b str r3, [r7, #20] 8017a98: e036 b.n 8017b08 } 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); 8017a9a: 68fb ldr r3, [r7, #12] 8017a9c: 681b ldr r3, [r3, #0] 8017a9e: f897 2023 ldrb.w r2, [r7, #35] @ 0x23 8017aa2: f107 0114 add.w r1, r7, #20 8017aa6: 4618 mov r0, r3 8017aa8: f7fd fea4 bl 80157f4 8017aac: 4603 mov r3, r0 8017aae: 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) { 8017ab2: f997 3022 ldrsb.w r3, [r7, #34] @ 0x22 8017ab6: 2b00 cmp r3, #0 8017ab8: d019 beq.n 8017aee if (recvd > 0) { 8017aba: 6abb ldr r3, [r7, #40] @ 0x28 8017abc: 2b00 cmp r3, #0 8017abe: f300 808d bgt.w 8017bdc 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)); 8017ac2: f997 3022 ldrsb.w r3, [r7, #34] @ 0x22 8017ac6: 4618 mov r0, r3 8017ac8: f7ff fd00 bl 80174cc 8017acc: 61f8 str r0, [r7, #28] 8017ace: 69fb ldr r3, [r7, #28] 8017ad0: 2b00 cmp r3, #0 8017ad2: d002 beq.n 8017ada 8017ad4: 4a55 ldr r2, [pc, #340] @ (8017c2c ) 8017ad6: 69fb ldr r3, [r7, #28] 8017ad8: 6013 str r3, [r2, #0] if (err == ERR_CLSD) { 8017ada: f997 3022 ldrsb.w r3, [r7, #34] @ 0x22 8017ade: f113 0f0f cmn.w r3, #15 8017ae2: d101 bne.n 8017ae8 return 0; 8017ae4: 2300 movs r3, #0 8017ae6: e094 b.n 8017c12 } else { return -1; 8017ae8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8017aec: e091 b.n 8017c12 } } LWIP_ASSERT("p != NULL", p != NULL); 8017aee: 697b ldr r3, [r7, #20] 8017af0: 2b00 cmp r3, #0 8017af2: d106 bne.n 8017b02 8017af4: 4b49 ldr r3, [pc, #292] @ (8017c1c ) 8017af6: f240 32c5 movw r2, #965 @ 0x3c5 8017afa: 494d ldr r1, [pc, #308] @ (8017c30 ) 8017afc: 4849 ldr r0, [pc, #292] @ (8017c24 ) 8017afe: f011 ff65 bl 80299cc sock->lastdata.pbuf = p; 8017b02: 697a ldr r2, [r7, #20] 8017b04: 68fb ldr r3, [r7, #12] 8017b06: 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) { 8017b08: 697b ldr r3, [r7, #20] 8017b0a: 891b ldrh r3, [r3, #8] 8017b0c: 461a mov r2, r3 8017b0e: 6a7b ldr r3, [r7, #36] @ 0x24 8017b10: 4293 cmp r3, r2 8017b12: dd03 ble.n 8017b1c copylen = p->tot_len; 8017b14: 697b ldr r3, [r7, #20] 8017b16: 891b ldrh r3, [r3, #8] 8017b18: 85fb strh r3, [r7, #46] @ 0x2e 8017b1a: e001 b.n 8017b20 } else { copylen = (u16_t)recv_left; 8017b1c: 6a7b ldr r3, [r7, #36] @ 0x24 8017b1e: 85fb strh r3, [r7, #46] @ 0x2e } if (recvd + copylen < recvd) { 8017b20: 8dfa ldrh r2, [r7, #46] @ 0x2e 8017b22: 6abb ldr r3, [r7, #40] @ 0x28 8017b24: 4413 add r3, r2 8017b26: 6aba ldr r2, [r7, #40] @ 0x28 8017b28: 429a cmp r2, r3 8017b2a: dd03 ble.n 8017b34 /* overflow */ copylen = (u16_t)(SSIZE_MAX - recvd); 8017b2c: 6abb ldr r3, [r7, #40] @ 0x28 8017b2e: b29b uxth r3, r3 8017b30: 43db mvns r3, r3 8017b32: 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); 8017b34: 6978 ldr r0, [r7, #20] 8017b36: 6abb ldr r3, [r7, #40] @ 0x28 8017b38: 68ba ldr r2, [r7, #8] 8017b3a: 18d1 adds r1, r2, r3 8017b3c: 8dfa ldrh r2, [r7, #46] @ 0x2e 8017b3e: 2300 movs r3, #0 8017b40: f002 fed2 bl 801a8e8 recvd += copylen; 8017b44: 8dfb ldrh r3, [r7, #46] @ 0x2e 8017b46: 6aba ldr r2, [r7, #40] @ 0x28 8017b48: 4413 add r3, r2 8017b4a: 62bb str r3, [r7, #40] @ 0x28 /* TCP combines multiple pbufs for one recv */ LWIP_ASSERT("invalid copylen, len would underflow", recv_left >= copylen); 8017b4c: 8dfb ldrh r3, [r7, #46] @ 0x2e 8017b4e: 6a7a ldr r2, [r7, #36] @ 0x24 8017b50: 429a cmp r2, r3 8017b52: da06 bge.n 8017b62 8017b54: 4b31 ldr r3, [pc, #196] @ (8017c1c ) 8017b56: f240 32dd movw r2, #989 @ 0x3dd 8017b5a: 4936 ldr r1, [pc, #216] @ (8017c34 ) 8017b5c: 4831 ldr r0, [pc, #196] @ (8017c24 ) 8017b5e: f011 ff35 bl 80299cc recv_left -= copylen; 8017b62: 8dfb ldrh r3, [r7, #46] @ 0x2e 8017b64: 6a7a ldr r2, [r7, #36] @ 0x24 8017b66: 1ad3 subs r3, r2, r3 8017b68: 627b str r3, [r7, #36] @ 0x24 /* Unless we peek the incoming message... */ if ((flags & MSG_PEEK) == 0) { 8017b6a: 683b ldr r3, [r7, #0] 8017b6c: f003 0301 and.w r3, r3, #1 8017b70: 2b00 cmp r3, #0 8017b72: d123 bne.n 8017bbc /* ... check if there is data left in the pbuf */ LWIP_ASSERT("invalid copylen", p->tot_len >= copylen); 8017b74: 697b ldr r3, [r7, #20] 8017b76: 891b ldrh r3, [r3, #8] 8017b78: 8dfa ldrh r2, [r7, #46] @ 0x2e 8017b7a: 429a cmp r2, r3 8017b7c: d906 bls.n 8017b8c 8017b7e: 4b27 ldr r3, [pc, #156] @ (8017c1c ) 8017b80: f240 32e3 movw r2, #995 @ 0x3e3 8017b84: 492c ldr r1, [pc, #176] @ (8017c38 ) 8017b86: 4827 ldr r0, [pc, #156] @ (8017c24 ) 8017b88: f011 ff20 bl 80299cc if (p->tot_len - copylen > 0) { 8017b8c: 697b ldr r3, [r7, #20] 8017b8e: 891b ldrh r3, [r3, #8] 8017b90: 461a mov r2, r3 8017b92: 8dfb ldrh r3, [r7, #46] @ 0x2e 8017b94: 1ad3 subs r3, r2, r3 8017b96: 2b00 cmp r3, #0 8017b98: dd09 ble.n 8017bae /* 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); 8017b9a: 697b ldr r3, [r7, #20] 8017b9c: 8dfa ldrh r2, [r7, #46] @ 0x2e 8017b9e: 4611 mov r1, r2 8017ba0: 4618 mov r0, r3 8017ba2: f002 fc68 bl 801a476 8017ba6: 4602 mov r2, r0 8017ba8: 68fb ldr r3, [r7, #12] 8017baa: 605a str r2, [r3, #4] 8017bac: e006 b.n 8017bbc LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: lastdata now pbuf=%p\n", (void *)sock->lastdata.pbuf)); } else { sock->lastdata.pbuf = NULL; 8017bae: 68fb ldr r3, [r7, #12] 8017bb0: 2200 movs r2, #0 8017bb2: 605a str r2, [r3, #4] LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: deleting pbuf=%p\n", (void *)p)); pbuf_free(p); 8017bb4: 697b ldr r3, [r7, #20] 8017bb6: 4618 mov r0, r3 8017bb8: f002 fc90 bl 801a4dc } } /* once we have some data to return, only add more if we don't need to wait */ apiflags |= NETCONN_DONTBLOCK | NETCONN_NOFIN; 8017bbc: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8017bc0: f043 0314 orr.w r3, r3, #20 8017bc4: 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)); 8017bc8: 6a7b ldr r3, [r7, #36] @ 0x24 8017bca: 2b00 cmp r3, #0 8017bcc: dd08 ble.n 8017be0 8017bce: 683b ldr r3, [r7, #0] 8017bd0: f003 0301 and.w r3, r3, #1 8017bd4: 2b00 cmp r3, #0 8017bd6: f43f af58 beq.w 8017a8a lwip_recv_tcp_done: 8017bda: e001 b.n 8017be0 goto lwip_recv_tcp_done; 8017bdc: bf00 nop 8017bde: e000 b.n 8017be2 lwip_recv_tcp_done: 8017be0: bf00 nop if ((recvd > 0) && !(flags & MSG_PEEK)) { 8017be2: 6abb ldr r3, [r7, #40] @ 0x28 8017be4: 2b00 cmp r3, #0 8017be6: dd0b ble.n 8017c00 8017be8: 683b ldr r3, [r7, #0] 8017bea: f003 0301 and.w r3, r3, #1 8017bee: 2b00 cmp r3, #0 8017bf0: d106 bne.n 8017c00 /* ensure window update after copying all data */ netconn_tcp_recvd(sock->conn, (size_t)recvd); 8017bf2: 68fb ldr r3, [r7, #12] 8017bf4: 681b ldr r3, [r3, #0] 8017bf6: 6aba ldr r2, [r7, #40] @ 0x28 8017bf8: 4611 mov r1, r2 8017bfa: 4618 mov r0, r3 8017bfc: f7fd fd42 bl 8015684 } sock_set_errno(sock, 0); 8017c00: 2300 movs r3, #0 8017c02: 61bb str r3, [r7, #24] 8017c04: 69bb ldr r3, [r7, #24] 8017c06: 2b00 cmp r3, #0 8017c08: d002 beq.n 8017c10 8017c0a: 4a08 ldr r2, [pc, #32] @ (8017c2c ) 8017c0c: 69bb ldr r3, [r7, #24] 8017c0e: 6013 str r3, [r2, #0] return recvd; 8017c10: 6abb ldr r3, [r7, #40] @ 0x28 } 8017c12: 4618 mov r0, r3 8017c14: 3730 adds r7, #48 @ 0x30 8017c16: 46bd mov sp, r7 8017c18: bd80 pop {r7, pc} 8017c1a: bf00 nop 8017c1c: 0802d5cc .word 0x0802d5cc 8017c20: 0802d6c4 .word 0x0802d6c4 8017c24: 0802d620 .word 0x0802d620 8017c28: 0802d6d4 .word 0x0802d6d4 8017c2c: 2402b180 .word 0x2402b180 8017c30: 0802d6f8 .word 0x0802d6f8 8017c34: 0802d704 .word 0x0802d704 8017c38: 0802d72c .word 0x0802d72c 08017c3c : /* 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) { 8017c3c: b590 push {r4, r7, lr} 8017c3e: b08b sub sp, #44 @ 0x2c 8017c40: af00 add r7, sp, #0 8017c42: 60f8 str r0, [r7, #12] 8017c44: 60b9 str r1, [r7, #8] 8017c46: 603b str r3, [r7, #0] 8017c48: 4613 mov r3, r2 8017c4a: 80fb strh r3, [r7, #6] int truncated = 0; 8017c4c: 2300 movs r3, #0 8017c4e: 627b str r3, [r7, #36] @ 0x24 union sockaddr_aligned saddr; LWIP_UNUSED_ARG(conn); LWIP_ASSERT("fromaddr != NULL", fromaddr != NULL); 8017c50: 68bb ldr r3, [r7, #8] 8017c52: 2b00 cmp r3, #0 8017c54: d106 bne.n 8017c64 8017c56: 4b2b ldr r3, [pc, #172] @ (8017d04 ) 8017c58: f240 4207 movw r2, #1031 @ 0x407 8017c5c: 492a ldr r1, [pc, #168] @ (8017d08 ) 8017c5e: 482b ldr r0, [pc, #172] @ (8017d0c ) 8017c60: f011 feb4 bl 80299cc LWIP_ASSERT("from != NULL", from != NULL); 8017c64: 683b ldr r3, [r7, #0] 8017c66: 2b00 cmp r3, #0 8017c68: d106 bne.n 8017c78 8017c6a: 4b26 ldr r3, [pc, #152] @ (8017d04 ) 8017c6c: f44f 6281 mov.w r2, #1032 @ 0x408 8017c70: 4927 ldr r1, [pc, #156] @ (8017d10 ) 8017c72: 4826 ldr r0, [pc, #152] @ (8017d0c ) 8017c74: f011 feaa bl 80299cc LWIP_ASSERT("fromlen != NULL", fromlen != NULL); 8017c78: 6bbb ldr r3, [r7, #56] @ 0x38 8017c7a: 2b00 cmp r3, #0 8017c7c: d106 bne.n 8017c8c 8017c7e: 4b21 ldr r3, [pc, #132] @ (8017d04 ) 8017c80: f240 4209 movw r2, #1033 @ 0x409 8017c84: 4923 ldr r1, [pc, #140] @ (8017d14 ) 8017c86: 4821 ldr r0, [pc, #132] @ (8017d0c ) 8017c88: f011 fea0 bl 80299cc 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); 8017c8c: f107 0314 add.w r3, r7, #20 8017c90: 2210 movs r2, #16 8017c92: 701a strb r2, [r3, #0] 8017c94: f107 0314 add.w r3, r7, #20 8017c98: 2202 movs r2, #2 8017c9a: 705a strb r2, [r3, #1] 8017c9c: f107 0414 add.w r4, r7, #20 8017ca0: 88fb ldrh r3, [r7, #6] 8017ca2: 4618 mov r0, r3 8017ca4: f000 ff38 bl 8018b18 8017ca8: 4603 mov r3, r0 8017caa: 8063 strh r3, [r4, #2] 8017cac: f107 0314 add.w r3, r7, #20 8017cb0: 68ba ldr r2, [r7, #8] 8017cb2: 6812 ldr r2, [r2, #0] 8017cb4: 605a str r2, [r3, #4] 8017cb6: f107 0314 add.w r3, r7, #20 8017cba: 3308 adds r3, #8 8017cbc: 2208 movs r2, #8 8017cbe: 2100 movs r1, #0 8017cc0: 4618 mov r0, r3 8017cc2: f012 f815 bl 8029cf0 if (*fromlen < saddr.sa.sa_len) { 8017cc6: 6bbb ldr r3, [r7, #56] @ 0x38 8017cc8: 681b ldr r3, [r3, #0] 8017cca: 7d3a ldrb r2, [r7, #20] 8017ccc: 4293 cmp r3, r2 8017cce: d202 bcs.n 8017cd6 truncated = 1; 8017cd0: 2301 movs r3, #1 8017cd2: 627b str r3, [r7, #36] @ 0x24 8017cd4: e008 b.n 8017ce8 } else if (*fromlen > saddr.sa.sa_len) { 8017cd6: 6bbb ldr r3, [r7, #56] @ 0x38 8017cd8: 681b ldr r3, [r3, #0] 8017cda: 7d3a ldrb r2, [r7, #20] 8017cdc: 4293 cmp r3, r2 8017cde: d903 bls.n 8017ce8 *fromlen = saddr.sa.sa_len; 8017ce0: 7d3b ldrb r3, [r7, #20] 8017ce2: 461a mov r2, r3 8017ce4: 6bbb ldr r3, [r7, #56] @ 0x38 8017ce6: 601a str r2, [r3, #0] } MEMCPY(from, &saddr, *fromlen); 8017ce8: 6bbb ldr r3, [r7, #56] @ 0x38 8017cea: 681a ldr r2, [r3, #0] 8017cec: f107 0314 add.w r3, r7, #20 8017cf0: 4619 mov r1, r3 8017cf2: 6838 ldr r0, [r7, #0] 8017cf4: f012 f8f3 bl 8029ede return truncated; 8017cf8: 6a7b ldr r3, [r7, #36] @ 0x24 } 8017cfa: 4618 mov r0, r3 8017cfc: 372c adds r7, #44 @ 0x2c 8017cfe: 46bd mov sp, r7 8017d00: bd90 pop {r4, r7, pc} 8017d02: bf00 nop 8017d04: 0802d5cc .word 0x0802d5cc 8017d08: 0802d73c .word 0x0802d73c 8017d0c: 0802d620 .word 0x0802d620 8017d10: 0802d750 .word 0x0802d750 8017d14: 0802d760 .word 0x0802d760 08017d18 : #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) { 8017d18: b580 push {r7, lr} 8017d1a: b088 sub sp, #32 8017d1c: af02 add r7, sp, #8 8017d1e: 60f8 str r0, [r7, #12] 8017d20: 60b9 str r1, [r7, #8] 8017d22: 607a str r2, [r7, #4] 8017d24: 603b str r3, [r7, #0] if (sock == NULL) { 8017d26: 68fb ldr r3, [r7, #12] 8017d28: 2b00 cmp r3, #0 8017d2a: d101 bne.n 8017d30 return 0; 8017d2c: 2300 movs r3, #0 8017d2e: e021 b.n 8017d74 LWIP_UNUSED_ARG(dbg_fn); LWIP_UNUSED_ARG(dbg_s); LWIP_UNUSED_ARG(dbg_ret); #if !SOCKETS_DEBUG if (from && fromlen) 8017d30: 68bb ldr r3, [r7, #8] 8017d32: 2b00 cmp r3, #0 8017d34: d01d beq.n 8017d72 8017d36: 687b ldr r3, [r7, #4] 8017d38: 2b00 cmp r3, #0 8017d3a: d01a beq.n 8017d72 #endif /* !SOCKETS_DEBUG */ { /* get remote addr/port from tcp_pcb */ u16_t port; ip_addr_t tmpaddr; netconn_getaddr(sock->conn, &tmpaddr, &port, 0); 8017d3c: 68fb ldr r3, [r7, #12] 8017d3e: 6818 ldr r0, [r3, #0] 8017d40: f107 0216 add.w r2, r7, #22 8017d44: f107 0110 add.w r1, r7, #16 8017d48: 2300 movs r3, #0 8017d4a: f7fd fad7 bl 80152fc 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) { 8017d4e: 68bb ldr r3, [r7, #8] 8017d50: 2b00 cmp r3, #0 8017d52: d00e beq.n 8017d72 8017d54: 687b ldr r3, [r7, #4] 8017d56: 2b00 cmp r3, #0 8017d58: d00b beq.n 8017d72 return lwip_sock_make_addr(sock->conn, &tmpaddr, port, from, fromlen); 8017d5a: 68fb ldr r3, [r7, #12] 8017d5c: 6818 ldr r0, [r3, #0] 8017d5e: 8afa ldrh r2, [r7, #22] 8017d60: f107 0110 add.w r1, r7, #16 8017d64: 687b ldr r3, [r7, #4] 8017d66: 9300 str r3, [sp, #0] 8017d68: 68bb ldr r3, [r7, #8] 8017d6a: f7ff ff67 bl 8017c3c 8017d6e: 4603 mov r3, r0 8017d70: e000 b.n 8017d74 } } return 0; 8017d72: 2300 movs r3, #0 } 8017d74: 4618 mov r0, r3 8017d76: 3718 adds r7, #24 8017d78: 46bd mov sp, r7 8017d7a: bd80 pop {r7, pc} 08017d7c : /* 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) { 8017d7c: b590 push {r4, r7, lr} 8017d7e: b08d sub sp, #52 @ 0x34 8017d80: af02 add r7, sp, #8 8017d82: 60f8 str r0, [r7, #12] 8017d84: 60b9 str r1, [r7, #8] 8017d86: 607a str r2, [r7, #4] 8017d88: 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;); 8017d8a: 687b ldr r3, [r7, #4] 8017d8c: 689b ldr r3, [r3, #8] 8017d8e: 2b00 cmp r3, #0 8017d90: d10d bne.n 8017dae 8017d92: 687b ldr r3, [r7, #4] 8017d94: 68db ldr r3, [r3, #12] 8017d96: 2b00 cmp r3, #0 8017d98: dd09 ble.n 8017dae 8017d9a: 4b5e ldr r3, [pc, #376] @ (8017f14 ) 8017d9c: f240 4249 movw r2, #1097 @ 0x449 8017da0: 495d ldr r1, [pc, #372] @ (8017f18 ) 8017da2: 485e ldr r0, [pc, #376] @ (8017f1c ) 8017da4: f011 fe12 bl 80299cc 8017da8: f06f 030f mvn.w r3, #15 8017dac: e0ae b.n 8017f0c if (flags & MSG_DONTWAIT) { 8017dae: 68bb ldr r3, [r7, #8] 8017db0: f003 0308 and.w r3, r3, #8 8017db4: 2b00 cmp r3, #0 8017db6: d003 beq.n 8017dc0 apiflags = NETCONN_DONTBLOCK; 8017db8: 2304 movs r3, #4 8017dba: f887 3026 strb.w r3, [r7, #38] @ 0x26 8017dbe: e002 b.n 8017dc6 } else { apiflags = 0; 8017dc0: 2300 movs r3, #0 8017dc2: 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; 8017dc6: 68fb ldr r3, [r7, #12] 8017dc8: 685b ldr r3, [r3, #4] 8017dca: 613b str r3, [r7, #16] if (buf == NULL) { 8017dcc: 693b ldr r3, [r7, #16] 8017dce: 2b00 cmp r3, #0 8017dd0: d11f bne.n 8017e12 /* 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); 8017dd2: 68fb ldr r3, [r7, #12] 8017dd4: 681b ldr r3, [r3, #0] 8017dd6: f897 2026 ldrb.w r2, [r7, #38] @ 0x26 8017dda: f107 0110 add.w r1, r7, #16 8017dde: 4618 mov r0, r3 8017de0: f7fd fd34 bl 801584c 8017de4: 4603 mov r3, r0 8017de6: 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) { 8017dea: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 8017dee: 2b00 cmp r3, #0 8017df0: d002 beq.n 8017df8 return err; 8017df2: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 8017df6: e089 b.n 8017f0c } LWIP_ASSERT("buf != NULL", buf != NULL); 8017df8: 693b ldr r3, [r7, #16] 8017dfa: 2b00 cmp r3, #0 8017dfc: d106 bne.n 8017e0c 8017dfe: 4b45 ldr r3, [pc, #276] @ (8017f14 ) 8017e00: f240 425e movw r2, #1118 @ 0x45e 8017e04: 4946 ldr r1, [pc, #280] @ (8017f20 ) 8017e06: 4845 ldr r0, [pc, #276] @ (8017f1c ) 8017e08: f011 fde0 bl 80299cc sock->lastdata.netbuf = buf; 8017e0c: 693a ldr r2, [r7, #16] 8017e0e: 68fb ldr r3, [r7, #12] 8017e10: 605a str r2, [r3, #4] } buflen = buf->p->tot_len; 8017e12: 693b ldr r3, [r7, #16] 8017e14: 681b ldr r3, [r3, #0] 8017e16: 891b ldrh r3, [r3, #8] 8017e18: 837b strh r3, [r7, #26] LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom_udp_raw: buflen=%"U16_F"\n", buflen)); copied = 0; 8017e1a: 2300 movs r3, #0 8017e1c: 847b strh r3, [r7, #34] @ 0x22 /* copy the pbuf payload into the iovs */ for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) { 8017e1e: 2300 movs r3, #0 8017e20: 61fb str r3, [r7, #28] 8017e22: e029 b.n 8017e78 u16_t len_left = (u16_t)(buflen - copied); 8017e24: 8b7a ldrh r2, [r7, #26] 8017e26: 8c7b ldrh r3, [r7, #34] @ 0x22 8017e28: 1ad3 subs r3, r2, r3 8017e2a: 833b strh r3, [r7, #24] if (msg->msg_iov[i].iov_len > len_left) { 8017e2c: 687b ldr r3, [r7, #4] 8017e2e: 689a ldr r2, [r3, #8] 8017e30: 69fb ldr r3, [r7, #28] 8017e32: 00db lsls r3, r3, #3 8017e34: 4413 add r3, r2 8017e36: 685a ldr r2, [r3, #4] 8017e38: 8b3b ldrh r3, [r7, #24] 8017e3a: 429a cmp r2, r3 8017e3c: d902 bls.n 8017e44 copylen = len_left; 8017e3e: 8b3b ldrh r3, [r7, #24] 8017e40: 84bb strh r3, [r7, #36] @ 0x24 8017e42: e006 b.n 8017e52 } else { copylen = (u16_t)msg->msg_iov[i].iov_len; 8017e44: 687b ldr r3, [r7, #4] 8017e46: 689a ldr r2, [r3, #8] 8017e48: 69fb ldr r3, [r7, #28] 8017e4a: 00db lsls r3, r3, #3 8017e4c: 4413 add r3, r2 8017e4e: 685b ldr r3, [r3, #4] 8017e50: 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); 8017e52: 693b ldr r3, [r7, #16] 8017e54: 6818 ldr r0, [r3, #0] 8017e56: 687b ldr r3, [r7, #4] 8017e58: 689a ldr r2, [r3, #8] 8017e5a: 69fb ldr r3, [r7, #28] 8017e5c: 00db lsls r3, r3, #3 8017e5e: 4413 add r3, r2 8017e60: 6819 ldr r1, [r3, #0] 8017e62: 8c7b ldrh r3, [r7, #34] @ 0x22 8017e64: 8cba ldrh r2, [r7, #36] @ 0x24 8017e66: f002 fd3f bl 801a8e8 copied = (u16_t)(copied + copylen); 8017e6a: 8c7a ldrh r2, [r7, #34] @ 0x22 8017e6c: 8cbb ldrh r3, [r7, #36] @ 0x24 8017e6e: 4413 add r3, r2 8017e70: 847b strh r3, [r7, #34] @ 0x22 for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) { 8017e72: 69fb ldr r3, [r7, #28] 8017e74: 3301 adds r3, #1 8017e76: 61fb str r3, [r7, #28] 8017e78: 687b ldr r3, [r7, #4] 8017e7a: 68db ldr r3, [r3, #12] 8017e7c: 69fa ldr r2, [r7, #28] 8017e7e: 429a cmp r2, r3 8017e80: da03 bge.n 8017e8a 8017e82: 8c7a ldrh r2, [r7, #34] @ 0x22 8017e84: 8b7b ldrh r3, [r7, #26] 8017e86: 429a cmp r2, r3 8017e88: d3cc bcc.n 8017e24 } /* Check to see from where the data was.*/ #if !SOCKETS_DEBUG if (msg->msg_name && msg->msg_namelen) 8017e8a: 687b ldr r3, [r7, #4] 8017e8c: 681b ldr r3, [r3, #0] 8017e8e: 2b00 cmp r3, #0 8017e90: d01a beq.n 8017ec8 8017e92: 687b ldr r3, [r7, #4] 8017e94: 685b ldr r3, [r3, #4] 8017e96: 2b00 cmp r3, #0 8017e98: d016 beq.n 8017ec8 #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) { 8017e9a: 687b ldr r3, [r7, #4] 8017e9c: 681b ldr r3, [r3, #0] 8017e9e: 2b00 cmp r3, #0 8017ea0: d012 beq.n 8017ec8 8017ea2: 687b ldr r3, [r7, #4] 8017ea4: 685b ldr r3, [r3, #4] 8017ea6: 2b00 cmp r3, #0 8017ea8: d00e beq.n 8017ec8 lwip_sock_make_addr(sock->conn, netbuf_fromaddr(buf), netbuf_fromport(buf), 8017eaa: 68fb ldr r3, [r7, #12] 8017eac: 6818 ldr r0, [r3, #0] 8017eae: 693b ldr r3, [r7, #16] 8017eb0: f103 0108 add.w r1, r3, #8 8017eb4: 693b ldr r3, [r7, #16] 8017eb6: 899a ldrh r2, [r3, #12] (struct sockaddr *)msg->msg_name, &msg->msg_namelen); 8017eb8: 687b ldr r3, [r7, #4] 8017eba: 681c ldr r4, [r3, #0] lwip_sock_make_addr(sock->conn, netbuf_fromaddr(buf), netbuf_fromport(buf), 8017ebc: 687b ldr r3, [r7, #4] 8017ebe: 3304 adds r3, #4 8017ec0: 9300 str r3, [sp, #0] 8017ec2: 4623 mov r3, r4 8017ec4: f7ff feba bl 8017c3c } } /* Initialize flag output */ msg->msg_flags = 0; 8017ec8: 687b ldr r3, [r7, #4] 8017eca: 2200 movs r2, #0 8017ecc: 619a str r2, [r3, #24] if (msg->msg_control) { 8017ece: 687b ldr r3, [r7, #4] 8017ed0: 691b ldr r3, [r3, #16] 8017ed2: 2b00 cmp r3, #0 8017ed4: d007 beq.n 8017ee6 u8_t wrote_msg = 0; 8017ed6: 2300 movs r3, #0 8017ed8: 75fb strb r3, [r7, #23] #endif /* LWIP_IPV4 */ } } #endif /* LWIP_NETBUF_RECVINFO */ if (!wrote_msg) { 8017eda: 7dfb ldrb r3, [r7, #23] 8017edc: 2b00 cmp r3, #0 8017ede: d102 bne.n 8017ee6 msg->msg_controllen = 0; 8017ee0: 687b ldr r3, [r7, #4] 8017ee2: 2200 movs r2, #0 8017ee4: 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) { 8017ee6: 68bb ldr r3, [r7, #8] 8017ee8: f003 0301 and.w r3, r3, #1 8017eec: 2b00 cmp r3, #0 8017eee: d106 bne.n 8017efe sock->lastdata.netbuf = NULL; 8017ef0: 68fb ldr r3, [r7, #12] 8017ef2: 2200 movs r2, #0 8017ef4: 605a str r2, [r3, #4] netbuf_delete(buf); 8017ef6: 693b ldr r3, [r7, #16] 8017ef8: 4618 mov r0, r3 8017efa: f7ff fb05 bl 8017508 } if (datagram_len) { 8017efe: 683b ldr r3, [r7, #0] 8017f00: 2b00 cmp r3, #0 8017f02: d002 beq.n 8017f0a *datagram_len = buflen; 8017f04: 683b ldr r3, [r7, #0] 8017f06: 8b7a ldrh r2, [r7, #26] 8017f08: 801a strh r2, [r3, #0] } return ERR_OK; 8017f0a: 2300 movs r3, #0 } 8017f0c: 4618 mov r0, r3 8017f0e: 372c adds r7, #44 @ 0x2c 8017f10: 46bd mov sp, r7 8017f12: bd90 pop {r4, r7, pc} 8017f14: 0802d5cc .word 0x0802d5cc 8017f18: 0802d770 .word 0x0802d770 8017f1c: 0802d620 .word 0x0802d620 8017f20: 0802d79c .word 0x0802d79c 08017f24 : ssize_t lwip_recvfrom(int s, void *mem, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) { 8017f24: b580 push {r7, lr} 8017f26: b096 sub sp, #88 @ 0x58 8017f28: af02 add r7, sp, #8 8017f2a: 60f8 str r0, [r7, #12] 8017f2c: 60b9 str r1, [r7, #8] 8017f2e: 607a str r2, [r7, #4] 8017f30: 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); 8017f32: 68f8 ldr r0, [r7, #12] 8017f34: f7ff fbb8 bl 80176a8 8017f38: 64f8 str r0, [r7, #76] @ 0x4c if (!sock) { 8017f3a: 6cfb ldr r3, [r7, #76] @ 0x4c 8017f3c: 2b00 cmp r3, #0 8017f3e: d102 bne.n 8017f46 return -1; 8017f40: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8017f44: e078 b.n 8018038 } #if LWIP_TCP if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { 8017f46: 6cfb ldr r3, [r7, #76] @ 0x4c 8017f48: 681b ldr r3, [r3, #0] 8017f4a: 781b ldrb r3, [r3, #0] 8017f4c: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017f50: 2b10 cmp r3, #16 8017f52: d112 bne.n 8017f7a ret = lwip_recv_tcp(sock, mem, len, flags); 8017f54: 683b ldr r3, [r7, #0] 8017f56: 687a ldr r2, [r7, #4] 8017f58: 68b9 ldr r1, [r7, #8] 8017f5a: 6cf8 ldr r0, [r7, #76] @ 0x4c 8017f5c: f7ff fd5e bl 8017a1c 8017f60: 6478 str r0, [r7, #68] @ 0x44 lwip_recv_tcp_from(sock, from, fromlen, "lwip_recvfrom", s, ret); 8017f62: 6c7b ldr r3, [r7, #68] @ 0x44 8017f64: 9301 str r3, [sp, #4] 8017f66: 68fb ldr r3, [r7, #12] 8017f68: 9300 str r3, [sp, #0] 8017f6a: 4b35 ldr r3, [pc, #212] @ (8018040 ) 8017f6c: 6dfa ldr r2, [r7, #92] @ 0x5c 8017f6e: 6db9 ldr r1, [r7, #88] @ 0x58 8017f70: 6cf8 ldr r0, [r7, #76] @ 0x4c 8017f72: f7ff fed1 bl 8017d18 done_socket(sock); return ret; 8017f76: 6c7b ldr r3, [r7, #68] @ 0x44 8017f78: e05e b.n 8018038 } else #endif { u16_t datagram_len = 0; 8017f7a: 2300 movs r3, #0 8017f7c: 877b strh r3, [r7, #58] @ 0x3a struct iovec vec; struct msghdr msg; err_t err; vec.iov_base = mem; 8017f7e: 68bb ldr r3, [r7, #8] 8017f80: 633b str r3, [r7, #48] @ 0x30 vec.iov_len = len; 8017f82: 687b ldr r3, [r7, #4] 8017f84: 637b str r3, [r7, #52] @ 0x34 msg.msg_control = NULL; 8017f86: 2300 movs r3, #0 8017f88: 627b str r3, [r7, #36] @ 0x24 msg.msg_controllen = 0; 8017f8a: 2300 movs r3, #0 8017f8c: 62bb str r3, [r7, #40] @ 0x28 msg.msg_flags = 0; 8017f8e: 2300 movs r3, #0 8017f90: 62fb str r3, [r7, #44] @ 0x2c msg.msg_iov = &vec; 8017f92: f107 0330 add.w r3, r7, #48 @ 0x30 8017f96: 61fb str r3, [r7, #28] msg.msg_iovlen = 1; 8017f98: 2301 movs r3, #1 8017f9a: 623b str r3, [r7, #32] msg.msg_name = from; 8017f9c: 6dbb ldr r3, [r7, #88] @ 0x58 8017f9e: 617b str r3, [r7, #20] msg.msg_namelen = (fromlen ? *fromlen : 0); 8017fa0: 6dfb ldr r3, [r7, #92] @ 0x5c 8017fa2: 2b00 cmp r3, #0 8017fa4: d002 beq.n 8017fac 8017fa6: 6dfb ldr r3, [r7, #92] @ 0x5c 8017fa8: 681b ldr r3, [r3, #0] 8017faa: e000 b.n 8017fae 8017fac: 2300 movs r3, #0 8017fae: 61bb str r3, [r7, #24] err = lwip_recvfrom_udp_raw(sock, flags, &msg, &datagram_len, s); 8017fb0: f107 013a add.w r1, r7, #58 @ 0x3a 8017fb4: f107 0214 add.w r2, r7, #20 8017fb8: 68fb ldr r3, [r7, #12] 8017fba: 9300 str r3, [sp, #0] 8017fbc: 460b mov r3, r1 8017fbe: 6839 ldr r1, [r7, #0] 8017fc0: 6cf8 ldr r0, [r7, #76] @ 0x4c 8017fc2: f7ff fedb bl 8017d7c 8017fc6: 4603 mov r3, r0 8017fc8: f887 304b strb.w r3, [r7, #75] @ 0x4b if (err != ERR_OK) { 8017fcc: f997 304b ldrsb.w r3, [r7, #75] @ 0x4b 8017fd0: 2b00 cmp r3, #0 8017fd2: d00e beq.n 8017ff2 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)); 8017fd4: f997 304b ldrsb.w r3, [r7, #75] @ 0x4b 8017fd8: 4618 mov r0, r3 8017fda: f7ff fa77 bl 80174cc 8017fde: 63f8 str r0, [r7, #60] @ 0x3c 8017fe0: 6bfb ldr r3, [r7, #60] @ 0x3c 8017fe2: 2b00 cmp r3, #0 8017fe4: d002 beq.n 8017fec 8017fe6: 4a17 ldr r2, [pc, #92] @ (8018044 ) 8017fe8: 6bfb ldr r3, [r7, #60] @ 0x3c 8017fea: 6013 str r3, [r2, #0] done_socket(sock); return -1; 8017fec: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8017ff0: e022 b.n 8018038 } ret = (ssize_t)LWIP_MIN(LWIP_MIN(len, datagram_len), SSIZE_MAX); 8017ff2: 8f7b ldrh r3, [r7, #58] @ 0x3a 8017ff4: 461a mov r2, r3 8017ff6: 687b ldr r3, [r7, #4] 8017ff8: 4293 cmp r3, r2 8017ffa: bf28 it cs 8017ffc: 4613 movcs r3, r2 8017ffe: f06f 4200 mvn.w r2, #2147483648 @ 0x80000000 8018002: 4293 cmp r3, r2 8018004: d206 bcs.n 8018014 8018006: 8f7b ldrh r3, [r7, #58] @ 0x3a 8018008: 461a mov r2, r3 801800a: 687b ldr r3, [r7, #4] 801800c: 4293 cmp r3, r2 801800e: bf28 it cs 8018010: 4613 movcs r3, r2 8018012: e001 b.n 8018018 8018014: f06f 4300 mvn.w r3, #2147483648 @ 0x80000000 8018018: 647b str r3, [r7, #68] @ 0x44 if (fromlen) { 801801a: 6dfb ldr r3, [r7, #92] @ 0x5c 801801c: 2b00 cmp r3, #0 801801e: d002 beq.n 8018026 *fromlen = msg.msg_namelen; 8018020: 69ba ldr r2, [r7, #24] 8018022: 6dfb ldr r3, [r7, #92] @ 0x5c 8018024: 601a str r2, [r3, #0] } } sock_set_errno(sock, 0); 8018026: 2300 movs r3, #0 8018028: 643b str r3, [r7, #64] @ 0x40 801802a: 6c3b ldr r3, [r7, #64] @ 0x40 801802c: 2b00 cmp r3, #0 801802e: d002 beq.n 8018036 8018030: 4a04 ldr r2, [pc, #16] @ (8018044 ) 8018032: 6c3b ldr r3, [r7, #64] @ 0x40 8018034: 6013 str r3, [r2, #0] done_socket(sock); return ret; 8018036: 6c7b ldr r3, [r7, #68] @ 0x44 } 8018038: 4618 mov r0, r3 801803a: 3750 adds r7, #80 @ 0x50 801803c: 46bd mov sp, r7 801803e: bd80 pop {r7, pc} 8018040: 0802d7a8 .word 0x0802d7a8 8018044: 2402b180 .word 0x2402b180 08018048 : return lwip_recvmsg(s, &msg, 0); } ssize_t lwip_recv(int s, void *mem, size_t len, int flags) { 8018048: b580 push {r7, lr} 801804a: b086 sub sp, #24 801804c: af02 add r7, sp, #8 801804e: 60f8 str r0, [r7, #12] 8018050: 60b9 str r1, [r7, #8] 8018052: 607a str r2, [r7, #4] 8018054: 603b str r3, [r7, #0] return lwip_recvfrom(s, mem, len, flags, NULL, NULL); 8018056: 2300 movs r3, #0 8018058: 9301 str r3, [sp, #4] 801805a: 2300 movs r3, #0 801805c: 9300 str r3, [sp, #0] 801805e: 683b ldr r3, [r7, #0] 8018060: 687a ldr r2, [r7, #4] 8018062: 68b9 ldr r1, [r7, #8] 8018064: 68f8 ldr r0, [r7, #12] 8018066: f7ff ff5d bl 8017f24 801806a: 4603 mov r3, r0 } 801806c: 4618 mov r0, r3 801806e: 3710 adds r7, #16 8018070: 46bd mov sp, r7 8018072: bd80 pop {r7, pc} 08018074 : #endif /* LWIP_UDP || LWIP_RAW */ } ssize_t lwip_send(int s, const void *data, size_t size, int flags) { 8018074: b580 push {r7, lr} 8018076: b08a sub sp, #40 @ 0x28 8018078: af02 add r7, sp, #8 801807a: 60f8 str r0, [r7, #12] 801807c: 60b9 str r1, [r7, #8] 801807e: 607a str r2, [r7, #4] 8018080: 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); 8018082: 68f8 ldr r0, [r7, #12] 8018084: f7ff fb10 bl 80176a8 8018088: 61f8 str r0, [r7, #28] if (!sock) { 801808a: 69fb ldr r3, [r7, #28] 801808c: 2b00 cmp r3, #0 801808e: d102 bne.n 8018096 return -1; 8018090: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018094: e046 b.n 8018124 } if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { 8018096: 69fb ldr r3, [r7, #28] 8018098: 681b ldr r3, [r3, #0] 801809a: 781b ldrb r3, [r3, #0] 801809c: f003 03f0 and.w r3, r3, #240 @ 0xf0 80180a0: 2b10 cmp r3, #16 80180a2: d00b beq.n 80180bc #if (LWIP_UDP || LWIP_RAW) done_socket(sock); return lwip_sendto(s, data, size, flags, NULL, 0); 80180a4: 2300 movs r3, #0 80180a6: 9301 str r3, [sp, #4] 80180a8: 2300 movs r3, #0 80180aa: 9300 str r3, [sp, #0] 80180ac: 683b ldr r3, [r7, #0] 80180ae: 687a ldr r2, [r7, #4] 80180b0: 68b9 ldr r1, [r7, #8] 80180b2: 68f8 ldr r0, [r7, #12] 80180b4: f000 f83c bl 8018130 80180b8: 4603 mov r3, r0 80180ba: e033 b.n 8018124 return -1; #endif /* (LWIP_UDP || LWIP_RAW) */ } write_flags = (u8_t)(NETCONN_COPY | ((flags & MSG_MORE) ? NETCONN_MORE : 0) | 80180bc: 683b ldr r3, [r7, #0] 80180be: f003 0310 and.w r3, r3, #16 write_flags = (u8_t)(NETCONN_COPY | 80180c2: 2b00 cmp r3, #0 80180c4: d001 beq.n 80180ca 80180c6: 2203 movs r2, #3 80180c8: e000 b.n 80180cc 80180ca: 2201 movs r2, #1 ((flags & MSG_MORE) ? NETCONN_MORE : 0) | 80180cc: 683b ldr r3, [r7, #0] 80180ce: 105b asrs r3, r3, #1 80180d0: b25b sxtb r3, r3 80180d2: f003 0304 and.w r3, r3, #4 80180d6: b25b sxtb r3, r3 80180d8: 4313 orrs r3, r2 80180da: b25b sxtb r3, r3 write_flags = (u8_t)(NETCONN_COPY | 80180dc: 76fb strb r3, [r7, #27] ((flags & MSG_DONTWAIT) ? NETCONN_DONTBLOCK : 0)); written = 0; 80180de: 2300 movs r3, #0 80180e0: 613b str r3, [r7, #16] err = netconn_write_partly(sock->conn, data, size, write_flags, &written); 80180e2: 69fb ldr r3, [r7, #28] 80180e4: 6818 ldr r0, [r3, #0] 80180e6: 7efa ldrb r2, [r7, #27] 80180e8: f107 0310 add.w r3, r7, #16 80180ec: 9300 str r3, [sp, #0] 80180ee: 4613 mov r3, r2 80180f0: 687a ldr r2, [r7, #4] 80180f2: 68b9 ldr r1, [r7, #8] 80180f4: f7fd fc04 bl 8015900 80180f8: 4603 mov r3, r0 80180fa: 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)); 80180fc: f997 301a ldrsb.w r3, [r7, #26] 8018100: 4618 mov r0, r3 8018102: f7ff f9e3 bl 80174cc 8018106: 6178 str r0, [r7, #20] 8018108: 697b ldr r3, [r7, #20] 801810a: 2b00 cmp r3, #0 801810c: d002 beq.n 8018114 801810e: 4a07 ldr r2, [pc, #28] @ (801812c ) 8018110: 697b ldr r3, [r7, #20] 8018112: 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); 8018114: f997 301a ldrsb.w r3, [r7, #26] 8018118: 2b00 cmp r3, #0 801811a: d101 bne.n 8018120 801811c: 693b ldr r3, [r7, #16] 801811e: e001 b.n 8018124 8018120: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8018124: 4618 mov r0, r3 8018126: 3720 adds r7, #32 8018128: 46bd mov sp, r7 801812a: bd80 pop {r7, pc} 801812c: 2402b180 .word 0x2402b180 08018130 : } ssize_t lwip_sendto(int s, const void *data, size_t size, int flags, const struct sockaddr *to, socklen_t tolen) { 8018130: b580 push {r7, lr} 8018132: b08e sub sp, #56 @ 0x38 8018134: af00 add r7, sp, #0 8018136: 60f8 str r0, [r7, #12] 8018138: 60b9 str r1, [r7, #8] 801813a: 607a str r2, [r7, #4] 801813c: 603b str r3, [r7, #0] err_t err; u16_t short_size; u16_t remote_port; struct netbuf buf; sock = get_socket(s); 801813e: 68f8 ldr r0, [r7, #12] 8018140: f7ff fab2 bl 80176a8 8018144: 6338 str r0, [r7, #48] @ 0x30 if (!sock) { 8018146: 6b3b ldr r3, [r7, #48] @ 0x30 8018148: 2b00 cmp r3, #0 801814a: d102 bne.n 8018152 return -1; 801814c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018150: e093 b.n 801827a } if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { 8018152: 6b3b ldr r3, [r7, #48] @ 0x30 8018154: 681b ldr r3, [r3, #0] 8018156: 781b ldrb r3, [r3, #0] 8018158: f003 03f0 and.w r3, r3, #240 @ 0xf0 801815c: 2b10 cmp r3, #16 801815e: d107 bne.n 8018170 #if LWIP_TCP done_socket(sock); return lwip_send(s, data, size, flags); 8018160: 683b ldr r3, [r7, #0] 8018162: 687a ldr r2, [r7, #4] 8018164: 68b9 ldr r1, [r7, #8] 8018166: 68f8 ldr r0, [r7, #12] 8018168: f7ff ff84 bl 8018074 801816c: 4603 mov r3, r0 801816e: e084 b.n 801827a done_socket(sock); return -1; #endif /* LWIP_TCP */ } if (size > LWIP_MIN(0xFFFF, SSIZE_MAX)) { 8018170: 687b ldr r3, [r7, #4] 8018172: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8018176: d30a bcc.n 801818e /* cannot fit into one datagram (at least for us) */ sock_set_errno(sock, EMSGSIZE); 8018178: 235a movs r3, #90 @ 0x5a 801817a: 623b str r3, [r7, #32] 801817c: 6a3b ldr r3, [r7, #32] 801817e: 2b00 cmp r3, #0 8018180: d002 beq.n 8018188 8018182: 4a40 ldr r2, [pc, #256] @ (8018284 ) 8018184: 6a3b ldr r3, [r7, #32] 8018186: 6013 str r3, [r2, #0] done_socket(sock); return -1; 8018188: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801818c: e075 b.n 801827a } short_size = (u16_t)size; 801818e: 687b ldr r3, [r7, #4] 8018190: 85fb strh r3, [r7, #46] @ 0x2e LWIP_ERROR("lwip_sendto: invalid address", (((to == NULL) && (tolen == 0)) || 8018192: 6c3b ldr r3, [r7, #64] @ 0x40 8018194: 2b00 cmp r3, #0 8018196: d102 bne.n 801819e 8018198: 6c7b ldr r3, [r7, #68] @ 0x44 801819a: 2b00 cmp r3, #0 801819c: d023 beq.n 80181e6 801819e: 6c7b ldr r3, [r7, #68] @ 0x44 80181a0: 2b10 cmp r3, #16 80181a2: d10b bne.n 80181bc 80181a4: 6c3b ldr r3, [r7, #64] @ 0x40 80181a6: 2b00 cmp r3, #0 80181a8: d008 beq.n 80181bc 80181aa: 6c3b ldr r3, [r7, #64] @ 0x40 80181ac: 785b ldrb r3, [r3, #1] 80181ae: 2b02 cmp r3, #2 80181b0: d104 bne.n 80181bc 80181b2: 6c3b ldr r3, [r7, #64] @ 0x40 80181b4: f003 0303 and.w r3, r3, #3 80181b8: 2b00 cmp r3, #0 80181ba: d014 beq.n 80181e6 80181bc: 4b32 ldr r3, [pc, #200] @ (8018288 ) 80181be: f240 6252 movw r2, #1618 @ 0x652 80181c2: 4932 ldr r1, [pc, #200] @ (801828c ) 80181c4: 4832 ldr r0, [pc, #200] @ (8018290 ) 80181c6: f011 fc01 bl 80299cc 80181ca: f06f 000f mvn.w r0, #15 80181ce: f7ff f97d bl 80174cc 80181d2: 62b8 str r0, [r7, #40] @ 0x28 80181d4: 6abb ldr r3, [r7, #40] @ 0x28 80181d6: 2b00 cmp r3, #0 80181d8: d002 beq.n 80181e0 80181da: 4a2a ldr r2, [pc, #168] @ (8018284 ) 80181dc: 6abb ldr r3, [r7, #40] @ 0x28 80181de: 6013 str r3, [r2, #0] 80181e0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80181e4: e049 b.n 801827a ((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; 80181e6: 2300 movs r3, #0 80181e8: 617b str r3, [r7, #20] 80181ea: 697b ldr r3, [r7, #20] 80181ec: 613b str r3, [r7, #16] #if LWIP_CHECKSUM_ON_COPY buf.flags = 0; #endif /* LWIP_CHECKSUM_ON_COPY */ if (to) { 80181ee: 6c3b ldr r3, [r7, #64] @ 0x40 80181f0: 2b00 cmp r3, #0 80181f2: d00a beq.n 801820a SOCKADDR_TO_IPADDR_PORT(to, &buf.addr, remote_port); 80181f4: 6c3b ldr r3, [r7, #64] @ 0x40 80181f6: 685b ldr r3, [r3, #4] 80181f8: 61bb str r3, [r7, #24] 80181fa: 6c3b ldr r3, [r7, #64] @ 0x40 80181fc: 885b ldrh r3, [r3, #2] 80181fe: 4618 mov r0, r3 8018200: f000 fc8a bl 8018b18 8018204: 4603 mov r3, r0 8018206: 86fb strh r3, [r7, #54] @ 0x36 8018208: e003 b.n 8018212 } else { remote_port = 0; 801820a: 2300 movs r3, #0 801820c: 86fb strh r3, [r7, #54] @ 0x36 ip_addr_set_any(NETCONNTYPE_ISIPV6(netconn_type(sock->conn)), &buf.addr); 801820e: 2300 movs r3, #0 8018210: 61bb str r3, [r7, #24] } netbuf_fromport(&buf) = remote_port; 8018212: 8efb ldrh r3, [r7, #54] @ 0x36 8018214: 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); 8018216: 8dfa ldrh r2, [r7, #46] @ 0x2e 8018218: f107 0310 add.w r3, r7, #16 801821c: 68b9 ldr r1, [r7, #8] 801821e: 4618 mov r0, r3 8018220: f7ff f9ba bl 8017598 8018224: 4603 mov r3, r0 8018226: f887 302d strb.w r3, [r7, #45] @ 0x2d #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ if (err == ERR_OK) { 801822a: f997 302d ldrsb.w r3, [r7, #45] @ 0x2d 801822e: 2b00 cmp r3, #0 8018230: d10a bne.n 8018248 IP_SET_TYPE_VAL(buf.addr, IPADDR_TYPE_V4); } #endif /* LWIP_IPV4 && LWIP_IPV6 */ /* send the data */ err = netconn_send(sock->conn, &buf); 8018232: 6b3b ldr r3, [r7, #48] @ 0x30 8018234: 681b ldr r3, [r3, #0] 8018236: f107 0210 add.w r2, r7, #16 801823a: 4611 mov r1, r2 801823c: 4618 mov r0, r3 801823e: f7fd fb31 bl 80158a4 8018242: 4603 mov r3, r0 8018244: f887 302d strb.w r3, [r7, #45] @ 0x2d } /* deallocated the buffer */ netbuf_free(&buf); 8018248: f107 0310 add.w r3, r7, #16 801824c: 4618 mov r0, r3 801824e: f7ff f97b bl 8017548 sock_set_errno(sock, err_to_errno(err)); 8018252: f997 302d ldrsb.w r3, [r7, #45] @ 0x2d 8018256: 4618 mov r0, r3 8018258: f7ff f938 bl 80174cc 801825c: 6278 str r0, [r7, #36] @ 0x24 801825e: 6a7b ldr r3, [r7, #36] @ 0x24 8018260: 2b00 cmp r3, #0 8018262: d002 beq.n 801826a 8018264: 4a07 ldr r2, [pc, #28] @ (8018284 ) 8018266: 6a7b ldr r3, [r7, #36] @ 0x24 8018268: 6013 str r3, [r2, #0] done_socket(sock); return (err == ERR_OK ? short_size : -1); 801826a: f997 302d ldrsb.w r3, [r7, #45] @ 0x2d 801826e: 2b00 cmp r3, #0 8018270: d101 bne.n 8018276 8018272: 8dfb ldrh r3, [r7, #46] @ 0x2e 8018274: e001 b.n 801827a 8018276: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 801827a: 4618 mov r0, r3 801827c: 3738 adds r7, #56 @ 0x38 801827e: 46bd mov sp, r7 8018280: bd80 pop {r7, pc} 8018282: bf00 nop 8018284: 2402b180 .word 0x2402b180 8018288: 0802d5cc .word 0x0802d5cc 801828c: 0802d8ac .word 0x0802d8ac 8018290: 0802d620 .word 0x0802d620 08018294 : int lwip_socket(int domain, int type, int protocol) { 8018294: b580 push {r7, lr} 8018296: b086 sub sp, #24 8018298: af00 add r7, sp, #0 801829a: 60f8 str r0, [r7, #12] 801829c: 60b9 str r1, [r7, #8] 801829e: 607a str r2, [r7, #4] int i; LWIP_UNUSED_ARG(domain); /* @todo: check this */ /* create a netconn */ switch (type) { 80182a0: 68bb ldr r3, [r7, #8] 80182a2: 2b03 cmp r3, #3 80182a4: d009 beq.n 80182ba 80182a6: 68bb ldr r3, [r7, #8] 80182a8: 2b03 cmp r3, #3 80182aa: dc23 bgt.n 80182f4 80182ac: 68bb ldr r3, [r7, #8] 80182ae: 2b01 cmp r3, #1 80182b0: d019 beq.n 80182e6 80182b2: 68bb ldr r3, [r7, #8] 80182b4: 2b02 cmp r3, #2 80182b6: d009 beq.n 80182cc 80182b8: e01c b.n 80182f4 case SOCK_RAW: conn = netconn_new_with_proto_and_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_RAW), 80182ba: 687b ldr r3, [r7, #4] 80182bc: b2db uxtb r3, r3 80182be: 4a22 ldr r2, [pc, #136] @ (8018348 ) 80182c0: 4619 mov r1, r3 80182c2: 2040 movs r0, #64 @ 0x40 80182c4: f7fc ff60 bl 8015188 80182c8: 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; 80182ca: e019 b.n 8018300 case SOCK_DGRAM: conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, 80182cc: 687b ldr r3, [r7, #4] 80182ce: 2b88 cmp r3, #136 @ 0x88 80182d0: d101 bne.n 80182d6 80182d2: 2321 movs r3, #33 @ 0x21 80182d4: e000 b.n 80182d8 80182d6: 2320 movs r3, #32 80182d8: 4a1b ldr r2, [pc, #108] @ (8018348 ) 80182da: 2100 movs r1, #0 80182dc: 4618 mov r0, r3 80182de: f7fc ff53 bl 8015188 80182e2: 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; 80182e4: e00c b.n 8018300 case SOCK_STREAM: conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_TCP), DEFAULT_SOCKET_EVENTCB); 80182e6: 4a18 ldr r2, [pc, #96] @ (8018348 ) 80182e8: 2100 movs r1, #0 80182ea: 2010 movs r0, #16 80182ec: f7fc ff4c bl 8015188 80182f0: 6178 str r0, [r7, #20] LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_STREAM, %d) = ", domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); break; 80182f2: e005 b.n 8018300 default: LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%d, %d/UNKNOWN, %d) = -1\n", domain, type, protocol)); set_errno(EINVAL); 80182f4: 4b15 ldr r3, [pc, #84] @ (801834c ) 80182f6: 2216 movs r2, #22 80182f8: 601a str r2, [r3, #0] return -1; 80182fa: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80182fe: e01e b.n 801833e } if (!conn) { 8018300: 697b ldr r3, [r7, #20] 8018302: 2b00 cmp r3, #0 8018304: d105 bne.n 8018312 LWIP_DEBUGF(SOCKETS_DEBUG, ("-1 / ENOBUFS (could not create netconn)\n")); set_errno(ENOBUFS); 8018306: 4b11 ldr r3, [pc, #68] @ (801834c ) 8018308: 2269 movs r2, #105 @ 0x69 801830a: 601a str r2, [r3, #0] return -1; 801830c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018310: e015 b.n 801833e } i = alloc_socket(conn, 0); 8018312: 2100 movs r1, #0 8018314: 6978 ldr r0, [r7, #20] 8018316: f7ff f9df bl 80176d8 801831a: 6138 str r0, [r7, #16] if (i == -1) { 801831c: 693b ldr r3, [r7, #16] 801831e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8018322: d108 bne.n 8018336 netconn_delete(conn); 8018324: 6978 ldr r0, [r7, #20] 8018326: f7fc ffcd bl 80152c4 set_errno(ENFILE); 801832a: 4b08 ldr r3, [pc, #32] @ (801834c ) 801832c: 2217 movs r2, #23 801832e: 601a str r2, [r3, #0] return -1; 8018330: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018334: e003 b.n 801833e } conn->socket = i; 8018336: 697b ldr r3, [r7, #20] 8018338: 693a ldr r2, [r7, #16] 801833a: 619a str r2, [r3, #24] done_socket(&sockets[i - LWIP_SOCKET_OFFSET]); LWIP_DEBUGF(SOCKETS_DEBUG, ("%d\n", i)); set_errno(0); return i; 801833c: 693b ldr r3, [r7, #16] } 801833e: 4618 mov r0, r3 8018340: 3718 adds r7, #24 8018342: 46bd mov sp, r7 8018344: bd80 pop {r7, pc} 8018346: bf00 nop 8018348: 080183d9 .word 0x080183d9 801834c: 2402b180 .word 0x2402b180 08018350 : * 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) { 8018350: b480 push {r7} 8018352: b087 sub sp, #28 8018354: af00 add r7, sp, #0 8018356: 60f8 str r0, [r7, #12] 8018358: 60b9 str r1, [r7, #8] 801835a: 607a str r2, [r7, #4] 801835c: 603b str r3, [r7, #0] nfds_t fdi; for (fdi = 0; fdi < scb->poll_nfds; fdi++) { 801835e: 2300 movs r3, #0 8018360: 617b str r3, [r7, #20] 8018362: e02c b.n 80183be const struct pollfd *pollfd = &scb->poll_fds[fdi]; 8018364: 68fb ldr r3, [r7, #12] 8018366: 695a ldr r2, [r3, #20] 8018368: 697b ldr r3, [r7, #20] 801836a: 00db lsls r3, r3, #3 801836c: 4413 add r3, r2 801836e: 613b str r3, [r7, #16] if (pollfd->fd == fd) { 8018370: 693b ldr r3, [r7, #16] 8018372: 681b ldr r3, [r3, #0] 8018374: 68ba ldr r2, [r7, #8] 8018376: 429a cmp r2, r3 8018378: d11e bne.n 80183b8 /* 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) { 801837a: 687b ldr r3, [r7, #4] 801837c: 2b00 cmp r3, #0 801837e: d009 beq.n 8018394 8018380: 693b ldr r3, [r7, #16] 8018382: f9b3 3004 ldrsh.w r3, [r3, #4] 8018386: b29b uxth r3, r3 8018388: f003 0301 and.w r3, r3, #1 801838c: 2b00 cmp r3, #0 801838e: d001 beq.n 8018394 return 1; 8018390: 2301 movs r3, #1 8018392: e01a b.n 80183ca } if (has_sendevent && (pollfd->events & POLLOUT) != 0) { 8018394: 683b ldr r3, [r7, #0] 8018396: 2b00 cmp r3, #0 8018398: d009 beq.n 80183ae 801839a: 693b ldr r3, [r7, #16] 801839c: f9b3 3004 ldrsh.w r3, [r3, #4] 80183a0: b29b uxth r3, r3 80183a2: f003 0302 and.w r3, r3, #2 80183a6: 2b00 cmp r3, #0 80183a8: d001 beq.n 80183ae return 1; 80183aa: 2301 movs r3, #1 80183ac: e00d b.n 80183ca } if (has_errevent) { 80183ae: 6a3b ldr r3, [r7, #32] 80183b0: 2b00 cmp r3, #0 80183b2: d001 beq.n 80183b8 /* POLLERR is output only. */ return 1; 80183b4: 2301 movs r3, #1 80183b6: e008 b.n 80183ca for (fdi = 0; fdi < scb->poll_nfds; fdi++) { 80183b8: 697b ldr r3, [r7, #20] 80183ba: 3301 adds r3, #1 80183bc: 617b str r3, [r7, #20] 80183be: 68fb ldr r3, [r7, #12] 80183c0: 699b ldr r3, [r3, #24] 80183c2: 697a ldr r2, [r7, #20] 80183c4: 429a cmp r2, r3 80183c6: d3cd bcc.n 8018364 } } } return 0; 80183c8: 2300 movs r3, #0 } 80183ca: 4618 mov r0, r3 80183cc: 371c adds r7, #28 80183ce: 46bd mov sp, r7 80183d0: f85d 7b04 ldr.w r7, [sp], #4 80183d4: 4770 bx lr ... 080183d8 : * 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) { 80183d8: b580 push {r7, lr} 80183da: b08a sub sp, #40 @ 0x28 80183dc: af00 add r7, sp, #0 80183de: 6078 str r0, [r7, #4] 80183e0: 460b mov r3, r1 80183e2: 70fb strb r3, [r7, #3] 80183e4: 4613 mov r3, r2 80183e6: 803b strh r3, [r7, #0] SYS_ARCH_DECL_PROTECT(lev); LWIP_UNUSED_ARG(len); /* Get socket */ if (conn) { 80183e8: 687b ldr r3, [r7, #4] 80183ea: 2b00 cmp r3, #0 80183ec: f000 80a4 beq.w 8018538 s = conn->socket; 80183f0: 687b ldr r3, [r7, #4] 80183f2: 699b ldr r3, [r3, #24] 80183f4: 627b str r3, [r7, #36] @ 0x24 if (s < 0) { 80183f6: 6a7b ldr r3, [r7, #36] @ 0x24 80183f8: 2b00 cmp r3, #0 80183fa: da18 bge.n 801842e /* 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); 80183fc: f00e f850 bl 80264a0 8018400: 61f8 str r0, [r7, #28] if (conn->socket < 0) { 8018402: 687b ldr r3, [r7, #4] 8018404: 699b ldr r3, [r3, #24] 8018406: 2b00 cmp r3, #0 8018408: da0b bge.n 8018422 if (evt == NETCONN_EVT_RCVPLUS) { 801840a: 78fb ldrb r3, [r7, #3] 801840c: 2b00 cmp r3, #0 801840e: d104 bne.n 801841a /* conn->socket is -1 on initialization lwip_accept adjusts sock->recvevent if conn->socket < -1 */ conn->socket--; 8018410: 687b ldr r3, [r7, #4] 8018412: 699b ldr r3, [r3, #24] 8018414: 1e5a subs r2, r3, #1 8018416: 687b ldr r3, [r7, #4] 8018418: 619a str r2, [r3, #24] } SYS_ARCH_UNPROTECT(lev); 801841a: 69f8 ldr r0, [r7, #28] 801841c: f00e f84e bl 80264bc return; 8018420: e08d b.n 801853e } s = conn->socket; 8018422: 687b ldr r3, [r7, #4] 8018424: 699b ldr r3, [r3, #24] 8018426: 627b str r3, [r7, #36] @ 0x24 SYS_ARCH_UNPROTECT(lev); 8018428: 69f8 ldr r0, [r7, #28] 801842a: f00e f847 bl 80264bc } sock = get_socket(s); 801842e: 6a78 ldr r0, [r7, #36] @ 0x24 8018430: f7ff f93a bl 80176a8 8018434: 61b8 str r0, [r7, #24] if (!sock) { 8018436: 69bb ldr r3, [r7, #24] 8018438: 2b00 cmp r3, #0 801843a: d07f beq.n 801853c } } else { return; } check_waiters = 1; 801843c: 2301 movs r3, #1 801843e: 623b str r3, [r7, #32] SYS_ARCH_PROTECT(lev); 8018440: f00e f82e bl 80264a0 8018444: 61f8 str r0, [r7, #28] /* Set event as required */ switch (evt) { 8018446: 78fb ldrb r3, [r7, #3] 8018448: 2b04 cmp r3, #4 801844a: d83e bhi.n 80184ca 801844c: a201 add r2, pc, #4 @ (adr r2, 8018454 ) 801844e: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8018452: bf00 nop 8018454: 08018469 .word 0x08018469 8018458: 0801848b .word 0x0801848b 801845c: 080184a3 .word 0x080184a3 8018460: 080184b7 .word 0x080184b7 8018464: 080184c3 .word 0x080184c3 case NETCONN_EVT_RCVPLUS: sock->rcvevent++; 8018468: 69bb ldr r3, [r7, #24] 801846a: f9b3 3008 ldrsh.w r3, [r3, #8] 801846e: b29b uxth r3, r3 8018470: 3301 adds r3, #1 8018472: b29b uxth r3, r3 8018474: b21a sxth r2, r3 8018476: 69bb ldr r3, [r7, #24] 8018478: 811a strh r2, [r3, #8] if (sock->rcvevent > 1) { 801847a: 69bb ldr r3, [r7, #24] 801847c: f9b3 3008 ldrsh.w r3, [r3, #8] 8018480: 2b01 cmp r3, #1 8018482: dd2a ble.n 80184da check_waiters = 0; 8018484: 2300 movs r3, #0 8018486: 623b str r3, [r7, #32] } break; 8018488: e027 b.n 80184da case NETCONN_EVT_RCVMINUS: sock->rcvevent--; 801848a: 69bb ldr r3, [r7, #24] 801848c: f9b3 3008 ldrsh.w r3, [r3, #8] 8018490: b29b uxth r3, r3 8018492: 3b01 subs r3, #1 8018494: b29b uxth r3, r3 8018496: b21a sxth r2, r3 8018498: 69bb ldr r3, [r7, #24] 801849a: 811a strh r2, [r3, #8] check_waiters = 0; 801849c: 2300 movs r3, #0 801849e: 623b str r3, [r7, #32] break; 80184a0: e01c b.n 80184dc case NETCONN_EVT_SENDPLUS: if (sock->sendevent) { 80184a2: 69bb ldr r3, [r7, #24] 80184a4: 895b ldrh r3, [r3, #10] 80184a6: 2b00 cmp r3, #0 80184a8: d001 beq.n 80184ae check_waiters = 0; 80184aa: 2300 movs r3, #0 80184ac: 623b str r3, [r7, #32] } sock->sendevent = 1; 80184ae: 69bb ldr r3, [r7, #24] 80184b0: 2201 movs r2, #1 80184b2: 815a strh r2, [r3, #10] break; 80184b4: e012 b.n 80184dc case NETCONN_EVT_SENDMINUS: sock->sendevent = 0; 80184b6: 69bb ldr r3, [r7, #24] 80184b8: 2200 movs r2, #0 80184ba: 815a strh r2, [r3, #10] check_waiters = 0; 80184bc: 2300 movs r3, #0 80184be: 623b str r3, [r7, #32] break; 80184c0: e00c b.n 80184dc case NETCONN_EVT_ERROR: sock->errevent = 1; 80184c2: 69bb ldr r3, [r7, #24] 80184c4: 2201 movs r2, #1 80184c6: 819a strh r2, [r3, #12] break; 80184c8: e008 b.n 80184dc default: LWIP_ASSERT("unknown event", 0); 80184ca: 4b1e ldr r3, [pc, #120] @ (8018544 ) 80184cc: f44f 621f mov.w r2, #2544 @ 0x9f0 80184d0: 491d ldr r1, [pc, #116] @ (8018548 ) 80184d2: 481e ldr r0, [pc, #120] @ (801854c ) 80184d4: f011 fa7a bl 80299cc break; 80184d8: e000 b.n 80184dc break; 80184da: bf00 nop } if (sock->select_waiting && check_waiters) { 80184dc: 69bb ldr r3, [r7, #24] 80184de: 7b9b ldrb r3, [r3, #14] 80184e0: 2b00 cmp r3, #0 80184e2: d025 beq.n 8018530 80184e4: 6a3b ldr r3, [r7, #32] 80184e6: 2b00 cmp r3, #0 80184e8: d022 beq.n 8018530 /* Save which events are active */ int has_recvevent, has_sendevent, has_errevent; has_recvevent = sock->rcvevent > 0; 80184ea: 69bb ldr r3, [r7, #24] 80184ec: f9b3 3008 ldrsh.w r3, [r3, #8] 80184f0: 2b00 cmp r3, #0 80184f2: bfcc ite gt 80184f4: 2301 movgt r3, #1 80184f6: 2300 movle r3, #0 80184f8: b2db uxtb r3, r3 80184fa: 617b str r3, [r7, #20] has_sendevent = sock->sendevent != 0; 80184fc: 69bb ldr r3, [r7, #24] 80184fe: 895b ldrh r3, [r3, #10] 8018500: 2b00 cmp r3, #0 8018502: bf14 ite ne 8018504: 2301 movne r3, #1 8018506: 2300 moveq r3, #0 8018508: b2db uxtb r3, r3 801850a: 613b str r3, [r7, #16] has_errevent = sock->errevent != 0; 801850c: 69bb ldr r3, [r7, #24] 801850e: 899b ldrh r3, [r3, #12] 8018510: 2b00 cmp r3, #0 8018512: bf14 ite ne 8018514: 2301 movne r3, #1 8018516: 2300 moveq r3, #0 8018518: b2db uxtb r3, r3 801851a: 60fb str r3, [r7, #12] SYS_ARCH_UNPROTECT(lev); 801851c: 69f8 ldr r0, [r7, #28] 801851e: f00d ffcd bl 80264bc /* Check any select calls waiting on this socket */ select_check_waiters(s, has_recvevent, has_sendevent, has_errevent); 8018522: 68fb ldr r3, [r7, #12] 8018524: 693a ldr r2, [r7, #16] 8018526: 6979 ldr r1, [r7, #20] 8018528: 6a78 ldr r0, [r7, #36] @ 0x24 801852a: f000 f811 bl 8018550 if (sock->select_waiting && check_waiters) { 801852e: e006 b.n 801853e } else { SYS_ARCH_UNPROTECT(lev); 8018530: 69f8 ldr r0, [r7, #28] 8018532: f00d ffc3 bl 80264bc 8018536: e002 b.n 801853e return; 8018538: bf00 nop 801853a: e000 b.n 801853e return; 801853c: bf00 nop } done_socket(sock); } 801853e: 3728 adds r7, #40 @ 0x28 8018540: 46bd mov sp, r7 8018542: bd80 pop {r7, pc} 8018544: 0802d5cc .word 0x0802d5cc 8018548: 0802d948 .word 0x0802d948 801854c: 0802d620 .word 0x0802d620 08018550 : * 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) { 8018550: b580 push {r7, lr} 8018552: b088 sub sp, #32 8018554: af02 add r7, sp, #8 8018556: 60f8 str r0, [r7, #12] 8018558: 60b9 str r1, [r7, #8] 801855a: 607a str r2, [r7, #4] 801855c: 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(); 801855e: f7f7 ffe7 bl 8010530 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) { 8018562: 4b42 ldr r3, [pc, #264] @ (801866c ) 8018564: 681b ldr r3, [r3, #0] 8018566: 617b str r3, [r7, #20] 8018568: e078 b.n 801865c if (scb->sem_signalled == 0) { 801856a: 697b ldr r3, [r7, #20] 801856c: 69db ldr r3, [r3, #28] 801856e: 2b00 cmp r3, #0 8018570: d171 bne.n 8018656 /* semaphore not signalled yet */ int do_signal = 0; 8018572: 2300 movs r3, #0 8018574: 613b str r3, [r7, #16] #if LWIP_SOCKET_POLL if (scb->poll_fds != NULL) { 8018576: 697b ldr r3, [r7, #20] 8018578: 695b ldr r3, [r3, #20] 801857a: 2b00 cmp r3, #0 801857c: d009 beq.n 8018592 do_signal = lwip_poll_should_wake(scb, s, has_recvevent, has_sendevent, has_errevent); 801857e: 683b ldr r3, [r7, #0] 8018580: 9300 str r3, [sp, #0] 8018582: 687b ldr r3, [r7, #4] 8018584: 68ba ldr r2, [r7, #8] 8018586: 68f9 ldr r1, [r7, #12] 8018588: 6978 ldr r0, [r7, #20] 801858a: f7ff fee1 bl 8018350 801858e: 6138 str r0, [r7, #16] 8018590: e056 b.n 8018640 else #endif /* LWIP_SOCKET_SELECT && LWIP_SOCKET_POLL */ #if LWIP_SOCKET_SELECT { /* Test this select call for our socket */ if (has_recvevent) { 8018592: 68bb ldr r3, [r7, #8] 8018594: 2b00 cmp r3, #0 8018596: d017 beq.n 80185c8 if (scb->readset && FD_ISSET(s, scb->readset)) { 8018598: 697b ldr r3, [r7, #20] 801859a: 689b ldr r3, [r3, #8] 801859c: 2b00 cmp r3, #0 801859e: d013 beq.n 80185c8 80185a0: 697b ldr r3, [r7, #20] 80185a2: 689a ldr r2, [r3, #8] 80185a4: 68fb ldr r3, [r7, #12] 80185a6: 2b00 cmp r3, #0 80185a8: da00 bge.n 80185ac 80185aa: 331f adds r3, #31 80185ac: 115b asrs r3, r3, #5 80185ae: f852 2023 ldr.w r2, [r2, r3, lsl #2] 80185b2: 68fb ldr r3, [r7, #12] 80185b4: f003 031f and.w r3, r3, #31 80185b8: fa22 f303 lsr.w r3, r2, r3 80185bc: f003 0301 and.w r3, r3, #1 80185c0: 2b00 cmp r3, #0 80185c2: d001 beq.n 80185c8 do_signal = 1; 80185c4: 2301 movs r3, #1 80185c6: 613b str r3, [r7, #16] } } if (has_sendevent) { 80185c8: 687b ldr r3, [r7, #4] 80185ca: 2b00 cmp r3, #0 80185cc: d01a beq.n 8018604 if (!do_signal && scb->writeset && FD_ISSET(s, scb->writeset)) { 80185ce: 693b ldr r3, [r7, #16] 80185d0: 2b00 cmp r3, #0 80185d2: d117 bne.n 8018604 80185d4: 697b ldr r3, [r7, #20] 80185d6: 68db ldr r3, [r3, #12] 80185d8: 2b00 cmp r3, #0 80185da: d013 beq.n 8018604 80185dc: 697b ldr r3, [r7, #20] 80185de: 68da ldr r2, [r3, #12] 80185e0: 68fb ldr r3, [r7, #12] 80185e2: 2b00 cmp r3, #0 80185e4: da00 bge.n 80185e8 80185e6: 331f adds r3, #31 80185e8: 115b asrs r3, r3, #5 80185ea: f852 2023 ldr.w r2, [r2, r3, lsl #2] 80185ee: 68fb ldr r3, [r7, #12] 80185f0: f003 031f and.w r3, r3, #31 80185f4: fa22 f303 lsr.w r3, r2, r3 80185f8: f003 0301 and.w r3, r3, #1 80185fc: 2b00 cmp r3, #0 80185fe: d001 beq.n 8018604 do_signal = 1; 8018600: 2301 movs r3, #1 8018602: 613b str r3, [r7, #16] } } if (has_errevent) { 8018604: 683b ldr r3, [r7, #0] 8018606: 2b00 cmp r3, #0 8018608: d01a beq.n 8018640 if (!do_signal && scb->exceptset && FD_ISSET(s, scb->exceptset)) { 801860a: 693b ldr r3, [r7, #16] 801860c: 2b00 cmp r3, #0 801860e: d117 bne.n 8018640 8018610: 697b ldr r3, [r7, #20] 8018612: 691b ldr r3, [r3, #16] 8018614: 2b00 cmp r3, #0 8018616: d013 beq.n 8018640 8018618: 697b ldr r3, [r7, #20] 801861a: 691a ldr r2, [r3, #16] 801861c: 68fb ldr r3, [r7, #12] 801861e: 2b00 cmp r3, #0 8018620: da00 bge.n 8018624 8018622: 331f adds r3, #31 8018624: 115b asrs r3, r3, #5 8018626: f852 2023 ldr.w r2, [r2, r3, lsl #2] 801862a: 68fb ldr r3, [r7, #12] 801862c: f003 031f and.w r3, r3, #31 8018630: fa22 f303 lsr.w r3, r2, r3 8018634: f003 0301 and.w r3, r3, #1 8018638: 2b00 cmp r3, #0 801863a: d001 beq.n 8018640 do_signal = 1; 801863c: 2301 movs r3, #1 801863e: 613b str r3, [r7, #16] } } } #endif /* LWIP_SOCKET_SELECT */ if (do_signal) { 8018640: 693b ldr r3, [r7, #16] 8018642: 2b00 cmp r3, #0 8018644: d007 beq.n 8018656 scb->sem_signalled = 1; 8018646: 697b ldr r3, [r7, #20] 8018648: 2201 movs r2, #1 801864a: 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)); 801864c: 697b ldr r3, [r7, #20] 801864e: 3320 adds r3, #32 8018650: 4618 mov r0, r3 8018652: f00d fe8f bl 8026374 for (scb = select_cb_list; scb != NULL; scb = scb->next) { 8018656: 697b ldr r3, [r7, #20] 8018658: 681b ldr r3, [r3, #0] 801865a: 617b str r3, [r7, #20] 801865c: 697b ldr r3, [r7, #20] 801865e: 2b00 cmp r3, #0 8018660: d183 bne.n 801856a /* remember the state of select_cb_list to detect changes */ last_select_cb_ctr = select_cb_ctr; } SYS_ARCH_UNPROTECT(lev); #endif } 8018662: bf00 nop 8018664: bf00 nop 8018666: 3718 adds r7, #24 8018668: 46bd mov sp, r7 801866a: bd80 pop {r7, pc} 801866c: 24024324 .word 0x24024324 08018670 : return err; } int lwip_ioctl(int s, long cmd, void *argp) { 8018670: b580 push {r7, lr} 8018672: b08c sub sp, #48 @ 0x30 8018674: af00 add r7, sp, #0 8018676: 60f8 str r0, [r7, #12] 8018678: 60b9 str r1, [r7, #8] 801867a: 607a str r2, [r7, #4] struct lwip_sock *sock = get_socket(s); 801867c: 68f8 ldr r0, [r7, #12] 801867e: f7ff f813 bl 80176a8 8018682: 6278 str r0, [r7, #36] @ 0x24 u8_t val; #if LWIP_SO_RCVBUF int recv_avail; #endif /* LWIP_SO_RCVBUF */ if (!sock) { 8018684: 6a7b ldr r3, [r7, #36] @ 0x24 8018686: 2b00 cmp r3, #0 8018688: d102 bne.n 8018690 return -1; 801868a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801868e: e089 b.n 80187a4 } switch (cmd) { 8018690: 68bb ldr r3, [r7, #8] 8018692: 4a46 ldr r2, [pc, #280] @ (80187ac ) 8018694: 4293 cmp r3, r2 8018696: d048 beq.n 801872a 8018698: 68bb ldr r3, [r7, #8] 801869a: 4a45 ldr r2, [pc, #276] @ (80187b0 ) 801869c: 4293 cmp r3, r2 801869e: d176 bne.n 801878e #if LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE case FIONREAD: if (!argp) { 80186a0: 687b ldr r3, [r7, #4] 80186a2: 2b00 cmp r3, #0 80186a4: d10a bne.n 80186bc sock_set_errno(sock, EINVAL); 80186a6: 2316 movs r3, #22 80186a8: 61bb str r3, [r7, #24] 80186aa: 69bb ldr r3, [r7, #24] 80186ac: 2b00 cmp r3, #0 80186ae: d002 beq.n 80186b6 80186b0: 4a40 ldr r2, [pc, #256] @ (80187b4 ) 80186b2: 69bb ldr r3, [r7, #24] 80186b4: 6013 str r3, [r2, #0] done_socket(sock); return -1; 80186b6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80186ba: e073 b.n 80187a4 } #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); 80186bc: f00d fef0 bl 80264a0 80186c0: 6238 str r0, [r7, #32] 80186c2: 6a7b ldr r3, [r7, #36] @ 0x24 80186c4: 681b ldr r3, [r3, #0] 80186c6: 6a5b ldr r3, [r3, #36] @ 0x24 80186c8: 62fb str r3, [r7, #44] @ 0x2c 80186ca: 6a38 ldr r0, [r7, #32] 80186cc: f00d fef6 bl 80264bc if (recv_avail < 0) { 80186d0: 6afb ldr r3, [r7, #44] @ 0x2c 80186d2: 2b00 cmp r3, #0 80186d4: da01 bge.n 80186da recv_avail = 0; 80186d6: 2300 movs r3, #0 80186d8: 62fb str r3, [r7, #44] @ 0x2c } /* Check if there is data left from the last recv operation. /maq 041215 */ if (sock->lastdata.netbuf) { 80186da: 6a7b ldr r3, [r7, #36] @ 0x24 80186dc: 685b ldr r3, [r3, #4] 80186de: 2b00 cmp r3, #0 80186e0: d016 beq.n 8018710 if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { 80186e2: 6a7b ldr r3, [r7, #36] @ 0x24 80186e4: 681b ldr r3, [r3, #0] 80186e6: 781b ldrb r3, [r3, #0] 80186e8: f003 03f0 and.w r3, r3, #240 @ 0xf0 80186ec: 2b10 cmp r3, #16 80186ee: d107 bne.n 8018700 recv_avail += sock->lastdata.pbuf->tot_len; 80186f0: 6a7b ldr r3, [r7, #36] @ 0x24 80186f2: 685b ldr r3, [r3, #4] 80186f4: 891b ldrh r3, [r3, #8] 80186f6: 461a mov r2, r3 80186f8: 6afb ldr r3, [r7, #44] @ 0x2c 80186fa: 4413 add r3, r2 80186fc: 62fb str r3, [r7, #44] @ 0x2c 80186fe: e007 b.n 8018710 } else { recv_avail += sock->lastdata.netbuf->p->tot_len; 8018700: 6a7b ldr r3, [r7, #36] @ 0x24 8018702: 685b ldr r3, [r3, #4] 8018704: 681b ldr r3, [r3, #0] 8018706: 891b ldrh r3, [r3, #8] 8018708: 461a mov r2, r3 801870a: 6afb ldr r3, [r7, #44] @ 0x2c 801870c: 4413 add r3, r2 801870e: 62fb str r3, [r7, #44] @ 0x2c } } *((int *)argp) = recv_avail; 8018710: 687b ldr r3, [r7, #4] 8018712: 6afa ldr r2, [r7, #44] @ 0x2c 8018714: 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); 8018716: 2300 movs r3, #0 8018718: 61fb str r3, [r7, #28] 801871a: 69fb ldr r3, [r7, #28] 801871c: 2b00 cmp r3, #0 801871e: d002 beq.n 8018726 8018720: 4a24 ldr r2, [pc, #144] @ (80187b4 ) 8018722: 69fb ldr r3, [r7, #28] 8018724: 6013 str r3, [r2, #0] done_socket(sock); return 0; 8018726: 2300 movs r3, #0 8018728: e03c b.n 80187a4 break; #endif /* LWIP_SO_RCVBUF */ #endif /* LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE */ case (long)FIONBIO: val = 0; 801872a: 2300 movs r3, #0 801872c: f887 302b strb.w r3, [r7, #43] @ 0x2b if (argp && *(int *)argp) { 8018730: 687b ldr r3, [r7, #4] 8018732: 2b00 cmp r3, #0 8018734: d006 beq.n 8018744 8018736: 687b ldr r3, [r7, #4] 8018738: 681b ldr r3, [r3, #0] 801873a: 2b00 cmp r3, #0 801873c: d002 beq.n 8018744 val = 1; 801873e: 2301 movs r3, #1 8018740: f887 302b strb.w r3, [r7, #43] @ 0x2b } netconn_set_nonblocking(sock->conn, val); 8018744: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8018748: 2b00 cmp r3, #0 801874a: d00b beq.n 8018764 801874c: 6a7b ldr r3, [r7, #36] @ 0x24 801874e: 681b ldr r3, [r3, #0] 8018750: f893 2028 ldrb.w r2, [r3, #40] @ 0x28 8018754: 6a7b ldr r3, [r7, #36] @ 0x24 8018756: 681b ldr r3, [r3, #0] 8018758: f042 0202 orr.w r2, r2, #2 801875c: b2d2 uxtb r2, r2 801875e: f883 2028 strb.w r2, [r3, #40] @ 0x28 8018762: e00a b.n 801877a 8018764: 6a7b ldr r3, [r7, #36] @ 0x24 8018766: 681b ldr r3, [r3, #0] 8018768: f893 2028 ldrb.w r2, [r3, #40] @ 0x28 801876c: 6a7b ldr r3, [r7, #36] @ 0x24 801876e: 681b ldr r3, [r3, #0] 8018770: f022 0202 bic.w r2, r2, #2 8018774: b2d2 uxtb r2, r2 8018776: 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); 801877a: 2300 movs r3, #0 801877c: 617b str r3, [r7, #20] 801877e: 697b ldr r3, [r7, #20] 8018780: 2b00 cmp r3, #0 8018782: d002 beq.n 801878a 8018784: 4a0b ldr r2, [pc, #44] @ (80187b4 ) 8018786: 697b ldr r3, [r7, #20] 8018788: 6013 str r3, [r2, #0] done_socket(sock); return 0; 801878a: 2300 movs r3, #0 801878c: e00a b.n 80187a4 default: break; 801878e: 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 */ 8018790: 2326 movs r3, #38 @ 0x26 8018792: 613b str r3, [r7, #16] 8018794: 693b ldr r3, [r7, #16] 8018796: 2b00 cmp r3, #0 8018798: d002 beq.n 80187a0 801879a: 4a06 ldr r2, [pc, #24] @ (80187b4 ) 801879c: 693b ldr r3, [r7, #16] 801879e: 6013 str r3, [r2, #0] done_socket(sock); return -1; 80187a0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 80187a4: 4618 mov r0, r3 80187a6: 3730 adds r7, #48 @ 0x30 80187a8: 46bd mov sp, r7 80187aa: bd80 pop {r7, pc} 80187ac: 8004667e .word 0x8004667e 80187b0: 4004667f .word 0x4004667f 80187b4: 2402b180 .word 0x2402b180 080187b8 : * @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) { 80187b8: b580 push {r7, lr} 80187ba: b084 sub sp, #16 80187bc: af00 add r7, sp, #0 80187be: 6078 str r0, [r7, #4] 80187c0: 6039 str r1, [r7, #0] u32_t sleeptime, res; again: LWIP_ASSERT_CORE_LOCKED(); 80187c2: f7f7 feb5 bl 8010530 sleeptime = sys_timeouts_sleeptime(); 80187c6: f008 fb41 bl 8020e4c 80187ca: 60f8 str r0, [r7, #12] if (sleeptime == SYS_TIMEOUTS_SLEEPTIME_INFINITE) { 80187cc: 68fb ldr r3, [r7, #12] 80187ce: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80187d2: d109 bne.n 80187e8 UNLOCK_TCPIP_CORE(); 80187d4: f7f7 fe9e bl 8010514 sys_arch_mbox_fetch(mbox, msg, 0); 80187d8: 2200 movs r2, #0 80187da: 6839 ldr r1, [r7, #0] 80187dc: 6878 ldr r0, [r7, #4] 80187de: f00d fd0d bl 80261fc LOCK_TCPIP_CORE(); 80187e2: f7f7 fe87 bl 80104f4 return; 80187e6: e016 b.n 8018816 } else if (sleeptime == 0) { 80187e8: 68fb ldr r3, [r7, #12] 80187ea: 2b00 cmp r3, #0 80187ec: d102 bne.n 80187f4 sys_check_timeouts(); 80187ee: f008 faf1 bl 8020dd4 /* We try again to fetch a message from the mbox. */ goto again; 80187f2: e7e6 b.n 80187c2 } UNLOCK_TCPIP_CORE(); 80187f4: f7f7 fe8e bl 8010514 res = sys_arch_mbox_fetch(mbox, msg, sleeptime); 80187f8: 68fa ldr r2, [r7, #12] 80187fa: 6839 ldr r1, [r7, #0] 80187fc: 6878 ldr r0, [r7, #4] 80187fe: f00d fcfd bl 80261fc 8018802: 60b8 str r0, [r7, #8] LOCK_TCPIP_CORE(); 8018804: f7f7 fe76 bl 80104f4 if (res == SYS_ARCH_TIMEOUT) { 8018808: 68bb ldr r3, [r7, #8] 801880a: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 801880e: d102 bne.n 8018816 /* If a SYS_ARCH_TIMEOUT value is returned, a timeout occurred before a message could be fetched. */ sys_check_timeouts(); 8018810: f008 fae0 bl 8020dd4 /* We try again to fetch a message from the mbox. */ goto again; 8018814: e7d5 b.n 80187c2 } } 8018816: 3710 adds r7, #16 8018818: 46bd mov sp, r7 801881a: bd80 pop {r7, pc} 0801881c : * * @param arg unused argument */ static void tcpip_thread(void *arg) { 801881c: b580 push {r7, lr} 801881e: b084 sub sp, #16 8018820: af00 add r7, sp, #0 8018822: 6078 str r0, [r7, #4] struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); LWIP_MARK_TCPIP_THREAD(); 8018824: f7f7 fec0 bl 80105a8 LOCK_TCPIP_CORE(); 8018828: f7f7 fe64 bl 80104f4 if (tcpip_init_done != NULL) { 801882c: 4b0f ldr r3, [pc, #60] @ (801886c ) 801882e: 681b ldr r3, [r3, #0] 8018830: 2b00 cmp r3, #0 8018832: d005 beq.n 8018840 tcpip_init_done(tcpip_init_done_arg); 8018834: 4b0d ldr r3, [pc, #52] @ (801886c ) 8018836: 681b ldr r3, [r3, #0] 8018838: 4a0d ldr r2, [pc, #52] @ (8018870 ) 801883a: 6812 ldr r2, [r2, #0] 801883c: 4610 mov r0, r2 801883e: 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); 8018840: f107 030c add.w r3, r7, #12 8018844: 4619 mov r1, r3 8018846: 480b ldr r0, [pc, #44] @ (8018874 ) 8018848: f7ff ffb6 bl 80187b8 if (msg == NULL) { 801884c: 68fb ldr r3, [r7, #12] 801884e: 2b00 cmp r3, #0 8018850: d106 bne.n 8018860 LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: NULL\n")); LWIP_ASSERT("tcpip_thread: invalid message", 0); 8018852: 4b09 ldr r3, [pc, #36] @ (8018878 ) 8018854: 2291 movs r2, #145 @ 0x91 8018856: 4909 ldr r1, [pc, #36] @ (801887c ) 8018858: 4809 ldr r0, [pc, #36] @ (8018880 ) 801885a: f011 f8b7 bl 80299cc continue; 801885e: e003 b.n 8018868 } tcpip_thread_handle_msg(msg); 8018860: 68fb ldr r3, [r7, #12] 8018862: 4618 mov r0, r3 8018864: f000 f80e bl 8018884 TCPIP_MBOX_FETCH(&tcpip_mbox, (void **)&msg); 8018868: e7ea b.n 8018840 801886a: bf00 nop 801886c: 24024328 .word 0x24024328 8018870: 2402432c .word 0x2402432c 8018874: 24024330 .word 0x24024330 8018878: 0802d99c .word 0x0802d99c 801887c: 0802d9cc .word 0x0802d9cc 8018880: 0802d9ec .word 0x0802d9ec 08018884 : /* 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) { 8018884: b580 push {r7, lr} 8018886: b082 sub sp, #8 8018888: af00 add r7, sp, #0 801888a: 6078 str r0, [r7, #4] switch (msg->type) { 801888c: 687b ldr r3, [r7, #4] 801888e: 781b ldrb r3, [r3, #0] 8018890: 2b02 cmp r3, #2 8018892: d026 beq.n 80188e2 8018894: 2b02 cmp r3, #2 8018896: dc2b bgt.n 80188f0 8018898: 2b00 cmp r3, #0 801889a: d002 beq.n 80188a2 801889c: 2b01 cmp r3, #1 801889e: d015 beq.n 80188cc 80188a0: e026 b.n 80188f0 #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) { 80188a2: 687b ldr r3, [r7, #4] 80188a4: 68db ldr r3, [r3, #12] 80188a6: 687a ldr r2, [r7, #4] 80188a8: 6850 ldr r0, [r2, #4] 80188aa: 687a ldr r2, [r7, #4] 80188ac: 6892 ldr r2, [r2, #8] 80188ae: 4611 mov r1, r2 80188b0: 4798 blx r3 80188b2: 4603 mov r3, r0 80188b4: 2b00 cmp r3, #0 80188b6: d004 beq.n 80188c2 pbuf_free(msg->msg.inp.p); 80188b8: 687b ldr r3, [r7, #4] 80188ba: 685b ldr r3, [r3, #4] 80188bc: 4618 mov r0, r3 80188be: f001 fe0d bl 801a4dc } memp_free(MEMP_TCPIP_MSG_INPKT, msg); 80188c2: 6879 ldr r1, [r7, #4] 80188c4: 2009 movs r0, #9 80188c6: f000 ff1b bl 8019700 break; 80188ca: e018 b.n 80188fe 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); 80188cc: 687b ldr r3, [r7, #4] 80188ce: 685b ldr r3, [r3, #4] 80188d0: 687a ldr r2, [r7, #4] 80188d2: 6892 ldr r2, [r2, #8] 80188d4: 4610 mov r0, r2 80188d6: 4798 blx r3 memp_free(MEMP_TCPIP_MSG_API, msg); 80188d8: 6879 ldr r1, [r7, #4] 80188da: 2008 movs r0, #8 80188dc: f000 ff10 bl 8019700 break; 80188e0: e00d b.n 80188fe 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); 80188e2: 687b ldr r3, [r7, #4] 80188e4: 685b ldr r3, [r3, #4] 80188e6: 687a ldr r2, [r7, #4] 80188e8: 6892 ldr r2, [r2, #8] 80188ea: 4610 mov r0, r2 80188ec: 4798 blx r3 break; 80188ee: e006 b.n 80188fe default: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: %d\n", msg->type)); LWIP_ASSERT("tcpip_thread: invalid message", 0); 80188f0: 4b05 ldr r3, [pc, #20] @ (8018908 ) 80188f2: 22cf movs r2, #207 @ 0xcf 80188f4: 4905 ldr r1, [pc, #20] @ (801890c ) 80188f6: 4806 ldr r0, [pc, #24] @ (8018910 ) 80188f8: f011 f868 bl 80299cc break; 80188fc: bf00 nop } } 80188fe: bf00 nop 8018900: 3708 adds r7, #8 8018902: 46bd mov sp, r7 8018904: bd80 pop {r7, pc} 8018906: bf00 nop 8018908: 0802d99c .word 0x0802d99c 801890c: 0802d9cc .word 0x0802d9cc 8018910: 0802d9ec .word 0x0802d9ec 08018914 : * @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) { 8018914: b580 push {r7, lr} 8018916: b086 sub sp, #24 8018918: af00 add r7, sp, #0 801891a: 60f8 str r0, [r7, #12] 801891c: 60b9 str r1, [r7, #8] 801891e: 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)); 8018920: 481a ldr r0, [pc, #104] @ (801898c ) 8018922: f00d fcb3 bl 802628c 8018926: 4603 mov r3, r0 8018928: 2b00 cmp r3, #0 801892a: d105 bne.n 8018938 801892c: 4b18 ldr r3, [pc, #96] @ (8018990 ) 801892e: 22fc movs r2, #252 @ 0xfc 8018930: 4918 ldr r1, [pc, #96] @ (8018994 ) 8018932: 4819 ldr r0, [pc, #100] @ (8018998 ) 8018934: f011 f84a bl 80299cc msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); 8018938: 2009 movs r0, #9 801893a: f000 fe6b bl 8019614 801893e: 6178 str r0, [r7, #20] if (msg == NULL) { 8018940: 697b ldr r3, [r7, #20] 8018942: 2b00 cmp r3, #0 8018944: d102 bne.n 801894c return ERR_MEM; 8018946: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801894a: e01a b.n 8018982 } msg->type = TCPIP_MSG_INPKT; 801894c: 697b ldr r3, [r7, #20] 801894e: 2200 movs r2, #0 8018950: 701a strb r2, [r3, #0] msg->msg.inp.p = p; 8018952: 697b ldr r3, [r7, #20] 8018954: 68fa ldr r2, [r7, #12] 8018956: 605a str r2, [r3, #4] msg->msg.inp.netif = inp; 8018958: 697b ldr r3, [r7, #20] 801895a: 68ba ldr r2, [r7, #8] 801895c: 609a str r2, [r3, #8] msg->msg.inp.input_fn = input_fn; 801895e: 697b ldr r3, [r7, #20] 8018960: 687a ldr r2, [r7, #4] 8018962: 60da str r2, [r3, #12] if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) { 8018964: 6979 ldr r1, [r7, #20] 8018966: 4809 ldr r0, [pc, #36] @ (801898c ) 8018968: f00d fc2e bl 80261c8 801896c: 4603 mov r3, r0 801896e: 2b00 cmp r3, #0 8018970: d006 beq.n 8018980 memp_free(MEMP_TCPIP_MSG_INPKT, msg); 8018972: 6979 ldr r1, [r7, #20] 8018974: 2009 movs r0, #9 8018976: f000 fec3 bl 8019700 return ERR_MEM; 801897a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801897e: e000 b.n 8018982 } return ERR_OK; 8018980: 2300 movs r3, #0 #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ } 8018982: 4618 mov r0, r3 8018984: 3718 adds r7, #24 8018986: 46bd mov sp, r7 8018988: bd80 pop {r7, pc} 801898a: bf00 nop 801898c: 24024330 .word 0x24024330 8018990: 0802d99c .word 0x0802d99c 8018994: 0802da14 .word 0x0802da14 8018998: 0802d9ec .word 0x0802d9ec 0801899c : * 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) { 801899c: b580 push {r7, lr} 801899e: b082 sub sp, #8 80189a0: af00 add r7, sp, #0 80189a2: 6078 str r0, [r7, #4] 80189a4: 6039 str r1, [r7, #0] #if LWIP_ETHERNET if (inp->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) { 80189a6: 683b ldr r3, [r7, #0] 80189a8: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 80189ac: f003 0318 and.w r3, r3, #24 80189b0: 2b00 cmp r3, #0 80189b2: d006 beq.n 80189c2 return tcpip_inpkt(p, inp, ethernet_input); 80189b4: 4a08 ldr r2, [pc, #32] @ (80189d8 ) 80189b6: 6839 ldr r1, [r7, #0] 80189b8: 6878 ldr r0, [r7, #4] 80189ba: f7ff ffab bl 8018914 80189be: 4603 mov r3, r0 80189c0: e005 b.n 80189ce } else #endif /* LWIP_ETHERNET */ return tcpip_inpkt(p, inp, ip_input); 80189c2: 4a06 ldr r2, [pc, #24] @ (80189dc ) 80189c4: 6839 ldr r1, [r7, #0] 80189c6: 6878 ldr r0, [r7, #4] 80189c8: f7ff ffa4 bl 8018914 80189cc: 4603 mov r3, r0 } 80189ce: 4618 mov r0, r3 80189d0: 3708 adds r7, #8 80189d2: 46bd mov sp, r7 80189d4: bd80 pop {r7, pc} 80189d6: bf00 nop 80189d8: 08025fbd .word 0x08025fbd 80189dc: 08024ae5 .word 0x08024ae5 080189e0 : * * @see tcpip_callback */ err_t tcpip_try_callback(tcpip_callback_fn function, void *ctx) { 80189e0: b580 push {r7, lr} 80189e2: b084 sub sp, #16 80189e4: af00 add r7, sp, #0 80189e6: 6078 str r0, [r7, #4] 80189e8: 6039 str r1, [r7, #0] struct tcpip_msg *msg; LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); 80189ea: 4819 ldr r0, [pc, #100] @ (8018a50 ) 80189ec: f00d fc4e bl 802628c 80189f0: 4603 mov r3, r0 80189f2: 2b00 cmp r3, #0 80189f4: d106 bne.n 8018a04 80189f6: 4b17 ldr r3, [pc, #92] @ (8018a54 ) 80189f8: f240 125d movw r2, #349 @ 0x15d 80189fc: 4916 ldr r1, [pc, #88] @ (8018a58 ) 80189fe: 4817 ldr r0, [pc, #92] @ (8018a5c ) 8018a00: f010 ffe4 bl 80299cc msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); 8018a04: 2008 movs r0, #8 8018a06: f000 fe05 bl 8019614 8018a0a: 60f8 str r0, [r7, #12] if (msg == NULL) { 8018a0c: 68fb ldr r3, [r7, #12] 8018a0e: 2b00 cmp r3, #0 8018a10: d102 bne.n 8018a18 return ERR_MEM; 8018a12: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018a16: e017 b.n 8018a48 } msg->type = TCPIP_MSG_CALLBACK; 8018a18: 68fb ldr r3, [r7, #12] 8018a1a: 2201 movs r2, #1 8018a1c: 701a strb r2, [r3, #0] msg->msg.cb.function = function; 8018a1e: 68fb ldr r3, [r7, #12] 8018a20: 687a ldr r2, [r7, #4] 8018a22: 605a str r2, [r3, #4] msg->msg.cb.ctx = ctx; 8018a24: 68fb ldr r3, [r7, #12] 8018a26: 683a ldr r2, [r7, #0] 8018a28: 609a str r2, [r3, #8] if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) { 8018a2a: 68f9 ldr r1, [r7, #12] 8018a2c: 4808 ldr r0, [pc, #32] @ (8018a50 ) 8018a2e: f00d fbcb bl 80261c8 8018a32: 4603 mov r3, r0 8018a34: 2b00 cmp r3, #0 8018a36: d006 beq.n 8018a46 memp_free(MEMP_TCPIP_MSG_API, msg); 8018a38: 68f9 ldr r1, [r7, #12] 8018a3a: 2008 movs r0, #8 8018a3c: f000 fe60 bl 8019700 return ERR_MEM; 8018a40: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018a44: e000 b.n 8018a48 } return ERR_OK; 8018a46: 2300 movs r3, #0 } 8018a48: 4618 mov r0, r3 8018a4a: 3710 adds r7, #16 8018a4c: 46bd mov sp, r7 8018a4e: bd80 pop {r7, pc} 8018a50: 24024330 .word 0x24024330 8018a54: 0802d99c .word 0x0802d99c 8018a58: 0802da14 .word 0x0802da14 8018a5c: 0802d9ec .word 0x0802d9ec 08018a60 : * @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) { 8018a60: b580 push {r7, lr} 8018a62: b084 sub sp, #16 8018a64: af00 add r7, sp, #0 8018a66: 60f8 str r0, [r7, #12] 8018a68: 60b9 str r1, [r7, #8] 8018a6a: 607a str r2, [r7, #4] #if LWIP_TCPIP_CORE_LOCKING LWIP_UNUSED_ARG(sem); LOCK_TCPIP_CORE(); 8018a6c: f7f7 fd42 bl 80104f4 fn(apimsg); 8018a70: 68fb ldr r3, [r7, #12] 8018a72: 68b8 ldr r0, [r7, #8] 8018a74: 4798 blx r3 UNLOCK_TCPIP_CORE(); 8018a76: f7f7 fd4d bl 8010514 return ERR_OK; 8018a7a: 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 */ } 8018a7c: 4618 mov r0, r3 8018a7e: 3710 adds r7, #16 8018a80: 46bd mov sp, r7 8018a82: bd80 pop {r7, pc} 08018a84 : * @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) { 8018a84: b580 push {r7, lr} 8018a86: b084 sub sp, #16 8018a88: af02 add r7, sp, #8 8018a8a: 6078 str r0, [r7, #4] 8018a8c: 6039 str r1, [r7, #0] lwip_init(); 8018a8e: f000 f92d bl 8018cec tcpip_init_done = initfunc; 8018a92: 4a17 ldr r2, [pc, #92] @ (8018af0 ) 8018a94: 687b ldr r3, [r7, #4] 8018a96: 6013 str r3, [r2, #0] tcpip_init_done_arg = arg; 8018a98: 4a16 ldr r2, [pc, #88] @ (8018af4 ) 8018a9a: 683b ldr r3, [r7, #0] 8018a9c: 6013 str r3, [r2, #0] if (sys_mbox_new(&tcpip_mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 8018a9e: 2106 movs r1, #6 8018aa0: 4815 ldr r0, [pc, #84] @ (8018af8 ) 8018aa2: f00d fb65 bl 8026170 8018aa6: 4603 mov r3, r0 8018aa8: 2b00 cmp r3, #0 8018aaa: d006 beq.n 8018aba LWIP_ASSERT("failed to create tcpip_thread mbox", 0); 8018aac: 4b13 ldr r3, [pc, #76] @ (8018afc ) 8018aae: f240 2261 movw r2, #609 @ 0x261 8018ab2: 4913 ldr r1, [pc, #76] @ (8018b00 ) 8018ab4: 4813 ldr r0, [pc, #76] @ (8018b04 ) 8018ab6: f010 ff89 bl 80299cc } #if LWIP_TCPIP_CORE_LOCKING if (sys_mutex_new(&lock_tcpip_core) != ERR_OK) { 8018aba: 4813 ldr r0, [pc, #76] @ (8018b08 ) 8018abc: f00d fc9e bl 80263fc 8018ac0: 4603 mov r3, r0 8018ac2: 2b00 cmp r3, #0 8018ac4: d006 beq.n 8018ad4 LWIP_ASSERT("failed to create lock_tcpip_core", 0); 8018ac6: 4b0d ldr r3, [pc, #52] @ (8018afc ) 8018ac8: f240 2265 movw r2, #613 @ 0x265 8018acc: 490f ldr r1, [pc, #60] @ (8018b0c ) 8018ace: 480d ldr r0, [pc, #52] @ (8018b04 ) 8018ad0: f010 ff7c bl 80299cc } #endif /* LWIP_TCPIP_CORE_LOCKING */ sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO); 8018ad4: 2330 movs r3, #48 @ 0x30 8018ad6: 9300 str r3, [sp, #0] 8018ad8: f44f 5380 mov.w r3, #4096 @ 0x1000 8018adc: 2200 movs r2, #0 8018ade: 490c ldr r1, [pc, #48] @ (8018b10 ) 8018ae0: 480c ldr r0, [pc, #48] @ (8018b14 ) 8018ae2: f00d fcbd bl 8026460 } 8018ae6: bf00 nop 8018ae8: 3708 adds r7, #8 8018aea: 46bd mov sp, r7 8018aec: bd80 pop {r7, pc} 8018aee: bf00 nop 8018af0: 24024328 .word 0x24024328 8018af4: 2402432c .word 0x2402432c 8018af8: 24024330 .word 0x24024330 8018afc: 0802d99c .word 0x0802d99c 8018b00: 0802da24 .word 0x0802da24 8018b04: 0802d9ec .word 0x0802d9ec 8018b08: 24024334 .word 0x24024334 8018b0c: 0802da48 .word 0x0802da48 8018b10: 0801881d .word 0x0801881d 8018b14: 0802da6c .word 0x0802da6c 08018b18 : * @param n u16_t in host byte order * @return n in network byte order */ u16_t lwip_htons(u16_t n) { 8018b18: b480 push {r7} 8018b1a: b083 sub sp, #12 8018b1c: af00 add r7, sp, #0 8018b1e: 4603 mov r3, r0 8018b20: 80fb strh r3, [r7, #6] return PP_HTONS(n); 8018b22: 88fb ldrh r3, [r7, #6] 8018b24: 021b lsls r3, r3, #8 8018b26: b21a sxth r2, r3 8018b28: 88fb ldrh r3, [r7, #6] 8018b2a: 0a1b lsrs r3, r3, #8 8018b2c: b29b uxth r3, r3 8018b2e: b21b sxth r3, r3 8018b30: 4313 orrs r3, r2 8018b32: b21b sxth r3, r3 8018b34: b29b uxth r3, r3 } 8018b36: 4618 mov r0, r3 8018b38: 370c adds r7, #12 8018b3a: 46bd mov sp, r7 8018b3c: f85d 7b04 ldr.w r7, [sp], #4 8018b40: 4770 bx lr 08018b42 : * @param n u32_t in host byte order * @return n in network byte order */ u32_t lwip_htonl(u32_t n) { 8018b42: b480 push {r7} 8018b44: b083 sub sp, #12 8018b46: af00 add r7, sp, #0 8018b48: 6078 str r0, [r7, #4] return PP_HTONL(n); 8018b4a: 687b ldr r3, [r7, #4] 8018b4c: 061a lsls r2, r3, #24 8018b4e: 687b ldr r3, [r7, #4] 8018b50: 021b lsls r3, r3, #8 8018b52: f403 037f and.w r3, r3, #16711680 @ 0xff0000 8018b56: 431a orrs r2, r3 8018b58: 687b ldr r3, [r7, #4] 8018b5a: 0a1b lsrs r3, r3, #8 8018b5c: f403 437f and.w r3, r3, #65280 @ 0xff00 8018b60: 431a orrs r2, r3 8018b62: 687b ldr r3, [r7, #4] 8018b64: 0e1b lsrs r3, r3, #24 8018b66: 4313 orrs r3, r2 } 8018b68: 4618 mov r0, r3 8018b6a: 370c adds r7, #12 8018b6c: 46bd mov sp, r7 8018b6e: f85d 7b04 ldr.w r7, [sp], #4 8018b72: 4770 bx lr 08018b74 : * @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) { 8018b74: b480 push {r7} 8018b76: b089 sub sp, #36 @ 0x24 8018b78: af00 add r7, sp, #0 8018b7a: 6078 str r0, [r7, #4] 8018b7c: 6039 str r1, [r7, #0] const u8_t *pb = (const u8_t *)dataptr; 8018b7e: 687b ldr r3, [r7, #4] 8018b80: 61fb str r3, [r7, #28] const u16_t *ps; u16_t t = 0; 8018b82: 2300 movs r3, #0 8018b84: 81fb strh r3, [r7, #14] u32_t sum = 0; 8018b86: 2300 movs r3, #0 8018b88: 617b str r3, [r7, #20] int odd = ((mem_ptr_t)pb & 1); 8018b8a: 69fb ldr r3, [r7, #28] 8018b8c: f003 0301 and.w r3, r3, #1 8018b90: 613b str r3, [r7, #16] /* Get aligned to u16_t */ if (odd && len > 0) { 8018b92: 693b ldr r3, [r7, #16] 8018b94: 2b00 cmp r3, #0 8018b96: d00d beq.n 8018bb4 8018b98: 683b ldr r3, [r7, #0] 8018b9a: 2b00 cmp r3, #0 8018b9c: dd0a ble.n 8018bb4 ((u8_t *)&t)[1] = *pb++; 8018b9e: 69fa ldr r2, [r7, #28] 8018ba0: 1c53 adds r3, r2, #1 8018ba2: 61fb str r3, [r7, #28] 8018ba4: f107 030e add.w r3, r7, #14 8018ba8: 3301 adds r3, #1 8018baa: 7812 ldrb r2, [r2, #0] 8018bac: 701a strb r2, [r3, #0] len--; 8018bae: 683b ldr r3, [r7, #0] 8018bb0: 3b01 subs r3, #1 8018bb2: 603b str r3, [r7, #0] } /* Add the bulk of the data */ ps = (const u16_t *)(const void *)pb; 8018bb4: 69fb ldr r3, [r7, #28] 8018bb6: 61bb str r3, [r7, #24] while (len > 1) { 8018bb8: e00a b.n 8018bd0 sum += *ps++; 8018bba: 69bb ldr r3, [r7, #24] 8018bbc: 1c9a adds r2, r3, #2 8018bbe: 61ba str r2, [r7, #24] 8018bc0: 881b ldrh r3, [r3, #0] 8018bc2: 461a mov r2, r3 8018bc4: 697b ldr r3, [r7, #20] 8018bc6: 4413 add r3, r2 8018bc8: 617b str r3, [r7, #20] len -= 2; 8018bca: 683b ldr r3, [r7, #0] 8018bcc: 3b02 subs r3, #2 8018bce: 603b str r3, [r7, #0] while (len > 1) { 8018bd0: 683b ldr r3, [r7, #0] 8018bd2: 2b01 cmp r3, #1 8018bd4: dcf1 bgt.n 8018bba } /* Consume left-over byte, if any */ if (len > 0) { 8018bd6: 683b ldr r3, [r7, #0] 8018bd8: 2b00 cmp r3, #0 8018bda: dd04 ble.n 8018be6 ((u8_t *)&t)[0] = *(const u8_t *)ps; 8018bdc: f107 030e add.w r3, r7, #14 8018be0: 69ba ldr r2, [r7, #24] 8018be2: 7812 ldrb r2, [r2, #0] 8018be4: 701a strb r2, [r3, #0] } /* Add end bytes */ sum += t; 8018be6: 89fb ldrh r3, [r7, #14] 8018be8: 461a mov r2, r3 8018bea: 697b ldr r3, [r7, #20] 8018bec: 4413 add r3, r2 8018bee: 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); 8018bf0: 697b ldr r3, [r7, #20] 8018bf2: 0c1a lsrs r2, r3, #16 8018bf4: 697b ldr r3, [r7, #20] 8018bf6: b29b uxth r3, r3 8018bf8: 4413 add r3, r2 8018bfa: 617b str r3, [r7, #20] sum = FOLD_U32T(sum); 8018bfc: 697b ldr r3, [r7, #20] 8018bfe: 0c1a lsrs r2, r3, #16 8018c00: 697b ldr r3, [r7, #20] 8018c02: b29b uxth r3, r3 8018c04: 4413 add r3, r2 8018c06: 617b str r3, [r7, #20] /* Swap if alignment was odd */ if (odd) { 8018c08: 693b ldr r3, [r7, #16] 8018c0a: 2b00 cmp r3, #0 8018c0c: d007 beq.n 8018c1e sum = SWAP_BYTES_IN_WORD(sum); 8018c0e: 697b ldr r3, [r7, #20] 8018c10: 021b lsls r3, r3, #8 8018c12: b29a uxth r2, r3 8018c14: 697b ldr r3, [r7, #20] 8018c16: 0a1b lsrs r3, r3, #8 8018c18: b2db uxtb r3, r3 8018c1a: 4313 orrs r3, r2 8018c1c: 617b str r3, [r7, #20] } return (u16_t)sum; 8018c1e: 697b ldr r3, [r7, #20] 8018c20: b29b uxth r3, r3 } 8018c22: 4618 mov r0, r3 8018c24: 3724 adds r7, #36 @ 0x24 8018c26: 46bd mov sp, r7 8018c28: f85d 7b04 ldr.w r7, [sp], #4 8018c2c: 4770 bx lr 08018c2e : * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum(const void *dataptr, u16_t len) { 8018c2e: b580 push {r7, lr} 8018c30: b082 sub sp, #8 8018c32: af00 add r7, sp, #0 8018c34: 6078 str r0, [r7, #4] 8018c36: 460b mov r3, r1 8018c38: 807b strh r3, [r7, #2] return (u16_t)~(unsigned int)LWIP_CHKSUM(dataptr, len); 8018c3a: 887b ldrh r3, [r7, #2] 8018c3c: 4619 mov r1, r3 8018c3e: 6878 ldr r0, [r7, #4] 8018c40: f7ff ff98 bl 8018b74 8018c44: 4603 mov r3, r0 8018c46: 43db mvns r3, r3 8018c48: b29b uxth r3, r3 } 8018c4a: 4618 mov r0, r3 8018c4c: 3708 adds r7, #8 8018c4e: 46bd mov sp, r7 8018c50: bd80 pop {r7, pc} 08018c52 : * @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) { 8018c52: b580 push {r7, lr} 8018c54: b086 sub sp, #24 8018c56: af00 add r7, sp, #0 8018c58: 6078 str r0, [r7, #4] u32_t acc; struct pbuf *q; int swapped = 0; 8018c5a: 2300 movs r3, #0 8018c5c: 60fb str r3, [r7, #12] acc = 0; 8018c5e: 2300 movs r3, #0 8018c60: 617b str r3, [r7, #20] for (q = p; q != NULL; q = q->next) { 8018c62: 687b ldr r3, [r7, #4] 8018c64: 613b str r3, [r7, #16] 8018c66: e02b b.n 8018cc0 acc += LWIP_CHKSUM(q->payload, q->len); 8018c68: 693b ldr r3, [r7, #16] 8018c6a: 685a ldr r2, [r3, #4] 8018c6c: 693b ldr r3, [r7, #16] 8018c6e: 895b ldrh r3, [r3, #10] 8018c70: 4619 mov r1, r3 8018c72: 4610 mov r0, r2 8018c74: f7ff ff7e bl 8018b74 8018c78: 4603 mov r3, r0 8018c7a: 461a mov r2, r3 8018c7c: 697b ldr r3, [r7, #20] 8018c7e: 4413 add r3, r2 8018c80: 617b str r3, [r7, #20] acc = FOLD_U32T(acc); 8018c82: 697b ldr r3, [r7, #20] 8018c84: 0c1a lsrs r2, r3, #16 8018c86: 697b ldr r3, [r7, #20] 8018c88: b29b uxth r3, r3 8018c8a: 4413 add r3, r2 8018c8c: 617b str r3, [r7, #20] if (q->len % 2 != 0) { 8018c8e: 693b ldr r3, [r7, #16] 8018c90: 895b ldrh r3, [r3, #10] 8018c92: f003 0301 and.w r3, r3, #1 8018c96: b29b uxth r3, r3 8018c98: 2b00 cmp r3, #0 8018c9a: d00e beq.n 8018cba swapped = !swapped; 8018c9c: 68fb ldr r3, [r7, #12] 8018c9e: 2b00 cmp r3, #0 8018ca0: bf0c ite eq 8018ca2: 2301 moveq r3, #1 8018ca4: 2300 movne r3, #0 8018ca6: b2db uxtb r3, r3 8018ca8: 60fb str r3, [r7, #12] acc = SWAP_BYTES_IN_WORD(acc); 8018caa: 697b ldr r3, [r7, #20] 8018cac: 021b lsls r3, r3, #8 8018cae: b29a uxth r2, r3 8018cb0: 697b ldr r3, [r7, #20] 8018cb2: 0a1b lsrs r3, r3, #8 8018cb4: b2db uxtb r3, r3 8018cb6: 4313 orrs r3, r2 8018cb8: 617b str r3, [r7, #20] for (q = p; q != NULL; q = q->next) { 8018cba: 693b ldr r3, [r7, #16] 8018cbc: 681b ldr r3, [r3, #0] 8018cbe: 613b str r3, [r7, #16] 8018cc0: 693b ldr r3, [r7, #16] 8018cc2: 2b00 cmp r3, #0 8018cc4: d1d0 bne.n 8018c68 } } if (swapped) { 8018cc6: 68fb ldr r3, [r7, #12] 8018cc8: 2b00 cmp r3, #0 8018cca: d007 beq.n 8018cdc acc = SWAP_BYTES_IN_WORD(acc); 8018ccc: 697b ldr r3, [r7, #20] 8018cce: 021b lsls r3, r3, #8 8018cd0: b29a uxth r2, r3 8018cd2: 697b ldr r3, [r7, #20] 8018cd4: 0a1b lsrs r3, r3, #8 8018cd6: b2db uxtb r3, r3 8018cd8: 4313 orrs r3, r2 8018cda: 617b str r3, [r7, #20] } return (u16_t)~(acc & 0xffffUL); 8018cdc: 697b ldr r3, [r7, #20] 8018cde: b29b uxth r3, r3 8018ce0: 43db mvns r3, r3 8018ce2: b29b uxth r3, r3 } 8018ce4: 4618 mov r0, r3 8018ce6: 3718 adds r7, #24 8018ce8: 46bd mov sp, r7 8018cea: bd80 pop {r7, pc} 08018cec : * Initialize all modules. * Use this in NO_SYS mode. Use tcpip_init() otherwise. */ void lwip_init(void) { 8018cec: b580 push {r7, lr} 8018cee: b082 sub sp, #8 8018cf0: af00 add r7, sp, #0 #ifndef LWIP_SKIP_CONST_CHECK int a = 0; 8018cf2: 2300 movs r3, #0 8018cf4: 607b str r3, [r7, #4] #endif /* Modules initialization */ stats_init(); #if !NO_SYS sys_init(); 8018cf6: f00d fb75 bl 80263e4 #endif /* !NO_SYS */ mem_init(); 8018cfa: f000 f8d3 bl 8018ea4 memp_init(); 8018cfe: f000 fc1b bl 8019538 pbuf_init(); netif_init(); 8018d02: f000 fd27 bl 8019754 #endif /* LWIP_IPV4 */ #if LWIP_RAW raw_init(); #endif /* LWIP_RAW */ #if LWIP_UDP udp_init(); 8018d06: f008 f8db bl 8020ec0 #endif /* LWIP_UDP */ #if LWIP_TCP tcp_init(); 8018d0a: f001 fe91 bl 801aa30 #if PPP_SUPPORT ppp_init(); #endif #if LWIP_TIMERS sys_timeouts_init(); 8018d0e: f008 f817 bl 8020d40 #endif /* LWIP_TIMERS */ } 8018d12: bf00 nop 8018d14: 3708 adds r7, #8 8018d16: 46bd mov sp, r7 8018d18: bd80 pop {r7, pc} ... 08018d1c : #define mem_overflow_check_element(mem) #endif /* MEM_OVERFLOW_CHECK */ static struct mem * ptr_to_mem(mem_size_t ptr) { 8018d1c: b480 push {r7} 8018d1e: b083 sub sp, #12 8018d20: af00 add r7, sp, #0 8018d22: 6078 str r0, [r7, #4] return (struct mem *)(void *)&ram[ptr]; 8018d24: 4b04 ldr r3, [pc, #16] @ (8018d38 ) 8018d26: 681a ldr r2, [r3, #0] 8018d28: 687b ldr r3, [r7, #4] 8018d2a: 4413 add r3, r2 } 8018d2c: 4618 mov r0, r3 8018d2e: 370c adds r7, #12 8018d30: 46bd mov sp, r7 8018d32: f85d 7b04 ldr.w r7, [sp], #4 8018d36: 4770 bx lr 8018d38: 24024350 .word 0x24024350 08018d3c : static mem_size_t mem_to_ptr(void *mem) { 8018d3c: b480 push {r7} 8018d3e: b083 sub sp, #12 8018d40: af00 add r7, sp, #0 8018d42: 6078 str r0, [r7, #4] return (mem_size_t)((u8_t *)mem - ram); 8018d44: 4b04 ldr r3, [pc, #16] @ (8018d58 ) 8018d46: 681b ldr r3, [r3, #0] 8018d48: 687a ldr r2, [r7, #4] 8018d4a: 1ad3 subs r3, r2, r3 } 8018d4c: 4618 mov r0, r3 8018d4e: 370c adds r7, #12 8018d50: 46bd mov sp, r7 8018d52: f85d 7b04 ldr.w r7, [sp], #4 8018d56: 4770 bx lr 8018d58: 24024350 .word 0x24024350 08018d5c : * This assumes access to the heap is protected by the calling function * already. */ static void plug_holes(struct mem *mem) { 8018d5c: b590 push {r4, r7, lr} 8018d5e: b085 sub sp, #20 8018d60: af00 add r7, sp, #0 8018d62: 6078 str r0, [r7, #4] struct mem *nmem; struct mem *pmem; LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram); 8018d64: 4b45 ldr r3, [pc, #276] @ (8018e7c ) 8018d66: 681b ldr r3, [r3, #0] 8018d68: 687a ldr r2, [r7, #4] 8018d6a: 429a cmp r2, r3 8018d6c: d206 bcs.n 8018d7c 8018d6e: 4b44 ldr r3, [pc, #272] @ (8018e80 ) 8018d70: f240 12df movw r2, #479 @ 0x1df 8018d74: 4943 ldr r1, [pc, #268] @ (8018e84 ) 8018d76: 4844 ldr r0, [pc, #272] @ (8018e88 ) 8018d78: f010 fe28 bl 80299cc LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end); 8018d7c: 4b43 ldr r3, [pc, #268] @ (8018e8c ) 8018d7e: 681b ldr r3, [r3, #0] 8018d80: 687a ldr r2, [r7, #4] 8018d82: 429a cmp r2, r3 8018d84: d306 bcc.n 8018d94 8018d86: 4b3e ldr r3, [pc, #248] @ (8018e80 ) 8018d88: f44f 72f0 mov.w r2, #480 @ 0x1e0 8018d8c: 4940 ldr r1, [pc, #256] @ (8018e90 ) 8018d8e: 483e ldr r0, [pc, #248] @ (8018e88 ) 8018d90: f010 fe1c bl 80299cc LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0); 8018d94: 687b ldr r3, [r7, #4] 8018d96: 7a1b ldrb r3, [r3, #8] 8018d98: 2b00 cmp r3, #0 8018d9a: d006 beq.n 8018daa 8018d9c: 4b38 ldr r3, [pc, #224] @ (8018e80 ) 8018d9e: f240 12e1 movw r2, #481 @ 0x1e1 8018da2: 493c ldr r1, [pc, #240] @ (8018e94 ) 8018da4: 4838 ldr r0, [pc, #224] @ (8018e88 ) 8018da6: f010 fe11 bl 80299cc /* plug hole forward */ LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED); 8018daa: 687b ldr r3, [r7, #4] 8018dac: 681b ldr r3, [r3, #0] 8018dae: 4a3a ldr r2, [pc, #232] @ (8018e98 ) 8018db0: 4293 cmp r3, r2 8018db2: d906 bls.n 8018dc2 8018db4: 4b32 ldr r3, [pc, #200] @ (8018e80 ) 8018db6: f44f 72f2 mov.w r2, #484 @ 0x1e4 8018dba: 4938 ldr r1, [pc, #224] @ (8018e9c ) 8018dbc: 4832 ldr r0, [pc, #200] @ (8018e88 ) 8018dbe: f010 fe05 bl 80299cc nmem = ptr_to_mem(mem->next); 8018dc2: 687b ldr r3, [r7, #4] 8018dc4: 681b ldr r3, [r3, #0] 8018dc6: 4618 mov r0, r3 8018dc8: f7ff ffa8 bl 8018d1c 8018dcc: 60f8 str r0, [r7, #12] if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { 8018dce: 687a ldr r2, [r7, #4] 8018dd0: 68fb ldr r3, [r7, #12] 8018dd2: 429a cmp r2, r3 8018dd4: d024 beq.n 8018e20 8018dd6: 68fb ldr r3, [r7, #12] 8018dd8: 7a1b ldrb r3, [r3, #8] 8018dda: 2b00 cmp r3, #0 8018ddc: d120 bne.n 8018e20 8018dde: 4b2b ldr r3, [pc, #172] @ (8018e8c ) 8018de0: 681b ldr r3, [r3, #0] 8018de2: 68fa ldr r2, [r7, #12] 8018de4: 429a cmp r2, r3 8018de6: d01b beq.n 8018e20 /* if mem->next is unused and not end of ram, combine mem and mem->next */ if (lfree == nmem) { 8018de8: 4b2d ldr r3, [pc, #180] @ (8018ea0 ) 8018dea: 681b ldr r3, [r3, #0] 8018dec: 68fa ldr r2, [r7, #12] 8018dee: 429a cmp r2, r3 8018df0: d102 bne.n 8018df8 lfree = mem; 8018df2: 4a2b ldr r2, [pc, #172] @ (8018ea0 ) 8018df4: 687b ldr r3, [r7, #4] 8018df6: 6013 str r3, [r2, #0] } mem->next = nmem->next; 8018df8: 68fb ldr r3, [r7, #12] 8018dfa: 681a ldr r2, [r3, #0] 8018dfc: 687b ldr r3, [r7, #4] 8018dfe: 601a str r2, [r3, #0] if (nmem->next != MEM_SIZE_ALIGNED) { 8018e00: 68fb ldr r3, [r7, #12] 8018e02: 681b ldr r3, [r3, #0] 8018e04: 4a24 ldr r2, [pc, #144] @ (8018e98 ) 8018e06: 4293 cmp r3, r2 8018e08: d00a beq.n 8018e20 ptr_to_mem(nmem->next)->prev = mem_to_ptr(mem); 8018e0a: 68fb ldr r3, [r7, #12] 8018e0c: 681b ldr r3, [r3, #0] 8018e0e: 4618 mov r0, r3 8018e10: f7ff ff84 bl 8018d1c 8018e14: 4604 mov r4, r0 8018e16: 6878 ldr r0, [r7, #4] 8018e18: f7ff ff90 bl 8018d3c 8018e1c: 4603 mov r3, r0 8018e1e: 6063 str r3, [r4, #4] } } /* plug hole backward */ pmem = ptr_to_mem(mem->prev); 8018e20: 687b ldr r3, [r7, #4] 8018e22: 685b ldr r3, [r3, #4] 8018e24: 4618 mov r0, r3 8018e26: f7ff ff79 bl 8018d1c 8018e2a: 60b8 str r0, [r7, #8] if (pmem != mem && pmem->used == 0) { 8018e2c: 68ba ldr r2, [r7, #8] 8018e2e: 687b ldr r3, [r7, #4] 8018e30: 429a cmp r2, r3 8018e32: d01f beq.n 8018e74 8018e34: 68bb ldr r3, [r7, #8] 8018e36: 7a1b ldrb r3, [r3, #8] 8018e38: 2b00 cmp r3, #0 8018e3a: d11b bne.n 8018e74 /* if mem->prev is unused, combine mem and mem->prev */ if (lfree == mem) { 8018e3c: 4b18 ldr r3, [pc, #96] @ (8018ea0 ) 8018e3e: 681b ldr r3, [r3, #0] 8018e40: 687a ldr r2, [r7, #4] 8018e42: 429a cmp r2, r3 8018e44: d102 bne.n 8018e4c lfree = pmem; 8018e46: 4a16 ldr r2, [pc, #88] @ (8018ea0 ) 8018e48: 68bb ldr r3, [r7, #8] 8018e4a: 6013 str r3, [r2, #0] } pmem->next = mem->next; 8018e4c: 687b ldr r3, [r7, #4] 8018e4e: 681a ldr r2, [r3, #0] 8018e50: 68bb ldr r3, [r7, #8] 8018e52: 601a str r2, [r3, #0] if (mem->next != MEM_SIZE_ALIGNED) { 8018e54: 687b ldr r3, [r7, #4] 8018e56: 681b ldr r3, [r3, #0] 8018e58: 4a0f ldr r2, [pc, #60] @ (8018e98 ) 8018e5a: 4293 cmp r3, r2 8018e5c: d00a beq.n 8018e74 ptr_to_mem(mem->next)->prev = mem_to_ptr(pmem); 8018e5e: 687b ldr r3, [r7, #4] 8018e60: 681b ldr r3, [r3, #0] 8018e62: 4618 mov r0, r3 8018e64: f7ff ff5a bl 8018d1c 8018e68: 4604 mov r4, r0 8018e6a: 68b8 ldr r0, [r7, #8] 8018e6c: f7ff ff66 bl 8018d3c 8018e70: 4603 mov r3, r0 8018e72: 6063 str r3, [r4, #4] } } } 8018e74: bf00 nop 8018e76: 3714 adds r7, #20 8018e78: 46bd mov sp, r7 8018e7a: bd90 pop {r4, r7, pc} 8018e7c: 24024350 .word 0x24024350 8018e80: 0802da7c .word 0x0802da7c 8018e84: 0802daac .word 0x0802daac 8018e88: 0802dac4 .word 0x0802dac4 8018e8c: 24024354 .word 0x24024354 8018e90: 0802daec .word 0x0802daec 8018e94: 0802db08 .word 0x0802db08 8018e98: 0001ffe8 .word 0x0001ffe8 8018e9c: 0802db24 .word 0x0802db24 8018ea0: 2402435c .word 0x2402435c 08018ea4 : /** * Zero the heap and initialize start, end and lowest-free */ void mem_init(void) { 8018ea4: b580 push {r7, lr} 8018ea6: b082 sub sp, #8 8018ea8: 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); 8018eaa: 4b1b ldr r3, [pc, #108] @ (8018f18 ) 8018eac: 4a1b ldr r2, [pc, #108] @ (8018f1c ) 8018eae: 601a str r2, [r3, #0] /* initialize the start of the heap */ mem = (struct mem *)(void *)ram; 8018eb0: 4b19 ldr r3, [pc, #100] @ (8018f18 ) 8018eb2: 681b ldr r3, [r3, #0] 8018eb4: 607b str r3, [r7, #4] mem->next = MEM_SIZE_ALIGNED; 8018eb6: 687b ldr r3, [r7, #4] 8018eb8: 4a19 ldr r2, [pc, #100] @ (8018f20 ) 8018eba: 601a str r2, [r3, #0] mem->prev = 0; 8018ebc: 687b ldr r3, [r7, #4] 8018ebe: 2200 movs r2, #0 8018ec0: 605a str r2, [r3, #4] mem->used = 0; 8018ec2: 687b ldr r3, [r7, #4] 8018ec4: 2200 movs r2, #0 8018ec6: 721a strb r2, [r3, #8] /* initialize the end of the heap */ ram_end = ptr_to_mem(MEM_SIZE_ALIGNED); 8018ec8: 4815 ldr r0, [pc, #84] @ (8018f20 ) 8018eca: f7ff ff27 bl 8018d1c 8018ece: 4603 mov r3, r0 8018ed0: 4a14 ldr r2, [pc, #80] @ (8018f24 ) 8018ed2: 6013 str r3, [r2, #0] ram_end->used = 1; 8018ed4: 4b13 ldr r3, [pc, #76] @ (8018f24 ) 8018ed6: 681b ldr r3, [r3, #0] 8018ed8: 2201 movs r2, #1 8018eda: 721a strb r2, [r3, #8] ram_end->next = MEM_SIZE_ALIGNED; 8018edc: 4b11 ldr r3, [pc, #68] @ (8018f24 ) 8018ede: 681b ldr r3, [r3, #0] 8018ee0: 4a0f ldr r2, [pc, #60] @ (8018f20 ) 8018ee2: 601a str r2, [r3, #0] ram_end->prev = MEM_SIZE_ALIGNED; 8018ee4: 4b0f ldr r3, [pc, #60] @ (8018f24 ) 8018ee6: 681b ldr r3, [r3, #0] 8018ee8: 4a0d ldr r2, [pc, #52] @ (8018f20 ) 8018eea: 605a str r2, [r3, #4] MEM_SANITY(); /* initialize the lowest-free pointer to the start of the heap */ lfree = (struct mem *)(void *)ram; 8018eec: 4b0a ldr r3, [pc, #40] @ (8018f18 ) 8018eee: 681b ldr r3, [r3, #0] 8018ef0: 4a0d ldr r2, [pc, #52] @ (8018f28 ) 8018ef2: 6013 str r3, [r2, #0] MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED); if (sys_mutex_new(&mem_mutex) != ERR_OK) { 8018ef4: 480d ldr r0, [pc, #52] @ (8018f2c ) 8018ef6: f00d fa81 bl 80263fc 8018efa: 4603 mov r3, r0 8018efc: 2b00 cmp r3, #0 8018efe: d006 beq.n 8018f0e LWIP_ASSERT("failed to create mem_mutex", 0); 8018f00: 4b0b ldr r3, [pc, #44] @ (8018f30 ) 8018f02: f240 221f movw r2, #543 @ 0x21f 8018f06: 490b ldr r1, [pc, #44] @ (8018f34 ) 8018f08: 480b ldr r0, [pc, #44] @ (8018f38 ) 8018f0a: f010 fd5f bl 80299cc } } 8018f0e: bf00 nop 8018f10: 3708 adds r7, #8 8018f12: 46bd mov sp, r7 8018f14: bd80 pop {r7, pc} 8018f16: bf00 nop 8018f18: 24024350 .word 0x24024350 8018f1c: 24020000 .word 0x24020000 8018f20: 0001ffe8 .word 0x0001ffe8 8018f24: 24024354 .word 0x24024354 8018f28: 2402435c .word 0x2402435c 8018f2c: 24024358 .word 0x24024358 8018f30: 0802da7c .word 0x0802da7c 8018f34: 0802db50 .word 0x0802db50 8018f38: 0802dac4 .word 0x0802dac4 08018f3c : /* Check if a struct mem is correctly linked. * If not, double-free is a possible reason. */ static int mem_link_valid(struct mem *mem) { 8018f3c: b580 push {r7, lr} 8018f3e: b086 sub sp, #24 8018f40: af00 add r7, sp, #0 8018f42: 6078 str r0, [r7, #4] struct mem *nmem, *pmem; mem_size_t rmem_idx; rmem_idx = mem_to_ptr(mem); 8018f44: 6878 ldr r0, [r7, #4] 8018f46: f7ff fef9 bl 8018d3c 8018f4a: 6178 str r0, [r7, #20] nmem = ptr_to_mem(mem->next); 8018f4c: 687b ldr r3, [r7, #4] 8018f4e: 681b ldr r3, [r3, #0] 8018f50: 4618 mov r0, r3 8018f52: f7ff fee3 bl 8018d1c 8018f56: 6138 str r0, [r7, #16] pmem = ptr_to_mem(mem->prev); 8018f58: 687b ldr r3, [r7, #4] 8018f5a: 685b ldr r3, [r3, #4] 8018f5c: 4618 mov r0, r3 8018f5e: f7ff fedd bl 8018d1c 8018f62: 60f8 str r0, [r7, #12] if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) || 8018f64: 687b ldr r3, [r7, #4] 8018f66: 681b ldr r3, [r3, #0] 8018f68: 4a11 ldr r2, [pc, #68] @ (8018fb0 ) 8018f6a: 4293 cmp r3, r2 8018f6c: d818 bhi.n 8018fa0 8018f6e: 687b ldr r3, [r7, #4] 8018f70: 685b ldr r3, [r3, #4] 8018f72: 4a0f ldr r2, [pc, #60] @ (8018fb0 ) 8018f74: 4293 cmp r3, r2 8018f76: d813 bhi.n 8018fa0 ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) || 8018f78: 687b ldr r3, [r7, #4] 8018f7a: 685b ldr r3, [r3, #4] if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) || 8018f7c: 697a ldr r2, [r7, #20] 8018f7e: 429a cmp r2, r3 8018f80: d004 beq.n 8018f8c ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) || 8018f82: 68fb ldr r3, [r7, #12] 8018f84: 681b ldr r3, [r3, #0] 8018f86: 697a ldr r2, [r7, #20] 8018f88: 429a cmp r2, r3 8018f8a: d109 bne.n 8018fa0 ((nmem != ram_end) && (nmem->prev != rmem_idx))) { 8018f8c: 4b09 ldr r3, [pc, #36] @ (8018fb4 ) 8018f8e: 681b ldr r3, [r3, #0] ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) || 8018f90: 693a ldr r2, [r7, #16] 8018f92: 429a cmp r2, r3 8018f94: d006 beq.n 8018fa4 ((nmem != ram_end) && (nmem->prev != rmem_idx))) { 8018f96: 693b ldr r3, [r7, #16] 8018f98: 685b ldr r3, [r3, #4] 8018f9a: 697a ldr r2, [r7, #20] 8018f9c: 429a cmp r2, r3 8018f9e: d001 beq.n 8018fa4 return 0; 8018fa0: 2300 movs r3, #0 8018fa2: e000 b.n 8018fa6 } return 1; 8018fa4: 2301 movs r3, #1 } 8018fa6: 4618 mov r0, r3 8018fa8: 3718 adds r7, #24 8018faa: 46bd mov sp, r7 8018fac: bd80 pop {r7, pc} 8018fae: bf00 nop 8018fb0: 0001ffe8 .word 0x0001ffe8 8018fb4: 24024354 .word 0x24024354 08018fb8 : * @param rmem is the data portion of a struct mem as returned by a previous * call to mem_malloc() */ void mem_free(void *rmem) { 8018fb8: b580 push {r7, lr} 8018fba: b088 sub sp, #32 8018fbc: af00 add r7, sp, #0 8018fbe: 6078 str r0, [r7, #4] struct mem *mem; LWIP_MEM_FREE_DECL_PROTECT(); if (rmem == NULL) { 8018fc0: 687b ldr r3, [r7, #4] 8018fc2: 2b00 cmp r3, #0 8018fc4: d070 beq.n 80190a8 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) { 8018fc6: 687b ldr r3, [r7, #4] 8018fc8: f003 0303 and.w r3, r3, #3 8018fcc: 2b00 cmp r3, #0 8018fce: d00d beq.n 8018fec LWIP_MEM_ILLEGAL_FREE("mem_free: sanity check alignment"); 8018fd0: 4b37 ldr r3, [pc, #220] @ (80190b0 ) 8018fd2: f240 2273 movw r2, #627 @ 0x273 8018fd6: 4937 ldr r1, [pc, #220] @ (80190b4 ) 8018fd8: 4837 ldr r0, [pc, #220] @ (80190b8 ) 8018fda: f010 fcf7 bl 80299cc 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); 8018fde: f00d fa5f bl 80264a0 8018fe2: 60f8 str r0, [r7, #12] 8018fe4: 68f8 ldr r0, [r7, #12] 8018fe6: f00d fa69 bl 80264bc return; 8018fea: e05e b.n 80190aa } /* 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)); 8018fec: 687b ldr r3, [r7, #4] 8018fee: 3b0c subs r3, #12 8018ff0: 61fb str r3, [r7, #28] if ((u8_t *)mem < ram || (u8_t *)rmem + MIN_SIZE_ALIGNED > (u8_t *)ram_end) { 8018ff2: 4b32 ldr r3, [pc, #200] @ (80190bc ) 8018ff4: 681b ldr r3, [r3, #0] 8018ff6: 69fa ldr r2, [r7, #28] 8018ff8: 429a cmp r2, r3 8018ffa: d306 bcc.n 801900a 8018ffc: 687b ldr r3, [r7, #4] 8018ffe: f103 020c add.w r2, r3, #12 8019002: 4b2f ldr r3, [pc, #188] @ (80190c0 ) 8019004: 681b ldr r3, [r3, #0] 8019006: 429a cmp r2, r3 8019008: d90d bls.n 8019026 LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory"); 801900a: 4b29 ldr r3, [pc, #164] @ (80190b0 ) 801900c: f240 227f movw r2, #639 @ 0x27f 8019010: 492c ldr r1, [pc, #176] @ (80190c4 ) 8019012: 4829 ldr r0, [pc, #164] @ (80190b8 ) 8019014: f010 fcda bl 80299cc LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n")); /* protect mem stats from concurrent access */ MEM_STATS_INC_LOCKED(illegal); 8019018: f00d fa42 bl 80264a0 801901c: 6138 str r0, [r7, #16] 801901e: 6938 ldr r0, [r7, #16] 8019020: f00d fa4c bl 80264bc return; 8019024: e041 b.n 80190aa } #if MEM_OVERFLOW_CHECK mem_overflow_check_element(mem); #endif /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 8019026: 4828 ldr r0, [pc, #160] @ (80190c8 ) 8019028: f00d f9fe bl 8026428 /* mem has to be in a used state */ if (!mem->used) { 801902c: 69fb ldr r3, [r7, #28] 801902e: 7a1b ldrb r3, [r3, #8] 8019030: 2b00 cmp r3, #0 8019032: d110 bne.n 8019056 LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: double free"); 8019034: 4b1e ldr r3, [pc, #120] @ (80190b0 ) 8019036: f44f 7223 mov.w r2, #652 @ 0x28c 801903a: 4924 ldr r1, [pc, #144] @ (80190cc ) 801903c: 481e ldr r0, [pc, #120] @ (80190b8 ) 801903e: f010 fcc5 bl 80299cc LWIP_MEM_FREE_UNPROTECT(); 8019042: 4821 ldr r0, [pc, #132] @ (80190c8 ) 8019044: f00d f9ff bl 8026446 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); 8019048: f00d fa2a bl 80264a0 801904c: 6178 str r0, [r7, #20] 801904e: 6978 ldr r0, [r7, #20] 8019050: f00d fa34 bl 80264bc return; 8019054: e029 b.n 80190aa } if (!mem_link_valid(mem)) { 8019056: 69f8 ldr r0, [r7, #28] 8019058: f7ff ff70 bl 8018f3c 801905c: 4603 mov r3, r0 801905e: 2b00 cmp r3, #0 8019060: d110 bne.n 8019084 LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: non-linked: double free"); 8019062: 4b13 ldr r3, [pc, #76] @ (80190b0 ) 8019064: f240 2295 movw r2, #661 @ 0x295 8019068: 4919 ldr r1, [pc, #100] @ (80190d0 ) 801906a: 4813 ldr r0, [pc, #76] @ (80190b8 ) 801906c: f010 fcae bl 80299cc LWIP_MEM_FREE_UNPROTECT(); 8019070: 4815 ldr r0, [pc, #84] @ (80190c8 ) 8019072: f00d f9e8 bl 8026446 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); 8019076: f00d fa13 bl 80264a0 801907a: 61b8 str r0, [r7, #24] 801907c: 69b8 ldr r0, [r7, #24] 801907e: f00d fa1d bl 80264bc return; 8019082: e012 b.n 80190aa } /* mem is now unused. */ mem->used = 0; 8019084: 69fb ldr r3, [r7, #28] 8019086: 2200 movs r2, #0 8019088: 721a strb r2, [r3, #8] if (mem < lfree) { 801908a: 4b12 ldr r3, [pc, #72] @ (80190d4 ) 801908c: 681b ldr r3, [r3, #0] 801908e: 69fa ldr r2, [r7, #28] 8019090: 429a cmp r2, r3 8019092: d202 bcs.n 801909a /* the newly freed struct is now the lowest */ lfree = mem; 8019094: 4a0f ldr r2, [pc, #60] @ (80190d4 ) 8019096: 69fb ldr r3, [r7, #28] 8019098: 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); 801909a: 69f8 ldr r0, [r7, #28] 801909c: f7ff fe5e bl 8018d5c 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(); 80190a0: 4809 ldr r0, [pc, #36] @ (80190c8 ) 80190a2: f00d f9d0 bl 8026446 80190a6: e000 b.n 80190aa return; 80190a8: bf00 nop } 80190aa: 3720 adds r7, #32 80190ac: 46bd mov sp, r7 80190ae: bd80 pop {r7, pc} 80190b0: 0802da7c .word 0x0802da7c 80190b4: 0802db6c .word 0x0802db6c 80190b8: 0802dac4 .word 0x0802dac4 80190bc: 24024350 .word 0x24024350 80190c0: 24024354 .word 0x24024354 80190c4: 0802db90 .word 0x0802db90 80190c8: 24024358 .word 0x24024358 80190cc: 0802dbac .word 0x0802dbac 80190d0: 0802dbd4 .word 0x0802dbd4 80190d4: 2402435c .word 0x2402435c 080190d8 : * 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) { 80190d8: b580 push {r7, lr} 80190da: b08a sub sp, #40 @ 0x28 80190dc: af00 add r7, sp, #0 80190de: 6078 str r0, [r7, #4] 80190e0: 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); 80190e2: 683b ldr r3, [r7, #0] 80190e4: 3303 adds r3, #3 80190e6: f023 0303 bic.w r3, r3, #3 80190ea: 627b str r3, [r7, #36] @ 0x24 if (newsize < MIN_SIZE_ALIGNED) { 80190ec: 6a7b ldr r3, [r7, #36] @ 0x24 80190ee: 2b0b cmp r3, #11 80190f0: d801 bhi.n 80190f6 /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; 80190f2: 230c movs r3, #12 80190f4: 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)) { 80190f6: 6a7b ldr r3, [r7, #36] @ 0x24 80190f8: 4a6e ldr r2, [pc, #440] @ (80192b4 ) 80190fa: 4293 cmp r3, r2 80190fc: d803 bhi.n 8019106 80190fe: 6a7a ldr r2, [r7, #36] @ 0x24 8019100: 683b ldr r3, [r7, #0] 8019102: 429a cmp r2, r3 8019104: d201 bcs.n 801910a return NULL; 8019106: 2300 movs r3, #0 8019108: e0d0 b.n 80192ac } LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram && 801910a: 4b6b ldr r3, [pc, #428] @ (80192b8 ) 801910c: 681b ldr r3, [r3, #0] 801910e: 687a ldr r2, [r7, #4] 8019110: 429a cmp r2, r3 8019112: d304 bcc.n 801911e 8019114: 4b69 ldr r3, [pc, #420] @ (80192bc ) 8019116: 681b ldr r3, [r3, #0] 8019118: 687a ldr r2, [r7, #4] 801911a: 429a cmp r2, r3 801911c: d306 bcc.n 801912c 801911e: 4b68 ldr r3, [pc, #416] @ (80192c0 ) 8019120: f240 22d1 movw r2, #721 @ 0x2d1 8019124: 4967 ldr r1, [pc, #412] @ (80192c4 ) 8019126: 4868 ldr r0, [pc, #416] @ (80192c8 ) 8019128: f010 fc50 bl 80299cc (u8_t *)rmem < (u8_t *)ram_end); if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { 801912c: 4b62 ldr r3, [pc, #392] @ (80192b8 ) 801912e: 681b ldr r3, [r3, #0] 8019130: 687a ldr r2, [r7, #4] 8019132: 429a cmp r2, r3 8019134: d304 bcc.n 8019140 8019136: 4b61 ldr r3, [pc, #388] @ (80192bc ) 8019138: 681b ldr r3, [r3, #0] 801913a: 687a ldr r2, [r7, #4] 801913c: 429a cmp r2, r3 801913e: d307 bcc.n 8019150 LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_trim: illegal memory\n")); /* protect mem stats from concurrent access */ MEM_STATS_INC_LOCKED(illegal); 8019140: f00d f9ae bl 80264a0 8019144: 60b8 str r0, [r7, #8] 8019146: 68b8 ldr r0, [r7, #8] 8019148: f00d f9b8 bl 80264bc return rmem; 801914c: 687b ldr r3, [r7, #4] 801914e: e0ad b.n 80192ac } /* 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)); 8019150: 687b ldr r3, [r7, #4] 8019152: 3b0c subs r3, #12 8019154: 623b str r3, [r7, #32] #if MEM_OVERFLOW_CHECK mem_overflow_check_element(mem); #endif /* ... and its offset pointer */ ptr = mem_to_ptr(mem); 8019156: 6a38 ldr r0, [r7, #32] 8019158: f7ff fdf0 bl 8018d3c 801915c: 61f8 str r0, [r7, #28] size = (mem_size_t)((mem_size_t)(mem->next - ptr) - (SIZEOF_STRUCT_MEM + MEM_SANITY_OVERHEAD)); 801915e: 6a3b ldr r3, [r7, #32] 8019160: 681a ldr r2, [r3, #0] 8019162: 69fb ldr r3, [r7, #28] 8019164: 1ad3 subs r3, r2, r3 8019166: 3b0c subs r3, #12 8019168: 61bb str r3, [r7, #24] LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); 801916a: 6a7a ldr r2, [r7, #36] @ 0x24 801916c: 69bb ldr r3, [r7, #24] 801916e: 429a cmp r2, r3 8019170: d906 bls.n 8019180 8019172: 4b53 ldr r3, [pc, #332] @ (80192c0 ) 8019174: f44f 7239 mov.w r2, #740 @ 0x2e4 8019178: 4954 ldr r1, [pc, #336] @ (80192cc ) 801917a: 4853 ldr r0, [pc, #332] @ (80192c8 ) 801917c: f010 fc26 bl 80299cc if (newsize > size) { 8019180: 6a7a ldr r2, [r7, #36] @ 0x24 8019182: 69bb ldr r3, [r7, #24] 8019184: 429a cmp r2, r3 8019186: d901 bls.n 801918c /* not supported */ return NULL; 8019188: 2300 movs r3, #0 801918a: e08f b.n 80192ac } if (newsize == size) { 801918c: 6a7a ldr r2, [r7, #36] @ 0x24 801918e: 69bb ldr r3, [r7, #24] 8019190: 429a cmp r2, r3 8019192: d101 bne.n 8019198 /* No change in size, simply return */ return rmem; 8019194: 687b ldr r3, [r7, #4] 8019196: e089 b.n 80192ac } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 8019198: 484d ldr r0, [pc, #308] @ (80192d0 ) 801919a: f00d f945 bl 8026428 mem2 = ptr_to_mem(mem->next); 801919e: 6a3b ldr r3, [r7, #32] 80191a0: 681b ldr r3, [r3, #0] 80191a2: 4618 mov r0, r3 80191a4: f7ff fdba bl 8018d1c 80191a8: 6178 str r0, [r7, #20] if (mem2->used == 0) { 80191aa: 697b ldr r3, [r7, #20] 80191ac: 7a1b ldrb r3, [r3, #8] 80191ae: 2b00 cmp r3, #0 80191b0: d13c bne.n 801922c /* 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); 80191b2: 6a3b ldr r3, [r7, #32] 80191b4: 681b ldr r3, [r3, #0] 80191b6: 4a3f ldr r2, [pc, #252] @ (80192b4 ) 80191b8: 4293 cmp r3, r2 80191ba: d106 bne.n 80191ca 80191bc: 4b40 ldr r3, [pc, #256] @ (80192c0 ) 80191be: f240 22f5 movw r2, #757 @ 0x2f5 80191c2: 4944 ldr r1, [pc, #272] @ (80192d4 ) 80191c4: 4840 ldr r0, [pc, #256] @ (80192c8 ) 80191c6: f010 fc01 bl 80299cc /* remember the old next pointer */ next = mem2->next; 80191ca: 697b ldr r3, [r7, #20] 80191cc: 681b ldr r3, [r3, #0] 80191ce: 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); 80191d0: 69fa ldr r2, [r7, #28] 80191d2: 6a7b ldr r3, [r7, #36] @ 0x24 80191d4: 4413 add r3, r2 80191d6: 330c adds r3, #12 80191d8: 613b str r3, [r7, #16] if (lfree == mem2) { 80191da: 4b3f ldr r3, [pc, #252] @ (80192d8 ) 80191dc: 681b ldr r3, [r3, #0] 80191de: 697a ldr r2, [r7, #20] 80191e0: 429a cmp r2, r3 80191e2: d105 bne.n 80191f0 lfree = ptr_to_mem(ptr2); 80191e4: 6938 ldr r0, [r7, #16] 80191e6: f7ff fd99 bl 8018d1c 80191ea: 4603 mov r3, r0 80191ec: 4a3a ldr r2, [pc, #232] @ (80192d8 ) 80191ee: 6013 str r3, [r2, #0] } mem2 = ptr_to_mem(ptr2); 80191f0: 6938 ldr r0, [r7, #16] 80191f2: f7ff fd93 bl 8018d1c 80191f6: 6178 str r0, [r7, #20] mem2->used = 0; 80191f8: 697b ldr r3, [r7, #20] 80191fa: 2200 movs r2, #0 80191fc: 721a strb r2, [r3, #8] /* restore the next pointer */ mem2->next = next; 80191fe: 697b ldr r3, [r7, #20] 8019200: 68fa ldr r2, [r7, #12] 8019202: 601a str r2, [r3, #0] /* link it back to mem */ mem2->prev = ptr; 8019204: 697b ldr r3, [r7, #20] 8019206: 69fa ldr r2, [r7, #28] 8019208: 605a str r2, [r3, #4] /* link mem to it */ mem->next = ptr2; 801920a: 6a3b ldr r3, [r7, #32] 801920c: 693a ldr r2, [r7, #16] 801920e: 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) { 8019210: 697b ldr r3, [r7, #20] 8019212: 681b ldr r3, [r3, #0] 8019214: 4a27 ldr r2, [pc, #156] @ (80192b4 ) 8019216: 4293 cmp r3, r2 8019218: d044 beq.n 80192a4 ptr_to_mem(mem2->next)->prev = ptr2; 801921a: 697b ldr r3, [r7, #20] 801921c: 681b ldr r3, [r3, #0] 801921e: 4618 mov r0, r3 8019220: f7ff fd7c bl 8018d1c 8019224: 4602 mov r2, r0 8019226: 693b ldr r3, [r7, #16] 8019228: 6053 str r3, [r2, #4] 801922a: e03b b.n 80192a4 } 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) { 801922c: 6a7b ldr r3, [r7, #36] @ 0x24 801922e: 3318 adds r3, #24 8019230: 69ba ldr r2, [r7, #24] 8019232: 429a cmp r2, r3 8019234: d336 bcc.n 80192a4 * 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); 8019236: 69fa ldr r2, [r7, #28] 8019238: 6a7b ldr r3, [r7, #36] @ 0x24 801923a: 4413 add r3, r2 801923c: 330c adds r3, #12 801923e: 613b str r3, [r7, #16] LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED); 8019240: 6a3b ldr r3, [r7, #32] 8019242: 681b ldr r3, [r3, #0] 8019244: 4a1b ldr r2, [pc, #108] @ (80192b4 ) 8019246: 4293 cmp r3, r2 8019248: d106 bne.n 8019258 801924a: 4b1d ldr r3, [pc, #116] @ (80192c0 ) 801924c: f240 3216 movw r2, #790 @ 0x316 8019250: 4920 ldr r1, [pc, #128] @ (80192d4 ) 8019252: 481d ldr r0, [pc, #116] @ (80192c8 ) 8019254: f010 fbba bl 80299cc mem2 = ptr_to_mem(ptr2); 8019258: 6938 ldr r0, [r7, #16] 801925a: f7ff fd5f bl 8018d1c 801925e: 6178 str r0, [r7, #20] if (mem2 < lfree) { 8019260: 4b1d ldr r3, [pc, #116] @ (80192d8 ) 8019262: 681b ldr r3, [r3, #0] 8019264: 697a ldr r2, [r7, #20] 8019266: 429a cmp r2, r3 8019268: d202 bcs.n 8019270 lfree = mem2; 801926a: 4a1b ldr r2, [pc, #108] @ (80192d8 ) 801926c: 697b ldr r3, [r7, #20] 801926e: 6013 str r3, [r2, #0] } mem2->used = 0; 8019270: 697b ldr r3, [r7, #20] 8019272: 2200 movs r2, #0 8019274: 721a strb r2, [r3, #8] mem2->next = mem->next; 8019276: 6a3b ldr r3, [r7, #32] 8019278: 681a ldr r2, [r3, #0] 801927a: 697b ldr r3, [r7, #20] 801927c: 601a str r2, [r3, #0] mem2->prev = ptr; 801927e: 697b ldr r3, [r7, #20] 8019280: 69fa ldr r2, [r7, #28] 8019282: 605a str r2, [r3, #4] mem->next = ptr2; 8019284: 6a3b ldr r3, [r7, #32] 8019286: 693a ldr r2, [r7, #16] 8019288: 601a str r2, [r3, #0] if (mem2->next != MEM_SIZE_ALIGNED) { 801928a: 697b ldr r3, [r7, #20] 801928c: 681b ldr r3, [r3, #0] 801928e: 4a09 ldr r2, [pc, #36] @ (80192b4 ) 8019290: 4293 cmp r3, r2 8019292: d007 beq.n 80192a4 ptr_to_mem(mem2->next)->prev = ptr2; 8019294: 697b ldr r3, [r7, #20] 8019296: 681b ldr r3, [r3, #0] 8019298: 4618 mov r0, r3 801929a: f7ff fd3f bl 8018d1c 801929e: 4602 mov r2, r0 80192a0: 693b ldr r3, [r7, #16] 80192a2: 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(); 80192a4: 480a ldr r0, [pc, #40] @ (80192d0 ) 80192a6: f00d f8ce bl 8026446 return rmem; 80192aa: 687b ldr r3, [r7, #4] } 80192ac: 4618 mov r0, r3 80192ae: 3728 adds r7, #40 @ 0x28 80192b0: 46bd mov sp, r7 80192b2: bd80 pop {r7, pc} 80192b4: 0001ffe8 .word 0x0001ffe8 80192b8: 24024350 .word 0x24024350 80192bc: 24024354 .word 0x24024354 80192c0: 0802da7c .word 0x0802da7c 80192c4: 0802dc08 .word 0x0802dc08 80192c8: 0802dac4 .word 0x0802dac4 80192cc: 0802dc20 .word 0x0802dc20 80192d0: 24024358 .word 0x24024358 80192d4: 0802dc40 .word 0x0802dc40 80192d8: 2402435c .word 0x2402435c 080192dc : * * Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT). */ void * mem_malloc(mem_size_t size_in) { 80192dc: b580 push {r7, lr} 80192de: b088 sub sp, #32 80192e0: af00 add r7, sp, #0 80192e2: 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) { 80192e4: 687b ldr r3, [r7, #4] 80192e6: 2b00 cmp r3, #0 80192e8: d101 bne.n 80192ee return NULL; 80192ea: 2300 movs r3, #0 80192ec: e0d9 b.n 80194a2 } /* 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); 80192ee: 687b ldr r3, [r7, #4] 80192f0: 3303 adds r3, #3 80192f2: f023 0303 bic.w r3, r3, #3 80192f6: 61bb str r3, [r7, #24] if (size < MIN_SIZE_ALIGNED) { 80192f8: 69bb ldr r3, [r7, #24] 80192fa: 2b0b cmp r3, #11 80192fc: d801 bhi.n 8019302 /* every data block must be at least MIN_SIZE_ALIGNED long */ size = MIN_SIZE_ALIGNED; 80192fe: 230c movs r3, #12 8019300: 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)) { 8019302: 69bb ldr r3, [r7, #24] 8019304: 4a69 ldr r2, [pc, #420] @ (80194ac ) 8019306: 4293 cmp r3, r2 8019308: d803 bhi.n 8019312 801930a: 69ba ldr r2, [r7, #24] 801930c: 687b ldr r3, [r7, #4] 801930e: 429a cmp r2, r3 8019310: d201 bcs.n 8019316 return NULL; 8019312: 2300 movs r3, #0 8019314: e0c5 b.n 80194a2 } /* protect the heap from concurrent access */ sys_mutex_lock(&mem_mutex); 8019316: 4866 ldr r0, [pc, #408] @ (80194b0 ) 8019318: f00d f886 bl 8026428 #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; 801931c: 4b65 ldr r3, [pc, #404] @ (80194b4 ) 801931e: 681b ldr r3, [r3, #0] 8019320: 4618 mov r0, r3 8019322: f7ff fd0b bl 8018d3c 8019326: 61f8 str r0, [r7, #28] 8019328: e0b0 b.n 801948c ptr = ptr_to_mem(ptr)->next) { mem = ptr_to_mem(ptr); 801932a: 69f8 ldr r0, [r7, #28] 801932c: f7ff fcf6 bl 8018d1c 8019330: 6138 str r0, [r7, #16] local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 8019332: 693b ldr r3, [r7, #16] 8019334: 7a1b ldrb r3, [r3, #8] 8019336: 2b00 cmp r3, #0 8019338: f040 80a2 bne.w 8019480 (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { 801933c: 693b ldr r3, [r7, #16] 801933e: 681a ldr r2, [r3, #0] 8019340: 69fb ldr r3, [r7, #28] 8019342: 1ad3 subs r3, r2, r3 8019344: 3b0c subs r3, #12 if ((!mem->used) && 8019346: 69ba ldr r2, [r7, #24] 8019348: 429a cmp r2, r3 801934a: f200 8099 bhi.w 8019480 /* 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)) { 801934e: 693b ldr r3, [r7, #16] 8019350: 681a ldr r2, [r3, #0] 8019352: 69fb ldr r3, [r7, #28] 8019354: 1ad3 subs r3, r2, r3 8019356: f1a3 020c sub.w r2, r3, #12 801935a: 69bb ldr r3, [r7, #24] 801935c: 3318 adds r3, #24 801935e: 429a cmp r2, r3 8019360: d331 bcc.n 80193c6 * 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); 8019362: 69fa ldr r2, [r7, #28] 8019364: 69bb ldr r3, [r7, #24] 8019366: 4413 add r3, r2 8019368: 330c adds r3, #12 801936a: 60fb str r3, [r7, #12] LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED); 801936c: 68fb ldr r3, [r7, #12] 801936e: 4a4f ldr r2, [pc, #316] @ (80194ac ) 8019370: 4293 cmp r3, r2 8019372: d106 bne.n 8019382 8019374: 4b50 ldr r3, [pc, #320] @ (80194b8 ) 8019376: f240 3287 movw r2, #903 @ 0x387 801937a: 4950 ldr r1, [pc, #320] @ (80194bc ) 801937c: 4850 ldr r0, [pc, #320] @ (80194c0 ) 801937e: f010 fb25 bl 80299cc /* create mem2 struct */ mem2 = ptr_to_mem(ptr2); 8019382: 68f8 ldr r0, [r7, #12] 8019384: f7ff fcca bl 8018d1c 8019388: 60b8 str r0, [r7, #8] mem2->used = 0; 801938a: 68bb ldr r3, [r7, #8] 801938c: 2200 movs r2, #0 801938e: 721a strb r2, [r3, #8] mem2->next = mem->next; 8019390: 693b ldr r3, [r7, #16] 8019392: 681a ldr r2, [r3, #0] 8019394: 68bb ldr r3, [r7, #8] 8019396: 601a str r2, [r3, #0] mem2->prev = ptr; 8019398: 68bb ldr r3, [r7, #8] 801939a: 69fa ldr r2, [r7, #28] 801939c: 605a str r2, [r3, #4] /* and insert it between mem and mem->next */ mem->next = ptr2; 801939e: 693b ldr r3, [r7, #16] 80193a0: 68fa ldr r2, [r7, #12] 80193a2: 601a str r2, [r3, #0] mem->used = 1; 80193a4: 693b ldr r3, [r7, #16] 80193a6: 2201 movs r2, #1 80193a8: 721a strb r2, [r3, #8] if (mem2->next != MEM_SIZE_ALIGNED) { 80193aa: 68bb ldr r3, [r7, #8] 80193ac: 681b ldr r3, [r3, #0] 80193ae: 4a3f ldr r2, [pc, #252] @ (80194ac ) 80193b0: 4293 cmp r3, r2 80193b2: d00b beq.n 80193cc ptr_to_mem(mem2->next)->prev = ptr2; 80193b4: 68bb ldr r3, [r7, #8] 80193b6: 681b ldr r3, [r3, #0] 80193b8: 4618 mov r0, r3 80193ba: f7ff fcaf bl 8018d1c 80193be: 4602 mov r2, r0 80193c0: 68fb ldr r3, [r7, #12] 80193c2: 6053 str r3, [r2, #4] 80193c4: e002 b.n 80193cc * 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; 80193c6: 693b ldr r3, [r7, #16] 80193c8: 2201 movs r2, #1 80193ca: 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) { 80193cc: 4b39 ldr r3, [pc, #228] @ (80194b4 ) 80193ce: 681b ldr r3, [r3, #0] 80193d0: 693a ldr r2, [r7, #16] 80193d2: 429a cmp r2, r3 80193d4: d127 bne.n 8019426 struct mem *cur = lfree; 80193d6: 4b37 ldr r3, [pc, #220] @ (80194b4 ) 80193d8: 681b ldr r3, [r3, #0] 80193da: 617b str r3, [r7, #20] /* Find next free block after mem and update lowest free pointer */ while (cur->used && cur != ram_end) { 80193dc: e005 b.n 80193ea /* 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); 80193de: 697b ldr r3, [r7, #20] 80193e0: 681b ldr r3, [r3, #0] 80193e2: 4618 mov r0, r3 80193e4: f7ff fc9a bl 8018d1c 80193e8: 6178 str r0, [r7, #20] while (cur->used && cur != ram_end) { 80193ea: 697b ldr r3, [r7, #20] 80193ec: 7a1b ldrb r3, [r3, #8] 80193ee: 2b00 cmp r3, #0 80193f0: d004 beq.n 80193fc 80193f2: 4b34 ldr r3, [pc, #208] @ (80194c4 ) 80193f4: 681b ldr r3, [r3, #0] 80193f6: 697a ldr r2, [r7, #20] 80193f8: 429a cmp r2, r3 80193fa: d1f0 bne.n 80193de } lfree = cur; 80193fc: 4a2d ldr r2, [pc, #180] @ (80194b4 ) 80193fe: 697b ldr r3, [r7, #20] 8019400: 6013 str r3, [r2, #0] LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); 8019402: 4b2c ldr r3, [pc, #176] @ (80194b4 ) 8019404: 681a ldr r2, [r3, #0] 8019406: 4b2f ldr r3, [pc, #188] @ (80194c4 ) 8019408: 681b ldr r3, [r3, #0] 801940a: 429a cmp r2, r3 801940c: d00b beq.n 8019426 801940e: 4b29 ldr r3, [pc, #164] @ (80194b4 ) 8019410: 681b ldr r3, [r3, #0] 8019412: 7a1b ldrb r3, [r3, #8] 8019414: 2b00 cmp r3, #0 8019416: d006 beq.n 8019426 8019418: 4b27 ldr r3, [pc, #156] @ (80194b8 ) 801941a: f240 32b5 movw r2, #949 @ 0x3b5 801941e: 492a ldr r1, [pc, #168] @ (80194c8 ) 8019420: 4827 ldr r0, [pc, #156] @ (80194c0 ) 8019422: f010 fad3 bl 80299cc } LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); 8019426: 4822 ldr r0, [pc, #136] @ (80194b0 ) 8019428: f00d f80d bl 8026446 LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.", 801942c: 693a ldr r2, [r7, #16] 801942e: 69bb ldr r3, [r7, #24] 8019430: 4413 add r3, r2 8019432: 330c adds r3, #12 8019434: 4a23 ldr r2, [pc, #140] @ (80194c4 ) 8019436: 6812 ldr r2, [r2, #0] 8019438: 4293 cmp r3, r2 801943a: d906 bls.n 801944a 801943c: 4b1e ldr r3, [pc, #120] @ (80194b8 ) 801943e: f240 32b9 movw r2, #953 @ 0x3b9 8019442: 4922 ldr r1, [pc, #136] @ (80194cc ) 8019444: 481e ldr r0, [pc, #120] @ (80194c0 ) 8019446: f010 fac1 bl 80299cc (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end); LWIP_ASSERT("mem_malloc: allocated memory properly aligned.", 801944a: 693b ldr r3, [r7, #16] 801944c: f003 0303 and.w r3, r3, #3 8019450: 2b00 cmp r3, #0 8019452: d006 beq.n 8019462 8019454: 4b18 ldr r3, [pc, #96] @ (80194b8 ) 8019456: f240 32bb movw r2, #955 @ 0x3bb 801945a: 491d ldr r1, [pc, #116] @ (80194d0 ) 801945c: 4818 ldr r0, [pc, #96] @ (80194c0 ) 801945e: f010 fab5 bl 80299cc ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0); LWIP_ASSERT("mem_malloc: sanity check alignment", 8019462: 693b ldr r3, [r7, #16] 8019464: f003 0303 and.w r3, r3, #3 8019468: 2b00 cmp r3, #0 801946a: d006 beq.n 801947a 801946c: 4b12 ldr r3, [pc, #72] @ (80194b8 ) 801946e: f240 32bd movw r2, #957 @ 0x3bd 8019472: 4918 ldr r1, [pc, #96] @ (80194d4 ) 8019474: 4812 ldr r0, [pc, #72] @ (80194c0 ) 8019476: f010 faa9 bl 80299cc #if MEM_OVERFLOW_CHECK mem_overflow_init_element(mem, size_in); #endif MEM_SANITY(); return (u8_t *)mem + SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET; 801947a: 693b ldr r3, [r7, #16] 801947c: 330c adds r3, #12 801947e: e010 b.n 80194a2 ptr = ptr_to_mem(ptr)->next) { 8019480: 69f8 ldr r0, [r7, #28] 8019482: f7ff fc4b bl 8018d1c 8019486: 4603 mov r3, r0 8019488: 681b ldr r3, [r3, #0] 801948a: 61fb str r3, [r7, #28] for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size; 801948c: 69ba ldr r2, [r7, #24] 801948e: 4b07 ldr r3, [pc, #28] @ (80194ac ) 8019490: 1a9b subs r3, r3, r2 8019492: 69fa ldr r2, [r7, #28] 8019494: 429a cmp r2, r3 8019496: f4ff af48 bcc.w 801932a /* 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); 801949a: 4805 ldr r0, [pc, #20] @ (80194b0 ) 801949c: f00c ffd3 bl 8026446 LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); return NULL; 80194a0: 2300 movs r3, #0 } 80194a2: 4618 mov r0, r3 80194a4: 3720 adds r7, #32 80194a6: 46bd mov sp, r7 80194a8: bd80 pop {r7, pc} 80194aa: bf00 nop 80194ac: 0001ffe8 .word 0x0001ffe8 80194b0: 24024358 .word 0x24024358 80194b4: 2402435c .word 0x2402435c 80194b8: 0802da7c .word 0x0802da7c 80194bc: 0802dc40 .word 0x0802dc40 80194c0: 0802dac4 .word 0x0802dac4 80194c4: 24024354 .word 0x24024354 80194c8: 0802dc54 .word 0x0802dc54 80194cc: 0802dc70 .word 0x0802dc70 80194d0: 0802dca0 .word 0x0802dca0 80194d4: 0802dcd0 .word 0x0802dcd0 080194d8 : * * @param desc pool to initialize */ void memp_init_pool(const struct memp_desc *desc) { 80194d8: b480 push {r7} 80194da: b085 sub sp, #20 80194dc: af00 add r7, sp, #0 80194de: 6078 str r0, [r7, #4] LWIP_UNUSED_ARG(desc); #else int i; struct memp *memp; *desc->tab = NULL; 80194e0: 687b ldr r3, [r7, #4] 80194e2: 68db ldr r3, [r3, #12] 80194e4: 2200 movs r2, #0 80194e6: 601a str r2, [r3, #0] memp = (struct memp *)LWIP_MEM_ALIGN(desc->base); 80194e8: 687b ldr r3, [r7, #4] 80194ea: 689b ldr r3, [r3, #8] 80194ec: 3303 adds r3, #3 80194ee: f023 0303 bic.w r3, r3, #3 80194f2: 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) { 80194f4: 2300 movs r3, #0 80194f6: 60fb str r3, [r7, #12] 80194f8: e011 b.n 801951e memp->next = *desc->tab; 80194fa: 687b ldr r3, [r7, #4] 80194fc: 68db ldr r3, [r3, #12] 80194fe: 681a ldr r2, [r3, #0] 8019500: 68bb ldr r3, [r7, #8] 8019502: 601a str r2, [r3, #0] *desc->tab = memp; 8019504: 687b ldr r3, [r7, #4] 8019506: 68db ldr r3, [r3, #12] 8019508: 68ba ldr r2, [r7, #8] 801950a: 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 801950c: 687b ldr r3, [r7, #4] 801950e: 889b ldrh r3, [r3, #4] 8019510: 461a mov r2, r3 8019512: 68bb ldr r3, [r7, #8] 8019514: 4413 add r3, r2 8019516: 60bb str r3, [r7, #8] for (i = 0; i < desc->num; ++i) { 8019518: 68fb ldr r3, [r7, #12] 801951a: 3301 adds r3, #1 801951c: 60fb str r3, [r7, #12] 801951e: 687b ldr r3, [r7, #4] 8019520: 88db ldrh r3, [r3, #6] 8019522: 461a mov r2, r3 8019524: 68fb ldr r3, [r7, #12] 8019526: 4293 cmp r3, r2 8019528: dbe7 blt.n 80194fa #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) */ } 801952a: bf00 nop 801952c: bf00 nop 801952e: 3714 adds r7, #20 8019530: 46bd mov sp, r7 8019532: f85d 7b04 ldr.w r7, [sp], #4 8019536: 4770 bx lr 08019538 : * * Carves out memp_memory into linked lists for each pool-type. */ void memp_init(void) { 8019538: b580 push {r7, lr} 801953a: b082 sub sp, #8 801953c: af00 add r7, sp, #0 u16_t i; /* for every pool: */ for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { 801953e: 2300 movs r3, #0 8019540: 80fb strh r3, [r7, #6] 8019542: e009 b.n 8019558 memp_init_pool(memp_pools[i]); 8019544: 88fb ldrh r3, [r7, #6] 8019546: 4a08 ldr r2, [pc, #32] @ (8019568 ) 8019548: f852 3023 ldr.w r3, [r2, r3, lsl #2] 801954c: 4618 mov r0, r3 801954e: f7ff ffc3 bl 80194d8 for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { 8019552: 88fb ldrh r3, [r7, #6] 8019554: 3301 adds r3, #1 8019556: 80fb strh r3, [r7, #6] 8019558: 88fb ldrh r3, [r7, #6] 801955a: 2b0c cmp r3, #12 801955c: d9f2 bls.n 8019544 #if MEMP_OVERFLOW_CHECK >= 2 /* check everything a first time to see if it worked */ memp_overflow_check_all(); #endif /* MEMP_OVERFLOW_CHECK >= 2 */ } 801955e: bf00 nop 8019560: bf00 nop 8019562: 3708 adds r7, #8 8019564: 46bd mov sp, r7 8019566: bd80 pop {r7, pc} 8019568: 08030b8c .word 0x08030b8c 0801956c : #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 { 801956c: b580 push {r7, lr} 801956e: b084 sub sp, #16 8019570: af00 add r7, sp, #0 8019572: 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); 8019574: f00c ff94 bl 80264a0 8019578: 60f8 str r0, [r7, #12] memp = *desc->tab; 801957a: 687b ldr r3, [r7, #4] 801957c: 68db ldr r3, [r3, #12] 801957e: 681b ldr r3, [r3, #0] 8019580: 60bb str r3, [r7, #8] #endif /* MEMP_MEM_MALLOC */ if (memp != NULL) { 8019582: 68bb ldr r3, [r7, #8] 8019584: 2b00 cmp r3, #0 8019586: d015 beq.n 80195b4 #if !MEMP_MEM_MALLOC #if MEMP_OVERFLOW_CHECK == 1 memp_overflow_check_element(memp, desc); #endif /* MEMP_OVERFLOW_CHECK */ *desc->tab = memp->next; 8019588: 687b ldr r3, [r7, #4] 801958a: 68db ldr r3, [r3, #12] 801958c: 68ba ldr r2, [r7, #8] 801958e: 6812 ldr r2, [r2, #0] 8019590: 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", 8019592: 68bb ldr r3, [r7, #8] 8019594: f003 0303 and.w r3, r3, #3 8019598: 2b00 cmp r3, #0 801959a: d006 beq.n 80195aa 801959c: 4b09 ldr r3, [pc, #36] @ (80195c4 ) 801959e: f44f 728c mov.w r2, #280 @ 0x118 80195a2: 4909 ldr r1, [pc, #36] @ (80195c8 ) 80195a4: 4809 ldr r0, [pc, #36] @ (80195cc ) 80195a6: f010 fa11 bl 80299cc desc->stats->used++; if (desc->stats->used > desc->stats->max) { desc->stats->max = desc->stats->used; } #endif SYS_ARCH_UNPROTECT(old_level); 80195aa: 68f8 ldr r0, [r7, #12] 80195ac: f00c ff86 bl 80264bc /* cast through u8_t* to get rid of alignment warnings */ return ((u8_t *)memp + MEMP_SIZE); 80195b0: 68bb ldr r3, [r7, #8] 80195b2: e003 b.n 80195bc } else { #if MEMP_STATS desc->stats->err++; #endif SYS_ARCH_UNPROTECT(old_level); 80195b4: 68f8 ldr r0, [r7, #12] 80195b6: f00c ff81 bl 80264bc LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc)); } return NULL; 80195ba: 2300 movs r3, #0 } 80195bc: 4618 mov r0, r3 80195be: 3710 adds r7, #16 80195c0: 46bd mov sp, r7 80195c2: bd80 pop {r7, pc} 80195c4: 0802dd8c .word 0x0802dd8c 80195c8: 0802ddbc .word 0x0802ddbc 80195cc: 0802dde0 .word 0x0802dde0 080195d0 : #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 { 80195d0: b580 push {r7, lr} 80195d2: b082 sub sp, #8 80195d4: af00 add r7, sp, #0 80195d6: 6078 str r0, [r7, #4] LWIP_ASSERT("invalid pool desc", desc != NULL); 80195d8: 687b ldr r3, [r7, #4] 80195da: 2b00 cmp r3, #0 80195dc: d106 bne.n 80195ec 80195de: 4b0a ldr r3, [pc, #40] @ (8019608 ) 80195e0: f44f 729e mov.w r2, #316 @ 0x13c 80195e4: 4909 ldr r1, [pc, #36] @ (801960c ) 80195e6: 480a ldr r0, [pc, #40] @ (8019610 ) 80195e8: f010 f9f0 bl 80299cc if (desc == NULL) { 80195ec: 687b ldr r3, [r7, #4] 80195ee: 2b00 cmp r3, #0 80195f0: d101 bne.n 80195f6 return NULL; 80195f2: 2300 movs r3, #0 80195f4: e003 b.n 80195fe } #if !MEMP_OVERFLOW_CHECK return do_memp_malloc_pool(desc); 80195f6: 6878 ldr r0, [r7, #4] 80195f8: f7ff ffb8 bl 801956c 80195fc: 4603 mov r3, r0 #else return do_memp_malloc_pool_fn(desc, file, line); #endif } 80195fe: 4618 mov r0, r3 8019600: 3708 adds r7, #8 8019602: 46bd mov sp, r7 8019604: bd80 pop {r7, pc} 8019606: bf00 nop 8019608: 0802dd8c .word 0x0802dd8c 801960c: 0802de08 .word 0x0802de08 8019610: 0802dde0 .word 0x0802dde0 08019614 : #if !MEMP_OVERFLOW_CHECK memp_malloc(memp_t type) #else memp_malloc_fn(memp_t type, const char *file, const int line) #endif { 8019614: b580 push {r7, lr} 8019616: b084 sub sp, #16 8019618: af00 add r7, sp, #0 801961a: 4603 mov r3, r0 801961c: 71fb strb r3, [r7, #7] void *memp; LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 801961e: 79fb ldrb r3, [r7, #7] 8019620: 2b0c cmp r3, #12 8019622: d908 bls.n 8019636 8019624: 4b0a ldr r3, [pc, #40] @ (8019650 ) 8019626: f240 1257 movw r2, #343 @ 0x157 801962a: 490a ldr r1, [pc, #40] @ (8019654 ) 801962c: 480a ldr r0, [pc, #40] @ (8019658 ) 801962e: f010 f9cd bl 80299cc 8019632: 2300 movs r3, #0 8019634: e008 b.n 8019648 #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]); 8019636: 79fb ldrb r3, [r7, #7] 8019638: 4a08 ldr r2, [pc, #32] @ (801965c ) 801963a: f852 3023 ldr.w r3, [r2, r3, lsl #2] 801963e: 4618 mov r0, r3 8019640: f7ff ff94 bl 801956c 8019644: 60f8 str r0, [r7, #12] #else memp = do_memp_malloc_pool_fn(memp_pools[type], file, line); #endif return memp; 8019646: 68fb ldr r3, [r7, #12] } 8019648: 4618 mov r0, r3 801964a: 3710 adds r7, #16 801964c: 46bd mov sp, r7 801964e: bd80 pop {r7, pc} 8019650: 0802dd8c .word 0x0802dd8c 8019654: 0802de1c .word 0x0802de1c 8019658: 0802dde0 .word 0x0802dde0 801965c: 08030b8c .word 0x08030b8c 08019660 : static void do_memp_free_pool(const struct memp_desc *desc, void *mem) { 8019660: b580 push {r7, lr} 8019662: b084 sub sp, #16 8019664: af00 add r7, sp, #0 8019666: 6078 str r0, [r7, #4] 8019668: 6039 str r1, [r7, #0] struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ASSERT("memp_free: mem properly aligned", 801966a: 683b ldr r3, [r7, #0] 801966c: f003 0303 and.w r3, r3, #3 8019670: 2b00 cmp r3, #0 8019672: d006 beq.n 8019682 8019674: 4b0d ldr r3, [pc, #52] @ (80196ac ) 8019676: f44f 72b6 mov.w r2, #364 @ 0x16c 801967a: 490d ldr r1, [pc, #52] @ (80196b0 ) 801967c: 480d ldr r0, [pc, #52] @ (80196b4 ) 801967e: f010 f9a5 bl 80299cc ((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); 8019682: 683b ldr r3, [r7, #0] 8019684: 60fb str r3, [r7, #12] SYS_ARCH_PROTECT(old_level); 8019686: f00c ff0b bl 80264a0 801968a: 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; 801968c: 687b ldr r3, [r7, #4] 801968e: 68db ldr r3, [r3, #12] 8019690: 681a ldr r2, [r3, #0] 8019692: 68fb ldr r3, [r7, #12] 8019694: 601a str r2, [r3, #0] *desc->tab = memp; 8019696: 687b ldr r3, [r7, #4] 8019698: 68db ldr r3, [r3, #12] 801969a: 68fa ldr r2, [r7, #12] 801969c: 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); 801969e: 68b8 ldr r0, [r7, #8] 80196a0: f00c ff0c bl 80264bc #endif /* !MEMP_MEM_MALLOC */ } 80196a4: bf00 nop 80196a6: 3710 adds r7, #16 80196a8: 46bd mov sp, r7 80196aa: bd80 pop {r7, pc} 80196ac: 0802dd8c .word 0x0802dd8c 80196b0: 0802de3c .word 0x0802de3c 80196b4: 0802dde0 .word 0x0802dde0 080196b8 : * @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) { 80196b8: b580 push {r7, lr} 80196ba: b082 sub sp, #8 80196bc: af00 add r7, sp, #0 80196be: 6078 str r0, [r7, #4] 80196c0: 6039 str r1, [r7, #0] LWIP_ASSERT("invalid pool desc", desc != NULL); 80196c2: 687b ldr r3, [r7, #4] 80196c4: 2b00 cmp r3, #0 80196c6: d106 bne.n 80196d6 80196c8: 4b0a ldr r3, [pc, #40] @ (80196f4 ) 80196ca: f240 1295 movw r2, #405 @ 0x195 80196ce: 490a ldr r1, [pc, #40] @ (80196f8 ) 80196d0: 480a ldr r0, [pc, #40] @ (80196fc ) 80196d2: f010 f97b bl 80299cc if ((desc == NULL) || (mem == NULL)) { 80196d6: 687b ldr r3, [r7, #4] 80196d8: 2b00 cmp r3, #0 80196da: d007 beq.n 80196ec 80196dc: 683b ldr r3, [r7, #0] 80196de: 2b00 cmp r3, #0 80196e0: d004 beq.n 80196ec return; } do_memp_free_pool(desc, mem); 80196e2: 6839 ldr r1, [r7, #0] 80196e4: 6878 ldr r0, [r7, #4] 80196e6: f7ff ffbb bl 8019660 80196ea: e000 b.n 80196ee return; 80196ec: bf00 nop } 80196ee: 3708 adds r7, #8 80196f0: 46bd mov sp, r7 80196f2: bd80 pop {r7, pc} 80196f4: 0802dd8c .word 0x0802dd8c 80196f8: 0802de08 .word 0x0802de08 80196fc: 0802dde0 .word 0x0802dde0 08019700 : * @param type the pool where to put mem * @param mem the memp element to free */ void memp_free(memp_t type, void *mem) { 8019700: b580 push {r7, lr} 8019702: b082 sub sp, #8 8019704: af00 add r7, sp, #0 8019706: 4603 mov r3, r0 8019708: 6039 str r1, [r7, #0] 801970a: 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;); 801970c: 79fb ldrb r3, [r7, #7] 801970e: 2b0c cmp r3, #12 8019710: d907 bls.n 8019722 8019712: 4b0c ldr r3, [pc, #48] @ (8019744 ) 8019714: f44f 72d5 mov.w r2, #426 @ 0x1aa 8019718: 490b ldr r1, [pc, #44] @ (8019748 ) 801971a: 480c ldr r0, [pc, #48] @ (801974c ) 801971c: f010 f956 bl 80299cc 8019720: e00c b.n 801973c if (mem == NULL) { 8019722: 683b ldr r3, [r7, #0] 8019724: 2b00 cmp r3, #0 8019726: d008 beq.n 801973a #ifdef LWIP_HOOK_MEMP_AVAILABLE old_first = *memp_pools[type]->tab; #endif do_memp_free_pool(memp_pools[type], mem); 8019728: 79fb ldrb r3, [r7, #7] 801972a: 4a09 ldr r2, [pc, #36] @ (8019750 ) 801972c: f852 3023 ldr.w r3, [r2, r3, lsl #2] 8019730: 6839 ldr r1, [r7, #0] 8019732: 4618 mov r0, r3 8019734: f7ff ff94 bl 8019660 8019738: e000 b.n 801973c return; 801973a: bf00 nop #ifdef LWIP_HOOK_MEMP_AVAILABLE if (old_first == NULL) { LWIP_HOOK_MEMP_AVAILABLE(type); } #endif } 801973c: 3708 adds r7, #8 801973e: 46bd mov sp, r7 8019740: bd80 pop {r7, pc} 8019742: bf00 nop 8019744: 0802dd8c .word 0x0802dd8c 8019748: 0802de5c .word 0x0802de5c 801974c: 0802dde0 .word 0x0802dde0 8019750: 08030b8c .word 0x08030b8c 08019754 : } #endif /* LWIP_HAVE_LOOPIF */ void netif_init(void) { 8019754: b480 push {r7} 8019756: af00 add r7, sp, #0 netif_set_link_up(&loop_netif); netif_set_up(&loop_netif); #endif /* LWIP_HAVE_LOOPIF */ } 8019758: bf00 nop 801975a: 46bd mov sp, r7 801975c: f85d 7b04 ldr.w r7, [sp], #4 8019760: 4770 bx lr ... 08019764 : 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) { 8019764: b580 push {r7, lr} 8019766: b086 sub sp, #24 8019768: af00 add r7, sp, #0 801976a: 60f8 str r0, [r7, #12] 801976c: 60b9 str r1, [r7, #8] 801976e: 607a str r2, [r7, #4] 8019770: 603b str r3, [r7, #0] #if LWIP_IPV6 s8_t i; #endif LWIP_ASSERT_CORE_LOCKED(); 8019772: f7f6 fedd bl 8010530 LWIP_ASSERT("single netif already set", 0); return NULL; } #endif LWIP_ERROR("netif_add: invalid netif", netif != NULL, return NULL); 8019776: 68fb ldr r3, [r7, #12] 8019778: 2b00 cmp r3, #0 801977a: d108 bne.n 801978e 801977c: 4b5b ldr r3, [pc, #364] @ (80198ec ) 801977e: f240 1227 movw r2, #295 @ 0x127 8019782: 495b ldr r1, [pc, #364] @ (80198f0 ) 8019784: 485b ldr r0, [pc, #364] @ (80198f4 ) 8019786: f010 f921 bl 80299cc 801978a: 2300 movs r3, #0 801978c: e0a9 b.n 80198e2 LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL); 801978e: 6a7b ldr r3, [r7, #36] @ 0x24 8019790: 2b00 cmp r3, #0 8019792: d108 bne.n 80197a6 8019794: 4b55 ldr r3, [pc, #340] @ (80198ec ) 8019796: f44f 7294 mov.w r2, #296 @ 0x128 801979a: 4957 ldr r1, [pc, #348] @ (80198f8 ) 801979c: 4855 ldr r0, [pc, #340] @ (80198f4 ) 801979e: f010 f915 bl 80299cc 80197a2: 2300 movs r3, #0 80197a4: e09d b.n 80198e2 #if LWIP_IPV4 if (ipaddr == NULL) { 80197a6: 68bb ldr r3, [r7, #8] 80197a8: 2b00 cmp r3, #0 80197aa: d101 bne.n 80197b0 ipaddr = ip_2_ip4(IP4_ADDR_ANY); 80197ac: 4b53 ldr r3, [pc, #332] @ (80198fc ) 80197ae: 60bb str r3, [r7, #8] } if (netmask == NULL) { 80197b0: 687b ldr r3, [r7, #4] 80197b2: 2b00 cmp r3, #0 80197b4: d101 bne.n 80197ba netmask = ip_2_ip4(IP4_ADDR_ANY); 80197b6: 4b51 ldr r3, [pc, #324] @ (80198fc ) 80197b8: 607b str r3, [r7, #4] } if (gw == NULL) { 80197ba: 683b ldr r3, [r7, #0] 80197bc: 2b00 cmp r3, #0 80197be: d101 bne.n 80197c4 gw = ip_2_ip4(IP4_ADDR_ANY); 80197c0: 4b4e ldr r3, [pc, #312] @ (80198fc ) 80197c2: 603b str r3, [r7, #0] } /* reset new interface configuration state */ ip_addr_set_zero_ip4(&netif->ip_addr); 80197c4: 68fb ldr r3, [r7, #12] 80197c6: 2200 movs r2, #0 80197c8: 605a str r2, [r3, #4] ip_addr_set_zero_ip4(&netif->netmask); 80197ca: 68fb ldr r3, [r7, #12] 80197cc: 2200 movs r2, #0 80197ce: 609a str r2, [r3, #8] ip_addr_set_zero_ip4(&netif->gw); 80197d0: 68fb ldr r3, [r7, #12] 80197d2: 2200 movs r2, #0 80197d4: 60da str r2, [r3, #12] netif->output = netif_null_output_ip4; 80197d6: 68fb ldr r3, [r7, #12] 80197d8: 4a49 ldr r2, [pc, #292] @ (8019900 ) 80197da: 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; 80197dc: 68fb ldr r3, [r7, #12] 80197de: 2200 movs r2, #0 80197e0: 851a strh r2, [r3, #40] @ 0x28 netif->flags = 0; 80197e2: 68fb ldr r3, [r7, #12] 80197e4: 2200 movs r2, #0 80197e6: f883 2031 strb.w r2, [r3, #49] @ 0x31 #ifdef netif_get_client_data memset(netif->client_data, 0, sizeof(netif->client_data)); 80197ea: 68fb ldr r3, [r7, #12] 80197ec: 3324 adds r3, #36 @ 0x24 80197ee: 2204 movs r2, #4 80197f0: 2100 movs r1, #0 80197f2: 4618 mov r0, r3 80197f4: f010 fa7c bl 8029cf0 #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; 80197f8: 68fb ldr r3, [r7, #12] 80197fa: 2200 movs r2, #0 80197fc: 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; 80197fe: 68fb ldr r3, [r7, #12] 8019800: 6a3a ldr r2, [r7, #32] 8019802: 621a str r2, [r3, #32] netif->num = netif_num; 8019804: 4b3f ldr r3, [pc, #252] @ (8019904 ) 8019806: 781a ldrb r2, [r3, #0] 8019808: 68fb ldr r3, [r7, #12] 801980a: f883 2034 strb.w r2, [r3, #52] @ 0x34 netif->input = input; 801980e: 68fb ldr r3, [r7, #12] 8019810: 6aba ldr r2, [r7, #40] @ 0x28 8019812: 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); 8019814: 683b ldr r3, [r7, #0] 8019816: 687a ldr r2, [r7, #4] 8019818: 68b9 ldr r1, [r7, #8] 801981a: 68f8 ldr r0, [r7, #12] 801981c: f000 f914 bl 8019a48 #endif /* LWIP_IPV4 */ /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { 8019820: 6a7b ldr r3, [r7, #36] @ 0x24 8019822: 68f8 ldr r0, [r7, #12] 8019824: 4798 blx r3 8019826: 4603 mov r3, r0 8019828: 2b00 cmp r3, #0 801982a: d001 beq.n 8019830 return NULL; 801982c: 2300 movs r3, #0 801982e: e058 b.n 80198e2 */ { struct netif *netif2; int num_netifs; do { if (netif->num == 255) { 8019830: 68fb ldr r3, [r7, #12] 8019832: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8019836: 2bff cmp r3, #255 @ 0xff 8019838: d103 bne.n 8019842 netif->num = 0; 801983a: 68fb ldr r3, [r7, #12] 801983c: 2200 movs r2, #0 801983e: f883 2034 strb.w r2, [r3, #52] @ 0x34 } num_netifs = 0; 8019842: 2300 movs r3, #0 8019844: 613b str r3, [r7, #16] for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) { 8019846: 4b30 ldr r3, [pc, #192] @ (8019908 ) 8019848: 681b ldr r3, [r3, #0] 801984a: 617b str r3, [r7, #20] 801984c: e02b b.n 80198a6 LWIP_ASSERT("netif already added", netif2 != netif); 801984e: 697a ldr r2, [r7, #20] 8019850: 68fb ldr r3, [r7, #12] 8019852: 429a cmp r2, r3 8019854: d106 bne.n 8019864 8019856: 4b25 ldr r3, [pc, #148] @ (80198ec ) 8019858: f240 128b movw r2, #395 @ 0x18b 801985c: 492b ldr r1, [pc, #172] @ (801990c ) 801985e: 4825 ldr r0, [pc, #148] @ (80198f4 ) 8019860: f010 f8b4 bl 80299cc num_netifs++; 8019864: 693b ldr r3, [r7, #16] 8019866: 3301 adds r3, #1 8019868: 613b str r3, [r7, #16] LWIP_ASSERT("too many netifs, max. supported number is 255", num_netifs <= 255); 801986a: 693b ldr r3, [r7, #16] 801986c: 2bff cmp r3, #255 @ 0xff 801986e: dd06 ble.n 801987e 8019870: 4b1e ldr r3, [pc, #120] @ (80198ec ) 8019872: f240 128d movw r2, #397 @ 0x18d 8019876: 4926 ldr r1, [pc, #152] @ (8019910 ) 8019878: 481e ldr r0, [pc, #120] @ (80198f4 ) 801987a: f010 f8a7 bl 80299cc if (netif2->num == netif->num) { 801987e: 697b ldr r3, [r7, #20] 8019880: f893 2034 ldrb.w r2, [r3, #52] @ 0x34 8019884: 68fb ldr r3, [r7, #12] 8019886: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801988a: 429a cmp r2, r3 801988c: d108 bne.n 80198a0 netif->num++; 801988e: 68fb ldr r3, [r7, #12] 8019890: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8019894: 3301 adds r3, #1 8019896: b2da uxtb r2, r3 8019898: 68fb ldr r3, [r7, #12] 801989a: f883 2034 strb.w r2, [r3, #52] @ 0x34 break; 801989e: e005 b.n 80198ac for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) { 80198a0: 697b ldr r3, [r7, #20] 80198a2: 681b ldr r3, [r3, #0] 80198a4: 617b str r3, [r7, #20] 80198a6: 697b ldr r3, [r7, #20] 80198a8: 2b00 cmp r3, #0 80198aa: d1d0 bne.n 801984e } } } while (netif2 != NULL); 80198ac: 697b ldr r3, [r7, #20] 80198ae: 2b00 cmp r3, #0 80198b0: d1be bne.n 8019830 } if (netif->num == 254) { 80198b2: 68fb ldr r3, [r7, #12] 80198b4: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 80198b8: 2bfe cmp r3, #254 @ 0xfe 80198ba: d103 bne.n 80198c4 netif_num = 0; 80198bc: 4b11 ldr r3, [pc, #68] @ (8019904 ) 80198be: 2200 movs r2, #0 80198c0: 701a strb r2, [r3, #0] 80198c2: e006 b.n 80198d2 } else { netif_num = (u8_t)(netif->num + 1); 80198c4: 68fb ldr r3, [r7, #12] 80198c6: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 80198ca: 3301 adds r3, #1 80198cc: b2da uxtb r2, r3 80198ce: 4b0d ldr r3, [pc, #52] @ (8019904 ) 80198d0: 701a strb r2, [r3, #0] } /* add this netif to the list */ netif->next = netif_list; 80198d2: 4b0d ldr r3, [pc, #52] @ (8019908 ) 80198d4: 681a ldr r2, [r3, #0] 80198d6: 68fb ldr r3, [r7, #12] 80198d8: 601a str r2, [r3, #0] netif_list = netif; 80198da: 4a0b ldr r2, [pc, #44] @ (8019908 ) 80198dc: 68fb ldr r3, [r7, #12] 80198de: 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; 80198e0: 68fb ldr r3, [r7, #12] } 80198e2: 4618 mov r0, r3 80198e4: 3718 adds r7, #24 80198e6: 46bd mov sp, r7 80198e8: bd80 pop {r7, pc} 80198ea: bf00 nop 80198ec: 0802de78 .word 0x0802de78 80198f0: 0802df0c .word 0x0802df0c 80198f4: 0802dec8 .word 0x0802dec8 80198f8: 0802df28 .word 0x0802df28 80198fc: 08030c10 .word 0x08030c10 8019900: 08019d3f .word 0x08019d3f 8019904: 2402ae84 .word 0x2402ae84 8019908: 2402ae7c .word 0x2402ae7c 801990c: 0802df4c .word 0x0802df4c 8019910: 0802df60 .word 0x0802df60 08019914 : static void netif_do_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr) { 8019914: b580 push {r7, lr} 8019916: b082 sub sp, #8 8019918: af00 add r7, sp, #0 801991a: 6078 str r0, [r7, #4] 801991c: 6039 str r1, [r7, #0] #if LWIP_TCP tcp_netif_ip_addr_changed(old_addr, new_addr); 801991e: 6839 ldr r1, [r7, #0] 8019920: 6878 ldr r0, [r7, #4] 8019922: f002 fe6f bl 801c604 #endif /* LWIP_TCP */ #if LWIP_UDP udp_netif_ip_addr_changed(old_addr, new_addr); 8019926: 6839 ldr r1, [r7, #0] 8019928: 6878 ldr r0, [r7, #4] 801992a: f008 f82b bl 8021984 #endif /* LWIP_UDP */ #if LWIP_RAW raw_netif_ip_addr_changed(old_addr, new_addr); #endif /* LWIP_RAW */ } 801992e: bf00 nop 8019930: 3708 adds r7, #8 8019932: 46bd mov sp, r7 8019934: bd80 pop {r7, pc} ... 08019938 : #if LWIP_IPV4 static int netif_do_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr, ip_addr_t *old_addr) { 8019938: b580 push {r7, lr} 801993a: b086 sub sp, #24 801993c: af00 add r7, sp, #0 801993e: 60f8 str r0, [r7, #12] 8019940: 60b9 str r1, [r7, #8] 8019942: 607a str r2, [r7, #4] LWIP_ASSERT("invalid pointer", ipaddr != NULL); 8019944: 68bb ldr r3, [r7, #8] 8019946: 2b00 cmp r3, #0 8019948: d106 bne.n 8019958 801994a: 4b1d ldr r3, [pc, #116] @ (80199c0 ) 801994c: f240 12cb movw r2, #459 @ 0x1cb 8019950: 491c ldr r1, [pc, #112] @ (80199c4 ) 8019952: 481d ldr r0, [pc, #116] @ (80199c8 ) 8019954: f010 f83a bl 80299cc LWIP_ASSERT("invalid pointer", old_addr != NULL); 8019958: 687b ldr r3, [r7, #4] 801995a: 2b00 cmp r3, #0 801995c: d106 bne.n 801996c 801995e: 4b18 ldr r3, [pc, #96] @ (80199c0 ) 8019960: f44f 72e6 mov.w r2, #460 @ 0x1cc 8019964: 4917 ldr r1, [pc, #92] @ (80199c4 ) 8019966: 4818 ldr r0, [pc, #96] @ (80199c8 ) 8019968: f010 f830 bl 80299cc /* address is actually being changed? */ if (ip4_addr_cmp(ipaddr, netif_ip4_addr(netif)) == 0) { 801996c: 68bb ldr r3, [r7, #8] 801996e: 681a ldr r2, [r3, #0] 8019970: 68fb ldr r3, [r7, #12] 8019972: 3304 adds r3, #4 8019974: 681b ldr r3, [r3, #0] 8019976: 429a cmp r2, r3 8019978: d01c beq.n 80199b4 ip_addr_t new_addr; *ip_2_ip4(&new_addr) = *ipaddr; 801997a: 68bb ldr r3, [r7, #8] 801997c: 681b ldr r3, [r3, #0] 801997e: 617b str r3, [r7, #20] IP_SET_TYPE_VAL(new_addr, IPADDR_TYPE_V4); ip_addr_copy(*old_addr, *netif_ip_addr4(netif)); 8019980: 68fb ldr r3, [r7, #12] 8019982: 3304 adds r3, #4 8019984: 681a ldr r2, [r3, #0] 8019986: 687b ldr r3, [r7, #4] 8019988: 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); 801998a: f107 0314 add.w r3, r7, #20 801998e: 4619 mov r1, r3 8019990: 6878 ldr r0, [r7, #4] 8019992: f7ff ffbf bl 8019914 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); 8019996: 68bb ldr r3, [r7, #8] 8019998: 2b00 cmp r3, #0 801999a: d002 beq.n 80199a2 801999c: 68bb ldr r3, [r7, #8] 801999e: 681b ldr r3, [r3, #0] 80199a0: e000 b.n 80199a4 80199a2: 2300 movs r3, #0 80199a4: 68fa ldr r2, [r7, #12] 80199a6: 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); 80199a8: 2101 movs r1, #1 80199aa: 68f8 ldr r0, [r7, #12] 80199ac: f000 f8d6 bl 8019b5c NETIF_STATUS_CALLBACK(netif); return 1; /* address changed */ 80199b0: 2301 movs r3, #1 80199b2: e000 b.n 80199b6 } return 0; /* address unchanged */ 80199b4: 2300 movs r3, #0 } 80199b6: 4618 mov r0, r3 80199b8: 3718 adds r7, #24 80199ba: 46bd mov sp, r7 80199bc: bd80 pop {r7, pc} 80199be: bf00 nop 80199c0: 0802de78 .word 0x0802de78 80199c4: 0802df90 .word 0x0802df90 80199c8: 0802dec8 .word 0x0802dec8 080199cc : } } static int netif_do_set_netmask(struct netif *netif, const ip4_addr_t *netmask, ip_addr_t *old_nm) { 80199cc: b480 push {r7} 80199ce: b085 sub sp, #20 80199d0: af00 add r7, sp, #0 80199d2: 60f8 str r0, [r7, #12] 80199d4: 60b9 str r1, [r7, #8] 80199d6: 607a str r2, [r7, #4] /* address is actually being changed? */ if (ip4_addr_cmp(netmask, netif_ip4_netmask(netif)) == 0) { 80199d8: 68bb ldr r3, [r7, #8] 80199da: 681a ldr r2, [r3, #0] 80199dc: 68fb ldr r3, [r7, #12] 80199de: 3308 adds r3, #8 80199e0: 681b ldr r3, [r3, #0] 80199e2: 429a cmp r2, r3 80199e4: d00a beq.n 80199fc #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); 80199e6: 68bb ldr r3, [r7, #8] 80199e8: 2b00 cmp r3, #0 80199ea: d002 beq.n 80199f2 80199ec: 68bb ldr r3, [r7, #8] 80199ee: 681b ldr r3, [r3, #0] 80199f0: e000 b.n 80199f4 80199f2: 2300 movs r3, #0 80199f4: 68fa ldr r2, [r7, #12] 80199f6: 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 */ 80199f8: 2301 movs r3, #1 80199fa: e000 b.n 80199fe } return 0; /* netmask unchanged */ 80199fc: 2300 movs r3, #0 } 80199fe: 4618 mov r0, r3 8019a00: 3714 adds r7, #20 8019a02: 46bd mov sp, r7 8019a04: f85d 7b04 ldr.w r7, [sp], #4 8019a08: 4770 bx lr 08019a0a : } } static int netif_do_set_gw(struct netif *netif, const ip4_addr_t *gw, ip_addr_t *old_gw) { 8019a0a: b480 push {r7} 8019a0c: b085 sub sp, #20 8019a0e: af00 add r7, sp, #0 8019a10: 60f8 str r0, [r7, #12] 8019a12: 60b9 str r1, [r7, #8] 8019a14: 607a str r2, [r7, #4] /* address is actually being changed? */ if (ip4_addr_cmp(gw, netif_ip4_gw(netif)) == 0) { 8019a16: 68bb ldr r3, [r7, #8] 8019a18: 681a ldr r2, [r3, #0] 8019a1a: 68fb ldr r3, [r7, #12] 8019a1c: 330c adds r3, #12 8019a1e: 681b ldr r3, [r3, #0] 8019a20: 429a cmp r2, r3 8019a22: d00a beq.n 8019a3a 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); 8019a24: 68bb ldr r3, [r7, #8] 8019a26: 2b00 cmp r3, #0 8019a28: d002 beq.n 8019a30 8019a2a: 68bb ldr r3, [r7, #8] 8019a2c: 681b ldr r3, [r3, #0] 8019a2e: e000 b.n 8019a32 8019a30: 2300 movs r3, #0 8019a32: 68fa ldr r2, [r7, #12] 8019a34: 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 */ 8019a36: 2301 movs r3, #1 8019a38: e000 b.n 8019a3c } return 0; /* gateway unchanged */ 8019a3a: 2300 movs r3, #0 } 8019a3c: 4618 mov r0, r3 8019a3e: 3714 adds r7, #20 8019a40: 46bd mov sp, r7 8019a42: f85d 7b04 ldr.w r7, [sp], #4 8019a46: 4770 bx lr 08019a48 : * @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) { 8019a48: b580 push {r7, lr} 8019a4a: b088 sub sp, #32 8019a4c: af00 add r7, sp, #0 8019a4e: 60f8 str r0, [r7, #12] 8019a50: 60b9 str r1, [r7, #8] 8019a52: 607a str r2, [r7, #4] 8019a54: 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; 8019a56: 2300 movs r3, #0 8019a58: 61fb str r3, [r7, #28] ip_addr_t *old_gw = NULL; 8019a5a: 2300 movs r3, #0 8019a5c: 61bb str r3, [r7, #24] #endif ip_addr_t old_addr; int remove; LWIP_ASSERT_CORE_LOCKED(); 8019a5e: f7f6 fd67 bl 8010530 /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ if (ipaddr == NULL) { 8019a62: 68bb ldr r3, [r7, #8] 8019a64: 2b00 cmp r3, #0 8019a66: d101 bne.n 8019a6c ipaddr = IP4_ADDR_ANY4; 8019a68: 4b1c ldr r3, [pc, #112] @ (8019adc ) 8019a6a: 60bb str r3, [r7, #8] } if (netmask == NULL) { 8019a6c: 687b ldr r3, [r7, #4] 8019a6e: 2b00 cmp r3, #0 8019a70: d101 bne.n 8019a76 netmask = IP4_ADDR_ANY4; 8019a72: 4b1a ldr r3, [pc, #104] @ (8019adc ) 8019a74: 607b str r3, [r7, #4] } if (gw == NULL) { 8019a76: 683b ldr r3, [r7, #0] 8019a78: 2b00 cmp r3, #0 8019a7a: d101 bne.n 8019a80 gw = IP4_ADDR_ANY4; 8019a7c: 4b17 ldr r3, [pc, #92] @ (8019adc ) 8019a7e: 603b str r3, [r7, #0] } remove = ip4_addr_isany(ipaddr); 8019a80: 68bb ldr r3, [r7, #8] 8019a82: 2b00 cmp r3, #0 8019a84: d003 beq.n 8019a8e 8019a86: 68bb ldr r3, [r7, #8] 8019a88: 681b ldr r3, [r3, #0] 8019a8a: 2b00 cmp r3, #0 8019a8c: d101 bne.n 8019a92 8019a8e: 2301 movs r3, #1 8019a90: e000 b.n 8019a94 8019a92: 2300 movs r3, #0 8019a94: 617b str r3, [r7, #20] if (remove) { 8019a96: 697b ldr r3, [r7, #20] 8019a98: 2b00 cmp r3, #0 8019a9a: d006 beq.n 8019aaa /* 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)) { 8019a9c: f107 0310 add.w r3, r7, #16 8019aa0: 461a mov r2, r3 8019aa2: 68b9 ldr r1, [r7, #8] 8019aa4: 68f8 ldr r0, [r7, #12] 8019aa6: f7ff ff47 bl 8019938 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)) { 8019aaa: 69fa ldr r2, [r7, #28] 8019aac: 6879 ldr r1, [r7, #4] 8019aae: 68f8 ldr r0, [r7, #12] 8019ab0: f7ff ff8c bl 80199cc #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)) { 8019ab4: 69ba ldr r2, [r7, #24] 8019ab6: 6839 ldr r1, [r7, #0] 8019ab8: 68f8 ldr r0, [r7, #12] 8019aba: f7ff ffa6 bl 8019a0a #if LWIP_NETIF_EXT_STATUS_CALLBACK change_reason |= LWIP_NSC_IPV4_GATEWAY_CHANGED; cb_args.ipv4_changed.old_gw = old_gw; #endif } if (!remove) { 8019abe: 697b ldr r3, [r7, #20] 8019ac0: 2b00 cmp r3, #0 8019ac2: d106 bne.n 8019ad2 /* set ipaddr last to ensure netmask/gw have been set when status callback is called */ if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) { 8019ac4: f107 0310 add.w r3, r7, #16 8019ac8: 461a mov r2, r3 8019aca: 68b9 ldr r1, [r7, #8] 8019acc: 68f8 ldr r0, [r7, #12] 8019ace: f7ff ff33 bl 8019938 if (change_reason != LWIP_NSC_NONE) { change_reason |= LWIP_NSC_IPV4_SETTINGS_CHANGED; netif_invoke_ext_callback(netif, change_reason, &cb_args); } #endif } 8019ad2: bf00 nop 8019ad4: 3720 adds r7, #32 8019ad6: 46bd mov sp, r7 8019ad8: bd80 pop {r7, pc} 8019ada: bf00 nop 8019adc: 08030c10 .word 0x08030c10 08019ae0 : * * @param netif the default network interface */ void netif_set_default(struct netif *netif) { 8019ae0: b580 push {r7, lr} 8019ae2: b082 sub sp, #8 8019ae4: af00 add r7, sp, #0 8019ae6: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 8019ae8: f7f6 fd22 bl 8010530 mib2_remove_route_ip4(1, netif); } else { /* install default route */ mib2_add_route_ip4(1, netif); } netif_default = netif; 8019aec: 4a03 ldr r2, [pc, #12] @ (8019afc ) 8019aee: 687b ldr r3, [r7, #4] 8019af0: 6013 str r3, [r2, #0] LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n", netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\'')); } 8019af2: bf00 nop 8019af4: 3708 adds r7, #8 8019af6: 46bd mov sp, r7 8019af8: bd80 pop {r7, pc} 8019afa: bf00 nop 8019afc: 2402ae80 .word 0x2402ae80 08019b00 : * Bring an interface up, available for processing * traffic. */ void netif_set_up(struct netif *netif) { 8019b00: b580 push {r7, lr} 8019b02: b082 sub sp, #8 8019b04: af00 add r7, sp, #0 8019b06: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 8019b08: f7f6 fd12 bl 8010530 LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return); 8019b0c: 687b ldr r3, [r7, #4] 8019b0e: 2b00 cmp r3, #0 8019b10: d107 bne.n 8019b22 8019b12: 4b0f ldr r3, [pc, #60] @ (8019b50 ) 8019b14: f44f 7254 mov.w r2, #848 @ 0x350 8019b18: 490e ldr r1, [pc, #56] @ (8019b54 ) 8019b1a: 480f ldr r0, [pc, #60] @ (8019b58 ) 8019b1c: f00f ff56 bl 80299cc 8019b20: e013 b.n 8019b4a if (!(netif->flags & NETIF_FLAG_UP)) { 8019b22: 687b ldr r3, [r7, #4] 8019b24: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8019b28: f003 0301 and.w r3, r3, #1 8019b2c: 2b00 cmp r3, #0 8019b2e: d10c bne.n 8019b4a netif_set_flags(netif, NETIF_FLAG_UP); 8019b30: 687b ldr r3, [r7, #4] 8019b32: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8019b36: f043 0301 orr.w r3, r3, #1 8019b3a: b2da uxtb r2, r3 8019b3c: 687b ldr r3, [r7, #4] 8019b3e: 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); 8019b42: 2103 movs r1, #3 8019b44: 6878 ldr r0, [r7, #4] 8019b46: f000 f809 bl 8019b5c #if LWIP_IPV6 nd6_restart_netif(netif); #endif /* LWIP_IPV6 */ } } 8019b4a: 3708 adds r7, #8 8019b4c: 46bd mov sp, r7 8019b4e: bd80 pop {r7, pc} 8019b50: 0802de78 .word 0x0802de78 8019b54: 0802e000 .word 0x0802e000 8019b58: 0802dec8 .word 0x0802dec8 08019b5c : /** 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) { 8019b5c: b580 push {r7, lr} 8019b5e: b082 sub sp, #8 8019b60: af00 add r7, sp, #0 8019b62: 6078 str r0, [r7, #4] 8019b64: 460b mov r3, r1 8019b66: 70fb strb r3, [r7, #3] LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL); 8019b68: 687b ldr r3, [r7, #4] 8019b6a: 2b00 cmp r3, #0 8019b6c: d106 bne.n 8019b7c 8019b6e: 4b18 ldr r3, [pc, #96] @ (8019bd0 ) 8019b70: f240 326d movw r2, #877 @ 0x36d 8019b74: 4917 ldr r1, [pc, #92] @ (8019bd4 ) 8019b76: 4818 ldr r0, [pc, #96] @ (8019bd8 ) 8019b78: f00f ff28 bl 80299cc /* Only send reports when both link and admin states are up */ if (!(netif->flags & NETIF_FLAG_LINK_UP) || 8019b7c: 687b ldr r3, [r7, #4] 8019b7e: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8019b82: f003 0304 and.w r3, r3, #4 8019b86: 2b00 cmp r3, #0 8019b88: d01e beq.n 8019bc8 !(netif->flags & NETIF_FLAG_UP)) { 8019b8a: 687b ldr r3, [r7, #4] 8019b8c: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8019b90: f003 0301 and.w r3, r3, #1 if (!(netif->flags & NETIF_FLAG_LINK_UP) || 8019b94: 2b00 cmp r3, #0 8019b96: d017 beq.n 8019bc8 return; } #if LWIP_IPV4 if ((report_type & NETIF_REPORT_TYPE_IPV4) && 8019b98: 78fb ldrb r3, [r7, #3] 8019b9a: f003 0301 and.w r3, r3, #1 8019b9e: 2b00 cmp r3, #0 8019ba0: d013 beq.n 8019bca !ip4_addr_isany_val(*netif_ip4_addr(netif))) { 8019ba2: 687b ldr r3, [r7, #4] 8019ba4: 3304 adds r3, #4 8019ba6: 681b ldr r3, [r3, #0] if ((report_type & NETIF_REPORT_TYPE_IPV4) && 8019ba8: 2b00 cmp r3, #0 8019baa: d00e beq.n 8019bca #if LWIP_ARP /* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */ if (netif->flags & (NETIF_FLAG_ETHARP)) { 8019bac: 687b ldr r3, [r7, #4] 8019bae: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8019bb2: f003 0308 and.w r3, r3, #8 8019bb6: 2b00 cmp r3, #0 8019bb8: d007 beq.n 8019bca etharp_gratuitous(netif); 8019bba: 687b ldr r3, [r7, #4] 8019bbc: 3304 adds r3, #4 8019bbe: 4619 mov r1, r3 8019bc0: 6878 ldr r0, [r7, #4] 8019bc2: f00a fd2b bl 802461c 8019bc6: e000 b.n 8019bca return; 8019bc8: bf00 nop /* send mld memberships */ mld6_report_groups(netif); #endif /* LWIP_IPV6_MLD */ } #endif /* LWIP_IPV6 */ } 8019bca: 3708 adds r7, #8 8019bcc: 46bd mov sp, r7 8019bce: bd80 pop {r7, pc} 8019bd0: 0802de78 .word 0x0802de78 8019bd4: 0802e01c .word 0x0802e01c 8019bd8: 0802dec8 .word 0x0802dec8 08019bdc : * @ingroup netif * Bring an interface down, disabling any traffic processing. */ void netif_set_down(struct netif *netif) { 8019bdc: b580 push {r7, lr} 8019bde: b082 sub sp, #8 8019be0: af00 add r7, sp, #0 8019be2: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 8019be4: f7f6 fca4 bl 8010530 LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return); 8019be8: 687b ldr r3, [r7, #4] 8019bea: 2b00 cmp r3, #0 8019bec: d107 bne.n 8019bfe 8019bee: 4b12 ldr r3, [pc, #72] @ (8019c38 ) 8019bf0: f240 329b movw r2, #923 @ 0x39b 8019bf4: 4911 ldr r1, [pc, #68] @ (8019c3c ) 8019bf6: 4812 ldr r0, [pc, #72] @ (8019c40 ) 8019bf8: f00f fee8 bl 80299cc 8019bfc: e019 b.n 8019c32 if (netif->flags & NETIF_FLAG_UP) { 8019bfe: 687b ldr r3, [r7, #4] 8019c00: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8019c04: f003 0301 and.w r3, r3, #1 8019c08: 2b00 cmp r3, #0 8019c0a: d012 beq.n 8019c32 args.status_changed.state = 0; netif_invoke_ext_callback(netif, LWIP_NSC_STATUS_CHANGED, &args); } #endif netif_clear_flags(netif, NETIF_FLAG_UP); 8019c0c: 687b ldr r3, [r7, #4] 8019c0e: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8019c12: f023 0301 bic.w r3, r3, #1 8019c16: b2da uxtb r2, r3 8019c18: 687b ldr r3, [r7, #4] 8019c1a: 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) { 8019c1e: 687b ldr r3, [r7, #4] 8019c20: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8019c24: f003 0308 and.w r3, r3, #8 8019c28: 2b00 cmp r3, #0 8019c2a: d002 beq.n 8019c32 etharp_cleanup_netif(netif); 8019c2c: 6878 ldr r0, [r7, #4] 8019c2e: f00a f8ab bl 8023d88 nd6_cleanup_netif(netif); #endif /* LWIP_IPV6 */ NETIF_STATUS_CALLBACK(netif); } } 8019c32: 3708 adds r7, #8 8019c34: 46bd mov sp, r7 8019c36: bd80 pop {r7, pc} 8019c38: 0802de78 .word 0x0802de78 8019c3c: 0802e040 .word 0x0802e040 8019c40: 0802dec8 .word 0x0802dec8 08019c44 : * @ingroup netif * Called by a driver when its link goes up */ void netif_set_link_up(struct netif *netif) { 8019c44: b580 push {r7, lr} 8019c46: b082 sub sp, #8 8019c48: af00 add r7, sp, #0 8019c4a: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 8019c4c: f7f6 fc70 bl 8010530 LWIP_ERROR("netif_set_link_up: invalid netif", netif != NULL, return); 8019c50: 687b ldr r3, [r7, #4] 8019c52: 2b00 cmp r3, #0 8019c54: d107 bne.n 8019c66 8019c56: 4b15 ldr r3, [pc, #84] @ (8019cac ) 8019c58: f44f 7278 mov.w r2, #992 @ 0x3e0 8019c5c: 4914 ldr r1, [pc, #80] @ (8019cb0 ) 8019c5e: 4815 ldr r0, [pc, #84] @ (8019cb4 ) 8019c60: f00f feb4 bl 80299cc 8019c64: e01e b.n 8019ca4 if (!(netif->flags & NETIF_FLAG_LINK_UP)) { 8019c66: 687b ldr r3, [r7, #4] 8019c68: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8019c6c: f003 0304 and.w r3, r3, #4 8019c70: 2b00 cmp r3, #0 8019c72: d117 bne.n 8019ca4 netif_set_flags(netif, NETIF_FLAG_LINK_UP); 8019c74: 687b ldr r3, [r7, #4] 8019c76: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8019c7a: f043 0304 orr.w r3, r3, #4 8019c7e: b2da uxtb r2, r3 8019c80: 687b ldr r3, [r7, #4] 8019c82: f883 2031 strb.w r2, [r3, #49] @ 0x31 #if LWIP_DHCP dhcp_network_changed(netif); 8019c86: 6878 ldr r0, [r7, #4] 8019c88: f008 faaa bl 80221e0 #if LWIP_AUTOIP autoip_network_changed(netif); #endif /* LWIP_AUTOIP */ netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6); 8019c8c: 2103 movs r1, #3 8019c8e: 6878 ldr r0, [r7, #4] 8019c90: f7ff ff64 bl 8019b5c #if LWIP_IPV6 nd6_restart_netif(netif); #endif /* LWIP_IPV6 */ NETIF_LINK_CALLBACK(netif); 8019c94: 687b ldr r3, [r7, #4] 8019c96: 69db ldr r3, [r3, #28] 8019c98: 2b00 cmp r3, #0 8019c9a: d003 beq.n 8019ca4 8019c9c: 687b ldr r3, [r7, #4] 8019c9e: 69db ldr r3, [r3, #28] 8019ca0: 6878 ldr r0, [r7, #4] 8019ca2: 4798 blx r3 args.link_changed.state = 1; netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args); } #endif } } 8019ca4: 3708 adds r7, #8 8019ca6: 46bd mov sp, r7 8019ca8: bd80 pop {r7, pc} 8019caa: bf00 nop 8019cac: 0802de78 .word 0x0802de78 8019cb0: 0802e060 .word 0x0802e060 8019cb4: 0802dec8 .word 0x0802dec8 08019cb8 : * @ingroup netif * Called by a driver when its link goes down */ void netif_set_link_down(struct netif *netif) { 8019cb8: b580 push {r7, lr} 8019cba: b082 sub sp, #8 8019cbc: af00 add r7, sp, #0 8019cbe: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 8019cc0: f7f6 fc36 bl 8010530 LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return); 8019cc4: 687b ldr r3, [r7, #4] 8019cc6: 2b00 cmp r3, #0 8019cc8: d107 bne.n 8019cda 8019cca: 4b11 ldr r3, [pc, #68] @ (8019d10 ) 8019ccc: f240 4206 movw r2, #1030 @ 0x406 8019cd0: 4910 ldr r1, [pc, #64] @ (8019d14 ) 8019cd2: 4811 ldr r0, [pc, #68] @ (8019d18 ) 8019cd4: f00f fe7a bl 80299cc 8019cd8: e017 b.n 8019d0a if (netif->flags & NETIF_FLAG_LINK_UP) { 8019cda: 687b ldr r3, [r7, #4] 8019cdc: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8019ce0: f003 0304 and.w r3, r3, #4 8019ce4: 2b00 cmp r3, #0 8019ce6: d010 beq.n 8019d0a netif_clear_flags(netif, NETIF_FLAG_LINK_UP); 8019ce8: 687b ldr r3, [r7, #4] 8019cea: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8019cee: f023 0304 bic.w r3, r3, #4 8019cf2: b2da uxtb r2, r3 8019cf4: 687b ldr r3, [r7, #4] 8019cf6: f883 2031 strb.w r2, [r3, #49] @ 0x31 NETIF_LINK_CALLBACK(netif); 8019cfa: 687b ldr r3, [r7, #4] 8019cfc: 69db ldr r3, [r3, #28] 8019cfe: 2b00 cmp r3, #0 8019d00: d003 beq.n 8019d0a 8019d02: 687b ldr r3, [r7, #4] 8019d04: 69db ldr r3, [r3, #28] 8019d06: 6878 ldr r0, [r7, #4] 8019d08: 4798 blx r3 args.link_changed.state = 0; netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args); } #endif } } 8019d0a: 3708 adds r7, #8 8019d0c: 46bd mov sp, r7 8019d0e: bd80 pop {r7, pc} 8019d10: 0802de78 .word 0x0802de78 8019d14: 0802e084 .word 0x0802e084 8019d18: 0802dec8 .word 0x0802dec8 08019d1c : * @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) { 8019d1c: b580 push {r7, lr} 8019d1e: b082 sub sp, #8 8019d20: af00 add r7, sp, #0 8019d22: 6078 str r0, [r7, #4] 8019d24: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 8019d26: f7f6 fc03 bl 8010530 if (netif) { 8019d2a: 687b ldr r3, [r7, #4] 8019d2c: 2b00 cmp r3, #0 8019d2e: d002 beq.n 8019d36 netif->link_callback = link_callback; 8019d30: 687b ldr r3, [r7, #4] 8019d32: 683a ldr r2, [r7, #0] 8019d34: 61da str r2, [r3, #28] } } 8019d36: bf00 nop 8019d38: 3708 adds r7, #8 8019d3a: 46bd mov sp, r7 8019d3c: bd80 pop {r7, pc} 08019d3e : #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) { 8019d3e: b480 push {r7} 8019d40: b085 sub sp, #20 8019d42: af00 add r7, sp, #0 8019d44: 60f8 str r0, [r7, #12] 8019d46: 60b9 str r1, [r7, #8] 8019d48: 607a str r2, [r7, #4] LWIP_UNUSED_ARG(netif); LWIP_UNUSED_ARG(p); LWIP_UNUSED_ARG(ipaddr); return ERR_IF; 8019d4a: f06f 030b mvn.w r3, #11 } 8019d4e: 4618 mov r0, r3 8019d50: 3714 adds r7, #20 8019d52: 46bd mov sp, r7 8019d54: f85d 7b04 ldr.w r7, [sp], #4 8019d58: 4770 bx lr ... 08019d5c : * * @param idx index of netif to find */ struct netif * netif_get_by_index(u8_t idx) { 8019d5c: b580 push {r7, lr} 8019d5e: b084 sub sp, #16 8019d60: af00 add r7, sp, #0 8019d62: 4603 mov r3, r0 8019d64: 71fb strb r3, [r7, #7] struct netif *netif; LWIP_ASSERT_CORE_LOCKED(); 8019d66: f7f6 fbe3 bl 8010530 if (idx != NETIF_NO_INDEX) { 8019d6a: 79fb ldrb r3, [r7, #7] 8019d6c: 2b00 cmp r3, #0 8019d6e: d013 beq.n 8019d98 NETIF_FOREACH(netif) { 8019d70: 4b0c ldr r3, [pc, #48] @ (8019da4 ) 8019d72: 681b ldr r3, [r3, #0] 8019d74: 60fb str r3, [r7, #12] 8019d76: e00c b.n 8019d92 if (idx == netif_get_index(netif)) { 8019d78: 68fb ldr r3, [r7, #12] 8019d7a: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8019d7e: 3301 adds r3, #1 8019d80: b2db uxtb r3, r3 8019d82: 79fa ldrb r2, [r7, #7] 8019d84: 429a cmp r2, r3 8019d86: d101 bne.n 8019d8c return netif; /* found! */ 8019d88: 68fb ldr r3, [r7, #12] 8019d8a: e006 b.n 8019d9a NETIF_FOREACH(netif) { 8019d8c: 68fb ldr r3, [r7, #12] 8019d8e: 681b ldr r3, [r3, #0] 8019d90: 60fb str r3, [r7, #12] 8019d92: 68fb ldr r3, [r7, #12] 8019d94: 2b00 cmp r3, #0 8019d96: d1ef bne.n 8019d78 } } } return NULL; 8019d98: 2300 movs r3, #0 } 8019d9a: 4618 mov r0, r3 8019d9c: 3710 adds r7, #16 8019d9e: 46bd mov sp, r7 8019da0: bd80 pop {r7, pc} 8019da2: bf00 nop 8019da4: 2402ae7c .word 0x2402ae7c 08019da8 : #if !NO_SYS static #endif /* !NO_SYS */ void pbuf_free_ooseq(void) { 8019da8: b580 push {r7, lr} 8019daa: b082 sub sp, #8 8019dac: af00 add r7, sp, #0 struct tcp_pcb *pcb; SYS_ARCH_SET(pbuf_free_ooseq_pending, 0); 8019dae: f00c fb77 bl 80264a0 8019db2: 6038 str r0, [r7, #0] 8019db4: 4b0d ldr r3, [pc, #52] @ (8019dec ) 8019db6: 2200 movs r2, #0 8019db8: 701a strb r2, [r3, #0] 8019dba: 6838 ldr r0, [r7, #0] 8019dbc: f00c fb7e bl 80264bc for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) { 8019dc0: 4b0b ldr r3, [pc, #44] @ (8019df0 ) 8019dc2: 681b ldr r3, [r3, #0] 8019dc4: 607b str r3, [r7, #4] 8019dc6: e00a b.n 8019dde if (pcb->ooseq != NULL) { 8019dc8: 687b ldr r3, [r7, #4] 8019dca: 6f5b ldr r3, [r3, #116] @ 0x74 8019dcc: 2b00 cmp r3, #0 8019dce: d003 beq.n 8019dd8 /** 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); 8019dd0: 6878 ldr r0, [r7, #4] 8019dd2: f002 fc55 bl 801c680 return; 8019dd6: e005 b.n 8019de4 for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) { 8019dd8: 687b ldr r3, [r7, #4] 8019dda: 68db ldr r3, [r3, #12] 8019ddc: 607b str r3, [r7, #4] 8019dde: 687b ldr r3, [r7, #4] 8019de0: 2b00 cmp r3, #0 8019de2: d1f1 bne.n 8019dc8 } } } 8019de4: 3708 adds r7, #8 8019de6: 46bd mov sp, r7 8019de8: bd80 pop {r7, pc} 8019dea: bf00 nop 8019dec: 2402ae85 .word 0x2402ae85 8019df0: 2402ae94 .word 0x2402ae94 08019df4 : /** * Just a callback function for tcpip_callback() that calls pbuf_free_ooseq(). */ static void pbuf_free_ooseq_callback(void *arg) { 8019df4: b580 push {r7, lr} 8019df6: b082 sub sp, #8 8019df8: af00 add r7, sp, #0 8019dfa: 6078 str r0, [r7, #4] LWIP_UNUSED_ARG(arg); pbuf_free_ooseq(); 8019dfc: f7ff ffd4 bl 8019da8 } 8019e00: bf00 nop 8019e02: 3708 adds r7, #8 8019e04: 46bd mov sp, r7 8019e06: bd80 pop {r7, pc} 08019e08 : #endif /* !NO_SYS */ /** Queue a call to pbuf_free_ooseq if not already queued. */ static void pbuf_pool_is_empty(void) { 8019e08: b580 push {r7, lr} 8019e0a: b082 sub sp, #8 8019e0c: 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); 8019e0e: f00c fb47 bl 80264a0 8019e12: 6078 str r0, [r7, #4] queued = pbuf_free_ooseq_pending; 8019e14: 4b0f ldr r3, [pc, #60] @ (8019e54 ) 8019e16: 781b ldrb r3, [r3, #0] 8019e18: 70fb strb r3, [r7, #3] pbuf_free_ooseq_pending = 1; 8019e1a: 4b0e ldr r3, [pc, #56] @ (8019e54 ) 8019e1c: 2201 movs r2, #1 8019e1e: 701a strb r2, [r3, #0] SYS_ARCH_UNPROTECT(old_level); 8019e20: 6878 ldr r0, [r7, #4] 8019e22: f00c fb4b bl 80264bc if (!queued) { 8019e26: 78fb ldrb r3, [r7, #3] 8019e28: 2b00 cmp r3, #0 8019e2a: d10f bne.n 8019e4c /* queue a call to pbuf_free_ooseq if not already queued */ PBUF_POOL_FREE_OOSEQ_QUEUE_CALL(); 8019e2c: 2100 movs r1, #0 8019e2e: 480a ldr r0, [pc, #40] @ (8019e58 ) 8019e30: f7fe fdd6 bl 80189e0 8019e34: 4603 mov r3, r0 8019e36: 2b00 cmp r3, #0 8019e38: d008 beq.n 8019e4c 8019e3a: f00c fb31 bl 80264a0 8019e3e: 6078 str r0, [r7, #4] 8019e40: 4b04 ldr r3, [pc, #16] @ (8019e54 ) 8019e42: 2200 movs r2, #0 8019e44: 701a strb r2, [r3, #0] 8019e46: 6878 ldr r0, [r7, #4] 8019e48: f00c fb38 bl 80264bc } #endif /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */ } 8019e4c: bf00 nop 8019e4e: 3708 adds r7, #8 8019e50: 46bd mov sp, r7 8019e52: bd80 pop {r7, pc} 8019e54: 2402ae85 .word 0x2402ae85 8019e58: 08019df5 .word 0x08019df5 08019e5c : #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) { 8019e5c: b480 push {r7} 8019e5e: b085 sub sp, #20 8019e60: af00 add r7, sp, #0 8019e62: 60f8 str r0, [r7, #12] 8019e64: 60b9 str r1, [r7, #8] 8019e66: 4611 mov r1, r2 8019e68: 461a mov r2, r3 8019e6a: 460b mov r3, r1 8019e6c: 80fb strh r3, [r7, #6] 8019e6e: 4613 mov r3, r2 8019e70: 80bb strh r3, [r7, #4] p->next = NULL; 8019e72: 68fb ldr r3, [r7, #12] 8019e74: 2200 movs r2, #0 8019e76: 601a str r2, [r3, #0] p->payload = payload; 8019e78: 68fb ldr r3, [r7, #12] 8019e7a: 68ba ldr r2, [r7, #8] 8019e7c: 605a str r2, [r3, #4] p->tot_len = tot_len; 8019e7e: 68fb ldr r3, [r7, #12] 8019e80: 88fa ldrh r2, [r7, #6] 8019e82: 811a strh r2, [r3, #8] p->len = len; 8019e84: 68fb ldr r3, [r7, #12] 8019e86: 88ba ldrh r2, [r7, #4] 8019e88: 815a strh r2, [r3, #10] p->type_internal = (u8_t)type; 8019e8a: 8b3b ldrh r3, [r7, #24] 8019e8c: b2da uxtb r2, r3 8019e8e: 68fb ldr r3, [r7, #12] 8019e90: 731a strb r2, [r3, #12] p->flags = flags; 8019e92: 68fb ldr r3, [r7, #12] 8019e94: 7f3a ldrb r2, [r7, #28] 8019e96: 735a strb r2, [r3, #13] p->ref = 1; 8019e98: 68fb ldr r3, [r7, #12] 8019e9a: 2201 movs r2, #1 8019e9c: 739a strb r2, [r3, #14] p->if_idx = NETIF_NO_INDEX; 8019e9e: 68fb ldr r3, [r7, #12] 8019ea0: 2200 movs r2, #0 8019ea2: 73da strb r2, [r3, #15] } 8019ea4: bf00 nop 8019ea6: 3714 adds r7, #20 8019ea8: 46bd mov sp, r7 8019eaa: f85d 7b04 ldr.w r7, [sp], #4 8019eae: 4770 bx lr 08019eb0 : * @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) { 8019eb0: b580 push {r7, lr} 8019eb2: b08c sub sp, #48 @ 0x30 8019eb4: af02 add r7, sp, #8 8019eb6: 4603 mov r3, r0 8019eb8: 71fb strb r3, [r7, #7] 8019eba: 460b mov r3, r1 8019ebc: 80bb strh r3, [r7, #4] 8019ebe: 4613 mov r3, r2 8019ec0: 807b strh r3, [r7, #2] struct pbuf *p; u16_t offset = (u16_t)layer; 8019ec2: 79fb ldrb r3, [r7, #7] 8019ec4: 847b strh r3, [r7, #34] @ 0x22 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length)); switch (type) { 8019ec6: 887b ldrh r3, [r7, #2] 8019ec8: f5b3 7f20 cmp.w r3, #640 @ 0x280 8019ecc: f000 8082 beq.w 8019fd4 8019ed0: f5b3 7f20 cmp.w r3, #640 @ 0x280 8019ed4: f300 80c9 bgt.w 801a06a 8019ed8: f5b3 7fc1 cmp.w r3, #386 @ 0x182 8019edc: d010 beq.n 8019f00 8019ede: f5b3 7fc1 cmp.w r3, #386 @ 0x182 8019ee2: f300 80c2 bgt.w 801a06a 8019ee6: 2b01 cmp r3, #1 8019ee8: d002 beq.n 8019ef0 8019eea: 2b41 cmp r3, #65 @ 0x41 8019eec: f040 80bd bne.w 801a06a case PBUF_REF: /* fall through */ case PBUF_ROM: p = pbuf_alloc_reference(NULL, length, type); 8019ef0: 887a ldrh r2, [r7, #2] 8019ef2: 88bb ldrh r3, [r7, #4] 8019ef4: 4619 mov r1, r3 8019ef6: 2000 movs r0, #0 8019ef8: f000 f8d2 bl 801a0a0 8019efc: 6278 str r0, [r7, #36] @ 0x24 break; 8019efe: e0be b.n 801a07e case PBUF_POOL: { struct pbuf *q, *last; u16_t rem_len; /* remaining length */ p = NULL; 8019f00: 2300 movs r3, #0 8019f02: 627b str r3, [r7, #36] @ 0x24 last = NULL; 8019f04: 2300 movs r3, #0 8019f06: 61fb str r3, [r7, #28] rem_len = length; 8019f08: 88bb ldrh r3, [r7, #4] 8019f0a: 837b strh r3, [r7, #26] do { u16_t qlen; q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 8019f0c: 200c movs r0, #12 8019f0e: f7ff fb81 bl 8019614 8019f12: 6138 str r0, [r7, #16] if (q == NULL) { 8019f14: 693b ldr r3, [r7, #16] 8019f16: 2b00 cmp r3, #0 8019f18: d109 bne.n 8019f2e PBUF_POOL_IS_EMPTY(); 8019f1a: f7ff ff75 bl 8019e08 /* free chain so far allocated */ if (p) { 8019f1e: 6a7b ldr r3, [r7, #36] @ 0x24 8019f20: 2b00 cmp r3, #0 8019f22: d002 beq.n 8019f2a pbuf_free(p); 8019f24: 6a78 ldr r0, [r7, #36] @ 0x24 8019f26: f000 fad9 bl 801a4dc } /* bail out unsuccessfully */ return NULL; 8019f2a: 2300 movs r3, #0 8019f2c: e0a8 b.n 801a080 } qlen = LWIP_MIN(rem_len, (u16_t)(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset))); 8019f2e: 8c7b ldrh r3, [r7, #34] @ 0x22 8019f30: 3303 adds r3, #3 8019f32: b29b uxth r3, r3 8019f34: f023 0303 bic.w r3, r3, #3 8019f38: b29a uxth r2, r3 8019f3a: f240 53ec movw r3, #1516 @ 0x5ec 8019f3e: 1a9b subs r3, r3, r2 8019f40: b29b uxth r3, r3 8019f42: 8b7a ldrh r2, [r7, #26] 8019f44: 4293 cmp r3, r2 8019f46: bf28 it cs 8019f48: 4613 movcs r3, r2 8019f4a: 81fb strh r3, [r7, #14] pbuf_init_alloced_pbuf(q, LWIP_MEM_ALIGN((void *)((u8_t *)q + SIZEOF_STRUCT_PBUF + offset)), 8019f4c: 8c7b ldrh r3, [r7, #34] @ 0x22 8019f4e: 3310 adds r3, #16 8019f50: 693a ldr r2, [r7, #16] 8019f52: 4413 add r3, r2 8019f54: 3303 adds r3, #3 8019f56: f023 0303 bic.w r3, r3, #3 8019f5a: 4618 mov r0, r3 8019f5c: 89f9 ldrh r1, [r7, #14] 8019f5e: 8b7a ldrh r2, [r7, #26] 8019f60: 2300 movs r3, #0 8019f62: 9301 str r3, [sp, #4] 8019f64: 887b ldrh r3, [r7, #2] 8019f66: 9300 str r3, [sp, #0] 8019f68: 460b mov r3, r1 8019f6a: 4601 mov r1, r0 8019f6c: 6938 ldr r0, [r7, #16] 8019f6e: f7ff ff75 bl 8019e5c rem_len, qlen, type, 0); LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", 8019f72: 693b ldr r3, [r7, #16] 8019f74: 685b ldr r3, [r3, #4] 8019f76: f003 0303 and.w r3, r3, #3 8019f7a: 2b00 cmp r3, #0 8019f7c: d006 beq.n 8019f8c 8019f7e: 4b42 ldr r3, [pc, #264] @ (801a088 ) 8019f80: f44f 7280 mov.w r2, #256 @ 0x100 8019f84: 4941 ldr r1, [pc, #260] @ (801a08c ) 8019f86: 4842 ldr r0, [pc, #264] @ (801a090 ) 8019f88: f00f fd20 bl 80299cc ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", 8019f8c: 8c7b ldrh r3, [r7, #34] @ 0x22 8019f8e: 3303 adds r3, #3 8019f90: f023 0303 bic.w r3, r3, #3 8019f94: f240 52ec movw r2, #1516 @ 0x5ec 8019f98: 4293 cmp r3, r2 8019f9a: d106 bne.n 8019faa 8019f9c: 4b3a ldr r3, [pc, #232] @ (801a088 ) 8019f9e: f44f 7281 mov.w r2, #258 @ 0x102 8019fa2: 493c ldr r1, [pc, #240] @ (801a094 ) 8019fa4: 483a ldr r0, [pc, #232] @ (801a090 ) 8019fa6: f00f fd11 bl 80299cc (PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 ); if (p == NULL) { 8019faa: 6a7b ldr r3, [r7, #36] @ 0x24 8019fac: 2b00 cmp r3, #0 8019fae: d102 bne.n 8019fb6 /* allocated head of pbuf chain (into p) */ p = q; 8019fb0: 693b ldr r3, [r7, #16] 8019fb2: 627b str r3, [r7, #36] @ 0x24 8019fb4: e002 b.n 8019fbc } else { /* make previous pbuf point to this pbuf */ last->next = q; 8019fb6: 69fb ldr r3, [r7, #28] 8019fb8: 693a ldr r2, [r7, #16] 8019fba: 601a str r2, [r3, #0] } last = q; 8019fbc: 693b ldr r3, [r7, #16] 8019fbe: 61fb str r3, [r7, #28] rem_len = (u16_t)(rem_len - qlen); 8019fc0: 8b7a ldrh r2, [r7, #26] 8019fc2: 89fb ldrh r3, [r7, #14] 8019fc4: 1ad3 subs r3, r2, r3 8019fc6: 837b strh r3, [r7, #26] offset = 0; 8019fc8: 2300 movs r3, #0 8019fca: 847b strh r3, [r7, #34] @ 0x22 } while (rem_len > 0); 8019fcc: 8b7b ldrh r3, [r7, #26] 8019fce: 2b00 cmp r3, #0 8019fd0: d19c bne.n 8019f0c break; 8019fd2: e054 b.n 801a07e } case PBUF_RAM: { u16_t payload_len = (u16_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length)); 8019fd4: 8c7b ldrh r3, [r7, #34] @ 0x22 8019fd6: 3303 adds r3, #3 8019fd8: b29b uxth r3, r3 8019fda: f023 0303 bic.w r3, r3, #3 8019fde: b29a uxth r2, r3 8019fe0: 88bb ldrh r3, [r7, #4] 8019fe2: 3303 adds r3, #3 8019fe4: b29b uxth r3, r3 8019fe6: f023 0303 bic.w r3, r3, #3 8019fea: b29b uxth r3, r3 8019fec: 4413 add r3, r2 8019fee: 833b strh r3, [r7, #24] mem_size_t alloc_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF) + payload_len); 8019ff0: 8b3b ldrh r3, [r7, #24] 8019ff2: 3310 adds r3, #16 8019ff4: 617b str r3, [r7, #20] /* bug #50040: Check for integer overflow when calculating alloc_len */ if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) || 8019ff6: 8b3a ldrh r2, [r7, #24] 8019ff8: 88bb ldrh r3, [r7, #4] 8019ffa: 3303 adds r3, #3 8019ffc: f023 0303 bic.w r3, r3, #3 801a000: 429a cmp r2, r3 801a002: d306 bcc.n 801a012 (alloc_len < LWIP_MEM_ALIGN_SIZE(length))) { 801a004: 88bb ldrh r3, [r7, #4] 801a006: 3303 adds r3, #3 801a008: f023 0303 bic.w r3, r3, #3 if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) || 801a00c: 697a ldr r2, [r7, #20] 801a00e: 429a cmp r2, r3 801a010: d201 bcs.n 801a016 return NULL; 801a012: 2300 movs r3, #0 801a014: e034 b.n 801a080 } /* If pbuf is to be allocated in RAM, allocate memory for it. */ p = (struct pbuf *)mem_malloc(alloc_len); 801a016: 6978 ldr r0, [r7, #20] 801a018: f7ff f960 bl 80192dc 801a01c: 6278 str r0, [r7, #36] @ 0x24 if (p == NULL) { 801a01e: 6a7b ldr r3, [r7, #36] @ 0x24 801a020: 2b00 cmp r3, #0 801a022: d101 bne.n 801a028 return NULL; 801a024: 2300 movs r3, #0 801a026: e02b b.n 801a080 } pbuf_init_alloced_pbuf(p, LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)), 801a028: 8c7b ldrh r3, [r7, #34] @ 0x22 801a02a: 3310 adds r3, #16 801a02c: 6a7a ldr r2, [r7, #36] @ 0x24 801a02e: 4413 add r3, r2 801a030: 3303 adds r3, #3 801a032: f023 0303 bic.w r3, r3, #3 801a036: 4618 mov r0, r3 801a038: 88b9 ldrh r1, [r7, #4] 801a03a: 88ba ldrh r2, [r7, #4] 801a03c: 2300 movs r3, #0 801a03e: 9301 str r3, [sp, #4] 801a040: 887b ldrh r3, [r7, #2] 801a042: 9300 str r3, [sp, #0] 801a044: 460b mov r3, r1 801a046: 4601 mov r1, r0 801a048: 6a78 ldr r0, [r7, #36] @ 0x24 801a04a: f7ff ff07 bl 8019e5c length, length, type, 0); LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned", 801a04e: 6a7b ldr r3, [r7, #36] @ 0x24 801a050: 685b ldr r3, [r3, #4] 801a052: f003 0303 and.w r3, r3, #3 801a056: 2b00 cmp r3, #0 801a058: d010 beq.n 801a07c 801a05a: 4b0b ldr r3, [pc, #44] @ (801a088 ) 801a05c: f44f 7291 mov.w r2, #290 @ 0x122 801a060: 490d ldr r1, [pc, #52] @ (801a098 ) 801a062: 480b ldr r0, [pc, #44] @ (801a090 ) 801a064: f00f fcb2 bl 80299cc ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); break; 801a068: e008 b.n 801a07c } default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); 801a06a: 4b07 ldr r3, [pc, #28] @ (801a088 ) 801a06c: f240 1227 movw r2, #295 @ 0x127 801a070: 490a ldr r1, [pc, #40] @ (801a09c ) 801a072: 4807 ldr r0, [pc, #28] @ (801a090 ) 801a074: f00f fcaa bl 80299cc return NULL; 801a078: 2300 movs r3, #0 801a07a: e001 b.n 801a080 break; 801a07c: bf00 nop } LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); return p; 801a07e: 6a7b ldr r3, [r7, #36] @ 0x24 } 801a080: 4618 mov r0, r3 801a082: 3728 adds r7, #40 @ 0x28 801a084: 46bd mov sp, r7 801a086: bd80 pop {r7, pc} 801a088: 0802e0a8 .word 0x0802e0a8 801a08c: 0802e0d8 .word 0x0802e0d8 801a090: 0802e108 .word 0x0802e108 801a094: 0802e130 .word 0x0802e130 801a098: 0802e164 .word 0x0802e164 801a09c: 0802e190 .word 0x0802e190 0801a0a0 : * * @return the allocated pbuf. */ struct pbuf * pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type) { 801a0a0: b580 push {r7, lr} 801a0a2: b086 sub sp, #24 801a0a4: af02 add r7, sp, #8 801a0a6: 6078 str r0, [r7, #4] 801a0a8: 460b mov r3, r1 801a0aa: 807b strh r3, [r7, #2] 801a0ac: 4613 mov r3, r2 801a0ae: 803b strh r3, [r7, #0] struct pbuf *p; LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM)); 801a0b0: 883b ldrh r3, [r7, #0] 801a0b2: 2b41 cmp r3, #65 @ 0x41 801a0b4: d009 beq.n 801a0ca 801a0b6: 883b ldrh r3, [r7, #0] 801a0b8: 2b01 cmp r3, #1 801a0ba: d006 beq.n 801a0ca 801a0bc: 4b0f ldr r3, [pc, #60] @ (801a0fc ) 801a0be: f44f 72a5 mov.w r2, #330 @ 0x14a 801a0c2: 490f ldr r1, [pc, #60] @ (801a100 ) 801a0c4: 480f ldr r0, [pc, #60] @ (801a104 ) 801a0c6: f00f fc81 bl 80299cc /* only allocate memory for the pbuf structure */ p = (struct pbuf *)memp_malloc(MEMP_PBUF); 801a0ca: 200b movs r0, #11 801a0cc: f7ff faa2 bl 8019614 801a0d0: 60f8 str r0, [r7, #12] if (p == NULL) { 801a0d2: 68fb ldr r3, [r7, #12] 801a0d4: 2b00 cmp r3, #0 801a0d6: d101 bne.n 801a0dc 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; 801a0d8: 2300 movs r3, #0 801a0da: e00b b.n 801a0f4 } pbuf_init_alloced_pbuf(p, payload, length, length, type, 0); 801a0dc: 8879 ldrh r1, [r7, #2] 801a0de: 887a ldrh r2, [r7, #2] 801a0e0: 2300 movs r3, #0 801a0e2: 9301 str r3, [sp, #4] 801a0e4: 883b ldrh r3, [r7, #0] 801a0e6: 9300 str r3, [sp, #0] 801a0e8: 460b mov r3, r1 801a0ea: 6879 ldr r1, [r7, #4] 801a0ec: 68f8 ldr r0, [r7, #12] 801a0ee: f7ff feb5 bl 8019e5c return p; 801a0f2: 68fb ldr r3, [r7, #12] } 801a0f4: 4618 mov r0, r3 801a0f6: 3710 adds r7, #16 801a0f8: 46bd mov sp, r7 801a0fa: bd80 pop {r7, pc} 801a0fc: 0802e0a8 .word 0x0802e0a8 801a100: 0802e1ac .word 0x0802e1ac 801a104: 0802e108 .word 0x0802e108 0801a108 : * 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) { 801a108: b580 push {r7, lr} 801a10a: b088 sub sp, #32 801a10c: af02 add r7, sp, #8 801a10e: 607b str r3, [r7, #4] 801a110: 4603 mov r3, r0 801a112: 73fb strb r3, [r7, #15] 801a114: 460b mov r3, r1 801a116: 81bb strh r3, [r7, #12] 801a118: 4613 mov r3, r2 801a11a: 817b strh r3, [r7, #10] u16_t offset = (u16_t)l; 801a11c: 7bfb ldrb r3, [r7, #15] 801a11e: 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) { 801a120: 8a7b ldrh r3, [r7, #18] 801a122: 3303 adds r3, #3 801a124: f023 0203 bic.w r2, r3, #3 801a128: 89bb ldrh r3, [r7, #12] 801a12a: 441a add r2, r3 801a12c: 8cbb ldrh r3, [r7, #36] @ 0x24 801a12e: 429a cmp r2, r3 801a130: d901 bls.n 801a136 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_WARNING, ("pbuf_alloced_custom(length=%"U16_F") buffer too short\n", length)); return NULL; 801a132: 2300 movs r3, #0 801a134: e018 b.n 801a168 } if (payload_mem != NULL) { 801a136: 6a3b ldr r3, [r7, #32] 801a138: 2b00 cmp r3, #0 801a13a: d007 beq.n 801a14c payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset); 801a13c: 8a7b ldrh r3, [r7, #18] 801a13e: 3303 adds r3, #3 801a140: f023 0303 bic.w r3, r3, #3 801a144: 6a3a ldr r2, [r7, #32] 801a146: 4413 add r3, r2 801a148: 617b str r3, [r7, #20] 801a14a: e001 b.n 801a150 } else { payload = NULL; 801a14c: 2300 movs r3, #0 801a14e: 617b str r3, [r7, #20] } pbuf_init_alloced_pbuf(&p->pbuf, payload, length, length, type, PBUF_FLAG_IS_CUSTOM); 801a150: 6878 ldr r0, [r7, #4] 801a152: 89b9 ldrh r1, [r7, #12] 801a154: 89ba ldrh r2, [r7, #12] 801a156: 2302 movs r3, #2 801a158: 9301 str r3, [sp, #4] 801a15a: 897b ldrh r3, [r7, #10] 801a15c: 9300 str r3, [sp, #0] 801a15e: 460b mov r3, r1 801a160: 6979 ldr r1, [r7, #20] 801a162: f7ff fe7b bl 8019e5c return &p->pbuf; 801a166: 687b ldr r3, [r7, #4] } 801a168: 4618 mov r0, r3 801a16a: 3718 adds r7, #24 801a16c: 46bd mov sp, r7 801a16e: bd80 pop {r7, pc} 0801a170 : * * @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain). */ void pbuf_realloc(struct pbuf *p, u16_t new_len) { 801a170: b580 push {r7, lr} 801a172: b084 sub sp, #16 801a174: af00 add r7, sp, #0 801a176: 6078 str r0, [r7, #4] 801a178: 460b mov r3, r1 801a17a: 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); 801a17c: 687b ldr r3, [r7, #4] 801a17e: 2b00 cmp r3, #0 801a180: d106 bne.n 801a190 801a182: 4b39 ldr r3, [pc, #228] @ (801a268 ) 801a184: f44f 72cc mov.w r2, #408 @ 0x198 801a188: 4938 ldr r1, [pc, #224] @ (801a26c ) 801a18a: 4839 ldr r0, [pc, #228] @ (801a270 ) 801a18c: f00f fc1e bl 80299cc /* desired length larger than current length? */ if (new_len >= p->tot_len) { 801a190: 687b ldr r3, [r7, #4] 801a192: 891b ldrh r3, [r3, #8] 801a194: 887a ldrh r2, [r7, #2] 801a196: 429a cmp r2, r3 801a198: d261 bcs.n 801a25e 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); 801a19a: 687b ldr r3, [r7, #4] 801a19c: 891a ldrh r2, [r3, #8] 801a19e: 887b ldrh r3, [r7, #2] 801a1a0: 1ad3 subs r3, r2, r3 801a1a2: 813b strh r3, [r7, #8] /* first, step over any pbufs that should remain in the chain */ rem_len = new_len; 801a1a4: 887b ldrh r3, [r7, #2] 801a1a6: 817b strh r3, [r7, #10] q = p; 801a1a8: 687b ldr r3, [r7, #4] 801a1aa: 60fb str r3, [r7, #12] /* should this pbuf be kept? */ while (rem_len > q->len) { 801a1ac: e018 b.n 801a1e0 /* decrease remaining length by pbuf length */ rem_len = (u16_t)(rem_len - q->len); 801a1ae: 68fb ldr r3, [r7, #12] 801a1b0: 895b ldrh r3, [r3, #10] 801a1b2: 897a ldrh r2, [r7, #10] 801a1b4: 1ad3 subs r3, r2, r3 801a1b6: 817b strh r3, [r7, #10] /* decrease total length indicator */ q->tot_len = (u16_t)(q->tot_len - shrink); 801a1b8: 68fb ldr r3, [r7, #12] 801a1ba: 891a ldrh r2, [r3, #8] 801a1bc: 893b ldrh r3, [r7, #8] 801a1be: 1ad3 subs r3, r2, r3 801a1c0: b29a uxth r2, r3 801a1c2: 68fb ldr r3, [r7, #12] 801a1c4: 811a strh r2, [r3, #8] /* proceed to next pbuf in chain */ q = q->next; 801a1c6: 68fb ldr r3, [r7, #12] 801a1c8: 681b ldr r3, [r3, #0] 801a1ca: 60fb str r3, [r7, #12] LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL); 801a1cc: 68fb ldr r3, [r7, #12] 801a1ce: 2b00 cmp r3, #0 801a1d0: d106 bne.n 801a1e0 801a1d2: 4b25 ldr r3, [pc, #148] @ (801a268 ) 801a1d4: f240 12af movw r2, #431 @ 0x1af 801a1d8: 4926 ldr r1, [pc, #152] @ (801a274 ) 801a1da: 4825 ldr r0, [pc, #148] @ (801a270 ) 801a1dc: f00f fbf6 bl 80299cc while (rem_len > q->len) { 801a1e0: 68fb ldr r3, [r7, #12] 801a1e2: 895b ldrh r3, [r3, #10] 801a1e4: 897a ldrh r2, [r7, #10] 801a1e6: 429a cmp r2, r3 801a1e8: d8e1 bhi.n 801a1ae /* 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) 801a1ea: 68fb ldr r3, [r7, #12] 801a1ec: 7b1b ldrb r3, [r3, #12] 801a1ee: f003 030f and.w r3, r3, #15 801a1f2: 2b00 cmp r3, #0 801a1f4: d11f bne.n 801a236 801a1f6: 68fb ldr r3, [r7, #12] 801a1f8: 895b ldrh r3, [r3, #10] 801a1fa: 897a ldrh r2, [r7, #10] 801a1fc: 429a cmp r2, r3 801a1fe: d01a beq.n 801a236 #if LWIP_SUPPORT_CUSTOM_PBUF && ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0) 801a200: 68fb ldr r3, [r7, #12] 801a202: 7b5b ldrb r3, [r3, #13] 801a204: f003 0302 and.w r3, r3, #2 801a208: 2b00 cmp r3, #0 801a20a: d114 bne.n 801a236 #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)); 801a20c: 68fb ldr r3, [r7, #12] 801a20e: 685a ldr r2, [r3, #4] 801a210: 68fb ldr r3, [r7, #12] 801a212: 1ad2 subs r2, r2, r3 801a214: 897b ldrh r3, [r7, #10] 801a216: 4413 add r3, r2 801a218: 4619 mov r1, r3 801a21a: 68f8 ldr r0, [r7, #12] 801a21c: f7fe ff5c bl 80190d8 801a220: 60f8 str r0, [r7, #12] LWIP_ASSERT("mem_trim returned q == NULL", q != NULL); 801a222: 68fb ldr r3, [r7, #12] 801a224: 2b00 cmp r3, #0 801a226: d106 bne.n 801a236 801a228: 4b0f ldr r3, [pc, #60] @ (801a268 ) 801a22a: f240 12bd movw r2, #445 @ 0x1bd 801a22e: 4912 ldr r1, [pc, #72] @ (801a278 ) 801a230: 480f ldr r0, [pc, #60] @ (801a270 ) 801a232: f00f fbcb bl 80299cc } /* adjust length fields for new last pbuf */ q->len = rem_len; 801a236: 68fb ldr r3, [r7, #12] 801a238: 897a ldrh r2, [r7, #10] 801a23a: 815a strh r2, [r3, #10] q->tot_len = q->len; 801a23c: 68fb ldr r3, [r7, #12] 801a23e: 895a ldrh r2, [r3, #10] 801a240: 68fb ldr r3, [r7, #12] 801a242: 811a strh r2, [r3, #8] /* any remaining pbufs in chain? */ if (q->next != NULL) { 801a244: 68fb ldr r3, [r7, #12] 801a246: 681b ldr r3, [r3, #0] 801a248: 2b00 cmp r3, #0 801a24a: d004 beq.n 801a256 /* free remaining pbufs in chain */ pbuf_free(q->next); 801a24c: 68fb ldr r3, [r7, #12] 801a24e: 681b ldr r3, [r3, #0] 801a250: 4618 mov r0, r3 801a252: f000 f943 bl 801a4dc } /* q is last packet in chain */ q->next = NULL; 801a256: 68fb ldr r3, [r7, #12] 801a258: 2200 movs r2, #0 801a25a: 601a str r2, [r3, #0] 801a25c: e000 b.n 801a260 return; 801a25e: bf00 nop } 801a260: 3710 adds r7, #16 801a262: 46bd mov sp, r7 801a264: bd80 pop {r7, pc} 801a266: bf00 nop 801a268: 0802e0a8 .word 0x0802e0a8 801a26c: 0802e1c0 .word 0x0802e1c0 801a270: 0802e108 .word 0x0802e108 801a274: 0802e1d8 .word 0x0802e1d8 801a278: 0802e1f0 .word 0x0802e1f0 0801a27c : * @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) { 801a27c: b580 push {r7, lr} 801a27e: b086 sub sp, #24 801a280: af00 add r7, sp, #0 801a282: 60f8 str r0, [r7, #12] 801a284: 60b9 str r1, [r7, #8] 801a286: 4613 mov r3, r2 801a288: 71fb strb r3, [r7, #7] u16_t type_internal; void *payload; u16_t increment_magnitude; LWIP_ASSERT("p != NULL", p != NULL); 801a28a: 68fb ldr r3, [r7, #12] 801a28c: 2b00 cmp r3, #0 801a28e: d106 bne.n 801a29e 801a290: 4b2b ldr r3, [pc, #172] @ (801a340 ) 801a292: f240 12df movw r2, #479 @ 0x1df 801a296: 492b ldr r1, [pc, #172] @ (801a344 ) 801a298: 482b ldr r0, [pc, #172] @ (801a348 ) 801a29a: f00f fb97 bl 80299cc if ((p == NULL) || (header_size_increment > 0xFFFF)) { 801a29e: 68fb ldr r3, [r7, #12] 801a2a0: 2b00 cmp r3, #0 801a2a2: d003 beq.n 801a2ac 801a2a4: 68bb ldr r3, [r7, #8] 801a2a6: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 801a2aa: d301 bcc.n 801a2b0 return 1; 801a2ac: 2301 movs r3, #1 801a2ae: e043 b.n 801a338 } if (header_size_increment == 0) { 801a2b0: 68bb ldr r3, [r7, #8] 801a2b2: 2b00 cmp r3, #0 801a2b4: d101 bne.n 801a2ba return 0; 801a2b6: 2300 movs r3, #0 801a2b8: e03e b.n 801a338 } increment_magnitude = (u16_t)header_size_increment; 801a2ba: 68bb ldr r3, [r7, #8] 801a2bc: 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) { 801a2be: 68fb ldr r3, [r7, #12] 801a2c0: 891a ldrh r2, [r3, #8] 801a2c2: 8a7b ldrh r3, [r7, #18] 801a2c4: 4413 add r3, r2 801a2c6: b29b uxth r3, r3 801a2c8: 8a7a ldrh r2, [r7, #18] 801a2ca: 429a cmp r2, r3 801a2cc: d901 bls.n 801a2d2 return 1; 801a2ce: 2301 movs r3, #1 801a2d0: e032 b.n 801a338 } type_internal = p->type_internal; 801a2d2: 68fb ldr r3, [r7, #12] 801a2d4: 7b1b ldrb r3, [r3, #12] 801a2d6: 823b strh r3, [r7, #16] /* pbuf types containing payloads? */ if (type_internal & PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS) { 801a2d8: 8a3b ldrh r3, [r7, #16] 801a2da: f003 0380 and.w r3, r3, #128 @ 0x80 801a2de: 2b00 cmp r3, #0 801a2e0: d00c beq.n 801a2fc /* set new payload pointer */ payload = (u8_t *)p->payload - header_size_increment; 801a2e2: 68fb ldr r3, [r7, #12] 801a2e4: 685a ldr r2, [r3, #4] 801a2e6: 68bb ldr r3, [r7, #8] 801a2e8: 425b negs r3, r3 801a2ea: 4413 add r3, r2 801a2ec: 617b str r3, [r7, #20] /* boundary check fails? */ if ((u8_t *)payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { 801a2ee: 68fb ldr r3, [r7, #12] 801a2f0: 3310 adds r3, #16 801a2f2: 697a ldr r2, [r7, #20] 801a2f4: 429a cmp r2, r3 801a2f6: d20d bcs.n 801a314 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; 801a2f8: 2301 movs r3, #1 801a2fa: e01d b.n 801a338 } /* pbuf types referring to external payloads? */ } else { /* hide a header in the payload? */ if (force) { 801a2fc: 79fb ldrb r3, [r7, #7] 801a2fe: 2b00 cmp r3, #0 801a300: d006 beq.n 801a310 payload = (u8_t *)p->payload - header_size_increment; 801a302: 68fb ldr r3, [r7, #12] 801a304: 685a ldr r2, [r3, #4] 801a306: 68bb ldr r3, [r7, #8] 801a308: 425b negs r3, r3 801a30a: 4413 add r3, r2 801a30c: 617b str r3, [r7, #20] 801a30e: e001 b.n 801a314 } else { /* cannot expand payload to front (yet!) * bail out unsuccessfully */ return 1; 801a310: 2301 movs r3, #1 801a312: e011 b.n 801a338 } 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; 801a314: 68fb ldr r3, [r7, #12] 801a316: 697a ldr r2, [r7, #20] 801a318: 605a str r2, [r3, #4] p->len = (u16_t)(p->len + increment_magnitude); 801a31a: 68fb ldr r3, [r7, #12] 801a31c: 895a ldrh r2, [r3, #10] 801a31e: 8a7b ldrh r3, [r7, #18] 801a320: 4413 add r3, r2 801a322: b29a uxth r2, r3 801a324: 68fb ldr r3, [r7, #12] 801a326: 815a strh r2, [r3, #10] p->tot_len = (u16_t)(p->tot_len + increment_magnitude); 801a328: 68fb ldr r3, [r7, #12] 801a32a: 891a ldrh r2, [r3, #8] 801a32c: 8a7b ldrh r3, [r7, #18] 801a32e: 4413 add r3, r2 801a330: b29a uxth r2, r3 801a332: 68fb ldr r3, [r7, #12] 801a334: 811a strh r2, [r3, #8] return 0; 801a336: 2300 movs r3, #0 } 801a338: 4618 mov r0, r3 801a33a: 3718 adds r7, #24 801a33c: 46bd mov sp, r7 801a33e: bd80 pop {r7, pc} 801a340: 0802e0a8 .word 0x0802e0a8 801a344: 0802e20c .word 0x0802e20c 801a348: 0802e108 .word 0x0802e108 0801a34c : * @return non-zero on failure, zero on success. * */ u8_t pbuf_add_header(struct pbuf *p, size_t header_size_increment) { 801a34c: b580 push {r7, lr} 801a34e: b082 sub sp, #8 801a350: af00 add r7, sp, #0 801a352: 6078 str r0, [r7, #4] 801a354: 6039 str r1, [r7, #0] return pbuf_add_header_impl(p, header_size_increment, 0); 801a356: 2200 movs r2, #0 801a358: 6839 ldr r1, [r7, #0] 801a35a: 6878 ldr r0, [r7, #4] 801a35c: f7ff ff8e bl 801a27c 801a360: 4603 mov r3, r0 } 801a362: 4618 mov r0, r3 801a364: 3708 adds r7, #8 801a366: 46bd mov sp, r7 801a368: bd80 pop {r7, pc} ... 0801a36c : * @return non-zero on failure, zero on success. * */ u8_t pbuf_remove_header(struct pbuf *p, size_t header_size_decrement) { 801a36c: b580 push {r7, lr} 801a36e: b084 sub sp, #16 801a370: af00 add r7, sp, #0 801a372: 6078 str r0, [r7, #4] 801a374: 6039 str r1, [r7, #0] void *payload; u16_t increment_magnitude; LWIP_ASSERT("p != NULL", p != NULL); 801a376: 687b ldr r3, [r7, #4] 801a378: 2b00 cmp r3, #0 801a37a: d106 bne.n 801a38a 801a37c: 4b20 ldr r3, [pc, #128] @ (801a400 ) 801a37e: f240 224b movw r2, #587 @ 0x24b 801a382: 4920 ldr r1, [pc, #128] @ (801a404 ) 801a384: 4820 ldr r0, [pc, #128] @ (801a408 ) 801a386: f00f fb21 bl 80299cc if ((p == NULL) || (header_size_decrement > 0xFFFF)) { 801a38a: 687b ldr r3, [r7, #4] 801a38c: 2b00 cmp r3, #0 801a38e: d003 beq.n 801a398 801a390: 683b ldr r3, [r7, #0] 801a392: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 801a396: d301 bcc.n 801a39c return 1; 801a398: 2301 movs r3, #1 801a39a: e02c b.n 801a3f6 } if (header_size_decrement == 0) { 801a39c: 683b ldr r3, [r7, #0] 801a39e: 2b00 cmp r3, #0 801a3a0: d101 bne.n 801a3a6 return 0; 801a3a2: 2300 movs r3, #0 801a3a4: e027 b.n 801a3f6 } increment_magnitude = (u16_t)header_size_decrement; 801a3a6: 683b ldr r3, [r7, #0] 801a3a8: 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;); 801a3aa: 687b ldr r3, [r7, #4] 801a3ac: 895b ldrh r3, [r3, #10] 801a3ae: 89fa ldrh r2, [r7, #14] 801a3b0: 429a cmp r2, r3 801a3b2: d908 bls.n 801a3c6 801a3b4: 4b12 ldr r3, [pc, #72] @ (801a400 ) 801a3b6: f240 2255 movw r2, #597 @ 0x255 801a3ba: 4914 ldr r1, [pc, #80] @ (801a40c ) 801a3bc: 4812 ldr r0, [pc, #72] @ (801a408 ) 801a3be: f00f fb05 bl 80299cc 801a3c2: 2301 movs r3, #1 801a3c4: e017 b.n 801a3f6 /* remember current payload pointer */ payload = p->payload; 801a3c6: 687b ldr r3, [r7, #4] 801a3c8: 685b ldr r3, [r3, #4] 801a3ca: 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; 801a3cc: 687b ldr r3, [r7, #4] 801a3ce: 685a ldr r2, [r3, #4] 801a3d0: 683b ldr r3, [r7, #0] 801a3d2: 441a add r2, r3 801a3d4: 687b ldr r3, [r7, #4] 801a3d6: 605a str r2, [r3, #4] /* modify pbuf length fields */ p->len = (u16_t)(p->len - increment_magnitude); 801a3d8: 687b ldr r3, [r7, #4] 801a3da: 895a ldrh r2, [r3, #10] 801a3dc: 89fb ldrh r3, [r7, #14] 801a3de: 1ad3 subs r3, r2, r3 801a3e0: b29a uxth r2, r3 801a3e2: 687b ldr r3, [r7, #4] 801a3e4: 815a strh r2, [r3, #10] p->tot_len = (u16_t)(p->tot_len - increment_magnitude); 801a3e6: 687b ldr r3, [r7, #4] 801a3e8: 891a ldrh r2, [r3, #8] 801a3ea: 89fb ldrh r3, [r7, #14] 801a3ec: 1ad3 subs r3, r2, r3 801a3ee: b29a uxth r2, r3 801a3f0: 687b ldr r3, [r7, #4] 801a3f2: 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; 801a3f4: 2300 movs r3, #0 } 801a3f6: 4618 mov r0, r3 801a3f8: 3710 adds r7, #16 801a3fa: 46bd mov sp, r7 801a3fc: bd80 pop {r7, pc} 801a3fe: bf00 nop 801a400: 0802e0a8 .word 0x0802e0a8 801a404: 0802e20c .word 0x0802e20c 801a408: 0802e108 .word 0x0802e108 801a40c: 0802e218 .word 0x0802e218 0801a410 : static u8_t pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force) { 801a410: b580 push {r7, lr} 801a412: b082 sub sp, #8 801a414: af00 add r7, sp, #0 801a416: 6078 str r0, [r7, #4] 801a418: 460b mov r3, r1 801a41a: 807b strh r3, [r7, #2] 801a41c: 4613 mov r3, r2 801a41e: 707b strb r3, [r7, #1] if (header_size_increment < 0) { 801a420: f9b7 3002 ldrsh.w r3, [r7, #2] 801a424: 2b00 cmp r3, #0 801a426: da08 bge.n 801a43a return pbuf_remove_header(p, (size_t) - header_size_increment); 801a428: f9b7 3002 ldrsh.w r3, [r7, #2] 801a42c: 425b negs r3, r3 801a42e: 4619 mov r1, r3 801a430: 6878 ldr r0, [r7, #4] 801a432: f7ff ff9b bl 801a36c 801a436: 4603 mov r3, r0 801a438: e007 b.n 801a44a } else { return pbuf_add_header_impl(p, (size_t)header_size_increment, force); 801a43a: f9b7 3002 ldrsh.w r3, [r7, #2] 801a43e: 787a ldrb r2, [r7, #1] 801a440: 4619 mov r1, r3 801a442: 6878 ldr r0, [r7, #4] 801a444: f7ff ff1a bl 801a27c 801a448: 4603 mov r3, r0 } } 801a44a: 4618 mov r0, r3 801a44c: 3708 adds r7, #8 801a44e: 46bd mov sp, r7 801a450: bd80 pop {r7, pc} 0801a452 : * 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) { 801a452: b580 push {r7, lr} 801a454: b082 sub sp, #8 801a456: af00 add r7, sp, #0 801a458: 6078 str r0, [r7, #4] 801a45a: 460b mov r3, r1 801a45c: 807b strh r3, [r7, #2] return pbuf_header_impl(p, header_size_increment, 1); 801a45e: f9b7 3002 ldrsh.w r3, [r7, #2] 801a462: 2201 movs r2, #1 801a464: 4619 mov r1, r3 801a466: 6878 ldr r0, [r7, #4] 801a468: f7ff ffd2 bl 801a410 801a46c: 4603 mov r3, r0 } 801a46e: 4618 mov r0, r3 801a470: 3708 adds r7, #8 801a472: 46bd mov sp, r7 801a474: bd80 pop {r7, pc} 0801a476 : * takes an u16_t not s16_t! * @return the new head pbuf */ struct pbuf * pbuf_free_header(struct pbuf *q, u16_t size) { 801a476: b580 push {r7, lr} 801a478: b086 sub sp, #24 801a47a: af00 add r7, sp, #0 801a47c: 6078 str r0, [r7, #4] 801a47e: 460b mov r3, r1 801a480: 807b strh r3, [r7, #2] struct pbuf *p = q; 801a482: 687b ldr r3, [r7, #4] 801a484: 617b str r3, [r7, #20] u16_t free_left = size; 801a486: 887b ldrh r3, [r7, #2] 801a488: 827b strh r3, [r7, #18] while (free_left && p) { 801a48a: e01c b.n 801a4c6 if (free_left >= p->len) { 801a48c: 697b ldr r3, [r7, #20] 801a48e: 895b ldrh r3, [r3, #10] 801a490: 8a7a ldrh r2, [r7, #18] 801a492: 429a cmp r2, r3 801a494: d310 bcc.n 801a4b8 struct pbuf *f = p; 801a496: 697b ldr r3, [r7, #20] 801a498: 60fb str r3, [r7, #12] free_left = (u16_t)(free_left - p->len); 801a49a: 697b ldr r3, [r7, #20] 801a49c: 895b ldrh r3, [r3, #10] 801a49e: 8a7a ldrh r2, [r7, #18] 801a4a0: 1ad3 subs r3, r2, r3 801a4a2: 827b strh r3, [r7, #18] p = p->next; 801a4a4: 697b ldr r3, [r7, #20] 801a4a6: 681b ldr r3, [r3, #0] 801a4a8: 617b str r3, [r7, #20] f->next = 0; 801a4aa: 68fb ldr r3, [r7, #12] 801a4ac: 2200 movs r2, #0 801a4ae: 601a str r2, [r3, #0] pbuf_free(f); 801a4b0: 68f8 ldr r0, [r7, #12] 801a4b2: f000 f813 bl 801a4dc 801a4b6: e006 b.n 801a4c6 } else { pbuf_remove_header(p, free_left); 801a4b8: 8a7b ldrh r3, [r7, #18] 801a4ba: 4619 mov r1, r3 801a4bc: 6978 ldr r0, [r7, #20] 801a4be: f7ff ff55 bl 801a36c free_left = 0; 801a4c2: 2300 movs r3, #0 801a4c4: 827b strh r3, [r7, #18] while (free_left && p) { 801a4c6: 8a7b ldrh r3, [r7, #18] 801a4c8: 2b00 cmp r3, #0 801a4ca: d002 beq.n 801a4d2 801a4cc: 697b ldr r3, [r7, #20] 801a4ce: 2b00 cmp r3, #0 801a4d0: d1dc bne.n 801a48c } } return p; 801a4d2: 697b ldr r3, [r7, #20] } 801a4d4: 4618 mov r0, r3 801a4d6: 3718 adds r7, #24 801a4d8: 46bd mov sp, r7 801a4da: bd80 pop {r7, pc} 0801a4dc : * 1->1->1 becomes ....... * */ u8_t pbuf_free(struct pbuf *p) { 801a4dc: b580 push {r7, lr} 801a4de: b088 sub sp, #32 801a4e0: af00 add r7, sp, #0 801a4e2: 6078 str r0, [r7, #4] u8_t alloc_src; struct pbuf *q; u8_t count; if (p == NULL) { 801a4e4: 687b ldr r3, [r7, #4] 801a4e6: 2b00 cmp r3, #0 801a4e8: d10b bne.n 801a502 LWIP_ASSERT("p != NULL", p != NULL); 801a4ea: 687b ldr r3, [r7, #4] 801a4ec: 2b00 cmp r3, #0 801a4ee: d106 bne.n 801a4fe 801a4f0: 4b3b ldr r3, [pc, #236] @ (801a5e0 ) 801a4f2: f44f 7237 mov.w r2, #732 @ 0x2dc 801a4f6: 493b ldr r1, [pc, #236] @ (801a5e4 ) 801a4f8: 483b ldr r0, [pc, #236] @ (801a5e8 ) 801a4fa: f00f fa67 bl 80299cc /* 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; 801a4fe: 2300 movs r3, #0 801a500: e069 b.n 801a5d6 } LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p)); PERF_START; count = 0; 801a502: 2300 movs r3, #0 801a504: 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) { 801a506: e062 b.n 801a5ce 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); 801a508: f00b ffca bl 80264a0 801a50c: 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); 801a50e: 687b ldr r3, [r7, #4] 801a510: 7b9b ldrb r3, [r3, #14] 801a512: 2b00 cmp r3, #0 801a514: d106 bne.n 801a524 801a516: 4b32 ldr r3, [pc, #200] @ (801a5e0 ) 801a518: f240 22f1 movw r2, #753 @ 0x2f1 801a51c: 4933 ldr r1, [pc, #204] @ (801a5ec ) 801a51e: 4832 ldr r0, [pc, #200] @ (801a5e8 ) 801a520: f00f fa54 bl 80299cc /* decrease reference count (number of pointers to pbuf) */ ref = --(p->ref); 801a524: 687b ldr r3, [r7, #4] 801a526: 7b9b ldrb r3, [r3, #14] 801a528: 3b01 subs r3, #1 801a52a: b2da uxtb r2, r3 801a52c: 687b ldr r3, [r7, #4] 801a52e: 739a strb r2, [r3, #14] 801a530: 687b ldr r3, [r7, #4] 801a532: 7b9b ldrb r3, [r3, #14] 801a534: 75fb strb r3, [r7, #23] SYS_ARCH_UNPROTECT(old_level); 801a536: 69b8 ldr r0, [r7, #24] 801a538: f00b ffc0 bl 80264bc /* this pbuf is no longer referenced to? */ if (ref == 0) { 801a53c: 7dfb ldrb r3, [r7, #23] 801a53e: 2b00 cmp r3, #0 801a540: d143 bne.n 801a5ca /* remember next pbuf in chain for next iteration */ q = p->next; 801a542: 687b ldr r3, [r7, #4] 801a544: 681b ldr r3, [r3, #0] 801a546: 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); 801a548: 687b ldr r3, [r7, #4] 801a54a: 7b1b ldrb r3, [r3, #12] 801a54c: f003 030f and.w r3, r3, #15 801a550: 73fb strb r3, [r7, #15] #if LWIP_SUPPORT_CUSTOM_PBUF /* is this a custom pbuf? */ if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) { 801a552: 687b ldr r3, [r7, #4] 801a554: 7b5b ldrb r3, [r3, #13] 801a556: f003 0302 and.w r3, r3, #2 801a55a: 2b00 cmp r3, #0 801a55c: d011 beq.n 801a582 struct pbuf_custom *pc = (struct pbuf_custom *)p; 801a55e: 687b ldr r3, [r7, #4] 801a560: 60bb str r3, [r7, #8] LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL); 801a562: 68bb ldr r3, [r7, #8] 801a564: 691b ldr r3, [r3, #16] 801a566: 2b00 cmp r3, #0 801a568: d106 bne.n 801a578 801a56a: 4b1d ldr r3, [pc, #116] @ (801a5e0 ) 801a56c: f240 22ff movw r2, #767 @ 0x2ff 801a570: 491f ldr r1, [pc, #124] @ (801a5f0 ) 801a572: 481d ldr r0, [pc, #116] @ (801a5e8 ) 801a574: f00f fa2a bl 80299cc pc->custom_free_function(p); 801a578: 68bb ldr r3, [r7, #8] 801a57a: 691b ldr r3, [r3, #16] 801a57c: 6878 ldr r0, [r7, #4] 801a57e: 4798 blx r3 801a580: e01d b.n 801a5be } 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) { 801a582: 7bfb ldrb r3, [r7, #15] 801a584: 2b02 cmp r3, #2 801a586: d104 bne.n 801a592 memp_free(MEMP_PBUF_POOL, p); 801a588: 6879 ldr r1, [r7, #4] 801a58a: 200c movs r0, #12 801a58c: f7ff f8b8 bl 8019700 801a590: e015 b.n 801a5be /* is this a ROM or RAM referencing pbuf? */ } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF) { 801a592: 7bfb ldrb r3, [r7, #15] 801a594: 2b01 cmp r3, #1 801a596: d104 bne.n 801a5a2 memp_free(MEMP_PBUF, p); 801a598: 6879 ldr r1, [r7, #4] 801a59a: 200b movs r0, #11 801a59c: f7ff f8b0 bl 8019700 801a5a0: e00d b.n 801a5be /* type == PBUF_RAM */ } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) { 801a5a2: 7bfb ldrb r3, [r7, #15] 801a5a4: 2b00 cmp r3, #0 801a5a6: d103 bne.n 801a5b0 mem_free(p); 801a5a8: 6878 ldr r0, [r7, #4] 801a5aa: f7fe fd05 bl 8018fb8 801a5ae: e006 b.n 801a5be } else { /* @todo: support freeing other types */ LWIP_ASSERT("invalid pbuf type", 0); 801a5b0: 4b0b ldr r3, [pc, #44] @ (801a5e0 ) 801a5b2: f240 320f movw r2, #783 @ 0x30f 801a5b6: 490f ldr r1, [pc, #60] @ (801a5f4 ) 801a5b8: 480b ldr r0, [pc, #44] @ (801a5e8 ) 801a5ba: f00f fa07 bl 80299cc } } count++; 801a5be: 7ffb ldrb r3, [r7, #31] 801a5c0: 3301 adds r3, #1 801a5c2: 77fb strb r3, [r7, #31] /* proceed to next pbuf */ p = q; 801a5c4: 693b ldr r3, [r7, #16] 801a5c6: 607b str r3, [r7, #4] 801a5c8: e001 b.n 801a5ce /* 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; 801a5ca: 2300 movs r3, #0 801a5cc: 607b str r3, [r7, #4] while (p != NULL) { 801a5ce: 687b ldr r3, [r7, #4] 801a5d0: 2b00 cmp r3, #0 801a5d2: d199 bne.n 801a508 } } PERF_STOP("pbuf_free"); /* return number of de-allocated pbufs */ return count; 801a5d4: 7ffb ldrb r3, [r7, #31] } 801a5d6: 4618 mov r0, r3 801a5d8: 3720 adds r7, #32 801a5da: 46bd mov sp, r7 801a5dc: bd80 pop {r7, pc} 801a5de: bf00 nop 801a5e0: 0802e0a8 .word 0x0802e0a8 801a5e4: 0802e20c .word 0x0802e20c 801a5e8: 0802e108 .word 0x0802e108 801a5ec: 0802e238 .word 0x0802e238 801a5f0: 0802e250 .word 0x0802e250 801a5f4: 0802e274 .word 0x0802e274 0801a5f8 : * @param p first pbuf of chain * @return the number of pbufs in a chain */ u16_t pbuf_clen(const struct pbuf *p) { 801a5f8: b480 push {r7} 801a5fa: b085 sub sp, #20 801a5fc: af00 add r7, sp, #0 801a5fe: 6078 str r0, [r7, #4] u16_t len; len = 0; 801a600: 2300 movs r3, #0 801a602: 81fb strh r3, [r7, #14] while (p != NULL) { 801a604: e005 b.n 801a612 ++len; 801a606: 89fb ldrh r3, [r7, #14] 801a608: 3301 adds r3, #1 801a60a: 81fb strh r3, [r7, #14] p = p->next; 801a60c: 687b ldr r3, [r7, #4] 801a60e: 681b ldr r3, [r3, #0] 801a610: 607b str r3, [r7, #4] while (p != NULL) { 801a612: 687b ldr r3, [r7, #4] 801a614: 2b00 cmp r3, #0 801a616: d1f6 bne.n 801a606 } return len; 801a618: 89fb ldrh r3, [r7, #14] } 801a61a: 4618 mov r0, r3 801a61c: 3714 adds r7, #20 801a61e: 46bd mov sp, r7 801a620: f85d 7b04 ldr.w r7, [sp], #4 801a624: 4770 bx lr ... 0801a628 : * @param p pbuf to increase reference counter of * */ void pbuf_ref(struct pbuf *p) { 801a628: b580 push {r7, lr} 801a62a: b084 sub sp, #16 801a62c: af00 add r7, sp, #0 801a62e: 6078 str r0, [r7, #4] /* pbuf given? */ if (p != NULL) { 801a630: 687b ldr r3, [r7, #4] 801a632: 2b00 cmp r3, #0 801a634: d016 beq.n 801a664 SYS_ARCH_SET(p->ref, (LWIP_PBUF_REF_T)(p->ref + 1)); 801a636: f00b ff33 bl 80264a0 801a63a: 60f8 str r0, [r7, #12] 801a63c: 687b ldr r3, [r7, #4] 801a63e: 7b9b ldrb r3, [r3, #14] 801a640: 3301 adds r3, #1 801a642: b2da uxtb r2, r3 801a644: 687b ldr r3, [r7, #4] 801a646: 739a strb r2, [r3, #14] 801a648: 68f8 ldr r0, [r7, #12] 801a64a: f00b ff37 bl 80264bc LWIP_ASSERT("pbuf ref overflow", p->ref > 0); 801a64e: 687b ldr r3, [r7, #4] 801a650: 7b9b ldrb r3, [r3, #14] 801a652: 2b00 cmp r3, #0 801a654: d106 bne.n 801a664 801a656: 4b05 ldr r3, [pc, #20] @ (801a66c ) 801a658: f240 3242 movw r2, #834 @ 0x342 801a65c: 4904 ldr r1, [pc, #16] @ (801a670 ) 801a65e: 4805 ldr r0, [pc, #20] @ (801a674 ) 801a660: f00f f9b4 bl 80299cc } } 801a664: bf00 nop 801a666: 3710 adds r7, #16 801a668: 46bd mov sp, r7 801a66a: bd80 pop {r7, pc} 801a66c: 0802e0a8 .word 0x0802e0a8 801a670: 0802e288 .word 0x0802e288 801a674: 0802e108 .word 0x0802e108 0801a678 : * * @see pbuf_chain() */ void pbuf_cat(struct pbuf *h, struct pbuf *t) { 801a678: b580 push {r7, lr} 801a67a: b084 sub sp, #16 801a67c: af00 add r7, sp, #0 801a67e: 6078 str r0, [r7, #4] 801a680: 6039 str r1, [r7, #0] struct pbuf *p; LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", 801a682: 687b ldr r3, [r7, #4] 801a684: 2b00 cmp r3, #0 801a686: d002 beq.n 801a68e 801a688: 683b ldr r3, [r7, #0] 801a68a: 2b00 cmp r3, #0 801a68c: d107 bne.n 801a69e 801a68e: 4b20 ldr r3, [pc, #128] @ (801a710 ) 801a690: f240 3259 movw r2, #857 @ 0x359 801a694: 491f ldr r1, [pc, #124] @ (801a714 ) 801a696: 4820 ldr r0, [pc, #128] @ (801a718 ) 801a698: f00f f998 bl 80299cc 801a69c: e034 b.n 801a708 ((h != NULL) && (t != NULL)), return;); /* proceed to last pbuf of chain */ for (p = h; p->next != NULL; p = p->next) { 801a69e: 687b ldr r3, [r7, #4] 801a6a0: 60fb str r3, [r7, #12] 801a6a2: e00a b.n 801a6ba /* add total length of second chain to all totals of first chain */ p->tot_len = (u16_t)(p->tot_len + t->tot_len); 801a6a4: 68fb ldr r3, [r7, #12] 801a6a6: 891a ldrh r2, [r3, #8] 801a6a8: 683b ldr r3, [r7, #0] 801a6aa: 891b ldrh r3, [r3, #8] 801a6ac: 4413 add r3, r2 801a6ae: b29a uxth r2, r3 801a6b0: 68fb ldr r3, [r7, #12] 801a6b2: 811a strh r2, [r3, #8] for (p = h; p->next != NULL; p = p->next) { 801a6b4: 68fb ldr r3, [r7, #12] 801a6b6: 681b ldr r3, [r3, #0] 801a6b8: 60fb str r3, [r7, #12] 801a6ba: 68fb ldr r3, [r7, #12] 801a6bc: 681b ldr r3, [r3, #0] 801a6be: 2b00 cmp r3, #0 801a6c0: d1f0 bne.n 801a6a4 } /* { 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); 801a6c2: 68fb ldr r3, [r7, #12] 801a6c4: 891a ldrh r2, [r3, #8] 801a6c6: 68fb ldr r3, [r7, #12] 801a6c8: 895b ldrh r3, [r3, #10] 801a6ca: 429a cmp r2, r3 801a6cc: d006 beq.n 801a6dc 801a6ce: 4b10 ldr r3, [pc, #64] @ (801a710 ) 801a6d0: f240 3262 movw r2, #866 @ 0x362 801a6d4: 4911 ldr r1, [pc, #68] @ (801a71c ) 801a6d6: 4810 ldr r0, [pc, #64] @ (801a718 ) 801a6d8: f00f f978 bl 80299cc LWIP_ASSERT("p->next == NULL", p->next == NULL); 801a6dc: 68fb ldr r3, [r7, #12] 801a6de: 681b ldr r3, [r3, #0] 801a6e0: 2b00 cmp r3, #0 801a6e2: d006 beq.n 801a6f2 801a6e4: 4b0a ldr r3, [pc, #40] @ (801a710 ) 801a6e6: f240 3263 movw r2, #867 @ 0x363 801a6ea: 490d ldr r1, [pc, #52] @ (801a720 ) 801a6ec: 480a ldr r0, [pc, #40] @ (801a718 ) 801a6ee: f00f f96d bl 80299cc /* add total length of second chain to last pbuf total of first chain */ p->tot_len = (u16_t)(p->tot_len + t->tot_len); 801a6f2: 68fb ldr r3, [r7, #12] 801a6f4: 891a ldrh r2, [r3, #8] 801a6f6: 683b ldr r3, [r7, #0] 801a6f8: 891b ldrh r3, [r3, #8] 801a6fa: 4413 add r3, r2 801a6fc: b29a uxth r2, r3 801a6fe: 68fb ldr r3, [r7, #12] 801a700: 811a strh r2, [r3, #8] /* chain last pbuf of head (p) with first of tail (t) */ p->next = t; 801a702: 68fb ldr r3, [r7, #12] 801a704: 683a ldr r2, [r7, #0] 801a706: 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. */ } 801a708: 3710 adds r7, #16 801a70a: 46bd mov sp, r7 801a70c: bd80 pop {r7, pc} 801a70e: bf00 nop 801a710: 0802e0a8 .word 0x0802e0a8 801a714: 0802e29c .word 0x0802e29c 801a718: 0802e108 .word 0x0802e108 801a71c: 0802e2d4 .word 0x0802e2d4 801a720: 0802e304 .word 0x0802e304 0801a724 : * The ->ref field of the first pbuf of the tail chain is adjusted. * */ void pbuf_chain(struct pbuf *h, struct pbuf *t) { 801a724: b580 push {r7, lr} 801a726: b082 sub sp, #8 801a728: af00 add r7, sp, #0 801a72a: 6078 str r0, [r7, #4] 801a72c: 6039 str r1, [r7, #0] pbuf_cat(h, t); 801a72e: 6839 ldr r1, [r7, #0] 801a730: 6878 ldr r0, [r7, #4] 801a732: f7ff ffa1 bl 801a678 /* t is now referenced by h */ pbuf_ref(t); 801a736: 6838 ldr r0, [r7, #0] 801a738: f7ff ff76 bl 801a628 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t)); } 801a73c: bf00 nop 801a73e: 3708 adds r7, #8 801a740: 46bd mov sp, r7 801a742: bd80 pop {r7, pc} 0801a744 : * 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) { 801a744: b580 push {r7, lr} 801a746: b086 sub sp, #24 801a748: af00 add r7, sp, #0 801a74a: 6078 str r0, [r7, #4] 801a74c: 6039 str r1, [r7, #0] size_t offset_to = 0, offset_from = 0, len; 801a74e: 2300 movs r3, #0 801a750: 617b str r3, [r7, #20] 801a752: 2300 movs r3, #0 801a754: 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) && 801a756: 687b ldr r3, [r7, #4] 801a758: 2b00 cmp r3, #0 801a75a: d008 beq.n 801a76e 801a75c: 683b ldr r3, [r7, #0] 801a75e: 2b00 cmp r3, #0 801a760: d005 beq.n 801a76e 801a762: 687b ldr r3, [r7, #4] 801a764: 891a ldrh r2, [r3, #8] 801a766: 683b ldr r3, [r7, #0] 801a768: 891b ldrh r3, [r3, #8] 801a76a: 429a cmp r2, r3 801a76c: d209 bcs.n 801a782 801a76e: 4b57 ldr r3, [pc, #348] @ (801a8cc ) 801a770: f240 32c9 movw r2, #969 @ 0x3c9 801a774: 4956 ldr r1, [pc, #344] @ (801a8d0 ) 801a776: 4857 ldr r0, [pc, #348] @ (801a8d4 ) 801a778: f00f f928 bl 80299cc 801a77c: f06f 030f mvn.w r3, #15 801a780: e09f b.n 801a8c2 (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)) { 801a782: 687b ldr r3, [r7, #4] 801a784: 895b ldrh r3, [r3, #10] 801a786: 461a mov r2, r3 801a788: 697b ldr r3, [r7, #20] 801a78a: 1ad2 subs r2, r2, r3 801a78c: 683b ldr r3, [r7, #0] 801a78e: 895b ldrh r3, [r3, #10] 801a790: 4619 mov r1, r3 801a792: 693b ldr r3, [r7, #16] 801a794: 1acb subs r3, r1, r3 801a796: 429a cmp r2, r3 801a798: d306 bcc.n 801a7a8 /* complete current p_from fits into current p_to */ len = p_from->len - offset_from; 801a79a: 683b ldr r3, [r7, #0] 801a79c: 895b ldrh r3, [r3, #10] 801a79e: 461a mov r2, r3 801a7a0: 693b ldr r3, [r7, #16] 801a7a2: 1ad3 subs r3, r2, r3 801a7a4: 60fb str r3, [r7, #12] 801a7a6: e005 b.n 801a7b4 } else { /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; 801a7a8: 687b ldr r3, [r7, #4] 801a7aa: 895b ldrh r3, [r3, #10] 801a7ac: 461a mov r2, r3 801a7ae: 697b ldr r3, [r7, #20] 801a7b0: 1ad3 subs r3, r2, r3 801a7b2: 60fb str r3, [r7, #12] } MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len); 801a7b4: 687b ldr r3, [r7, #4] 801a7b6: 685a ldr r2, [r3, #4] 801a7b8: 697b ldr r3, [r7, #20] 801a7ba: 18d0 adds r0, r2, r3 801a7bc: 683b ldr r3, [r7, #0] 801a7be: 685a ldr r2, [r3, #4] 801a7c0: 693b ldr r3, [r7, #16] 801a7c2: 4413 add r3, r2 801a7c4: 68fa ldr r2, [r7, #12] 801a7c6: 4619 mov r1, r3 801a7c8: f00f fb89 bl 8029ede offset_to += len; 801a7cc: 697a ldr r2, [r7, #20] 801a7ce: 68fb ldr r3, [r7, #12] 801a7d0: 4413 add r3, r2 801a7d2: 617b str r3, [r7, #20] offset_from += len; 801a7d4: 693a ldr r2, [r7, #16] 801a7d6: 68fb ldr r3, [r7, #12] 801a7d8: 4413 add r3, r2 801a7da: 613b str r3, [r7, #16] LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); 801a7dc: 687b ldr r3, [r7, #4] 801a7de: 895b ldrh r3, [r3, #10] 801a7e0: 461a mov r2, r3 801a7e2: 697b ldr r3, [r7, #20] 801a7e4: 4293 cmp r3, r2 801a7e6: d906 bls.n 801a7f6 801a7e8: 4b38 ldr r3, [pc, #224] @ (801a8cc ) 801a7ea: f240 32d9 movw r2, #985 @ 0x3d9 801a7ee: 493a ldr r1, [pc, #232] @ (801a8d8 ) 801a7f0: 4838 ldr r0, [pc, #224] @ (801a8d4 ) 801a7f2: f00f f8eb bl 80299cc LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); 801a7f6: 683b ldr r3, [r7, #0] 801a7f8: 895b ldrh r3, [r3, #10] 801a7fa: 461a mov r2, r3 801a7fc: 693b ldr r3, [r7, #16] 801a7fe: 4293 cmp r3, r2 801a800: d906 bls.n 801a810 801a802: 4b32 ldr r3, [pc, #200] @ (801a8cc ) 801a804: f240 32da movw r2, #986 @ 0x3da 801a808: 4934 ldr r1, [pc, #208] @ (801a8dc ) 801a80a: 4832 ldr r0, [pc, #200] @ (801a8d4 ) 801a80c: f00f f8de bl 80299cc if (offset_from >= p_from->len) { 801a810: 683b ldr r3, [r7, #0] 801a812: 895b ldrh r3, [r3, #10] 801a814: 461a mov r2, r3 801a816: 693b ldr r3, [r7, #16] 801a818: 4293 cmp r3, r2 801a81a: d304 bcc.n 801a826 /* on to next p_from (if any) */ offset_from = 0; 801a81c: 2300 movs r3, #0 801a81e: 613b str r3, [r7, #16] p_from = p_from->next; 801a820: 683b ldr r3, [r7, #0] 801a822: 681b ldr r3, [r3, #0] 801a824: 603b str r3, [r7, #0] } if (offset_to == p_to->len) { 801a826: 687b ldr r3, [r7, #4] 801a828: 895b ldrh r3, [r3, #10] 801a82a: 461a mov r2, r3 801a82c: 697b ldr r3, [r7, #20] 801a82e: 4293 cmp r3, r2 801a830: d114 bne.n 801a85c /* on to next p_to (if any) */ offset_to = 0; 801a832: 2300 movs r3, #0 801a834: 617b str r3, [r7, #20] p_to = p_to->next; 801a836: 687b ldr r3, [r7, #4] 801a838: 681b ldr r3, [r3, #0] 801a83a: 607b str r3, [r7, #4] LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;); 801a83c: 687b ldr r3, [r7, #4] 801a83e: 2b00 cmp r3, #0 801a840: d10c bne.n 801a85c 801a842: 683b ldr r3, [r7, #0] 801a844: 2b00 cmp r3, #0 801a846: d009 beq.n 801a85c 801a848: 4b20 ldr r3, [pc, #128] @ (801a8cc ) 801a84a: f44f 7279 mov.w r2, #996 @ 0x3e4 801a84e: 4924 ldr r1, [pc, #144] @ (801a8e0 ) 801a850: 4820 ldr r0, [pc, #128] @ (801a8d4 ) 801a852: f00f f8bb bl 80299cc 801a856: f06f 030f mvn.w r3, #15 801a85a: e032 b.n 801a8c2 } if ((p_from != NULL) && (p_from->len == p_from->tot_len)) { 801a85c: 683b ldr r3, [r7, #0] 801a85e: 2b00 cmp r3, #0 801a860: d013 beq.n 801a88a 801a862: 683b ldr r3, [r7, #0] 801a864: 895a ldrh r2, [r3, #10] 801a866: 683b ldr r3, [r7, #0] 801a868: 891b ldrh r3, [r3, #8] 801a86a: 429a cmp r2, r3 801a86c: d10d bne.n 801a88a /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!", 801a86e: 683b ldr r3, [r7, #0] 801a870: 681b ldr r3, [r3, #0] 801a872: 2b00 cmp r3, #0 801a874: d009 beq.n 801a88a 801a876: 4b15 ldr r3, [pc, #84] @ (801a8cc ) 801a878: f240 32e9 movw r2, #1001 @ 0x3e9 801a87c: 4919 ldr r1, [pc, #100] @ (801a8e4 ) 801a87e: 4815 ldr r0, [pc, #84] @ (801a8d4 ) 801a880: f00f f8a4 bl 80299cc 801a884: f06f 0305 mvn.w r3, #5 801a888: e01b b.n 801a8c2 (p_from->next == NULL), return ERR_VAL;); } if ((p_to != NULL) && (p_to->len == p_to->tot_len)) { 801a88a: 687b ldr r3, [r7, #4] 801a88c: 2b00 cmp r3, #0 801a88e: d013 beq.n 801a8b8 801a890: 687b ldr r3, [r7, #4] 801a892: 895a ldrh r2, [r3, #10] 801a894: 687b ldr r3, [r7, #4] 801a896: 891b ldrh r3, [r3, #8] 801a898: 429a cmp r2, r3 801a89a: d10d bne.n 801a8b8 /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!", 801a89c: 687b ldr r3, [r7, #4] 801a89e: 681b ldr r3, [r3, #0] 801a8a0: 2b00 cmp r3, #0 801a8a2: d009 beq.n 801a8b8 801a8a4: 4b09 ldr r3, [pc, #36] @ (801a8cc ) 801a8a6: f240 32ee movw r2, #1006 @ 0x3ee 801a8aa: 490e ldr r1, [pc, #56] @ (801a8e4 ) 801a8ac: 4809 ldr r0, [pc, #36] @ (801a8d4 ) 801a8ae: f00f f88d bl 80299cc 801a8b2: f06f 0305 mvn.w r3, #5 801a8b6: e004 b.n 801a8c2 (p_to->next == NULL), return ERR_VAL;); } } while (p_from); 801a8b8: 683b ldr r3, [r7, #0] 801a8ba: 2b00 cmp r3, #0 801a8bc: f47f af61 bne.w 801a782 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); return ERR_OK; 801a8c0: 2300 movs r3, #0 } 801a8c2: 4618 mov r0, r3 801a8c4: 3718 adds r7, #24 801a8c6: 46bd mov sp, r7 801a8c8: bd80 pop {r7, pc} 801a8ca: bf00 nop 801a8cc: 0802e0a8 .word 0x0802e0a8 801a8d0: 0802e350 .word 0x0802e350 801a8d4: 0802e108 .word 0x0802e108 801a8d8: 0802e380 .word 0x0802e380 801a8dc: 0802e398 .word 0x0802e398 801a8e0: 0802e3b4 .word 0x0802e3b4 801a8e4: 0802e3c4 .word 0x0802e3c4 0801a8e8 : * @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) { 801a8e8: b580 push {r7, lr} 801a8ea: b088 sub sp, #32 801a8ec: af00 add r7, sp, #0 801a8ee: 60f8 str r0, [r7, #12] 801a8f0: 60b9 str r1, [r7, #8] 801a8f2: 4611 mov r1, r2 801a8f4: 461a mov r2, r3 801a8f6: 460b mov r3, r1 801a8f8: 80fb strh r3, [r7, #6] 801a8fa: 4613 mov r3, r2 801a8fc: 80bb strh r3, [r7, #4] const struct pbuf *p; u16_t left = 0; 801a8fe: 2300 movs r3, #0 801a900: 837b strh r3, [r7, #26] u16_t buf_copy_len; u16_t copied_total = 0; 801a902: 2300 movs r3, #0 801a904: 82fb strh r3, [r7, #22] LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;); 801a906: 68fb ldr r3, [r7, #12] 801a908: 2b00 cmp r3, #0 801a90a: d108 bne.n 801a91e 801a90c: 4b2b ldr r3, [pc, #172] @ (801a9bc ) 801a90e: f240 420a movw r2, #1034 @ 0x40a 801a912: 492b ldr r1, [pc, #172] @ (801a9c0 ) 801a914: 482b ldr r0, [pc, #172] @ (801a9c4 ) 801a916: f00f f859 bl 80299cc 801a91a: 2300 movs r3, #0 801a91c: e04a b.n 801a9b4 LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); 801a91e: 68bb ldr r3, [r7, #8] 801a920: 2b00 cmp r3, #0 801a922: d108 bne.n 801a936 801a924: 4b25 ldr r3, [pc, #148] @ (801a9bc ) 801a926: f240 420b movw r2, #1035 @ 0x40b 801a92a: 4927 ldr r1, [pc, #156] @ (801a9c8 ) 801a92c: 4825 ldr r0, [pc, #148] @ (801a9c4 ) 801a92e: f00f f84d bl 80299cc 801a932: 2300 movs r3, #0 801a934: e03e b.n 801a9b4 /* 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) { 801a936: 68fb ldr r3, [r7, #12] 801a938: 61fb str r3, [r7, #28] 801a93a: e034 b.n 801a9a6 if ((offset != 0) && (offset >= p->len)) { 801a93c: 88bb ldrh r3, [r7, #4] 801a93e: 2b00 cmp r3, #0 801a940: d00a beq.n 801a958 801a942: 69fb ldr r3, [r7, #28] 801a944: 895b ldrh r3, [r3, #10] 801a946: 88ba ldrh r2, [r7, #4] 801a948: 429a cmp r2, r3 801a94a: d305 bcc.n 801a958 /* don't copy from this buffer -> on to the next */ offset = (u16_t)(offset - p->len); 801a94c: 69fb ldr r3, [r7, #28] 801a94e: 895b ldrh r3, [r3, #10] 801a950: 88ba ldrh r2, [r7, #4] 801a952: 1ad3 subs r3, r2, r3 801a954: 80bb strh r3, [r7, #4] 801a956: e023 b.n 801a9a0 } else { /* copy from this buffer. maybe only partially. */ buf_copy_len = (u16_t)(p->len - offset); 801a958: 69fb ldr r3, [r7, #28] 801a95a: 895a ldrh r2, [r3, #10] 801a95c: 88bb ldrh r3, [r7, #4] 801a95e: 1ad3 subs r3, r2, r3 801a960: 833b strh r3, [r7, #24] if (buf_copy_len > len) { 801a962: 8b3a ldrh r2, [r7, #24] 801a964: 88fb ldrh r3, [r7, #6] 801a966: 429a cmp r2, r3 801a968: d901 bls.n 801a96e buf_copy_len = len; 801a96a: 88fb ldrh r3, [r7, #6] 801a96c: 833b strh r3, [r7, #24] } /* copy the necessary parts of the buffer */ MEMCPY(&((char *)dataptr)[left], &((char *)p->payload)[offset], buf_copy_len); 801a96e: 8b7b ldrh r3, [r7, #26] 801a970: 68ba ldr r2, [r7, #8] 801a972: 18d0 adds r0, r2, r3 801a974: 69fb ldr r3, [r7, #28] 801a976: 685a ldr r2, [r3, #4] 801a978: 88bb ldrh r3, [r7, #4] 801a97a: 4413 add r3, r2 801a97c: 8b3a ldrh r2, [r7, #24] 801a97e: 4619 mov r1, r3 801a980: f00f faad bl 8029ede copied_total = (u16_t)(copied_total + buf_copy_len); 801a984: 8afa ldrh r2, [r7, #22] 801a986: 8b3b ldrh r3, [r7, #24] 801a988: 4413 add r3, r2 801a98a: 82fb strh r3, [r7, #22] left = (u16_t)(left + buf_copy_len); 801a98c: 8b7a ldrh r2, [r7, #26] 801a98e: 8b3b ldrh r3, [r7, #24] 801a990: 4413 add r3, r2 801a992: 837b strh r3, [r7, #26] len = (u16_t)(len - buf_copy_len); 801a994: 88fa ldrh r2, [r7, #6] 801a996: 8b3b ldrh r3, [r7, #24] 801a998: 1ad3 subs r3, r2, r3 801a99a: 80fb strh r3, [r7, #6] offset = 0; 801a99c: 2300 movs r3, #0 801a99e: 80bb strh r3, [r7, #4] for (p = buf; len != 0 && p != NULL; p = p->next) { 801a9a0: 69fb ldr r3, [r7, #28] 801a9a2: 681b ldr r3, [r3, #0] 801a9a4: 61fb str r3, [r7, #28] 801a9a6: 88fb ldrh r3, [r7, #6] 801a9a8: 2b00 cmp r3, #0 801a9aa: d002 beq.n 801a9b2 801a9ac: 69fb ldr r3, [r7, #28] 801a9ae: 2b00 cmp r3, #0 801a9b0: d1c4 bne.n 801a93c } } return copied_total; 801a9b2: 8afb ldrh r3, [r7, #22] } 801a9b4: 4618 mov r0, r3 801a9b6: 3720 adds r7, #32 801a9b8: 46bd mov sp, r7 801a9ba: bd80 pop {r7, pc} 801a9bc: 0802e0a8 .word 0x0802e0a8 801a9c0: 0802e3f0 .word 0x0802e3f0 801a9c4: 0802e108 .word 0x0802e108 801a9c8: 0802e410 .word 0x0802e410 0801a9cc : * * @return a new pbuf or NULL if allocation fails */ struct pbuf * pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p) { 801a9cc: b580 push {r7, lr} 801a9ce: b084 sub sp, #16 801a9d0: af00 add r7, sp, #0 801a9d2: 4603 mov r3, r0 801a9d4: 603a str r2, [r7, #0] 801a9d6: 71fb strb r3, [r7, #7] 801a9d8: 460b mov r3, r1 801a9da: 80bb strh r3, [r7, #4] struct pbuf *q; err_t err; q = pbuf_alloc(layer, p->tot_len, type); 801a9dc: 683b ldr r3, [r7, #0] 801a9de: 8919 ldrh r1, [r3, #8] 801a9e0: 88ba ldrh r2, [r7, #4] 801a9e2: 79fb ldrb r3, [r7, #7] 801a9e4: 4618 mov r0, r3 801a9e6: f7ff fa63 bl 8019eb0 801a9ea: 60f8 str r0, [r7, #12] if (q == NULL) { 801a9ec: 68fb ldr r3, [r7, #12] 801a9ee: 2b00 cmp r3, #0 801a9f0: d101 bne.n 801a9f6 return NULL; 801a9f2: 2300 movs r3, #0 801a9f4: e011 b.n 801aa1a } err = pbuf_copy(q, p); 801a9f6: 6839 ldr r1, [r7, #0] 801a9f8: 68f8 ldr r0, [r7, #12] 801a9fa: f7ff fea3 bl 801a744 801a9fe: 4603 mov r3, r0 801aa00: 72fb strb r3, [r7, #11] LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */ LWIP_ASSERT("pbuf_copy failed", err == ERR_OK); 801aa02: f997 300b ldrsb.w r3, [r7, #11] 801aa06: 2b00 cmp r3, #0 801aa08: d006 beq.n 801aa18 801aa0a: 4b06 ldr r3, [pc, #24] @ (801aa24 ) 801aa0c: f240 5224 movw r2, #1316 @ 0x524 801aa10: 4905 ldr r1, [pc, #20] @ (801aa28 ) 801aa12: 4806 ldr r0, [pc, #24] @ (801aa2c ) 801aa14: f00e ffda bl 80299cc return q; 801aa18: 68fb ldr r3, [r7, #12] } 801aa1a: 4618 mov r0, r3 801aa1c: 3710 adds r7, #16 801aa1e: 46bd mov sp, r7 801aa20: bd80 pop {r7, pc} 801aa22: bf00 nop 801aa24: 0802e0a8 .word 0x0802e0a8 801aa28: 0802e51c .word 0x0802e51c 801aa2c: 0802e108 .word 0x0802e108 0801aa30 : /** * Initialize this module. */ void tcp_init(void) { 801aa30: b580 push {r7, lr} 801aa32: af00 add r7, sp, #0 #ifdef LWIP_RAND tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); 801aa34: f00d fca0 bl 8028378 801aa38: 4603 mov r3, r0 801aa3a: b29b uxth r3, r3 801aa3c: f3c3 030d ubfx r3, r3, #0, #14 801aa40: b29b uxth r3, r3 801aa42: f5a3 4380 sub.w r3, r3, #16384 @ 0x4000 801aa46: b29a uxth r2, r3 801aa48: 4b01 ldr r3, [pc, #4] @ (801aa50 ) 801aa4a: 801a strh r2, [r3, #0] #endif /* LWIP_RAND */ } 801aa4c: bf00 nop 801aa4e: bd80 pop {r7, pc} 801aa50: 2400004c .word 0x2400004c 0801aa54 : /** Free a tcp pcb */ void tcp_free(struct tcp_pcb *pcb) { 801aa54: b580 push {r7, lr} 801aa56: b082 sub sp, #8 801aa58: af00 add r7, sp, #0 801aa5a: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN); 801aa5c: 687b ldr r3, [r7, #4] 801aa5e: 7d1b ldrb r3, [r3, #20] 801aa60: 2b01 cmp r3, #1 801aa62: d105 bne.n 801aa70 801aa64: 4b06 ldr r3, [pc, #24] @ (801aa80 ) 801aa66: 22d4 movs r2, #212 @ 0xd4 801aa68: 4906 ldr r1, [pc, #24] @ (801aa84 ) 801aa6a: 4807 ldr r0, [pc, #28] @ (801aa88 ) 801aa6c: f00e ffae bl 80299cc #if LWIP_TCP_PCB_NUM_EXT_ARGS tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args); #endif memp_free(MEMP_TCP_PCB, pcb); 801aa70: 6879 ldr r1, [r7, #4] 801aa72: 2001 movs r0, #1 801aa74: f7fe fe44 bl 8019700 } 801aa78: bf00 nop 801aa7a: 3708 adds r7, #8 801aa7c: 46bd mov sp, r7 801aa7e: bd80 pop {r7, pc} 801aa80: 0802e5a8 .word 0x0802e5a8 801aa84: 0802e5d8 .word 0x0802e5d8 801aa88: 0802e5ec .word 0x0802e5ec 0801aa8c : /** Free a tcp listen pcb */ static void tcp_free_listen(struct tcp_pcb *pcb) { 801aa8c: b580 push {r7, lr} 801aa8e: b082 sub sp, #8 801aa90: af00 add r7, sp, #0 801aa92: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN); 801aa94: 687b ldr r3, [r7, #4] 801aa96: 7d1b ldrb r3, [r3, #20] 801aa98: 2b01 cmp r3, #1 801aa9a: d105 bne.n 801aaa8 801aa9c: 4b06 ldr r3, [pc, #24] @ (801aab8 ) 801aa9e: 22df movs r2, #223 @ 0xdf 801aaa0: 4906 ldr r1, [pc, #24] @ (801aabc ) 801aaa2: 4807 ldr r0, [pc, #28] @ (801aac0 ) 801aaa4: f00e ff92 bl 80299cc #if LWIP_TCP_PCB_NUM_EXT_ARGS tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args); #endif memp_free(MEMP_TCP_PCB_LISTEN, pcb); 801aaa8: 6879 ldr r1, [r7, #4] 801aaaa: 2002 movs r0, #2 801aaac: f7fe fe28 bl 8019700 } 801aab0: bf00 nop 801aab2: 3708 adds r7, #8 801aab4: 46bd mov sp, r7 801aab6: bd80 pop {r7, pc} 801aab8: 0802e5a8 .word 0x0802e5a8 801aabc: 0802e614 .word 0x0802e614 801aac0: 0802e5ec .word 0x0802e5ec 0801aac4 : /** * Called periodically to dispatch TCP timers. */ void tcp_tmr(void) { 801aac4: b580 push {r7, lr} 801aac6: af00 add r7, sp, #0 /* Call tcp_fasttmr() every 250 ms */ tcp_fasttmr(); 801aac8: f001 f86a bl 801bba0 if (++tcp_timer & 1) { 801aacc: 4b07 ldr r3, [pc, #28] @ (801aaec ) 801aace: 781b ldrb r3, [r3, #0] 801aad0: 3301 adds r3, #1 801aad2: b2da uxtb r2, r3 801aad4: 4b05 ldr r3, [pc, #20] @ (801aaec ) 801aad6: 701a strb r2, [r3, #0] 801aad8: 4b04 ldr r3, [pc, #16] @ (801aaec ) 801aada: 781b ldrb r3, [r3, #0] 801aadc: f003 0301 and.w r3, r3, #1 801aae0: 2b00 cmp r3, #0 801aae2: d001 beq.n 801aae8 /* Call tcp_slowtmr() every 500 ms, i.e., every other timer tcp_tmr() is called. */ tcp_slowtmr(); 801aae4: f000 fd1a bl 801b51c } } 801aae8: bf00 nop 801aaea: bd80 pop {r7, pc} 801aaec: 2402ae9d .word 0x2402ae9d 0801aaf0 : /** 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) { 801aaf0: b580 push {r7, lr} 801aaf2: b084 sub sp, #16 801aaf4: af00 add r7, sp, #0 801aaf6: 6078 str r0, [r7, #4] 801aaf8: 6039 str r1, [r7, #0] struct tcp_pcb *pcb; LWIP_ASSERT("tcp_remove_listener: invalid listener", lpcb != NULL); 801aafa: 683b ldr r3, [r7, #0] 801aafc: 2b00 cmp r3, #0 801aafe: d105 bne.n 801ab0c 801ab00: 4b0d ldr r3, [pc, #52] @ (801ab38 ) 801ab02: 22ff movs r2, #255 @ 0xff 801ab04: 490d ldr r1, [pc, #52] @ (801ab3c ) 801ab06: 480e ldr r0, [pc, #56] @ (801ab40 ) 801ab08: f00e ff60 bl 80299cc for (pcb = list; pcb != NULL; pcb = pcb->next) { 801ab0c: 687b ldr r3, [r7, #4] 801ab0e: 60fb str r3, [r7, #12] 801ab10: e00a b.n 801ab28 if (pcb->listener == lpcb) { 801ab12: 68fb ldr r3, [r7, #12] 801ab14: 6fdb ldr r3, [r3, #124] @ 0x7c 801ab16: 683a ldr r2, [r7, #0] 801ab18: 429a cmp r2, r3 801ab1a: d102 bne.n 801ab22 pcb->listener = NULL; 801ab1c: 68fb ldr r3, [r7, #12] 801ab1e: 2200 movs r2, #0 801ab20: 67da str r2, [r3, #124] @ 0x7c for (pcb = list; pcb != NULL; pcb = pcb->next) { 801ab22: 68fb ldr r3, [r7, #12] 801ab24: 68db ldr r3, [r3, #12] 801ab26: 60fb str r3, [r7, #12] 801ab28: 68fb ldr r3, [r7, #12] 801ab2a: 2b00 cmp r3, #0 801ab2c: d1f1 bne.n 801ab12 } } } 801ab2e: bf00 nop 801ab30: bf00 nop 801ab32: 3710 adds r7, #16 801ab34: 46bd mov sp, r7 801ab36: bd80 pop {r7, pc} 801ab38: 0802e5a8 .word 0x0802e5a8 801ab3c: 0802e630 .word 0x0802e630 801ab40: 0802e5ec .word 0x0802e5ec 0801ab44 : /** 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) { 801ab44: b580 push {r7, lr} 801ab46: b084 sub sp, #16 801ab48: af00 add r7, sp, #0 801ab4a: 6078 str r0, [r7, #4] #if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG size_t i; LWIP_ASSERT("pcb != NULL", pcb != NULL); 801ab4c: 687b ldr r3, [r7, #4] 801ab4e: 2b00 cmp r3, #0 801ab50: d106 bne.n 801ab60 801ab52: 4b14 ldr r3, [pc, #80] @ (801aba4 ) 801ab54: f240 1211 movw r2, #273 @ 0x111 801ab58: 4913 ldr r1, [pc, #76] @ (801aba8 ) 801ab5a: 4814 ldr r0, [pc, #80] @ (801abac ) 801ab5c: f00e ff36 bl 80299cc LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN); 801ab60: 687b ldr r3, [r7, #4] 801ab62: 7d1b ldrb r3, [r3, #20] 801ab64: 2b01 cmp r3, #1 801ab66: d006 beq.n 801ab76 801ab68: 4b0e ldr r3, [pc, #56] @ (801aba4 ) 801ab6a: f44f 7289 mov.w r2, #274 @ 0x112 801ab6e: 4910 ldr r1, [pc, #64] @ (801abb0 ) 801ab70: 480e ldr r0, [pc, #56] @ (801abac ) 801ab72: f00e ff2b bl 80299cc for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { 801ab76: 2301 movs r3, #1 801ab78: 60fb str r3, [r7, #12] 801ab7a: e00b b.n 801ab94 tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen *)pcb); 801ab7c: 4a0d ldr r2, [pc, #52] @ (801abb4 ) 801ab7e: 68fb ldr r3, [r7, #12] 801ab80: f852 3023 ldr.w r3, [r2, r3, lsl #2] 801ab84: 681b ldr r3, [r3, #0] 801ab86: 6879 ldr r1, [r7, #4] 801ab88: 4618 mov r0, r3 801ab8a: f7ff ffb1 bl 801aaf0 for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { 801ab8e: 68fb ldr r3, [r7, #12] 801ab90: 3301 adds r3, #1 801ab92: 60fb str r3, [r7, #12] 801ab94: 68fb ldr r3, [r7, #12] 801ab96: 2b03 cmp r3, #3 801ab98: d9f0 bls.n 801ab7c } #endif LWIP_UNUSED_ARG(pcb); } 801ab9a: bf00 nop 801ab9c: bf00 nop 801ab9e: 3710 adds r7, #16 801aba0: 46bd mov sp, r7 801aba2: bd80 pop {r7, pc} 801aba4: 0802e5a8 .word 0x0802e5a8 801aba8: 0802e658 .word 0x0802e658 801abac: 0802e5ec .word 0x0802e5ec 801abb0: 0802e664 .word 0x0802e664 801abb4: 08030bd8 .word 0x08030bd8 0801abb8 : * @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) { 801abb8: b5b0 push {r4, r5, r7, lr} 801abba: b088 sub sp, #32 801abbc: af04 add r7, sp, #16 801abbe: 6078 str r0, [r7, #4] 801abc0: 460b mov r3, r1 801abc2: 70fb strb r3, [r7, #3] LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL); 801abc4: 687b ldr r3, [r7, #4] 801abc6: 2b00 cmp r3, #0 801abc8: d106 bne.n 801abd8 801abca: 4b63 ldr r3, [pc, #396] @ (801ad58 ) 801abcc: f44f 72af mov.w r2, #350 @ 0x15e 801abd0: 4962 ldr r1, [pc, #392] @ (801ad5c ) 801abd2: 4863 ldr r0, [pc, #396] @ (801ad60 ) 801abd4: f00e fefa bl 80299cc if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { 801abd8: 78fb ldrb r3, [r7, #3] 801abda: 2b00 cmp r3, #0 801abdc: d067 beq.n 801acae 801abde: 687b ldr r3, [r7, #4] 801abe0: 7d1b ldrb r3, [r3, #20] 801abe2: 2b04 cmp r3, #4 801abe4: d003 beq.n 801abee 801abe6: 687b ldr r3, [r7, #4] 801abe8: 7d1b ldrb r3, [r3, #20] 801abea: 2b07 cmp r3, #7 801abec: d15f bne.n 801acae if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) { 801abee: 687b ldr r3, [r7, #4] 801abf0: 6f9b ldr r3, [r3, #120] @ 0x78 801abf2: 2b00 cmp r3, #0 801abf4: d105 bne.n 801ac02 801abf6: 687b ldr r3, [r7, #4] 801abf8: 8d1b ldrh r3, [r3, #40] @ 0x28 801abfa: f241 62d0 movw r2, #5840 @ 0x16d0 801abfe: 4293 cmp r3, r2 801ac00: d055 beq.n 801acae /* 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); 801ac02: 687b ldr r3, [r7, #4] 801ac04: 8b5b ldrh r3, [r3, #26] 801ac06: f003 0310 and.w r3, r3, #16 801ac0a: 2b00 cmp r3, #0 801ac0c: d106 bne.n 801ac1c 801ac0e: 4b52 ldr r3, [pc, #328] @ (801ad58 ) 801ac10: f44f 72b2 mov.w r2, #356 @ 0x164 801ac14: 4953 ldr r1, [pc, #332] @ (801ad64 ) 801ac16: 4852 ldr r0, [pc, #328] @ (801ad60 ) 801ac18: f00e fed8 bl 80299cc /* 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, 801ac1c: 687b ldr r3, [r7, #4] 801ac1e: 6d18 ldr r0, [r3, #80] @ 0x50 801ac20: 687b ldr r3, [r7, #4] 801ac22: 6a5c ldr r4, [r3, #36] @ 0x24 801ac24: 687d ldr r5, [r7, #4] 801ac26: 687b ldr r3, [r7, #4] 801ac28: 3304 adds r3, #4 801ac2a: 687a ldr r2, [r7, #4] 801ac2c: 8ad2 ldrh r2, [r2, #22] 801ac2e: 6879 ldr r1, [r7, #4] 801ac30: 8b09 ldrh r1, [r1, #24] 801ac32: 9102 str r1, [sp, #8] 801ac34: 9201 str r2, [sp, #4] 801ac36: 9300 str r3, [sp, #0] 801ac38: 462b mov r3, r5 801ac3a: 4622 mov r2, r4 801ac3c: 4601 mov r1, r0 801ac3e: 6878 ldr r0, [r7, #4] 801ac40: f005 fdfa bl 8020838 pcb->local_port, pcb->remote_port); tcp_pcb_purge(pcb); 801ac44: 6878 ldr r0, [r7, #4] 801ac46: f001 fb67 bl 801c318 TCP_RMV_ACTIVE(pcb); 801ac4a: 4b47 ldr r3, [pc, #284] @ (801ad68 ) 801ac4c: 681b ldr r3, [r3, #0] 801ac4e: 687a ldr r2, [r7, #4] 801ac50: 429a cmp r2, r3 801ac52: d105 bne.n 801ac60 801ac54: 4b44 ldr r3, [pc, #272] @ (801ad68 ) 801ac56: 681b ldr r3, [r3, #0] 801ac58: 68db ldr r3, [r3, #12] 801ac5a: 4a43 ldr r2, [pc, #268] @ (801ad68 ) 801ac5c: 6013 str r3, [r2, #0] 801ac5e: e013 b.n 801ac88 801ac60: 4b41 ldr r3, [pc, #260] @ (801ad68 ) 801ac62: 681b ldr r3, [r3, #0] 801ac64: 60fb str r3, [r7, #12] 801ac66: e00c b.n 801ac82 801ac68: 68fb ldr r3, [r7, #12] 801ac6a: 68db ldr r3, [r3, #12] 801ac6c: 687a ldr r2, [r7, #4] 801ac6e: 429a cmp r2, r3 801ac70: d104 bne.n 801ac7c 801ac72: 687b ldr r3, [r7, #4] 801ac74: 68da ldr r2, [r3, #12] 801ac76: 68fb ldr r3, [r7, #12] 801ac78: 60da str r2, [r3, #12] 801ac7a: e005 b.n 801ac88 801ac7c: 68fb ldr r3, [r7, #12] 801ac7e: 68db ldr r3, [r3, #12] 801ac80: 60fb str r3, [r7, #12] 801ac82: 68fb ldr r3, [r7, #12] 801ac84: 2b00 cmp r3, #0 801ac86: d1ef bne.n 801ac68 801ac88: 687b ldr r3, [r7, #4] 801ac8a: 2200 movs r2, #0 801ac8c: 60da str r2, [r3, #12] 801ac8e: 4b37 ldr r3, [pc, #220] @ (801ad6c ) 801ac90: 2201 movs r2, #1 801ac92: 701a strb r2, [r3, #0] /* Deallocate the pcb since we already sent a RST for it */ if (tcp_input_pcb == pcb) { 801ac94: 4b36 ldr r3, [pc, #216] @ (801ad70 ) 801ac96: 681b ldr r3, [r3, #0] 801ac98: 687a ldr r2, [r7, #4] 801ac9a: 429a cmp r2, r3 801ac9c: d102 bne.n 801aca4 /* prevent using a deallocated pcb: free it from tcp_input later */ tcp_trigger_input_pcb_close(); 801ac9e: f003 ffff bl 801eca0 801aca2: e002 b.n 801acaa } else { tcp_free(pcb); 801aca4: 6878 ldr r0, [r7, #4] 801aca6: f7ff fed5 bl 801aa54 } return ERR_OK; 801acaa: 2300 movs r3, #0 801acac: e050 b.n 801ad50 } } /* - 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) { 801acae: 687b ldr r3, [r7, #4] 801acb0: 7d1b ldrb r3, [r3, #20] 801acb2: 2b02 cmp r3, #2 801acb4: d03b beq.n 801ad2e 801acb6: 2b02 cmp r3, #2 801acb8: dc44 bgt.n 801ad44 801acba: 2b00 cmp r3, #0 801acbc: d002 beq.n 801acc4 801acbe: 2b01 cmp r3, #1 801acc0: d02a beq.n 801ad18 801acc2: e03f b.n 801ad44 * 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) { 801acc4: 687b ldr r3, [r7, #4] 801acc6: 8adb ldrh r3, [r3, #22] 801acc8: 2b00 cmp r3, #0 801acca: d021 beq.n 801ad10 TCP_RMV(&tcp_bound_pcbs, pcb); 801accc: 4b29 ldr r3, [pc, #164] @ (801ad74 ) 801acce: 681b ldr r3, [r3, #0] 801acd0: 687a ldr r2, [r7, #4] 801acd2: 429a cmp r2, r3 801acd4: d105 bne.n 801ace2 801acd6: 4b27 ldr r3, [pc, #156] @ (801ad74 ) 801acd8: 681b ldr r3, [r3, #0] 801acda: 68db ldr r3, [r3, #12] 801acdc: 4a25 ldr r2, [pc, #148] @ (801ad74 ) 801acde: 6013 str r3, [r2, #0] 801ace0: e013 b.n 801ad0a 801ace2: 4b24 ldr r3, [pc, #144] @ (801ad74 ) 801ace4: 681b ldr r3, [r3, #0] 801ace6: 60bb str r3, [r7, #8] 801ace8: e00c b.n 801ad04 801acea: 68bb ldr r3, [r7, #8] 801acec: 68db ldr r3, [r3, #12] 801acee: 687a ldr r2, [r7, #4] 801acf0: 429a cmp r2, r3 801acf2: d104 bne.n 801acfe 801acf4: 687b ldr r3, [r7, #4] 801acf6: 68da ldr r2, [r3, #12] 801acf8: 68bb ldr r3, [r7, #8] 801acfa: 60da str r2, [r3, #12] 801acfc: e005 b.n 801ad0a 801acfe: 68bb ldr r3, [r7, #8] 801ad00: 68db ldr r3, [r3, #12] 801ad02: 60bb str r3, [r7, #8] 801ad04: 68bb ldr r3, [r7, #8] 801ad06: 2b00 cmp r3, #0 801ad08: d1ef bne.n 801acea 801ad0a: 687b ldr r3, [r7, #4] 801ad0c: 2200 movs r2, #0 801ad0e: 60da str r2, [r3, #12] } tcp_free(pcb); 801ad10: 6878 ldr r0, [r7, #4] 801ad12: f7ff fe9f bl 801aa54 break; 801ad16: e01a b.n 801ad4e case LISTEN: tcp_listen_closed(pcb); 801ad18: 6878 ldr r0, [r7, #4] 801ad1a: f7ff ff13 bl 801ab44 tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); 801ad1e: 6879 ldr r1, [r7, #4] 801ad20: 4815 ldr r0, [pc, #84] @ (801ad78 ) 801ad22: f001 fb49 bl 801c3b8 tcp_free_listen(pcb); 801ad26: 6878 ldr r0, [r7, #4] 801ad28: f7ff feb0 bl 801aa8c break; 801ad2c: e00f b.n 801ad4e case SYN_SENT: TCP_PCB_REMOVE_ACTIVE(pcb); 801ad2e: 6879 ldr r1, [r7, #4] 801ad30: 480d ldr r0, [pc, #52] @ (801ad68 ) 801ad32: f001 fb41 bl 801c3b8 801ad36: 4b0d ldr r3, [pc, #52] @ (801ad6c ) 801ad38: 2201 movs r2, #1 801ad3a: 701a strb r2, [r3, #0] tcp_free(pcb); 801ad3c: 6878 ldr r0, [r7, #4] 801ad3e: f7ff fe89 bl 801aa54 MIB2_STATS_INC(mib2.tcpattemptfails); break; 801ad42: e004 b.n 801ad4e default: return tcp_close_shutdown_fin(pcb); 801ad44: 6878 ldr r0, [r7, #4] 801ad46: f000 f819 bl 801ad7c 801ad4a: 4603 mov r3, r0 801ad4c: e000 b.n 801ad50 } return ERR_OK; 801ad4e: 2300 movs r3, #0 } 801ad50: 4618 mov r0, r3 801ad52: 3710 adds r7, #16 801ad54: 46bd mov sp, r7 801ad56: bdb0 pop {r4, r5, r7, pc} 801ad58: 0802e5a8 .word 0x0802e5a8 801ad5c: 0802e67c .word 0x0802e67c 801ad60: 0802e5ec .word 0x0802e5ec 801ad64: 0802e69c .word 0x0802e69c 801ad68: 2402ae94 .word 0x2402ae94 801ad6c: 2402ae9c .word 0x2402ae9c 801ad70: 2402aed8 .word 0x2402aed8 801ad74: 2402ae8c .word 0x2402ae8c 801ad78: 2402ae90 .word 0x2402ae90 0801ad7c : static err_t tcp_close_shutdown_fin(struct tcp_pcb *pcb) { 801ad7c: b580 push {r7, lr} 801ad7e: b084 sub sp, #16 801ad80: af00 add r7, sp, #0 801ad82: 6078 str r0, [r7, #4] err_t err; LWIP_ASSERT("pcb != NULL", pcb != NULL); 801ad84: 687b ldr r3, [r7, #4] 801ad86: 2b00 cmp r3, #0 801ad88: d106 bne.n 801ad98 801ad8a: 4b2e ldr r3, [pc, #184] @ (801ae44 ) 801ad8c: f44f 72ce mov.w r2, #412 @ 0x19c 801ad90: 492d ldr r1, [pc, #180] @ (801ae48 ) 801ad92: 482e ldr r0, [pc, #184] @ (801ae4c ) 801ad94: f00e fe1a bl 80299cc switch (pcb->state) { 801ad98: 687b ldr r3, [r7, #4] 801ad9a: 7d1b ldrb r3, [r3, #20] 801ad9c: 2b07 cmp r3, #7 801ad9e: d020 beq.n 801ade2 801ada0: 2b07 cmp r3, #7 801ada2: dc2b bgt.n 801adfc 801ada4: 2b03 cmp r3, #3 801ada6: d002 beq.n 801adae 801ada8: 2b04 cmp r3, #4 801adaa: d00d beq.n 801adc8 801adac: e026 b.n 801adfc case SYN_RCVD: err = tcp_send_fin(pcb); 801adae: 6878 ldr r0, [r7, #4] 801adb0: f004 fe42 bl 801fa38 801adb4: 4603 mov r3, r0 801adb6: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801adb8: f997 300f ldrsb.w r3, [r7, #15] 801adbc: 2b00 cmp r3, #0 801adbe: d11f bne.n 801ae00 tcp_backlog_accepted(pcb); MIB2_STATS_INC(mib2.tcpattemptfails); pcb->state = FIN_WAIT_1; 801adc0: 687b ldr r3, [r7, #4] 801adc2: 2205 movs r2, #5 801adc4: 751a strb r2, [r3, #20] } break; 801adc6: e01b b.n 801ae00 case ESTABLISHED: err = tcp_send_fin(pcb); 801adc8: 6878 ldr r0, [r7, #4] 801adca: f004 fe35 bl 801fa38 801adce: 4603 mov r3, r0 801add0: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801add2: f997 300f ldrsb.w r3, [r7, #15] 801add6: 2b00 cmp r3, #0 801add8: d114 bne.n 801ae04 MIB2_STATS_INC(mib2.tcpestabresets); pcb->state = FIN_WAIT_1; 801adda: 687b ldr r3, [r7, #4] 801addc: 2205 movs r2, #5 801adde: 751a strb r2, [r3, #20] } break; 801ade0: e010 b.n 801ae04 case CLOSE_WAIT: err = tcp_send_fin(pcb); 801ade2: 6878 ldr r0, [r7, #4] 801ade4: f004 fe28 bl 801fa38 801ade8: 4603 mov r3, r0 801adea: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801adec: f997 300f ldrsb.w r3, [r7, #15] 801adf0: 2b00 cmp r3, #0 801adf2: d109 bne.n 801ae08 MIB2_STATS_INC(mib2.tcpestabresets); pcb->state = LAST_ACK; 801adf4: 687b ldr r3, [r7, #4] 801adf6: 2209 movs r2, #9 801adf8: 751a strb r2, [r3, #20] } break; 801adfa: e005 b.n 801ae08 default: /* Has already been closed, do nothing. */ return ERR_OK; 801adfc: 2300 movs r3, #0 801adfe: e01c b.n 801ae3a break; 801ae00: bf00 nop 801ae02: e002 b.n 801ae0a break; 801ae04: bf00 nop 801ae06: e000 b.n 801ae0a break; 801ae08: bf00 nop } if (err == ERR_OK) { 801ae0a: f997 300f ldrsb.w r3, [r7, #15] 801ae0e: 2b00 cmp r3, #0 801ae10: d103 bne.n 801ae1a /* 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); 801ae12: 6878 ldr r0, [r7, #4] 801ae14: f004 ff4e bl 801fcb4 801ae18: e00d b.n 801ae36 } else if (err == ERR_MEM) { 801ae1a: f997 300f ldrsb.w r3, [r7, #15] 801ae1e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 801ae22: d108 bne.n 801ae36 /* Mark this pcb for closing. Closing is retried from tcp_tmr. */ tcp_set_flags(pcb, TF_CLOSEPEND); 801ae24: 687b ldr r3, [r7, #4] 801ae26: 8b5b ldrh r3, [r3, #26] 801ae28: f043 0308 orr.w r3, r3, #8 801ae2c: b29a uxth r2, r3 801ae2e: 687b ldr r3, [r7, #4] 801ae30: 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; 801ae32: 2300 movs r3, #0 801ae34: e001 b.n 801ae3a } return err; 801ae36: f997 300f ldrsb.w r3, [r7, #15] } 801ae3a: 4618 mov r0, r3 801ae3c: 3710 adds r7, #16 801ae3e: 46bd mov sp, r7 801ae40: bd80 pop {r7, pc} 801ae42: bf00 nop 801ae44: 0802e5a8 .word 0x0802e5a8 801ae48: 0802e658 .word 0x0802e658 801ae4c: 0802e5ec .word 0x0802e5ec 0801ae50 : * @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) { 801ae50: b580 push {r7, lr} 801ae52: b082 sub sp, #8 801ae54: af00 add r7, sp, #0 801ae56: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801ae58: f7f5 fb6a bl 8010530 LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG); 801ae5c: 687b ldr r3, [r7, #4] 801ae5e: 2b00 cmp r3, #0 801ae60: d109 bne.n 801ae76 801ae62: 4b0f ldr r3, [pc, #60] @ (801aea0 ) 801ae64: f44f 72f4 mov.w r2, #488 @ 0x1e8 801ae68: 490e ldr r1, [pc, #56] @ (801aea4 ) 801ae6a: 480f ldr r0, [pc, #60] @ (801aea8 ) 801ae6c: f00e fdae bl 80299cc 801ae70: f06f 030f mvn.w r3, #15 801ae74: e00f b.n 801ae96 LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in ")); tcp_debug_print_state(pcb->state); if (pcb->state != LISTEN) { 801ae76: 687b ldr r3, [r7, #4] 801ae78: 7d1b ldrb r3, [r3, #20] 801ae7a: 2b01 cmp r3, #1 801ae7c: d006 beq.n 801ae8c /* Set a flag not to receive any more data... */ tcp_set_flags(pcb, TF_RXCLOSED); 801ae7e: 687b ldr r3, [r7, #4] 801ae80: 8b5b ldrh r3, [r3, #26] 801ae82: f043 0310 orr.w r3, r3, #16 801ae86: b29a uxth r2, r3 801ae88: 687b ldr r3, [r7, #4] 801ae8a: 835a strh r2, [r3, #26] } /* ... and close */ return tcp_close_shutdown(pcb, 1); 801ae8c: 2101 movs r1, #1 801ae8e: 6878 ldr r0, [r7, #4] 801ae90: f7ff fe92 bl 801abb8 801ae94: 4603 mov r3, r0 } 801ae96: 4618 mov r0, r3 801ae98: 3708 adds r7, #8 801ae9a: 46bd mov sp, r7 801ae9c: bd80 pop {r7, pc} 801ae9e: bf00 nop 801aea0: 0802e5a8 .word 0x0802e5a8 801aea4: 0802e6b8 .word 0x0802e6b8 801aea8: 0802e5ec .word 0x0802e5ec 0801aeac : * @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) { 801aeac: b580 push {r7, lr} 801aeae: b084 sub sp, #16 801aeb0: af00 add r7, sp, #0 801aeb2: 60f8 str r0, [r7, #12] 801aeb4: 60b9 str r1, [r7, #8] 801aeb6: 607a str r2, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801aeb8: f7f5 fb3a bl 8010530 LWIP_ERROR("tcp_shutdown: invalid pcb", pcb != NULL, return ERR_ARG); 801aebc: 68fb ldr r3, [r7, #12] 801aebe: 2b00 cmp r3, #0 801aec0: d109 bne.n 801aed6 801aec2: 4b26 ldr r3, [pc, #152] @ (801af5c ) 801aec4: f240 2207 movw r2, #519 @ 0x207 801aec8: 4925 ldr r1, [pc, #148] @ (801af60 ) 801aeca: 4826 ldr r0, [pc, #152] @ (801af64 ) 801aecc: f00e fd7e bl 80299cc 801aed0: f06f 030f mvn.w r3, #15 801aed4: e03d b.n 801af52 if (pcb->state == LISTEN) { 801aed6: 68fb ldr r3, [r7, #12] 801aed8: 7d1b ldrb r3, [r3, #20] 801aeda: 2b01 cmp r3, #1 801aedc: d102 bne.n 801aee4 return ERR_CONN; 801aede: f06f 030a mvn.w r3, #10 801aee2: e036 b.n 801af52 } if (shut_rx) { 801aee4: 68bb ldr r3, [r7, #8] 801aee6: 2b00 cmp r3, #0 801aee8: d01b beq.n 801af22 /* shut down the receive side: set a flag not to receive any more data... */ tcp_set_flags(pcb, TF_RXCLOSED); 801aeea: 68fb ldr r3, [r7, #12] 801aeec: 8b5b ldrh r3, [r3, #26] 801aeee: f043 0310 orr.w r3, r3, #16 801aef2: b29a uxth r2, r3 801aef4: 68fb ldr r3, [r7, #12] 801aef6: 835a strh r2, [r3, #26] if (shut_tx) { 801aef8: 687b ldr r3, [r7, #4] 801aefa: 2b00 cmp r3, #0 801aefc: d005 beq.n 801af0a /* shutting down the tx AND rx side is the same as closing for the raw API */ return tcp_close_shutdown(pcb, 1); 801aefe: 2101 movs r1, #1 801af00: 68f8 ldr r0, [r7, #12] 801af02: f7ff fe59 bl 801abb8 801af06: 4603 mov r3, r0 801af08: e023 b.n 801af52 } /* ... and free buffered data */ if (pcb->refused_data != NULL) { 801af0a: 68fb ldr r3, [r7, #12] 801af0c: 6f9b ldr r3, [r3, #120] @ 0x78 801af0e: 2b00 cmp r3, #0 801af10: d007 beq.n 801af22 pbuf_free(pcb->refused_data); 801af12: 68fb ldr r3, [r7, #12] 801af14: 6f9b ldr r3, [r3, #120] @ 0x78 801af16: 4618 mov r0, r3 801af18: f7ff fae0 bl 801a4dc pcb->refused_data = NULL; 801af1c: 68fb ldr r3, [r7, #12] 801af1e: 2200 movs r2, #0 801af20: 679a str r2, [r3, #120] @ 0x78 } } if (shut_tx) { 801af22: 687b ldr r3, [r7, #4] 801af24: 2b00 cmp r3, #0 801af26: d013 beq.n 801af50 /* 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) { 801af28: 68fb ldr r3, [r7, #12] 801af2a: 7d1b ldrb r3, [r3, #20] 801af2c: 2b04 cmp r3, #4 801af2e: dc02 bgt.n 801af36 801af30: 2b03 cmp r3, #3 801af32: da02 bge.n 801af3a 801af34: e009 b.n 801af4a 801af36: 2b07 cmp r3, #7 801af38: d107 bne.n 801af4a case SYN_RCVD: case ESTABLISHED: case CLOSE_WAIT: return tcp_close_shutdown(pcb, (u8_t)shut_rx); 801af3a: 68bb ldr r3, [r7, #8] 801af3c: b2db uxtb r3, r3 801af3e: 4619 mov r1, r3 801af40: 68f8 ldr r0, [r7, #12] 801af42: f7ff fe39 bl 801abb8 801af46: 4603 mov r3, r0 801af48: e003 b.n 801af52 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; 801af4a: f06f 030a mvn.w r3, #10 801af4e: e000 b.n 801af52 } } return ERR_OK; 801af50: 2300 movs r3, #0 } 801af52: 4618 mov r0, r3 801af54: 3710 adds r7, #16 801af56: 46bd mov sp, r7 801af58: bd80 pop {r7, pc} 801af5a: bf00 nop 801af5c: 0802e5a8 .word 0x0802e5a8 801af60: 0802e6d0 .word 0x0802e6d0 801af64: 0802e5ec .word 0x0802e5ec 0801af68 : * @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) { 801af68: b580 push {r7, lr} 801af6a: b08e sub sp, #56 @ 0x38 801af6c: af04 add r7, sp, #16 801af6e: 6078 str r0, [r7, #4] 801af70: 6039 str r1, [r7, #0] #if LWIP_CALLBACK_API tcp_err_fn errf; #endif /* LWIP_CALLBACK_API */ void *errf_arg; LWIP_ASSERT_CORE_LOCKED(); 801af72: f7f5 fadd bl 8010530 LWIP_ERROR("tcp_abandon: invalid pcb", pcb != NULL, return); 801af76: 687b ldr r3, [r7, #4] 801af78: 2b00 cmp r3, #0 801af7a: d107 bne.n 801af8c 801af7c: 4b52 ldr r3, [pc, #328] @ (801b0c8 ) 801af7e: f240 223d movw r2, #573 @ 0x23d 801af82: 4952 ldr r1, [pc, #328] @ (801b0cc ) 801af84: 4852 ldr r0, [pc, #328] @ (801b0d0 ) 801af86: f00e fd21 bl 80299cc 801af8a: e099 b.n 801b0c0 /* pcb->state LISTEN not allowed here */ LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs", 801af8c: 687b ldr r3, [r7, #4] 801af8e: 7d1b ldrb r3, [r3, #20] 801af90: 2b01 cmp r3, #1 801af92: d106 bne.n 801afa2 801af94: 4b4c ldr r3, [pc, #304] @ (801b0c8 ) 801af96: f44f 7210 mov.w r2, #576 @ 0x240 801af9a: 494e ldr r1, [pc, #312] @ (801b0d4 ) 801af9c: 484c ldr r0, [pc, #304] @ (801b0d0 ) 801af9e: f00e fd15 bl 80299cc 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) { 801afa2: 687b ldr r3, [r7, #4] 801afa4: 7d1b ldrb r3, [r3, #20] 801afa6: 2b0a cmp r3, #10 801afa8: d107 bne.n 801afba tcp_pcb_remove(&tcp_tw_pcbs, pcb); 801afaa: 6879 ldr r1, [r7, #4] 801afac: 484a ldr r0, [pc, #296] @ (801b0d8 ) 801afae: f001 fa03 bl 801c3b8 tcp_free(pcb); 801afb2: 6878 ldr r0, [r7, #4] 801afb4: f7ff fd4e bl 801aa54 801afb8: e082 b.n 801b0c0 } else { int send_rst = 0; 801afba: 2300 movs r3, #0 801afbc: 627b str r3, [r7, #36] @ 0x24 u16_t local_port = 0; 801afbe: 2300 movs r3, #0 801afc0: 847b strh r3, [r7, #34] @ 0x22 enum tcp_state last_state; seqno = pcb->snd_nxt; 801afc2: 687b ldr r3, [r7, #4] 801afc4: 6d1b ldr r3, [r3, #80] @ 0x50 801afc6: 61bb str r3, [r7, #24] ackno = pcb->rcv_nxt; 801afc8: 687b ldr r3, [r7, #4] 801afca: 6a5b ldr r3, [r3, #36] @ 0x24 801afcc: 617b str r3, [r7, #20] #if LWIP_CALLBACK_API errf = pcb->errf; 801afce: 687b ldr r3, [r7, #4] 801afd0: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801afd4: 613b str r3, [r7, #16] #endif /* LWIP_CALLBACK_API */ errf_arg = pcb->callback_arg; 801afd6: 687b ldr r3, [r7, #4] 801afd8: 691b ldr r3, [r3, #16] 801afda: 60fb str r3, [r7, #12] if (pcb->state == CLOSED) { 801afdc: 687b ldr r3, [r7, #4] 801afde: 7d1b ldrb r3, [r3, #20] 801afe0: 2b00 cmp r3, #0 801afe2: d126 bne.n 801b032 if (pcb->local_port != 0) { 801afe4: 687b ldr r3, [r7, #4] 801afe6: 8adb ldrh r3, [r3, #22] 801afe8: 2b00 cmp r3, #0 801afea: d02e beq.n 801b04a /* bound, not yet opened */ TCP_RMV(&tcp_bound_pcbs, pcb); 801afec: 4b3b ldr r3, [pc, #236] @ (801b0dc ) 801afee: 681b ldr r3, [r3, #0] 801aff0: 687a ldr r2, [r7, #4] 801aff2: 429a cmp r2, r3 801aff4: d105 bne.n 801b002 801aff6: 4b39 ldr r3, [pc, #228] @ (801b0dc ) 801aff8: 681b ldr r3, [r3, #0] 801affa: 68db ldr r3, [r3, #12] 801affc: 4a37 ldr r2, [pc, #220] @ (801b0dc ) 801affe: 6013 str r3, [r2, #0] 801b000: e013 b.n 801b02a 801b002: 4b36 ldr r3, [pc, #216] @ (801b0dc ) 801b004: 681b ldr r3, [r3, #0] 801b006: 61fb str r3, [r7, #28] 801b008: e00c b.n 801b024 801b00a: 69fb ldr r3, [r7, #28] 801b00c: 68db ldr r3, [r3, #12] 801b00e: 687a ldr r2, [r7, #4] 801b010: 429a cmp r2, r3 801b012: d104 bne.n 801b01e 801b014: 687b ldr r3, [r7, #4] 801b016: 68da ldr r2, [r3, #12] 801b018: 69fb ldr r3, [r7, #28] 801b01a: 60da str r2, [r3, #12] 801b01c: e005 b.n 801b02a 801b01e: 69fb ldr r3, [r7, #28] 801b020: 68db ldr r3, [r3, #12] 801b022: 61fb str r3, [r7, #28] 801b024: 69fb ldr r3, [r7, #28] 801b026: 2b00 cmp r3, #0 801b028: d1ef bne.n 801b00a 801b02a: 687b ldr r3, [r7, #4] 801b02c: 2200 movs r2, #0 801b02e: 60da str r2, [r3, #12] 801b030: e00b b.n 801b04a } } else { send_rst = reset; 801b032: 683b ldr r3, [r7, #0] 801b034: 627b str r3, [r7, #36] @ 0x24 local_port = pcb->local_port; 801b036: 687b ldr r3, [r7, #4] 801b038: 8adb ldrh r3, [r3, #22] 801b03a: 847b strh r3, [r7, #34] @ 0x22 TCP_PCB_REMOVE_ACTIVE(pcb); 801b03c: 6879 ldr r1, [r7, #4] 801b03e: 4828 ldr r0, [pc, #160] @ (801b0e0 ) 801b040: f001 f9ba bl 801c3b8 801b044: 4b27 ldr r3, [pc, #156] @ (801b0e4 ) 801b046: 2201 movs r2, #1 801b048: 701a strb r2, [r3, #0] } if (pcb->unacked != NULL) { 801b04a: 687b ldr r3, [r7, #4] 801b04c: 6f1b ldr r3, [r3, #112] @ 0x70 801b04e: 2b00 cmp r3, #0 801b050: d004 beq.n 801b05c tcp_segs_free(pcb->unacked); 801b052: 687b ldr r3, [r7, #4] 801b054: 6f1b ldr r3, [r3, #112] @ 0x70 801b056: 4618 mov r0, r3 801b058: f000 fe84 bl 801bd64 } if (pcb->unsent != NULL) { 801b05c: 687b ldr r3, [r7, #4] 801b05e: 6edb ldr r3, [r3, #108] @ 0x6c 801b060: 2b00 cmp r3, #0 801b062: d004 beq.n 801b06e tcp_segs_free(pcb->unsent); 801b064: 687b ldr r3, [r7, #4] 801b066: 6edb ldr r3, [r3, #108] @ 0x6c 801b068: 4618 mov r0, r3 801b06a: f000 fe7b bl 801bd64 } #if TCP_QUEUE_OOSEQ if (pcb->ooseq != NULL) { 801b06e: 687b ldr r3, [r7, #4] 801b070: 6f5b ldr r3, [r3, #116] @ 0x74 801b072: 2b00 cmp r3, #0 801b074: d004 beq.n 801b080 tcp_segs_free(pcb->ooseq); 801b076: 687b ldr r3, [r7, #4] 801b078: 6f5b ldr r3, [r3, #116] @ 0x74 801b07a: 4618 mov r0, r3 801b07c: f000 fe72 bl 801bd64 } #endif /* TCP_QUEUE_OOSEQ */ tcp_backlog_accepted(pcb); if (send_rst) { 801b080: 6a7b ldr r3, [r7, #36] @ 0x24 801b082: 2b00 cmp r3, #0 801b084: d00e beq.n 801b0a4 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); 801b086: 6879 ldr r1, [r7, #4] 801b088: 687b ldr r3, [r7, #4] 801b08a: 3304 adds r3, #4 801b08c: 687a ldr r2, [r7, #4] 801b08e: 8b12 ldrh r2, [r2, #24] 801b090: 9202 str r2, [sp, #8] 801b092: 8c7a ldrh r2, [r7, #34] @ 0x22 801b094: 9201 str r2, [sp, #4] 801b096: 9300 str r3, [sp, #0] 801b098: 460b mov r3, r1 801b09a: 697a ldr r2, [r7, #20] 801b09c: 69b9 ldr r1, [r7, #24] 801b09e: 6878 ldr r0, [r7, #4] 801b0a0: f005 fbca bl 8020838 } last_state = pcb->state; 801b0a4: 687b ldr r3, [r7, #4] 801b0a6: 7d1b ldrb r3, [r3, #20] 801b0a8: 72fb strb r3, [r7, #11] tcp_free(pcb); 801b0aa: 6878 ldr r0, [r7, #4] 801b0ac: f7ff fcd2 bl 801aa54 TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT); 801b0b0: 693b ldr r3, [r7, #16] 801b0b2: 2b00 cmp r3, #0 801b0b4: d004 beq.n 801b0c0 801b0b6: 693b ldr r3, [r7, #16] 801b0b8: f06f 010c mvn.w r1, #12 801b0bc: 68f8 ldr r0, [r7, #12] 801b0be: 4798 blx r3 } } 801b0c0: 3728 adds r7, #40 @ 0x28 801b0c2: 46bd mov sp, r7 801b0c4: bd80 pop {r7, pc} 801b0c6: bf00 nop 801b0c8: 0802e5a8 .word 0x0802e5a8 801b0cc: 0802e6ec .word 0x0802e6ec 801b0d0: 0802e5ec .word 0x0802e5ec 801b0d4: 0802e708 .word 0x0802e708 801b0d8: 2402ae98 .word 0x2402ae98 801b0dc: 2402ae8c .word 0x2402ae8c 801b0e0: 2402ae94 .word 0x2402ae94 801b0e4: 2402ae9c .word 0x2402ae9c 0801b0e8 : * * @param pcb the tcp pcb to abort */ void tcp_abort(struct tcp_pcb *pcb) { 801b0e8: b580 push {r7, lr} 801b0ea: b082 sub sp, #8 801b0ec: af00 add r7, sp, #0 801b0ee: 6078 str r0, [r7, #4] tcp_abandon(pcb, 1); 801b0f0: 2101 movs r1, #1 801b0f2: 6878 ldr r0, [r7, #4] 801b0f4: f7ff ff38 bl 801af68 } 801b0f8: bf00 nop 801b0fa: 3708 adds r7, #8 801b0fc: 46bd mov sp, r7 801b0fe: bd80 pop {r7, pc} 0801b100 : * 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) { 801b100: b580 push {r7, lr} 801b102: b084 sub sp, #16 801b104: af00 add r7, sp, #0 801b106: 6078 str r0, [r7, #4] u32_t new_right_edge; LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL); 801b108: 687b ldr r3, [r7, #4] 801b10a: 2b00 cmp r3, #0 801b10c: d106 bne.n 801b11c 801b10e: 4b25 ldr r3, [pc, #148] @ (801b1a4 ) 801b110: f240 32a6 movw r2, #934 @ 0x3a6 801b114: 4924 ldr r1, [pc, #144] @ (801b1a8 ) 801b116: 4825 ldr r0, [pc, #148] @ (801b1ac ) 801b118: f00e fc58 bl 80299cc new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; 801b11c: 687b ldr r3, [r7, #4] 801b11e: 6a5b ldr r3, [r3, #36] @ 0x24 801b120: 687a ldr r2, [r7, #4] 801b122: 8d12 ldrh r2, [r2, #40] @ 0x28 801b124: 4413 add r3, r2 801b126: 60fb str r3, [r7, #12] if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 801b128: 687b ldr r3, [r7, #4] 801b12a: 6adb ldr r3, [r3, #44] @ 0x2c 801b12c: 687a ldr r2, [r7, #4] 801b12e: 8e52 ldrh r2, [r2, #50] @ 0x32 801b130: f640 3168 movw r1, #2920 @ 0xb68 801b134: 428a cmp r2, r1 801b136: bf28 it cs 801b138: 460a movcs r2, r1 801b13a: b292 uxth r2, r2 801b13c: 4413 add r3, r2 801b13e: 68fa ldr r2, [r7, #12] 801b140: 1ad3 subs r3, r2, r3 801b142: 2b00 cmp r3, #0 801b144: db08 blt.n 801b158 /* we can advertise more window */ pcb->rcv_ann_wnd = pcb->rcv_wnd; 801b146: 687b ldr r3, [r7, #4] 801b148: 8d1a ldrh r2, [r3, #40] @ 0x28 801b14a: 687b ldr r3, [r7, #4] 801b14c: 855a strh r2, [r3, #42] @ 0x2a return new_right_edge - pcb->rcv_ann_right_edge; 801b14e: 687b ldr r3, [r7, #4] 801b150: 6adb ldr r3, [r3, #44] @ 0x2c 801b152: 68fa ldr r2, [r7, #12] 801b154: 1ad3 subs r3, r2, r3 801b156: e020 b.n 801b19a } else { if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) { 801b158: 687b ldr r3, [r7, #4] 801b15a: 6a5a ldr r2, [r3, #36] @ 0x24 801b15c: 687b ldr r3, [r7, #4] 801b15e: 6adb ldr r3, [r3, #44] @ 0x2c 801b160: 1ad3 subs r3, r2, r3 801b162: 2b00 cmp r3, #0 801b164: dd03 ble.n 801b16e /* 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; 801b166: 687b ldr r3, [r7, #4] 801b168: 2200 movs r2, #0 801b16a: 855a strh r2, [r3, #42] @ 0x2a 801b16c: e014 b.n 801b198 } else { /* keep the right edge of window constant */ u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt; 801b16e: 687b ldr r3, [r7, #4] 801b170: 6ada ldr r2, [r3, #44] @ 0x2c 801b172: 687b ldr r3, [r7, #4] 801b174: 6a5b ldr r3, [r3, #36] @ 0x24 801b176: 1ad3 subs r3, r2, r3 801b178: 60bb str r3, [r7, #8] #if !LWIP_WND_SCALE LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff); 801b17a: 68bb ldr r3, [r7, #8] 801b17c: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 801b180: d306 bcc.n 801b190 801b182: 4b08 ldr r3, [pc, #32] @ (801b1a4 ) 801b184: f240 32b6 movw r2, #950 @ 0x3b6 801b188: 4909 ldr r1, [pc, #36] @ (801b1b0 ) 801b18a: 4808 ldr r0, [pc, #32] @ (801b1ac ) 801b18c: f00e fc1e bl 80299cc #endif pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd; 801b190: 68bb ldr r3, [r7, #8] 801b192: b29a uxth r2, r3 801b194: 687b ldr r3, [r7, #4] 801b196: 855a strh r2, [r3, #42] @ 0x2a } return 0; 801b198: 2300 movs r3, #0 } } 801b19a: 4618 mov r0, r3 801b19c: 3710 adds r7, #16 801b19e: 46bd mov sp, r7 801b1a0: bd80 pop {r7, pc} 801b1a2: bf00 nop 801b1a4: 0802e5a8 .word 0x0802e5a8 801b1a8: 0802e804 .word 0x0802e804 801b1ac: 0802e5ec .word 0x0802e5ec 801b1b0: 0802e828 .word 0x0802e828 0801b1b4 : * @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) { 801b1b4: b580 push {r7, lr} 801b1b6: b084 sub sp, #16 801b1b8: af00 add r7, sp, #0 801b1ba: 6078 str r0, [r7, #4] 801b1bc: 460b mov r3, r1 801b1be: 807b strh r3, [r7, #2] u32_t wnd_inflation; tcpwnd_size_t rcv_wnd; LWIP_ASSERT_CORE_LOCKED(); 801b1c0: f7f5 f9b6 bl 8010530 LWIP_ERROR("tcp_recved: invalid pcb", pcb != NULL, return); 801b1c4: 687b ldr r3, [r7, #4] 801b1c6: 2b00 cmp r3, #0 801b1c8: d107 bne.n 801b1da 801b1ca: 4b20 ldr r3, [pc, #128] @ (801b24c ) 801b1cc: f240 32cf movw r2, #975 @ 0x3cf 801b1d0: 491f ldr r1, [pc, #124] @ (801b250 ) 801b1d2: 4820 ldr r0, [pc, #128] @ (801b254 ) 801b1d4: f00e fbfa bl 80299cc 801b1d8: e034 b.n 801b244 /* pcb->state LISTEN not allowed here */ LWIP_ASSERT("don't call tcp_recved for listen-pcbs", 801b1da: 687b ldr r3, [r7, #4] 801b1dc: 7d1b ldrb r3, [r3, #20] 801b1de: 2b01 cmp r3, #1 801b1e0: d106 bne.n 801b1f0 801b1e2: 4b1a ldr r3, [pc, #104] @ (801b24c ) 801b1e4: f240 32d2 movw r2, #978 @ 0x3d2 801b1e8: 491b ldr r1, [pc, #108] @ (801b258 ) 801b1ea: 481a ldr r0, [pc, #104] @ (801b254 ) 801b1ec: f00e fbee bl 80299cc pcb->state != LISTEN); rcv_wnd = (tcpwnd_size_t)(pcb->rcv_wnd + len); 801b1f0: 687b ldr r3, [r7, #4] 801b1f2: 8d1a ldrh r2, [r3, #40] @ 0x28 801b1f4: 887b ldrh r3, [r7, #2] 801b1f6: 4413 add r3, r2 801b1f8: 81fb strh r3, [r7, #14] if ((rcv_wnd > TCP_WND_MAX(pcb)) || (rcv_wnd < pcb->rcv_wnd)) { 801b1fa: 89fb ldrh r3, [r7, #14] 801b1fc: f241 62d0 movw r2, #5840 @ 0x16d0 801b200: 4293 cmp r3, r2 801b202: d804 bhi.n 801b20e 801b204: 687b ldr r3, [r7, #4] 801b206: 8d1b ldrh r3, [r3, #40] @ 0x28 801b208: 89fa ldrh r2, [r7, #14] 801b20a: 429a cmp r2, r3 801b20c: d204 bcs.n 801b218 /* 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); 801b20e: 687b ldr r3, [r7, #4] 801b210: f241 62d0 movw r2, #5840 @ 0x16d0 801b214: 851a strh r2, [r3, #40] @ 0x28 801b216: e002 b.n 801b21e } else { pcb->rcv_wnd = rcv_wnd; 801b218: 687b ldr r3, [r7, #4] 801b21a: 89fa ldrh r2, [r7, #14] 801b21c: 851a strh r2, [r3, #40] @ 0x28 } wnd_inflation = tcp_update_rcv_ann_wnd(pcb); 801b21e: 6878 ldr r0, [r7, #4] 801b220: f7ff ff6e bl 801b100 801b224: 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) { 801b226: 68bb ldr r3, [r7, #8] 801b228: f240 52b3 movw r2, #1459 @ 0x5b3 801b22c: 4293 cmp r3, r2 801b22e: d909 bls.n 801b244 tcp_ack_now(pcb); 801b230: 687b ldr r3, [r7, #4] 801b232: 8b5b ldrh r3, [r3, #26] 801b234: f043 0302 orr.w r3, r3, #2 801b238: b29a uxth r2, r3 801b23a: 687b ldr r3, [r7, #4] 801b23c: 835a strh r2, [r3, #26] tcp_output(pcb); 801b23e: 6878 ldr r0, [r7, #4] 801b240: f004 fd38 bl 801fcb4 } 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))); } 801b244: 3710 adds r7, #16 801b246: 46bd mov sp, r7 801b248: bd80 pop {r7, pc} 801b24a: bf00 nop 801b24c: 0802e5a8 .word 0x0802e5a8 801b250: 0802e844 .word 0x0802e844 801b254: 0802e5ec .word 0x0802e5ec 801b258: 0802e85c .word 0x0802e85c 0801b25c : * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 801b25c: b480 push {r7} 801b25e: b083 sub sp, #12 801b260: af00 add r7, sp, #0 u8_t i; u16_t n = 0; 801b262: 2300 movs r3, #0 801b264: 80bb strh r3, [r7, #4] struct tcp_pcb *pcb; again: tcp_port++; 801b266: 4b1e ldr r3, [pc, #120] @ (801b2e0 ) 801b268: 881b ldrh r3, [r3, #0] 801b26a: 3301 adds r3, #1 801b26c: b29a uxth r2, r3 801b26e: 4b1c ldr r3, [pc, #112] @ (801b2e0 ) 801b270: 801a strh r2, [r3, #0] if (tcp_port == TCP_LOCAL_PORT_RANGE_END) { 801b272: 4b1b ldr r3, [pc, #108] @ (801b2e0 ) 801b274: 881b ldrh r3, [r3, #0] 801b276: f64f 72ff movw r2, #65535 @ 0xffff 801b27a: 4293 cmp r3, r2 801b27c: d103 bne.n 801b286 tcp_port = TCP_LOCAL_PORT_RANGE_START; 801b27e: 4b18 ldr r3, [pc, #96] @ (801b2e0 ) 801b280: f44f 4240 mov.w r2, #49152 @ 0xc000 801b284: 801a strh r2, [r3, #0] } /* Check all PCB lists. */ for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { 801b286: 2300 movs r3, #0 801b288: 71fb strb r3, [r7, #7] 801b28a: e01e b.n 801b2ca for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 801b28c: 79fb ldrb r3, [r7, #7] 801b28e: 4a15 ldr r2, [pc, #84] @ (801b2e4 ) 801b290: f852 3023 ldr.w r3, [r2, r3, lsl #2] 801b294: 681b ldr r3, [r3, #0] 801b296: 603b str r3, [r7, #0] 801b298: e011 b.n 801b2be if (pcb->local_port == tcp_port) { 801b29a: 683b ldr r3, [r7, #0] 801b29c: 8ada ldrh r2, [r3, #22] 801b29e: 4b10 ldr r3, [pc, #64] @ (801b2e0 ) 801b2a0: 881b ldrh r3, [r3, #0] 801b2a2: 429a cmp r2, r3 801b2a4: d108 bne.n 801b2b8 n++; 801b2a6: 88bb ldrh r3, [r7, #4] 801b2a8: 3301 adds r3, #1 801b2aa: 80bb strh r3, [r7, #4] if (n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { 801b2ac: 88bb ldrh r3, [r7, #4] 801b2ae: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 801b2b2: d3d8 bcc.n 801b266 return 0; 801b2b4: 2300 movs r3, #0 801b2b6: e00d b.n 801b2d4 for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 801b2b8: 683b ldr r3, [r7, #0] 801b2ba: 68db ldr r3, [r3, #12] 801b2bc: 603b str r3, [r7, #0] 801b2be: 683b ldr r3, [r7, #0] 801b2c0: 2b00 cmp r3, #0 801b2c2: d1ea bne.n 801b29a for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { 801b2c4: 79fb ldrb r3, [r7, #7] 801b2c6: 3301 adds r3, #1 801b2c8: 71fb strb r3, [r7, #7] 801b2ca: 79fb ldrb r3, [r7, #7] 801b2cc: 2b03 cmp r3, #3 801b2ce: d9dd bls.n 801b28c } goto again; } } } return tcp_port; 801b2d0: 4b03 ldr r3, [pc, #12] @ (801b2e0 ) 801b2d2: 881b ldrh r3, [r3, #0] } 801b2d4: 4618 mov r0, r3 801b2d6: 370c adds r7, #12 801b2d8: 46bd mov sp, r7 801b2da: f85d 7b04 ldr.w r7, [sp], #4 801b2de: 4770 bx lr 801b2e0: 2400004c .word 0x2400004c 801b2e4: 08030bd8 .word 0x08030bd8 0801b2e8 : * 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) { 801b2e8: b580 push {r7, lr} 801b2ea: b08a sub sp, #40 @ 0x28 801b2ec: af00 add r7, sp, #0 801b2ee: 60f8 str r0, [r7, #12] 801b2f0: 60b9 str r1, [r7, #8] 801b2f2: 603b str r3, [r7, #0] 801b2f4: 4613 mov r3, r2 801b2f6: 80fb strh r3, [r7, #6] struct netif *netif = NULL; 801b2f8: 2300 movs r3, #0 801b2fa: 627b str r3, [r7, #36] @ 0x24 err_t ret; u32_t iss; u16_t old_local_port; LWIP_ASSERT_CORE_LOCKED(); 801b2fc: f7f5 f918 bl 8010530 LWIP_ERROR("tcp_connect: invalid pcb", pcb != NULL, return ERR_ARG); 801b300: 68fb ldr r3, [r7, #12] 801b302: 2b00 cmp r3, #0 801b304: d109 bne.n 801b31a 801b306: 4b7d ldr r3, [pc, #500] @ (801b4fc ) 801b308: f240 4235 movw r2, #1077 @ 0x435 801b30c: 497c ldr r1, [pc, #496] @ (801b500 ) 801b30e: 487d ldr r0, [pc, #500] @ (801b504 ) 801b310: f00e fb5c bl 80299cc 801b314: f06f 030f mvn.w r3, #15 801b318: e0ec b.n 801b4f4 LWIP_ERROR("tcp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG); 801b31a: 68bb ldr r3, [r7, #8] 801b31c: 2b00 cmp r3, #0 801b31e: d109 bne.n 801b334 801b320: 4b76 ldr r3, [pc, #472] @ (801b4fc ) 801b322: f240 4236 movw r2, #1078 @ 0x436 801b326: 4978 ldr r1, [pc, #480] @ (801b508 ) 801b328: 4876 ldr r0, [pc, #472] @ (801b504 ) 801b32a: f00e fb4f bl 80299cc 801b32e: f06f 030f mvn.w r3, #15 801b332: e0df b.n 801b4f4 LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN); 801b334: 68fb ldr r3, [r7, #12] 801b336: 7d1b ldrb r3, [r3, #20] 801b338: 2b00 cmp r3, #0 801b33a: d009 beq.n 801b350 801b33c: 4b6f ldr r3, [pc, #444] @ (801b4fc ) 801b33e: f44f 6287 mov.w r2, #1080 @ 0x438 801b342: 4972 ldr r1, [pc, #456] @ (801b50c ) 801b344: 486f ldr r0, [pc, #444] @ (801b504 ) 801b346: f00e fb41 bl 80299cc 801b34a: f06f 0309 mvn.w r3, #9 801b34e: e0d1 b.n 801b4f4 LWIP_DEBUGF(TCP_DEBUG, ("tcp_connect to port %"U16_F"\n", port)); ip_addr_set(&pcb->remote_ip, ipaddr); 801b350: 68bb ldr r3, [r7, #8] 801b352: 2b00 cmp r3, #0 801b354: d002 beq.n 801b35c 801b356: 68bb ldr r3, [r7, #8] 801b358: 681b ldr r3, [r3, #0] 801b35a: e000 b.n 801b35e 801b35c: 2300 movs r3, #0 801b35e: 68fa ldr r2, [r7, #12] 801b360: 6053 str r3, [r2, #4] pcb->remote_port = port; 801b362: 68fb ldr r3, [r7, #12] 801b364: 88fa ldrh r2, [r7, #6] 801b366: 831a strh r2, [r3, #24] if (pcb->netif_idx != NETIF_NO_INDEX) { 801b368: 68fb ldr r3, [r7, #12] 801b36a: 7a1b ldrb r3, [r3, #8] 801b36c: 2b00 cmp r3, #0 801b36e: d006 beq.n 801b37e netif = netif_get_by_index(pcb->netif_idx); 801b370: 68fb ldr r3, [r7, #12] 801b372: 7a1b ldrb r3, [r3, #8] 801b374: 4618 mov r0, r3 801b376: f7fe fcf1 bl 8019d5c 801b37a: 6278 str r0, [r7, #36] @ 0x24 801b37c: e005 b.n 801b38a } else { /* check if we have a route to the remote host */ netif = ip_route(&pcb->local_ip, &pcb->remote_ip); 801b37e: 68fb ldr r3, [r7, #12] 801b380: 3304 adds r3, #4 801b382: 4618 mov r0, r3 801b384: f009 fb14 bl 80249b0 801b388: 6278 str r0, [r7, #36] @ 0x24 } if (netif == NULL) { 801b38a: 6a7b ldr r3, [r7, #36] @ 0x24 801b38c: 2b00 cmp r3, #0 801b38e: d102 bne.n 801b396 /* Don't even try to send a SYN packet if we have no route since that will fail. */ return ERR_RTE; 801b390: f06f 0303 mvn.w r3, #3 801b394: e0ae b.n 801b4f4 } /* check if local IP has been assigned to pcb, if not, get one */ if (ip_addr_isany(&pcb->local_ip)) { 801b396: 68fb ldr r3, [r7, #12] 801b398: 2b00 cmp r3, #0 801b39a: d003 beq.n 801b3a4 801b39c: 68fb ldr r3, [r7, #12] 801b39e: 681b ldr r3, [r3, #0] 801b3a0: 2b00 cmp r3, #0 801b3a2: d111 bne.n 801b3c8 const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, ipaddr); 801b3a4: 6a7b ldr r3, [r7, #36] @ 0x24 801b3a6: 2b00 cmp r3, #0 801b3a8: d002 beq.n 801b3b0 801b3aa: 6a7b ldr r3, [r7, #36] @ 0x24 801b3ac: 3304 adds r3, #4 801b3ae: e000 b.n 801b3b2 801b3b0: 2300 movs r3, #0 801b3b2: 61fb str r3, [r7, #28] if (local_ip == NULL) { 801b3b4: 69fb ldr r3, [r7, #28] 801b3b6: 2b00 cmp r3, #0 801b3b8: d102 bne.n 801b3c0 return ERR_RTE; 801b3ba: f06f 0303 mvn.w r3, #3 801b3be: e099 b.n 801b4f4 } ip_addr_copy(pcb->local_ip, *local_ip); 801b3c0: 69fb ldr r3, [r7, #28] 801b3c2: 681a ldr r2, [r3, #0] 801b3c4: 68fb ldr r3, [r7, #12] 801b3c6: 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; 801b3c8: 68fb ldr r3, [r7, #12] 801b3ca: 8adb ldrh r3, [r3, #22] 801b3cc: 837b strh r3, [r7, #26] if (pcb->local_port == 0) { 801b3ce: 68fb ldr r3, [r7, #12] 801b3d0: 8adb ldrh r3, [r3, #22] 801b3d2: 2b00 cmp r3, #0 801b3d4: d10c bne.n 801b3f0 pcb->local_port = tcp_new_port(); 801b3d6: f7ff ff41 bl 801b25c 801b3da: 4603 mov r3, r0 801b3dc: 461a mov r2, r3 801b3de: 68fb ldr r3, [r7, #12] 801b3e0: 82da strh r2, [r3, #22] if (pcb->local_port == 0) { 801b3e2: 68fb ldr r3, [r7, #12] 801b3e4: 8adb ldrh r3, [r3, #22] 801b3e6: 2b00 cmp r3, #0 801b3e8: d102 bne.n 801b3f0 return ERR_BUF; 801b3ea: f06f 0301 mvn.w r3, #1 801b3ee: e081 b.n 801b4f4 } } #endif /* SO_REUSE */ } iss = tcp_next_iss(pcb); 801b3f0: 68f8 ldr r0, [r7, #12] 801b3f2: f001 f875 bl 801c4e0 801b3f6: 6178 str r0, [r7, #20] pcb->rcv_nxt = 0; 801b3f8: 68fb ldr r3, [r7, #12] 801b3fa: 2200 movs r2, #0 801b3fc: 625a str r2, [r3, #36] @ 0x24 pcb->snd_nxt = iss; 801b3fe: 68fb ldr r3, [r7, #12] 801b400: 697a ldr r2, [r7, #20] 801b402: 651a str r2, [r3, #80] @ 0x50 pcb->lastack = iss - 1; 801b404: 697b ldr r3, [r7, #20] 801b406: 1e5a subs r2, r3, #1 801b408: 68fb ldr r3, [r7, #12] 801b40a: 645a str r2, [r3, #68] @ 0x44 pcb->snd_wl2 = iss - 1; 801b40c: 697b ldr r3, [r7, #20] 801b40e: 1e5a subs r2, r3, #1 801b410: 68fb ldr r3, [r7, #12] 801b412: 659a str r2, [r3, #88] @ 0x58 pcb->snd_lbb = iss - 1; 801b414: 697b ldr r3, [r7, #20] 801b416: 1e5a subs r2, r3, #1 801b418: 68fb ldr r3, [r7, #12] 801b41a: 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); 801b41c: 68fb ldr r3, [r7, #12] 801b41e: f241 62d0 movw r2, #5840 @ 0x16d0 801b422: 855a strh r2, [r3, #42] @ 0x2a 801b424: 68fb ldr r3, [r7, #12] 801b426: 8d5a ldrh r2, [r3, #42] @ 0x2a 801b428: 68fb ldr r3, [r7, #12] 801b42a: 851a strh r2, [r3, #40] @ 0x28 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 801b42c: 68fb ldr r3, [r7, #12] 801b42e: 6a5a ldr r2, [r3, #36] @ 0x24 801b430: 68fb ldr r3, [r7, #12] 801b432: 62da str r2, [r3, #44] @ 0x2c pcb->snd_wnd = TCP_WND; 801b434: 68fb ldr r3, [r7, #12] 801b436: f241 62d0 movw r2, #5840 @ 0x16d0 801b43a: 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; 801b43e: 68fb ldr r3, [r7, #12] 801b440: f44f 7206 mov.w r2, #536 @ 0x218 801b444: 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); 801b446: 68fb ldr r3, [r7, #12] 801b448: 8e58 ldrh r0, [r3, #50] @ 0x32 801b44a: 68fb ldr r3, [r7, #12] 801b44c: 3304 adds r3, #4 801b44e: 461a mov r2, r3 801b450: 6a79 ldr r1, [r7, #36] @ 0x24 801b452: f001 f86b bl 801c52c 801b456: 4603 mov r3, r0 801b458: 461a mov r2, r3 801b45a: 68fb ldr r3, [r7, #12] 801b45c: 865a strh r2, [r3, #50] @ 0x32 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ pcb->cwnd = 1; 801b45e: 68fb ldr r3, [r7, #12] 801b460: 2201 movs r2, #1 801b462: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 #if LWIP_CALLBACK_API pcb->connected = connected; 801b466: 68fb ldr r3, [r7, #12] 801b468: 683a ldr r2, [r7, #0] 801b46a: 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); 801b46e: 2102 movs r1, #2 801b470: 68f8 ldr r0, [r7, #12] 801b472: f004 fb31 bl 801fad8 801b476: 4603 mov r3, r0 801b478: 74fb strb r3, [r7, #19] if (ret == ERR_OK) { 801b47a: f997 3013 ldrsb.w r3, [r7, #19] 801b47e: 2b00 cmp r3, #0 801b480: d136 bne.n 801b4f0 /* SYN segment was enqueued, changed the pcbs state now */ pcb->state = SYN_SENT; 801b482: 68fb ldr r3, [r7, #12] 801b484: 2202 movs r2, #2 801b486: 751a strb r2, [r3, #20] if (old_local_port != 0) { 801b488: 8b7b ldrh r3, [r7, #26] 801b48a: 2b00 cmp r3, #0 801b48c: d021 beq.n 801b4d2 TCP_RMV(&tcp_bound_pcbs, pcb); 801b48e: 4b20 ldr r3, [pc, #128] @ (801b510 ) 801b490: 681b ldr r3, [r3, #0] 801b492: 68fa ldr r2, [r7, #12] 801b494: 429a cmp r2, r3 801b496: d105 bne.n 801b4a4 801b498: 4b1d ldr r3, [pc, #116] @ (801b510 ) 801b49a: 681b ldr r3, [r3, #0] 801b49c: 68db ldr r3, [r3, #12] 801b49e: 4a1c ldr r2, [pc, #112] @ (801b510 ) 801b4a0: 6013 str r3, [r2, #0] 801b4a2: e013 b.n 801b4cc 801b4a4: 4b1a ldr r3, [pc, #104] @ (801b510 ) 801b4a6: 681b ldr r3, [r3, #0] 801b4a8: 623b str r3, [r7, #32] 801b4aa: e00c b.n 801b4c6 801b4ac: 6a3b ldr r3, [r7, #32] 801b4ae: 68db ldr r3, [r3, #12] 801b4b0: 68fa ldr r2, [r7, #12] 801b4b2: 429a cmp r2, r3 801b4b4: d104 bne.n 801b4c0 801b4b6: 68fb ldr r3, [r7, #12] 801b4b8: 68da ldr r2, [r3, #12] 801b4ba: 6a3b ldr r3, [r7, #32] 801b4bc: 60da str r2, [r3, #12] 801b4be: e005 b.n 801b4cc 801b4c0: 6a3b ldr r3, [r7, #32] 801b4c2: 68db ldr r3, [r3, #12] 801b4c4: 623b str r3, [r7, #32] 801b4c6: 6a3b ldr r3, [r7, #32] 801b4c8: 2b00 cmp r3, #0 801b4ca: d1ef bne.n 801b4ac 801b4cc: 68fb ldr r3, [r7, #12] 801b4ce: 2200 movs r2, #0 801b4d0: 60da str r2, [r3, #12] } TCP_REG_ACTIVE(pcb); 801b4d2: 4b10 ldr r3, [pc, #64] @ (801b514 ) 801b4d4: 681a ldr r2, [r3, #0] 801b4d6: 68fb ldr r3, [r7, #12] 801b4d8: 60da str r2, [r3, #12] 801b4da: 4a0e ldr r2, [pc, #56] @ (801b514 ) 801b4dc: 68fb ldr r3, [r7, #12] 801b4de: 6013 str r3, [r2, #0] 801b4e0: f005 fb6c bl 8020bbc 801b4e4: 4b0c ldr r3, [pc, #48] @ (801b518 ) 801b4e6: 2201 movs r2, #1 801b4e8: 701a strb r2, [r3, #0] MIB2_STATS_INC(mib2.tcpactiveopens); tcp_output(pcb); 801b4ea: 68f8 ldr r0, [r7, #12] 801b4ec: f004 fbe2 bl 801fcb4 } return ret; 801b4f0: f997 3013 ldrsb.w r3, [r7, #19] } 801b4f4: 4618 mov r0, r3 801b4f6: 3728 adds r7, #40 @ 0x28 801b4f8: 46bd mov sp, r7 801b4fa: bd80 pop {r7, pc} 801b4fc: 0802e5a8 .word 0x0802e5a8 801b500: 0802e884 .word 0x0802e884 801b504: 0802e5ec .word 0x0802e5ec 801b508: 0802e8a0 .word 0x0802e8a0 801b50c: 0802e8bc .word 0x0802e8bc 801b510: 2402ae8c .word 0x2402ae8c 801b514: 2402ae94 .word 0x2402ae94 801b518: 2402ae9c .word 0x2402ae9c 0801b51c : * * Automatically called from tcp_tmr(). */ void tcp_slowtmr(void) { 801b51c: b5b0 push {r4, r5, r7, lr} 801b51e: b090 sub sp, #64 @ 0x40 801b520: 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; 801b522: 2300 movs r3, #0 801b524: f887 3025 strb.w r3, [r7, #37] @ 0x25 ++tcp_ticks; 801b528: 4b95 ldr r3, [pc, #596] @ (801b780 ) 801b52a: 681b ldr r3, [r3, #0] 801b52c: 3301 adds r3, #1 801b52e: 4a94 ldr r2, [pc, #592] @ (801b780 ) 801b530: 6013 str r3, [r2, #0] ++tcp_timer_ctr; 801b532: 4b94 ldr r3, [pc, #592] @ (801b784 ) 801b534: 781b ldrb r3, [r3, #0] 801b536: 3301 adds r3, #1 801b538: b2da uxtb r2, r3 801b53a: 4b92 ldr r3, [pc, #584] @ (801b784 ) 801b53c: 701a strb r2, [r3, #0] 801b53e: e000 b.n 801b542 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; 801b540: bf00 nop prev = NULL; 801b542: 2300 movs r3, #0 801b544: 62bb str r3, [r7, #40] @ 0x28 pcb = tcp_active_pcbs; 801b546: 4b90 ldr r3, [pc, #576] @ (801b788 ) 801b548: 681b ldr r3, [r3, #0] 801b54a: 62fb str r3, [r7, #44] @ 0x2c while (pcb != NULL) { 801b54c: e29d b.n 801ba8a LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED); 801b54e: 6afb ldr r3, [r7, #44] @ 0x2c 801b550: 7d1b ldrb r3, [r3, #20] 801b552: 2b00 cmp r3, #0 801b554: d106 bne.n 801b564 801b556: 4b8d ldr r3, [pc, #564] @ (801b78c ) 801b558: f240 42be movw r2, #1214 @ 0x4be 801b55c: 498c ldr r1, [pc, #560] @ (801b790 ) 801b55e: 488d ldr r0, [pc, #564] @ (801b794 ) 801b560: f00e fa34 bl 80299cc LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN); 801b564: 6afb ldr r3, [r7, #44] @ 0x2c 801b566: 7d1b ldrb r3, [r3, #20] 801b568: 2b01 cmp r3, #1 801b56a: d106 bne.n 801b57a 801b56c: 4b87 ldr r3, [pc, #540] @ (801b78c ) 801b56e: f240 42bf movw r2, #1215 @ 0x4bf 801b572: 4989 ldr r1, [pc, #548] @ (801b798 ) 801b574: 4887 ldr r0, [pc, #540] @ (801b794 ) 801b576: f00e fa29 bl 80299cc LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT); 801b57a: 6afb ldr r3, [r7, #44] @ 0x2c 801b57c: 7d1b ldrb r3, [r3, #20] 801b57e: 2b0a cmp r3, #10 801b580: d106 bne.n 801b590 801b582: 4b82 ldr r3, [pc, #520] @ (801b78c ) 801b584: f44f 6298 mov.w r2, #1216 @ 0x4c0 801b588: 4984 ldr r1, [pc, #528] @ (801b79c ) 801b58a: 4882 ldr r0, [pc, #520] @ (801b794 ) 801b58c: f00e fa1e bl 80299cc if (pcb->last_timer == tcp_timer_ctr) { 801b590: 6afb ldr r3, [r7, #44] @ 0x2c 801b592: 7f9a ldrb r2, [r3, #30] 801b594: 4b7b ldr r3, [pc, #492] @ (801b784 ) 801b596: 781b ldrb r3, [r3, #0] 801b598: 429a cmp r2, r3 801b59a: d105 bne.n 801b5a8 prev = pcb; 801b59c: 6afb ldr r3, [r7, #44] @ 0x2c 801b59e: 62bb str r3, [r7, #40] @ 0x28 pcb = pcb->next; 801b5a0: 6afb ldr r3, [r7, #44] @ 0x2c 801b5a2: 68db ldr r3, [r3, #12] 801b5a4: 62fb str r3, [r7, #44] @ 0x2c continue; 801b5a6: e270 b.n 801ba8a pcb->last_timer = tcp_timer_ctr; 801b5a8: 4b76 ldr r3, [pc, #472] @ (801b784 ) 801b5aa: 781a ldrb r2, [r3, #0] 801b5ac: 6afb ldr r3, [r7, #44] @ 0x2c 801b5ae: 779a strb r2, [r3, #30] pcb_remove = 0; 801b5b0: 2300 movs r3, #0 801b5b2: f887 3027 strb.w r3, [r7, #39] @ 0x27 pcb_reset = 0; 801b5b6: 2300 movs r3, #0 801b5b8: f887 3026 strb.w r3, [r7, #38] @ 0x26 if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) { 801b5bc: 6afb ldr r3, [r7, #44] @ 0x2c 801b5be: 7d1b ldrb r3, [r3, #20] 801b5c0: 2b02 cmp r3, #2 801b5c2: d10a bne.n 801b5da 801b5c4: 6afb ldr r3, [r7, #44] @ 0x2c 801b5c6: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 801b5ca: 2b05 cmp r3, #5 801b5cc: d905 bls.n 801b5da ++pcb_remove; 801b5ce: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801b5d2: 3301 adds r3, #1 801b5d4: f887 3027 strb.w r3, [r7, #39] @ 0x27 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n")); 801b5d8: e11e b.n 801b818 } else if (pcb->nrtx >= TCP_MAXRTX) { 801b5da: 6afb ldr r3, [r7, #44] @ 0x2c 801b5dc: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 801b5e0: 2b0b cmp r3, #11 801b5e2: d905 bls.n 801b5f0 ++pcb_remove; 801b5e4: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801b5e8: 3301 adds r3, #1 801b5ea: f887 3027 strb.w r3, [r7, #39] @ 0x27 801b5ee: e113 b.n 801b818 if (pcb->persist_backoff > 0) { 801b5f0: 6afb ldr r3, [r7, #44] @ 0x2c 801b5f2: f893 3099 ldrb.w r3, [r3, #153] @ 0x99 801b5f6: 2b00 cmp r3, #0 801b5f8: d075 beq.n 801b6e6 LWIP_ASSERT("tcp_slowtimr: persist ticking with in-flight data", pcb->unacked == NULL); 801b5fa: 6afb ldr r3, [r7, #44] @ 0x2c 801b5fc: 6f1b ldr r3, [r3, #112] @ 0x70 801b5fe: 2b00 cmp r3, #0 801b600: d006 beq.n 801b610 801b602: 4b62 ldr r3, [pc, #392] @ (801b78c ) 801b604: f240 42d4 movw r2, #1236 @ 0x4d4 801b608: 4965 ldr r1, [pc, #404] @ (801b7a0 ) 801b60a: 4862 ldr r0, [pc, #392] @ (801b794 ) 801b60c: f00e f9de bl 80299cc LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL); 801b610: 6afb ldr r3, [r7, #44] @ 0x2c 801b612: 6edb ldr r3, [r3, #108] @ 0x6c 801b614: 2b00 cmp r3, #0 801b616: d106 bne.n 801b626 801b618: 4b5c ldr r3, [pc, #368] @ (801b78c ) 801b61a: f240 42d5 movw r2, #1237 @ 0x4d5 801b61e: 4961 ldr r1, [pc, #388] @ (801b7a4 ) 801b620: 485c ldr r0, [pc, #368] @ (801b794 ) 801b622: f00e f9d3 bl 80299cc if (pcb->persist_probe >= TCP_MAXRTX) { 801b626: 6afb ldr r3, [r7, #44] @ 0x2c 801b628: f893 309a ldrb.w r3, [r3, #154] @ 0x9a 801b62c: 2b0b cmp r3, #11 801b62e: d905 bls.n 801b63c ++pcb_remove; /* max probes reached */ 801b630: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801b634: 3301 adds r3, #1 801b636: f887 3027 strb.w r3, [r7, #39] @ 0x27 801b63a: e0ed b.n 801b818 u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff - 1]; 801b63c: 6afb ldr r3, [r7, #44] @ 0x2c 801b63e: f893 3099 ldrb.w r3, [r3, #153] @ 0x99 801b642: 3b01 subs r3, #1 801b644: 4a58 ldr r2, [pc, #352] @ (801b7a8 ) 801b646: 5cd3 ldrb r3, [r2, r3] 801b648: 747b strb r3, [r7, #17] if (pcb->persist_cnt < backoff_cnt) { 801b64a: 6afb ldr r3, [r7, #44] @ 0x2c 801b64c: f893 3098 ldrb.w r3, [r3, #152] @ 0x98 801b650: 7c7a ldrb r2, [r7, #17] 801b652: 429a cmp r2, r3 801b654: d907 bls.n 801b666 pcb->persist_cnt++; 801b656: 6afb ldr r3, [r7, #44] @ 0x2c 801b658: f893 3098 ldrb.w r3, [r3, #152] @ 0x98 801b65c: 3301 adds r3, #1 801b65e: b2da uxtb r2, r3 801b660: 6afb ldr r3, [r7, #44] @ 0x2c 801b662: f883 2098 strb.w r2, [r3, #152] @ 0x98 if (pcb->persist_cnt >= backoff_cnt) { 801b666: 6afb ldr r3, [r7, #44] @ 0x2c 801b668: f893 3098 ldrb.w r3, [r3, #152] @ 0x98 801b66c: 7c7a ldrb r2, [r7, #17] 801b66e: 429a cmp r2, r3 801b670: f200 80d2 bhi.w 801b818 int next_slot = 1; /* increment timer to next slot */ 801b674: 2301 movs r3, #1 801b676: 623b str r3, [r7, #32] if (pcb->snd_wnd == 0) { 801b678: 6afb ldr r3, [r7, #44] @ 0x2c 801b67a: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801b67e: 2b00 cmp r3, #0 801b680: d108 bne.n 801b694 if (tcp_zero_window_probe(pcb) != ERR_OK) { 801b682: 6af8 ldr r0, [r7, #44] @ 0x2c 801b684: f005 f9cc bl 8020a20 801b688: 4603 mov r3, r0 801b68a: 2b00 cmp r3, #0 801b68c: d014 beq.n 801b6b8 next_slot = 0; /* try probe again with current slot */ 801b68e: 2300 movs r3, #0 801b690: 623b str r3, [r7, #32] 801b692: e011 b.n 801b6b8 if (tcp_split_unsent_seg(pcb, (u16_t)pcb->snd_wnd) == ERR_OK) { 801b694: 6afb ldr r3, [r7, #44] @ 0x2c 801b696: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801b69a: 4619 mov r1, r3 801b69c: 6af8 ldr r0, [r7, #44] @ 0x2c 801b69e: f004 f87f bl 801f7a0 801b6a2: 4603 mov r3, r0 801b6a4: 2b00 cmp r3, #0 801b6a6: d107 bne.n 801b6b8 if (tcp_output(pcb) == ERR_OK) { 801b6a8: 6af8 ldr r0, [r7, #44] @ 0x2c 801b6aa: f004 fb03 bl 801fcb4 801b6ae: 4603 mov r3, r0 801b6b0: 2b00 cmp r3, #0 801b6b2: d101 bne.n 801b6b8 next_slot = 0; 801b6b4: 2300 movs r3, #0 801b6b6: 623b str r3, [r7, #32] if (next_slot) { 801b6b8: 6a3b ldr r3, [r7, #32] 801b6ba: 2b00 cmp r3, #0 801b6bc: f000 80ac beq.w 801b818 pcb->persist_cnt = 0; 801b6c0: 6afb ldr r3, [r7, #44] @ 0x2c 801b6c2: 2200 movs r2, #0 801b6c4: f883 2098 strb.w r2, [r3, #152] @ 0x98 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 801b6c8: 6afb ldr r3, [r7, #44] @ 0x2c 801b6ca: f893 3099 ldrb.w r3, [r3, #153] @ 0x99 801b6ce: 2b06 cmp r3, #6 801b6d0: f200 80a2 bhi.w 801b818 pcb->persist_backoff++; 801b6d4: 6afb ldr r3, [r7, #44] @ 0x2c 801b6d6: f893 3099 ldrb.w r3, [r3, #153] @ 0x99 801b6da: 3301 adds r3, #1 801b6dc: b2da uxtb r2, r3 801b6de: 6afb ldr r3, [r7, #44] @ 0x2c 801b6e0: f883 2099 strb.w r2, [r3, #153] @ 0x99 801b6e4: e098 b.n 801b818 if ((pcb->rtime >= 0) && (pcb->rtime < 0x7FFF)) { 801b6e6: 6afb ldr r3, [r7, #44] @ 0x2c 801b6e8: f9b3 3030 ldrsh.w r3, [r3, #48] @ 0x30 801b6ec: 2b00 cmp r3, #0 801b6ee: db0f blt.n 801b710 801b6f0: 6afb ldr r3, [r7, #44] @ 0x2c 801b6f2: f9b3 3030 ldrsh.w r3, [r3, #48] @ 0x30 801b6f6: f647 72ff movw r2, #32767 @ 0x7fff 801b6fa: 4293 cmp r3, r2 801b6fc: d008 beq.n 801b710 ++pcb->rtime; 801b6fe: 6afb ldr r3, [r7, #44] @ 0x2c 801b700: f9b3 3030 ldrsh.w r3, [r3, #48] @ 0x30 801b704: b29b uxth r3, r3 801b706: 3301 adds r3, #1 801b708: b29b uxth r3, r3 801b70a: b21a sxth r2, r3 801b70c: 6afb ldr r3, [r7, #44] @ 0x2c 801b70e: 861a strh r2, [r3, #48] @ 0x30 if (pcb->rtime >= pcb->rto) { 801b710: 6afb ldr r3, [r7, #44] @ 0x2c 801b712: f9b3 2030 ldrsh.w r2, [r3, #48] @ 0x30 801b716: 6afb ldr r3, [r7, #44] @ 0x2c 801b718: f9b3 3040 ldrsh.w r3, [r3, #64] @ 0x40 801b71c: 429a cmp r2, r3 801b71e: db7b blt.n 801b818 if ((tcp_rexmit_rto_prepare(pcb) == ERR_OK) || ((pcb->unacked == NULL) && (pcb->unsent != NULL))) { 801b720: 6af8 ldr r0, [r7, #44] @ 0x2c 801b722: f004 fdbf bl 80202a4 801b726: 4603 mov r3, r0 801b728: 2b00 cmp r3, #0 801b72a: d007 beq.n 801b73c 801b72c: 6afb ldr r3, [r7, #44] @ 0x2c 801b72e: 6f1b ldr r3, [r3, #112] @ 0x70 801b730: 2b00 cmp r3, #0 801b732: d171 bne.n 801b818 801b734: 6afb ldr r3, [r7, #44] @ 0x2c 801b736: 6edb ldr r3, [r3, #108] @ 0x6c 801b738: 2b00 cmp r3, #0 801b73a: d06d beq.n 801b818 if (pcb->state != SYN_SENT) { 801b73c: 6afb ldr r3, [r7, #44] @ 0x2c 801b73e: 7d1b ldrb r3, [r3, #20] 801b740: 2b02 cmp r3, #2 801b742: d03a beq.n 801b7ba u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff) - 1); 801b744: 6afb ldr r3, [r7, #44] @ 0x2c 801b746: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 801b74a: 2b0c cmp r3, #12 801b74c: bf28 it cs 801b74e: 230c movcs r3, #12 801b750: 76fb strb r3, [r7, #27] int calc_rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx]; 801b752: 6afb ldr r3, [r7, #44] @ 0x2c 801b754: f9b3 303c ldrsh.w r3, [r3, #60] @ 0x3c 801b758: 10db asrs r3, r3, #3 801b75a: b21b sxth r3, r3 801b75c: 461a mov r2, r3 801b75e: 6afb ldr r3, [r7, #44] @ 0x2c 801b760: f9b3 303e ldrsh.w r3, [r3, #62] @ 0x3e 801b764: 4413 add r3, r2 801b766: 7efa ldrb r2, [r7, #27] 801b768: 4910 ldr r1, [pc, #64] @ (801b7ac ) 801b76a: 5c8a ldrb r2, [r1, r2] 801b76c: 4093 lsls r3, r2 801b76e: 617b str r3, [r7, #20] pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF); 801b770: 697b ldr r3, [r7, #20] 801b772: f647 72fe movw r2, #32766 @ 0x7ffe 801b776: 4293 cmp r3, r2 801b778: dc1a bgt.n 801b7b0 801b77a: 697b ldr r3, [r7, #20] 801b77c: b21a sxth r2, r3 801b77e: e019 b.n 801b7b4 801b780: 2402ae88 .word 0x2402ae88 801b784: 2402ae9e .word 0x2402ae9e 801b788: 2402ae94 .word 0x2402ae94 801b78c: 0802e5a8 .word 0x0802e5a8 801b790: 0802e8ec .word 0x0802e8ec 801b794: 0802e5ec .word 0x0802e5ec 801b798: 0802e918 .word 0x0802e918 801b79c: 0802e944 .word 0x0802e944 801b7a0: 0802e974 .word 0x0802e974 801b7a4: 0802e9a8 .word 0x0802e9a8 801b7a8: 08030bd0 .word 0x08030bd0 801b7ac: 08030bc0 .word 0x08030bc0 801b7b0: f647 72ff movw r2, #32767 @ 0x7fff 801b7b4: 6afb ldr r3, [r7, #44] @ 0x2c 801b7b6: f8a3 2040 strh.w r2, [r3, #64] @ 0x40 pcb->rtime = 0; 801b7ba: 6afb ldr r3, [r7, #44] @ 0x2c 801b7bc: 2200 movs r2, #0 801b7be: 861a strh r2, [r3, #48] @ 0x30 eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 801b7c0: 6afb ldr r3, [r7, #44] @ 0x2c 801b7c2: f8b3 2060 ldrh.w r2, [r3, #96] @ 0x60 801b7c6: 6afb ldr r3, [r7, #44] @ 0x2c 801b7c8: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801b7cc: 4293 cmp r3, r2 801b7ce: bf28 it cs 801b7d0: 4613 movcs r3, r2 801b7d2: 827b strh r3, [r7, #18] pcb->ssthresh = eff_wnd >> 1; 801b7d4: 8a7b ldrh r3, [r7, #18] 801b7d6: 085b lsrs r3, r3, #1 801b7d8: b29a uxth r2, r3 801b7da: 6afb ldr r3, [r7, #44] @ 0x2c 801b7dc: f8a3 204a strh.w r2, [r3, #74] @ 0x4a if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) { 801b7e0: 6afb ldr r3, [r7, #44] @ 0x2c 801b7e2: f8b3 204a ldrh.w r2, [r3, #74] @ 0x4a 801b7e6: 6afb ldr r3, [r7, #44] @ 0x2c 801b7e8: 8e5b ldrh r3, [r3, #50] @ 0x32 801b7ea: 005b lsls r3, r3, #1 801b7ec: b29b uxth r3, r3 801b7ee: 429a cmp r2, r3 801b7f0: d206 bcs.n 801b800 pcb->ssthresh = (tcpwnd_size_t)(pcb->mss << 1); 801b7f2: 6afb ldr r3, [r7, #44] @ 0x2c 801b7f4: 8e5b ldrh r3, [r3, #50] @ 0x32 801b7f6: 005b lsls r3, r3, #1 801b7f8: b29a uxth r2, r3 801b7fa: 6afb ldr r3, [r7, #44] @ 0x2c 801b7fc: f8a3 204a strh.w r2, [r3, #74] @ 0x4a pcb->cwnd = pcb->mss; 801b800: 6afb ldr r3, [r7, #44] @ 0x2c 801b802: 8e5a ldrh r2, [r3, #50] @ 0x32 801b804: 6afb ldr r3, [r7, #44] @ 0x2c 801b806: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 pcb->bytes_acked = 0; 801b80a: 6afb ldr r3, [r7, #44] @ 0x2c 801b80c: 2200 movs r2, #0 801b80e: f8a3 206a strh.w r2, [r3, #106] @ 0x6a tcp_rexmit_rto_commit(pcb); 801b812: 6af8 ldr r0, [r7, #44] @ 0x2c 801b814: f004 fdc0 bl 8020398 if (pcb->state == FIN_WAIT_2) { 801b818: 6afb ldr r3, [r7, #44] @ 0x2c 801b81a: 7d1b ldrb r3, [r3, #20] 801b81c: 2b06 cmp r3, #6 801b81e: d111 bne.n 801b844 if (pcb->flags & TF_RXCLOSED) { 801b820: 6afb ldr r3, [r7, #44] @ 0x2c 801b822: 8b5b ldrh r3, [r3, #26] 801b824: f003 0310 and.w r3, r3, #16 801b828: 2b00 cmp r3, #0 801b82a: d00b beq.n 801b844 if ((u32_t)(tcp_ticks - pcb->tmr) > 801b82c: 4b9c ldr r3, [pc, #624] @ (801baa0 ) 801b82e: 681a ldr r2, [r3, #0] 801b830: 6afb ldr r3, [r7, #44] @ 0x2c 801b832: 6a1b ldr r3, [r3, #32] 801b834: 1ad3 subs r3, r2, r3 801b836: 2b28 cmp r3, #40 @ 0x28 801b838: d904 bls.n 801b844 ++pcb_remove; 801b83a: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801b83e: 3301 adds r3, #1 801b840: f887 3027 strb.w r3, [r7, #39] @ 0x27 if (ip_get_option(pcb, SOF_KEEPALIVE) && 801b844: 6afb ldr r3, [r7, #44] @ 0x2c 801b846: 7a5b ldrb r3, [r3, #9] 801b848: f003 0308 and.w r3, r3, #8 801b84c: 2b00 cmp r3, #0 801b84e: d04a beq.n 801b8e6 ((pcb->state == ESTABLISHED) || 801b850: 6afb ldr r3, [r7, #44] @ 0x2c 801b852: 7d1b ldrb r3, [r3, #20] if (ip_get_option(pcb, SOF_KEEPALIVE) && 801b854: 2b04 cmp r3, #4 801b856: d003 beq.n 801b860 (pcb->state == CLOSE_WAIT))) { 801b858: 6afb ldr r3, [r7, #44] @ 0x2c 801b85a: 7d1b ldrb r3, [r3, #20] ((pcb->state == ESTABLISHED) || 801b85c: 2b07 cmp r3, #7 801b85e: d142 bne.n 801b8e6 if ((u32_t)(tcp_ticks - pcb->tmr) > 801b860: 4b8f ldr r3, [pc, #572] @ (801baa0 ) 801b862: 681a ldr r2, [r3, #0] 801b864: 6afb ldr r3, [r7, #44] @ 0x2c 801b866: 6a1b ldr r3, [r3, #32] 801b868: 1ad2 subs r2, r2, r3 (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) { 801b86a: 6afb ldr r3, [r7, #44] @ 0x2c 801b86c: f8d3 1094 ldr.w r1, [r3, #148] @ 0x94 801b870: 4b8c ldr r3, [pc, #560] @ (801baa4 ) 801b872: 440b add r3, r1 801b874: 498c ldr r1, [pc, #560] @ (801baa8 ) 801b876: fba1 1303 umull r1, r3, r1, r3 801b87a: 095b lsrs r3, r3, #5 if ((u32_t)(tcp_ticks - pcb->tmr) > 801b87c: 429a cmp r2, r3 801b87e: d90a bls.n 801b896 ++pcb_remove; 801b880: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801b884: 3301 adds r3, #1 801b886: f887 3027 strb.w r3, [r7, #39] @ 0x27 ++pcb_reset; 801b88a: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 801b88e: 3301 adds r3, #1 801b890: f887 3026 strb.w r3, [r7, #38] @ 0x26 801b894: e027 b.n 801b8e6 } else if ((u32_t)(tcp_ticks - pcb->tmr) > 801b896: 4b82 ldr r3, [pc, #520] @ (801baa0 ) 801b898: 681a ldr r2, [r3, #0] 801b89a: 6afb ldr r3, [r7, #44] @ 0x2c 801b89c: 6a1b ldr r3, [r3, #32] 801b89e: 1ad2 subs r2, r2, r3 (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) 801b8a0: 6afb ldr r3, [r7, #44] @ 0x2c 801b8a2: f8d3 1094 ldr.w r1, [r3, #148] @ 0x94 801b8a6: 6afb ldr r3, [r7, #44] @ 0x2c 801b8a8: f893 309b ldrb.w r3, [r3, #155] @ 0x9b 801b8ac: 4618 mov r0, r3 801b8ae: 4b7f ldr r3, [pc, #508] @ (801baac ) 801b8b0: fb00 f303 mul.w r3, r0, r3 801b8b4: 440b add r3, r1 / TCP_SLOW_INTERVAL) { 801b8b6: 497c ldr r1, [pc, #496] @ (801baa8 ) 801b8b8: fba1 1303 umull r1, r3, r1, r3 801b8bc: 095b lsrs r3, r3, #5 } else if ((u32_t)(tcp_ticks - pcb->tmr) > 801b8be: 429a cmp r2, r3 801b8c0: d911 bls.n 801b8e6 err = tcp_keepalive(pcb); 801b8c2: 6af8 ldr r0, [r7, #44] @ 0x2c 801b8c4: f005 f86c bl 80209a0 801b8c8: 4603 mov r3, r0 801b8ca: f887 3025 strb.w r3, [r7, #37] @ 0x25 if (err == ERR_OK) { 801b8ce: f997 3025 ldrsb.w r3, [r7, #37] @ 0x25 801b8d2: 2b00 cmp r3, #0 801b8d4: d107 bne.n 801b8e6 pcb->keep_cnt_sent++; 801b8d6: 6afb ldr r3, [r7, #44] @ 0x2c 801b8d8: f893 309b ldrb.w r3, [r3, #155] @ 0x9b 801b8dc: 3301 adds r3, #1 801b8de: b2da uxtb r2, r3 801b8e0: 6afb ldr r3, [r7, #44] @ 0x2c 801b8e2: f883 209b strb.w r2, [r3, #155] @ 0x9b if (pcb->ooseq != NULL && 801b8e6: 6afb ldr r3, [r7, #44] @ 0x2c 801b8e8: 6f5b ldr r3, [r3, #116] @ 0x74 801b8ea: 2b00 cmp r3, #0 801b8ec: d011 beq.n 801b912 (tcp_ticks - pcb->tmr >= (u32_t)pcb->rto * TCP_OOSEQ_TIMEOUT)) { 801b8ee: 4b6c ldr r3, [pc, #432] @ (801baa0 ) 801b8f0: 681a ldr r2, [r3, #0] 801b8f2: 6afb ldr r3, [r7, #44] @ 0x2c 801b8f4: 6a1b ldr r3, [r3, #32] 801b8f6: 1ad2 subs r2, r2, r3 801b8f8: 6afb ldr r3, [r7, #44] @ 0x2c 801b8fa: f9b3 3040 ldrsh.w r3, [r3, #64] @ 0x40 801b8fe: 4619 mov r1, r3 801b900: 460b mov r3, r1 801b902: 005b lsls r3, r3, #1 801b904: 440b add r3, r1 801b906: 005b lsls r3, r3, #1 if (pcb->ooseq != NULL && 801b908: 429a cmp r2, r3 801b90a: d302 bcc.n 801b912 tcp_free_ooseq(pcb); 801b90c: 6af8 ldr r0, [r7, #44] @ 0x2c 801b90e: f000 feb7 bl 801c680 if (pcb->state == SYN_RCVD) { 801b912: 6afb ldr r3, [r7, #44] @ 0x2c 801b914: 7d1b ldrb r3, [r3, #20] 801b916: 2b03 cmp r3, #3 801b918: d10b bne.n 801b932 if ((u32_t)(tcp_ticks - pcb->tmr) > 801b91a: 4b61 ldr r3, [pc, #388] @ (801baa0 ) 801b91c: 681a ldr r2, [r3, #0] 801b91e: 6afb ldr r3, [r7, #44] @ 0x2c 801b920: 6a1b ldr r3, [r3, #32] 801b922: 1ad3 subs r3, r2, r3 801b924: 2b28 cmp r3, #40 @ 0x28 801b926: d904 bls.n 801b932 ++pcb_remove; 801b928: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801b92c: 3301 adds r3, #1 801b92e: f887 3027 strb.w r3, [r7, #39] @ 0x27 if (pcb->state == LAST_ACK) { 801b932: 6afb ldr r3, [r7, #44] @ 0x2c 801b934: 7d1b ldrb r3, [r3, #20] 801b936: 2b09 cmp r3, #9 801b938: d10b bne.n 801b952 if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 801b93a: 4b59 ldr r3, [pc, #356] @ (801baa0 ) 801b93c: 681a ldr r2, [r3, #0] 801b93e: 6afb ldr r3, [r7, #44] @ 0x2c 801b940: 6a1b ldr r3, [r3, #32] 801b942: 1ad3 subs r3, r2, r3 801b944: 2bf0 cmp r3, #240 @ 0xf0 801b946: d904 bls.n 801b952 ++pcb_remove; 801b948: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801b94c: 3301 adds r3, #1 801b94e: f887 3027 strb.w r3, [r7, #39] @ 0x27 if (pcb_remove) { 801b952: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801b956: 2b00 cmp r3, #0 801b958: d060 beq.n 801ba1c tcp_err_fn err_fn = pcb->errf; 801b95a: 6afb ldr r3, [r7, #44] @ 0x2c 801b95c: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801b960: 60fb str r3, [r7, #12] tcp_pcb_purge(pcb); 801b962: 6af8 ldr r0, [r7, #44] @ 0x2c 801b964: f000 fcd8 bl 801c318 if (prev != NULL) { 801b968: 6abb ldr r3, [r7, #40] @ 0x28 801b96a: 2b00 cmp r3, #0 801b96c: d010 beq.n 801b990 LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); 801b96e: 4b50 ldr r3, [pc, #320] @ (801bab0 ) 801b970: 681b ldr r3, [r3, #0] 801b972: 6afa ldr r2, [r7, #44] @ 0x2c 801b974: 429a cmp r2, r3 801b976: d106 bne.n 801b986 801b978: 4b4e ldr r3, [pc, #312] @ (801bab4 ) 801b97a: f240 526d movw r2, #1389 @ 0x56d 801b97e: 494e ldr r1, [pc, #312] @ (801bab8 ) 801b980: 484e ldr r0, [pc, #312] @ (801babc ) 801b982: f00e f823 bl 80299cc prev->next = pcb->next; 801b986: 6afb ldr r3, [r7, #44] @ 0x2c 801b988: 68da ldr r2, [r3, #12] 801b98a: 6abb ldr r3, [r7, #40] @ 0x28 801b98c: 60da str r2, [r3, #12] 801b98e: e00f b.n 801b9b0 LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb); 801b990: 4b47 ldr r3, [pc, #284] @ (801bab0 ) 801b992: 681b ldr r3, [r3, #0] 801b994: 6afa ldr r2, [r7, #44] @ 0x2c 801b996: 429a cmp r2, r3 801b998: d006 beq.n 801b9a8 801b99a: 4b46 ldr r3, [pc, #280] @ (801bab4 ) 801b99c: f240 5271 movw r2, #1393 @ 0x571 801b9a0: 4947 ldr r1, [pc, #284] @ (801bac0 ) 801b9a2: 4846 ldr r0, [pc, #280] @ (801babc ) 801b9a4: f00e f812 bl 80299cc tcp_active_pcbs = pcb->next; 801b9a8: 6afb ldr r3, [r7, #44] @ 0x2c 801b9aa: 68db ldr r3, [r3, #12] 801b9ac: 4a40 ldr r2, [pc, #256] @ (801bab0 ) 801b9ae: 6013 str r3, [r2, #0] if (pcb_reset) { 801b9b0: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 801b9b4: 2b00 cmp r3, #0 801b9b6: d013 beq.n 801b9e0 tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, 801b9b8: 6afb ldr r3, [r7, #44] @ 0x2c 801b9ba: 6d18 ldr r0, [r3, #80] @ 0x50 801b9bc: 6afb ldr r3, [r7, #44] @ 0x2c 801b9be: 6a5c ldr r4, [r3, #36] @ 0x24 801b9c0: 6afd ldr r5, [r7, #44] @ 0x2c 801b9c2: 6afb ldr r3, [r7, #44] @ 0x2c 801b9c4: 3304 adds r3, #4 801b9c6: 6afa ldr r2, [r7, #44] @ 0x2c 801b9c8: 8ad2 ldrh r2, [r2, #22] 801b9ca: 6af9 ldr r1, [r7, #44] @ 0x2c 801b9cc: 8b09 ldrh r1, [r1, #24] 801b9ce: 9102 str r1, [sp, #8] 801b9d0: 9201 str r2, [sp, #4] 801b9d2: 9300 str r3, [sp, #0] 801b9d4: 462b mov r3, r5 801b9d6: 4622 mov r2, r4 801b9d8: 4601 mov r1, r0 801b9da: 6af8 ldr r0, [r7, #44] @ 0x2c 801b9dc: f004 ff2c bl 8020838 err_arg = pcb->callback_arg; 801b9e0: 6afb ldr r3, [r7, #44] @ 0x2c 801b9e2: 691b ldr r3, [r3, #16] 801b9e4: 60bb str r3, [r7, #8] last_state = pcb->state; 801b9e6: 6afb ldr r3, [r7, #44] @ 0x2c 801b9e8: 7d1b ldrb r3, [r3, #20] 801b9ea: 71fb strb r3, [r7, #7] pcb2 = pcb; 801b9ec: 6afb ldr r3, [r7, #44] @ 0x2c 801b9ee: 603b str r3, [r7, #0] pcb = pcb->next; 801b9f0: 6afb ldr r3, [r7, #44] @ 0x2c 801b9f2: 68db ldr r3, [r3, #12] 801b9f4: 62fb str r3, [r7, #44] @ 0x2c tcp_free(pcb2); 801b9f6: 6838 ldr r0, [r7, #0] 801b9f8: f7ff f82c bl 801aa54 tcp_active_pcbs_changed = 0; 801b9fc: 4b31 ldr r3, [pc, #196] @ (801bac4 ) 801b9fe: 2200 movs r2, #0 801ba00: 701a strb r2, [r3, #0] TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT); 801ba02: 68fb ldr r3, [r7, #12] 801ba04: 2b00 cmp r3, #0 801ba06: d004 beq.n 801ba12 801ba08: 68fb ldr r3, [r7, #12] 801ba0a: f06f 010c mvn.w r1, #12 801ba0e: 68b8 ldr r0, [r7, #8] 801ba10: 4798 blx r3 if (tcp_active_pcbs_changed) { 801ba12: 4b2c ldr r3, [pc, #176] @ (801bac4 ) 801ba14: 781b ldrb r3, [r3, #0] 801ba16: 2b00 cmp r3, #0 801ba18: d037 beq.n 801ba8a goto tcp_slowtmr_start; 801ba1a: e592 b.n 801b542 prev = pcb; 801ba1c: 6afb ldr r3, [r7, #44] @ 0x2c 801ba1e: 62bb str r3, [r7, #40] @ 0x28 pcb = pcb->next; 801ba20: 6afb ldr r3, [r7, #44] @ 0x2c 801ba22: 68db ldr r3, [r3, #12] 801ba24: 62fb str r3, [r7, #44] @ 0x2c ++prev->polltmr; 801ba26: 6abb ldr r3, [r7, #40] @ 0x28 801ba28: 7f1b ldrb r3, [r3, #28] 801ba2a: 3301 adds r3, #1 801ba2c: b2da uxtb r2, r3 801ba2e: 6abb ldr r3, [r7, #40] @ 0x28 801ba30: 771a strb r2, [r3, #28] if (prev->polltmr >= prev->pollinterval) { 801ba32: 6abb ldr r3, [r7, #40] @ 0x28 801ba34: 7f1a ldrb r2, [r3, #28] 801ba36: 6abb ldr r3, [r7, #40] @ 0x28 801ba38: 7f5b ldrb r3, [r3, #29] 801ba3a: 429a cmp r2, r3 801ba3c: d325 bcc.n 801ba8a prev->polltmr = 0; 801ba3e: 6abb ldr r3, [r7, #40] @ 0x28 801ba40: 2200 movs r2, #0 801ba42: 771a strb r2, [r3, #28] tcp_active_pcbs_changed = 0; 801ba44: 4b1f ldr r3, [pc, #124] @ (801bac4 ) 801ba46: 2200 movs r2, #0 801ba48: 701a strb r2, [r3, #0] TCP_EVENT_POLL(prev, err); 801ba4a: 6abb ldr r3, [r7, #40] @ 0x28 801ba4c: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 801ba50: 2b00 cmp r3, #0 801ba52: d00b beq.n 801ba6c 801ba54: 6abb ldr r3, [r7, #40] @ 0x28 801ba56: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 801ba5a: 6aba ldr r2, [r7, #40] @ 0x28 801ba5c: 6912 ldr r2, [r2, #16] 801ba5e: 6ab9 ldr r1, [r7, #40] @ 0x28 801ba60: 4610 mov r0, r2 801ba62: 4798 blx r3 801ba64: 4603 mov r3, r0 801ba66: f887 3025 strb.w r3, [r7, #37] @ 0x25 801ba6a: e002 b.n 801ba72 801ba6c: 2300 movs r3, #0 801ba6e: f887 3025 strb.w r3, [r7, #37] @ 0x25 if (tcp_active_pcbs_changed) { 801ba72: 4b14 ldr r3, [pc, #80] @ (801bac4 ) 801ba74: 781b ldrb r3, [r3, #0] 801ba76: 2b00 cmp r3, #0 801ba78: f47f ad62 bne.w 801b540 } /* if err == ERR_ABRT, 'prev' is already deallocated */ if (err == ERR_OK) { 801ba7c: f997 3025 ldrsb.w r3, [r7, #37] @ 0x25 801ba80: 2b00 cmp r3, #0 801ba82: d102 bne.n 801ba8a tcp_output(prev); 801ba84: 6ab8 ldr r0, [r7, #40] @ 0x28 801ba86: f004 f915 bl 801fcb4 while (pcb != NULL) { 801ba8a: 6afb ldr r3, [r7, #44] @ 0x2c 801ba8c: 2b00 cmp r3, #0 801ba8e: f47f ad5e bne.w 801b54e } } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; 801ba92: 2300 movs r3, #0 801ba94: 62bb str r3, [r7, #40] @ 0x28 pcb = tcp_tw_pcbs; 801ba96: 4b0c ldr r3, [pc, #48] @ (801bac8 ) 801ba98: 681b ldr r3, [r3, #0] 801ba9a: 62fb str r3, [r7, #44] @ 0x2c while (pcb != NULL) { 801ba9c: e069 b.n 801bb72 801ba9e: bf00 nop 801baa0: 2402ae88 .word 0x2402ae88 801baa4: 000a4cb8 .word 0x000a4cb8 801baa8: 10624dd3 .word 0x10624dd3 801baac: 000124f8 .word 0x000124f8 801bab0: 2402ae94 .word 0x2402ae94 801bab4: 0802e5a8 .word 0x0802e5a8 801bab8: 0802e9e0 .word 0x0802e9e0 801babc: 0802e5ec .word 0x0802e5ec 801bac0: 0802ea0c .word 0x0802ea0c 801bac4: 2402ae9c .word 0x2402ae9c 801bac8: 2402ae98 .word 0x2402ae98 LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); 801bacc: 6afb ldr r3, [r7, #44] @ 0x2c 801bace: 7d1b ldrb r3, [r3, #20] 801bad0: 2b0a cmp r3, #10 801bad2: d006 beq.n 801bae2 801bad4: 4b2b ldr r3, [pc, #172] @ (801bb84 ) 801bad6: f240 52a1 movw r2, #1441 @ 0x5a1 801bada: 492b ldr r1, [pc, #172] @ (801bb88 ) 801badc: 482b ldr r0, [pc, #172] @ (801bb8c ) 801bade: f00d ff75 bl 80299cc pcb_remove = 0; 801bae2: 2300 movs r3, #0 801bae4: 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) { 801bae8: 4b29 ldr r3, [pc, #164] @ (801bb90 ) 801baea: 681a ldr r2, [r3, #0] 801baec: 6afb ldr r3, [r7, #44] @ 0x2c 801baee: 6a1b ldr r3, [r3, #32] 801baf0: 1ad3 subs r3, r2, r3 801baf2: 2bf0 cmp r3, #240 @ 0xf0 801baf4: d904 bls.n 801bb00 ++pcb_remove; 801baf6: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801bafa: 3301 adds r3, #1 801bafc: f887 3027 strb.w r3, [r7, #39] @ 0x27 } /* If the PCB should be removed, do it. */ if (pcb_remove) { 801bb00: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801bb04: 2b00 cmp r3, #0 801bb06: d02f beq.n 801bb68 struct tcp_pcb *pcb2; tcp_pcb_purge(pcb); 801bb08: 6af8 ldr r0, [r7, #44] @ 0x2c 801bb0a: f000 fc05 bl 801c318 /* Remove PCB from tcp_tw_pcbs list. */ if (prev != NULL) { 801bb0e: 6abb ldr r3, [r7, #40] @ 0x28 801bb10: 2b00 cmp r3, #0 801bb12: d010 beq.n 801bb36 LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs); 801bb14: 4b1f ldr r3, [pc, #124] @ (801bb94 ) 801bb16: 681b ldr r3, [r3, #0] 801bb18: 6afa ldr r2, [r7, #44] @ 0x2c 801bb1a: 429a cmp r2, r3 801bb1c: d106 bne.n 801bb2c 801bb1e: 4b19 ldr r3, [pc, #100] @ (801bb84 ) 801bb20: f240 52af movw r2, #1455 @ 0x5af 801bb24: 491c ldr r1, [pc, #112] @ (801bb98 ) 801bb26: 4819 ldr r0, [pc, #100] @ (801bb8c ) 801bb28: f00d ff50 bl 80299cc prev->next = pcb->next; 801bb2c: 6afb ldr r3, [r7, #44] @ 0x2c 801bb2e: 68da ldr r2, [r3, #12] 801bb30: 6abb ldr r3, [r7, #40] @ 0x28 801bb32: 60da str r2, [r3, #12] 801bb34: e00f b.n 801bb56 } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); 801bb36: 4b17 ldr r3, [pc, #92] @ (801bb94 ) 801bb38: 681b ldr r3, [r3, #0] 801bb3a: 6afa ldr r2, [r7, #44] @ 0x2c 801bb3c: 429a cmp r2, r3 801bb3e: d006 beq.n 801bb4e 801bb40: 4b10 ldr r3, [pc, #64] @ (801bb84 ) 801bb42: f240 52b3 movw r2, #1459 @ 0x5b3 801bb46: 4915 ldr r1, [pc, #84] @ (801bb9c ) 801bb48: 4810 ldr r0, [pc, #64] @ (801bb8c ) 801bb4a: f00d ff3f bl 80299cc tcp_tw_pcbs = pcb->next; 801bb4e: 6afb ldr r3, [r7, #44] @ 0x2c 801bb50: 68db ldr r3, [r3, #12] 801bb52: 4a10 ldr r2, [pc, #64] @ (801bb94 ) 801bb54: 6013 str r3, [r2, #0] } pcb2 = pcb; 801bb56: 6afb ldr r3, [r7, #44] @ 0x2c 801bb58: 61fb str r3, [r7, #28] pcb = pcb->next; 801bb5a: 6afb ldr r3, [r7, #44] @ 0x2c 801bb5c: 68db ldr r3, [r3, #12] 801bb5e: 62fb str r3, [r7, #44] @ 0x2c tcp_free(pcb2); 801bb60: 69f8 ldr r0, [r7, #28] 801bb62: f7fe ff77 bl 801aa54 801bb66: e004 b.n 801bb72 } else { prev = pcb; 801bb68: 6afb ldr r3, [r7, #44] @ 0x2c 801bb6a: 62bb str r3, [r7, #40] @ 0x28 pcb = pcb->next; 801bb6c: 6afb ldr r3, [r7, #44] @ 0x2c 801bb6e: 68db ldr r3, [r3, #12] 801bb70: 62fb str r3, [r7, #44] @ 0x2c while (pcb != NULL) { 801bb72: 6afb ldr r3, [r7, #44] @ 0x2c 801bb74: 2b00 cmp r3, #0 801bb76: d1a9 bne.n 801bacc } } } 801bb78: bf00 nop 801bb7a: bf00 nop 801bb7c: 3730 adds r7, #48 @ 0x30 801bb7e: 46bd mov sp, r7 801bb80: bdb0 pop {r4, r5, r7, pc} 801bb82: bf00 nop 801bb84: 0802e5a8 .word 0x0802e5a8 801bb88: 0802ea38 .word 0x0802ea38 801bb8c: 0802e5ec .word 0x0802e5ec 801bb90: 2402ae88 .word 0x2402ae88 801bb94: 2402ae98 .word 0x2402ae98 801bb98: 0802ea68 .word 0x0802ea68 801bb9c: 0802ea90 .word 0x0802ea90 0801bba0 : * * Automatically called from tcp_tmr(). */ void tcp_fasttmr(void) { 801bba0: b580 push {r7, lr} 801bba2: b082 sub sp, #8 801bba4: af00 add r7, sp, #0 struct tcp_pcb *pcb; ++tcp_timer_ctr; 801bba6: 4b2d ldr r3, [pc, #180] @ (801bc5c ) 801bba8: 781b ldrb r3, [r3, #0] 801bbaa: 3301 adds r3, #1 801bbac: b2da uxtb r2, r3 801bbae: 4b2b ldr r3, [pc, #172] @ (801bc5c ) 801bbb0: 701a strb r2, [r3, #0] tcp_fasttmr_start: pcb = tcp_active_pcbs; 801bbb2: 4b2b ldr r3, [pc, #172] @ (801bc60 ) 801bbb4: 681b ldr r3, [r3, #0] 801bbb6: 607b str r3, [r7, #4] while (pcb != NULL) { 801bbb8: e048 b.n 801bc4c if (pcb->last_timer != tcp_timer_ctr) { 801bbba: 687b ldr r3, [r7, #4] 801bbbc: 7f9a ldrb r2, [r3, #30] 801bbbe: 4b27 ldr r3, [pc, #156] @ (801bc5c ) 801bbc0: 781b ldrb r3, [r3, #0] 801bbc2: 429a cmp r2, r3 801bbc4: d03f beq.n 801bc46 struct tcp_pcb *next; pcb->last_timer = tcp_timer_ctr; 801bbc6: 4b25 ldr r3, [pc, #148] @ (801bc5c ) 801bbc8: 781a ldrb r2, [r3, #0] 801bbca: 687b ldr r3, [r7, #4] 801bbcc: 779a strb r2, [r3, #30] /* send delayed ACKs */ if (pcb->flags & TF_ACK_DELAY) { 801bbce: 687b ldr r3, [r7, #4] 801bbd0: 8b5b ldrh r3, [r3, #26] 801bbd2: f003 0301 and.w r3, r3, #1 801bbd6: 2b00 cmp r3, #0 801bbd8: d010 beq.n 801bbfc LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); tcp_ack_now(pcb); 801bbda: 687b ldr r3, [r7, #4] 801bbdc: 8b5b ldrh r3, [r3, #26] 801bbde: f043 0302 orr.w r3, r3, #2 801bbe2: b29a uxth r2, r3 801bbe4: 687b ldr r3, [r7, #4] 801bbe6: 835a strh r2, [r3, #26] tcp_output(pcb); 801bbe8: 6878 ldr r0, [r7, #4] 801bbea: f004 f863 bl 801fcb4 tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 801bbee: 687b ldr r3, [r7, #4] 801bbf0: 8b5b ldrh r3, [r3, #26] 801bbf2: f023 0303 bic.w r3, r3, #3 801bbf6: b29a uxth r2, r3 801bbf8: 687b ldr r3, [r7, #4] 801bbfa: 835a strh r2, [r3, #26] } /* send pending FIN */ if (pcb->flags & TF_CLOSEPEND) { 801bbfc: 687b ldr r3, [r7, #4] 801bbfe: 8b5b ldrh r3, [r3, #26] 801bc00: f003 0308 and.w r3, r3, #8 801bc04: 2b00 cmp r3, #0 801bc06: d009 beq.n 801bc1c LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: pending FIN\n")); tcp_clear_flags(pcb, TF_CLOSEPEND); 801bc08: 687b ldr r3, [r7, #4] 801bc0a: 8b5b ldrh r3, [r3, #26] 801bc0c: f023 0308 bic.w r3, r3, #8 801bc10: b29a uxth r2, r3 801bc12: 687b ldr r3, [r7, #4] 801bc14: 835a strh r2, [r3, #26] tcp_close_shutdown_fin(pcb); 801bc16: 6878 ldr r0, [r7, #4] 801bc18: f7ff f8b0 bl 801ad7c } next = pcb->next; 801bc1c: 687b ldr r3, [r7, #4] 801bc1e: 68db ldr r3, [r3, #12] 801bc20: 603b str r3, [r7, #0] /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 801bc22: 687b ldr r3, [r7, #4] 801bc24: 6f9b ldr r3, [r3, #120] @ 0x78 801bc26: 2b00 cmp r3, #0 801bc28: d00a beq.n 801bc40 tcp_active_pcbs_changed = 0; 801bc2a: 4b0e ldr r3, [pc, #56] @ (801bc64 ) 801bc2c: 2200 movs r2, #0 801bc2e: 701a strb r2, [r3, #0] tcp_process_refused_data(pcb); 801bc30: 6878 ldr r0, [r7, #4] 801bc32: f000 f819 bl 801bc68 if (tcp_active_pcbs_changed) { 801bc36: 4b0b ldr r3, [pc, #44] @ (801bc64 ) 801bc38: 781b ldrb r3, [r3, #0] 801bc3a: 2b00 cmp r3, #0 801bc3c: d000 beq.n 801bc40 /* application callback has changed the pcb list: restart the loop */ goto tcp_fasttmr_start; 801bc3e: e7b8 b.n 801bbb2 } } pcb = next; 801bc40: 683b ldr r3, [r7, #0] 801bc42: 607b str r3, [r7, #4] 801bc44: e002 b.n 801bc4c } else { pcb = pcb->next; 801bc46: 687b ldr r3, [r7, #4] 801bc48: 68db ldr r3, [r3, #12] 801bc4a: 607b str r3, [r7, #4] while (pcb != NULL) { 801bc4c: 687b ldr r3, [r7, #4] 801bc4e: 2b00 cmp r3, #0 801bc50: d1b3 bne.n 801bbba } } } 801bc52: bf00 nop 801bc54: bf00 nop 801bc56: 3708 adds r7, #8 801bc58: 46bd mov sp, r7 801bc5a: bd80 pop {r7, pc} 801bc5c: 2402ae9e .word 0x2402ae9e 801bc60: 2402ae94 .word 0x2402ae94 801bc64: 2402ae9c .word 0x2402ae9c 0801bc68 : } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 801bc68: b590 push {r4, r7, lr} 801bc6a: b085 sub sp, #20 801bc6c: af00 add r7, sp, #0 801bc6e: 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); 801bc70: 687b ldr r3, [r7, #4] 801bc72: 2b00 cmp r3, #0 801bc74: d109 bne.n 801bc8a 801bc76: 4b38 ldr r3, [pc, #224] @ (801bd58 ) 801bc78: f240 6209 movw r2, #1545 @ 0x609 801bc7c: 4937 ldr r1, [pc, #220] @ (801bd5c ) 801bc7e: 4838 ldr r0, [pc, #224] @ (801bd60 ) 801bc80: f00d fea4 bl 80299cc 801bc84: f06f 030f mvn.w r3, #15 801bc88: e061 b.n 801bd4e #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; 801bc8a: 687b ldr r3, [r7, #4] 801bc8c: 6f9b ldr r3, [r3, #120] @ 0x78 801bc8e: 7b5b ldrb r3, [r3, #13] 801bc90: 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; 801bc92: 687b ldr r3, [r7, #4] 801bc94: 6f9b ldr r3, [r3, #120] @ 0x78 801bc96: 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; 801bc98: 687b ldr r3, [r7, #4] 801bc9a: 2200 movs r2, #0 801bc9c: 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); 801bc9e: 687b ldr r3, [r7, #4] 801bca0: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 801bca4: 2b00 cmp r3, #0 801bca6: d00b beq.n 801bcc0 801bca8: 687b ldr r3, [r7, #4] 801bcaa: f8d3 4084 ldr.w r4, [r3, #132] @ 0x84 801bcae: 687b ldr r3, [r7, #4] 801bcb0: 6918 ldr r0, [r3, #16] 801bcb2: 2300 movs r3, #0 801bcb4: 68ba ldr r2, [r7, #8] 801bcb6: 6879 ldr r1, [r7, #4] 801bcb8: 47a0 blx r4 801bcba: 4603 mov r3, r0 801bcbc: 73fb strb r3, [r7, #15] 801bcbe: e007 b.n 801bcd0 801bcc0: 2300 movs r3, #0 801bcc2: 68ba ldr r2, [r7, #8] 801bcc4: 6879 ldr r1, [r7, #4] 801bcc6: 2000 movs r0, #0 801bcc8: f000 f8a6 bl 801be18 801bccc: 4603 mov r3, r0 801bcce: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801bcd0: f997 300f ldrsb.w r3, [r7, #15] 801bcd4: 2b00 cmp r3, #0 801bcd6: d12b bne.n 801bd30 /* did refused_data include a FIN? */ if ((refused_flags & PBUF_FLAG_TCP_FIN) 801bcd8: 7bbb ldrb r3, [r7, #14] 801bcda: f003 0320 and.w r3, r3, #32 801bcde: 2b00 cmp r3, #0 801bce0: d034 beq.n 801bd4c && (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)) { 801bce2: 687b ldr r3, [r7, #4] 801bce4: 8d1b ldrh r3, [r3, #40] @ 0x28 801bce6: f241 62d0 movw r2, #5840 @ 0x16d0 801bcea: 4293 cmp r3, r2 801bcec: d005 beq.n 801bcfa pcb->rcv_wnd++; 801bcee: 687b ldr r3, [r7, #4] 801bcf0: 8d1b ldrh r3, [r3, #40] @ 0x28 801bcf2: 3301 adds r3, #1 801bcf4: b29a uxth r2, r3 801bcf6: 687b ldr r3, [r7, #4] 801bcf8: 851a strh r2, [r3, #40] @ 0x28 } TCP_EVENT_CLOSED(pcb, err); 801bcfa: 687b ldr r3, [r7, #4] 801bcfc: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 801bd00: 2b00 cmp r3, #0 801bd02: d00b beq.n 801bd1c 801bd04: 687b ldr r3, [r7, #4] 801bd06: f8d3 4084 ldr.w r4, [r3, #132] @ 0x84 801bd0a: 687b ldr r3, [r7, #4] 801bd0c: 6918 ldr r0, [r3, #16] 801bd0e: 2300 movs r3, #0 801bd10: 2200 movs r2, #0 801bd12: 6879 ldr r1, [r7, #4] 801bd14: 47a0 blx r4 801bd16: 4603 mov r3, r0 801bd18: 73fb strb r3, [r7, #15] 801bd1a: e001 b.n 801bd20 801bd1c: 2300 movs r3, #0 801bd1e: 73fb strb r3, [r7, #15] if (err == ERR_ABRT) { 801bd20: f997 300f ldrsb.w r3, [r7, #15] 801bd24: f113 0f0d cmn.w r3, #13 801bd28: d110 bne.n 801bd4c return ERR_ABRT; 801bd2a: f06f 030c mvn.w r3, #12 801bd2e: e00e b.n 801bd4e } } } else if (err == ERR_ABRT) { 801bd30: f997 300f ldrsb.w r3, [r7, #15] 801bd34: f113 0f0d cmn.w r3, #13 801bd38: d102 bne.n 801bd40 /* 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; 801bd3a: f06f 030c mvn.w r3, #12 801bd3e: e006 b.n 801bd4e #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; 801bd40: 687b ldr r3, [r7, #4] 801bd42: 68ba ldr r2, [r7, #8] 801bd44: 679a str r2, [r3, #120] @ 0x78 return ERR_INPROGRESS; 801bd46: f06f 0304 mvn.w r3, #4 801bd4a: e000 b.n 801bd4e } } return ERR_OK; 801bd4c: 2300 movs r3, #0 } 801bd4e: 4618 mov r0, r3 801bd50: 3714 adds r7, #20 801bd52: 46bd mov sp, r7 801bd54: bd90 pop {r4, r7, pc} 801bd56: bf00 nop 801bd58: 0802e5a8 .word 0x0802e5a8 801bd5c: 0802eab8 .word 0x0802eab8 801bd60: 0802e5ec .word 0x0802e5ec 0801bd64 : * * @param seg tcp_seg list of TCP segments to free */ void tcp_segs_free(struct tcp_seg *seg) { 801bd64: b580 push {r7, lr} 801bd66: b084 sub sp, #16 801bd68: af00 add r7, sp, #0 801bd6a: 6078 str r0, [r7, #4] while (seg != NULL) { 801bd6c: e007 b.n 801bd7e struct tcp_seg *next = seg->next; 801bd6e: 687b ldr r3, [r7, #4] 801bd70: 681b ldr r3, [r3, #0] 801bd72: 60fb str r3, [r7, #12] tcp_seg_free(seg); 801bd74: 6878 ldr r0, [r7, #4] 801bd76: f000 f80a bl 801bd8e seg = next; 801bd7a: 68fb ldr r3, [r7, #12] 801bd7c: 607b str r3, [r7, #4] while (seg != NULL) { 801bd7e: 687b ldr r3, [r7, #4] 801bd80: 2b00 cmp r3, #0 801bd82: d1f4 bne.n 801bd6e } } 801bd84: bf00 nop 801bd86: bf00 nop 801bd88: 3710 adds r7, #16 801bd8a: 46bd mov sp, r7 801bd8c: bd80 pop {r7, pc} 0801bd8e : * * @param seg single tcp_seg to free */ void tcp_seg_free(struct tcp_seg *seg) { 801bd8e: b580 push {r7, lr} 801bd90: b082 sub sp, #8 801bd92: af00 add r7, sp, #0 801bd94: 6078 str r0, [r7, #4] if (seg != NULL) { 801bd96: 687b ldr r3, [r7, #4] 801bd98: 2b00 cmp r3, #0 801bd9a: d00c beq.n 801bdb6 if (seg->p != NULL) { 801bd9c: 687b ldr r3, [r7, #4] 801bd9e: 685b ldr r3, [r3, #4] 801bda0: 2b00 cmp r3, #0 801bda2: d004 beq.n 801bdae pbuf_free(seg->p); 801bda4: 687b ldr r3, [r7, #4] 801bda6: 685b ldr r3, [r3, #4] 801bda8: 4618 mov r0, r3 801bdaa: f7fe fb97 bl 801a4dc #if TCP_DEBUG seg->p = NULL; #endif /* TCP_DEBUG */ } memp_free(MEMP_TCP_SEG, seg); 801bdae: 6879 ldr r1, [r7, #4] 801bdb0: 2003 movs r0, #3 801bdb2: f7fd fca5 bl 8019700 } } 801bdb6: bf00 nop 801bdb8: 3708 adds r7, #8 801bdba: 46bd mov sp, r7 801bdbc: bd80 pop {r7, pc} ... 0801bdc0 : * @param seg the old tcp_seg * @return a copy of seg */ struct tcp_seg * tcp_seg_copy(struct tcp_seg *seg) { 801bdc0: b580 push {r7, lr} 801bdc2: b084 sub sp, #16 801bdc4: af00 add r7, sp, #0 801bdc6: 6078 str r0, [r7, #4] struct tcp_seg *cseg; LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL); 801bdc8: 687b ldr r3, [r7, #4] 801bdca: 2b00 cmp r3, #0 801bdcc: d106 bne.n 801bddc 801bdce: 4b0f ldr r3, [pc, #60] @ (801be0c ) 801bdd0: f240 6282 movw r2, #1666 @ 0x682 801bdd4: 490e ldr r1, [pc, #56] @ (801be10 ) 801bdd6: 480f ldr r0, [pc, #60] @ (801be14 ) 801bdd8: f00d fdf8 bl 80299cc cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG); 801bddc: 2003 movs r0, #3 801bdde: f7fd fc19 bl 8019614 801bde2: 60f8 str r0, [r7, #12] if (cseg == NULL) { 801bde4: 68fb ldr r3, [r7, #12] 801bde6: 2b00 cmp r3, #0 801bde8: d101 bne.n 801bdee return NULL; 801bdea: 2300 movs r3, #0 801bdec: e00a b.n 801be04 } SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg)); 801bdee: 2214 movs r2, #20 801bdf0: 6879 ldr r1, [r7, #4] 801bdf2: 68f8 ldr r0, [r7, #12] 801bdf4: f00e f873 bl 8029ede pbuf_ref(cseg->p); 801bdf8: 68fb ldr r3, [r7, #12] 801bdfa: 685b ldr r3, [r3, #4] 801bdfc: 4618 mov r0, r3 801bdfe: f7fe fc13 bl 801a628 return cseg; 801be02: 68fb ldr r3, [r7, #12] } 801be04: 4618 mov r0, r3 801be06: 3710 adds r7, #16 801be08: 46bd mov sp, r7 801be0a: bd80 pop {r7, pc} 801be0c: 0802e5a8 .word 0x0802e5a8 801be10: 0802eafc .word 0x0802eafc 801be14: 0802e5ec .word 0x0802e5ec 0801be18 : * 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) { 801be18: b580 push {r7, lr} 801be1a: b084 sub sp, #16 801be1c: af00 add r7, sp, #0 801be1e: 60f8 str r0, [r7, #12] 801be20: 60b9 str r1, [r7, #8] 801be22: 607a str r2, [r7, #4] 801be24: 70fb strb r3, [r7, #3] LWIP_UNUSED_ARG(arg); LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG); 801be26: 68bb ldr r3, [r7, #8] 801be28: 2b00 cmp r3, #0 801be2a: d109 bne.n 801be40 801be2c: 4b12 ldr r3, [pc, #72] @ (801be78 ) 801be2e: f44f 62d3 mov.w r2, #1688 @ 0x698 801be32: 4912 ldr r1, [pc, #72] @ (801be7c ) 801be34: 4812 ldr r0, [pc, #72] @ (801be80 ) 801be36: f00d fdc9 bl 80299cc 801be3a: f06f 030f mvn.w r3, #15 801be3e: e016 b.n 801be6e if (p != NULL) { 801be40: 687b ldr r3, [r7, #4] 801be42: 2b00 cmp r3, #0 801be44: d009 beq.n 801be5a tcp_recved(pcb, p->tot_len); 801be46: 687b ldr r3, [r7, #4] 801be48: 891b ldrh r3, [r3, #8] 801be4a: 4619 mov r1, r3 801be4c: 68b8 ldr r0, [r7, #8] 801be4e: f7ff f9b1 bl 801b1b4 pbuf_free(p); 801be52: 6878 ldr r0, [r7, #4] 801be54: f7fe fb42 bl 801a4dc 801be58: e008 b.n 801be6c } else if (err == ERR_OK) { 801be5a: f997 3003 ldrsb.w r3, [r7, #3] 801be5e: 2b00 cmp r3, #0 801be60: d104 bne.n 801be6c return tcp_close(pcb); 801be62: 68b8 ldr r0, [r7, #8] 801be64: f7fe fff4 bl 801ae50 801be68: 4603 mov r3, r0 801be6a: e000 b.n 801be6e } return ERR_OK; 801be6c: 2300 movs r3, #0 } 801be6e: 4618 mov r0, r3 801be70: 3710 adds r7, #16 801be72: 46bd mov sp, r7 801be74: bd80 pop {r7, pc} 801be76: bf00 nop 801be78: 0802e5a8 .word 0x0802e5a8 801be7c: 0802eb18 .word 0x0802eb18 801be80: 0802e5ec .word 0x0802e5ec 0801be84 : * * @param prio minimum priority */ static void tcp_kill_prio(u8_t prio) { 801be84: b580 push {r7, lr} 801be86: b086 sub sp, #24 801be88: af00 add r7, sp, #0 801be8a: 4603 mov r3, r0 801be8c: 71fb strb r3, [r7, #7] struct tcp_pcb *pcb, *inactive; u32_t inactivity; u8_t mprio; mprio = LWIP_MIN(TCP_PRIO_MAX, prio); 801be8e: f997 3007 ldrsb.w r3, [r7, #7] 801be92: 2b00 cmp r3, #0 801be94: db01 blt.n 801be9a 801be96: 79fb ldrb r3, [r7, #7] 801be98: e000 b.n 801be9c 801be9a: 237f movs r3, #127 @ 0x7f 801be9c: 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) { 801be9e: 7afb ldrb r3, [r7, #11] 801bea0: 2b00 cmp r3, #0 801bea2: d034 beq.n 801bf0e /* 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--; 801bea4: 7afb ldrb r3, [r7, #11] 801bea6: 3b01 subs r3, #1 801bea8: 72fb strb r3, [r7, #11] inactivity = 0; 801beaa: 2300 movs r3, #0 801beac: 60fb str r3, [r7, #12] inactive = NULL; 801beae: 2300 movs r3, #0 801beb0: 613b str r3, [r7, #16] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 801beb2: 4b19 ldr r3, [pc, #100] @ (801bf18 ) 801beb4: 681b ldr r3, [r3, #0] 801beb6: 617b str r3, [r7, #20] 801beb8: e01f b.n 801befa /* lower prio is always a kill candidate */ if ((pcb->prio < mprio) || 801beba: 697b ldr r3, [r7, #20] 801bebc: 7d5b ldrb r3, [r3, #21] 801bebe: 7afa ldrb r2, [r7, #11] 801bec0: 429a cmp r2, r3 801bec2: d80c bhi.n 801bede /* longer inactivity is also a kill candidate */ ((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) { 801bec4: 697b ldr r3, [r7, #20] 801bec6: 7d5b ldrb r3, [r3, #21] if ((pcb->prio < mprio) || 801bec8: 7afa ldrb r2, [r7, #11] 801beca: 429a cmp r2, r3 801becc: d112 bne.n 801bef4 ((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) { 801bece: 4b13 ldr r3, [pc, #76] @ (801bf1c ) 801bed0: 681a ldr r2, [r3, #0] 801bed2: 697b ldr r3, [r7, #20] 801bed4: 6a1b ldr r3, [r3, #32] 801bed6: 1ad3 subs r3, r2, r3 801bed8: 68fa ldr r2, [r7, #12] 801beda: 429a cmp r2, r3 801bedc: d80a bhi.n 801bef4 inactivity = tcp_ticks - pcb->tmr; 801bede: 4b0f ldr r3, [pc, #60] @ (801bf1c ) 801bee0: 681a ldr r2, [r3, #0] 801bee2: 697b ldr r3, [r7, #20] 801bee4: 6a1b ldr r3, [r3, #32] 801bee6: 1ad3 subs r3, r2, r3 801bee8: 60fb str r3, [r7, #12] inactive = pcb; 801beea: 697b ldr r3, [r7, #20] 801beec: 613b str r3, [r7, #16] mprio = pcb->prio; 801beee: 697b ldr r3, [r7, #20] 801bef0: 7d5b ldrb r3, [r3, #21] 801bef2: 72fb strb r3, [r7, #11] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 801bef4: 697b ldr r3, [r7, #20] 801bef6: 68db ldr r3, [r3, #12] 801bef8: 617b str r3, [r7, #20] 801befa: 697b ldr r3, [r7, #20] 801befc: 2b00 cmp r3, #0 801befe: d1dc bne.n 801beba } } if (inactive != NULL) { 801bf00: 693b ldr r3, [r7, #16] 801bf02: 2b00 cmp r3, #0 801bf04: d004 beq.n 801bf10 LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 801bf06: 6938 ldr r0, [r7, #16] 801bf08: f7ff f8ee bl 801b0e8 801bf0c: e000 b.n 801bf10 return; 801bf0e: bf00 nop } } 801bf10: 3718 adds r7, #24 801bf12: 46bd mov sp, r7 801bf14: bd80 pop {r7, pc} 801bf16: bf00 nop 801bf18: 2402ae94 .word 0x2402ae94 801bf1c: 2402ae88 .word 0x2402ae88 0801bf20 : * 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) { 801bf20: b580 push {r7, lr} 801bf22: b086 sub sp, #24 801bf24: af00 add r7, sp, #0 801bf26: 4603 mov r3, r0 801bf28: 71fb strb r3, [r7, #7] struct tcp_pcb *pcb, *inactive; u32_t inactivity; LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK)); 801bf2a: 79fb ldrb r3, [r7, #7] 801bf2c: 2b08 cmp r3, #8 801bf2e: d009 beq.n 801bf44 801bf30: 79fb ldrb r3, [r7, #7] 801bf32: 2b09 cmp r3, #9 801bf34: d006 beq.n 801bf44 801bf36: 4b1a ldr r3, [pc, #104] @ (801bfa0 ) 801bf38: f240 62dd movw r2, #1757 @ 0x6dd 801bf3c: 4919 ldr r1, [pc, #100] @ (801bfa4 ) 801bf3e: 481a ldr r0, [pc, #104] @ (801bfa8 ) 801bf40: f00d fd44 bl 80299cc inactivity = 0; 801bf44: 2300 movs r3, #0 801bf46: 60fb str r3, [r7, #12] inactive = NULL; 801bf48: 2300 movs r3, #0 801bf4a: 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) { 801bf4c: 4b17 ldr r3, [pc, #92] @ (801bfac ) 801bf4e: 681b ldr r3, [r3, #0] 801bf50: 617b str r3, [r7, #20] 801bf52: e017 b.n 801bf84 if (pcb->state == state) { 801bf54: 697b ldr r3, [r7, #20] 801bf56: 7d1b ldrb r3, [r3, #20] 801bf58: 79fa ldrb r2, [r7, #7] 801bf5a: 429a cmp r2, r3 801bf5c: d10f bne.n 801bf7e if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 801bf5e: 4b14 ldr r3, [pc, #80] @ (801bfb0 ) 801bf60: 681a ldr r2, [r3, #0] 801bf62: 697b ldr r3, [r7, #20] 801bf64: 6a1b ldr r3, [r3, #32] 801bf66: 1ad3 subs r3, r2, r3 801bf68: 68fa ldr r2, [r7, #12] 801bf6a: 429a cmp r2, r3 801bf6c: d807 bhi.n 801bf7e inactivity = tcp_ticks - pcb->tmr; 801bf6e: 4b10 ldr r3, [pc, #64] @ (801bfb0 ) 801bf70: 681a ldr r2, [r3, #0] 801bf72: 697b ldr r3, [r7, #20] 801bf74: 6a1b ldr r3, [r3, #32] 801bf76: 1ad3 subs r3, r2, r3 801bf78: 60fb str r3, [r7, #12] inactive = pcb; 801bf7a: 697b ldr r3, [r7, #20] 801bf7c: 613b str r3, [r7, #16] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 801bf7e: 697b ldr r3, [r7, #20] 801bf80: 68db ldr r3, [r3, #12] 801bf82: 617b str r3, [r7, #20] 801bf84: 697b ldr r3, [r7, #20] 801bf86: 2b00 cmp r3, #0 801bf88: d1e4 bne.n 801bf54 } } } if (inactive != NULL) { 801bf8a: 693b ldr r3, [r7, #16] 801bf8c: 2b00 cmp r3, #0 801bf8e: d003 beq.n 801bf98 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); 801bf90: 2100 movs r1, #0 801bf92: 6938 ldr r0, [r7, #16] 801bf94: f7fe ffe8 bl 801af68 } } 801bf98: bf00 nop 801bf9a: 3718 adds r7, #24 801bf9c: 46bd mov sp, r7 801bf9e: bd80 pop {r7, pc} 801bfa0: 0802e5a8 .word 0x0802e5a8 801bfa4: 0802eb34 .word 0x0802eb34 801bfa8: 0802e5ec .word 0x0802e5ec 801bfac: 2402ae94 .word 0x2402ae94 801bfb0: 2402ae88 .word 0x2402ae88 0801bfb4 : * 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) { 801bfb4: b580 push {r7, lr} 801bfb6: b084 sub sp, #16 801bfb8: af00 add r7, sp, #0 struct tcp_pcb *pcb, *inactive; u32_t inactivity; inactivity = 0; 801bfba: 2300 movs r3, #0 801bfbc: 607b str r3, [r7, #4] inactive = NULL; 801bfbe: 2300 movs r3, #0 801bfc0: 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) { 801bfc2: 4b12 ldr r3, [pc, #72] @ (801c00c ) 801bfc4: 681b ldr r3, [r3, #0] 801bfc6: 60fb str r3, [r7, #12] 801bfc8: e012 b.n 801bff0 if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 801bfca: 4b11 ldr r3, [pc, #68] @ (801c010 ) 801bfcc: 681a ldr r2, [r3, #0] 801bfce: 68fb ldr r3, [r7, #12] 801bfd0: 6a1b ldr r3, [r3, #32] 801bfd2: 1ad3 subs r3, r2, r3 801bfd4: 687a ldr r2, [r7, #4] 801bfd6: 429a cmp r2, r3 801bfd8: d807 bhi.n 801bfea inactivity = tcp_ticks - pcb->tmr; 801bfda: 4b0d ldr r3, [pc, #52] @ (801c010 ) 801bfdc: 681a ldr r2, [r3, #0] 801bfde: 68fb ldr r3, [r7, #12] 801bfe0: 6a1b ldr r3, [r3, #32] 801bfe2: 1ad3 subs r3, r2, r3 801bfe4: 607b str r3, [r7, #4] inactive = pcb; 801bfe6: 68fb ldr r3, [r7, #12] 801bfe8: 60bb str r3, [r7, #8] for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 801bfea: 68fb ldr r3, [r7, #12] 801bfec: 68db ldr r3, [r3, #12] 801bfee: 60fb str r3, [r7, #12] 801bff0: 68fb ldr r3, [r7, #12] 801bff2: 2b00 cmp r3, #0 801bff4: d1e9 bne.n 801bfca } } if (inactive != NULL) { 801bff6: 68bb ldr r3, [r7, #8] 801bff8: 2b00 cmp r3, #0 801bffa: d002 beq.n 801c002 LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 801bffc: 68b8 ldr r0, [r7, #8] 801bffe: f7ff f873 bl 801b0e8 } } 801c002: bf00 nop 801c004: 3710 adds r7, #16 801c006: 46bd mov sp, r7 801c008: bd80 pop {r7, pc} 801c00a: bf00 nop 801c00c: 2402ae98 .word 0x2402ae98 801c010: 2402ae88 .word 0x2402ae88 0801c014 : * 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) { 801c014: b580 push {r7, lr} 801c016: b082 sub sp, #8 801c018: af00 add r7, sp, #0 struct tcp_pcb *pcb = tcp_active_pcbs; 801c01a: 4b10 ldr r3, [pc, #64] @ (801c05c ) 801c01c: 681b ldr r3, [r3, #0] 801c01e: 607b str r3, [r7, #4] while (pcb != NULL) { 801c020: e014 b.n 801c04c struct tcp_pcb *next = pcb->next; 801c022: 687b ldr r3, [r7, #4] 801c024: 68db ldr r3, [r3, #12] 801c026: 603b str r3, [r7, #0] /* send pending FIN */ if (pcb->flags & TF_CLOSEPEND) { 801c028: 687b ldr r3, [r7, #4] 801c02a: 8b5b ldrh r3, [r3, #26] 801c02c: f003 0308 and.w r3, r3, #8 801c030: 2b00 cmp r3, #0 801c032: d009 beq.n 801c048 LWIP_DEBUGF(TCP_DEBUG, ("tcp_handle_closepend: pending FIN\n")); tcp_clear_flags(pcb, TF_CLOSEPEND); 801c034: 687b ldr r3, [r7, #4] 801c036: 8b5b ldrh r3, [r3, #26] 801c038: f023 0308 bic.w r3, r3, #8 801c03c: b29a uxth r2, r3 801c03e: 687b ldr r3, [r7, #4] 801c040: 835a strh r2, [r3, #26] tcp_close_shutdown_fin(pcb); 801c042: 6878 ldr r0, [r7, #4] 801c044: f7fe fe9a bl 801ad7c } pcb = next; 801c048: 683b ldr r3, [r7, #0] 801c04a: 607b str r3, [r7, #4] while (pcb != NULL) { 801c04c: 687b ldr r3, [r7, #4] 801c04e: 2b00 cmp r3, #0 801c050: d1e7 bne.n 801c022 } } 801c052: bf00 nop 801c054: bf00 nop 801c056: 3708 adds r7, #8 801c058: 46bd mov sp, r7 801c05a: bd80 pop {r7, pc} 801c05c: 2402ae94 .word 0x2402ae94 0801c060 : * @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) { 801c060: b580 push {r7, lr} 801c062: b084 sub sp, #16 801c064: af00 add r7, sp, #0 801c066: 4603 mov r3, r0 801c068: 71fb strb r3, [r7, #7] struct tcp_pcb *pcb; LWIP_ASSERT_CORE_LOCKED(); 801c06a: f7f4 fa61 bl 8010530 pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 801c06e: 2001 movs r0, #1 801c070: f7fd fad0 bl 8019614 801c074: 60f8 str r0, [r7, #12] if (pcb == NULL) { 801c076: 68fb ldr r3, [r7, #12] 801c078: 2b00 cmp r3, #0 801c07a: d126 bne.n 801c0ca /* Try to send FIN for all pcbs stuck in TF_CLOSEPEND first */ tcp_handle_closepend(); 801c07c: f7ff ffca bl 801c014 /* Try killing oldest connection in TIME-WAIT. */ LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest TIME-WAIT connection\n")); tcp_kill_timewait(); 801c080: f7ff ff98 bl 801bfb4 /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 801c084: 2001 movs r0, #1 801c086: f7fd fac5 bl 8019614 801c08a: 60f8 str r0, [r7, #12] if (pcb == NULL) { 801c08c: 68fb ldr r3, [r7, #12] 801c08e: 2b00 cmp r3, #0 801c090: d11b bne.n 801c0ca /* 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); 801c092: 2009 movs r0, #9 801c094: f7ff ff44 bl 801bf20 /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 801c098: 2001 movs r0, #1 801c09a: f7fd fabb bl 8019614 801c09e: 60f8 str r0, [r7, #12] if (pcb == NULL) { 801c0a0: 68fb ldr r3, [r7, #12] 801c0a2: 2b00 cmp r3, #0 801c0a4: d111 bne.n 801c0ca /* Try killing oldest connection in CLOSING. */ LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest CLOSING connection\n")); tcp_kill_state(CLOSING); 801c0a6: 2008 movs r0, #8 801c0a8: f7ff ff3a bl 801bf20 /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 801c0ac: 2001 movs r0, #1 801c0ae: f7fd fab1 bl 8019614 801c0b2: 60f8 str r0, [r7, #12] if (pcb == NULL) { 801c0b4: 68fb ldr r3, [r7, #12] 801c0b6: 2b00 cmp r3, #0 801c0b8: d107 bne.n 801c0ca /* 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); 801c0ba: 79fb ldrb r3, [r7, #7] 801c0bc: 4618 mov r0, r3 801c0be: f7ff fee1 bl 801be84 /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 801c0c2: 2001 movs r0, #1 801c0c4: f7fd faa6 bl 8019614 801c0c8: 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) { 801c0ca: 68fb ldr r3, [r7, #12] 801c0cc: 2b00 cmp r3, #0 801c0ce: d03f beq.n 801c150 /* zero out the whole pcb, so there is no need to initialize members to zero */ memset(pcb, 0, sizeof(struct tcp_pcb)); 801c0d0: 229c movs r2, #156 @ 0x9c 801c0d2: 2100 movs r1, #0 801c0d4: 68f8 ldr r0, [r7, #12] 801c0d6: f00d fe0b bl 8029cf0 pcb->prio = prio; 801c0da: 68fb ldr r3, [r7, #12] 801c0dc: 79fa ldrb r2, [r7, #7] 801c0de: 755a strb r2, [r3, #21] pcb->snd_buf = TCP_SND_BUF; 801c0e0: 68fb ldr r3, [r7, #12] 801c0e2: f241 62d0 movw r2, #5840 @ 0x16d0 801c0e6: 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); 801c0ea: 68fb ldr r3, [r7, #12] 801c0ec: f241 62d0 movw r2, #5840 @ 0x16d0 801c0f0: 855a strh r2, [r3, #42] @ 0x2a 801c0f2: 68fb ldr r3, [r7, #12] 801c0f4: 8d5a ldrh r2, [r3, #42] @ 0x2a 801c0f6: 68fb ldr r3, [r7, #12] 801c0f8: 851a strh r2, [r3, #40] @ 0x28 pcb->ttl = TCP_TTL; 801c0fa: 68fb ldr r3, [r7, #12] 801c0fc: 22ff movs r2, #255 @ 0xff 801c0fe: 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; 801c100: 68fb ldr r3, [r7, #12] 801c102: f44f 7206 mov.w r2, #536 @ 0x218 801c106: 865a strh r2, [r3, #50] @ 0x32 pcb->rto = 3000 / TCP_SLOW_INTERVAL; 801c108: 68fb ldr r3, [r7, #12] 801c10a: 2206 movs r2, #6 801c10c: f8a3 2040 strh.w r2, [r3, #64] @ 0x40 pcb->sv = 3000 / TCP_SLOW_INTERVAL; 801c110: 68fb ldr r3, [r7, #12] 801c112: 2206 movs r2, #6 801c114: 87da strh r2, [r3, #62] @ 0x3e pcb->rtime = -1; 801c116: 68fb ldr r3, [r7, #12] 801c118: f64f 72ff movw r2, #65535 @ 0xffff 801c11c: 861a strh r2, [r3, #48] @ 0x30 pcb->cwnd = 1; 801c11e: 68fb ldr r3, [r7, #12] 801c120: 2201 movs r2, #1 801c122: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 pcb->tmr = tcp_ticks; 801c126: 4b0d ldr r3, [pc, #52] @ (801c15c ) 801c128: 681a ldr r2, [r3, #0] 801c12a: 68fb ldr r3, [r7, #12] 801c12c: 621a str r2, [r3, #32] pcb->last_timer = tcp_timer_ctr; 801c12e: 4b0c ldr r3, [pc, #48] @ (801c160 ) 801c130: 781a ldrb r2, [r3, #0] 801c132: 68fb ldr r3, [r7, #12] 801c134: 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; 801c136: 68fb ldr r3, [r7, #12] 801c138: f241 62d0 movw r2, #5840 @ 0x16d0 801c13c: f8a3 204a strh.w r2, [r3, #74] @ 0x4a #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 801c140: 68fb ldr r3, [r7, #12] 801c142: 4a08 ldr r2, [pc, #32] @ (801c164 ) 801c144: f8c3 2084 str.w r2, [r3, #132] @ 0x84 #endif /* LWIP_CALLBACK_API */ /* Init KEEPALIVE timer */ pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; 801c148: 68fb ldr r3, [r7, #12] 801c14a: 4a07 ldr r2, [pc, #28] @ (801c168 ) 801c14c: 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; 801c150: 68fb ldr r3, [r7, #12] } 801c152: 4618 mov r0, r3 801c154: 3710 adds r7, #16 801c156: 46bd mov sp, r7 801c158: bd80 pop {r7, pc} 801c15a: bf00 nop 801c15c: 2402ae88 .word 0x2402ae88 801c160: 2402ae9e .word 0x2402ae9e 801c164: 0801be19 .word 0x0801be19 801c168: 006ddd00 .word 0x006ddd00 0801c16c : * 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) { 801c16c: b580 push {r7, lr} 801c16e: b084 sub sp, #16 801c170: af00 add r7, sp, #0 801c172: 4603 mov r3, r0 801c174: 71fb strb r3, [r7, #7] struct tcp_pcb *pcb; pcb = tcp_alloc(TCP_PRIO_NORMAL); 801c176: 2040 movs r0, #64 @ 0x40 801c178: f7ff ff72 bl 801c060 801c17c: 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; 801c17e: 68fb ldr r3, [r7, #12] } 801c180: 4618 mov r0, r3 801c182: 3710 adds r7, #16 801c184: 46bd mov sp, r7 801c186: bd80 pop {r7, pc} 0801c188 : * @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) { 801c188: b580 push {r7, lr} 801c18a: b082 sub sp, #8 801c18c: af00 add r7, sp, #0 801c18e: 6078 str r0, [r7, #4] 801c190: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801c192: f7f4 f9cd bl 8010530 /* This function is allowed to be called for both listen pcbs and connection pcbs. */ if (pcb != NULL) { 801c196: 687b ldr r3, [r7, #4] 801c198: 2b00 cmp r3, #0 801c19a: d002 beq.n 801c1a2 pcb->callback_arg = arg; 801c19c: 687b ldr r3, [r7, #4] 801c19e: 683a ldr r2, [r7, #0] 801c1a0: 611a str r2, [r3, #16] } } 801c1a2: bf00 nop 801c1a4: 3708 adds r7, #8 801c1a6: 46bd mov sp, r7 801c1a8: bd80 pop {r7, pc} ... 0801c1ac : * @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) { 801c1ac: b580 push {r7, lr} 801c1ae: b082 sub sp, #8 801c1b0: af00 add r7, sp, #0 801c1b2: 6078 str r0, [r7, #4] 801c1b4: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801c1b6: f7f4 f9bb bl 8010530 if (pcb != NULL) { 801c1ba: 687b ldr r3, [r7, #4] 801c1bc: 2b00 cmp r3, #0 801c1be: d00e beq.n 801c1de LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN); 801c1c0: 687b ldr r3, [r7, #4] 801c1c2: 7d1b ldrb r3, [r3, #20] 801c1c4: 2b01 cmp r3, #1 801c1c6: d106 bne.n 801c1d6 801c1c8: 4b07 ldr r3, [pc, #28] @ (801c1e8 ) 801c1ca: f240 72df movw r2, #2015 @ 0x7df 801c1ce: 4907 ldr r1, [pc, #28] @ (801c1ec ) 801c1d0: 4807 ldr r0, [pc, #28] @ (801c1f0 ) 801c1d2: f00d fbfb bl 80299cc pcb->recv = recv; 801c1d6: 687b ldr r3, [r7, #4] 801c1d8: 683a ldr r2, [r7, #0] 801c1da: f8c3 2084 str.w r2, [r3, #132] @ 0x84 } } 801c1de: bf00 nop 801c1e0: 3708 adds r7, #8 801c1e2: 46bd mov sp, r7 801c1e4: bd80 pop {r7, pc} 801c1e6: bf00 nop 801c1e8: 0802e5a8 .word 0x0802e5a8 801c1ec: 0802eb44 .word 0x0802eb44 801c1f0: 0802e5ec .word 0x0802e5ec 0801c1f4 : * @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) { 801c1f4: b580 push {r7, lr} 801c1f6: b082 sub sp, #8 801c1f8: af00 add r7, sp, #0 801c1fa: 6078 str r0, [r7, #4] 801c1fc: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801c1fe: f7f4 f997 bl 8010530 if (pcb != NULL) { 801c202: 687b ldr r3, [r7, #4] 801c204: 2b00 cmp r3, #0 801c206: d00e beq.n 801c226 LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN); 801c208: 687b ldr r3, [r7, #4] 801c20a: 7d1b ldrb r3, [r3, #20] 801c20c: 2b01 cmp r3, #1 801c20e: d106 bne.n 801c21e 801c210: 4b07 ldr r3, [pc, #28] @ (801c230 ) 801c212: f240 72f3 movw r2, #2035 @ 0x7f3 801c216: 4907 ldr r1, [pc, #28] @ (801c234 ) 801c218: 4807 ldr r0, [pc, #28] @ (801c238 ) 801c21a: f00d fbd7 bl 80299cc pcb->sent = sent; 801c21e: 687b ldr r3, [r7, #4] 801c220: 683a ldr r2, [r7, #0] 801c222: f8c3 2080 str.w r2, [r3, #128] @ 0x80 } } 801c226: bf00 nop 801c228: 3708 adds r7, #8 801c22a: 46bd mov sp, r7 801c22c: bd80 pop {r7, pc} 801c22e: bf00 nop 801c230: 0802e5a8 .word 0x0802e5a8 801c234: 0802eb6c .word 0x0802eb6c 801c238: 0802e5ec .word 0x0802e5ec 0801c23c : * @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) { 801c23c: b580 push {r7, lr} 801c23e: b082 sub sp, #8 801c240: af00 add r7, sp, #0 801c242: 6078 str r0, [r7, #4] 801c244: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801c246: f7f4 f973 bl 8010530 if (pcb != NULL) { 801c24a: 687b ldr r3, [r7, #4] 801c24c: 2b00 cmp r3, #0 801c24e: d00e beq.n 801c26e LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN); 801c250: 687b ldr r3, [r7, #4] 801c252: 7d1b ldrb r3, [r3, #20] 801c254: 2b01 cmp r3, #1 801c256: d106 bne.n 801c266 801c258: 4b07 ldr r3, [pc, #28] @ (801c278 ) 801c25a: f640 020d movw r2, #2061 @ 0x80d 801c25e: 4907 ldr r1, [pc, #28] @ (801c27c ) 801c260: 4807 ldr r0, [pc, #28] @ (801c280 ) 801c262: f00d fbb3 bl 80299cc pcb->errf = err; 801c266: 687b ldr r3, [r7, #4] 801c268: 683a ldr r2, [r7, #0] 801c26a: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } } 801c26e: bf00 nop 801c270: 3708 adds r7, #8 801c272: 46bd mov sp, r7 801c274: bd80 pop {r7, pc} 801c276: bf00 nop 801c278: 0802e5a8 .word 0x0802e5a8 801c27c: 0802eb94 .word 0x0802eb94 801c280: 0802e5ec .word 0x0802e5ec 0801c284 : * @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) { 801c284: b580 push {r7, lr} 801c286: b084 sub sp, #16 801c288: af00 add r7, sp, #0 801c28a: 6078 str r0, [r7, #4] 801c28c: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801c28e: f7f4 f94f bl 8010530 if ((pcb != NULL) && (pcb->state == LISTEN)) { 801c292: 687b ldr r3, [r7, #4] 801c294: 2b00 cmp r3, #0 801c296: d008 beq.n 801c2aa 801c298: 687b ldr r3, [r7, #4] 801c29a: 7d1b ldrb r3, [r3, #20] 801c29c: 2b01 cmp r3, #1 801c29e: d104 bne.n 801c2aa struct tcp_pcb_listen *lpcb = (struct tcp_pcb_listen *)pcb; 801c2a0: 687b ldr r3, [r7, #4] 801c2a2: 60fb str r3, [r7, #12] lpcb->accept = accept; 801c2a4: 68fb ldr r3, [r7, #12] 801c2a6: 683a ldr r2, [r7, #0] 801c2a8: 619a str r2, [r3, #24] } } 801c2aa: bf00 nop 801c2ac: 3710 adds r7, #16 801c2ae: 46bd mov sp, r7 801c2b0: bd80 pop {r7, pc} ... 0801c2b4 : * 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) { 801c2b4: b580 push {r7, lr} 801c2b6: b084 sub sp, #16 801c2b8: af00 add r7, sp, #0 801c2ba: 60f8 str r0, [r7, #12] 801c2bc: 60b9 str r1, [r7, #8] 801c2be: 4613 mov r3, r2 801c2c0: 71fb strb r3, [r7, #7] LWIP_ASSERT_CORE_LOCKED(); 801c2c2: f7f4 f935 bl 8010530 LWIP_ERROR("tcp_poll: invalid pcb", pcb != NULL, return); 801c2c6: 68fb ldr r3, [r7, #12] 801c2c8: 2b00 cmp r3, #0 801c2ca: d107 bne.n 801c2dc 801c2cc: 4b0e ldr r3, [pc, #56] @ (801c308 ) 801c2ce: f640 023d movw r2, #2109 @ 0x83d 801c2d2: 490e ldr r1, [pc, #56] @ (801c30c ) 801c2d4: 480e ldr r0, [pc, #56] @ (801c310 ) 801c2d6: f00d fb79 bl 80299cc 801c2da: e011 b.n 801c300 LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN); 801c2dc: 68fb ldr r3, [r7, #12] 801c2de: 7d1b ldrb r3, [r3, #20] 801c2e0: 2b01 cmp r3, #1 801c2e2: d106 bne.n 801c2f2 801c2e4: 4b08 ldr r3, [pc, #32] @ (801c308 ) 801c2e6: f640 023e movw r2, #2110 @ 0x83e 801c2ea: 490a ldr r1, [pc, #40] @ (801c314 ) 801c2ec: 4808 ldr r0, [pc, #32] @ (801c310 ) 801c2ee: f00d fb6d bl 80299cc #if LWIP_CALLBACK_API pcb->poll = poll; 801c2f2: 68fb ldr r3, [r7, #12] 801c2f4: 68ba ldr r2, [r7, #8] 801c2f6: f8c3 208c str.w r2, [r3, #140] @ 0x8c #else /* LWIP_CALLBACK_API */ LWIP_UNUSED_ARG(poll); #endif /* LWIP_CALLBACK_API */ pcb->pollinterval = interval; 801c2fa: 68fb ldr r3, [r7, #12] 801c2fc: 79fa ldrb r2, [r7, #7] 801c2fe: 775a strb r2, [r3, #29] } 801c300: 3710 adds r7, #16 801c302: 46bd mov sp, r7 801c304: bd80 pop {r7, pc} 801c306: bf00 nop 801c308: 0802e5a8 .word 0x0802e5a8 801c30c: 0802ebbc .word 0x0802ebbc 801c310: 0802e5ec .word 0x0802e5ec 801c314: 0802ebd4 .word 0x0802ebd4 0801c318 : * * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! */ void tcp_pcb_purge(struct tcp_pcb *pcb) { 801c318: b580 push {r7, lr} 801c31a: b082 sub sp, #8 801c31c: af00 add r7, sp, #0 801c31e: 6078 str r0, [r7, #4] LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return); 801c320: 687b ldr r3, [r7, #4] 801c322: 2b00 cmp r3, #0 801c324: d107 bne.n 801c336 801c326: 4b21 ldr r3, [pc, #132] @ (801c3ac ) 801c328: f640 0251 movw r2, #2129 @ 0x851 801c32c: 4920 ldr r1, [pc, #128] @ (801c3b0 ) 801c32e: 4821 ldr r0, [pc, #132] @ (801c3b4 ) 801c330: f00d fb4c bl 80299cc 801c334: e037 b.n 801c3a6 if (pcb->state != CLOSED && 801c336: 687b ldr r3, [r7, #4] 801c338: 7d1b ldrb r3, [r3, #20] 801c33a: 2b00 cmp r3, #0 801c33c: d033 beq.n 801c3a6 pcb->state != TIME_WAIT && 801c33e: 687b ldr r3, [r7, #4] 801c340: 7d1b ldrb r3, [r3, #20] if (pcb->state != CLOSED && 801c342: 2b0a cmp r3, #10 801c344: d02f beq.n 801c3a6 pcb->state != LISTEN) { 801c346: 687b ldr r3, [r7, #4] 801c348: 7d1b ldrb r3, [r3, #20] pcb->state != TIME_WAIT && 801c34a: 2b01 cmp r3, #1 801c34c: d02b beq.n 801c3a6 LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge\n")); tcp_backlog_accepted(pcb); if (pcb->refused_data != NULL) { 801c34e: 687b ldr r3, [r7, #4] 801c350: 6f9b ldr r3, [r3, #120] @ 0x78 801c352: 2b00 cmp r3, #0 801c354: d007 beq.n 801c366 LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n")); pbuf_free(pcb->refused_data); 801c356: 687b ldr r3, [r7, #4] 801c358: 6f9b ldr r3, [r3, #120] @ 0x78 801c35a: 4618 mov r0, r3 801c35c: f7fe f8be bl 801a4dc pcb->refused_data = NULL; 801c360: 687b ldr r3, [r7, #4] 801c362: 2200 movs r2, #0 801c364: 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) { 801c366: 687b ldr r3, [r7, #4] 801c368: 6f5b ldr r3, [r3, #116] @ 0x74 801c36a: 2b00 cmp r3, #0 801c36c: d002 beq.n 801c374 LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n")); tcp_free_ooseq(pcb); 801c36e: 6878 ldr r0, [r7, #4] 801c370: f000 f986 bl 801c680 } #endif /* TCP_QUEUE_OOSEQ */ /* Stop the retransmission timer as it will expect data on unacked queue if it fires */ pcb->rtime = -1; 801c374: 687b ldr r3, [r7, #4] 801c376: f64f 72ff movw r2, #65535 @ 0xffff 801c37a: 861a strh r2, [r3, #48] @ 0x30 tcp_segs_free(pcb->unsent); 801c37c: 687b ldr r3, [r7, #4] 801c37e: 6edb ldr r3, [r3, #108] @ 0x6c 801c380: 4618 mov r0, r3 801c382: f7ff fcef bl 801bd64 tcp_segs_free(pcb->unacked); 801c386: 687b ldr r3, [r7, #4] 801c388: 6f1b ldr r3, [r3, #112] @ 0x70 801c38a: 4618 mov r0, r3 801c38c: f7ff fcea bl 801bd64 pcb->unacked = pcb->unsent = NULL; 801c390: 687b ldr r3, [r7, #4] 801c392: 2200 movs r2, #0 801c394: 66da str r2, [r3, #108] @ 0x6c 801c396: 687b ldr r3, [r7, #4] 801c398: 6eda ldr r2, [r3, #108] @ 0x6c 801c39a: 687b ldr r3, [r7, #4] 801c39c: 671a str r2, [r3, #112] @ 0x70 #if TCP_OVERSIZE pcb->unsent_oversize = 0; 801c39e: 687b ldr r3, [r7, #4] 801c3a0: 2200 movs r2, #0 801c3a2: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 #endif /* TCP_OVERSIZE */ } } 801c3a6: 3708 adds r7, #8 801c3a8: 46bd mov sp, r7 801c3aa: bd80 pop {r7, pc} 801c3ac: 0802e5a8 .word 0x0802e5a8 801c3b0: 0802ebf4 .word 0x0802ebf4 801c3b4: 0802e5ec .word 0x0802e5ec 0801c3b8 : * @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) { 801c3b8: b580 push {r7, lr} 801c3ba: b084 sub sp, #16 801c3bc: af00 add r7, sp, #0 801c3be: 6078 str r0, [r7, #4] 801c3c0: 6039 str r1, [r7, #0] LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL); 801c3c2: 683b ldr r3, [r7, #0] 801c3c4: 2b00 cmp r3, #0 801c3c6: d106 bne.n 801c3d6 801c3c8: 4b3e ldr r3, [pc, #248] @ (801c4c4 ) 801c3ca: f640 0283 movw r2, #2179 @ 0x883 801c3ce: 493e ldr r1, [pc, #248] @ (801c4c8 ) 801c3d0: 483e ldr r0, [pc, #248] @ (801c4cc ) 801c3d2: f00d fafb bl 80299cc LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL); 801c3d6: 687b ldr r3, [r7, #4] 801c3d8: 2b00 cmp r3, #0 801c3da: d106 bne.n 801c3ea 801c3dc: 4b39 ldr r3, [pc, #228] @ (801c4c4 ) 801c3de: f640 0284 movw r2, #2180 @ 0x884 801c3e2: 493b ldr r1, [pc, #236] @ (801c4d0 ) 801c3e4: 4839 ldr r0, [pc, #228] @ (801c4cc ) 801c3e6: f00d faf1 bl 80299cc TCP_RMV(pcblist, pcb); 801c3ea: 687b ldr r3, [r7, #4] 801c3ec: 681b ldr r3, [r3, #0] 801c3ee: 683a ldr r2, [r7, #0] 801c3f0: 429a cmp r2, r3 801c3f2: d105 bne.n 801c400 801c3f4: 687b ldr r3, [r7, #4] 801c3f6: 681b ldr r3, [r3, #0] 801c3f8: 68da ldr r2, [r3, #12] 801c3fa: 687b ldr r3, [r7, #4] 801c3fc: 601a str r2, [r3, #0] 801c3fe: e013 b.n 801c428 801c400: 687b ldr r3, [r7, #4] 801c402: 681b ldr r3, [r3, #0] 801c404: 60fb str r3, [r7, #12] 801c406: e00c b.n 801c422 801c408: 68fb ldr r3, [r7, #12] 801c40a: 68db ldr r3, [r3, #12] 801c40c: 683a ldr r2, [r7, #0] 801c40e: 429a cmp r2, r3 801c410: d104 bne.n 801c41c 801c412: 683b ldr r3, [r7, #0] 801c414: 68da ldr r2, [r3, #12] 801c416: 68fb ldr r3, [r7, #12] 801c418: 60da str r2, [r3, #12] 801c41a: e005 b.n 801c428 801c41c: 68fb ldr r3, [r7, #12] 801c41e: 68db ldr r3, [r3, #12] 801c420: 60fb str r3, [r7, #12] 801c422: 68fb ldr r3, [r7, #12] 801c424: 2b00 cmp r3, #0 801c426: d1ef bne.n 801c408 801c428: 683b ldr r3, [r7, #0] 801c42a: 2200 movs r2, #0 801c42c: 60da str r2, [r3, #12] tcp_pcb_purge(pcb); 801c42e: 6838 ldr r0, [r7, #0] 801c430: f7ff ff72 bl 801c318 /* if there is an outstanding delayed ACKs, send it */ if ((pcb->state != TIME_WAIT) && 801c434: 683b ldr r3, [r7, #0] 801c436: 7d1b ldrb r3, [r3, #20] 801c438: 2b0a cmp r3, #10 801c43a: d013 beq.n 801c464 (pcb->state != LISTEN) && 801c43c: 683b ldr r3, [r7, #0] 801c43e: 7d1b ldrb r3, [r3, #20] if ((pcb->state != TIME_WAIT) && 801c440: 2b01 cmp r3, #1 801c442: d00f beq.n 801c464 (pcb->flags & TF_ACK_DELAY)) { 801c444: 683b ldr r3, [r7, #0] 801c446: 8b5b ldrh r3, [r3, #26] 801c448: f003 0301 and.w r3, r3, #1 (pcb->state != LISTEN) && 801c44c: 2b00 cmp r3, #0 801c44e: d009 beq.n 801c464 tcp_ack_now(pcb); 801c450: 683b ldr r3, [r7, #0] 801c452: 8b5b ldrh r3, [r3, #26] 801c454: f043 0302 orr.w r3, r3, #2 801c458: b29a uxth r2, r3 801c45a: 683b ldr r3, [r7, #0] 801c45c: 835a strh r2, [r3, #26] tcp_output(pcb); 801c45e: 6838 ldr r0, [r7, #0] 801c460: f003 fc28 bl 801fcb4 } if (pcb->state != LISTEN) { 801c464: 683b ldr r3, [r7, #0] 801c466: 7d1b ldrb r3, [r3, #20] 801c468: 2b01 cmp r3, #1 801c46a: d020 beq.n 801c4ae LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL); 801c46c: 683b ldr r3, [r7, #0] 801c46e: 6edb ldr r3, [r3, #108] @ 0x6c 801c470: 2b00 cmp r3, #0 801c472: d006 beq.n 801c482 801c474: 4b13 ldr r3, [pc, #76] @ (801c4c4 ) 801c476: f640 0293 movw r2, #2195 @ 0x893 801c47a: 4916 ldr r1, [pc, #88] @ (801c4d4 ) 801c47c: 4813 ldr r0, [pc, #76] @ (801c4cc ) 801c47e: f00d faa5 bl 80299cc LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL); 801c482: 683b ldr r3, [r7, #0] 801c484: 6f1b ldr r3, [r3, #112] @ 0x70 801c486: 2b00 cmp r3, #0 801c488: d006 beq.n 801c498 801c48a: 4b0e ldr r3, [pc, #56] @ (801c4c4 ) 801c48c: f640 0294 movw r2, #2196 @ 0x894 801c490: 4911 ldr r1, [pc, #68] @ (801c4d8 ) 801c492: 480e ldr r0, [pc, #56] @ (801c4cc ) 801c494: f00d fa9a bl 80299cc #if TCP_QUEUE_OOSEQ LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL); 801c498: 683b ldr r3, [r7, #0] 801c49a: 6f5b ldr r3, [r3, #116] @ 0x74 801c49c: 2b00 cmp r3, #0 801c49e: d006 beq.n 801c4ae 801c4a0: 4b08 ldr r3, [pc, #32] @ (801c4c4 ) 801c4a2: f640 0296 movw r2, #2198 @ 0x896 801c4a6: 490d ldr r1, [pc, #52] @ (801c4dc ) 801c4a8: 4808 ldr r0, [pc, #32] @ (801c4cc ) 801c4aa: f00d fa8f bl 80299cc #endif /* TCP_QUEUE_OOSEQ */ } pcb->state = CLOSED; 801c4ae: 683b ldr r3, [r7, #0] 801c4b0: 2200 movs r2, #0 801c4b2: 751a strb r2, [r3, #20] /* reset the local port to prevent the pcb from being 'bound' */ pcb->local_port = 0; 801c4b4: 683b ldr r3, [r7, #0] 801c4b6: 2200 movs r2, #0 801c4b8: 82da strh r2, [r3, #22] LWIP_ASSERT("tcp_pcb_remove: tcp_pcbs_sane()", tcp_pcbs_sane()); } 801c4ba: bf00 nop 801c4bc: 3710 adds r7, #16 801c4be: 46bd mov sp, r7 801c4c0: bd80 pop {r7, pc} 801c4c2: bf00 nop 801c4c4: 0802e5a8 .word 0x0802e5a8 801c4c8: 0802ec10 .word 0x0802ec10 801c4cc: 0802e5ec .word 0x0802e5ec 801c4d0: 0802ec2c .word 0x0802ec2c 801c4d4: 0802ec4c .word 0x0802ec4c 801c4d8: 0802ec64 .word 0x0802ec64 801c4dc: 0802ec80 .word 0x0802ec80 0801c4e0 : * * @return u32_t pseudo random sequence number */ u32_t tcp_next_iss(struct tcp_pcb *pcb) { 801c4e0: b580 push {r7, lr} 801c4e2: b082 sub sp, #8 801c4e4: af00 add r7, sp, #0 801c4e6: 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); 801c4e8: 687b ldr r3, [r7, #4] 801c4ea: 2b00 cmp r3, #0 801c4ec: d106 bne.n 801c4fc 801c4ee: 4b0a ldr r3, [pc, #40] @ (801c518 ) 801c4f0: f640 02af movw r2, #2223 @ 0x8af 801c4f4: 4909 ldr r1, [pc, #36] @ (801c51c ) 801c4f6: 480a ldr r0, [pc, #40] @ (801c520 ) 801c4f8: f00d fa68 bl 80299cc LWIP_UNUSED_ARG(pcb); iss += tcp_ticks; /* XXX */ 801c4fc: 4b09 ldr r3, [pc, #36] @ (801c524 ) 801c4fe: 681a ldr r2, [r3, #0] 801c500: 4b09 ldr r3, [pc, #36] @ (801c528 ) 801c502: 681b ldr r3, [r3, #0] 801c504: 4413 add r3, r2 801c506: 4a07 ldr r2, [pc, #28] @ (801c524 ) 801c508: 6013 str r3, [r2, #0] return iss; 801c50a: 4b06 ldr r3, [pc, #24] @ (801c524 ) 801c50c: 681b ldr r3, [r3, #0] #endif /* LWIP_HOOK_TCP_ISN */ } 801c50e: 4618 mov r0, r3 801c510: 3708 adds r7, #8 801c512: 46bd mov sp, r7 801c514: bd80 pop {r7, pc} 801c516: bf00 nop 801c518: 0802e5a8 .word 0x0802e5a8 801c51c: 0802ec98 .word 0x0802ec98 801c520: 0802e5ec .word 0x0802e5ec 801c524: 24000050 .word 0x24000050 801c528: 2402ae88 .word 0x2402ae88 0801c52c : * 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) { 801c52c: b580 push {r7, lr} 801c52e: b086 sub sp, #24 801c530: af00 add r7, sp, #0 801c532: 4603 mov r3, r0 801c534: 60b9 str r1, [r7, #8] 801c536: 607a str r2, [r7, #4] 801c538: 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); 801c53a: 687b ldr r3, [r7, #4] 801c53c: 2b00 cmp r3, #0 801c53e: d106 bne.n 801c54e 801c540: 4b14 ldr r3, [pc, #80] @ (801c594 ) 801c542: f640 02c5 movw r2, #2245 @ 0x8c5 801c546: 4914 ldr r1, [pc, #80] @ (801c598 ) 801c548: 4814 ldr r0, [pc, #80] @ (801c59c ) 801c54a: f00d fa3f bl 80299cc else #endif /* LWIP_IPV4 */ #endif /* LWIP_IPV6 */ #if LWIP_IPV4 { if (outif == NULL) { 801c54e: 68bb ldr r3, [r7, #8] 801c550: 2b00 cmp r3, #0 801c552: d101 bne.n 801c558 return sendmss; 801c554: 89fb ldrh r3, [r7, #14] 801c556: e019 b.n 801c58c } mtu = outif->mtu; 801c558: 68bb ldr r3, [r7, #8] 801c55a: 8d1b ldrh r3, [r3, #40] @ 0x28 801c55c: 82fb strh r3, [r7, #22] } #endif /* LWIP_IPV4 */ if (mtu != 0) { 801c55e: 8afb ldrh r3, [r7, #22] 801c560: 2b00 cmp r3, #0 801c562: d012 beq.n 801c58a else #endif /* LWIP_IPV4 */ #endif /* LWIP_IPV6 */ #if LWIP_IPV4 { offset = IP_HLEN + TCP_HLEN; 801c564: 2328 movs r3, #40 @ 0x28 801c566: 82bb strh r3, [r7, #20] } #endif /* LWIP_IPV4 */ mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0; 801c568: 8afa ldrh r2, [r7, #22] 801c56a: 8abb ldrh r3, [r7, #20] 801c56c: 429a cmp r2, r3 801c56e: d904 bls.n 801c57a 801c570: 8afa ldrh r2, [r7, #22] 801c572: 8abb ldrh r3, [r7, #20] 801c574: 1ad3 subs r3, r2, r3 801c576: b29b uxth r3, r3 801c578: e000 b.n 801c57c 801c57a: 2300 movs r3, #0 801c57c: 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); 801c57e: 8a7a ldrh r2, [r7, #18] 801c580: 89fb ldrh r3, [r7, #14] 801c582: 4293 cmp r3, r2 801c584: bf28 it cs 801c586: 4613 movcs r3, r2 801c588: 81fb strh r3, [r7, #14] } return sendmss; 801c58a: 89fb ldrh r3, [r7, #14] } 801c58c: 4618 mov r0, r3 801c58e: 3718 adds r7, #24 801c590: 46bd mov sp, r7 801c592: bd80 pop {r7, pc} 801c594: 0802e5a8 .word 0x0802e5a8 801c598: 0802ecb4 .word 0x0802ecb4 801c59c: 0802e5ec .word 0x0802e5ec 0801c5a0 : #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) { 801c5a0: b580 push {r7, lr} 801c5a2: b084 sub sp, #16 801c5a4: af00 add r7, sp, #0 801c5a6: 6078 str r0, [r7, #4] 801c5a8: 6039 str r1, [r7, #0] struct tcp_pcb *pcb; pcb = pcb_list; 801c5aa: 683b ldr r3, [r7, #0] 801c5ac: 60fb str r3, [r7, #12] LWIP_ASSERT("tcp_netif_ip_addr_changed_pcblist: invalid old_addr", old_addr != NULL); 801c5ae: 687b ldr r3, [r7, #4] 801c5b0: 2b00 cmp r3, #0 801c5b2: d119 bne.n 801c5e8 801c5b4: 4b10 ldr r3, [pc, #64] @ (801c5f8 ) 801c5b6: f44f 6210 mov.w r2, #2304 @ 0x900 801c5ba: 4910 ldr r1, [pc, #64] @ (801c5fc ) 801c5bc: 4810 ldr r0, [pc, #64] @ (801c600 ) 801c5be: f00d fa05 bl 80299cc while (pcb != NULL) { 801c5c2: e011 b.n 801c5e8 /* PCB bound to current local interface address? */ if (ip_addr_cmp(&pcb->local_ip, old_addr) 801c5c4: 68fb ldr r3, [r7, #12] 801c5c6: 681a ldr r2, [r3, #0] 801c5c8: 687b ldr r3, [r7, #4] 801c5ca: 681b ldr r3, [r3, #0] 801c5cc: 429a cmp r2, r3 801c5ce: d108 bne.n 801c5e2 /* 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; 801c5d0: 68fb ldr r3, [r7, #12] 801c5d2: 68db ldr r3, [r3, #12] 801c5d4: 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); 801c5d6: 68f8 ldr r0, [r7, #12] 801c5d8: f7fe fd86 bl 801b0e8 pcb = next; 801c5dc: 68bb ldr r3, [r7, #8] 801c5de: 60fb str r3, [r7, #12] 801c5e0: e002 b.n 801c5e8 } else { pcb = pcb->next; 801c5e2: 68fb ldr r3, [r7, #12] 801c5e4: 68db ldr r3, [r3, #12] 801c5e6: 60fb str r3, [r7, #12] while (pcb != NULL) { 801c5e8: 68fb ldr r3, [r7, #12] 801c5ea: 2b00 cmp r3, #0 801c5ec: d1ea bne.n 801c5c4 } } } 801c5ee: bf00 nop 801c5f0: bf00 nop 801c5f2: 3710 adds r7, #16 801c5f4: 46bd mov sp, r7 801c5f6: bd80 pop {r7, pc} 801c5f8: 0802e5a8 .word 0x0802e5a8 801c5fc: 0802ecdc .word 0x0802ecdc 801c600: 0802e5ec .word 0x0802e5ec 0801c604 : * @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) { 801c604: b580 push {r7, lr} 801c606: b084 sub sp, #16 801c608: af00 add r7, sp, #0 801c60a: 6078 str r0, [r7, #4] 801c60c: 6039 str r1, [r7, #0] struct tcp_pcb_listen *lpcb; if (!ip_addr_isany(old_addr)) { 801c60e: 687b ldr r3, [r7, #4] 801c610: 2b00 cmp r3, #0 801c612: d02a beq.n 801c66a 801c614: 687b ldr r3, [r7, #4] 801c616: 681b ldr r3, [r3, #0] 801c618: 2b00 cmp r3, #0 801c61a: d026 beq.n 801c66a tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs); 801c61c: 4b15 ldr r3, [pc, #84] @ (801c674 ) 801c61e: 681b ldr r3, [r3, #0] 801c620: 4619 mov r1, r3 801c622: 6878 ldr r0, [r7, #4] 801c624: f7ff ffbc bl 801c5a0 tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs); 801c628: 4b13 ldr r3, [pc, #76] @ (801c678 ) 801c62a: 681b ldr r3, [r3, #0] 801c62c: 4619 mov r1, r3 801c62e: 6878 ldr r0, [r7, #4] 801c630: f7ff ffb6 bl 801c5a0 if (!ip_addr_isany(new_addr)) { 801c634: 683b ldr r3, [r7, #0] 801c636: 2b00 cmp r3, #0 801c638: d017 beq.n 801c66a 801c63a: 683b ldr r3, [r7, #0] 801c63c: 681b ldr r3, [r3, #0] 801c63e: 2b00 cmp r3, #0 801c640: d013 beq.n 801c66a /* PCB bound to current local interface address? */ for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 801c642: 4b0e ldr r3, [pc, #56] @ (801c67c ) 801c644: 681b ldr r3, [r3, #0] 801c646: 60fb str r3, [r7, #12] 801c648: e00c b.n 801c664 /* PCB bound to current local interface address? */ if (ip_addr_cmp(&lpcb->local_ip, old_addr)) { 801c64a: 68fb ldr r3, [r7, #12] 801c64c: 681a ldr r2, [r3, #0] 801c64e: 687b ldr r3, [r7, #4] 801c650: 681b ldr r3, [r3, #0] 801c652: 429a cmp r2, r3 801c654: d103 bne.n 801c65e /* 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); 801c656: 683b ldr r3, [r7, #0] 801c658: 681a ldr r2, [r3, #0] 801c65a: 68fb ldr r3, [r7, #12] 801c65c: 601a str r2, [r3, #0] for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 801c65e: 68fb ldr r3, [r7, #12] 801c660: 68db ldr r3, [r3, #12] 801c662: 60fb str r3, [r7, #12] 801c664: 68fb ldr r3, [r7, #12] 801c666: 2b00 cmp r3, #0 801c668: d1ef bne.n 801c64a } } } } } 801c66a: bf00 nop 801c66c: 3710 adds r7, #16 801c66e: 46bd mov sp, r7 801c670: bd80 pop {r7, pc} 801c672: bf00 nop 801c674: 2402ae94 .word 0x2402ae94 801c678: 2402ae8c .word 0x2402ae8c 801c67c: 2402ae90 .word 0x2402ae90 0801c680 : #if TCP_QUEUE_OOSEQ /* Free all ooseq pbufs (and possibly reset SACK state) */ void tcp_free_ooseq(struct tcp_pcb *pcb) { 801c680: b580 push {r7, lr} 801c682: b082 sub sp, #8 801c684: af00 add r7, sp, #0 801c686: 6078 str r0, [r7, #4] if (pcb->ooseq) { 801c688: 687b ldr r3, [r7, #4] 801c68a: 6f5b ldr r3, [r3, #116] @ 0x74 801c68c: 2b00 cmp r3, #0 801c68e: d007 beq.n 801c6a0 tcp_segs_free(pcb->ooseq); 801c690: 687b ldr r3, [r7, #4] 801c692: 6f5b ldr r3, [r3, #116] @ 0x74 801c694: 4618 mov r0, r3 801c696: f7ff fb65 bl 801bd64 pcb->ooseq = NULL; 801c69a: 687b ldr r3, [r7, #4] 801c69c: 2200 movs r2, #0 801c69e: 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 */ } } 801c6a0: bf00 nop 801c6a2: 3708 adds r7, #8 801c6a4: 46bd mov sp, r7 801c6a6: bd80 pop {r7, pc} 0801c6a8 : * @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) { 801c6a8: b590 push {r4, r7, lr} 801c6aa: b08d sub sp, #52 @ 0x34 801c6ac: af04 add r7, sp, #16 801c6ae: 6078 str r0, [r7, #4] 801c6b0: 6039 str r1, [r7, #0] #endif /* SO_REUSE */ u8_t hdrlen_bytes; err_t err; LWIP_UNUSED_ARG(inp); LWIP_ASSERT_CORE_LOCKED(); 801c6b2: f7f3 ff3d bl 8010530 LWIP_ASSERT("tcp_input: invalid pbuf", p != NULL); 801c6b6: 687b ldr r3, [r7, #4] 801c6b8: 2b00 cmp r3, #0 801c6ba: d105 bne.n 801c6c8 801c6bc: 4b9b ldr r3, [pc, #620] @ (801c92c ) 801c6be: 2283 movs r2, #131 @ 0x83 801c6c0: 499b ldr r1, [pc, #620] @ (801c930 ) 801c6c2: 489c ldr r0, [pc, #624] @ (801c934 ) 801c6c4: f00d f982 bl 80299cc PERF_START; TCP_STATS_INC(tcp.recv); MIB2_STATS_INC(mib2.tcpinsegs); tcphdr = (struct tcp_hdr *)p->payload; 801c6c8: 687b ldr r3, [r7, #4] 801c6ca: 685b ldr r3, [r3, #4] 801c6cc: 4a9a ldr r2, [pc, #616] @ (801c938 ) 801c6ce: 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) { 801c6d0: 687b ldr r3, [r7, #4] 801c6d2: 895b ldrh r3, [r3, #10] 801c6d4: 2b13 cmp r3, #19 801c6d6: f240 83d1 bls.w 801ce7c 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()) || 801c6da: 4b98 ldr r3, [pc, #608] @ (801c93c ) 801c6dc: 695b ldr r3, [r3, #20] 801c6de: 4a97 ldr r2, [pc, #604] @ (801c93c ) 801c6e0: 6812 ldr r2, [r2, #0] 801c6e2: 4611 mov r1, r2 801c6e4: 4618 mov r0, r3 801c6e6: f008 fc1b bl 8024f20 801c6ea: 4603 mov r3, r0 801c6ec: 2b00 cmp r3, #0 801c6ee: f040 83c7 bne.w 801ce80 ip_addr_ismulticast(ip_current_dest_addr())) { 801c6f2: 4b92 ldr r3, [pc, #584] @ (801c93c ) 801c6f4: 695b ldr r3, [r3, #20] 801c6f6: f003 03f0 and.w r3, r3, #240 @ 0xf0 if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) || 801c6fa: 2be0 cmp r3, #224 @ 0xe0 801c6fc: f000 83c0 beq.w 801ce80 } } #endif /* CHECKSUM_CHECK_TCP */ /* sanity-check header length */ hdrlen_bytes = TCPH_HDRLEN_BYTES(tcphdr); 801c700: 4b8d ldr r3, [pc, #564] @ (801c938 ) 801c702: 681b ldr r3, [r3, #0] 801c704: 899b ldrh r3, [r3, #12] 801c706: b29b uxth r3, r3 801c708: 4618 mov r0, r3 801c70a: f7fc fa05 bl 8018b18 801c70e: 4603 mov r3, r0 801c710: 0b1b lsrs r3, r3, #12 801c712: b29b uxth r3, r3 801c714: b2db uxtb r3, r3 801c716: 009b lsls r3, r3, #2 801c718: 74bb strb r3, [r7, #18] if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) { 801c71a: 7cbb ldrb r3, [r7, #18] 801c71c: 2b13 cmp r3, #19 801c71e: f240 83b1 bls.w 801ce84 801c722: 7cbb ldrb r3, [r7, #18] 801c724: b29a uxth r2, r3 801c726: 687b ldr r3, [r7, #4] 801c728: 891b ldrh r3, [r3, #8] 801c72a: 429a cmp r2, r3 801c72c: f200 83aa bhi.w 801ce84 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); 801c730: 7cbb ldrb r3, [r7, #18] 801c732: b29b uxth r3, r3 801c734: 3b14 subs r3, #20 801c736: b29a uxth r2, r3 801c738: 4b81 ldr r3, [pc, #516] @ (801c940 ) 801c73a: 801a strh r2, [r3, #0] tcphdr_opt2 = NULL; 801c73c: 4b81 ldr r3, [pc, #516] @ (801c944 ) 801c73e: 2200 movs r2, #0 801c740: 601a str r2, [r3, #0] if (p->len >= hdrlen_bytes) { 801c742: 687b ldr r3, [r7, #4] 801c744: 895a ldrh r2, [r3, #10] 801c746: 7cbb ldrb r3, [r7, #18] 801c748: b29b uxth r3, r3 801c74a: 429a cmp r2, r3 801c74c: d309 bcc.n 801c762 /* all options are in the first pbuf */ tcphdr_opt1len = tcphdr_optlen; 801c74e: 4b7c ldr r3, [pc, #496] @ (801c940 ) 801c750: 881a ldrh r2, [r3, #0] 801c752: 4b7d ldr r3, [pc, #500] @ (801c948 ) 801c754: 801a strh r2, [r3, #0] pbuf_remove_header(p, hdrlen_bytes); /* cannot fail */ 801c756: 7cbb ldrb r3, [r7, #18] 801c758: 4619 mov r1, r3 801c75a: 6878 ldr r0, [r7, #4] 801c75c: f7fd fe06 bl 801a36c 801c760: e04e b.n 801c800 } 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); 801c762: 687b ldr r3, [r7, #4] 801c764: 681b ldr r3, [r3, #0] 801c766: 2b00 cmp r3, #0 801c768: d105 bne.n 801c776 801c76a: 4b70 ldr r3, [pc, #448] @ (801c92c ) 801c76c: 22c2 movs r2, #194 @ 0xc2 801c76e: 4977 ldr r1, [pc, #476] @ (801c94c ) 801c770: 4870 ldr r0, [pc, #448] @ (801c934 ) 801c772: f00d f92b bl 80299cc /* advance over the TCP header (cannot fail) */ pbuf_remove_header(p, TCP_HLEN); 801c776: 2114 movs r1, #20 801c778: 6878 ldr r0, [r7, #4] 801c77a: f7fd fdf7 bl 801a36c /* determine how long the first and second parts of the options are */ tcphdr_opt1len = p->len; 801c77e: 687b ldr r3, [r7, #4] 801c780: 895a ldrh r2, [r3, #10] 801c782: 4b71 ldr r3, [pc, #452] @ (801c948 ) 801c784: 801a strh r2, [r3, #0] opt2len = (u16_t)(tcphdr_optlen - tcphdr_opt1len); 801c786: 4b6e ldr r3, [pc, #440] @ (801c940 ) 801c788: 881a ldrh r2, [r3, #0] 801c78a: 4b6f ldr r3, [pc, #444] @ (801c948 ) 801c78c: 881b ldrh r3, [r3, #0] 801c78e: 1ad3 subs r3, r2, r3 801c790: 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); 801c792: 4b6d ldr r3, [pc, #436] @ (801c948 ) 801c794: 881b ldrh r3, [r3, #0] 801c796: 4619 mov r1, r3 801c798: 6878 ldr r0, [r7, #4] 801c79a: f7fd fde7 bl 801a36c /* check that the options fit in the second pbuf */ if (opt2len > p->next->len) { 801c79e: 687b ldr r3, [r7, #4] 801c7a0: 681b ldr r3, [r3, #0] 801c7a2: 895b ldrh r3, [r3, #10] 801c7a4: 8a3a ldrh r2, [r7, #16] 801c7a6: 429a cmp r2, r3 801c7a8: f200 836e bhi.w 801ce88 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* remember the pointer to the second part of the options */ tcphdr_opt2 = (u8_t *)p->next->payload; 801c7ac: 687b ldr r3, [r7, #4] 801c7ae: 681b ldr r3, [r3, #0] 801c7b0: 685b ldr r3, [r3, #4] 801c7b2: 4a64 ldr r2, [pc, #400] @ (801c944 ) 801c7b4: 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); 801c7b6: 687b ldr r3, [r7, #4] 801c7b8: 681b ldr r3, [r3, #0] 801c7ba: 8a3a ldrh r2, [r7, #16] 801c7bc: 4611 mov r1, r2 801c7be: 4618 mov r0, r3 801c7c0: f7fd fdd4 bl 801a36c p->tot_len = (u16_t)(p->tot_len - opt2len); 801c7c4: 687b ldr r3, [r7, #4] 801c7c6: 891a ldrh r2, [r3, #8] 801c7c8: 8a3b ldrh r3, [r7, #16] 801c7ca: 1ad3 subs r3, r2, r3 801c7cc: b29a uxth r2, r3 801c7ce: 687b ldr r3, [r7, #4] 801c7d0: 811a strh r2, [r3, #8] LWIP_ASSERT("p->len == 0", p->len == 0); 801c7d2: 687b ldr r3, [r7, #4] 801c7d4: 895b ldrh r3, [r3, #10] 801c7d6: 2b00 cmp r3, #0 801c7d8: d005 beq.n 801c7e6 801c7da: 4b54 ldr r3, [pc, #336] @ (801c92c ) 801c7dc: 22df movs r2, #223 @ 0xdf 801c7de: 495c ldr r1, [pc, #368] @ (801c950 ) 801c7e0: 4854 ldr r0, [pc, #336] @ (801c934 ) 801c7e2: f00d f8f3 bl 80299cc LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len); 801c7e6: 687b ldr r3, [r7, #4] 801c7e8: 891a ldrh r2, [r3, #8] 801c7ea: 687b ldr r3, [r7, #4] 801c7ec: 681b ldr r3, [r3, #0] 801c7ee: 891b ldrh r3, [r3, #8] 801c7f0: 429a cmp r2, r3 801c7f2: d005 beq.n 801c800 801c7f4: 4b4d ldr r3, [pc, #308] @ (801c92c ) 801c7f6: 22e0 movs r2, #224 @ 0xe0 801c7f8: 4956 ldr r1, [pc, #344] @ (801c954 ) 801c7fa: 484e ldr r0, [pc, #312] @ (801c934 ) 801c7fc: f00d f8e6 bl 80299cc } /* Convert fields in TCP header to host byte order. */ tcphdr->src = lwip_ntohs(tcphdr->src); 801c800: 4b4d ldr r3, [pc, #308] @ (801c938 ) 801c802: 681b ldr r3, [r3, #0] 801c804: 881b ldrh r3, [r3, #0] 801c806: b29b uxth r3, r3 801c808: 4a4b ldr r2, [pc, #300] @ (801c938 ) 801c80a: 6814 ldr r4, [r2, #0] 801c80c: 4618 mov r0, r3 801c80e: f7fc f983 bl 8018b18 801c812: 4603 mov r3, r0 801c814: 8023 strh r3, [r4, #0] tcphdr->dest = lwip_ntohs(tcphdr->dest); 801c816: 4b48 ldr r3, [pc, #288] @ (801c938 ) 801c818: 681b ldr r3, [r3, #0] 801c81a: 885b ldrh r3, [r3, #2] 801c81c: b29b uxth r3, r3 801c81e: 4a46 ldr r2, [pc, #280] @ (801c938 ) 801c820: 6814 ldr r4, [r2, #0] 801c822: 4618 mov r0, r3 801c824: f7fc f978 bl 8018b18 801c828: 4603 mov r3, r0 801c82a: 8063 strh r3, [r4, #2] seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno); 801c82c: 4b42 ldr r3, [pc, #264] @ (801c938 ) 801c82e: 681b ldr r3, [r3, #0] 801c830: 685b ldr r3, [r3, #4] 801c832: 4a41 ldr r2, [pc, #260] @ (801c938 ) 801c834: 6814 ldr r4, [r2, #0] 801c836: 4618 mov r0, r3 801c838: f7fc f983 bl 8018b42 801c83c: 4603 mov r3, r0 801c83e: 6063 str r3, [r4, #4] 801c840: 6863 ldr r3, [r4, #4] 801c842: 4a45 ldr r2, [pc, #276] @ (801c958 ) 801c844: 6013 str r3, [r2, #0] ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno); 801c846: 4b3c ldr r3, [pc, #240] @ (801c938 ) 801c848: 681b ldr r3, [r3, #0] 801c84a: 689b ldr r3, [r3, #8] 801c84c: 4a3a ldr r2, [pc, #232] @ (801c938 ) 801c84e: 6814 ldr r4, [r2, #0] 801c850: 4618 mov r0, r3 801c852: f7fc f976 bl 8018b42 801c856: 4603 mov r3, r0 801c858: 60a3 str r3, [r4, #8] 801c85a: 68a3 ldr r3, [r4, #8] 801c85c: 4a3f ldr r2, [pc, #252] @ (801c95c ) 801c85e: 6013 str r3, [r2, #0] tcphdr->wnd = lwip_ntohs(tcphdr->wnd); 801c860: 4b35 ldr r3, [pc, #212] @ (801c938 ) 801c862: 681b ldr r3, [r3, #0] 801c864: 89db ldrh r3, [r3, #14] 801c866: b29b uxth r3, r3 801c868: 4a33 ldr r2, [pc, #204] @ (801c938 ) 801c86a: 6814 ldr r4, [r2, #0] 801c86c: 4618 mov r0, r3 801c86e: f7fc f953 bl 8018b18 801c872: 4603 mov r3, r0 801c874: 81e3 strh r3, [r4, #14] flags = TCPH_FLAGS(tcphdr); 801c876: 4b30 ldr r3, [pc, #192] @ (801c938 ) 801c878: 681b ldr r3, [r3, #0] 801c87a: 899b ldrh r3, [r3, #12] 801c87c: b29b uxth r3, r3 801c87e: 4618 mov r0, r3 801c880: f7fc f94a bl 8018b18 801c884: 4603 mov r3, r0 801c886: b2db uxtb r3, r3 801c888: f003 033f and.w r3, r3, #63 @ 0x3f 801c88c: b2da uxtb r2, r3 801c88e: 4b34 ldr r3, [pc, #208] @ (801c960 ) 801c890: 701a strb r2, [r3, #0] tcplen = p->tot_len; 801c892: 687b ldr r3, [r7, #4] 801c894: 891a ldrh r2, [r3, #8] 801c896: 4b33 ldr r3, [pc, #204] @ (801c964 ) 801c898: 801a strh r2, [r3, #0] if (flags & (TCP_FIN | TCP_SYN)) { 801c89a: 4b31 ldr r3, [pc, #196] @ (801c960 ) 801c89c: 781b ldrb r3, [r3, #0] 801c89e: f003 0303 and.w r3, r3, #3 801c8a2: 2b00 cmp r3, #0 801c8a4: d00c beq.n 801c8c0 tcplen++; 801c8a6: 4b2f ldr r3, [pc, #188] @ (801c964 ) 801c8a8: 881b ldrh r3, [r3, #0] 801c8aa: 3301 adds r3, #1 801c8ac: b29a uxth r2, r3 801c8ae: 4b2d ldr r3, [pc, #180] @ (801c964 ) 801c8b0: 801a strh r2, [r3, #0] if (tcplen < p->tot_len) { 801c8b2: 687b ldr r3, [r7, #4] 801c8b4: 891a ldrh r2, [r3, #8] 801c8b6: 4b2b ldr r3, [pc, #172] @ (801c964 ) 801c8b8: 881b ldrh r3, [r3, #0] 801c8ba: 429a cmp r2, r3 801c8bc: f200 82e6 bhi.w 801ce8c } } /* Demultiplex an incoming segment. First, we check if it is destined for an active connection. */ prev = NULL; 801c8c0: 2300 movs r3, #0 801c8c2: 61fb str r3, [r7, #28] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 801c8c4: 4b28 ldr r3, [pc, #160] @ (801c968 ) 801c8c6: 681b ldr r3, [r3, #0] 801c8c8: 61bb str r3, [r7, #24] 801c8ca: e09d b.n 801ca08 LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); 801c8cc: 69bb ldr r3, [r7, #24] 801c8ce: 7d1b ldrb r3, [r3, #20] 801c8d0: 2b00 cmp r3, #0 801c8d2: d105 bne.n 801c8e0 801c8d4: 4b15 ldr r3, [pc, #84] @ (801c92c ) 801c8d6: 22fb movs r2, #251 @ 0xfb 801c8d8: 4924 ldr r1, [pc, #144] @ (801c96c ) 801c8da: 4816 ldr r0, [pc, #88] @ (801c934 ) 801c8dc: f00d f876 bl 80299cc LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); 801c8e0: 69bb ldr r3, [r7, #24] 801c8e2: 7d1b ldrb r3, [r3, #20] 801c8e4: 2b0a cmp r3, #10 801c8e6: d105 bne.n 801c8f4 801c8e8: 4b10 ldr r3, [pc, #64] @ (801c92c ) 801c8ea: 22fc movs r2, #252 @ 0xfc 801c8ec: 4920 ldr r1, [pc, #128] @ (801c970 ) 801c8ee: 4811 ldr r0, [pc, #68] @ (801c934 ) 801c8f0: f00d f86c bl 80299cc LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); 801c8f4: 69bb ldr r3, [r7, #24] 801c8f6: 7d1b ldrb r3, [r3, #20] 801c8f8: 2b01 cmp r3, #1 801c8fa: d105 bne.n 801c908 801c8fc: 4b0b ldr r3, [pc, #44] @ (801c92c ) 801c8fe: 22fd movs r2, #253 @ 0xfd 801c900: 491c ldr r1, [pc, #112] @ (801c974 ) 801c902: 480c ldr r0, [pc, #48] @ (801c934 ) 801c904: f00d f862 bl 80299cc /* check if PCB is bound to specific netif */ if ((pcb->netif_idx != NETIF_NO_INDEX) && 801c908: 69bb ldr r3, [r7, #24] 801c90a: 7a1b ldrb r3, [r3, #8] 801c90c: 2b00 cmp r3, #0 801c90e: d033 beq.n 801c978 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 801c910: 69bb ldr r3, [r7, #24] 801c912: 7a1a ldrb r2, [r3, #8] 801c914: 4b09 ldr r3, [pc, #36] @ (801c93c ) 801c916: 685b ldr r3, [r3, #4] 801c918: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801c91c: 3301 adds r3, #1 801c91e: b2db uxtb r3, r3 if ((pcb->netif_idx != NETIF_NO_INDEX) && 801c920: 429a cmp r2, r3 801c922: d029 beq.n 801c978 prev = pcb; 801c924: 69bb ldr r3, [r7, #24] 801c926: 61fb str r3, [r7, #28] continue; 801c928: e06b b.n 801ca02 801c92a: bf00 nop 801c92c: 0802ed10 .word 0x0802ed10 801c930: 0802ed44 .word 0x0802ed44 801c934: 0802ed5c .word 0x0802ed5c 801c938: 2402aeb4 .word 0x2402aeb4 801c93c: 24024338 .word 0x24024338 801c940: 2402aeb8 .word 0x2402aeb8 801c944: 2402aebc .word 0x2402aebc 801c948: 2402aeba .word 0x2402aeba 801c94c: 0802ed84 .word 0x0802ed84 801c950: 0802ed94 .word 0x0802ed94 801c954: 0802eda0 .word 0x0802eda0 801c958: 2402aec4 .word 0x2402aec4 801c95c: 2402aec8 .word 0x2402aec8 801c960: 2402aed0 .word 0x2402aed0 801c964: 2402aece .word 0x2402aece 801c968: 2402ae94 .word 0x2402ae94 801c96c: 0802edc0 .word 0x0802edc0 801c970: 0802ede8 .word 0x0802ede8 801c974: 0802ee14 .word 0x0802ee14 } if (pcb->remote_port == tcphdr->src && 801c978: 69bb ldr r3, [r7, #24] 801c97a: 8b1a ldrh r2, [r3, #24] 801c97c: 4b72 ldr r3, [pc, #456] @ (801cb48 ) 801c97e: 681b ldr r3, [r3, #0] 801c980: 881b ldrh r3, [r3, #0] 801c982: b29b uxth r3, r3 801c984: 429a cmp r2, r3 801c986: d13a bne.n 801c9fe pcb->local_port == tcphdr->dest && 801c988: 69bb ldr r3, [r7, #24] 801c98a: 8ada ldrh r2, [r3, #22] 801c98c: 4b6e ldr r3, [pc, #440] @ (801cb48 ) 801c98e: 681b ldr r3, [r3, #0] 801c990: 885b ldrh r3, [r3, #2] 801c992: b29b uxth r3, r3 if (pcb->remote_port == tcphdr->src && 801c994: 429a cmp r2, r3 801c996: d132 bne.n 801c9fe ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 801c998: 69bb ldr r3, [r7, #24] 801c99a: 685a ldr r2, [r3, #4] 801c99c: 4b6b ldr r3, [pc, #428] @ (801cb4c ) 801c99e: 691b ldr r3, [r3, #16] pcb->local_port == tcphdr->dest && 801c9a0: 429a cmp r2, r3 801c9a2: d12c bne.n 801c9fe ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { 801c9a4: 69bb ldr r3, [r7, #24] 801c9a6: 681a ldr r2, [r3, #0] 801c9a8: 4b68 ldr r3, [pc, #416] @ (801cb4c ) 801c9aa: 695b ldr r3, [r3, #20] ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 801c9ac: 429a cmp r2, r3 801c9ae: d126 bne.n 801c9fe /* 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); 801c9b0: 69bb ldr r3, [r7, #24] 801c9b2: 68db ldr r3, [r3, #12] 801c9b4: 69ba ldr r2, [r7, #24] 801c9b6: 429a cmp r2, r3 801c9b8: d106 bne.n 801c9c8 801c9ba: 4b65 ldr r3, [pc, #404] @ (801cb50 ) 801c9bc: f240 120d movw r2, #269 @ 0x10d 801c9c0: 4964 ldr r1, [pc, #400] @ (801cb54 ) 801c9c2: 4865 ldr r0, [pc, #404] @ (801cb58 ) 801c9c4: f00d f802 bl 80299cc if (prev != NULL) { 801c9c8: 69fb ldr r3, [r7, #28] 801c9ca: 2b00 cmp r3, #0 801c9cc: d00a beq.n 801c9e4 prev->next = pcb->next; 801c9ce: 69bb ldr r3, [r7, #24] 801c9d0: 68da ldr r2, [r3, #12] 801c9d2: 69fb ldr r3, [r7, #28] 801c9d4: 60da str r2, [r3, #12] pcb->next = tcp_active_pcbs; 801c9d6: 4b61 ldr r3, [pc, #388] @ (801cb5c ) 801c9d8: 681a ldr r2, [r3, #0] 801c9da: 69bb ldr r3, [r7, #24] 801c9dc: 60da str r2, [r3, #12] tcp_active_pcbs = pcb; 801c9de: 4a5f ldr r2, [pc, #380] @ (801cb5c ) 801c9e0: 69bb ldr r3, [r7, #24] 801c9e2: 6013 str r3, [r2, #0] } else { TCP_STATS_INC(tcp.cachehit); } LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb); 801c9e4: 69bb ldr r3, [r7, #24] 801c9e6: 68db ldr r3, [r3, #12] 801c9e8: 69ba ldr r2, [r7, #24] 801c9ea: 429a cmp r2, r3 801c9ec: d111 bne.n 801ca12 801c9ee: 4b58 ldr r3, [pc, #352] @ (801cb50 ) 801c9f0: f240 1215 movw r2, #277 @ 0x115 801c9f4: 495a ldr r1, [pc, #360] @ (801cb60 ) 801c9f6: 4858 ldr r0, [pc, #352] @ (801cb58 ) 801c9f8: f00c ffe8 bl 80299cc break; 801c9fc: e009 b.n 801ca12 } prev = pcb; 801c9fe: 69bb ldr r3, [r7, #24] 801ca00: 61fb str r3, [r7, #28] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 801ca02: 69bb ldr r3, [r7, #24] 801ca04: 68db ldr r3, [r3, #12] 801ca06: 61bb str r3, [r7, #24] 801ca08: 69bb ldr r3, [r7, #24] 801ca0a: 2b00 cmp r3, #0 801ca0c: f47f af5e bne.w 801c8cc 801ca10: e000 b.n 801ca14 break; 801ca12: bf00 nop } if (pcb == NULL) { 801ca14: 69bb ldr r3, [r7, #24] 801ca16: 2b00 cmp r3, #0 801ca18: f040 80aa bne.w 801cb70 /* 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) { 801ca1c: 4b51 ldr r3, [pc, #324] @ (801cb64 ) 801ca1e: 681b ldr r3, [r3, #0] 801ca20: 61bb str r3, [r7, #24] 801ca22: e03f b.n 801caa4 LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); 801ca24: 69bb ldr r3, [r7, #24] 801ca26: 7d1b ldrb r3, [r3, #20] 801ca28: 2b0a cmp r3, #10 801ca2a: d006 beq.n 801ca3a 801ca2c: 4b48 ldr r3, [pc, #288] @ (801cb50 ) 801ca2e: f240 121f movw r2, #287 @ 0x11f 801ca32: 494d ldr r1, [pc, #308] @ (801cb68 ) 801ca34: 4848 ldr r0, [pc, #288] @ (801cb58 ) 801ca36: f00c ffc9 bl 80299cc /* check if PCB is bound to specific netif */ if ((pcb->netif_idx != NETIF_NO_INDEX) && 801ca3a: 69bb ldr r3, [r7, #24] 801ca3c: 7a1b ldrb r3, [r3, #8] 801ca3e: 2b00 cmp r3, #0 801ca40: d009 beq.n 801ca56 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 801ca42: 69bb ldr r3, [r7, #24] 801ca44: 7a1a ldrb r2, [r3, #8] 801ca46: 4b41 ldr r3, [pc, #260] @ (801cb4c ) 801ca48: 685b ldr r3, [r3, #4] 801ca4a: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801ca4e: 3301 adds r3, #1 801ca50: b2db uxtb r3, r3 if ((pcb->netif_idx != NETIF_NO_INDEX) && 801ca52: 429a cmp r2, r3 801ca54: d122 bne.n 801ca9c continue; } if (pcb->remote_port == tcphdr->src && 801ca56: 69bb ldr r3, [r7, #24] 801ca58: 8b1a ldrh r2, [r3, #24] 801ca5a: 4b3b ldr r3, [pc, #236] @ (801cb48 ) 801ca5c: 681b ldr r3, [r3, #0] 801ca5e: 881b ldrh r3, [r3, #0] 801ca60: b29b uxth r3, r3 801ca62: 429a cmp r2, r3 801ca64: d11b bne.n 801ca9e pcb->local_port == tcphdr->dest && 801ca66: 69bb ldr r3, [r7, #24] 801ca68: 8ada ldrh r2, [r3, #22] 801ca6a: 4b37 ldr r3, [pc, #220] @ (801cb48 ) 801ca6c: 681b ldr r3, [r3, #0] 801ca6e: 885b ldrh r3, [r3, #2] 801ca70: b29b uxth r3, r3 if (pcb->remote_port == tcphdr->src && 801ca72: 429a cmp r2, r3 801ca74: d113 bne.n 801ca9e ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 801ca76: 69bb ldr r3, [r7, #24] 801ca78: 685a ldr r2, [r3, #4] 801ca7a: 4b34 ldr r3, [pc, #208] @ (801cb4c ) 801ca7c: 691b ldr r3, [r3, #16] pcb->local_port == tcphdr->dest && 801ca7e: 429a cmp r2, r3 801ca80: d10d bne.n 801ca9e ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { 801ca82: 69bb ldr r3, [r7, #24] 801ca84: 681a ldr r2, [r3, #0] 801ca86: 4b31 ldr r3, [pc, #196] @ (801cb4c ) 801ca88: 695b ldr r3, [r3, #20] ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 801ca8a: 429a cmp r2, r3 801ca8c: d107 bne.n 801ca9e #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); 801ca8e: 69b8 ldr r0, [r7, #24] 801ca90: f000 fb56 bl 801d140 } pbuf_free(p); 801ca94: 6878 ldr r0, [r7, #4] 801ca96: f7fd fd21 bl 801a4dc return; 801ca9a: e1fd b.n 801ce98 continue; 801ca9c: bf00 nop for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 801ca9e: 69bb ldr r3, [r7, #24] 801caa0: 68db ldr r3, [r3, #12] 801caa2: 61bb str r3, [r7, #24] 801caa4: 69bb ldr r3, [r7, #24] 801caa6: 2b00 cmp r3, #0 801caa8: d1bc bne.n 801ca24 } } /* Finally, if we still did not get a match, we check all PCBs that are LISTENing for incoming connections. */ prev = NULL; 801caaa: 2300 movs r3, #0 801caac: 61fb str r3, [r7, #28] for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 801caae: 4b2f ldr r3, [pc, #188] @ (801cb6c ) 801cab0: 681b ldr r3, [r3, #0] 801cab2: 617b str r3, [r7, #20] 801cab4: e02a b.n 801cb0c /* check if PCB is bound to specific netif */ if ((lpcb->netif_idx != NETIF_NO_INDEX) && 801cab6: 697b ldr r3, [r7, #20] 801cab8: 7a1b ldrb r3, [r3, #8] 801caba: 2b00 cmp r3, #0 801cabc: d00c beq.n 801cad8 (lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 801cabe: 697b ldr r3, [r7, #20] 801cac0: 7a1a ldrb r2, [r3, #8] 801cac2: 4b22 ldr r3, [pc, #136] @ (801cb4c ) 801cac4: 685b ldr r3, [r3, #4] 801cac6: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801caca: 3301 adds r3, #1 801cacc: b2db uxtb r3, r3 if ((lpcb->netif_idx != NETIF_NO_INDEX) && 801cace: 429a cmp r2, r3 801cad0: d002 beq.n 801cad8 prev = (struct tcp_pcb *)lpcb; 801cad2: 697b ldr r3, [r7, #20] 801cad4: 61fb str r3, [r7, #28] continue; 801cad6: e016 b.n 801cb06 } if (lpcb->local_port == tcphdr->dest) { 801cad8: 697b ldr r3, [r7, #20] 801cada: 8ada ldrh r2, [r3, #22] 801cadc: 4b1a ldr r3, [pc, #104] @ (801cb48 ) 801cade: 681b ldr r3, [r3, #0] 801cae0: 885b ldrh r3, [r3, #2] 801cae2: b29b uxth r3, r3 801cae4: 429a cmp r2, r3 801cae6: d10c bne.n 801cb02 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())) { 801cae8: 697b ldr r3, [r7, #20] 801caea: 681a ldr r2, [r3, #0] 801caec: 4b17 ldr r3, [pc, #92] @ (801cb4c ) 801caee: 695b ldr r3, [r3, #20] 801caf0: 429a cmp r2, r3 801caf2: d00f beq.n 801cb14 /* found an exact match */ break; } else if (ip_addr_isany(&lpcb->local_ip)) { 801caf4: 697b ldr r3, [r7, #20] 801caf6: 2b00 cmp r3, #0 801caf8: d00d beq.n 801cb16 801cafa: 697b ldr r3, [r7, #20] 801cafc: 681b ldr r3, [r3, #0] 801cafe: 2b00 cmp r3, #0 801cb00: d009 beq.n 801cb16 break; #endif /* SO_REUSE */ } } } prev = (struct tcp_pcb *)lpcb; 801cb02: 697b ldr r3, [r7, #20] 801cb04: 61fb str r3, [r7, #28] for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 801cb06: 697b ldr r3, [r7, #20] 801cb08: 68db ldr r3, [r3, #12] 801cb0a: 617b str r3, [r7, #20] 801cb0c: 697b ldr r3, [r7, #20] 801cb0e: 2b00 cmp r3, #0 801cb10: d1d1 bne.n 801cab6 801cb12: e000 b.n 801cb16 break; 801cb14: 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) { 801cb16: 697b ldr r3, [r7, #20] 801cb18: 2b00 cmp r3, #0 801cb1a: d029 beq.n 801cb70 /* 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) { 801cb1c: 69fb ldr r3, [r7, #28] 801cb1e: 2b00 cmp r3, #0 801cb20: d00a beq.n 801cb38 ((struct tcp_pcb_listen *)prev)->next = lpcb->next; 801cb22: 697b ldr r3, [r7, #20] 801cb24: 68da ldr r2, [r3, #12] 801cb26: 69fb ldr r3, [r7, #28] 801cb28: 60da str r2, [r3, #12] /* our successor is the remainder of the listening list */ lpcb->next = tcp_listen_pcbs.listen_pcbs; 801cb2a: 4b10 ldr r3, [pc, #64] @ (801cb6c ) 801cb2c: 681a ldr r2, [r3, #0] 801cb2e: 697b ldr r3, [r7, #20] 801cb30: 60da str r2, [r3, #12] /* put this listening pcb at the head of the listening list */ tcp_listen_pcbs.listen_pcbs = lpcb; 801cb32: 4a0e ldr r2, [pc, #56] @ (801cb6c ) 801cb34: 697b ldr r3, [r7, #20] 801cb36: 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); 801cb38: 6978 ldr r0, [r7, #20] 801cb3a: f000 fa03 bl 801cf44 } pbuf_free(p); 801cb3e: 6878 ldr r0, [r7, #4] 801cb40: f7fd fccc bl 801a4dc return; 801cb44: e1a8 b.n 801ce98 801cb46: bf00 nop 801cb48: 2402aeb4 .word 0x2402aeb4 801cb4c: 24024338 .word 0x24024338 801cb50: 0802ed10 .word 0x0802ed10 801cb54: 0802ee3c .word 0x0802ee3c 801cb58: 0802ed5c .word 0x0802ed5c 801cb5c: 2402ae94 .word 0x2402ae94 801cb60: 0802ee68 .word 0x0802ee68 801cb64: 2402ae98 .word 0x2402ae98 801cb68: 0802ee94 .word 0x0802ee94 801cb6c: 2402ae90 .word 0x2402ae90 tcphdr_opt1len, tcphdr_opt2, p) != ERR_OK) { pbuf_free(p); return; } #endif if (pcb != NULL) { 801cb70: 69bb ldr r3, [r7, #24] 801cb72: 2b00 cmp r3, #0 801cb74: f000 8158 beq.w 801ce28 #if TCP_INPUT_DEBUG tcp_debug_print_state(pcb->state); #endif /* TCP_INPUT_DEBUG */ /* Set up a tcp_seg structure. */ inseg.next = NULL; 801cb78: 4b95 ldr r3, [pc, #596] @ (801cdd0 ) 801cb7a: 2200 movs r2, #0 801cb7c: 601a str r2, [r3, #0] inseg.len = p->tot_len; 801cb7e: 687b ldr r3, [r7, #4] 801cb80: 891a ldrh r2, [r3, #8] 801cb82: 4b93 ldr r3, [pc, #588] @ (801cdd0 ) 801cb84: 811a strh r2, [r3, #8] inseg.p = p; 801cb86: 4a92 ldr r2, [pc, #584] @ (801cdd0 ) 801cb88: 687b ldr r3, [r7, #4] 801cb8a: 6053 str r3, [r2, #4] inseg.tcphdr = tcphdr; 801cb8c: 4b91 ldr r3, [pc, #580] @ (801cdd4 ) 801cb8e: 681b ldr r3, [r3, #0] 801cb90: 4a8f ldr r2, [pc, #572] @ (801cdd0 ) 801cb92: 6113 str r3, [r2, #16] recv_data = NULL; 801cb94: 4b90 ldr r3, [pc, #576] @ (801cdd8 ) 801cb96: 2200 movs r2, #0 801cb98: 601a str r2, [r3, #0] recv_flags = 0; 801cb9a: 4b90 ldr r3, [pc, #576] @ (801cddc ) 801cb9c: 2200 movs r2, #0 801cb9e: 701a strb r2, [r3, #0] recv_acked = 0; 801cba0: 4b8f ldr r3, [pc, #572] @ (801cde0 ) 801cba2: 2200 movs r2, #0 801cba4: 801a strh r2, [r3, #0] if (flags & TCP_PSH) { 801cba6: 4b8f ldr r3, [pc, #572] @ (801cde4 ) 801cba8: 781b ldrb r3, [r3, #0] 801cbaa: f003 0308 and.w r3, r3, #8 801cbae: 2b00 cmp r3, #0 801cbb0: d006 beq.n 801cbc0 p->flags |= PBUF_FLAG_PUSH; 801cbb2: 687b ldr r3, [r7, #4] 801cbb4: 7b5b ldrb r3, [r3, #13] 801cbb6: f043 0301 orr.w r3, r3, #1 801cbba: b2da uxtb r2, r3 801cbbc: 687b ldr r3, [r7, #4] 801cbbe: 735a strb r2, [r3, #13] } /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 801cbc0: 69bb ldr r3, [r7, #24] 801cbc2: 6f9b ldr r3, [r3, #120] @ 0x78 801cbc4: 2b00 cmp r3, #0 801cbc6: d017 beq.n 801cbf8 if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 801cbc8: 69b8 ldr r0, [r7, #24] 801cbca: f7ff f84d bl 801bc68 801cbce: 4603 mov r3, r0 801cbd0: f113 0f0d cmn.w r3, #13 801cbd4: d007 beq.n 801cbe6 ((pcb->refused_data != NULL) && (tcplen > 0))) { 801cbd6: 69bb ldr r3, [r7, #24] 801cbd8: 6f9b ldr r3, [r3, #120] @ 0x78 if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 801cbda: 2b00 cmp r3, #0 801cbdc: d00c beq.n 801cbf8 ((pcb->refused_data != NULL) && (tcplen > 0))) { 801cbde: 4b82 ldr r3, [pc, #520] @ (801cde8 ) 801cbe0: 881b ldrh r3, [r3, #0] 801cbe2: 2b00 cmp r3, #0 801cbe4: d008 beq.n 801cbf8 /* pcb has been aborted or refused data is still refused and the new segment contains data */ if (pcb->rcv_ann_wnd == 0) { 801cbe6: 69bb ldr r3, [r7, #24] 801cbe8: 8d5b ldrh r3, [r3, #42] @ 0x2a 801cbea: 2b00 cmp r3, #0 801cbec: f040 80e4 bne.w 801cdb8 /* this is a zero-window probe, we respond to it with current RCV.NXT and drop the data segment */ tcp_send_empty_ack(pcb); 801cbf0: 69b8 ldr r0, [r7, #24] 801cbf2: f003 fe73 bl 80208dc } TCP_STATS_INC(tcp.drop); MIB2_STATS_INC(mib2.tcpinerrs); goto aborted; 801cbf6: e0df b.n 801cdb8 } } tcp_input_pcb = pcb; 801cbf8: 4a7c ldr r2, [pc, #496] @ (801cdec ) 801cbfa: 69bb ldr r3, [r7, #24] 801cbfc: 6013 str r3, [r2, #0] err = tcp_process(pcb); 801cbfe: 69b8 ldr r0, [r7, #24] 801cc00: f000 fb18 bl 801d234 801cc04: 4603 mov r3, r0 801cc06: 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) { 801cc08: f997 3013 ldrsb.w r3, [r7, #19] 801cc0c: f113 0f0d cmn.w r3, #13 801cc10: f000 80d4 beq.w 801cdbc if (recv_flags & TF_RESET) { 801cc14: 4b71 ldr r3, [pc, #452] @ (801cddc ) 801cc16: 781b ldrb r3, [r3, #0] 801cc18: f003 0308 and.w r3, r3, #8 801cc1c: 2b00 cmp r3, #0 801cc1e: d015 beq.n 801cc4c /* 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); 801cc20: 69bb ldr r3, [r7, #24] 801cc22: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801cc26: 2b00 cmp r3, #0 801cc28: d008 beq.n 801cc3c 801cc2a: 69bb ldr r3, [r7, #24] 801cc2c: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801cc30: 69ba ldr r2, [r7, #24] 801cc32: 6912 ldr r2, [r2, #16] 801cc34: f06f 010d mvn.w r1, #13 801cc38: 4610 mov r0, r2 801cc3a: 4798 blx r3 tcp_pcb_remove(&tcp_active_pcbs, pcb); 801cc3c: 69b9 ldr r1, [r7, #24] 801cc3e: 486c ldr r0, [pc, #432] @ (801cdf0 ) 801cc40: f7ff fbba bl 801c3b8 tcp_free(pcb); 801cc44: 69b8 ldr r0, [r7, #24] 801cc46: f7fd ff05 bl 801aa54 801cc4a: e0da b.n 801ce02 } else { err = ERR_OK; 801cc4c: 2300 movs r3, #0 801cc4e: 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) { 801cc50: 4b63 ldr r3, [pc, #396] @ (801cde0 ) 801cc52: 881b ldrh r3, [r3, #0] 801cc54: 2b00 cmp r3, #0 801cc56: d01d beq.n 801cc94 while (acked > 0) { acked16 = (u16_t)LWIP_MIN(acked, 0xffffu); acked -= acked16; #else { acked16 = recv_acked; 801cc58: 4b61 ldr r3, [pc, #388] @ (801cde0 ) 801cc5a: 881b ldrh r3, [r3, #0] 801cc5c: 81fb strh r3, [r7, #14] #endif TCP_EVENT_SENT(pcb, (u16_t)acked16, err); 801cc5e: 69bb ldr r3, [r7, #24] 801cc60: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 801cc64: 2b00 cmp r3, #0 801cc66: d00a beq.n 801cc7e 801cc68: 69bb ldr r3, [r7, #24] 801cc6a: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 801cc6e: 69ba ldr r2, [r7, #24] 801cc70: 6910 ldr r0, [r2, #16] 801cc72: 89fa ldrh r2, [r7, #14] 801cc74: 69b9 ldr r1, [r7, #24] 801cc76: 4798 blx r3 801cc78: 4603 mov r3, r0 801cc7a: 74fb strb r3, [r7, #19] 801cc7c: e001 b.n 801cc82 801cc7e: 2300 movs r3, #0 801cc80: 74fb strb r3, [r7, #19] if (err == ERR_ABRT) { 801cc82: f997 3013 ldrsb.w r3, [r7, #19] 801cc86: f113 0f0d cmn.w r3, #13 801cc8a: f000 8099 beq.w 801cdc0 goto aborted; } } recv_acked = 0; 801cc8e: 4b54 ldr r3, [pc, #336] @ (801cde0 ) 801cc90: 2200 movs r2, #0 801cc92: 801a strh r2, [r3, #0] } if (tcp_input_delayed_close(pcb)) { 801cc94: 69b8 ldr r0, [r7, #24] 801cc96: f000 f915 bl 801cec4 801cc9a: 4603 mov r3, r0 801cc9c: 2b00 cmp r3, #0 801cc9e: f040 8091 bne.w 801cdc4 #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) { 801cca2: 4b4d ldr r3, [pc, #308] @ (801cdd8 ) 801cca4: 681b ldr r3, [r3, #0] 801cca6: 2b00 cmp r3, #0 801cca8: d041 beq.n 801cd2e #endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL); 801ccaa: 69bb ldr r3, [r7, #24] 801ccac: 6f9b ldr r3, [r3, #120] @ 0x78 801ccae: 2b00 cmp r3, #0 801ccb0: d006 beq.n 801ccc0 801ccb2: 4b50 ldr r3, [pc, #320] @ (801cdf4 ) 801ccb4: f44f 72f3 mov.w r2, #486 @ 0x1e6 801ccb8: 494f ldr r1, [pc, #316] @ (801cdf8 ) 801ccba: 4850 ldr r0, [pc, #320] @ (801cdfc ) 801ccbc: f00c fe86 bl 80299cc if (pcb->flags & TF_RXCLOSED) { 801ccc0: 69bb ldr r3, [r7, #24] 801ccc2: 8b5b ldrh r3, [r3, #26] 801ccc4: f003 0310 and.w r3, r3, #16 801ccc8: 2b00 cmp r3, #0 801ccca: d008 beq.n 801ccde /* received data although already closed -> abort (send RST) to notify the remote host that not all data has been processed */ pbuf_free(recv_data); 801cccc: 4b42 ldr r3, [pc, #264] @ (801cdd8 ) 801ccce: 681b ldr r3, [r3, #0] 801ccd0: 4618 mov r0, r3 801ccd2: f7fd fc03 bl 801a4dc #if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE if (rest != NULL) { pbuf_free(rest); } #endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ tcp_abort(pcb); 801ccd6: 69b8 ldr r0, [r7, #24] 801ccd8: f7fe fa06 bl 801b0e8 goto aborted; 801ccdc: e091 b.n 801ce02 } /* Notify application that data has been received. */ TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); 801ccde: 69bb ldr r3, [r7, #24] 801cce0: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 801cce4: 2b00 cmp r3, #0 801cce6: d00c beq.n 801cd02 801cce8: 69bb ldr r3, [r7, #24] 801ccea: f8d3 4084 ldr.w r4, [r3, #132] @ 0x84 801ccee: 69bb ldr r3, [r7, #24] 801ccf0: 6918 ldr r0, [r3, #16] 801ccf2: 4b39 ldr r3, [pc, #228] @ (801cdd8 ) 801ccf4: 681a ldr r2, [r3, #0] 801ccf6: 2300 movs r3, #0 801ccf8: 69b9 ldr r1, [r7, #24] 801ccfa: 47a0 blx r4 801ccfc: 4603 mov r3, r0 801ccfe: 74fb strb r3, [r7, #19] 801cd00: e008 b.n 801cd14 801cd02: 4b35 ldr r3, [pc, #212] @ (801cdd8 ) 801cd04: 681a ldr r2, [r3, #0] 801cd06: 2300 movs r3, #0 801cd08: 69b9 ldr r1, [r7, #24] 801cd0a: 2000 movs r0, #0 801cd0c: f7ff f884 bl 801be18 801cd10: 4603 mov r3, r0 801cd12: 74fb strb r3, [r7, #19] if (err == ERR_ABRT) { 801cd14: f997 3013 ldrsb.w r3, [r7, #19] 801cd18: f113 0f0d cmn.w r3, #13 801cd1c: d054 beq.n 801cdc8 #endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ goto aborted; } /* If the upper layer can't receive this data, store it */ if (err != ERR_OK) { 801cd1e: f997 3013 ldrsb.w r3, [r7, #19] 801cd22: 2b00 cmp r3, #0 801cd24: d003 beq.n 801cd2e #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; 801cd26: 4b2c ldr r3, [pc, #176] @ (801cdd8 ) 801cd28: 681a ldr r2, [r3, #0] 801cd2a: 69bb ldr r3, [r7, #24] 801cd2c: 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) { 801cd2e: 4b2b ldr r3, [pc, #172] @ (801cddc ) 801cd30: 781b ldrb r3, [r3, #0] 801cd32: f003 0320 and.w r3, r3, #32 801cd36: 2b00 cmp r3, #0 801cd38: d031 beq.n 801cd9e if (pcb->refused_data != NULL) { 801cd3a: 69bb ldr r3, [r7, #24] 801cd3c: 6f9b ldr r3, [r3, #120] @ 0x78 801cd3e: 2b00 cmp r3, #0 801cd40: d009 beq.n 801cd56 /* Delay this if we have refused data. */ pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN; 801cd42: 69bb ldr r3, [r7, #24] 801cd44: 6f9b ldr r3, [r3, #120] @ 0x78 801cd46: 7b5a ldrb r2, [r3, #13] 801cd48: 69bb ldr r3, [r7, #24] 801cd4a: 6f9b ldr r3, [r3, #120] @ 0x78 801cd4c: f042 0220 orr.w r2, r2, #32 801cd50: b2d2 uxtb r2, r2 801cd52: 735a strb r2, [r3, #13] 801cd54: e023 b.n 801cd9e } 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)) { 801cd56: 69bb ldr r3, [r7, #24] 801cd58: 8d1b ldrh r3, [r3, #40] @ 0x28 801cd5a: f241 62d0 movw r2, #5840 @ 0x16d0 801cd5e: 4293 cmp r3, r2 801cd60: d005 beq.n 801cd6e pcb->rcv_wnd++; 801cd62: 69bb ldr r3, [r7, #24] 801cd64: 8d1b ldrh r3, [r3, #40] @ 0x28 801cd66: 3301 adds r3, #1 801cd68: b29a uxth r2, r3 801cd6a: 69bb ldr r3, [r7, #24] 801cd6c: 851a strh r2, [r3, #40] @ 0x28 } TCP_EVENT_CLOSED(pcb, err); 801cd6e: 69bb ldr r3, [r7, #24] 801cd70: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 801cd74: 2b00 cmp r3, #0 801cd76: d00b beq.n 801cd90 801cd78: 69bb ldr r3, [r7, #24] 801cd7a: f8d3 4084 ldr.w r4, [r3, #132] @ 0x84 801cd7e: 69bb ldr r3, [r7, #24] 801cd80: 6918 ldr r0, [r3, #16] 801cd82: 2300 movs r3, #0 801cd84: 2200 movs r2, #0 801cd86: 69b9 ldr r1, [r7, #24] 801cd88: 47a0 blx r4 801cd8a: 4603 mov r3, r0 801cd8c: 74fb strb r3, [r7, #19] 801cd8e: e001 b.n 801cd94 801cd90: 2300 movs r3, #0 801cd92: 74fb strb r3, [r7, #19] if (err == ERR_ABRT) { 801cd94: f997 3013 ldrsb.w r3, [r7, #19] 801cd98: f113 0f0d cmn.w r3, #13 801cd9c: d016 beq.n 801cdcc goto aborted; } } } tcp_input_pcb = NULL; 801cd9e: 4b13 ldr r3, [pc, #76] @ (801cdec ) 801cda0: 2200 movs r2, #0 801cda2: 601a str r2, [r3, #0] if (tcp_input_delayed_close(pcb)) { 801cda4: 69b8 ldr r0, [r7, #24] 801cda6: f000 f88d bl 801cec4 801cdaa: 4603 mov r3, r0 801cdac: 2b00 cmp r3, #0 801cdae: d127 bne.n 801ce00 goto aborted; } /* Try to send something out. */ tcp_output(pcb); 801cdb0: 69b8 ldr r0, [r7, #24] 801cdb2: f002 ff7f bl 801fcb4 801cdb6: e024 b.n 801ce02 goto aborted; 801cdb8: bf00 nop 801cdba: e022 b.n 801ce02 #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: 801cdbc: bf00 nop 801cdbe: e020 b.n 801ce02 goto aborted; 801cdc0: bf00 nop 801cdc2: e01e b.n 801ce02 goto aborted; 801cdc4: bf00 nop 801cdc6: e01c b.n 801ce02 goto aborted; 801cdc8: bf00 nop 801cdca: e01a b.n 801ce02 goto aborted; 801cdcc: bf00 nop 801cdce: e018 b.n 801ce02 801cdd0: 2402aea0 .word 0x2402aea0 801cdd4: 2402aeb4 .word 0x2402aeb4 801cdd8: 2402aed4 .word 0x2402aed4 801cddc: 2402aed1 .word 0x2402aed1 801cde0: 2402aecc .word 0x2402aecc 801cde4: 2402aed0 .word 0x2402aed0 801cde8: 2402aece .word 0x2402aece 801cdec: 2402aed8 .word 0x2402aed8 801cdf0: 2402ae94 .word 0x2402ae94 801cdf4: 0802ed10 .word 0x0802ed10 801cdf8: 0802eec4 .word 0x0802eec4 801cdfc: 0802ed5c .word 0x0802ed5c goto aborted; 801ce00: bf00 nop tcp_input_pcb = NULL; 801ce02: 4b27 ldr r3, [pc, #156] @ (801cea0 ) 801ce04: 2200 movs r2, #0 801ce06: 601a str r2, [r3, #0] recv_data = NULL; 801ce08: 4b26 ldr r3, [pc, #152] @ (801cea4 ) 801ce0a: 2200 movs r2, #0 801ce0c: 601a str r2, [r3, #0] /* give up our reference to inseg.p */ if (inseg.p != NULL) { 801ce0e: 4b26 ldr r3, [pc, #152] @ (801cea8 ) 801ce10: 685b ldr r3, [r3, #4] 801ce12: 2b00 cmp r3, #0 801ce14: d03f beq.n 801ce96 pbuf_free(inseg.p); 801ce16: 4b24 ldr r3, [pc, #144] @ (801cea8 ) 801ce18: 685b ldr r3, [r3, #4] 801ce1a: 4618 mov r0, r3 801ce1c: f7fd fb5e bl 801a4dc inseg.p = NULL; 801ce20: 4b21 ldr r3, [pc, #132] @ (801cea8 ) 801ce22: 2200 movs r2, #0 801ce24: 605a str r2, [r3, #4] pbuf_free(p); } LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane()); PERF_STOP("tcp_input"); return; 801ce26: e036 b.n 801ce96 if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { 801ce28: 4b20 ldr r3, [pc, #128] @ (801ceac ) 801ce2a: 681b ldr r3, [r3, #0] 801ce2c: 899b ldrh r3, [r3, #12] 801ce2e: b29b uxth r3, r3 801ce30: 4618 mov r0, r3 801ce32: f7fb fe71 bl 8018b18 801ce36: 4603 mov r3, r0 801ce38: b2db uxtb r3, r3 801ce3a: f003 0304 and.w r3, r3, #4 801ce3e: 2b00 cmp r3, #0 801ce40: d118 bne.n 801ce74 tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(), 801ce42: 4b1b ldr r3, [pc, #108] @ (801ceb0 ) 801ce44: 6819 ldr r1, [r3, #0] 801ce46: 4b1b ldr r3, [pc, #108] @ (801ceb4 ) 801ce48: 881b ldrh r3, [r3, #0] 801ce4a: 461a mov r2, r3 801ce4c: 4b1a ldr r3, [pc, #104] @ (801ceb8 ) 801ce4e: 681b ldr r3, [r3, #0] 801ce50: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801ce52: 4b16 ldr r3, [pc, #88] @ (801ceac ) 801ce54: 681b ldr r3, [r3, #0] tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(), 801ce56: 885b ldrh r3, [r3, #2] 801ce58: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801ce5a: 4a14 ldr r2, [pc, #80] @ (801ceac ) 801ce5c: 6812 ldr r2, [r2, #0] tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(), 801ce5e: 8812 ldrh r2, [r2, #0] 801ce60: b292 uxth r2, r2 801ce62: 9202 str r2, [sp, #8] 801ce64: 9301 str r3, [sp, #4] 801ce66: 4b15 ldr r3, [pc, #84] @ (801cebc ) 801ce68: 9300 str r3, [sp, #0] 801ce6a: 4b15 ldr r3, [pc, #84] @ (801cec0 ) 801ce6c: 4602 mov r2, r0 801ce6e: 2000 movs r0, #0 801ce70: f003 fce2 bl 8020838 pbuf_free(p); 801ce74: 6878 ldr r0, [r7, #4] 801ce76: f7fd fb31 bl 801a4dc return; 801ce7a: e00c b.n 801ce96 goto dropped; 801ce7c: bf00 nop 801ce7e: e006 b.n 801ce8e goto dropped; 801ce80: bf00 nop 801ce82: e004 b.n 801ce8e goto dropped; 801ce84: bf00 nop 801ce86: e002 b.n 801ce8e goto dropped; 801ce88: bf00 nop 801ce8a: e000 b.n 801ce8e goto dropped; 801ce8c: bf00 nop dropped: TCP_STATS_INC(tcp.drop); MIB2_STATS_INC(mib2.tcpinerrs); pbuf_free(p); 801ce8e: 6878 ldr r0, [r7, #4] 801ce90: f7fd fb24 bl 801a4dc 801ce94: e000 b.n 801ce98 return; 801ce96: bf00 nop } 801ce98: 3724 adds r7, #36 @ 0x24 801ce9a: 46bd mov sp, r7 801ce9c: bd90 pop {r4, r7, pc} 801ce9e: bf00 nop 801cea0: 2402aed8 .word 0x2402aed8 801cea4: 2402aed4 .word 0x2402aed4 801cea8: 2402aea0 .word 0x2402aea0 801ceac: 2402aeb4 .word 0x2402aeb4 801ceb0: 2402aec8 .word 0x2402aec8 801ceb4: 2402aece .word 0x2402aece 801ceb8: 2402aec4 .word 0x2402aec4 801cebc: 24024348 .word 0x24024348 801cec0: 2402434c .word 0x2402434c 0801cec4 : * any more. * @returns 1 if the pcb has been closed and deallocated, 0 otherwise */ static int tcp_input_delayed_close(struct tcp_pcb *pcb) { 801cec4: b580 push {r7, lr} 801cec6: b082 sub sp, #8 801cec8: af00 add r7, sp, #0 801ceca: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL); 801cecc: 687b ldr r3, [r7, #4] 801cece: 2b00 cmp r3, #0 801ced0: d106 bne.n 801cee0 801ced2: 4b17 ldr r3, [pc, #92] @ (801cf30 ) 801ced4: f240 225a movw r2, #602 @ 0x25a 801ced8: 4916 ldr r1, [pc, #88] @ (801cf34 ) 801ceda: 4817 ldr r0, [pc, #92] @ (801cf38 ) 801cedc: f00c fd76 bl 80299cc if (recv_flags & TF_CLOSED) { 801cee0: 4b16 ldr r3, [pc, #88] @ (801cf3c ) 801cee2: 781b ldrb r3, [r3, #0] 801cee4: f003 0310 and.w r3, r3, #16 801cee8: 2b00 cmp r3, #0 801ceea: d01c beq.n 801cf26 /* The connection has been closed and we will deallocate the PCB. */ if (!(pcb->flags & TF_RXCLOSED)) { 801ceec: 687b ldr r3, [r7, #4] 801ceee: 8b5b ldrh r3, [r3, #26] 801cef0: f003 0310 and.w r3, r3, #16 801cef4: 2b00 cmp r3, #0 801cef6: d10d bne.n 801cf14 /* 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); 801cef8: 687b ldr r3, [r7, #4] 801cefa: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801cefe: 2b00 cmp r3, #0 801cf00: d008 beq.n 801cf14 801cf02: 687b ldr r3, [r7, #4] 801cf04: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801cf08: 687a ldr r2, [r7, #4] 801cf0a: 6912 ldr r2, [r2, #16] 801cf0c: f06f 010e mvn.w r1, #14 801cf10: 4610 mov r0, r2 801cf12: 4798 blx r3 } tcp_pcb_remove(&tcp_active_pcbs, pcb); 801cf14: 6879 ldr r1, [r7, #4] 801cf16: 480a ldr r0, [pc, #40] @ (801cf40 ) 801cf18: f7ff fa4e bl 801c3b8 tcp_free(pcb); 801cf1c: 6878 ldr r0, [r7, #4] 801cf1e: f7fd fd99 bl 801aa54 return 1; 801cf22: 2301 movs r3, #1 801cf24: e000 b.n 801cf28 } return 0; 801cf26: 2300 movs r3, #0 } 801cf28: 4618 mov r0, r3 801cf2a: 3708 adds r7, #8 801cf2c: 46bd mov sp, r7 801cf2e: bd80 pop {r7, pc} 801cf30: 0802ed10 .word 0x0802ed10 801cf34: 0802eee0 .word 0x0802eee0 801cf38: 0802ed5c .word 0x0802ed5c 801cf3c: 2402aed1 .word 0x2402aed1 801cf40: 2402ae94 .word 0x2402ae94 0801cf44 : * @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) { 801cf44: b590 push {r4, r7, lr} 801cf46: b08b sub sp, #44 @ 0x2c 801cf48: af04 add r7, sp, #16 801cf4a: 6078 str r0, [r7, #4] struct tcp_pcb *npcb; u32_t iss; err_t rc; if (flags & TCP_RST) { 801cf4c: 4b6f ldr r3, [pc, #444] @ (801d10c ) 801cf4e: 781b ldrb r3, [r3, #0] 801cf50: f003 0304 and.w r3, r3, #4 801cf54: 2b00 cmp r3, #0 801cf56: f040 80d2 bne.w 801d0fe /* An incoming RST should be ignored. Return. */ return; } LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL); 801cf5a: 687b ldr r3, [r7, #4] 801cf5c: 2b00 cmp r3, #0 801cf5e: d106 bne.n 801cf6e 801cf60: 4b6b ldr r3, [pc, #428] @ (801d110 ) 801cf62: f240 2281 movw r2, #641 @ 0x281 801cf66: 496b ldr r1, [pc, #428] @ (801d114 ) 801cf68: 486b ldr r0, [pc, #428] @ (801d118 ) 801cf6a: f00c fd2f bl 80299cc /* In the LISTEN state, we check for incoming SYN segments, creates a new PCB, and responds with a SYN|ACK. */ if (flags & TCP_ACK) { 801cf6e: 4b67 ldr r3, [pc, #412] @ (801d10c ) 801cf70: 781b ldrb r3, [r3, #0] 801cf72: f003 0310 and.w r3, r3, #16 801cf76: 2b00 cmp r3, #0 801cf78: d019 beq.n 801cfae /* 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(), 801cf7a: 4b68 ldr r3, [pc, #416] @ (801d11c ) 801cf7c: 6819 ldr r1, [r3, #0] 801cf7e: 4b68 ldr r3, [pc, #416] @ (801d120 ) 801cf80: 881b ldrh r3, [r3, #0] 801cf82: 461a mov r2, r3 801cf84: 4b67 ldr r3, [pc, #412] @ (801d124 ) 801cf86: 681b ldr r3, [r3, #0] 801cf88: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801cf8a: 4b67 ldr r3, [pc, #412] @ (801d128 ) 801cf8c: 681b ldr r3, [r3, #0] tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801cf8e: 885b ldrh r3, [r3, #2] 801cf90: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801cf92: 4a65 ldr r2, [pc, #404] @ (801d128 ) 801cf94: 6812 ldr r2, [r2, #0] tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801cf96: 8812 ldrh r2, [r2, #0] 801cf98: b292 uxth r2, r2 801cf9a: 9202 str r2, [sp, #8] 801cf9c: 9301 str r3, [sp, #4] 801cf9e: 4b63 ldr r3, [pc, #396] @ (801d12c ) 801cfa0: 9300 str r3, [sp, #0] 801cfa2: 4b63 ldr r3, [pc, #396] @ (801d130 ) 801cfa4: 4602 mov r2, r0 801cfa6: 6878 ldr r0, [r7, #4] 801cfa8: f003 fc46 bl 8020838 tcp_abandon(npcb, 0); return; } tcp_output(npcb); } return; 801cfac: e0a9 b.n 801d102 } else if (flags & TCP_SYN) { 801cfae: 4b57 ldr r3, [pc, #348] @ (801d10c ) 801cfb0: 781b ldrb r3, [r3, #0] 801cfb2: f003 0302 and.w r3, r3, #2 801cfb6: 2b00 cmp r3, #0 801cfb8: f000 80a3 beq.w 801d102 npcb = tcp_alloc(pcb->prio); 801cfbc: 687b ldr r3, [r7, #4] 801cfbe: 7d5b ldrb r3, [r3, #21] 801cfc0: 4618 mov r0, r3 801cfc2: f7ff f84d bl 801c060 801cfc6: 6178 str r0, [r7, #20] if (npcb == NULL) { 801cfc8: 697b ldr r3, [r7, #20] 801cfca: 2b00 cmp r3, #0 801cfcc: d111 bne.n 801cff2 TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err); 801cfce: 687b ldr r3, [r7, #4] 801cfd0: 699b ldr r3, [r3, #24] 801cfd2: 2b00 cmp r3, #0 801cfd4: d00a beq.n 801cfec 801cfd6: 687b ldr r3, [r7, #4] 801cfd8: 699b ldr r3, [r3, #24] 801cfda: 687a ldr r2, [r7, #4] 801cfdc: 6910 ldr r0, [r2, #16] 801cfde: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 801cfe2: 2100 movs r1, #0 801cfe4: 4798 blx r3 801cfe6: 4603 mov r3, r0 801cfe8: 73bb strb r3, [r7, #14] return; 801cfea: e08b b.n 801d104 TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err); 801cfec: 23f0 movs r3, #240 @ 0xf0 801cfee: 73bb strb r3, [r7, #14] return; 801cff0: e088 b.n 801d104 ip_addr_copy(npcb->local_ip, *ip_current_dest_addr()); 801cff2: 4b50 ldr r3, [pc, #320] @ (801d134 ) 801cff4: 695a ldr r2, [r3, #20] 801cff6: 697b ldr r3, [r7, #20] 801cff8: 601a str r2, [r3, #0] ip_addr_copy(npcb->remote_ip, *ip_current_src_addr()); 801cffa: 4b4e ldr r3, [pc, #312] @ (801d134 ) 801cffc: 691a ldr r2, [r3, #16] 801cffe: 697b ldr r3, [r7, #20] 801d000: 605a str r2, [r3, #4] npcb->local_port = pcb->local_port; 801d002: 687b ldr r3, [r7, #4] 801d004: 8ada ldrh r2, [r3, #22] 801d006: 697b ldr r3, [r7, #20] 801d008: 82da strh r2, [r3, #22] npcb->remote_port = tcphdr->src; 801d00a: 4b47 ldr r3, [pc, #284] @ (801d128 ) 801d00c: 681b ldr r3, [r3, #0] 801d00e: 881b ldrh r3, [r3, #0] 801d010: b29a uxth r2, r3 801d012: 697b ldr r3, [r7, #20] 801d014: 831a strh r2, [r3, #24] npcb->state = SYN_RCVD; 801d016: 697b ldr r3, [r7, #20] 801d018: 2203 movs r2, #3 801d01a: 751a strb r2, [r3, #20] npcb->rcv_nxt = seqno + 1; 801d01c: 4b41 ldr r3, [pc, #260] @ (801d124 ) 801d01e: 681b ldr r3, [r3, #0] 801d020: 1c5a adds r2, r3, #1 801d022: 697b ldr r3, [r7, #20] 801d024: 625a str r2, [r3, #36] @ 0x24 npcb->rcv_ann_right_edge = npcb->rcv_nxt; 801d026: 697b ldr r3, [r7, #20] 801d028: 6a5a ldr r2, [r3, #36] @ 0x24 801d02a: 697b ldr r3, [r7, #20] 801d02c: 62da str r2, [r3, #44] @ 0x2c iss = tcp_next_iss(npcb); 801d02e: 6978 ldr r0, [r7, #20] 801d030: f7ff fa56 bl 801c4e0 801d034: 6138 str r0, [r7, #16] npcb->snd_wl2 = iss; 801d036: 697b ldr r3, [r7, #20] 801d038: 693a ldr r2, [r7, #16] 801d03a: 659a str r2, [r3, #88] @ 0x58 npcb->snd_nxt = iss; 801d03c: 697b ldr r3, [r7, #20] 801d03e: 693a ldr r2, [r7, #16] 801d040: 651a str r2, [r3, #80] @ 0x50 npcb->lastack = iss; 801d042: 697b ldr r3, [r7, #20] 801d044: 693a ldr r2, [r7, #16] 801d046: 645a str r2, [r3, #68] @ 0x44 npcb->snd_lbb = iss; 801d048: 697b ldr r3, [r7, #20] 801d04a: 693a ldr r2, [r7, #16] 801d04c: 65da str r2, [r3, #92] @ 0x5c npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */ 801d04e: 4b35 ldr r3, [pc, #212] @ (801d124 ) 801d050: 681b ldr r3, [r3, #0] 801d052: 1e5a subs r2, r3, #1 801d054: 697b ldr r3, [r7, #20] 801d056: 655a str r2, [r3, #84] @ 0x54 npcb->callback_arg = pcb->callback_arg; 801d058: 687b ldr r3, [r7, #4] 801d05a: 691a ldr r2, [r3, #16] 801d05c: 697b ldr r3, [r7, #20] 801d05e: 611a str r2, [r3, #16] npcb->listener = pcb; 801d060: 697b ldr r3, [r7, #20] 801d062: 687a ldr r2, [r7, #4] 801d064: 67da str r2, [r3, #124] @ 0x7c npcb->so_options = pcb->so_options & SOF_INHERITED; 801d066: 687b ldr r3, [r7, #4] 801d068: 7a5b ldrb r3, [r3, #9] 801d06a: f003 030c and.w r3, r3, #12 801d06e: b2da uxtb r2, r3 801d070: 697b ldr r3, [r7, #20] 801d072: 725a strb r2, [r3, #9] npcb->netif_idx = pcb->netif_idx; 801d074: 687b ldr r3, [r7, #4] 801d076: 7a1a ldrb r2, [r3, #8] 801d078: 697b ldr r3, [r7, #20] 801d07a: 721a strb r2, [r3, #8] TCP_REG_ACTIVE(npcb); 801d07c: 4b2e ldr r3, [pc, #184] @ (801d138 ) 801d07e: 681a ldr r2, [r3, #0] 801d080: 697b ldr r3, [r7, #20] 801d082: 60da str r2, [r3, #12] 801d084: 4a2c ldr r2, [pc, #176] @ (801d138 ) 801d086: 697b ldr r3, [r7, #20] 801d088: 6013 str r3, [r2, #0] 801d08a: f003 fd97 bl 8020bbc 801d08e: 4b2b ldr r3, [pc, #172] @ (801d13c ) 801d090: 2201 movs r2, #1 801d092: 701a strb r2, [r3, #0] tcp_parseopt(npcb); 801d094: 6978 ldr r0, [r7, #20] 801d096: f001 fd8b bl 801ebb0 npcb->snd_wnd = tcphdr->wnd; 801d09a: 4b23 ldr r3, [pc, #140] @ (801d128 ) 801d09c: 681b ldr r3, [r3, #0] 801d09e: 89db ldrh r3, [r3, #14] 801d0a0: b29a uxth r2, r3 801d0a2: 697b ldr r3, [r7, #20] 801d0a4: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 npcb->snd_wnd_max = npcb->snd_wnd; 801d0a8: 697b ldr r3, [r7, #20] 801d0aa: f8b3 2060 ldrh.w r2, [r3, #96] @ 0x60 801d0ae: 697b ldr r3, [r7, #20] 801d0b0: f8a3 2062 strh.w r2, [r3, #98] @ 0x62 npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip); 801d0b4: 697b ldr r3, [r7, #20] 801d0b6: 8e5c ldrh r4, [r3, #50] @ 0x32 801d0b8: 697b ldr r3, [r7, #20] 801d0ba: 3304 adds r3, #4 801d0bc: 4618 mov r0, r3 801d0be: f007 fc77 bl 80249b0 801d0c2: 4601 mov r1, r0 801d0c4: 697b ldr r3, [r7, #20] 801d0c6: 3304 adds r3, #4 801d0c8: 461a mov r2, r3 801d0ca: 4620 mov r0, r4 801d0cc: f7ff fa2e bl 801c52c 801d0d0: 4603 mov r3, r0 801d0d2: 461a mov r2, r3 801d0d4: 697b ldr r3, [r7, #20] 801d0d6: 865a strh r2, [r3, #50] @ 0x32 rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); 801d0d8: 2112 movs r1, #18 801d0da: 6978 ldr r0, [r7, #20] 801d0dc: f002 fcfc bl 801fad8 801d0e0: 4603 mov r3, r0 801d0e2: 73fb strb r3, [r7, #15] if (rc != ERR_OK) { 801d0e4: f997 300f ldrsb.w r3, [r7, #15] 801d0e8: 2b00 cmp r3, #0 801d0ea: d004 beq.n 801d0f6 tcp_abandon(npcb, 0); 801d0ec: 2100 movs r1, #0 801d0ee: 6978 ldr r0, [r7, #20] 801d0f0: f7fd ff3a bl 801af68 return; 801d0f4: e006 b.n 801d104 tcp_output(npcb); 801d0f6: 6978 ldr r0, [r7, #20] 801d0f8: f002 fddc bl 801fcb4 return; 801d0fc: e001 b.n 801d102 return; 801d0fe: bf00 nop 801d100: e000 b.n 801d104 return; 801d102: bf00 nop } 801d104: 371c adds r7, #28 801d106: 46bd mov sp, r7 801d108: bd90 pop {r4, r7, pc} 801d10a: bf00 nop 801d10c: 2402aed0 .word 0x2402aed0 801d110: 0802ed10 .word 0x0802ed10 801d114: 0802ef08 .word 0x0802ef08 801d118: 0802ed5c .word 0x0802ed5c 801d11c: 2402aec8 .word 0x2402aec8 801d120: 2402aece .word 0x2402aece 801d124: 2402aec4 .word 0x2402aec4 801d128: 2402aeb4 .word 0x2402aeb4 801d12c: 24024348 .word 0x24024348 801d130: 2402434c .word 0x2402434c 801d134: 24024338 .word 0x24024338 801d138: 2402ae94 .word 0x2402ae94 801d13c: 2402ae9c .word 0x2402ae9c 0801d140 : * @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) { 801d140: b580 push {r7, lr} 801d142: b086 sub sp, #24 801d144: af04 add r7, sp, #16 801d146: 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) { 801d148: 4b2f ldr r3, [pc, #188] @ (801d208 ) 801d14a: 781b ldrb r3, [r3, #0] 801d14c: f003 0304 and.w r3, r3, #4 801d150: 2b00 cmp r3, #0 801d152: d153 bne.n 801d1fc return; } LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL); 801d154: 687b ldr r3, [r7, #4] 801d156: 2b00 cmp r3, #0 801d158: d106 bne.n 801d168 801d15a: 4b2c ldr r3, [pc, #176] @ (801d20c ) 801d15c: f240 22ee movw r2, #750 @ 0x2ee 801d160: 492b ldr r1, [pc, #172] @ (801d210 ) 801d162: 482c ldr r0, [pc, #176] @ (801d214 ) 801d164: f00c fc32 bl 80299cc /* - fourth, check the SYN bit, */ if (flags & TCP_SYN) { 801d168: 4b27 ldr r3, [pc, #156] @ (801d208 ) 801d16a: 781b ldrb r3, [r3, #0] 801d16c: f003 0302 and.w r3, r3, #2 801d170: 2b00 cmp r3, #0 801d172: d02a beq.n 801d1ca /* 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)) { 801d174: 4b28 ldr r3, [pc, #160] @ (801d218 ) 801d176: 681a ldr r2, [r3, #0] 801d178: 687b ldr r3, [r7, #4] 801d17a: 6a5b ldr r3, [r3, #36] @ 0x24 801d17c: 1ad3 subs r3, r2, r3 801d17e: 2b00 cmp r3, #0 801d180: db2d blt.n 801d1de 801d182: 4b25 ldr r3, [pc, #148] @ (801d218 ) 801d184: 681a ldr r2, [r3, #0] 801d186: 687b ldr r3, [r7, #4] 801d188: 6a5b ldr r3, [r3, #36] @ 0x24 801d18a: 6879 ldr r1, [r7, #4] 801d18c: 8d09 ldrh r1, [r1, #40] @ 0x28 801d18e: 440b add r3, r1 801d190: 1ad3 subs r3, r2, r3 801d192: 2b00 cmp r3, #0 801d194: dc23 bgt.n 801d1de /* If the SYN is in the window it is an error, send a reset */ tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801d196: 4b21 ldr r3, [pc, #132] @ (801d21c ) 801d198: 6819 ldr r1, [r3, #0] 801d19a: 4b21 ldr r3, [pc, #132] @ (801d220 ) 801d19c: 881b ldrh r3, [r3, #0] 801d19e: 461a mov r2, r3 801d1a0: 4b1d ldr r3, [pc, #116] @ (801d218 ) 801d1a2: 681b ldr r3, [r3, #0] 801d1a4: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801d1a6: 4b1f ldr r3, [pc, #124] @ (801d224 ) 801d1a8: 681b ldr r3, [r3, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801d1aa: 885b ldrh r3, [r3, #2] 801d1ac: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801d1ae: 4a1d ldr r2, [pc, #116] @ (801d224 ) 801d1b0: 6812 ldr r2, [r2, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801d1b2: 8812 ldrh r2, [r2, #0] 801d1b4: b292 uxth r2, r2 801d1b6: 9202 str r2, [sp, #8] 801d1b8: 9301 str r3, [sp, #4] 801d1ba: 4b1b ldr r3, [pc, #108] @ (801d228 ) 801d1bc: 9300 str r3, [sp, #0] 801d1be: 4b1b ldr r3, [pc, #108] @ (801d22c ) 801d1c0: 4602 mov r2, r0 801d1c2: 6878 ldr r0, [r7, #4] 801d1c4: f003 fb38 bl 8020838 return; 801d1c8: e01b b.n 801d202 } } else if (flags & TCP_FIN) { 801d1ca: 4b0f ldr r3, [pc, #60] @ (801d208 ) 801d1cc: 781b ldrb r3, [r3, #0] 801d1ce: f003 0301 and.w r3, r3, #1 801d1d2: 2b00 cmp r3, #0 801d1d4: d003 beq.n 801d1de /* - eighth, check the FIN bit: Remain in the TIME-WAIT state. Restart the 2 MSL time-wait timeout.*/ pcb->tmr = tcp_ticks; 801d1d6: 4b16 ldr r3, [pc, #88] @ (801d230 ) 801d1d8: 681a ldr r2, [r3, #0] 801d1da: 687b ldr r3, [r7, #4] 801d1dc: 621a str r2, [r3, #32] } if ((tcplen > 0)) { 801d1de: 4b10 ldr r3, [pc, #64] @ (801d220 ) 801d1e0: 881b ldrh r3, [r3, #0] 801d1e2: 2b00 cmp r3, #0 801d1e4: d00c beq.n 801d200 /* Acknowledge data, FIN or out-of-window SYN */ tcp_ack_now(pcb); 801d1e6: 687b ldr r3, [r7, #4] 801d1e8: 8b5b ldrh r3, [r3, #26] 801d1ea: f043 0302 orr.w r3, r3, #2 801d1ee: b29a uxth r2, r3 801d1f0: 687b ldr r3, [r7, #4] 801d1f2: 835a strh r2, [r3, #26] tcp_output(pcb); 801d1f4: 6878 ldr r0, [r7, #4] 801d1f6: f002 fd5d bl 801fcb4 } return; 801d1fa: e001 b.n 801d200 return; 801d1fc: bf00 nop 801d1fe: e000 b.n 801d202 return; 801d200: bf00 nop } 801d202: 3708 adds r7, #8 801d204: 46bd mov sp, r7 801d206: bd80 pop {r7, pc} 801d208: 2402aed0 .word 0x2402aed0 801d20c: 0802ed10 .word 0x0802ed10 801d210: 0802ef28 .word 0x0802ef28 801d214: 0802ed5c .word 0x0802ed5c 801d218: 2402aec4 .word 0x2402aec4 801d21c: 2402aec8 .word 0x2402aec8 801d220: 2402aece .word 0x2402aece 801d224: 2402aeb4 .word 0x2402aeb4 801d228: 24024348 .word 0x24024348 801d22c: 2402434c .word 0x2402434c 801d230: 2402ae88 .word 0x2402ae88 0801d234 : * @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) { 801d234: b590 push {r4, r7, lr} 801d236: b08d sub sp, #52 @ 0x34 801d238: af04 add r7, sp, #16 801d23a: 6078 str r0, [r7, #4] struct tcp_seg *rseg; u8_t acceptable = 0; 801d23c: 2300 movs r3, #0 801d23e: 77fb strb r3, [r7, #31] err_t err; err = ERR_OK; 801d240: 2300 movs r3, #0 801d242: 77bb strb r3, [r7, #30] LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL); 801d244: 687b ldr r3, [r7, #4] 801d246: 2b00 cmp r3, #0 801d248: d106 bne.n 801d258 801d24a: 4b9d ldr r3, [pc, #628] @ (801d4c0 ) 801d24c: f44f 7247 mov.w r2, #796 @ 0x31c 801d250: 499c ldr r1, [pc, #624] @ (801d4c4 ) 801d252: 489d ldr r0, [pc, #628] @ (801d4c8 ) 801d254: f00c fbba bl 80299cc /* Process incoming RST segments. */ if (flags & TCP_RST) { 801d258: 4b9c ldr r3, [pc, #624] @ (801d4cc ) 801d25a: 781b ldrb r3, [r3, #0] 801d25c: f003 0304 and.w r3, r3, #4 801d260: 2b00 cmp r3, #0 801d262: d04e beq.n 801d302 /* First, determine if the reset is acceptable. */ if (pcb->state == SYN_SENT) { 801d264: 687b ldr r3, [r7, #4] 801d266: 7d1b ldrb r3, [r3, #20] 801d268: 2b02 cmp r3, #2 801d26a: d108 bne.n 801d27e /* "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) { 801d26c: 687b ldr r3, [r7, #4] 801d26e: 6d1a ldr r2, [r3, #80] @ 0x50 801d270: 4b97 ldr r3, [pc, #604] @ (801d4d0 ) 801d272: 681b ldr r3, [r3, #0] 801d274: 429a cmp r2, r3 801d276: d123 bne.n 801d2c0 acceptable = 1; 801d278: 2301 movs r3, #1 801d27a: 77fb strb r3, [r7, #31] 801d27c: e020 b.n 801d2c0 } } else { /* "In all states except SYN-SENT, all reset (RST) segments are validated by checking their SEQ-fields." */ if (seqno == pcb->rcv_nxt) { 801d27e: 687b ldr r3, [r7, #4] 801d280: 6a5a ldr r2, [r3, #36] @ 0x24 801d282: 4b94 ldr r3, [pc, #592] @ (801d4d4 ) 801d284: 681b ldr r3, [r3, #0] 801d286: 429a cmp r2, r3 801d288: d102 bne.n 801d290 acceptable = 1; 801d28a: 2301 movs r3, #1 801d28c: 77fb strb r3, [r7, #31] 801d28e: e017 b.n 801d2c0 } else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 801d290: 4b90 ldr r3, [pc, #576] @ (801d4d4 ) 801d292: 681a ldr r2, [r3, #0] 801d294: 687b ldr r3, [r7, #4] 801d296: 6a5b ldr r3, [r3, #36] @ 0x24 801d298: 1ad3 subs r3, r2, r3 801d29a: 2b00 cmp r3, #0 801d29c: db10 blt.n 801d2c0 801d29e: 4b8d ldr r3, [pc, #564] @ (801d4d4 ) 801d2a0: 681a ldr r2, [r3, #0] 801d2a2: 687b ldr r3, [r7, #4] 801d2a4: 6a5b ldr r3, [r3, #36] @ 0x24 801d2a6: 6879 ldr r1, [r7, #4] 801d2a8: 8d09 ldrh r1, [r1, #40] @ 0x28 801d2aa: 440b add r3, r1 801d2ac: 1ad3 subs r3, r2, r3 801d2ae: 2b00 cmp r3, #0 801d2b0: dc06 bgt.n 801d2c0 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); 801d2b2: 687b ldr r3, [r7, #4] 801d2b4: 8b5b ldrh r3, [r3, #26] 801d2b6: f043 0302 orr.w r3, r3, #2 801d2ba: b29a uxth r2, r3 801d2bc: 687b ldr r3, [r7, #4] 801d2be: 835a strh r2, [r3, #26] } } if (acceptable) { 801d2c0: 7ffb ldrb r3, [r7, #31] 801d2c2: 2b00 cmp r3, #0 801d2c4: d01b beq.n 801d2fe LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n")); LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED); 801d2c6: 687b ldr r3, [r7, #4] 801d2c8: 7d1b ldrb r3, [r3, #20] 801d2ca: 2b00 cmp r3, #0 801d2cc: d106 bne.n 801d2dc 801d2ce: 4b7c ldr r3, [pc, #496] @ (801d4c0 ) 801d2d0: f44f 724e mov.w r2, #824 @ 0x338 801d2d4: 4980 ldr r1, [pc, #512] @ (801d4d8 ) 801d2d6: 487c ldr r0, [pc, #496] @ (801d4c8 ) 801d2d8: f00c fb78 bl 80299cc recv_flags |= TF_RESET; 801d2dc: 4b7f ldr r3, [pc, #508] @ (801d4dc ) 801d2de: 781b ldrb r3, [r3, #0] 801d2e0: f043 0308 orr.w r3, r3, #8 801d2e4: b2da uxtb r2, r3 801d2e6: 4b7d ldr r3, [pc, #500] @ (801d4dc ) 801d2e8: 701a strb r2, [r3, #0] tcp_clear_flags(pcb, TF_ACK_DELAY); 801d2ea: 687b ldr r3, [r7, #4] 801d2ec: 8b5b ldrh r3, [r3, #26] 801d2ee: f023 0301 bic.w r3, r3, #1 801d2f2: b29a uxth r2, r3 801d2f4: 687b ldr r3, [r7, #4] 801d2f6: 835a strh r2, [r3, #26] return ERR_RST; 801d2f8: f06f 030d mvn.w r3, #13 801d2fc: e37a b.n 801d9f4 } 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; 801d2fe: 2300 movs r3, #0 801d300: e378 b.n 801d9f4 } } if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) { 801d302: 4b72 ldr r3, [pc, #456] @ (801d4cc ) 801d304: 781b ldrb r3, [r3, #0] 801d306: f003 0302 and.w r3, r3, #2 801d30a: 2b00 cmp r3, #0 801d30c: d010 beq.n 801d330 801d30e: 687b ldr r3, [r7, #4] 801d310: 7d1b ldrb r3, [r3, #20] 801d312: 2b02 cmp r3, #2 801d314: d00c beq.n 801d330 801d316: 687b ldr r3, [r7, #4] 801d318: 7d1b ldrb r3, [r3, #20] 801d31a: 2b03 cmp r3, #3 801d31c: d008 beq.n 801d330 /* Cope with new connection attempt after remote end crashed */ tcp_ack_now(pcb); 801d31e: 687b ldr r3, [r7, #4] 801d320: 8b5b ldrh r3, [r3, #26] 801d322: f043 0302 orr.w r3, r3, #2 801d326: b29a uxth r2, r3 801d328: 687b ldr r3, [r7, #4] 801d32a: 835a strh r2, [r3, #26] return ERR_OK; 801d32c: 2300 movs r3, #0 801d32e: e361 b.n 801d9f4 } if ((pcb->flags & TF_RXCLOSED) == 0) { 801d330: 687b ldr r3, [r7, #4] 801d332: 8b5b ldrh r3, [r3, #26] 801d334: f003 0310 and.w r3, r3, #16 801d338: 2b00 cmp r3, #0 801d33a: d103 bne.n 801d344 /* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */ pcb->tmr = tcp_ticks; 801d33c: 4b68 ldr r3, [pc, #416] @ (801d4e0 ) 801d33e: 681a ldr r2, [r3, #0] 801d340: 687b ldr r3, [r7, #4] 801d342: 621a str r2, [r3, #32] } pcb->keep_cnt_sent = 0; 801d344: 687b ldr r3, [r7, #4] 801d346: 2200 movs r2, #0 801d348: f883 209b strb.w r2, [r3, #155] @ 0x9b pcb->persist_probe = 0; 801d34c: 687b ldr r3, [r7, #4] 801d34e: 2200 movs r2, #0 801d350: f883 209a strb.w r2, [r3, #154] @ 0x9a tcp_parseopt(pcb); 801d354: 6878 ldr r0, [r7, #4] 801d356: f001 fc2b bl 801ebb0 /* Do different things depending on the TCP state. */ switch (pcb->state) { 801d35a: 687b ldr r3, [r7, #4] 801d35c: 7d1b ldrb r3, [r3, #20] 801d35e: 3b02 subs r3, #2 801d360: 2b07 cmp r3, #7 801d362: f200 8337 bhi.w 801d9d4 801d366: a201 add r2, pc, #4 @ (adr r2, 801d36c ) 801d368: f852 f023 ldr.w pc, [r2, r3, lsl #2] 801d36c: 0801d38d .word 0x0801d38d 801d370: 0801d5bd .word 0x0801d5bd 801d374: 0801d735 .word 0x0801d735 801d378: 0801d75f .word 0x0801d75f 801d37c: 0801d883 .word 0x0801d883 801d380: 0801d735 .word 0x0801d735 801d384: 0801d90f .word 0x0801d90f 801d388: 0801d99f .word 0x0801d99f 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) 801d38c: 4b4f ldr r3, [pc, #316] @ (801d4cc ) 801d38e: 781b ldrb r3, [r3, #0] 801d390: f003 0310 and.w r3, r3, #16 801d394: 2b00 cmp r3, #0 801d396: f000 80e4 beq.w 801d562 801d39a: 4b4c ldr r3, [pc, #304] @ (801d4cc ) 801d39c: 781b ldrb r3, [r3, #0] 801d39e: f003 0302 and.w r3, r3, #2 801d3a2: 2b00 cmp r3, #0 801d3a4: f000 80dd beq.w 801d562 && (ackno == pcb->lastack + 1)) { 801d3a8: 687b ldr r3, [r7, #4] 801d3aa: 6c5b ldr r3, [r3, #68] @ 0x44 801d3ac: 1c5a adds r2, r3, #1 801d3ae: 4b48 ldr r3, [pc, #288] @ (801d4d0 ) 801d3b0: 681b ldr r3, [r3, #0] 801d3b2: 429a cmp r2, r3 801d3b4: f040 80d5 bne.w 801d562 pcb->rcv_nxt = seqno + 1; 801d3b8: 4b46 ldr r3, [pc, #280] @ (801d4d4 ) 801d3ba: 681b ldr r3, [r3, #0] 801d3bc: 1c5a adds r2, r3, #1 801d3be: 687b ldr r3, [r7, #4] 801d3c0: 625a str r2, [r3, #36] @ 0x24 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 801d3c2: 687b ldr r3, [r7, #4] 801d3c4: 6a5a ldr r2, [r3, #36] @ 0x24 801d3c6: 687b ldr r3, [r7, #4] 801d3c8: 62da str r2, [r3, #44] @ 0x2c pcb->lastack = ackno; 801d3ca: 4b41 ldr r3, [pc, #260] @ (801d4d0 ) 801d3cc: 681a ldr r2, [r3, #0] 801d3ce: 687b ldr r3, [r7, #4] 801d3d0: 645a str r2, [r3, #68] @ 0x44 pcb->snd_wnd = tcphdr->wnd; 801d3d2: 4b44 ldr r3, [pc, #272] @ (801d4e4 ) 801d3d4: 681b ldr r3, [r3, #0] 801d3d6: 89db ldrh r3, [r3, #14] 801d3d8: b29a uxth r2, r3 801d3da: 687b ldr r3, [r7, #4] 801d3dc: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 pcb->snd_wnd_max = pcb->snd_wnd; 801d3e0: 687b ldr r3, [r7, #4] 801d3e2: f8b3 2060 ldrh.w r2, [r3, #96] @ 0x60 801d3e6: 687b ldr r3, [r7, #4] 801d3e8: f8a3 2062 strh.w r2, [r3, #98] @ 0x62 pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 801d3ec: 4b39 ldr r3, [pc, #228] @ (801d4d4 ) 801d3ee: 681b ldr r3, [r3, #0] 801d3f0: 1e5a subs r2, r3, #1 801d3f2: 687b ldr r3, [r7, #4] 801d3f4: 655a str r2, [r3, #84] @ 0x54 pcb->state = ESTABLISHED; 801d3f6: 687b ldr r3, [r7, #4] 801d3f8: 2204 movs r2, #4 801d3fa: 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); 801d3fc: 687b ldr r3, [r7, #4] 801d3fe: 8e5c ldrh r4, [r3, #50] @ 0x32 801d400: 687b ldr r3, [r7, #4] 801d402: 3304 adds r3, #4 801d404: 4618 mov r0, r3 801d406: f007 fad3 bl 80249b0 801d40a: 4601 mov r1, r0 801d40c: 687b ldr r3, [r7, #4] 801d40e: 3304 adds r3, #4 801d410: 461a mov r2, r3 801d412: 4620 mov r0, r4 801d414: f7ff f88a bl 801c52c 801d418: 4603 mov r3, r0 801d41a: 461a mov r2, r3 801d41c: 687b ldr r3, [r7, #4] 801d41e: 865a strh r2, [r3, #50] @ 0x32 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); 801d420: 687b ldr r3, [r7, #4] 801d422: 8e5b ldrh r3, [r3, #50] @ 0x32 801d424: 009a lsls r2, r3, #2 801d426: 687b ldr r3, [r7, #4] 801d428: 8e5b ldrh r3, [r3, #50] @ 0x32 801d42a: 005b lsls r3, r3, #1 801d42c: f241 111c movw r1, #4380 @ 0x111c 801d430: 428b cmp r3, r1 801d432: bf38 it cc 801d434: 460b movcc r3, r1 801d436: 429a cmp r2, r3 801d438: d204 bcs.n 801d444 801d43a: 687b ldr r3, [r7, #4] 801d43c: 8e5b ldrh r3, [r3, #50] @ 0x32 801d43e: 009b lsls r3, r3, #2 801d440: b29b uxth r3, r3 801d442: e00d b.n 801d460 801d444: 687b ldr r3, [r7, #4] 801d446: 8e5b ldrh r3, [r3, #50] @ 0x32 801d448: 005b lsls r3, r3, #1 801d44a: f241 121c movw r2, #4380 @ 0x111c 801d44e: 4293 cmp r3, r2 801d450: d904 bls.n 801d45c 801d452: 687b ldr r3, [r7, #4] 801d454: 8e5b ldrh r3, [r3, #50] @ 0x32 801d456: 005b lsls r3, r3, #1 801d458: b29b uxth r3, r3 801d45a: e001 b.n 801d460 801d45c: f241 131c movw r3, #4380 @ 0x111c 801d460: 687a ldr r2, [r7, #4] 801d462: 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)); 801d466: 687b ldr r3, [r7, #4] 801d468: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801d46c: 2b00 cmp r3, #0 801d46e: d106 bne.n 801d47e 801d470: 4b13 ldr r3, [pc, #76] @ (801d4c0 ) 801d472: f44f 725b mov.w r2, #876 @ 0x36c 801d476: 491c ldr r1, [pc, #112] @ (801d4e8 ) 801d478: 4813 ldr r0, [pc, #76] @ (801d4c8 ) 801d47a: f00c faa7 bl 80299cc --pcb->snd_queuelen; 801d47e: 687b ldr r3, [r7, #4] 801d480: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801d484: 3b01 subs r3, #1 801d486: b29a uxth r2, r3 801d488: 687b ldr r3, [r7, #4] 801d48a: 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; 801d48e: 687b ldr r3, [r7, #4] 801d490: 6f1b ldr r3, [r3, #112] @ 0x70 801d492: 617b str r3, [r7, #20] if (rseg == NULL) { 801d494: 697b ldr r3, [r7, #20] 801d496: 2b00 cmp r3, #0 801d498: d12a bne.n 801d4f0 /* might happen if tcp_output fails in tcp_rexmit_rto() in which case the segment is on the unsent list */ rseg = pcb->unsent; 801d49a: 687b ldr r3, [r7, #4] 801d49c: 6edb ldr r3, [r3, #108] @ 0x6c 801d49e: 617b str r3, [r7, #20] LWIP_ASSERT("no segment to free", rseg != NULL); 801d4a0: 697b ldr r3, [r7, #20] 801d4a2: 2b00 cmp r3, #0 801d4a4: d106 bne.n 801d4b4 801d4a6: 4b06 ldr r3, [pc, #24] @ (801d4c0 ) 801d4a8: f44f 725d mov.w r2, #884 @ 0x374 801d4ac: 490f ldr r1, [pc, #60] @ (801d4ec ) 801d4ae: 4806 ldr r0, [pc, #24] @ (801d4c8 ) 801d4b0: f00c fa8c bl 80299cc pcb->unsent = rseg->next; 801d4b4: 697b ldr r3, [r7, #20] 801d4b6: 681a ldr r2, [r3, #0] 801d4b8: 687b ldr r3, [r7, #4] 801d4ba: 66da str r2, [r3, #108] @ 0x6c 801d4bc: e01c b.n 801d4f8 801d4be: bf00 nop 801d4c0: 0802ed10 .word 0x0802ed10 801d4c4: 0802ef48 .word 0x0802ef48 801d4c8: 0802ed5c .word 0x0802ed5c 801d4cc: 2402aed0 .word 0x2402aed0 801d4d0: 2402aec8 .word 0x2402aec8 801d4d4: 2402aec4 .word 0x2402aec4 801d4d8: 0802ef64 .word 0x0802ef64 801d4dc: 2402aed1 .word 0x2402aed1 801d4e0: 2402ae88 .word 0x2402ae88 801d4e4: 2402aeb4 .word 0x2402aeb4 801d4e8: 0802ef84 .word 0x0802ef84 801d4ec: 0802ef9c .word 0x0802ef9c } else { pcb->unacked = rseg->next; 801d4f0: 697b ldr r3, [r7, #20] 801d4f2: 681a ldr r2, [r3, #0] 801d4f4: 687b ldr r3, [r7, #4] 801d4f6: 671a str r2, [r3, #112] @ 0x70 } tcp_seg_free(rseg); 801d4f8: 6978 ldr r0, [r7, #20] 801d4fa: f7fe fc48 bl 801bd8e /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if (pcb->unacked == NULL) { 801d4fe: 687b ldr r3, [r7, #4] 801d500: 6f1b ldr r3, [r3, #112] @ 0x70 801d502: 2b00 cmp r3, #0 801d504: d104 bne.n 801d510 pcb->rtime = -1; 801d506: 687b ldr r3, [r7, #4] 801d508: f64f 72ff movw r2, #65535 @ 0xffff 801d50c: 861a strh r2, [r3, #48] @ 0x30 801d50e: e006 b.n 801d51e } else { pcb->rtime = 0; 801d510: 687b ldr r3, [r7, #4] 801d512: 2200 movs r2, #0 801d514: 861a strh r2, [r3, #48] @ 0x30 pcb->nrtx = 0; 801d516: 687b ldr r3, [r7, #4] 801d518: 2200 movs r2, #0 801d51a: 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); 801d51e: 687b ldr r3, [r7, #4] 801d520: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 801d524: 2b00 cmp r3, #0 801d526: d00a beq.n 801d53e 801d528: 687b ldr r3, [r7, #4] 801d52a: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 801d52e: 687a ldr r2, [r7, #4] 801d530: 6910 ldr r0, [r2, #16] 801d532: 2200 movs r2, #0 801d534: 6879 ldr r1, [r7, #4] 801d536: 4798 blx r3 801d538: 4603 mov r3, r0 801d53a: 77bb strb r3, [r7, #30] 801d53c: e001 b.n 801d542 801d53e: 2300 movs r3, #0 801d540: 77bb strb r3, [r7, #30] if (err == ERR_ABRT) { 801d542: f997 301e ldrsb.w r3, [r7, #30] 801d546: f113 0f0d cmn.w r3, #13 801d54a: d102 bne.n 801d552 return ERR_ABRT; 801d54c: f06f 030c mvn.w r3, #12 801d550: e250 b.n 801d9f4 } tcp_ack_now(pcb); 801d552: 687b ldr r3, [r7, #4] 801d554: 8b5b ldrh r3, [r3, #26] 801d556: f043 0302 orr.w r3, r3, #2 801d55a: b29a uxth r2, r3 801d55c: 687b ldr r3, [r7, #4] 801d55e: 835a strh r2, [r3, #26] if (pcb->nrtx < TCP_SYNMAXRTX) { pcb->rtime = 0; tcp_rexmit_rto(pcb); } } break; 801d560: e23a b.n 801d9d8 else if (flags & TCP_ACK) { 801d562: 4b98 ldr r3, [pc, #608] @ (801d7c4 ) 801d564: 781b ldrb r3, [r3, #0] 801d566: f003 0310 and.w r3, r3, #16 801d56a: 2b00 cmp r3, #0 801d56c: f000 8234 beq.w 801d9d8 tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801d570: 4b95 ldr r3, [pc, #596] @ (801d7c8 ) 801d572: 6819 ldr r1, [r3, #0] 801d574: 4b95 ldr r3, [pc, #596] @ (801d7cc ) 801d576: 881b ldrh r3, [r3, #0] 801d578: 461a mov r2, r3 801d57a: 4b95 ldr r3, [pc, #596] @ (801d7d0 ) 801d57c: 681b ldr r3, [r3, #0] 801d57e: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801d580: 4b94 ldr r3, [pc, #592] @ (801d7d4 ) 801d582: 681b ldr r3, [r3, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801d584: 885b ldrh r3, [r3, #2] 801d586: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801d588: 4a92 ldr r2, [pc, #584] @ (801d7d4 ) 801d58a: 6812 ldr r2, [r2, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801d58c: 8812 ldrh r2, [r2, #0] 801d58e: b292 uxth r2, r2 801d590: 9202 str r2, [sp, #8] 801d592: 9301 str r3, [sp, #4] 801d594: 4b90 ldr r3, [pc, #576] @ (801d7d8 ) 801d596: 9300 str r3, [sp, #0] 801d598: 4b90 ldr r3, [pc, #576] @ (801d7dc ) 801d59a: 4602 mov r2, r0 801d59c: 6878 ldr r0, [r7, #4] 801d59e: f003 f94b bl 8020838 if (pcb->nrtx < TCP_SYNMAXRTX) { 801d5a2: 687b ldr r3, [r7, #4] 801d5a4: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 801d5a8: 2b05 cmp r3, #5 801d5aa: f200 8215 bhi.w 801d9d8 pcb->rtime = 0; 801d5ae: 687b ldr r3, [r7, #4] 801d5b0: 2200 movs r2, #0 801d5b2: 861a strh r2, [r3, #48] @ 0x30 tcp_rexmit_rto(pcb); 801d5b4: 6878 ldr r0, [r7, #4] 801d5b6: f002 ff17 bl 80203e8 break; 801d5ba: e20d b.n 801d9d8 case SYN_RCVD: if (flags & TCP_ACK) { 801d5bc: 4b81 ldr r3, [pc, #516] @ (801d7c4 ) 801d5be: 781b ldrb r3, [r3, #0] 801d5c0: f003 0310 and.w r3, r3, #16 801d5c4: 2b00 cmp r3, #0 801d5c6: f000 80a1 beq.w 801d70c /* expected ACK number? */ if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 801d5ca: 4b7f ldr r3, [pc, #508] @ (801d7c8 ) 801d5cc: 681a ldr r2, [r3, #0] 801d5ce: 687b ldr r3, [r7, #4] 801d5d0: 6c5b ldr r3, [r3, #68] @ 0x44 801d5d2: 1ad3 subs r3, r2, r3 801d5d4: 3b01 subs r3, #1 801d5d6: 2b00 cmp r3, #0 801d5d8: db7e blt.n 801d6d8 801d5da: 4b7b ldr r3, [pc, #492] @ (801d7c8 ) 801d5dc: 681a ldr r2, [r3, #0] 801d5de: 687b ldr r3, [r7, #4] 801d5e0: 6d1b ldr r3, [r3, #80] @ 0x50 801d5e2: 1ad3 subs r3, r2, r3 801d5e4: 2b00 cmp r3, #0 801d5e6: dc77 bgt.n 801d6d8 pcb->state = ESTABLISHED; 801d5e8: 687b ldr r3, [r7, #4] 801d5ea: 2204 movs r2, #4 801d5ec: 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) { 801d5ee: 687b ldr r3, [r7, #4] 801d5f0: 6fdb ldr r3, [r3, #124] @ 0x7c 801d5f2: 2b00 cmp r3, #0 801d5f4: d102 bne.n 801d5fc /* listen pcb might be closed by now */ err = ERR_VAL; 801d5f6: 23fa movs r3, #250 @ 0xfa 801d5f8: 77bb strb r3, [r7, #30] 801d5fa: e01d b.n 801d638 } else #endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */ { #if LWIP_CALLBACK_API LWIP_ASSERT("pcb->listener->accept != NULL", pcb->listener->accept != NULL); 801d5fc: 687b ldr r3, [r7, #4] 801d5fe: 6fdb ldr r3, [r3, #124] @ 0x7c 801d600: 699b ldr r3, [r3, #24] 801d602: 2b00 cmp r3, #0 801d604: d106 bne.n 801d614 801d606: 4b76 ldr r3, [pc, #472] @ (801d7e0 ) 801d608: f44f 726a mov.w r2, #936 @ 0x3a8 801d60c: 4975 ldr r1, [pc, #468] @ (801d7e4 ) 801d60e: 4876 ldr r0, [pc, #472] @ (801d7e8 ) 801d610: f00c f9dc bl 80299cc #endif tcp_backlog_accepted(pcb); /* Call the accept function. */ TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err); 801d614: 687b ldr r3, [r7, #4] 801d616: 6fdb ldr r3, [r3, #124] @ 0x7c 801d618: 699b ldr r3, [r3, #24] 801d61a: 2b00 cmp r3, #0 801d61c: d00a beq.n 801d634 801d61e: 687b ldr r3, [r7, #4] 801d620: 6fdb ldr r3, [r3, #124] @ 0x7c 801d622: 699b ldr r3, [r3, #24] 801d624: 687a ldr r2, [r7, #4] 801d626: 6910 ldr r0, [r2, #16] 801d628: 2200 movs r2, #0 801d62a: 6879 ldr r1, [r7, #4] 801d62c: 4798 blx r3 801d62e: 4603 mov r3, r0 801d630: 77bb strb r3, [r7, #30] 801d632: e001 b.n 801d638 801d634: 23f0 movs r3, #240 @ 0xf0 801d636: 77bb strb r3, [r7, #30] } if (err != ERR_OK) { 801d638: f997 301e ldrsb.w r3, [r7, #30] 801d63c: 2b00 cmp r3, #0 801d63e: d00a beq.n 801d656 /* If the accept function returns with an error, we abort * the connection. */ /* Already aborted? */ if (err != ERR_ABRT) { 801d640: f997 301e ldrsb.w r3, [r7, #30] 801d644: f113 0f0d cmn.w r3, #13 801d648: d002 beq.n 801d650 tcp_abort(pcb); 801d64a: 6878 ldr r0, [r7, #4] 801d64c: f7fd fd4c bl 801b0e8 } return ERR_ABRT; 801d650: f06f 030c mvn.w r3, #12 801d654: e1ce b.n 801d9f4 } /* If there was any data contained within this ACK, * we'd better pass it on to the application as well. */ tcp_receive(pcb); 801d656: 6878 ldr r0, [r7, #4] 801d658: f000 fae0 bl 801dc1c /* Prevent ACK for SYN to generate a sent event */ if (recv_acked != 0) { 801d65c: 4b63 ldr r3, [pc, #396] @ (801d7ec ) 801d65e: 881b ldrh r3, [r3, #0] 801d660: 2b00 cmp r3, #0 801d662: d005 beq.n 801d670 recv_acked--; 801d664: 4b61 ldr r3, [pc, #388] @ (801d7ec ) 801d666: 881b ldrh r3, [r3, #0] 801d668: 3b01 subs r3, #1 801d66a: b29a uxth r2, r3 801d66c: 4b5f ldr r3, [pc, #380] @ (801d7ec ) 801d66e: 801a strh r2, [r3, #0] } pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); 801d670: 687b ldr r3, [r7, #4] 801d672: 8e5b ldrh r3, [r3, #50] @ 0x32 801d674: 009a lsls r2, r3, #2 801d676: 687b ldr r3, [r7, #4] 801d678: 8e5b ldrh r3, [r3, #50] @ 0x32 801d67a: 005b lsls r3, r3, #1 801d67c: f241 111c movw r1, #4380 @ 0x111c 801d680: 428b cmp r3, r1 801d682: bf38 it cc 801d684: 460b movcc r3, r1 801d686: 429a cmp r2, r3 801d688: d204 bcs.n 801d694 801d68a: 687b ldr r3, [r7, #4] 801d68c: 8e5b ldrh r3, [r3, #50] @ 0x32 801d68e: 009b lsls r3, r3, #2 801d690: b29b uxth r3, r3 801d692: e00d b.n 801d6b0 801d694: 687b ldr r3, [r7, #4] 801d696: 8e5b ldrh r3, [r3, #50] @ 0x32 801d698: 005b lsls r3, r3, #1 801d69a: f241 121c movw r2, #4380 @ 0x111c 801d69e: 4293 cmp r3, r2 801d6a0: d904 bls.n 801d6ac 801d6a2: 687b ldr r3, [r7, #4] 801d6a4: 8e5b ldrh r3, [r3, #50] @ 0x32 801d6a6: 005b lsls r3, r3, #1 801d6a8: b29b uxth r3, r3 801d6aa: e001 b.n 801d6b0 801d6ac: f241 131c movw r3, #4380 @ 0x111c 801d6b0: 687a ldr r2, [r7, #4] 801d6b2: 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) { 801d6b6: 4b4e ldr r3, [pc, #312] @ (801d7f0 ) 801d6b8: 781b ldrb r3, [r3, #0] 801d6ba: f003 0320 and.w r3, r3, #32 801d6be: 2b00 cmp r3, #0 801d6c0: d037 beq.n 801d732 tcp_ack_now(pcb); 801d6c2: 687b ldr r3, [r7, #4] 801d6c4: 8b5b ldrh r3, [r3, #26] 801d6c6: f043 0302 orr.w r3, r3, #2 801d6ca: b29a uxth r2, r3 801d6cc: 687b ldr r3, [r7, #4] 801d6ce: 835a strh r2, [r3, #26] pcb->state = CLOSE_WAIT; 801d6d0: 687b ldr r3, [r7, #4] 801d6d2: 2207 movs r2, #7 801d6d4: 751a strb r2, [r3, #20] if (recv_flags & TF_GOT_FIN) { 801d6d6: e02c b.n 801d732 } } else { /* incorrect ACK number, send RST */ tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801d6d8: 4b3b ldr r3, [pc, #236] @ (801d7c8 ) 801d6da: 6819 ldr r1, [r3, #0] 801d6dc: 4b3b ldr r3, [pc, #236] @ (801d7cc ) 801d6de: 881b ldrh r3, [r3, #0] 801d6e0: 461a mov r2, r3 801d6e2: 4b3b ldr r3, [pc, #236] @ (801d7d0 ) 801d6e4: 681b ldr r3, [r3, #0] 801d6e6: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801d6e8: 4b3a ldr r3, [pc, #232] @ (801d7d4 ) 801d6ea: 681b ldr r3, [r3, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801d6ec: 885b ldrh r3, [r3, #2] 801d6ee: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801d6f0: 4a38 ldr r2, [pc, #224] @ (801d7d4 ) 801d6f2: 6812 ldr r2, [r2, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801d6f4: 8812 ldrh r2, [r2, #0] 801d6f6: b292 uxth r2, r2 801d6f8: 9202 str r2, [sp, #8] 801d6fa: 9301 str r3, [sp, #4] 801d6fc: 4b36 ldr r3, [pc, #216] @ (801d7d8 ) 801d6fe: 9300 str r3, [sp, #0] 801d700: 4b36 ldr r3, [pc, #216] @ (801d7dc ) 801d702: 4602 mov r2, r0 801d704: 6878 ldr r0, [r7, #4] 801d706: f003 f897 bl 8020838 } } 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; 801d70a: e167 b.n 801d9dc } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { 801d70c: 4b2d ldr r3, [pc, #180] @ (801d7c4 ) 801d70e: 781b ldrb r3, [r3, #0] 801d710: f003 0302 and.w r3, r3, #2 801d714: 2b00 cmp r3, #0 801d716: f000 8161 beq.w 801d9dc 801d71a: 687b ldr r3, [r7, #4] 801d71c: 6a5b ldr r3, [r3, #36] @ 0x24 801d71e: 1e5a subs r2, r3, #1 801d720: 4b2b ldr r3, [pc, #172] @ (801d7d0 ) 801d722: 681b ldr r3, [r3, #0] 801d724: 429a cmp r2, r3 801d726: f040 8159 bne.w 801d9dc tcp_rexmit(pcb); 801d72a: 6878 ldr r0, [r7, #4] 801d72c: f002 fe7e bl 802042c break; 801d730: e154 b.n 801d9dc 801d732: e153 b.n 801d9dc case CLOSE_WAIT: /* FALLTHROUGH */ case ESTABLISHED: tcp_receive(pcb); 801d734: 6878 ldr r0, [r7, #4] 801d736: f000 fa71 bl 801dc1c if (recv_flags & TF_GOT_FIN) { /* passive close */ 801d73a: 4b2d ldr r3, [pc, #180] @ (801d7f0 ) 801d73c: 781b ldrb r3, [r3, #0] 801d73e: f003 0320 and.w r3, r3, #32 801d742: 2b00 cmp r3, #0 801d744: f000 814c beq.w 801d9e0 tcp_ack_now(pcb); 801d748: 687b ldr r3, [r7, #4] 801d74a: 8b5b ldrh r3, [r3, #26] 801d74c: f043 0302 orr.w r3, r3, #2 801d750: b29a uxth r2, r3 801d752: 687b ldr r3, [r7, #4] 801d754: 835a strh r2, [r3, #26] pcb->state = CLOSE_WAIT; 801d756: 687b ldr r3, [r7, #4] 801d758: 2207 movs r2, #7 801d75a: 751a strb r2, [r3, #20] } break; 801d75c: e140 b.n 801d9e0 case FIN_WAIT_1: tcp_receive(pcb); 801d75e: 6878 ldr r0, [r7, #4] 801d760: f000 fa5c bl 801dc1c if (recv_flags & TF_GOT_FIN) { 801d764: 4b22 ldr r3, [pc, #136] @ (801d7f0 ) 801d766: 781b ldrb r3, [r3, #0] 801d768: f003 0320 and.w r3, r3, #32 801d76c: 2b00 cmp r3, #0 801d76e: d071 beq.n 801d854 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 801d770: 4b14 ldr r3, [pc, #80] @ (801d7c4 ) 801d772: 781b ldrb r3, [r3, #0] 801d774: f003 0310 and.w r3, r3, #16 801d778: 2b00 cmp r3, #0 801d77a: d060 beq.n 801d83e 801d77c: 687b ldr r3, [r7, #4] 801d77e: 6d1a ldr r2, [r3, #80] @ 0x50 801d780: 4b11 ldr r3, [pc, #68] @ (801d7c8 ) 801d782: 681b ldr r3, [r3, #0] 801d784: 429a cmp r2, r3 801d786: d15a bne.n 801d83e pcb->unsent == NULL) { 801d788: 687b ldr r3, [r7, #4] 801d78a: 6edb ldr r3, [r3, #108] @ 0x6c if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 801d78c: 2b00 cmp r3, #0 801d78e: d156 bne.n 801d83e 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); 801d790: 687b ldr r3, [r7, #4] 801d792: 8b5b ldrh r3, [r3, #26] 801d794: f043 0302 orr.w r3, r3, #2 801d798: b29a uxth r2, r3 801d79a: 687b ldr r3, [r7, #4] 801d79c: 835a strh r2, [r3, #26] tcp_pcb_purge(pcb); 801d79e: 6878 ldr r0, [r7, #4] 801d7a0: f7fe fdba bl 801c318 TCP_RMV_ACTIVE(pcb); 801d7a4: 4b13 ldr r3, [pc, #76] @ (801d7f4 ) 801d7a6: 681b ldr r3, [r3, #0] 801d7a8: 687a ldr r2, [r7, #4] 801d7aa: 429a cmp r2, r3 801d7ac: d105 bne.n 801d7ba 801d7ae: 4b11 ldr r3, [pc, #68] @ (801d7f4 ) 801d7b0: 681b ldr r3, [r3, #0] 801d7b2: 68db ldr r3, [r3, #12] 801d7b4: 4a0f ldr r2, [pc, #60] @ (801d7f4 ) 801d7b6: 6013 str r3, [r2, #0] 801d7b8: e02e b.n 801d818 801d7ba: 4b0e ldr r3, [pc, #56] @ (801d7f4 ) 801d7bc: 681b ldr r3, [r3, #0] 801d7be: 613b str r3, [r7, #16] 801d7c0: e027 b.n 801d812 801d7c2: bf00 nop 801d7c4: 2402aed0 .word 0x2402aed0 801d7c8: 2402aec8 .word 0x2402aec8 801d7cc: 2402aece .word 0x2402aece 801d7d0: 2402aec4 .word 0x2402aec4 801d7d4: 2402aeb4 .word 0x2402aeb4 801d7d8: 24024348 .word 0x24024348 801d7dc: 2402434c .word 0x2402434c 801d7e0: 0802ed10 .word 0x0802ed10 801d7e4: 0802efb0 .word 0x0802efb0 801d7e8: 0802ed5c .word 0x0802ed5c 801d7ec: 2402aecc .word 0x2402aecc 801d7f0: 2402aed1 .word 0x2402aed1 801d7f4: 2402ae94 .word 0x2402ae94 801d7f8: 693b ldr r3, [r7, #16] 801d7fa: 68db ldr r3, [r3, #12] 801d7fc: 687a ldr r2, [r7, #4] 801d7fe: 429a cmp r2, r3 801d800: d104 bne.n 801d80c 801d802: 687b ldr r3, [r7, #4] 801d804: 68da ldr r2, [r3, #12] 801d806: 693b ldr r3, [r7, #16] 801d808: 60da str r2, [r3, #12] 801d80a: e005 b.n 801d818 801d80c: 693b ldr r3, [r7, #16] 801d80e: 68db ldr r3, [r3, #12] 801d810: 613b str r3, [r7, #16] 801d812: 693b ldr r3, [r7, #16] 801d814: 2b00 cmp r3, #0 801d816: d1ef bne.n 801d7f8 801d818: 687b ldr r3, [r7, #4] 801d81a: 2200 movs r2, #0 801d81c: 60da str r2, [r3, #12] 801d81e: 4b77 ldr r3, [pc, #476] @ (801d9fc ) 801d820: 2201 movs r2, #1 801d822: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 801d824: 687b ldr r3, [r7, #4] 801d826: 220a movs r2, #10 801d828: 751a strb r2, [r3, #20] TCP_REG(&tcp_tw_pcbs, pcb); 801d82a: 4b75 ldr r3, [pc, #468] @ (801da00 ) 801d82c: 681a ldr r2, [r3, #0] 801d82e: 687b ldr r3, [r7, #4] 801d830: 60da str r2, [r3, #12] 801d832: 4a73 ldr r2, [pc, #460] @ (801da00 ) 801d834: 687b ldr r3, [r7, #4] 801d836: 6013 str r3, [r2, #0] 801d838: f003 f9c0 bl 8020bbc } } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && pcb->unsent == NULL) { pcb->state = FIN_WAIT_2; } break; 801d83c: e0d2 b.n 801d9e4 tcp_ack_now(pcb); 801d83e: 687b ldr r3, [r7, #4] 801d840: 8b5b ldrh r3, [r3, #26] 801d842: f043 0302 orr.w r3, r3, #2 801d846: b29a uxth r2, r3 801d848: 687b ldr r3, [r7, #4] 801d84a: 835a strh r2, [r3, #26] pcb->state = CLOSING; 801d84c: 687b ldr r3, [r7, #4] 801d84e: 2208 movs r2, #8 801d850: 751a strb r2, [r3, #20] break; 801d852: e0c7 b.n 801d9e4 } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 801d854: 4b6b ldr r3, [pc, #428] @ (801da04 ) 801d856: 781b ldrb r3, [r3, #0] 801d858: f003 0310 and.w r3, r3, #16 801d85c: 2b00 cmp r3, #0 801d85e: f000 80c1 beq.w 801d9e4 801d862: 687b ldr r3, [r7, #4] 801d864: 6d1a ldr r2, [r3, #80] @ 0x50 801d866: 4b68 ldr r3, [pc, #416] @ (801da08 ) 801d868: 681b ldr r3, [r3, #0] 801d86a: 429a cmp r2, r3 801d86c: f040 80ba bne.w 801d9e4 pcb->unsent == NULL) { 801d870: 687b ldr r3, [r7, #4] 801d872: 6edb ldr r3, [r3, #108] @ 0x6c } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 801d874: 2b00 cmp r3, #0 801d876: f040 80b5 bne.w 801d9e4 pcb->state = FIN_WAIT_2; 801d87a: 687b ldr r3, [r7, #4] 801d87c: 2206 movs r2, #6 801d87e: 751a strb r2, [r3, #20] break; 801d880: e0b0 b.n 801d9e4 case FIN_WAIT_2: tcp_receive(pcb); 801d882: 6878 ldr r0, [r7, #4] 801d884: f000 f9ca bl 801dc1c if (recv_flags & TF_GOT_FIN) { 801d888: 4b60 ldr r3, [pc, #384] @ (801da0c ) 801d88a: 781b ldrb r3, [r3, #0] 801d88c: f003 0320 and.w r3, r3, #32 801d890: 2b00 cmp r3, #0 801d892: f000 80a9 beq.w 801d9e8 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); 801d896: 687b ldr r3, [r7, #4] 801d898: 8b5b ldrh r3, [r3, #26] 801d89a: f043 0302 orr.w r3, r3, #2 801d89e: b29a uxth r2, r3 801d8a0: 687b ldr r3, [r7, #4] 801d8a2: 835a strh r2, [r3, #26] tcp_pcb_purge(pcb); 801d8a4: 6878 ldr r0, [r7, #4] 801d8a6: f7fe fd37 bl 801c318 TCP_RMV_ACTIVE(pcb); 801d8aa: 4b59 ldr r3, [pc, #356] @ (801da10 ) 801d8ac: 681b ldr r3, [r3, #0] 801d8ae: 687a ldr r2, [r7, #4] 801d8b0: 429a cmp r2, r3 801d8b2: d105 bne.n 801d8c0 801d8b4: 4b56 ldr r3, [pc, #344] @ (801da10 ) 801d8b6: 681b ldr r3, [r3, #0] 801d8b8: 68db ldr r3, [r3, #12] 801d8ba: 4a55 ldr r2, [pc, #340] @ (801da10 ) 801d8bc: 6013 str r3, [r2, #0] 801d8be: e013 b.n 801d8e8 801d8c0: 4b53 ldr r3, [pc, #332] @ (801da10 ) 801d8c2: 681b ldr r3, [r3, #0] 801d8c4: 60fb str r3, [r7, #12] 801d8c6: e00c b.n 801d8e2 801d8c8: 68fb ldr r3, [r7, #12] 801d8ca: 68db ldr r3, [r3, #12] 801d8cc: 687a ldr r2, [r7, #4] 801d8ce: 429a cmp r2, r3 801d8d0: d104 bne.n 801d8dc 801d8d2: 687b ldr r3, [r7, #4] 801d8d4: 68da ldr r2, [r3, #12] 801d8d6: 68fb ldr r3, [r7, #12] 801d8d8: 60da str r2, [r3, #12] 801d8da: e005 b.n 801d8e8 801d8dc: 68fb ldr r3, [r7, #12] 801d8de: 68db ldr r3, [r3, #12] 801d8e0: 60fb str r3, [r7, #12] 801d8e2: 68fb ldr r3, [r7, #12] 801d8e4: 2b00 cmp r3, #0 801d8e6: d1ef bne.n 801d8c8 801d8e8: 687b ldr r3, [r7, #4] 801d8ea: 2200 movs r2, #0 801d8ec: 60da str r2, [r3, #12] 801d8ee: 4b43 ldr r3, [pc, #268] @ (801d9fc ) 801d8f0: 2201 movs r2, #1 801d8f2: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 801d8f4: 687b ldr r3, [r7, #4] 801d8f6: 220a movs r2, #10 801d8f8: 751a strb r2, [r3, #20] TCP_REG(&tcp_tw_pcbs, pcb); 801d8fa: 4b41 ldr r3, [pc, #260] @ (801da00 ) 801d8fc: 681a ldr r2, [r3, #0] 801d8fe: 687b ldr r3, [r7, #4] 801d900: 60da str r2, [r3, #12] 801d902: 4a3f ldr r2, [pc, #252] @ (801da00 ) 801d904: 687b ldr r3, [r7, #4] 801d906: 6013 str r3, [r2, #0] 801d908: f003 f958 bl 8020bbc } break; 801d90c: e06c b.n 801d9e8 case CLOSING: tcp_receive(pcb); 801d90e: 6878 ldr r0, [r7, #4] 801d910: f000 f984 bl 801dc1c if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { 801d914: 4b3b ldr r3, [pc, #236] @ (801da04 ) 801d916: 781b ldrb r3, [r3, #0] 801d918: f003 0310 and.w r3, r3, #16 801d91c: 2b00 cmp r3, #0 801d91e: d065 beq.n 801d9ec 801d920: 687b ldr r3, [r7, #4] 801d922: 6d1a ldr r2, [r3, #80] @ 0x50 801d924: 4b38 ldr r3, [pc, #224] @ (801da08 ) 801d926: 681b ldr r3, [r3, #0] 801d928: 429a cmp r2, r3 801d92a: d15f bne.n 801d9ec 801d92c: 687b ldr r3, [r7, #4] 801d92e: 6edb ldr r3, [r3, #108] @ 0x6c 801d930: 2b00 cmp r3, #0 801d932: d15b bne.n 801d9ec LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); tcp_pcb_purge(pcb); 801d934: 6878 ldr r0, [r7, #4] 801d936: f7fe fcef bl 801c318 TCP_RMV_ACTIVE(pcb); 801d93a: 4b35 ldr r3, [pc, #212] @ (801da10 ) 801d93c: 681b ldr r3, [r3, #0] 801d93e: 687a ldr r2, [r7, #4] 801d940: 429a cmp r2, r3 801d942: d105 bne.n 801d950 801d944: 4b32 ldr r3, [pc, #200] @ (801da10 ) 801d946: 681b ldr r3, [r3, #0] 801d948: 68db ldr r3, [r3, #12] 801d94a: 4a31 ldr r2, [pc, #196] @ (801da10 ) 801d94c: 6013 str r3, [r2, #0] 801d94e: e013 b.n 801d978 801d950: 4b2f ldr r3, [pc, #188] @ (801da10 ) 801d952: 681b ldr r3, [r3, #0] 801d954: 61bb str r3, [r7, #24] 801d956: e00c b.n 801d972 801d958: 69bb ldr r3, [r7, #24] 801d95a: 68db ldr r3, [r3, #12] 801d95c: 687a ldr r2, [r7, #4] 801d95e: 429a cmp r2, r3 801d960: d104 bne.n 801d96c 801d962: 687b ldr r3, [r7, #4] 801d964: 68da ldr r2, [r3, #12] 801d966: 69bb ldr r3, [r7, #24] 801d968: 60da str r2, [r3, #12] 801d96a: e005 b.n 801d978 801d96c: 69bb ldr r3, [r7, #24] 801d96e: 68db ldr r3, [r3, #12] 801d970: 61bb str r3, [r7, #24] 801d972: 69bb ldr r3, [r7, #24] 801d974: 2b00 cmp r3, #0 801d976: d1ef bne.n 801d958 801d978: 687b ldr r3, [r7, #4] 801d97a: 2200 movs r2, #0 801d97c: 60da str r2, [r3, #12] 801d97e: 4b1f ldr r3, [pc, #124] @ (801d9fc ) 801d980: 2201 movs r2, #1 801d982: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 801d984: 687b ldr r3, [r7, #4] 801d986: 220a movs r2, #10 801d988: 751a strb r2, [r3, #20] TCP_REG(&tcp_tw_pcbs, pcb); 801d98a: 4b1d ldr r3, [pc, #116] @ (801da00 ) 801d98c: 681a ldr r2, [r3, #0] 801d98e: 687b ldr r3, [r7, #4] 801d990: 60da str r2, [r3, #12] 801d992: 4a1b ldr r2, [pc, #108] @ (801da00 ) 801d994: 687b ldr r3, [r7, #4] 801d996: 6013 str r3, [r2, #0] 801d998: f003 f910 bl 8020bbc } break; 801d99c: e026 b.n 801d9ec case LAST_ACK: tcp_receive(pcb); 801d99e: 6878 ldr r0, [r7, #4] 801d9a0: f000 f93c bl 801dc1c if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { 801d9a4: 4b17 ldr r3, [pc, #92] @ (801da04 ) 801d9a6: 781b ldrb r3, [r3, #0] 801d9a8: f003 0310 and.w r3, r3, #16 801d9ac: 2b00 cmp r3, #0 801d9ae: d01f beq.n 801d9f0 801d9b0: 687b ldr r3, [r7, #4] 801d9b2: 6d1a ldr r2, [r3, #80] @ 0x50 801d9b4: 4b14 ldr r3, [pc, #80] @ (801da08 ) 801d9b6: 681b ldr r3, [r3, #0] 801d9b8: 429a cmp r2, r3 801d9ba: d119 bne.n 801d9f0 801d9bc: 687b ldr r3, [r7, #4] 801d9be: 6edb ldr r3, [r3, #108] @ 0x6c 801d9c0: 2b00 cmp r3, #0 801d9c2: d115 bne.n 801d9f0 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; 801d9c4: 4b11 ldr r3, [pc, #68] @ (801da0c ) 801d9c6: 781b ldrb r3, [r3, #0] 801d9c8: f043 0310 orr.w r3, r3, #16 801d9cc: b2da uxtb r2, r3 801d9ce: 4b0f ldr r3, [pc, #60] @ (801da0c ) 801d9d0: 701a strb r2, [r3, #0] } break; 801d9d2: e00d b.n 801d9f0 default: break; 801d9d4: bf00 nop 801d9d6: e00c b.n 801d9f2 break; 801d9d8: bf00 nop 801d9da: e00a b.n 801d9f2 break; 801d9dc: bf00 nop 801d9de: e008 b.n 801d9f2 break; 801d9e0: bf00 nop 801d9e2: e006 b.n 801d9f2 break; 801d9e4: bf00 nop 801d9e6: e004 b.n 801d9f2 break; 801d9e8: bf00 nop 801d9ea: e002 b.n 801d9f2 break; 801d9ec: bf00 nop 801d9ee: e000 b.n 801d9f2 break; 801d9f0: bf00 nop } return ERR_OK; 801d9f2: 2300 movs r3, #0 } 801d9f4: 4618 mov r0, r3 801d9f6: 3724 adds r7, #36 @ 0x24 801d9f8: 46bd mov sp, r7 801d9fa: bd90 pop {r4, r7, pc} 801d9fc: 2402ae9c .word 0x2402ae9c 801da00: 2402ae98 .word 0x2402ae98 801da04: 2402aed0 .word 0x2402aed0 801da08: 2402aec8 .word 0x2402aec8 801da0c: 2402aed1 .word 0x2402aed1 801da10: 2402ae94 .word 0x2402ae94 0801da14 : * * Called from tcp_receive() */ static void tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next) { 801da14: b590 push {r4, r7, lr} 801da16: b085 sub sp, #20 801da18: af00 add r7, sp, #0 801da1a: 6078 str r0, [r7, #4] 801da1c: 6039 str r1, [r7, #0] struct tcp_seg *old_seg; LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL); 801da1e: 687b ldr r3, [r7, #4] 801da20: 2b00 cmp r3, #0 801da22: d106 bne.n 801da32 801da24: 4b3b ldr r3, [pc, #236] @ (801db14 ) 801da26: f240 421f movw r2, #1055 @ 0x41f 801da2a: 493b ldr r1, [pc, #236] @ (801db18 ) 801da2c: 483b ldr r0, [pc, #236] @ (801db1c ) 801da2e: f00b ffcd bl 80299cc if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { 801da32: 687b ldr r3, [r7, #4] 801da34: 691b ldr r3, [r3, #16] 801da36: 899b ldrh r3, [r3, #12] 801da38: b29b uxth r3, r3 801da3a: 4618 mov r0, r3 801da3c: f7fb f86c bl 8018b18 801da40: 4603 mov r3, r0 801da42: b2db uxtb r3, r3 801da44: f003 0301 and.w r3, r3, #1 801da48: 2b00 cmp r3, #0 801da4a: d028 beq.n 801da9e /* received segment overlaps all following segments */ tcp_segs_free(next); 801da4c: 6838 ldr r0, [r7, #0] 801da4e: f7fe f989 bl 801bd64 next = NULL; 801da52: 2300 movs r3, #0 801da54: 603b str r3, [r7, #0] 801da56: e056 b.n 801db06 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) { 801da58: 683b ldr r3, [r7, #0] 801da5a: 691b ldr r3, [r3, #16] 801da5c: 899b ldrh r3, [r3, #12] 801da5e: b29b uxth r3, r3 801da60: 4618 mov r0, r3 801da62: f7fb f859 bl 8018b18 801da66: 4603 mov r3, r0 801da68: b2db uxtb r3, r3 801da6a: f003 0301 and.w r3, r3, #1 801da6e: 2b00 cmp r3, #0 801da70: d00d beq.n 801da8e TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN); 801da72: 687b ldr r3, [r7, #4] 801da74: 691b ldr r3, [r3, #16] 801da76: 899b ldrh r3, [r3, #12] 801da78: b29c uxth r4, r3 801da7a: 2001 movs r0, #1 801da7c: f7fb f84c bl 8018b18 801da80: 4603 mov r3, r0 801da82: 461a mov r2, r3 801da84: 687b ldr r3, [r7, #4] 801da86: 691b ldr r3, [r3, #16] 801da88: 4322 orrs r2, r4 801da8a: b292 uxth r2, r2 801da8c: 819a strh r2, [r3, #12] } old_seg = next; 801da8e: 683b ldr r3, [r7, #0] 801da90: 60fb str r3, [r7, #12] next = next->next; 801da92: 683b ldr r3, [r7, #0] 801da94: 681b ldr r3, [r3, #0] 801da96: 603b str r3, [r7, #0] tcp_seg_free(old_seg); 801da98: 68f8 ldr r0, [r7, #12] 801da9a: f7fe f978 bl 801bd8e while (next && 801da9e: 683b ldr r3, [r7, #0] 801daa0: 2b00 cmp r3, #0 801daa2: d00e beq.n 801dac2 TCP_SEQ_GEQ((seqno + cseg->len), 801daa4: 687b ldr r3, [r7, #4] 801daa6: 891b ldrh r3, [r3, #8] 801daa8: 461a mov r2, r3 801daaa: 4b1d ldr r3, [pc, #116] @ (801db20 ) 801daac: 681b ldr r3, [r3, #0] 801daae: 441a add r2, r3 801dab0: 683b ldr r3, [r7, #0] 801dab2: 691b ldr r3, [r3, #16] 801dab4: 685b ldr r3, [r3, #4] 801dab6: 6839 ldr r1, [r7, #0] 801dab8: 8909 ldrh r1, [r1, #8] 801daba: 440b add r3, r1 801dabc: 1ad3 subs r3, r2, r3 while (next && 801dabe: 2b00 cmp r3, #0 801dac0: daca bge.n 801da58 } if (next && 801dac2: 683b ldr r3, [r7, #0] 801dac4: 2b00 cmp r3, #0 801dac6: d01e beq.n 801db06 TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) { 801dac8: 687b ldr r3, [r7, #4] 801daca: 891b ldrh r3, [r3, #8] 801dacc: 461a mov r2, r3 801dace: 4b14 ldr r3, [pc, #80] @ (801db20 ) 801dad0: 681b ldr r3, [r3, #0] 801dad2: 441a add r2, r3 801dad4: 683b ldr r3, [r7, #0] 801dad6: 691b ldr r3, [r3, #16] 801dad8: 685b ldr r3, [r3, #4] 801dada: 1ad3 subs r3, r2, r3 if (next && 801dadc: 2b00 cmp r3, #0 801dade: dd12 ble.n 801db06 /* We need to trim the incoming segment. */ cseg->len = (u16_t)(next->tcphdr->seqno - seqno); 801dae0: 683b ldr r3, [r7, #0] 801dae2: 691b ldr r3, [r3, #16] 801dae4: 685b ldr r3, [r3, #4] 801dae6: b29a uxth r2, r3 801dae8: 4b0d ldr r3, [pc, #52] @ (801db20 ) 801daea: 681b ldr r3, [r3, #0] 801daec: b29b uxth r3, r3 801daee: 1ad3 subs r3, r2, r3 801daf0: b29a uxth r2, r3 801daf2: 687b ldr r3, [r7, #4] 801daf4: 811a strh r2, [r3, #8] pbuf_realloc(cseg->p, cseg->len); 801daf6: 687b ldr r3, [r7, #4] 801daf8: 685a ldr r2, [r3, #4] 801dafa: 687b ldr r3, [r7, #4] 801dafc: 891b ldrh r3, [r3, #8] 801dafe: 4619 mov r1, r3 801db00: 4610 mov r0, r2 801db02: f7fc fb35 bl 801a170 } } cseg->next = next; 801db06: 687b ldr r3, [r7, #4] 801db08: 683a ldr r2, [r7, #0] 801db0a: 601a str r2, [r3, #0] } 801db0c: bf00 nop 801db0e: 3714 adds r7, #20 801db10: 46bd mov sp, r7 801db12: bd90 pop {r4, r7, pc} 801db14: 0802ed10 .word 0x0802ed10 801db18: 0802efd0 .word 0x0802efd0 801db1c: 0802ed5c .word 0x0802ed5c 801db20: 2402aec4 .word 0x2402aec4 0801db24 : /** 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) { 801db24: b5b0 push {r4, r5, r7, lr} 801db26: b086 sub sp, #24 801db28: af00 add r7, sp, #0 801db2a: 60f8 str r0, [r7, #12] 801db2c: 60b9 str r1, [r7, #8] 801db2e: 607a str r2, [r7, #4] 801db30: 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 && 801db32: e03e b.n 801dbb2 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; 801db34: 68bb ldr r3, [r7, #8] 801db36: 617b str r3, [r7, #20] seg_list = seg_list->next; 801db38: 68bb ldr r3, [r7, #8] 801db3a: 681b ldr r3, [r3, #0] 801db3c: 60bb str r3, [r7, #8] clen = pbuf_clen(next->p); 801db3e: 697b ldr r3, [r7, #20] 801db40: 685b ldr r3, [r3, #4] 801db42: 4618 mov r0, r3 801db44: f7fc fd58 bl 801a5f8 801db48: 4603 mov r3, r0 801db4a: 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)); 801db4c: 68fb ldr r3, [r7, #12] 801db4e: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801db52: 8a7a ldrh r2, [r7, #18] 801db54: 429a cmp r2, r3 801db56: d906 bls.n 801db66 801db58: 4b2a ldr r3, [pc, #168] @ (801dc04 ) 801db5a: f240 4257 movw r2, #1111 @ 0x457 801db5e: 492a ldr r1, [pc, #168] @ (801dc08 ) 801db60: 482a ldr r0, [pc, #168] @ (801dc0c ) 801db62: f00b ff33 bl 80299cc pcb->snd_queuelen = (u16_t)(pcb->snd_queuelen - clen); 801db66: 68fb ldr r3, [r7, #12] 801db68: f8b3 2066 ldrh.w r2, [r3, #102] @ 0x66 801db6c: 8a7b ldrh r3, [r7, #18] 801db6e: 1ad3 subs r3, r2, r3 801db70: b29a uxth r2, r3 801db72: 68fb ldr r3, [r7, #12] 801db74: f8a3 2066 strh.w r2, [r3, #102] @ 0x66 recv_acked = (tcpwnd_size_t)(recv_acked + next->len); 801db78: 697b ldr r3, [r7, #20] 801db7a: 891a ldrh r2, [r3, #8] 801db7c: 4b24 ldr r3, [pc, #144] @ (801dc10 ) 801db7e: 881b ldrh r3, [r3, #0] 801db80: 4413 add r3, r2 801db82: b29a uxth r2, r3 801db84: 4b22 ldr r3, [pc, #136] @ (801dc10 ) 801db86: 801a strh r2, [r3, #0] tcp_seg_free(next); 801db88: 6978 ldr r0, [r7, #20] 801db8a: f7fe f900 bl 801bd8e 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) { 801db8e: 68fb ldr r3, [r7, #12] 801db90: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801db94: 2b00 cmp r3, #0 801db96: d00c beq.n 801dbb2 LWIP_ASSERT("tcp_receive: valid queue length", 801db98: 68bb ldr r3, [r7, #8] 801db9a: 2b00 cmp r3, #0 801db9c: d109 bne.n 801dbb2 801db9e: 683b ldr r3, [r7, #0] 801dba0: 2b00 cmp r3, #0 801dba2: d106 bne.n 801dbb2 801dba4: 4b17 ldr r3, [pc, #92] @ (801dc04 ) 801dba6: f240 4261 movw r2, #1121 @ 0x461 801dbaa: 491a ldr r1, [pc, #104] @ (801dc14 ) 801dbac: 4817 ldr r0, [pc, #92] @ (801dc0c ) 801dbae: f00b ff0d bl 80299cc while (seg_list != NULL && 801dbb2: 68bb ldr r3, [r7, #8] 801dbb4: 2b00 cmp r3, #0 801dbb6: d020 beq.n 801dbfa TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) + 801dbb8: 68bb ldr r3, [r7, #8] 801dbba: 691b ldr r3, [r3, #16] 801dbbc: 685b ldr r3, [r3, #4] 801dbbe: 4618 mov r0, r3 801dbc0: f7fa ffbf bl 8018b42 801dbc4: 4604 mov r4, r0 801dbc6: 68bb ldr r3, [r7, #8] 801dbc8: 891b ldrh r3, [r3, #8] 801dbca: 461d mov r5, r3 801dbcc: 68bb ldr r3, [r7, #8] 801dbce: 691b ldr r3, [r3, #16] 801dbd0: 899b ldrh r3, [r3, #12] 801dbd2: b29b uxth r3, r3 801dbd4: 4618 mov r0, r3 801dbd6: f7fa ff9f bl 8018b18 801dbda: 4603 mov r3, r0 801dbdc: b2db uxtb r3, r3 801dbde: f003 0303 and.w r3, r3, #3 801dbe2: 2b00 cmp r3, #0 801dbe4: d001 beq.n 801dbea 801dbe6: 2301 movs r3, #1 801dbe8: e000 b.n 801dbec 801dbea: 2300 movs r3, #0 801dbec: 442b add r3, r5 801dbee: 18e2 adds r2, r4, r3 801dbf0: 4b09 ldr r3, [pc, #36] @ (801dc18 ) 801dbf2: 681b ldr r3, [r3, #0] 801dbf4: 1ad3 subs r3, r2, r3 while (seg_list != NULL && 801dbf6: 2b00 cmp r3, #0 801dbf8: dd9c ble.n 801db34 seg_list != NULL || dbg_other_seg_list != NULL); } } return seg_list; 801dbfa: 68bb ldr r3, [r7, #8] } 801dbfc: 4618 mov r0, r3 801dbfe: 3718 adds r7, #24 801dc00: 46bd mov sp, r7 801dc02: bdb0 pop {r4, r5, r7, pc} 801dc04: 0802ed10 .word 0x0802ed10 801dc08: 0802eff8 .word 0x0802eff8 801dc0c: 0802ed5c .word 0x0802ed5c 801dc10: 2402aecc .word 0x2402aecc 801dc14: 0802f020 .word 0x0802f020 801dc18: 2402aec8 .word 0x2402aec8 0801dc1c : * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 801dc1c: b5b0 push {r4, r5, r7, lr} 801dc1e: b094 sub sp, #80 @ 0x50 801dc20: af00 add r7, sp, #0 801dc22: 6078 str r0, [r7, #4] s16_t m; u32_t right_wnd_edge; int found_dupack = 0; 801dc24: 2300 movs r3, #0 801dc26: 64bb str r3, [r7, #72] @ 0x48 LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL); 801dc28: 687b ldr r3, [r7, #4] 801dc2a: 2b00 cmp r3, #0 801dc2c: d106 bne.n 801dc3c 801dc2e: 4b91 ldr r3, [pc, #580] @ (801de74 ) 801dc30: f240 427b movw r2, #1147 @ 0x47b 801dc34: 4990 ldr r1, [pc, #576] @ (801de78 ) 801dc36: 4891 ldr r0, [pc, #580] @ (801de7c ) 801dc38: f00b fec8 bl 80299cc LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); 801dc3c: 687b ldr r3, [r7, #4] 801dc3e: 7d1b ldrb r3, [r3, #20] 801dc40: 2b03 cmp r3, #3 801dc42: d806 bhi.n 801dc52 801dc44: 4b8b ldr r3, [pc, #556] @ (801de74 ) 801dc46: f240 427c movw r2, #1148 @ 0x47c 801dc4a: 498d ldr r1, [pc, #564] @ (801de80 ) 801dc4c: 488b ldr r0, [pc, #556] @ (801de7c ) 801dc4e: f00b febd bl 80299cc if (flags & TCP_ACK) { 801dc52: 4b8c ldr r3, [pc, #560] @ (801de84 ) 801dc54: 781b ldrb r3, [r3, #0] 801dc56: f003 0310 and.w r3, r3, #16 801dc5a: 2b00 cmp r3, #0 801dc5c: f000 8264 beq.w 801e128 right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; 801dc60: 687b ldr r3, [r7, #4] 801dc62: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801dc66: 461a mov r2, r3 801dc68: 687b ldr r3, [r7, #4] 801dc6a: 6d9b ldr r3, [r3, #88] @ 0x58 801dc6c: 4413 add r3, r2 801dc6e: 633b str r3, [r7, #48] @ 0x30 /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 801dc70: 687b ldr r3, [r7, #4] 801dc72: 6d5a ldr r2, [r3, #84] @ 0x54 801dc74: 4b84 ldr r3, [pc, #528] @ (801de88 ) 801dc76: 681b ldr r3, [r3, #0] 801dc78: 1ad3 subs r3, r2, r3 801dc7a: 2b00 cmp r3, #0 801dc7c: db1b blt.n 801dcb6 (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 801dc7e: 687b ldr r3, [r7, #4] 801dc80: 6d5a ldr r2, [r3, #84] @ 0x54 801dc82: 4b81 ldr r3, [pc, #516] @ (801de88 ) 801dc84: 681b ldr r3, [r3, #0] if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 801dc86: 429a cmp r2, r3 801dc88: d106 bne.n 801dc98 (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 801dc8a: 687b ldr r3, [r7, #4] 801dc8c: 6d9a ldr r2, [r3, #88] @ 0x58 801dc8e: 4b7f ldr r3, [pc, #508] @ (801de8c ) 801dc90: 681b ldr r3, [r3, #0] 801dc92: 1ad3 subs r3, r2, r3 801dc94: 2b00 cmp r3, #0 801dc96: db0e blt.n 801dcb6 (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { 801dc98: 687b ldr r3, [r7, #4] 801dc9a: 6d9a ldr r2, [r3, #88] @ 0x58 801dc9c: 4b7b ldr r3, [pc, #492] @ (801de8c ) 801dc9e: 681b ldr r3, [r3, #0] (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 801dca0: 429a cmp r2, r3 801dca2: d125 bne.n 801dcf0 (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { 801dca4: 4b7a ldr r3, [pc, #488] @ (801de90 ) 801dca6: 681b ldr r3, [r3, #0] 801dca8: 89db ldrh r3, [r3, #14] 801dcaa: b29a uxth r2, r3 801dcac: 687b ldr r3, [r7, #4] 801dcae: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801dcb2: 429a cmp r2, r3 801dcb4: d91c bls.n 801dcf0 pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd); 801dcb6: 4b76 ldr r3, [pc, #472] @ (801de90 ) 801dcb8: 681b ldr r3, [r3, #0] 801dcba: 89db ldrh r3, [r3, #14] 801dcbc: b29a uxth r2, r3 801dcbe: 687b ldr r3, [r7, #4] 801dcc0: 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) { 801dcc4: 687b ldr r3, [r7, #4] 801dcc6: f8b3 2062 ldrh.w r2, [r3, #98] @ 0x62 801dcca: 687b ldr r3, [r7, #4] 801dccc: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801dcd0: 429a cmp r2, r3 801dcd2: d205 bcs.n 801dce0 pcb->snd_wnd_max = pcb->snd_wnd; 801dcd4: 687b ldr r3, [r7, #4] 801dcd6: f8b3 2060 ldrh.w r2, [r3, #96] @ 0x60 801dcda: 687b ldr r3, [r7, #4] 801dcdc: f8a3 2062 strh.w r2, [r3, #98] @ 0x62 } pcb->snd_wl1 = seqno; 801dce0: 4b69 ldr r3, [pc, #420] @ (801de88 ) 801dce2: 681a ldr r2, [r3, #0] 801dce4: 687b ldr r3, [r7, #4] 801dce6: 655a str r2, [r3, #84] @ 0x54 pcb->snd_wl2 = ackno; 801dce8: 4b68 ldr r3, [pc, #416] @ (801de8c ) 801dcea: 681a ldr r2, [r3, #0] 801dcec: 687b ldr r3, [r7, #4] 801dcee: 659a str r2, [r3, #88] @ 0x58 * If it only passes 1, should reset dupack counter * */ /* Clause 1 */ if (TCP_SEQ_LEQ(ackno, pcb->lastack)) { 801dcf0: 4b66 ldr r3, [pc, #408] @ (801de8c ) 801dcf2: 681a ldr r2, [r3, #0] 801dcf4: 687b ldr r3, [r7, #4] 801dcf6: 6c5b ldr r3, [r3, #68] @ 0x44 801dcf8: 1ad3 subs r3, r2, r3 801dcfa: 2b00 cmp r3, #0 801dcfc: dc58 bgt.n 801ddb0 /* Clause 2 */ if (tcplen == 0) { 801dcfe: 4b65 ldr r3, [pc, #404] @ (801de94 ) 801dd00: 881b ldrh r3, [r3, #0] 801dd02: 2b00 cmp r3, #0 801dd04: d14b bne.n 801dd9e /* Clause 3 */ if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) { 801dd06: 687b ldr r3, [r7, #4] 801dd08: 6d9b ldr r3, [r3, #88] @ 0x58 801dd0a: 687a ldr r2, [r7, #4] 801dd0c: f8b2 2060 ldrh.w r2, [r2, #96] @ 0x60 801dd10: 4413 add r3, r2 801dd12: 6b3a ldr r2, [r7, #48] @ 0x30 801dd14: 429a cmp r2, r3 801dd16: d142 bne.n 801dd9e /* Clause 4 */ if (pcb->rtime >= 0) { 801dd18: 687b ldr r3, [r7, #4] 801dd1a: f9b3 3030 ldrsh.w r3, [r3, #48] @ 0x30 801dd1e: 2b00 cmp r3, #0 801dd20: db3d blt.n 801dd9e /* Clause 5 */ if (pcb->lastack == ackno) { 801dd22: 687b ldr r3, [r7, #4] 801dd24: 6c5a ldr r2, [r3, #68] @ 0x44 801dd26: 4b59 ldr r3, [pc, #356] @ (801de8c ) 801dd28: 681b ldr r3, [r3, #0] 801dd2a: 429a cmp r2, r3 801dd2c: d137 bne.n 801dd9e found_dupack = 1; 801dd2e: 2301 movs r3, #1 801dd30: 64bb str r3, [r7, #72] @ 0x48 if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { 801dd32: 687b ldr r3, [r7, #4] 801dd34: f893 3043 ldrb.w r3, [r3, #67] @ 0x43 801dd38: 2bff cmp r3, #255 @ 0xff 801dd3a: d007 beq.n 801dd4c ++pcb->dupacks; 801dd3c: 687b ldr r3, [r7, #4] 801dd3e: f893 3043 ldrb.w r3, [r3, #67] @ 0x43 801dd42: 3301 adds r3, #1 801dd44: b2da uxtb r2, r3 801dd46: 687b ldr r3, [r7, #4] 801dd48: f883 2043 strb.w r2, [r3, #67] @ 0x43 } if (pcb->dupacks > 3) { 801dd4c: 687b ldr r3, [r7, #4] 801dd4e: f893 3043 ldrb.w r3, [r3, #67] @ 0x43 801dd52: 2b03 cmp r3, #3 801dd54: d91b bls.n 801dd8e /* Inflate the congestion window */ TCP_WND_INC(pcb->cwnd, pcb->mss); 801dd56: 687b ldr r3, [r7, #4] 801dd58: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801dd5c: 687b ldr r3, [r7, #4] 801dd5e: 8e5b ldrh r3, [r3, #50] @ 0x32 801dd60: 4413 add r3, r2 801dd62: b29a uxth r2, r3 801dd64: 687b ldr r3, [r7, #4] 801dd66: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801dd6a: 429a cmp r2, r3 801dd6c: d30a bcc.n 801dd84 801dd6e: 687b ldr r3, [r7, #4] 801dd70: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801dd74: 687b ldr r3, [r7, #4] 801dd76: 8e5b ldrh r3, [r3, #50] @ 0x32 801dd78: 4413 add r3, r2 801dd7a: b29a uxth r2, r3 801dd7c: 687b ldr r3, [r7, #4] 801dd7e: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 801dd82: e004 b.n 801dd8e 801dd84: 687b ldr r3, [r7, #4] 801dd86: f64f 72ff movw r2, #65535 @ 0xffff 801dd8a: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 } if (pcb->dupacks >= 3) { 801dd8e: 687b ldr r3, [r7, #4] 801dd90: f893 3043 ldrb.w r3, [r3, #67] @ 0x43 801dd94: 2b02 cmp r3, #2 801dd96: d902 bls.n 801dd9e /* Do fast retransmit (checked via TF_INFR, not via dupacks count) */ tcp_rexmit_fast(pcb); 801dd98: 6878 ldr r0, [r7, #4] 801dd9a: f002 fbb3 bl 8020504 } } } /* If Clause (1) or more is true, but not a duplicate ack, reset * count of consecutive duplicate acks */ if (!found_dupack) { 801dd9e: 6cbb ldr r3, [r7, #72] @ 0x48 801dda0: 2b00 cmp r3, #0 801dda2: f040 8161 bne.w 801e068 pcb->dupacks = 0; 801dda6: 687b ldr r3, [r7, #4] 801dda8: 2200 movs r2, #0 801ddaa: f883 2043 strb.w r2, [r3, #67] @ 0x43 801ddae: e15b b.n 801e068 } } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 801ddb0: 4b36 ldr r3, [pc, #216] @ (801de8c ) 801ddb2: 681a ldr r2, [r3, #0] 801ddb4: 687b ldr r3, [r7, #4] 801ddb6: 6c5b ldr r3, [r3, #68] @ 0x44 801ddb8: 1ad3 subs r3, r2, r3 801ddba: 3b01 subs r3, #1 801ddbc: 2b00 cmp r3, #0 801ddbe: f2c0 814e blt.w 801e05e 801ddc2: 4b32 ldr r3, [pc, #200] @ (801de8c ) 801ddc4: 681a ldr r2, [r3, #0] 801ddc6: 687b ldr r3, [r7, #4] 801ddc8: 6d1b ldr r3, [r3, #80] @ 0x50 801ddca: 1ad3 subs r3, r2, r3 801ddcc: 2b00 cmp r3, #0 801ddce: f300 8146 bgt.w 801e05e 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) { 801ddd2: 687b ldr r3, [r7, #4] 801ddd4: 8b5b ldrh r3, [r3, #26] 801ddd6: f003 0304 and.w r3, r3, #4 801ddda: 2b00 cmp r3, #0 801dddc: d010 beq.n 801de00 tcp_clear_flags(pcb, TF_INFR); 801ddde: 687b ldr r3, [r7, #4] 801dde0: 8b5b ldrh r3, [r3, #26] 801dde2: f023 0304 bic.w r3, r3, #4 801dde6: b29a uxth r2, r3 801dde8: 687b ldr r3, [r7, #4] 801ddea: 835a strh r2, [r3, #26] pcb->cwnd = pcb->ssthresh; 801ddec: 687b ldr r3, [r7, #4] 801ddee: f8b3 204a ldrh.w r2, [r3, #74] @ 0x4a 801ddf2: 687b ldr r3, [r7, #4] 801ddf4: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 pcb->bytes_acked = 0; 801ddf8: 687b ldr r3, [r7, #4] 801ddfa: 2200 movs r2, #0 801ddfc: f8a3 206a strh.w r2, [r3, #106] @ 0x6a } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 801de00: 687b ldr r3, [r7, #4] 801de02: 2200 movs r2, #0 801de04: f883 2042 strb.w r2, [r3, #66] @ 0x42 /* Reset the retransmission time-out. */ pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv); 801de08: 687b ldr r3, [r7, #4] 801de0a: f9b3 303c ldrsh.w r3, [r3, #60] @ 0x3c 801de0e: 10db asrs r3, r3, #3 801de10: b21b sxth r3, r3 801de12: b29a uxth r2, r3 801de14: 687b ldr r3, [r7, #4] 801de16: f9b3 303e ldrsh.w r3, [r3, #62] @ 0x3e 801de1a: b29b uxth r3, r3 801de1c: 4413 add r3, r2 801de1e: b29b uxth r3, r3 801de20: b21a sxth r2, r3 801de22: 687b ldr r3, [r7, #4] 801de24: f8a3 2040 strh.w r2, [r3, #64] @ 0x40 /* Record how much data this ACK acks */ acked = (tcpwnd_size_t)(ackno - pcb->lastack); 801de28: 4b18 ldr r3, [pc, #96] @ (801de8c ) 801de2a: 681b ldr r3, [r3, #0] 801de2c: b29a uxth r2, r3 801de2e: 687b ldr r3, [r7, #4] 801de30: 6c5b ldr r3, [r3, #68] @ 0x44 801de32: b29b uxth r3, r3 801de34: 1ad3 subs r3, r2, r3 801de36: 85fb strh r3, [r7, #46] @ 0x2e /* Reset the fast retransmit variables. */ pcb->dupacks = 0; 801de38: 687b ldr r3, [r7, #4] 801de3a: 2200 movs r2, #0 801de3c: f883 2043 strb.w r2, [r3, #67] @ 0x43 pcb->lastack = ackno; 801de40: 4b12 ldr r3, [pc, #72] @ (801de8c ) 801de42: 681a ldr r2, [r3, #0] 801de44: 687b ldr r3, [r7, #4] 801de46: 645a str r2, [r3, #68] @ 0x44 /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 801de48: 687b ldr r3, [r7, #4] 801de4a: 7d1b ldrb r3, [r3, #20] 801de4c: 2b03 cmp r3, #3 801de4e: f240 8097 bls.w 801df80 if (pcb->cwnd < pcb->ssthresh) { 801de52: 687b ldr r3, [r7, #4] 801de54: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801de58: 687b ldr r3, [r7, #4] 801de5a: f8b3 304a ldrh.w r3, [r3, #74] @ 0x4a 801de5e: 429a cmp r2, r3 801de60: d245 bcs.n 801deee tcpwnd_size_t increase; /* limit to 1 SMSS segment during period following RTO */ u8_t num_seg = (pcb->flags & TF_RTO) ? 1 : 2; 801de62: 687b ldr r3, [r7, #4] 801de64: 8b5b ldrh r3, [r3, #26] 801de66: f403 6300 and.w r3, r3, #2048 @ 0x800 801de6a: 2b00 cmp r3, #0 801de6c: d014 beq.n 801de98 801de6e: 2301 movs r3, #1 801de70: e013 b.n 801de9a 801de72: bf00 nop 801de74: 0802ed10 .word 0x0802ed10 801de78: 0802f040 .word 0x0802f040 801de7c: 0802ed5c .word 0x0802ed5c 801de80: 0802f05c .word 0x0802f05c 801de84: 2402aed0 .word 0x2402aed0 801de88: 2402aec4 .word 0x2402aec4 801de8c: 2402aec8 .word 0x2402aec8 801de90: 2402aeb4 .word 0x2402aeb4 801de94: 2402aece .word 0x2402aece 801de98: 2302 movs r3, #2 801de9a: 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)); 801de9e: f897 302d ldrb.w r3, [r7, #45] @ 0x2d 801dea2: b29a uxth r2, r3 801dea4: 687b ldr r3, [r7, #4] 801dea6: 8e5b ldrh r3, [r3, #50] @ 0x32 801dea8: fb12 f303 smulbb r3, r2, r3 801deac: b29b uxth r3, r3 801deae: 8dfa ldrh r2, [r7, #46] @ 0x2e 801deb0: 4293 cmp r3, r2 801deb2: bf28 it cs 801deb4: 4613 movcs r3, r2 801deb6: 857b strh r3, [r7, #42] @ 0x2a TCP_WND_INC(pcb->cwnd, increase); 801deb8: 687b ldr r3, [r7, #4] 801deba: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801debe: 8d7b ldrh r3, [r7, #42] @ 0x2a 801dec0: 4413 add r3, r2 801dec2: b29a uxth r2, r3 801dec4: 687b ldr r3, [r7, #4] 801dec6: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801deca: 429a cmp r2, r3 801decc: d309 bcc.n 801dee2 801dece: 687b ldr r3, [r7, #4] 801ded0: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801ded4: 8d7b ldrh r3, [r7, #42] @ 0x2a 801ded6: 4413 add r3, r2 801ded8: b29a uxth r2, r3 801deda: 687b ldr r3, [r7, #4] 801dedc: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 801dee0: e04e b.n 801df80 801dee2: 687b ldr r3, [r7, #4] 801dee4: f64f 72ff movw r2, #65535 @ 0xffff 801dee8: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 801deec: e048 b.n 801df80 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); 801deee: 687b ldr r3, [r7, #4] 801def0: f8b3 206a ldrh.w r2, [r3, #106] @ 0x6a 801def4: 8dfb ldrh r3, [r7, #46] @ 0x2e 801def6: 4413 add r3, r2 801def8: b29a uxth r2, r3 801defa: 687b ldr r3, [r7, #4] 801defc: f8b3 306a ldrh.w r3, [r3, #106] @ 0x6a 801df00: 429a cmp r2, r3 801df02: d309 bcc.n 801df18 801df04: 687b ldr r3, [r7, #4] 801df06: f8b3 206a ldrh.w r2, [r3, #106] @ 0x6a 801df0a: 8dfb ldrh r3, [r7, #46] @ 0x2e 801df0c: 4413 add r3, r2 801df0e: b29a uxth r2, r3 801df10: 687b ldr r3, [r7, #4] 801df12: f8a3 206a strh.w r2, [r3, #106] @ 0x6a 801df16: e004 b.n 801df22 801df18: 687b ldr r3, [r7, #4] 801df1a: f64f 72ff movw r2, #65535 @ 0xffff 801df1e: f8a3 206a strh.w r2, [r3, #106] @ 0x6a if (pcb->bytes_acked >= pcb->cwnd) { 801df22: 687b ldr r3, [r7, #4] 801df24: f8b3 206a ldrh.w r2, [r3, #106] @ 0x6a 801df28: 687b ldr r3, [r7, #4] 801df2a: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801df2e: 429a cmp r2, r3 801df30: d326 bcc.n 801df80 pcb->bytes_acked = (tcpwnd_size_t)(pcb->bytes_acked - pcb->cwnd); 801df32: 687b ldr r3, [r7, #4] 801df34: f8b3 206a ldrh.w r2, [r3, #106] @ 0x6a 801df38: 687b ldr r3, [r7, #4] 801df3a: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801df3e: 1ad3 subs r3, r2, r3 801df40: b29a uxth r2, r3 801df42: 687b ldr r3, [r7, #4] 801df44: f8a3 206a strh.w r2, [r3, #106] @ 0x6a TCP_WND_INC(pcb->cwnd, pcb->mss); 801df48: 687b ldr r3, [r7, #4] 801df4a: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801df4e: 687b ldr r3, [r7, #4] 801df50: 8e5b ldrh r3, [r3, #50] @ 0x32 801df52: 4413 add r3, r2 801df54: b29a uxth r2, r3 801df56: 687b ldr r3, [r7, #4] 801df58: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801df5c: 429a cmp r2, r3 801df5e: d30a bcc.n 801df76 801df60: 687b ldr r3, [r7, #4] 801df62: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801df66: 687b ldr r3, [r7, #4] 801df68: 8e5b ldrh r3, [r3, #50] @ 0x32 801df6a: 4413 add r3, r2 801df6c: b29a uxth r2, r3 801df6e: 687b ldr r3, [r7, #4] 801df70: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 801df74: e004 b.n 801df80 801df76: 687b ldr r3, [r7, #4] 801df78: f64f 72ff movw r2, #65535 @ 0xffff 801df7c: 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); 801df80: 687b ldr r3, [r7, #4] 801df82: 6f19 ldr r1, [r3, #112] @ 0x70 801df84: 687b ldr r3, [r7, #4] 801df86: 6edb ldr r3, [r3, #108] @ 0x6c 801df88: 4a98 ldr r2, [pc, #608] @ (801e1ec ) 801df8a: 6878 ldr r0, [r7, #4] 801df8c: f7ff fdca bl 801db24 801df90: 4602 mov r2, r0 801df92: 687b ldr r3, [r7, #4] 801df94: 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); 801df96: 687b ldr r3, [r7, #4] 801df98: 6ed9 ldr r1, [r3, #108] @ 0x6c 801df9a: 687b ldr r3, [r7, #4] 801df9c: 6f1b ldr r3, [r3, #112] @ 0x70 801df9e: 4a94 ldr r2, [pc, #592] @ (801e1f0 ) 801dfa0: 6878 ldr r0, [r7, #4] 801dfa2: f7ff fdbf bl 801db24 801dfa6: 4602 mov r2, r0 801dfa8: 687b ldr r3, [r7, #4] 801dfaa: 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) { 801dfac: 687b ldr r3, [r7, #4] 801dfae: 6f1b ldr r3, [r3, #112] @ 0x70 801dfb0: 2b00 cmp r3, #0 801dfb2: d104 bne.n 801dfbe pcb->rtime = -1; 801dfb4: 687b ldr r3, [r7, #4] 801dfb6: f64f 72ff movw r2, #65535 @ 0xffff 801dfba: 861a strh r2, [r3, #48] @ 0x30 801dfbc: e002 b.n 801dfc4 } else { pcb->rtime = 0; 801dfbe: 687b ldr r3, [r7, #4] 801dfc0: 2200 movs r2, #0 801dfc2: 861a strh r2, [r3, #48] @ 0x30 } pcb->polltmr = 0; 801dfc4: 687b ldr r3, [r7, #4] 801dfc6: 2200 movs r2, #0 801dfc8: 771a strb r2, [r3, #28] #if TCP_OVERSIZE if (pcb->unsent == NULL) { 801dfca: 687b ldr r3, [r7, #4] 801dfcc: 6edb ldr r3, [r3, #108] @ 0x6c 801dfce: 2b00 cmp r3, #0 801dfd0: d103 bne.n 801dfda pcb->unsent_oversize = 0; 801dfd2: 687b ldr r3, [r7, #4] 801dfd4: 2200 movs r2, #0 801dfd6: 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); 801dfda: 687b ldr r3, [r7, #4] 801dfdc: f8b3 2064 ldrh.w r2, [r3, #100] @ 0x64 801dfe0: 4b84 ldr r3, [pc, #528] @ (801e1f4 ) 801dfe2: 881b ldrh r3, [r3, #0] 801dfe4: 4413 add r3, r2 801dfe6: b29a uxth r2, r3 801dfe8: 687b ldr r3, [r7, #4] 801dfea: f8a3 2064 strh.w r2, [r3, #100] @ 0x64 /* check if this ACK ends our retransmission of in-flight data */ if (pcb->flags & TF_RTO) { 801dfee: 687b ldr r3, [r7, #4] 801dff0: 8b5b ldrh r3, [r3, #26] 801dff2: f403 6300 and.w r3, r3, #2048 @ 0x800 801dff6: 2b00 cmp r3, #0 801dff8: d035 beq.n 801e066 /* 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) { 801dffa: 687b ldr r3, [r7, #4] 801dffc: 6f1b ldr r3, [r3, #112] @ 0x70 801dffe: 2b00 cmp r3, #0 801e000: d118 bne.n 801e034 if ((pcb->unsent == NULL) || 801e002: 687b ldr r3, [r7, #4] 801e004: 6edb ldr r3, [r3, #108] @ 0x6c 801e006: 2b00 cmp r3, #0 801e008: d00c beq.n 801e024 (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unsent->tcphdr->seqno)))) { 801e00a: 687b ldr r3, [r7, #4] 801e00c: 6cdc ldr r4, [r3, #76] @ 0x4c 801e00e: 687b ldr r3, [r7, #4] 801e010: 6edb ldr r3, [r3, #108] @ 0x6c 801e012: 691b ldr r3, [r3, #16] 801e014: 685b ldr r3, [r3, #4] 801e016: 4618 mov r0, r3 801e018: f7fa fd93 bl 8018b42 801e01c: 4603 mov r3, r0 801e01e: 1ae3 subs r3, r4, r3 if ((pcb->unsent == NULL) || 801e020: 2b00 cmp r3, #0 801e022: dc20 bgt.n 801e066 tcp_clear_flags(pcb, TF_RTO); 801e024: 687b ldr r3, [r7, #4] 801e026: 8b5b ldrh r3, [r3, #26] 801e028: f423 6300 bic.w r3, r3, #2048 @ 0x800 801e02c: b29a uxth r2, r3 801e02e: 687b ldr r3, [r7, #4] 801e030: 835a strh r2, [r3, #26] } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 801e032: e018 b.n 801e066 } } else if (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unacked->tcphdr->seqno))) { 801e034: 687b ldr r3, [r7, #4] 801e036: 6cdc ldr r4, [r3, #76] @ 0x4c 801e038: 687b ldr r3, [r7, #4] 801e03a: 6f1b ldr r3, [r3, #112] @ 0x70 801e03c: 691b ldr r3, [r3, #16] 801e03e: 685b ldr r3, [r3, #4] 801e040: 4618 mov r0, r3 801e042: f7fa fd7e bl 8018b42 801e046: 4603 mov r3, r0 801e048: 1ae3 subs r3, r4, r3 801e04a: 2b00 cmp r3, #0 801e04c: dc0b bgt.n 801e066 tcp_clear_flags(pcb, TF_RTO); 801e04e: 687b ldr r3, [r7, #4] 801e050: 8b5b ldrh r3, [r3, #26] 801e052: f423 6300 bic.w r3, r3, #2048 @ 0x800 801e056: b29a uxth r2, r3 801e058: 687b ldr r3, [r7, #4] 801e05a: 835a strh r2, [r3, #26] } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 801e05c: e003 b.n 801e066 } } /* End of ACK for new data processing. */ } else { /* Out of sequence ACK, didn't really ack anything */ tcp_send_empty_ack(pcb); 801e05e: 6878 ldr r0, [r7, #4] 801e060: f002 fc3c bl 80208dc 801e064: e000 b.n 801e068 } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 801e066: 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)) { 801e068: 687b ldr r3, [r7, #4] 801e06a: 6b5b ldr r3, [r3, #52] @ 0x34 801e06c: 2b00 cmp r3, #0 801e06e: d05b beq.n 801e128 801e070: 687b ldr r3, [r7, #4] 801e072: 6b9a ldr r2, [r3, #56] @ 0x38 801e074: 4b60 ldr r3, [pc, #384] @ (801e1f8 ) 801e076: 681b ldr r3, [r3, #0] 801e078: 1ad3 subs r3, r2, r3 801e07a: 2b00 cmp r3, #0 801e07c: da54 bge.n 801e128 /* 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); 801e07e: 4b5f ldr r3, [pc, #380] @ (801e1fc ) 801e080: 681b ldr r3, [r3, #0] 801e082: b29a uxth r2, r3 801e084: 687b ldr r3, [r7, #4] 801e086: 6b5b ldr r3, [r3, #52] @ 0x34 801e088: b29b uxth r3, r3 801e08a: 1ad3 subs r3, r2, r3 801e08c: b29b uxth r3, r3 801e08e: 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)); 801e092: f8b7 204e ldrh.w r2, [r7, #78] @ 0x4e 801e096: 687b ldr r3, [r7, #4] 801e098: f9b3 303c ldrsh.w r3, [r3, #60] @ 0x3c 801e09c: 10db asrs r3, r3, #3 801e09e: b21b sxth r3, r3 801e0a0: b29b uxth r3, r3 801e0a2: 1ad3 subs r3, r2, r3 801e0a4: b29b uxth r3, r3 801e0a6: f8a7 304e strh.w r3, [r7, #78] @ 0x4e pcb->sa = (s16_t)(pcb->sa + m); 801e0aa: 687b ldr r3, [r7, #4] 801e0ac: f9b3 303c ldrsh.w r3, [r3, #60] @ 0x3c 801e0b0: b29a uxth r2, r3 801e0b2: f8b7 304e ldrh.w r3, [r7, #78] @ 0x4e 801e0b6: 4413 add r3, r2 801e0b8: b29b uxth r3, r3 801e0ba: b21a sxth r2, r3 801e0bc: 687b ldr r3, [r7, #4] 801e0be: 879a strh r2, [r3, #60] @ 0x3c if (m < 0) { 801e0c0: f9b7 304e ldrsh.w r3, [r7, #78] @ 0x4e 801e0c4: 2b00 cmp r3, #0 801e0c6: da05 bge.n 801e0d4 m = (s16_t) - m; 801e0c8: f8b7 304e ldrh.w r3, [r7, #78] @ 0x4e 801e0cc: 425b negs r3, r3 801e0ce: b29b uxth r3, r3 801e0d0: f8a7 304e strh.w r3, [r7, #78] @ 0x4e } m = (s16_t)(m - (pcb->sv >> 2)); 801e0d4: f8b7 204e ldrh.w r2, [r7, #78] @ 0x4e 801e0d8: 687b ldr r3, [r7, #4] 801e0da: f9b3 303e ldrsh.w r3, [r3, #62] @ 0x3e 801e0de: 109b asrs r3, r3, #2 801e0e0: b21b sxth r3, r3 801e0e2: b29b uxth r3, r3 801e0e4: 1ad3 subs r3, r2, r3 801e0e6: b29b uxth r3, r3 801e0e8: f8a7 304e strh.w r3, [r7, #78] @ 0x4e pcb->sv = (s16_t)(pcb->sv + m); 801e0ec: 687b ldr r3, [r7, #4] 801e0ee: f9b3 303e ldrsh.w r3, [r3, #62] @ 0x3e 801e0f2: b29a uxth r2, r3 801e0f4: f8b7 304e ldrh.w r3, [r7, #78] @ 0x4e 801e0f8: 4413 add r3, r2 801e0fa: b29b uxth r3, r3 801e0fc: b21a sxth r2, r3 801e0fe: 687b ldr r3, [r7, #4] 801e100: 87da strh r2, [r3, #62] @ 0x3e pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv); 801e102: 687b ldr r3, [r7, #4] 801e104: f9b3 303c ldrsh.w r3, [r3, #60] @ 0x3c 801e108: 10db asrs r3, r3, #3 801e10a: b21b sxth r3, r3 801e10c: b29a uxth r2, r3 801e10e: 687b ldr r3, [r7, #4] 801e110: f9b3 303e ldrsh.w r3, [r3, #62] @ 0x3e 801e114: b29b uxth r3, r3 801e116: 4413 add r3, r2 801e118: b29b uxth r3, r3 801e11a: b21a sxth r2, r3 801e11c: 687b ldr r3, [r7, #4] 801e11e: 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; 801e122: 687b ldr r3, [r7, #4] 801e124: 2200 movs r2, #0 801e126: 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)) { 801e128: 4b35 ldr r3, [pc, #212] @ (801e200 ) 801e12a: 881b ldrh r3, [r3, #0] 801e12c: 2b00 cmp r3, #0 801e12e: f000 84df beq.w 801eaf0 801e132: 687b ldr r3, [r7, #4] 801e134: 7d1b ldrb r3, [r3, #20] 801e136: 2b06 cmp r3, #6 801e138: f200 84da bhi.w 801eaf0 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)) { 801e13c: 687b ldr r3, [r7, #4] 801e13e: 6a5a ldr r2, [r3, #36] @ 0x24 801e140: 4b30 ldr r3, [pc, #192] @ (801e204 ) 801e142: 681b ldr r3, [r3, #0] 801e144: 1ad3 subs r3, r2, r3 801e146: 3b01 subs r3, #1 801e148: 2b00 cmp r3, #0 801e14a: f2c0 808f blt.w 801e26c 801e14e: 687b ldr r3, [r7, #4] 801e150: 6a5a ldr r2, [r3, #36] @ 0x24 801e152: 4b2b ldr r3, [pc, #172] @ (801e200 ) 801e154: 881b ldrh r3, [r3, #0] 801e156: 4619 mov r1, r3 801e158: 4b2a ldr r3, [pc, #168] @ (801e204 ) 801e15a: 681b ldr r3, [r3, #0] 801e15c: 440b add r3, r1 801e15e: 1ad3 subs r3, r2, r3 801e160: 3301 adds r3, #1 801e162: 2b00 cmp r3, #0 801e164: f300 8082 bgt.w 801e26c 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; 801e168: 4b27 ldr r3, [pc, #156] @ (801e208 ) 801e16a: 685b ldr r3, [r3, #4] 801e16c: 647b str r3, [r7, #68] @ 0x44 u32_t off32 = pcb->rcv_nxt - seqno; 801e16e: 687b ldr r3, [r7, #4] 801e170: 6a5a ldr r2, [r3, #36] @ 0x24 801e172: 4b24 ldr r3, [pc, #144] @ (801e204 ) 801e174: 681b ldr r3, [r3, #0] 801e176: 1ad3 subs r3, r2, r3 801e178: 627b str r3, [r7, #36] @ 0x24 u16_t new_tot_len, off; LWIP_ASSERT("inseg.p != NULL", inseg.p); 801e17a: 4b23 ldr r3, [pc, #140] @ (801e208 ) 801e17c: 685b ldr r3, [r3, #4] 801e17e: 2b00 cmp r3, #0 801e180: d106 bne.n 801e190 801e182: 4b22 ldr r3, [pc, #136] @ (801e20c ) 801e184: f240 5294 movw r2, #1428 @ 0x594 801e188: 4921 ldr r1, [pc, #132] @ (801e210 ) 801e18a: 4822 ldr r0, [pc, #136] @ (801e214 ) 801e18c: f00b fc1e bl 80299cc LWIP_ASSERT("insane offset!", (off32 < 0xffff)); 801e190: 6a7b ldr r3, [r7, #36] @ 0x24 801e192: f64f 72fe movw r2, #65534 @ 0xfffe 801e196: 4293 cmp r3, r2 801e198: d906 bls.n 801e1a8 801e19a: 4b1c ldr r3, [pc, #112] @ (801e20c ) 801e19c: f240 5295 movw r2, #1429 @ 0x595 801e1a0: 491d ldr r1, [pc, #116] @ (801e218 ) 801e1a2: 481c ldr r0, [pc, #112] @ (801e214 ) 801e1a4: f00b fc12 bl 80299cc off = (u16_t)off32; 801e1a8: 6a7b ldr r3, [r7, #36] @ 0x24 801e1aa: f8a7 3042 strh.w r3, [r7, #66] @ 0x42 LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); 801e1ae: 4b16 ldr r3, [pc, #88] @ (801e208 ) 801e1b0: 685b ldr r3, [r3, #4] 801e1b2: 891b ldrh r3, [r3, #8] 801e1b4: f8b7 2042 ldrh.w r2, [r7, #66] @ 0x42 801e1b8: 429a cmp r2, r3 801e1ba: d906 bls.n 801e1ca 801e1bc: 4b13 ldr r3, [pc, #76] @ (801e20c ) 801e1be: f240 5297 movw r2, #1431 @ 0x597 801e1c2: 4916 ldr r1, [pc, #88] @ (801e21c ) 801e1c4: 4813 ldr r0, [pc, #76] @ (801e214 ) 801e1c6: f00b fc01 bl 80299cc inseg.len -= off; 801e1ca: 4b0f ldr r3, [pc, #60] @ (801e208 ) 801e1cc: 891a ldrh r2, [r3, #8] 801e1ce: f8b7 3042 ldrh.w r3, [r7, #66] @ 0x42 801e1d2: 1ad3 subs r3, r2, r3 801e1d4: b29a uxth r2, r3 801e1d6: 4b0c ldr r3, [pc, #48] @ (801e208 ) 801e1d8: 811a strh r2, [r3, #8] new_tot_len = (u16_t)(inseg.p->tot_len - off); 801e1da: 4b0b ldr r3, [pc, #44] @ (801e208 ) 801e1dc: 685b ldr r3, [r3, #4] 801e1de: 891a ldrh r2, [r3, #8] 801e1e0: f8b7 3042 ldrh.w r3, [r7, #66] @ 0x42 801e1e4: 1ad3 subs r3, r2, r3 801e1e6: 847b strh r3, [r7, #34] @ 0x22 while (p->len < off) { 801e1e8: e02a b.n 801e240 801e1ea: bf00 nop 801e1ec: 0802f078 .word 0x0802f078 801e1f0: 0802f080 .word 0x0802f080 801e1f4: 2402aecc .word 0x2402aecc 801e1f8: 2402aec8 .word 0x2402aec8 801e1fc: 2402ae88 .word 0x2402ae88 801e200: 2402aece .word 0x2402aece 801e204: 2402aec4 .word 0x2402aec4 801e208: 2402aea0 .word 0x2402aea0 801e20c: 0802ed10 .word 0x0802ed10 801e210: 0802f088 .word 0x0802f088 801e214: 0802ed5c .word 0x0802ed5c 801e218: 0802f098 .word 0x0802f098 801e21c: 0802f0a8 .word 0x0802f0a8 off -= p->len; 801e220: 6c7b ldr r3, [r7, #68] @ 0x44 801e222: 895b ldrh r3, [r3, #10] 801e224: f8b7 2042 ldrh.w r2, [r7, #66] @ 0x42 801e228: 1ad3 subs r3, r2, r3 801e22a: 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; 801e22e: 6c7b ldr r3, [r7, #68] @ 0x44 801e230: 8c7a ldrh r2, [r7, #34] @ 0x22 801e232: 811a strh r2, [r3, #8] p->len = 0; 801e234: 6c7b ldr r3, [r7, #68] @ 0x44 801e236: 2200 movs r2, #0 801e238: 815a strh r2, [r3, #10] p = p->next; 801e23a: 6c7b ldr r3, [r7, #68] @ 0x44 801e23c: 681b ldr r3, [r3, #0] 801e23e: 647b str r3, [r7, #68] @ 0x44 while (p->len < off) { 801e240: 6c7b ldr r3, [r7, #68] @ 0x44 801e242: 895b ldrh r3, [r3, #10] 801e244: f8b7 2042 ldrh.w r2, [r7, #66] @ 0x42 801e248: 429a cmp r2, r3 801e24a: d8e9 bhi.n 801e220 } /* cannot fail... */ pbuf_remove_header(p, off); 801e24c: f8b7 3042 ldrh.w r3, [r7, #66] @ 0x42 801e250: 4619 mov r1, r3 801e252: 6c78 ldr r0, [r7, #68] @ 0x44 801e254: f7fc f88a bl 801a36c inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; 801e258: 687b ldr r3, [r7, #4] 801e25a: 6a5b ldr r3, [r3, #36] @ 0x24 801e25c: 4a90 ldr r2, [pc, #576] @ (801e4a0 ) 801e25e: 6013 str r3, [r2, #0] 801e260: 4b90 ldr r3, [pc, #576] @ (801e4a4 ) 801e262: 691b ldr r3, [r3, #16] 801e264: 4a8e ldr r2, [pc, #568] @ (801e4a0 ) 801e266: 6812 ldr r2, [r2, #0] 801e268: 605a str r2, [r3, #4] if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) { 801e26a: e00d b.n 801e288 } else { if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) { 801e26c: 4b8c ldr r3, [pc, #560] @ (801e4a0 ) 801e26e: 681a ldr r2, [r3, #0] 801e270: 687b ldr r3, [r7, #4] 801e272: 6a5b ldr r3, [r3, #36] @ 0x24 801e274: 1ad3 subs r3, r2, r3 801e276: 2b00 cmp r3, #0 801e278: da06 bge.n 801e288 /* 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); 801e27a: 687b ldr r3, [r7, #4] 801e27c: 8b5b ldrh r3, [r3, #26] 801e27e: f043 0302 orr.w r3, r3, #2 801e282: b29a uxth r2, r3 801e284: 687b ldr r3, [r7, #4] 801e286: 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, 801e288: 4b85 ldr r3, [pc, #532] @ (801e4a0 ) 801e28a: 681a ldr r2, [r3, #0] 801e28c: 687b ldr r3, [r7, #4] 801e28e: 6a5b ldr r3, [r3, #36] @ 0x24 801e290: 1ad3 subs r3, r2, r3 801e292: 2b00 cmp r3, #0 801e294: f2c0 8427 blt.w 801eae6 801e298: 4b81 ldr r3, [pc, #516] @ (801e4a0 ) 801e29a: 681a ldr r2, [r3, #0] 801e29c: 687b ldr r3, [r7, #4] 801e29e: 6a5b ldr r3, [r3, #36] @ 0x24 801e2a0: 6879 ldr r1, [r7, #4] 801e2a2: 8d09 ldrh r1, [r1, #40] @ 0x28 801e2a4: 440b add r3, r1 801e2a6: 1ad3 subs r3, r2, r3 801e2a8: 3301 adds r3, #1 801e2aa: 2b00 cmp r3, #0 801e2ac: f300 841b bgt.w 801eae6 pcb->rcv_nxt + pcb->rcv_wnd - 1)) { if (pcb->rcv_nxt == seqno) { 801e2b0: 687b ldr r3, [r7, #4] 801e2b2: 6a5a ldr r2, [r3, #36] @ 0x24 801e2b4: 4b7a ldr r3, [pc, #488] @ (801e4a0 ) 801e2b6: 681b ldr r3, [r3, #0] 801e2b8: 429a cmp r2, r3 801e2ba: f040 8298 bne.w 801e7ee /* 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); 801e2be: 4b79 ldr r3, [pc, #484] @ (801e4a4 ) 801e2c0: 891c ldrh r4, [r3, #8] 801e2c2: 4b78 ldr r3, [pc, #480] @ (801e4a4 ) 801e2c4: 691b ldr r3, [r3, #16] 801e2c6: 899b ldrh r3, [r3, #12] 801e2c8: b29b uxth r3, r3 801e2ca: 4618 mov r0, r3 801e2cc: f7fa fc24 bl 8018b18 801e2d0: 4603 mov r3, r0 801e2d2: b2db uxtb r3, r3 801e2d4: f003 0303 and.w r3, r3, #3 801e2d8: 2b00 cmp r3, #0 801e2da: d001 beq.n 801e2e0 801e2dc: 2301 movs r3, #1 801e2de: e000 b.n 801e2e2 801e2e0: 2300 movs r3, #0 801e2e2: 4423 add r3, r4 801e2e4: b29a uxth r2, r3 801e2e6: 4b70 ldr r3, [pc, #448] @ (801e4a8 ) 801e2e8: 801a strh r2, [r3, #0] if (tcplen > pcb->rcv_wnd) { 801e2ea: 687b ldr r3, [r7, #4] 801e2ec: 8d1a ldrh r2, [r3, #40] @ 0x28 801e2ee: 4b6e ldr r3, [pc, #440] @ (801e4a8 ) 801e2f0: 881b ldrh r3, [r3, #0] 801e2f2: 429a cmp r2, r3 801e2f4: d274 bcs.n 801e3e0 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) { 801e2f6: 4b6b ldr r3, [pc, #428] @ (801e4a4 ) 801e2f8: 691b ldr r3, [r3, #16] 801e2fa: 899b ldrh r3, [r3, #12] 801e2fc: b29b uxth r3, r3 801e2fe: 4618 mov r0, r3 801e300: f7fa fc0a bl 8018b18 801e304: 4603 mov r3, r0 801e306: b2db uxtb r3, r3 801e308: f003 0301 and.w r3, r3, #1 801e30c: 2b00 cmp r3, #0 801e30e: d01e beq.n 801e34e /* 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); 801e310: 4b64 ldr r3, [pc, #400] @ (801e4a4 ) 801e312: 691b ldr r3, [r3, #16] 801e314: 899b ldrh r3, [r3, #12] 801e316: b29b uxth r3, r3 801e318: b21b sxth r3, r3 801e31a: f423 537c bic.w r3, r3, #16128 @ 0x3f00 801e31e: b21c sxth r4, r3 801e320: 4b60 ldr r3, [pc, #384] @ (801e4a4 ) 801e322: 691b ldr r3, [r3, #16] 801e324: 899b ldrh r3, [r3, #12] 801e326: b29b uxth r3, r3 801e328: 4618 mov r0, r3 801e32a: f7fa fbf5 bl 8018b18 801e32e: 4603 mov r3, r0 801e330: b2db uxtb r3, r3 801e332: f003 033e and.w r3, r3, #62 @ 0x3e 801e336: b29b uxth r3, r3 801e338: 4618 mov r0, r3 801e33a: f7fa fbed bl 8018b18 801e33e: 4603 mov r3, r0 801e340: b21b sxth r3, r3 801e342: 4323 orrs r3, r4 801e344: b21a sxth r2, r3 801e346: 4b57 ldr r3, [pc, #348] @ (801e4a4 ) 801e348: 691b ldr r3, [r3, #16] 801e34a: b292 uxth r2, r2 801e34c: 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; 801e34e: 687b ldr r3, [r7, #4] 801e350: 8d1a ldrh r2, [r3, #40] @ 0x28 801e352: 4b54 ldr r3, [pc, #336] @ (801e4a4 ) 801e354: 811a strh r2, [r3, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 801e356: 4b53 ldr r3, [pc, #332] @ (801e4a4 ) 801e358: 691b ldr r3, [r3, #16] 801e35a: 899b ldrh r3, [r3, #12] 801e35c: b29b uxth r3, r3 801e35e: 4618 mov r0, r3 801e360: f7fa fbda bl 8018b18 801e364: 4603 mov r3, r0 801e366: b2db uxtb r3, r3 801e368: f003 0302 and.w r3, r3, #2 801e36c: 2b00 cmp r3, #0 801e36e: d005 beq.n 801e37c inseg.len -= 1; 801e370: 4b4c ldr r3, [pc, #304] @ (801e4a4 ) 801e372: 891b ldrh r3, [r3, #8] 801e374: 3b01 subs r3, #1 801e376: b29a uxth r2, r3 801e378: 4b4a ldr r3, [pc, #296] @ (801e4a4 ) 801e37a: 811a strh r2, [r3, #8] } pbuf_realloc(inseg.p, inseg.len); 801e37c: 4b49 ldr r3, [pc, #292] @ (801e4a4 ) 801e37e: 685b ldr r3, [r3, #4] 801e380: 4a48 ldr r2, [pc, #288] @ (801e4a4 ) 801e382: 8912 ldrh r2, [r2, #8] 801e384: 4611 mov r1, r2 801e386: 4618 mov r0, r3 801e388: f7fb fef2 bl 801a170 tcplen = TCP_TCPLEN(&inseg); 801e38c: 4b45 ldr r3, [pc, #276] @ (801e4a4 ) 801e38e: 891c ldrh r4, [r3, #8] 801e390: 4b44 ldr r3, [pc, #272] @ (801e4a4 ) 801e392: 691b ldr r3, [r3, #16] 801e394: 899b ldrh r3, [r3, #12] 801e396: b29b uxth r3, r3 801e398: 4618 mov r0, r3 801e39a: f7fa fbbd bl 8018b18 801e39e: 4603 mov r3, r0 801e3a0: b2db uxtb r3, r3 801e3a2: f003 0303 and.w r3, r3, #3 801e3a6: 2b00 cmp r3, #0 801e3a8: d001 beq.n 801e3ae 801e3aa: 2301 movs r3, #1 801e3ac: e000 b.n 801e3b0 801e3ae: 2300 movs r3, #0 801e3b0: 4423 add r3, r4 801e3b2: b29a uxth r2, r3 801e3b4: 4b3c ldr r3, [pc, #240] @ (801e4a8 ) 801e3b6: 801a strh r2, [r3, #0] LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", 801e3b8: 4b3b ldr r3, [pc, #236] @ (801e4a8 ) 801e3ba: 881b ldrh r3, [r3, #0] 801e3bc: 461a mov r2, r3 801e3be: 4b38 ldr r3, [pc, #224] @ (801e4a0 ) 801e3c0: 681b ldr r3, [r3, #0] 801e3c2: 441a add r2, r3 801e3c4: 687b ldr r3, [r7, #4] 801e3c6: 6a5b ldr r3, [r3, #36] @ 0x24 801e3c8: 6879 ldr r1, [r7, #4] 801e3ca: 8d09 ldrh r1, [r1, #40] @ 0x28 801e3cc: 440b add r3, r1 801e3ce: 429a cmp r2, r3 801e3d0: d006 beq.n 801e3e0 801e3d2: 4b36 ldr r3, [pc, #216] @ (801e4ac ) 801e3d4: f240 52cb movw r2, #1483 @ 0x5cb 801e3d8: 4935 ldr r1, [pc, #212] @ (801e4b0 ) 801e3da: 4836 ldr r0, [pc, #216] @ (801e4b4 ) 801e3dc: f00b faf6 bl 80299cc } #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) { 801e3e0: 687b ldr r3, [r7, #4] 801e3e2: 6f5b ldr r3, [r3, #116] @ 0x74 801e3e4: 2b00 cmp r3, #0 801e3e6: f000 80e6 beq.w 801e5b6 if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 801e3ea: 4b2e ldr r3, [pc, #184] @ (801e4a4 ) 801e3ec: 691b ldr r3, [r3, #16] 801e3ee: 899b ldrh r3, [r3, #12] 801e3f0: b29b uxth r3, r3 801e3f2: 4618 mov r0, r3 801e3f4: f7fa fb90 bl 8018b18 801e3f8: 4603 mov r3, r0 801e3fa: b2db uxtb r3, r3 801e3fc: f003 0301 and.w r3, r3, #1 801e400: 2b00 cmp r3, #0 801e402: d010 beq.n 801e426 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) { 801e404: e00a b.n 801e41c struct tcp_seg *old_ooseq = pcb->ooseq; 801e406: 687b ldr r3, [r7, #4] 801e408: 6f5b ldr r3, [r3, #116] @ 0x74 801e40a: 60fb str r3, [r7, #12] pcb->ooseq = pcb->ooseq->next; 801e40c: 687b ldr r3, [r7, #4] 801e40e: 6f5b ldr r3, [r3, #116] @ 0x74 801e410: 681a ldr r2, [r3, #0] 801e412: 687b ldr r3, [r7, #4] 801e414: 675a str r2, [r3, #116] @ 0x74 tcp_seg_free(old_ooseq); 801e416: 68f8 ldr r0, [r7, #12] 801e418: f7fd fcb9 bl 801bd8e while (pcb->ooseq != NULL) { 801e41c: 687b ldr r3, [r7, #4] 801e41e: 6f5b ldr r3, [r3, #116] @ 0x74 801e420: 2b00 cmp r3, #0 801e422: d1f0 bne.n 801e406 801e424: e0c7 b.n 801e5b6 } } else { struct tcp_seg *next = pcb->ooseq; 801e426: 687b ldr r3, [r7, #4] 801e428: 6f5b ldr r3, [r3, #116] @ 0x74 801e42a: 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 && 801e42c: e051 b.n 801e4d2 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 && 801e42e: 6bfb ldr r3, [r7, #60] @ 0x3c 801e430: 691b ldr r3, [r3, #16] 801e432: 899b ldrh r3, [r3, #12] 801e434: b29b uxth r3, r3 801e436: 4618 mov r0, r3 801e438: f7fa fb6e bl 8018b18 801e43c: 4603 mov r3, r0 801e43e: b2db uxtb r3, r3 801e440: f003 0301 and.w r3, r3, #1 801e444: 2b00 cmp r3, #0 801e446: d03c beq.n 801e4c2 (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) { 801e448: 4b16 ldr r3, [pc, #88] @ (801e4a4 ) 801e44a: 691b ldr r3, [r3, #16] 801e44c: 899b ldrh r3, [r3, #12] 801e44e: b29b uxth r3, r3 801e450: 4618 mov r0, r3 801e452: f7fa fb61 bl 8018b18 801e456: 4603 mov r3, r0 801e458: b2db uxtb r3, r3 801e45a: f003 0302 and.w r3, r3, #2 if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 && 801e45e: 2b00 cmp r3, #0 801e460: d12f bne.n 801e4c2 TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN); 801e462: 4b10 ldr r3, [pc, #64] @ (801e4a4 ) 801e464: 691b ldr r3, [r3, #16] 801e466: 899b ldrh r3, [r3, #12] 801e468: b29c uxth r4, r3 801e46a: 2001 movs r0, #1 801e46c: f7fa fb54 bl 8018b18 801e470: 4603 mov r3, r0 801e472: 461a mov r2, r3 801e474: 4b0b ldr r3, [pc, #44] @ (801e4a4 ) 801e476: 691b ldr r3, [r3, #16] 801e478: 4322 orrs r2, r4 801e47a: b292 uxth r2, r2 801e47c: 819a strh r2, [r3, #12] tcplen = TCP_TCPLEN(&inseg); 801e47e: 4b09 ldr r3, [pc, #36] @ (801e4a4 ) 801e480: 891c ldrh r4, [r3, #8] 801e482: 4b08 ldr r3, [pc, #32] @ (801e4a4 ) 801e484: 691b ldr r3, [r3, #16] 801e486: 899b ldrh r3, [r3, #12] 801e488: b29b uxth r3, r3 801e48a: 4618 mov r0, r3 801e48c: f7fa fb44 bl 8018b18 801e490: 4603 mov r3, r0 801e492: b2db uxtb r3, r3 801e494: f003 0303 and.w r3, r3, #3 801e498: 2b00 cmp r3, #0 801e49a: d00d beq.n 801e4b8 801e49c: 2301 movs r3, #1 801e49e: e00c b.n 801e4ba 801e4a0: 2402aec4 .word 0x2402aec4 801e4a4: 2402aea0 .word 0x2402aea0 801e4a8: 2402aece .word 0x2402aece 801e4ac: 0802ed10 .word 0x0802ed10 801e4b0: 0802f0b8 .word 0x0802f0b8 801e4b4: 0802ed5c .word 0x0802ed5c 801e4b8: 2300 movs r3, #0 801e4ba: 4423 add r3, r4 801e4bc: b29a uxth r2, r3 801e4be: 4b98 ldr r3, [pc, #608] @ (801e720 ) 801e4c0: 801a strh r2, [r3, #0] } tmp = next; 801e4c2: 6bfb ldr r3, [r7, #60] @ 0x3c 801e4c4: 613b str r3, [r7, #16] next = next->next; 801e4c6: 6bfb ldr r3, [r7, #60] @ 0x3c 801e4c8: 681b ldr r3, [r3, #0] 801e4ca: 63fb str r3, [r7, #60] @ 0x3c tcp_seg_free(tmp); 801e4cc: 6938 ldr r0, [r7, #16] 801e4ce: f7fd fc5e bl 801bd8e while (next && 801e4d2: 6bfb ldr r3, [r7, #60] @ 0x3c 801e4d4: 2b00 cmp r3, #0 801e4d6: d00e beq.n 801e4f6 TCP_SEQ_GEQ(seqno + tcplen, 801e4d8: 4b91 ldr r3, [pc, #580] @ (801e720 ) 801e4da: 881b ldrh r3, [r3, #0] 801e4dc: 461a mov r2, r3 801e4de: 4b91 ldr r3, [pc, #580] @ (801e724 ) 801e4e0: 681b ldr r3, [r3, #0] 801e4e2: 441a add r2, r3 801e4e4: 6bfb ldr r3, [r7, #60] @ 0x3c 801e4e6: 691b ldr r3, [r3, #16] 801e4e8: 685b ldr r3, [r3, #4] 801e4ea: 6bf9 ldr r1, [r7, #60] @ 0x3c 801e4ec: 8909 ldrh r1, [r1, #8] 801e4ee: 440b add r3, r1 801e4f0: 1ad3 subs r3, r2, r3 while (next && 801e4f2: 2b00 cmp r3, #0 801e4f4: da9b bge.n 801e42e } /* Now trim right side of inseg if it overlaps with the first * segment on ooseq */ if (next && 801e4f6: 6bfb ldr r3, [r7, #60] @ 0x3c 801e4f8: 2b00 cmp r3, #0 801e4fa: d059 beq.n 801e5b0 TCP_SEQ_GT(seqno + tcplen, 801e4fc: 4b88 ldr r3, [pc, #544] @ (801e720 ) 801e4fe: 881b ldrh r3, [r3, #0] 801e500: 461a mov r2, r3 801e502: 4b88 ldr r3, [pc, #544] @ (801e724 ) 801e504: 681b ldr r3, [r3, #0] 801e506: 441a add r2, r3 801e508: 6bfb ldr r3, [r7, #60] @ 0x3c 801e50a: 691b ldr r3, [r3, #16] 801e50c: 685b ldr r3, [r3, #4] 801e50e: 1ad3 subs r3, r2, r3 if (next && 801e510: 2b00 cmp r3, #0 801e512: dd4d ble.n 801e5b0 next->tcphdr->seqno)) { /* inseg cannot have FIN here (already processed above) */ inseg.len = (u16_t)(next->tcphdr->seqno - seqno); 801e514: 6bfb ldr r3, [r7, #60] @ 0x3c 801e516: 691b ldr r3, [r3, #16] 801e518: 685b ldr r3, [r3, #4] 801e51a: b29a uxth r2, r3 801e51c: 4b81 ldr r3, [pc, #516] @ (801e724 ) 801e51e: 681b ldr r3, [r3, #0] 801e520: b29b uxth r3, r3 801e522: 1ad3 subs r3, r2, r3 801e524: b29a uxth r2, r3 801e526: 4b80 ldr r3, [pc, #512] @ (801e728 ) 801e528: 811a strh r2, [r3, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 801e52a: 4b7f ldr r3, [pc, #508] @ (801e728 ) 801e52c: 691b ldr r3, [r3, #16] 801e52e: 899b ldrh r3, [r3, #12] 801e530: b29b uxth r3, r3 801e532: 4618 mov r0, r3 801e534: f7fa faf0 bl 8018b18 801e538: 4603 mov r3, r0 801e53a: b2db uxtb r3, r3 801e53c: f003 0302 and.w r3, r3, #2 801e540: 2b00 cmp r3, #0 801e542: d005 beq.n 801e550 inseg.len -= 1; 801e544: 4b78 ldr r3, [pc, #480] @ (801e728 ) 801e546: 891b ldrh r3, [r3, #8] 801e548: 3b01 subs r3, #1 801e54a: b29a uxth r2, r3 801e54c: 4b76 ldr r3, [pc, #472] @ (801e728 ) 801e54e: 811a strh r2, [r3, #8] } pbuf_realloc(inseg.p, inseg.len); 801e550: 4b75 ldr r3, [pc, #468] @ (801e728 ) 801e552: 685b ldr r3, [r3, #4] 801e554: 4a74 ldr r2, [pc, #464] @ (801e728 ) 801e556: 8912 ldrh r2, [r2, #8] 801e558: 4611 mov r1, r2 801e55a: 4618 mov r0, r3 801e55c: f7fb fe08 bl 801a170 tcplen = TCP_TCPLEN(&inseg); 801e560: 4b71 ldr r3, [pc, #452] @ (801e728 ) 801e562: 891c ldrh r4, [r3, #8] 801e564: 4b70 ldr r3, [pc, #448] @ (801e728 ) 801e566: 691b ldr r3, [r3, #16] 801e568: 899b ldrh r3, [r3, #12] 801e56a: b29b uxth r3, r3 801e56c: 4618 mov r0, r3 801e56e: f7fa fad3 bl 8018b18 801e572: 4603 mov r3, r0 801e574: b2db uxtb r3, r3 801e576: f003 0303 and.w r3, r3, #3 801e57a: 2b00 cmp r3, #0 801e57c: d001 beq.n 801e582 801e57e: 2301 movs r3, #1 801e580: e000 b.n 801e584 801e582: 2300 movs r3, #0 801e584: 4423 add r3, r4 801e586: b29a uxth r2, r3 801e588: 4b65 ldr r3, [pc, #404] @ (801e720 ) 801e58a: 801a strh r2, [r3, #0] LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n", 801e58c: 4b64 ldr r3, [pc, #400] @ (801e720 ) 801e58e: 881b ldrh r3, [r3, #0] 801e590: 461a mov r2, r3 801e592: 4b64 ldr r3, [pc, #400] @ (801e724 ) 801e594: 681b ldr r3, [r3, #0] 801e596: 441a add r2, r3 801e598: 6bfb ldr r3, [r7, #60] @ 0x3c 801e59a: 691b ldr r3, [r3, #16] 801e59c: 685b ldr r3, [r3, #4] 801e59e: 429a cmp r2, r3 801e5a0: d006 beq.n 801e5b0 801e5a2: 4b62 ldr r3, [pc, #392] @ (801e72c ) 801e5a4: f240 52fc movw r2, #1532 @ 0x5fc 801e5a8: 4961 ldr r1, [pc, #388] @ (801e730 ) 801e5aa: 4862 ldr r0, [pc, #392] @ (801e734 ) 801e5ac: f00b fa0e bl 80299cc (seqno + tcplen) == next->tcphdr->seqno); } pcb->ooseq = next; 801e5b0: 687b ldr r3, [r7, #4] 801e5b2: 6bfa ldr r2, [r7, #60] @ 0x3c 801e5b4: 675a str r2, [r3, #116] @ 0x74 } } #endif /* TCP_QUEUE_OOSEQ */ pcb->rcv_nxt = seqno + tcplen; 801e5b6: 4b5a ldr r3, [pc, #360] @ (801e720 ) 801e5b8: 881b ldrh r3, [r3, #0] 801e5ba: 461a mov r2, r3 801e5bc: 4b59 ldr r3, [pc, #356] @ (801e724 ) 801e5be: 681b ldr r3, [r3, #0] 801e5c0: 441a add r2, r3 801e5c2: 687b ldr r3, [r7, #4] 801e5c4: 625a str r2, [r3, #36] @ 0x24 /* Update the receiver's (our) window. */ LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen); 801e5c6: 687b ldr r3, [r7, #4] 801e5c8: 8d1a ldrh r2, [r3, #40] @ 0x28 801e5ca: 4b55 ldr r3, [pc, #340] @ (801e720 ) 801e5cc: 881b ldrh r3, [r3, #0] 801e5ce: 429a cmp r2, r3 801e5d0: d206 bcs.n 801e5e0 801e5d2: 4b56 ldr r3, [pc, #344] @ (801e72c ) 801e5d4: f240 6207 movw r2, #1543 @ 0x607 801e5d8: 4957 ldr r1, [pc, #348] @ (801e738 ) 801e5da: 4856 ldr r0, [pc, #344] @ (801e734 ) 801e5dc: f00b f9f6 bl 80299cc pcb->rcv_wnd -= tcplen; 801e5e0: 687b ldr r3, [r7, #4] 801e5e2: 8d1a ldrh r2, [r3, #40] @ 0x28 801e5e4: 4b4e ldr r3, [pc, #312] @ (801e720 ) 801e5e6: 881b ldrh r3, [r3, #0] 801e5e8: 1ad3 subs r3, r2, r3 801e5ea: b29a uxth r2, r3 801e5ec: 687b ldr r3, [r7, #4] 801e5ee: 851a strh r2, [r3, #40] @ 0x28 tcp_update_rcv_ann_wnd(pcb); 801e5f0: 6878 ldr r0, [r7, #4] 801e5f2: f7fc fd85 bl 801b100 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) { 801e5f6: 4b4c ldr r3, [pc, #304] @ (801e728 ) 801e5f8: 685b ldr r3, [r3, #4] 801e5fa: 891b ldrh r3, [r3, #8] 801e5fc: 2b00 cmp r3, #0 801e5fe: d006 beq.n 801e60e recv_data = inseg.p; 801e600: 4b49 ldr r3, [pc, #292] @ (801e728 ) 801e602: 685b ldr r3, [r3, #4] 801e604: 4a4d ldr r2, [pc, #308] @ (801e73c ) 801e606: 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; 801e608: 4b47 ldr r3, [pc, #284] @ (801e728 ) 801e60a: 2200 movs r2, #0 801e60c: 605a str r2, [r3, #4] } if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 801e60e: 4b46 ldr r3, [pc, #280] @ (801e728 ) 801e610: 691b ldr r3, [r3, #16] 801e612: 899b ldrh r3, [r3, #12] 801e614: b29b uxth r3, r3 801e616: 4618 mov r0, r3 801e618: f7fa fa7e bl 8018b18 801e61c: 4603 mov r3, r0 801e61e: b2db uxtb r3, r3 801e620: f003 0301 and.w r3, r3, #1 801e624: 2b00 cmp r3, #0 801e626: f000 80b8 beq.w 801e79a LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n")); recv_flags |= TF_GOT_FIN; 801e62a: 4b45 ldr r3, [pc, #276] @ (801e740 ) 801e62c: 781b ldrb r3, [r3, #0] 801e62e: f043 0320 orr.w r3, r3, #32 801e632: b2da uxtb r2, r3 801e634: 4b42 ldr r3, [pc, #264] @ (801e740 ) 801e636: 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 && 801e638: e0af b.n 801e79a pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { struct tcp_seg *cseg = pcb->ooseq; 801e63a: 687b ldr r3, [r7, #4] 801e63c: 6f5b ldr r3, [r3, #116] @ 0x74 801e63e: 60bb str r3, [r7, #8] seqno = pcb->ooseq->tcphdr->seqno; 801e640: 687b ldr r3, [r7, #4] 801e642: 6f5b ldr r3, [r3, #116] @ 0x74 801e644: 691b ldr r3, [r3, #16] 801e646: 685b ldr r3, [r3, #4] 801e648: 4a36 ldr r2, [pc, #216] @ (801e724 ) 801e64a: 6013 str r3, [r2, #0] pcb->rcv_nxt += TCP_TCPLEN(cseg); 801e64c: 68bb ldr r3, [r7, #8] 801e64e: 891b ldrh r3, [r3, #8] 801e650: 461c mov r4, r3 801e652: 68bb ldr r3, [r7, #8] 801e654: 691b ldr r3, [r3, #16] 801e656: 899b ldrh r3, [r3, #12] 801e658: b29b uxth r3, r3 801e65a: 4618 mov r0, r3 801e65c: f7fa fa5c bl 8018b18 801e660: 4603 mov r3, r0 801e662: b2db uxtb r3, r3 801e664: f003 0303 and.w r3, r3, #3 801e668: 2b00 cmp r3, #0 801e66a: d001 beq.n 801e670 801e66c: 2301 movs r3, #1 801e66e: e000 b.n 801e672 801e670: 2300 movs r3, #0 801e672: 191a adds r2, r3, r4 801e674: 687b ldr r3, [r7, #4] 801e676: 6a5b ldr r3, [r3, #36] @ 0x24 801e678: 441a add r2, r3 801e67a: 687b ldr r3, [r7, #4] 801e67c: 625a str r2, [r3, #36] @ 0x24 LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n", 801e67e: 687b ldr r3, [r7, #4] 801e680: 8d1b ldrh r3, [r3, #40] @ 0x28 801e682: 461c mov r4, r3 801e684: 68bb ldr r3, [r7, #8] 801e686: 891b ldrh r3, [r3, #8] 801e688: 461d mov r5, r3 801e68a: 68bb ldr r3, [r7, #8] 801e68c: 691b ldr r3, [r3, #16] 801e68e: 899b ldrh r3, [r3, #12] 801e690: b29b uxth r3, r3 801e692: 4618 mov r0, r3 801e694: f7fa fa40 bl 8018b18 801e698: 4603 mov r3, r0 801e69a: b2db uxtb r3, r3 801e69c: f003 0303 and.w r3, r3, #3 801e6a0: 2b00 cmp r3, #0 801e6a2: d001 beq.n 801e6a8 801e6a4: 2301 movs r3, #1 801e6a6: e000 b.n 801e6aa 801e6a8: 2300 movs r3, #0 801e6aa: 442b add r3, r5 801e6ac: 429c cmp r4, r3 801e6ae: d206 bcs.n 801e6be 801e6b0: 4b1e ldr r3, [pc, #120] @ (801e72c ) 801e6b2: f240 622b movw r2, #1579 @ 0x62b 801e6b6: 4923 ldr r1, [pc, #140] @ (801e744 ) 801e6b8: 481e ldr r0, [pc, #120] @ (801e734 ) 801e6ba: f00b f987 bl 80299cc pcb->rcv_wnd >= TCP_TCPLEN(cseg)); pcb->rcv_wnd -= TCP_TCPLEN(cseg); 801e6be: 68bb ldr r3, [r7, #8] 801e6c0: 891b ldrh r3, [r3, #8] 801e6c2: 461c mov r4, r3 801e6c4: 68bb ldr r3, [r7, #8] 801e6c6: 691b ldr r3, [r3, #16] 801e6c8: 899b ldrh r3, [r3, #12] 801e6ca: b29b uxth r3, r3 801e6cc: 4618 mov r0, r3 801e6ce: f7fa fa23 bl 8018b18 801e6d2: 4603 mov r3, r0 801e6d4: b2db uxtb r3, r3 801e6d6: f003 0303 and.w r3, r3, #3 801e6da: 2b00 cmp r3, #0 801e6dc: d001 beq.n 801e6e2 801e6de: 2301 movs r3, #1 801e6e0: e000 b.n 801e6e4 801e6e2: 2300 movs r3, #0 801e6e4: 1919 adds r1, r3, r4 801e6e6: 687b ldr r3, [r7, #4] 801e6e8: 8d1a ldrh r2, [r3, #40] @ 0x28 801e6ea: b28b uxth r3, r1 801e6ec: 1ad3 subs r3, r2, r3 801e6ee: b29a uxth r2, r3 801e6f0: 687b ldr r3, [r7, #4] 801e6f2: 851a strh r2, [r3, #40] @ 0x28 tcp_update_rcv_ann_wnd(pcb); 801e6f4: 6878 ldr r0, [r7, #4] 801e6f6: f7fc fd03 bl 801b100 if (cseg->p->tot_len > 0) { 801e6fa: 68bb ldr r3, [r7, #8] 801e6fc: 685b ldr r3, [r3, #4] 801e6fe: 891b ldrh r3, [r3, #8] 801e700: 2b00 cmp r3, #0 801e702: d028 beq.n 801e756 /* 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) { 801e704: 4b0d ldr r3, [pc, #52] @ (801e73c ) 801e706: 681b ldr r3, [r3, #0] 801e708: 2b00 cmp r3, #0 801e70a: d01d beq.n 801e748 pbuf_cat(recv_data, cseg->p); 801e70c: 4b0b ldr r3, [pc, #44] @ (801e73c ) 801e70e: 681a ldr r2, [r3, #0] 801e710: 68bb ldr r3, [r7, #8] 801e712: 685b ldr r3, [r3, #4] 801e714: 4619 mov r1, r3 801e716: 4610 mov r0, r2 801e718: f7fb ffae bl 801a678 801e71c: e018 b.n 801e750 801e71e: bf00 nop 801e720: 2402aece .word 0x2402aece 801e724: 2402aec4 .word 0x2402aec4 801e728: 2402aea0 .word 0x2402aea0 801e72c: 0802ed10 .word 0x0802ed10 801e730: 0802f0f0 .word 0x0802f0f0 801e734: 0802ed5c .word 0x0802ed5c 801e738: 0802f12c .word 0x0802f12c 801e73c: 2402aed4 .word 0x2402aed4 801e740: 2402aed1 .word 0x2402aed1 801e744: 0802f14c .word 0x0802f14c } else { recv_data = cseg->p; 801e748: 68bb ldr r3, [r7, #8] 801e74a: 685b ldr r3, [r3, #4] 801e74c: 4a70 ldr r2, [pc, #448] @ (801e910 ) 801e74e: 6013 str r3, [r2, #0] } cseg->p = NULL; 801e750: 68bb ldr r3, [r7, #8] 801e752: 2200 movs r2, #0 801e754: 605a str r2, [r3, #4] } if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { 801e756: 68bb ldr r3, [r7, #8] 801e758: 691b ldr r3, [r3, #16] 801e75a: 899b ldrh r3, [r3, #12] 801e75c: b29b uxth r3, r3 801e75e: 4618 mov r0, r3 801e760: f7fa f9da bl 8018b18 801e764: 4603 mov r3, r0 801e766: b2db uxtb r3, r3 801e768: f003 0301 and.w r3, r3, #1 801e76c: 2b00 cmp r3, #0 801e76e: d00d beq.n 801e78c LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: dequeued FIN.\n")); recv_flags |= TF_GOT_FIN; 801e770: 4b68 ldr r3, [pc, #416] @ (801e914 ) 801e772: 781b ldrb r3, [r3, #0] 801e774: f043 0320 orr.w r3, r3, #32 801e778: b2da uxtb r2, r3 801e77a: 4b66 ldr r3, [pc, #408] @ (801e914 ) 801e77c: 701a strb r2, [r3, #0] if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */ 801e77e: 687b ldr r3, [r7, #4] 801e780: 7d1b ldrb r3, [r3, #20] 801e782: 2b04 cmp r3, #4 801e784: d102 bne.n 801e78c pcb->state = CLOSE_WAIT; 801e786: 687b ldr r3, [r7, #4] 801e788: 2207 movs r2, #7 801e78a: 751a strb r2, [r3, #20] } } pcb->ooseq = cseg->next; 801e78c: 68bb ldr r3, [r7, #8] 801e78e: 681a ldr r2, [r3, #0] 801e790: 687b ldr r3, [r7, #4] 801e792: 675a str r2, [r3, #116] @ 0x74 tcp_seg_free(cseg); 801e794: 68b8 ldr r0, [r7, #8] 801e796: f7fd fafa bl 801bd8e while (pcb->ooseq != NULL && 801e79a: 687b ldr r3, [r7, #4] 801e79c: 6f5b ldr r3, [r3, #116] @ 0x74 801e79e: 2b00 cmp r3, #0 801e7a0: d008 beq.n 801e7b4 pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { 801e7a2: 687b ldr r3, [r7, #4] 801e7a4: 6f5b ldr r3, [r3, #116] @ 0x74 801e7a6: 691b ldr r3, [r3, #16] 801e7a8: 685a ldr r2, [r3, #4] 801e7aa: 687b ldr r3, [r7, #4] 801e7ac: 6a5b ldr r3, [r3, #36] @ 0x24 while (pcb->ooseq != NULL && 801e7ae: 429a cmp r2, r3 801e7b0: f43f af43 beq.w 801e63a #endif /* LWIP_TCP_SACK_OUT */ #endif /* TCP_QUEUE_OOSEQ */ /* Acknowledge the segment(s). */ tcp_ack(pcb); 801e7b4: 687b ldr r3, [r7, #4] 801e7b6: 8b5b ldrh r3, [r3, #26] 801e7b8: f003 0301 and.w r3, r3, #1 801e7bc: 2b00 cmp r3, #0 801e7be: d00e beq.n 801e7de 801e7c0: 687b ldr r3, [r7, #4] 801e7c2: 8b5b ldrh r3, [r3, #26] 801e7c4: f023 0301 bic.w r3, r3, #1 801e7c8: b29a uxth r2, r3 801e7ca: 687b ldr r3, [r7, #4] 801e7cc: 835a strh r2, [r3, #26] 801e7ce: 687b ldr r3, [r7, #4] 801e7d0: 8b5b ldrh r3, [r3, #26] 801e7d2: f043 0302 orr.w r3, r3, #2 801e7d6: b29a uxth r2, r3 801e7d8: 687b ldr r3, [r7, #4] 801e7da: 835a strh r2, [r3, #26] if (pcb->rcv_nxt == seqno) { 801e7dc: e187 b.n 801eaee tcp_ack(pcb); 801e7de: 687b ldr r3, [r7, #4] 801e7e0: 8b5b ldrh r3, [r3, #26] 801e7e2: f043 0301 orr.w r3, r3, #1 801e7e6: b29a uxth r2, r3 801e7e8: 687b ldr r3, [r7, #4] 801e7ea: 835a strh r2, [r3, #26] if (pcb->rcv_nxt == seqno) { 801e7ec: e17f b.n 801eaee } 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) { 801e7ee: 687b ldr r3, [r7, #4] 801e7f0: 6f5b ldr r3, [r3, #116] @ 0x74 801e7f2: 2b00 cmp r3, #0 801e7f4: d106 bne.n 801e804 pcb->ooseq = tcp_seg_copy(&inseg); 801e7f6: 4848 ldr r0, [pc, #288] @ (801e918 ) 801e7f8: f7fd fae2 bl 801bdc0 801e7fc: 4602 mov r2, r0 801e7fe: 687b ldr r3, [r7, #4] 801e800: 675a str r2, [r3, #116] @ 0x74 801e802: e16c b.n 801eade #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; 801e804: 2300 movs r3, #0 801e806: 637b str r3, [r7, #52] @ 0x34 for (next = pcb->ooseq; next != NULL; next = next->next) { 801e808: 687b ldr r3, [r7, #4] 801e80a: 6f5b ldr r3, [r3, #116] @ 0x74 801e80c: 63bb str r3, [r7, #56] @ 0x38 801e80e: e156 b.n 801eabe if (seqno == next->tcphdr->seqno) { 801e810: 6bbb ldr r3, [r7, #56] @ 0x38 801e812: 691b ldr r3, [r3, #16] 801e814: 685a ldr r2, [r3, #4] 801e816: 4b41 ldr r3, [pc, #260] @ (801e91c ) 801e818: 681b ldr r3, [r3, #0] 801e81a: 429a cmp r2, r3 801e81c: d11d bne.n 801e85a /* 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) { 801e81e: 4b3e ldr r3, [pc, #248] @ (801e918 ) 801e820: 891a ldrh r2, [r3, #8] 801e822: 6bbb ldr r3, [r7, #56] @ 0x38 801e824: 891b ldrh r3, [r3, #8] 801e826: 429a cmp r2, r3 801e828: f240 814e bls.w 801eac8 /* 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); 801e82c: 483a ldr r0, [pc, #232] @ (801e918 ) 801e82e: f7fd fac7 bl 801bdc0 801e832: 6178 str r0, [r7, #20] if (cseg != NULL) { 801e834: 697b ldr r3, [r7, #20] 801e836: 2b00 cmp r3, #0 801e838: f000 8148 beq.w 801eacc if (prev != NULL) { 801e83c: 6b7b ldr r3, [r7, #52] @ 0x34 801e83e: 2b00 cmp r3, #0 801e840: d003 beq.n 801e84a prev->next = cseg; 801e842: 6b7b ldr r3, [r7, #52] @ 0x34 801e844: 697a ldr r2, [r7, #20] 801e846: 601a str r2, [r3, #0] 801e848: e002 b.n 801e850 } else { pcb->ooseq = cseg; 801e84a: 687b ldr r3, [r7, #4] 801e84c: 697a ldr r2, [r7, #20] 801e84e: 675a str r2, [r3, #116] @ 0x74 } tcp_oos_insert_segment(cseg, next); 801e850: 6bb9 ldr r1, [r7, #56] @ 0x38 801e852: 6978 ldr r0, [r7, #20] 801e854: f7ff f8de bl 801da14 } break; 801e858: e138 b.n 801eacc segment was smaller than the old one; in either case, we ditch the incoming segment. */ break; } } else { if (prev == NULL) { 801e85a: 6b7b ldr r3, [r7, #52] @ 0x34 801e85c: 2b00 cmp r3, #0 801e85e: d117 bne.n 801e890 if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) { 801e860: 4b2e ldr r3, [pc, #184] @ (801e91c ) 801e862: 681a ldr r2, [r3, #0] 801e864: 6bbb ldr r3, [r7, #56] @ 0x38 801e866: 691b ldr r3, [r3, #16] 801e868: 685b ldr r3, [r3, #4] 801e86a: 1ad3 subs r3, r2, r3 801e86c: 2b00 cmp r3, #0 801e86e: da57 bge.n 801e920 /* 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); 801e870: 4829 ldr r0, [pc, #164] @ (801e918 ) 801e872: f7fd faa5 bl 801bdc0 801e876: 61b8 str r0, [r7, #24] if (cseg != NULL) { 801e878: 69bb ldr r3, [r7, #24] 801e87a: 2b00 cmp r3, #0 801e87c: f000 8128 beq.w 801ead0 pcb->ooseq = cseg; 801e880: 687b ldr r3, [r7, #4] 801e882: 69ba ldr r2, [r7, #24] 801e884: 675a str r2, [r3, #116] @ 0x74 tcp_oos_insert_segment(cseg, next); 801e886: 6bb9 ldr r1, [r7, #56] @ 0x38 801e888: 69b8 ldr r0, [r7, #24] 801e88a: f7ff f8c3 bl 801da14 } break; 801e88e: e11f b.n 801ead0 } } 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)) { 801e890: 4b22 ldr r3, [pc, #136] @ (801e91c ) 801e892: 681a ldr r2, [r3, #0] 801e894: 6b7b ldr r3, [r7, #52] @ 0x34 801e896: 691b ldr r3, [r3, #16] 801e898: 685b ldr r3, [r3, #4] 801e89a: 1ad3 subs r3, r2, r3 801e89c: 3b01 subs r3, #1 801e89e: 2b00 cmp r3, #0 801e8a0: db3e blt.n 801e920 801e8a2: 4b1e ldr r3, [pc, #120] @ (801e91c ) 801e8a4: 681a ldr r2, [r3, #0] 801e8a6: 6bbb ldr r3, [r7, #56] @ 0x38 801e8a8: 691b ldr r3, [r3, #16] 801e8aa: 685b ldr r3, [r3, #4] 801e8ac: 1ad3 subs r3, r2, r3 801e8ae: 3301 adds r3, #1 801e8b0: 2b00 cmp r3, #0 801e8b2: dc35 bgt.n 801e920 /* 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); 801e8b4: 4818 ldr r0, [pc, #96] @ (801e918 ) 801e8b6: f7fd fa83 bl 801bdc0 801e8ba: 61f8 str r0, [r7, #28] if (cseg != NULL) { 801e8bc: 69fb ldr r3, [r7, #28] 801e8be: 2b00 cmp r3, #0 801e8c0: f000 8108 beq.w 801ead4 if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) { 801e8c4: 6b7b ldr r3, [r7, #52] @ 0x34 801e8c6: 691b ldr r3, [r3, #16] 801e8c8: 685b ldr r3, [r3, #4] 801e8ca: 6b7a ldr r2, [r7, #52] @ 0x34 801e8cc: 8912 ldrh r2, [r2, #8] 801e8ce: 441a add r2, r3 801e8d0: 4b12 ldr r3, [pc, #72] @ (801e91c ) 801e8d2: 681b ldr r3, [r3, #0] 801e8d4: 1ad3 subs r3, r2, r3 801e8d6: 2b00 cmp r3, #0 801e8d8: dd12 ble.n 801e900 /* We need to trim the prev segment. */ prev->len = (u16_t)(seqno - prev->tcphdr->seqno); 801e8da: 4b10 ldr r3, [pc, #64] @ (801e91c ) 801e8dc: 681b ldr r3, [r3, #0] 801e8de: b29a uxth r2, r3 801e8e0: 6b7b ldr r3, [r7, #52] @ 0x34 801e8e2: 691b ldr r3, [r3, #16] 801e8e4: 685b ldr r3, [r3, #4] 801e8e6: b29b uxth r3, r3 801e8e8: 1ad3 subs r3, r2, r3 801e8ea: b29a uxth r2, r3 801e8ec: 6b7b ldr r3, [r7, #52] @ 0x34 801e8ee: 811a strh r2, [r3, #8] pbuf_realloc(prev->p, prev->len); 801e8f0: 6b7b ldr r3, [r7, #52] @ 0x34 801e8f2: 685a ldr r2, [r3, #4] 801e8f4: 6b7b ldr r3, [r7, #52] @ 0x34 801e8f6: 891b ldrh r3, [r3, #8] 801e8f8: 4619 mov r1, r3 801e8fa: 4610 mov r0, r2 801e8fc: f7fb fc38 bl 801a170 } prev->next = cseg; 801e900: 6b7b ldr r3, [r7, #52] @ 0x34 801e902: 69fa ldr r2, [r7, #28] 801e904: 601a str r2, [r3, #0] tcp_oos_insert_segment(cseg, next); 801e906: 6bb9 ldr r1, [r7, #56] @ 0x38 801e908: 69f8 ldr r0, [r7, #28] 801e90a: f7ff f883 bl 801da14 } break; 801e90e: e0e1 b.n 801ead4 801e910: 2402aed4 .word 0x2402aed4 801e914: 2402aed1 .word 0x2402aed1 801e918: 2402aea0 .word 0x2402aea0 801e91c: 2402aec4 .word 0x2402aec4 #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; 801e920: 6bbb ldr r3, [r7, #56] @ 0x38 801e922: 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 && 801e924: 6bbb ldr r3, [r7, #56] @ 0x38 801e926: 681b ldr r3, [r3, #0] 801e928: 2b00 cmp r3, #0 801e92a: f040 80c5 bne.w 801eab8 TCP_SEQ_GT(seqno, next->tcphdr->seqno)) { 801e92e: 4b7f ldr r3, [pc, #508] @ (801eb2c ) 801e930: 681a ldr r2, [r3, #0] 801e932: 6bbb ldr r3, [r7, #56] @ 0x38 801e934: 691b ldr r3, [r3, #16] 801e936: 685b ldr r3, [r3, #4] 801e938: 1ad3 subs r3, r2, r3 if (next->next == NULL && 801e93a: 2b00 cmp r3, #0 801e93c: f340 80bc ble.w 801eab8 if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) { 801e940: 6bbb ldr r3, [r7, #56] @ 0x38 801e942: 691b ldr r3, [r3, #16] 801e944: 899b ldrh r3, [r3, #12] 801e946: b29b uxth r3, r3 801e948: 4618 mov r0, r3 801e94a: f7fa f8e5 bl 8018b18 801e94e: 4603 mov r3, r0 801e950: b2db uxtb r3, r3 801e952: f003 0301 and.w r3, r3, #1 801e956: 2b00 cmp r3, #0 801e958: f040 80be bne.w 801ead8 /* segment "next" already contains all data */ break; } next->next = tcp_seg_copy(&inseg); 801e95c: 4874 ldr r0, [pc, #464] @ (801eb30 ) 801e95e: f7fd fa2f bl 801bdc0 801e962: 4602 mov r2, r0 801e964: 6bbb ldr r3, [r7, #56] @ 0x38 801e966: 601a str r2, [r3, #0] if (next->next != NULL) { 801e968: 6bbb ldr r3, [r7, #56] @ 0x38 801e96a: 681b ldr r3, [r3, #0] 801e96c: 2b00 cmp r3, #0 801e96e: f000 80b5 beq.w 801eadc if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) { 801e972: 6bbb ldr r3, [r7, #56] @ 0x38 801e974: 691b ldr r3, [r3, #16] 801e976: 685b ldr r3, [r3, #4] 801e978: 6bba ldr r2, [r7, #56] @ 0x38 801e97a: 8912 ldrh r2, [r2, #8] 801e97c: 441a add r2, r3 801e97e: 4b6b ldr r3, [pc, #428] @ (801eb2c ) 801e980: 681b ldr r3, [r3, #0] 801e982: 1ad3 subs r3, r2, r3 801e984: 2b00 cmp r3, #0 801e986: dd12 ble.n 801e9ae /* We need to trim the last segment. */ next->len = (u16_t)(seqno - next->tcphdr->seqno); 801e988: 4b68 ldr r3, [pc, #416] @ (801eb2c ) 801e98a: 681b ldr r3, [r3, #0] 801e98c: b29a uxth r2, r3 801e98e: 6bbb ldr r3, [r7, #56] @ 0x38 801e990: 691b ldr r3, [r3, #16] 801e992: 685b ldr r3, [r3, #4] 801e994: b29b uxth r3, r3 801e996: 1ad3 subs r3, r2, r3 801e998: b29a uxth r2, r3 801e99a: 6bbb ldr r3, [r7, #56] @ 0x38 801e99c: 811a strh r2, [r3, #8] pbuf_realloc(next->p, next->len); 801e99e: 6bbb ldr r3, [r7, #56] @ 0x38 801e9a0: 685a ldr r2, [r3, #4] 801e9a2: 6bbb ldr r3, [r7, #56] @ 0x38 801e9a4: 891b ldrh r3, [r3, #8] 801e9a6: 4619 mov r1, r3 801e9a8: 4610 mov r0, r2 801e9aa: f7fb fbe1 bl 801a170 } /* 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)) { 801e9ae: 4b61 ldr r3, [pc, #388] @ (801eb34 ) 801e9b0: 881b ldrh r3, [r3, #0] 801e9b2: 461a mov r2, r3 801e9b4: 4b5d ldr r3, [pc, #372] @ (801eb2c ) 801e9b6: 681b ldr r3, [r3, #0] 801e9b8: 441a add r2, r3 801e9ba: 687b ldr r3, [r7, #4] 801e9bc: 6a5b ldr r3, [r3, #36] @ 0x24 801e9be: 6879 ldr r1, [r7, #4] 801e9c0: 8d09 ldrh r1, [r1, #40] @ 0x28 801e9c2: 440b add r3, r1 801e9c4: 1ad3 subs r3, r2, r3 801e9c6: 2b00 cmp r3, #0 801e9c8: f340 8088 ble.w 801eadc 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) { 801e9cc: 6bbb ldr r3, [r7, #56] @ 0x38 801e9ce: 681b ldr r3, [r3, #0] 801e9d0: 691b ldr r3, [r3, #16] 801e9d2: 899b ldrh r3, [r3, #12] 801e9d4: b29b uxth r3, r3 801e9d6: 4618 mov r0, r3 801e9d8: f7fa f89e bl 8018b18 801e9dc: 4603 mov r3, r0 801e9de: b2db uxtb r3, r3 801e9e0: f003 0301 and.w r3, r3, #1 801e9e4: 2b00 cmp r3, #0 801e9e6: d021 beq.n 801ea2c /* 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); 801e9e8: 6bbb ldr r3, [r7, #56] @ 0x38 801e9ea: 681b ldr r3, [r3, #0] 801e9ec: 691b ldr r3, [r3, #16] 801e9ee: 899b ldrh r3, [r3, #12] 801e9f0: b29b uxth r3, r3 801e9f2: b21b sxth r3, r3 801e9f4: f423 537c bic.w r3, r3, #16128 @ 0x3f00 801e9f8: b21c sxth r4, r3 801e9fa: 6bbb ldr r3, [r7, #56] @ 0x38 801e9fc: 681b ldr r3, [r3, #0] 801e9fe: 691b ldr r3, [r3, #16] 801ea00: 899b ldrh r3, [r3, #12] 801ea02: b29b uxth r3, r3 801ea04: 4618 mov r0, r3 801ea06: f7fa f887 bl 8018b18 801ea0a: 4603 mov r3, r0 801ea0c: b2db uxtb r3, r3 801ea0e: f003 033e and.w r3, r3, #62 @ 0x3e 801ea12: b29b uxth r3, r3 801ea14: 4618 mov r0, r3 801ea16: f7fa f87f bl 8018b18 801ea1a: 4603 mov r3, r0 801ea1c: b21b sxth r3, r3 801ea1e: 4323 orrs r3, r4 801ea20: b21a sxth r2, r3 801ea22: 6bbb ldr r3, [r7, #56] @ 0x38 801ea24: 681b ldr r3, [r3, #0] 801ea26: 691b ldr r3, [r3, #16] 801ea28: b292 uxth r2, r2 801ea2a: 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); 801ea2c: 687b ldr r3, [r7, #4] 801ea2e: 6a5b ldr r3, [r3, #36] @ 0x24 801ea30: b29a uxth r2, r3 801ea32: 687b ldr r3, [r7, #4] 801ea34: 8d1b ldrh r3, [r3, #40] @ 0x28 801ea36: 4413 add r3, r2 801ea38: b299 uxth r1, r3 801ea3a: 4b3c ldr r3, [pc, #240] @ (801eb2c ) 801ea3c: 681b ldr r3, [r3, #0] 801ea3e: b29a uxth r2, r3 801ea40: 6bbb ldr r3, [r7, #56] @ 0x38 801ea42: 681b ldr r3, [r3, #0] 801ea44: 1a8a subs r2, r1, r2 801ea46: b292 uxth r2, r2 801ea48: 811a strh r2, [r3, #8] pbuf_realloc(next->next->p, next->next->len); 801ea4a: 6bbb ldr r3, [r7, #56] @ 0x38 801ea4c: 681b ldr r3, [r3, #0] 801ea4e: 685a ldr r2, [r3, #4] 801ea50: 6bbb ldr r3, [r7, #56] @ 0x38 801ea52: 681b ldr r3, [r3, #0] 801ea54: 891b ldrh r3, [r3, #8] 801ea56: 4619 mov r1, r3 801ea58: 4610 mov r0, r2 801ea5a: f7fb fb89 bl 801a170 tcplen = TCP_TCPLEN(next->next); 801ea5e: 6bbb ldr r3, [r7, #56] @ 0x38 801ea60: 681b ldr r3, [r3, #0] 801ea62: 891c ldrh r4, [r3, #8] 801ea64: 6bbb ldr r3, [r7, #56] @ 0x38 801ea66: 681b ldr r3, [r3, #0] 801ea68: 691b ldr r3, [r3, #16] 801ea6a: 899b ldrh r3, [r3, #12] 801ea6c: b29b uxth r3, r3 801ea6e: 4618 mov r0, r3 801ea70: f7fa f852 bl 8018b18 801ea74: 4603 mov r3, r0 801ea76: b2db uxtb r3, r3 801ea78: f003 0303 and.w r3, r3, #3 801ea7c: 2b00 cmp r3, #0 801ea7e: d001 beq.n 801ea84 801ea80: 2301 movs r3, #1 801ea82: e000 b.n 801ea86 801ea84: 2300 movs r3, #0 801ea86: 4423 add r3, r4 801ea88: b29a uxth r2, r3 801ea8a: 4b2a ldr r3, [pc, #168] @ (801eb34 ) 801ea8c: 801a strh r2, [r3, #0] LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", 801ea8e: 4b29 ldr r3, [pc, #164] @ (801eb34 ) 801ea90: 881b ldrh r3, [r3, #0] 801ea92: 461a mov r2, r3 801ea94: 4b25 ldr r3, [pc, #148] @ (801eb2c ) 801ea96: 681b ldr r3, [r3, #0] 801ea98: 441a add r2, r3 801ea9a: 687b ldr r3, [r7, #4] 801ea9c: 6a5b ldr r3, [r3, #36] @ 0x24 801ea9e: 6879 ldr r1, [r7, #4] 801eaa0: 8d09 ldrh r1, [r1, #40] @ 0x28 801eaa2: 440b add r3, r1 801eaa4: 429a cmp r2, r3 801eaa6: d019 beq.n 801eadc 801eaa8: 4b23 ldr r3, [pc, #140] @ (801eb38 ) 801eaaa: f44f 62df mov.w r2, #1784 @ 0x6f8 801eaae: 4923 ldr r1, [pc, #140] @ (801eb3c ) 801eab0: 4823 ldr r0, [pc, #140] @ (801eb40 ) 801eab2: f00a ff8b bl 80299cc (seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd)); } } break; 801eab6: e011 b.n 801eadc for (next = pcb->ooseq; next != NULL; next = next->next) { 801eab8: 6bbb ldr r3, [r7, #56] @ 0x38 801eaba: 681b ldr r3, [r3, #0] 801eabc: 63bb str r3, [r7, #56] @ 0x38 801eabe: 6bbb ldr r3, [r7, #56] @ 0x38 801eac0: 2b00 cmp r3, #0 801eac2: f47f aea5 bne.w 801e810 801eac6: e00a b.n 801eade break; 801eac8: bf00 nop 801eaca: e008 b.n 801eade break; 801eacc: bf00 nop 801eace: e006 b.n 801eade break; 801ead0: bf00 nop 801ead2: e004 b.n 801eade break; 801ead4: bf00 nop 801ead6: e002 b.n 801eade break; 801ead8: bf00 nop 801eada: e000 b.n 801eade break; 801eadc: 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); 801eade: 6878 ldr r0, [r7, #4] 801eae0: f001 fefc bl 80208dc if (pcb->rcv_nxt == seqno) { 801eae4: e003 b.n 801eaee } } else { /* The incoming segment is not within the window. */ tcp_send_empty_ack(pcb); 801eae6: 6878 ldr r0, [r7, #4] 801eae8: f001 fef8 bl 80208dc if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 801eaec: e01a b.n 801eb24 801eaee: e019 b.n 801eb24 } } 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)) { 801eaf0: 4b0e ldr r3, [pc, #56] @ (801eb2c ) 801eaf2: 681a ldr r2, [r3, #0] 801eaf4: 687b ldr r3, [r7, #4] 801eaf6: 6a5b ldr r3, [r3, #36] @ 0x24 801eaf8: 1ad3 subs r3, r2, r3 801eafa: 2b00 cmp r3, #0 801eafc: db0a blt.n 801eb14 801eafe: 4b0b ldr r3, [pc, #44] @ (801eb2c ) 801eb00: 681a ldr r2, [r3, #0] 801eb02: 687b ldr r3, [r7, #4] 801eb04: 6a5b ldr r3, [r3, #36] @ 0x24 801eb06: 6879 ldr r1, [r7, #4] 801eb08: 8d09 ldrh r1, [r1, #40] @ 0x28 801eb0a: 440b add r3, r1 801eb0c: 1ad3 subs r3, r2, r3 801eb0e: 3301 adds r3, #1 801eb10: 2b00 cmp r3, #0 801eb12: dd07 ble.n 801eb24 tcp_ack_now(pcb); 801eb14: 687b ldr r3, [r7, #4] 801eb16: 8b5b ldrh r3, [r3, #26] 801eb18: f043 0302 orr.w r3, r3, #2 801eb1c: b29a uxth r2, r3 801eb1e: 687b ldr r3, [r7, #4] 801eb20: 835a strh r2, [r3, #26] } } } 801eb22: e7ff b.n 801eb24 801eb24: bf00 nop 801eb26: 3750 adds r7, #80 @ 0x50 801eb28: 46bd mov sp, r7 801eb2a: bdb0 pop {r4, r5, r7, pc} 801eb2c: 2402aec4 .word 0x2402aec4 801eb30: 2402aea0 .word 0x2402aea0 801eb34: 2402aece .word 0x2402aece 801eb38: 0802ed10 .word 0x0802ed10 801eb3c: 0802f0b8 .word 0x0802f0b8 801eb40: 0802ed5c .word 0x0802ed5c 0801eb44 : static u8_t tcp_get_next_optbyte(void) { 801eb44: b480 push {r7} 801eb46: b083 sub sp, #12 801eb48: af00 add r7, sp, #0 u16_t optidx = tcp_optidx++; 801eb4a: 4b15 ldr r3, [pc, #84] @ (801eba0 ) 801eb4c: 881b ldrh r3, [r3, #0] 801eb4e: 1c5a adds r2, r3, #1 801eb50: b291 uxth r1, r2 801eb52: 4a13 ldr r2, [pc, #76] @ (801eba0 ) 801eb54: 8011 strh r1, [r2, #0] 801eb56: 80fb strh r3, [r7, #6] if ((tcphdr_opt2 == NULL) || (optidx < tcphdr_opt1len)) { 801eb58: 4b12 ldr r3, [pc, #72] @ (801eba4 ) 801eb5a: 681b ldr r3, [r3, #0] 801eb5c: 2b00 cmp r3, #0 801eb5e: d004 beq.n 801eb6a 801eb60: 4b11 ldr r3, [pc, #68] @ (801eba8 ) 801eb62: 881b ldrh r3, [r3, #0] 801eb64: 88fa ldrh r2, [r7, #6] 801eb66: 429a cmp r2, r3 801eb68: d208 bcs.n 801eb7c u8_t *opts = (u8_t *)tcphdr + TCP_HLEN; 801eb6a: 4b10 ldr r3, [pc, #64] @ (801ebac ) 801eb6c: 681b ldr r3, [r3, #0] 801eb6e: 3314 adds r3, #20 801eb70: 603b str r3, [r7, #0] return opts[optidx]; 801eb72: 88fb ldrh r3, [r7, #6] 801eb74: 683a ldr r2, [r7, #0] 801eb76: 4413 add r3, r2 801eb78: 781b ldrb r3, [r3, #0] 801eb7a: e00b b.n 801eb94 } else { u8_t idx = (u8_t)(optidx - tcphdr_opt1len); 801eb7c: 88fb ldrh r3, [r7, #6] 801eb7e: b2da uxtb r2, r3 801eb80: 4b09 ldr r3, [pc, #36] @ (801eba8 ) 801eb82: 881b ldrh r3, [r3, #0] 801eb84: b2db uxtb r3, r3 801eb86: 1ad3 subs r3, r2, r3 801eb88: 717b strb r3, [r7, #5] return tcphdr_opt2[idx]; 801eb8a: 4b06 ldr r3, [pc, #24] @ (801eba4 ) 801eb8c: 681a ldr r2, [r3, #0] 801eb8e: 797b ldrb r3, [r7, #5] 801eb90: 4413 add r3, r2 801eb92: 781b ldrb r3, [r3, #0] } } 801eb94: 4618 mov r0, r3 801eb96: 370c adds r7, #12 801eb98: 46bd mov sp, r7 801eb9a: f85d 7b04 ldr.w r7, [sp], #4 801eb9e: 4770 bx lr 801eba0: 2402aec0 .word 0x2402aec0 801eba4: 2402aebc .word 0x2402aebc 801eba8: 2402aeba .word 0x2402aeba 801ebac: 2402aeb4 .word 0x2402aeb4 0801ebb0 : * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 801ebb0: b580 push {r7, lr} 801ebb2: b084 sub sp, #16 801ebb4: af00 add r7, sp, #0 801ebb6: 6078 str r0, [r7, #4] u16_t mss; #if LWIP_TCP_TIMESTAMPS u32_t tsval; #endif LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL); 801ebb8: 687b ldr r3, [r7, #4] 801ebba: 2b00 cmp r3, #0 801ebbc: d106 bne.n 801ebcc 801ebbe: 4b33 ldr r3, [pc, #204] @ (801ec8c ) 801ebc0: f240 727d movw r2, #1917 @ 0x77d 801ebc4: 4932 ldr r1, [pc, #200] @ (801ec90 ) 801ebc6: 4833 ldr r0, [pc, #204] @ (801ec94 ) 801ebc8: f00a ff00 bl 80299cc /* Parse the TCP MSS option, if present. */ if (tcphdr_optlen != 0) { 801ebcc: 4b32 ldr r3, [pc, #200] @ (801ec98 ) 801ebce: 881b ldrh r3, [r3, #0] 801ebd0: 2b00 cmp r3, #0 801ebd2: d057 beq.n 801ec84 for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { 801ebd4: 4b31 ldr r3, [pc, #196] @ (801ec9c ) 801ebd6: 2200 movs r2, #0 801ebd8: 801a strh r2, [r3, #0] 801ebda: e047 b.n 801ec6c u8_t opt = tcp_get_next_optbyte(); 801ebdc: f7ff ffb2 bl 801eb44 801ebe0: 4603 mov r3, r0 801ebe2: 73fb strb r3, [r7, #15] switch (opt) { 801ebe4: 7bfb ldrb r3, [r7, #15] 801ebe6: 2b02 cmp r3, #2 801ebe8: d006 beq.n 801ebf8 801ebea: 2b02 cmp r3, #2 801ebec: dc2b bgt.n 801ec46 801ebee: 2b00 cmp r3, #0 801ebf0: d043 beq.n 801ec7a 801ebf2: 2b01 cmp r3, #1 801ebf4: d039 beq.n 801ec6a 801ebf6: e026 b.n 801ec46 /* 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) { 801ebf8: f7ff ffa4 bl 801eb44 801ebfc: 4603 mov r3, r0 801ebfe: 2b04 cmp r3, #4 801ec00: d13d bne.n 801ec7e 801ec02: 4b26 ldr r3, [pc, #152] @ (801ec9c ) 801ec04: 881b ldrh r3, [r3, #0] 801ec06: 3301 adds r3, #1 801ec08: 4a23 ldr r2, [pc, #140] @ (801ec98 ) 801ec0a: 8812 ldrh r2, [r2, #0] 801ec0c: 4293 cmp r3, r2 801ec0e: da36 bge.n 801ec7e /* 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); 801ec10: f7ff ff98 bl 801eb44 801ec14: 4603 mov r3, r0 801ec16: 021b lsls r3, r3, #8 801ec18: 81bb strh r3, [r7, #12] mss |= tcp_get_next_optbyte(); 801ec1a: f7ff ff93 bl 801eb44 801ec1e: 4603 mov r3, r0 801ec20: 461a mov r2, r3 801ec22: 89bb ldrh r3, [r7, #12] 801ec24: 4313 orrs r3, r2 801ec26: 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; 801ec28: 89bb ldrh r3, [r7, #12] 801ec2a: f240 52b4 movw r2, #1460 @ 0x5b4 801ec2e: 4293 cmp r3, r2 801ec30: d804 bhi.n 801ec3c 801ec32: 89bb ldrh r3, [r7, #12] 801ec34: 2b00 cmp r3, #0 801ec36: d001 beq.n 801ec3c 801ec38: 89ba ldrh r2, [r7, #12] 801ec3a: e001 b.n 801ec40 801ec3c: f240 52b4 movw r2, #1460 @ 0x5b4 801ec40: 687b ldr r3, [r7, #4] 801ec42: 865a strh r2, [r3, #50] @ 0x32 break; 801ec44: e012 b.n 801ec6c } break; #endif /* LWIP_TCP_SACK_OUT */ default: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); data = tcp_get_next_optbyte(); 801ec46: f7ff ff7d bl 801eb44 801ec4a: 4603 mov r3, r0 801ec4c: 72fb strb r3, [r7, #11] if (data < 2) { 801ec4e: 7afb ldrb r3, [r7, #11] 801ec50: 2b01 cmp r3, #1 801ec52: d916 bls.n 801ec82 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; 801ec54: 7afb ldrb r3, [r7, #11] 801ec56: b29a uxth r2, r3 801ec58: 4b10 ldr r3, [pc, #64] @ (801ec9c ) 801ec5a: 881b ldrh r3, [r3, #0] 801ec5c: 4413 add r3, r2 801ec5e: b29b uxth r3, r3 801ec60: 3b02 subs r3, #2 801ec62: b29a uxth r2, r3 801ec64: 4b0d ldr r3, [pc, #52] @ (801ec9c ) 801ec66: 801a strh r2, [r3, #0] 801ec68: e000 b.n 801ec6c break; 801ec6a: bf00 nop for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { 801ec6c: 4b0b ldr r3, [pc, #44] @ (801ec9c ) 801ec6e: 881a ldrh r2, [r3, #0] 801ec70: 4b09 ldr r3, [pc, #36] @ (801ec98 ) 801ec72: 881b ldrh r3, [r3, #0] 801ec74: 429a cmp r2, r3 801ec76: d3b1 bcc.n 801ebdc 801ec78: e004 b.n 801ec84 return; 801ec7a: bf00 nop 801ec7c: e002 b.n 801ec84 return; 801ec7e: bf00 nop 801ec80: e000 b.n 801ec84 return; 801ec82: bf00 nop } } } } 801ec84: 3710 adds r7, #16 801ec86: 46bd mov sp, r7 801ec88: bd80 pop {r7, pc} 801ec8a: bf00 nop 801ec8c: 0802ed10 .word 0x0802ed10 801ec90: 0802f174 .word 0x0802f174 801ec94: 0802ed5c .word 0x0802ed5c 801ec98: 2402aeb8 .word 0x2402aeb8 801ec9c: 2402aec0 .word 0x2402aec0 0801eca0 : void tcp_trigger_input_pcb_close(void) { 801eca0: b480 push {r7} 801eca2: af00 add r7, sp, #0 recv_flags |= TF_CLOSED; 801eca4: 4b05 ldr r3, [pc, #20] @ (801ecbc ) 801eca6: 781b ldrb r3, [r3, #0] 801eca8: f043 0310 orr.w r3, r3, #16 801ecac: b2da uxtb r2, r3 801ecae: 4b03 ldr r3, [pc, #12] @ (801ecbc ) 801ecb0: 701a strb r2, [r3, #0] } 801ecb2: bf00 nop 801ecb4: 46bd mov sp, r7 801ecb6: f85d 7b04 ldr.w r7, [sp], #4 801ecba: 4770 bx lr 801ecbc: 2402aed1 .word 0x2402aed1 0801ecc0 : 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) { 801ecc0: b580 push {r7, lr} 801ecc2: b084 sub sp, #16 801ecc4: af00 add r7, sp, #0 801ecc6: 60f8 str r0, [r7, #12] 801ecc8: 60b9 str r1, [r7, #8] 801ecca: 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)) { 801eccc: 68fb ldr r3, [r7, #12] 801ecce: 2b00 cmp r3, #0 801ecd0: d00a beq.n 801ece8 801ecd2: 68fb ldr r3, [r7, #12] 801ecd4: 7a1b ldrb r3, [r3, #8] 801ecd6: 2b00 cmp r3, #0 801ecd8: d006 beq.n 801ece8 return netif_get_by_index(pcb->netif_idx); 801ecda: 68fb ldr r3, [r7, #12] 801ecdc: 7a1b ldrb r3, [r3, #8] 801ecde: 4618 mov r0, r3 801ece0: f7fb f83c bl 8019d5c 801ece4: 4603 mov r3, r0 801ece6: e003 b.n 801ecf0 } else { return ip_route(src, dst); 801ece8: 6878 ldr r0, [r7, #4] 801ecea: f005 fe61 bl 80249b0 801ecee: 4603 mov r3, r0 } } 801ecf0: 4618 mov r0, r3 801ecf2: 3710 adds r7, #16 801ecf4: 46bd mov sp, r7 801ecf6: bd80 pop {r7, pc} 0801ecf8 : * 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) { 801ecf8: b590 push {r4, r7, lr} 801ecfa: b087 sub sp, #28 801ecfc: af00 add r7, sp, #0 801ecfe: 60f8 str r0, [r7, #12] 801ed00: 60b9 str r1, [r7, #8] 801ed02: 603b str r3, [r7, #0] 801ed04: 4613 mov r3, r2 801ed06: 71fb strb r3, [r7, #7] struct tcp_seg *seg; u8_t optlen; LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL); 801ed08: 68fb ldr r3, [r7, #12] 801ed0a: 2b00 cmp r3, #0 801ed0c: d105 bne.n 801ed1a 801ed0e: 4b45 ldr r3, [pc, #276] @ (801ee24 ) 801ed10: 22a3 movs r2, #163 @ 0xa3 801ed12: 4945 ldr r1, [pc, #276] @ (801ee28 ) 801ed14: 4845 ldr r0, [pc, #276] @ (801ee2c ) 801ed16: f00a fe59 bl 80299cc LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL); 801ed1a: 68bb ldr r3, [r7, #8] 801ed1c: 2b00 cmp r3, #0 801ed1e: d105 bne.n 801ed2c 801ed20: 4b40 ldr r3, [pc, #256] @ (801ee24 ) 801ed22: 22a4 movs r2, #164 @ 0xa4 801ed24: 4942 ldr r1, [pc, #264] @ (801ee30 ) 801ed26: 4841 ldr r0, [pc, #260] @ (801ee2c ) 801ed28: f00a fe50 bl 80299cc optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb); 801ed2c: f897 3028 ldrb.w r3, [r7, #40] @ 0x28 801ed30: 009b lsls r3, r3, #2 801ed32: b2db uxtb r3, r3 801ed34: f003 0304 and.w r3, r3, #4 801ed38: 75fb strb r3, [r7, #23] if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 801ed3a: 2003 movs r0, #3 801ed3c: f7fa fc6a bl 8019614 801ed40: 6138 str r0, [r7, #16] 801ed42: 693b ldr r3, [r7, #16] 801ed44: 2b00 cmp r3, #0 801ed46: d104 bne.n 801ed52 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no memory.\n")); pbuf_free(p); 801ed48: 68b8 ldr r0, [r7, #8] 801ed4a: f7fb fbc7 bl 801a4dc return NULL; 801ed4e: 2300 movs r3, #0 801ed50: e063 b.n 801ee1a } seg->flags = optflags; 801ed52: 693b ldr r3, [r7, #16] 801ed54: f897 2028 ldrb.w r2, [r7, #40] @ 0x28 801ed58: 731a strb r2, [r3, #12] seg->next = NULL; 801ed5a: 693b ldr r3, [r7, #16] 801ed5c: 2200 movs r2, #0 801ed5e: 601a str r2, [r3, #0] seg->p = p; 801ed60: 693b ldr r3, [r7, #16] 801ed62: 68ba ldr r2, [r7, #8] 801ed64: 605a str r2, [r3, #4] LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen); 801ed66: 68bb ldr r3, [r7, #8] 801ed68: 891a ldrh r2, [r3, #8] 801ed6a: 7dfb ldrb r3, [r7, #23] 801ed6c: b29b uxth r3, r3 801ed6e: 429a cmp r2, r3 801ed70: d205 bcs.n 801ed7e 801ed72: 4b2c ldr r3, [pc, #176] @ (801ee24 ) 801ed74: 22b0 movs r2, #176 @ 0xb0 801ed76: 492f ldr r1, [pc, #188] @ (801ee34 ) 801ed78: 482c ldr r0, [pc, #176] @ (801ee2c ) 801ed7a: f00a fe27 bl 80299cc seg->len = p->tot_len - optlen; 801ed7e: 68bb ldr r3, [r7, #8] 801ed80: 891a ldrh r2, [r3, #8] 801ed82: 7dfb ldrb r3, [r7, #23] 801ed84: b29b uxth r3, r3 801ed86: 1ad3 subs r3, r2, r3 801ed88: b29a uxth r2, r3 801ed8a: 693b ldr r3, [r7, #16] 801ed8c: 811a strh r2, [r3, #8] #if TCP_OVERSIZE_DBGCHECK seg->oversize_left = 0; 801ed8e: 693b ldr r3, [r7, #16] 801ed90: 2200 movs r2, #0 801ed92: 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)) { 801ed94: 2114 movs r1, #20 801ed96: 68b8 ldr r0, [r7, #8] 801ed98: f7fb fad8 bl 801a34c 801ed9c: 4603 mov r3, r0 801ed9e: 2b00 cmp r3, #0 801eda0: d004 beq.n 801edac 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); 801eda2: 6938 ldr r0, [r7, #16] 801eda4: f7fc fff3 bl 801bd8e return NULL; 801eda8: 2300 movs r3, #0 801edaa: e036 b.n 801ee1a } seg->tcphdr = (struct tcp_hdr *)seg->p->payload; 801edac: 693b ldr r3, [r7, #16] 801edae: 685b ldr r3, [r3, #4] 801edb0: 685a ldr r2, [r3, #4] 801edb2: 693b ldr r3, [r7, #16] 801edb4: 611a str r2, [r3, #16] seg->tcphdr->src = lwip_htons(pcb->local_port); 801edb6: 68fb ldr r3, [r7, #12] 801edb8: 8ada ldrh r2, [r3, #22] 801edba: 693b ldr r3, [r7, #16] 801edbc: 691c ldr r4, [r3, #16] 801edbe: 4610 mov r0, r2 801edc0: f7f9 feaa bl 8018b18 801edc4: 4603 mov r3, r0 801edc6: 8023 strh r3, [r4, #0] seg->tcphdr->dest = lwip_htons(pcb->remote_port); 801edc8: 68fb ldr r3, [r7, #12] 801edca: 8b1a ldrh r2, [r3, #24] 801edcc: 693b ldr r3, [r7, #16] 801edce: 691c ldr r4, [r3, #16] 801edd0: 4610 mov r0, r2 801edd2: f7f9 fea1 bl 8018b18 801edd6: 4603 mov r3, r0 801edd8: 8063 strh r3, [r4, #2] seg->tcphdr->seqno = lwip_htonl(seqno); 801edda: 693b ldr r3, [r7, #16] 801eddc: 691c ldr r4, [r3, #16] 801edde: 6838 ldr r0, [r7, #0] 801ede0: f7f9 feaf bl 8018b42 801ede4: 4603 mov r3, r0 801ede6: 6063 str r3, [r4, #4] /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), hdrflags); 801ede8: 7dfb ldrb r3, [r7, #23] 801edea: 089b lsrs r3, r3, #2 801edec: b2db uxtb r3, r3 801edee: 3305 adds r3, #5 801edf0: b29b uxth r3, r3 801edf2: 031b lsls r3, r3, #12 801edf4: b29a uxth r2, r3 801edf6: 79fb ldrb r3, [r7, #7] 801edf8: b29b uxth r3, r3 801edfa: 4313 orrs r3, r2 801edfc: b29a uxth r2, r3 801edfe: 693b ldr r3, [r7, #16] 801ee00: 691c ldr r4, [r3, #16] 801ee02: 4610 mov r0, r2 801ee04: f7f9 fe88 bl 8018b18 801ee08: 4603 mov r3, r0 801ee0a: 81a3 strh r3, [r4, #12] /* wnd and chksum are set in tcp_output */ seg->tcphdr->urgp = 0; 801ee0c: 693b ldr r3, [r7, #16] 801ee0e: 691b ldr r3, [r3, #16] 801ee10: 2200 movs r2, #0 801ee12: 749a strb r2, [r3, #18] 801ee14: 2200 movs r2, #0 801ee16: 74da strb r2, [r3, #19] return seg; 801ee18: 693b ldr r3, [r7, #16] } 801ee1a: 4618 mov r0, r3 801ee1c: 371c adds r7, #28 801ee1e: 46bd mov sp, r7 801ee20: bd90 pop {r4, r7, pc} 801ee22: bf00 nop 801ee24: 0802f190 .word 0x0802f190 801ee28: 0802f1c4 .word 0x0802f1c4 801ee2c: 0802f1e4 .word 0x0802f1e4 801ee30: 0802f20c .word 0x0802f20c 801ee34: 0802f230 .word 0x0802f230 0801ee38 : #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) { 801ee38: b580 push {r7, lr} 801ee3a: b086 sub sp, #24 801ee3c: af00 add r7, sp, #0 801ee3e: 607b str r3, [r7, #4] 801ee40: 4603 mov r3, r0 801ee42: 73fb strb r3, [r7, #15] 801ee44: 460b mov r3, r1 801ee46: 81bb strh r3, [r7, #12] 801ee48: 4613 mov r3, r2 801ee4a: 817b strh r3, [r7, #10] struct pbuf *p; u16_t alloc = length; 801ee4c: 89bb ldrh r3, [r7, #12] 801ee4e: 82fb strh r3, [r7, #22] LWIP_ASSERT("tcp_pbuf_prealloc: invalid oversize", oversize != NULL); 801ee50: 687b ldr r3, [r7, #4] 801ee52: 2b00 cmp r3, #0 801ee54: d105 bne.n 801ee62 801ee56: 4b30 ldr r3, [pc, #192] @ (801ef18 ) 801ee58: 22e8 movs r2, #232 @ 0xe8 801ee5a: 4930 ldr r1, [pc, #192] @ (801ef1c ) 801ee5c: 4830 ldr r0, [pc, #192] @ (801ef20 ) 801ee5e: f00a fdb5 bl 80299cc LWIP_ASSERT("tcp_pbuf_prealloc: invalid pcb", pcb != NULL); 801ee62: 6a3b ldr r3, [r7, #32] 801ee64: 2b00 cmp r3, #0 801ee66: d105 bne.n 801ee74 801ee68: 4b2b ldr r3, [pc, #172] @ (801ef18 ) 801ee6a: 22e9 movs r2, #233 @ 0xe9 801ee6c: 492d ldr r1, [pc, #180] @ (801ef24 ) 801ee6e: 482c ldr r0, [pc, #176] @ (801ef20 ) 801ee70: f00a fdac bl 80299cc 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) { 801ee74: 89ba ldrh r2, [r7, #12] 801ee76: 897b ldrh r3, [r7, #10] 801ee78: 429a cmp r2, r3 801ee7a: d221 bcs.n 801eec0 * * Did the user set TCP_WRITE_FLAG_MORE? * * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || 801ee7c: f897 3024 ldrb.w r3, [r7, #36] @ 0x24 801ee80: f003 0302 and.w r3, r3, #2 801ee84: 2b00 cmp r3, #0 801ee86: d111 bne.n 801eeac (!(pcb->flags & TF_NODELAY) && 801ee88: 6a3b ldr r3, [r7, #32] 801ee8a: 8b5b ldrh r3, [r3, #26] 801ee8c: f003 0340 and.w r3, r3, #64 @ 0x40 if ((apiflags & TCP_WRITE_FLAG_MORE) || 801ee90: 2b00 cmp r3, #0 801ee92: d115 bne.n 801eec0 (!(pcb->flags & TF_NODELAY) && 801ee94: f897 3028 ldrb.w r3, [r7, #40] @ 0x28 801ee98: 2b00 cmp r3, #0 801ee9a: d007 beq.n 801eeac (!first_seg || pcb->unsent != NULL || 801ee9c: 6a3b ldr r3, [r7, #32] 801ee9e: 6edb ldr r3, [r3, #108] @ 0x6c (!first_seg || 801eea0: 2b00 cmp r3, #0 801eea2: d103 bne.n 801eeac pcb->unacked != NULL))) { 801eea4: 6a3b ldr r3, [r7, #32] 801eea6: 6f1b ldr r3, [r3, #112] @ 0x70 pcb->unsent != NULL || 801eea8: 2b00 cmp r3, #0 801eeaa: d009 beq.n 801eec0 alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(TCP_OVERSIZE_CALC_LENGTH(length))); 801eeac: 89bb ldrh r3, [r7, #12] 801eeae: f203 53b7 addw r3, r3, #1463 @ 0x5b7 801eeb2: f023 0203 bic.w r2, r3, #3 801eeb6: 897b ldrh r3, [r7, #10] 801eeb8: 4293 cmp r3, r2 801eeba: bf28 it cs 801eebc: 4613 movcs r3, r2 801eebe: 82fb strh r3, [r7, #22] } } #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ p = pbuf_alloc(layer, alloc, PBUF_RAM); 801eec0: 8af9 ldrh r1, [r7, #22] 801eec2: 7bfb ldrb r3, [r7, #15] 801eec4: f44f 7220 mov.w r2, #640 @ 0x280 801eec8: 4618 mov r0, r3 801eeca: f7fa fff1 bl 8019eb0 801eece: 6138 str r0, [r7, #16] if (p == NULL) { 801eed0: 693b ldr r3, [r7, #16] 801eed2: 2b00 cmp r3, #0 801eed4: d101 bne.n 801eeda return NULL; 801eed6: 2300 movs r3, #0 801eed8: e019 b.n 801ef0e } LWIP_ASSERT("need unchained pbuf", p->next == NULL); 801eeda: 693b ldr r3, [r7, #16] 801eedc: 681b ldr r3, [r3, #0] 801eede: 2b00 cmp r3, #0 801eee0: d006 beq.n 801eef0 801eee2: 4b0d ldr r3, [pc, #52] @ (801ef18 ) 801eee4: f240 120b movw r2, #267 @ 0x10b 801eee8: 490f ldr r1, [pc, #60] @ (801ef28 ) 801eeea: 480d ldr r0, [pc, #52] @ (801ef20 ) 801eeec: f00a fd6e bl 80299cc *oversize = p->len - length; 801eef0: 693b ldr r3, [r7, #16] 801eef2: 895a ldrh r2, [r3, #10] 801eef4: 89bb ldrh r3, [r7, #12] 801eef6: 1ad3 subs r3, r2, r3 801eef8: b29a uxth r2, r3 801eefa: 687b ldr r3, [r7, #4] 801eefc: 801a strh r2, [r3, #0] /* trim p->len to the currently used size */ p->len = p->tot_len = length; 801eefe: 693b ldr r3, [r7, #16] 801ef00: 89ba ldrh r2, [r7, #12] 801ef02: 811a strh r2, [r3, #8] 801ef04: 693b ldr r3, [r7, #16] 801ef06: 891a ldrh r2, [r3, #8] 801ef08: 693b ldr r3, [r7, #16] 801ef0a: 815a strh r2, [r3, #10] return p; 801ef0c: 693b ldr r3, [r7, #16] } 801ef0e: 4618 mov r0, r3 801ef10: 3718 adds r7, #24 801ef12: 46bd mov sp, r7 801ef14: bd80 pop {r7, pc} 801ef16: bf00 nop 801ef18: 0802f190 .word 0x0802f190 801ef1c: 0802f248 .word 0x0802f248 801ef20: 0802f1e4 .word 0x0802f1e4 801ef24: 0802f26c .word 0x0802f26c 801ef28: 0802f28c .word 0x0802f28c 0801ef2c : * @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) { 801ef2c: b580 push {r7, lr} 801ef2e: b082 sub sp, #8 801ef30: af00 add r7, sp, #0 801ef32: 6078 str r0, [r7, #4] 801ef34: 460b mov r3, r1 801ef36: 807b strh r3, [r7, #2] LWIP_ASSERT("tcp_write_checks: invalid pcb", pcb != NULL); 801ef38: 687b ldr r3, [r7, #4] 801ef3a: 2b00 cmp r3, #0 801ef3c: d106 bne.n 801ef4c 801ef3e: 4b33 ldr r3, [pc, #204] @ (801f00c ) 801ef40: f240 1233 movw r2, #307 @ 0x133 801ef44: 4932 ldr r1, [pc, #200] @ (801f010 ) 801ef46: 4833 ldr r0, [pc, #204] @ (801f014 ) 801ef48: f00a fd40 bl 80299cc /* connection is in invalid state for data transmission? */ if ((pcb->state != ESTABLISHED) && 801ef4c: 687b ldr r3, [r7, #4] 801ef4e: 7d1b ldrb r3, [r3, #20] 801ef50: 2b04 cmp r3, #4 801ef52: d00e beq.n 801ef72 (pcb->state != CLOSE_WAIT) && 801ef54: 687b ldr r3, [r7, #4] 801ef56: 7d1b ldrb r3, [r3, #20] if ((pcb->state != ESTABLISHED) && 801ef58: 2b07 cmp r3, #7 801ef5a: d00a beq.n 801ef72 (pcb->state != SYN_SENT) && 801ef5c: 687b ldr r3, [r7, #4] 801ef5e: 7d1b ldrb r3, [r3, #20] (pcb->state != CLOSE_WAIT) && 801ef60: 2b02 cmp r3, #2 801ef62: d006 beq.n 801ef72 (pcb->state != SYN_RCVD)) { 801ef64: 687b ldr r3, [r7, #4] 801ef66: 7d1b ldrb r3, [r3, #20] (pcb->state != SYN_SENT) && 801ef68: 2b03 cmp r3, #3 801ef6a: d002 beq.n 801ef72 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_STATE | LWIP_DBG_LEVEL_SEVERE, ("tcp_write() called in invalid state\n")); return ERR_CONN; 801ef6c: f06f 030a mvn.w r3, #10 801ef70: e048 b.n 801f004 } else if (len == 0) { 801ef72: 887b ldrh r3, [r7, #2] 801ef74: 2b00 cmp r3, #0 801ef76: d101 bne.n 801ef7c return ERR_OK; 801ef78: 2300 movs r3, #0 801ef7a: e043 b.n 801f004 } /* fail on too much data */ if (len > pcb->snd_buf) { 801ef7c: 687b ldr r3, [r7, #4] 801ef7e: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 801ef82: 887a ldrh r2, [r7, #2] 801ef84: 429a cmp r2, r3 801ef86: d909 bls.n 801ef9c 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); 801ef88: 687b ldr r3, [r7, #4] 801ef8a: 8b5b ldrh r3, [r3, #26] 801ef8c: f043 0380 orr.w r3, r3, #128 @ 0x80 801ef90: b29a uxth r2, r3 801ef92: 687b ldr r3, [r7, #4] 801ef94: 835a strh r2, [r3, #26] return ERR_MEM; 801ef96: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801ef9a: e033 b.n 801f004 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))) { 801ef9c: 687b ldr r3, [r7, #4] 801ef9e: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801efa2: 2b0f cmp r3, #15 801efa4: d909 bls.n 801efba 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); 801efa6: 687b ldr r3, [r7, #4] 801efa8: 8b5b ldrh r3, [r3, #26] 801efaa: f043 0380 orr.w r3, r3, #128 @ 0x80 801efae: b29a uxth r2, r3 801efb0: 687b ldr r3, [r7, #4] 801efb2: 835a strh r2, [r3, #26] return ERR_MEM; 801efb4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801efb8: e024 b.n 801f004 } if (pcb->snd_queuelen != 0) { 801efba: 687b ldr r3, [r7, #4] 801efbc: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801efc0: 2b00 cmp r3, #0 801efc2: d00f beq.n 801efe4 LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty", 801efc4: 687b ldr r3, [r7, #4] 801efc6: 6f1b ldr r3, [r3, #112] @ 0x70 801efc8: 2b00 cmp r3, #0 801efca: d11a bne.n 801f002 801efcc: 687b ldr r3, [r7, #4] 801efce: 6edb ldr r3, [r3, #108] @ 0x6c 801efd0: 2b00 cmp r3, #0 801efd2: d116 bne.n 801f002 801efd4: 4b0d ldr r3, [pc, #52] @ (801f00c ) 801efd6: f240 1255 movw r2, #341 @ 0x155 801efda: 490f ldr r1, [pc, #60] @ (801f018 ) 801efdc: 480d ldr r0, [pc, #52] @ (801f014 ) 801efde: f00a fcf5 bl 80299cc 801efe2: e00e b.n 801f002 pcb->unacked != NULL || pcb->unsent != NULL); } else { LWIP_ASSERT("tcp_write: no pbufs on queue => both queues empty", 801efe4: 687b ldr r3, [r7, #4] 801efe6: 6f1b ldr r3, [r3, #112] @ 0x70 801efe8: 2b00 cmp r3, #0 801efea: d103 bne.n 801eff4 801efec: 687b ldr r3, [r7, #4] 801efee: 6edb ldr r3, [r3, #108] @ 0x6c 801eff0: 2b00 cmp r3, #0 801eff2: d006 beq.n 801f002 801eff4: 4b05 ldr r3, [pc, #20] @ (801f00c ) 801eff6: f44f 72ac mov.w r2, #344 @ 0x158 801effa: 4908 ldr r1, [pc, #32] @ (801f01c ) 801effc: 4805 ldr r0, [pc, #20] @ (801f014 ) 801effe: f00a fce5 bl 80299cc pcb->unacked == NULL && pcb->unsent == NULL); } return ERR_OK; 801f002: 2300 movs r3, #0 } 801f004: 4618 mov r0, r3 801f006: 3708 adds r7, #8 801f008: 46bd mov sp, r7 801f00a: bd80 pop {r7, pc} 801f00c: 0802f190 .word 0x0802f190 801f010: 0802f2a0 .word 0x0802f2a0 801f014: 0802f1e4 .word 0x0802f1e4 801f018: 0802f2c0 .word 0x0802f2c0 801f01c: 0802f2fc .word 0x0802f2fc 0801f020 : * - 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) { 801f020: b590 push {r4, r7, lr} 801f022: b09d sub sp, #116 @ 0x74 801f024: af04 add r7, sp, #16 801f026: 60f8 str r0, [r7, #12] 801f028: 60b9 str r1, [r7, #8] 801f02a: 4611 mov r1, r2 801f02c: 461a mov r2, r3 801f02e: 460b mov r3, r1 801f030: 80fb strh r3, [r7, #6] 801f032: 4613 mov r3, r2 801f034: 717b strb r3, [r7, #5] struct pbuf *concat_p = NULL; 801f036: 2300 movs r3, #0 801f038: 63fb str r3, [r7, #60] @ 0x3c struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; 801f03a: 2300 movs r3, #0 801f03c: 643b str r3, [r7, #64] @ 0x40 801f03e: 2300 movs r3, #0 801f040: 657b str r3, [r7, #84] @ 0x54 801f042: 2300 movs r3, #0 801f044: 653b str r3, [r7, #80] @ 0x50 801f046: 2300 movs r3, #0 801f048: 64fb str r3, [r7, #76] @ 0x4c u16_t pos = 0; /* position in 'arg' data */ 801f04a: 2300 movs r3, #0 801f04c: f8a7 304a strh.w r3, [r7, #74] @ 0x4a u16_t queuelen; u8_t optlen; u8_t optflags = 0; 801f050: 2300 movs r3, #0 801f052: f887 302b strb.w r3, [r7, #43] @ 0x2b #if TCP_OVERSIZE u16_t oversize = 0; 801f056: 2300 movs r3, #0 801f058: 82fb strh r3, [r7, #22] u16_t oversize_used = 0; 801f05a: 2300 movs r3, #0 801f05c: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 #if TCP_OVERSIZE_DBGCHECK u16_t oversize_add = 0; 801f060: 2300 movs r3, #0 801f062: f8a7 305a strh.w r3, [r7, #90] @ 0x5a #endif /* TCP_OVERSIZE_DBGCHECK*/ #endif /* TCP_OVERSIZE */ u16_t extendlen = 0; 801f066: 2300 movs r3, #0 801f068: 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); 801f06c: 68fb ldr r3, [r7, #12] 801f06e: 2b00 cmp r3, #0 801f070: d109 bne.n 801f086 801f072: 4b9d ldr r3, [pc, #628] @ (801f2e8 ) 801f074: f44f 72cf mov.w r2, #414 @ 0x19e 801f078: 499c ldr r1, [pc, #624] @ (801f2ec ) 801f07a: 489d ldr r0, [pc, #628] @ (801f2f0 ) 801f07c: f00a fca6 bl 80299cc 801f080: f06f 030f mvn.w r3, #15 801f084: e37b b.n 801f77e /* 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)); 801f086: 68fb ldr r3, [r7, #12] 801f088: f8b3 3062 ldrh.w r3, [r3, #98] @ 0x62 801f08c: 085b lsrs r3, r3, #1 801f08e: b29a uxth r2, r3 801f090: 68fb ldr r3, [r7, #12] 801f092: 8e5b ldrh r3, [r3, #50] @ 0x32 801f094: 4293 cmp r3, r2 801f096: bf28 it cs 801f098: 4613 movcs r3, r2 801f09a: 853b strh r3, [r7, #40] @ 0x28 mss_local = mss_local ? mss_local : pcb->mss; 801f09c: 8d3b ldrh r3, [r7, #40] @ 0x28 801f09e: 2b00 cmp r3, #0 801f0a0: d102 bne.n 801f0a8 801f0a2: 68fb ldr r3, [r7, #12] 801f0a4: 8e5b ldrh r3, [r3, #50] @ 0x32 801f0a6: e000 b.n 801f0aa 801f0a8: 8d3b ldrh r3, [r7, #40] @ 0x28 801f0aa: 853b strh r3, [r7, #40] @ 0x28 LWIP_ASSERT_CORE_LOCKED(); 801f0ac: f7f1 fa40 bl 8010530 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)", 801f0b0: 68bb ldr r3, [r7, #8] 801f0b2: 2b00 cmp r3, #0 801f0b4: d109 bne.n 801f0ca 801f0b6: 4b8c ldr r3, [pc, #560] @ (801f2e8 ) 801f0b8: f240 12ad movw r2, #429 @ 0x1ad 801f0bc: 498d ldr r1, [pc, #564] @ (801f2f4 ) 801f0be: 488c ldr r0, [pc, #560] @ (801f2f0 ) 801f0c0: f00a fc84 bl 80299cc 801f0c4: f06f 030f mvn.w r3, #15 801f0c8: e359 b.n 801f77e arg != NULL, return ERR_ARG;); err = tcp_write_checks(pcb, len); 801f0ca: 88fb ldrh r3, [r7, #6] 801f0cc: 4619 mov r1, r3 801f0ce: 68f8 ldr r0, [r7, #12] 801f0d0: f7ff ff2c bl 801ef2c 801f0d4: 4603 mov r3, r0 801f0d6: f887 3027 strb.w r3, [r7, #39] @ 0x27 if (err != ERR_OK) { 801f0da: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 801f0de: 2b00 cmp r3, #0 801f0e0: d002 beq.n 801f0e8 return err; 801f0e2: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 801f0e6: e34a b.n 801f77e } queuelen = pcb->snd_queuelen; 801f0e8: 68fb ldr r3, [r7, #12] 801f0ea: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801f0ee: 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); 801f0f2: 2300 movs r3, #0 801f0f4: 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) { 801f0f8: 68fb ldr r3, [r7, #12] 801f0fa: 6edb ldr r3, [r3, #108] @ 0x6c 801f0fc: 2b00 cmp r3, #0 801f0fe: f000 8127 beq.w 801f350 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; 801f102: 68fb ldr r3, [r7, #12] 801f104: 6edb ldr r3, [r3, #108] @ 0x6c 801f106: 643b str r3, [r7, #64] @ 0x40 801f108: e002 b.n 801f110 last_unsent = last_unsent->next); 801f10a: 6c3b ldr r3, [r7, #64] @ 0x40 801f10c: 681b ldr r3, [r3, #0] 801f10e: 643b str r3, [r7, #64] @ 0x40 for (last_unsent = pcb->unsent; last_unsent->next != NULL; 801f110: 6c3b ldr r3, [r7, #64] @ 0x40 801f112: 681b ldr r3, [r3, #0] 801f114: 2b00 cmp r3, #0 801f116: d1f8 bne.n 801f10a /* Usable space at the end of the last unsent segment */ unsent_optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(last_unsent->flags, pcb); 801f118: 6c3b ldr r3, [r7, #64] @ 0x40 801f11a: 7b1b ldrb r3, [r3, #12] 801f11c: 009b lsls r3, r3, #2 801f11e: b29b uxth r3, r3 801f120: f003 0304 and.w r3, r3, #4 801f124: 84bb strh r3, [r7, #36] @ 0x24 LWIP_ASSERT("mss_local is too small", mss_local >= last_unsent->len + unsent_optlen); 801f126: 8d3a ldrh r2, [r7, #40] @ 0x28 801f128: 6c3b ldr r3, [r7, #64] @ 0x40 801f12a: 891b ldrh r3, [r3, #8] 801f12c: 4619 mov r1, r3 801f12e: 8cbb ldrh r3, [r7, #36] @ 0x24 801f130: 440b add r3, r1 801f132: 429a cmp r2, r3 801f134: da06 bge.n 801f144 801f136: 4b6c ldr r3, [pc, #432] @ (801f2e8 ) 801f138: f44f 72f3 mov.w r2, #486 @ 0x1e6 801f13c: 496e ldr r1, [pc, #440] @ (801f2f8 ) 801f13e: 486c ldr r0, [pc, #432] @ (801f2f0 ) 801f140: f00a fc44 bl 80299cc space = mss_local - (last_unsent->len + unsent_optlen); 801f144: 6c3b ldr r3, [r7, #64] @ 0x40 801f146: 891a ldrh r2, [r3, #8] 801f148: 8cbb ldrh r3, [r7, #36] @ 0x24 801f14a: 4413 add r3, r2 801f14c: b29b uxth r3, r3 801f14e: 8d3a ldrh r2, [r7, #40] @ 0x28 801f150: 1ad3 subs r3, r2, r3 801f152: 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)", 801f156: 68fb ldr r3, [r7, #12] 801f158: f8b3 2068 ldrh.w r2, [r3, #104] @ 0x68 801f15c: 6c3b ldr r3, [r7, #64] @ 0x40 801f15e: 895b ldrh r3, [r3, #10] 801f160: 429a cmp r2, r3 801f162: d006 beq.n 801f172 801f164: 4b60 ldr r3, [pc, #384] @ (801f2e8 ) 801f166: f240 12f3 movw r2, #499 @ 0x1f3 801f16a: 4964 ldr r1, [pc, #400] @ (801f2fc ) 801f16c: 4860 ldr r0, [pc, #384] @ (801f2f0 ) 801f16e: f00a fc2d bl 80299cc pcb->unsent_oversize == last_unsent->oversize_left); #endif /* TCP_OVERSIZE_DBGCHECK */ oversize = pcb->unsent_oversize; 801f172: 68fb ldr r3, [r7, #12] 801f174: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 801f178: 82fb strh r3, [r7, #22] if (oversize > 0) { 801f17a: 8afb ldrh r3, [r7, #22] 801f17c: 2b00 cmp r3, #0 801f17e: d02e beq.n 801f1de LWIP_ASSERT("inconsistent oversize vs. space", oversize <= space); 801f180: 8afb ldrh r3, [r7, #22] 801f182: f8b7 205c ldrh.w r2, [r7, #92] @ 0x5c 801f186: 429a cmp r2, r3 801f188: d206 bcs.n 801f198 801f18a: 4b57 ldr r3, [pc, #348] @ (801f2e8 ) 801f18c: f44f 72fc mov.w r2, #504 @ 0x1f8 801f190: 495b ldr r1, [pc, #364] @ (801f300 ) 801f192: 4857 ldr r0, [pc, #348] @ (801f2f0 ) 801f194: f00a fc1a bl 80299cc seg = last_unsent; 801f198: 6c3b ldr r3, [r7, #64] @ 0x40 801f19a: 657b str r3, [r7, #84] @ 0x54 oversize_used = LWIP_MIN(space, LWIP_MIN(oversize, len)); 801f19c: 8afb ldrh r3, [r7, #22] 801f19e: 88fa ldrh r2, [r7, #6] 801f1a0: 4293 cmp r3, r2 801f1a2: bf28 it cs 801f1a4: 4613 movcs r3, r2 801f1a6: b29b uxth r3, r3 801f1a8: f8b7 205c ldrh.w r2, [r7, #92] @ 0x5c 801f1ac: 4293 cmp r3, r2 801f1ae: bf28 it cs 801f1b0: 4613 movcs r3, r2 801f1b2: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 pos += oversize_used; 801f1b6: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 801f1ba: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 801f1be: 4413 add r3, r2 801f1c0: f8a7 304a strh.w r3, [r7, #74] @ 0x4a oversize -= oversize_used; 801f1c4: 8afa ldrh r2, [r7, #22] 801f1c6: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 801f1ca: 1ad3 subs r3, r2, r3 801f1cc: b29b uxth r3, r3 801f1ce: 82fb strh r3, [r7, #22] space -= oversize_used; 801f1d0: f8b7 205c ldrh.w r2, [r7, #92] @ 0x5c 801f1d4: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 801f1d8: 1ad3 subs r3, r2, r3 801f1da: 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)); 801f1de: 8afb ldrh r3, [r7, #22] 801f1e0: 2b00 cmp r3, #0 801f1e2: d00b beq.n 801f1fc 801f1e4: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 801f1e8: 88fb ldrh r3, [r7, #6] 801f1ea: 429a cmp r2, r3 801f1ec: d006 beq.n 801f1fc 801f1ee: 4b3e ldr r3, [pc, #248] @ (801f2e8 ) 801f1f0: f44f 7200 mov.w r2, #512 @ 0x200 801f1f4: 4943 ldr r1, [pc, #268] @ (801f304 ) 801f1f6: 483e ldr r0, [pc, #248] @ (801f2f0 ) 801f1f8: f00a fbe8 bl 80299cc * * 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)) { 801f1fc: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 801f200: 88fb ldrh r3, [r7, #6] 801f202: 429a cmp r2, r3 801f204: f080 8172 bcs.w 801f4ec 801f208: f8b7 305c ldrh.w r3, [r7, #92] @ 0x5c 801f20c: 2b00 cmp r3, #0 801f20e: f000 816d beq.w 801f4ec 801f212: 6c3b ldr r3, [r7, #64] @ 0x40 801f214: 891b ldrh r3, [r3, #8] 801f216: 2b00 cmp r3, #0 801f218: f000 8168 beq.w 801f4ec u16_t seglen = LWIP_MIN(space, len - pos); 801f21c: 88fa ldrh r2, [r7, #6] 801f21e: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 801f222: 1ad2 subs r2, r2, r3 801f224: f8b7 305c ldrh.w r3, [r7, #92] @ 0x5c 801f228: 4293 cmp r3, r2 801f22a: bfa8 it ge 801f22c: 4613 movge r3, r2 801f22e: 847b strh r3, [r7, #34] @ 0x22 seg = last_unsent; 801f230: 6c3b ldr r3, [r7, #64] @ 0x40 801f232: 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) { 801f234: 797b ldrb r3, [r7, #5] 801f236: f003 0301 and.w r3, r3, #1 801f23a: 2b00 cmp r3, #0 801f23c: d02b beq.n 801f296 /* Data is copied */ if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) { 801f23e: f107 0016 add.w r0, r7, #22 801f242: f8b7 205c ldrh.w r2, [r7, #92] @ 0x5c 801f246: 8c79 ldrh r1, [r7, #34] @ 0x22 801f248: 2301 movs r3, #1 801f24a: 9302 str r3, [sp, #8] 801f24c: 797b ldrb r3, [r7, #5] 801f24e: 9301 str r3, [sp, #4] 801f250: 68fb ldr r3, [r7, #12] 801f252: 9300 str r3, [sp, #0] 801f254: 4603 mov r3, r0 801f256: 2000 movs r0, #0 801f258: f7ff fdee bl 801ee38 801f25c: 63f8 str r0, [r7, #60] @ 0x3c 801f25e: 6bfb ldr r3, [r7, #60] @ 0x3c 801f260: 2b00 cmp r3, #0 801f262: f000 825a beq.w 801f71a ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n", seglen)); goto memerr; } #if TCP_OVERSIZE_DBGCHECK oversize_add = oversize; 801f266: 8afb ldrh r3, [r7, #22] 801f268: 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); 801f26c: 6bfb ldr r3, [r7, #60] @ 0x3c 801f26e: 6858 ldr r0, [r3, #4] 801f270: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 801f274: 68ba ldr r2, [r7, #8] 801f276: 4413 add r3, r2 801f278: 8c7a ldrh r2, [r7, #34] @ 0x22 801f27a: 4619 mov r1, r3 801f27c: f00a fe2f bl 8029ede #if TCP_CHECKSUM_ON_COPY concat_chksummed += seglen; #endif /* TCP_CHECKSUM_ON_COPY */ queuelen += pbuf_clen(concat_p); 801f280: 6bf8 ldr r0, [r7, #60] @ 0x3c 801f282: f7fb f9b9 bl 801a5f8 801f286: 4603 mov r3, r0 801f288: 461a mov r2, r3 801f28a: f8b7 3048 ldrh.w r3, [r7, #72] @ 0x48 801f28e: 4413 add r3, r2 801f290: f8a7 3048 strh.w r3, [r7, #72] @ 0x48 801f294: e055 b.n 801f342 } 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); 801f296: 6c3b ldr r3, [r7, #64] @ 0x40 801f298: 685b ldr r3, [r3, #4] 801f29a: 63bb str r3, [r7, #56] @ 0x38 801f29c: e002 b.n 801f2a4 801f29e: 6bbb ldr r3, [r7, #56] @ 0x38 801f2a0: 681b ldr r3, [r3, #0] 801f2a2: 63bb str r3, [r7, #56] @ 0x38 801f2a4: 6bbb ldr r3, [r7, #56] @ 0x38 801f2a6: 681b ldr r3, [r3, #0] 801f2a8: 2b00 cmp r3, #0 801f2aa: d1f8 bne.n 801f29e if (((p->type_internal & (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_DATA_VOLATILE)) == 0) && 801f2ac: 6bbb ldr r3, [r7, #56] @ 0x38 801f2ae: 7b1b ldrb r3, [r3, #12] 801f2b0: f003 03c0 and.w r3, r3, #192 @ 0xc0 801f2b4: 2b00 cmp r3, #0 801f2b6: d129 bne.n 801f30c (const u8_t *)p->payload + p->len == (const u8_t *)arg) { 801f2b8: 6bbb ldr r3, [r7, #56] @ 0x38 801f2ba: 685b ldr r3, [r3, #4] 801f2bc: 6bba ldr r2, [r7, #56] @ 0x38 801f2be: 8952 ldrh r2, [r2, #10] 801f2c0: 4413 add r3, r2 if (((p->type_internal & (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_DATA_VOLATILE)) == 0) && 801f2c2: 68ba ldr r2, [r7, #8] 801f2c4: 429a cmp r2, r3 801f2c6: d121 bne.n 801f30c LWIP_ASSERT("tcp_write: ROM pbufs cannot be oversized", pos == 0); 801f2c8: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 801f2cc: 2b00 cmp r3, #0 801f2ce: d006 beq.n 801f2de 801f2d0: 4b05 ldr r3, [pc, #20] @ (801f2e8 ) 801f2d2: f240 2231 movw r2, #561 @ 0x231 801f2d6: 490c ldr r1, [pc, #48] @ (801f308 ) 801f2d8: 4805 ldr r0, [pc, #20] @ (801f2f0 ) 801f2da: f00a fb77 bl 80299cc extendlen = seglen; 801f2de: 8c7b ldrh r3, [r7, #34] @ 0x22 801f2e0: f8a7 305e strh.w r3, [r7, #94] @ 0x5e 801f2e4: e02d b.n 801f342 801f2e6: bf00 nop 801f2e8: 0802f190 .word 0x0802f190 801f2ec: 0802f330 .word 0x0802f330 801f2f0: 0802f1e4 .word 0x0802f1e4 801f2f4: 0802f348 .word 0x0802f348 801f2f8: 0802f37c .word 0x0802f37c 801f2fc: 0802f394 .word 0x0802f394 801f300: 0802f3c4 .word 0x0802f3c4 801f304: 0802f3e4 .word 0x0802f3e4 801f308: 0802f404 .word 0x0802f404 } else { if ((concat_p = pbuf_alloc(PBUF_RAW, seglen, PBUF_ROM)) == NULL) { 801f30c: 8c7b ldrh r3, [r7, #34] @ 0x22 801f30e: 2201 movs r2, #1 801f310: 4619 mov r1, r3 801f312: 2000 movs r0, #0 801f314: f7fa fdcc bl 8019eb0 801f318: 63f8 str r0, [r7, #60] @ 0x3c 801f31a: 6bfb ldr r3, [r7, #60] @ 0x3c 801f31c: 2b00 cmp r3, #0 801f31e: f000 81fe beq.w 801f71e 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; 801f322: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 801f326: 68ba ldr r2, [r7, #8] 801f328: 441a add r2, r3 801f32a: 6bfb ldr r3, [r7, #60] @ 0x3c 801f32c: 605a str r2, [r3, #4] queuelen += pbuf_clen(concat_p); 801f32e: 6bf8 ldr r0, [r7, #60] @ 0x3c 801f330: f7fb f962 bl 801a5f8 801f334: 4603 mov r3, r0 801f336: 461a mov r2, r3 801f338: f8b7 3048 ldrh.w r3, [r7, #72] @ 0x48 801f33c: 4413 add r3, r2 801f33e: f8a7 3048 strh.w r3, [r7, #72] @ 0x48 &concat_chksum, &concat_chksum_swapped); concat_chksummed += seglen; #endif /* TCP_CHECKSUM_ON_COPY */ } pos += seglen; 801f342: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 801f346: 8c7b ldrh r3, [r7, #34] @ 0x22 801f348: 4413 add r3, r2 801f34a: f8a7 304a strh.w r3, [r7, #74] @ 0x4a 801f34e: e0cd b.n 801f4ec } #endif /* !LWIP_NETIF_TX_SINGLE_PBUF */ } else { #if TCP_OVERSIZE LWIP_ASSERT("unsent_oversize mismatch (pcb->unsent is NULL)", 801f350: 68fb ldr r3, [r7, #12] 801f352: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 801f356: 2b00 cmp r3, #0 801f358: f000 80c8 beq.w 801f4ec 801f35c: 4b72 ldr r3, [pc, #456] @ (801f528 ) 801f35e: f240 224a movw r2, #586 @ 0x24a 801f362: 4972 ldr r1, [pc, #456] @ (801f52c ) 801f364: 4872 ldr r0, [pc, #456] @ (801f530 ) 801f366: f00a fb31 bl 80299cc * 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) { 801f36a: e0bf b.n 801f4ec struct pbuf *p; u16_t left = len - pos; 801f36c: 88fa ldrh r2, [r7, #6] 801f36e: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 801f372: 1ad3 subs r3, r2, r3 801f374: 843b strh r3, [r7, #32] u16_t max_len = mss_local - optlen; 801f376: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 801f37a: b29b uxth r3, r3 801f37c: 8d3a ldrh r2, [r7, #40] @ 0x28 801f37e: 1ad3 subs r3, r2, r3 801f380: 83fb strh r3, [r7, #30] u16_t seglen = LWIP_MIN(left, max_len); 801f382: 8bfa ldrh r2, [r7, #30] 801f384: 8c3b ldrh r3, [r7, #32] 801f386: 4293 cmp r3, r2 801f388: bf28 it cs 801f38a: 4613 movcs r3, r2 801f38c: 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) { 801f38e: 797b ldrb r3, [r7, #5] 801f390: f003 0301 and.w r3, r3, #1 801f394: 2b00 cmp r3, #0 801f396: d036 beq.n 801f406 /* 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) { 801f398: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 801f39c: b29a uxth r2, r3 801f39e: 8bbb ldrh r3, [r7, #28] 801f3a0: 4413 add r3, r2 801f3a2: b299 uxth r1, r3 801f3a4: 6cfb ldr r3, [r7, #76] @ 0x4c 801f3a6: 2b00 cmp r3, #0 801f3a8: bf0c ite eq 801f3aa: 2301 moveq r3, #1 801f3ac: 2300 movne r3, #0 801f3ae: b2db uxtb r3, r3 801f3b0: f107 0016 add.w r0, r7, #22 801f3b4: 8d3a ldrh r2, [r7, #40] @ 0x28 801f3b6: 9302 str r3, [sp, #8] 801f3b8: 797b ldrb r3, [r7, #5] 801f3ba: 9301 str r3, [sp, #4] 801f3bc: 68fb ldr r3, [r7, #12] 801f3be: 9300 str r3, [sp, #0] 801f3c0: 4603 mov r3, r0 801f3c2: 2036 movs r0, #54 @ 0x36 801f3c4: f7ff fd38 bl 801ee38 801f3c8: 6378 str r0, [r7, #52] @ 0x34 801f3ca: 6b7b ldr r3, [r7, #52] @ 0x34 801f3cc: 2b00 cmp r3, #0 801f3ce: f000 81a8 beq.w 801f722 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", 801f3d2: 6b7b ldr r3, [r7, #52] @ 0x34 801f3d4: 895b ldrh r3, [r3, #10] 801f3d6: 8bba ldrh r2, [r7, #28] 801f3d8: 429a cmp r2, r3 801f3da: d906 bls.n 801f3ea 801f3dc: 4b52 ldr r3, [pc, #328] @ (801f528 ) 801f3de: f240 2266 movw r2, #614 @ 0x266 801f3e2: 4954 ldr r1, [pc, #336] @ (801f534 ) 801f3e4: 4852 ldr r0, [pc, #328] @ (801f530 ) 801f3e6: f00a faf1 bl 80299cc (p->len >= seglen)); TCP_DATA_COPY2((char *)p->payload + optlen, (const u8_t *)arg + pos, seglen, &chksum, &chksum_swapped); 801f3ea: 6b7b ldr r3, [r7, #52] @ 0x34 801f3ec: 685a ldr r2, [r3, #4] 801f3ee: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 801f3f2: 18d0 adds r0, r2, r3 801f3f4: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 801f3f8: 68ba ldr r2, [r7, #8] 801f3fa: 4413 add r3, r2 801f3fc: 8bba ldrh r2, [r7, #28] 801f3fe: 4619 mov r1, r3 801f400: f00a fd6d bl 8029ede 801f404: e02f b.n 801f466 * 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); 801f406: 8afb ldrh r3, [r7, #22] 801f408: 2b00 cmp r3, #0 801f40a: d006 beq.n 801f41a 801f40c: 4b46 ldr r3, [pc, #280] @ (801f528 ) 801f40e: f240 2271 movw r2, #625 @ 0x271 801f412: 4949 ldr r1, [pc, #292] @ (801f538 ) 801f414: 4846 ldr r0, [pc, #280] @ (801f530 ) 801f416: f00a fad9 bl 80299cc #endif /* TCP_OVERSIZE */ if ((p2 = pbuf_alloc(PBUF_TRANSPORT, seglen, PBUF_ROM)) == NULL) { 801f41a: 8bbb ldrh r3, [r7, #28] 801f41c: 2201 movs r2, #1 801f41e: 4619 mov r1, r3 801f420: 2036 movs r0, #54 @ 0x36 801f422: f7fa fd45 bl 8019eb0 801f426: 61b8 str r0, [r7, #24] 801f428: 69bb ldr r3, [r7, #24] 801f42a: 2b00 cmp r3, #0 801f42c: f000 817b beq.w 801f726 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; 801f430: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 801f434: 68ba ldr r2, [r7, #8] 801f436: 441a add r2, r3 801f438: 69bb ldr r3, [r7, #24] 801f43a: 605a str r2, [r3, #4] /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 801f43c: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 801f440: b29b uxth r3, r3 801f442: f44f 7220 mov.w r2, #640 @ 0x280 801f446: 4619 mov r1, r3 801f448: 2036 movs r0, #54 @ 0x36 801f44a: f7fa fd31 bl 8019eb0 801f44e: 6378 str r0, [r7, #52] @ 0x34 801f450: 6b7b ldr r3, [r7, #52] @ 0x34 801f452: 2b00 cmp r3, #0 801f454: d103 bne.n 801f45e /* If allocation fails, we have to deallocate the data pbuf as * well. */ pbuf_free(p2); 801f456: 69b8 ldr r0, [r7, #24] 801f458: f7fb f840 bl 801a4dc LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: could not allocate memory for header pbuf\n")); goto memerr; 801f45c: e166 b.n 801f72c } /* Concatenate the headers and data pbufs together. */ pbuf_cat(p/*header*/, p2/*data*/); 801f45e: 69b9 ldr r1, [r7, #24] 801f460: 6b78 ldr r0, [r7, #52] @ 0x34 801f462: f7fb f909 bl 801a678 } queuelen += pbuf_clen(p); 801f466: 6b78 ldr r0, [r7, #52] @ 0x34 801f468: f7fb f8c6 bl 801a5f8 801f46c: 4603 mov r3, r0 801f46e: 461a mov r2, r3 801f470: f8b7 3048 ldrh.w r3, [r7, #72] @ 0x48 801f474: 4413 add r3, r2 801f476: 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)) { 801f47a: f8b7 3048 ldrh.w r3, [r7, #72] @ 0x48 801f47e: 2b10 cmp r3, #16 801f480: d903 bls.n 801f48a 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); 801f482: 6b78 ldr r0, [r7, #52] @ 0x34 801f484: f7fb f82a bl 801a4dc goto memerr; 801f488: e150 b.n 801f72c } if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) { 801f48a: 68fb ldr r3, [r7, #12] 801f48c: 6dda ldr r2, [r3, #92] @ 0x5c 801f48e: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 801f492: 441a add r2, r3 801f494: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 801f498: 9300 str r3, [sp, #0] 801f49a: 4613 mov r3, r2 801f49c: 2200 movs r2, #0 801f49e: 6b79 ldr r1, [r7, #52] @ 0x34 801f4a0: 68f8 ldr r0, [r7, #12] 801f4a2: f7ff fc29 bl 801ecf8 801f4a6: 6578 str r0, [r7, #84] @ 0x54 801f4a8: 6d7b ldr r3, [r7, #84] @ 0x54 801f4aa: 2b00 cmp r3, #0 801f4ac: f000 813d beq.w 801f72a goto memerr; } #if TCP_OVERSIZE_DBGCHECK seg->oversize_left = oversize; 801f4b0: 8afa ldrh r2, [r7, #22] 801f4b2: 6d7b ldr r3, [r7, #84] @ 0x54 801f4b4: 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) { 801f4b6: 6cfb ldr r3, [r7, #76] @ 0x4c 801f4b8: 2b00 cmp r3, #0 801f4ba: d102 bne.n 801f4c2 queue = seg; 801f4bc: 6d7b ldr r3, [r7, #84] @ 0x54 801f4be: 64fb str r3, [r7, #76] @ 0x4c 801f4c0: e00c b.n 801f4dc } else { /* Attach the segment to the end of the queued segments */ LWIP_ASSERT("prev_seg != NULL", prev_seg != NULL); 801f4c2: 6d3b ldr r3, [r7, #80] @ 0x50 801f4c4: 2b00 cmp r3, #0 801f4c6: d106 bne.n 801f4d6 801f4c8: 4b17 ldr r3, [pc, #92] @ (801f528 ) 801f4ca: f240 22ab movw r2, #683 @ 0x2ab 801f4ce: 491b ldr r1, [pc, #108] @ (801f53c ) 801f4d0: 4817 ldr r0, [pc, #92] @ (801f530 ) 801f4d2: f00a fa7b bl 80299cc prev_seg->next = seg; 801f4d6: 6d3b ldr r3, [r7, #80] @ 0x50 801f4d8: 6d7a ldr r2, [r7, #84] @ 0x54 801f4da: 601a str r2, [r3, #0] } /* remember last segment of to-be-queued data for next iteration */ prev_seg = seg; 801f4dc: 6d7b ldr r3, [r7, #84] @ 0x54 801f4de: 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; 801f4e0: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 801f4e4: 8bbb ldrh r3, [r7, #28] 801f4e6: 4413 add r3, r2 801f4e8: f8a7 304a strh.w r3, [r7, #74] @ 0x4a while (pos < len) { 801f4ec: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 801f4f0: 88fb ldrh r3, [r7, #6] 801f4f2: 429a cmp r2, r3 801f4f4: f4ff af3a bcc.w 801f36c /* * All three segmentation phases were successful. We can commit the * transaction. */ #if TCP_OVERSIZE_DBGCHECK if ((last_unsent != NULL) && (oversize_add != 0)) { 801f4f8: 6c3b ldr r3, [r7, #64] @ 0x40 801f4fa: 2b00 cmp r3, #0 801f4fc: d00b beq.n 801f516 801f4fe: f8b7 305a ldrh.w r3, [r7, #90] @ 0x5a 801f502: 2b00 cmp r3, #0 801f504: d007 beq.n 801f516 last_unsent->oversize_left += oversize_add; 801f506: 6c3b ldr r3, [r7, #64] @ 0x40 801f508: 895a ldrh r2, [r3, #10] 801f50a: f8b7 305a ldrh.w r3, [r7, #90] @ 0x5a 801f50e: 4413 add r3, r2 801f510: b29a uxth r2, r3 801f512: 6c3b ldr r3, [r7, #64] @ 0x40 801f514: 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) { 801f516: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 801f51a: 2b00 cmp r3, #0 801f51c: d052 beq.n 801f5c4 struct pbuf *p; /* Bump tot_len of whole chain, len of tail */ for (p = last_unsent->p; p; p = p->next) { 801f51e: 6c3b ldr r3, [r7, #64] @ 0x40 801f520: 685b ldr r3, [r3, #4] 801f522: 633b str r3, [r7, #48] @ 0x30 801f524: e02e b.n 801f584 801f526: bf00 nop 801f528: 0802f190 .word 0x0802f190 801f52c: 0802f430 .word 0x0802f430 801f530: 0802f1e4 .word 0x0802f1e4 801f534: 0802f460 .word 0x0802f460 801f538: 0802f4a0 .word 0x0802f4a0 801f53c: 0802f4b0 .word 0x0802f4b0 p->tot_len += oversize_used; 801f540: 6b3b ldr r3, [r7, #48] @ 0x30 801f542: 891a ldrh r2, [r3, #8] 801f544: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 801f548: 4413 add r3, r2 801f54a: b29a uxth r2, r3 801f54c: 6b3b ldr r3, [r7, #48] @ 0x30 801f54e: 811a strh r2, [r3, #8] if (p->next == NULL) { 801f550: 6b3b ldr r3, [r7, #48] @ 0x30 801f552: 681b ldr r3, [r3, #0] 801f554: 2b00 cmp r3, #0 801f556: d112 bne.n 801f57e TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); 801f558: 6b3b ldr r3, [r7, #48] @ 0x30 801f55a: 685b ldr r3, [r3, #4] 801f55c: 6b3a ldr r2, [r7, #48] @ 0x30 801f55e: 8952 ldrh r2, [r2, #10] 801f560: 4413 add r3, r2 801f562: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 801f566: 68b9 ldr r1, [r7, #8] 801f568: 4618 mov r0, r3 801f56a: f00a fcb8 bl 8029ede p->len += oversize_used; 801f56e: 6b3b ldr r3, [r7, #48] @ 0x30 801f570: 895a ldrh r2, [r3, #10] 801f572: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 801f576: 4413 add r3, r2 801f578: b29a uxth r2, r3 801f57a: 6b3b ldr r3, [r7, #48] @ 0x30 801f57c: 815a strh r2, [r3, #10] for (p = last_unsent->p; p; p = p->next) { 801f57e: 6b3b ldr r3, [r7, #48] @ 0x30 801f580: 681b ldr r3, [r3, #0] 801f582: 633b str r3, [r7, #48] @ 0x30 801f584: 6b3b ldr r3, [r7, #48] @ 0x30 801f586: 2b00 cmp r3, #0 801f588: d1da bne.n 801f540 } } last_unsent->len += oversize_used; 801f58a: 6c3b ldr r3, [r7, #64] @ 0x40 801f58c: 891a ldrh r2, [r3, #8] 801f58e: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 801f592: 4413 add r3, r2 801f594: b29a uxth r2, r3 801f596: 6c3b ldr r3, [r7, #64] @ 0x40 801f598: 811a strh r2, [r3, #8] #if TCP_OVERSIZE_DBGCHECK LWIP_ASSERT("last_unsent->oversize_left >= oversize_used", 801f59a: 6c3b ldr r3, [r7, #64] @ 0x40 801f59c: 895b ldrh r3, [r3, #10] 801f59e: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 801f5a2: 429a cmp r2, r3 801f5a4: d906 bls.n 801f5b4 801f5a6: 4b78 ldr r3, [pc, #480] @ (801f788 ) 801f5a8: f240 22d3 movw r2, #723 @ 0x2d3 801f5ac: 4977 ldr r1, [pc, #476] @ (801f78c ) 801f5ae: 4878 ldr r0, [pc, #480] @ (801f790 ) 801f5b0: f00a fa0c bl 80299cc last_unsent->oversize_left >= oversize_used); last_unsent->oversize_left -= oversize_used; 801f5b4: 6c3b ldr r3, [r7, #64] @ 0x40 801f5b6: 895a ldrh r2, [r3, #10] 801f5b8: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 801f5bc: 1ad3 subs r3, r2, r3 801f5be: b29a uxth r2, r3 801f5c0: 6c3b ldr r3, [r7, #64] @ 0x40 801f5c2: 815a strh r2, [r3, #10] #endif /* TCP_OVERSIZE_DBGCHECK */ } pcb->unsent_oversize = oversize; 801f5c4: 8afa ldrh r2, [r7, #22] 801f5c6: 68fb ldr r3, [r7, #12] 801f5c8: 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) { 801f5cc: 6bfb ldr r3, [r7, #60] @ 0x3c 801f5ce: 2b00 cmp r3, #0 801f5d0: d018 beq.n 801f604 LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", 801f5d2: 6c3b ldr r3, [r7, #64] @ 0x40 801f5d4: 2b00 cmp r3, #0 801f5d6: d106 bne.n 801f5e6 801f5d8: 4b6b ldr r3, [pc, #428] @ (801f788 ) 801f5da: f44f 7238 mov.w r2, #736 @ 0x2e0 801f5de: 496d ldr r1, [pc, #436] @ (801f794 ) 801f5e0: 486b ldr r0, [pc, #428] @ (801f790 ) 801f5e2: f00a f9f3 bl 80299cc (last_unsent != NULL)); pbuf_cat(last_unsent->p, concat_p); 801f5e6: 6c3b ldr r3, [r7, #64] @ 0x40 801f5e8: 685b ldr r3, [r3, #4] 801f5ea: 6bf9 ldr r1, [r7, #60] @ 0x3c 801f5ec: 4618 mov r0, r3 801f5ee: f7fb f843 bl 801a678 last_unsent->len += concat_p->tot_len; 801f5f2: 6c3b ldr r3, [r7, #64] @ 0x40 801f5f4: 891a ldrh r2, [r3, #8] 801f5f6: 6bfb ldr r3, [r7, #60] @ 0x3c 801f5f8: 891b ldrh r3, [r3, #8] 801f5fa: 4413 add r3, r2 801f5fc: b29a uxth r2, r3 801f5fe: 6c3b ldr r3, [r7, #64] @ 0x40 801f600: 811a strh r2, [r3, #8] 801f602: e03c b.n 801f67e } else if (extendlen > 0) { 801f604: f8b7 305e ldrh.w r3, [r7, #94] @ 0x5e 801f608: 2b00 cmp r3, #0 801f60a: d038 beq.n 801f67e struct pbuf *p; LWIP_ASSERT("tcp_write: extension of reference requires reference", 801f60c: 6c3b ldr r3, [r7, #64] @ 0x40 801f60e: 2b00 cmp r3, #0 801f610: d003 beq.n 801f61a 801f612: 6c3b ldr r3, [r7, #64] @ 0x40 801f614: 685b ldr r3, [r3, #4] 801f616: 2b00 cmp r3, #0 801f618: d106 bne.n 801f628 801f61a: 4b5b ldr r3, [pc, #364] @ (801f788 ) 801f61c: f240 22e6 movw r2, #742 @ 0x2e6 801f620: 495d ldr r1, [pc, #372] @ (801f798 ) 801f622: 485b ldr r0, [pc, #364] @ (801f790 ) 801f624: f00a f9d2 bl 80299cc last_unsent != NULL && last_unsent->p != NULL); for (p = last_unsent->p; p->next != NULL; p = p->next) { 801f628: 6c3b ldr r3, [r7, #64] @ 0x40 801f62a: 685b ldr r3, [r3, #4] 801f62c: 62fb str r3, [r7, #44] @ 0x2c 801f62e: e00a b.n 801f646 p->tot_len += extendlen; 801f630: 6afb ldr r3, [r7, #44] @ 0x2c 801f632: 891a ldrh r2, [r3, #8] 801f634: f8b7 305e ldrh.w r3, [r7, #94] @ 0x5e 801f638: 4413 add r3, r2 801f63a: b29a uxth r2, r3 801f63c: 6afb ldr r3, [r7, #44] @ 0x2c 801f63e: 811a strh r2, [r3, #8] for (p = last_unsent->p; p->next != NULL; p = p->next) { 801f640: 6afb ldr r3, [r7, #44] @ 0x2c 801f642: 681b ldr r3, [r3, #0] 801f644: 62fb str r3, [r7, #44] @ 0x2c 801f646: 6afb ldr r3, [r7, #44] @ 0x2c 801f648: 681b ldr r3, [r3, #0] 801f64a: 2b00 cmp r3, #0 801f64c: d1f0 bne.n 801f630 } p->tot_len += extendlen; 801f64e: 6afb ldr r3, [r7, #44] @ 0x2c 801f650: 891a ldrh r2, [r3, #8] 801f652: f8b7 305e ldrh.w r3, [r7, #94] @ 0x5e 801f656: 4413 add r3, r2 801f658: b29a uxth r2, r3 801f65a: 6afb ldr r3, [r7, #44] @ 0x2c 801f65c: 811a strh r2, [r3, #8] p->len += extendlen; 801f65e: 6afb ldr r3, [r7, #44] @ 0x2c 801f660: 895a ldrh r2, [r3, #10] 801f662: f8b7 305e ldrh.w r3, [r7, #94] @ 0x5e 801f666: 4413 add r3, r2 801f668: b29a uxth r2, r3 801f66a: 6afb ldr r3, [r7, #44] @ 0x2c 801f66c: 815a strh r2, [r3, #10] last_unsent->len += extendlen; 801f66e: 6c3b ldr r3, [r7, #64] @ 0x40 801f670: 891a ldrh r2, [r3, #8] 801f672: f8b7 305e ldrh.w r3, [r7, #94] @ 0x5e 801f676: 4413 add r3, r2 801f678: b29a uxth r2, r3 801f67a: 6c3b ldr r3, [r7, #64] @ 0x40 801f67c: 811a strh r2, [r3, #8] /* * Phase 3: Append queue to pcb->unsent. Queue may be NULL, but that * is harmless */ if (last_unsent == NULL) { 801f67e: 6c3b ldr r3, [r7, #64] @ 0x40 801f680: 2b00 cmp r3, #0 801f682: d103 bne.n 801f68c pcb->unsent = queue; 801f684: 68fb ldr r3, [r7, #12] 801f686: 6cfa ldr r2, [r7, #76] @ 0x4c 801f688: 66da str r2, [r3, #108] @ 0x6c 801f68a: e002 b.n 801f692 } else { last_unsent->next = queue; 801f68c: 6c3b ldr r3, [r7, #64] @ 0x40 801f68e: 6cfa ldr r2, [r7, #76] @ 0x4c 801f690: 601a str r2, [r3, #0] } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 801f692: 68fb ldr r3, [r7, #12] 801f694: 6dda ldr r2, [r3, #92] @ 0x5c 801f696: 88fb ldrh r3, [r7, #6] 801f698: 441a add r2, r3 801f69a: 68fb ldr r3, [r7, #12] 801f69c: 65da str r2, [r3, #92] @ 0x5c pcb->snd_buf -= len; 801f69e: 68fb ldr r3, [r7, #12] 801f6a0: f8b3 2064 ldrh.w r2, [r3, #100] @ 0x64 801f6a4: 88fb ldrh r3, [r7, #6] 801f6a6: 1ad3 subs r3, r2, r3 801f6a8: b29a uxth r2, r3 801f6aa: 68fb ldr r3, [r7, #12] 801f6ac: f8a3 2064 strh.w r2, [r3, #100] @ 0x64 pcb->snd_queuelen = queuelen; 801f6b0: 68fb ldr r3, [r7, #12] 801f6b2: f8b7 2048 ldrh.w r2, [r7, #72] @ 0x48 801f6b6: 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) { 801f6ba: 68fb ldr r3, [r7, #12] 801f6bc: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801f6c0: 2b00 cmp r3, #0 801f6c2: d00e beq.n 801f6e2 LWIP_ASSERT("tcp_write: valid queue length", 801f6c4: 68fb ldr r3, [r7, #12] 801f6c6: 6f1b ldr r3, [r3, #112] @ 0x70 801f6c8: 2b00 cmp r3, #0 801f6ca: d10a bne.n 801f6e2 801f6cc: 68fb ldr r3, [r7, #12] 801f6ce: 6edb ldr r3, [r3, #108] @ 0x6c 801f6d0: 2b00 cmp r3, #0 801f6d2: d106 bne.n 801f6e2 801f6d4: 4b2c ldr r3, [pc, #176] @ (801f788 ) 801f6d6: f240 3212 movw r2, #786 @ 0x312 801f6da: 4930 ldr r1, [pc, #192] @ (801f79c ) 801f6dc: 482c ldr r0, [pc, #176] @ (801f790 ) 801f6de: f00a f975 bl 80299cc 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)) { 801f6e2: 6d7b ldr r3, [r7, #84] @ 0x54 801f6e4: 2b00 cmp r3, #0 801f6e6: d016 beq.n 801f716 801f6e8: 6d7b ldr r3, [r7, #84] @ 0x54 801f6ea: 691b ldr r3, [r3, #16] 801f6ec: 2b00 cmp r3, #0 801f6ee: d012 beq.n 801f716 801f6f0: 797b ldrb r3, [r7, #5] 801f6f2: f003 0302 and.w r3, r3, #2 801f6f6: 2b00 cmp r3, #0 801f6f8: d10d bne.n 801f716 TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); 801f6fa: 6d7b ldr r3, [r7, #84] @ 0x54 801f6fc: 691b ldr r3, [r3, #16] 801f6fe: 899b ldrh r3, [r3, #12] 801f700: b29c uxth r4, r3 801f702: 2008 movs r0, #8 801f704: f7f9 fa08 bl 8018b18 801f708: 4603 mov r3, r0 801f70a: 461a mov r2, r3 801f70c: 6d7b ldr r3, [r7, #84] @ 0x54 801f70e: 691b ldr r3, [r3, #16] 801f710: 4322 orrs r2, r4 801f712: b292 uxth r2, r2 801f714: 819a strh r2, [r3, #12] } return ERR_OK; 801f716: 2300 movs r3, #0 801f718: e031 b.n 801f77e goto memerr; 801f71a: bf00 nop 801f71c: e006 b.n 801f72c goto memerr; 801f71e: bf00 nop 801f720: e004 b.n 801f72c goto memerr; 801f722: bf00 nop 801f724: e002 b.n 801f72c goto memerr; 801f726: bf00 nop 801f728: e000 b.n 801f72c goto memerr; 801f72a: bf00 nop memerr: tcp_set_flags(pcb, TF_NAGLEMEMERR); 801f72c: 68fb ldr r3, [r7, #12] 801f72e: 8b5b ldrh r3, [r3, #26] 801f730: f043 0380 orr.w r3, r3, #128 @ 0x80 801f734: b29a uxth r2, r3 801f736: 68fb ldr r3, [r7, #12] 801f738: 835a strh r2, [r3, #26] TCP_STATS_INC(tcp.memerr); if (concat_p != NULL) { 801f73a: 6bfb ldr r3, [r7, #60] @ 0x3c 801f73c: 2b00 cmp r3, #0 801f73e: d002 beq.n 801f746 pbuf_free(concat_p); 801f740: 6bf8 ldr r0, [r7, #60] @ 0x3c 801f742: f7fa fecb bl 801a4dc } if (queue != NULL) { 801f746: 6cfb ldr r3, [r7, #76] @ 0x4c 801f748: 2b00 cmp r3, #0 801f74a: d002 beq.n 801f752 tcp_segs_free(queue); 801f74c: 6cf8 ldr r0, [r7, #76] @ 0x4c 801f74e: f7fc fb09 bl 801bd64 } if (pcb->snd_queuelen != 0) { 801f752: 68fb ldr r3, [r7, #12] 801f754: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801f758: 2b00 cmp r3, #0 801f75a: d00e beq.n 801f77a LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL || 801f75c: 68fb ldr r3, [r7, #12] 801f75e: 6f1b ldr r3, [r3, #112] @ 0x70 801f760: 2b00 cmp r3, #0 801f762: d10a bne.n 801f77a 801f764: 68fb ldr r3, [r7, #12] 801f766: 6edb ldr r3, [r3, #108] @ 0x6c 801f768: 2b00 cmp r3, #0 801f76a: d106 bne.n 801f77a 801f76c: 4b06 ldr r3, [pc, #24] @ (801f788 ) 801f76e: f240 3227 movw r2, #807 @ 0x327 801f772: 490a ldr r1, [pc, #40] @ (801f79c ) 801f774: 4806 ldr r0, [pc, #24] @ (801f790 ) 801f776: f00a f929 bl 80299cc 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; 801f77a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 801f77e: 4618 mov r0, r3 801f780: 3764 adds r7, #100 @ 0x64 801f782: 46bd mov sp, r7 801f784: bd90 pop {r4, r7, pc} 801f786: bf00 nop 801f788: 0802f190 .word 0x0802f190 801f78c: 0802f4c4 .word 0x0802f4c4 801f790: 0802f1e4 .word 0x0802f1e4 801f794: 0802f4f0 .word 0x0802f4f0 801f798: 0802f528 .word 0x0802f528 801f79c: 0802f560 .word 0x0802f560 0801f7a0 : * @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) { 801f7a0: b590 push {r4, r7, lr} 801f7a2: b08b sub sp, #44 @ 0x2c 801f7a4: af02 add r7, sp, #8 801f7a6: 6078 str r0, [r7, #4] 801f7a8: 460b mov r3, r1 801f7aa: 807b strh r3, [r7, #2] struct tcp_seg *seg = NULL, *useg = NULL; 801f7ac: 2300 movs r3, #0 801f7ae: 61bb str r3, [r7, #24] 801f7b0: 2300 movs r3, #0 801f7b2: 617b str r3, [r7, #20] struct pbuf *p = NULL; 801f7b4: 2300 movs r3, #0 801f7b6: 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); 801f7b8: 687b ldr r3, [r7, #4] 801f7ba: 2b00 cmp r3, #0 801f7bc: d106 bne.n 801f7cc 801f7be: 4b97 ldr r3, [pc, #604] @ (801fa1c ) 801f7c0: f240 324b movw r2, #843 @ 0x34b 801f7c4: 4996 ldr r1, [pc, #600] @ (801fa20 ) 801f7c6: 4897 ldr r0, [pc, #604] @ (801fa24 ) 801f7c8: f00a f900 bl 80299cc useg = pcb->unsent; 801f7cc: 687b ldr r3, [r7, #4] 801f7ce: 6edb ldr r3, [r3, #108] @ 0x6c 801f7d0: 617b str r3, [r7, #20] if (useg == NULL) { 801f7d2: 697b ldr r3, [r7, #20] 801f7d4: 2b00 cmp r3, #0 801f7d6: d102 bne.n 801f7de return ERR_MEM; 801f7d8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801f7dc: e119 b.n 801fa12 } if (split == 0) { 801f7de: 887b ldrh r3, [r7, #2] 801f7e0: 2b00 cmp r3, #0 801f7e2: d109 bne.n 801f7f8 LWIP_ASSERT("Can't split segment into length 0", 0); 801f7e4: 4b8d ldr r3, [pc, #564] @ (801fa1c ) 801f7e6: f240 3253 movw r2, #851 @ 0x353 801f7ea: 498f ldr r1, [pc, #572] @ (801fa28 ) 801f7ec: 488d ldr r0, [pc, #564] @ (801fa24 ) 801f7ee: f00a f8ed bl 80299cc return ERR_VAL; 801f7f2: f06f 0305 mvn.w r3, #5 801f7f6: e10c b.n 801fa12 } if (useg->len <= split) { 801f7f8: 697b ldr r3, [r7, #20] 801f7fa: 891b ldrh r3, [r3, #8] 801f7fc: 887a ldrh r2, [r7, #2] 801f7fe: 429a cmp r2, r3 801f800: d301 bcc.n 801f806 return ERR_OK; 801f802: 2300 movs r3, #0 801f804: e105 b.n 801fa12 } LWIP_ASSERT("split <= mss", split <= pcb->mss); 801f806: 687b ldr r3, [r7, #4] 801f808: 8e5b ldrh r3, [r3, #50] @ 0x32 801f80a: 887a ldrh r2, [r7, #2] 801f80c: 429a cmp r2, r3 801f80e: d906 bls.n 801f81e 801f810: 4b82 ldr r3, [pc, #520] @ (801fa1c ) 801f812: f240 325b movw r2, #859 @ 0x35b 801f816: 4985 ldr r1, [pc, #532] @ (801fa2c ) 801f818: 4882 ldr r0, [pc, #520] @ (801fa24 ) 801f81a: f00a f8d7 bl 80299cc LWIP_ASSERT("useg->len > 0", useg->len > 0); 801f81e: 697b ldr r3, [r7, #20] 801f820: 891b ldrh r3, [r3, #8] 801f822: 2b00 cmp r3, #0 801f824: d106 bne.n 801f834 801f826: 4b7d ldr r3, [pc, #500] @ (801fa1c ) 801f828: f44f 7257 mov.w r2, #860 @ 0x35c 801f82c: 4980 ldr r1, [pc, #512] @ (801fa30 ) 801f82e: 487d ldr r0, [pc, #500] @ (801fa24 ) 801f830: f00a f8cc bl 80299cc * 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; 801f834: 697b ldr r3, [r7, #20] 801f836: 7b1b ldrb r3, [r3, #12] 801f838: 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); 801f83a: 7bfb ldrb r3, [r7, #15] 801f83c: 009b lsls r3, r3, #2 801f83e: b2db uxtb r3, r3 801f840: f003 0304 and.w r3, r3, #4 801f844: 73bb strb r3, [r7, #14] remainder = useg->len - split; 801f846: 697b ldr r3, [r7, #20] 801f848: 891a ldrh r2, [r3, #8] 801f84a: 887b ldrh r3, [r7, #2] 801f84c: 1ad3 subs r3, r2, r3 801f84e: 81bb strh r3, [r7, #12] /* Create new pbuf for the remainder of the split */ p = pbuf_alloc(PBUF_TRANSPORT, remainder + optlen, PBUF_RAM); 801f850: 7bbb ldrb r3, [r7, #14] 801f852: b29a uxth r2, r3 801f854: 89bb ldrh r3, [r7, #12] 801f856: 4413 add r3, r2 801f858: b29b uxth r3, r3 801f85a: f44f 7220 mov.w r2, #640 @ 0x280 801f85e: 4619 mov r1, r3 801f860: 2036 movs r0, #54 @ 0x36 801f862: f7fa fb25 bl 8019eb0 801f866: 6138 str r0, [r7, #16] if (p == NULL) { 801f868: 693b ldr r3, [r7, #16] 801f86a: 2b00 cmp r3, #0 801f86c: f000 80ba beq.w 801f9e4 ("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; 801f870: 697b ldr r3, [r7, #20] 801f872: 685b ldr r3, [r3, #4] 801f874: 891a ldrh r2, [r3, #8] 801f876: 697b ldr r3, [r7, #20] 801f878: 891b ldrh r3, [r3, #8] 801f87a: 1ad3 subs r3, r2, r3 801f87c: b29a uxth r2, r3 801f87e: 887b ldrh r3, [r7, #2] 801f880: 4413 add r3, r2 801f882: 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) { 801f884: 697b ldr r3, [r7, #20] 801f886: 6858 ldr r0, [r3, #4] 801f888: 693b ldr r3, [r7, #16] 801f88a: 685a ldr r2, [r3, #4] 801f88c: 7bbb ldrb r3, [r7, #14] 801f88e: 18d1 adds r1, r2, r3 801f890: 897b ldrh r3, [r7, #10] 801f892: 89ba ldrh r2, [r7, #12] 801f894: f7fb f828 bl 801a8e8 801f898: 4603 mov r3, r0 801f89a: 461a mov r2, r3 801f89c: 89bb ldrh r3, [r7, #12] 801f89e: 4293 cmp r3, r2 801f8a0: f040 80a2 bne.w 801f9e8 #endif /* TCP_CHECKSUM_ON_COPY */ /* Options are created when calling tcp_output() */ /* Migrate flags from original segment */ split_flags = TCPH_FLAGS(useg->tcphdr); 801f8a4: 697b ldr r3, [r7, #20] 801f8a6: 691b ldr r3, [r3, #16] 801f8a8: 899b ldrh r3, [r3, #12] 801f8aa: b29b uxth r3, r3 801f8ac: 4618 mov r0, r3 801f8ae: f7f9 f933 bl 8018b18 801f8b2: 4603 mov r3, r0 801f8b4: b2db uxtb r3, r3 801f8b6: f003 033f and.w r3, r3, #63 @ 0x3f 801f8ba: 77fb strb r3, [r7, #31] remainder_flags = 0; /* ACK added in tcp_output() */ 801f8bc: 2300 movs r3, #0 801f8be: 77bb strb r3, [r7, #30] if (split_flags & TCP_PSH) { 801f8c0: 7ffb ldrb r3, [r7, #31] 801f8c2: f003 0308 and.w r3, r3, #8 801f8c6: 2b00 cmp r3, #0 801f8c8: d007 beq.n 801f8da split_flags &= ~TCP_PSH; 801f8ca: 7ffb ldrb r3, [r7, #31] 801f8cc: f023 0308 bic.w r3, r3, #8 801f8d0: 77fb strb r3, [r7, #31] remainder_flags |= TCP_PSH; 801f8d2: 7fbb ldrb r3, [r7, #30] 801f8d4: f043 0308 orr.w r3, r3, #8 801f8d8: 77bb strb r3, [r7, #30] } if (split_flags & TCP_FIN) { 801f8da: 7ffb ldrb r3, [r7, #31] 801f8dc: f003 0301 and.w r3, r3, #1 801f8e0: 2b00 cmp r3, #0 801f8e2: d007 beq.n 801f8f4 split_flags &= ~TCP_FIN; 801f8e4: 7ffb ldrb r3, [r7, #31] 801f8e6: f023 0301 bic.w r3, r3, #1 801f8ea: 77fb strb r3, [r7, #31] remainder_flags |= TCP_FIN; 801f8ec: 7fbb ldrb r3, [r7, #30] 801f8ee: f043 0301 orr.w r3, r3, #1 801f8f2: 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); 801f8f4: 697b ldr r3, [r7, #20] 801f8f6: 691b ldr r3, [r3, #16] 801f8f8: 685b ldr r3, [r3, #4] 801f8fa: 4618 mov r0, r3 801f8fc: f7f9 f921 bl 8018b42 801f900: 4602 mov r2, r0 801f902: 887b ldrh r3, [r7, #2] 801f904: 18d1 adds r1, r2, r3 801f906: 7fba ldrb r2, [r7, #30] 801f908: 7bfb ldrb r3, [r7, #15] 801f90a: 9300 str r3, [sp, #0] 801f90c: 460b mov r3, r1 801f90e: 6939 ldr r1, [r7, #16] 801f910: 6878 ldr r0, [r7, #4] 801f912: f7ff f9f1 bl 801ecf8 801f916: 61b8 str r0, [r7, #24] if (seg == NULL) { 801f918: 69bb ldr r3, [r7, #24] 801f91a: 2b00 cmp r3, #0 801f91c: d066 beq.n 801f9ec 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); 801f91e: 697b ldr r3, [r7, #20] 801f920: 685b ldr r3, [r3, #4] 801f922: 4618 mov r0, r3 801f924: f7fa fe68 bl 801a5f8 801f928: 4603 mov r3, r0 801f92a: 461a mov r2, r3 801f92c: 687b ldr r3, [r7, #4] 801f92e: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801f932: 1a9b subs r3, r3, r2 801f934: b29a uxth r2, r3 801f936: 687b ldr r3, [r7, #4] 801f938: 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); 801f93c: 697b ldr r3, [r7, #20] 801f93e: 6858 ldr r0, [r3, #4] 801f940: 697b ldr r3, [r7, #20] 801f942: 685b ldr r3, [r3, #4] 801f944: 891a ldrh r2, [r3, #8] 801f946: 89bb ldrh r3, [r7, #12] 801f948: 1ad3 subs r3, r2, r3 801f94a: b29b uxth r3, r3 801f94c: 4619 mov r1, r3 801f94e: f7fa fc0f bl 801a170 useg->len -= remainder; 801f952: 697b ldr r3, [r7, #20] 801f954: 891a ldrh r2, [r3, #8] 801f956: 89bb ldrh r3, [r7, #12] 801f958: 1ad3 subs r3, r2, r3 801f95a: b29a uxth r2, r3 801f95c: 697b ldr r3, [r7, #20] 801f95e: 811a strh r2, [r3, #8] TCPH_SET_FLAG(useg->tcphdr, split_flags); 801f960: 697b ldr r3, [r7, #20] 801f962: 691b ldr r3, [r3, #16] 801f964: 899b ldrh r3, [r3, #12] 801f966: b29c uxth r4, r3 801f968: 7ffb ldrb r3, [r7, #31] 801f96a: b29b uxth r3, r3 801f96c: 4618 mov r0, r3 801f96e: f7f9 f8d3 bl 8018b18 801f972: 4603 mov r3, r0 801f974: 461a mov r2, r3 801f976: 697b ldr r3, [r7, #20] 801f978: 691b ldr r3, [r3, #16] 801f97a: 4322 orrs r2, r4 801f97c: b292 uxth r2, r2 801f97e: 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; 801f980: 697b ldr r3, [r7, #20] 801f982: 2200 movs r2, #0 801f984: 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); 801f986: 697b ldr r3, [r7, #20] 801f988: 685b ldr r3, [r3, #4] 801f98a: 4618 mov r0, r3 801f98c: f7fa fe34 bl 801a5f8 801f990: 4603 mov r3, r0 801f992: 461a mov r2, r3 801f994: 687b ldr r3, [r7, #4] 801f996: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801f99a: 4413 add r3, r2 801f99c: b29a uxth r2, r3 801f99e: 687b ldr r3, [r7, #4] 801f9a0: 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); 801f9a4: 69bb ldr r3, [r7, #24] 801f9a6: 685b ldr r3, [r3, #4] 801f9a8: 4618 mov r0, r3 801f9aa: f7fa fe25 bl 801a5f8 801f9ae: 4603 mov r3, r0 801f9b0: 461a mov r2, r3 801f9b2: 687b ldr r3, [r7, #4] 801f9b4: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801f9b8: 4413 add r3, r2 801f9ba: b29a uxth r2, r3 801f9bc: 687b ldr r3, [r7, #4] 801f9be: f8a3 2066 strh.w r2, [r3, #102] @ 0x66 /* Finally insert remainder into queue after split (which stays head) */ seg->next = useg->next; 801f9c2: 697b ldr r3, [r7, #20] 801f9c4: 681a ldr r2, [r3, #0] 801f9c6: 69bb ldr r3, [r7, #24] 801f9c8: 601a str r2, [r3, #0] useg->next = seg; 801f9ca: 697b ldr r3, [r7, #20] 801f9cc: 69ba ldr r2, [r7, #24] 801f9ce: 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) { 801f9d0: 69bb ldr r3, [r7, #24] 801f9d2: 681b ldr r3, [r3, #0] 801f9d4: 2b00 cmp r3, #0 801f9d6: d103 bne.n 801f9e0 pcb->unsent_oversize = 0; 801f9d8: 687b ldr r3, [r7, #4] 801f9da: 2200 movs r2, #0 801f9dc: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 } #endif /* TCP_OVERSIZE */ return ERR_OK; 801f9e0: 2300 movs r3, #0 801f9e2: e016 b.n 801fa12 goto memerr; 801f9e4: bf00 nop 801f9e6: e002 b.n 801f9ee goto memerr; 801f9e8: bf00 nop 801f9ea: e000 b.n 801f9ee goto memerr; 801f9ec: bf00 nop memerr: TCP_STATS_INC(tcp.memerr); LWIP_ASSERT("seg == NULL", seg == NULL); 801f9ee: 69bb ldr r3, [r7, #24] 801f9f0: 2b00 cmp r3, #0 801f9f2: d006 beq.n 801fa02 801f9f4: 4b09 ldr r3, [pc, #36] @ (801fa1c ) 801f9f6: f44f 7276 mov.w r2, #984 @ 0x3d8 801f9fa: 490e ldr r1, [pc, #56] @ (801fa34 ) 801f9fc: 4809 ldr r0, [pc, #36] @ (801fa24 ) 801f9fe: f009 ffe5 bl 80299cc if (p != NULL) { 801fa02: 693b ldr r3, [r7, #16] 801fa04: 2b00 cmp r3, #0 801fa06: d002 beq.n 801fa0e pbuf_free(p); 801fa08: 6938 ldr r0, [r7, #16] 801fa0a: f7fa fd67 bl 801a4dc } return ERR_MEM; 801fa0e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 801fa12: 4618 mov r0, r3 801fa14: 3724 adds r7, #36 @ 0x24 801fa16: 46bd mov sp, r7 801fa18: bd90 pop {r4, r7, pc} 801fa1a: bf00 nop 801fa1c: 0802f190 .word 0x0802f190 801fa20: 0802f580 .word 0x0802f580 801fa24: 0802f1e4 .word 0x0802f1e4 801fa28: 0802f5a4 .word 0x0802f5a4 801fa2c: 0802f5c8 .word 0x0802f5c8 801fa30: 0802f5d8 .word 0x0802f5d8 801fa34: 0802f5e8 .word 0x0802f5e8 0801fa38 : * @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) { 801fa38: b590 push {r4, r7, lr} 801fa3a: b085 sub sp, #20 801fa3c: af00 add r7, sp, #0 801fa3e: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL); 801fa40: 687b ldr r3, [r7, #4] 801fa42: 2b00 cmp r3, #0 801fa44: d106 bne.n 801fa54 801fa46: 4b21 ldr r3, [pc, #132] @ (801facc ) 801fa48: f240 32eb movw r2, #1003 @ 0x3eb 801fa4c: 4920 ldr r1, [pc, #128] @ (801fad0 ) 801fa4e: 4821 ldr r0, [pc, #132] @ (801fad4 ) 801fa50: f009 ffbc bl 80299cc /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 801fa54: 687b ldr r3, [r7, #4] 801fa56: 6edb ldr r3, [r3, #108] @ 0x6c 801fa58: 2b00 cmp r3, #0 801fa5a: d02e beq.n 801faba struct tcp_seg *last_unsent; for (last_unsent = pcb->unsent; last_unsent->next != NULL; 801fa5c: 687b ldr r3, [r7, #4] 801fa5e: 6edb ldr r3, [r3, #108] @ 0x6c 801fa60: 60fb str r3, [r7, #12] 801fa62: e002 b.n 801fa6a last_unsent = last_unsent->next); 801fa64: 68fb ldr r3, [r7, #12] 801fa66: 681b ldr r3, [r3, #0] 801fa68: 60fb str r3, [r7, #12] for (last_unsent = pcb->unsent; last_unsent->next != NULL; 801fa6a: 68fb ldr r3, [r7, #12] 801fa6c: 681b ldr r3, [r3, #0] 801fa6e: 2b00 cmp r3, #0 801fa70: d1f8 bne.n 801fa64 if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { 801fa72: 68fb ldr r3, [r7, #12] 801fa74: 691b ldr r3, [r3, #16] 801fa76: 899b ldrh r3, [r3, #12] 801fa78: b29b uxth r3, r3 801fa7a: 4618 mov r0, r3 801fa7c: f7f9 f84c bl 8018b18 801fa80: 4603 mov r3, r0 801fa82: b2db uxtb r3, r3 801fa84: f003 0307 and.w r3, r3, #7 801fa88: 2b00 cmp r3, #0 801fa8a: d116 bne.n 801faba /* no SYN/FIN/RST flag in the header, we can add the FIN flag */ TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN); 801fa8c: 68fb ldr r3, [r7, #12] 801fa8e: 691b ldr r3, [r3, #16] 801fa90: 899b ldrh r3, [r3, #12] 801fa92: b29c uxth r4, r3 801fa94: 2001 movs r0, #1 801fa96: f7f9 f83f bl 8018b18 801fa9a: 4603 mov r3, r0 801fa9c: 461a mov r2, r3 801fa9e: 68fb ldr r3, [r7, #12] 801faa0: 691b ldr r3, [r3, #16] 801faa2: 4322 orrs r2, r4 801faa4: b292 uxth r2, r2 801faa6: 819a strh r2, [r3, #12] tcp_set_flags(pcb, TF_FIN); 801faa8: 687b ldr r3, [r7, #4] 801faaa: 8b5b ldrh r3, [r3, #26] 801faac: f043 0320 orr.w r3, r3, #32 801fab0: b29a uxth r2, r3 801fab2: 687b ldr r3, [r7, #4] 801fab4: 835a strh r2, [r3, #26] return ERR_OK; 801fab6: 2300 movs r3, #0 801fab8: e004 b.n 801fac4 } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); 801faba: 2101 movs r1, #1 801fabc: 6878 ldr r0, [r7, #4] 801fabe: f000 f80b bl 801fad8 801fac2: 4603 mov r3, r0 } 801fac4: 4618 mov r0, r3 801fac6: 3714 adds r7, #20 801fac8: 46bd mov sp, r7 801faca: bd90 pop {r4, r7, pc} 801facc: 0802f190 .word 0x0802f190 801fad0: 0802f5f4 .word 0x0802f5f4 801fad4: 0802f1e4 .word 0x0802f1e4 0801fad8 : * @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) { 801fad8: b580 push {r7, lr} 801fada: b088 sub sp, #32 801fadc: af02 add r7, sp, #8 801fade: 6078 str r0, [r7, #4] 801fae0: 460b mov r3, r1 801fae2: 70fb strb r3, [r7, #3] struct pbuf *p; struct tcp_seg *seg; u8_t optflags = 0; 801fae4: 2300 movs r3, #0 801fae6: 75fb strb r3, [r7, #23] u8_t optlen = 0; 801fae8: 2300 movs r3, #0 801faea: 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)", 801faec: 78fb ldrb r3, [r7, #3] 801faee: f003 0303 and.w r3, r3, #3 801faf2: 2b00 cmp r3, #0 801faf4: d106 bne.n 801fb04 801faf6: 4b67 ldr r3, [pc, #412] @ (801fc94 ) 801faf8: f240 4211 movw r2, #1041 @ 0x411 801fafc: 4966 ldr r1, [pc, #408] @ (801fc98 ) 801fafe: 4867 ldr r0, [pc, #412] @ (801fc9c ) 801fb00: f009 ff64 bl 80299cc (flags & (TCP_SYN | TCP_FIN)) != 0); LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL); 801fb04: 687b ldr r3, [r7, #4] 801fb06: 2b00 cmp r3, #0 801fb08: d106 bne.n 801fb18 801fb0a: 4b62 ldr r3, [pc, #392] @ (801fc94 ) 801fb0c: f240 4213 movw r2, #1043 @ 0x413 801fb10: 4963 ldr r1, [pc, #396] @ (801fca0 ) 801fb12: 4862 ldr r0, [pc, #392] @ (801fc9c ) 801fb14: f009 ff5a bl 80299cc /* 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) { 801fb18: 78fb ldrb r3, [r7, #3] 801fb1a: f003 0302 and.w r3, r3, #2 801fb1e: 2b00 cmp r3, #0 801fb20: d001 beq.n 801fb26 optflags = TF_SEG_OPTS_MSS; 801fb22: 2301 movs r3, #1 801fb24: 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); 801fb26: 7dfb ldrb r3, [r7, #23] 801fb28: 009b lsls r3, r3, #2 801fb2a: b2db uxtb r3, r3 801fb2c: f003 0304 and.w r3, r3, #4 801fb30: 75bb strb r3, [r7, #22] /* Allocate pbuf with room for TCP header + options */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 801fb32: 7dbb ldrb r3, [r7, #22] 801fb34: b29b uxth r3, r3 801fb36: f44f 7220 mov.w r2, #640 @ 0x280 801fb3a: 4619 mov r1, r3 801fb3c: 2036 movs r0, #54 @ 0x36 801fb3e: f7fa f9b7 bl 8019eb0 801fb42: 60f8 str r0, [r7, #12] 801fb44: 68fb ldr r3, [r7, #12] 801fb46: 2b00 cmp r3, #0 801fb48: d109 bne.n 801fb5e tcp_set_flags(pcb, TF_NAGLEMEMERR); 801fb4a: 687b ldr r3, [r7, #4] 801fb4c: 8b5b ldrh r3, [r3, #26] 801fb4e: f043 0380 orr.w r3, r3, #128 @ 0x80 801fb52: b29a uxth r2, r3 801fb54: 687b ldr r3, [r7, #4] 801fb56: 835a strh r2, [r3, #26] TCP_STATS_INC(tcp.memerr); return ERR_MEM; 801fb58: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801fb5c: e095 b.n 801fc8a } LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen", 801fb5e: 68fb ldr r3, [r7, #12] 801fb60: 895a ldrh r2, [r3, #10] 801fb62: 7dbb ldrb r3, [r7, #22] 801fb64: b29b uxth r3, r3 801fb66: 429a cmp r2, r3 801fb68: d206 bcs.n 801fb78 801fb6a: 4b4a ldr r3, [pc, #296] @ (801fc94 ) 801fb6c: f240 4239 movw r2, #1081 @ 0x439 801fb70: 494c ldr r1, [pc, #304] @ (801fca4 ) 801fb72: 484a ldr r0, [pc, #296] @ (801fc9c ) 801fb74: f009 ff2a bl 80299cc (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) { 801fb78: 687b ldr r3, [r7, #4] 801fb7a: 6dd9 ldr r1, [r3, #92] @ 0x5c 801fb7c: 78fa ldrb r2, [r7, #3] 801fb7e: 7dfb ldrb r3, [r7, #23] 801fb80: 9300 str r3, [sp, #0] 801fb82: 460b mov r3, r1 801fb84: 68f9 ldr r1, [r7, #12] 801fb86: 6878 ldr r0, [r7, #4] 801fb88: f7ff f8b6 bl 801ecf8 801fb8c: 60b8 str r0, [r7, #8] 801fb8e: 68bb ldr r3, [r7, #8] 801fb90: 2b00 cmp r3, #0 801fb92: d109 bne.n 801fba8 tcp_set_flags(pcb, TF_NAGLEMEMERR); 801fb94: 687b ldr r3, [r7, #4] 801fb96: 8b5b ldrh r3, [r3, #26] 801fb98: f043 0380 orr.w r3, r3, #128 @ 0x80 801fb9c: b29a uxth r2, r3 801fb9e: 687b ldr r3, [r7, #4] 801fba0: 835a strh r2, [r3, #26] TCP_STATS_INC(tcp.memerr); return ERR_MEM; 801fba2: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801fba6: e070 b.n 801fc8a } LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0); 801fba8: 68bb ldr r3, [r7, #8] 801fbaa: 691b ldr r3, [r3, #16] 801fbac: f003 0303 and.w r3, r3, #3 801fbb0: 2b00 cmp r3, #0 801fbb2: d006 beq.n 801fbc2 801fbb4: 4b37 ldr r3, [pc, #220] @ (801fc94 ) 801fbb6: f240 4242 movw r2, #1090 @ 0x442 801fbba: 493b ldr r1, [pc, #236] @ (801fca8 ) 801fbbc: 4837 ldr r0, [pc, #220] @ (801fc9c ) 801fbbe: f009 ff05 bl 80299cc LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0); 801fbc2: 68bb ldr r3, [r7, #8] 801fbc4: 891b ldrh r3, [r3, #8] 801fbc6: 2b00 cmp r3, #0 801fbc8: d006 beq.n 801fbd8 801fbca: 4b32 ldr r3, [pc, #200] @ (801fc94 ) 801fbcc: f240 4243 movw r2, #1091 @ 0x443 801fbd0: 4936 ldr r1, [pc, #216] @ (801fcac ) 801fbd2: 4832 ldr r0, [pc, #200] @ (801fc9c ) 801fbd4: f009 fefa bl 80299cc 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) { 801fbd8: 687b ldr r3, [r7, #4] 801fbda: 6edb ldr r3, [r3, #108] @ 0x6c 801fbdc: 2b00 cmp r3, #0 801fbde: d103 bne.n 801fbe8 pcb->unsent = seg; 801fbe0: 687b ldr r3, [r7, #4] 801fbe2: 68ba ldr r2, [r7, #8] 801fbe4: 66da str r2, [r3, #108] @ 0x6c 801fbe6: e00d b.n 801fc04 } else { struct tcp_seg *useg; for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); 801fbe8: 687b ldr r3, [r7, #4] 801fbea: 6edb ldr r3, [r3, #108] @ 0x6c 801fbec: 613b str r3, [r7, #16] 801fbee: e002 b.n 801fbf6 801fbf0: 693b ldr r3, [r7, #16] 801fbf2: 681b ldr r3, [r3, #0] 801fbf4: 613b str r3, [r7, #16] 801fbf6: 693b ldr r3, [r7, #16] 801fbf8: 681b ldr r3, [r3, #0] 801fbfa: 2b00 cmp r3, #0 801fbfc: d1f8 bne.n 801fbf0 useg->next = seg; 801fbfe: 693b ldr r3, [r7, #16] 801fc00: 68ba ldr r2, [r7, #8] 801fc02: 601a str r2, [r3, #0] } #if TCP_OVERSIZE /* The new unsent tail has no space */ pcb->unsent_oversize = 0; 801fc04: 687b ldr r3, [r7, #4] 801fc06: 2200 movs r2, #0 801fc08: 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)) { 801fc0c: 78fb ldrb r3, [r7, #3] 801fc0e: f003 0302 and.w r3, r3, #2 801fc12: 2b00 cmp r3, #0 801fc14: d104 bne.n 801fc20 801fc16: 78fb ldrb r3, [r7, #3] 801fc18: f003 0301 and.w r3, r3, #1 801fc1c: 2b00 cmp r3, #0 801fc1e: d004 beq.n 801fc2a pcb->snd_lbb++; 801fc20: 687b ldr r3, [r7, #4] 801fc22: 6ddb ldr r3, [r3, #92] @ 0x5c 801fc24: 1c5a adds r2, r3, #1 801fc26: 687b ldr r3, [r7, #4] 801fc28: 65da str r2, [r3, #92] @ 0x5c /* optlen does not influence snd_buf */ } if (flags & TCP_FIN) { 801fc2a: 78fb ldrb r3, [r7, #3] 801fc2c: f003 0301 and.w r3, r3, #1 801fc30: 2b00 cmp r3, #0 801fc32: d006 beq.n 801fc42 tcp_set_flags(pcb, TF_FIN); 801fc34: 687b ldr r3, [r7, #4] 801fc36: 8b5b ldrh r3, [r3, #26] 801fc38: f043 0320 orr.w r3, r3, #32 801fc3c: b29a uxth r2, r3 801fc3e: 687b ldr r3, [r7, #4] 801fc40: 835a strh r2, [r3, #26] } /* update number of segments on the queues */ pcb->snd_queuelen += pbuf_clen(seg->p); 801fc42: 68bb ldr r3, [r7, #8] 801fc44: 685b ldr r3, [r3, #4] 801fc46: 4618 mov r0, r3 801fc48: f7fa fcd6 bl 801a5f8 801fc4c: 4603 mov r3, r0 801fc4e: 461a mov r2, r3 801fc50: 687b ldr r3, [r7, #4] 801fc52: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801fc56: 4413 add r3, r2 801fc58: b29a uxth r2, r3 801fc5a: 687b ldr r3, [r7, #4] 801fc5c: 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) { 801fc60: 687b ldr r3, [r7, #4] 801fc62: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801fc66: 2b00 cmp r3, #0 801fc68: d00e beq.n 801fc88 LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", 801fc6a: 687b ldr r3, [r7, #4] 801fc6c: 6f1b ldr r3, [r3, #112] @ 0x70 801fc6e: 2b00 cmp r3, #0 801fc70: d10a bne.n 801fc88 801fc72: 687b ldr r3, [r7, #4] 801fc74: 6edb ldr r3, [r3, #108] @ 0x6c 801fc76: 2b00 cmp r3, #0 801fc78: d106 bne.n 801fc88 801fc7a: 4b06 ldr r3, [pc, #24] @ (801fc94 ) 801fc7c: f240 4265 movw r2, #1125 @ 0x465 801fc80: 490b ldr r1, [pc, #44] @ (801fcb0 ) 801fc82: 4806 ldr r0, [pc, #24] @ (801fc9c ) 801fc84: f009 fea2 bl 80299cc pcb->unacked != NULL || pcb->unsent != NULL); } return ERR_OK; 801fc88: 2300 movs r3, #0 } 801fc8a: 4618 mov r0, r3 801fc8c: 3718 adds r7, #24 801fc8e: 46bd mov sp, r7 801fc90: bd80 pop {r7, pc} 801fc92: bf00 nop 801fc94: 0802f190 .word 0x0802f190 801fc98: 0802f610 .word 0x0802f610 801fc9c: 0802f1e4 .word 0x0802f1e4 801fca0: 0802f668 .word 0x0802f668 801fca4: 0802f688 .word 0x0802f688 801fca8: 0802f6c4 .word 0x0802f6c4 801fcac: 0802f6dc .word 0x0802f6dc 801fcb0: 0802f708 .word 0x0802f708 0801fcb4 : * @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) { 801fcb4: b5b0 push {r4, r5, r7, lr} 801fcb6: b08a sub sp, #40 @ 0x28 801fcb8: af00 add r7, sp, #0 801fcba: 6078 str r0, [r7, #4] struct netif *netif; #if TCP_CWND_DEBUG s16_t i = 0; #endif /* TCP_CWND_DEBUG */ LWIP_ASSERT_CORE_LOCKED(); 801fcbc: f7f0 fc38 bl 8010530 LWIP_ASSERT("tcp_output: invalid pcb", pcb != NULL); 801fcc0: 687b ldr r3, [r7, #4] 801fcc2: 2b00 cmp r3, #0 801fcc4: d106 bne.n 801fcd4 801fcc6: 4b8a ldr r3, [pc, #552] @ (801fef0 ) 801fcc8: f240 42e1 movw r2, #1249 @ 0x4e1 801fccc: 4989 ldr r1, [pc, #548] @ (801fef4 ) 801fcce: 488a ldr r0, [pc, #552] @ (801fef8 ) 801fcd0: f009 fe7c bl 80299cc /* pcb->state LISTEN not allowed here */ LWIP_ASSERT("don't call tcp_output for listen-pcbs", 801fcd4: 687b ldr r3, [r7, #4] 801fcd6: 7d1b ldrb r3, [r3, #20] 801fcd8: 2b01 cmp r3, #1 801fcda: d106 bne.n 801fcea 801fcdc: 4b84 ldr r3, [pc, #528] @ (801fef0 ) 801fcde: f240 42e3 movw r2, #1251 @ 0x4e3 801fce2: 4986 ldr r1, [pc, #536] @ (801fefc ) 801fce4: 4884 ldr r0, [pc, #528] @ (801fef8 ) 801fce6: f009 fe71 bl 80299cc /* 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) { 801fcea: 4b85 ldr r3, [pc, #532] @ (801ff00 ) 801fcec: 681b ldr r3, [r3, #0] 801fcee: 687a ldr r2, [r7, #4] 801fcf0: 429a cmp r2, r3 801fcf2: d101 bne.n 801fcf8 return ERR_OK; 801fcf4: 2300 movs r3, #0 801fcf6: e1d1 b.n 802009c } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 801fcf8: 687b ldr r3, [r7, #4] 801fcfa: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801fcfe: 687b ldr r3, [r7, #4] 801fd00: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801fd04: 4293 cmp r3, r2 801fd06: bf28 it cs 801fd08: 4613 movcs r3, r2 801fd0a: b29b uxth r3, r3 801fd0c: 61bb str r3, [r7, #24] seg = pcb->unsent; 801fd0e: 687b ldr r3, [r7, #4] 801fd10: 6edb ldr r3, [r3, #108] @ 0x6c 801fd12: 627b str r3, [r7, #36] @ 0x24 if (seg == NULL) { 801fd14: 6a7b ldr r3, [r7, #36] @ 0x24 801fd16: 2b00 cmp r3, #0 801fd18: d10b bne.n 801fd32 ", 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) { 801fd1a: 687b ldr r3, [r7, #4] 801fd1c: 8b5b ldrh r3, [r3, #26] 801fd1e: f003 0302 and.w r3, r3, #2 801fd22: 2b00 cmp r3, #0 801fd24: f000 81ad beq.w 8020082 return tcp_send_empty_ack(pcb); 801fd28: 6878 ldr r0, [r7, #4] 801fd2a: f000 fdd7 bl 80208dc 801fd2e: 4603 mov r3, r0 801fd30: e1b4 b.n 802009c 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); 801fd32: 6879 ldr r1, [r7, #4] 801fd34: 687b ldr r3, [r7, #4] 801fd36: 3304 adds r3, #4 801fd38: 461a mov r2, r3 801fd3a: 6878 ldr r0, [r7, #4] 801fd3c: f7fe ffc0 bl 801ecc0 801fd40: 6178 str r0, [r7, #20] if (netif == NULL) { 801fd42: 697b ldr r3, [r7, #20] 801fd44: 2b00 cmp r3, #0 801fd46: d102 bne.n 801fd4e return ERR_RTE; 801fd48: f06f 0303 mvn.w r3, #3 801fd4c: e1a6 b.n 802009c } /* If we don't have a local IP address, we get one from netif */ if (ip_addr_isany(&pcb->local_ip)) { 801fd4e: 687b ldr r3, [r7, #4] 801fd50: 2b00 cmp r3, #0 801fd52: d003 beq.n 801fd5c 801fd54: 687b ldr r3, [r7, #4] 801fd56: 681b ldr r3, [r3, #0] 801fd58: 2b00 cmp r3, #0 801fd5a: d111 bne.n 801fd80 const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, &pcb->remote_ip); 801fd5c: 697b ldr r3, [r7, #20] 801fd5e: 2b00 cmp r3, #0 801fd60: d002 beq.n 801fd68 801fd62: 697b ldr r3, [r7, #20] 801fd64: 3304 adds r3, #4 801fd66: e000 b.n 801fd6a 801fd68: 2300 movs r3, #0 801fd6a: 613b str r3, [r7, #16] if (local_ip == NULL) { 801fd6c: 693b ldr r3, [r7, #16] 801fd6e: 2b00 cmp r3, #0 801fd70: d102 bne.n 801fd78 return ERR_RTE; 801fd72: f06f 0303 mvn.w r3, #3 801fd76: e191 b.n 802009c } ip_addr_copy(pcb->local_ip, *local_ip); 801fd78: 693b ldr r3, [r7, #16] 801fd7a: 681a ldr r2, [r3, #0] 801fd7c: 687b ldr r3, [r7, #4] 801fd7e: 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) { 801fd80: 6a7b ldr r3, [r7, #36] @ 0x24 801fd82: 691b ldr r3, [r3, #16] 801fd84: 685b ldr r3, [r3, #4] 801fd86: 4618 mov r0, r3 801fd88: f7f8 fedb bl 8018b42 801fd8c: 4602 mov r2, r0 801fd8e: 687b ldr r3, [r7, #4] 801fd90: 6c5b ldr r3, [r3, #68] @ 0x44 801fd92: 1ad3 subs r3, r2, r3 801fd94: 6a7a ldr r2, [r7, #36] @ 0x24 801fd96: 8912 ldrh r2, [r2, #8] 801fd98: 4413 add r3, r2 801fd9a: 69ba ldr r2, [r7, #24] 801fd9c: 429a cmp r2, r3 801fd9e: d227 bcs.n 801fdf0 * 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) { 801fda0: 687b ldr r3, [r7, #4] 801fda2: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801fda6: 461a mov r2, r3 801fda8: 69bb ldr r3, [r7, #24] 801fdaa: 4293 cmp r3, r2 801fdac: d114 bne.n 801fdd8 801fdae: 687b ldr r3, [r7, #4] 801fdb0: 6f1b ldr r3, [r3, #112] @ 0x70 801fdb2: 2b00 cmp r3, #0 801fdb4: d110 bne.n 801fdd8 801fdb6: 687b ldr r3, [r7, #4] 801fdb8: f893 3099 ldrb.w r3, [r3, #153] @ 0x99 801fdbc: 2b00 cmp r3, #0 801fdbe: d10b bne.n 801fdd8 pcb->persist_cnt = 0; 801fdc0: 687b ldr r3, [r7, #4] 801fdc2: 2200 movs r2, #0 801fdc4: f883 2098 strb.w r2, [r3, #152] @ 0x98 pcb->persist_backoff = 1; 801fdc8: 687b ldr r3, [r7, #4] 801fdca: 2201 movs r2, #1 801fdcc: f883 2099 strb.w r2, [r3, #153] @ 0x99 pcb->persist_probe = 0; 801fdd0: 687b ldr r3, [r7, #4] 801fdd2: 2200 movs r2, #0 801fdd4: 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) { 801fdd8: 687b ldr r3, [r7, #4] 801fdda: 8b5b ldrh r3, [r3, #26] 801fddc: f003 0302 and.w r3, r3, #2 801fde0: 2b00 cmp r3, #0 801fde2: f000 8150 beq.w 8020086 return tcp_send_empty_ack(pcb); 801fde6: 6878 ldr r0, [r7, #4] 801fde8: f000 fd78 bl 80208dc 801fdec: 4603 mov r3, r0 801fdee: e155 b.n 802009c } goto output_done; } /* Stop persist timer, above conditions are not active */ pcb->persist_backoff = 0; 801fdf0: 687b ldr r3, [r7, #4] 801fdf2: 2200 movs r2, #0 801fdf4: f883 2099 strb.w r2, [r3, #153] @ 0x99 /* useg should point to last segment on unacked queue */ useg = pcb->unacked; 801fdf8: 687b ldr r3, [r7, #4] 801fdfa: 6f1b ldr r3, [r3, #112] @ 0x70 801fdfc: 623b str r3, [r7, #32] if (useg != NULL) { 801fdfe: 6a3b ldr r3, [r7, #32] 801fe00: 2b00 cmp r3, #0 801fe02: f000 811f beq.w 8020044 for (; useg->next != NULL; useg = useg->next); 801fe06: e002 b.n 801fe0e 801fe08: 6a3b ldr r3, [r7, #32] 801fe0a: 681b ldr r3, [r3, #0] 801fe0c: 623b str r3, [r7, #32] 801fe0e: 6a3b ldr r3, [r7, #32] 801fe10: 681b ldr r3, [r3, #0] 801fe12: 2b00 cmp r3, #0 801fe14: d1f8 bne.n 801fe08 } /* data available and window allows it to be sent? */ while (seg != NULL && 801fe16: e115 b.n 8020044 lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { LWIP_ASSERT("RST not expected here!", 801fe18: 6a7b ldr r3, [r7, #36] @ 0x24 801fe1a: 691b ldr r3, [r3, #16] 801fe1c: 899b ldrh r3, [r3, #12] 801fe1e: b29b uxth r3, r3 801fe20: 4618 mov r0, r3 801fe22: f7f8 fe79 bl 8018b18 801fe26: 4603 mov r3, r0 801fe28: b2db uxtb r3, r3 801fe2a: f003 0304 and.w r3, r3, #4 801fe2e: 2b00 cmp r3, #0 801fe30: d006 beq.n 801fe40 801fe32: 4b2f ldr r3, [pc, #188] @ (801fef0 ) 801fe34: f240 5236 movw r2, #1334 @ 0x536 801fe38: 4932 ldr r1, [pc, #200] @ (801ff04 ) 801fe3a: 482f ldr r0, [pc, #188] @ (801fef8 ) 801fe3c: f009 fdc6 bl 80299cc * - 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) && 801fe40: 687b ldr r3, [r7, #4] 801fe42: 6f1b ldr r3, [r3, #112] @ 0x70 801fe44: 2b00 cmp r3, #0 801fe46: d01f beq.n 801fe88 801fe48: 687b ldr r3, [r7, #4] 801fe4a: 8b5b ldrh r3, [r3, #26] 801fe4c: f003 0344 and.w r3, r3, #68 @ 0x44 801fe50: 2b00 cmp r3, #0 801fe52: d119 bne.n 801fe88 801fe54: 687b ldr r3, [r7, #4] 801fe56: 6edb ldr r3, [r3, #108] @ 0x6c 801fe58: 2b00 cmp r3, #0 801fe5a: d00b beq.n 801fe74 801fe5c: 687b ldr r3, [r7, #4] 801fe5e: 6edb ldr r3, [r3, #108] @ 0x6c 801fe60: 681b ldr r3, [r3, #0] 801fe62: 2b00 cmp r3, #0 801fe64: d110 bne.n 801fe88 801fe66: 687b ldr r3, [r7, #4] 801fe68: 6edb ldr r3, [r3, #108] @ 0x6c 801fe6a: 891a ldrh r2, [r3, #8] 801fe6c: 687b ldr r3, [r7, #4] 801fe6e: 8e5b ldrh r3, [r3, #50] @ 0x32 801fe70: 429a cmp r2, r3 801fe72: d209 bcs.n 801fe88 801fe74: 687b ldr r3, [r7, #4] 801fe76: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 801fe7a: 2b00 cmp r3, #0 801fe7c: d004 beq.n 801fe88 801fe7e: 687b ldr r3, [r7, #4] 801fe80: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801fe84: 2b0f cmp r3, #15 801fe86: d901 bls.n 801fe8c 801fe88: 2301 movs r3, #1 801fe8a: e000 b.n 801fe8e 801fe8c: 2300 movs r3, #0 801fe8e: 2b00 cmp r3, #0 801fe90: d106 bne.n 801fea0 ((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) { 801fe92: 687b ldr r3, [r7, #4] 801fe94: 8b5b ldrh r3, [r3, #26] 801fe96: f003 03a0 and.w r3, r3, #160 @ 0xa0 if ((tcp_do_output_nagle(pcb) == 0) && 801fe9a: 2b00 cmp r3, #0 801fe9c: f000 80e7 beq.w 802006e pcb->lastack, lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i)); ++i; #endif /* TCP_CWND_DEBUG */ if (pcb->state != SYN_SENT) { 801fea0: 687b ldr r3, [r7, #4] 801fea2: 7d1b ldrb r3, [r3, #20] 801fea4: 2b02 cmp r3, #2 801fea6: d00d beq.n 801fec4 TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); 801fea8: 6a7b ldr r3, [r7, #36] @ 0x24 801feaa: 691b ldr r3, [r3, #16] 801feac: 899b ldrh r3, [r3, #12] 801feae: b29c uxth r4, r3 801feb0: 2010 movs r0, #16 801feb2: f7f8 fe31 bl 8018b18 801feb6: 4603 mov r3, r0 801feb8: 461a mov r2, r3 801feba: 6a7b ldr r3, [r7, #36] @ 0x24 801febc: 691b ldr r3, [r3, #16] 801febe: 4322 orrs r2, r4 801fec0: b292 uxth r2, r2 801fec2: 819a strh r2, [r3, #12] } err = tcp_output_segment(seg, pcb, netif); 801fec4: 697a ldr r2, [r7, #20] 801fec6: 6879 ldr r1, [r7, #4] 801fec8: 6a78 ldr r0, [r7, #36] @ 0x24 801feca: f000 f90b bl 80200e4 801fece: 4603 mov r3, r0 801fed0: 73fb strb r3, [r7, #15] if (err != ERR_OK) { 801fed2: f997 300f ldrsb.w r3, [r7, #15] 801fed6: 2b00 cmp r3, #0 801fed8: d016 beq.n 801ff08 /* segment could not be sent, for whatever reason */ tcp_set_flags(pcb, TF_NAGLEMEMERR); 801feda: 687b ldr r3, [r7, #4] 801fedc: 8b5b ldrh r3, [r3, #26] 801fede: f043 0380 orr.w r3, r3, #128 @ 0x80 801fee2: b29a uxth r2, r3 801fee4: 687b ldr r3, [r7, #4] 801fee6: 835a strh r2, [r3, #26] return err; 801fee8: f997 300f ldrsb.w r3, [r7, #15] 801feec: e0d6 b.n 802009c 801feee: bf00 nop 801fef0: 0802f190 .word 0x0802f190 801fef4: 0802f730 .word 0x0802f730 801fef8: 0802f1e4 .word 0x0802f1e4 801fefc: 0802f748 .word 0x0802f748 801ff00: 2402aed8 .word 0x2402aed8 801ff04: 0802f770 .word 0x0802f770 } #if TCP_OVERSIZE_DBGCHECK seg->oversize_left = 0; 801ff08: 6a7b ldr r3, [r7, #36] @ 0x24 801ff0a: 2200 movs r2, #0 801ff0c: 815a strh r2, [r3, #10] #endif /* TCP_OVERSIZE_DBGCHECK */ pcb->unsent = seg->next; 801ff0e: 6a7b ldr r3, [r7, #36] @ 0x24 801ff10: 681a ldr r2, [r3, #0] 801ff12: 687b ldr r3, [r7, #4] 801ff14: 66da str r2, [r3, #108] @ 0x6c if (pcb->state != SYN_SENT) { 801ff16: 687b ldr r3, [r7, #4] 801ff18: 7d1b ldrb r3, [r3, #20] 801ff1a: 2b02 cmp r3, #2 801ff1c: d006 beq.n 801ff2c tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 801ff1e: 687b ldr r3, [r7, #4] 801ff20: 8b5b ldrh r3, [r3, #26] 801ff22: f023 0303 bic.w r3, r3, #3 801ff26: b29a uxth r2, r3 801ff28: 687b ldr r3, [r7, #4] 801ff2a: 835a strh r2, [r3, #26] } snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 801ff2c: 6a7b ldr r3, [r7, #36] @ 0x24 801ff2e: 691b ldr r3, [r3, #16] 801ff30: 685b ldr r3, [r3, #4] 801ff32: 4618 mov r0, r3 801ff34: f7f8 fe05 bl 8018b42 801ff38: 4604 mov r4, r0 801ff3a: 6a7b ldr r3, [r7, #36] @ 0x24 801ff3c: 891b ldrh r3, [r3, #8] 801ff3e: 461d mov r5, r3 801ff40: 6a7b ldr r3, [r7, #36] @ 0x24 801ff42: 691b ldr r3, [r3, #16] 801ff44: 899b ldrh r3, [r3, #12] 801ff46: b29b uxth r3, r3 801ff48: 4618 mov r0, r3 801ff4a: f7f8 fde5 bl 8018b18 801ff4e: 4603 mov r3, r0 801ff50: b2db uxtb r3, r3 801ff52: f003 0303 and.w r3, r3, #3 801ff56: 2b00 cmp r3, #0 801ff58: d001 beq.n 801ff5e 801ff5a: 2301 movs r3, #1 801ff5c: e000 b.n 801ff60 801ff5e: 2300 movs r3, #0 801ff60: 442b add r3, r5 801ff62: 4423 add r3, r4 801ff64: 60bb str r3, [r7, #8] if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 801ff66: 687b ldr r3, [r7, #4] 801ff68: 6d1a ldr r2, [r3, #80] @ 0x50 801ff6a: 68bb ldr r3, [r7, #8] 801ff6c: 1ad3 subs r3, r2, r3 801ff6e: 2b00 cmp r3, #0 801ff70: da02 bge.n 801ff78 pcb->snd_nxt = snd_nxt; 801ff72: 687b ldr r3, [r7, #4] 801ff74: 68ba ldr r2, [r7, #8] 801ff76: 651a str r2, [r3, #80] @ 0x50 } /* put segment on unacknowledged list if length > 0 */ if (TCP_TCPLEN(seg) > 0) { 801ff78: 6a7b ldr r3, [r7, #36] @ 0x24 801ff7a: 891b ldrh r3, [r3, #8] 801ff7c: 461c mov r4, r3 801ff7e: 6a7b ldr r3, [r7, #36] @ 0x24 801ff80: 691b ldr r3, [r3, #16] 801ff82: 899b ldrh r3, [r3, #12] 801ff84: b29b uxth r3, r3 801ff86: 4618 mov r0, r3 801ff88: f7f8 fdc6 bl 8018b18 801ff8c: 4603 mov r3, r0 801ff8e: b2db uxtb r3, r3 801ff90: f003 0303 and.w r3, r3, #3 801ff94: 2b00 cmp r3, #0 801ff96: d001 beq.n 801ff9c 801ff98: 2301 movs r3, #1 801ff9a: e000 b.n 801ff9e 801ff9c: 2300 movs r3, #0 801ff9e: 4423 add r3, r4 801ffa0: 2b00 cmp r3, #0 801ffa2: d049 beq.n 8020038 seg->next = NULL; 801ffa4: 6a7b ldr r3, [r7, #36] @ 0x24 801ffa6: 2200 movs r2, #0 801ffa8: 601a str r2, [r3, #0] /* unacked list is empty? */ if (pcb->unacked == NULL) { 801ffaa: 687b ldr r3, [r7, #4] 801ffac: 6f1b ldr r3, [r3, #112] @ 0x70 801ffae: 2b00 cmp r3, #0 801ffb0: d105 bne.n 801ffbe pcb->unacked = seg; 801ffb2: 687b ldr r3, [r7, #4] 801ffb4: 6a7a ldr r2, [r7, #36] @ 0x24 801ffb6: 671a str r2, [r3, #112] @ 0x70 useg = seg; 801ffb8: 6a7b ldr r3, [r7, #36] @ 0x24 801ffba: 623b str r3, [r7, #32] 801ffbc: e03f b.n 802003e /* 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))) { 801ffbe: 6a7b ldr r3, [r7, #36] @ 0x24 801ffc0: 691b ldr r3, [r3, #16] 801ffc2: 685b ldr r3, [r3, #4] 801ffc4: 4618 mov r0, r3 801ffc6: f7f8 fdbc bl 8018b42 801ffca: 4604 mov r4, r0 801ffcc: 6a3b ldr r3, [r7, #32] 801ffce: 691b ldr r3, [r3, #16] 801ffd0: 685b ldr r3, [r3, #4] 801ffd2: 4618 mov r0, r3 801ffd4: f7f8 fdb5 bl 8018b42 801ffd8: 4603 mov r3, r0 801ffda: 1ae3 subs r3, r4, r3 801ffdc: 2b00 cmp r3, #0 801ffde: da24 bge.n 802002a /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); 801ffe0: 687b ldr r3, [r7, #4] 801ffe2: 3370 adds r3, #112 @ 0x70 801ffe4: 61fb str r3, [r7, #28] while (*cur_seg && 801ffe6: e002 b.n 801ffee TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 801ffe8: 69fb ldr r3, [r7, #28] 801ffea: 681b ldr r3, [r3, #0] 801ffec: 61fb str r3, [r7, #28] while (*cur_seg && 801ffee: 69fb ldr r3, [r7, #28] 801fff0: 681b ldr r3, [r3, #0] 801fff2: 2b00 cmp r3, #0 801fff4: d011 beq.n 802001a TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { 801fff6: 69fb ldr r3, [r7, #28] 801fff8: 681b ldr r3, [r3, #0] 801fffa: 691b ldr r3, [r3, #16] 801fffc: 685b ldr r3, [r3, #4] 801fffe: 4618 mov r0, r3 8020000: f7f8 fd9f bl 8018b42 8020004: 4604 mov r4, r0 8020006: 6a7b ldr r3, [r7, #36] @ 0x24 8020008: 691b ldr r3, [r3, #16] 802000a: 685b ldr r3, [r3, #4] 802000c: 4618 mov r0, r3 802000e: f7f8 fd98 bl 8018b42 8020012: 4603 mov r3, r0 8020014: 1ae3 subs r3, r4, r3 while (*cur_seg && 8020016: 2b00 cmp r3, #0 8020018: dbe6 blt.n 801ffe8 } seg->next = (*cur_seg); 802001a: 69fb ldr r3, [r7, #28] 802001c: 681a ldr r2, [r3, #0] 802001e: 6a7b ldr r3, [r7, #36] @ 0x24 8020020: 601a str r2, [r3, #0] (*cur_seg) = seg; 8020022: 69fb ldr r3, [r7, #28] 8020024: 6a7a ldr r2, [r7, #36] @ 0x24 8020026: 601a str r2, [r3, #0] 8020028: e009 b.n 802003e } else { /* add segment to tail of unacked list */ useg->next = seg; 802002a: 6a3b ldr r3, [r7, #32] 802002c: 6a7a ldr r2, [r7, #36] @ 0x24 802002e: 601a str r2, [r3, #0] useg = useg->next; 8020030: 6a3b ldr r3, [r7, #32] 8020032: 681b ldr r3, [r3, #0] 8020034: 623b str r3, [r7, #32] 8020036: e002 b.n 802003e } } /* do not queue empty segments on the unacked list */ } else { tcp_seg_free(seg); 8020038: 6a78 ldr r0, [r7, #36] @ 0x24 802003a: f7fb fea8 bl 801bd8e } seg = pcb->unsent; 802003e: 687b ldr r3, [r7, #4] 8020040: 6edb ldr r3, [r3, #108] @ 0x6c 8020042: 627b str r3, [r7, #36] @ 0x24 while (seg != NULL && 8020044: 6a7b ldr r3, [r7, #36] @ 0x24 8020046: 2b00 cmp r3, #0 8020048: d012 beq.n 8020070 lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { 802004a: 6a7b ldr r3, [r7, #36] @ 0x24 802004c: 691b ldr r3, [r3, #16] 802004e: 685b ldr r3, [r3, #4] 8020050: 4618 mov r0, r3 8020052: f7f8 fd76 bl 8018b42 8020056: 4602 mov r2, r0 8020058: 687b ldr r3, [r7, #4] 802005a: 6c5b ldr r3, [r3, #68] @ 0x44 802005c: 1ad3 subs r3, r2, r3 802005e: 6a7a ldr r2, [r7, #36] @ 0x24 8020060: 8912 ldrh r2, [r2, #8] 8020062: 4413 add r3, r2 while (seg != NULL && 8020064: 69ba ldr r2, [r7, #24] 8020066: 429a cmp r2, r3 8020068: f4bf aed6 bcs.w 801fe18 802006c: e000 b.n 8020070 break; 802006e: bf00 nop } #if TCP_OVERSIZE if (pcb->unsent == NULL) { 8020070: 687b ldr r3, [r7, #4] 8020072: 6edb ldr r3, [r3, #108] @ 0x6c 8020074: 2b00 cmp r3, #0 8020076: d108 bne.n 802008a /* last unsent has been removed, reset unsent_oversize */ pcb->unsent_oversize = 0; 8020078: 687b ldr r3, [r7, #4] 802007a: 2200 movs r2, #0 802007c: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 8020080: e004 b.n 802008c goto output_done; 8020082: bf00 nop 8020084: e002 b.n 802008c goto output_done; 8020086: bf00 nop 8020088: e000 b.n 802008c } #endif /* TCP_OVERSIZE */ output_done: 802008a: bf00 nop tcp_clear_flags(pcb, TF_NAGLEMEMERR); 802008c: 687b ldr r3, [r7, #4] 802008e: 8b5b ldrh r3, [r3, #26] 8020090: f023 0380 bic.w r3, r3, #128 @ 0x80 8020094: b29a uxth r2, r3 8020096: 687b ldr r3, [r7, #4] 8020098: 835a strh r2, [r3, #26] return ERR_OK; 802009a: 2300 movs r3, #0 } 802009c: 4618 mov r0, r3 802009e: 3728 adds r7, #40 @ 0x28 80200a0: 46bd mov sp, r7 80200a2: bdb0 pop {r4, r5, r7, pc} 080200a4 : * @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) { 80200a4: b580 push {r7, lr} 80200a6: b082 sub sp, #8 80200a8: af00 add r7, sp, #0 80200aa: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL); 80200ac: 687b ldr r3, [r7, #4] 80200ae: 2b00 cmp r3, #0 80200b0: d106 bne.n 80200c0 80200b2: 4b09 ldr r3, [pc, #36] @ (80200d8 ) 80200b4: f240 529a movw r2, #1434 @ 0x59a 80200b8: 4908 ldr r1, [pc, #32] @ (80200dc ) 80200ba: 4809 ldr r0, [pc, #36] @ (80200e0 ) 80200bc: f009 fc86 bl 80299cc /* 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) { 80200c0: 687b ldr r3, [r7, #4] 80200c2: 685b ldr r3, [r3, #4] 80200c4: 7b9b ldrb r3, [r3, #14] 80200c6: 2b01 cmp r3, #1 80200c8: d001 beq.n 80200ce /* other reference found */ return 1; 80200ca: 2301 movs r3, #1 80200cc: e000 b.n 80200d0 } /* no other references found */ return 0; 80200ce: 2300 movs r3, #0 } 80200d0: 4618 mov r0, r3 80200d2: 3708 adds r7, #8 80200d4: 46bd mov sp, r7 80200d6: bd80 pop {r7, pc} 80200d8: 0802f190 .word 0x0802f190 80200dc: 0802f788 .word 0x0802f788 80200e0: 0802f1e4 .word 0x0802f1e4 080200e4 : * @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) { 80200e4: b5b0 push {r4, r5, r7, lr} 80200e6: b08c sub sp, #48 @ 0x30 80200e8: af04 add r7, sp, #16 80200ea: 60f8 str r0, [r7, #12] 80200ec: 60b9 str r1, [r7, #8] 80200ee: 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); 80200f0: 68fb ldr r3, [r7, #12] 80200f2: 2b00 cmp r3, #0 80200f4: d106 bne.n 8020104 80200f6: 4b64 ldr r3, [pc, #400] @ (8020288 ) 80200f8: f44f 62b7 mov.w r2, #1464 @ 0x5b8 80200fc: 4963 ldr r1, [pc, #396] @ (802028c ) 80200fe: 4864 ldr r0, [pc, #400] @ (8020290 ) 8020100: f009 fc64 bl 80299cc LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL); 8020104: 68bb ldr r3, [r7, #8] 8020106: 2b00 cmp r3, #0 8020108: d106 bne.n 8020118 802010a: 4b5f ldr r3, [pc, #380] @ (8020288 ) 802010c: f240 52b9 movw r2, #1465 @ 0x5b9 8020110: 4960 ldr r1, [pc, #384] @ (8020294 ) 8020112: 485f ldr r0, [pc, #380] @ (8020290 ) 8020114: f009 fc5a bl 80299cc LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL); 8020118: 687b ldr r3, [r7, #4] 802011a: 2b00 cmp r3, #0 802011c: d106 bne.n 802012c 802011e: 4b5a ldr r3, [pc, #360] @ (8020288 ) 8020120: f240 52ba movw r2, #1466 @ 0x5ba 8020124: 495c ldr r1, [pc, #368] @ (8020298 ) 8020126: 485a ldr r0, [pc, #360] @ (8020290 ) 8020128: f009 fc50 bl 80299cc if (tcp_output_segment_busy(seg)) { 802012c: 68f8 ldr r0, [r7, #12] 802012e: f7ff ffb9 bl 80200a4 8020132: 4603 mov r3, r0 8020134: 2b00 cmp r3, #0 8020136: d001 beq.n 802013c /* 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; 8020138: 2300 movs r3, #0 802013a: e0a1 b.n 8020280 } /* The TCP header has already been constructed, but the ackno and wnd fields remain. */ seg->tcphdr->ackno = lwip_htonl(pcb->rcv_nxt); 802013c: 68bb ldr r3, [r7, #8] 802013e: 6a5a ldr r2, [r3, #36] @ 0x24 8020140: 68fb ldr r3, [r7, #12] 8020142: 691c ldr r4, [r3, #16] 8020144: 4610 mov r0, r2 8020146: f7f8 fcfc bl 8018b42 802014a: 4603 mov r3, r0 802014c: 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))); 802014e: 68bb ldr r3, [r7, #8] 8020150: 8d5a ldrh r2, [r3, #42] @ 0x2a 8020152: 68fb ldr r3, [r7, #12] 8020154: 691c ldr r4, [r3, #16] 8020156: 4610 mov r0, r2 8020158: f7f8 fcde bl 8018b18 802015c: 4603 mov r3, r0 802015e: 81e3 strh r3, [r4, #14] } pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 8020160: 68bb ldr r3, [r7, #8] 8020162: 6a5b ldr r3, [r3, #36] @ 0x24 8020164: 68ba ldr r2, [r7, #8] 8020166: 8d52 ldrh r2, [r2, #42] @ 0x2a 8020168: 441a add r2, r3 802016a: 68bb ldr r3, [r7, #8] 802016c: 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); 802016e: 68fb ldr r3, [r7, #12] 8020170: 691b ldr r3, [r3, #16] 8020172: 3314 adds r3, #20 8020174: 61fb str r3, [r7, #28] if (seg->flags & TF_SEG_OPTS_MSS) { 8020176: 68fb ldr r3, [r7, #12] 8020178: 7b1b ldrb r3, [r3, #12] 802017a: f003 0301 and.w r3, r3, #1 802017e: 2b00 cmp r3, #0 8020180: d015 beq.n 80201ae u16_t mss; #if TCP_CALCULATE_EFF_SEND_MSS mss = tcp_eff_send_mss_netif(TCP_MSS, netif, &pcb->remote_ip); 8020182: 68bb ldr r3, [r7, #8] 8020184: 3304 adds r3, #4 8020186: 461a mov r2, r3 8020188: 6879 ldr r1, [r7, #4] 802018a: f240 50b4 movw r0, #1460 @ 0x5b4 802018e: f7fc f9cd bl 801c52c 8020192: 4603 mov r3, r0 8020194: 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); 8020196: 8b7b ldrh r3, [r7, #26] 8020198: f043 7301 orr.w r3, r3, #33816576 @ 0x2040000 802019c: 4618 mov r0, r3 802019e: f7f8 fcd0 bl 8018b42 80201a2: 4602 mov r2, r0 80201a4: 69fb ldr r3, [r7, #28] 80201a6: 601a str r2, [r3, #0] opts += 1; 80201a8: 69fb ldr r3, [r7, #28] 80201aa: 3304 adds r3, #4 80201ac: 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) { 80201ae: 68bb ldr r3, [r7, #8] 80201b0: f9b3 3030 ldrsh.w r3, [r3, #48] @ 0x30 80201b4: 2b00 cmp r3, #0 80201b6: da02 bge.n 80201be pcb->rtime = 0; 80201b8: 68bb ldr r3, [r7, #8] 80201ba: 2200 movs r2, #0 80201bc: 861a strh r2, [r3, #48] @ 0x30 } if (pcb->rttest == 0) { 80201be: 68bb ldr r3, [r7, #8] 80201c0: 6b5b ldr r3, [r3, #52] @ 0x34 80201c2: 2b00 cmp r3, #0 80201c4: d10c bne.n 80201e0 pcb->rttest = tcp_ticks; 80201c6: 4b35 ldr r3, [pc, #212] @ (802029c ) 80201c8: 681a ldr r2, [r3, #0] 80201ca: 68bb ldr r3, [r7, #8] 80201cc: 635a str r2, [r3, #52] @ 0x34 pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno); 80201ce: 68fb ldr r3, [r7, #12] 80201d0: 691b ldr r3, [r3, #16] 80201d2: 685b ldr r3, [r3, #4] 80201d4: 4618 mov r0, r3 80201d6: f7f8 fcb4 bl 8018b42 80201da: 4602 mov r2, r0 80201dc: 68bb ldr r3, [r7, #8] 80201de: 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); 80201e0: 68fb ldr r3, [r7, #12] 80201e2: 691a ldr r2, [r3, #16] 80201e4: 68fb ldr r3, [r7, #12] 80201e6: 685b ldr r3, [r3, #4] 80201e8: 685b ldr r3, [r3, #4] 80201ea: 1ad3 subs r3, r2, r3 80201ec: 833b strh r3, [r7, #24] if (len == 0) { /** Exclude retransmitted segments from this count. */ MIB2_STATS_INC(mib2.tcpoutsegs); } seg->p->len -= len; 80201ee: 68fb ldr r3, [r7, #12] 80201f0: 685b ldr r3, [r3, #4] 80201f2: 8959 ldrh r1, [r3, #10] 80201f4: 68fb ldr r3, [r7, #12] 80201f6: 685b ldr r3, [r3, #4] 80201f8: 8b3a ldrh r2, [r7, #24] 80201fa: 1a8a subs r2, r1, r2 80201fc: b292 uxth r2, r2 80201fe: 815a strh r2, [r3, #10] seg->p->tot_len -= len; 8020200: 68fb ldr r3, [r7, #12] 8020202: 685b ldr r3, [r3, #4] 8020204: 8919 ldrh r1, [r3, #8] 8020206: 68fb ldr r3, [r7, #12] 8020208: 685b ldr r3, [r3, #4] 802020a: 8b3a ldrh r2, [r7, #24] 802020c: 1a8a subs r2, r1, r2 802020e: b292 uxth r2, r2 8020210: 811a strh r2, [r3, #8] seg->p->payload = seg->tcphdr; 8020212: 68fb ldr r3, [r7, #12] 8020214: 685b ldr r3, [r3, #4] 8020216: 68fa ldr r2, [r7, #12] 8020218: 6912 ldr r2, [r2, #16] 802021a: 605a str r2, [r3, #4] seg->tcphdr->chksum = 0; 802021c: 68fb ldr r3, [r7, #12] 802021e: 691b ldr r3, [r3, #16] 8020220: 2200 movs r2, #0 8020222: 741a strb r2, [r3, #16] 8020224: 2200 movs r2, #0 8020226: 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)); 8020228: 68fb ldr r3, [r7, #12] 802022a: 691a ldr r2, [r3, #16] 802022c: 68fb ldr r3, [r7, #12] 802022e: 7b1b ldrb r3, [r3, #12] 8020230: f003 0301 and.w r3, r3, #1 8020234: 2b00 cmp r3, #0 8020236: d001 beq.n 802023c 8020238: 2318 movs r3, #24 802023a: e000 b.n 802023e 802023c: 2314 movs r3, #20 802023e: 4413 add r3, r2 8020240: 69fa ldr r2, [r7, #28] 8020242: 429a cmp r2, r3 8020244: d006 beq.n 8020254 8020246: 4b10 ldr r3, [pc, #64] @ (8020288 ) 8020248: f240 621c movw r2, #1564 @ 0x61c 802024c: 4914 ldr r1, [pc, #80] @ (80202a0 ) 802024e: 4810 ldr r0, [pc, #64] @ (8020290 ) 8020250: f009 fbbc bl 80299cc } #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, 8020254: 68fb ldr r3, [r7, #12] 8020256: 6858 ldr r0, [r3, #4] 8020258: 68b9 ldr r1, [r7, #8] 802025a: 68bb ldr r3, [r7, #8] 802025c: 1d1c adds r4, r3, #4 802025e: 68bb ldr r3, [r7, #8] 8020260: 7add ldrb r5, [r3, #11] 8020262: 68bb ldr r3, [r7, #8] 8020264: 7a9b ldrb r3, [r3, #10] 8020266: 687a ldr r2, [r7, #4] 8020268: 9202 str r2, [sp, #8] 802026a: 2206 movs r2, #6 802026c: 9201 str r2, [sp, #4] 802026e: 9300 str r3, [sp, #0] 8020270: 462b mov r3, r5 8020272: 4622 mov r2, r4 8020274: f004 fd7a bl 8024d6c 8020278: 4603 mov r3, r0 802027a: 75fb strb r3, [r7, #23] seg->chksum = SWAP_BYTES_IN_WORD(seg->chksum); seg->chksum_swapped = 1; } #endif return err; 802027c: f997 3017 ldrsb.w r3, [r7, #23] } 8020280: 4618 mov r0, r3 8020282: 3720 adds r7, #32 8020284: 46bd mov sp, r7 8020286: bdb0 pop {r4, r5, r7, pc} 8020288: 0802f190 .word 0x0802f190 802028c: 0802f7b0 .word 0x0802f7b0 8020290: 0802f1e4 .word 0x0802f1e4 8020294: 0802f7d0 .word 0x0802f7d0 8020298: 0802f7f0 .word 0x0802f7f0 802029c: 2402ae88 .word 0x2402ae88 80202a0: 0802f814 .word 0x0802f814 080202a4 : * * @param pcb the tcp_pcb for which to re-enqueue all unacked segments */ err_t tcp_rexmit_rto_prepare(struct tcp_pcb *pcb) { 80202a4: b5b0 push {r4, r5, r7, lr} 80202a6: b084 sub sp, #16 80202a8: af00 add r7, sp, #0 80202aa: 6078 str r0, [r7, #4] struct tcp_seg *seg; LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL); 80202ac: 687b ldr r3, [r7, #4] 80202ae: 2b00 cmp r3, #0 80202b0: d106 bne.n 80202c0 80202b2: 4b36 ldr r3, [pc, #216] @ (802038c ) 80202b4: f240 6263 movw r2, #1635 @ 0x663 80202b8: 4935 ldr r1, [pc, #212] @ (8020390 ) 80202ba: 4836 ldr r0, [pc, #216] @ (8020394 ) 80202bc: f009 fb86 bl 80299cc if (pcb->unacked == NULL) { 80202c0: 687b ldr r3, [r7, #4] 80202c2: 6f1b ldr r3, [r3, #112] @ 0x70 80202c4: 2b00 cmp r3, #0 80202c6: d102 bne.n 80202ce return ERR_VAL; 80202c8: f06f 0305 mvn.w r3, #5 80202cc: e059 b.n 8020382 /* 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) { 80202ce: 687b ldr r3, [r7, #4] 80202d0: 6f1b ldr r3, [r3, #112] @ 0x70 80202d2: 60fb str r3, [r7, #12] 80202d4: e00b b.n 80202ee if (tcp_output_segment_busy(seg)) { 80202d6: 68f8 ldr r0, [r7, #12] 80202d8: f7ff fee4 bl 80200a4 80202dc: 4603 mov r3, r0 80202de: 2b00 cmp r3, #0 80202e0: d002 beq.n 80202e8 LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n")); return ERR_VAL; 80202e2: f06f 0305 mvn.w r3, #5 80202e6: e04c b.n 8020382 for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) { 80202e8: 68fb ldr r3, [r7, #12] 80202ea: 681b ldr r3, [r3, #0] 80202ec: 60fb str r3, [r7, #12] 80202ee: 68fb ldr r3, [r7, #12] 80202f0: 681b ldr r3, [r3, #0] 80202f2: 2b00 cmp r3, #0 80202f4: d1ef bne.n 80202d6 } } if (tcp_output_segment_busy(seg)) { 80202f6: 68f8 ldr r0, [r7, #12] 80202f8: f7ff fed4 bl 80200a4 80202fc: 4603 mov r3, r0 80202fe: 2b00 cmp r3, #0 8020300: d002 beq.n 8020308 LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n")); return ERR_VAL; 8020302: f06f 0305 mvn.w r3, #5 8020306: e03c b.n 8020382 } /* concatenate unsent queue after unacked queue */ seg->next = pcb->unsent; 8020308: 687b ldr r3, [r7, #4] 802030a: 6eda ldr r2, [r3, #108] @ 0x6c 802030c: 68fb ldr r3, [r7, #12] 802030e: 601a str r2, [r3, #0] #if TCP_OVERSIZE_DBGCHECK /* if last unsent changed, we need to update unsent_oversize */ if (pcb->unsent == NULL) { 8020310: 687b ldr r3, [r7, #4] 8020312: 6edb ldr r3, [r3, #108] @ 0x6c 8020314: 2b00 cmp r3, #0 8020316: d104 bne.n 8020322 pcb->unsent_oversize = seg->oversize_left; 8020318: 68fb ldr r3, [r7, #12] 802031a: 895a ldrh r2, [r3, #10] 802031c: 687b ldr r3, [r7, #4] 802031e: 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; 8020322: 687b ldr r3, [r7, #4] 8020324: 6f1a ldr r2, [r3, #112] @ 0x70 8020326: 687b ldr r3, [r7, #4] 8020328: 66da str r2, [r3, #108] @ 0x6c /* unacked queue is now empty */ pcb->unacked = NULL; 802032a: 687b ldr r3, [r7, #4] 802032c: 2200 movs r2, #0 802032e: 671a str r2, [r3, #112] @ 0x70 /* Mark RTO in-progress */ tcp_set_flags(pcb, TF_RTO); 8020330: 687b ldr r3, [r7, #4] 8020332: 8b5b ldrh r3, [r3, #26] 8020334: f443 6300 orr.w r3, r3, #2048 @ 0x800 8020338: b29a uxth r2, r3 802033a: 687b ldr r3, [r7, #4] 802033c: 835a strh r2, [r3, #26] /* Record the next byte following retransmit */ pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 802033e: 68fb ldr r3, [r7, #12] 8020340: 691b ldr r3, [r3, #16] 8020342: 685b ldr r3, [r3, #4] 8020344: 4618 mov r0, r3 8020346: f7f8 fbfc bl 8018b42 802034a: 4604 mov r4, r0 802034c: 68fb ldr r3, [r7, #12] 802034e: 891b ldrh r3, [r3, #8] 8020350: 461d mov r5, r3 8020352: 68fb ldr r3, [r7, #12] 8020354: 691b ldr r3, [r3, #16] 8020356: 899b ldrh r3, [r3, #12] 8020358: b29b uxth r3, r3 802035a: 4618 mov r0, r3 802035c: f7f8 fbdc bl 8018b18 8020360: 4603 mov r3, r0 8020362: b2db uxtb r3, r3 8020364: f003 0303 and.w r3, r3, #3 8020368: 2b00 cmp r3, #0 802036a: d001 beq.n 8020370 802036c: 2301 movs r3, #1 802036e: e000 b.n 8020372 8020370: 2300 movs r3, #0 8020372: 442b add r3, r5 8020374: 18e2 adds r2, r4, r3 8020376: 687b ldr r3, [r7, #4] 8020378: 64da str r2, [r3, #76] @ 0x4c /* Don't take any RTT measurements after retransmitting. */ pcb->rttest = 0; 802037a: 687b ldr r3, [r7, #4] 802037c: 2200 movs r2, #0 802037e: 635a str r2, [r3, #52] @ 0x34 return ERR_OK; 8020380: 2300 movs r3, #0 } 8020382: 4618 mov r0, r3 8020384: 3710 adds r7, #16 8020386: 46bd mov sp, r7 8020388: bdb0 pop {r4, r5, r7, pc} 802038a: bf00 nop 802038c: 0802f190 .word 0x0802f190 8020390: 0802f828 .word 0x0802f828 8020394: 0802f1e4 .word 0x0802f1e4 08020398 : * * @param pcb the tcp_pcb for which to re-enqueue all unacked segments */ void tcp_rexmit_rto_commit(struct tcp_pcb *pcb) { 8020398: b580 push {r7, lr} 802039a: b082 sub sp, #8 802039c: af00 add r7, sp, #0 802039e: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL); 80203a0: 687b ldr r3, [r7, #4] 80203a2: 2b00 cmp r3, #0 80203a4: d106 bne.n 80203b4 80203a6: 4b0d ldr r3, [pc, #52] @ (80203dc ) 80203a8: f44f 62d3 mov.w r2, #1688 @ 0x698 80203ac: 490c ldr r1, [pc, #48] @ (80203e0 ) 80203ae: 480d ldr r0, [pc, #52] @ (80203e4 ) 80203b0: f009 fb0c bl 80299cc /* increment number of retransmissions */ if (pcb->nrtx < 0xFF) { 80203b4: 687b ldr r3, [r7, #4] 80203b6: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 80203ba: 2bff cmp r3, #255 @ 0xff 80203bc: d007 beq.n 80203ce ++pcb->nrtx; 80203be: 687b ldr r3, [r7, #4] 80203c0: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 80203c4: 3301 adds r3, #1 80203c6: b2da uxtb r2, r3 80203c8: 687b ldr r3, [r7, #4] 80203ca: f883 2042 strb.w r2, [r3, #66] @ 0x42 } /* Do the actual retransmission */ tcp_output(pcb); 80203ce: 6878 ldr r0, [r7, #4] 80203d0: f7ff fc70 bl 801fcb4 } 80203d4: bf00 nop 80203d6: 3708 adds r7, #8 80203d8: 46bd mov sp, r7 80203da: bd80 pop {r7, pc} 80203dc: 0802f190 .word 0x0802f190 80203e0: 0802f84c .word 0x0802f84c 80203e4: 0802f1e4 .word 0x0802f1e4 080203e8 : * * @param pcb the tcp_pcb for which to re-enqueue all unacked segments */ void tcp_rexmit_rto(struct tcp_pcb *pcb) { 80203e8: b580 push {r7, lr} 80203ea: b082 sub sp, #8 80203ec: af00 add r7, sp, #0 80203ee: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL); 80203f0: 687b ldr r3, [r7, #4] 80203f2: 2b00 cmp r3, #0 80203f4: d106 bne.n 8020404 80203f6: 4b0a ldr r3, [pc, #40] @ (8020420 ) 80203f8: f240 62ad movw r2, #1709 @ 0x6ad 80203fc: 4909 ldr r1, [pc, #36] @ (8020424 ) 80203fe: 480a ldr r0, [pc, #40] @ (8020428 ) 8020400: f009 fae4 bl 80299cc if (tcp_rexmit_rto_prepare(pcb) == ERR_OK) { 8020404: 6878 ldr r0, [r7, #4] 8020406: f7ff ff4d bl 80202a4 802040a: 4603 mov r3, r0 802040c: 2b00 cmp r3, #0 802040e: d102 bne.n 8020416 tcp_rexmit_rto_commit(pcb); 8020410: 6878 ldr r0, [r7, #4] 8020412: f7ff ffc1 bl 8020398 } } 8020416: bf00 nop 8020418: 3708 adds r7, #8 802041a: 46bd mov sp, r7 802041c: bd80 pop {r7, pc} 802041e: bf00 nop 8020420: 0802f190 .word 0x0802f190 8020424: 0802f870 .word 0x0802f870 8020428: 0802f1e4 .word 0x0802f1e4 0802042c : * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ err_t tcp_rexmit(struct tcp_pcb *pcb) { 802042c: b590 push {r4, r7, lr} 802042e: b085 sub sp, #20 8020430: af00 add r7, sp, #0 8020432: 6078 str r0, [r7, #4] struct tcp_seg *seg; struct tcp_seg **cur_seg; LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL); 8020434: 687b ldr r3, [r7, #4] 8020436: 2b00 cmp r3, #0 8020438: d106 bne.n 8020448 802043a: 4b2f ldr r3, [pc, #188] @ (80204f8 ) 802043c: f240 62c1 movw r2, #1729 @ 0x6c1 8020440: 492e ldr r1, [pc, #184] @ (80204fc ) 8020442: 482f ldr r0, [pc, #188] @ (8020500 ) 8020444: f009 fac2 bl 80299cc if (pcb->unacked == NULL) { 8020448: 687b ldr r3, [r7, #4] 802044a: 6f1b ldr r3, [r3, #112] @ 0x70 802044c: 2b00 cmp r3, #0 802044e: d102 bne.n 8020456 return ERR_VAL; 8020450: f06f 0305 mvn.w r3, #5 8020454: e04c b.n 80204f0 } seg = pcb->unacked; 8020456: 687b ldr r3, [r7, #4] 8020458: 6f1b ldr r3, [r3, #112] @ 0x70 802045a: 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)) { 802045c: 68b8 ldr r0, [r7, #8] 802045e: f7ff fe21 bl 80200a4 8020462: 4603 mov r3, r0 8020464: 2b00 cmp r3, #0 8020466: d002 beq.n 802046e LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit busy\n")); return ERR_VAL; 8020468: f06f 0305 mvn.w r3, #5 802046c: e040 b.n 80204f0 } /* Move the first unacked segment to the unsent queue */ /* Keep the unsent queue sorted. */ pcb->unacked = seg->next; 802046e: 68bb ldr r3, [r7, #8] 8020470: 681a ldr r2, [r3, #0] 8020472: 687b ldr r3, [r7, #4] 8020474: 671a str r2, [r3, #112] @ 0x70 cur_seg = &(pcb->unsent); 8020476: 687b ldr r3, [r7, #4] 8020478: 336c adds r3, #108 @ 0x6c 802047a: 60fb str r3, [r7, #12] while (*cur_seg && 802047c: e002 b.n 8020484 TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 802047e: 68fb ldr r3, [r7, #12] 8020480: 681b ldr r3, [r3, #0] 8020482: 60fb str r3, [r7, #12] while (*cur_seg && 8020484: 68fb ldr r3, [r7, #12] 8020486: 681b ldr r3, [r3, #0] 8020488: 2b00 cmp r3, #0 802048a: d011 beq.n 80204b0 TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { 802048c: 68fb ldr r3, [r7, #12] 802048e: 681b ldr r3, [r3, #0] 8020490: 691b ldr r3, [r3, #16] 8020492: 685b ldr r3, [r3, #4] 8020494: 4618 mov r0, r3 8020496: f7f8 fb54 bl 8018b42 802049a: 4604 mov r4, r0 802049c: 68bb ldr r3, [r7, #8] 802049e: 691b ldr r3, [r3, #16] 80204a0: 685b ldr r3, [r3, #4] 80204a2: 4618 mov r0, r3 80204a4: f7f8 fb4d bl 8018b42 80204a8: 4603 mov r3, r0 80204aa: 1ae3 subs r3, r4, r3 while (*cur_seg && 80204ac: 2b00 cmp r3, #0 80204ae: dbe6 blt.n 802047e } seg->next = *cur_seg; 80204b0: 68fb ldr r3, [r7, #12] 80204b2: 681a ldr r2, [r3, #0] 80204b4: 68bb ldr r3, [r7, #8] 80204b6: 601a str r2, [r3, #0] *cur_seg = seg; 80204b8: 68fb ldr r3, [r7, #12] 80204ba: 68ba ldr r2, [r7, #8] 80204bc: 601a str r2, [r3, #0] #if TCP_OVERSIZE if (seg->next == NULL) { 80204be: 68bb ldr r3, [r7, #8] 80204c0: 681b ldr r3, [r3, #0] 80204c2: 2b00 cmp r3, #0 80204c4: d103 bne.n 80204ce /* the retransmitted segment is last in unsent, so reset unsent_oversize */ pcb->unsent_oversize = 0; 80204c6: 687b ldr r3, [r7, #4] 80204c8: 2200 movs r2, #0 80204ca: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 } #endif /* TCP_OVERSIZE */ if (pcb->nrtx < 0xFF) { 80204ce: 687b ldr r3, [r7, #4] 80204d0: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 80204d4: 2bff cmp r3, #255 @ 0xff 80204d6: d007 beq.n 80204e8 ++pcb->nrtx; 80204d8: 687b ldr r3, [r7, #4] 80204da: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 80204de: 3301 adds r3, #1 80204e0: b2da uxtb r2, r3 80204e2: 687b ldr r3, [r7, #4] 80204e4: f883 2042 strb.w r2, [r3, #66] @ 0x42 } /* Don't take any rtt measurements after retransmitting. */ pcb->rttest = 0; 80204e8: 687b ldr r3, [r7, #4] 80204ea: 2200 movs r2, #0 80204ec: 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; 80204ee: 2300 movs r3, #0 } 80204f0: 4618 mov r0, r3 80204f2: 3714 adds r7, #20 80204f4: 46bd mov sp, r7 80204f6: bd90 pop {r4, r7, pc} 80204f8: 0802f190 .word 0x0802f190 80204fc: 0802f88c .word 0x0802f88c 8020500: 0802f1e4 .word 0x0802f1e4 08020504 : * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit_fast(struct tcp_pcb *pcb) { 8020504: b580 push {r7, lr} 8020506: b082 sub sp, #8 8020508: af00 add r7, sp, #0 802050a: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL); 802050c: 687b ldr r3, [r7, #4] 802050e: 2b00 cmp r3, #0 8020510: d106 bne.n 8020520 8020512: 4b2a ldr r3, [pc, #168] @ (80205bc ) 8020514: f240 62f9 movw r2, #1785 @ 0x6f9 8020518: 4929 ldr r1, [pc, #164] @ (80205c0 ) 802051a: 482a ldr r0, [pc, #168] @ (80205c4 ) 802051c: f009 fa56 bl 80299cc if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { 8020520: 687b ldr r3, [r7, #4] 8020522: 6f1b ldr r3, [r3, #112] @ 0x70 8020524: 2b00 cmp r3, #0 8020526: d045 beq.n 80205b4 8020528: 687b ldr r3, [r7, #4] 802052a: 8b5b ldrh r3, [r3, #26] 802052c: f003 0304 and.w r3, r3, #4 8020530: 2b00 cmp r3, #0 8020532: d13f bne.n 80205b4 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) { 8020534: 6878 ldr r0, [r7, #4] 8020536: f7ff ff79 bl 802042c 802053a: 4603 mov r3, r0 802053c: 2b00 cmp r3, #0 802053e: d139 bne.n 80205b4 /* 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; 8020540: 687b ldr r3, [r7, #4] 8020542: f8b3 2060 ldrh.w r2, [r3, #96] @ 0x60 8020546: 687b ldr r3, [r7, #4] 8020548: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 802054c: 4293 cmp r3, r2 802054e: bf28 it cs 8020550: 4613 movcs r3, r2 8020552: b29b uxth r3, r3 8020554: 2b00 cmp r3, #0 8020556: da00 bge.n 802055a 8020558: 3301 adds r3, #1 802055a: 105b asrs r3, r3, #1 802055c: b29a uxth r2, r3 802055e: 687b ldr r3, [r7, #4] 8020560: f8a3 204a strh.w r2, [r3, #74] @ 0x4a /* The minimum value for ssthresh should be 2 MSS */ if (pcb->ssthresh < (2U * pcb->mss)) { 8020564: 687b ldr r3, [r7, #4] 8020566: f8b3 304a ldrh.w r3, [r3, #74] @ 0x4a 802056a: 461a mov r2, r3 802056c: 687b ldr r3, [r7, #4] 802056e: 8e5b ldrh r3, [r3, #50] @ 0x32 8020570: 005b lsls r3, r3, #1 8020572: 429a cmp r2, r3 8020574: d206 bcs.n 8020584 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; 8020576: 687b ldr r3, [r7, #4] 8020578: 8e5b ldrh r3, [r3, #50] @ 0x32 802057a: 005b lsls r3, r3, #1 802057c: b29a uxth r2, r3 802057e: 687b ldr r3, [r7, #4] 8020580: f8a3 204a strh.w r2, [r3, #74] @ 0x4a } pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; 8020584: 687b ldr r3, [r7, #4] 8020586: f8b3 204a ldrh.w r2, [r3, #74] @ 0x4a 802058a: 687b ldr r3, [r7, #4] 802058c: 8e5b ldrh r3, [r3, #50] @ 0x32 802058e: 4619 mov r1, r3 8020590: 0049 lsls r1, r1, #1 8020592: 440b add r3, r1 8020594: b29b uxth r3, r3 8020596: 4413 add r3, r2 8020598: b29a uxth r2, r3 802059a: 687b ldr r3, [r7, #4] 802059c: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 tcp_set_flags(pcb, TF_INFR); 80205a0: 687b ldr r3, [r7, #4] 80205a2: 8b5b ldrh r3, [r3, #26] 80205a4: f043 0304 orr.w r3, r3, #4 80205a8: b29a uxth r2, r3 80205aa: 687b ldr r3, [r7, #4] 80205ac: 835a strh r2, [r3, #26] /* Reset the retransmission timer to prevent immediate rto retransmissions */ pcb->rtime = 0; 80205ae: 687b ldr r3, [r7, #4] 80205b0: 2200 movs r2, #0 80205b2: 861a strh r2, [r3, #48] @ 0x30 } } } 80205b4: bf00 nop 80205b6: 3708 adds r7, #8 80205b8: 46bd mov sp, r7 80205ba: bd80 pop {r7, pc} 80205bc: 0802f190 .word 0x0802f190 80205c0: 0802f8a4 .word 0x0802f8a4 80205c4: 0802f1e4 .word 0x0802f1e4 080205c8 : 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) { 80205c8: b580 push {r7, lr} 80205ca: b086 sub sp, #24 80205cc: af00 add r7, sp, #0 80205ce: 60f8 str r0, [r7, #12] 80205d0: 607b str r3, [r7, #4] 80205d2: 460b mov r3, r1 80205d4: 817b strh r3, [r7, #10] 80205d6: 4613 mov r3, r2 80205d8: 813b strh r3, [r7, #8] struct tcp_hdr *tcphdr; struct pbuf *p; p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); 80205da: 897a ldrh r2, [r7, #10] 80205dc: 893b ldrh r3, [r7, #8] 80205de: 4413 add r3, r2 80205e0: b29b uxth r3, r3 80205e2: 3314 adds r3, #20 80205e4: b29b uxth r3, r3 80205e6: f44f 7220 mov.w r2, #640 @ 0x280 80205ea: 4619 mov r1, r3 80205ec: 2022 movs r0, #34 @ 0x22 80205ee: f7f9 fc5f bl 8019eb0 80205f2: 6178 str r0, [r7, #20] if (p != NULL) { 80205f4: 697b ldr r3, [r7, #20] 80205f6: 2b00 cmp r3, #0 80205f8: d04d beq.n 8020696 LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", 80205fa: 897b ldrh r3, [r7, #10] 80205fc: 3313 adds r3, #19 80205fe: 697a ldr r2, [r7, #20] 8020600: 8952 ldrh r2, [r2, #10] 8020602: 4293 cmp r3, r2 8020604: db06 blt.n 8020614 8020606: 4b26 ldr r3, [pc, #152] @ (80206a0 ) 8020608: f240 7223 movw r2, #1827 @ 0x723 802060c: 4925 ldr r1, [pc, #148] @ (80206a4 ) 802060e: 4826 ldr r0, [pc, #152] @ (80206a8 ) 8020610: f009 f9dc bl 80299cc (p->len >= TCP_HLEN + optlen)); tcphdr = (struct tcp_hdr *)p->payload; 8020614: 697b ldr r3, [r7, #20] 8020616: 685b ldr r3, [r3, #4] 8020618: 613b str r3, [r7, #16] tcphdr->src = lwip_htons(src_port); 802061a: 8c3b ldrh r3, [r7, #32] 802061c: 4618 mov r0, r3 802061e: f7f8 fa7b bl 8018b18 8020622: 4603 mov r3, r0 8020624: 461a mov r2, r3 8020626: 693b ldr r3, [r7, #16] 8020628: 801a strh r2, [r3, #0] tcphdr->dest = lwip_htons(dst_port); 802062a: 8cbb ldrh r3, [r7, #36] @ 0x24 802062c: 4618 mov r0, r3 802062e: f7f8 fa73 bl 8018b18 8020632: 4603 mov r3, r0 8020634: 461a mov r2, r3 8020636: 693b ldr r3, [r7, #16] 8020638: 805a strh r2, [r3, #2] tcphdr->seqno = seqno_be; 802063a: 693b ldr r3, [r7, #16] 802063c: 687a ldr r2, [r7, #4] 802063e: 605a str r2, [r3, #4] tcphdr->ackno = lwip_htonl(ackno); 8020640: 68f8 ldr r0, [r7, #12] 8020642: f7f8 fa7e bl 8018b42 8020646: 4602 mov r2, r0 8020648: 693b ldr r3, [r7, #16] 802064a: 609a str r2, [r3, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), flags); 802064c: 897b ldrh r3, [r7, #10] 802064e: 089b lsrs r3, r3, #2 8020650: b29b uxth r3, r3 8020652: 3305 adds r3, #5 8020654: b29b uxth r3, r3 8020656: 031b lsls r3, r3, #12 8020658: b29a uxth r2, r3 802065a: f897 3028 ldrb.w r3, [r7, #40] @ 0x28 802065e: b29b uxth r3, r3 8020660: 4313 orrs r3, r2 8020662: b29b uxth r3, r3 8020664: 4618 mov r0, r3 8020666: f7f8 fa57 bl 8018b18 802066a: 4603 mov r3, r0 802066c: 461a mov r2, r3 802066e: 693b ldr r3, [r7, #16] 8020670: 819a strh r2, [r3, #12] tcphdr->wnd = lwip_htons(wnd); 8020672: 8dbb ldrh r3, [r7, #44] @ 0x2c 8020674: 4618 mov r0, r3 8020676: f7f8 fa4f bl 8018b18 802067a: 4603 mov r3, r0 802067c: 461a mov r2, r3 802067e: 693b ldr r3, [r7, #16] 8020680: 81da strh r2, [r3, #14] tcphdr->chksum = 0; 8020682: 693b ldr r3, [r7, #16] 8020684: 2200 movs r2, #0 8020686: 741a strb r2, [r3, #16] 8020688: 2200 movs r2, #0 802068a: 745a strb r2, [r3, #17] tcphdr->urgp = 0; 802068c: 693b ldr r3, [r7, #16] 802068e: 2200 movs r2, #0 8020690: 749a strb r2, [r3, #18] 8020692: 2200 movs r2, #0 8020694: 74da strb r2, [r3, #19] } return p; 8020696: 697b ldr r3, [r7, #20] } 8020698: 4618 mov r0, r3 802069a: 3718 adds r7, #24 802069c: 46bd mov sp, r7 802069e: bd80 pop {r7, pc} 80206a0: 0802f190 .word 0x0802f190 80206a4: 0802f8c4 .word 0x0802f8c4 80206a8: 0802f1e4 .word 0x0802f1e4 080206ac : * @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 */) { 80206ac: b5b0 push {r4, r5, r7, lr} 80206ae: b08a sub sp, #40 @ 0x28 80206b0: af04 add r7, sp, #16 80206b2: 60f8 str r0, [r7, #12] 80206b4: 607b str r3, [r7, #4] 80206b6: 460b mov r3, r1 80206b8: 817b strh r3, [r7, #10] 80206ba: 4613 mov r3, r2 80206bc: 813b strh r3, [r7, #8] struct pbuf *p; LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL); 80206be: 68fb ldr r3, [r7, #12] 80206c0: 2b00 cmp r3, #0 80206c2: d106 bne.n 80206d2 80206c4: 4b15 ldr r3, [pc, #84] @ (802071c ) 80206c6: f240 7242 movw r2, #1858 @ 0x742 80206ca: 4915 ldr r1, [pc, #84] @ (8020720 ) 80206cc: 4815 ldr r0, [pc, #84] @ (8020724 ) 80206ce: f009 f97d bl 80299cc p = tcp_output_alloc_header_common(pcb->rcv_nxt, optlen, datalen, 80206d2: 68fb ldr r3, [r7, #12] 80206d4: 6a58 ldr r0, [r3, #36] @ 0x24 80206d6: 68fb ldr r3, [r7, #12] 80206d8: 8adb ldrh r3, [r3, #22] 80206da: 68fa ldr r2, [r7, #12] 80206dc: 8b12 ldrh r2, [r2, #24] 80206de: 68f9 ldr r1, [r7, #12] 80206e0: 8d49 ldrh r1, [r1, #42] @ 0x2a 80206e2: 893d ldrh r5, [r7, #8] 80206e4: 897c ldrh r4, [r7, #10] 80206e6: 9103 str r1, [sp, #12] 80206e8: 2110 movs r1, #16 80206ea: 9102 str r1, [sp, #8] 80206ec: 9201 str r2, [sp, #4] 80206ee: 9300 str r3, [sp, #0] 80206f0: 687b ldr r3, [r7, #4] 80206f2: 462a mov r2, r5 80206f4: 4621 mov r1, r4 80206f6: f7ff ff67 bl 80205c8 80206fa: 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) { 80206fc: 697b ldr r3, [r7, #20] 80206fe: 2b00 cmp r3, #0 8020700: d006 beq.n 8020710 /* If we're sending a packet, update the announced right window edge */ pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 8020702: 68fb ldr r3, [r7, #12] 8020704: 6a5b ldr r3, [r3, #36] @ 0x24 8020706: 68fa ldr r2, [r7, #12] 8020708: 8d52 ldrh r2, [r2, #42] @ 0x2a 802070a: 441a add r2, r3 802070c: 68fb ldr r3, [r7, #12] 802070e: 62da str r2, [r3, #44] @ 0x2c } return p; 8020710: 697b ldr r3, [r7, #20] } 8020712: 4618 mov r0, r3 8020714: 3718 adds r7, #24 8020716: 46bd mov sp, r7 8020718: bdb0 pop {r4, r5, r7, pc} 802071a: bf00 nop 802071c: 0802f190 .word 0x0802f190 8020720: 0802f8f4 .word 0x0802f8f4 8020724: 0802f1e4 .word 0x0802f1e4 08020728 : /* 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) { 8020728: b580 push {r7, lr} 802072a: b088 sub sp, #32 802072c: af00 add r7, sp, #0 802072e: 60f8 str r0, [r7, #12] 8020730: 60b9 str r1, [r7, #8] 8020732: 4611 mov r1, r2 8020734: 461a mov r2, r3 8020736: 460b mov r3, r1 8020738: 71fb strb r3, [r7, #7] 802073a: 4613 mov r3, r2 802073c: 71bb strb r3, [r7, #6] struct tcp_hdr *tcphdr; u32_t *opts; u16_t sacks_len = 0; 802073e: 2300 movs r3, #0 8020740: 83fb strh r3, [r7, #30] LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL); 8020742: 68bb ldr r3, [r7, #8] 8020744: 2b00 cmp r3, #0 8020746: d106 bne.n 8020756 8020748: 4b12 ldr r3, [pc, #72] @ (8020794 ) 802074a: f240 7256 movw r2, #1878 @ 0x756 802074e: 4912 ldr r1, [pc, #72] @ (8020798 ) 8020750: 4812 ldr r0, [pc, #72] @ (802079c ) 8020752: f009 f93b bl 80299cc tcphdr = (struct tcp_hdr *)p->payload; 8020756: 68bb ldr r3, [r7, #8] 8020758: 685b ldr r3, [r3, #4] 802075a: 61bb str r3, [r7, #24] opts = (u32_t *)(void *)(tcphdr + 1); 802075c: 69bb ldr r3, [r7, #24] 802075e: 3314 adds r3, #20 8020760: 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)); 8020762: 8bfb ldrh r3, [r7, #30] 8020764: 009b lsls r3, r3, #2 8020766: 461a mov r2, r3 8020768: 79fb ldrb r3, [r7, #7] 802076a: 009b lsls r3, r3, #2 802076c: f003 0304 and.w r3, r3, #4 8020770: 4413 add r3, r2 8020772: 3314 adds r3, #20 8020774: 69ba ldr r2, [r7, #24] 8020776: 4413 add r3, r2 8020778: 697a ldr r2, [r7, #20] 802077a: 429a cmp r2, r3 802077c: d006 beq.n 802078c 802077e: 4b05 ldr r3, [pc, #20] @ (8020794 ) 8020780: f240 7275 movw r2, #1909 @ 0x775 8020784: 4906 ldr r1, [pc, #24] @ (80207a0 ) 8020786: 4805 ldr r0, [pc, #20] @ (802079c ) 8020788: f009 f920 bl 80299cc LWIP_UNUSED_ARG(optflags); /* for LWIP_NOASSERT */ LWIP_UNUSED_ARG(opts); /* for LWIP_NOASSERT */ } 802078c: bf00 nop 802078e: 3720 adds r7, #32 8020790: 46bd mov sp, r7 8020792: bd80 pop {r7, pc} 8020794: 0802f190 .word 0x0802f190 8020798: 0802f91c .word 0x0802f91c 802079c: 0802f1e4 .word 0x0802f1e4 80207a0: 0802f814 .word 0x0802f814 080207a4 : * 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) { 80207a4: b580 push {r7, lr} 80207a6: b08a sub sp, #40 @ 0x28 80207a8: af04 add r7, sp, #16 80207aa: 60f8 str r0, [r7, #12] 80207ac: 60b9 str r1, [r7, #8] 80207ae: 607a str r2, [r7, #4] 80207b0: 603b str r3, [r7, #0] err_t err; struct netif *netif; LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL); 80207b2: 68bb ldr r3, [r7, #8] 80207b4: 2b00 cmp r3, #0 80207b6: d106 bne.n 80207c6 80207b8: 4b1c ldr r3, [pc, #112] @ (802082c ) 80207ba: f240 7287 movw r2, #1927 @ 0x787 80207be: 491c ldr r1, [pc, #112] @ (8020830 ) 80207c0: 481c ldr r0, [pc, #112] @ (8020834 ) 80207c2: f009 f903 bl 80299cc netif = tcp_route(pcb, src, dst); 80207c6: 683a ldr r2, [r7, #0] 80207c8: 6879 ldr r1, [r7, #4] 80207ca: 68f8 ldr r0, [r7, #12] 80207cc: f7fe fa78 bl 801ecc0 80207d0: 6138 str r0, [r7, #16] if (netif == NULL) { 80207d2: 693b ldr r3, [r7, #16] 80207d4: 2b00 cmp r3, #0 80207d6: d102 bne.n 80207de err = ERR_RTE; 80207d8: 23fc movs r3, #252 @ 0xfc 80207da: 75fb strb r3, [r7, #23] 80207dc: e01c b.n 8020818 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) { 80207de: 68fb ldr r3, [r7, #12] 80207e0: 2b00 cmp r3, #0 80207e2: d006 beq.n 80207f2 NETIF_SET_HINTS(netif, LWIP_CONST_CAST(struct netif_hint*, &(pcb->netif_hints))); ttl = pcb->ttl; 80207e4: 68fb ldr r3, [r7, #12] 80207e6: 7adb ldrb r3, [r3, #11] 80207e8: 75bb strb r3, [r7, #22] tos = pcb->tos; 80207ea: 68fb ldr r3, [r7, #12] 80207ec: 7a9b ldrb r3, [r3, #10] 80207ee: 757b strb r3, [r7, #21] 80207f0: e003 b.n 80207fa } else { /* Send output with hardcoded TTL/HL since we have no access to the pcb */ ttl = TCP_TTL; 80207f2: 23ff movs r3, #255 @ 0xff 80207f4: 75bb strb r3, [r7, #22] tos = 0; 80207f6: 2300 movs r3, #0 80207f8: 757b strb r3, [r7, #21] } TCP_STATS_INC(tcp.xmit); err = ip_output_if(p, src, dst, ttl, tos, IP_PROTO_TCP, netif); 80207fa: 7dba ldrb r2, [r7, #22] 80207fc: 693b ldr r3, [r7, #16] 80207fe: 9302 str r3, [sp, #8] 8020800: 2306 movs r3, #6 8020802: 9301 str r3, [sp, #4] 8020804: 7d7b ldrb r3, [r7, #21] 8020806: 9300 str r3, [sp, #0] 8020808: 4613 mov r3, r2 802080a: 683a ldr r2, [r7, #0] 802080c: 6879 ldr r1, [r7, #4] 802080e: 68b8 ldr r0, [r7, #8] 8020810: f004 faac bl 8024d6c 8020814: 4603 mov r3, r0 8020816: 75fb strb r3, [r7, #23] NETIF_RESET_HINTS(netif); } pbuf_free(p); 8020818: 68b8 ldr r0, [r7, #8] 802081a: f7f9 fe5f bl 801a4dc return err; 802081e: f997 3017 ldrsb.w r3, [r7, #23] } 8020822: 4618 mov r0, r3 8020824: 3718 adds r7, #24 8020826: 46bd mov sp, r7 8020828: bd80 pop {r7, pc} 802082a: bf00 nop 802082c: 0802f190 .word 0x0802f190 8020830: 0802f944 .word 0x0802f944 8020834: 0802f1e4 .word 0x0802f1e4 08020838 : */ 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) { 8020838: b590 push {r4, r7, lr} 802083a: b08b sub sp, #44 @ 0x2c 802083c: af04 add r7, sp, #16 802083e: 60f8 str r0, [r7, #12] 8020840: 60b9 str r1, [r7, #8] 8020842: 607a str r2, [r7, #4] 8020844: 603b str r3, [r7, #0] struct pbuf *p; u16_t wnd; u8_t optlen; LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL); 8020846: 683b ldr r3, [r7, #0] 8020848: 2b00 cmp r3, #0 802084a: d106 bne.n 802085a 802084c: 4b1f ldr r3, [pc, #124] @ (80208cc ) 802084e: f240 72c4 movw r2, #1988 @ 0x7c4 8020852: 491f ldr r1, [pc, #124] @ (80208d0 ) 8020854: 481f ldr r0, [pc, #124] @ (80208d4 ) 8020856: f009 f8b9 bl 80299cc LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL); 802085a: 6abb ldr r3, [r7, #40] @ 0x28 802085c: 2b00 cmp r3, #0 802085e: d106 bne.n 802086e 8020860: 4b1a ldr r3, [pc, #104] @ (80208cc ) 8020862: f240 72c5 movw r2, #1989 @ 0x7c5 8020866: 491c ldr r1, [pc, #112] @ (80208d8 ) 8020868: 481a ldr r0, [pc, #104] @ (80208d4 ) 802086a: f009 f8af bl 80299cc optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); 802086e: 2300 movs r3, #0 8020870: 75fb strb r3, [r7, #23] #if LWIP_WND_SCALE wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF)); #else wnd = PP_HTONS(TCP_WND); 8020872: f24d 0316 movw r3, #53270 @ 0xd016 8020876: 82bb strh r3, [r7, #20] #endif p = tcp_output_alloc_header_common(ackno, optlen, 0, lwip_htonl(seqno), local_port, 8020878: 7dfb ldrb r3, [r7, #23] 802087a: b29c uxth r4, r3 802087c: 68b8 ldr r0, [r7, #8] 802087e: f7f8 f960 bl 8018b42 8020882: 4602 mov r2, r0 8020884: 8abb ldrh r3, [r7, #20] 8020886: 9303 str r3, [sp, #12] 8020888: 2314 movs r3, #20 802088a: 9302 str r3, [sp, #8] 802088c: 8e3b ldrh r3, [r7, #48] @ 0x30 802088e: 9301 str r3, [sp, #4] 8020890: 8dbb ldrh r3, [r7, #44] @ 0x2c 8020892: 9300 str r3, [sp, #0] 8020894: 4613 mov r3, r2 8020896: 2200 movs r2, #0 8020898: 4621 mov r1, r4 802089a: 6878 ldr r0, [r7, #4] 802089c: f7ff fe94 bl 80205c8 80208a0: 6138 str r0, [r7, #16] remote_port, TCP_RST | TCP_ACK, wnd); if (p == NULL) { 80208a2: 693b ldr r3, [r7, #16] 80208a4: 2b00 cmp r3, #0 80208a6: d00c beq.n 80208c2 LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n")); return; } tcp_output_fill_options(pcb, p, 0, optlen); 80208a8: 7dfb ldrb r3, [r7, #23] 80208aa: 2200 movs r2, #0 80208ac: 6939 ldr r1, [r7, #16] 80208ae: 68f8 ldr r0, [r7, #12] 80208b0: f7ff ff3a bl 8020728 MIB2_STATS_INC(mib2.tcpoutrsts); tcp_output_control_segment(pcb, p, local_ip, remote_ip); 80208b4: 6abb ldr r3, [r7, #40] @ 0x28 80208b6: 683a ldr r2, [r7, #0] 80208b8: 6939 ldr r1, [r7, #16] 80208ba: 68f8 ldr r0, [r7, #12] 80208bc: f7ff ff72 bl 80207a4 80208c0: e000 b.n 80208c4 return; 80208c2: bf00 nop LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 80208c4: 371c adds r7, #28 80208c6: 46bd mov sp, r7 80208c8: bd90 pop {r4, r7, pc} 80208ca: bf00 nop 80208cc: 0802f190 .word 0x0802f190 80208d0: 0802f970 .word 0x0802f970 80208d4: 0802f1e4 .word 0x0802f1e4 80208d8: 0802f98c .word 0x0802f98c 080208dc : * * @param pcb Protocol control block for the TCP connection to send the ACK */ err_t tcp_send_empty_ack(struct tcp_pcb *pcb) { 80208dc: b590 push {r4, r7, lr} 80208de: b087 sub sp, #28 80208e0: af00 add r7, sp, #0 80208e2: 6078 str r0, [r7, #4] err_t err; struct pbuf *p; u8_t optlen, optflags = 0; 80208e4: 2300 movs r3, #0 80208e6: 75fb strb r3, [r7, #23] u8_t num_sacks = 0; 80208e8: 2300 movs r3, #0 80208ea: 75bb strb r3, [r7, #22] LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL); 80208ec: 687b ldr r3, [r7, #4] 80208ee: 2b00 cmp r3, #0 80208f0: d106 bne.n 8020900 80208f2: 4b28 ldr r3, [pc, #160] @ (8020994 ) 80208f4: f240 72ea movw r2, #2026 @ 0x7ea 80208f8: 4927 ldr r1, [pc, #156] @ (8020998 ) 80208fa: 4828 ldr r0, [pc, #160] @ (802099c ) 80208fc: f009 f866 bl 80299cc #if LWIP_TCP_TIMESTAMPS if (pcb->flags & TF_TIMESTAMP) { optflags = TF_SEG_OPTS_TS; } #endif optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb); 8020900: 7dfb ldrb r3, [r7, #23] 8020902: 009b lsls r3, r3, #2 8020904: b2db uxtb r3, r3 8020906: f003 0304 and.w r3, r3, #4 802090a: 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)); 802090c: 7d7b ldrb r3, [r7, #21] 802090e: b29c uxth r4, r3 8020910: 687b ldr r3, [r7, #4] 8020912: 6d1b ldr r3, [r3, #80] @ 0x50 8020914: 4618 mov r0, r3 8020916: f7f8 f914 bl 8018b42 802091a: 4603 mov r3, r0 802091c: 2200 movs r2, #0 802091e: 4621 mov r1, r4 8020920: 6878 ldr r0, [r7, #4] 8020922: f7ff fec3 bl 80206ac 8020926: 6138 str r0, [r7, #16] if (p == NULL) { 8020928: 693b ldr r3, [r7, #16] 802092a: 2b00 cmp r3, #0 802092c: d109 bne.n 8020942 /* let tcp_fasttmr retry sending this ACK */ tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 802092e: 687b ldr r3, [r7, #4] 8020930: 8b5b ldrh r3, [r3, #26] 8020932: f043 0303 orr.w r3, r3, #3 8020936: b29a uxth r2, r3 8020938: 687b ldr r3, [r7, #4] 802093a: 835a strh r2, [r3, #26] LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n")); return ERR_BUF; 802093c: f06f 0301 mvn.w r3, #1 8020940: e023 b.n 802098a } tcp_output_fill_options(pcb, p, optflags, num_sacks); 8020942: 7dbb ldrb r3, [r7, #22] 8020944: 7dfa ldrb r2, [r7, #23] 8020946: 6939 ldr r1, [r7, #16] 8020948: 6878 ldr r0, [r7, #4] 802094a: f7ff feed bl 8020728 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); 802094e: 687a ldr r2, [r7, #4] 8020950: 687b ldr r3, [r7, #4] 8020952: 3304 adds r3, #4 8020954: 6939 ldr r1, [r7, #16] 8020956: 6878 ldr r0, [r7, #4] 8020958: f7ff ff24 bl 80207a4 802095c: 4603 mov r3, r0 802095e: 73fb strb r3, [r7, #15] if (err != ERR_OK) { 8020960: f997 300f ldrsb.w r3, [r7, #15] 8020964: 2b00 cmp r3, #0 8020966: d007 beq.n 8020978 /* let tcp_fasttmr retry sending this ACK */ tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 8020968: 687b ldr r3, [r7, #4] 802096a: 8b5b ldrh r3, [r3, #26] 802096c: f043 0303 orr.w r3, r3, #3 8020970: b29a uxth r2, r3 8020972: 687b ldr r3, [r7, #4] 8020974: 835a strh r2, [r3, #26] 8020976: e006 b.n 8020986 } else { /* remove ACK flags from the PCB, as we sent an empty ACK now */ tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 8020978: 687b ldr r3, [r7, #4] 802097a: 8b5b ldrh r3, [r3, #26] 802097c: f023 0303 bic.w r3, r3, #3 8020980: b29a uxth r2, r3 8020982: 687b ldr r3, [r7, #4] 8020984: 835a strh r2, [r3, #26] } return err; 8020986: f997 300f ldrsb.w r3, [r7, #15] } 802098a: 4618 mov r0, r3 802098c: 371c adds r7, #28 802098e: 46bd mov sp, r7 8020990: bd90 pop {r4, r7, pc} 8020992: bf00 nop 8020994: 0802f190 .word 0x0802f190 8020998: 0802f9a8 .word 0x0802f9a8 802099c: 0802f1e4 .word 0x0802f1e4 080209a0 : * * @param pcb the tcp_pcb for which to send a keepalive packet */ err_t tcp_keepalive(struct tcp_pcb *pcb) { 80209a0: b590 push {r4, r7, lr} 80209a2: b085 sub sp, #20 80209a4: af00 add r7, sp, #0 80209a6: 6078 str r0, [r7, #4] err_t err; struct pbuf *p; u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); 80209a8: 2300 movs r3, #0 80209aa: 72bb strb r3, [r7, #10] LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL); 80209ac: 687b ldr r3, [r7, #4] 80209ae: 2b00 cmp r3, #0 80209b0: d106 bne.n 80209c0 80209b2: 4b18 ldr r3, [pc, #96] @ (8020a14 ) 80209b4: f640 0224 movw r2, #2084 @ 0x824 80209b8: 4917 ldr r1, [pc, #92] @ (8020a18 ) 80209ba: 4818 ldr r0, [pc, #96] @ (8020a1c ) 80209bc: f009 f806 bl 80299cc 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)); 80209c0: 7abb ldrb r3, [r7, #10] 80209c2: b29c uxth r4, r3 80209c4: 687b ldr r3, [r7, #4] 80209c6: 6d1b ldr r3, [r3, #80] @ 0x50 80209c8: 3b01 subs r3, #1 80209ca: 4618 mov r0, r3 80209cc: f7f8 f8b9 bl 8018b42 80209d0: 4603 mov r3, r0 80209d2: 2200 movs r2, #0 80209d4: 4621 mov r1, r4 80209d6: 6878 ldr r0, [r7, #4] 80209d8: f7ff fe68 bl 80206ac 80209dc: 60f8 str r0, [r7, #12] if (p == NULL) { 80209de: 68fb ldr r3, [r7, #12] 80209e0: 2b00 cmp r3, #0 80209e2: d102 bne.n 80209ea LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: could not allocate memory for pbuf\n")); return ERR_MEM; 80209e4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80209e8: e010 b.n 8020a0c } tcp_output_fill_options(pcb, p, 0, optlen); 80209ea: 7abb ldrb r3, [r7, #10] 80209ec: 2200 movs r2, #0 80209ee: 68f9 ldr r1, [r7, #12] 80209f0: 6878 ldr r0, [r7, #4] 80209f2: f7ff fe99 bl 8020728 err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip); 80209f6: 687a ldr r2, [r7, #4] 80209f8: 687b ldr r3, [r7, #4] 80209fa: 3304 adds r3, #4 80209fc: 68f9 ldr r1, [r7, #12] 80209fe: 6878 ldr r0, [r7, #4] 8020a00: f7ff fed0 bl 80207a4 8020a04: 4603 mov r3, r0 8020a06: 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; 8020a08: f997 300b ldrsb.w r3, [r7, #11] } 8020a0c: 4618 mov r0, r3 8020a0e: 3714 adds r7, #20 8020a10: 46bd mov sp, r7 8020a12: bd90 pop {r4, r7, pc} 8020a14: 0802f190 .word 0x0802f190 8020a18: 0802f9c8 .word 0x0802f9c8 8020a1c: 0802f1e4 .word 0x0802f1e4 08020a20 : * * @param pcb the tcp_pcb for which to send a zero-window probe packet */ err_t tcp_zero_window_probe(struct tcp_pcb *pcb) { 8020a20: b590 push {r4, r7, lr} 8020a22: b08b sub sp, #44 @ 0x2c 8020a24: af00 add r7, sp, #0 8020a26: 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); 8020a28: 2300 movs r3, #0 8020a2a: 74fb strb r3, [r7, #19] LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL); 8020a2c: 687b ldr r3, [r7, #4] 8020a2e: 2b00 cmp r3, #0 8020a30: d106 bne.n 8020a40 8020a32: 4b4d ldr r3, [pc, #308] @ (8020b68 ) 8020a34: f640 024f movw r2, #2127 @ 0x84f 8020a38: 494c ldr r1, [pc, #304] @ (8020b6c ) 8020a3a: 484d ldr r0, [pc, #308] @ (8020b70 ) 8020a3c: f008 ffc6 bl 80299cc ("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; 8020a40: 687b ldr r3, [r7, #4] 8020a42: 6edb ldr r3, [r3, #108] @ 0x6c 8020a44: 627b str r3, [r7, #36] @ 0x24 if (seg == NULL) { 8020a46: 6a7b ldr r3, [r7, #36] @ 0x24 8020a48: 2b00 cmp r3, #0 8020a4a: d101 bne.n 8020a50 /* Not expected, persist timer should be off when the send buffer is empty */ return ERR_OK; 8020a4c: 2300 movs r3, #0 8020a4e: e087 b.n 8020b60 /* 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) { 8020a50: 687b ldr r3, [r7, #4] 8020a52: f893 309a ldrb.w r3, [r3, #154] @ 0x9a 8020a56: 2bff cmp r3, #255 @ 0xff 8020a58: d007 beq.n 8020a6a ++pcb->persist_probe; 8020a5a: 687b ldr r3, [r7, #4] 8020a5c: f893 309a ldrb.w r3, [r3, #154] @ 0x9a 8020a60: 3301 adds r3, #1 8020a62: b2da uxtb r2, r3 8020a64: 687b ldr r3, [r7, #4] 8020a66: f883 209a strb.w r2, [r3, #154] @ 0x9a } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 8020a6a: 6a7b ldr r3, [r7, #36] @ 0x24 8020a6c: 691b ldr r3, [r3, #16] 8020a6e: 899b ldrh r3, [r3, #12] 8020a70: b29b uxth r3, r3 8020a72: 4618 mov r0, r3 8020a74: f7f8 f850 bl 8018b18 8020a78: 4603 mov r3, r0 8020a7a: b2db uxtb r3, r3 8020a7c: f003 0301 and.w r3, r3, #1 8020a80: 2b00 cmp r3, #0 8020a82: d005 beq.n 8020a90 8020a84: 6a7b ldr r3, [r7, #36] @ 0x24 8020a86: 891b ldrh r3, [r3, #8] 8020a88: 2b00 cmp r3, #0 8020a8a: d101 bne.n 8020a90 8020a8c: 2301 movs r3, #1 8020a8e: e000 b.n 8020a92 8020a90: 2300 movs r3, #0 8020a92: 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; 8020a96: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8020a9a: 2b00 cmp r3, #0 8020a9c: bf0c ite eq 8020a9e: 2301 moveq r3, #1 8020aa0: 2300 movne r3, #0 8020aa2: b2db uxtb r3, r3 8020aa4: 843b strh r3, [r7, #32] p = tcp_output_alloc_header(pcb, optlen, len, seg->tcphdr->seqno); 8020aa6: 7cfb ldrb r3, [r7, #19] 8020aa8: b299 uxth r1, r3 8020aaa: 6a7b ldr r3, [r7, #36] @ 0x24 8020aac: 691b ldr r3, [r3, #16] 8020aae: 685b ldr r3, [r3, #4] 8020ab0: 8c3a ldrh r2, [r7, #32] 8020ab2: 6878 ldr r0, [r7, #4] 8020ab4: f7ff fdfa bl 80206ac 8020ab8: 61f8 str r0, [r7, #28] if (p == NULL) { 8020aba: 69fb ldr r3, [r7, #28] 8020abc: 2b00 cmp r3, #0 8020abe: d102 bne.n 8020ac6 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); return ERR_MEM; 8020ac0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8020ac4: e04c b.n 8020b60 } tcphdr = (struct tcp_hdr *)p->payload; 8020ac6: 69fb ldr r3, [r7, #28] 8020ac8: 685b ldr r3, [r3, #4] 8020aca: 61bb str r3, [r7, #24] if (is_fin) { 8020acc: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8020ad0: 2b00 cmp r3, #0 8020ad2: d011 beq.n 8020af8 /* FIN segment, no data */ TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN); 8020ad4: 69bb ldr r3, [r7, #24] 8020ad6: 899b ldrh r3, [r3, #12] 8020ad8: b29b uxth r3, r3 8020ada: b21b sxth r3, r3 8020adc: f423 537c bic.w r3, r3, #16128 @ 0x3f00 8020ae0: b21c sxth r4, r3 8020ae2: 2011 movs r0, #17 8020ae4: f7f8 f818 bl 8018b18 8020ae8: 4603 mov r3, r0 8020aea: b21b sxth r3, r3 8020aec: 4323 orrs r3, r4 8020aee: b21b sxth r3, r3 8020af0: b29a uxth r2, r3 8020af2: 69bb ldr r3, [r7, #24] 8020af4: 819a strh r2, [r3, #12] 8020af6: e010 b.n 8020b1a } else { /* Data segment, copy in one byte from the head of the unacked queue */ char *d = ((char *)p->payload + TCP_HLEN); 8020af8: 69fb ldr r3, [r7, #28] 8020afa: 685b ldr r3, [r3, #4] 8020afc: 3314 adds r3, #20 8020afe: 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); 8020b00: 6a7b ldr r3, [r7, #36] @ 0x24 8020b02: 6858 ldr r0, [r3, #4] 8020b04: 6a7b ldr r3, [r7, #36] @ 0x24 8020b06: 685b ldr r3, [r3, #4] 8020b08: 891a ldrh r2, [r3, #8] 8020b0a: 6a7b ldr r3, [r7, #36] @ 0x24 8020b0c: 891b ldrh r3, [r3, #8] 8020b0e: 1ad3 subs r3, r2, r3 8020b10: b29b uxth r3, r3 8020b12: 2201 movs r2, #1 8020b14: 6979 ldr r1, [r7, #20] 8020b16: f7f9 fee7 bl 801a8e8 } /* The byte may be acknowledged without the window being opened. */ snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + 1; 8020b1a: 6a7b ldr r3, [r7, #36] @ 0x24 8020b1c: 691b ldr r3, [r3, #16] 8020b1e: 685b ldr r3, [r3, #4] 8020b20: 4618 mov r0, r3 8020b22: f7f8 f80e bl 8018b42 8020b26: 4603 mov r3, r0 8020b28: 3301 adds r3, #1 8020b2a: 60fb str r3, [r7, #12] if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 8020b2c: 687b ldr r3, [r7, #4] 8020b2e: 6d1a ldr r2, [r3, #80] @ 0x50 8020b30: 68fb ldr r3, [r7, #12] 8020b32: 1ad3 subs r3, r2, r3 8020b34: 2b00 cmp r3, #0 8020b36: da02 bge.n 8020b3e pcb->snd_nxt = snd_nxt; 8020b38: 687b ldr r3, [r7, #4] 8020b3a: 68fa ldr r2, [r7, #12] 8020b3c: 651a str r2, [r3, #80] @ 0x50 } tcp_output_fill_options(pcb, p, 0, optlen); 8020b3e: 7cfb ldrb r3, [r7, #19] 8020b40: 2200 movs r2, #0 8020b42: 69f9 ldr r1, [r7, #28] 8020b44: 6878 ldr r0, [r7, #4] 8020b46: f7ff fdef bl 8020728 err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip); 8020b4a: 687a ldr r2, [r7, #4] 8020b4c: 687b ldr r3, [r7, #4] 8020b4e: 3304 adds r3, #4 8020b50: 69f9 ldr r1, [r7, #28] 8020b52: 6878 ldr r0, [r7, #4] 8020b54: f7ff fe26 bl 80207a4 8020b58: 4603 mov r3, r0 8020b5a: 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; 8020b5c: f997 300b ldrsb.w r3, [r7, #11] } 8020b60: 4618 mov r0, r3 8020b62: 372c adds r7, #44 @ 0x2c 8020b64: 46bd mov sp, r7 8020b66: bd90 pop {r4, r7, pc} 8020b68: 0802f190 .word 0x0802f190 8020b6c: 0802f9e4 .word 0x0802f9e4 8020b70: 0802f1e4 .word 0x0802f1e4 08020b74 : * * @param arg unused argument */ static void tcpip_tcp_timer(void *arg) { 8020b74: b580 push {r7, lr} 8020b76: b082 sub sp, #8 8020b78: af00 add r7, sp, #0 8020b7a: 6078 str r0, [r7, #4] LWIP_UNUSED_ARG(arg); /* call TCP timer handler */ tcp_tmr(); 8020b7c: f7f9 ffa2 bl 801aac4 /* timer still needed? */ if (tcp_active_pcbs || tcp_tw_pcbs) { 8020b80: 4b0a ldr r3, [pc, #40] @ (8020bac ) 8020b82: 681b ldr r3, [r3, #0] 8020b84: 2b00 cmp r3, #0 8020b86: d103 bne.n 8020b90 8020b88: 4b09 ldr r3, [pc, #36] @ (8020bb0 ) 8020b8a: 681b ldr r3, [r3, #0] 8020b8c: 2b00 cmp r3, #0 8020b8e: d005 beq.n 8020b9c /* restart timer */ sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 8020b90: 2200 movs r2, #0 8020b92: 4908 ldr r1, [pc, #32] @ (8020bb4 ) 8020b94: 20fa movs r0, #250 @ 0xfa 8020b96: f000 f8f5 bl 8020d84 8020b9a: e003 b.n 8020ba4 } else { /* disable timer */ tcpip_tcp_timer_active = 0; 8020b9c: 4b06 ldr r3, [pc, #24] @ (8020bb8 ) 8020b9e: 2200 movs r2, #0 8020ba0: 601a str r2, [r3, #0] } } 8020ba2: bf00 nop 8020ba4: bf00 nop 8020ba6: 3708 adds r7, #8 8020ba8: 46bd mov sp, r7 8020baa: bd80 pop {r7, pc} 8020bac: 2402ae94 .word 0x2402ae94 8020bb0: 2402ae98 .word 0x2402ae98 8020bb4: 08020b75 .word 0x08020b75 8020bb8: 2402aee4 .word 0x2402aee4 08020bbc : * the reason is to have the TCP timer only running when * there are active (or time-wait) PCBs. */ void tcp_timer_needed(void) { 8020bbc: b580 push {r7, lr} 8020bbe: af00 add r7, sp, #0 LWIP_ASSERT_CORE_LOCKED(); 8020bc0: f7ef fcb6 bl 8010530 /* timer is off but needed again? */ if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { 8020bc4: 4b0a ldr r3, [pc, #40] @ (8020bf0 ) 8020bc6: 681b ldr r3, [r3, #0] 8020bc8: 2b00 cmp r3, #0 8020bca: d10f bne.n 8020bec 8020bcc: 4b09 ldr r3, [pc, #36] @ (8020bf4 ) 8020bce: 681b ldr r3, [r3, #0] 8020bd0: 2b00 cmp r3, #0 8020bd2: d103 bne.n 8020bdc 8020bd4: 4b08 ldr r3, [pc, #32] @ (8020bf8 ) 8020bd6: 681b ldr r3, [r3, #0] 8020bd8: 2b00 cmp r3, #0 8020bda: d007 beq.n 8020bec /* enable and start timer */ tcpip_tcp_timer_active = 1; 8020bdc: 4b04 ldr r3, [pc, #16] @ (8020bf0 ) 8020bde: 2201 movs r2, #1 8020be0: 601a str r2, [r3, #0] sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 8020be2: 2200 movs r2, #0 8020be4: 4905 ldr r1, [pc, #20] @ (8020bfc ) 8020be6: 20fa movs r0, #250 @ 0xfa 8020be8: f000 f8cc bl 8020d84 } } 8020bec: bf00 nop 8020bee: bd80 pop {r7, pc} 8020bf0: 2402aee4 .word 0x2402aee4 8020bf4: 2402ae94 .word 0x2402ae94 8020bf8: 2402ae98 .word 0x2402ae98 8020bfc: 08020b75 .word 0x08020b75 08020c00 : #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 { 8020c00: b580 push {r7, lr} 8020c02: b086 sub sp, #24 8020c04: af00 add r7, sp, #0 8020c06: 60f8 str r0, [r7, #12] 8020c08: 60b9 str r1, [r7, #8] 8020c0a: 607a str r2, [r7, #4] struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 8020c0c: 200a movs r0, #10 8020c0e: f7f8 fd01 bl 8019614 8020c12: 6138 str r0, [r7, #16] if (timeout == NULL) { 8020c14: 693b ldr r3, [r7, #16] 8020c16: 2b00 cmp r3, #0 8020c18: d109 bne.n 8020c2e LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL); 8020c1a: 693b ldr r3, [r7, #16] 8020c1c: 2b00 cmp r3, #0 8020c1e: d151 bne.n 8020cc4 8020c20: 4b2a ldr r3, [pc, #168] @ (8020ccc ) 8020c22: 22be movs r2, #190 @ 0xbe 8020c24: 492a ldr r1, [pc, #168] @ (8020cd0 ) 8020c26: 482b ldr r0, [pc, #172] @ (8020cd4 ) 8020c28: f008 fed0 bl 80299cc return; 8020c2c: e04a b.n 8020cc4 } timeout->next = NULL; 8020c2e: 693b ldr r3, [r7, #16] 8020c30: 2200 movs r2, #0 8020c32: 601a str r2, [r3, #0] timeout->h = handler; 8020c34: 693b ldr r3, [r7, #16] 8020c36: 68ba ldr r2, [r7, #8] 8020c38: 609a str r2, [r3, #8] timeout->arg = arg; 8020c3a: 693b ldr r3, [r7, #16] 8020c3c: 687a ldr r2, [r7, #4] 8020c3e: 60da str r2, [r3, #12] timeout->time = abs_time; 8020c40: 693b ldr r3, [r7, #16] 8020c42: 68fa ldr r2, [r7, #12] 8020c44: 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) { 8020c46: 4b24 ldr r3, [pc, #144] @ (8020cd8 ) 8020c48: 681b ldr r3, [r3, #0] 8020c4a: 2b00 cmp r3, #0 8020c4c: d103 bne.n 8020c56 next_timeout = timeout; 8020c4e: 4a22 ldr r2, [pc, #136] @ (8020cd8 ) 8020c50: 693b ldr r3, [r7, #16] 8020c52: 6013 str r3, [r2, #0] return; 8020c54: e037 b.n 8020cc6 } if (TIME_LESS_THAN(timeout->time, next_timeout->time)) { 8020c56: 693b ldr r3, [r7, #16] 8020c58: 685a ldr r2, [r3, #4] 8020c5a: 4b1f ldr r3, [pc, #124] @ (8020cd8 ) 8020c5c: 681b ldr r3, [r3, #0] 8020c5e: 685b ldr r3, [r3, #4] 8020c60: 1ad3 subs r3, r2, r3 8020c62: 0fdb lsrs r3, r3, #31 8020c64: f003 0301 and.w r3, r3, #1 8020c68: b2db uxtb r3, r3 8020c6a: 2b00 cmp r3, #0 8020c6c: d007 beq.n 8020c7e timeout->next = next_timeout; 8020c6e: 4b1a ldr r3, [pc, #104] @ (8020cd8 ) 8020c70: 681a ldr r2, [r3, #0] 8020c72: 693b ldr r3, [r7, #16] 8020c74: 601a str r2, [r3, #0] next_timeout = timeout; 8020c76: 4a18 ldr r2, [pc, #96] @ (8020cd8 ) 8020c78: 693b ldr r3, [r7, #16] 8020c7a: 6013 str r3, [r2, #0] 8020c7c: e023 b.n 8020cc6 } else { for (t = next_timeout; t != NULL; t = t->next) { 8020c7e: 4b16 ldr r3, [pc, #88] @ (8020cd8 ) 8020c80: 681b ldr r3, [r3, #0] 8020c82: 617b str r3, [r7, #20] 8020c84: e01a b.n 8020cbc if ((t->next == NULL) || TIME_LESS_THAN(timeout->time, t->next->time)) { 8020c86: 697b ldr r3, [r7, #20] 8020c88: 681b ldr r3, [r3, #0] 8020c8a: 2b00 cmp r3, #0 8020c8c: d00b beq.n 8020ca6 8020c8e: 693b ldr r3, [r7, #16] 8020c90: 685a ldr r2, [r3, #4] 8020c92: 697b ldr r3, [r7, #20] 8020c94: 681b ldr r3, [r3, #0] 8020c96: 685b ldr r3, [r3, #4] 8020c98: 1ad3 subs r3, r2, r3 8020c9a: 0fdb lsrs r3, r3, #31 8020c9c: f003 0301 and.w r3, r3, #1 8020ca0: b2db uxtb r3, r3 8020ca2: 2b00 cmp r3, #0 8020ca4: d007 beq.n 8020cb6 timeout->next = t->next; 8020ca6: 697b ldr r3, [r7, #20] 8020ca8: 681a ldr r2, [r3, #0] 8020caa: 693b ldr r3, [r7, #16] 8020cac: 601a str r2, [r3, #0] t->next = timeout; 8020cae: 697b ldr r3, [r7, #20] 8020cb0: 693a ldr r2, [r7, #16] 8020cb2: 601a str r2, [r3, #0] break; 8020cb4: e007 b.n 8020cc6 for (t = next_timeout; t != NULL; t = t->next) { 8020cb6: 697b ldr r3, [r7, #20] 8020cb8: 681b ldr r3, [r3, #0] 8020cba: 617b str r3, [r7, #20] 8020cbc: 697b ldr r3, [r7, #20] 8020cbe: 2b00 cmp r3, #0 8020cc0: d1e1 bne.n 8020c86 8020cc2: e000 b.n 8020cc6 return; 8020cc4: bf00 nop } } } } 8020cc6: 3718 adds r7, #24 8020cc8: 46bd mov sp, r7 8020cca: bd80 pop {r7, pc} 8020ccc: 0802fa08 .word 0x0802fa08 8020cd0: 0802fa3c .word 0x0802fa3c 8020cd4: 0802fa7c .word 0x0802fa7c 8020cd8: 2402aedc .word 0x2402aedc 08020cdc : #if !LWIP_TESTMODE static #endif void lwip_cyclic_timer(void *arg) { 8020cdc: b580 push {r7, lr} 8020cde: b086 sub sp, #24 8020ce0: af00 add r7, sp, #0 8020ce2: 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; 8020ce4: 687b ldr r3, [r7, #4] 8020ce6: 617b str r3, [r7, #20] #if LWIP_DEBUG_TIMERNAMES LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()\n", cyclic->handler_name)); #endif cyclic->handler(); 8020ce8: 697b ldr r3, [r7, #20] 8020cea: 685b ldr r3, [r3, #4] 8020cec: 4798 blx r3 now = sys_now(); 8020cee: f7ef f983 bl 800fff8 8020cf2: 6138 str r0, [r7, #16] next_timeout_time = (u32_t)(current_timeout_due_time + cyclic->interval_ms); /* overflow handled by TIME_LESS_THAN macro */ 8020cf4: 697b ldr r3, [r7, #20] 8020cf6: 681a ldr r2, [r3, #0] 8020cf8: 4b0f ldr r3, [pc, #60] @ (8020d38 ) 8020cfa: 681b ldr r3, [r3, #0] 8020cfc: 4413 add r3, r2 8020cfe: 60fb str r3, [r7, #12] if (TIME_LESS_THAN(next_timeout_time, now)) { 8020d00: 68fa ldr r2, [r7, #12] 8020d02: 693b ldr r3, [r7, #16] 8020d04: 1ad3 subs r3, r2, r3 8020d06: 0fdb lsrs r3, r3, #31 8020d08: f003 0301 and.w r3, r3, #1 8020d0c: b2db uxtb r3, r3 8020d0e: 2b00 cmp r3, #0 8020d10: d009 beq.n 8020d26 /* 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); 8020d12: 697b ldr r3, [r7, #20] 8020d14: 681a ldr r2, [r3, #0] 8020d16: 693b ldr r3, [r7, #16] 8020d18: 4413 add r3, r2 8020d1a: 687a ldr r2, [r7, #4] 8020d1c: 4907 ldr r1, [pc, #28] @ (8020d3c ) 8020d1e: 4618 mov r0, r3 8020d20: f7ff ff6e bl 8020c00 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 } } 8020d24: e004 b.n 8020d30 sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg); 8020d26: 687a ldr r2, [r7, #4] 8020d28: 4904 ldr r1, [pc, #16] @ (8020d3c ) 8020d2a: 68f8 ldr r0, [r7, #12] 8020d2c: f7ff ff68 bl 8020c00 } 8020d30: bf00 nop 8020d32: 3718 adds r7, #24 8020d34: 46bd mov sp, r7 8020d36: bd80 pop {r7, pc} 8020d38: 2402aee0 .word 0x2402aee0 8020d3c: 08020cdd .word 0x08020cdd 08020d40 : /** Initialize this module */ void sys_timeouts_init(void) { 8020d40: b580 push {r7, lr} 8020d42: b082 sub sp, #8 8020d44: 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++) { 8020d46: 2301 movs r3, #1 8020d48: 607b str r3, [r7, #4] 8020d4a: e00e b.n 8020d6a /* 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])); 8020d4c: 4a0b ldr r2, [pc, #44] @ (8020d7c ) 8020d4e: 687b ldr r3, [r7, #4] 8020d50: f852 0033 ldr.w r0, [r2, r3, lsl #3] 8020d54: 687b ldr r3, [r7, #4] 8020d56: 00db lsls r3, r3, #3 8020d58: 4a08 ldr r2, [pc, #32] @ (8020d7c ) 8020d5a: 4413 add r3, r2 8020d5c: 461a mov r2, r3 8020d5e: 4908 ldr r1, [pc, #32] @ (8020d80 ) 8020d60: f000 f810 bl 8020d84 for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) { 8020d64: 687b ldr r3, [r7, #4] 8020d66: 3301 adds r3, #1 8020d68: 607b str r3, [r7, #4] 8020d6a: 687b ldr r3, [r7, #4] 8020d6c: 2b04 cmp r3, #4 8020d6e: d9ed bls.n 8020d4c } } 8020d70: bf00 nop 8020d72: bf00 nop 8020d74: 3708 adds r7, #8 8020d76: 46bd mov sp, r7 8020d78: bd80 pop {r7, pc} 8020d7a: bf00 nop 8020d7c: 08030be8 .word 0x08030be8 8020d80: 08020cdd .word 0x08020cdd 08020d84 : 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 */ { 8020d84: b580 push {r7, lr} 8020d86: b086 sub sp, #24 8020d88: af00 add r7, sp, #0 8020d8a: 60f8 str r0, [r7, #12] 8020d8c: 60b9 str r1, [r7, #8] 8020d8e: 607a str r2, [r7, #4] u32_t next_timeout_time; LWIP_ASSERT_CORE_LOCKED(); 8020d90: f7ef fbce bl 8010530 LWIP_ASSERT("Timeout time too long, max is LWIP_UINT32_MAX/4 msecs", msecs <= (LWIP_UINT32_MAX / 4)); 8020d94: 68fb ldr r3, [r7, #12] 8020d96: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 8020d9a: d306 bcc.n 8020daa 8020d9c: 4b0a ldr r3, [pc, #40] @ (8020dc8 ) 8020d9e: f240 1229 movw r2, #297 @ 0x129 8020da2: 490a ldr r1, [pc, #40] @ (8020dcc ) 8020da4: 480a ldr r0, [pc, #40] @ (8020dd0 ) 8020da6: f008 fe11 bl 80299cc next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */ 8020daa: f7ef f925 bl 800fff8 8020dae: 4602 mov r2, r0 8020db0: 68fb ldr r3, [r7, #12] 8020db2: 4413 add r3, r2 8020db4: 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); 8020db6: 687a ldr r2, [r7, #4] 8020db8: 68b9 ldr r1, [r7, #8] 8020dba: 6978 ldr r0, [r7, #20] 8020dbc: f7ff ff20 bl 8020c00 #endif } 8020dc0: bf00 nop 8020dc2: 3718 adds r7, #24 8020dc4: 46bd mov sp, r7 8020dc6: bd80 pop {r7, pc} 8020dc8: 0802fa08 .word 0x0802fa08 8020dcc: 0802faa4 .word 0x0802faa4 8020dd0: 0802fa7c .word 0x0802fa7c 08020dd4 : * * Must be called periodically from your main loop. */ void sys_check_timeouts(void) { 8020dd4: b580 push {r7, lr} 8020dd6: b084 sub sp, #16 8020dd8: af00 add r7, sp, #0 u32_t now; LWIP_ASSERT_CORE_LOCKED(); 8020dda: f7ef fba9 bl 8010530 /* Process only timers expired at the start of the function. */ now = sys_now(); 8020dde: f7ef f90b bl 800fff8 8020de2: 60f8 str r0, [r7, #12] sys_timeout_handler handler; void *arg; PBUF_CHECK_FREE_OOSEQ(); tmptimeout = next_timeout; 8020de4: 4b17 ldr r3, [pc, #92] @ (8020e44 ) 8020de6: 681b ldr r3, [r3, #0] 8020de8: 60bb str r3, [r7, #8] if (tmptimeout == NULL) { 8020dea: 68bb ldr r3, [r7, #8] 8020dec: 2b00 cmp r3, #0 8020dee: d022 beq.n 8020e36 return; } if (TIME_LESS_THAN(now, tmptimeout->time)) { 8020df0: 68bb ldr r3, [r7, #8] 8020df2: 685b ldr r3, [r3, #4] 8020df4: 68fa ldr r2, [r7, #12] 8020df6: 1ad3 subs r3, r2, r3 8020df8: 0fdb lsrs r3, r3, #31 8020dfa: f003 0301 and.w r3, r3, #1 8020dfe: b2db uxtb r3, r3 8020e00: 2b00 cmp r3, #0 8020e02: d11a bne.n 8020e3a return; } /* Timeout has expired */ next_timeout = tmptimeout->next; 8020e04: 68bb ldr r3, [r7, #8] 8020e06: 681b ldr r3, [r3, #0] 8020e08: 4a0e ldr r2, [pc, #56] @ (8020e44 ) 8020e0a: 6013 str r3, [r2, #0] handler = tmptimeout->h; 8020e0c: 68bb ldr r3, [r7, #8] 8020e0e: 689b ldr r3, [r3, #8] 8020e10: 607b str r3, [r7, #4] arg = tmptimeout->arg; 8020e12: 68bb ldr r3, [r7, #8] 8020e14: 68db ldr r3, [r3, #12] 8020e16: 603b str r3, [r7, #0] current_timeout_due_time = tmptimeout->time; 8020e18: 68bb ldr r3, [r7, #8] 8020e1a: 685b ldr r3, [r3, #4] 8020e1c: 4a0a ldr r2, [pc, #40] @ (8020e48 ) 8020e1e: 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); 8020e20: 68b9 ldr r1, [r7, #8] 8020e22: 200a movs r0, #10 8020e24: f7f8 fc6c bl 8019700 if (handler != NULL) { 8020e28: 687b ldr r3, [r7, #4] 8020e2a: 2b00 cmp r3, #0 8020e2c: d0da beq.n 8020de4 handler(arg); 8020e2e: 687b ldr r3, [r7, #4] 8020e30: 6838 ldr r0, [r7, #0] 8020e32: 4798 blx r3 do { 8020e34: e7d6 b.n 8020de4 return; 8020e36: bf00 nop 8020e38: e000 b.n 8020e3c return; 8020e3a: bf00 nop } LWIP_TCPIP_THREAD_ALIVE(); /* Repeat until all expired timers have been called */ } while (1); } 8020e3c: 3710 adds r7, #16 8020e3e: 46bd mov sp, r7 8020e40: bd80 pop {r7, pc} 8020e42: bf00 nop 8020e44: 2402aedc .word 0x2402aedc 8020e48: 2402aee0 .word 0x2402aee0 08020e4c : /** Return the time left before the next timeout is due. If no timeouts are * enqueued, returns 0xffffffff */ u32_t sys_timeouts_sleeptime(void) { 8020e4c: b580 push {r7, lr} 8020e4e: b082 sub sp, #8 8020e50: af00 add r7, sp, #0 u32_t now; LWIP_ASSERT_CORE_LOCKED(); 8020e52: f7ef fb6d bl 8010530 if (next_timeout == NULL) { 8020e56: 4b16 ldr r3, [pc, #88] @ (8020eb0 ) 8020e58: 681b ldr r3, [r3, #0] 8020e5a: 2b00 cmp r3, #0 8020e5c: d102 bne.n 8020e64 return SYS_TIMEOUTS_SLEEPTIME_INFINITE; 8020e5e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8020e62: e020 b.n 8020ea6 } now = sys_now(); 8020e64: f7ef f8c8 bl 800fff8 8020e68: 6078 str r0, [r7, #4] if (TIME_LESS_THAN(next_timeout->time, now)) { 8020e6a: 4b11 ldr r3, [pc, #68] @ (8020eb0 ) 8020e6c: 681b ldr r3, [r3, #0] 8020e6e: 685a ldr r2, [r3, #4] 8020e70: 687b ldr r3, [r7, #4] 8020e72: 1ad3 subs r3, r2, r3 8020e74: 0fdb lsrs r3, r3, #31 8020e76: f003 0301 and.w r3, r3, #1 8020e7a: b2db uxtb r3, r3 8020e7c: 2b00 cmp r3, #0 8020e7e: d001 beq.n 8020e84 return 0; 8020e80: 2300 movs r3, #0 8020e82: e010 b.n 8020ea6 } else { u32_t ret = (u32_t)(next_timeout->time - now); 8020e84: 4b0a ldr r3, [pc, #40] @ (8020eb0 ) 8020e86: 681b ldr r3, [r3, #0] 8020e88: 685a ldr r2, [r3, #4] 8020e8a: 687b ldr r3, [r7, #4] 8020e8c: 1ad3 subs r3, r2, r3 8020e8e: 603b str r3, [r7, #0] LWIP_ASSERT("invalid sleeptime", ret <= LWIP_MAX_TIMEOUT); 8020e90: 683b ldr r3, [r7, #0] 8020e92: 2b00 cmp r3, #0 8020e94: da06 bge.n 8020ea4 8020e96: 4b07 ldr r3, [pc, #28] @ (8020eb4 ) 8020e98: f44f 72dc mov.w r2, #440 @ 0x1b8 8020e9c: 4906 ldr r1, [pc, #24] @ (8020eb8 ) 8020e9e: 4807 ldr r0, [pc, #28] @ (8020ebc ) 8020ea0: f008 fd94 bl 80299cc return ret; 8020ea4: 683b ldr r3, [r7, #0] } } 8020ea6: 4618 mov r0, r3 8020ea8: 3708 adds r7, #8 8020eaa: 46bd mov sp, r7 8020eac: bd80 pop {r7, pc} 8020eae: bf00 nop 8020eb0: 2402aedc .word 0x2402aedc 8020eb4: 0802fa08 .word 0x0802fa08 8020eb8: 0802fadc .word 0x0802fadc 8020ebc: 0802fa7c .word 0x0802fa7c 08020ec0 : /** * Initialize this module. */ void udp_init(void) { 8020ec0: b580 push {r7, lr} 8020ec2: af00 add r7, sp, #0 #ifdef LWIP_RAND udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); 8020ec4: f007 fa58 bl 8028378 8020ec8: 4603 mov r3, r0 8020eca: b29b uxth r3, r3 8020ecc: f3c3 030d ubfx r3, r3, #0, #14 8020ed0: b29b uxth r3, r3 8020ed2: f5a3 4380 sub.w r3, r3, #16384 @ 0x4000 8020ed6: b29a uxth r2, r3 8020ed8: 4b01 ldr r3, [pc, #4] @ (8020ee0 ) 8020eda: 801a strh r2, [r3, #0] #endif /* LWIP_RAND */ } 8020edc: bf00 nop 8020ede: bd80 pop {r7, pc} 8020ee0: 24000054 .word 0x24000054 08020ee4 : * * @return a new (free) local UDP port number */ static u16_t udp_new_port(void) { 8020ee4: b480 push {r7} 8020ee6: b083 sub sp, #12 8020ee8: af00 add r7, sp, #0 u16_t n = 0; 8020eea: 2300 movs r3, #0 8020eec: 80fb strh r3, [r7, #6] struct udp_pcb *pcb; again: if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { 8020eee: 4b17 ldr r3, [pc, #92] @ (8020f4c ) 8020ef0: 881b ldrh r3, [r3, #0] 8020ef2: 1c5a adds r2, r3, #1 8020ef4: b291 uxth r1, r2 8020ef6: 4a15 ldr r2, [pc, #84] @ (8020f4c ) 8020ef8: 8011 strh r1, [r2, #0] 8020efa: f64f 72ff movw r2, #65535 @ 0xffff 8020efe: 4293 cmp r3, r2 8020f00: d103 bne.n 8020f0a udp_port = UDP_LOCAL_PORT_RANGE_START; 8020f02: 4b12 ldr r3, [pc, #72] @ (8020f4c ) 8020f04: f44f 4240 mov.w r2, #49152 @ 0xc000 8020f08: 801a strh r2, [r3, #0] } /* Check all PCBs. */ for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8020f0a: 4b11 ldr r3, [pc, #68] @ (8020f50 ) 8020f0c: 681b ldr r3, [r3, #0] 8020f0e: 603b str r3, [r7, #0] 8020f10: e011 b.n 8020f36 if (pcb->local_port == udp_port) { 8020f12: 683b ldr r3, [r7, #0] 8020f14: 8a5a ldrh r2, [r3, #18] 8020f16: 4b0d ldr r3, [pc, #52] @ (8020f4c ) 8020f18: 881b ldrh r3, [r3, #0] 8020f1a: 429a cmp r2, r3 8020f1c: d108 bne.n 8020f30 if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) { 8020f1e: 88fb ldrh r3, [r7, #6] 8020f20: 3301 adds r3, #1 8020f22: 80fb strh r3, [r7, #6] 8020f24: 88fb ldrh r3, [r7, #6] 8020f26: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 8020f2a: d3e0 bcc.n 8020eee return 0; 8020f2c: 2300 movs r3, #0 8020f2e: e007 b.n 8020f40 for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8020f30: 683b ldr r3, [r7, #0] 8020f32: 68db ldr r3, [r3, #12] 8020f34: 603b str r3, [r7, #0] 8020f36: 683b ldr r3, [r7, #0] 8020f38: 2b00 cmp r3, #0 8020f3a: d1ea bne.n 8020f12 } goto again; } } return udp_port; 8020f3c: 4b03 ldr r3, [pc, #12] @ (8020f4c ) 8020f3e: 881b ldrh r3, [r3, #0] } 8020f40: 4618 mov r0, r3 8020f42: 370c adds r7, #12 8020f44: 46bd mov sp, r7 8020f46: f85d 7b04 ldr.w r7, [sp], #4 8020f4a: 4770 bx lr 8020f4c: 24000054 .word 0x24000054 8020f50: 2402aee8 .word 0x2402aee8 08020f54 : * @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) { 8020f54: b580 push {r7, lr} 8020f56: b084 sub sp, #16 8020f58: af00 add r7, sp, #0 8020f5a: 60f8 str r0, [r7, #12] 8020f5c: 60b9 str r1, [r7, #8] 8020f5e: 4613 mov r3, r2 8020f60: 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); 8020f62: 68fb ldr r3, [r7, #12] 8020f64: 2b00 cmp r3, #0 8020f66: d105 bne.n 8020f74 8020f68: 4b27 ldr r3, [pc, #156] @ (8021008 ) 8020f6a: 2287 movs r2, #135 @ 0x87 8020f6c: 4927 ldr r1, [pc, #156] @ (802100c ) 8020f6e: 4828 ldr r0, [pc, #160] @ (8021010 ) 8020f70: f008 fd2c bl 80299cc LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL); 8020f74: 68bb ldr r3, [r7, #8] 8020f76: 2b00 cmp r3, #0 8020f78: d105 bne.n 8020f86 8020f7a: 4b23 ldr r3, [pc, #140] @ (8021008 ) 8020f7c: 2288 movs r2, #136 @ 0x88 8020f7e: 4925 ldr r1, [pc, #148] @ (8021014 ) 8020f80: 4823 ldr r0, [pc, #140] @ (8021010 ) 8020f82: f008 fd23 bl 80299cc /* check if PCB is bound to specific netif */ if ((pcb->netif_idx != NETIF_NO_INDEX) && 8020f86: 68fb ldr r3, [r7, #12] 8020f88: 7a1b ldrb r3, [r3, #8] 8020f8a: 2b00 cmp r3, #0 8020f8c: d00b beq.n 8020fa6 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 8020f8e: 68fb ldr r3, [r7, #12] 8020f90: 7a1a ldrb r2, [r3, #8] 8020f92: 4b21 ldr r3, [pc, #132] @ (8021018 ) 8020f94: 685b ldr r3, [r3, #4] 8020f96: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8020f9a: 3301 adds r3, #1 8020f9c: b2db uxtb r3, r3 if ((pcb->netif_idx != NETIF_NO_INDEX) && 8020f9e: 429a cmp r2, r3 8020fa0: d001 beq.n 8020fa6 return 0; 8020fa2: 2300 movs r3, #0 8020fa4: e02b b.n 8020ffe /* 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) { 8020fa6: 79fb ldrb r3, [r7, #7] 8020fa8: 2b00 cmp r3, #0 8020faa: d018 beq.n 8020fde #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)) || 8020fac: 68fb ldr r3, [r7, #12] 8020fae: 2b00 cmp r3, #0 8020fb0: d013 beq.n 8020fda 8020fb2: 68fb ldr r3, [r7, #12] 8020fb4: 681b ldr r3, [r3, #0] 8020fb6: 2b00 cmp r3, #0 8020fb8: d00f beq.n 8020fda ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || 8020fba: 4b17 ldr r3, [pc, #92] @ (8021018 ) 8020fbc: 695b ldr r3, [r3, #20] if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || 8020fbe: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8020fc2: d00a beq.n 8020fda ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) { 8020fc4: 68fb ldr r3, [r7, #12] 8020fc6: 681a ldr r2, [r3, #0] 8020fc8: 4b13 ldr r3, [pc, #76] @ (8021018 ) 8020fca: 695b ldr r3, [r3, #20] 8020fcc: 405a eors r2, r3 8020fce: 68bb ldr r3, [r7, #8] 8020fd0: 3308 adds r3, #8 8020fd2: 681b ldr r3, [r3, #0] 8020fd4: 4013 ands r3, r2 ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || 8020fd6: 2b00 cmp r3, #0 8020fd8: d110 bne.n 8020ffc return 1; 8020fda: 2301 movs r3, #1 8020fdc: e00f b.n 8020ffe } } } 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())) { 8020fde: 68fb ldr r3, [r7, #12] 8020fe0: 2b00 cmp r3, #0 8020fe2: d009 beq.n 8020ff8 8020fe4: 68fb ldr r3, [r7, #12] 8020fe6: 681b ldr r3, [r3, #0] 8020fe8: 2b00 cmp r3, #0 8020fea: d005 beq.n 8020ff8 8020fec: 68fb ldr r3, [r7, #12] 8020fee: 681a ldr r2, [r3, #0] 8020ff0: 4b09 ldr r3, [pc, #36] @ (8021018 ) 8020ff2: 695b ldr r3, [r3, #20] 8020ff4: 429a cmp r2, r3 8020ff6: d101 bne.n 8020ffc return 1; 8020ff8: 2301 movs r3, #1 8020ffa: e000 b.n 8020ffe } } return 0; 8020ffc: 2300 movs r3, #0 } 8020ffe: 4618 mov r0, r3 8021000: 3710 adds r7, #16 8021002: 46bd mov sp, r7 8021004: bd80 pop {r7, pc} 8021006: bf00 nop 8021008: 0802faf0 .word 0x0802faf0 802100c: 0802fb20 .word 0x0802fb20 8021010: 0802fb44 .word 0x0802fb44 8021014: 0802fb6c .word 0x0802fb6c 8021018: 24024338 .word 0x24024338 0802101c : * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 802101c: b590 push {r4, r7, lr} 802101e: b08d sub sp, #52 @ 0x34 8021020: af02 add r7, sp, #8 8021022: 6078 str r0, [r7, #4] 8021024: 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; 8021026: 2300 movs r3, #0 8021028: 77fb strb r3, [r7, #31] LWIP_UNUSED_ARG(inp); LWIP_ASSERT_CORE_LOCKED(); 802102a: f7ef fa81 bl 8010530 LWIP_ASSERT("udp_input: invalid pbuf", p != NULL); 802102e: 687b ldr r3, [r7, #4] 8021030: 2b00 cmp r3, #0 8021032: d105 bne.n 8021040 8021034: 4b7c ldr r3, [pc, #496] @ (8021228 ) 8021036: 22cf movs r2, #207 @ 0xcf 8021038: 497c ldr r1, [pc, #496] @ (802122c ) 802103a: 487d ldr r0, [pc, #500] @ (8021230 ) 802103c: f008 fcc6 bl 80299cc LWIP_ASSERT("udp_input: invalid netif", inp != NULL); 8021040: 683b ldr r3, [r7, #0] 8021042: 2b00 cmp r3, #0 8021044: d105 bne.n 8021052 8021046: 4b78 ldr r3, [pc, #480] @ (8021228 ) 8021048: 22d0 movs r2, #208 @ 0xd0 802104a: 497a ldr r1, [pc, #488] @ (8021234 ) 802104c: 4878 ldr r0, [pc, #480] @ (8021230 ) 802104e: f008 fcbd bl 80299cc PERF_START; UDP_STATS_INC(udp.recv); /* Check minimum length (UDP header) */ if (p->len < UDP_HLEN) { 8021052: 687b ldr r3, [r7, #4] 8021054: 895b ldrh r3, [r3, #10] 8021056: 2b07 cmp r3, #7 8021058: d803 bhi.n 8021062 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); 802105a: 6878 ldr r0, [r7, #4] 802105c: f7f9 fa3e bl 801a4dc goto end; 8021060: e0de b.n 8021220 } udphdr = (struct udp_hdr *)p->payload; 8021062: 687b ldr r3, [r7, #4] 8021064: 685b ldr r3, [r3, #4] 8021066: 617b str r3, [r7, #20] /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()); 8021068: 4b73 ldr r3, [pc, #460] @ (8021238 ) 802106a: 695b ldr r3, [r3, #20] 802106c: 4a72 ldr r2, [pc, #456] @ (8021238 ) 802106e: 6812 ldr r2, [r2, #0] 8021070: 4611 mov r1, r2 8021072: 4618 mov r0, r3 8021074: f003 ff54 bl 8024f20 8021078: 4603 mov r3, r0 802107a: 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); 802107c: 697b ldr r3, [r7, #20] 802107e: 881b ldrh r3, [r3, #0] 8021080: b29b uxth r3, r3 8021082: 4618 mov r0, r3 8021084: f7f7 fd48 bl 8018b18 8021088: 4603 mov r3, r0 802108a: 823b strh r3, [r7, #16] dest = lwip_ntohs(udphdr->dest); 802108c: 697b ldr r3, [r7, #20] 802108e: 885b ldrh r3, [r3, #2] 8021090: b29b uxth r3, r3 8021092: 4618 mov r0, r3 8021094: f7f7 fd40 bl 8018b18 8021098: 4603 mov r3, r0 802109a: 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; 802109c: 2300 movs r3, #0 802109e: 623b str r3, [r7, #32] prev = NULL; 80210a0: 2300 movs r3, #0 80210a2: 627b str r3, [r7, #36] @ 0x24 uncon_pcb = NULL; 80210a4: 2300 movs r3, #0 80210a6: 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) { 80210a8: 4b64 ldr r3, [pc, #400] @ (802123c ) 80210aa: 681b ldr r3, [r3, #0] 80210ac: 623b str r3, [r7, #32] 80210ae: e054 b.n 802115a 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) && 80210b0: 6a3b ldr r3, [r7, #32] 80210b2: 8a5b ldrh r3, [r3, #18] 80210b4: 89fa ldrh r2, [r7, #14] 80210b6: 429a cmp r2, r3 80210b8: d14a bne.n 8021150 (udp_input_local_match(pcb, inp, broadcast) != 0)) { 80210ba: 7cfb ldrb r3, [r7, #19] 80210bc: 461a mov r2, r3 80210be: 6839 ldr r1, [r7, #0] 80210c0: 6a38 ldr r0, [r7, #32] 80210c2: f7ff ff47 bl 8020f54 80210c6: 4603 mov r3, r0 if ((pcb->local_port == dest) && 80210c8: 2b00 cmp r3, #0 80210ca: d041 beq.n 8021150 if ((pcb->flags & UDP_FLAGS_CONNECTED) == 0) { 80210cc: 6a3b ldr r3, [r7, #32] 80210ce: 7c1b ldrb r3, [r3, #16] 80210d0: f003 0304 and.w r3, r3, #4 80210d4: 2b00 cmp r3, #0 80210d6: d11d bne.n 8021114 if (uncon_pcb == NULL) { 80210d8: 69bb ldr r3, [r7, #24] 80210da: 2b00 cmp r3, #0 80210dc: d102 bne.n 80210e4 /* the first unconnected matching PCB */ uncon_pcb = pcb; 80210de: 6a3b ldr r3, [r7, #32] 80210e0: 61bb str r3, [r7, #24] 80210e2: e017 b.n 8021114 #if LWIP_IPV4 } else if (broadcast && ip4_current_dest_addr()->addr == IPADDR_BROADCAST) { 80210e4: 7cfb ldrb r3, [r7, #19] 80210e6: 2b00 cmp r3, #0 80210e8: d014 beq.n 8021114 80210ea: 4b53 ldr r3, [pc, #332] @ (8021238 ) 80210ec: 695b ldr r3, [r3, #20] 80210ee: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80210f2: d10f bne.n 8021114 /* 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))) { 80210f4: 69bb ldr r3, [r7, #24] 80210f6: 681a ldr r2, [r3, #0] 80210f8: 683b ldr r3, [r7, #0] 80210fa: 3304 adds r3, #4 80210fc: 681b ldr r3, [r3, #0] 80210fe: 429a cmp r2, r3 8021100: d008 beq.n 8021114 /* 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))) { 8021102: 6a3b ldr r3, [r7, #32] 8021104: 681a ldr r2, [r3, #0] 8021106: 683b ldr r3, [r7, #0] 8021108: 3304 adds r3, #4 802110a: 681b ldr r3, [r3, #0] 802110c: 429a cmp r2, r3 802110e: d101 bne.n 8021114 /* better match */ uncon_pcb = pcb; 8021110: 6a3b ldr r3, [r7, #32] 8021112: 61bb str r3, [r7, #24] } #endif /* SO_REUSE */ } /* compare PCB remote addr+port to UDP source addr+port */ if ((pcb->remote_port == src) && 8021114: 6a3b ldr r3, [r7, #32] 8021116: 8a9b ldrh r3, [r3, #20] 8021118: 8a3a ldrh r2, [r7, #16] 802111a: 429a cmp r2, r3 802111c: d118 bne.n 8021150 (ip_addr_isany_val(pcb->remote_ip) || 802111e: 6a3b ldr r3, [r7, #32] 8021120: 685b ldr r3, [r3, #4] if ((pcb->remote_port == src) && 8021122: 2b00 cmp r3, #0 8021124: d005 beq.n 8021132 ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) { 8021126: 6a3b ldr r3, [r7, #32] 8021128: 685a ldr r2, [r3, #4] 802112a: 4b43 ldr r3, [pc, #268] @ (8021238 ) 802112c: 691b ldr r3, [r3, #16] (ip_addr_isany_val(pcb->remote_ip) || 802112e: 429a cmp r2, r3 8021130: d10e bne.n 8021150 /* the first fully matching PCB */ if (prev != NULL) { 8021132: 6a7b ldr r3, [r7, #36] @ 0x24 8021134: 2b00 cmp r3, #0 8021136: d014 beq.n 8021162 /* move the pcb to the front of udp_pcbs so that is found faster next time */ prev->next = pcb->next; 8021138: 6a3b ldr r3, [r7, #32] 802113a: 68da ldr r2, [r3, #12] 802113c: 6a7b ldr r3, [r7, #36] @ 0x24 802113e: 60da str r2, [r3, #12] pcb->next = udp_pcbs; 8021140: 4b3e ldr r3, [pc, #248] @ (802123c ) 8021142: 681a ldr r2, [r3, #0] 8021144: 6a3b ldr r3, [r7, #32] 8021146: 60da str r2, [r3, #12] udp_pcbs = pcb; 8021148: 4a3c ldr r2, [pc, #240] @ (802123c ) 802114a: 6a3b ldr r3, [r7, #32] 802114c: 6013 str r3, [r2, #0] } else { UDP_STATS_INC(udp.cachehit); } break; 802114e: e008 b.n 8021162 } } prev = pcb; 8021150: 6a3b ldr r3, [r7, #32] 8021152: 627b str r3, [r7, #36] @ 0x24 for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8021154: 6a3b ldr r3, [r7, #32] 8021156: 68db ldr r3, [r3, #12] 8021158: 623b str r3, [r7, #32] 802115a: 6a3b ldr r3, [r7, #32] 802115c: 2b00 cmp r3, #0 802115e: d1a7 bne.n 80210b0 8021160: e000 b.n 8021164 break; 8021162: bf00 nop } /* no fully matching pcb found? then look for an unconnected pcb */ if (pcb == NULL) { 8021164: 6a3b ldr r3, [r7, #32] 8021166: 2b00 cmp r3, #0 8021168: d101 bne.n 802116e pcb = uncon_pcb; 802116a: 69bb ldr r3, [r7, #24] 802116c: 623b str r3, [r7, #32] } /* Check checksum if this is a match or if it was directed at us. */ if (pcb != NULL) { 802116e: 6a3b ldr r3, [r7, #32] 8021170: 2b00 cmp r3, #0 8021172: d002 beq.n 802117a for_us = 1; 8021174: 2301 movs r3, #1 8021176: 77fb strb r3, [r7, #31] 8021178: e00a b.n 8021190 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()); 802117a: 683b ldr r3, [r7, #0] 802117c: 3304 adds r3, #4 802117e: 681a ldr r2, [r3, #0] 8021180: 4b2d ldr r3, [pc, #180] @ (8021238 ) 8021182: 695b ldr r3, [r3, #20] 8021184: 429a cmp r2, r3 8021186: bf0c ite eq 8021188: 2301 moveq r3, #1 802118a: 2300 movne r3, #0 802118c: b2db uxtb r3, r3 802118e: 77fb strb r3, [r7, #31] } #endif /* LWIP_IPV4 */ } if (for_us) { 8021190: 7ffb ldrb r3, [r7, #31] 8021192: 2b00 cmp r3, #0 8021194: d041 beq.n 802121a } } } } #endif /* CHECKSUM_CHECK_UDP */ if (pbuf_remove_header(p, UDP_HLEN)) { 8021196: 2108 movs r1, #8 8021198: 6878 ldr r0, [r7, #4] 802119a: f7f9 f8e7 bl 801a36c 802119e: 4603 mov r3, r0 80211a0: 2b00 cmp r3, #0 80211a2: d00a beq.n 80211ba /* Can we cope with this failing? Just assert for now */ LWIP_ASSERT("pbuf_remove_header failed\n", 0); 80211a4: 4b20 ldr r3, [pc, #128] @ (8021228 ) 80211a6: f44f 72b8 mov.w r2, #368 @ 0x170 80211aa: 4925 ldr r1, [pc, #148] @ (8021240 ) 80211ac: 4820 ldr r0, [pc, #128] @ (8021230 ) 80211ae: f008 fc0d bl 80299cc UDP_STATS_INC(udp.drop); MIB2_STATS_INC(mib2.udpinerrors); pbuf_free(p); 80211b2: 6878 ldr r0, [r7, #4] 80211b4: f7f9 f992 bl 801a4dc goto end; 80211b8: e032 b.n 8021220 } if (pcb != NULL) { 80211ba: 6a3b ldr r3, [r7, #32] 80211bc: 2b00 cmp r3, #0 80211be: d012 beq.n 80211e6 } } } #endif /* SO_REUSE && SO_REUSE_RXTOALL */ /* callback */ if (pcb->recv != NULL) { 80211c0: 6a3b ldr r3, [r7, #32] 80211c2: 699b ldr r3, [r3, #24] 80211c4: 2b00 cmp r3, #0 80211c6: d00a beq.n 80211de /* now the recv function is responsible for freeing p */ pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src); 80211c8: 6a3b ldr r3, [r7, #32] 80211ca: 699c ldr r4, [r3, #24] 80211cc: 6a3b ldr r3, [r7, #32] 80211ce: 69d8 ldr r0, [r3, #28] 80211d0: 8a3b ldrh r3, [r7, #16] 80211d2: 9300 str r3, [sp, #0] 80211d4: 4b1b ldr r3, [pc, #108] @ (8021244 ) 80211d6: 687a ldr r2, [r7, #4] 80211d8: 6a39 ldr r1, [r7, #32] 80211da: 47a0 blx r4 } else { pbuf_free(p); } end: PERF_STOP("udp_input"); return; 80211dc: e021 b.n 8021222 pbuf_free(p); 80211de: 6878 ldr r0, [r7, #4] 80211e0: f7f9 f97c bl 801a4dc goto end; 80211e4: e01c b.n 8021220 if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) { 80211e6: 7cfb ldrb r3, [r7, #19] 80211e8: 2b00 cmp r3, #0 80211ea: d112 bne.n 8021212 80211ec: 4b12 ldr r3, [pc, #72] @ (8021238 ) 80211ee: 695b ldr r3, [r3, #20] 80211f0: f003 03f0 and.w r3, r3, #240 @ 0xf0 80211f4: 2be0 cmp r3, #224 @ 0xe0 80211f6: d00c beq.n 8021212 pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN)); 80211f8: 4b0f ldr r3, [pc, #60] @ (8021238 ) 80211fa: 899b ldrh r3, [r3, #12] 80211fc: 3308 adds r3, #8 80211fe: b29b uxth r3, r3 8021200: b21b sxth r3, r3 8021202: 4619 mov r1, r3 8021204: 6878 ldr r0, [r7, #4] 8021206: f7f9 f924 bl 801a452 icmp_port_unreach(ip_current_is_v6(), p); 802120a: 2103 movs r1, #3 802120c: 6878 ldr r0, [r7, #4] 802120e: f003 fb3b bl 8024888 pbuf_free(p); 8021212: 6878 ldr r0, [r7, #4] 8021214: f7f9 f962 bl 801a4dc return; 8021218: e003 b.n 8021222 pbuf_free(p); 802121a: 6878 ldr r0, [r7, #4] 802121c: f7f9 f95e bl 801a4dc return; 8021220: bf00 nop UDP_STATS_INC(udp.drop); MIB2_STATS_INC(mib2.udpinerrors); pbuf_free(p); PERF_STOP("udp_input"); #endif /* CHECKSUM_CHECK_UDP */ } 8021222: 372c adds r7, #44 @ 0x2c 8021224: 46bd mov sp, r7 8021226: bd90 pop {r4, r7, pc} 8021228: 0802faf0 .word 0x0802faf0 802122c: 0802fb94 .word 0x0802fb94 8021230: 0802fb44 .word 0x0802fb44 8021234: 0802fbac .word 0x0802fbac 8021238: 24024338 .word 0x24024338 802123c: 2402aee8 .word 0x2402aee8 8021240: 0802fbc8 .word 0x0802fbc8 8021244: 24024348 .word 0x24024348 08021248 : * * @see udp_disconnect() udp_sendto() */ err_t udp_send(struct udp_pcb *pcb, struct pbuf *p) { 8021248: b580 push {r7, lr} 802124a: b082 sub sp, #8 802124c: af00 add r7, sp, #0 802124e: 6078 str r0, [r7, #4] 8021250: 6039 str r1, [r7, #0] LWIP_ERROR("udp_send: invalid pcb", pcb != NULL, return ERR_ARG); 8021252: 687b ldr r3, [r7, #4] 8021254: 2b00 cmp r3, #0 8021256: d109 bne.n 802126c 8021258: 4b11 ldr r3, [pc, #68] @ (80212a0 ) 802125a: f240 12d5 movw r2, #469 @ 0x1d5 802125e: 4911 ldr r1, [pc, #68] @ (80212a4 ) 8021260: 4811 ldr r0, [pc, #68] @ (80212a8 ) 8021262: f008 fbb3 bl 80299cc 8021266: f06f 030f mvn.w r3, #15 802126a: e015 b.n 8021298 LWIP_ERROR("udp_send: invalid pbuf", p != NULL, return ERR_ARG); 802126c: 683b ldr r3, [r7, #0] 802126e: 2b00 cmp r3, #0 8021270: d109 bne.n 8021286 8021272: 4b0b ldr r3, [pc, #44] @ (80212a0 ) 8021274: f44f 72eb mov.w r2, #470 @ 0x1d6 8021278: 490c ldr r1, [pc, #48] @ (80212ac ) 802127a: 480b ldr r0, [pc, #44] @ (80212a8 ) 802127c: f008 fba6 bl 80299cc 8021280: f06f 030f mvn.w r3, #15 8021284: e008 b.n 8021298 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); 8021286: 687b ldr r3, [r7, #4] 8021288: 1d1a adds r2, r3, #4 802128a: 687b ldr r3, [r7, #4] 802128c: 8a9b ldrh r3, [r3, #20] 802128e: 6839 ldr r1, [r7, #0] 8021290: 6878 ldr r0, [r7, #4] 8021292: f000 f80d bl 80212b0 8021296: 4603 mov r3, r0 } 8021298: 4618 mov r0, r3 802129a: 3708 adds r7, #8 802129c: 46bd mov sp, r7 802129e: bd80 pop {r7, pc} 80212a0: 0802faf0 .word 0x0802faf0 80212a4: 0802fbe4 .word 0x0802fbe4 80212a8: 0802fb44 .word 0x0802fb44 80212ac: 0802fbfc .word 0x0802fbfc 080212b0 : * @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) { 80212b0: b580 push {r7, lr} 80212b2: b088 sub sp, #32 80212b4: af02 add r7, sp, #8 80212b6: 60f8 str r0, [r7, #12] 80212b8: 60b9 str r1, [r7, #8] 80212ba: 607a str r2, [r7, #4] 80212bc: 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); 80212be: 68fb ldr r3, [r7, #12] 80212c0: 2b00 cmp r3, #0 80212c2: d109 bne.n 80212d8 80212c4: 4b23 ldr r3, [pc, #140] @ (8021354 ) 80212c6: f44f 7206 mov.w r2, #536 @ 0x218 80212ca: 4923 ldr r1, [pc, #140] @ (8021358 ) 80212cc: 4823 ldr r0, [pc, #140] @ (802135c ) 80212ce: f008 fb7d bl 80299cc 80212d2: f06f 030f mvn.w r3, #15 80212d6: e038 b.n 802134a LWIP_ERROR("udp_sendto: invalid pbuf", p != NULL, return ERR_ARG); 80212d8: 68bb ldr r3, [r7, #8] 80212da: 2b00 cmp r3, #0 80212dc: d109 bne.n 80212f2 80212de: 4b1d ldr r3, [pc, #116] @ (8021354 ) 80212e0: f240 2219 movw r2, #537 @ 0x219 80212e4: 491e ldr r1, [pc, #120] @ (8021360 ) 80212e6: 481d ldr r0, [pc, #116] @ (802135c ) 80212e8: f008 fb70 bl 80299cc 80212ec: f06f 030f mvn.w r3, #15 80212f0: e02b b.n 802134a LWIP_ERROR("udp_sendto: invalid dst_ip", dst_ip != NULL, return ERR_ARG); 80212f2: 687b ldr r3, [r7, #4] 80212f4: 2b00 cmp r3, #0 80212f6: d109 bne.n 802130c 80212f8: 4b16 ldr r3, [pc, #88] @ (8021354 ) 80212fa: f240 221a movw r2, #538 @ 0x21a 80212fe: 4919 ldr r1, [pc, #100] @ (8021364 ) 8021300: 4816 ldr r0, [pc, #88] @ (802135c ) 8021302: f008 fb63 bl 80299cc 8021306: f06f 030f mvn.w r3, #15 802130a: e01e b.n 802134a return ERR_VAL; } LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_send\n")); if (pcb->netif_idx != NETIF_NO_INDEX) { 802130c: 68fb ldr r3, [r7, #12] 802130e: 7a1b ldrb r3, [r3, #8] 8021310: 2b00 cmp r3, #0 8021312: d006 beq.n 8021322 netif = netif_get_by_index(pcb->netif_idx); 8021314: 68fb ldr r3, [r7, #12] 8021316: 7a1b ldrb r3, [r3, #8] 8021318: 4618 mov r0, r3 802131a: f7f8 fd1f bl 8019d5c 802131e: 6178 str r0, [r7, #20] 8021320: e003 b.n 802132a if (netif == NULL) #endif /* LWIP_MULTICAST_TX_OPTIONS */ { /* find the outgoing network interface for this packet */ netif = ip_route(&pcb->local_ip, dst_ip); 8021322: 6878 ldr r0, [r7, #4] 8021324: f003 fb44 bl 80249b0 8021328: 6178 str r0, [r7, #20] } } /* no outgoing network interface could be found? */ if (netif == NULL) { 802132a: 697b ldr r3, [r7, #20] 802132c: 2b00 cmp r3, #0 802132e: d102 bne.n 8021336 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; 8021330: f06f 0303 mvn.w r3, #3 8021334: e009 b.n 802134a } #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); 8021336: 887a ldrh r2, [r7, #2] 8021338: 697b ldr r3, [r7, #20] 802133a: 9300 str r3, [sp, #0] 802133c: 4613 mov r3, r2 802133e: 687a ldr r2, [r7, #4] 8021340: 68b9 ldr r1, [r7, #8] 8021342: 68f8 ldr r0, [r7, #12] 8021344: f000 f810 bl 8021368 8021348: 4603 mov r3, r0 #endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ } 802134a: 4618 mov r0, r3 802134c: 3718 adds r7, #24 802134e: 46bd mov sp, r7 8021350: bd80 pop {r7, pc} 8021352: bf00 nop 8021354: 0802faf0 .word 0x0802faf0 8021358: 0802fc14 .word 0x0802fc14 802135c: 0802fb44 .word 0x0802fb44 8021360: 0802fc2c .word 0x0802fc2c 8021364: 0802fc48 .word 0x0802fc48 08021368 : * @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) { 8021368: b580 push {r7, lr} 802136a: b088 sub sp, #32 802136c: af02 add r7, sp, #8 802136e: 60f8 str r0, [r7, #12] 8021370: 60b9 str r1, [r7, #8] 8021372: 607a str r2, [r7, #4] 8021374: 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); 8021376: 68fb ldr r3, [r7, #12] 8021378: 2b00 cmp r3, #0 802137a: d109 bne.n 8021390 802137c: 4b2e ldr r3, [pc, #184] @ (8021438 ) 802137e: f44f 7220 mov.w r2, #640 @ 0x280 8021382: 492e ldr r1, [pc, #184] @ (802143c ) 8021384: 482e ldr r0, [pc, #184] @ (8021440 ) 8021386: f008 fb21 bl 80299cc 802138a: f06f 030f mvn.w r3, #15 802138e: e04f b.n 8021430 LWIP_ERROR("udp_sendto_if: invalid pbuf", p != NULL, return ERR_ARG); 8021390: 68bb ldr r3, [r7, #8] 8021392: 2b00 cmp r3, #0 8021394: d109 bne.n 80213aa 8021396: 4b28 ldr r3, [pc, #160] @ (8021438 ) 8021398: f240 2281 movw r2, #641 @ 0x281 802139c: 4929 ldr r1, [pc, #164] @ (8021444 ) 802139e: 4828 ldr r0, [pc, #160] @ (8021440 ) 80213a0: f008 fb14 bl 80299cc 80213a4: f06f 030f mvn.w r3, #15 80213a8: e042 b.n 8021430 LWIP_ERROR("udp_sendto_if: invalid dst_ip", dst_ip != NULL, return ERR_ARG); 80213aa: 687b ldr r3, [r7, #4] 80213ac: 2b00 cmp r3, #0 80213ae: d109 bne.n 80213c4 80213b0: 4b21 ldr r3, [pc, #132] @ (8021438 ) 80213b2: f240 2282 movw r2, #642 @ 0x282 80213b6: 4924 ldr r1, [pc, #144] @ (8021448 ) 80213b8: 4821 ldr r0, [pc, #132] @ (8021440 ) 80213ba: f008 fb07 bl 80299cc 80213be: f06f 030f mvn.w r3, #15 80213c2: e035 b.n 8021430 LWIP_ERROR("udp_sendto_if: invalid netif", netif != NULL, return ERR_ARG); 80213c4: 6a3b ldr r3, [r7, #32] 80213c6: 2b00 cmp r3, #0 80213c8: d109 bne.n 80213de 80213ca: 4b1b ldr r3, [pc, #108] @ (8021438 ) 80213cc: f240 2283 movw r2, #643 @ 0x283 80213d0: 491e ldr r1, [pc, #120] @ (802144c ) 80213d2: 481b ldr r0, [pc, #108] @ (8021440 ) 80213d4: f008 fafa bl 80299cc 80213d8: f06f 030f mvn.w r3, #15 80213dc: e028 b.n 8021430 #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)) || 80213de: 68fb ldr r3, [r7, #12] 80213e0: 2b00 cmp r3, #0 80213e2: d009 beq.n 80213f8 80213e4: 68fb ldr r3, [r7, #12] 80213e6: 681b ldr r3, [r3, #0] 80213e8: 2b00 cmp r3, #0 80213ea: d005 beq.n 80213f8 ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) { 80213ec: 68fb ldr r3, [r7, #12] 80213ee: 681b ldr r3, [r3, #0] 80213f0: f003 03f0 and.w r3, r3, #240 @ 0xf0 if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || 80213f4: 2be0 cmp r3, #224 @ 0xe0 80213f6: d103 bne.n 8021400 /* if the local_ip is any or multicast * use the outgoing network interface IP address as source address */ src_ip = netif_ip_addr4(netif); 80213f8: 6a3b ldr r3, [r7, #32] 80213fa: 3304 adds r3, #4 80213fc: 617b str r3, [r7, #20] 80213fe: e00b b.n 8021418 } 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))) { 8021400: 68fb ldr r3, [r7, #12] 8021402: 681a ldr r2, [r3, #0] 8021404: 6a3b ldr r3, [r7, #32] 8021406: 3304 adds r3, #4 8021408: 681b ldr r3, [r3, #0] 802140a: 429a cmp r2, r3 802140c: d002 beq.n 8021414 /* local_ip doesn't match, drop the packet */ return ERR_RTE; 802140e: f06f 0303 mvn.w r3, #3 8021412: e00d b.n 8021430 } /* use UDP PCB local IP address as source address */ src_ip = &pcb->local_ip; 8021414: 68fb ldr r3, [r7, #12] 8021416: 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); 8021418: 887a ldrh r2, [r7, #2] 802141a: 697b ldr r3, [r7, #20] 802141c: 9301 str r3, [sp, #4] 802141e: 6a3b ldr r3, [r7, #32] 8021420: 9300 str r3, [sp, #0] 8021422: 4613 mov r3, r2 8021424: 687a ldr r2, [r7, #4] 8021426: 68b9 ldr r1, [r7, #8] 8021428: 68f8 ldr r0, [r7, #12] 802142a: f000 f811 bl 8021450 802142e: 4603 mov r3, r0 #endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ } 8021430: 4618 mov r0, r3 8021432: 3718 adds r7, #24 8021434: 46bd mov sp, r7 8021436: bd80 pop {r7, pc} 8021438: 0802faf0 .word 0x0802faf0 802143c: 0802fc64 .word 0x0802fc64 8021440: 0802fb44 .word 0x0802fb44 8021444: 0802fc80 .word 0x0802fc80 8021448: 0802fc9c .word 0x0802fc9c 802144c: 0802fcbc .word 0x0802fcbc 08021450 : /** @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) { 8021450: b580 push {r7, lr} 8021452: b08c sub sp, #48 @ 0x30 8021454: af04 add r7, sp, #16 8021456: 60f8 str r0, [r7, #12] 8021458: 60b9 str r1, [r7, #8] 802145a: 607a str r2, [r7, #4] 802145c: 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(); 802145e: f7ef f867 bl 8010530 LWIP_ERROR("udp_sendto_if_src: invalid pcb", pcb != NULL, return ERR_ARG); 8021462: 68fb ldr r3, [r7, #12] 8021464: 2b00 cmp r3, #0 8021466: d109 bne.n 802147c 8021468: 4b65 ldr r3, [pc, #404] @ (8021600 ) 802146a: f240 22d1 movw r2, #721 @ 0x2d1 802146e: 4965 ldr r1, [pc, #404] @ (8021604 ) 8021470: 4865 ldr r0, [pc, #404] @ (8021608 ) 8021472: f008 faab bl 80299cc 8021476: f06f 030f mvn.w r3, #15 802147a: e0bc b.n 80215f6 LWIP_ERROR("udp_sendto_if_src: invalid pbuf", p != NULL, return ERR_ARG); 802147c: 68bb ldr r3, [r7, #8] 802147e: 2b00 cmp r3, #0 8021480: d109 bne.n 8021496 8021482: 4b5f ldr r3, [pc, #380] @ (8021600 ) 8021484: f240 22d2 movw r2, #722 @ 0x2d2 8021488: 4960 ldr r1, [pc, #384] @ (802160c ) 802148a: 485f ldr r0, [pc, #380] @ (8021608 ) 802148c: f008 fa9e bl 80299cc 8021490: f06f 030f mvn.w r3, #15 8021494: e0af b.n 80215f6 LWIP_ERROR("udp_sendto_if_src: invalid dst_ip", dst_ip != NULL, return ERR_ARG); 8021496: 687b ldr r3, [r7, #4] 8021498: 2b00 cmp r3, #0 802149a: d109 bne.n 80214b0 802149c: 4b58 ldr r3, [pc, #352] @ (8021600 ) 802149e: f240 22d3 movw r2, #723 @ 0x2d3 80214a2: 495b ldr r1, [pc, #364] @ (8021610 ) 80214a4: 4858 ldr r0, [pc, #352] @ (8021608 ) 80214a6: f008 fa91 bl 80299cc 80214aa: f06f 030f mvn.w r3, #15 80214ae: e0a2 b.n 80215f6 LWIP_ERROR("udp_sendto_if_src: invalid src_ip", src_ip != NULL, return ERR_ARG); 80214b0: 6afb ldr r3, [r7, #44] @ 0x2c 80214b2: 2b00 cmp r3, #0 80214b4: d109 bne.n 80214ca 80214b6: 4b52 ldr r3, [pc, #328] @ (8021600 ) 80214b8: f44f 7235 mov.w r2, #724 @ 0x2d4 80214bc: 4955 ldr r1, [pc, #340] @ (8021614 ) 80214be: 4852 ldr r0, [pc, #328] @ (8021608 ) 80214c0: f008 fa84 bl 80299cc 80214c4: f06f 030f mvn.w r3, #15 80214c8: e095 b.n 80215f6 LWIP_ERROR("udp_sendto_if_src: invalid netif", netif != NULL, return ERR_ARG); 80214ca: 6abb ldr r3, [r7, #40] @ 0x28 80214cc: 2b00 cmp r3, #0 80214ce: d109 bne.n 80214e4 80214d0: 4b4b ldr r3, [pc, #300] @ (8021600 ) 80214d2: f240 22d5 movw r2, #725 @ 0x2d5 80214d6: 4950 ldr r1, [pc, #320] @ (8021618 ) 80214d8: 484b ldr r0, [pc, #300] @ (8021608 ) 80214da: f008 fa77 bl 80299cc 80214de: f06f 030f mvn.w r3, #15 80214e2: e088 b.n 80215f6 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) { 80214e4: 68fb ldr r3, [r7, #12] 80214e6: 8a5b ldrh r3, [r3, #18] 80214e8: 2b00 cmp r3, #0 80214ea: d10f bne.n 802150c 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); 80214ec: 68f9 ldr r1, [r7, #12] 80214ee: 68fb ldr r3, [r7, #12] 80214f0: 8a5b ldrh r3, [r3, #18] 80214f2: 461a mov r2, r3 80214f4: 68f8 ldr r0, [r7, #12] 80214f6: f000 f893 bl 8021620 80214fa: 4603 mov r3, r0 80214fc: 76fb strb r3, [r7, #27] if (err != ERR_OK) { 80214fe: f997 301b ldrsb.w r3, [r7, #27] 8021502: 2b00 cmp r3, #0 8021504: d002 beq.n 802150c LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: forced port bind failed\n")); return err; 8021506: f997 301b ldrsb.w r3, [r7, #27] 802150a: e074 b.n 80215f6 } } /* packet too large to add a UDP header without causing an overflow? */ if ((u16_t)(p->tot_len + UDP_HLEN) < p->tot_len) { 802150c: 68bb ldr r3, [r7, #8] 802150e: 891b ldrh r3, [r3, #8] 8021510: f64f 72f7 movw r2, #65527 @ 0xfff7 8021514: 4293 cmp r3, r2 8021516: d902 bls.n 802151e return ERR_MEM; 8021518: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802151c: e06b b.n 80215f6 } /* not enough space to add an UDP header to first pbuf in given p chain? */ if (pbuf_add_header(p, UDP_HLEN)) { 802151e: 2108 movs r1, #8 8021520: 68b8 ldr r0, [r7, #8] 8021522: f7f8 ff13 bl 801a34c 8021526: 4603 mov r3, r0 8021528: 2b00 cmp r3, #0 802152a: d015 beq.n 8021558 /* allocate header in a separate new pbuf */ q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM); 802152c: f44f 7220 mov.w r2, #640 @ 0x280 8021530: 2108 movs r1, #8 8021532: 2022 movs r0, #34 @ 0x22 8021534: f7f8 fcbc bl 8019eb0 8021538: 61f8 str r0, [r7, #28] /* new header pbuf could not be allocated? */ if (q == NULL) { 802153a: 69fb ldr r3, [r7, #28] 802153c: 2b00 cmp r3, #0 802153e: d102 bne.n 8021546 LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: could not allocate header\n")); return ERR_MEM; 8021540: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8021544: e057 b.n 80215f6 } if (p->tot_len != 0) { 8021546: 68bb ldr r3, [r7, #8] 8021548: 891b ldrh r3, [r3, #8] 802154a: 2b00 cmp r3, #0 802154c: d006 beq.n 802155c /* chain header q in front of given pbuf p (only if p contains data) */ pbuf_chain(q, p); 802154e: 68b9 ldr r1, [r7, #8] 8021550: 69f8 ldr r0, [r7, #28] 8021552: f7f9 f8e7 bl 801a724 8021556: e001 b.n 802155c 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; 8021558: 68bb ldr r3, [r7, #8] 802155a: 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", 802155c: 69fb ldr r3, [r7, #28] 802155e: 895b ldrh r3, [r3, #10] 8021560: 2b07 cmp r3, #7 8021562: d806 bhi.n 8021572 8021564: 4b26 ldr r3, [pc, #152] @ (8021600 ) 8021566: f240 320d movw r2, #781 @ 0x30d 802156a: 492c ldr r1, [pc, #176] @ (802161c ) 802156c: 4826 ldr r0, [pc, #152] @ (8021608 ) 802156e: f008 fa2d bl 80299cc (q->len >= sizeof(struct udp_hdr))); /* q now represents the packet to be sent */ udphdr = (struct udp_hdr *)q->payload; 8021572: 69fb ldr r3, [r7, #28] 8021574: 685b ldr r3, [r3, #4] 8021576: 617b str r3, [r7, #20] udphdr->src = lwip_htons(pcb->local_port); 8021578: 68fb ldr r3, [r7, #12] 802157a: 8a5b ldrh r3, [r3, #18] 802157c: 4618 mov r0, r3 802157e: f7f7 facb bl 8018b18 8021582: 4603 mov r3, r0 8021584: 461a mov r2, r3 8021586: 697b ldr r3, [r7, #20] 8021588: 801a strh r2, [r3, #0] udphdr->dest = lwip_htons(dst_port); 802158a: 887b ldrh r3, [r7, #2] 802158c: 4618 mov r0, r3 802158e: f7f7 fac3 bl 8018b18 8021592: 4603 mov r3, r0 8021594: 461a mov r2, r3 8021596: 697b ldr r3, [r7, #20] 8021598: 805a strh r2, [r3, #2] /* in UDP, 0 checksum means 'no checksum' */ udphdr->chksum = 0x0000; 802159a: 697b ldr r3, [r7, #20] 802159c: 2200 movs r2, #0 802159e: 719a strb r2, [r3, #6] 80215a0: 2200 movs r2, #0 80215a2: 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); 80215a4: 69fb ldr r3, [r7, #28] 80215a6: 891b ldrh r3, [r3, #8] 80215a8: 4618 mov r0, r3 80215aa: f7f7 fab5 bl 8018b18 80215ae: 4603 mov r3, r0 80215b0: 461a mov r2, r3 80215b2: 697b ldr r3, [r7, #20] 80215b4: 809a strh r2, [r3, #4] } udphdr->chksum = udpchksum; } } #endif /* CHECKSUM_GEN_UDP */ ip_proto = IP_PROTO_UDP; 80215b6: 2311 movs r3, #17 80215b8: 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; 80215ba: 68fb ldr r3, [r7, #12] 80215bc: 7adb ldrb r3, [r3, #11] 80215be: 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); 80215c0: 68fb ldr r3, [r7, #12] 80215c2: 7a9b ldrb r3, [r3, #10] 80215c4: 7cb9 ldrb r1, [r7, #18] 80215c6: 6aba ldr r2, [r7, #40] @ 0x28 80215c8: 9202 str r2, [sp, #8] 80215ca: 7cfa ldrb r2, [r7, #19] 80215cc: 9201 str r2, [sp, #4] 80215ce: 9300 str r3, [sp, #0] 80215d0: 460b mov r3, r1 80215d2: 687a ldr r2, [r7, #4] 80215d4: 6af9 ldr r1, [r7, #44] @ 0x2c 80215d6: 69f8 ldr r0, [r7, #28] 80215d8: f003 fbf2 bl 8024dc0 80215dc: 4603 mov r3, r0 80215de: 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) { 80215e0: 69fa ldr r2, [r7, #28] 80215e2: 68bb ldr r3, [r7, #8] 80215e4: 429a cmp r2, r3 80215e6: d004 beq.n 80215f2 /* free the header pbuf */ pbuf_free(q); 80215e8: 69f8 ldr r0, [r7, #28] 80215ea: f7f8 ff77 bl 801a4dc q = NULL; 80215ee: 2300 movs r3, #0 80215f0: 61fb str r3, [r7, #28] /* p is still referenced by the caller, and will live on */ } UDP_STATS_INC(udp.xmit); return err; 80215f2: f997 301b ldrsb.w r3, [r7, #27] } 80215f6: 4618 mov r0, r3 80215f8: 3720 adds r7, #32 80215fa: 46bd mov sp, r7 80215fc: bd80 pop {r7, pc} 80215fe: bf00 nop 8021600: 0802faf0 .word 0x0802faf0 8021604: 0802fcdc .word 0x0802fcdc 8021608: 0802fb44 .word 0x0802fb44 802160c: 0802fcfc .word 0x0802fcfc 8021610: 0802fd1c .word 0x0802fd1c 8021614: 0802fd40 .word 0x0802fd40 8021618: 0802fd64 .word 0x0802fd64 802161c: 0802fd88 .word 0x0802fd88 08021620 : * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) { 8021620: b580 push {r7, lr} 8021622: b086 sub sp, #24 8021624: af00 add r7, sp, #0 8021626: 60f8 str r0, [r7, #12] 8021628: 60b9 str r1, [r7, #8] 802162a: 4613 mov r3, r2 802162c: 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(); 802162e: f7ee ff7f bl 8010530 #if LWIP_IPV4 /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ if (ipaddr == NULL) { 8021632: 68bb ldr r3, [r7, #8] 8021634: 2b00 cmp r3, #0 8021636: d101 bne.n 802163c ipaddr = IP4_ADDR_ANY; 8021638: 4b39 ldr r3, [pc, #228] @ (8021720 ) 802163a: 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); 802163c: 68fb ldr r3, [r7, #12] 802163e: 2b00 cmp r3, #0 8021640: d109 bne.n 8021656 8021642: 4b38 ldr r3, [pc, #224] @ (8021724 ) 8021644: f240 32b7 movw r2, #951 @ 0x3b7 8021648: 4937 ldr r1, [pc, #220] @ (8021728 ) 802164a: 4838 ldr r0, [pc, #224] @ (802172c ) 802164c: f008 f9be bl 80299cc 8021650: f06f 030f mvn.w r3, #15 8021654: e060 b.n 8021718 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; 8021656: 2300 movs r3, #0 8021658: 74fb strb r3, [r7, #19] /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 802165a: 4b35 ldr r3, [pc, #212] @ (8021730 ) 802165c: 681b ldr r3, [r3, #0] 802165e: 617b str r3, [r7, #20] 8021660: e009 b.n 8021676 /* is this UDP PCB already on active list? */ if (pcb == ipcb) { 8021662: 68fa ldr r2, [r7, #12] 8021664: 697b ldr r3, [r7, #20] 8021666: 429a cmp r2, r3 8021668: d102 bne.n 8021670 rebind = 1; 802166a: 2301 movs r3, #1 802166c: 74fb strb r3, [r7, #19] break; 802166e: e005 b.n 802167c for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 8021670: 697b ldr r3, [r7, #20] 8021672: 68db ldr r3, [r3, #12] 8021674: 617b str r3, [r7, #20] 8021676: 697b ldr r3, [r7, #20] 8021678: 2b00 cmp r3, #0 802167a: d1f2 bne.n 8021662 ipaddr = &zoned_ipaddr; } #endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ /* no port specified? */ if (port == 0) { 802167c: 88fb ldrh r3, [r7, #6] 802167e: 2b00 cmp r3, #0 8021680: d109 bne.n 8021696 port = udp_new_port(); 8021682: f7ff fc2f bl 8020ee4 8021686: 4603 mov r3, r0 8021688: 80fb strh r3, [r7, #6] if (port == 0) { 802168a: 88fb ldrh r3, [r7, #6] 802168c: 2b00 cmp r3, #0 802168e: d12c bne.n 80216ea /* no more ports available in local range */ LWIP_DEBUGF(UDP_DEBUG, ("udp_bind: out of free UDP ports\n")); return ERR_USE; 8021690: f06f 0307 mvn.w r3, #7 8021694: e040 b.n 8021718 } } else { for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 8021696: 4b26 ldr r3, [pc, #152] @ (8021730 ) 8021698: 681b ldr r3, [r3, #0] 802169a: 617b str r3, [r7, #20] 802169c: e022 b.n 80216e4 if (pcb != ipcb) { 802169e: 68fa ldr r2, [r7, #12] 80216a0: 697b ldr r3, [r7, #20] 80216a2: 429a cmp r2, r3 80216a4: d01b beq.n 80216de 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) && 80216a6: 697b ldr r3, [r7, #20] 80216a8: 8a5b ldrh r3, [r3, #18] 80216aa: 88fa ldrh r2, [r7, #6] 80216ac: 429a cmp r2, r3 80216ae: d116 bne.n 80216de /* IP address matches or any IP used? */ (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) || 80216b0: 697b ldr r3, [r7, #20] 80216b2: 681a ldr r2, [r3, #0] 80216b4: 68bb ldr r3, [r7, #8] 80216b6: 681b ldr r3, [r3, #0] if ((ipcb->local_port == port) && 80216b8: 429a cmp r2, r3 80216ba: d00d beq.n 80216d8 (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) || 80216bc: 68bb ldr r3, [r7, #8] 80216be: 2b00 cmp r3, #0 80216c0: d00a beq.n 80216d8 80216c2: 68bb ldr r3, [r7, #8] 80216c4: 681b ldr r3, [r3, #0] 80216c6: 2b00 cmp r3, #0 80216c8: d006 beq.n 80216d8 ip_addr_isany(&ipcb->local_ip))) { 80216ca: 697b ldr r3, [r7, #20] (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) || 80216cc: 2b00 cmp r3, #0 80216ce: d003 beq.n 80216d8 ip_addr_isany(&ipcb->local_ip))) { 80216d0: 697b ldr r3, [r7, #20] 80216d2: 681b ldr r3, [r3, #0] 80216d4: 2b00 cmp r3, #0 80216d6: d102 bne.n 80216de /* 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; 80216d8: f06f 0307 mvn.w r3, #7 80216dc: e01c b.n 8021718 for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 80216de: 697b ldr r3, [r7, #20] 80216e0: 68db ldr r3, [r3, #12] 80216e2: 617b str r3, [r7, #20] 80216e4: 697b ldr r3, [r7, #20] 80216e6: 2b00 cmp r3, #0 80216e8: d1d9 bne.n 802169e } } } } ip_addr_set_ipaddr(&pcb->local_ip, ipaddr); 80216ea: 68bb ldr r3, [r7, #8] 80216ec: 2b00 cmp r3, #0 80216ee: d002 beq.n 80216f6 80216f0: 68bb ldr r3, [r7, #8] 80216f2: 681b ldr r3, [r3, #0] 80216f4: e000 b.n 80216f8 80216f6: 2300 movs r3, #0 80216f8: 68fa ldr r2, [r7, #12] 80216fa: 6013 str r3, [r2, #0] pcb->local_port = port; 80216fc: 68fb ldr r3, [r7, #12] 80216fe: 88fa ldrh r2, [r7, #6] 8021700: 825a strh r2, [r3, #18] mib2_udp_bind(pcb); /* pcb not active yet? */ if (rebind == 0) { 8021702: 7cfb ldrb r3, [r7, #19] 8021704: 2b00 cmp r3, #0 8021706: d106 bne.n 8021716 /* place the PCB on the active list if not already there */ pcb->next = udp_pcbs; 8021708: 4b09 ldr r3, [pc, #36] @ (8021730 ) 802170a: 681a ldr r2, [r3, #0] 802170c: 68fb ldr r3, [r7, #12] 802170e: 60da str r2, [r3, #12] udp_pcbs = pcb; 8021710: 4a07 ldr r2, [pc, #28] @ (8021730 ) 8021712: 68fb ldr r3, [r7, #12] 8021714: 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; 8021716: 2300 movs r3, #0 } 8021718: 4618 mov r0, r3 802171a: 3718 adds r7, #24 802171c: 46bd mov sp, r7 802171e: bd80 pop {r7, pc} 8021720: 08030c10 .word 0x08030c10 8021724: 0802faf0 .word 0x0802faf0 8021728: 0802fdb8 .word 0x0802fdb8 802172c: 0802fb44 .word 0x0802fb44 8021730: 2402aee8 .word 0x2402aee8 08021734 : * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) { 8021734: b580 push {r7, lr} 8021736: b086 sub sp, #24 8021738: af00 add r7, sp, #0 802173a: 60f8 str r0, [r7, #12] 802173c: 60b9 str r1, [r7, #8] 802173e: 4613 mov r3, r2 8021740: 80fb strh r3, [r7, #6] struct udp_pcb *ipcb; LWIP_ASSERT_CORE_LOCKED(); 8021742: f7ee fef5 bl 8010530 LWIP_ERROR("udp_connect: invalid pcb", pcb != NULL, return ERR_ARG); 8021746: 68fb ldr r3, [r7, #12] 8021748: 2b00 cmp r3, #0 802174a: d109 bne.n 8021760 802174c: 4b2c ldr r3, [pc, #176] @ (8021800 ) 802174e: f240 4235 movw r2, #1077 @ 0x435 8021752: 492c ldr r1, [pc, #176] @ (8021804 ) 8021754: 482c ldr r0, [pc, #176] @ (8021808 ) 8021756: f008 f939 bl 80299cc 802175a: f06f 030f mvn.w r3, #15 802175e: e04b b.n 80217f8 LWIP_ERROR("udp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG); 8021760: 68bb ldr r3, [r7, #8] 8021762: 2b00 cmp r3, #0 8021764: d109 bne.n 802177a 8021766: 4b26 ldr r3, [pc, #152] @ (8021800 ) 8021768: f240 4236 movw r2, #1078 @ 0x436 802176c: 4927 ldr r1, [pc, #156] @ (802180c ) 802176e: 4826 ldr r0, [pc, #152] @ (8021808 ) 8021770: f008 f92c bl 80299cc 8021774: f06f 030f mvn.w r3, #15 8021778: e03e b.n 80217f8 if (pcb->local_port == 0) { 802177a: 68fb ldr r3, [r7, #12] 802177c: 8a5b ldrh r3, [r3, #18] 802177e: 2b00 cmp r3, #0 8021780: d10f bne.n 80217a2 err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); 8021782: 68f9 ldr r1, [r7, #12] 8021784: 68fb ldr r3, [r7, #12] 8021786: 8a5b ldrh r3, [r3, #18] 8021788: 461a mov r2, r3 802178a: 68f8 ldr r0, [r7, #12] 802178c: f7ff ff48 bl 8021620 8021790: 4603 mov r3, r0 8021792: 75fb strb r3, [r7, #23] if (err != ERR_OK) { 8021794: f997 3017 ldrsb.w r3, [r7, #23] 8021798: 2b00 cmp r3, #0 802179a: d002 beq.n 80217a2 return err; 802179c: f997 3017 ldrsb.w r3, [r7, #23] 80217a0: e02a b.n 80217f8 } } ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr); 80217a2: 68bb ldr r3, [r7, #8] 80217a4: 2b00 cmp r3, #0 80217a6: d002 beq.n 80217ae 80217a8: 68bb ldr r3, [r7, #8] 80217aa: 681b ldr r3, [r3, #0] 80217ac: e000 b.n 80217b0 80217ae: 2300 movs r3, #0 80217b0: 68fa ldr r2, [r7, #12] 80217b2: 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; 80217b4: 68fb ldr r3, [r7, #12] 80217b6: 88fa ldrh r2, [r7, #6] 80217b8: 829a strh r2, [r3, #20] pcb->flags |= UDP_FLAGS_CONNECTED; 80217ba: 68fb ldr r3, [r7, #12] 80217bc: 7c1b ldrb r3, [r3, #16] 80217be: f043 0304 orr.w r3, r3, #4 80217c2: b2da uxtb r2, r3 80217c4: 68fb ldr r3, [r7, #12] 80217c6: 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) { 80217c8: 4b11 ldr r3, [pc, #68] @ (8021810 ) 80217ca: 681b ldr r3, [r3, #0] 80217cc: 613b str r3, [r7, #16] 80217ce: e008 b.n 80217e2 if (pcb == ipcb) { 80217d0: 68fa ldr r2, [r7, #12] 80217d2: 693b ldr r3, [r7, #16] 80217d4: 429a cmp r2, r3 80217d6: d101 bne.n 80217dc /* already on the list, just return */ return ERR_OK; 80217d8: 2300 movs r3, #0 80217da: e00d b.n 80217f8 for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 80217dc: 693b ldr r3, [r7, #16] 80217de: 68db ldr r3, [r3, #12] 80217e0: 613b str r3, [r7, #16] 80217e2: 693b ldr r3, [r7, #16] 80217e4: 2b00 cmp r3, #0 80217e6: d1f3 bne.n 80217d0 } } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; 80217e8: 4b09 ldr r3, [pc, #36] @ (8021810 ) 80217ea: 681a ldr r2, [r3, #0] 80217ec: 68fb ldr r3, [r7, #12] 80217ee: 60da str r2, [r3, #12] udp_pcbs = pcb; 80217f0: 4a07 ldr r2, [pc, #28] @ (8021810 ) 80217f2: 68fb ldr r3, [r7, #12] 80217f4: 6013 str r3, [r2, #0] return ERR_OK; 80217f6: 2300 movs r3, #0 } 80217f8: 4618 mov r0, r3 80217fa: 3718 adds r7, #24 80217fc: 46bd mov sp, r7 80217fe: bd80 pop {r7, pc} 8021800: 0802faf0 .word 0x0802faf0 8021804: 0802fdd0 .word 0x0802fdd0 8021808: 0802fb44 .word 0x0802fb44 802180c: 0802fdec .word 0x0802fdec 8021810: 2402aee8 .word 0x2402aee8 08021814 : * * @param pcb the udp pcb to disconnect. */ void udp_disconnect(struct udp_pcb *pcb) { 8021814: b580 push {r7, lr} 8021816: b082 sub sp, #8 8021818: af00 add r7, sp, #0 802181a: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 802181c: f7ee fe88 bl 8010530 LWIP_ERROR("udp_disconnect: invalid pcb", pcb != NULL, return); 8021820: 687b ldr r3, [r7, #4] 8021822: 2b00 cmp r3, #0 8021824: d107 bne.n 8021836 8021826: 4b0d ldr r3, [pc, #52] @ (802185c ) 8021828: f240 426a movw r2, #1130 @ 0x46a 802182c: 490c ldr r1, [pc, #48] @ (8021860 ) 802182e: 480d ldr r0, [pc, #52] @ (8021864 ) 8021830: f008 f8cc bl 80299cc 8021834: e00f b.n 8021856 #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); 8021836: 687b ldr r3, [r7, #4] 8021838: 2200 movs r2, #0 802183a: 605a str r2, [r3, #4] #if LWIP_IPV4 && LWIP_IPV6 } #endif pcb->remote_port = 0; 802183c: 687b ldr r3, [r7, #4] 802183e: 2200 movs r2, #0 8021840: 829a strh r2, [r3, #20] pcb->netif_idx = NETIF_NO_INDEX; 8021842: 687b ldr r3, [r7, #4] 8021844: 2200 movs r2, #0 8021846: 721a strb r2, [r3, #8] /* mark PCB as unconnected */ udp_clear_flags(pcb, UDP_FLAGS_CONNECTED); 8021848: 687b ldr r3, [r7, #4] 802184a: 7c1b ldrb r3, [r3, #16] 802184c: f023 0304 bic.w r3, r3, #4 8021850: b2da uxtb r2, r3 8021852: 687b ldr r3, [r7, #4] 8021854: 741a strb r2, [r3, #16] } 8021856: 3708 adds r7, #8 8021858: 46bd mov sp, r7 802185a: bd80 pop {r7, pc} 802185c: 0802faf0 .word 0x0802faf0 8021860: 0802fe08 .word 0x0802fe08 8021864: 0802fb44 .word 0x0802fb44 08021868 : * @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) { 8021868: b580 push {r7, lr} 802186a: b084 sub sp, #16 802186c: af00 add r7, sp, #0 802186e: 60f8 str r0, [r7, #12] 8021870: 60b9 str r1, [r7, #8] 8021872: 607a str r2, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 8021874: f7ee fe5c bl 8010530 LWIP_ERROR("udp_recv: invalid pcb", pcb != NULL, return); 8021878: 68fb ldr r3, [r7, #12] 802187a: 2b00 cmp r3, #0 802187c: d107 bne.n 802188e 802187e: 4b08 ldr r3, [pc, #32] @ (80218a0 ) 8021880: f240 428a movw r2, #1162 @ 0x48a 8021884: 4907 ldr r1, [pc, #28] @ (80218a4 ) 8021886: 4808 ldr r0, [pc, #32] @ (80218a8 ) 8021888: f008 f8a0 bl 80299cc 802188c: e005 b.n 802189a /* remember recv() callback and user data */ pcb->recv = recv; 802188e: 68fb ldr r3, [r7, #12] 8021890: 68ba ldr r2, [r7, #8] 8021892: 619a str r2, [r3, #24] pcb->recv_arg = recv_arg; 8021894: 68fb ldr r3, [r7, #12] 8021896: 687a ldr r2, [r7, #4] 8021898: 61da str r2, [r3, #28] } 802189a: 3710 adds r7, #16 802189c: 46bd mov sp, r7 802189e: bd80 pop {r7, pc} 80218a0: 0802faf0 .word 0x0802faf0 80218a4: 0802fe24 .word 0x0802fe24 80218a8: 0802fb44 .word 0x0802fb44 080218ac : * * @see udp_new() */ void udp_remove(struct udp_pcb *pcb) { 80218ac: b580 push {r7, lr} 80218ae: b084 sub sp, #16 80218b0: af00 add r7, sp, #0 80218b2: 6078 str r0, [r7, #4] struct udp_pcb *pcb2; LWIP_ASSERT_CORE_LOCKED(); 80218b4: f7ee fe3c bl 8010530 LWIP_ERROR("udp_remove: invalid pcb", pcb != NULL, return); 80218b8: 687b ldr r3, [r7, #4] 80218ba: 2b00 cmp r3, #0 80218bc: d107 bne.n 80218ce 80218be: 4b19 ldr r3, [pc, #100] @ (8021924 ) 80218c0: f240 42a1 movw r2, #1185 @ 0x4a1 80218c4: 4918 ldr r1, [pc, #96] @ (8021928 ) 80218c6: 4819 ldr r0, [pc, #100] @ (802192c ) 80218c8: f008 f880 bl 80299cc 80218cc: e026 b.n 802191c mib2_udp_unbind(pcb); /* pcb to be removed is first in list? */ if (udp_pcbs == pcb) { 80218ce: 4b18 ldr r3, [pc, #96] @ (8021930 ) 80218d0: 681b ldr r3, [r3, #0] 80218d2: 687a ldr r2, [r7, #4] 80218d4: 429a cmp r2, r3 80218d6: d105 bne.n 80218e4 /* make list start at 2nd pcb */ udp_pcbs = udp_pcbs->next; 80218d8: 4b15 ldr r3, [pc, #84] @ (8021930 ) 80218da: 681b ldr r3, [r3, #0] 80218dc: 68db ldr r3, [r3, #12] 80218de: 4a14 ldr r2, [pc, #80] @ (8021930 ) 80218e0: 6013 str r3, [r2, #0] 80218e2: e017 b.n 8021914 /* pcb not 1st in list */ } else { for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { 80218e4: 4b12 ldr r3, [pc, #72] @ (8021930 ) 80218e6: 681b ldr r3, [r3, #0] 80218e8: 60fb str r3, [r7, #12] 80218ea: e010 b.n 802190e /* find pcb in udp_pcbs list */ if (pcb2->next != NULL && pcb2->next == pcb) { 80218ec: 68fb ldr r3, [r7, #12] 80218ee: 68db ldr r3, [r3, #12] 80218f0: 2b00 cmp r3, #0 80218f2: d009 beq.n 8021908 80218f4: 68fb ldr r3, [r7, #12] 80218f6: 68db ldr r3, [r3, #12] 80218f8: 687a ldr r2, [r7, #4] 80218fa: 429a cmp r2, r3 80218fc: d104 bne.n 8021908 /* remove pcb from list */ pcb2->next = pcb->next; 80218fe: 687b ldr r3, [r7, #4] 8021900: 68da ldr r2, [r3, #12] 8021902: 68fb ldr r3, [r7, #12] 8021904: 60da str r2, [r3, #12] break; 8021906: e005 b.n 8021914 for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { 8021908: 68fb ldr r3, [r7, #12] 802190a: 68db ldr r3, [r3, #12] 802190c: 60fb str r3, [r7, #12] 802190e: 68fb ldr r3, [r7, #12] 8021910: 2b00 cmp r3, #0 8021912: d1eb bne.n 80218ec } } } memp_free(MEMP_UDP_PCB, pcb); 8021914: 6879 ldr r1, [r7, #4] 8021916: 2000 movs r0, #0 8021918: f7f7 fef2 bl 8019700 } 802191c: 3710 adds r7, #16 802191e: 46bd mov sp, r7 8021920: bd80 pop {r7, pc} 8021922: bf00 nop 8021924: 0802faf0 .word 0x0802faf0 8021928: 0802fe3c .word 0x0802fe3c 802192c: 0802fb44 .word 0x0802fb44 8021930: 2402aee8 .word 0x2402aee8 08021934 : * * @see udp_remove() */ struct udp_pcb * udp_new(void) { 8021934: b580 push {r7, lr} 8021936: b082 sub sp, #8 8021938: af00 add r7, sp, #0 struct udp_pcb *pcb; LWIP_ASSERT_CORE_LOCKED(); 802193a: f7ee fdf9 bl 8010530 pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB); 802193e: 2000 movs r0, #0 8021940: f7f7 fe68 bl 8019614 8021944: 6078 str r0, [r7, #4] /* could allocate UDP PCB? */ if (pcb != NULL) { 8021946: 687b ldr r3, [r7, #4] 8021948: 2b00 cmp r3, #0 802194a: d007 beq.n 802195c /* 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)); 802194c: 2220 movs r2, #32 802194e: 2100 movs r1, #0 8021950: 6878 ldr r0, [r7, #4] 8021952: f008 f9cd bl 8029cf0 pcb->ttl = UDP_TTL; 8021956: 687b ldr r3, [r7, #4] 8021958: 22ff movs r2, #255 @ 0xff 802195a: 72da strb r2, [r3, #11] #if LWIP_MULTICAST_TX_OPTIONS udp_set_multicast_ttl(pcb, UDP_TTL); #endif /* LWIP_MULTICAST_TX_OPTIONS */ } return pcb; 802195c: 687b ldr r3, [r7, #4] } 802195e: 4618 mov r0, r3 8021960: 3708 adds r7, #8 8021962: 46bd mov sp, r7 8021964: bd80 pop {r7, pc} 08021966 : * * @see udp_remove() */ struct udp_pcb * udp_new_ip_type(u8_t type) { 8021966: b580 push {r7, lr} 8021968: b084 sub sp, #16 802196a: af00 add r7, sp, #0 802196c: 4603 mov r3, r0 802196e: 71fb strb r3, [r7, #7] struct udp_pcb *pcb; LWIP_ASSERT_CORE_LOCKED(); 8021970: f7ee fdde bl 8010530 pcb = udp_new(); 8021974: f7ff ffde bl 8021934 8021978: 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; 802197a: 68fb ldr r3, [r7, #12] } 802197c: 4618 mov r0, r3 802197e: 3710 adds r7, #16 8021980: 46bd mov sp, r7 8021982: bd80 pop {r7, pc} 08021984 : * * @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) { 8021984: b480 push {r7} 8021986: b085 sub sp, #20 8021988: af00 add r7, sp, #0 802198a: 6078 str r0, [r7, #4] 802198c: 6039 str r1, [r7, #0] struct udp_pcb *upcb; if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) { 802198e: 687b ldr r3, [r7, #4] 8021990: 2b00 cmp r3, #0 8021992: d01e beq.n 80219d2 8021994: 687b ldr r3, [r7, #4] 8021996: 681b ldr r3, [r3, #0] 8021998: 2b00 cmp r3, #0 802199a: d01a beq.n 80219d2 802199c: 683b ldr r3, [r7, #0] 802199e: 2b00 cmp r3, #0 80219a0: d017 beq.n 80219d2 80219a2: 683b ldr r3, [r7, #0] 80219a4: 681b ldr r3, [r3, #0] 80219a6: 2b00 cmp r3, #0 80219a8: d013 beq.n 80219d2 for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { 80219aa: 4b0d ldr r3, [pc, #52] @ (80219e0 ) 80219ac: 681b ldr r3, [r3, #0] 80219ae: 60fb str r3, [r7, #12] 80219b0: e00c b.n 80219cc /* PCB bound to current local interface address? */ if (ip_addr_cmp(&upcb->local_ip, old_addr)) { 80219b2: 68fb ldr r3, [r7, #12] 80219b4: 681a ldr r2, [r3, #0] 80219b6: 687b ldr r3, [r7, #4] 80219b8: 681b ldr r3, [r3, #0] 80219ba: 429a cmp r2, r3 80219bc: d103 bne.n 80219c6 /* 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); 80219be: 683b ldr r3, [r7, #0] 80219c0: 681a ldr r2, [r3, #0] 80219c2: 68fb ldr r3, [r7, #12] 80219c4: 601a str r2, [r3, #0] for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { 80219c6: 68fb ldr r3, [r7, #12] 80219c8: 68db ldr r3, [r3, #12] 80219ca: 60fb str r3, [r7, #12] 80219cc: 68fb ldr r3, [r7, #12] 80219ce: 2b00 cmp r3, #0 80219d0: d1ef bne.n 80219b2 } } } } 80219d2: bf00 nop 80219d4: 3714 adds r7, #20 80219d6: 46bd mov sp, r7 80219d8: f85d 7b04 ldr.w r7, [sp], #4 80219dc: 4770 bx lr 80219de: bf00 nop 80219e0: 2402aee8 .word 0x2402aee8 080219e4 : 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) { 80219e4: b580 push {r7, lr} 80219e6: af00 add r7, sp, #0 if (dhcp_pcb_refcount == 0) { 80219e8: 4b20 ldr r3, [pc, #128] @ (8021a6c ) 80219ea: 781b ldrb r3, [r3, #0] 80219ec: 2b00 cmp r3, #0 80219ee: d133 bne.n 8021a58 LWIP_ASSERT("dhcp_inc_pcb_refcount(): memory leak", dhcp_pcb == NULL); 80219f0: 4b1f ldr r3, [pc, #124] @ (8021a70 ) 80219f2: 681b ldr r3, [r3, #0] 80219f4: 2b00 cmp r3, #0 80219f6: d005 beq.n 8021a04 80219f8: 4b1e ldr r3, [pc, #120] @ (8021a74 ) 80219fa: 22e5 movs r2, #229 @ 0xe5 80219fc: 491e ldr r1, [pc, #120] @ (8021a78 ) 80219fe: 481f ldr r0, [pc, #124] @ (8021a7c ) 8021a00: f007 ffe4 bl 80299cc /* allocate UDP PCB */ dhcp_pcb = udp_new(); 8021a04: f7ff ff96 bl 8021934 8021a08: 4603 mov r3, r0 8021a0a: 4a19 ldr r2, [pc, #100] @ (8021a70 ) 8021a0c: 6013 str r3, [r2, #0] if (dhcp_pcb == NULL) { 8021a0e: 4b18 ldr r3, [pc, #96] @ (8021a70 ) 8021a10: 681b ldr r3, [r3, #0] 8021a12: 2b00 cmp r3, #0 8021a14: d102 bne.n 8021a1c return ERR_MEM; 8021a16: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8021a1a: e024 b.n 8021a66 } ip_set_option(dhcp_pcb, SOF_BROADCAST); 8021a1c: 4b14 ldr r3, [pc, #80] @ (8021a70 ) 8021a1e: 681b ldr r3, [r3, #0] 8021a20: 7a5a ldrb r2, [r3, #9] 8021a22: 4b13 ldr r3, [pc, #76] @ (8021a70 ) 8021a24: 681b ldr r3, [r3, #0] 8021a26: f042 0220 orr.w r2, r2, #32 8021a2a: b2d2 uxtb r2, r2 8021a2c: 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); 8021a2e: 4b10 ldr r3, [pc, #64] @ (8021a70 ) 8021a30: 681b ldr r3, [r3, #0] 8021a32: 2244 movs r2, #68 @ 0x44 8021a34: 4912 ldr r1, [pc, #72] @ (8021a80 ) 8021a36: 4618 mov r0, r3 8021a38: f7ff fdf2 bl 8021620 udp_connect(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_SERVER); 8021a3c: 4b0c ldr r3, [pc, #48] @ (8021a70 ) 8021a3e: 681b ldr r3, [r3, #0] 8021a40: 2243 movs r2, #67 @ 0x43 8021a42: 490f ldr r1, [pc, #60] @ (8021a80 ) 8021a44: 4618 mov r0, r3 8021a46: f7ff fe75 bl 8021734 udp_recv(dhcp_pcb, dhcp_recv, NULL); 8021a4a: 4b09 ldr r3, [pc, #36] @ (8021a70 ) 8021a4c: 681b ldr r3, [r3, #0] 8021a4e: 2200 movs r2, #0 8021a50: 490c ldr r1, [pc, #48] @ (8021a84 ) 8021a52: 4618 mov r0, r3 8021a54: f7ff ff08 bl 8021868 } dhcp_pcb_refcount++; 8021a58: 4b04 ldr r3, [pc, #16] @ (8021a6c ) 8021a5a: 781b ldrb r3, [r3, #0] 8021a5c: 3301 adds r3, #1 8021a5e: b2da uxtb r2, r3 8021a60: 4b02 ldr r3, [pc, #8] @ (8021a6c ) 8021a62: 701a strb r2, [r3, #0] return ERR_OK; 8021a64: 2300 movs r3, #0 } 8021a66: 4618 mov r0, r3 8021a68: bd80 pop {r7, pc} 8021a6a: bf00 nop 8021a6c: 2402af18 .word 0x2402af18 8021a70: 2402af14 .word 0x2402af14 8021a74: 0802fe54 .word 0x0802fe54 8021a78: 0802fe8c .word 0x0802fe8c 8021a7c: 0802feb4 .word 0x0802feb4 8021a80: 08030c10 .word 0x08030c10 8021a84: 08023355 .word 0x08023355 08021a88 : /** Free DHCP PCB if the last netif stops using it */ static void dhcp_dec_pcb_refcount(void) { 8021a88: b580 push {r7, lr} 8021a8a: af00 add r7, sp, #0 LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0)); 8021a8c: 4b0e ldr r3, [pc, #56] @ (8021ac8 ) 8021a8e: 781b ldrb r3, [r3, #0] 8021a90: 2b00 cmp r3, #0 8021a92: d105 bne.n 8021aa0 8021a94: 4b0d ldr r3, [pc, #52] @ (8021acc ) 8021a96: 22ff movs r2, #255 @ 0xff 8021a98: 490d ldr r1, [pc, #52] @ (8021ad0 ) 8021a9a: 480e ldr r0, [pc, #56] @ (8021ad4 ) 8021a9c: f007 ff96 bl 80299cc dhcp_pcb_refcount--; 8021aa0: 4b09 ldr r3, [pc, #36] @ (8021ac8 ) 8021aa2: 781b ldrb r3, [r3, #0] 8021aa4: 3b01 subs r3, #1 8021aa6: b2da uxtb r2, r3 8021aa8: 4b07 ldr r3, [pc, #28] @ (8021ac8 ) 8021aaa: 701a strb r2, [r3, #0] if (dhcp_pcb_refcount == 0) { 8021aac: 4b06 ldr r3, [pc, #24] @ (8021ac8 ) 8021aae: 781b ldrb r3, [r3, #0] 8021ab0: 2b00 cmp r3, #0 8021ab2: d107 bne.n 8021ac4 udp_remove(dhcp_pcb); 8021ab4: 4b08 ldr r3, [pc, #32] @ (8021ad8 ) 8021ab6: 681b ldr r3, [r3, #0] 8021ab8: 4618 mov r0, r3 8021aba: f7ff fef7 bl 80218ac dhcp_pcb = NULL; 8021abe: 4b06 ldr r3, [pc, #24] @ (8021ad8 ) 8021ac0: 2200 movs r2, #0 8021ac2: 601a str r2, [r3, #0] } } 8021ac4: bf00 nop 8021ac6: bd80 pop {r7, pc} 8021ac8: 2402af18 .word 0x2402af18 8021acc: 0802fe54 .word 0x0802fe54 8021ad0: 0802fedc .word 0x0802fedc 8021ad4: 0802feb4 .word 0x0802feb4 8021ad8: 2402af14 .word 0x2402af14 08021adc : * * @param netif the netif under DHCP control */ static void dhcp_handle_nak(struct netif *netif) { 8021adc: b580 push {r7, lr} 8021ade: b084 sub sp, #16 8021ae0: af00 add r7, sp, #0 8021ae2: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8021ae4: 687b ldr r3, [r7, #4] 8021ae6: 6a5b ldr r3, [r3, #36] @ 0x24 8021ae8: 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); 8021aea: 210c movs r1, #12 8021aec: 68f8 ldr r0, [r7, #12] 8021aee: f001 f862 bl 8022bb6 /* 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); 8021af2: 4b06 ldr r3, [pc, #24] @ (8021b0c ) 8021af4: 4a05 ldr r2, [pc, #20] @ (8021b0c ) 8021af6: 4905 ldr r1, [pc, #20] @ (8021b0c ) 8021af8: 6878 ldr r0, [r7, #4] 8021afa: f7f7 ffa5 bl 8019a48 /* We can immediately restart discovery */ dhcp_discover(netif); 8021afe: 6878 ldr r0, [r7, #4] 8021b00: f000 fc4c bl 802239c } 8021b04: bf00 nop 8021b06: 3710 adds r7, #16 8021b08: 46bd mov sp, r7 8021b0a: bd80 pop {r7, pc} 8021b0c: 08030c10 .word 0x08030c10 08021b10 : * * @param netif the netif under DHCP control */ static void dhcp_check(struct netif *netif) { 8021b10: b580 push {r7, lr} 8021b12: b084 sub sp, #16 8021b14: af00 add r7, sp, #0 8021b16: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8021b18: 687b ldr r3, [r7, #4] 8021b1a: 6a5b ldr r3, [r3, #36] @ 0x24 8021b1c: 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); 8021b1e: 2108 movs r1, #8 8021b20: 68f8 ldr r0, [r7, #12] 8021b22: f001 f848 bl 8022bb6 /* 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); 8021b26: 68fb ldr r3, [r7, #12] 8021b28: 331c adds r3, #28 8021b2a: 2200 movs r2, #0 8021b2c: 4619 mov r1, r3 8021b2e: 6878 ldr r0, [r7, #4] 8021b30: f002 fb88 bl 8024244 8021b34: 4603 mov r3, r0 8021b36: 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) { 8021b38: 68fb ldr r3, [r7, #12] 8021b3a: 799b ldrb r3, [r3, #6] 8021b3c: 2bff cmp r3, #255 @ 0xff 8021b3e: d005 beq.n 8021b4c dhcp->tries++; 8021b40: 68fb ldr r3, [r7, #12] 8021b42: 799b ldrb r3, [r3, #6] 8021b44: 3301 adds r3, #1 8021b46: b2da uxtb r2, r3 8021b48: 68fb ldr r3, [r7, #12] 8021b4a: 719a strb r2, [r3, #6] } msecs = 500; 8021b4c: f44f 73fa mov.w r3, #500 @ 0x1f4 8021b50: 813b strh r3, [r7, #8] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 8021b52: 893b ldrh r3, [r7, #8] 8021b54: f203 13f3 addw r3, r3, #499 @ 0x1f3 8021b58: 4a06 ldr r2, [pc, #24] @ (8021b74 ) 8021b5a: fb82 1203 smull r1, r2, r2, r3 8021b5e: 1152 asrs r2, r2, #5 8021b60: 17db asrs r3, r3, #31 8021b62: 1ad3 subs r3, r2, r3 8021b64: b29a uxth r2, r3 8021b66: 68fb ldr r3, [r7, #12] 8021b68: 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)); } 8021b6a: bf00 nop 8021b6c: 3710 adds r7, #16 8021b6e: 46bd mov sp, r7 8021b70: bd80 pop {r7, pc} 8021b72: bf00 nop 8021b74: 10624dd3 .word 0x10624dd3 08021b78 : * * @param netif the netif under DHCP control */ static void dhcp_handle_offer(struct netif *netif, struct dhcp_msg *msg_in) { 8021b78: b580 push {r7, lr} 8021b7a: b084 sub sp, #16 8021b7c: af00 add r7, sp, #0 8021b7e: 6078 str r0, [r7, #4] 8021b80: 6039 str r1, [r7, #0] struct dhcp *dhcp = netif_dhcp_data(netif); 8021b82: 687b ldr r3, [r7, #4] 8021b84: 6a5b ldr r3, [r3, #36] @ 0x24 8021b86: 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)) { 8021b88: 4b0c ldr r3, [pc, #48] @ (8021bbc ) 8021b8a: 789b ldrb r3, [r3, #2] 8021b8c: 2b00 cmp r3, #0 8021b8e: d011 beq.n 8021bb4 dhcp->request_timeout = 0; /* stop timer */ 8021b90: 68fb ldr r3, [r7, #12] 8021b92: 2200 movs r2, #0 8021b94: 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))); 8021b96: 4b0a ldr r3, [pc, #40] @ (8021bc0 ) 8021b98: 689b ldr r3, [r3, #8] 8021b9a: 4618 mov r0, r3 8021b9c: f7f6 ffd1 bl 8018b42 8021ba0: 4602 mov r2, r0 8021ba2: 68fb ldr r3, [r7, #12] 8021ba4: 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); 8021ba6: 683b ldr r3, [r7, #0] 8021ba8: 691a ldr r2, [r3, #16] 8021baa: 68fb ldr r3, [r7, #12] 8021bac: 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); 8021bae: 6878 ldr r0, [r7, #4] 8021bb0: f000 f808 bl 8021bc4 } 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)); } } 8021bb4: bf00 nop 8021bb6: 3710 adds r7, #16 8021bb8: 46bd mov sp, r7 8021bba: bd80 pop {r7, pc} 8021bbc: 2402af0c .word 0x2402af0c 8021bc0: 2402aeec .word 0x2402aeec 08021bc4 : * @param netif the netif under DHCP control * @return lwIP specific error (see error.h) */ static err_t dhcp_select(struct netif *netif) { 8021bc4: b5b0 push {r4, r5, r7, lr} 8021bc6: b08a sub sp, #40 @ 0x28 8021bc8: af02 add r7, sp, #8 8021bca: 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;); 8021bcc: 687b ldr r3, [r7, #4] 8021bce: 2b00 cmp r3, #0 8021bd0: d109 bne.n 8021be6 8021bd2: 4b71 ldr r3, [pc, #452] @ (8021d98 ) 8021bd4: f240 1277 movw r2, #375 @ 0x177 8021bd8: 4970 ldr r1, [pc, #448] @ (8021d9c ) 8021bda: 4871 ldr r0, [pc, #452] @ (8021da0 ) 8021bdc: f007 fef6 bl 80299cc 8021be0: f06f 030f mvn.w r3, #15 8021be4: e0d3 b.n 8021d8e dhcp = netif_dhcp_data(netif); 8021be6: 687b ldr r3, [r7, #4] 8021be8: 6a5b ldr r3, [r3, #36] @ 0x24 8021bea: 61bb str r3, [r7, #24] LWIP_ERROR("dhcp_select: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 8021bec: 69bb ldr r3, [r7, #24] 8021bee: 2b00 cmp r3, #0 8021bf0: d109 bne.n 8021c06 8021bf2: 4b69 ldr r3, [pc, #420] @ (8021d98 ) 8021bf4: f240 1279 movw r2, #377 @ 0x179 8021bf8: 496a ldr r1, [pc, #424] @ (8021da4 ) 8021bfa: 4869 ldr r0, [pc, #420] @ (8021da0 ) 8021bfc: f007 fee6 bl 80299cc 8021c00: f06f 0305 mvn.w r3, #5 8021c04: e0c3 b.n 8021d8e 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); 8021c06: 2101 movs r1, #1 8021c08: 69b8 ldr r0, [r7, #24] 8021c0a: f000 ffd4 bl 8022bb6 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 8021c0e: f107 030c add.w r3, r7, #12 8021c12: 2203 movs r2, #3 8021c14: 69b9 ldr r1, [r7, #24] 8021c16: 6878 ldr r0, [r7, #4] 8021c18: f001 fc66 bl 80234e8 8021c1c: 6178 str r0, [r7, #20] if (p_out != NULL) { 8021c1e: 697b ldr r3, [r7, #20] 8021c20: 2b00 cmp r3, #0 8021c22: f000 8085 beq.w 8021d30 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 8021c26: 697b ldr r3, [r7, #20] 8021c28: 685b ldr r3, [r3, #4] 8021c2a: 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); 8021c2c: 89b8 ldrh r0, [r7, #12] 8021c2e: 693b ldr r3, [r7, #16] 8021c30: f103 01f0 add.w r1, r3, #240 @ 0xf0 8021c34: 2302 movs r3, #2 8021c36: 2239 movs r2, #57 @ 0x39 8021c38: f000 ffd8 bl 8022bec 8021c3c: 4603 mov r3, r0 8021c3e: 81bb strh r3, [r7, #12] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 8021c40: 89b8 ldrh r0, [r7, #12] 8021c42: 693b ldr r3, [r7, #16] 8021c44: f103 01f0 add.w r1, r3, #240 @ 0xf0 8021c48: 687b ldr r3, [r7, #4] 8021c4a: 8d1b ldrh r3, [r3, #40] @ 0x28 8021c4c: 461a mov r2, r3 8021c4e: f001 f827 bl 8022ca0 8021c52: 4603 mov r3, r0 8021c54: 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); 8021c56: 89b8 ldrh r0, [r7, #12] 8021c58: 693b ldr r3, [r7, #16] 8021c5a: f103 01f0 add.w r1, r3, #240 @ 0xf0 8021c5e: 2304 movs r3, #4 8021c60: 2232 movs r2, #50 @ 0x32 8021c62: f000 ffc3 bl 8022bec 8021c66: 4603 mov r3, r0 8021c68: 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))); 8021c6a: 89bc ldrh r4, [r7, #12] 8021c6c: 693b ldr r3, [r7, #16] 8021c6e: f103 05f0 add.w r5, r3, #240 @ 0xf0 8021c72: 69bb ldr r3, [r7, #24] 8021c74: 69db ldr r3, [r3, #28] 8021c76: 4618 mov r0, r3 8021c78: f7f6 ff63 bl 8018b42 8021c7c: 4603 mov r3, r0 8021c7e: 461a mov r2, r3 8021c80: 4629 mov r1, r5 8021c82: 4620 mov r0, r4 8021c84: f001 f83e bl 8022d04 8021c88: 4603 mov r3, r0 8021c8a: 81bb strh r3, [r7, #12] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4); 8021c8c: 89b8 ldrh r0, [r7, #12] 8021c8e: 693b ldr r3, [r7, #16] 8021c90: f103 01f0 add.w r1, r3, #240 @ 0xf0 8021c94: 2304 movs r3, #4 8021c96: 2236 movs r2, #54 @ 0x36 8021c98: f000 ffa8 bl 8022bec 8021c9c: 4603 mov r3, r0 8021c9e: 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)))); 8021ca0: 89bc ldrh r4, [r7, #12] 8021ca2: 693b ldr r3, [r7, #16] 8021ca4: f103 05f0 add.w r5, r3, #240 @ 0xf0 8021ca8: 69bb ldr r3, [r7, #24] 8021caa: 699b ldr r3, [r3, #24] 8021cac: 4618 mov r0, r3 8021cae: f7f6 ff48 bl 8018b42 8021cb2: 4603 mov r3, r0 8021cb4: 461a mov r2, r3 8021cb6: 4629 mov r1, r5 8021cb8: 4620 mov r0, r4 8021cba: f001 f823 bl 8022d04 8021cbe: 4603 mov r3, r0 8021cc0: 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)); 8021cc2: 89b8 ldrh r0, [r7, #12] 8021cc4: 693b ldr r3, [r7, #16] 8021cc6: f103 01f0 add.w r1, r3, #240 @ 0xf0 8021cca: 2303 movs r3, #3 8021ccc: 2237 movs r2, #55 @ 0x37 8021cce: f000 ff8d bl 8022bec 8021cd2: 4603 mov r3, r0 8021cd4: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8021cd6: 2300 movs r3, #0 8021cd8: 77fb strb r3, [r7, #31] 8021cda: e00e b.n 8021cfa options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 8021cdc: 89b8 ldrh r0, [r7, #12] 8021cde: 693b ldr r3, [r7, #16] 8021ce0: f103 01f0 add.w r1, r3, #240 @ 0xf0 8021ce4: 7ffb ldrb r3, [r7, #31] 8021ce6: 4a30 ldr r2, [pc, #192] @ (8021da8 ) 8021ce8: 5cd3 ldrb r3, [r2, r3] 8021cea: 461a mov r2, r3 8021cec: f000 ffb2 bl 8022c54 8021cf0: 4603 mov r3, r0 8021cf2: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8021cf4: 7ffb ldrb r3, [r7, #31] 8021cf6: 3301 adds r3, #1 8021cf8: 77fb strb r3, [r7, #31] 8021cfa: 7ffb ldrb r3, [r7, #31] 8021cfc: 2b02 cmp r3, #2 8021cfe: d9ed bls.n 8021cdc #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); 8021d00: 89b8 ldrh r0, [r7, #12] 8021d02: 693b ldr r3, [r7, #16] 8021d04: 33f0 adds r3, #240 @ 0xf0 8021d06: 697a ldr r2, [r7, #20] 8021d08: 4619 mov r1, r3 8021d0a: f001 fcc3 bl 8023694 /* 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); 8021d0e: 4b27 ldr r3, [pc, #156] @ (8021dac ) 8021d10: 6818 ldr r0, [r3, #0] 8021d12: 4b27 ldr r3, [pc, #156] @ (8021db0 ) 8021d14: 9301 str r3, [sp, #4] 8021d16: 687b ldr r3, [r7, #4] 8021d18: 9300 str r3, [sp, #0] 8021d1a: 2343 movs r3, #67 @ 0x43 8021d1c: 4a25 ldr r2, [pc, #148] @ (8021db4 ) 8021d1e: 6979 ldr r1, [r7, #20] 8021d20: f7ff fb96 bl 8021450 8021d24: 4603 mov r3, r0 8021d26: 77bb strb r3, [r7, #30] pbuf_free(p_out); 8021d28: 6978 ldr r0, [r7, #20] 8021d2a: f7f8 fbd7 bl 801a4dc 8021d2e: e001 b.n 8021d34 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; 8021d30: 23ff movs r3, #255 @ 0xff 8021d32: 77bb strb r3, [r7, #30] } if (dhcp->tries < 255) { 8021d34: 69bb ldr r3, [r7, #24] 8021d36: 799b ldrb r3, [r3, #6] 8021d38: 2bff cmp r3, #255 @ 0xff 8021d3a: d005 beq.n 8021d48 dhcp->tries++; 8021d3c: 69bb ldr r3, [r7, #24] 8021d3e: 799b ldrb r3, [r3, #6] 8021d40: 3301 adds r3, #1 8021d42: b2da uxtb r2, r3 8021d44: 69bb ldr r3, [r7, #24] 8021d46: 719a strb r2, [r3, #6] } msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000); 8021d48: 69bb ldr r3, [r7, #24] 8021d4a: 799b ldrb r3, [r3, #6] 8021d4c: 2b05 cmp r3, #5 8021d4e: d80d bhi.n 8021d6c 8021d50: 69bb ldr r3, [r7, #24] 8021d52: 799b ldrb r3, [r3, #6] 8021d54: 461a mov r2, r3 8021d56: 2301 movs r3, #1 8021d58: 4093 lsls r3, r2 8021d5a: b29b uxth r3, r3 8021d5c: 461a mov r2, r3 8021d5e: 0152 lsls r2, r2, #5 8021d60: 1ad2 subs r2, r2, r3 8021d62: 0092 lsls r2, r2, #2 8021d64: 4413 add r3, r2 8021d66: 00db lsls r3, r3, #3 8021d68: b29b uxth r3, r3 8021d6a: e001 b.n 8021d70 8021d6c: f64e 2360 movw r3, #60000 @ 0xea60 8021d70: 81fb strh r3, [r7, #14] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 8021d72: 89fb ldrh r3, [r7, #14] 8021d74: f203 13f3 addw r3, r3, #499 @ 0x1f3 8021d78: 4a0f ldr r2, [pc, #60] @ (8021db8 ) 8021d7a: fb82 1203 smull r1, r2, r2, r3 8021d7e: 1152 asrs r2, r2, #5 8021d80: 17db asrs r3, r3, #31 8021d82: 1ad3 subs r3, r2, r3 8021d84: b29a uxth r2, r3 8021d86: 69bb ldr r3, [r7, #24] 8021d88: 811a strh r2, [r3, #8] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs)); return result; 8021d8a: f997 301e ldrsb.w r3, [r7, #30] } 8021d8e: 4618 mov r0, r3 8021d90: 3720 adds r7, #32 8021d92: 46bd mov sp, r7 8021d94: bdb0 pop {r4, r5, r7, pc} 8021d96: bf00 nop 8021d98: 0802fe54 .word 0x0802fe54 8021d9c: 0802ff00 .word 0x0802ff00 8021da0: 0802feb4 .word 0x0802feb4 8021da4: 0802ff1c .word 0x0802ff1c 8021da8: 24000058 .word 0x24000058 8021dac: 2402af14 .word 0x2402af14 8021db0: 08030c10 .word 0x08030c10 8021db4: 08030c14 .word 0x08030c14 8021db8: 10624dd3 .word 0x10624dd3 08021dbc : * 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) { 8021dbc: b580 push {r7, lr} 8021dbe: b082 sub sp, #8 8021dc0: 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) { 8021dc2: 4b27 ldr r3, [pc, #156] @ (8021e60 ) 8021dc4: 681b ldr r3, [r3, #0] 8021dc6: 607b str r3, [r7, #4] 8021dc8: e042 b.n 8021e50 /* only act on DHCP configured interfaces */ struct dhcp *dhcp = netif_dhcp_data(netif); 8021dca: 687b ldr r3, [r7, #4] 8021dcc: 6a5b ldr r3, [r3, #36] @ 0x24 8021dce: 603b str r3, [r7, #0] if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) { 8021dd0: 683b ldr r3, [r7, #0] 8021dd2: 2b00 cmp r3, #0 8021dd4: d039 beq.n 8021e4a 8021dd6: 683b ldr r3, [r7, #0] 8021dd8: 795b ldrb r3, [r3, #5] 8021dda: 2b00 cmp r3, #0 8021ddc: d035 beq.n 8021e4a /* compare lease time to expire timeout */ if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) { 8021dde: 683b ldr r3, [r7, #0] 8021de0: 8a9b ldrh r3, [r3, #20] 8021de2: 2b00 cmp r3, #0 8021de4: d012 beq.n 8021e0c 8021de6: 683b ldr r3, [r7, #0] 8021de8: 8a5b ldrh r3, [r3, #18] 8021dea: 3301 adds r3, #1 8021dec: b29a uxth r2, r3 8021dee: 683b ldr r3, [r7, #0] 8021df0: 825a strh r2, [r3, #18] 8021df2: 683b ldr r3, [r7, #0] 8021df4: 8a5a ldrh r2, [r3, #18] 8021df6: 683b ldr r3, [r7, #0] 8021df8: 8a9b ldrh r3, [r3, #20] 8021dfa: 429a cmp r2, r3 8021dfc: d106 bne.n 8021e0c 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); 8021dfe: 6878 ldr r0, [r7, #4] 8021e00: f000 fe32 bl 8022a68 dhcp_start(netif); 8021e04: 6878 ldr r0, [r7, #4] 8021e06: f000 f96b bl 80220e0 8021e0a: e01e b.n 8021e4a /* timer is active (non zero), and triggers (zeroes) now? */ } else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) { 8021e0c: 683b ldr r3, [r7, #0] 8021e0e: 8a1b ldrh r3, [r3, #16] 8021e10: 2b00 cmp r3, #0 8021e12: d00b beq.n 8021e2c 8021e14: 683b ldr r3, [r7, #0] 8021e16: 8a1b ldrh r3, [r3, #16] 8021e18: 1e5a subs r2, r3, #1 8021e1a: b291 uxth r1, r2 8021e1c: 683a ldr r2, [r7, #0] 8021e1e: 8211 strh r1, [r2, #16] 8021e20: 2b01 cmp r3, #1 8021e22: d103 bne.n 8021e2c 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); 8021e24: 6878 ldr r0, [r7, #4] 8021e26: f000 f8c7 bl 8021fb8 8021e2a: e00e b.n 8021e4a /* timer is active (non zero), and triggers (zeroes) now */ } else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) { 8021e2c: 683b ldr r3, [r7, #0] 8021e2e: 89db ldrh r3, [r3, #14] 8021e30: 2b00 cmp r3, #0 8021e32: d00a beq.n 8021e4a 8021e34: 683b ldr r3, [r7, #0] 8021e36: 89db ldrh r3, [r3, #14] 8021e38: 1e5a subs r2, r3, #1 8021e3a: b291 uxth r1, r2 8021e3c: 683a ldr r2, [r7, #0] 8021e3e: 81d1 strh r1, [r2, #14] 8021e40: 2b01 cmp r3, #1 8021e42: d102 bne.n 8021e4a 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); 8021e44: 6878 ldr r0, [r7, #4] 8021e46: f000 f888 bl 8021f5a NETIF_FOREACH(netif) { 8021e4a: 687b ldr r3, [r7, #4] 8021e4c: 681b ldr r3, [r3, #0] 8021e4e: 607b str r3, [r7, #4] 8021e50: 687b ldr r3, [r7, #4] 8021e52: 2b00 cmp r3, #0 8021e54: d1b9 bne.n 8021dca } } } } 8021e56: bf00 nop 8021e58: bf00 nop 8021e5a: 3708 adds r7, #8 8021e5c: 46bd mov sp, r7 8021e5e: bd80 pop {r7, pc} 8021e60: 2402ae7c .word 0x2402ae7c 08021e64 : * 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) { 8021e64: b580 push {r7, lr} 8021e66: b082 sub sp, #8 8021e68: af00 add r7, sp, #0 struct netif *netif; /* loop through netif's */ NETIF_FOREACH(netif) { 8021e6a: 4b16 ldr r3, [pc, #88] @ (8021ec4 ) 8021e6c: 681b ldr r3, [r3, #0] 8021e6e: 607b str r3, [r7, #4] 8021e70: e020 b.n 8021eb4 struct dhcp *dhcp = netif_dhcp_data(netif); 8021e72: 687b ldr r3, [r7, #4] 8021e74: 6a5b ldr r3, [r3, #36] @ 0x24 8021e76: 603b str r3, [r7, #0] /* only act on DHCP configured interfaces */ if (dhcp != NULL) { 8021e78: 683b ldr r3, [r7, #0] 8021e7a: 2b00 cmp r3, #0 8021e7c: d017 beq.n 8021eae /* timer is active (non zero), and is about to trigger now */ if (dhcp->request_timeout > 1) { 8021e7e: 683b ldr r3, [r7, #0] 8021e80: 891b ldrh r3, [r3, #8] 8021e82: 2b01 cmp r3, #1 8021e84: d906 bls.n 8021e94 dhcp->request_timeout--; 8021e86: 683b ldr r3, [r7, #0] 8021e88: 891b ldrh r3, [r3, #8] 8021e8a: 3b01 subs r3, #1 8021e8c: b29a uxth r2, r3 8021e8e: 683b ldr r3, [r7, #0] 8021e90: 811a strh r2, [r3, #8] 8021e92: e00c b.n 8021eae } else if (dhcp->request_timeout == 1) { 8021e94: 683b ldr r3, [r7, #0] 8021e96: 891b ldrh r3, [r3, #8] 8021e98: 2b01 cmp r3, #1 8021e9a: d108 bne.n 8021eae dhcp->request_timeout--; 8021e9c: 683b ldr r3, [r7, #0] 8021e9e: 891b ldrh r3, [r3, #8] 8021ea0: 3b01 subs r3, #1 8021ea2: b29a uxth r2, r3 8021ea4: 683b ldr r3, [r7, #0] 8021ea6: 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); 8021ea8: 6878 ldr r0, [r7, #4] 8021eaa: f000 f80d bl 8021ec8 NETIF_FOREACH(netif) { 8021eae: 687b ldr r3, [r7, #4] 8021eb0: 681b ldr r3, [r3, #0] 8021eb2: 607b str r3, [r7, #4] 8021eb4: 687b ldr r3, [r7, #4] 8021eb6: 2b00 cmp r3, #0 8021eb8: d1db bne.n 8021e72 } } } } 8021eba: bf00 nop 8021ebc: bf00 nop 8021ebe: 3708 adds r7, #8 8021ec0: 46bd mov sp, r7 8021ec2: bd80 pop {r7, pc} 8021ec4: 2402ae7c .word 0x2402ae7c 08021ec8 : * * @param netif the netif under DHCP control */ static void dhcp_timeout(struct netif *netif) { 8021ec8: b580 push {r7, lr} 8021eca: b084 sub sp, #16 8021ecc: af00 add r7, sp, #0 8021ece: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8021ed0: 687b ldr r3, [r7, #4] 8021ed2: 6a5b ldr r3, [r3, #36] @ 0x24 8021ed4: 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)) { 8021ed6: 68fb ldr r3, [r7, #12] 8021ed8: 795b ldrb r3, [r3, #5] 8021eda: 2b0c cmp r3, #12 8021edc: d003 beq.n 8021ee6 8021ede: 68fb ldr r3, [r7, #12] 8021ee0: 795b ldrb r3, [r3, #5] 8021ee2: 2b06 cmp r3, #6 8021ee4: d103 bne.n 8021eee LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n")); dhcp_discover(netif); 8021ee6: 6878 ldr r0, [r7, #4] 8021ee8: f000 fa58 bl 802239c dhcp_reboot(netif); } else { dhcp_discover(netif); } } } 8021eec: e031 b.n 8021f52 } else if (dhcp->state == DHCP_STATE_REQUESTING) { 8021eee: 68fb ldr r3, [r7, #12] 8021ef0: 795b ldrb r3, [r3, #5] 8021ef2: 2b01 cmp r3, #1 8021ef4: d10e bne.n 8021f14 if (dhcp->tries <= 5) { 8021ef6: 68fb ldr r3, [r7, #12] 8021ef8: 799b ldrb r3, [r3, #6] 8021efa: 2b05 cmp r3, #5 8021efc: d803 bhi.n 8021f06 dhcp_select(netif); 8021efe: 6878 ldr r0, [r7, #4] 8021f00: f7ff fe60 bl 8021bc4 } 8021f04: e025 b.n 8021f52 dhcp_release_and_stop(netif); 8021f06: 6878 ldr r0, [r7, #4] 8021f08: f000 fdae bl 8022a68 dhcp_start(netif); 8021f0c: 6878 ldr r0, [r7, #4] 8021f0e: f000 f8e7 bl 80220e0 } 8021f12: e01e b.n 8021f52 } else if (dhcp->state == DHCP_STATE_CHECKING) { 8021f14: 68fb ldr r3, [r7, #12] 8021f16: 795b ldrb r3, [r3, #5] 8021f18: 2b08 cmp r3, #8 8021f1a: d10b bne.n 8021f34 if (dhcp->tries <= 1) { 8021f1c: 68fb ldr r3, [r7, #12] 8021f1e: 799b ldrb r3, [r3, #6] 8021f20: 2b01 cmp r3, #1 8021f22: d803 bhi.n 8021f2c dhcp_check(netif); 8021f24: 6878 ldr r0, [r7, #4] 8021f26: f7ff fdf3 bl 8021b10 } 8021f2a: e012 b.n 8021f52 dhcp_bind(netif); 8021f2c: 6878 ldr r0, [r7, #4] 8021f2e: f000 fad7 bl 80224e0 } 8021f32: e00e b.n 8021f52 } else if (dhcp->state == DHCP_STATE_REBOOTING) { 8021f34: 68fb ldr r3, [r7, #12] 8021f36: 795b ldrb r3, [r3, #5] 8021f38: 2b03 cmp r3, #3 8021f3a: d10a bne.n 8021f52 if (dhcp->tries < REBOOT_TRIES) { 8021f3c: 68fb ldr r3, [r7, #12] 8021f3e: 799b ldrb r3, [r3, #6] 8021f40: 2b01 cmp r3, #1 8021f42: d803 bhi.n 8021f4c dhcp_reboot(netif); 8021f44: 6878 ldr r0, [r7, #4] 8021f46: f000 fcdb bl 8022900 } 8021f4a: e002 b.n 8021f52 dhcp_discover(netif); 8021f4c: 6878 ldr r0, [r7, #4] 8021f4e: f000 fa25 bl 802239c } 8021f52: bf00 nop 8021f54: 3710 adds r7, #16 8021f56: 46bd mov sp, r7 8021f58: bd80 pop {r7, pc} 08021f5a : * * @param netif the netif under DHCP control */ static void dhcp_t1_timeout(struct netif *netif) { 8021f5a: b580 push {r7, lr} 8021f5c: b084 sub sp, #16 8021f5e: af00 add r7, sp, #0 8021f60: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8021f62: 687b ldr r3, [r7, #4] 8021f64: 6a5b ldr r3, [r3, #36] @ 0x24 8021f66: 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) || 8021f68: 68fb ldr r3, [r7, #12] 8021f6a: 795b ldrb r3, [r3, #5] 8021f6c: 2b01 cmp r3, #1 8021f6e: d007 beq.n 8021f80 8021f70: 68fb ldr r3, [r7, #12] 8021f72: 795b ldrb r3, [r3, #5] 8021f74: 2b0a cmp r3, #10 8021f76: d003 beq.n 8021f80 (dhcp->state == DHCP_STATE_RENEWING)) { 8021f78: 68fb ldr r3, [r7, #12] 8021f7a: 795b ldrb r3, [r3, #5] if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || 8021f7c: 2b05 cmp r3, #5 8021f7e: d117 bne.n 8021fb0 * 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); 8021f80: 6878 ldr r0, [r7, #4] 8021f82: f000 fb87 bl 8022694 /* Calculate next timeout */ if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) { 8021f86: 68fb ldr r3, [r7, #12] 8021f88: 899b ldrh r3, [r3, #12] 8021f8a: 461a mov r2, r3 8021f8c: 68fb ldr r3, [r7, #12] 8021f8e: 8a5b ldrh r3, [r3, #18] 8021f90: 1ad3 subs r3, r2, r3 8021f92: 2b01 cmp r3, #1 8021f94: dd0c ble.n 8021fb0 dhcp->t1_renew_time = (u16_t)((dhcp->t2_timeout - dhcp->lease_used) / 2); 8021f96: 68fb ldr r3, [r7, #12] 8021f98: 899b ldrh r3, [r3, #12] 8021f9a: 461a mov r2, r3 8021f9c: 68fb ldr r3, [r7, #12] 8021f9e: 8a5b ldrh r3, [r3, #18] 8021fa0: 1ad3 subs r3, r2, r3 8021fa2: 2b00 cmp r3, #0 8021fa4: da00 bge.n 8021fa8 8021fa6: 3301 adds r3, #1 8021fa8: 105b asrs r3, r3, #1 8021faa: b29a uxth r2, r3 8021fac: 68fb ldr r3, [r7, #12] 8021fae: 81da strh r2, [r3, #14] } } } 8021fb0: bf00 nop 8021fb2: 3710 adds r7, #16 8021fb4: 46bd mov sp, r7 8021fb6: bd80 pop {r7, pc} 08021fb8 : * * @param netif the netif under DHCP control */ static void dhcp_t2_timeout(struct netif *netif) { 8021fb8: b580 push {r7, lr} 8021fba: b084 sub sp, #16 8021fbc: af00 add r7, sp, #0 8021fbe: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8021fc0: 687b ldr r3, [r7, #4] 8021fc2: 6a5b ldr r3, [r3, #36] @ 0x24 8021fc4: 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) || 8021fc6: 68fb ldr r3, [r7, #12] 8021fc8: 795b ldrb r3, [r3, #5] 8021fca: 2b01 cmp r3, #1 8021fcc: d00b beq.n 8021fe6 8021fce: 68fb ldr r3, [r7, #12] 8021fd0: 795b ldrb r3, [r3, #5] 8021fd2: 2b0a cmp r3, #10 8021fd4: d007 beq.n 8021fe6 (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) { 8021fd6: 68fb ldr r3, [r7, #12] 8021fd8: 795b ldrb r3, [r3, #5] if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || 8021fda: 2b05 cmp r3, #5 8021fdc: d003 beq.n 8021fe6 (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) { 8021fde: 68fb ldr r3, [r7, #12] 8021fe0: 795b ldrb r3, [r3, #5] 8021fe2: 2b04 cmp r3, #4 8021fe4: d117 bne.n 8022016 /* 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); 8021fe6: 6878 ldr r0, [r7, #4] 8021fe8: f000 fbf0 bl 80227cc /* Calculate next timeout */ if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) { 8021fec: 68fb ldr r3, [r7, #12] 8021fee: 8a9b ldrh r3, [r3, #20] 8021ff0: 461a mov r2, r3 8021ff2: 68fb ldr r3, [r7, #12] 8021ff4: 8a5b ldrh r3, [r3, #18] 8021ff6: 1ad3 subs r3, r2, r3 8021ff8: 2b01 cmp r3, #1 8021ffa: dd0c ble.n 8022016 dhcp->t2_rebind_time = (u16_t)((dhcp->t0_timeout - dhcp->lease_used) / 2); 8021ffc: 68fb ldr r3, [r7, #12] 8021ffe: 8a9b ldrh r3, [r3, #20] 8022000: 461a mov r2, r3 8022002: 68fb ldr r3, [r7, #12] 8022004: 8a5b ldrh r3, [r3, #18] 8022006: 1ad3 subs r3, r2, r3 8022008: 2b00 cmp r3, #0 802200a: da00 bge.n 802200e 802200c: 3301 adds r3, #1 802200e: 105b asrs r3, r3, #1 8022010: b29a uxth r2, r3 8022012: 68fb ldr r3, [r7, #12] 8022014: 821a strh r2, [r3, #16] } } } 8022016: bf00 nop 8022018: 3710 adds r7, #16 802201a: 46bd mov sp, r7 802201c: bd80 pop {r7, pc} ... 08022020 : * * @param netif the netif under DHCP control */ static void dhcp_handle_ack(struct netif *netif, struct dhcp_msg *msg_in) { 8022020: b580 push {r7, lr} 8022022: b084 sub sp, #16 8022024: af00 add r7, sp, #0 8022026: 6078 str r0, [r7, #4] 8022028: 6039 str r1, [r7, #0] struct dhcp *dhcp = netif_dhcp_data(netif); 802202a: 687b ldr r3, [r7, #4] 802202c: 6a5b ldr r3, [r3, #36] @ 0x24 802202e: 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); 8022030: 68fb ldr r3, [r7, #12] 8022032: 2200 movs r2, #0 8022034: 621a str r2, [r3, #32] ip4_addr_set_zero(&dhcp->offered_gw_addr); 8022036: 68fb ldr r3, [r7, #12] 8022038: 2200 movs r2, #0 802203a: 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)) { 802203c: 4b26 ldr r3, [pc, #152] @ (80220d8 ) 802203e: 78db ldrb r3, [r3, #3] 8022040: 2b00 cmp r3, #0 8022042: d003 beq.n 802204c /* remember offered lease time */ dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME); 8022044: 4b25 ldr r3, [pc, #148] @ (80220dc ) 8022046: 68da ldr r2, [r3, #12] 8022048: 68fb ldr r3, [r7, #12] 802204a: 629a str r2, [r3, #40] @ 0x28 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { 802204c: 4b22 ldr r3, [pc, #136] @ (80220d8 ) 802204e: 791b ldrb r3, [r3, #4] 8022050: 2b00 cmp r3, #0 8022052: d004 beq.n 802205e /* remember given renewal period */ dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); 8022054: 4b21 ldr r3, [pc, #132] @ (80220dc ) 8022056: 691a ldr r2, [r3, #16] 8022058: 68fb ldr r3, [r7, #12] 802205a: 62da str r2, [r3, #44] @ 0x2c 802205c: e004 b.n 8022068 } else { /* calculate safe periods for renewal */ dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; 802205e: 68fb ldr r3, [r7, #12] 8022060: 6a9b ldr r3, [r3, #40] @ 0x28 8022062: 085a lsrs r2, r3, #1 8022064: 68fb ldr r3, [r7, #12] 8022066: 62da str r2, [r3, #44] @ 0x2c } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 8022068: 4b1b ldr r3, [pc, #108] @ (80220d8 ) 802206a: 795b ldrb r3, [r3, #5] 802206c: 2b00 cmp r3, #0 802206e: d004 beq.n 802207a /* remember given rebind period */ dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2); 8022070: 4b1a ldr r3, [pc, #104] @ (80220dc ) 8022072: 695a ldr r2, [r3, #20] 8022074: 68fb ldr r3, [r7, #12] 8022076: 631a str r2, [r3, #48] @ 0x30 8022078: e007 b.n 802208a } else { /* calculate safe periods for rebinding (offered_t0_lease * 0.875 -> 87.5%)*/ dhcp->offered_t2_rebind = (dhcp->offered_t0_lease * 7U) / 8U; 802207a: 68fb ldr r3, [r7, #12] 802207c: 6a9a ldr r2, [r3, #40] @ 0x28 802207e: 4613 mov r3, r2 8022080: 00db lsls r3, r3, #3 8022082: 1a9b subs r3, r3, r2 8022084: 08da lsrs r2, r3, #3 8022086: 68fb ldr r3, [r7, #12] 8022088: 631a str r2, [r3, #48] @ 0x30 } /* (y)our internet address */ ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr); 802208a: 683b ldr r3, [r7, #0] 802208c: 691a ldr r2, [r3, #16] 802208e: 68fb ldr r3, [r7, #12] 8022090: 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)) { 8022092: 4b11 ldr r3, [pc, #68] @ (80220d8 ) 8022094: 799b ldrb r3, [r3, #6] 8022096: 2b00 cmp r3, #0 8022098: d00b beq.n 80220b2 /* remember given subnet mask */ ip4_addr_set_u32(&dhcp->offered_sn_mask, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); 802209a: 4b10 ldr r3, [pc, #64] @ (80220dc ) 802209c: 699b ldr r3, [r3, #24] 802209e: 4618 mov r0, r3 80220a0: f7f6 fd4f bl 8018b42 80220a4: 4602 mov r2, r0 80220a6: 68fb ldr r3, [r7, #12] 80220a8: 621a str r2, [r3, #32] dhcp->subnet_mask_given = 1; 80220aa: 68fb ldr r3, [r7, #12] 80220ac: 2201 movs r2, #1 80220ae: 71da strb r2, [r3, #7] 80220b0: e002 b.n 80220b8 } else { dhcp->subnet_mask_given = 0; 80220b2: 68fb ldr r3, [r7, #12] 80220b4: 2200 movs r2, #0 80220b6: 71da strb r2, [r3, #7] } /* gateway router */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) { 80220b8: 4b07 ldr r3, [pc, #28] @ (80220d8 ) 80220ba: 79db ldrb r3, [r3, #7] 80220bc: 2b00 cmp r3, #0 80220be: d007 beq.n 80220d0 ip4_addr_set_u32(&dhcp->offered_gw_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER))); 80220c0: 4b06 ldr r3, [pc, #24] @ (80220dc ) 80220c2: 69db ldr r3, [r3, #28] 80220c4: 4618 mov r0, r3 80220c6: f7f6 fd3c bl 8018b42 80220ca: 4602 mov r2, r0 80220cc: 68fb ldr r3, [r7, #12] 80220ce: 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 */ } 80220d0: bf00 nop 80220d2: 3710 adds r7, #16 80220d4: 46bd mov sp, r7 80220d6: bd80 pop {r7, pc} 80220d8: 2402af0c .word 0x2402af0c 80220dc: 2402aeec .word 0x2402aeec 080220e0 : * - ERR_OK - No error * - ERR_MEM - Out of memory */ err_t dhcp_start(struct netif *netif) { 80220e0: b580 push {r7, lr} 80220e2: b084 sub sp, #16 80220e4: af00 add r7, sp, #0 80220e6: 6078 str r0, [r7, #4] struct dhcp *dhcp; err_t result; LWIP_ASSERT_CORE_LOCKED(); 80220e8: f7ee fa22 bl 8010530 LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); 80220ec: 687b ldr r3, [r7, #4] 80220ee: 2b00 cmp r3, #0 80220f0: d109 bne.n 8022106 80220f2: 4b37 ldr r3, [pc, #220] @ (80221d0 ) 80220f4: f240 22e7 movw r2, #743 @ 0x2e7 80220f8: 4936 ldr r1, [pc, #216] @ (80221d4 ) 80220fa: 4837 ldr r0, [pc, #220] @ (80221d8 ) 80220fc: f007 fc66 bl 80299cc 8022100: f06f 030f mvn.w r3, #15 8022104: e060 b.n 80221c8 LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;); 8022106: 687b ldr r3, [r7, #4] 8022108: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 802210c: f003 0301 and.w r3, r3, #1 8022110: 2b00 cmp r3, #0 8022112: d109 bne.n 8022128 8022114: 4b2e ldr r3, [pc, #184] @ (80221d0 ) 8022116: f44f 723a mov.w r2, #744 @ 0x2e8 802211a: 4930 ldr r1, [pc, #192] @ (80221dc ) 802211c: 482e ldr r0, [pc, #184] @ (80221d8 ) 802211e: f007 fc55 bl 80299cc 8022122: f06f 030f mvn.w r3, #15 8022126: e04f b.n 80221c8 dhcp = netif_dhcp_data(netif); 8022128: 687b ldr r3, [r7, #4] 802212a: 6a5b ldr r3, [r3, #36] @ 0x24 802212c: 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) { 802212e: 687b ldr r3, [r7, #4] 8022130: 8d1b ldrh r3, [r3, #40] @ 0x28 8022132: f5b3 7f10 cmp.w r3, #576 @ 0x240 8022136: d202 bcs.n 802213e LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): Cannot use this netif with DHCP: MTU is too small\n")); return ERR_MEM; 8022138: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802213c: e044 b.n 80221c8 } /* no DHCP client attached yet? */ if (dhcp == NULL) { 802213e: 68fb ldr r3, [r7, #12] 8022140: 2b00 cmp r3, #0 8022142: d10d bne.n 8022160 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): mallocing new DHCP client\n")); dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp)); 8022144: 2034 movs r0, #52 @ 0x34 8022146: f7f7 f8c9 bl 80192dc 802214a: 60f8 str r0, [r7, #12] if (dhcp == NULL) { 802214c: 68fb ldr r3, [r7, #12] 802214e: 2b00 cmp r3, #0 8022150: d102 bne.n 8022158 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not allocate dhcp\n")); return ERR_MEM; 8022152: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8022156: e037 b.n 80221c8 } /* store this dhcp client in the netif */ netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp); 8022158: 687b ldr r3, [r7, #4] 802215a: 68fa ldr r2, [r7, #12] 802215c: 625a str r2, [r3, #36] @ 0x24 802215e: e005 b.n 802216c 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) { 8022160: 68fb ldr r3, [r7, #12] 8022162: 791b ldrb r3, [r3, #4] 8022164: 2b00 cmp r3, #0 8022166: d001 beq.n 802216c dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ 8022168: f7ff fc8e bl 8021a88 } /* dhcp is cleared below, no need to reset flag*/ } /* clear data structure */ memset(dhcp, 0, sizeof(struct dhcp)); 802216c: 2234 movs r2, #52 @ 0x34 802216e: 2100 movs r1, #0 8022170: 68f8 ldr r0, [r7, #12] 8022172: f007 fdbd bl 8029cf0 /* 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 */ 8022176: f7ff fc35 bl 80219e4 802217a: 4603 mov r3, r0 802217c: 2b00 cmp r3, #0 802217e: d002 beq.n 8022186 return ERR_MEM; 8022180: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8022184: e020 b.n 80221c8 } dhcp->pcb_allocated = 1; 8022186: 68fb ldr r3, [r7, #12] 8022188: 2201 movs r2, #1 802218a: 711a strb r2, [r3, #4] if (!netif_is_link_up(netif)) { 802218c: 687b ldr r3, [r7, #4] 802218e: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8022192: f003 0304 and.w r3, r3, #4 8022196: 2b00 cmp r3, #0 8022198: d105 bne.n 80221a6 /* set state INIT and wait for dhcp_network_changed() to call dhcp_discover() */ dhcp_set_state(dhcp, DHCP_STATE_INIT); 802219a: 2102 movs r1, #2 802219c: 68f8 ldr r0, [r7, #12] 802219e: f000 fd0a bl 8022bb6 return ERR_OK; 80221a2: 2300 movs r3, #0 80221a4: e010 b.n 80221c8 } /* (re)start the DHCP negotiation */ result = dhcp_discover(netif); 80221a6: 6878 ldr r0, [r7, #4] 80221a8: f000 f8f8 bl 802239c 80221ac: 4603 mov r3, r0 80221ae: 72fb strb r3, [r7, #11] if (result != ERR_OK) { 80221b0: f997 300b ldrsb.w r3, [r7, #11] 80221b4: 2b00 cmp r3, #0 80221b6: d005 beq.n 80221c4 /* free resources allocated above */ dhcp_release_and_stop(netif); 80221b8: 6878 ldr r0, [r7, #4] 80221ba: f000 fc55 bl 8022a68 return ERR_MEM; 80221be: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80221c2: e001 b.n 80221c8 } return result; 80221c4: f997 300b ldrsb.w r3, [r7, #11] } 80221c8: 4618 mov r0, r3 80221ca: 3710 adds r7, #16 80221cc: 46bd mov sp, r7 80221ce: bd80 pop {r7, pc} 80221d0: 0802fe54 .word 0x0802fe54 80221d4: 0802ff38 .word 0x0802ff38 80221d8: 0802feb4 .word 0x0802feb4 80221dc: 0802ff7c .word 0x0802ff7c 080221e0 : * This enters the REBOOTING state to verify that the currently bound * address is still valid. */ void dhcp_network_changed(struct netif *netif) { 80221e0: b580 push {r7, lr} 80221e2: b084 sub sp, #16 80221e4: af00 add r7, sp, #0 80221e6: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 80221e8: 687b ldr r3, [r7, #4] 80221ea: 6a5b ldr r3, [r3, #36] @ 0x24 80221ec: 60fb str r3, [r7, #12] if (!dhcp) { 80221ee: 68fb ldr r3, [r7, #12] 80221f0: 2b00 cmp r3, #0 80221f2: d025 beq.n 8022240 return; } switch (dhcp->state) { 80221f4: 68fb ldr r3, [r7, #12] 80221f6: 795b ldrb r3, [r3, #5] 80221f8: 2b0a cmp r3, #10 80221fa: d008 beq.n 802220e 80221fc: 2b0a cmp r3, #10 80221fe: dc0d bgt.n 802221c 8022200: 2b00 cmp r3, #0 8022202: d01f beq.n 8022244 8022204: 2b00 cmp r3, #0 8022206: db09 blt.n 802221c 8022208: 3b03 subs r3, #3 802220a: 2b02 cmp r3, #2 802220c: d806 bhi.n 802221c case DHCP_STATE_REBINDING: case DHCP_STATE_RENEWING: case DHCP_STATE_BOUND: case DHCP_STATE_REBOOTING: dhcp->tries = 0; 802220e: 68fb ldr r3, [r7, #12] 8022210: 2200 movs r2, #0 8022212: 719a strb r2, [r3, #6] dhcp_reboot(netif); 8022214: 6878 ldr r0, [r7, #4] 8022216: f000 fb73 bl 8022900 break; 802221a: e014 b.n 8022246 case DHCP_STATE_OFF: /* stay off */ break; default: LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF); 802221c: 68fb ldr r3, [r7, #12] 802221e: 795b ldrb r3, [r3, #5] 8022220: 2b0c cmp r3, #12 8022222: d906 bls.n 8022232 8022224: 4b09 ldr r3, [pc, #36] @ (802224c ) 8022226: f240 326d movw r2, #877 @ 0x36d 802222a: 4909 ldr r1, [pc, #36] @ (8022250 ) 802222c: 4809 ldr r0, [pc, #36] @ (8022254 ) 802222e: f007 fbcd bl 80299cc 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; 8022232: 68fb ldr r3, [r7, #12] 8022234: 2200 movs r2, #0 8022236: 719a strb r2, [r3, #6] dhcp_discover(netif); 8022238: 6878 ldr r0, [r7, #4] 802223a: f000 f8af bl 802239c break; 802223e: e002 b.n 8022246 return; 8022240: bf00 nop 8022242: e000 b.n 8022246 break; 8022244: bf00 nop } } 8022246: 3710 adds r7, #16 8022248: 46bd mov sp, r7 802224a: bd80 pop {r7, pc} 802224c: 0802fe54 .word 0x0802fe54 8022250: 0802ffa0 .word 0x0802ffa0 8022254: 0802feb4 .word 0x0802feb4 08022258 : * @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) { 8022258: b580 push {r7, lr} 802225a: b084 sub sp, #16 802225c: af00 add r7, sp, #0 802225e: 6078 str r0, [r7, #4] 8022260: 6039 str r1, [r7, #0] struct dhcp *dhcp; LWIP_ERROR("netif != NULL", (netif != NULL), return;); 8022262: 687b ldr r3, [r7, #4] 8022264: 2b00 cmp r3, #0 8022266: d107 bne.n 8022278 8022268: 4b0e ldr r3, [pc, #56] @ (80222a4 ) 802226a: f240 328b movw r2, #907 @ 0x38b 802226e: 490e ldr r1, [pc, #56] @ (80222a8 ) 8022270: 480e ldr r0, [pc, #56] @ (80222ac ) 8022272: f007 fbab bl 80299cc 8022276: e012 b.n 802229e dhcp = netif_dhcp_data(netif); 8022278: 687b ldr r3, [r7, #4] 802227a: 6a5b ldr r3, [r3, #36] @ 0x24 802227c: 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)) { 802227e: 68fb ldr r3, [r7, #12] 8022280: 2b00 cmp r3, #0 8022282: d00c beq.n 802229e 8022284: 68fb ldr r3, [r7, #12] 8022286: 795b ldrb r3, [r3, #5] 8022288: 2b08 cmp r3, #8 802228a: d108 bne.n 802229e 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)) { 802228c: 683b ldr r3, [r7, #0] 802228e: 681a ldr r2, [r3, #0] 8022290: 68fb ldr r3, [r7, #12] 8022292: 69db ldr r3, [r3, #28] 8022294: 429a cmp r2, r3 8022296: d102 bne.n 802229e /* 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); 8022298: 6878 ldr r0, [r7, #4] 802229a: f000 f809 bl 80222b0 } } } 802229e: 3710 adds r7, #16 80222a0: 46bd mov sp, r7 80222a2: bd80 pop {r7, pc} 80222a4: 0802fe54 .word 0x0802fe54 80222a8: 0802ff38 .word 0x0802ff38 80222ac: 0802feb4 .word 0x0802feb4 080222b0 : * * @param netif the netif under DHCP control */ static err_t dhcp_decline(struct netif *netif) { 80222b0: b5b0 push {r4, r5, r7, lr} 80222b2: b08a sub sp, #40 @ 0x28 80222b4: af02 add r7, sp, #8 80222b6: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 80222b8: 687b ldr r3, [r7, #4] 80222ba: 6a5b ldr r3, [r3, #36] @ 0x24 80222bc: 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); 80222be: 210c movs r1, #12 80222c0: 69b8 ldr r0, [r7, #24] 80222c2: f000 fc78 bl 8022bb6 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_DECLINE, &options_out_len); 80222c6: f107 030c add.w r3, r7, #12 80222ca: 2204 movs r2, #4 80222cc: 69b9 ldr r1, [r7, #24] 80222ce: 6878 ldr r0, [r7, #4] 80222d0: f001 f90a bl 80234e8 80222d4: 6178 str r0, [r7, #20] if (p_out != NULL) { 80222d6: 697b ldr r3, [r7, #20] 80222d8: 2b00 cmp r3, #0 80222da: d035 beq.n 8022348 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 80222dc: 697b ldr r3, [r7, #20] 80222de: 685b ldr r3, [r3, #4] 80222e0: 613b str r3, [r7, #16] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4); 80222e2: 89b8 ldrh r0, [r7, #12] 80222e4: 693b ldr r3, [r7, #16] 80222e6: f103 01f0 add.w r1, r3, #240 @ 0xf0 80222ea: 2304 movs r3, #4 80222ec: 2232 movs r2, #50 @ 0x32 80222ee: f000 fc7d bl 8022bec 80222f2: 4603 mov r3, r0 80222f4: 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))); 80222f6: 89bc ldrh r4, [r7, #12] 80222f8: 693b ldr r3, [r7, #16] 80222fa: f103 05f0 add.w r5, r3, #240 @ 0xf0 80222fe: 69bb ldr r3, [r7, #24] 8022300: 69db ldr r3, [r3, #28] 8022302: 4618 mov r0, r3 8022304: f7f6 fc1d bl 8018b42 8022308: 4603 mov r3, r0 802230a: 461a mov r2, r3 802230c: 4629 mov r1, r5 802230e: 4620 mov r0, r4 8022310: f000 fcf8 bl 8022d04 8022314: 4603 mov r3, r0 8022316: 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); 8022318: 89b8 ldrh r0, [r7, #12] 802231a: 693b ldr r3, [r7, #16] 802231c: 33f0 adds r3, #240 @ 0xf0 802231e: 697a ldr r2, [r7, #20] 8022320: 4619 mov r1, r3 8022322: f001 f9b7 bl 8023694 /* 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); 8022326: 4b19 ldr r3, [pc, #100] @ (802238c ) 8022328: 6818 ldr r0, [r3, #0] 802232a: 4b19 ldr r3, [pc, #100] @ (8022390 ) 802232c: 9301 str r3, [sp, #4] 802232e: 687b ldr r3, [r7, #4] 8022330: 9300 str r3, [sp, #0] 8022332: 2343 movs r3, #67 @ 0x43 8022334: 4a17 ldr r2, [pc, #92] @ (8022394 ) 8022336: 6979 ldr r1, [r7, #20] 8022338: f7ff f88a bl 8021450 802233c: 4603 mov r3, r0 802233e: 77fb strb r3, [r7, #31] pbuf_free(p_out); 8022340: 6978 ldr r0, [r7, #20] 8022342: f7f8 f8cb bl 801a4dc 8022346: e001 b.n 802234c 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; 8022348: 23ff movs r3, #255 @ 0xff 802234a: 77fb strb r3, [r7, #31] } if (dhcp->tries < 255) { 802234c: 69bb ldr r3, [r7, #24] 802234e: 799b ldrb r3, [r3, #6] 8022350: 2bff cmp r3, #255 @ 0xff 8022352: d005 beq.n 8022360 dhcp->tries++; 8022354: 69bb ldr r3, [r7, #24] 8022356: 799b ldrb r3, [r3, #6] 8022358: 3301 adds r3, #1 802235a: b2da uxtb r2, r3 802235c: 69bb ldr r3, [r7, #24] 802235e: 719a strb r2, [r3, #6] } msecs = 10 * 1000; 8022360: f242 7310 movw r3, #10000 @ 0x2710 8022364: 81fb strh r3, [r7, #14] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 8022366: 89fb ldrh r3, [r7, #14] 8022368: f203 13f3 addw r3, r3, #499 @ 0x1f3 802236c: 4a0a ldr r2, [pc, #40] @ (8022398 ) 802236e: fb82 1203 smull r1, r2, r2, r3 8022372: 1152 asrs r2, r2, #5 8022374: 17db asrs r3, r3, #31 8022376: 1ad3 subs r3, r2, r3 8022378: b29a uxth r2, r3 802237a: 69bb ldr r3, [r7, #24] 802237c: 811a strh r2, [r3, #8] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline(): set request timeout %"U16_F" msecs\n", msecs)); return result; 802237e: f997 301f ldrsb.w r3, [r7, #31] } 8022382: 4618 mov r0, r3 8022384: 3720 adds r7, #32 8022386: 46bd mov sp, r7 8022388: bdb0 pop {r4, r5, r7, pc} 802238a: bf00 nop 802238c: 2402af14 .word 0x2402af14 8022390: 08030c10 .word 0x08030c10 8022394: 08030c14 .word 0x08030c14 8022398: 10624dd3 .word 0x10624dd3 0802239c : * * @param netif the netif under DHCP control */ static err_t dhcp_discover(struct netif *netif) { 802239c: b580 push {r7, lr} 802239e: b08a sub sp, #40 @ 0x28 80223a0: af02 add r7, sp, #8 80223a2: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 80223a4: 687b ldr r3, [r7, #4] 80223a6: 6a5b ldr r3, [r3, #36] @ 0x24 80223a8: 61bb str r3, [r7, #24] err_t result = ERR_OK; 80223aa: 2300 movs r3, #0 80223ac: 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); 80223ae: 69bb ldr r3, [r7, #24] 80223b0: 2200 movs r2, #0 80223b2: 61da str r2, [r3, #28] dhcp_set_state(dhcp, DHCP_STATE_SELECTING); 80223b4: 2106 movs r1, #6 80223b6: 69b8 ldr r0, [r7, #24] 80223b8: f000 fbfd bl 8022bb6 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER, &options_out_len); 80223bc: f107 0308 add.w r3, r7, #8 80223c0: 2201 movs r2, #1 80223c2: 69b9 ldr r1, [r7, #24] 80223c4: 6878 ldr r0, [r7, #4] 80223c6: f001 f88f bl 80234e8 80223ca: 6138 str r0, [r7, #16] if (p_out != NULL) { 80223cc: 693b ldr r3, [r7, #16] 80223ce: 2b00 cmp r3, #0 80223d0: d04b beq.n 802246a struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 80223d2: 693b ldr r3, [r7, #16] 80223d4: 685b ldr r3, [r3, #4] 80223d6: 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); 80223d8: 8938 ldrh r0, [r7, #8] 80223da: 68fb ldr r3, [r7, #12] 80223dc: f103 01f0 add.w r1, r3, #240 @ 0xf0 80223e0: 2302 movs r3, #2 80223e2: 2239 movs r2, #57 @ 0x39 80223e4: f000 fc02 bl 8022bec 80223e8: 4603 mov r3, r0 80223ea: 813b strh r3, [r7, #8] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 80223ec: 8938 ldrh r0, [r7, #8] 80223ee: 68fb ldr r3, [r7, #12] 80223f0: f103 01f0 add.w r1, r3, #240 @ 0xf0 80223f4: 687b ldr r3, [r7, #4] 80223f6: 8d1b ldrh r3, [r3, #40] @ 0x28 80223f8: 461a mov r2, r3 80223fa: f000 fc51 bl 8022ca0 80223fe: 4603 mov r3, r0 8022400: 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)); 8022402: 8938 ldrh r0, [r7, #8] 8022404: 68fb ldr r3, [r7, #12] 8022406: f103 01f0 add.w r1, r3, #240 @ 0xf0 802240a: 2303 movs r3, #3 802240c: 2237 movs r2, #55 @ 0x37 802240e: f000 fbed bl 8022bec 8022412: 4603 mov r3, r0 8022414: 813b strh r3, [r7, #8] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8022416: 2300 movs r3, #0 8022418: 77fb strb r3, [r7, #31] 802241a: e00e b.n 802243a options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 802241c: 8938 ldrh r0, [r7, #8] 802241e: 68fb ldr r3, [r7, #12] 8022420: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022424: 7ffb ldrb r3, [r7, #31] 8022426: 4a29 ldr r2, [pc, #164] @ (80224cc ) 8022428: 5cd3 ldrb r3, [r2, r3] 802242a: 461a mov r2, r3 802242c: f000 fc12 bl 8022c54 8022430: 4603 mov r3, r0 8022432: 813b strh r3, [r7, #8] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8022434: 7ffb ldrb r3, [r7, #31] 8022436: 3301 adds r3, #1 8022438: 77fb strb r3, [r7, #31] 802243a: 7ffb ldrb r3, [r7, #31] 802243c: 2b02 cmp r3, #2 802243e: d9ed bls.n 802241c } 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); 8022440: 8938 ldrh r0, [r7, #8] 8022442: 68fb ldr r3, [r7, #12] 8022444: 33f0 adds r3, #240 @ 0xf0 8022446: 693a ldr r2, [r7, #16] 8022448: 4619 mov r1, r3 802244a: f001 f923 bl 8023694 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); 802244e: 4b20 ldr r3, [pc, #128] @ (80224d0 ) 8022450: 6818 ldr r0, [r3, #0] 8022452: 4b20 ldr r3, [pc, #128] @ (80224d4 ) 8022454: 9301 str r3, [sp, #4] 8022456: 687b ldr r3, [r7, #4] 8022458: 9300 str r3, [sp, #0] 802245a: 2343 movs r3, #67 @ 0x43 802245c: 4a1e ldr r2, [pc, #120] @ (80224d8 ) 802245e: 6939 ldr r1, [r7, #16] 8022460: f7fe fff6 bl 8021450 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n")); pbuf_free(p_out); 8022464: 6938 ldr r0, [r7, #16] 8022466: f7f8 f839 bl 801a4dc 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) { 802246a: 69bb ldr r3, [r7, #24] 802246c: 799b ldrb r3, [r3, #6] 802246e: 2bff cmp r3, #255 @ 0xff 8022470: d005 beq.n 802247e dhcp->tries++; 8022472: 69bb ldr r3, [r7, #24] 8022474: 799b ldrb r3, [r3, #6] 8022476: 3301 adds r3, #1 8022478: b2da uxtb r2, r3 802247a: 69bb ldr r3, [r7, #24] 802247c: 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); 802247e: 69bb ldr r3, [r7, #24] 8022480: 799b ldrb r3, [r3, #6] 8022482: 2b05 cmp r3, #5 8022484: d80d bhi.n 80224a2 8022486: 69bb ldr r3, [r7, #24] 8022488: 799b ldrb r3, [r3, #6] 802248a: 461a mov r2, r3 802248c: 2301 movs r3, #1 802248e: 4093 lsls r3, r2 8022490: b29b uxth r3, r3 8022492: 461a mov r2, r3 8022494: 0152 lsls r2, r2, #5 8022496: 1ad2 subs r2, r2, r3 8022498: 0092 lsls r2, r2, #2 802249a: 4413 add r3, r2 802249c: 00db lsls r3, r3, #3 802249e: b29b uxth r3, r3 80224a0: e001 b.n 80224a6 80224a2: f64e 2360 movw r3, #60000 @ 0xea60 80224a6: 817b strh r3, [r7, #10] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 80224a8: 897b ldrh r3, [r7, #10] 80224aa: f203 13f3 addw r3, r3, #499 @ 0x1f3 80224ae: 4a0b ldr r2, [pc, #44] @ (80224dc ) 80224b0: fb82 1203 smull r1, r2, r2, r3 80224b4: 1152 asrs r2, r2, #5 80224b6: 17db asrs r3, r3, #31 80224b8: 1ad3 subs r3, r2, r3 80224ba: b29a uxth r2, r3 80224bc: 69bb ldr r3, [r7, #24] 80224be: 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; 80224c0: f997 3017 ldrsb.w r3, [r7, #23] } 80224c4: 4618 mov r0, r3 80224c6: 3720 adds r7, #32 80224c8: 46bd mov sp, r7 80224ca: bd80 pop {r7, pc} 80224cc: 24000058 .word 0x24000058 80224d0: 2402af14 .word 0x2402af14 80224d4: 08030c10 .word 0x08030c10 80224d8: 08030c14 .word 0x08030c14 80224dc: 10624dd3 .word 0x10624dd3 080224e0 : * * @param netif network interface to bind to the offered address */ static void dhcp_bind(struct netif *netif) { 80224e0: b580 push {r7, lr} 80224e2: b088 sub sp, #32 80224e4: af00 add r7, sp, #0 80224e6: 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;); 80224e8: 687b ldr r3, [r7, #4] 80224ea: 2b00 cmp r3, #0 80224ec: d107 bne.n 80224fe 80224ee: 4b64 ldr r3, [pc, #400] @ (8022680 ) 80224f0: f240 4215 movw r2, #1045 @ 0x415 80224f4: 4963 ldr r1, [pc, #396] @ (8022684 ) 80224f6: 4864 ldr r0, [pc, #400] @ (8022688 ) 80224f8: f007 fa68 bl 80299cc 80224fc: e0bc b.n 8022678 dhcp = netif_dhcp_data(netif); 80224fe: 687b ldr r3, [r7, #4] 8022500: 6a5b ldr r3, [r3, #36] @ 0x24 8022502: 61fb str r3, [r7, #28] LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); 8022504: 69fb ldr r3, [r7, #28] 8022506: 2b00 cmp r3, #0 8022508: d107 bne.n 802251a 802250a: 4b5d ldr r3, [pc, #372] @ (8022680 ) 802250c: f240 4217 movw r2, #1047 @ 0x417 8022510: 495e ldr r1, [pc, #376] @ (802268c ) 8022512: 485d ldr r0, [pc, #372] @ (8022688 ) 8022514: f007 fa5a bl 80299cc 8022518: e0ae b.n 8022678 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; 802251a: 69fb ldr r3, [r7, #28] 802251c: 2200 movs r2, #0 802251e: 825a strh r2, [r3, #18] if (dhcp->offered_t0_lease != 0xffffffffUL) { 8022520: 69fb ldr r3, [r7, #28] 8022522: 6a9b ldr r3, [r3, #40] @ 0x28 8022524: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8022528: d019 beq.n 802255e /* 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; 802252a: 69fb ldr r3, [r7, #28] 802252c: 6a9b ldr r3, [r3, #40] @ 0x28 802252e: 331e adds r3, #30 8022530: 4a57 ldr r2, [pc, #348] @ (8022690 ) 8022532: fba2 2303 umull r2, r3, r2, r3 8022536: 095b lsrs r3, r3, #5 8022538: 61bb str r3, [r7, #24] if (timeout > 0xffff) { 802253a: 69bb ldr r3, [r7, #24] 802253c: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8022540: d302 bcc.n 8022548 timeout = 0xffff; 8022542: f64f 73ff movw r3, #65535 @ 0xffff 8022546: 61bb str r3, [r7, #24] } dhcp->t0_timeout = (u16_t)timeout; 8022548: 69bb ldr r3, [r7, #24] 802254a: b29a uxth r2, r3 802254c: 69fb ldr r3, [r7, #28] 802254e: 829a strh r2, [r3, #20] if (dhcp->t0_timeout == 0) { 8022550: 69fb ldr r3, [r7, #28] 8022552: 8a9b ldrh r3, [r3, #20] 8022554: 2b00 cmp r3, #0 8022556: d102 bne.n 802255e dhcp->t0_timeout = 1; 8022558: 69fb ldr r3, [r7, #28] 802255a: 2201 movs r2, #1 802255c: 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) { 802255e: 69fb ldr r3, [r7, #28] 8022560: 6adb ldr r3, [r3, #44] @ 0x2c 8022562: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8022566: d01d beq.n 80225a4 /* 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; 8022568: 69fb ldr r3, [r7, #28] 802256a: 6adb ldr r3, [r3, #44] @ 0x2c 802256c: 331e adds r3, #30 802256e: 4a48 ldr r2, [pc, #288] @ (8022690 ) 8022570: fba2 2303 umull r2, r3, r2, r3 8022574: 095b lsrs r3, r3, #5 8022576: 61bb str r3, [r7, #24] if (timeout > 0xffff) { 8022578: 69bb ldr r3, [r7, #24] 802257a: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 802257e: d302 bcc.n 8022586 timeout = 0xffff; 8022580: f64f 73ff movw r3, #65535 @ 0xffff 8022584: 61bb str r3, [r7, #24] } dhcp->t1_timeout = (u16_t)timeout; 8022586: 69bb ldr r3, [r7, #24] 8022588: b29a uxth r2, r3 802258a: 69fb ldr r3, [r7, #28] 802258c: 815a strh r2, [r3, #10] if (dhcp->t1_timeout == 0) { 802258e: 69fb ldr r3, [r7, #28] 8022590: 895b ldrh r3, [r3, #10] 8022592: 2b00 cmp r3, #0 8022594: d102 bne.n 802259c dhcp->t1_timeout = 1; 8022596: 69fb ldr r3, [r7, #28] 8022598: 2201 movs r2, #1 802259a: 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; 802259c: 69fb ldr r3, [r7, #28] 802259e: 895a ldrh r2, [r3, #10] 80225a0: 69fb ldr r3, [r7, #28] 80225a2: 81da strh r2, [r3, #14] } /* set renewal period timer */ if (dhcp->offered_t2_rebind != 0xffffffffUL) { 80225a4: 69fb ldr r3, [r7, #28] 80225a6: 6b1b ldr r3, [r3, #48] @ 0x30 80225a8: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80225ac: d01d beq.n 80225ea 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; 80225ae: 69fb ldr r3, [r7, #28] 80225b0: 6b1b ldr r3, [r3, #48] @ 0x30 80225b2: 331e adds r3, #30 80225b4: 4a36 ldr r2, [pc, #216] @ (8022690 ) 80225b6: fba2 2303 umull r2, r3, r2, r3 80225ba: 095b lsrs r3, r3, #5 80225bc: 61bb str r3, [r7, #24] if (timeout > 0xffff) { 80225be: 69bb ldr r3, [r7, #24] 80225c0: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 80225c4: d302 bcc.n 80225cc timeout = 0xffff; 80225c6: f64f 73ff movw r3, #65535 @ 0xffff 80225ca: 61bb str r3, [r7, #24] } dhcp->t2_timeout = (u16_t)timeout; 80225cc: 69bb ldr r3, [r7, #24] 80225ce: b29a uxth r2, r3 80225d0: 69fb ldr r3, [r7, #28] 80225d2: 819a strh r2, [r3, #12] if (dhcp->t2_timeout == 0) { 80225d4: 69fb ldr r3, [r7, #28] 80225d6: 899b ldrh r3, [r3, #12] 80225d8: 2b00 cmp r3, #0 80225da: d102 bne.n 80225e2 dhcp->t2_timeout = 1; 80225dc: 69fb ldr r3, [r7, #28] 80225de: 2201 movs r2, #1 80225e0: 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; 80225e2: 69fb ldr r3, [r7, #28] 80225e4: 899a ldrh r2, [r3, #12] 80225e6: 69fb ldr r3, [r7, #28] 80225e8: 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)) { 80225ea: 69fb ldr r3, [r7, #28] 80225ec: 895a ldrh r2, [r3, #10] 80225ee: 69fb ldr r3, [r7, #28] 80225f0: 899b ldrh r3, [r3, #12] 80225f2: 429a cmp r2, r3 80225f4: d306 bcc.n 8022604 80225f6: 69fb ldr r3, [r7, #28] 80225f8: 899b ldrh r3, [r3, #12] 80225fa: 2b00 cmp r3, #0 80225fc: d002 beq.n 8022604 dhcp->t1_timeout = 0; 80225fe: 69fb ldr r3, [r7, #28] 8022600: 2200 movs r2, #0 8022602: 815a strh r2, [r3, #10] } if (dhcp->subnet_mask_given) { 8022604: 69fb ldr r3, [r7, #28] 8022606: 79db ldrb r3, [r3, #7] 8022608: 2b00 cmp r3, #0 802260a: d003 beq.n 8022614 /* copy offered network mask */ ip4_addr_copy(sn_mask, dhcp->offered_sn_mask); 802260c: 69fb ldr r3, [r7, #28] 802260e: 6a1b ldr r3, [r3, #32] 8022610: 613b str r3, [r7, #16] 8022612: e014 b.n 802263e } else { /* subnet mask not given, choose a safe subnet mask given the network class */ u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr); 8022614: 69fb ldr r3, [r7, #28] 8022616: 331c adds r3, #28 8022618: 781b ldrb r3, [r3, #0] 802261a: 75fb strb r3, [r7, #23] if (first_octet <= 127) { 802261c: f997 3017 ldrsb.w r3, [r7, #23] 8022620: 2b00 cmp r3, #0 8022622: db02 blt.n 802262a ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL)); 8022624: 23ff movs r3, #255 @ 0xff 8022626: 613b str r3, [r7, #16] 8022628: e009 b.n 802263e } else if (first_octet >= 192) { 802262a: 7dfb ldrb r3, [r7, #23] 802262c: 2bbf cmp r3, #191 @ 0xbf 802262e: d903 bls.n 8022638 ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL)); 8022630: f06f 437f mvn.w r3, #4278190080 @ 0xff000000 8022634: 613b str r3, [r7, #16] 8022636: e002 b.n 802263e } else { ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL)); 8022638: f64f 73ff movw r3, #65535 @ 0xffff 802263c: 613b str r3, [r7, #16] } } ip4_addr_copy(gw_addr, dhcp->offered_gw_addr); 802263e: 69fb ldr r3, [r7, #28] 8022640: 6a5b ldr r3, [r3, #36] @ 0x24 8022642: 60fb str r3, [r7, #12] /* gateway address not given? */ if (ip4_addr_isany_val(gw_addr)) { 8022644: 68fb ldr r3, [r7, #12] 8022646: 2b00 cmp r3, #0 8022648: d108 bne.n 802265c /* copy network address */ ip4_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask); 802264a: 69fb ldr r3, [r7, #28] 802264c: 69da ldr r2, [r3, #28] 802264e: 693b ldr r3, [r7, #16] 8022650: 4013 ands r3, r2 8022652: 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)); 8022654: 68fb ldr r3, [r7, #12] 8022656: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000 802265a: 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); 802265c: 210a movs r1, #10 802265e: 69f8 ldr r0, [r7, #28] 8022660: f000 faa9 bl 8022bb6 netif_set_addr(netif, &dhcp->offered_ip_addr, &sn_mask, &gw_addr); 8022664: 69fb ldr r3, [r7, #28] 8022666: f103 011c add.w r1, r3, #28 802266a: f107 030c add.w r3, r7, #12 802266e: f107 0210 add.w r2, r7, #16 8022672: 6878 ldr r0, [r7, #4] 8022674: f7f7 f9e8 bl 8019a48 /* interface is used by routing now that an address is set */ } 8022678: 3720 adds r7, #32 802267a: 46bd mov sp, r7 802267c: bd80 pop {r7, pc} 802267e: bf00 nop 8022680: 0802fe54 .word 0x0802fe54 8022684: 0802ffb4 .word 0x0802ffb4 8022688: 0802feb4 .word 0x0802feb4 802268c: 0802ffd0 .word 0x0802ffd0 8022690: 88888889 .word 0x88888889 08022694 : * * @param netif network interface which must renew its lease */ err_t dhcp_renew(struct netif *netif) { 8022694: b580 push {r7, lr} 8022696: b08a sub sp, #40 @ 0x28 8022698: af02 add r7, sp, #8 802269a: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 802269c: 687b ldr r3, [r7, #4] 802269e: 6a5b ldr r3, [r3, #36] @ 0x24 80226a0: 61bb str r3, [r7, #24] u16_t msecs; u8_t i; struct pbuf *p_out; u16_t options_out_len; LWIP_ASSERT_CORE_LOCKED(); 80226a2: f7ed ff45 bl 8010530 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_renew()\n")); dhcp_set_state(dhcp, DHCP_STATE_RENEWING); 80226a6: 2105 movs r1, #5 80226a8: 69b8 ldr r0, [r7, #24] 80226aa: f000 fa84 bl 8022bb6 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 80226ae: f107 030c add.w r3, r7, #12 80226b2: 2203 movs r2, #3 80226b4: 69b9 ldr r1, [r7, #24] 80226b6: 6878 ldr r0, [r7, #4] 80226b8: f000 ff16 bl 80234e8 80226bc: 6178 str r0, [r7, #20] if (p_out != NULL) { 80226be: 697b ldr r3, [r7, #20] 80226c0: 2b00 cmp r3, #0 80226c2: d04e beq.n 8022762 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 80226c4: 697b ldr r3, [r7, #20] 80226c6: 685b ldr r3, [r3, #4] 80226c8: 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); 80226ca: 89b8 ldrh r0, [r7, #12] 80226cc: 693b ldr r3, [r7, #16] 80226ce: f103 01f0 add.w r1, r3, #240 @ 0xf0 80226d2: 2302 movs r3, #2 80226d4: 2239 movs r2, #57 @ 0x39 80226d6: f000 fa89 bl 8022bec 80226da: 4603 mov r3, r0 80226dc: 81bb strh r3, [r7, #12] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 80226de: 89b8 ldrh r0, [r7, #12] 80226e0: 693b ldr r3, [r7, #16] 80226e2: f103 01f0 add.w r1, r3, #240 @ 0xf0 80226e6: 687b ldr r3, [r7, #4] 80226e8: 8d1b ldrh r3, [r3, #40] @ 0x28 80226ea: 461a mov r2, r3 80226ec: f000 fad8 bl 8022ca0 80226f0: 4603 mov r3, r0 80226f2: 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)); 80226f4: 89b8 ldrh r0, [r7, #12] 80226f6: 693b ldr r3, [r7, #16] 80226f8: f103 01f0 add.w r1, r3, #240 @ 0xf0 80226fc: 2303 movs r3, #3 80226fe: 2237 movs r2, #55 @ 0x37 8022700: f000 fa74 bl 8022bec 8022704: 4603 mov r3, r0 8022706: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8022708: 2300 movs r3, #0 802270a: 77bb strb r3, [r7, #30] 802270c: e00e b.n 802272c options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 802270e: 89b8 ldrh r0, [r7, #12] 8022710: 693b ldr r3, [r7, #16] 8022712: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022716: 7fbb ldrb r3, [r7, #30] 8022718: 4a29 ldr r2, [pc, #164] @ (80227c0 ) 802271a: 5cd3 ldrb r3, [r2, r3] 802271c: 461a mov r2, r3 802271e: f000 fa99 bl 8022c54 8022722: 4603 mov r3, r0 8022724: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8022726: 7fbb ldrb r3, [r7, #30] 8022728: 3301 adds r3, #1 802272a: 77bb strb r3, [r7, #30] 802272c: 7fbb ldrb r3, [r7, #30] 802272e: 2b02 cmp r3, #2 8022730: d9ed bls.n 802270e #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); 8022732: 89b8 ldrh r0, [r7, #12] 8022734: 693b ldr r3, [r7, #16] 8022736: 33f0 adds r3, #240 @ 0xf0 8022738: 697a ldr r2, [r7, #20] 802273a: 4619 mov r1, r3 802273c: f000 ffaa bl 8023694 result = udp_sendto_if(dhcp_pcb, p_out, &dhcp->server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif); 8022740: 4b20 ldr r3, [pc, #128] @ (80227c4 ) 8022742: 6818 ldr r0, [r3, #0] 8022744: 69bb ldr r3, [r7, #24] 8022746: f103 0218 add.w r2, r3, #24 802274a: 687b ldr r3, [r7, #4] 802274c: 9300 str r3, [sp, #0] 802274e: 2343 movs r3, #67 @ 0x43 8022750: 6979 ldr r1, [r7, #20] 8022752: f7fe fe09 bl 8021368 8022756: 4603 mov r3, r0 8022758: 77fb strb r3, [r7, #31] pbuf_free(p_out); 802275a: 6978 ldr r0, [r7, #20] 802275c: f7f7 febe bl 801a4dc 8022760: e001 b.n 8022766 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; 8022762: 23ff movs r3, #255 @ 0xff 8022764: 77fb strb r3, [r7, #31] } if (dhcp->tries < 255) { 8022766: 69bb ldr r3, [r7, #24] 8022768: 799b ldrb r3, [r3, #6] 802276a: 2bff cmp r3, #255 @ 0xff 802276c: d005 beq.n 802277a dhcp->tries++; 802276e: 69bb ldr r3, [r7, #24] 8022770: 799b ldrb r3, [r3, #6] 8022772: 3301 adds r3, #1 8022774: b2da uxtb r2, r3 8022776: 69bb ldr r3, [r7, #24] 8022778: 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); 802277a: 69bb ldr r3, [r7, #24] 802277c: 799b ldrb r3, [r3, #6] 802277e: 2b09 cmp r3, #9 8022780: d809 bhi.n 8022796 8022782: 69bb ldr r3, [r7, #24] 8022784: 799b ldrb r3, [r3, #6] 8022786: 461a mov r2, r3 8022788: 0152 lsls r2, r2, #5 802278a: 1ad2 subs r2, r2, r3 802278c: 0092 lsls r2, r2, #2 802278e: 4413 add r3, r2 8022790: 011b lsls r3, r3, #4 8022792: b29b uxth r3, r3 8022794: e001 b.n 802279a 8022796: f644 6320 movw r3, #20000 @ 0x4e20 802279a: 81fb strh r3, [r7, #14] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 802279c: 89fb ldrh r3, [r7, #14] 802279e: f203 13f3 addw r3, r3, #499 @ 0x1f3 80227a2: 4a09 ldr r2, [pc, #36] @ (80227c8 ) 80227a4: fb82 1203 smull r1, r2, r2, r3 80227a8: 1152 asrs r2, r2, #5 80227aa: 17db asrs r3, r3, #31 80227ac: 1ad3 subs r3, r2, r3 80227ae: b29a uxth r2, r3 80227b0: 69bb ldr r3, [r7, #24] 80227b2: 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; 80227b4: f997 301f ldrsb.w r3, [r7, #31] } 80227b8: 4618 mov r0, r3 80227ba: 3720 adds r7, #32 80227bc: 46bd mov sp, r7 80227be: bd80 pop {r7, pc} 80227c0: 24000058 .word 0x24000058 80227c4: 2402af14 .word 0x2402af14 80227c8: 10624dd3 .word 0x10624dd3 080227cc : * * @param netif network interface which must rebind with a DHCP server */ static err_t dhcp_rebind(struct netif *netif) { 80227cc: b580 push {r7, lr} 80227ce: b08a sub sp, #40 @ 0x28 80227d0: af02 add r7, sp, #8 80227d2: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 80227d4: 687b ldr r3, [r7, #4] 80227d6: 6a5b ldr r3, [r3, #36] @ 0x24 80227d8: 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); 80227da: 2104 movs r1, #4 80227dc: 69b8 ldr r0, [r7, #24] 80227de: f000 f9ea bl 8022bb6 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 80227e2: f107 030c add.w r3, r7, #12 80227e6: 2203 movs r2, #3 80227e8: 69b9 ldr r1, [r7, #24] 80227ea: 6878 ldr r0, [r7, #4] 80227ec: f000 fe7c bl 80234e8 80227f0: 6178 str r0, [r7, #20] if (p_out != NULL) { 80227f2: 697b ldr r3, [r7, #20] 80227f4: 2b00 cmp r3, #0 80227f6: d04c beq.n 8022892 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 80227f8: 697b ldr r3, [r7, #20] 80227fa: 685b ldr r3, [r3, #4] 80227fc: 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); 80227fe: 89b8 ldrh r0, [r7, #12] 8022800: 693b ldr r3, [r7, #16] 8022802: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022806: 2302 movs r3, #2 8022808: 2239 movs r2, #57 @ 0x39 802280a: f000 f9ef bl 8022bec 802280e: 4603 mov r3, r0 8022810: 81bb strh r3, [r7, #12] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 8022812: 89b8 ldrh r0, [r7, #12] 8022814: 693b ldr r3, [r7, #16] 8022816: f103 01f0 add.w r1, r3, #240 @ 0xf0 802281a: 687b ldr r3, [r7, #4] 802281c: 8d1b ldrh r3, [r3, #40] @ 0x28 802281e: 461a mov r2, r3 8022820: f000 fa3e bl 8022ca0 8022824: 4603 mov r3, r0 8022826: 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)); 8022828: 89b8 ldrh r0, [r7, #12] 802282a: 693b ldr r3, [r7, #16] 802282c: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022830: 2303 movs r3, #3 8022832: 2237 movs r2, #55 @ 0x37 8022834: f000 f9da bl 8022bec 8022838: 4603 mov r3, r0 802283a: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 802283c: 2300 movs r3, #0 802283e: 77bb strb r3, [r7, #30] 8022840: e00e b.n 8022860 options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 8022842: 89b8 ldrh r0, [r7, #12] 8022844: 693b ldr r3, [r7, #16] 8022846: f103 01f0 add.w r1, r3, #240 @ 0xf0 802284a: 7fbb ldrb r3, [r7, #30] 802284c: 4a28 ldr r2, [pc, #160] @ (80228f0 ) 802284e: 5cd3 ldrb r3, [r2, r3] 8022850: 461a mov r2, r3 8022852: f000 f9ff bl 8022c54 8022856: 4603 mov r3, r0 8022858: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 802285a: 7fbb ldrb r3, [r7, #30] 802285c: 3301 adds r3, #1 802285e: 77bb strb r3, [r7, #30] 8022860: 7fbb ldrb r3, [r7, #30] 8022862: 2b02 cmp r3, #2 8022864: d9ed bls.n 8022842 #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); 8022866: 89b8 ldrh r0, [r7, #12] 8022868: 693b ldr r3, [r7, #16] 802286a: 33f0 adds r3, #240 @ 0xf0 802286c: 697a ldr r2, [r7, #20] 802286e: 4619 mov r1, r3 8022870: f000 ff10 bl 8023694 /* broadcast to server */ result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif); 8022874: 4b1f ldr r3, [pc, #124] @ (80228f4 ) 8022876: 6818 ldr r0, [r3, #0] 8022878: 687b ldr r3, [r7, #4] 802287a: 9300 str r3, [sp, #0] 802287c: 2343 movs r3, #67 @ 0x43 802287e: 4a1e ldr r2, [pc, #120] @ (80228f8 ) 8022880: 6979 ldr r1, [r7, #20] 8022882: f7fe fd71 bl 8021368 8022886: 4603 mov r3, r0 8022888: 77fb strb r3, [r7, #31] pbuf_free(p_out); 802288a: 6978 ldr r0, [r7, #20] 802288c: f7f7 fe26 bl 801a4dc 8022890: e001 b.n 8022896 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; 8022892: 23ff movs r3, #255 @ 0xff 8022894: 77fb strb r3, [r7, #31] } if (dhcp->tries < 255) { 8022896: 69bb ldr r3, [r7, #24] 8022898: 799b ldrb r3, [r3, #6] 802289a: 2bff cmp r3, #255 @ 0xff 802289c: d005 beq.n 80228aa dhcp->tries++; 802289e: 69bb ldr r3, [r7, #24] 80228a0: 799b ldrb r3, [r3, #6] 80228a2: 3301 adds r3, #1 80228a4: b2da uxtb r2, r3 80228a6: 69bb ldr r3, [r7, #24] 80228a8: 719a strb r2, [r3, #6] } msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000); 80228aa: 69bb ldr r3, [r7, #24] 80228ac: 799b ldrb r3, [r3, #6] 80228ae: 2b09 cmp r3, #9 80228b0: d809 bhi.n 80228c6 80228b2: 69bb ldr r3, [r7, #24] 80228b4: 799b ldrb r3, [r3, #6] 80228b6: 461a mov r2, r3 80228b8: 0152 lsls r2, r2, #5 80228ba: 1ad2 subs r2, r2, r3 80228bc: 0092 lsls r2, r2, #2 80228be: 4413 add r3, r2 80228c0: 00db lsls r3, r3, #3 80228c2: b29b uxth r3, r3 80228c4: e001 b.n 80228ca 80228c6: f242 7310 movw r3, #10000 @ 0x2710 80228ca: 81fb strh r3, [r7, #14] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 80228cc: 89fb ldrh r3, [r7, #14] 80228ce: f203 13f3 addw r3, r3, #499 @ 0x1f3 80228d2: 4a0a ldr r2, [pc, #40] @ (80228fc ) 80228d4: fb82 1203 smull r1, r2, r2, r3 80228d8: 1152 asrs r2, r2, #5 80228da: 17db asrs r3, r3, #31 80228dc: 1ad3 subs r3, r2, r3 80228de: b29a uxth r2, r3 80228e0: 69bb ldr r3, [r7, #24] 80228e2: 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; 80228e4: f997 301f ldrsb.w r3, [r7, #31] } 80228e8: 4618 mov r0, r3 80228ea: 3720 adds r7, #32 80228ec: 46bd mov sp, r7 80228ee: bd80 pop {r7, pc} 80228f0: 24000058 .word 0x24000058 80228f4: 2402af14 .word 0x2402af14 80228f8: 08030c14 .word 0x08030c14 80228fc: 10624dd3 .word 0x10624dd3 08022900 : * * @param netif network interface which must reboot */ static err_t dhcp_reboot(struct netif *netif) { 8022900: b5b0 push {r4, r5, r7, lr} 8022902: b08a sub sp, #40 @ 0x28 8022904: af02 add r7, sp, #8 8022906: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8022908: 687b ldr r3, [r7, #4] 802290a: 6a5b ldr r3, [r3, #36] @ 0x24 802290c: 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); 802290e: 2103 movs r1, #3 8022910: 69b8 ldr r0, [r7, #24] 8022912: f000 f950 bl 8022bb6 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 8022916: f107 030c add.w r3, r7, #12 802291a: 2203 movs r2, #3 802291c: 69b9 ldr r1, [r7, #24] 802291e: 6878 ldr r0, [r7, #4] 8022920: f000 fde2 bl 80234e8 8022924: 6178 str r0, [r7, #20] if (p_out != NULL) { 8022926: 697b ldr r3, [r7, #20] 8022928: 2b00 cmp r3, #0 802292a: d066 beq.n 80229fa struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 802292c: 697b ldr r3, [r7, #20] 802292e: 685b ldr r3, [r3, #4] 8022930: 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); 8022932: 89b8 ldrh r0, [r7, #12] 8022934: 693b ldr r3, [r7, #16] 8022936: f103 01f0 add.w r1, r3, #240 @ 0xf0 802293a: 2302 movs r3, #2 802293c: 2239 movs r2, #57 @ 0x39 802293e: f000 f955 bl 8022bec 8022942: 4603 mov r3, r0 8022944: 81bb strh r3, [r7, #12] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN_MIN_REQUIRED); 8022946: 89b8 ldrh r0, [r7, #12] 8022948: 693b ldr r3, [r7, #16] 802294a: 33f0 adds r3, #240 @ 0xf0 802294c: f44f 7210 mov.w r2, #576 @ 0x240 8022950: 4619 mov r1, r3 8022952: f000 f9a5 bl 8022ca0 8022956: 4603 mov r3, r0 8022958: 81bb strh r3, [r7, #12] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4); 802295a: 89b8 ldrh r0, [r7, #12] 802295c: 693b ldr r3, [r7, #16] 802295e: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022962: 2304 movs r3, #4 8022964: 2232 movs r2, #50 @ 0x32 8022966: f000 f941 bl 8022bec 802296a: 4603 mov r3, r0 802296c: 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))); 802296e: 89bc ldrh r4, [r7, #12] 8022970: 693b ldr r3, [r7, #16] 8022972: f103 05f0 add.w r5, r3, #240 @ 0xf0 8022976: 69bb ldr r3, [r7, #24] 8022978: 69db ldr r3, [r3, #28] 802297a: 4618 mov r0, r3 802297c: f7f6 f8e1 bl 8018b42 8022980: 4603 mov r3, r0 8022982: 461a mov r2, r3 8022984: 4629 mov r1, r5 8022986: 4620 mov r0, r4 8022988: f000 f9bc bl 8022d04 802298c: 4603 mov r3, r0 802298e: 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)); 8022990: 89b8 ldrh r0, [r7, #12] 8022992: 693b ldr r3, [r7, #16] 8022994: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022998: 2303 movs r3, #3 802299a: 2237 movs r2, #55 @ 0x37 802299c: f000 f926 bl 8022bec 80229a0: 4603 mov r3, r0 80229a2: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 80229a4: 2300 movs r3, #0 80229a6: 77bb strb r3, [r7, #30] 80229a8: e00e b.n 80229c8 options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 80229aa: 89b8 ldrh r0, [r7, #12] 80229ac: 693b ldr r3, [r7, #16] 80229ae: f103 01f0 add.w r1, r3, #240 @ 0xf0 80229b2: 7fbb ldrb r3, [r7, #30] 80229b4: 4a28 ldr r2, [pc, #160] @ (8022a58 ) 80229b6: 5cd3 ldrb r3, [r2, r3] 80229b8: 461a mov r2, r3 80229ba: f000 f94b bl 8022c54 80229be: 4603 mov r3, r0 80229c0: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 80229c2: 7fbb ldrb r3, [r7, #30] 80229c4: 3301 adds r3, #1 80229c6: 77bb strb r3, [r7, #30] 80229c8: 7fbb ldrb r3, [r7, #30] 80229ca: 2b02 cmp r3, #2 80229cc: d9ed bls.n 80229aa #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); 80229ce: 89b8 ldrh r0, [r7, #12] 80229d0: 693b ldr r3, [r7, #16] 80229d2: 33f0 adds r3, #240 @ 0xf0 80229d4: 697a ldr r2, [r7, #20] 80229d6: 4619 mov r1, r3 80229d8: f000 fe5c bl 8023694 /* broadcast to server */ result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif); 80229dc: 4b1f ldr r3, [pc, #124] @ (8022a5c ) 80229de: 6818 ldr r0, [r3, #0] 80229e0: 687b ldr r3, [r7, #4] 80229e2: 9300 str r3, [sp, #0] 80229e4: 2343 movs r3, #67 @ 0x43 80229e6: 4a1e ldr r2, [pc, #120] @ (8022a60 ) 80229e8: 6979 ldr r1, [r7, #20] 80229ea: f7fe fcbd bl 8021368 80229ee: 4603 mov r3, r0 80229f0: 77fb strb r3, [r7, #31] pbuf_free(p_out); 80229f2: 6978 ldr r0, [r7, #20] 80229f4: f7f7 fd72 bl 801a4dc 80229f8: e001 b.n 80229fe 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; 80229fa: 23ff movs r3, #255 @ 0xff 80229fc: 77fb strb r3, [r7, #31] } if (dhcp->tries < 255) { 80229fe: 69bb ldr r3, [r7, #24] 8022a00: 799b ldrb r3, [r3, #6] 8022a02: 2bff cmp r3, #255 @ 0xff 8022a04: d005 beq.n 8022a12 dhcp->tries++; 8022a06: 69bb ldr r3, [r7, #24] 8022a08: 799b ldrb r3, [r3, #6] 8022a0a: 3301 adds r3, #1 8022a0c: b2da uxtb r2, r3 8022a0e: 69bb ldr r3, [r7, #24] 8022a10: 719a strb r2, [r3, #6] } msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000); 8022a12: 69bb ldr r3, [r7, #24] 8022a14: 799b ldrb r3, [r3, #6] 8022a16: 2b09 cmp r3, #9 8022a18: d809 bhi.n 8022a2e 8022a1a: 69bb ldr r3, [r7, #24] 8022a1c: 799b ldrb r3, [r3, #6] 8022a1e: 461a mov r2, r3 8022a20: 0152 lsls r2, r2, #5 8022a22: 1ad2 subs r2, r2, r3 8022a24: 0092 lsls r2, r2, #2 8022a26: 4413 add r3, r2 8022a28: 00db lsls r3, r3, #3 8022a2a: b29b uxth r3, r3 8022a2c: e001 b.n 8022a32 8022a2e: f242 7310 movw r3, #10000 @ 0x2710 8022a32: 81fb strh r3, [r7, #14] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 8022a34: 89fb ldrh r3, [r7, #14] 8022a36: f203 13f3 addw r3, r3, #499 @ 0x1f3 8022a3a: 4a0a ldr r2, [pc, #40] @ (8022a64 ) 8022a3c: fb82 1203 smull r1, r2, r2, r3 8022a40: 1152 asrs r2, r2, #5 8022a42: 17db asrs r3, r3, #31 8022a44: 1ad3 subs r3, r2, r3 8022a46: b29a uxth r2, r3 8022a48: 69bb ldr r3, [r7, #24] 8022a4a: 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; 8022a4c: f997 301f ldrsb.w r3, [r7, #31] } 8022a50: 4618 mov r0, r3 8022a52: 3720 adds r7, #32 8022a54: 46bd mov sp, r7 8022a56: bdb0 pop {r4, r5, r7, pc} 8022a58: 24000058 .word 0x24000058 8022a5c: 2402af14 .word 0x2402af14 8022a60: 08030c14 .word 0x08030c14 8022a64: 10624dd3 .word 0x10624dd3 08022a68 : * * @param netif network interface */ void dhcp_release_and_stop(struct netif *netif) { 8022a68: b5b0 push {r4, r5, r7, lr} 8022a6a: b08a sub sp, #40 @ 0x28 8022a6c: af02 add r7, sp, #8 8022a6e: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8022a70: 687b ldr r3, [r7, #4] 8022a72: 6a5b ldr r3, [r3, #36] @ 0x24 8022a74: 61fb str r3, [r7, #28] ip_addr_t server_ip_addr; LWIP_ASSERT_CORE_LOCKED(); 8022a76: f7ed fd5b bl 8010530 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_release_and_stop()\n")); if (dhcp == NULL) { 8022a7a: 69fb ldr r3, [r7, #28] 8022a7c: 2b00 cmp r3, #0 8022a7e: f000 8084 beq.w 8022b8a return; } /* already off? -> nothing to do */ if (dhcp->state == DHCP_STATE_OFF) { 8022a82: 69fb ldr r3, [r7, #28] 8022a84: 795b ldrb r3, [r3, #5] 8022a86: 2b00 cmp r3, #0 8022a88: f000 8081 beq.w 8022b8e return; } ip_addr_copy(server_ip_addr, dhcp->server_ip_addr); 8022a8c: 69fb ldr r3, [r7, #28] 8022a8e: 699b ldr r3, [r3, #24] 8022a90: 613b str r3, [r7, #16] /* clean old DHCP offer */ ip_addr_set_zero_ip4(&dhcp->server_ip_addr); 8022a92: 69fb ldr r3, [r7, #28] 8022a94: 2200 movs r2, #0 8022a96: 619a str r2, [r3, #24] ip4_addr_set_zero(&dhcp->offered_ip_addr); 8022a98: 69fb ldr r3, [r7, #28] 8022a9a: 2200 movs r2, #0 8022a9c: 61da str r2, [r3, #28] ip4_addr_set_zero(&dhcp->offered_sn_mask); 8022a9e: 69fb ldr r3, [r7, #28] 8022aa0: 2200 movs r2, #0 8022aa2: 621a str r2, [r3, #32] ip4_addr_set_zero(&dhcp->offered_gw_addr); 8022aa4: 69fb ldr r3, [r7, #28] 8022aa6: 2200 movs r2, #0 8022aa8: 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; 8022aaa: 69fb ldr r3, [r7, #28] 8022aac: 2200 movs r2, #0 8022aae: 631a str r2, [r3, #48] @ 0x30 8022ab0: 69fb ldr r3, [r7, #28] 8022ab2: 6b1a ldr r2, [r3, #48] @ 0x30 8022ab4: 69fb ldr r3, [r7, #28] 8022ab6: 62da str r2, [r3, #44] @ 0x2c 8022ab8: 69fb ldr r3, [r7, #28] 8022aba: 6ada ldr r2, [r3, #44] @ 0x2c 8022abc: 69fb ldr r3, [r7, #28] 8022abe: 629a str r2, [r3, #40] @ 0x28 dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0; 8022ac0: 69fb ldr r3, [r7, #28] 8022ac2: 2200 movs r2, #0 8022ac4: 829a strh r2, [r3, #20] 8022ac6: 69fb ldr r3, [r7, #28] 8022ac8: 8a9a ldrh r2, [r3, #20] 8022aca: 69fb ldr r3, [r7, #28] 8022acc: 825a strh r2, [r3, #18] 8022ace: 69fb ldr r3, [r7, #28] 8022ad0: 8a5a ldrh r2, [r3, #18] 8022ad2: 69fb ldr r3, [r7, #28] 8022ad4: 821a strh r2, [r3, #16] 8022ad6: 69fb ldr r3, [r7, #28] 8022ad8: 8a1a ldrh r2, [r3, #16] 8022ada: 69fb ldr r3, [r7, #28] 8022adc: 81da strh r2, [r3, #14] /* send release message when current IP was assigned via DHCP */ if (dhcp_supplied_address(netif)) { 8022ade: 6878 ldr r0, [r7, #4] 8022ae0: f000 fe06 bl 80236f0 8022ae4: 4603 mov r3, r0 8022ae6: 2b00 cmp r3, #0 8022ae8: d03b beq.n 8022b62 /* 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); 8022aea: f107 030e add.w r3, r7, #14 8022aee: 2207 movs r2, #7 8022af0: 69f9 ldr r1, [r7, #28] 8022af2: 6878 ldr r0, [r7, #4] 8022af4: f000 fcf8 bl 80234e8 8022af8: 61b8 str r0, [r7, #24] if (p_out != NULL) { 8022afa: 69bb ldr r3, [r7, #24] 8022afc: 2b00 cmp r3, #0 8022afe: d030 beq.n 8022b62 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 8022b00: 69bb ldr r3, [r7, #24] 8022b02: 685b ldr r3, [r3, #4] 8022b04: 617b str r3, [r7, #20] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4); 8022b06: 89f8 ldrh r0, [r7, #14] 8022b08: 697b ldr r3, [r7, #20] 8022b0a: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022b0e: 2304 movs r3, #4 8022b10: 2236 movs r2, #54 @ 0x36 8022b12: f000 f86b bl 8022bec 8022b16: 4603 mov r3, r0 8022b18: 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)))); 8022b1a: 89fc ldrh r4, [r7, #14] 8022b1c: 697b ldr r3, [r7, #20] 8022b1e: f103 05f0 add.w r5, r3, #240 @ 0xf0 8022b22: 693b ldr r3, [r7, #16] 8022b24: 4618 mov r0, r3 8022b26: f7f6 f80c bl 8018b42 8022b2a: 4603 mov r3, r0 8022b2c: 461a mov r2, r3 8022b2e: 4629 mov r1, r5 8022b30: 4620 mov r0, r4 8022b32: f000 f8e7 bl 8022d04 8022b36: 4603 mov r3, r0 8022b38: 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); 8022b3a: 89f8 ldrh r0, [r7, #14] 8022b3c: 697b ldr r3, [r7, #20] 8022b3e: 33f0 adds r3, #240 @ 0xf0 8022b40: 69ba ldr r2, [r7, #24] 8022b42: 4619 mov r1, r3 8022b44: f000 fda6 bl 8023694 udp_sendto_if(dhcp_pcb, p_out, &server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif); 8022b48: 4b13 ldr r3, [pc, #76] @ (8022b98 ) 8022b4a: 6818 ldr r0, [r3, #0] 8022b4c: f107 0210 add.w r2, r7, #16 8022b50: 687b ldr r3, [r7, #4] 8022b52: 9300 str r3, [sp, #0] 8022b54: 2343 movs r3, #67 @ 0x43 8022b56: 69b9 ldr r1, [r7, #24] 8022b58: f7fe fc06 bl 8021368 pbuf_free(p_out); 8022b5c: 69b8 ldr r0, [r7, #24] 8022b5e: f7f7 fcbd bl 801a4dc 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); 8022b62: 4b0e ldr r3, [pc, #56] @ (8022b9c ) 8022b64: 4a0d ldr r2, [pc, #52] @ (8022b9c ) 8022b66: 490d ldr r1, [pc, #52] @ (8022b9c ) 8022b68: 6878 ldr r0, [r7, #4] 8022b6a: f7f6 ff6d bl 8019a48 autoip_stop(netif); dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; } #endif /* LWIP_DHCP_AUTOIP_COOP */ dhcp_set_state(dhcp, DHCP_STATE_OFF); 8022b6e: 2100 movs r1, #0 8022b70: 69f8 ldr r0, [r7, #28] 8022b72: f000 f820 bl 8022bb6 if (dhcp->pcb_allocated != 0) { 8022b76: 69fb ldr r3, [r7, #28] 8022b78: 791b ldrb r3, [r3, #4] 8022b7a: 2b00 cmp r3, #0 8022b7c: d008 beq.n 8022b90 dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ 8022b7e: f7fe ff83 bl 8021a88 dhcp->pcb_allocated = 0; 8022b82: 69fb ldr r3, [r7, #28] 8022b84: 2200 movs r2, #0 8022b86: 711a strb r2, [r3, #4] 8022b88: e002 b.n 8022b90 return; 8022b8a: bf00 nop 8022b8c: e000 b.n 8022b90 return; 8022b8e: bf00 nop } } 8022b90: 3720 adds r7, #32 8022b92: 46bd mov sp, r7 8022b94: bdb0 pop {r4, r5, r7, pc} 8022b96: bf00 nop 8022b98: 2402af14 .word 0x2402af14 8022b9c: 08030c10 .word 0x08030c10 08022ba0 : * This function calls dhcp_release_and_stop() internally. * @deprecated Use dhcp_release_and_stop() instead. */ void dhcp_stop(struct netif *netif) { 8022ba0: b580 push {r7, lr} 8022ba2: b082 sub sp, #8 8022ba4: af00 add r7, sp, #0 8022ba6: 6078 str r0, [r7, #4] dhcp_release_and_stop(netif); 8022ba8: 6878 ldr r0, [r7, #4] 8022baa: f7ff ff5d bl 8022a68 } 8022bae: bf00 nop 8022bb0: 3708 adds r7, #8 8022bb2: 46bd mov sp, r7 8022bb4: bd80 pop {r7, pc} 08022bb6 : * * If the state changed, reset the number of tries. */ static void dhcp_set_state(struct dhcp *dhcp, u8_t new_state) { 8022bb6: b480 push {r7} 8022bb8: b083 sub sp, #12 8022bba: af00 add r7, sp, #0 8022bbc: 6078 str r0, [r7, #4] 8022bbe: 460b mov r3, r1 8022bc0: 70fb strb r3, [r7, #3] if (new_state != dhcp->state) { 8022bc2: 687b ldr r3, [r7, #4] 8022bc4: 795b ldrb r3, [r3, #5] 8022bc6: 78fa ldrb r2, [r7, #3] 8022bc8: 429a cmp r2, r3 8022bca: d008 beq.n 8022bde dhcp->state = new_state; 8022bcc: 687b ldr r3, [r7, #4] 8022bce: 78fa ldrb r2, [r7, #3] 8022bd0: 715a strb r2, [r3, #5] dhcp->tries = 0; 8022bd2: 687b ldr r3, [r7, #4] 8022bd4: 2200 movs r2, #0 8022bd6: 719a strb r2, [r3, #6] dhcp->request_timeout = 0; 8022bd8: 687b ldr r3, [r7, #4] 8022bda: 2200 movs r2, #0 8022bdc: 811a strh r2, [r3, #8] } } 8022bde: bf00 nop 8022be0: 370c adds r7, #12 8022be2: 46bd mov sp, r7 8022be4: f85d 7b04 ldr.w r7, [sp], #4 8022be8: 4770 bx lr ... 08022bec : * DHCP message. * */ static u16_t dhcp_option(u16_t options_out_len, u8_t *options, u8_t option_type, u8_t option_len) { 8022bec: b580 push {r7, lr} 8022bee: b082 sub sp, #8 8022bf0: af00 add r7, sp, #0 8022bf2: 6039 str r1, [r7, #0] 8022bf4: 4611 mov r1, r2 8022bf6: 461a mov r2, r3 8022bf8: 4603 mov r3, r0 8022bfa: 80fb strh r3, [r7, #6] 8022bfc: 460b mov r3, r1 8022bfe: 717b strb r3, [r7, #5] 8022c00: 4613 mov r3, r2 8022c02: 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); 8022c04: 88fa ldrh r2, [r7, #6] 8022c06: 793b ldrb r3, [r7, #4] 8022c08: 4413 add r3, r2 8022c0a: 3302 adds r3, #2 8022c0c: 2b44 cmp r3, #68 @ 0x44 8022c0e: d906 bls.n 8022c1e 8022c10: 4b0d ldr r3, [pc, #52] @ (8022c48 ) 8022c12: f240 529a movw r2, #1434 @ 0x59a 8022c16: 490d ldr r1, [pc, #52] @ (8022c4c ) 8022c18: 480d ldr r0, [pc, #52] @ (8022c50 ) 8022c1a: f006 fed7 bl 80299cc options[options_out_len++] = option_type; 8022c1e: 88fb ldrh r3, [r7, #6] 8022c20: 1c5a adds r2, r3, #1 8022c22: 80fa strh r2, [r7, #6] 8022c24: 461a mov r2, r3 8022c26: 683b ldr r3, [r7, #0] 8022c28: 4413 add r3, r2 8022c2a: 797a ldrb r2, [r7, #5] 8022c2c: 701a strb r2, [r3, #0] options[options_out_len++] = option_len; 8022c2e: 88fb ldrh r3, [r7, #6] 8022c30: 1c5a adds r2, r3, #1 8022c32: 80fa strh r2, [r7, #6] 8022c34: 461a mov r2, r3 8022c36: 683b ldr r3, [r7, #0] 8022c38: 4413 add r3, r2 8022c3a: 793a ldrb r2, [r7, #4] 8022c3c: 701a strb r2, [r3, #0] return options_out_len; 8022c3e: 88fb ldrh r3, [r7, #6] } 8022c40: 4618 mov r0, r3 8022c42: 3708 adds r7, #8 8022c44: 46bd mov sp, r7 8022c46: bd80 pop {r7, pc} 8022c48: 0802fe54 .word 0x0802fe54 8022c4c: 0802ffe8 .word 0x0802ffe8 8022c50: 0802feb4 .word 0x0802feb4 08022c54 : * 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) { 8022c54: b580 push {r7, lr} 8022c56: b082 sub sp, #8 8022c58: af00 add r7, sp, #0 8022c5a: 4603 mov r3, r0 8022c5c: 6039 str r1, [r7, #0] 8022c5e: 80fb strh r3, [r7, #6] 8022c60: 4613 mov r3, r2 8022c62: 717b strb r3, [r7, #5] LWIP_ASSERT("dhcp_option_byte: options_out_len < DHCP_OPTIONS_LEN", options_out_len < DHCP_OPTIONS_LEN); 8022c64: 88fb ldrh r3, [r7, #6] 8022c66: 2b43 cmp r3, #67 @ 0x43 8022c68: d906 bls.n 8022c78 8022c6a: 4b0a ldr r3, [pc, #40] @ (8022c94 ) 8022c6c: f240 52a6 movw r2, #1446 @ 0x5a6 8022c70: 4909 ldr r1, [pc, #36] @ (8022c98 ) 8022c72: 480a ldr r0, [pc, #40] @ (8022c9c ) 8022c74: f006 feaa bl 80299cc options[options_out_len++] = value; 8022c78: 88fb ldrh r3, [r7, #6] 8022c7a: 1c5a adds r2, r3, #1 8022c7c: 80fa strh r2, [r7, #6] 8022c7e: 461a mov r2, r3 8022c80: 683b ldr r3, [r7, #0] 8022c82: 4413 add r3, r2 8022c84: 797a ldrb r2, [r7, #5] 8022c86: 701a strb r2, [r3, #0] return options_out_len; 8022c88: 88fb ldrh r3, [r7, #6] } 8022c8a: 4618 mov r0, r3 8022c8c: 3708 adds r7, #8 8022c8e: 46bd mov sp, r7 8022c90: bd80 pop {r7, pc} 8022c92: bf00 nop 8022c94: 0802fe54 .word 0x0802fe54 8022c98: 0803002c .word 0x0803002c 8022c9c: 0802feb4 .word 0x0802feb4 08022ca0 : static u16_t dhcp_option_short(u16_t options_out_len, u8_t *options, u16_t value) { 8022ca0: b580 push {r7, lr} 8022ca2: b082 sub sp, #8 8022ca4: af00 add r7, sp, #0 8022ca6: 4603 mov r3, r0 8022ca8: 6039 str r1, [r7, #0] 8022caa: 80fb strh r3, [r7, #6] 8022cac: 4613 mov r3, r2 8022cae: 80bb strh r3, [r7, #4] LWIP_ASSERT("dhcp_option_short: options_out_len + 2 <= DHCP_OPTIONS_LEN", options_out_len + 2U <= DHCP_OPTIONS_LEN); 8022cb0: 88fb ldrh r3, [r7, #6] 8022cb2: 3302 adds r3, #2 8022cb4: 2b44 cmp r3, #68 @ 0x44 8022cb6: d906 bls.n 8022cc6 8022cb8: 4b0f ldr r3, [pc, #60] @ (8022cf8 ) 8022cba: f240 52ae movw r2, #1454 @ 0x5ae 8022cbe: 490f ldr r1, [pc, #60] @ (8022cfc ) 8022cc0: 480f ldr r0, [pc, #60] @ (8022d00 ) 8022cc2: f006 fe83 bl 80299cc options[options_out_len++] = (u8_t)((value & 0xff00U) >> 8); 8022cc6: 88bb ldrh r3, [r7, #4] 8022cc8: 0a1b lsrs r3, r3, #8 8022cca: b29a uxth r2, r3 8022ccc: 88fb ldrh r3, [r7, #6] 8022cce: 1c59 adds r1, r3, #1 8022cd0: 80f9 strh r1, [r7, #6] 8022cd2: 4619 mov r1, r3 8022cd4: 683b ldr r3, [r7, #0] 8022cd6: 440b add r3, r1 8022cd8: b2d2 uxtb r2, r2 8022cda: 701a strb r2, [r3, #0] options[options_out_len++] = (u8_t) (value & 0x00ffU); 8022cdc: 88fb ldrh r3, [r7, #6] 8022cde: 1c5a adds r2, r3, #1 8022ce0: 80fa strh r2, [r7, #6] 8022ce2: 461a mov r2, r3 8022ce4: 683b ldr r3, [r7, #0] 8022ce6: 4413 add r3, r2 8022ce8: 88ba ldrh r2, [r7, #4] 8022cea: b2d2 uxtb r2, r2 8022cec: 701a strb r2, [r3, #0] return options_out_len; 8022cee: 88fb ldrh r3, [r7, #6] } 8022cf0: 4618 mov r0, r3 8022cf2: 3708 adds r7, #8 8022cf4: 46bd mov sp, r7 8022cf6: bd80 pop {r7, pc} 8022cf8: 0802fe54 .word 0x0802fe54 8022cfc: 08030064 .word 0x08030064 8022d00: 0802feb4 .word 0x0802feb4 08022d04 : static u16_t dhcp_option_long(u16_t options_out_len, u8_t *options, u32_t value) { 8022d04: b580 push {r7, lr} 8022d06: b084 sub sp, #16 8022d08: af00 add r7, sp, #0 8022d0a: 4603 mov r3, r0 8022d0c: 60b9 str r1, [r7, #8] 8022d0e: 607a str r2, [r7, #4] 8022d10: 81fb strh r3, [r7, #14] LWIP_ASSERT("dhcp_option_long: options_out_len + 4 <= DHCP_OPTIONS_LEN", options_out_len + 4U <= DHCP_OPTIONS_LEN); 8022d12: 89fb ldrh r3, [r7, #14] 8022d14: 3304 adds r3, #4 8022d16: 2b44 cmp r3, #68 @ 0x44 8022d18: d906 bls.n 8022d28 8022d1a: 4b19 ldr r3, [pc, #100] @ (8022d80 ) 8022d1c: f240 52b7 movw r2, #1463 @ 0x5b7 8022d20: 4918 ldr r1, [pc, #96] @ (8022d84 ) 8022d22: 4819 ldr r0, [pc, #100] @ (8022d88 ) 8022d24: f006 fe52 bl 80299cc options[options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); 8022d28: 687b ldr r3, [r7, #4] 8022d2a: 0e1a lsrs r2, r3, #24 8022d2c: 89fb ldrh r3, [r7, #14] 8022d2e: 1c59 adds r1, r3, #1 8022d30: 81f9 strh r1, [r7, #14] 8022d32: 4619 mov r1, r3 8022d34: 68bb ldr r3, [r7, #8] 8022d36: 440b add r3, r1 8022d38: b2d2 uxtb r2, r2 8022d3a: 701a strb r2, [r3, #0] options[options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 8022d3c: 687b ldr r3, [r7, #4] 8022d3e: 0c1a lsrs r2, r3, #16 8022d40: 89fb ldrh r3, [r7, #14] 8022d42: 1c59 adds r1, r3, #1 8022d44: 81f9 strh r1, [r7, #14] 8022d46: 4619 mov r1, r3 8022d48: 68bb ldr r3, [r7, #8] 8022d4a: 440b add r3, r1 8022d4c: b2d2 uxtb r2, r2 8022d4e: 701a strb r2, [r3, #0] options[options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 8022d50: 687b ldr r3, [r7, #4] 8022d52: 0a1a lsrs r2, r3, #8 8022d54: 89fb ldrh r3, [r7, #14] 8022d56: 1c59 adds r1, r3, #1 8022d58: 81f9 strh r1, [r7, #14] 8022d5a: 4619 mov r1, r3 8022d5c: 68bb ldr r3, [r7, #8] 8022d5e: 440b add r3, r1 8022d60: b2d2 uxtb r2, r2 8022d62: 701a strb r2, [r3, #0] options[options_out_len++] = (u8_t)((value & 0x000000ffUL)); 8022d64: 89fb ldrh r3, [r7, #14] 8022d66: 1c5a adds r2, r3, #1 8022d68: 81fa strh r2, [r7, #14] 8022d6a: 461a mov r2, r3 8022d6c: 68bb ldr r3, [r7, #8] 8022d6e: 4413 add r3, r2 8022d70: 687a ldr r2, [r7, #4] 8022d72: b2d2 uxtb r2, r2 8022d74: 701a strb r2, [r3, #0] return options_out_len; 8022d76: 89fb ldrh r3, [r7, #14] } 8022d78: 4618 mov r0, r3 8022d7a: 3710 adds r7, #16 8022d7c: 46bd mov sp, r7 8022d7e: bd80 pop {r7, pc} 8022d80: 0802fe54 .word 0x0802fe54 8022d84: 080300a0 .word 0x080300a0 8022d88: 0802feb4 .word 0x0802feb4 08022d8c : * use that further on. * */ static err_t dhcp_parse_reply(struct pbuf *p, struct dhcp *dhcp) { 8022d8c: b580 push {r7, lr} 8022d8e: b092 sub sp, #72 @ 0x48 8022d90: af00 add r7, sp, #0 8022d92: 6078 str r0, [r7, #4] 8022d94: 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; 8022d96: 2300 movs r3, #0 8022d98: 633b str r3, [r7, #48] @ 0x30 int parse_sname_as_options = 0; 8022d9a: 2300 movs r3, #0 8022d9c: 62fb str r3, [r7, #44] @ 0x2c #endif LWIP_UNUSED_ARG(dhcp); /* clear received options */ dhcp_clear_all_options(dhcp); 8022d9e: 2208 movs r2, #8 8022da0: 2100 movs r1, #0 8022da2: 48b8 ldr r0, [pc, #736] @ (8023084 ) 8022da4: f006 ffa4 bl 8029cf0 /* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */ if (p->len < DHCP_SNAME_OFS) { 8022da8: 687b ldr r3, [r7, #4] 8022daa: 895b ldrh r3, [r3, #10] 8022dac: 2b2b cmp r3, #43 @ 0x2b 8022dae: d802 bhi.n 8022db6 return ERR_BUF; 8022db0: f06f 0301 mvn.w r3, #1 8022db4: e2b8 b.n 8023328 } msg_in = (struct dhcp_msg *)p->payload; 8022db6: 687b ldr r3, [r7, #4] 8022db8: 685b ldr r3, [r3, #4] 8022dba: 61fb str r3, [r7, #28] #endif /* LWIP_DHCP_BOOTP_FILE */ /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; 8022dbc: 23f0 movs r3, #240 @ 0xf0 8022dbe: 87bb strh r3, [r7, #60] @ 0x3c /* parse options to the end of the received packet */ options_idx_max = p->tot_len; 8022dc0: 687b ldr r3, [r7, #4] 8022dc2: 891b ldrh r3, [r3, #8] 8022dc4: 877b strh r3, [r7, #58] @ 0x3a again: q = p; 8022dc6: 687b ldr r3, [r7, #4] 8022dc8: 637b str r3, [r7, #52] @ 0x34 while ((q != NULL) && (options_idx >= q->len)) { 8022dca: e00c b.n 8022de6 options_idx = (u16_t)(options_idx - q->len); 8022dcc: 6b7b ldr r3, [r7, #52] @ 0x34 8022dce: 895b ldrh r3, [r3, #10] 8022dd0: 8fba ldrh r2, [r7, #60] @ 0x3c 8022dd2: 1ad3 subs r3, r2, r3 8022dd4: 87bb strh r3, [r7, #60] @ 0x3c options_idx_max = (u16_t)(options_idx_max - q->len); 8022dd6: 6b7b ldr r3, [r7, #52] @ 0x34 8022dd8: 895b ldrh r3, [r3, #10] 8022dda: 8f7a ldrh r2, [r7, #58] @ 0x3a 8022ddc: 1ad3 subs r3, r2, r3 8022dde: 877b strh r3, [r7, #58] @ 0x3a q = q->next; 8022de0: 6b7b ldr r3, [r7, #52] @ 0x34 8022de2: 681b ldr r3, [r3, #0] 8022de4: 637b str r3, [r7, #52] @ 0x34 while ((q != NULL) && (options_idx >= q->len)) { 8022de6: 6b7b ldr r3, [r7, #52] @ 0x34 8022de8: 2b00 cmp r3, #0 8022dea: d004 beq.n 8022df6 8022dec: 6b7b ldr r3, [r7, #52] @ 0x34 8022dee: 895b ldrh r3, [r3, #10] 8022df0: 8fba ldrh r2, [r7, #60] @ 0x3c 8022df2: 429a cmp r2, r3 8022df4: d2ea bcs.n 8022dcc } if (q == NULL) { 8022df6: 6b7b ldr r3, [r7, #52] @ 0x34 8022df8: 2b00 cmp r3, #0 8022dfa: d102 bne.n 8022e02 return ERR_BUF; 8022dfc: f06f 0301 mvn.w r3, #1 8022e00: e292 b.n 8023328 } offset = options_idx; 8022e02: 8fbb ldrh r3, [r7, #60] @ 0x3c 8022e04: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 offset_max = options_idx_max; 8022e08: 8f7b ldrh r3, [r7, #58] @ 0x3a 8022e0a: 87fb strh r3, [r7, #62] @ 0x3e options = (u8_t *)q->payload; 8022e0c: 6b7b ldr r3, [r7, #52] @ 0x34 8022e0e: 685b ldr r3, [r3, #4] 8022e10: 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)) { 8022e12: e247 b.n 80232a4 u8_t op = options[offset]; 8022e14: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8022e18: 6c3a ldr r2, [r7, #64] @ 0x40 8022e1a: 4413 add r3, r2 8022e1c: 781b ldrb r3, [r3, #0] 8022e1e: 76fb strb r3, [r7, #27] u8_t len; u8_t decode_len = 0; 8022e20: 2300 movs r3, #0 8022e22: f887 302a strb.w r3, [r7, #42] @ 0x2a int decode_idx = -1; 8022e26: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8022e2a: 627b str r3, [r7, #36] @ 0x24 u16_t val_offset = (u16_t)(offset + 2); 8022e2c: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8022e30: 3302 adds r3, #2 8022e32: 847b strh r3, [r7, #34] @ 0x22 if (val_offset < offset) { 8022e34: 8c7a ldrh r2, [r7, #34] @ 0x22 8022e36: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8022e3a: 429a cmp r2, r3 8022e3c: d202 bcs.n 8022e44 /* overflow */ return ERR_BUF; 8022e3e: f06f 0301 mvn.w r3, #1 8022e42: e271 b.n 8023328 } /* len byte might be in the next pbuf */ if ((offset + 1) < q->len) { 8022e44: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8022e48: 3301 adds r3, #1 8022e4a: 6b7a ldr r2, [r7, #52] @ 0x34 8022e4c: 8952 ldrh r2, [r2, #10] 8022e4e: 4293 cmp r3, r2 8022e50: da08 bge.n 8022e64 len = options[offset + 1]; 8022e52: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8022e56: 3301 adds r3, #1 8022e58: 6c3a ldr r2, [r7, #64] @ 0x40 8022e5a: 4413 add r3, r2 8022e5c: 781b ldrb r3, [r3, #0] 8022e5e: f887 302b strb.w r3, [r7, #43] @ 0x2b 8022e62: e00b b.n 8022e7c } else { len = (q->next != NULL ? ((u8_t *)q->next->payload)[0] : 0); 8022e64: 6b7b ldr r3, [r7, #52] @ 0x34 8022e66: 681b ldr r3, [r3, #0] 8022e68: 2b00 cmp r3, #0 8022e6a: d004 beq.n 8022e76 8022e6c: 6b7b ldr r3, [r7, #52] @ 0x34 8022e6e: 681b ldr r3, [r3, #0] 8022e70: 685b ldr r3, [r3, #4] 8022e72: 781b ldrb r3, [r3, #0] 8022e74: e000 b.n 8022e78 8022e76: 2300 movs r3, #0 8022e78: 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; 8022e7c: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8022e80: f887 302a strb.w r3, [r7, #42] @ 0x2a switch (op) { 8022e84: 7efb ldrb r3, [r7, #27] 8022e86: 2b3b cmp r3, #59 @ 0x3b 8022e88: f200 812c bhi.w 80230e4 8022e8c: a201 add r2, pc, #4 @ (adr r2, 8022e94 ) 8022e8e: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8022e92: bf00 nop 8022e94: 08022f85 .word 0x08022f85 8022e98: 08022f95 .word 0x08022f95 8022e9c: 080230e5 .word 0x080230e5 8022ea0: 08022fb7 .word 0x08022fb7 8022ea4: 080230e5 .word 0x080230e5 8022ea8: 080230e5 .word 0x080230e5 8022eac: 080230e5 .word 0x080230e5 8022eb0: 080230e5 .word 0x080230e5 8022eb4: 080230e5 .word 0x080230e5 8022eb8: 080230e5 .word 0x080230e5 8022ebc: 080230e5 .word 0x080230e5 8022ec0: 080230e5 .word 0x080230e5 8022ec4: 080230e5 .word 0x080230e5 8022ec8: 080230e5 .word 0x080230e5 8022ecc: 080230e5 .word 0x080230e5 8022ed0: 080230e5 .word 0x080230e5 8022ed4: 080230e5 .word 0x080230e5 8022ed8: 080230e5 .word 0x080230e5 8022edc: 080230e5 .word 0x080230e5 8022ee0: 080230e5 .word 0x080230e5 8022ee4: 080230e5 .word 0x080230e5 8022ee8: 080230e5 .word 0x080230e5 8022eec: 080230e5 .word 0x080230e5 8022ef0: 080230e5 .word 0x080230e5 8022ef4: 080230e5 .word 0x080230e5 8022ef8: 080230e5 .word 0x080230e5 8022efc: 080230e5 .word 0x080230e5 8022f00: 080230e5 .word 0x080230e5 8022f04: 080230e5 .word 0x080230e5 8022f08: 080230e5 .word 0x080230e5 8022f0c: 080230e5 .word 0x080230e5 8022f10: 080230e5 .word 0x080230e5 8022f14: 080230e5 .word 0x080230e5 8022f18: 080230e5 .word 0x080230e5 8022f1c: 080230e5 .word 0x080230e5 8022f20: 080230e5 .word 0x080230e5 8022f24: 080230e5 .word 0x080230e5 8022f28: 080230e5 .word 0x080230e5 8022f2c: 080230e5 .word 0x080230e5 8022f30: 080230e5 .word 0x080230e5 8022f34: 080230e5 .word 0x080230e5 8022f38: 080230e5 .word 0x080230e5 8022f3c: 080230e5 .word 0x080230e5 8022f40: 080230e5 .word 0x080230e5 8022f44: 080230e5 .word 0x080230e5 8022f48: 080230e5 .word 0x080230e5 8022f4c: 080230e5 .word 0x080230e5 8022f50: 080230e5 .word 0x080230e5 8022f54: 080230e5 .word 0x080230e5 8022f58: 080230e5 .word 0x080230e5 8022f5c: 080230e5 .word 0x080230e5 8022f60: 08022fe3 .word 0x08022fe3 8022f64: 08023005 .word 0x08023005 8022f68: 08023041 .word 0x08023041 8022f6c: 08023063 .word 0x08023063 8022f70: 080230e5 .word 0x080230e5 8022f74: 080230e5 .word 0x080230e5 8022f78: 080230e5 .word 0x080230e5 8022f7c: 080230a1 .word 0x080230a1 8022f80: 080230c3 .word 0x080230c3 /* case(DHCP_OPTION_END): handled above */ case (DHCP_OPTION_PAD): /* special option: no len encoded */ decode_len = len = 0; 8022f84: 2300 movs r3, #0 8022f86: f887 302b strb.w r3, [r7, #43] @ 0x2b 8022f8a: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8022f8e: f887 302a strb.w r3, [r7, #42] @ 0x2a /* will be increased below */ break; 8022f92: e0ab b.n 80230ec case (DHCP_OPTION_SUBNET_MASK): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8022f94: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8022f98: 2b04 cmp r3, #4 8022f9a: d009 beq.n 8022fb0 8022f9c: 4b3a ldr r3, [pc, #232] @ (8023088 ) 8022f9e: f240 622e movw r2, #1582 @ 0x62e 8022fa2: 493a ldr r1, [pc, #232] @ (802308c ) 8022fa4: 483a ldr r0, [pc, #232] @ (8023090 ) 8022fa6: f006 fd11 bl 80299cc 8022faa: f06f 0305 mvn.w r3, #5 8022fae: e1bb b.n 8023328 decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; 8022fb0: 2306 movs r3, #6 8022fb2: 627b str r3, [r7, #36] @ 0x24 break; 8022fb4: e09a b.n 80230ec case (DHCP_OPTION_ROUTER): decode_len = 4; /* only copy the first given router */ 8022fb6: 2304 movs r3, #4 8022fb8: f887 302a strb.w r3, [r7, #42] @ 0x2a LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); 8022fbc: f897 202b ldrb.w r2, [r7, #43] @ 0x2b 8022fc0: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 8022fc4: 429a cmp r2, r3 8022fc6: d209 bcs.n 8022fdc 8022fc8: 4b2f ldr r3, [pc, #188] @ (8023088 ) 8022fca: f240 6233 movw r2, #1587 @ 0x633 8022fce: 4931 ldr r1, [pc, #196] @ (8023094 ) 8022fd0: 482f ldr r0, [pc, #188] @ (8023090 ) 8022fd2: f006 fcfb bl 80299cc 8022fd6: f06f 0305 mvn.w r3, #5 8022fda: e1a5 b.n 8023328 decode_idx = DHCP_OPTION_IDX_ROUTER; 8022fdc: 2307 movs r3, #7 8022fde: 627b str r3, [r7, #36] @ 0x24 break; 8022fe0: e084 b.n 80230ec 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;); 8022fe2: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8022fe6: 2b04 cmp r3, #4 8022fe8: d009 beq.n 8022ffe 8022fea: 4b27 ldr r3, [pc, #156] @ (8023088 ) 8022fec: f240 6241 movw r2, #1601 @ 0x641 8022ff0: 4926 ldr r1, [pc, #152] @ (802308c ) 8022ff2: 4827 ldr r0, [pc, #156] @ (8023090 ) 8022ff4: f006 fcea bl 80299cc 8022ff8: f06f 0305 mvn.w r3, #5 8022ffc: e194 b.n 8023328 decode_idx = DHCP_OPTION_IDX_LEASE_TIME; 8022ffe: 2303 movs r3, #3 8023000: 627b str r3, [r7, #36] @ 0x24 break; 8023002: e073 b.n 80230ec 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;); 8023004: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023008: 2b01 cmp r3, #1 802300a: d009 beq.n 8023020 802300c: 4b1e ldr r3, [pc, #120] @ (8023088 ) 802300e: f240 624f movw r2, #1615 @ 0x64f 8023012: 4921 ldr r1, [pc, #132] @ (8023098 ) 8023014: 481e ldr r0, [pc, #120] @ (8023090 ) 8023016: f006 fcd9 bl 80299cc 802301a: f06f 0305 mvn.w r3, #5 802301e: e183 b.n 8023328 /* 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;); 8023020: 8fbb ldrh r3, [r7, #60] @ 0x3c 8023022: 2bf0 cmp r3, #240 @ 0xf0 8023024: d009 beq.n 802303a 8023026: 4b18 ldr r3, [pc, #96] @ (8023088 ) 8023028: f240 6251 movw r2, #1617 @ 0x651 802302c: 491b ldr r1, [pc, #108] @ (802309c ) 802302e: 4818 ldr r0, [pc, #96] @ (8023090 ) 8023030: f006 fccc bl 80299cc 8023034: f06f 0305 mvn.w r3, #5 8023038: e176 b.n 8023328 decode_idx = DHCP_OPTION_IDX_OVERLOAD; 802303a: 2300 movs r3, #0 802303c: 627b str r3, [r7, #36] @ 0x24 break; 802303e: e055 b.n 80230ec case (DHCP_OPTION_MESSAGE_TYPE): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 8023040: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023044: 2b01 cmp r3, #1 8023046: d009 beq.n 802305c 8023048: 4b0f ldr r3, [pc, #60] @ (8023088 ) 802304a: f240 6255 movw r2, #1621 @ 0x655 802304e: 4912 ldr r1, [pc, #72] @ (8023098 ) 8023050: 480f ldr r0, [pc, #60] @ (8023090 ) 8023052: f006 fcbb bl 80299cc 8023056: f06f 0305 mvn.w r3, #5 802305a: e165 b.n 8023328 decode_idx = DHCP_OPTION_IDX_MSG_TYPE; 802305c: 2301 movs r3, #1 802305e: 627b str r3, [r7, #36] @ 0x24 break; 8023060: e044 b.n 80230ec case (DHCP_OPTION_SERVER_ID): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8023062: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023066: 2b04 cmp r3, #4 8023068: d009 beq.n 802307e 802306a: 4b07 ldr r3, [pc, #28] @ (8023088 ) 802306c: f240 6259 movw r2, #1625 @ 0x659 8023070: 4906 ldr r1, [pc, #24] @ (802308c ) 8023072: 4807 ldr r0, [pc, #28] @ (8023090 ) 8023074: f006 fcaa bl 80299cc 8023078: f06f 0305 mvn.w r3, #5 802307c: e154 b.n 8023328 decode_idx = DHCP_OPTION_IDX_SERVER_ID; 802307e: 2302 movs r3, #2 8023080: 627b str r3, [r7, #36] @ 0x24 break; 8023082: e033 b.n 80230ec 8023084: 2402af0c .word 0x2402af0c 8023088: 0802fe54 .word 0x0802fe54 802308c: 080300dc .word 0x080300dc 8023090: 0802feb4 .word 0x0802feb4 8023094: 080300e8 .word 0x080300e8 8023098: 080300fc .word 0x080300fc 802309c: 08030108 .word 0x08030108 case (DHCP_OPTION_T1): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 80230a0: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 80230a4: 2b04 cmp r3, #4 80230a6: d009 beq.n 80230bc 80230a8: 4ba1 ldr r3, [pc, #644] @ (8023330 ) 80230aa: f240 625d movw r2, #1629 @ 0x65d 80230ae: 49a1 ldr r1, [pc, #644] @ (8023334 ) 80230b0: 48a1 ldr r0, [pc, #644] @ (8023338 ) 80230b2: f006 fc8b bl 80299cc 80230b6: f06f 0305 mvn.w r3, #5 80230ba: e135 b.n 8023328 decode_idx = DHCP_OPTION_IDX_T1; 80230bc: 2304 movs r3, #4 80230be: 627b str r3, [r7, #36] @ 0x24 break; 80230c0: e014 b.n 80230ec case (DHCP_OPTION_T2): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 80230c2: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 80230c6: 2b04 cmp r3, #4 80230c8: d009 beq.n 80230de 80230ca: 4b99 ldr r3, [pc, #612] @ (8023330 ) 80230cc: f240 6261 movw r2, #1633 @ 0x661 80230d0: 4998 ldr r1, [pc, #608] @ (8023334 ) 80230d2: 4899 ldr r0, [pc, #612] @ (8023338 ) 80230d4: f006 fc7a bl 80299cc 80230d8: f06f 0305 mvn.w r3, #5 80230dc: e124 b.n 8023328 decode_idx = DHCP_OPTION_IDX_T2; 80230de: 2305 movs r3, #5 80230e0: 627b str r3, [r7, #36] @ 0x24 break; 80230e2: e003 b.n 80230ec default: decode_len = 0; 80230e4: 2300 movs r3, #0 80230e6: 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; 80230ea: bf00 nop } if (op == DHCP_OPTION_PAD) { 80230ec: 7efb ldrb r3, [r7, #27] 80230ee: 2b00 cmp r3, #0 80230f0: d105 bne.n 80230fe offset++; 80230f2: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 80230f6: 3301 adds r3, #1 80230f8: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 80230fc: e0a4 b.n 8023248 } else { if (offset + len + 2 > 0xFFFF) { 80230fe: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 8023102: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023106: 4413 add r3, r2 8023108: f64f 72fd movw r2, #65533 @ 0xfffd 802310c: 4293 cmp r3, r2 802310e: dd02 ble.n 8023116 /* overflow */ return ERR_BUF; 8023110: f06f 0301 mvn.w r3, #1 8023114: e108 b.n 8023328 } offset = (u16_t)(offset + len + 2); 8023116: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 802311a: b29a uxth r2, r3 802311c: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8023120: 4413 add r3, r2 8023122: b29b uxth r3, r3 8023124: 3302 adds r3, #2 8023126: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 if (decode_len > 0) { 802312a: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 802312e: 2b00 cmp r3, #0 8023130: f000 808a beq.w 8023248 u32_t value = 0; 8023134: 2300 movs r3, #0 8023136: 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); 8023138: 6a7b ldr r3, [r7, #36] @ 0x24 802313a: 2b00 cmp r3, #0 802313c: db02 blt.n 8023144 802313e: 6a7b ldr r3, [r7, #36] @ 0x24 8023140: 2b07 cmp r3, #7 8023142: dd06 ble.n 8023152 8023144: 4b7a ldr r3, [pc, #488] @ (8023330 ) 8023146: f44f 62cf mov.w r2, #1656 @ 0x678 802314a: 497c ldr r1, [pc, #496] @ (802333c ) 802314c: 487a ldr r0, [pc, #488] @ (8023338 ) 802314e: f006 fc3d bl 80299cc if (!dhcp_option_given(dhcp, decode_idx)) { 8023152: 4a7b ldr r2, [pc, #492] @ (8023340 ) 8023154: 6a7b ldr r3, [r7, #36] @ 0x24 8023156: 4413 add r3, r2 8023158: 781b ldrb r3, [r3, #0] 802315a: 2b00 cmp r3, #0 802315c: d174 bne.n 8023248 copy_len = LWIP_MIN(decode_len, 4); 802315e: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 8023162: 2b04 cmp r3, #4 8023164: bf28 it cs 8023166: 2304 movcs r3, #4 8023168: b2db uxtb r3, r3 802316a: 833b strh r3, [r7, #24] if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) { 802316c: 8c7b ldrh r3, [r7, #34] @ 0x22 802316e: 8b3a ldrh r2, [r7, #24] 8023170: f107 010c add.w r1, r7, #12 8023174: 6b78 ldr r0, [r7, #52] @ 0x34 8023176: f7f7 fbb7 bl 801a8e8 802317a: 4603 mov r3, r0 802317c: 461a mov r2, r3 802317e: 8b3b ldrh r3, [r7, #24] 8023180: 4293 cmp r3, r2 8023182: d002 beq.n 802318a return ERR_BUF; 8023184: f06f 0301 mvn.w r3, #1 8023188: e0ce b.n 8023328 } if (decode_len > 4) { 802318a: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 802318e: 2b04 cmp r3, #4 8023190: d933 bls.n 80231fa /* decode more than one u32_t */ u16_t next_val_offset; LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;); 8023192: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 8023196: f003 0303 and.w r3, r3, #3 802319a: b2db uxtb r3, r3 802319c: 2b00 cmp r3, #0 802319e: d009 beq.n 80231b4 80231a0: 4b63 ldr r3, [pc, #396] @ (8023330 ) 80231a2: f240 6281 movw r2, #1665 @ 0x681 80231a6: 4967 ldr r1, [pc, #412] @ (8023344 ) 80231a8: 4863 ldr r0, [pc, #396] @ (8023338 ) 80231aa: f006 fc0f bl 80299cc 80231ae: f06f 0305 mvn.w r3, #5 80231b2: e0b9 b.n 8023328 dhcp_got_option(dhcp, decode_idx); 80231b4: 4a62 ldr r2, [pc, #392] @ (8023340 ) 80231b6: 6a7b ldr r3, [r7, #36] @ 0x24 80231b8: 4413 add r3, r2 80231ba: 2201 movs r2, #1 80231bc: 701a strb r2, [r3, #0] dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value)); 80231be: 68fb ldr r3, [r7, #12] 80231c0: 4618 mov r0, r3 80231c2: f7f5 fcbe bl 8018b42 80231c6: 4602 mov r2, r0 80231c8: 495f ldr r1, [pc, #380] @ (8023348 ) 80231ca: 6a7b ldr r3, [r7, #36] @ 0x24 80231cc: f841 2023 str.w r2, [r1, r3, lsl #2] decode_len = (u8_t)(decode_len - 4); 80231d0: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 80231d4: 3b04 subs r3, #4 80231d6: f887 302a strb.w r3, [r7, #42] @ 0x2a next_val_offset = (u16_t)(val_offset + 4); 80231da: 8c7b ldrh r3, [r7, #34] @ 0x22 80231dc: 3304 adds r3, #4 80231de: 82fb strh r3, [r7, #22] if (next_val_offset < val_offset) { 80231e0: 8afa ldrh r2, [r7, #22] 80231e2: 8c7b ldrh r3, [r7, #34] @ 0x22 80231e4: 429a cmp r2, r3 80231e6: d202 bcs.n 80231ee /* overflow */ return ERR_BUF; 80231e8: f06f 0301 mvn.w r3, #1 80231ec: e09c b.n 8023328 } val_offset = next_val_offset; 80231ee: 8afb ldrh r3, [r7, #22] 80231f0: 847b strh r3, [r7, #34] @ 0x22 decode_idx++; 80231f2: 6a7b ldr r3, [r7, #36] @ 0x24 80231f4: 3301 adds r3, #1 80231f6: 627b str r3, [r7, #36] @ 0x24 goto decode_next; 80231f8: e79e b.n 8023138 } else if (decode_len == 4) { 80231fa: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 80231fe: 2b04 cmp r3, #4 8023200: d106 bne.n 8023210 value = lwip_ntohl(value); 8023202: 68fb ldr r3, [r7, #12] 8023204: 4618 mov r0, r3 8023206: f7f5 fc9c bl 8018b42 802320a: 4603 mov r3, r0 802320c: 60fb str r3, [r7, #12] 802320e: e011 b.n 8023234 } else { LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); 8023210: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 8023214: 2b01 cmp r3, #1 8023216: d009 beq.n 802322c 8023218: 4b45 ldr r3, [pc, #276] @ (8023330 ) 802321a: f44f 62d2 mov.w r2, #1680 @ 0x690 802321e: 494b ldr r1, [pc, #300] @ (802334c ) 8023220: 4845 ldr r0, [pc, #276] @ (8023338 ) 8023222: f006 fbd3 bl 80299cc 8023226: f06f 0305 mvn.w r3, #5 802322a: e07d b.n 8023328 value = ((u8_t *)&value)[0]; 802322c: f107 030c add.w r3, r7, #12 8023230: 781b ldrb r3, [r3, #0] 8023232: 60fb str r3, [r7, #12] } dhcp_got_option(dhcp, decode_idx); 8023234: 4a42 ldr r2, [pc, #264] @ (8023340 ) 8023236: 6a7b ldr r3, [r7, #36] @ 0x24 8023238: 4413 add r3, r2 802323a: 2201 movs r2, #1 802323c: 701a strb r2, [r3, #0] dhcp_set_option_value(dhcp, decode_idx, value); 802323e: 68fa ldr r2, [r7, #12] 8023240: 4941 ldr r1, [pc, #260] @ (8023348 ) 8023242: 6a7b ldr r3, [r7, #36] @ 0x24 8023244: f841 2023 str.w r2, [r1, r3, lsl #2] } } } if (offset >= q->len) { 8023248: 6b7b ldr r3, [r7, #52] @ 0x34 802324a: 895b ldrh r3, [r3, #10] 802324c: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 8023250: 429a cmp r2, r3 8023252: d327 bcc.n 80232a4 offset = (u16_t)(offset - q->len); 8023254: 6b7b ldr r3, [r7, #52] @ 0x34 8023256: 895b ldrh r3, [r3, #10] 8023258: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 802325c: 1ad3 subs r3, r2, r3 802325e: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 offset_max = (u16_t)(offset_max - q->len); 8023262: 6b7b ldr r3, [r7, #52] @ 0x34 8023264: 895b ldrh r3, [r3, #10] 8023266: 8ffa ldrh r2, [r7, #62] @ 0x3e 8023268: 1ad3 subs r3, r2, r3 802326a: 87fb strh r3, [r7, #62] @ 0x3e if (offset < offset_max) { 802326c: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 8023270: 8ffb ldrh r3, [r7, #62] @ 0x3e 8023272: 429a cmp r2, r3 8023274: d213 bcs.n 802329e q = q->next; 8023276: 6b7b ldr r3, [r7, #52] @ 0x34 8023278: 681b ldr r3, [r3, #0] 802327a: 637b str r3, [r7, #52] @ 0x34 LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;); 802327c: 6b7b ldr r3, [r7, #52] @ 0x34 802327e: 2b00 cmp r3, #0 8023280: d109 bne.n 8023296 8023282: 4b2b ldr r3, [pc, #172] @ (8023330 ) 8023284: f240 629d movw r2, #1693 @ 0x69d 8023288: 4931 ldr r1, [pc, #196] @ (8023350 ) 802328a: 482b ldr r0, [pc, #172] @ (8023338 ) 802328c: f006 fb9e bl 80299cc 8023290: f06f 0305 mvn.w r3, #5 8023294: e048 b.n 8023328 options = (u8_t *)q->payload; 8023296: 6b7b ldr r3, [r7, #52] @ 0x34 8023298: 685b ldr r3, [r3, #4] 802329a: 643b str r3, [r7, #64] @ 0x40 802329c: e002 b.n 80232a4 } else { /* We've run out of bytes, probably no end marker. Don't proceed. */ return ERR_BUF; 802329e: f06f 0301 mvn.w r3, #1 80232a2: e041 b.n 8023328 while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) { 80232a4: 6b7b ldr r3, [r7, #52] @ 0x34 80232a6: 2b00 cmp r3, #0 80232a8: d00c beq.n 80232c4 80232aa: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 80232ae: 8ffb ldrh r3, [r7, #62] @ 0x3e 80232b0: 429a cmp r2, r3 80232b2: d207 bcs.n 80232c4 80232b4: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 80232b8: 6c3a ldr r2, [r7, #64] @ 0x40 80232ba: 4413 add r3, r2 80232bc: 781b ldrb r3, [r3, #0] 80232be: 2bff cmp r3, #255 @ 0xff 80232c0: f47f ada8 bne.w 8022e14 } } } /* is this an overloaded message? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { 80232c4: 4b1e ldr r3, [pc, #120] @ (8023340 ) 80232c6: 781b ldrb r3, [r3, #0] 80232c8: 2b00 cmp r3, #0 80232ca: d018 beq.n 80232fe u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD); 80232cc: 4b1e ldr r3, [pc, #120] @ (8023348 ) 80232ce: 681b ldr r3, [r3, #0] 80232d0: 613b str r3, [r7, #16] dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 80232d2: 4b1b ldr r3, [pc, #108] @ (8023340 ) 80232d4: 2200 movs r2, #0 80232d6: 701a strb r2, [r3, #0] if (overload == DHCP_OVERLOAD_FILE) { 80232d8: 693b ldr r3, [r7, #16] 80232da: 2b01 cmp r3, #1 80232dc: d102 bne.n 80232e4 parse_file_as_options = 1; 80232de: 2301 movs r3, #1 80232e0: 633b str r3, [r7, #48] @ 0x30 80232e2: e00c b.n 80232fe LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n")); } else if (overload == DHCP_OVERLOAD_SNAME) { 80232e4: 693b ldr r3, [r7, #16] 80232e6: 2b02 cmp r3, #2 80232e8: d102 bne.n 80232f0 parse_sname_as_options = 1; 80232ea: 2301 movs r3, #1 80232ec: 62fb str r3, [r7, #44] @ 0x2c 80232ee: e006 b.n 80232fe LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n")); } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { 80232f0: 693b ldr r3, [r7, #16] 80232f2: 2b03 cmp r3, #3 80232f4: d103 bne.n 80232fe parse_sname_as_options = 1; 80232f6: 2301 movs r3, #1 80232f8: 62fb str r3, [r7, #44] @ 0x2c parse_file_as_options = 1; 80232fa: 2301 movs r3, #1 80232fc: 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) { 80232fe: 6b3b ldr r3, [r7, #48] @ 0x30 8023300: 2b00 cmp r3, #0 8023302: d006 beq.n 8023312 /* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */ parse_file_as_options = 0; 8023304: 2300 movs r3, #0 8023306: 633b str r3, [r7, #48] @ 0x30 options_idx = DHCP_FILE_OFS; 8023308: 236c movs r3, #108 @ 0x6c 802330a: 87bb strh r3, [r7, #60] @ 0x3c options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; 802330c: 23ec movs r3, #236 @ 0xec 802330e: 877b strh r3, [r7, #58] @ 0x3a #if LWIP_DHCP_BOOTP_FILE file_overloaded = 1; #endif goto again; 8023310: e559 b.n 8022dc6 } else if (parse_sname_as_options) { 8023312: 6afb ldr r3, [r7, #44] @ 0x2c 8023314: 2b00 cmp r3, #0 8023316: d006 beq.n 8023326 parse_sname_as_options = 0; 8023318: 2300 movs r3, #0 802331a: 62fb str r3, [r7, #44] @ 0x2c options_idx = DHCP_SNAME_OFS; 802331c: 232c movs r3, #44 @ 0x2c 802331e: 87bb strh r3, [r7, #60] @ 0x3c options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN; 8023320: 236c movs r3, #108 @ 0x6c 8023322: 877b strh r3, [r7, #58] @ 0x3a goto again; 8023324: e54f b.n 8022dc6 } /* 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; 8023326: 2300 movs r3, #0 } 8023328: 4618 mov r0, r3 802332a: 3748 adds r7, #72 @ 0x48 802332c: 46bd mov sp, r7 802332e: bd80 pop {r7, pc} 8023330: 0802fe54 .word 0x0802fe54 8023334: 080300dc .word 0x080300dc 8023338: 0802feb4 .word 0x0802feb4 802333c: 08030120 .word 0x08030120 8023340: 2402af0c .word 0x2402af0c 8023344: 08030134 .word 0x08030134 8023348: 2402aeec .word 0x2402aeec 802334c: 0803014c .word 0x0803014c 8023350: 08030160 .word 0x08030160 08023354 : /** * 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) { 8023354: b580 push {r7, lr} 8023356: b08a sub sp, #40 @ 0x28 8023358: af00 add r7, sp, #0 802335a: 60f8 str r0, [r7, #12] 802335c: 60b9 str r1, [r7, #8] 802335e: 607a str r2, [r7, #4] 8023360: 603b str r3, [r7, #0] struct netif *netif = ip_current_input_netif(); 8023362: 4b5e ldr r3, [pc, #376] @ (80234dc ) 8023364: 685b ldr r3, [r3, #4] 8023366: 61fb str r3, [r7, #28] struct dhcp *dhcp = netif_dhcp_data(netif); 8023368: 69fb ldr r3, [r7, #28] 802336a: 6a5b ldr r3, [r3, #36] @ 0x24 802336c: 61bb str r3, [r7, #24] struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload; 802336e: 687b ldr r3, [r7, #4] 8023370: 685b ldr r3, [r3, #4] 8023372: 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)) { 8023374: 69bb ldr r3, [r7, #24] 8023376: 2b00 cmp r3, #0 8023378: f000 809a beq.w 80234b0 802337c: 69bb ldr r3, [r7, #24] 802337e: 791b ldrb r3, [r3, #4] 8023380: 2b00 cmp r3, #0 8023382: f000 8095 beq.w 80234b0 /* prevent warnings about unused arguments */ LWIP_UNUSED_ARG(pcb); LWIP_UNUSED_ARG(addr); LWIP_UNUSED_ARG(port); if (p->len < DHCP_MIN_REPLY_LEN) { 8023386: 687b ldr r3, [r7, #4] 8023388: 895b ldrh r3, [r3, #10] 802338a: 2b2b cmp r3, #43 @ 0x2b 802338c: f240 8092 bls.w 80234b4 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) { 8023390: 697b ldr r3, [r7, #20] 8023392: 781b ldrb r3, [r3, #0] 8023394: 2b02 cmp r3, #2 8023396: f040 808f bne.w 80234b8 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++) { 802339a: 2300 movs r3, #0 802339c: 74fb strb r3, [r7, #19] 802339e: e00e b.n 80233be if (netif->hwaddr[i] != reply_msg->chaddr[i]) { 80233a0: 7cfb ldrb r3, [r7, #19] 80233a2: 69fa ldr r2, [r7, #28] 80233a4: 4413 add r3, r2 80233a6: f893 202a ldrb.w r2, [r3, #42] @ 0x2a 80233aa: 7cfb ldrb r3, [r7, #19] 80233ac: 6979 ldr r1, [r7, #20] 80233ae: 440b add r3, r1 80233b0: 7f1b ldrb r3, [r3, #28] 80233b2: 429a cmp r2, r3 80233b4: f040 8082 bne.w 80234bc for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) { 80233b8: 7cfb ldrb r3, [r7, #19] 80233ba: 3301 adds r3, #1 80233bc: 74fb strb r3, [r7, #19] 80233be: 69fb ldr r3, [r7, #28] 80233c0: f893 3030 ldrb.w r3, [r3, #48] @ 0x30 80233c4: 7cfa ldrb r2, [r7, #19] 80233c6: 429a cmp r2, r3 80233c8: d202 bcs.n 80233d0 80233ca: 7cfb ldrb r3, [r7, #19] 80233cc: 2b05 cmp r3, #5 80233ce: d9e7 bls.n 80233a0 (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) { 80233d0: 697b ldr r3, [r7, #20] 80233d2: 685b ldr r3, [r3, #4] 80233d4: 4618 mov r0, r3 80233d6: f7f5 fbb4 bl 8018b42 80233da: 4602 mov r2, r0 80233dc: 69bb ldr r3, [r7, #24] 80233de: 681b ldr r3, [r3, #0] 80233e0: 429a cmp r2, r3 80233e2: d16d bne.n 80234c0 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) { 80233e4: 69b9 ldr r1, [r7, #24] 80233e6: 6878 ldr r0, [r7, #4] 80233e8: f7ff fcd0 bl 8022d8c 80233ec: 4603 mov r3, r0 80233ee: 2b00 cmp r3, #0 80233f0: d168 bne.n 80234c4 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)) { 80233f2: 4b3b ldr r3, [pc, #236] @ (80234e0 ) 80233f4: 785b ldrb r3, [r3, #1] 80233f6: 2b00 cmp r3, #0 80233f8: d066 beq.n 80234c8 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; 80233fa: 687b ldr r3, [r7, #4] 80233fc: 685b ldr r3, [r3, #4] 80233fe: 627b str r3, [r7, #36] @ 0x24 /* read DHCP message type */ msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE); 8023400: 4b38 ldr r3, [pc, #224] @ (80234e4 ) 8023402: 685b ldr r3, [r3, #4] 8023404: f887 3023 strb.w r3, [r7, #35] @ 0x23 /* message type is DHCP ACK? */ if (msg_type == DHCP_ACK) { 8023408: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 802340c: 2b05 cmp r3, #5 802340e: d12a bne.n 8023466 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n")); /* in requesting state? */ if (dhcp->state == DHCP_STATE_REQUESTING) { 8023410: 69bb ldr r3, [r7, #24] 8023412: 795b ldrb r3, [r3, #5] 8023414: 2b01 cmp r3, #1 8023416: d112 bne.n 802343e dhcp_handle_ack(netif, msg_in); 8023418: 6a79 ldr r1, [r7, #36] @ 0x24 802341a: 69f8 ldr r0, [r7, #28] 802341c: f7fe fe00 bl 8022020 #if DHCP_DOES_ARP_CHECK if ((netif->flags & NETIF_FLAG_ETHARP) != 0) { 8023420: 69fb ldr r3, [r7, #28] 8023422: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8023426: f003 0308 and.w r3, r3, #8 802342a: 2b00 cmp r3, #0 802342c: d003 beq.n 8023436 /* check if the acknowledged lease address is already in use */ dhcp_check(netif); 802342e: 69f8 ldr r0, [r7, #28] 8023430: f7fe fb6e bl 8021b10 8023434: e04b b.n 80234ce } else { /* bind interface to the acknowledged lease address */ dhcp_bind(netif); 8023436: 69f8 ldr r0, [r7, #28] 8023438: f7ff f852 bl 80224e0 802343c: e047 b.n 80234ce /* 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) || 802343e: 69bb ldr r3, [r7, #24] 8023440: 795b ldrb r3, [r3, #5] 8023442: 2b03 cmp r3, #3 8023444: d007 beq.n 8023456 8023446: 69bb ldr r3, [r7, #24] 8023448: 795b ldrb r3, [r3, #5] 802344a: 2b04 cmp r3, #4 802344c: d003 beq.n 8023456 (dhcp->state == DHCP_STATE_RENEWING)) { 802344e: 69bb ldr r3, [r7, #24] 8023450: 795b ldrb r3, [r3, #5] else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) || 8023452: 2b05 cmp r3, #5 8023454: d13b bne.n 80234ce dhcp_handle_ack(netif, msg_in); 8023456: 6a79 ldr r1, [r7, #36] @ 0x24 8023458: 69f8 ldr r0, [r7, #28] 802345a: f7fe fde1 bl 8022020 dhcp_bind(netif); 802345e: 69f8 ldr r0, [r7, #28] 8023460: f7ff f83e bl 80224e0 8023464: e033 b.n 80234ce } } /* received a DHCP_NAK in appropriate state? */ else if ((msg_type == DHCP_NAK) && 8023466: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 802346a: 2b06 cmp r3, #6 802346c: d113 bne.n 8023496 ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || 802346e: 69bb ldr r3, [r7, #24] 8023470: 795b ldrb r3, [r3, #5] else if ((msg_type == DHCP_NAK) && 8023472: 2b03 cmp r3, #3 8023474: d00b beq.n 802348e ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || 8023476: 69bb ldr r3, [r7, #24] 8023478: 795b ldrb r3, [r3, #5] 802347a: 2b01 cmp r3, #1 802347c: d007 beq.n 802348e (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) { 802347e: 69bb ldr r3, [r7, #24] 8023480: 795b ldrb r3, [r3, #5] ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || 8023482: 2b04 cmp r3, #4 8023484: d003 beq.n 802348e (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) { 8023486: 69bb ldr r3, [r7, #24] 8023488: 795b ldrb r3, [r3, #5] 802348a: 2b05 cmp r3, #5 802348c: d103 bne.n 8023496 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_NAK received\n")); dhcp_handle_nak(netif); 802348e: 69f8 ldr r0, [r7, #28] 8023490: f7fe fb24 bl 8021adc 8023494: e01b b.n 80234ce } /* received a DHCP_OFFER in DHCP_STATE_SELECTING state? */ else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) { 8023496: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 802349a: 2b02 cmp r3, #2 802349c: d116 bne.n 80234cc 802349e: 69bb ldr r3, [r7, #24] 80234a0: 795b ldrb r3, [r3, #5] 80234a2: 2b06 cmp r3, #6 80234a4: d112 bne.n 80234cc 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); 80234a6: 6a79 ldr r1, [r7, #36] @ 0x24 80234a8: 69f8 ldr r0, [r7, #28] 80234aa: f7fe fb65 bl 8021b78 80234ae: e00e b.n 80234ce goto free_pbuf_and_return; 80234b0: bf00 nop 80234b2: e00c b.n 80234ce goto free_pbuf_and_return; 80234b4: bf00 nop 80234b6: e00a b.n 80234ce goto free_pbuf_and_return; 80234b8: bf00 nop 80234ba: e008 b.n 80234ce goto free_pbuf_and_return; 80234bc: bf00 nop 80234be: e006 b.n 80234ce goto free_pbuf_and_return; 80234c0: bf00 nop 80234c2: e004 b.n 80234ce goto free_pbuf_and_return; 80234c4: bf00 nop 80234c6: e002 b.n 80234ce goto free_pbuf_and_return; 80234c8: bf00 nop 80234ca: e000 b.n 80234ce } free_pbuf_and_return: 80234cc: bf00 nop pbuf_free(p); 80234ce: 6878 ldr r0, [r7, #4] 80234d0: f7f7 f804 bl 801a4dc } 80234d4: bf00 nop 80234d6: 3728 adds r7, #40 @ 0x28 80234d8: 46bd mov sp, r7 80234da: bd80 pop {r7, pc} 80234dc: 24024338 .word 0x24024338 80234e0: 2402af0c .word 0x2402af0c 80234e4: 2402aeec .word 0x2402aeec 080234e8 : * @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) { 80234e8: b580 push {r7, lr} 80234ea: b088 sub sp, #32 80234ec: af00 add r7, sp, #0 80234ee: 60f8 str r0, [r7, #12] 80234f0: 60b9 str r1, [r7, #8] 80234f2: 603b str r3, [r7, #0] 80234f4: 4613 mov r3, r2 80234f6: 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;); 80234f8: 68fb ldr r3, [r7, #12] 80234fa: 2b00 cmp r3, #0 80234fc: d108 bne.n 8023510 80234fe: 4b5f ldr r3, [pc, #380] @ (802367c ) 8023500: f240 7269 movw r2, #1897 @ 0x769 8023504: 495e ldr r1, [pc, #376] @ (8023680 ) 8023506: 485f ldr r0, [pc, #380] @ (8023684 ) 8023508: f006 fa60 bl 80299cc 802350c: 2300 movs r3, #0 802350e: e0b1 b.n 8023674 LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return NULL;); 8023510: 68bb ldr r3, [r7, #8] 8023512: 2b00 cmp r3, #0 8023514: d108 bne.n 8023528 8023516: 4b59 ldr r3, [pc, #356] @ (802367c ) 8023518: f240 726a movw r2, #1898 @ 0x76a 802351c: 495a ldr r1, [pc, #360] @ (8023688 ) 802351e: 4859 ldr r0, [pc, #356] @ (8023684 ) 8023520: f006 fa54 bl 80299cc 8023524: 2300 movs r3, #0 8023526: e0a5 b.n 8023674 p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM); 8023528: f44f 7220 mov.w r2, #640 @ 0x280 802352c: f44f 719a mov.w r1, #308 @ 0x134 8023530: 2036 movs r0, #54 @ 0x36 8023532: f7f6 fcbd bl 8019eb0 8023536: 61b8 str r0, [r7, #24] if (p_out == NULL) { 8023538: 69bb ldr r3, [r7, #24] 802353a: 2b00 cmp r3, #0 802353c: d101 bne.n 8023542 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_create_msg(): could not allocate pbuf\n")); return NULL; 802353e: 2300 movs r3, #0 8023540: e098 b.n 8023674 } LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg", 8023542: 69bb ldr r3, [r7, #24] 8023544: 895b ldrh r3, [r3, #10] 8023546: f5b3 7f9a cmp.w r3, #308 @ 0x134 802354a: d206 bcs.n 802355a 802354c: 4b4b ldr r3, [pc, #300] @ (802367c ) 802354e: f240 7271 movw r2, #1905 @ 0x771 8023552: 494e ldr r1, [pc, #312] @ (802368c ) 8023554: 484b ldr r0, [pc, #300] @ (8023684 ) 8023556: f006 fa39 bl 80299cc (p_out->len >= sizeof(struct dhcp_msg))); /* DHCP_REQUEST should reuse 'xid' from DHCPOFFER */ if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) { 802355a: 79fb ldrb r3, [r7, #7] 802355c: 2b03 cmp r3, #3 802355e: d103 bne.n 8023568 8023560: 68bb ldr r3, [r7, #8] 8023562: 795b ldrb r3, [r3, #5] 8023564: 2b03 cmp r3, #3 8023566: d10d bne.n 8023584 /* reuse transaction identifier in retransmissions */ if (dhcp->tries == 0) { 8023568: 68bb ldr r3, [r7, #8] 802356a: 799b ldrb r3, [r3, #6] 802356c: 2b00 cmp r3, #0 802356e: d105 bne.n 802357c #if DHCP_CREATE_RAND_XID && defined(LWIP_RAND) xid = LWIP_RAND(); 8023570: f004 ff02 bl 8028378 8023574: 4603 mov r3, r0 8023576: 461a mov r2, r3 8023578: 4b45 ldr r3, [pc, #276] @ (8023690 ) 802357a: 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; 802357c: 4b44 ldr r3, [pc, #272] @ (8023690 ) 802357e: 681a ldr r2, [r3, #0] 8023580: 68bb ldr r3, [r7, #8] 8023582: 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; 8023584: 69bb ldr r3, [r7, #24] 8023586: 685b ldr r3, [r3, #4] 8023588: 617b str r3, [r7, #20] memset(msg_out, 0, sizeof(struct dhcp_msg)); 802358a: f44f 729a mov.w r2, #308 @ 0x134 802358e: 2100 movs r1, #0 8023590: 6978 ldr r0, [r7, #20] 8023592: f006 fbad bl 8029cf0 msg_out->op = DHCP_BOOTREQUEST; 8023596: 697b ldr r3, [r7, #20] 8023598: 2201 movs r2, #1 802359a: 701a strb r2, [r3, #0] /* @todo: make link layer independent */ msg_out->htype = LWIP_IANA_HWTYPE_ETHERNET; 802359c: 697b ldr r3, [r7, #20] 802359e: 2201 movs r2, #1 80235a0: 705a strb r2, [r3, #1] msg_out->hlen = netif->hwaddr_len; 80235a2: 68fb ldr r3, [r7, #12] 80235a4: f893 2030 ldrb.w r2, [r3, #48] @ 0x30 80235a8: 697b ldr r3, [r7, #20] 80235aa: 709a strb r2, [r3, #2] msg_out->xid = lwip_htonl(dhcp->xid); 80235ac: 68bb ldr r3, [r7, #8] 80235ae: 681b ldr r3, [r3, #0] 80235b0: 4618 mov r0, r3 80235b2: f7f5 fac6 bl 8018b42 80235b6: 4602 mov r2, r0 80235b8: 697b ldr r3, [r7, #20] 80235ba: 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) || 80235bc: 79fb ldrb r3, [r7, #7] 80235be: 2b08 cmp r3, #8 80235c0: d010 beq.n 80235e4 80235c2: 79fb ldrb r3, [r7, #7] 80235c4: 2b04 cmp r3, #4 80235c6: d00d beq.n 80235e4 80235c8: 79fb ldrb r3, [r7, #7] 80235ca: 2b07 cmp r3, #7 80235cc: d00a beq.n 80235e4 80235ce: 79fb ldrb r3, [r7, #7] 80235d0: 2b03 cmp r3, #3 80235d2: d10c bne.n 80235ee ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */ ((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) { 80235d4: 68bb ldr r3, [r7, #8] 80235d6: 795b ldrb r3, [r3, #5] ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */ 80235d8: 2b05 cmp r3, #5 80235da: d003 beq.n 80235e4 ((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) { 80235dc: 68bb ldr r3, [r7, #8] 80235de: 795b ldrb r3, [r3, #5] 80235e0: 2b04 cmp r3, #4 80235e2: d104 bne.n 80235ee ip4_addr_copy(msg_out->ciaddr, *netif_ip4_addr(netif)); 80235e4: 68fb ldr r3, [r7, #12] 80235e6: 3304 adds r3, #4 80235e8: 681a ldr r2, [r3, #0] 80235ea: 697b ldr r3, [r7, #20] 80235ec: 60da str r2, [r3, #12] } for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) { 80235ee: 2300 movs r3, #0 80235f0: 83fb strh r3, [r7, #30] 80235f2: e00c b.n 802360e /* copy netif hardware address (padded with zeroes through memset already) */ msg_out->chaddr[i] = netif->hwaddr[i]; 80235f4: 8bfa ldrh r2, [r7, #30] 80235f6: 8bfb ldrh r3, [r7, #30] 80235f8: 68f9 ldr r1, [r7, #12] 80235fa: 440a add r2, r1 80235fc: f892 102a ldrb.w r1, [r2, #42] @ 0x2a 8023600: 697a ldr r2, [r7, #20] 8023602: 4413 add r3, r2 8023604: 460a mov r2, r1 8023606: 771a strb r2, [r3, #28] for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) { 8023608: 8bfb ldrh r3, [r7, #30] 802360a: 3301 adds r3, #1 802360c: 83fb strh r3, [r7, #30] 802360e: 8bfb ldrh r3, [r7, #30] 8023610: 2b05 cmp r3, #5 8023612: d9ef bls.n 80235f4 } msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); 8023614: 697b ldr r3, [r7, #20] 8023616: 2200 movs r2, #0 8023618: f042 0263 orr.w r2, r2, #99 @ 0x63 802361c: f883 20ec strb.w r2, [r3, #236] @ 0xec 8023620: 2200 movs r2, #0 8023622: f062 027d orn r2, r2, #125 @ 0x7d 8023626: f883 20ed strb.w r2, [r3, #237] @ 0xed 802362a: 2200 movs r2, #0 802362c: f042 0253 orr.w r2, r2, #83 @ 0x53 8023630: f883 20ee strb.w r2, [r3, #238] @ 0xee 8023634: 2200 movs r2, #0 8023636: f042 0263 orr.w r2, r2, #99 @ 0x63 802363a: 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); 802363e: 697b ldr r3, [r7, #20] 8023640: f103 01f0 add.w r1, r3, #240 @ 0xf0 8023644: 2301 movs r3, #1 8023646: 2235 movs r2, #53 @ 0x35 8023648: 2000 movs r0, #0 802364a: f7ff facf bl 8022bec 802364e: 4603 mov r3, r0 8023650: 827b strh r3, [r7, #18] options_out_len_loc = dhcp_option_byte(options_out_len_loc, msg_out->options, message_type); 8023652: 697b ldr r3, [r7, #20] 8023654: f103 01f0 add.w r1, r3, #240 @ 0xf0 8023658: 79fa ldrb r2, [r7, #7] 802365a: 8a7b ldrh r3, [r7, #18] 802365c: 4618 mov r0, r3 802365e: f7ff faf9 bl 8022c54 8023662: 4603 mov r3, r0 8023664: 827b strh r3, [r7, #18] if (options_out_len) { 8023666: 683b ldr r3, [r7, #0] 8023668: 2b00 cmp r3, #0 802366a: d002 beq.n 8023672 *options_out_len = options_out_len_loc; 802366c: 683b ldr r3, [r7, #0] 802366e: 8a7a ldrh r2, [r7, #18] 8023670: 801a strh r2, [r3, #0] } return p_out; 8023672: 69bb ldr r3, [r7, #24] } 8023674: 4618 mov r0, r3 8023676: 3720 adds r7, #32 8023678: 46bd mov sp, r7 802367a: bd80 pop {r7, pc} 802367c: 0802fe54 .word 0x0802fe54 8023680: 08030174 .word 0x08030174 8023684: 0802feb4 .word 0x0802feb4 8023688: 08030194 .word 0x08030194 802368c: 080301b4 .word 0x080301b4 8023690: 2402af1c .word 0x2402af1c 08023694 : * 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) { 8023694: b580 push {r7, lr} 8023696: b084 sub sp, #16 8023698: af00 add r7, sp, #0 802369a: 4603 mov r3, r0 802369c: 60b9 str r1, [r7, #8] 802369e: 607a str r2, [r7, #4] 80236a0: 81fb strh r3, [r7, #14] options[options_out_len++] = DHCP_OPTION_END; 80236a2: 89fb ldrh r3, [r7, #14] 80236a4: 1c5a adds r2, r3, #1 80236a6: 81fa strh r2, [r7, #14] 80236a8: 461a mov r2, r3 80236aa: 68bb ldr r3, [r7, #8] 80236ac: 4413 add r3, r2 80236ae: 22ff movs r2, #255 @ 0xff 80236b0: 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)) && 80236b2: e007 b.n 80236c4 (options_out_len < DHCP_OPTIONS_LEN)) { /* add a fill/padding byte */ options[options_out_len++] = 0; 80236b4: 89fb ldrh r3, [r7, #14] 80236b6: 1c5a adds r2, r3, #1 80236b8: 81fa strh r2, [r7, #14] 80236ba: 461a mov r2, r3 80236bc: 68bb ldr r3, [r7, #8] 80236be: 4413 add r3, r2 80236c0: 2200 movs r2, #0 80236c2: 701a strb r2, [r3, #0] while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) && 80236c4: 89fb ldrh r3, [r7, #14] 80236c6: 2b43 cmp r3, #67 @ 0x43 80236c8: d904 bls.n 80236d4 80236ca: 89fb ldrh r3, [r7, #14] 80236cc: f003 0303 and.w r3, r3, #3 80236d0: 2b00 cmp r3, #0 80236d2: d002 beq.n 80236da 80236d4: 89fb ldrh r3, [r7, #14] 80236d6: 2b43 cmp r3, #67 @ 0x43 80236d8: d9ec bls.n 80236b4 } /* shrink the pbuf to the actual content length */ pbuf_realloc(p_out, (u16_t)(sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + options_out_len)); 80236da: 89fb ldrh r3, [r7, #14] 80236dc: 33f0 adds r3, #240 @ 0xf0 80236de: b29b uxth r3, r3 80236e0: 4619 mov r1, r3 80236e2: 6878 ldr r0, [r7, #4] 80236e4: f7f6 fd44 bl 801a170 } 80236e8: bf00 nop 80236ea: 3710 adds r7, #16 80236ec: 46bd mov sp, r7 80236ee: bd80 pop {r7, pc} 080236f0 : * @return 1 if DHCP supplied netif->ip_addr (states BOUND or RENEWING), * 0 otherwise */ u8_t dhcp_supplied_address(const struct netif *netif) { 80236f0: b480 push {r7} 80236f2: b085 sub sp, #20 80236f4: af00 add r7, sp, #0 80236f6: 6078 str r0, [r7, #4] if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) { 80236f8: 687b ldr r3, [r7, #4] 80236fa: 2b00 cmp r3, #0 80236fc: d017 beq.n 802372e 80236fe: 687b ldr r3, [r7, #4] 8023700: 6a5b ldr r3, [r3, #36] @ 0x24 8023702: 2b00 cmp r3, #0 8023704: d013 beq.n 802372e struct dhcp *dhcp = netif_dhcp_data(netif); 8023706: 687b ldr r3, [r7, #4] 8023708: 6a5b ldr r3, [r3, #36] @ 0x24 802370a: 60fb str r3, [r7, #12] return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) || 802370c: 68fb ldr r3, [r7, #12] 802370e: 795b ldrb r3, [r3, #5] 8023710: 2b0a cmp r3, #10 8023712: d007 beq.n 8023724 8023714: 68fb ldr r3, [r7, #12] 8023716: 795b ldrb r3, [r3, #5] 8023718: 2b05 cmp r3, #5 802371a: d003 beq.n 8023724 (dhcp->state == DHCP_STATE_REBINDING); 802371c: 68fb ldr r3, [r7, #12] 802371e: 795b ldrb r3, [r3, #5] return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) || 8023720: 2b04 cmp r3, #4 8023722: d101 bne.n 8023728 8023724: 2301 movs r3, #1 8023726: e000 b.n 802372a 8023728: 2300 movs r3, #0 802372a: b2db uxtb r3, r3 802372c: e000 b.n 8023730 } return 0; 802372e: 2300 movs r3, #0 } 8023730: 4618 mov r0, r3 8023732: 3714 adds r7, #20 8023734: 46bd mov sp, r7 8023736: f85d 7b04 ldr.w r7, [sp], #4 802373a: 4770 bx lr 0802373c : #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 802373c: b580 push {r7, lr} 802373e: b082 sub sp, #8 8023740: af00 add r7, sp, #0 8023742: 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) { 8023744: 492b ldr r1, [pc, #172] @ (80237f4 ) 8023746: 687a ldr r2, [r7, #4] 8023748: 4613 mov r3, r2 802374a: 005b lsls r3, r3, #1 802374c: 4413 add r3, r2 802374e: 00db lsls r3, r3, #3 8023750: 440b add r3, r1 8023752: 681b ldr r3, [r3, #0] 8023754: 2b00 cmp r3, #0 8023756: d013 beq.n 8023780 /* 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); 8023758: 4926 ldr r1, [pc, #152] @ (80237f4 ) 802375a: 687a ldr r2, [r7, #4] 802375c: 4613 mov r3, r2 802375e: 005b lsls r3, r3, #1 8023760: 4413 add r3, r2 8023762: 00db lsls r3, r3, #3 8023764: 440b add r3, r1 8023766: 681b ldr r3, [r3, #0] 8023768: 4618 mov r0, r3 802376a: f7f6 feb7 bl 801a4dc arp_table[i].q = NULL; 802376e: 4921 ldr r1, [pc, #132] @ (80237f4 ) 8023770: 687a ldr r2, [r7, #4] 8023772: 4613 mov r3, r2 8023774: 005b lsls r3, r3, #1 8023776: 4413 add r3, r2 8023778: 00db lsls r3, r3, #3 802377a: 440b add r3, r1 802377c: 2200 movs r2, #0 802377e: 601a str r2, [r3, #0] } /* recycle entry for re-use */ arp_table[i].state = ETHARP_STATE_EMPTY; 8023780: 491c ldr r1, [pc, #112] @ (80237f4 ) 8023782: 687a ldr r2, [r7, #4] 8023784: 4613 mov r3, r2 8023786: 005b lsls r3, r3, #1 8023788: 4413 add r3, r2 802378a: 00db lsls r3, r3, #3 802378c: 440b add r3, r1 802378e: 3314 adds r3, #20 8023790: 2200 movs r2, #0 8023792: 701a strb r2, [r3, #0] #ifdef LWIP_DEBUG /* for debugging, clean out the complete entry */ arp_table[i].ctime = 0; 8023794: 4917 ldr r1, [pc, #92] @ (80237f4 ) 8023796: 687a ldr r2, [r7, #4] 8023798: 4613 mov r3, r2 802379a: 005b lsls r3, r3, #1 802379c: 4413 add r3, r2 802379e: 00db lsls r3, r3, #3 80237a0: 440b add r3, r1 80237a2: 3312 adds r3, #18 80237a4: 2200 movs r2, #0 80237a6: 801a strh r2, [r3, #0] arp_table[i].netif = NULL; 80237a8: 4912 ldr r1, [pc, #72] @ (80237f4 ) 80237aa: 687a ldr r2, [r7, #4] 80237ac: 4613 mov r3, r2 80237ae: 005b lsls r3, r3, #1 80237b0: 4413 add r3, r2 80237b2: 00db lsls r3, r3, #3 80237b4: 440b add r3, r1 80237b6: 3308 adds r3, #8 80237b8: 2200 movs r2, #0 80237ba: 601a str r2, [r3, #0] ip4_addr_set_zero(&arp_table[i].ipaddr); 80237bc: 490d ldr r1, [pc, #52] @ (80237f4 ) 80237be: 687a ldr r2, [r7, #4] 80237c0: 4613 mov r3, r2 80237c2: 005b lsls r3, r3, #1 80237c4: 4413 add r3, r2 80237c6: 00db lsls r3, r3, #3 80237c8: 440b add r3, r1 80237ca: 3304 adds r3, #4 80237cc: 2200 movs r2, #0 80237ce: 601a str r2, [r3, #0] arp_table[i].ethaddr = ethzero; 80237d0: 4908 ldr r1, [pc, #32] @ (80237f4 ) 80237d2: 687a ldr r2, [r7, #4] 80237d4: 4613 mov r3, r2 80237d6: 005b lsls r3, r3, #1 80237d8: 4413 add r3, r2 80237da: 00db lsls r3, r3, #3 80237dc: 440b add r3, r1 80237de: 3308 adds r3, #8 80237e0: 4a05 ldr r2, [pc, #20] @ (80237f8 ) 80237e2: 3304 adds r3, #4 80237e4: 6810 ldr r0, [r2, #0] 80237e6: 6018 str r0, [r3, #0] 80237e8: 8892 ldrh r2, [r2, #4] 80237ea: 809a strh r2, [r3, #4] #endif /* LWIP_DEBUG */ } 80237ec: bf00 nop 80237ee: 3708 adds r7, #8 80237f0: 46bd mov sp, r7 80237f2: bd80 pop {r7, pc} 80237f4: 2402af20 .word 0x2402af20 80237f8: 08030c20 .word 0x08030c20 080237fc : * 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) { 80237fc: b580 push {r7, lr} 80237fe: b082 sub sp, #8 8023800: 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) { 8023802: 2300 movs r3, #0 8023804: 607b str r3, [r7, #4] 8023806: e096 b.n 8023936 u8_t state = arp_table[i].state; 8023808: 494f ldr r1, [pc, #316] @ (8023948 ) 802380a: 687a ldr r2, [r7, #4] 802380c: 4613 mov r3, r2 802380e: 005b lsls r3, r3, #1 8023810: 4413 add r3, r2 8023812: 00db lsls r3, r3, #3 8023814: 440b add r3, r1 8023816: 3314 adds r3, #20 8023818: 781b ldrb r3, [r3, #0] 802381a: 70fb strb r3, [r7, #3] if (state != ETHARP_STATE_EMPTY 802381c: 78fb ldrb r3, [r7, #3] 802381e: 2b00 cmp r3, #0 8023820: f000 8086 beq.w 8023930 #if ETHARP_SUPPORT_STATIC_ENTRIES && (state != ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ ) { arp_table[i].ctime++; 8023824: 4948 ldr r1, [pc, #288] @ (8023948 ) 8023826: 687a ldr r2, [r7, #4] 8023828: 4613 mov r3, r2 802382a: 005b lsls r3, r3, #1 802382c: 4413 add r3, r2 802382e: 00db lsls r3, r3, #3 8023830: 440b add r3, r1 8023832: 3312 adds r3, #18 8023834: 881b ldrh r3, [r3, #0] 8023836: 3301 adds r3, #1 8023838: b298 uxth r0, r3 802383a: 4943 ldr r1, [pc, #268] @ (8023948 ) 802383c: 687a ldr r2, [r7, #4] 802383e: 4613 mov r3, r2 8023840: 005b lsls r3, r3, #1 8023842: 4413 add r3, r2 8023844: 00db lsls r3, r3, #3 8023846: 440b add r3, r1 8023848: 3312 adds r3, #18 802384a: 4602 mov r2, r0 802384c: 801a strh r2, [r3, #0] if ((arp_table[i].ctime >= ARP_MAXAGE) || 802384e: 493e ldr r1, [pc, #248] @ (8023948 ) 8023850: 687a ldr r2, [r7, #4] 8023852: 4613 mov r3, r2 8023854: 005b lsls r3, r3, #1 8023856: 4413 add r3, r2 8023858: 00db lsls r3, r3, #3 802385a: 440b add r3, r1 802385c: 3312 adds r3, #18 802385e: 881b ldrh r3, [r3, #0] 8023860: f5b3 7f96 cmp.w r3, #300 @ 0x12c 8023864: d215 bcs.n 8023892 ((arp_table[i].state == ETHARP_STATE_PENDING) && 8023866: 4938 ldr r1, [pc, #224] @ (8023948 ) 8023868: 687a ldr r2, [r7, #4] 802386a: 4613 mov r3, r2 802386c: 005b lsls r3, r3, #1 802386e: 4413 add r3, r2 8023870: 00db lsls r3, r3, #3 8023872: 440b add r3, r1 8023874: 3314 adds r3, #20 8023876: 781b ldrb r3, [r3, #0] if ((arp_table[i].ctime >= ARP_MAXAGE) || 8023878: 2b01 cmp r3, #1 802387a: d10e bne.n 802389a (arp_table[i].ctime >= ARP_MAXPENDING))) { 802387c: 4932 ldr r1, [pc, #200] @ (8023948 ) 802387e: 687a ldr r2, [r7, #4] 8023880: 4613 mov r3, r2 8023882: 005b lsls r3, r3, #1 8023884: 4413 add r3, r2 8023886: 00db lsls r3, r3, #3 8023888: 440b add r3, r1 802388a: 3312 adds r3, #18 802388c: 881b ldrh r3, [r3, #0] ((arp_table[i].state == ETHARP_STATE_PENDING) && 802388e: 2b04 cmp r3, #4 8023890: d903 bls.n 802389a /* 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); 8023892: 6878 ldr r0, [r7, #4] 8023894: f7ff ff52 bl 802373c 8023898: e04a b.n 8023930 } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) { 802389a: 492b ldr r1, [pc, #172] @ (8023948 ) 802389c: 687a ldr r2, [r7, #4] 802389e: 4613 mov r3, r2 80238a0: 005b lsls r3, r3, #1 80238a2: 4413 add r3, r2 80238a4: 00db lsls r3, r3, #3 80238a6: 440b add r3, r1 80238a8: 3314 adds r3, #20 80238aa: 781b ldrb r3, [r3, #0] 80238ac: 2b03 cmp r3, #3 80238ae: d10a bne.n 80238c6 /* Don't send more than one request every 2 seconds. */ arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2; 80238b0: 4925 ldr r1, [pc, #148] @ (8023948 ) 80238b2: 687a ldr r2, [r7, #4] 80238b4: 4613 mov r3, r2 80238b6: 005b lsls r3, r3, #1 80238b8: 4413 add r3, r2 80238ba: 00db lsls r3, r3, #3 80238bc: 440b add r3, r1 80238be: 3314 adds r3, #20 80238c0: 2204 movs r2, #4 80238c2: 701a strb r2, [r3, #0] 80238c4: e034 b.n 8023930 } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) { 80238c6: 4920 ldr r1, [pc, #128] @ (8023948 ) 80238c8: 687a ldr r2, [r7, #4] 80238ca: 4613 mov r3, r2 80238cc: 005b lsls r3, r3, #1 80238ce: 4413 add r3, r2 80238d0: 00db lsls r3, r3, #3 80238d2: 440b add r3, r1 80238d4: 3314 adds r3, #20 80238d6: 781b ldrb r3, [r3, #0] 80238d8: 2b04 cmp r3, #4 80238da: d10a bne.n 80238f2 /* Reset state to stable, so that the next transmitted packet will re-send an ARP request. */ arp_table[i].state = ETHARP_STATE_STABLE; 80238dc: 491a ldr r1, [pc, #104] @ (8023948 ) 80238de: 687a ldr r2, [r7, #4] 80238e0: 4613 mov r3, r2 80238e2: 005b lsls r3, r3, #1 80238e4: 4413 add r3, r2 80238e6: 00db lsls r3, r3, #3 80238e8: 440b add r3, r1 80238ea: 3314 adds r3, #20 80238ec: 2202 movs r2, #2 80238ee: 701a strb r2, [r3, #0] 80238f0: e01e b.n 8023930 } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 80238f2: 4915 ldr r1, [pc, #84] @ (8023948 ) 80238f4: 687a ldr r2, [r7, #4] 80238f6: 4613 mov r3, r2 80238f8: 005b lsls r3, r3, #1 80238fa: 4413 add r3, r2 80238fc: 00db lsls r3, r3, #3 80238fe: 440b add r3, r1 8023900: 3314 adds r3, #20 8023902: 781b ldrb r3, [r3, #0] 8023904: 2b01 cmp r3, #1 8023906: d113 bne.n 8023930 /* still pending, resend an ARP query */ etharp_request(arp_table[i].netif, &arp_table[i].ipaddr); 8023908: 490f ldr r1, [pc, #60] @ (8023948 ) 802390a: 687a ldr r2, [r7, #4] 802390c: 4613 mov r3, r2 802390e: 005b lsls r3, r3, #1 8023910: 4413 add r3, r2 8023912: 00db lsls r3, r3, #3 8023914: 440b add r3, r1 8023916: 3308 adds r3, #8 8023918: 6818 ldr r0, [r3, #0] 802391a: 687a ldr r2, [r7, #4] 802391c: 4613 mov r3, r2 802391e: 005b lsls r3, r3, #1 8023920: 4413 add r3, r2 8023922: 00db lsls r3, r3, #3 8023924: 4a08 ldr r2, [pc, #32] @ (8023948 ) 8023926: 4413 add r3, r2 8023928: 3304 adds r3, #4 802392a: 4619 mov r1, r3 802392c: f000 fe76 bl 802461c for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8023930: 687b ldr r3, [r7, #4] 8023932: 3301 adds r3, #1 8023934: 607b str r3, [r7, #4] 8023936: 687b ldr r3, [r7, #4] 8023938: 2b09 cmp r3, #9 802393a: f77f af65 ble.w 8023808 } } } } 802393e: bf00 nop 8023940: bf00 nop 8023942: 3708 adds r7, #8 8023944: 46bd mov sp, r7 8023946: bd80 pop {r7, pc} 8023948: 2402af20 .word 0x2402af20 0802394c : * @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) { 802394c: b580 push {r7, lr} 802394e: b08a sub sp, #40 @ 0x28 8023950: af00 add r7, sp, #0 8023952: 60f8 str r0, [r7, #12] 8023954: 460b mov r3, r1 8023956: 607a str r2, [r7, #4] 8023958: 72fb strb r3, [r7, #11] s16_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; 802395a: 230a movs r3, #10 802395c: 843b strh r3, [r7, #32] 802395e: 230a movs r3, #10 8023960: 847b strh r3, [r7, #34] @ 0x22 s16_t empty = ARP_TABLE_SIZE; 8023962: 230a movs r3, #10 8023964: 84bb strh r3, [r7, #36] @ 0x24 s16_t i = 0; 8023966: 2300 movs r3, #0 8023968: 84fb strh r3, [r7, #38] @ 0x26 /* oldest entry with packets on queue */ s16_t old_queue = ARP_TABLE_SIZE; 802396a: 230a movs r3, #10 802396c: 83fb strh r3, [r7, #30] /* its age */ u16_t age_queue = 0, age_pending = 0, age_stable = 0; 802396e: 2300 movs r3, #0 8023970: 83bb strh r3, [r7, #28] 8023972: 2300 movs r3, #0 8023974: 837b strh r3, [r7, #26] 8023976: 2300 movs r3, #0 8023978: 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) { 802397a: 2300 movs r3, #0 802397c: 84fb strh r3, [r7, #38] @ 0x26 802397e: e0ae b.n 8023ade u8_t state = arp_table[i].state; 8023980: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8023984: 49a6 ldr r1, [pc, #664] @ (8023c20 ) 8023986: 4613 mov r3, r2 8023988: 005b lsls r3, r3, #1 802398a: 4413 add r3, r2 802398c: 00db lsls r3, r3, #3 802398e: 440b add r3, r1 8023990: 3314 adds r3, #20 8023992: 781b ldrb r3, [r3, #0] 8023994: 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)) { 8023996: f9b7 3024 ldrsh.w r3, [r7, #36] @ 0x24 802399a: 2b0a cmp r3, #10 802399c: d105 bne.n 80239aa 802399e: 7dfb ldrb r3, [r7, #23] 80239a0: 2b00 cmp r3, #0 80239a2: d102 bne.n 80239aa LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %d\n", (int)i)); /* remember first empty entry */ empty = i; 80239a4: 8cfb ldrh r3, [r7, #38] @ 0x26 80239a6: 84bb strh r3, [r7, #36] @ 0x24 80239a8: e095 b.n 8023ad6 } else if (state != ETHARP_STATE_EMPTY) { 80239aa: 7dfb ldrb r3, [r7, #23] 80239ac: 2b00 cmp r3, #0 80239ae: f000 8092 beq.w 8023ad6 LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE", 80239b2: 7dfb ldrb r3, [r7, #23] 80239b4: 2b01 cmp r3, #1 80239b6: d009 beq.n 80239cc 80239b8: 7dfb ldrb r3, [r7, #23] 80239ba: 2b01 cmp r3, #1 80239bc: d806 bhi.n 80239cc 80239be: 4b99 ldr r3, [pc, #612] @ (8023c24 ) 80239c0: f240 1223 movw r2, #291 @ 0x123 80239c4: 4998 ldr r1, [pc, #608] @ (8023c28 ) 80239c6: 4899 ldr r0, [pc, #612] @ (8023c2c ) 80239c8: f006 f800 bl 80299cc 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) 80239cc: 68fb ldr r3, [r7, #12] 80239ce: 2b00 cmp r3, #0 80239d0: d020 beq.n 8023a14 80239d2: 68fb ldr r3, [r7, #12] 80239d4: 6819 ldr r1, [r3, #0] 80239d6: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 80239da: 4891 ldr r0, [pc, #580] @ (8023c20 ) 80239dc: 4613 mov r3, r2 80239de: 005b lsls r3, r3, #1 80239e0: 4413 add r3, r2 80239e2: 00db lsls r3, r3, #3 80239e4: 4403 add r3, r0 80239e6: 3304 adds r3, #4 80239e8: 681b ldr r3, [r3, #0] 80239ea: 4299 cmp r1, r3 80239ec: d112 bne.n 8023a14 #if ETHARP_TABLE_MATCH_NETIF && ((netif == NULL) || (netif == arp_table[i].netif)) 80239ee: 687b ldr r3, [r7, #4] 80239f0: 2b00 cmp r3, #0 80239f2: d00c beq.n 8023a0e 80239f4: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 80239f8: 4989 ldr r1, [pc, #548] @ (8023c20 ) 80239fa: 4613 mov r3, r2 80239fc: 005b lsls r3, r3, #1 80239fe: 4413 add r3, r2 8023a00: 00db lsls r3, r3, #3 8023a02: 440b add r3, r1 8023a04: 3308 adds r3, #8 8023a06: 681b ldr r3, [r3, #0] 8023a08: 687a ldr r2, [r7, #4] 8023a0a: 429a cmp r2, r3 8023a0c: d102 bne.n 8023a14 #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; 8023a0e: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 8023a12: e100 b.n 8023c16 } /* pending entry? */ if (state == ETHARP_STATE_PENDING) { 8023a14: 7dfb ldrb r3, [r7, #23] 8023a16: 2b01 cmp r3, #1 8023a18: d140 bne.n 8023a9c /* pending with queued packets? */ if (arp_table[i].q != NULL) { 8023a1a: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8023a1e: 4980 ldr r1, [pc, #512] @ (8023c20 ) 8023a20: 4613 mov r3, r2 8023a22: 005b lsls r3, r3, #1 8023a24: 4413 add r3, r2 8023a26: 00db lsls r3, r3, #3 8023a28: 440b add r3, r1 8023a2a: 681b ldr r3, [r3, #0] 8023a2c: 2b00 cmp r3, #0 8023a2e: d01a beq.n 8023a66 if (arp_table[i].ctime >= age_queue) { 8023a30: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8023a34: 497a ldr r1, [pc, #488] @ (8023c20 ) 8023a36: 4613 mov r3, r2 8023a38: 005b lsls r3, r3, #1 8023a3a: 4413 add r3, r2 8023a3c: 00db lsls r3, r3, #3 8023a3e: 440b add r3, r1 8023a40: 3312 adds r3, #18 8023a42: 881b ldrh r3, [r3, #0] 8023a44: 8bba ldrh r2, [r7, #28] 8023a46: 429a cmp r2, r3 8023a48: d845 bhi.n 8023ad6 old_queue = i; 8023a4a: 8cfb ldrh r3, [r7, #38] @ 0x26 8023a4c: 83fb strh r3, [r7, #30] age_queue = arp_table[i].ctime; 8023a4e: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8023a52: 4973 ldr r1, [pc, #460] @ (8023c20 ) 8023a54: 4613 mov r3, r2 8023a56: 005b lsls r3, r3, #1 8023a58: 4413 add r3, r2 8023a5a: 00db lsls r3, r3, #3 8023a5c: 440b add r3, r1 8023a5e: 3312 adds r3, #18 8023a60: 881b ldrh r3, [r3, #0] 8023a62: 83bb strh r3, [r7, #28] 8023a64: e037 b.n 8023ad6 } } else /* pending without queued packets? */ { if (arp_table[i].ctime >= age_pending) { 8023a66: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8023a6a: 496d ldr r1, [pc, #436] @ (8023c20 ) 8023a6c: 4613 mov r3, r2 8023a6e: 005b lsls r3, r3, #1 8023a70: 4413 add r3, r2 8023a72: 00db lsls r3, r3, #3 8023a74: 440b add r3, r1 8023a76: 3312 adds r3, #18 8023a78: 881b ldrh r3, [r3, #0] 8023a7a: 8b7a ldrh r2, [r7, #26] 8023a7c: 429a cmp r2, r3 8023a7e: d82a bhi.n 8023ad6 old_pending = i; 8023a80: 8cfb ldrh r3, [r7, #38] @ 0x26 8023a82: 843b strh r3, [r7, #32] age_pending = arp_table[i].ctime; 8023a84: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8023a88: 4965 ldr r1, [pc, #404] @ (8023c20 ) 8023a8a: 4613 mov r3, r2 8023a8c: 005b lsls r3, r3, #1 8023a8e: 4413 add r3, r2 8023a90: 00db lsls r3, r3, #3 8023a92: 440b add r3, r1 8023a94: 3312 adds r3, #18 8023a96: 881b ldrh r3, [r3, #0] 8023a98: 837b strh r3, [r7, #26] 8023a9a: e01c b.n 8023ad6 } } /* stable entry? */ } else if (state >= ETHARP_STATE_STABLE) { 8023a9c: 7dfb ldrb r3, [r7, #23] 8023a9e: 2b01 cmp r3, #1 8023aa0: d919 bls.n 8023ad6 /* 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) { 8023aa2: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8023aa6: 495e ldr r1, [pc, #376] @ (8023c20 ) 8023aa8: 4613 mov r3, r2 8023aaa: 005b lsls r3, r3, #1 8023aac: 4413 add r3, r2 8023aae: 00db lsls r3, r3, #3 8023ab0: 440b add r3, r1 8023ab2: 3312 adds r3, #18 8023ab4: 881b ldrh r3, [r3, #0] 8023ab6: 8b3a ldrh r2, [r7, #24] 8023ab8: 429a cmp r2, r3 8023aba: d80c bhi.n 8023ad6 old_stable = i; 8023abc: 8cfb ldrh r3, [r7, #38] @ 0x26 8023abe: 847b strh r3, [r7, #34] @ 0x22 age_stable = arp_table[i].ctime; 8023ac0: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8023ac4: 4956 ldr r1, [pc, #344] @ (8023c20 ) 8023ac6: 4613 mov r3, r2 8023ac8: 005b lsls r3, r3, #1 8023aca: 4413 add r3, r2 8023acc: 00db lsls r3, r3, #3 8023ace: 440b add r3, r1 8023ad0: 3312 adds r3, #18 8023ad2: 881b ldrh r3, [r3, #0] 8023ad4: 833b strh r3, [r7, #24] for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8023ad6: 8cfb ldrh r3, [r7, #38] @ 0x26 8023ad8: 3301 adds r3, #1 8023ada: b29b uxth r3, r3 8023adc: 84fb strh r3, [r7, #38] @ 0x26 8023ade: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 8023ae2: 2b09 cmp r3, #9 8023ae4: f77f af4c ble.w 8023980 } } /* { we have no match } => try to create a new entry */ /* don't create new entry, only search? */ if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || 8023ae8: 7afb ldrb r3, [r7, #11] 8023aea: f003 0302 and.w r3, r3, #2 8023aee: 2b00 cmp r3, #0 8023af0: d108 bne.n 8023b04 8023af2: f9b7 3024 ldrsh.w r3, [r7, #36] @ 0x24 8023af6: 2b0a cmp r3, #10 8023af8: d107 bne.n 8023b0a /* or no empty entry found and not allowed to recycle? */ ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { 8023afa: 7afb ldrb r3, [r7, #11] 8023afc: f003 0301 and.w r3, r3, #1 8023b00: 2b00 cmp r3, #0 8023b02: d102 bne.n 8023b0a 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; 8023b04: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8023b08: e085 b.n 8023c16 * * { ETHARP_FLAG_TRY_HARD is set at this point } */ /* 1) empty entry available? */ if (empty < ARP_TABLE_SIZE) { 8023b0a: f9b7 3024 ldrsh.w r3, [r7, #36] @ 0x24 8023b0e: 2b09 cmp r3, #9 8023b10: dc02 bgt.n 8023b18 i = empty; 8023b12: 8cbb ldrh r3, [r7, #36] @ 0x24 8023b14: 84fb strh r3, [r7, #38] @ 0x26 8023b16: e039 b.n 8023b8c 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) { 8023b18: f9b7 3022 ldrsh.w r3, [r7, #34] @ 0x22 8023b1c: 2b09 cmp r3, #9 8023b1e: dc14 bgt.n 8023b4a /* recycle oldest stable*/ i = old_stable; 8023b20: 8c7b ldrh r3, [r7, #34] @ 0x22 8023b22: 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); 8023b24: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8023b28: 493d ldr r1, [pc, #244] @ (8023c20 ) 8023b2a: 4613 mov r3, r2 8023b2c: 005b lsls r3, r3, #1 8023b2e: 4413 add r3, r2 8023b30: 00db lsls r3, r3, #3 8023b32: 440b add r3, r1 8023b34: 681b ldr r3, [r3, #0] 8023b36: 2b00 cmp r3, #0 8023b38: d018 beq.n 8023b6c 8023b3a: 4b3a ldr r3, [pc, #232] @ (8023c24 ) 8023b3c: f240 126d movw r2, #365 @ 0x16d 8023b40: 493b ldr r1, [pc, #236] @ (8023c30 ) 8023b42: 483a ldr r0, [pc, #232] @ (8023c2c ) 8023b44: f005 ff42 bl 80299cc 8023b48: e010 b.n 8023b6c /* 3) found recyclable pending entry without queued packets? */ } else if (old_pending < ARP_TABLE_SIZE) { 8023b4a: f9b7 3020 ldrsh.w r3, [r7, #32] 8023b4e: 2b09 cmp r3, #9 8023b50: dc02 bgt.n 8023b58 /* recycle oldest pending */ i = old_pending; 8023b52: 8c3b ldrh r3, [r7, #32] 8023b54: 84fb strh r3, [r7, #38] @ 0x26 8023b56: e009 b.n 8023b6c 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) { 8023b58: f9b7 301e ldrsh.w r3, [r7, #30] 8023b5c: 2b09 cmp r3, #9 8023b5e: dc02 bgt.n 8023b66 /* recycle oldest pending (queued packets are free in etharp_free_entry) */ i = old_queue; 8023b60: 8bfb ldrh r3, [r7, #30] 8023b62: 84fb strh r3, [r7, #38] @ 0x26 8023b64: e002 b.n 8023b6c 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; 8023b66: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8023b6a: e054 b.n 8023c16 } /* { empty or recyclable entry found } */ LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); 8023b6c: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 8023b70: 2b09 cmp r3, #9 8023b72: dd06 ble.n 8023b82 8023b74: 4b2b ldr r3, [pc, #172] @ (8023c24 ) 8023b76: f240 127f movw r2, #383 @ 0x17f 8023b7a: 492e ldr r1, [pc, #184] @ (8023c34 ) 8023b7c: 482b ldr r0, [pc, #172] @ (8023c2c ) 8023b7e: f005 ff25 bl 80299cc etharp_free_entry(i); 8023b82: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 8023b86: 4618 mov r0, r3 8023b88: f7ff fdd8 bl 802373c } LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); 8023b8c: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 8023b90: 2b09 cmp r3, #9 8023b92: dd06 ble.n 8023ba2 8023b94: 4b23 ldr r3, [pc, #140] @ (8023c24 ) 8023b96: f240 1283 movw r2, #387 @ 0x183 8023b9a: 4926 ldr r1, [pc, #152] @ (8023c34 ) 8023b9c: 4823 ldr r0, [pc, #140] @ (8023c2c ) 8023b9e: f005 ff15 bl 80299cc LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY", 8023ba2: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8023ba6: 491e ldr r1, [pc, #120] @ (8023c20 ) 8023ba8: 4613 mov r3, r2 8023baa: 005b lsls r3, r3, #1 8023bac: 4413 add r3, r2 8023bae: 00db lsls r3, r3, #3 8023bb0: 440b add r3, r1 8023bb2: 3314 adds r3, #20 8023bb4: 781b ldrb r3, [r3, #0] 8023bb6: 2b00 cmp r3, #0 8023bb8: d006 beq.n 8023bc8 8023bba: 4b1a ldr r3, [pc, #104] @ (8023c24 ) 8023bbc: f44f 72c2 mov.w r2, #388 @ 0x184 8023bc0: 491d ldr r1, [pc, #116] @ (8023c38 ) 8023bc2: 481a ldr r0, [pc, #104] @ (8023c2c ) 8023bc4: f005 ff02 bl 80299cc arp_table[i].state == ETHARP_STATE_EMPTY); /* IP address given? */ if (ipaddr != NULL) { 8023bc8: 68fb ldr r3, [r7, #12] 8023bca: 2b00 cmp r3, #0 8023bcc: d00b beq.n 8023be6 /* set IP address */ ip4_addr_copy(arp_table[i].ipaddr, *ipaddr); 8023bce: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8023bd2: 68fb ldr r3, [r7, #12] 8023bd4: 6819 ldr r1, [r3, #0] 8023bd6: 4812 ldr r0, [pc, #72] @ (8023c20 ) 8023bd8: 4613 mov r3, r2 8023bda: 005b lsls r3, r3, #1 8023bdc: 4413 add r3, r2 8023bde: 00db lsls r3, r3, #3 8023be0: 4403 add r3, r0 8023be2: 3304 adds r3, #4 8023be4: 6019 str r1, [r3, #0] } arp_table[i].ctime = 0; 8023be6: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8023bea: 490d ldr r1, [pc, #52] @ (8023c20 ) 8023bec: 4613 mov r3, r2 8023bee: 005b lsls r3, r3, #1 8023bf0: 4413 add r3, r2 8023bf2: 00db lsls r3, r3, #3 8023bf4: 440b add r3, r1 8023bf6: 3312 adds r3, #18 8023bf8: 2200 movs r2, #0 8023bfa: 801a strh r2, [r3, #0] #if ETHARP_TABLE_MATCH_NETIF arp_table[i].netif = netif; 8023bfc: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8023c00: 4907 ldr r1, [pc, #28] @ (8023c20 ) 8023c02: 4613 mov r3, r2 8023c04: 005b lsls r3, r3, #1 8023c06: 4413 add r3, r2 8023c08: 00db lsls r3, r3, #3 8023c0a: 440b add r3, r1 8023c0c: 3308 adds r3, #8 8023c0e: 687a ldr r2, [r7, #4] 8023c10: 601a str r2, [r3, #0] #endif /* ETHARP_TABLE_MATCH_NETIF */ return (s16_t)i; 8023c12: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 } 8023c16: 4618 mov r0, r3 8023c18: 3728 adds r7, #40 @ 0x28 8023c1a: 46bd mov sp, r7 8023c1c: bd80 pop {r7, pc} 8023c1e: bf00 nop 8023c20: 2402af20 .word 0x2402af20 8023c24: 080301f4 .word 0x080301f4 8023c28: 0803022c .word 0x0803022c 8023c2c: 0803026c .word 0x0803026c 8023c30: 08030294 .word 0x08030294 8023c34: 080302ac .word 0x080302ac 8023c38: 080302c0 .word 0x080302c0 08023c3c : * * @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) { 8023c3c: b580 push {r7, lr} 8023c3e: b088 sub sp, #32 8023c40: af02 add r7, sp, #8 8023c42: 60f8 str r0, [r7, #12] 8023c44: 60b9 str r1, [r7, #8] 8023c46: 607a str r2, [r7, #4] 8023c48: 70fb strb r3, [r7, #3] s16_t i; LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN); 8023c4a: 68fb ldr r3, [r7, #12] 8023c4c: f893 3030 ldrb.w r3, [r3, #48] @ 0x30 8023c50: 2b06 cmp r3, #6 8023c52: d006 beq.n 8023c62 8023c54: 4b48 ldr r3, [pc, #288] @ (8023d78 ) 8023c56: f240 12a9 movw r2, #425 @ 0x1a9 8023c5a: 4948 ldr r1, [pc, #288] @ (8023d7c ) 8023c5c: 4848 ldr r0, [pc, #288] @ (8023d80 ) 8023c5e: f005 feb5 bl 80299cc 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) || 8023c62: 68bb ldr r3, [r7, #8] 8023c64: 2b00 cmp r3, #0 8023c66: d012 beq.n 8023c8e 8023c68: 68bb ldr r3, [r7, #8] 8023c6a: 681b ldr r3, [r3, #0] 8023c6c: 2b00 cmp r3, #0 8023c6e: d00e beq.n 8023c8e ip4_addr_isbroadcast(ipaddr, netif) || 8023c70: 68bb ldr r3, [r7, #8] 8023c72: 681b ldr r3, [r3, #0] 8023c74: 68f9 ldr r1, [r7, #12] 8023c76: 4618 mov r0, r3 8023c78: f001 f952 bl 8024f20 8023c7c: 4603 mov r3, r0 if (ip4_addr_isany(ipaddr) || 8023c7e: 2b00 cmp r3, #0 8023c80: d105 bne.n 8023c8e ip4_addr_ismulticast(ipaddr)) { 8023c82: 68bb ldr r3, [r7, #8] 8023c84: 681b ldr r3, [r3, #0] 8023c86: f003 03f0 and.w r3, r3, #240 @ 0xf0 ip4_addr_isbroadcast(ipaddr, netif) || 8023c8a: 2be0 cmp r3, #224 @ 0xe0 8023c8c: d102 bne.n 8023c94 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; 8023c8e: f06f 030f mvn.w r3, #15 8023c92: e06c b.n 8023d6e } /* find or create ARP entry */ i = etharp_find_entry(ipaddr, flags, netif); 8023c94: 78fb ldrb r3, [r7, #3] 8023c96: 68fa ldr r2, [r7, #12] 8023c98: 4619 mov r1, r3 8023c9a: 68b8 ldr r0, [r7, #8] 8023c9c: f7ff fe56 bl 802394c 8023ca0: 4603 mov r3, r0 8023ca2: 82fb strh r3, [r7, #22] /* bail out if no entry could be found */ if (i < 0) { 8023ca4: f9b7 3016 ldrsh.w r3, [r7, #22] 8023ca8: 2b00 cmp r3, #0 8023caa: da02 bge.n 8023cb2 return (err_t)i; 8023cac: 8afb ldrh r3, [r7, #22] 8023cae: b25b sxtb r3, r3 8023cb0: e05d b.n 8023d6e return ERR_VAL; } else #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* mark it stable */ arp_table[i].state = ETHARP_STATE_STABLE; 8023cb2: f9b7 2016 ldrsh.w r2, [r7, #22] 8023cb6: 4933 ldr r1, [pc, #204] @ (8023d84 ) 8023cb8: 4613 mov r3, r2 8023cba: 005b lsls r3, r3, #1 8023cbc: 4413 add r3, r2 8023cbe: 00db lsls r3, r3, #3 8023cc0: 440b add r3, r1 8023cc2: 3314 adds r3, #20 8023cc4: 2202 movs r2, #2 8023cc6: 701a strb r2, [r3, #0] } /* record network interface */ arp_table[i].netif = netif; 8023cc8: f9b7 2016 ldrsh.w r2, [r7, #22] 8023ccc: 492d ldr r1, [pc, #180] @ (8023d84 ) 8023cce: 4613 mov r3, r2 8023cd0: 005b lsls r3, r3, #1 8023cd2: 4413 add r3, r2 8023cd4: 00db lsls r3, r3, #3 8023cd6: 440b add r3, r1 8023cd8: 3308 adds r3, #8 8023cda: 68fa ldr r2, [r7, #12] 8023cdc: 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); 8023cde: f9b7 2016 ldrsh.w r2, [r7, #22] 8023ce2: 4613 mov r3, r2 8023ce4: 005b lsls r3, r3, #1 8023ce6: 4413 add r3, r2 8023ce8: 00db lsls r3, r3, #3 8023cea: 3308 adds r3, #8 8023cec: 4a25 ldr r2, [pc, #148] @ (8023d84 ) 8023cee: 4413 add r3, r2 8023cf0: 3304 adds r3, #4 8023cf2: 2206 movs r2, #6 8023cf4: 6879 ldr r1, [r7, #4] 8023cf6: 4618 mov r0, r3 8023cf8: f006 f8f1 bl 8029ede /* reset time stamp */ arp_table[i].ctime = 0; 8023cfc: f9b7 2016 ldrsh.w r2, [r7, #22] 8023d00: 4920 ldr r1, [pc, #128] @ (8023d84 ) 8023d02: 4613 mov r3, r2 8023d04: 005b lsls r3, r3, #1 8023d06: 4413 add r3, r2 8023d08: 00db lsls r3, r3, #3 8023d0a: 440b add r3, r1 8023d0c: 3312 adds r3, #18 8023d0e: 2200 movs r2, #0 8023d10: 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) { 8023d12: f9b7 2016 ldrsh.w r2, [r7, #22] 8023d16: 491b ldr r1, [pc, #108] @ (8023d84 ) 8023d18: 4613 mov r3, r2 8023d1a: 005b lsls r3, r3, #1 8023d1c: 4413 add r3, r2 8023d1e: 00db lsls r3, r3, #3 8023d20: 440b add r3, r1 8023d22: 681b ldr r3, [r3, #0] 8023d24: 2b00 cmp r3, #0 8023d26: d021 beq.n 8023d6c struct pbuf *p = arp_table[i].q; 8023d28: f9b7 2016 ldrsh.w r2, [r7, #22] 8023d2c: 4915 ldr r1, [pc, #84] @ (8023d84 ) 8023d2e: 4613 mov r3, r2 8023d30: 005b lsls r3, r3, #1 8023d32: 4413 add r3, r2 8023d34: 00db lsls r3, r3, #3 8023d36: 440b add r3, r1 8023d38: 681b ldr r3, [r3, #0] 8023d3a: 613b str r3, [r7, #16] arp_table[i].q = NULL; 8023d3c: f9b7 2016 ldrsh.w r2, [r7, #22] 8023d40: 4910 ldr r1, [pc, #64] @ (8023d84 ) 8023d42: 4613 mov r3, r2 8023d44: 005b lsls r3, r3, #1 8023d46: 4413 add r3, r2 8023d48: 00db lsls r3, r3, #3 8023d4a: 440b add r3, r1 8023d4c: 2200 movs r2, #0 8023d4e: 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); 8023d50: 68fb ldr r3, [r7, #12] 8023d52: f103 022a add.w r2, r3, #42 @ 0x2a 8023d56: f44f 6300 mov.w r3, #2048 @ 0x800 8023d5a: 9300 str r3, [sp, #0] 8023d5c: 687b ldr r3, [r7, #4] 8023d5e: 6939 ldr r1, [r7, #16] 8023d60: 68f8 ldr r0, [r7, #12] 8023d62: f002 f9bb bl 80260dc /* free the queued IP packet */ pbuf_free(p); 8023d66: 6938 ldr r0, [r7, #16] 8023d68: f7f6 fbb8 bl 801a4dc } return ERR_OK; 8023d6c: 2300 movs r3, #0 } 8023d6e: 4618 mov r0, r3 8023d70: 3718 adds r7, #24 8023d72: 46bd mov sp, r7 8023d74: bd80 pop {r7, pc} 8023d76: bf00 nop 8023d78: 080301f4 .word 0x080301f4 8023d7c: 080302ec .word 0x080302ec 8023d80: 0803026c .word 0x0803026c 8023d84: 2402af20 .word 0x2402af20 08023d88 : * * @param netif points to a network interface */ void etharp_cleanup_netif(struct netif *netif) { 8023d88: b580 push {r7, lr} 8023d8a: b084 sub sp, #16 8023d8c: af00 add r7, sp, #0 8023d8e: 6078 str r0, [r7, #4] int i; for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8023d90: 2300 movs r3, #0 8023d92: 60fb str r3, [r7, #12] 8023d94: e01e b.n 8023dd4 u8_t state = arp_table[i].state; 8023d96: 4913 ldr r1, [pc, #76] @ (8023de4 ) 8023d98: 68fa ldr r2, [r7, #12] 8023d9a: 4613 mov r3, r2 8023d9c: 005b lsls r3, r3, #1 8023d9e: 4413 add r3, r2 8023da0: 00db lsls r3, r3, #3 8023da2: 440b add r3, r1 8023da4: 3314 adds r3, #20 8023da6: 781b ldrb r3, [r3, #0] 8023da8: 72fb strb r3, [r7, #11] if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { 8023daa: 7afb ldrb r3, [r7, #11] 8023dac: 2b00 cmp r3, #0 8023dae: d00e beq.n 8023dce 8023db0: 490c ldr r1, [pc, #48] @ (8023de4 ) 8023db2: 68fa ldr r2, [r7, #12] 8023db4: 4613 mov r3, r2 8023db6: 005b lsls r3, r3, #1 8023db8: 4413 add r3, r2 8023dba: 00db lsls r3, r3, #3 8023dbc: 440b add r3, r1 8023dbe: 3308 adds r3, #8 8023dc0: 681b ldr r3, [r3, #0] 8023dc2: 687a ldr r2, [r7, #4] 8023dc4: 429a cmp r2, r3 8023dc6: d102 bne.n 8023dce etharp_free_entry(i); 8023dc8: 68f8 ldr r0, [r7, #12] 8023dca: f7ff fcb7 bl 802373c for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8023dce: 68fb ldr r3, [r7, #12] 8023dd0: 3301 adds r3, #1 8023dd2: 60fb str r3, [r7, #12] 8023dd4: 68fb ldr r3, [r7, #12] 8023dd6: 2b09 cmp r3, #9 8023dd8: dddd ble.n 8023d96 } } } 8023dda: bf00 nop 8023ddc: bf00 nop 8023dde: 3710 adds r7, #16 8023de0: 46bd mov sp, r7 8023de2: bd80 pop {r7, pc} 8023de4: 2402af20 .word 0x2402af20 08023de8 : * * @see pbuf_free() */ void etharp_input(struct pbuf *p, struct netif *netif) { 8023de8: b5b0 push {r4, r5, r7, lr} 8023dea: b08a sub sp, #40 @ 0x28 8023dec: af04 add r7, sp, #16 8023dee: 6078 str r0, [r7, #4] 8023df0: 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(); 8023df2: f7ec fb9d bl 8010530 LWIP_ERROR("netif != NULL", (netif != NULL), return;); 8023df6: 683b ldr r3, [r7, #0] 8023df8: 2b00 cmp r3, #0 8023dfa: d107 bne.n 8023e0c 8023dfc: 4b3f ldr r3, [pc, #252] @ (8023efc ) 8023dfe: f240 228a movw r2, #650 @ 0x28a 8023e02: 493f ldr r1, [pc, #252] @ (8023f00 ) 8023e04: 483f ldr r0, [pc, #252] @ (8023f04 ) 8023e06: f005 fde1 bl 80299cc 8023e0a: e074 b.n 8023ef6 hdr = (struct etharp_hdr *)p->payload; 8023e0c: 687b ldr r3, [r7, #4] 8023e0e: 685b ldr r3, [r3, #4] 8023e10: 617b str r3, [r7, #20] /* RFC 826 "Packet Reception": */ if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) || 8023e12: 697b ldr r3, [r7, #20] 8023e14: 881b ldrh r3, [r3, #0] 8023e16: b29b uxth r3, r3 8023e18: f5b3 7f80 cmp.w r3, #256 @ 0x100 8023e1c: d10c bne.n 8023e38 (hdr->hwlen != ETH_HWADDR_LEN) || 8023e1e: 697b ldr r3, [r7, #20] 8023e20: 791b ldrb r3, [r3, #4] if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) || 8023e22: 2b06 cmp r3, #6 8023e24: d108 bne.n 8023e38 (hdr->protolen != sizeof(ip4_addr_t)) || 8023e26: 697b ldr r3, [r7, #20] 8023e28: 795b ldrb r3, [r3, #5] (hdr->hwlen != ETH_HWADDR_LEN) || 8023e2a: 2b04 cmp r3, #4 8023e2c: d104 bne.n 8023e38 (hdr->proto != PP_HTONS(ETHTYPE_IP))) { 8023e2e: 697b ldr r3, [r7, #20] 8023e30: 885b ldrh r3, [r3, #2] 8023e32: b29b uxth r3, r3 (hdr->protolen != sizeof(ip4_addr_t)) || 8023e34: 2b08 cmp r3, #8 8023e36: d003 beq.n 8023e40 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); 8023e38: 6878 ldr r0, [r7, #4] 8023e3a: f7f6 fb4f bl 801a4dc return; 8023e3e: e05a b.n 8023ef6 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); 8023e40: 697b ldr r3, [r7, #20] 8023e42: 330e adds r3, #14 8023e44: 681b ldr r3, [r3, #0] 8023e46: 60fb str r3, [r7, #12] IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&dipaddr, &hdr->dipaddr); 8023e48: 697b ldr r3, [r7, #20] 8023e4a: 3318 adds r3, #24 8023e4c: 681b ldr r3, [r3, #0] 8023e4e: 60bb str r3, [r7, #8] /* this interface is not configured? */ if (ip4_addr_isany_val(*netif_ip4_addr(netif))) { 8023e50: 683b ldr r3, [r7, #0] 8023e52: 3304 adds r3, #4 8023e54: 681b ldr r3, [r3, #0] 8023e56: 2b00 cmp r3, #0 8023e58: d102 bne.n 8023e60 for_us = 0; 8023e5a: 2300 movs r3, #0 8023e5c: 74fb strb r3, [r7, #19] 8023e5e: e009 b.n 8023e74 } else { /* ARP packet directed to us? */ for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif)); 8023e60: 68ba ldr r2, [r7, #8] 8023e62: 683b ldr r3, [r7, #0] 8023e64: 3304 adds r3, #4 8023e66: 681b ldr r3, [r3, #0] 8023e68: 429a cmp r2, r3 8023e6a: bf0c ite eq 8023e6c: 2301 moveq r3, #1 8023e6e: 2300 movne r3, #0 8023e70: b2db uxtb r3, r3 8023e72: 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), 8023e74: 697b ldr r3, [r7, #20] 8023e76: f103 0208 add.w r2, r3, #8 8023e7a: 7cfb ldrb r3, [r7, #19] 8023e7c: 2b00 cmp r3, #0 8023e7e: d001 beq.n 8023e84 8023e80: 2301 movs r3, #1 8023e82: e000 b.n 8023e86 8023e84: 2302 movs r3, #2 8023e86: f107 010c add.w r1, r7, #12 8023e8a: 6838 ldr r0, [r7, #0] 8023e8c: f7ff fed6 bl 8023c3c for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY); /* now act on the message itself */ switch (hdr->opcode) { 8023e90: 697b ldr r3, [r7, #20] 8023e92: 88db ldrh r3, [r3, #6] 8023e94: b29b uxth r3, r3 8023e96: f5b3 7f80 cmp.w r3, #256 @ 0x100 8023e9a: d003 beq.n 8023ea4 8023e9c: f5b3 7f00 cmp.w r3, #512 @ 0x200 8023ea0: d01e beq.n 8023ee0 #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; 8023ea2: e025 b.n 8023ef0 if (for_us) { 8023ea4: 7cfb ldrb r3, [r7, #19] 8023ea6: 2b00 cmp r3, #0 8023ea8: d021 beq.n 8023eee (struct eth_addr *)netif->hwaddr, &hdr->shwaddr, 8023eaa: 683b ldr r3, [r7, #0] 8023eac: f103 002a add.w r0, r3, #42 @ 0x2a 8023eb0: 697b ldr r3, [r7, #20] 8023eb2: f103 0408 add.w r4, r3, #8 (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), 8023eb6: 683b ldr r3, [r7, #0] 8023eb8: f103 052a add.w r5, r3, #42 @ 0x2a 8023ebc: 683b ldr r3, [r7, #0] 8023ebe: 3304 adds r3, #4 &hdr->shwaddr, &sipaddr, 8023ec0: 697a ldr r2, [r7, #20] 8023ec2: 3208 adds r2, #8 etharp_raw(netif, 8023ec4: 2102 movs r1, #2 8023ec6: 9103 str r1, [sp, #12] 8023ec8: f107 010c add.w r1, r7, #12 8023ecc: 9102 str r1, [sp, #8] 8023ece: 9201 str r2, [sp, #4] 8023ed0: 9300 str r3, [sp, #0] 8023ed2: 462b mov r3, r5 8023ed4: 4622 mov r2, r4 8023ed6: 4601 mov r1, r0 8023ed8: 6838 ldr r0, [r7, #0] 8023eda: f000 faf1 bl 80244c0 break; 8023ede: e006 b.n 8023eee dhcp_arp_reply(netif, &sipaddr); 8023ee0: f107 030c add.w r3, r7, #12 8023ee4: 4619 mov r1, r3 8023ee6: 6838 ldr r0, [r7, #0] 8023ee8: f7fe f9b6 bl 8022258 break; 8023eec: e000 b.n 8023ef0 break; 8023eee: bf00 nop } /* free ARP packet */ pbuf_free(p); 8023ef0: 6878 ldr r0, [r7, #4] 8023ef2: f7f6 faf3 bl 801a4dc } 8023ef6: 3718 adds r7, #24 8023ef8: 46bd mov sp, r7 8023efa: bdb0 pop {r4, r5, r7, pc} 8023efc: 080301f4 .word 0x080301f4 8023f00: 08030344 .word 0x08030344 8023f04: 0803026c .word 0x0803026c 08023f08 : /** 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) { 8023f08: b580 push {r7, lr} 8023f0a: b086 sub sp, #24 8023f0c: af02 add r7, sp, #8 8023f0e: 60f8 str r0, [r7, #12] 8023f10: 60b9 str r1, [r7, #8] 8023f12: 4613 mov r3, r2 8023f14: 71fb strb r3, [r7, #7] LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", 8023f16: 79fa ldrb r2, [r7, #7] 8023f18: 4944 ldr r1, [pc, #272] @ (802402c ) 8023f1a: 4613 mov r3, r2 8023f1c: 005b lsls r3, r3, #1 8023f1e: 4413 add r3, r2 8023f20: 00db lsls r3, r3, #3 8023f22: 440b add r3, r1 8023f24: 3314 adds r3, #20 8023f26: 781b ldrb r3, [r3, #0] 8023f28: 2b01 cmp r3, #1 8023f2a: d806 bhi.n 8023f3a 8023f2c: 4b40 ldr r3, [pc, #256] @ (8024030 ) 8023f2e: f240 22ee movw r2, #750 @ 0x2ee 8023f32: 4940 ldr r1, [pc, #256] @ (8024034 ) 8023f34: 4840 ldr r0, [pc, #256] @ (8024038 ) 8023f36: f005 fd49 bl 80299cc 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) { 8023f3a: 79fa ldrb r2, [r7, #7] 8023f3c: 493b ldr r1, [pc, #236] @ (802402c ) 8023f3e: 4613 mov r3, r2 8023f40: 005b lsls r3, r3, #1 8023f42: 4413 add r3, r2 8023f44: 00db lsls r3, r3, #3 8023f46: 440b add r3, r1 8023f48: 3314 adds r3, #20 8023f4a: 781b ldrb r3, [r3, #0] 8023f4c: 2b02 cmp r3, #2 8023f4e: d153 bne.n 8023ff8 if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) { 8023f50: 79fa ldrb r2, [r7, #7] 8023f52: 4936 ldr r1, [pc, #216] @ (802402c ) 8023f54: 4613 mov r3, r2 8023f56: 005b lsls r3, r3, #1 8023f58: 4413 add r3, r2 8023f5a: 00db lsls r3, r3, #3 8023f5c: 440b add r3, r1 8023f5e: 3312 adds r3, #18 8023f60: 881b ldrh r3, [r3, #0] 8023f62: f5b3 7f8e cmp.w r3, #284 @ 0x11c 8023f66: d919 bls.n 8023f9c /* issue a standard request using broadcast */ if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { 8023f68: 79fa ldrb r2, [r7, #7] 8023f6a: 4613 mov r3, r2 8023f6c: 005b lsls r3, r3, #1 8023f6e: 4413 add r3, r2 8023f70: 00db lsls r3, r3, #3 8023f72: 4a2e ldr r2, [pc, #184] @ (802402c ) 8023f74: 4413 add r3, r2 8023f76: 3304 adds r3, #4 8023f78: 4619 mov r1, r3 8023f7a: 68f8 ldr r0, [r7, #12] 8023f7c: f000 fb4e bl 802461c 8023f80: 4603 mov r3, r0 8023f82: 2b00 cmp r3, #0 8023f84: d138 bne.n 8023ff8 arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; 8023f86: 79fa ldrb r2, [r7, #7] 8023f88: 4928 ldr r1, [pc, #160] @ (802402c ) 8023f8a: 4613 mov r3, r2 8023f8c: 005b lsls r3, r3, #1 8023f8e: 4413 add r3, r2 8023f90: 00db lsls r3, r3, #3 8023f92: 440b add r3, r1 8023f94: 3314 adds r3, #20 8023f96: 2203 movs r2, #3 8023f98: 701a strb r2, [r3, #0] 8023f9a: e02d b.n 8023ff8 } } else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) { 8023f9c: 79fa ldrb r2, [r7, #7] 8023f9e: 4923 ldr r1, [pc, #140] @ (802402c ) 8023fa0: 4613 mov r3, r2 8023fa2: 005b lsls r3, r3, #1 8023fa4: 4413 add r3, r2 8023fa6: 00db lsls r3, r3, #3 8023fa8: 440b add r3, r1 8023faa: 3312 adds r3, #18 8023fac: 881b ldrh r3, [r3, #0] 8023fae: f5b3 7f87 cmp.w r3, #270 @ 0x10e 8023fb2: d321 bcc.n 8023ff8 /* 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) { 8023fb4: 79fa ldrb r2, [r7, #7] 8023fb6: 4613 mov r3, r2 8023fb8: 005b lsls r3, r3, #1 8023fba: 4413 add r3, r2 8023fbc: 00db lsls r3, r3, #3 8023fbe: 4a1b ldr r2, [pc, #108] @ (802402c ) 8023fc0: 4413 add r3, r2 8023fc2: 1d19 adds r1, r3, #4 8023fc4: 79fa ldrb r2, [r7, #7] 8023fc6: 4613 mov r3, r2 8023fc8: 005b lsls r3, r3, #1 8023fca: 4413 add r3, r2 8023fcc: 00db lsls r3, r3, #3 8023fce: 3308 adds r3, #8 8023fd0: 4a16 ldr r2, [pc, #88] @ (802402c ) 8023fd2: 4413 add r3, r2 8023fd4: 3304 adds r3, #4 8023fd6: 461a mov r2, r3 8023fd8: 68f8 ldr r0, [r7, #12] 8023fda: f000 fafd bl 80245d8 8023fde: 4603 mov r3, r0 8023fe0: 2b00 cmp r3, #0 8023fe2: d109 bne.n 8023ff8 arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; 8023fe4: 79fa ldrb r2, [r7, #7] 8023fe6: 4911 ldr r1, [pc, #68] @ (802402c ) 8023fe8: 4613 mov r3, r2 8023fea: 005b lsls r3, r3, #1 8023fec: 4413 add r3, r2 8023fee: 00db lsls r3, r3, #3 8023ff0: 440b add r3, r1 8023ff2: 3314 adds r3, #20 8023ff4: 2203 movs r2, #3 8023ff6: 701a strb r2, [r3, #0] } } } return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP); 8023ff8: 68fb ldr r3, [r7, #12] 8023ffa: f103 012a add.w r1, r3, #42 @ 0x2a 8023ffe: 79fa ldrb r2, [r7, #7] 8024000: 4613 mov r3, r2 8024002: 005b lsls r3, r3, #1 8024004: 4413 add r3, r2 8024006: 00db lsls r3, r3, #3 8024008: 3308 adds r3, #8 802400a: 4a08 ldr r2, [pc, #32] @ (802402c ) 802400c: 4413 add r3, r2 802400e: 3304 adds r3, #4 8024010: f44f 6200 mov.w r2, #2048 @ 0x800 8024014: 9200 str r2, [sp, #0] 8024016: 460a mov r2, r1 8024018: 68b9 ldr r1, [r7, #8] 802401a: 68f8 ldr r0, [r7, #12] 802401c: f002 f85e bl 80260dc 8024020: 4603 mov r3, r0 } 8024022: 4618 mov r0, r3 8024024: 3710 adds r7, #16 8024026: 46bd mov sp, r7 8024028: bd80 pop {r7, pc} 802402a: bf00 nop 802402c: 2402af20 .word 0x2402af20 8024030: 080301f4 .word 0x080301f4 8024034: 08030364 .word 0x08030364 8024038: 0803026c .word 0x0803026c 0802403c : * - 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) { 802403c: b580 push {r7, lr} 802403e: b08a sub sp, #40 @ 0x28 8024040: af02 add r7, sp, #8 8024042: 60f8 str r0, [r7, #12] 8024044: 60b9 str r1, [r7, #8] 8024046: 607a str r2, [r7, #4] const struct eth_addr *dest; struct eth_addr mcastaddr; const ip4_addr_t *dst_addr = ipaddr; 8024048: 687b ldr r3, [r7, #4] 802404a: 61bb str r3, [r7, #24] LWIP_ASSERT_CORE_LOCKED(); 802404c: f7ec fa70 bl 8010530 LWIP_ASSERT("netif != NULL", netif != NULL); 8024050: 68fb ldr r3, [r7, #12] 8024052: 2b00 cmp r3, #0 8024054: d106 bne.n 8024064 8024056: 4b73 ldr r3, [pc, #460] @ (8024224 ) 8024058: f240 321e movw r2, #798 @ 0x31e 802405c: 4972 ldr r1, [pc, #456] @ (8024228 ) 802405e: 4873 ldr r0, [pc, #460] @ (802422c ) 8024060: f005 fcb4 bl 80299cc LWIP_ASSERT("q != NULL", q != NULL); 8024064: 68bb ldr r3, [r7, #8] 8024066: 2b00 cmp r3, #0 8024068: d106 bne.n 8024078 802406a: 4b6e ldr r3, [pc, #440] @ (8024224 ) 802406c: f240 321f movw r2, #799 @ 0x31f 8024070: 496f ldr r1, [pc, #444] @ (8024230 ) 8024072: 486e ldr r0, [pc, #440] @ (802422c ) 8024074: f005 fcaa bl 80299cc LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); 8024078: 687b ldr r3, [r7, #4] 802407a: 2b00 cmp r3, #0 802407c: d106 bne.n 802408c 802407e: 4b69 ldr r3, [pc, #420] @ (8024224 ) 8024080: f44f 7248 mov.w r2, #800 @ 0x320 8024084: 496b ldr r1, [pc, #428] @ (8024234 ) 8024086: 4869 ldr r0, [pc, #420] @ (802422c ) 8024088: f005 fca0 bl 80299cc /* 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)) { 802408c: 687b ldr r3, [r7, #4] 802408e: 681b ldr r3, [r3, #0] 8024090: 68f9 ldr r1, [r7, #12] 8024092: 4618 mov r0, r3 8024094: f000 ff44 bl 8024f20 8024098: 4603 mov r3, r0 802409a: 2b00 cmp r3, #0 802409c: d002 beq.n 80240a4 /* broadcast on Ethernet also */ dest = (const struct eth_addr *)ðbroadcast; 802409e: 4b66 ldr r3, [pc, #408] @ (8024238 ) 80240a0: 61fb str r3, [r7, #28] 80240a2: e0af b.n 8024204 /* multicast destination IP address? */ } else if (ip4_addr_ismulticast(ipaddr)) { 80240a4: 687b ldr r3, [r7, #4] 80240a6: 681b ldr r3, [r3, #0] 80240a8: f003 03f0 and.w r3, r3, #240 @ 0xf0 80240ac: 2be0 cmp r3, #224 @ 0xe0 80240ae: d118 bne.n 80240e2 /* Hash IP multicast address to MAC address.*/ mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0; 80240b0: 2301 movs r3, #1 80240b2: 743b strb r3, [r7, #16] mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1; 80240b4: 2300 movs r3, #0 80240b6: 747b strb r3, [r7, #17] mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2; 80240b8: 235e movs r3, #94 @ 0x5e 80240ba: 74bb strb r3, [r7, #18] mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 80240bc: 687b ldr r3, [r7, #4] 80240be: 3301 adds r3, #1 80240c0: 781b ldrb r3, [r3, #0] 80240c2: f003 037f and.w r3, r3, #127 @ 0x7f 80240c6: b2db uxtb r3, r3 80240c8: 74fb strb r3, [r7, #19] mcastaddr.addr[4] = ip4_addr3(ipaddr); 80240ca: 687b ldr r3, [r7, #4] 80240cc: 3302 adds r3, #2 80240ce: 781b ldrb r3, [r3, #0] 80240d0: 753b strb r3, [r7, #20] mcastaddr.addr[5] = ip4_addr4(ipaddr); 80240d2: 687b ldr r3, [r7, #4] 80240d4: 3303 adds r3, #3 80240d6: 781b ldrb r3, [r3, #0] 80240d8: 757b strb r3, [r7, #21] /* destination Ethernet address is multicast */ dest = &mcastaddr; 80240da: f107 0310 add.w r3, r7, #16 80240de: 61fb str r3, [r7, #28] 80240e0: e090 b.n 8024204 /* 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)) && 80240e2: 687b ldr r3, [r7, #4] 80240e4: 681a ldr r2, [r3, #0] 80240e6: 68fb ldr r3, [r7, #12] 80240e8: 3304 adds r3, #4 80240ea: 681b ldr r3, [r3, #0] 80240ec: 405a eors r2, r3 80240ee: 68fb ldr r3, [r7, #12] 80240f0: 3308 adds r3, #8 80240f2: 681b ldr r3, [r3, #0] 80240f4: 4013 ands r3, r2 80240f6: 2b00 cmp r3, #0 80240f8: d012 beq.n 8024120 !ip4_addr_islinklocal(ipaddr)) { 80240fa: 687b ldr r3, [r7, #4] 80240fc: 681b ldr r3, [r3, #0] 80240fe: b29b uxth r3, r3 if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) && 8024100: f64f 62a9 movw r2, #65193 @ 0xfea9 8024104: 4293 cmp r3, r2 8024106: d00b beq.n 8024120 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))) { 8024108: 68fb ldr r3, [r7, #12] 802410a: 330c adds r3, #12 802410c: 681b ldr r3, [r3, #0] 802410e: 2b00 cmp r3, #0 8024110: d003 beq.n 802411a /* send to hardware address of default gateway IP address */ dst_addr = netif_ip4_gw(netif); 8024112: 68fb ldr r3, [r7, #12] 8024114: 330c adds r3, #12 8024116: 61bb str r3, [r7, #24] 8024118: e002 b.n 8024120 /* no default gateway available */ } else { /* no route to destination error (default gateway missing) */ return ERR_RTE; 802411a: f06f 0303 mvn.w r3, #3 802411e: e07d b.n 802421c 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) && 8024120: 4b46 ldr r3, [pc, #280] @ (802423c ) 8024122: 781b ldrb r3, [r3, #0] 8024124: 4619 mov r1, r3 8024126: 4a46 ldr r2, [pc, #280] @ (8024240 ) 8024128: 460b mov r3, r1 802412a: 005b lsls r3, r3, #1 802412c: 440b add r3, r1 802412e: 00db lsls r3, r3, #3 8024130: 4413 add r3, r2 8024132: 3314 adds r3, #20 8024134: 781b ldrb r3, [r3, #0] 8024136: 2b01 cmp r3, #1 8024138: d925 bls.n 8024186 #if ETHARP_TABLE_MATCH_NETIF (arp_table[etharp_cached_entry].netif == netif) && 802413a: 4b40 ldr r3, [pc, #256] @ (802423c ) 802413c: 781b ldrb r3, [r3, #0] 802413e: 4619 mov r1, r3 8024140: 4a3f ldr r2, [pc, #252] @ (8024240 ) 8024142: 460b mov r3, r1 8024144: 005b lsls r3, r3, #1 8024146: 440b add r3, r1 8024148: 00db lsls r3, r3, #3 802414a: 4413 add r3, r2 802414c: 3308 adds r3, #8 802414e: 681b ldr r3, [r3, #0] if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && 8024150: 68fa ldr r2, [r7, #12] 8024152: 429a cmp r2, r3 8024154: d117 bne.n 8024186 #endif (ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) { 8024156: 69bb ldr r3, [r7, #24] 8024158: 681a ldr r2, [r3, #0] 802415a: 4b38 ldr r3, [pc, #224] @ (802423c ) 802415c: 781b ldrb r3, [r3, #0] 802415e: 4618 mov r0, r3 8024160: 4937 ldr r1, [pc, #220] @ (8024240 ) 8024162: 4603 mov r3, r0 8024164: 005b lsls r3, r3, #1 8024166: 4403 add r3, r0 8024168: 00db lsls r3, r3, #3 802416a: 440b add r3, r1 802416c: 3304 adds r3, #4 802416e: 681b ldr r3, [r3, #0] (arp_table[etharp_cached_entry].netif == netif) && 8024170: 429a cmp r2, r3 8024172: d108 bne.n 8024186 /* 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); 8024174: 4b31 ldr r3, [pc, #196] @ (802423c ) 8024176: 781b ldrb r3, [r3, #0] 8024178: 461a mov r2, r3 802417a: 68b9 ldr r1, [r7, #8] 802417c: 68f8 ldr r0, [r7, #12] 802417e: f7ff fec3 bl 8023f08 8024182: 4603 mov r3, r0 8024184: e04a b.n 802421c } #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++) { 8024186: 2300 movs r3, #0 8024188: 75fb strb r3, [r7, #23] 802418a: e031 b.n 80241f0 if ((arp_table[i].state >= ETHARP_STATE_STABLE) && 802418c: 7dfa ldrb r2, [r7, #23] 802418e: 492c ldr r1, [pc, #176] @ (8024240 ) 8024190: 4613 mov r3, r2 8024192: 005b lsls r3, r3, #1 8024194: 4413 add r3, r2 8024196: 00db lsls r3, r3, #3 8024198: 440b add r3, r1 802419a: 3314 adds r3, #20 802419c: 781b ldrb r3, [r3, #0] 802419e: 2b01 cmp r3, #1 80241a0: d923 bls.n 80241ea #if ETHARP_TABLE_MATCH_NETIF (arp_table[i].netif == netif) && 80241a2: 7dfa ldrb r2, [r7, #23] 80241a4: 4926 ldr r1, [pc, #152] @ (8024240 ) 80241a6: 4613 mov r3, r2 80241a8: 005b lsls r3, r3, #1 80241aa: 4413 add r3, r2 80241ac: 00db lsls r3, r3, #3 80241ae: 440b add r3, r1 80241b0: 3308 adds r3, #8 80241b2: 681b ldr r3, [r3, #0] if ((arp_table[i].state >= ETHARP_STATE_STABLE) && 80241b4: 68fa ldr r2, [r7, #12] 80241b6: 429a cmp r2, r3 80241b8: d117 bne.n 80241ea #endif (ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { 80241ba: 69bb ldr r3, [r7, #24] 80241bc: 6819 ldr r1, [r3, #0] 80241be: 7dfa ldrb r2, [r7, #23] 80241c0: 481f ldr r0, [pc, #124] @ (8024240 ) 80241c2: 4613 mov r3, r2 80241c4: 005b lsls r3, r3, #1 80241c6: 4413 add r3, r2 80241c8: 00db lsls r3, r3, #3 80241ca: 4403 add r3, r0 80241cc: 3304 adds r3, #4 80241ce: 681b ldr r3, [r3, #0] (arp_table[i].netif == netif) && 80241d0: 4299 cmp r1, r3 80241d2: d10a bne.n 80241ea /* found an existing, stable entry */ ETHARP_SET_ADDRHINT(netif, i); 80241d4: 4a19 ldr r2, [pc, #100] @ (802423c ) 80241d6: 7dfb ldrb r3, [r7, #23] 80241d8: 7013 strb r3, [r2, #0] return etharp_output_to_arp_index(netif, q, i); 80241da: 7dfb ldrb r3, [r7, #23] 80241dc: 461a mov r2, r3 80241de: 68b9 ldr r1, [r7, #8] 80241e0: 68f8 ldr r0, [r7, #12] 80241e2: f7ff fe91 bl 8023f08 80241e6: 4603 mov r3, r0 80241e8: e018 b.n 802421c for (i = 0; i < ARP_TABLE_SIZE; i++) { 80241ea: 7dfb ldrb r3, [r7, #23] 80241ec: 3301 adds r3, #1 80241ee: 75fb strb r3, [r7, #23] 80241f0: 7dfb ldrb r3, [r7, #23] 80241f2: 2b09 cmp r3, #9 80241f4: d9ca bls.n 802418c } } /* no stable entry found, use the (slower) query function: queue on destination Ethernet address belonging to ipaddr */ return etharp_query(netif, dst_addr, q); 80241f6: 68ba ldr r2, [r7, #8] 80241f8: 69b9 ldr r1, [r7, #24] 80241fa: 68f8 ldr r0, [r7, #12] 80241fc: f000 f822 bl 8024244 8024200: 4603 mov r3, r0 8024202: e00b b.n 802421c } /* 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); 8024204: 68fb ldr r3, [r7, #12] 8024206: f103 022a add.w r2, r3, #42 @ 0x2a 802420a: f44f 6300 mov.w r3, #2048 @ 0x800 802420e: 9300 str r3, [sp, #0] 8024210: 69fb ldr r3, [r7, #28] 8024212: 68b9 ldr r1, [r7, #8] 8024214: 68f8 ldr r0, [r7, #12] 8024216: f001 ff61 bl 80260dc 802421a: 4603 mov r3, r0 } 802421c: 4618 mov r0, r3 802421e: 3720 adds r7, #32 8024220: 46bd mov sp, r7 8024222: bd80 pop {r7, pc} 8024224: 080301f4 .word 0x080301f4 8024228: 08030344 .word 0x08030344 802422c: 0803026c .word 0x0803026c 8024230: 08030394 .word 0x08030394 8024234: 08030334 .word 0x08030334 8024238: 08030c18 .word 0x08030c18 802423c: 2402b010 .word 0x2402b010 8024240: 2402af20 .word 0x2402af20 08024244 : * - 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) { 8024244: b580 push {r7, lr} 8024246: b08c sub sp, #48 @ 0x30 8024248: af02 add r7, sp, #8 802424a: 60f8 str r0, [r7, #12] 802424c: 60b9 str r1, [r7, #8] 802424e: 607a str r2, [r7, #4] struct eth_addr *srcaddr = (struct eth_addr *)netif->hwaddr; 8024250: 68fb ldr r3, [r7, #12] 8024252: 332a adds r3, #42 @ 0x2a 8024254: 617b str r3, [r7, #20] err_t result = ERR_MEM; 8024256: 23ff movs r3, #255 @ 0xff 8024258: f887 3027 strb.w r3, [r7, #39] @ 0x27 int is_new_entry = 0; 802425c: 2300 movs r3, #0 802425e: 623b str r3, [r7, #32] s16_t i_err; netif_addr_idx_t i; /* non-unicast address? */ if (ip4_addr_isbroadcast(ipaddr, netif) || 8024260: 68bb ldr r3, [r7, #8] 8024262: 681b ldr r3, [r3, #0] 8024264: 68f9 ldr r1, [r7, #12] 8024266: 4618 mov r0, r3 8024268: f000 fe5a bl 8024f20 802426c: 4603 mov r3, r0 802426e: 2b00 cmp r3, #0 8024270: d10c bne.n 802428c ip4_addr_ismulticast(ipaddr) || 8024272: 68bb ldr r3, [r7, #8] 8024274: 681b ldr r3, [r3, #0] 8024276: f003 03f0 and.w r3, r3, #240 @ 0xf0 if (ip4_addr_isbroadcast(ipaddr, netif) || 802427a: 2be0 cmp r3, #224 @ 0xe0 802427c: d006 beq.n 802428c ip4_addr_ismulticast(ipaddr) || 802427e: 68bb ldr r3, [r7, #8] 8024280: 2b00 cmp r3, #0 8024282: d003 beq.n 802428c ip4_addr_isany(ipaddr)) { 8024284: 68bb ldr r3, [r7, #8] 8024286: 681b ldr r3, [r3, #0] 8024288: 2b00 cmp r3, #0 802428a: d102 bne.n 8024292 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: will not add non-unicast IP address to ARP cache\n")); return ERR_ARG; 802428c: f06f 030f mvn.w r3, #15 8024290: e101 b.n 8024496 } /* find entry in ARP cache, ask to create entry if queueing packet */ i_err = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD, netif); 8024292: 68fa ldr r2, [r7, #12] 8024294: 2101 movs r1, #1 8024296: 68b8 ldr r0, [r7, #8] 8024298: f7ff fb58 bl 802394c 802429c: 4603 mov r3, r0 802429e: 827b strh r3, [r7, #18] /* could not find or create entry? */ if (i_err < 0) { 80242a0: f9b7 3012 ldrsh.w r3, [r7, #18] 80242a4: 2b00 cmp r3, #0 80242a6: da02 bge.n 80242ae 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; 80242a8: 8a7b ldrh r3, [r7, #18] 80242aa: b25b sxtb r3, r3 80242ac: e0f3 b.n 8024496 } LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX); 80242ae: 8a7b ldrh r3, [r7, #18] 80242b0: 2b7e cmp r3, #126 @ 0x7e 80242b2: d906 bls.n 80242c2 80242b4: 4b7a ldr r3, [pc, #488] @ (80244a0 ) 80242b6: f240 32c1 movw r2, #961 @ 0x3c1 80242ba: 497a ldr r1, [pc, #488] @ (80244a4 ) 80242bc: 487a ldr r0, [pc, #488] @ (80244a8 ) 80242be: f005 fb85 bl 80299cc i = (netif_addr_idx_t)i_err; 80242c2: 8a7b ldrh r3, [r7, #18] 80242c4: 747b strb r3, [r7, #17] /* mark a fresh entry as pending (we just sent a request) */ if (arp_table[i].state == ETHARP_STATE_EMPTY) { 80242c6: 7c7a ldrb r2, [r7, #17] 80242c8: 4978 ldr r1, [pc, #480] @ (80244ac ) 80242ca: 4613 mov r3, r2 80242cc: 005b lsls r3, r3, #1 80242ce: 4413 add r3, r2 80242d0: 00db lsls r3, r3, #3 80242d2: 440b add r3, r1 80242d4: 3314 adds r3, #20 80242d6: 781b ldrb r3, [r3, #0] 80242d8: 2b00 cmp r3, #0 80242da: d115 bne.n 8024308 is_new_entry = 1; 80242dc: 2301 movs r3, #1 80242de: 623b str r3, [r7, #32] arp_table[i].state = ETHARP_STATE_PENDING; 80242e0: 7c7a ldrb r2, [r7, #17] 80242e2: 4972 ldr r1, [pc, #456] @ (80244ac ) 80242e4: 4613 mov r3, r2 80242e6: 005b lsls r3, r3, #1 80242e8: 4413 add r3, r2 80242ea: 00db lsls r3, r3, #3 80242ec: 440b add r3, r1 80242ee: 3314 adds r3, #20 80242f0: 2201 movs r2, #1 80242f2: 701a strb r2, [r3, #0] /* record network interface for re-sending arp request in etharp_tmr */ arp_table[i].netif = netif; 80242f4: 7c7a ldrb r2, [r7, #17] 80242f6: 496d ldr r1, [pc, #436] @ (80244ac ) 80242f8: 4613 mov r3, r2 80242fa: 005b lsls r3, r3, #1 80242fc: 4413 add r3, r2 80242fe: 00db lsls r3, r3, #3 8024300: 440b add r3, r1 8024302: 3308 adds r3, #8 8024304: 68fa ldr r2, [r7, #12] 8024306: 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", 8024308: 7c7a ldrb r2, [r7, #17] 802430a: 4968 ldr r1, [pc, #416] @ (80244ac ) 802430c: 4613 mov r3, r2 802430e: 005b lsls r3, r3, #1 8024310: 4413 add r3, r2 8024312: 00db lsls r3, r3, #3 8024314: 440b add r3, r1 8024316: 3314 adds r3, #20 8024318: 781b ldrb r3, [r3, #0] 802431a: 2b01 cmp r3, #1 802431c: d011 beq.n 8024342 802431e: 7c7a ldrb r2, [r7, #17] 8024320: 4962 ldr r1, [pc, #392] @ (80244ac ) 8024322: 4613 mov r3, r2 8024324: 005b lsls r3, r3, #1 8024326: 4413 add r3, r2 8024328: 00db lsls r3, r3, #3 802432a: 440b add r3, r1 802432c: 3314 adds r3, #20 802432e: 781b ldrb r3, [r3, #0] 8024330: 2b01 cmp r3, #1 8024332: d806 bhi.n 8024342 8024334: 4b5a ldr r3, [pc, #360] @ (80244a0 ) 8024336: f240 32cd movw r2, #973 @ 0x3cd 802433a: 495d ldr r1, [pc, #372] @ (80244b0 ) 802433c: 485a ldr r0, [pc, #360] @ (80244a8 ) 802433e: f005 fb45 bl 80299cc ((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)) { 8024342: 6a3b ldr r3, [r7, #32] 8024344: 2b00 cmp r3, #0 8024346: d102 bne.n 802434e 8024348: 687b ldr r3, [r7, #4] 802434a: 2b00 cmp r3, #0 802434c: d10c bne.n 8024368 /* try to resolve it; send out ARP request */ result = etharp_request(netif, ipaddr); 802434e: 68b9 ldr r1, [r7, #8] 8024350: 68f8 ldr r0, [r7, #12] 8024352: f000 f963 bl 802461c 8024356: 4603 mov r3, r0 8024358: 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) { 802435c: 687b ldr r3, [r7, #4] 802435e: 2b00 cmp r3, #0 8024360: d102 bne.n 8024368 return result; 8024362: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 8024366: e096 b.n 8024496 } } /* packet given? */ LWIP_ASSERT("q != NULL", q != NULL); 8024368: 687b ldr r3, [r7, #4] 802436a: 2b00 cmp r3, #0 802436c: d106 bne.n 802437c 802436e: 4b4c ldr r3, [pc, #304] @ (80244a0 ) 8024370: f240 32e1 movw r2, #993 @ 0x3e1 8024374: 494f ldr r1, [pc, #316] @ (80244b4 ) 8024376: 484c ldr r0, [pc, #304] @ (80244a8 ) 8024378: f005 fb28 bl 80299cc /* stable entry? */ if (arp_table[i].state >= ETHARP_STATE_STABLE) { 802437c: 7c7a ldrb r2, [r7, #17] 802437e: 494b ldr r1, [pc, #300] @ (80244ac ) 8024380: 4613 mov r3, r2 8024382: 005b lsls r3, r3, #1 8024384: 4413 add r3, r2 8024386: 00db lsls r3, r3, #3 8024388: 440b add r3, r1 802438a: 3314 adds r3, #20 802438c: 781b ldrb r3, [r3, #0] 802438e: 2b01 cmp r3, #1 8024390: d917 bls.n 80243c2 /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_ADDRHINT(netif, i); 8024392: 4a49 ldr r2, [pc, #292] @ (80244b8 ) 8024394: 7c7b ldrb r3, [r7, #17] 8024396: 7013 strb r3, [r2, #0] /* send the packet */ result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP); 8024398: 7c7a ldrb r2, [r7, #17] 802439a: 4613 mov r3, r2 802439c: 005b lsls r3, r3, #1 802439e: 4413 add r3, r2 80243a0: 00db lsls r3, r3, #3 80243a2: 3308 adds r3, #8 80243a4: 4a41 ldr r2, [pc, #260] @ (80244ac ) 80243a6: 4413 add r3, r2 80243a8: 3304 adds r3, #4 80243aa: f44f 6200 mov.w r2, #2048 @ 0x800 80243ae: 9200 str r2, [sp, #0] 80243b0: 697a ldr r2, [r7, #20] 80243b2: 6879 ldr r1, [r7, #4] 80243b4: 68f8 ldr r0, [r7, #12] 80243b6: f001 fe91 bl 80260dc 80243ba: 4603 mov r3, r0 80243bc: f887 3027 strb.w r3, [r7, #39] @ 0x27 80243c0: e067 b.n 8024492 /* pending entry? (either just created or already pending */ } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 80243c2: 7c7a ldrb r2, [r7, #17] 80243c4: 4939 ldr r1, [pc, #228] @ (80244ac ) 80243c6: 4613 mov r3, r2 80243c8: 005b lsls r3, r3, #1 80243ca: 4413 add r3, r2 80243cc: 00db lsls r3, r3, #3 80243ce: 440b add r3, r1 80243d0: 3314 adds r3, #20 80243d2: 781b ldrb r3, [r3, #0] 80243d4: 2b01 cmp r3, #1 80243d6: d15c bne.n 8024492 /* entry is still pending, queue the given packet 'q' */ struct pbuf *p; int copy_needed = 0; 80243d8: 2300 movs r3, #0 80243da: 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; 80243dc: 687b ldr r3, [r7, #4] 80243de: 61fb str r3, [r7, #28] while (p) { 80243e0: e01c b.n 802441c LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0)); 80243e2: 69fb ldr r3, [r7, #28] 80243e4: 895a ldrh r2, [r3, #10] 80243e6: 69fb ldr r3, [r7, #28] 80243e8: 891b ldrh r3, [r3, #8] 80243ea: 429a cmp r2, r3 80243ec: d10a bne.n 8024404 80243ee: 69fb ldr r3, [r7, #28] 80243f0: 681b ldr r3, [r3, #0] 80243f2: 2b00 cmp r3, #0 80243f4: d006 beq.n 8024404 80243f6: 4b2a ldr r3, [pc, #168] @ (80244a0 ) 80243f8: f240 32f1 movw r2, #1009 @ 0x3f1 80243fc: 492f ldr r1, [pc, #188] @ (80244bc ) 80243fe: 482a ldr r0, [pc, #168] @ (80244a8 ) 8024400: f005 fae4 bl 80299cc if (PBUF_NEEDS_COPY(p)) { 8024404: 69fb ldr r3, [r7, #28] 8024406: 7b1b ldrb r3, [r3, #12] 8024408: f003 0340 and.w r3, r3, #64 @ 0x40 802440c: 2b00 cmp r3, #0 802440e: d002 beq.n 8024416 copy_needed = 1; 8024410: 2301 movs r3, #1 8024412: 61bb str r3, [r7, #24] break; 8024414: e005 b.n 8024422 } p = p->next; 8024416: 69fb ldr r3, [r7, #28] 8024418: 681b ldr r3, [r3, #0] 802441a: 61fb str r3, [r7, #28] while (p) { 802441c: 69fb ldr r3, [r7, #28] 802441e: 2b00 cmp r3, #0 8024420: d1df bne.n 80243e2 } if (copy_needed) { 8024422: 69bb ldr r3, [r7, #24] 8024424: 2b00 cmp r3, #0 8024426: d007 beq.n 8024438 /* copy the whole packet into new pbufs */ p = pbuf_clone(PBUF_LINK, PBUF_RAM, q); 8024428: 687a ldr r2, [r7, #4] 802442a: f44f 7120 mov.w r1, #640 @ 0x280 802442e: 200e movs r0, #14 8024430: f7f6 facc bl 801a9cc 8024434: 61f8 str r0, [r7, #28] 8024436: e004 b.n 8024442 } else { /* referencing the old pbuf is enough */ p = q; 8024438: 687b ldr r3, [r7, #4] 802443a: 61fb str r3, [r7, #28] pbuf_ref(p); 802443c: 69f8 ldr r0, [r7, #28] 802443e: f7f6 f8f3 bl 801a628 } /* packet could be taken over? */ if (p != NULL) { 8024442: 69fb ldr r3, [r7, #28] 8024444: 2b00 cmp r3, #0 8024446: d021 beq.n 802448c 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) { 8024448: 7c7a ldrb r2, [r7, #17] 802444a: 4918 ldr r1, [pc, #96] @ (80244ac ) 802444c: 4613 mov r3, r2 802444e: 005b lsls r3, r3, #1 8024450: 4413 add r3, r2 8024452: 00db lsls r3, r3, #3 8024454: 440b add r3, r1 8024456: 681b ldr r3, [r3, #0] 8024458: 2b00 cmp r3, #0 802445a: d00a beq.n 8024472 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); 802445c: 7c7a ldrb r2, [r7, #17] 802445e: 4913 ldr r1, [pc, #76] @ (80244ac ) 8024460: 4613 mov r3, r2 8024462: 005b lsls r3, r3, #1 8024464: 4413 add r3, r2 8024466: 00db lsls r3, r3, #3 8024468: 440b add r3, r1 802446a: 681b ldr r3, [r3, #0] 802446c: 4618 mov r0, r3 802446e: f7f6 f835 bl 801a4dc } arp_table[i].q = p; 8024472: 7c7a ldrb r2, [r7, #17] 8024474: 490d ldr r1, [pc, #52] @ (80244ac ) 8024476: 4613 mov r3, r2 8024478: 005b lsls r3, r3, #1 802447a: 4413 add r3, r2 802447c: 00db lsls r3, r3, #3 802447e: 440b add r3, r1 8024480: 69fa ldr r2, [r7, #28] 8024482: 601a str r2, [r3, #0] result = ERR_OK; 8024484: 2300 movs r3, #0 8024486: f887 3027 strb.w r3, [r7, #39] @ 0x27 802448a: e002 b.n 8024492 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; 802448c: 23ff movs r3, #255 @ 0xff 802448e: f887 3027 strb.w r3, [r7, #39] @ 0x27 } } return result; 8024492: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 } 8024496: 4618 mov r0, r3 8024498: 3728 adds r7, #40 @ 0x28 802449a: 46bd mov sp, r7 802449c: bd80 pop {r7, pc} 802449e: bf00 nop 80244a0: 080301f4 .word 0x080301f4 80244a4: 080303a0 .word 0x080303a0 80244a8: 0803026c .word 0x0803026c 80244ac: 2402af20 .word 0x2402af20 80244b0: 080303b0 .word 0x080303b0 80244b4: 08030394 .word 0x08030394 80244b8: 2402b010 .word 0x2402b010 80244bc: 080303d8 .word 0x080303d8 080244c0 : 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) { 80244c0: b580 push {r7, lr} 80244c2: b08a sub sp, #40 @ 0x28 80244c4: af02 add r7, sp, #8 80244c6: 60f8 str r0, [r7, #12] 80244c8: 60b9 str r1, [r7, #8] 80244ca: 607a str r2, [r7, #4] 80244cc: 603b str r3, [r7, #0] struct pbuf *p; err_t result = ERR_OK; 80244ce: 2300 movs r3, #0 80244d0: 77fb strb r3, [r7, #31] struct etharp_hdr *hdr; LWIP_ASSERT("netif != NULL", netif != NULL); 80244d2: 68fb ldr r3, [r7, #12] 80244d4: 2b00 cmp r3, #0 80244d6: d106 bne.n 80244e6 80244d8: 4b3a ldr r3, [pc, #232] @ (80245c4 ) 80244da: f240 4257 movw r2, #1111 @ 0x457 80244de: 493a ldr r1, [pc, #232] @ (80245c8 ) 80244e0: 483a ldr r0, [pc, #232] @ (80245cc ) 80244e2: f005 fa73 bl 80299cc /* allocate a pbuf for the outgoing ARP request packet */ p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM); 80244e6: f44f 7220 mov.w r2, #640 @ 0x280 80244ea: 211c movs r1, #28 80244ec: 200e movs r0, #14 80244ee: f7f5 fcdf bl 8019eb0 80244f2: 61b8 str r0, [r7, #24] /* could allocate a pbuf for an ARP request? */ if (p == NULL) { 80244f4: 69bb ldr r3, [r7, #24] 80244f6: 2b00 cmp r3, #0 80244f8: d102 bne.n 8024500 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; 80244fa: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80244fe: e05d b.n 80245bc } LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr", 8024500: 69bb ldr r3, [r7, #24] 8024502: 895b ldrh r3, [r3, #10] 8024504: 2b1b cmp r3, #27 8024506: d806 bhi.n 8024516 8024508: 4b2e ldr r3, [pc, #184] @ (80245c4 ) 802450a: f240 4262 movw r2, #1122 @ 0x462 802450e: 4930 ldr r1, [pc, #192] @ (80245d0 ) 8024510: 482e ldr r0, [pc, #184] @ (80245cc ) 8024512: f005 fa5b bl 80299cc (p->len >= SIZEOF_ETHARP_HDR)); hdr = (struct etharp_hdr *)p->payload; 8024516: 69bb ldr r3, [r7, #24] 8024518: 685b ldr r3, [r3, #4] 802451a: 617b str r3, [r7, #20] LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n")); hdr->opcode = lwip_htons(opcode); 802451c: 8ebb ldrh r3, [r7, #52] @ 0x34 802451e: 4618 mov r0, r3 8024520: f7f4 fafa bl 8018b18 8024524: 4603 mov r3, r0 8024526: 461a mov r2, r3 8024528: 697b ldr r3, [r7, #20] 802452a: 80da strh r2, [r3, #6] LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!", 802452c: 68fb ldr r3, [r7, #12] 802452e: f893 3030 ldrb.w r3, [r3, #48] @ 0x30 8024532: 2b06 cmp r3, #6 8024534: d006 beq.n 8024544 8024536: 4b23 ldr r3, [pc, #140] @ (80245c4 ) 8024538: f240 4269 movw r2, #1129 @ 0x469 802453c: 4925 ldr r1, [pc, #148] @ (80245d4 ) 802453e: 4823 ldr r0, [pc, #140] @ (80245cc ) 8024540: f005 fa44 bl 80299cc (netif->hwaddr_len == ETH_HWADDR_LEN)); /* Write the ARP MAC-Addresses */ SMEMCPY(&hdr->shwaddr, hwsrc_addr, ETH_HWADDR_LEN); 8024544: 697b ldr r3, [r7, #20] 8024546: 3308 adds r3, #8 8024548: 2206 movs r2, #6 802454a: 6839 ldr r1, [r7, #0] 802454c: 4618 mov r0, r3 802454e: f005 fcc6 bl 8029ede SMEMCPY(&hdr->dhwaddr, hwdst_addr, ETH_HWADDR_LEN); 8024552: 697b ldr r3, [r7, #20] 8024554: 3312 adds r3, #18 8024556: 2206 movs r2, #6 8024558: 6af9 ldr r1, [r7, #44] @ 0x2c 802455a: 4618 mov r0, r3 802455c: f005 fcbf bl 8029ede /* 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); 8024560: 697b ldr r3, [r7, #20] 8024562: 330e adds r3, #14 8024564: 6aba ldr r2, [r7, #40] @ 0x28 8024566: 6812 ldr r2, [r2, #0] 8024568: 601a str r2, [r3, #0] IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->dipaddr, ipdst_addr); 802456a: 697b ldr r3, [r7, #20] 802456c: 3318 adds r3, #24 802456e: 6b3a ldr r2, [r7, #48] @ 0x30 8024570: 6812 ldr r2, [r2, #0] 8024572: 601a str r2, [r3, #0] hdr->hwtype = PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET); 8024574: 697b ldr r3, [r7, #20] 8024576: 2200 movs r2, #0 8024578: 701a strb r2, [r3, #0] 802457a: 2200 movs r2, #0 802457c: f042 0201 orr.w r2, r2, #1 8024580: 705a strb r2, [r3, #1] hdr->proto = PP_HTONS(ETHTYPE_IP); 8024582: 697b ldr r3, [r7, #20] 8024584: 2200 movs r2, #0 8024586: f042 0208 orr.w r2, r2, #8 802458a: 709a strb r2, [r3, #2] 802458c: 2200 movs r2, #0 802458e: 70da strb r2, [r3, #3] /* set hwlen and protolen */ hdr->hwlen = ETH_HWADDR_LEN; 8024590: 697b ldr r3, [r7, #20] 8024592: 2206 movs r2, #6 8024594: 711a strb r2, [r3, #4] hdr->protolen = sizeof(ip4_addr_t); 8024596: 697b ldr r3, [r7, #20] 8024598: 2204 movs r2, #4 802459a: 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); 802459c: f640 0306 movw r3, #2054 @ 0x806 80245a0: 9300 str r3, [sp, #0] 80245a2: 687b ldr r3, [r7, #4] 80245a4: 68ba ldr r2, [r7, #8] 80245a6: 69b9 ldr r1, [r7, #24] 80245a8: 68f8 ldr r0, [r7, #12] 80245aa: f001 fd97 bl 80260dc } ETHARP_STATS_INC(etharp.xmit); /* free ARP query packet */ pbuf_free(p); 80245ae: 69b8 ldr r0, [r7, #24] 80245b0: f7f5 ff94 bl 801a4dc p = NULL; 80245b4: 2300 movs r3, #0 80245b6: 61bb str r3, [r7, #24] /* could not allocate pbuf for ARP request */ return result; 80245b8: f997 301f ldrsb.w r3, [r7, #31] } 80245bc: 4618 mov r0, r3 80245be: 3720 adds r7, #32 80245c0: 46bd mov sp, r7 80245c2: bd80 pop {r7, pc} 80245c4: 080301f4 .word 0x080301f4 80245c8: 08030344 .word 0x08030344 80245cc: 0803026c .word 0x0803026c 80245d0: 080303f4 .word 0x080303f4 80245d4: 08030428 .word 0x08030428 080245d8 : * 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) { 80245d8: b580 push {r7, lr} 80245da: b088 sub sp, #32 80245dc: af04 add r7, sp, #16 80245de: 60f8 str r0, [r7, #12] 80245e0: 60b9 str r1, [r7, #8] 80245e2: 607a str r2, [r7, #4] return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, 80245e4: 68fb ldr r3, [r7, #12] 80245e6: f103 012a add.w r1, r3, #42 @ 0x2a (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), ðzero, 80245ea: 68fb ldr r3, [r7, #12] 80245ec: f103 002a add.w r0, r3, #42 @ 0x2a 80245f0: 68fb ldr r3, [r7, #12] 80245f2: 3304 adds r3, #4 return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, 80245f4: 2201 movs r2, #1 80245f6: 9203 str r2, [sp, #12] 80245f8: 68ba ldr r2, [r7, #8] 80245fa: 9202 str r2, [sp, #8] 80245fc: 4a06 ldr r2, [pc, #24] @ (8024618 ) 80245fe: 9201 str r2, [sp, #4] 8024600: 9300 str r3, [sp, #0] 8024602: 4603 mov r3, r0 8024604: 687a ldr r2, [r7, #4] 8024606: 68f8 ldr r0, [r7, #12] 8024608: f7ff ff5a bl 80244c0 802460c: 4603 mov r3, r0 ipaddr, ARP_REQUEST); } 802460e: 4618 mov r0, r3 8024610: 3710 adds r7, #16 8024612: 46bd mov sp, r7 8024614: bd80 pop {r7, pc} 8024616: bf00 nop 8024618: 08030c20 .word 0x08030c20 0802461c : * 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) { 802461c: b580 push {r7, lr} 802461e: b082 sub sp, #8 8024620: af00 add r7, sp, #0 8024622: 6078 str r0, [r7, #4] 8024624: 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); 8024626: 4a05 ldr r2, [pc, #20] @ (802463c ) 8024628: 6839 ldr r1, [r7, #0] 802462a: 6878 ldr r0, [r7, #4] 802462c: f7ff ffd4 bl 80245d8 8024630: 4603 mov r3, r0 } 8024632: 4618 mov r0, r3 8024634: 3708 adds r7, #8 8024636: 46bd mov sp, r7 8024638: bd80 pop {r7, pc} 802463a: bf00 nop 802463c: 08030c18 .word 0x08030c18 08024640 : * @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) { 8024640: b580 push {r7, lr} 8024642: b08e sub sp, #56 @ 0x38 8024644: af04 add r7, sp, #16 8024646: 6078 str r0, [r7, #4] 8024648: 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(); 802464a: 4b89 ldr r3, [pc, #548] @ (8024870 ) 802464c: 689b ldr r3, [r3, #8] 802464e: 627b str r3, [r7, #36] @ 0x24 hlen = IPH_HL_BYTES(iphdr_in); 8024650: 6a7b ldr r3, [r7, #36] @ 0x24 8024652: 781b ldrb r3, [r3, #0] 8024654: f003 030f and.w r3, r3, #15 8024658: b2db uxtb r3, r3 802465a: 009b lsls r3, r3, #2 802465c: b2db uxtb r3, r3 802465e: 847b strh r3, [r7, #34] @ 0x22 if (hlen < IP_HLEN) { 8024660: 8c7b ldrh r3, [r7, #34] @ 0x22 8024662: 2b13 cmp r3, #19 8024664: f240 80ed bls.w 8024842 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short IP header (%"S16_F" bytes) received\n", hlen)); goto lenerr; } if (p->len < sizeof(u16_t) * 2) { 8024668: 687b ldr r3, [r7, #4] 802466a: 895b ldrh r3, [r3, #10] 802466c: 2b03 cmp r3, #3 802466e: f240 80ea bls.w 8024846 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); goto lenerr; } type = *((u8_t *)p->payload); 8024672: 687b ldr r3, [r7, #4] 8024674: 685b ldr r3, [r3, #4] 8024676: 781b ldrb r3, [r3, #0] 8024678: f887 3021 strb.w r3, [r7, #33] @ 0x21 #ifdef LWIP_DEBUG code = *(((u8_t *)p->payload) + 1); 802467c: 687b ldr r3, [r7, #4] 802467e: 685b ldr r3, [r3, #4] 8024680: 785b ldrb r3, [r3, #1] 8024682: 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) { 8024686: f897 3021 ldrb.w r3, [r7, #33] @ 0x21 802468a: 2b00 cmp r3, #0 802468c: f000 80d2 beq.w 8024834 8024690: 2b08 cmp r3, #8 8024692: f040 80d2 bne.w 802483a (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(); 8024696: 4b77 ldr r3, [pc, #476] @ (8024874 ) 8024698: 61fb str r3, [r7, #28] /* multicast destination address? */ if (ip4_addr_ismulticast(ip4_current_dest_addr())) { 802469a: 4b75 ldr r3, [pc, #468] @ (8024870 ) 802469c: 695b ldr r3, [r3, #20] 802469e: f003 03f0 and.w r3, r3, #240 @ 0xf0 80246a2: 2be0 cmp r3, #224 @ 0xe0 80246a4: f000 80d6 beq.w 8024854 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())) { 80246a8: 4b71 ldr r3, [pc, #452] @ (8024870 ) 80246aa: 695b ldr r3, [r3, #20] 80246ac: 4a70 ldr r2, [pc, #448] @ (8024870 ) 80246ae: 6812 ldr r2, [r2, #0] 80246b0: 4611 mov r1, r2 80246b2: 4618 mov r0, r3 80246b4: f000 fc34 bl 8024f20 80246b8: 4603 mov r3, r0 80246ba: 2b00 cmp r3, #0 80246bc: f040 80cc bne.w 8024858 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)) { 80246c0: 687b ldr r3, [r7, #4] 80246c2: 891b ldrh r3, [r3, #8] 80246c4: 2b07 cmp r3, #7 80246c6: f240 80c0 bls.w 802484a 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) { 80246ca: 6878 ldr r0, [r7, #4] 80246cc: f7f4 fac1 bl 8018c52 80246d0: 4603 mov r3, r0 80246d2: 2b00 cmp r3, #0 80246d4: d003 beq.n 80246de LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo\n")); pbuf_free(p); 80246d6: 6878 ldr r0, [r7, #4] 80246d8: f7f5 ff00 bl 801a4dc ICMP_STATS_INC(icmp.chkerr); MIB2_STATS_INC(mib2.icmpinerrors); return; 80246dc: e0c5 b.n 802486a } } #endif #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN if (pbuf_add_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) { 80246de: 8c7b ldrh r3, [r7, #34] @ 0x22 80246e0: 330e adds r3, #14 80246e2: 4619 mov r1, r3 80246e4: 6878 ldr r0, [r7, #4] 80246e6: f7f5 fe31 bl 801a34c 80246ea: 4603 mov r3, r0 80246ec: 2b00 cmp r3, #0 80246ee: d04b beq.n 8024788 /* 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); 80246f0: 687b ldr r3, [r7, #4] 80246f2: 891a ldrh r2, [r3, #8] 80246f4: 8c7b ldrh r3, [r7, #34] @ 0x22 80246f6: 4413 add r3, r2 80246f8: 837b strh r3, [r7, #26] if (alloc_len < p->tot_len) { 80246fa: 687b ldr r3, [r7, #4] 80246fc: 891b ldrh r3, [r3, #8] 80246fe: 8b7a ldrh r2, [r7, #26] 8024700: 429a cmp r2, r3 8024702: f0c0 80ab bcc.w 802485c 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); 8024706: 8b7b ldrh r3, [r7, #26] 8024708: f44f 7220 mov.w r2, #640 @ 0x280 802470c: 4619 mov r1, r3 802470e: 200e movs r0, #14 8024710: f7f5 fbce bl 8019eb0 8024714: 6178 str r0, [r7, #20] if (r == NULL) { 8024716: 697b ldr r3, [r7, #20] 8024718: 2b00 cmp r3, #0 802471a: f000 80a1 beq.w 8024860 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed\n")); goto icmperr; } if (r->len < hlen + sizeof(struct icmp_echo_hdr)) { 802471e: 697b ldr r3, [r7, #20] 8024720: 895b ldrh r3, [r3, #10] 8024722: 461a mov r2, r3 8024724: 8c7b ldrh r3, [r7, #34] @ 0x22 8024726: 3308 adds r3, #8 8024728: 429a cmp r2, r3 802472a: d203 bcs.n 8024734 LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("first pbuf cannot hold the ICMP header")); pbuf_free(r); 802472c: 6978 ldr r0, [r7, #20] 802472e: f7f5 fed5 bl 801a4dc goto icmperr; 8024732: e096 b.n 8024862 } /* copy the ip header */ MEMCPY(r->payload, iphdr_in, hlen); 8024734: 697b ldr r3, [r7, #20] 8024736: 685b ldr r3, [r3, #4] 8024738: 8c7a ldrh r2, [r7, #34] @ 0x22 802473a: 6a79 ldr r1, [r7, #36] @ 0x24 802473c: 4618 mov r0, r3 802473e: f005 fbce bl 8029ede /* switch r->payload back to icmp header (cannot fail) */ if (pbuf_remove_header(r, hlen)) { 8024742: 8c7b ldrh r3, [r7, #34] @ 0x22 8024744: 4619 mov r1, r3 8024746: 6978 ldr r0, [r7, #20] 8024748: f7f5 fe10 bl 801a36c 802474c: 4603 mov r3, r0 802474e: 2b00 cmp r3, #0 8024750: d009 beq.n 8024766 LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0); 8024752: 4b49 ldr r3, [pc, #292] @ (8024878 ) 8024754: 22b6 movs r2, #182 @ 0xb6 8024756: 4949 ldr r1, [pc, #292] @ (802487c ) 8024758: 4849 ldr r0, [pc, #292] @ (8024880 ) 802475a: f005 f937 bl 80299cc pbuf_free(r); 802475e: 6978 ldr r0, [r7, #20] 8024760: f7f5 febc bl 801a4dc goto icmperr; 8024764: e07d b.n 8024862 } /* copy the rest of the packet without ip header */ if (pbuf_copy(r, p) != ERR_OK) { 8024766: 6879 ldr r1, [r7, #4] 8024768: 6978 ldr r0, [r7, #20] 802476a: f7f5 ffeb bl 801a744 802476e: 4603 mov r3, r0 8024770: 2b00 cmp r3, #0 8024772: d003 beq.n 802477c LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("icmp_input: copying to new pbuf failed")); pbuf_free(r); 8024774: 6978 ldr r0, [r7, #20] 8024776: f7f5 feb1 bl 801a4dc goto icmperr; 802477a: e072 b.n 8024862 } /* free the original p */ pbuf_free(p); 802477c: 6878 ldr r0, [r7, #4] 802477e: f7f5 fead bl 801a4dc /* we now have an identical copy of p that has room for link headers */ p = r; 8024782: 697b ldr r3, [r7, #20] 8024784: 607b str r3, [r7, #4] 8024786: e00f b.n 80247a8 } else { /* restore p->payload to point to icmp header (cannot fail) */ if (pbuf_remove_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) { 8024788: 8c7b ldrh r3, [r7, #34] @ 0x22 802478a: 330e adds r3, #14 802478c: 4619 mov r1, r3 802478e: 6878 ldr r0, [r7, #4] 8024790: f7f5 fdec bl 801a36c 8024794: 4603 mov r3, r0 8024796: 2b00 cmp r3, #0 8024798: d006 beq.n 80247a8 LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); 802479a: 4b37 ldr r3, [pc, #220] @ (8024878 ) 802479c: 22c7 movs r2, #199 @ 0xc7 802479e: 4939 ldr r1, [pc, #228] @ (8024884 ) 80247a0: 4837 ldr r0, [pc, #220] @ (8024880 ) 80247a2: f005 f913 bl 80299cc goto icmperr; 80247a6: e05c b.n 8024862 } #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; 80247a8: 687b ldr r3, [r7, #4] 80247aa: 685b ldr r3, [r3, #4] 80247ac: 613b str r3, [r7, #16] if (pbuf_add_header(p, hlen)) { 80247ae: 8c7b ldrh r3, [r7, #34] @ 0x22 80247b0: 4619 mov r1, r3 80247b2: 6878 ldr r0, [r7, #4] 80247b4: f7f5 fdca bl 801a34c 80247b8: 4603 mov r3, r0 80247ba: 2b00 cmp r3, #0 80247bc: d13c bne.n 8024838 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; 80247be: 687b ldr r3, [r7, #4] 80247c0: 685b ldr r3, [r3, #4] 80247c2: 60fb str r3, [r7, #12] ip4_addr_copy(iphdr->src, *src); 80247c4: 69fb ldr r3, [r7, #28] 80247c6: 681a ldr r2, [r3, #0] 80247c8: 68fb ldr r3, [r7, #12] 80247ca: 60da str r2, [r3, #12] ip4_addr_copy(iphdr->dest, *ip4_current_src_addr()); 80247cc: 4b28 ldr r3, [pc, #160] @ (8024870 ) 80247ce: 691a ldr r2, [r3, #16] 80247d0: 68fb ldr r3, [r7, #12] 80247d2: 611a str r2, [r3, #16] ICMPH_TYPE_SET(iecho, ICMP_ER); 80247d4: 693b ldr r3, [r7, #16] 80247d6: 2200 movs r2, #0 80247d8: 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))) { 80247da: 693b ldr r3, [r7, #16] 80247dc: 885b ldrh r3, [r3, #2] 80247de: b29b uxth r3, r3 80247e0: f64f 72f7 movw r2, #65527 @ 0xfff7 80247e4: 4293 cmp r3, r2 80247e6: d907 bls.n 80247f8 iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS((u16_t)(ICMP_ECHO << 8)) + 1); 80247e8: 693b ldr r3, [r7, #16] 80247ea: 885b ldrh r3, [r3, #2] 80247ec: b29b uxth r3, r3 80247ee: 3309 adds r3, #9 80247f0: b29a uxth r2, r3 80247f2: 693b ldr r3, [r7, #16] 80247f4: 805a strh r2, [r3, #2] 80247f6: e006 b.n 8024806 } else { iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS(ICMP_ECHO << 8)); 80247f8: 693b ldr r3, [r7, #16] 80247fa: 885b ldrh r3, [r3, #2] 80247fc: b29b uxth r3, r3 80247fe: 3308 adds r3, #8 8024800: b29a uxth r2, r3 8024802: 693b ldr r3, [r7, #16] 8024804: 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); 8024806: 68fb ldr r3, [r7, #12] 8024808: 22ff movs r2, #255 @ 0xff 802480a: 721a strb r2, [r3, #8] IPH_CHKSUM_SET(iphdr, 0); 802480c: 68fb ldr r3, [r7, #12] 802480e: 2200 movs r2, #0 8024810: 729a strb r2, [r3, #10] 8024812: 2200 movs r2, #0 8024814: 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, 8024816: 683b ldr r3, [r7, #0] 8024818: 9302 str r3, [sp, #8] 802481a: 2301 movs r3, #1 802481c: 9301 str r3, [sp, #4] 802481e: 2300 movs r3, #0 8024820: 9300 str r3, [sp, #0] 8024822: 23ff movs r3, #255 @ 0xff 8024824: 2200 movs r2, #0 8024826: 69f9 ldr r1, [r7, #28] 8024828: 6878 ldr r0, [r7, #4] 802482a: f000 fa9f bl 8024d6c 802482e: 4603 mov r3, r0 8024830: 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; 8024832: e001 b.n 8024838 break; 8024834: bf00 nop 8024836: e000 b.n 802483a break; 8024838: 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); 802483a: 6878 ldr r0, [r7, #4] 802483c: f7f5 fe4e bl 801a4dc return; 8024840: e013 b.n 802486a goto lenerr; 8024842: bf00 nop 8024844: e002 b.n 802484c goto lenerr; 8024846: bf00 nop 8024848: e000 b.n 802484c goto lenerr; 802484a: bf00 nop lenerr: pbuf_free(p); 802484c: 6878 ldr r0, [r7, #4] 802484e: f7f5 fe45 bl 801a4dc ICMP_STATS_INC(icmp.lenerr); MIB2_STATS_INC(mib2.icmpinerrors); return; 8024852: e00a b.n 802486a goto icmperr; 8024854: bf00 nop 8024856: e004 b.n 8024862 goto icmperr; 8024858: bf00 nop 802485a: e002 b.n 8024862 goto icmperr; 802485c: bf00 nop 802485e: e000 b.n 8024862 goto icmperr; 8024860: bf00 nop #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING icmperr: pbuf_free(p); 8024862: 6878 ldr r0, [r7, #4] 8024864: f7f5 fe3a bl 801a4dc ICMP_STATS_INC(icmp.err); MIB2_STATS_INC(mib2.icmpinerrors); return; 8024868: bf00 nop #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING */ } 802486a: 3728 adds r7, #40 @ 0x28 802486c: 46bd mov sp, r7 802486e: bd80 pop {r7, pc} 8024870: 24024338 .word 0x24024338 8024874: 2402434c .word 0x2402434c 8024878: 0803046c .word 0x0803046c 802487c: 080304a4 .word 0x080304a4 8024880: 080304dc .word 0x080304dc 8024884: 08030504 .word 0x08030504 08024888 : * 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) { 8024888: b580 push {r7, lr} 802488a: b082 sub sp, #8 802488c: af00 add r7, sp, #0 802488e: 6078 str r0, [r7, #4] 8024890: 460b mov r3, r1 8024892: 70fb strb r3, [r7, #3] MIB2_STATS_INC(mib2.icmpoutdestunreachs); icmp_send_response(p, ICMP_DUR, t); 8024894: 78fb ldrb r3, [r7, #3] 8024896: 461a mov r2, r3 8024898: 2103 movs r1, #3 802489a: 6878 ldr r0, [r7, #4] 802489c: f000 f814 bl 80248c8 } 80248a0: bf00 nop 80248a2: 3708 adds r7, #8 80248a4: 46bd mov sp, r7 80248a6: bd80 pop {r7, pc} 080248a8 : * 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) { 80248a8: b580 push {r7, lr} 80248aa: b082 sub sp, #8 80248ac: af00 add r7, sp, #0 80248ae: 6078 str r0, [r7, #4] 80248b0: 460b mov r3, r1 80248b2: 70fb strb r3, [r7, #3] MIB2_STATS_INC(mib2.icmpouttimeexcds); icmp_send_response(p, ICMP_TE, t); 80248b4: 78fb ldrb r3, [r7, #3] 80248b6: 461a mov r2, r3 80248b8: 210b movs r1, #11 80248ba: 6878 ldr r0, [r7, #4] 80248bc: f000 f804 bl 80248c8 } 80248c0: bf00 nop 80248c2: 3708 adds r7, #8 80248c4: 46bd mov sp, r7 80248c6: bd80 pop {r7, pc} 080248c8 : * @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) { 80248c8: b580 push {r7, lr} 80248ca: b08c sub sp, #48 @ 0x30 80248cc: af04 add r7, sp, #16 80248ce: 6078 str r0, [r7, #4] 80248d0: 460b mov r3, r1 80248d2: 70fb strb r3, [r7, #3] 80248d4: 4613 mov r3, r2 80248d6: 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, 80248d8: f44f 7220 mov.w r2, #640 @ 0x280 80248dc: 2124 movs r1, #36 @ 0x24 80248de: 2022 movs r0, #34 @ 0x22 80248e0: f7f5 fae6 bl 8019eb0 80248e4: 61b8 str r0, [r7, #24] PBUF_RAM); if (q == NULL) { 80248e6: 69bb ldr r3, [r7, #24] 80248e8: 2b00 cmp r3, #0 80248ea: d056 beq.n 802499a 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", 80248ec: 69bb ldr r3, [r7, #24] 80248ee: 895b ldrh r3, [r3, #10] 80248f0: 2b23 cmp r3, #35 @ 0x23 80248f2: d806 bhi.n 8024902 80248f4: 4b2b ldr r3, [pc, #172] @ (80249a4 ) 80248f6: f44f 72b4 mov.w r2, #360 @ 0x168 80248fa: 492b ldr r1, [pc, #172] @ (80249a8 ) 80248fc: 482b ldr r0, [pc, #172] @ (80249ac ) 80248fe: f005 f865 bl 80299cc (q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE))); iphdr = (struct ip_hdr *)p->payload; 8024902: 687b ldr r3, [r7, #4] 8024904: 685b ldr r3, [r3, #4] 8024906: 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; 8024908: 69bb ldr r3, [r7, #24] 802490a: 685b ldr r3, [r3, #4] 802490c: 613b str r3, [r7, #16] icmphdr->type = type; 802490e: 693b ldr r3, [r7, #16] 8024910: 78fa ldrb r2, [r7, #3] 8024912: 701a strb r2, [r3, #0] icmphdr->code = code; 8024914: 693b ldr r3, [r7, #16] 8024916: 78ba ldrb r2, [r7, #2] 8024918: 705a strb r2, [r3, #1] icmphdr->id = 0; 802491a: 693b ldr r3, [r7, #16] 802491c: 2200 movs r2, #0 802491e: 711a strb r2, [r3, #4] 8024920: 2200 movs r2, #0 8024922: 715a strb r2, [r3, #5] icmphdr->seqno = 0; 8024924: 693b ldr r3, [r7, #16] 8024926: 2200 movs r2, #0 8024928: 719a strb r2, [r3, #6] 802492a: 2200 movs r2, #0 802492c: 71da strb r2, [r3, #7] /* copy fields from original packet */ SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload, 802492e: 69bb ldr r3, [r7, #24] 8024930: 685b ldr r3, [r3, #4] 8024932: f103 0008 add.w r0, r3, #8 8024936: 687b ldr r3, [r7, #4] 8024938: 685b ldr r3, [r3, #4] 802493a: 221c movs r2, #28 802493c: 4619 mov r1, r3 802493e: f005 face bl 8029ede IP_HLEN + ICMP_DEST_UNREACH_DATASIZE); ip4_addr_copy(iphdr_src, iphdr->src); 8024942: 697b ldr r3, [r7, #20] 8024944: 68db ldr r3, [r3, #12] 8024946: 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); 8024948: f107 030c add.w r3, r7, #12 802494c: 4618 mov r0, r3 802494e: f000 f82f bl 80249b0 8024952: 61f8 str r0, [r7, #28] #endif if (netif != NULL) { 8024954: 69fb ldr r3, [r7, #28] 8024956: 2b00 cmp r3, #0 8024958: d01b beq.n 8024992 /* calculate checksum */ icmphdr->chksum = 0; 802495a: 693b ldr r3, [r7, #16] 802495c: 2200 movs r2, #0 802495e: 709a strb r2, [r3, #2] 8024960: 2200 movs r2, #0 8024962: 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); 8024964: 69bb ldr r3, [r7, #24] 8024966: 895b ldrh r3, [r3, #10] 8024968: 4619 mov r1, r3 802496a: 6938 ldr r0, [r7, #16] 802496c: f7f4 f95f bl 8018c2e 8024970: 4603 mov r3, r0 8024972: 461a mov r2, r3 8024974: 693b ldr r3, [r7, #16] 8024976: 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); 8024978: f107 020c add.w r2, r7, #12 802497c: 69fb ldr r3, [r7, #28] 802497e: 9302 str r3, [sp, #8] 8024980: 2301 movs r3, #1 8024982: 9301 str r3, [sp, #4] 8024984: 2300 movs r3, #0 8024986: 9300 str r3, [sp, #0] 8024988: 23ff movs r3, #255 @ 0xff 802498a: 2100 movs r1, #0 802498c: 69b8 ldr r0, [r7, #24] 802498e: f000 f9ed bl 8024d6c } pbuf_free(q); 8024992: 69b8 ldr r0, [r7, #24] 8024994: f7f5 fda2 bl 801a4dc 8024998: e000 b.n 802499c return; 802499a: bf00 nop } 802499c: 3720 adds r7, #32 802499e: 46bd mov sp, r7 80249a0: bd80 pop {r7, pc} 80249a2: bf00 nop 80249a4: 0803046c .word 0x0803046c 80249a8: 08030538 .word 0x08030538 80249ac: 080304dc .word 0x080304dc 080249b0 : * @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) { 80249b0: b580 push {r7, lr} 80249b2: b084 sub sp, #16 80249b4: af00 add r7, sp, #0 80249b6: 6078 str r0, [r7, #4] #if !LWIP_SINGLE_NETIF struct netif *netif; LWIP_ASSERT_CORE_LOCKED(); 80249b8: f7eb fdba bl 8010530 /* 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) { 80249bc: 4b32 ldr r3, [pc, #200] @ (8024a88 ) 80249be: 681b ldr r3, [r3, #0] 80249c0: 60fb str r3, [r7, #12] 80249c2: e036 b.n 8024a32 /* 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))) { 80249c4: 68fb ldr r3, [r7, #12] 80249c6: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 80249ca: f003 0301 and.w r3, r3, #1 80249ce: b2db uxtb r3, r3 80249d0: 2b00 cmp r3, #0 80249d2: d02b beq.n 8024a2c 80249d4: 68fb ldr r3, [r7, #12] 80249d6: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 80249da: 089b lsrs r3, r3, #2 80249dc: f003 0301 and.w r3, r3, #1 80249e0: b2db uxtb r3, r3 80249e2: 2b00 cmp r3, #0 80249e4: d022 beq.n 8024a2c 80249e6: 68fb ldr r3, [r7, #12] 80249e8: 3304 adds r3, #4 80249ea: 681b ldr r3, [r3, #0] 80249ec: 2b00 cmp r3, #0 80249ee: d01d beq.n 8024a2c /* network mask matches? */ if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) { 80249f0: 687b ldr r3, [r7, #4] 80249f2: 681a ldr r2, [r3, #0] 80249f4: 68fb ldr r3, [r7, #12] 80249f6: 3304 adds r3, #4 80249f8: 681b ldr r3, [r3, #0] 80249fa: 405a eors r2, r3 80249fc: 68fb ldr r3, [r7, #12] 80249fe: 3308 adds r3, #8 8024a00: 681b ldr r3, [r3, #0] 8024a02: 4013 ands r3, r2 8024a04: 2b00 cmp r3, #0 8024a06: d101 bne.n 8024a0c /* return netif on which to forward IP packet */ return netif; 8024a08: 68fb ldr r3, [r7, #12] 8024a0a: e038 b.n 8024a7e } /* 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))) { 8024a0c: 68fb ldr r3, [r7, #12] 8024a0e: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8024a12: f003 0302 and.w r3, r3, #2 8024a16: 2b00 cmp r3, #0 8024a18: d108 bne.n 8024a2c 8024a1a: 687b ldr r3, [r7, #4] 8024a1c: 681a ldr r2, [r3, #0] 8024a1e: 68fb ldr r3, [r7, #12] 8024a20: 330c adds r3, #12 8024a22: 681b ldr r3, [r3, #0] 8024a24: 429a cmp r2, r3 8024a26: d101 bne.n 8024a2c /* return netif on which to forward IP packet */ return netif; 8024a28: 68fb ldr r3, [r7, #12] 8024a2a: e028 b.n 8024a7e NETIF_FOREACH(netif) { 8024a2c: 68fb ldr r3, [r7, #12] 8024a2e: 681b ldr r3, [r3, #0] 8024a30: 60fb str r3, [r7, #12] 8024a32: 68fb ldr r3, [r7, #12] 8024a34: 2b00 cmp r3, #0 8024a36: d1c5 bne.n 80249c4 return netif; } #endif #endif /* !LWIP_SINGLE_NETIF */ if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || 8024a38: 4b14 ldr r3, [pc, #80] @ (8024a8c ) 8024a3a: 681b ldr r3, [r3, #0] 8024a3c: 2b00 cmp r3, #0 8024a3e: d01a beq.n 8024a76 8024a40: 4b12 ldr r3, [pc, #72] @ (8024a8c ) 8024a42: 681b ldr r3, [r3, #0] 8024a44: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8024a48: f003 0301 and.w r3, r3, #1 8024a4c: 2b00 cmp r3, #0 8024a4e: d012 beq.n 8024a76 8024a50: 4b0e ldr r3, [pc, #56] @ (8024a8c ) 8024a52: 681b ldr r3, [r3, #0] 8024a54: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8024a58: f003 0304 and.w r3, r3, #4 8024a5c: 2b00 cmp r3, #0 8024a5e: d00a beq.n 8024a76 ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) { 8024a60: 4b0a ldr r3, [pc, #40] @ (8024a8c ) 8024a62: 681b ldr r3, [r3, #0] 8024a64: 3304 adds r3, #4 8024a66: 681b ldr r3, [r3, #0] if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || 8024a68: 2b00 cmp r3, #0 8024a6a: d004 beq.n 8024a76 ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) { 8024a6c: 687b ldr r3, [r7, #4] 8024a6e: 681b ldr r3, [r3, #0] 8024a70: b2db uxtb r3, r3 8024a72: 2b7f cmp r3, #127 @ 0x7f 8024a74: d101 bne.n 8024a7a 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; 8024a76: 2300 movs r3, #0 8024a78: e001 b.n 8024a7e } return netif_default; 8024a7a: 4b04 ldr r3, [pc, #16] @ (8024a8c ) 8024a7c: 681b ldr r3, [r3, #0] } 8024a7e: 4618 mov r0, r3 8024a80: 3710 adds r7, #16 8024a82: 46bd mov sp, r7 8024a84: bd80 pop {r7, pc} 8024a86: bf00 nop 8024a88: 2402ae7c .word 0x2402ae7c 8024a8c: 2402ae80 .word 0x2402ae80 08024a90 : #endif /* IP_FORWARD */ /** Return true if the current input packet should be accepted on this netif */ static int ip4_input_accept(struct netif *netif) { 8024a90: b580 push {r7, lr} 8024a92: b082 sub sp, #8 8024a94: af00 add r7, sp, #0 8024a96: 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)))) { 8024a98: 687b ldr r3, [r7, #4] 8024a9a: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8024a9e: f003 0301 and.w r3, r3, #1 8024aa2: b2db uxtb r3, r3 8024aa4: 2b00 cmp r3, #0 8024aa6: d016 beq.n 8024ad6 8024aa8: 687b ldr r3, [r7, #4] 8024aaa: 3304 adds r3, #4 8024aac: 681b ldr r3, [r3, #0] 8024aae: 2b00 cmp r3, #0 8024ab0: d011 beq.n 8024ad6 /* unicast to this interface address? */ if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || 8024ab2: 4b0b ldr r3, [pc, #44] @ (8024ae0 ) 8024ab4: 695a ldr r2, [r3, #20] 8024ab6: 687b ldr r3, [r7, #4] 8024ab8: 3304 adds r3, #4 8024aba: 681b ldr r3, [r3, #0] 8024abc: 429a cmp r2, r3 8024abe: d008 beq.n 8024ad2 /* or broadcast on this interface network address? */ ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) 8024ac0: 4b07 ldr r3, [pc, #28] @ (8024ae0 ) 8024ac2: 695b ldr r3, [r3, #20] 8024ac4: 6879 ldr r1, [r7, #4] 8024ac6: 4618 mov r0, r3 8024ac8: f000 fa2a bl 8024f20 8024acc: 4603 mov r3, r0 if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || 8024ace: 2b00 cmp r3, #0 8024ad0: d001 beq.n 8024ad6 #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; 8024ad2: 2301 movs r3, #1 8024ad4: e000 b.n 8024ad8 /* accept on this netif */ return 1; } #endif /* LWIP_AUTOIP */ } return 0; 8024ad6: 2300 movs r3, #0 } 8024ad8: 4618 mov r0, r3 8024ada: 3708 adds r7, #8 8024adc: 46bd mov sp, r7 8024ade: bd80 pop {r7, pc} 8024ae0: 24024338 .word 0x24024338 08024ae4 : * @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) { 8024ae4: b580 push {r7, lr} 8024ae6: b088 sub sp, #32 8024ae8: af00 add r7, sp, #0 8024aea: 6078 str r0, [r7, #4] 8024aec: 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; 8024aee: 2301 movs r3, #1 8024af0: 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(); 8024af2: f7eb fd1d bl 8010530 IP_STATS_INC(ip.recv); MIB2_STATS_INC(mib2.ipinreceives); /* identify the IP header */ iphdr = (struct ip_hdr *)p->payload; 8024af6: 687b ldr r3, [r7, #4] 8024af8: 685b ldr r3, [r3, #4] 8024afa: 613b str r3, [r7, #16] if (IPH_V(iphdr) != 4) { 8024afc: 693b ldr r3, [r7, #16] 8024afe: 781b ldrb r3, [r3, #0] 8024b00: 091b lsrs r3, r3, #4 8024b02: b2db uxtb r3, r3 8024b04: 2b04 cmp r3, #4 8024b06: d004 beq.n 8024b12 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); 8024b08: 6878 ldr r0, [r7, #4] 8024b0a: f7f5 fce7 bl 801a4dc IP_STATS_INC(ip.err); IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinhdrerrors); return ERR_OK; 8024b0e: 2300 movs r3, #0 8024b10: e123 b.n 8024d5a return ERR_OK; } #endif /* obtain IP header length in bytes */ iphdr_hlen = IPH_HL_BYTES(iphdr); 8024b12: 693b ldr r3, [r7, #16] 8024b14: 781b ldrb r3, [r3, #0] 8024b16: f003 030f and.w r3, r3, #15 8024b1a: b2db uxtb r3, r3 8024b1c: 009b lsls r3, r3, #2 8024b1e: b2db uxtb r3, r3 8024b20: 81fb strh r3, [r7, #14] /* obtain ip length in bytes */ iphdr_len = lwip_ntohs(IPH_LEN(iphdr)); 8024b22: 693b ldr r3, [r7, #16] 8024b24: 885b ldrh r3, [r3, #2] 8024b26: b29b uxth r3, r3 8024b28: 4618 mov r0, r3 8024b2a: f7f3 fff5 bl 8018b18 8024b2e: 4603 mov r3, r0 8024b30: 837b strh r3, [r7, #26] /* Trim pbuf. This is especially required for packets < 60 bytes. */ if (iphdr_len < p->tot_len) { 8024b32: 687b ldr r3, [r7, #4] 8024b34: 891b ldrh r3, [r3, #8] 8024b36: 8b7a ldrh r2, [r7, #26] 8024b38: 429a cmp r2, r3 8024b3a: d204 bcs.n 8024b46 pbuf_realloc(p, iphdr_len); 8024b3c: 8b7b ldrh r3, [r7, #26] 8024b3e: 4619 mov r1, r3 8024b40: 6878 ldr r0, [r7, #4] 8024b42: f7f5 fb15 bl 801a170 } /* 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)) { 8024b46: 687b ldr r3, [r7, #4] 8024b48: 895b ldrh r3, [r3, #10] 8024b4a: 89fa ldrh r2, [r7, #14] 8024b4c: 429a cmp r2, r3 8024b4e: d807 bhi.n 8024b60 8024b50: 687b ldr r3, [r7, #4] 8024b52: 891b ldrh r3, [r3, #8] 8024b54: 8b7a ldrh r2, [r7, #26] 8024b56: 429a cmp r2, r3 8024b58: d802 bhi.n 8024b60 8024b5a: 89fb ldrh r3, [r7, #14] 8024b5c: 2b13 cmp r3, #19 8024b5e: d804 bhi.n 8024b6a 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); 8024b60: 6878 ldr r0, [r7, #4] 8024b62: f7f5 fcbb bl 801a4dc IP_STATS_INC(ip.lenerr); IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipindiscards); return ERR_OK; 8024b66: 2300 movs r3, #0 8024b68: e0f7 b.n 8024d5a } } #endif /* copy IP addresses to aligned ip_addr_t */ ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest); 8024b6a: 693b ldr r3, [r7, #16] 8024b6c: 691b ldr r3, [r3, #16] 8024b6e: 4a7d ldr r2, [pc, #500] @ (8024d64 ) 8024b70: 6153 str r3, [r2, #20] ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src); 8024b72: 693b ldr r3, [r7, #16] 8024b74: 68db ldr r3, [r3, #12] 8024b76: 4a7b ldr r2, [pc, #492] @ (8024d64 ) 8024b78: 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())) { 8024b7a: 4b7a ldr r3, [pc, #488] @ (8024d64 ) 8024b7c: 695b ldr r3, [r3, #20] 8024b7e: f003 03f0 and.w r3, r3, #240 @ 0xf0 8024b82: 2be0 cmp r3, #224 @ 0xe0 8024b84: d112 bne.n 8024bac netif = inp; } else { netif = NULL; } #else /* LWIP_IGMP */ if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) { 8024b86: 683b ldr r3, [r7, #0] 8024b88: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8024b8c: f003 0301 and.w r3, r3, #1 8024b90: b2db uxtb r3, r3 8024b92: 2b00 cmp r3, #0 8024b94: d007 beq.n 8024ba6 8024b96: 683b ldr r3, [r7, #0] 8024b98: 3304 adds r3, #4 8024b9a: 681b ldr r3, [r3, #0] 8024b9c: 2b00 cmp r3, #0 8024b9e: d002 beq.n 8024ba6 netif = inp; 8024ba0: 683b ldr r3, [r7, #0] 8024ba2: 61fb str r3, [r7, #28] 8024ba4: e02a b.n 8024bfc } else { netif = NULL; 8024ba6: 2300 movs r3, #0 8024ba8: 61fb str r3, [r7, #28] 8024baa: e027 b.n 8024bfc } #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)) { 8024bac: 6838 ldr r0, [r7, #0] 8024bae: f7ff ff6f bl 8024a90 8024bb2: 4603 mov r3, r0 8024bb4: 2b00 cmp r3, #0 8024bb6: d002 beq.n 8024bbe netif = inp; 8024bb8: 683b ldr r3, [r7, #0] 8024bba: 61fb str r3, [r7, #28] 8024bbc: e01e b.n 8024bfc } else { netif = NULL; 8024bbe: 2300 movs r3, #0 8024bc0: 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())) 8024bc2: 4b68 ldr r3, [pc, #416] @ (8024d64 ) 8024bc4: 695b ldr r3, [r3, #20] 8024bc6: b2db uxtb r3, r3 8024bc8: 2b7f cmp r3, #127 @ 0x7f 8024bca: d017 beq.n 8024bfc #endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */ { #if !LWIP_SINGLE_NETIF NETIF_FOREACH(netif) { 8024bcc: 4b66 ldr r3, [pc, #408] @ (8024d68 ) 8024bce: 681b ldr r3, [r3, #0] 8024bd0: 61fb str r3, [r7, #28] 8024bd2: e00e b.n 8024bf2 if (netif == inp) { 8024bd4: 69fa ldr r2, [r7, #28] 8024bd6: 683b ldr r3, [r7, #0] 8024bd8: 429a cmp r2, r3 8024bda: d006 beq.n 8024bea /* we checked that before already */ continue; } if (ip4_input_accept(netif)) { 8024bdc: 69f8 ldr r0, [r7, #28] 8024bde: f7ff ff57 bl 8024a90 8024be2: 4603 mov r3, r0 8024be4: 2b00 cmp r3, #0 8024be6: d108 bne.n 8024bfa 8024be8: e000 b.n 8024bec continue; 8024bea: bf00 nop NETIF_FOREACH(netif) { 8024bec: 69fb ldr r3, [r7, #28] 8024bee: 681b ldr r3, [r3, #0] 8024bf0: 61fb str r3, [r7, #28] 8024bf2: 69fb ldr r3, [r7, #28] 8024bf4: 2b00 cmp r3, #0 8024bf6: d1ed bne.n 8024bd4 8024bf8: e000 b.n 8024bfc break; 8024bfa: 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) { 8024bfc: 69fb ldr r3, [r7, #28] 8024bfe: 2b00 cmp r3, #0 8024c00: d111 bne.n 8024c26 /* remote port is DHCP server? */ if (IPH_PROTO(iphdr) == IP_PROTO_UDP) { 8024c02: 693b ldr r3, [r7, #16] 8024c04: 7a5b ldrb r3, [r3, #9] 8024c06: 2b11 cmp r3, #17 8024c08: d10d bne.n 8024c26 const struct udp_hdr *udphdr = (const struct udp_hdr *)((const u8_t *)iphdr + iphdr_hlen); 8024c0a: 89fb ldrh r3, [r7, #14] 8024c0c: 693a ldr r2, [r7, #16] 8024c0e: 4413 add r3, r2 8024c10: 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)) { 8024c12: 68bb ldr r3, [r7, #8] 8024c14: 885b ldrh r3, [r3, #2] 8024c16: b29b uxth r3, r3 8024c18: f5b3 4f88 cmp.w r3, #17408 @ 0x4400 8024c1c: d103 bne.n 8024c26 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: DHCP packet accepted.\n")); netif = inp; 8024c1e: 683b ldr r3, [r7, #0] 8024c20: 61fb str r3, [r7, #28] check_ip_src = 0; 8024c22: 2300 movs r3, #0 8024c24: 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 8024c26: 697b ldr r3, [r7, #20] 8024c28: 2b00 cmp r3, #0 8024c2a: d017 beq.n 8024c5c #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()) 8024c2c: 4b4d ldr r3, [pc, #308] @ (8024d64 ) 8024c2e: 691b ldr r3, [r3, #16] 8024c30: 2b00 cmp r3, #0 8024c32: d013 beq.n 8024c5c #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ ) #endif /* LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING */ { if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || 8024c34: 4b4b ldr r3, [pc, #300] @ (8024d64 ) 8024c36: 691b ldr r3, [r3, #16] 8024c38: 6839 ldr r1, [r7, #0] 8024c3a: 4618 mov r0, r3 8024c3c: f000 f970 bl 8024f20 8024c40: 4603 mov r3, r0 8024c42: 2b00 cmp r3, #0 8024c44: d105 bne.n 8024c52 (ip4_addr_ismulticast(ip4_current_src_addr()))) { 8024c46: 4b47 ldr r3, [pc, #284] @ (8024d64 ) 8024c48: 691b ldr r3, [r3, #16] 8024c4a: f003 03f0 and.w r3, r3, #240 @ 0xf0 if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || 8024c4e: 2be0 cmp r3, #224 @ 0xe0 8024c50: d104 bne.n 8024c5c /* 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); 8024c52: 6878 ldr r0, [r7, #4] 8024c54: f7f5 fc42 bl 801a4dc IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinaddrerrors); MIB2_STATS_INC(mib2.ipindiscards); return ERR_OK; 8024c58: 2300 movs r3, #0 8024c5a: e07e b.n 8024d5a } } /* packet not for us? */ if (netif == NULL) { 8024c5c: 69fb ldr r3, [r7, #28] 8024c5e: 2b00 cmp r3, #0 8024c60: d104 bne.n 8024c6c { IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinaddrerrors); MIB2_STATS_INC(mib2.ipindiscards); } pbuf_free(p); 8024c62: 6878 ldr r0, [r7, #4] 8024c64: f7f5 fc3a bl 801a4dc return ERR_OK; 8024c68: 2300 movs r3, #0 8024c6a: e076 b.n 8024d5a } /* packet consists of multiple fragments? */ if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { 8024c6c: 693b ldr r3, [r7, #16] 8024c6e: 88db ldrh r3, [r3, #6] 8024c70: b29b uxth r3, r3 8024c72: 461a mov r2, r3 8024c74: f64f 733f movw r3, #65343 @ 0xff3f 8024c78: 4013 ands r3, r2 8024c7a: 2b00 cmp r3, #0 8024c7c: d00b beq.n 8024c96 #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); 8024c7e: 6878 ldr r0, [r7, #4] 8024c80: f000 fe62 bl 8025948 8024c84: 6078 str r0, [r7, #4] /* packet not fully reassembled yet? */ if (p == NULL) { 8024c86: 687b ldr r3, [r7, #4] 8024c88: 2b00 cmp r3, #0 8024c8a: d101 bne.n 8024c90 return ERR_OK; 8024c8c: 2300 movs r3, #0 8024c8e: e064 b.n 8024d5a } iphdr = (const struct ip_hdr *)p->payload; 8024c90: 687b ldr r3, [r7, #4] 8024c92: 685b ldr r3, [r3, #4] 8024c94: 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; 8024c96: 4a33 ldr r2, [pc, #204] @ (8024d64 ) 8024c98: 69fb ldr r3, [r7, #28] 8024c9a: 6013 str r3, [r2, #0] ip_data.current_input_netif = inp; 8024c9c: 4a31 ldr r2, [pc, #196] @ (8024d64 ) 8024c9e: 683b ldr r3, [r7, #0] 8024ca0: 6053 str r3, [r2, #4] ip_data.current_ip4_header = iphdr; 8024ca2: 4a30 ldr r2, [pc, #192] @ (8024d64 ) 8024ca4: 693b ldr r3, [r7, #16] 8024ca6: 6093 str r3, [r2, #8] ip_data.current_ip_header_tot_len = IPH_HL_BYTES(iphdr); 8024ca8: 693b ldr r3, [r7, #16] 8024caa: 781b ldrb r3, [r3, #0] 8024cac: f003 030f and.w r3, r3, #15 8024cb0: b2db uxtb r3, r3 8024cb2: 009b lsls r3, r3, #2 8024cb4: b2db uxtb r3, r3 8024cb6: 461a mov r2, r3 8024cb8: 4b2a ldr r3, [pc, #168] @ (8024d64 ) 8024cba: 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. */ 8024cbc: 89fb ldrh r3, [r7, #14] 8024cbe: 4619 mov r1, r3 8024cc0: 6878 ldr r0, [r7, #4] 8024cc2: f7f5 fb53 bl 801a36c switch (IPH_PROTO(iphdr)) { 8024cc6: 693b ldr r3, [r7, #16] 8024cc8: 7a5b ldrb r3, [r3, #9] 8024cca: 2b11 cmp r3, #17 8024ccc: d006 beq.n 8024cdc 8024cce: 2b11 cmp r3, #17 8024cd0: dc13 bgt.n 8024cfa 8024cd2: 2b01 cmp r3, #1 8024cd4: d00c beq.n 8024cf0 8024cd6: 2b06 cmp r3, #6 8024cd8: d005 beq.n 8024ce6 8024cda: e00e b.n 8024cfa case IP_PROTO_UDP: #if LWIP_UDPLITE case IP_PROTO_UDPLITE: #endif /* LWIP_UDPLITE */ MIB2_STATS_INC(mib2.ipindelivers); udp_input(p, inp); 8024cdc: 6839 ldr r1, [r7, #0] 8024cde: 6878 ldr r0, [r7, #4] 8024ce0: f7fc f99c bl 802101c break; 8024ce4: e026 b.n 8024d34 #endif /* LWIP_UDP */ #if LWIP_TCP case IP_PROTO_TCP: MIB2_STATS_INC(mib2.ipindelivers); tcp_input(p, inp); 8024ce6: 6839 ldr r1, [r7, #0] 8024ce8: 6878 ldr r0, [r7, #4] 8024cea: f7f7 fcdd bl 801c6a8 break; 8024cee: e021 b.n 8024d34 #endif /* LWIP_TCP */ #if LWIP_ICMP case IP_PROTO_ICMP: MIB2_STATS_INC(mib2.ipindelivers); icmp_input(p, inp); 8024cf0: 6839 ldr r1, [r7, #0] 8024cf2: 6878 ldr r0, [r7, #4] 8024cf4: f7ff fca4 bl 8024640 break; 8024cf8: e01c b.n 8024d34 } 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) && 8024cfa: 4b1a ldr r3, [pc, #104] @ (8024d64 ) 8024cfc: 695b ldr r3, [r3, #20] 8024cfe: 69f9 ldr r1, [r7, #28] 8024d00: 4618 mov r0, r3 8024d02: f000 f90d bl 8024f20 8024d06: 4603 mov r3, r0 8024d08: 2b00 cmp r3, #0 8024d0a: d10f bne.n 8024d2c !ip4_addr_ismulticast(ip4_current_dest_addr())) { 8024d0c: 4b15 ldr r3, [pc, #84] @ (8024d64 ) 8024d0e: 695b ldr r3, [r3, #20] 8024d10: f003 03f0 and.w r3, r3, #240 @ 0xf0 if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) && 8024d14: 2be0 cmp r3, #224 @ 0xe0 8024d16: d009 beq.n 8024d2c pbuf_header_force(p, (s16_t)iphdr_hlen); /* Move to ip header, no check necessary. */ 8024d18: f9b7 300e ldrsh.w r3, [r7, #14] 8024d1c: 4619 mov r1, r3 8024d1e: 6878 ldr r0, [r7, #4] 8024d20: f7f5 fb97 bl 801a452 icmp_dest_unreach(p, ICMP_DUR_PROTO); 8024d24: 2102 movs r1, #2 8024d26: 6878 ldr r0, [r7, #4] 8024d28: f7ff fdae bl 8024888 IP_STATS_INC(ip.proterr); IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinunknownprotos); } pbuf_free(p); 8024d2c: 6878 ldr r0, [r7, #4] 8024d2e: f7f5 fbd5 bl 801a4dc break; 8024d32: bf00 nop } } /* @todo: this is not really necessary... */ ip_data.current_netif = NULL; 8024d34: 4b0b ldr r3, [pc, #44] @ (8024d64 ) 8024d36: 2200 movs r2, #0 8024d38: 601a str r2, [r3, #0] ip_data.current_input_netif = NULL; 8024d3a: 4b0a ldr r3, [pc, #40] @ (8024d64 ) 8024d3c: 2200 movs r2, #0 8024d3e: 605a str r2, [r3, #4] ip_data.current_ip4_header = NULL; 8024d40: 4b08 ldr r3, [pc, #32] @ (8024d64 ) 8024d42: 2200 movs r2, #0 8024d44: 609a str r2, [r3, #8] ip_data.current_ip_header_tot_len = 0; 8024d46: 4b07 ldr r3, [pc, #28] @ (8024d64 ) 8024d48: 2200 movs r2, #0 8024d4a: 819a strh r2, [r3, #12] ip4_addr_set_any(ip4_current_src_addr()); 8024d4c: 4b05 ldr r3, [pc, #20] @ (8024d64 ) 8024d4e: 2200 movs r2, #0 8024d50: 611a str r2, [r3, #16] ip4_addr_set_any(ip4_current_dest_addr()); 8024d52: 4b04 ldr r3, [pc, #16] @ (8024d64 ) 8024d54: 2200 movs r2, #0 8024d56: 615a str r2, [r3, #20] return ERR_OK; 8024d58: 2300 movs r3, #0 } 8024d5a: 4618 mov r0, r3 8024d5c: 3720 adds r7, #32 8024d5e: 46bd mov sp, r7 8024d60: bd80 pop {r7, pc} 8024d62: bf00 nop 8024d64: 24024338 .word 0x24024338 8024d68: 2402ae7c .word 0x2402ae7c 08024d6c : */ 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) { 8024d6c: b580 push {r7, lr} 8024d6e: b08a sub sp, #40 @ 0x28 8024d70: af04 add r7, sp, #16 8024d72: 60f8 str r0, [r7, #12] 8024d74: 60b9 str r1, [r7, #8] 8024d76: 607a str r2, [r7, #4] 8024d78: 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; 8024d7a: 68bb ldr r3, [r7, #8] 8024d7c: 617b str r3, [r7, #20] if (dest != LWIP_IP_HDRINCL) { 8024d7e: 687b ldr r3, [r7, #4] 8024d80: 2b00 cmp r3, #0 8024d82: d009 beq.n 8024d98 if (ip4_addr_isany(src)) { 8024d84: 68bb ldr r3, [r7, #8] 8024d86: 2b00 cmp r3, #0 8024d88: d003 beq.n 8024d92 8024d8a: 68bb ldr r3, [r7, #8] 8024d8c: 681b ldr r3, [r3, #0] 8024d8e: 2b00 cmp r3, #0 8024d90: d102 bne.n 8024d98 src_used = netif_ip4_addr(netif); 8024d92: 6abb ldr r3, [r7, #40] @ 0x28 8024d94: 3304 adds r3, #4 8024d96: 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); 8024d98: 78fa ldrb r2, [r7, #3] 8024d9a: 6abb ldr r3, [r7, #40] @ 0x28 8024d9c: 9302 str r3, [sp, #8] 8024d9e: f897 3024 ldrb.w r3, [r7, #36] @ 0x24 8024da2: 9301 str r3, [sp, #4] 8024da4: f897 3020 ldrb.w r3, [r7, #32] 8024da8: 9300 str r3, [sp, #0] 8024daa: 4613 mov r3, r2 8024dac: 687a ldr r2, [r7, #4] 8024dae: 6979 ldr r1, [r7, #20] 8024db0: 68f8 ldr r0, [r7, #12] 8024db2: f000 f805 bl 8024dc0 8024db6: 4603 mov r3, r0 #endif /* IP_OPTIONS_SEND */ } 8024db8: 4618 mov r0, r3 8024dba: 3718 adds r7, #24 8024dbc: 46bd mov sp, r7 8024dbe: bd80 pop {r7, pc} 08024dc0 : */ 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) { 8024dc0: b580 push {r7, lr} 8024dc2: b088 sub sp, #32 8024dc4: af00 add r7, sp, #0 8024dc6: 60f8 str r0, [r7, #12] 8024dc8: 60b9 str r1, [r7, #8] 8024dca: 607a str r2, [r7, #4] 8024dcc: 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(); 8024dce: f7eb fbaf bl 8010530 LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); 8024dd2: 68fb ldr r3, [r7, #12] 8024dd4: 7b9b ldrb r3, [r3, #14] 8024dd6: 2b01 cmp r3, #1 8024dd8: d006 beq.n 8024de8 8024dda: 4b4b ldr r3, [pc, #300] @ (8024f08 ) 8024ddc: f44f 7255 mov.w r2, #852 @ 0x354 8024de0: 494a ldr r1, [pc, #296] @ (8024f0c ) 8024de2: 484b ldr r0, [pc, #300] @ (8024f10 ) 8024de4: f004 fdf2 bl 80299cc MIB2_STATS_INC(mib2.ipoutrequests); /* Should the IP header be generated or is it already included in p? */ if (dest != LWIP_IP_HDRINCL) { 8024de8: 687b ldr r3, [r7, #4] 8024dea: 2b00 cmp r3, #0 8024dec: d060 beq.n 8024eb0 u16_t ip_hlen = IP_HLEN; 8024dee: 2314 movs r3, #20 8024df0: 837b strh r3, [r7, #26] } #endif /* CHECKSUM_GEN_IP_INLINE */ } #endif /* IP_OPTIONS_SEND */ /* generate IP header */ if (pbuf_add_header(p, IP_HLEN)) { 8024df2: 2114 movs r1, #20 8024df4: 68f8 ldr r0, [r7, #12] 8024df6: f7f5 faa9 bl 801a34c 8024dfa: 4603 mov r3, r0 8024dfc: 2b00 cmp r3, #0 8024dfe: d002 beq.n 8024e06 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; 8024e00: f06f 0301 mvn.w r3, #1 8024e04: e07c b.n 8024f00 } iphdr = (struct ip_hdr *)p->payload; 8024e06: 68fb ldr r3, [r7, #12] 8024e08: 685b ldr r3, [r3, #4] 8024e0a: 61fb str r3, [r7, #28] LWIP_ASSERT("check that first pbuf can hold struct ip_hdr", 8024e0c: 68fb ldr r3, [r7, #12] 8024e0e: 895b ldrh r3, [r3, #10] 8024e10: 2b13 cmp r3, #19 8024e12: d806 bhi.n 8024e22 8024e14: 4b3c ldr r3, [pc, #240] @ (8024f08 ) 8024e16: f44f 7262 mov.w r2, #904 @ 0x388 8024e1a: 493e ldr r1, [pc, #248] @ (8024f14 ) 8024e1c: 483c ldr r0, [pc, #240] @ (8024f10 ) 8024e1e: f004 fdd5 bl 80299cc (p->len >= sizeof(struct ip_hdr))); IPH_TTL_SET(iphdr, ttl); 8024e22: 69fb ldr r3, [r7, #28] 8024e24: 78fa ldrb r2, [r7, #3] 8024e26: 721a strb r2, [r3, #8] IPH_PROTO_SET(iphdr, proto); 8024e28: 69fb ldr r3, [r7, #28] 8024e2a: f897 202c ldrb.w r2, [r7, #44] @ 0x2c 8024e2e: 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); 8024e30: 687b ldr r3, [r7, #4] 8024e32: 681a ldr r2, [r3, #0] 8024e34: 69fb ldr r3, [r7, #28] 8024e36: 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); 8024e38: 8b7b ldrh r3, [r7, #26] 8024e3a: 089b lsrs r3, r3, #2 8024e3c: b29b uxth r3, r3 8024e3e: b2db uxtb r3, r3 8024e40: f043 0340 orr.w r3, r3, #64 @ 0x40 8024e44: b2da uxtb r2, r3 8024e46: 69fb ldr r3, [r7, #28] 8024e48: 701a strb r2, [r3, #0] IPH_TOS_SET(iphdr, tos); 8024e4a: 69fb ldr r3, [r7, #28] 8024e4c: f897 2028 ldrb.w r2, [r7, #40] @ 0x28 8024e50: 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)); 8024e52: 68fb ldr r3, [r7, #12] 8024e54: 891b ldrh r3, [r3, #8] 8024e56: 4618 mov r0, r3 8024e58: f7f3 fe5e bl 8018b18 8024e5c: 4603 mov r3, r0 8024e5e: 461a mov r2, r3 8024e60: 69fb ldr r3, [r7, #28] 8024e62: 805a strh r2, [r3, #2] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_len; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_OFFSET_SET(iphdr, 0); 8024e64: 69fb ldr r3, [r7, #28] 8024e66: 2200 movs r2, #0 8024e68: 719a strb r2, [r3, #6] 8024e6a: 2200 movs r2, #0 8024e6c: 71da strb r2, [r3, #7] IPH_ID_SET(iphdr, lwip_htons(ip_id)); 8024e6e: 4b2a ldr r3, [pc, #168] @ (8024f18 ) 8024e70: 881b ldrh r3, [r3, #0] 8024e72: 4618 mov r0, r3 8024e74: f7f3 fe50 bl 8018b18 8024e78: 4603 mov r3, r0 8024e7a: 461a mov r2, r3 8024e7c: 69fb ldr r3, [r7, #28] 8024e7e: 809a strh r2, [r3, #4] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_id; #endif /* CHECKSUM_GEN_IP_INLINE */ ++ip_id; 8024e80: 4b25 ldr r3, [pc, #148] @ (8024f18 ) 8024e82: 881b ldrh r3, [r3, #0] 8024e84: 3301 adds r3, #1 8024e86: b29a uxth r2, r3 8024e88: 4b23 ldr r3, [pc, #140] @ (8024f18 ) 8024e8a: 801a strh r2, [r3, #0] if (src == NULL) { 8024e8c: 68bb ldr r3, [r7, #8] 8024e8e: 2b00 cmp r3, #0 8024e90: d104 bne.n 8024e9c ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4); 8024e92: 4b22 ldr r3, [pc, #136] @ (8024f1c ) 8024e94: 681a ldr r2, [r3, #0] 8024e96: 69fb ldr r3, [r7, #28] 8024e98: 60da str r2, [r3, #12] 8024e9a: e003 b.n 8024ea4 } else { /* src cannot be NULL here */ ip4_addr_copy(iphdr->src, *src); 8024e9c: 68bb ldr r3, [r7, #8] 8024e9e: 681a ldr r2, [r3, #0] 8024ea0: 69fb ldr r3, [r7, #28] 8024ea2: 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); 8024ea4: 69fb ldr r3, [r7, #28] 8024ea6: 2200 movs r2, #0 8024ea8: 729a strb r2, [r3, #10] 8024eaa: 2200 movs r2, #0 8024eac: 72da strb r2, [r3, #11] 8024eae: e00f b.n 8024ed0 } #endif /* CHECKSUM_GEN_IP */ #endif /* CHECKSUM_GEN_IP_INLINE */ } else { /* IP header already included in p */ if (p->len < IP_HLEN) { 8024eb0: 68fb ldr r3, [r7, #12] 8024eb2: 895b ldrh r3, [r3, #10] 8024eb4: 2b13 cmp r3, #19 8024eb6: d802 bhi.n 8024ebe 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; 8024eb8: f06f 0301 mvn.w r3, #1 8024ebc: e020 b.n 8024f00 } iphdr = (struct ip_hdr *)p->payload; 8024ebe: 68fb ldr r3, [r7, #12] 8024ec0: 685b ldr r3, [r3, #4] 8024ec2: 61fb str r3, [r7, #28] ip4_addr_copy(dest_addr, iphdr->dest); 8024ec4: 69fb ldr r3, [r7, #28] 8024ec6: 691b ldr r3, [r3, #16] 8024ec8: 617b str r3, [r7, #20] dest = &dest_addr; 8024eca: f107 0314 add.w r3, r7, #20 8024ece: 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)) { 8024ed0: 6b3b ldr r3, [r7, #48] @ 0x30 8024ed2: 8d1b ldrh r3, [r3, #40] @ 0x28 8024ed4: 2b00 cmp r3, #0 8024ed6: d00c beq.n 8024ef2 8024ed8: 68fb ldr r3, [r7, #12] 8024eda: 891a ldrh r2, [r3, #8] 8024edc: 6b3b ldr r3, [r7, #48] @ 0x30 8024ede: 8d1b ldrh r3, [r3, #40] @ 0x28 8024ee0: 429a cmp r2, r3 8024ee2: d906 bls.n 8024ef2 return ip4_frag(p, netif, dest); 8024ee4: 687a ldr r2, [r7, #4] 8024ee6: 6b39 ldr r1, [r7, #48] @ 0x30 8024ee8: 68f8 ldr r0, [r7, #12] 8024eea: f000 ff21 bl 8025d30 8024eee: 4603 mov r3, r0 8024ef0: e006 b.n 8024f00 } #endif /* IP_FRAG */ LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n")); return netif->output(netif, p, dest); 8024ef2: 6b3b ldr r3, [r7, #48] @ 0x30 8024ef4: 695b ldr r3, [r3, #20] 8024ef6: 687a ldr r2, [r7, #4] 8024ef8: 68f9 ldr r1, [r7, #12] 8024efa: 6b38 ldr r0, [r7, #48] @ 0x30 8024efc: 4798 blx r3 8024efe: 4603 mov r3, r0 } 8024f00: 4618 mov r0, r3 8024f02: 3720 adds r7, #32 8024f04: 46bd mov sp, r7 8024f06: bd80 pop {r7, pc} 8024f08: 08030564 .word 0x08030564 8024f0c: 08030598 .word 0x08030598 8024f10: 080305a4 .word 0x080305a4 8024f14: 080305cc .word 0x080305cc 8024f18: 2402b012 .word 0x2402b012 8024f1c: 08030c10 .word 0x08030c10 08024f20 : * @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) { 8024f20: b480 push {r7} 8024f22: b085 sub sp, #20 8024f24: af00 add r7, sp, #0 8024f26: 6078 str r0, [r7, #4] 8024f28: 6039 str r1, [r7, #0] ip4_addr_t ipaddr; ip4_addr_set_u32(&ipaddr, addr); 8024f2a: 687b ldr r3, [r7, #4] 8024f2c: 60fb str r3, [r7, #12] /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || 8024f2e: 687b ldr r3, [r7, #4] 8024f30: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8024f34: d002 beq.n 8024f3c 8024f36: 687b ldr r3, [r7, #4] 8024f38: 2b00 cmp r3, #0 8024f3a: d101 bne.n 8024f40 (addr == IPADDR_ANY)) { return 1; 8024f3c: 2301 movs r3, #1 8024f3e: e02a b.n 8024f96 /* no broadcast support on this network interface? */ } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { 8024f40: 683b ldr r3, [r7, #0] 8024f42: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8024f46: f003 0302 and.w r3, r3, #2 8024f4a: 2b00 cmp r3, #0 8024f4c: d101 bne.n 8024f52 /* the given address cannot be a broadcast address * nor can we check against any broadcast addresses */ return 0; 8024f4e: 2300 movs r3, #0 8024f50: e021 b.n 8024f96 /* address matches network interface address exactly? => no broadcast */ } else if (addr == ip4_addr_get_u32(netif_ip4_addr(netif))) { 8024f52: 683b ldr r3, [r7, #0] 8024f54: 3304 adds r3, #4 8024f56: 681b ldr r3, [r3, #0] 8024f58: 687a ldr r2, [r7, #4] 8024f5a: 429a cmp r2, r3 8024f5c: d101 bne.n 8024f62 return 0; 8024f5e: 2300 movs r3, #0 8024f60: e019 b.n 8024f96 /* on the same (sub) network... */ } else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) 8024f62: 68fa ldr r2, [r7, #12] 8024f64: 683b ldr r3, [r7, #0] 8024f66: 3304 adds r3, #4 8024f68: 681b ldr r3, [r3, #0] 8024f6a: 405a eors r2, r3 8024f6c: 683b ldr r3, [r7, #0] 8024f6e: 3308 adds r3, #8 8024f70: 681b ldr r3, [r3, #0] 8024f72: 4013 ands r3, r2 8024f74: 2b00 cmp r3, #0 8024f76: d10d bne.n 8024f94 /* ...and host identifier bits are all ones? =>... */ && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == 8024f78: 683b ldr r3, [r7, #0] 8024f7a: 3308 adds r3, #8 8024f7c: 681b ldr r3, [r3, #0] 8024f7e: 43da mvns r2, r3 8024f80: 687b ldr r3, [r7, #4] 8024f82: 401a ands r2, r3 (IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) { 8024f84: 683b ldr r3, [r7, #0] 8024f86: 3308 adds r3, #8 8024f88: 681b ldr r3, [r3, #0] 8024f8a: 43db mvns r3, r3 && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == 8024f8c: 429a cmp r2, r3 8024f8e: d101 bne.n 8024f94 /* => network broadcast address */ return 1; 8024f90: 2301 movs r3, #1 8024f92: e000 b.n 8024f96 } else { return 0; 8024f94: 2300 movs r3, #0 } } 8024f96: 4618 mov r0, r3 8024f98: 3714 adds r7, #20 8024f9a: 46bd mov sp, r7 8024f9c: f85d 7b04 ldr.w r7, [sp], #4 8024fa0: 4770 bx lr 08024fa2 : * @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) { 8024fa2: b580 push {r7, lr} 8024fa4: b084 sub sp, #16 8024fa6: af00 add r7, sp, #0 8024fa8: 6078 str r0, [r7, #4] ip4_addr_t val; if (ip4addr_aton(cp, &val)) { 8024faa: f107 030c add.w r3, r7, #12 8024fae: 4619 mov r1, r3 8024fb0: 6878 ldr r0, [r7, #4] 8024fb2: f000 f80b bl 8024fcc 8024fb6: 4603 mov r3, r0 8024fb8: 2b00 cmp r3, #0 8024fba: d001 beq.n 8024fc0 return ip4_addr_get_u32(&val); 8024fbc: 68fb ldr r3, [r7, #12] 8024fbe: e001 b.n 8024fc4 } return (IPADDR_NONE); 8024fc0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8024fc4: 4618 mov r0, r3 8024fc6: 3710 adds r7, #16 8024fc8: 46bd mov sp, r7 8024fca: bd80 pop {r7, pc} 08024fcc : * @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) { 8024fcc: b580 push {r7, lr} 8024fce: b08a sub sp, #40 @ 0x28 8024fd0: af00 add r7, sp, #0 8024fd2: 6078 str r0, [r7, #4] 8024fd4: 6039 str r1, [r7, #0] u32_t val; u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; 8024fd6: f107 030c add.w r3, r7, #12 8024fda: 61fb str r3, [r7, #28] c = *cp; 8024fdc: 687b ldr r3, [r7, #4] 8024fde: 781b ldrb r3, [r3, #0] 8024fe0: 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)) { 8024fe4: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8024fe8: 3301 adds r3, #1 8024fea: 4a89 ldr r2, [pc, #548] @ (8025210 ) 8024fec: 4413 add r3, r2 8024fee: 781b ldrb r3, [r3, #0] 8024ff0: f003 0304 and.w r3, r3, #4 8024ff4: 2b00 cmp r3, #0 8024ff6: d101 bne.n 8024ffc return 0; 8024ff8: 2300 movs r3, #0 8024ffa: e105 b.n 8025208 } val = 0; 8024ffc: 2300 movs r3, #0 8024ffe: 627b str r3, [r7, #36] @ 0x24 base = 10; 8025000: 230a movs r3, #10 8025002: f887 3023 strb.w r3, [r7, #35] @ 0x23 if (c == '0') { 8025006: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 802500a: 2b30 cmp r3, #48 @ 0x30 802500c: d11c bne.n 8025048 c = *++cp; 802500e: 687b ldr r3, [r7, #4] 8025010: 3301 adds r3, #1 8025012: 607b str r3, [r7, #4] 8025014: 687b ldr r3, [r7, #4] 8025016: 781b ldrb r3, [r3, #0] 8025018: f887 3022 strb.w r3, [r7, #34] @ 0x22 if (c == 'x' || c == 'X') { 802501c: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025020: 2b78 cmp r3, #120 @ 0x78 8025022: d003 beq.n 802502c 8025024: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025028: 2b58 cmp r3, #88 @ 0x58 802502a: d10a bne.n 8025042 base = 16; 802502c: 2310 movs r3, #16 802502e: f887 3023 strb.w r3, [r7, #35] @ 0x23 c = *++cp; 8025032: 687b ldr r3, [r7, #4] 8025034: 3301 adds r3, #1 8025036: 607b str r3, [r7, #4] 8025038: 687b ldr r3, [r7, #4] 802503a: 781b ldrb r3, [r3, #0] 802503c: f887 3022 strb.w r3, [r7, #34] @ 0x22 8025040: e002 b.n 8025048 } else { base = 8; 8025042: 2308 movs r3, #8 8025044: f887 3023 strb.w r3, [r7, #35] @ 0x23 } } for (;;) { if (lwip_isdigit(c)) { 8025048: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 802504c: 3301 adds r3, #1 802504e: 4a70 ldr r2, [pc, #448] @ (8025210 ) 8025050: 4413 add r3, r2 8025052: 781b ldrb r3, [r3, #0] 8025054: f003 0304 and.w r3, r3, #4 8025058: 2b00 cmp r3, #0 802505a: d011 beq.n 8025080 val = (val * base) + (u32_t)(c - '0'); 802505c: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8025060: 6a7a ldr r2, [r7, #36] @ 0x24 8025062: fb03 f202 mul.w r2, r3, r2 8025066: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 802506a: 4413 add r3, r2 802506c: 3b30 subs r3, #48 @ 0x30 802506e: 627b str r3, [r7, #36] @ 0x24 c = *++cp; 8025070: 687b ldr r3, [r7, #4] 8025072: 3301 adds r3, #1 8025074: 607b str r3, [r7, #4] 8025076: 687b ldr r3, [r7, #4] 8025078: 781b ldrb r3, [r3, #0] 802507a: f887 3022 strb.w r3, [r7, #34] @ 0x22 802507e: e7e3 b.n 8025048 } else if (base == 16 && lwip_isxdigit(c)) { 8025080: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8025084: 2b10 cmp r3, #16 8025086: d127 bne.n 80250d8 8025088: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 802508c: 3301 adds r3, #1 802508e: 4a60 ldr r2, [pc, #384] @ (8025210 ) 8025090: 4413 add r3, r2 8025092: 781b ldrb r3, [r3, #0] 8025094: f003 0344 and.w r3, r3, #68 @ 0x44 8025098: 2b00 cmp r3, #0 802509a: d01d beq.n 80250d8 val = (val << 4) | (u32_t)(c + 10 - (lwip_islower(c) ? 'a' : 'A')); 802509c: 6a7b ldr r3, [r7, #36] @ 0x24 802509e: 011b lsls r3, r3, #4 80250a0: f897 2022 ldrb.w r2, [r7, #34] @ 0x22 80250a4: f102 010a add.w r1, r2, #10 80250a8: f897 2022 ldrb.w r2, [r7, #34] @ 0x22 80250ac: 3201 adds r2, #1 80250ae: 4858 ldr r0, [pc, #352] @ (8025210 ) 80250b0: 4402 add r2, r0 80250b2: 7812 ldrb r2, [r2, #0] 80250b4: f002 0203 and.w r2, r2, #3 80250b8: 2a02 cmp r2, #2 80250ba: d101 bne.n 80250c0 80250bc: 2261 movs r2, #97 @ 0x61 80250be: e000 b.n 80250c2 80250c0: 2241 movs r2, #65 @ 0x41 80250c2: 1a8a subs r2, r1, r2 80250c4: 4313 orrs r3, r2 80250c6: 627b str r3, [r7, #36] @ 0x24 c = *++cp; 80250c8: 687b ldr r3, [r7, #4] 80250ca: 3301 adds r3, #1 80250cc: 607b str r3, [r7, #4] 80250ce: 687b ldr r3, [r7, #4] 80250d0: 781b ldrb r3, [r3, #0] 80250d2: f887 3022 strb.w r3, [r7, #34] @ 0x22 if (lwip_isdigit(c)) { 80250d6: e7b7 b.n 8025048 } else { break; } } if (c == '.') { 80250d8: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 80250dc: 2b2e cmp r3, #46 @ 0x2e 80250de: d114 bne.n 802510a * 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) { 80250e0: f107 030c add.w r3, r7, #12 80250e4: 330c adds r3, #12 80250e6: 69fa ldr r2, [r7, #28] 80250e8: 429a cmp r2, r3 80250ea: d301 bcc.n 80250f0 return 0; 80250ec: 2300 movs r3, #0 80250ee: e08b b.n 8025208 } *pp++ = val; 80250f0: 69fb ldr r3, [r7, #28] 80250f2: 1d1a adds r2, r3, #4 80250f4: 61fa str r2, [r7, #28] 80250f6: 6a7a ldr r2, [r7, #36] @ 0x24 80250f8: 601a str r2, [r3, #0] c = *++cp; 80250fa: 687b ldr r3, [r7, #4] 80250fc: 3301 adds r3, #1 80250fe: 607b str r3, [r7, #4] 8025100: 687b ldr r3, [r7, #4] 8025102: 781b ldrb r3, [r3, #0] 8025104: f887 3022 strb.w r3, [r7, #34] @ 0x22 if (!lwip_isdigit(c)) { 8025108: e76c b.n 8024fe4 } else { break; 802510a: bf00 nop } } /* * Check for trailing characters. */ if (c != '\0' && !lwip_isspace(c)) { 802510c: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025110: 2b00 cmp r3, #0 8025112: d00b beq.n 802512c 8025114: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025118: 3301 adds r3, #1 802511a: 4a3d ldr r2, [pc, #244] @ (8025210 ) 802511c: 4413 add r3, r2 802511e: 781b ldrb r3, [r3, #0] 8025120: f003 0308 and.w r3, r3, #8 8025124: 2b00 cmp r3, #0 8025126: d101 bne.n 802512c return 0; 8025128: 2300 movs r3, #0 802512a: e06d b.n 8025208 } /* * Concoct the address according to * the number of parts specified. */ switch (pp - parts + 1) { 802512c: f107 030c add.w r3, r7, #12 8025130: 69fa ldr r2, [r7, #28] 8025132: 1ad3 subs r3, r2, r3 8025134: 109b asrs r3, r3, #2 8025136: 3301 adds r3, #1 8025138: 2b04 cmp r3, #4 802513a: d853 bhi.n 80251e4 802513c: a201 add r2, pc, #4 @ (adr r2, 8025144 ) 802513e: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8025142: bf00 nop 8025144: 08025159 .word 0x08025159 8025148: 080251f3 .word 0x080251f3 802514c: 0802515d .word 0x0802515d 8025150: 0802517f .word 0x0802517f 8025154: 080251ad .word 0x080251ad case 0: return 0; /* initial nondigit */ 8025158: 2300 movs r3, #0 802515a: e055 b.n 8025208 case 1: /* a -- 32 bits */ break; case 2: /* a.b -- 8.24 bits */ if (val > 0xffffffUL) { 802515c: 6a7b ldr r3, [r7, #36] @ 0x24 802515e: f1b3 7f80 cmp.w r3, #16777216 @ 0x1000000 8025162: d301 bcc.n 8025168 return 0; 8025164: 2300 movs r3, #0 8025166: e04f b.n 8025208 } if (parts[0] > 0xff) { 8025168: 68fb ldr r3, [r7, #12] 802516a: 2bff cmp r3, #255 @ 0xff 802516c: d901 bls.n 8025172 return 0; 802516e: 2300 movs r3, #0 8025170: e04a b.n 8025208 } val |= parts[0] << 24; 8025172: 68fb ldr r3, [r7, #12] 8025174: 061b lsls r3, r3, #24 8025176: 6a7a ldr r2, [r7, #36] @ 0x24 8025178: 4313 orrs r3, r2 802517a: 627b str r3, [r7, #36] @ 0x24 break; 802517c: e03a b.n 80251f4 case 3: /* a.b.c -- 8.8.16 bits */ if (val > 0xffff) { 802517e: 6a7b ldr r3, [r7, #36] @ 0x24 8025180: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8025184: d301 bcc.n 802518a return 0; 8025186: 2300 movs r3, #0 8025188: e03e b.n 8025208 } if ((parts[0] > 0xff) || (parts[1] > 0xff)) { 802518a: 68fb ldr r3, [r7, #12] 802518c: 2bff cmp r3, #255 @ 0xff 802518e: d802 bhi.n 8025196 8025190: 693b ldr r3, [r7, #16] 8025192: 2bff cmp r3, #255 @ 0xff 8025194: d901 bls.n 802519a return 0; 8025196: 2300 movs r3, #0 8025198: e036 b.n 8025208 } val |= (parts[0] << 24) | (parts[1] << 16); 802519a: 68fb ldr r3, [r7, #12] 802519c: 061a lsls r2, r3, #24 802519e: 693b ldr r3, [r7, #16] 80251a0: 041b lsls r3, r3, #16 80251a2: 4313 orrs r3, r2 80251a4: 6a7a ldr r2, [r7, #36] @ 0x24 80251a6: 4313 orrs r3, r2 80251a8: 627b str r3, [r7, #36] @ 0x24 break; 80251aa: e023 b.n 80251f4 case 4: /* a.b.c.d -- 8.8.8.8 bits */ if (val > 0xff) { 80251ac: 6a7b ldr r3, [r7, #36] @ 0x24 80251ae: 2bff cmp r3, #255 @ 0xff 80251b0: d901 bls.n 80251b6 return 0; 80251b2: 2300 movs r3, #0 80251b4: e028 b.n 8025208 } if ((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff)) { 80251b6: 68fb ldr r3, [r7, #12] 80251b8: 2bff cmp r3, #255 @ 0xff 80251ba: d805 bhi.n 80251c8 80251bc: 693b ldr r3, [r7, #16] 80251be: 2bff cmp r3, #255 @ 0xff 80251c0: d802 bhi.n 80251c8 80251c2: 697b ldr r3, [r7, #20] 80251c4: 2bff cmp r3, #255 @ 0xff 80251c6: d901 bls.n 80251cc return 0; 80251c8: 2300 movs r3, #0 80251ca: e01d b.n 8025208 } val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); 80251cc: 68fb ldr r3, [r7, #12] 80251ce: 061a lsls r2, r3, #24 80251d0: 693b ldr r3, [r7, #16] 80251d2: 041b lsls r3, r3, #16 80251d4: 431a orrs r2, r3 80251d6: 697b ldr r3, [r7, #20] 80251d8: 021b lsls r3, r3, #8 80251da: 4313 orrs r3, r2 80251dc: 6a7a ldr r2, [r7, #36] @ 0x24 80251de: 4313 orrs r3, r2 80251e0: 627b str r3, [r7, #36] @ 0x24 break; 80251e2: e007 b.n 80251f4 default: LWIP_ASSERT("unhandled", 0); 80251e4: 4b0b ldr r3, [pc, #44] @ (8025214 ) 80251e6: 22f9 movs r2, #249 @ 0xf9 80251e8: 490b ldr r1, [pc, #44] @ (8025218 ) 80251ea: 480c ldr r0, [pc, #48] @ (802521c ) 80251ec: f004 fbee bl 80299cc break; 80251f0: e000 b.n 80251f4 break; 80251f2: bf00 nop } if (addr) { 80251f4: 683b ldr r3, [r7, #0] 80251f6: 2b00 cmp r3, #0 80251f8: d005 beq.n 8025206 ip4_addr_set_u32(addr, lwip_htonl(val)); 80251fa: 6a78 ldr r0, [r7, #36] @ 0x24 80251fc: f7f3 fca1 bl 8018b42 8025200: 4602 mov r2, r0 8025202: 683b ldr r3, [r7, #0] 8025204: 601a str r2, [r3, #0] } return 1; 8025206: 2301 movs r3, #1 } 8025208: 4618 mov r0, r3 802520a: 3728 adds r7, #40 @ 0x28 802520c: 46bd mov sp, r7 802520e: bd80 pop {r7, pc} 8025210: 08030ce8 .word 0x08030ce8 8025214: 080305fc .word 0x080305fc 8025218: 08030638 .word 0x08030638 802521c: 08030644 .word 0x08030644 08025220 : * @return pointer to a global static (!) buffer that holds the ASCII * representation of addr */ char * ip4addr_ntoa(const ip4_addr_t *addr) { 8025220: b580 push {r7, lr} 8025222: b082 sub sp, #8 8025224: af00 add r7, sp, #0 8025226: 6078 str r0, [r7, #4] static char str[IP4ADDR_STRLEN_MAX]; return ip4addr_ntoa_r(addr, str, IP4ADDR_STRLEN_MAX); 8025228: 2210 movs r2, #16 802522a: 4904 ldr r1, [pc, #16] @ (802523c ) 802522c: 6878 ldr r0, [r7, #4] 802522e: f000 f807 bl 8025240 8025232: 4603 mov r3, r0 } 8025234: 4618 mov r0, r3 8025236: 3708 adds r7, #8 8025238: 46bd mov sp, r7 802523a: bd80 pop {r7, pc} 802523c: 2402b014 .word 0x2402b014 08025240 : * @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) { 8025240: b480 push {r7} 8025242: b08d sub sp, #52 @ 0x34 8025244: af00 add r7, sp, #0 8025246: 60f8 str r0, [r7, #12] 8025248: 60b9 str r1, [r7, #8] 802524a: 607a str r2, [r7, #4] char *rp; u8_t *ap; u8_t rem; u8_t n; u8_t i; int len = 0; 802524c: 2300 movs r3, #0 802524e: 623b str r3, [r7, #32] s_addr = ip4_addr_get_u32(addr); 8025250: 68fb ldr r3, [r7, #12] 8025252: 681b ldr r3, [r3, #0] 8025254: 61bb str r3, [r7, #24] rp = buf; 8025256: 68bb ldr r3, [r7, #8] 8025258: 62fb str r3, [r7, #44] @ 0x2c ap = (u8_t *)&s_addr; 802525a: f107 0318 add.w r3, r7, #24 802525e: 62bb str r3, [r7, #40] @ 0x28 for (n = 0; n < 4; n++) { 8025260: 2300 movs r3, #0 8025262: f887 3027 strb.w r3, [r7, #39] @ 0x27 8025266: e058 b.n 802531a i = 0; 8025268: 2300 movs r3, #0 802526a: f887 3026 strb.w r3, [r7, #38] @ 0x26 do { rem = *ap % (u8_t)10; 802526e: 6abb ldr r3, [r7, #40] @ 0x28 8025270: 781a ldrb r2, [r3, #0] 8025272: 4b32 ldr r3, [pc, #200] @ (802533c ) 8025274: fba3 1302 umull r1, r3, r3, r2 8025278: 08d9 lsrs r1, r3, #3 802527a: 460b mov r3, r1 802527c: 009b lsls r3, r3, #2 802527e: 440b add r3, r1 8025280: 005b lsls r3, r3, #1 8025282: 1ad3 subs r3, r2, r3 8025284: 77fb strb r3, [r7, #31] *ap /= (u8_t)10; 8025286: 6abb ldr r3, [r7, #40] @ 0x28 8025288: 781b ldrb r3, [r3, #0] 802528a: 4a2c ldr r2, [pc, #176] @ (802533c ) 802528c: fba2 2303 umull r2, r3, r2, r3 8025290: 08db lsrs r3, r3, #3 8025292: b2da uxtb r2, r3 8025294: 6abb ldr r3, [r7, #40] @ 0x28 8025296: 701a strb r2, [r3, #0] inv[i++] = (char)('0' + rem); 8025298: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 802529c: 1c5a adds r2, r3, #1 802529e: f887 2026 strb.w r2, [r7, #38] @ 0x26 80252a2: 4619 mov r1, r3 80252a4: 7ffb ldrb r3, [r7, #31] 80252a6: 3330 adds r3, #48 @ 0x30 80252a8: b2da uxtb r2, r3 80252aa: f101 0330 add.w r3, r1, #48 @ 0x30 80252ae: 443b add r3, r7 80252b0: f803 2c1c strb.w r2, [r3, #-28] } while (*ap); 80252b4: 6abb ldr r3, [r7, #40] @ 0x28 80252b6: 781b ldrb r3, [r3, #0] 80252b8: 2b00 cmp r3, #0 80252ba: d1d8 bne.n 802526e while (i--) { 80252bc: e011 b.n 80252e2 if (len++ >= buflen) { 80252be: 6a3b ldr r3, [r7, #32] 80252c0: 1c5a adds r2, r3, #1 80252c2: 623a str r2, [r7, #32] 80252c4: 687a ldr r2, [r7, #4] 80252c6: 429a cmp r2, r3 80252c8: dc01 bgt.n 80252ce return NULL; 80252ca: 2300 movs r3, #0 80252cc: e030 b.n 8025330 } *rp++ = inv[i]; 80252ce: f897 2026 ldrb.w r2, [r7, #38] @ 0x26 80252d2: 6afb ldr r3, [r7, #44] @ 0x2c 80252d4: 1c59 adds r1, r3, #1 80252d6: 62f9 str r1, [r7, #44] @ 0x2c 80252d8: 3230 adds r2, #48 @ 0x30 80252da: 443a add r2, r7 80252dc: f812 2c1c ldrb.w r2, [r2, #-28] 80252e0: 701a strb r2, [r3, #0] while (i--) { 80252e2: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 80252e6: 1e5a subs r2, r3, #1 80252e8: f887 2026 strb.w r2, [r7, #38] @ 0x26 80252ec: 2b00 cmp r3, #0 80252ee: d1e6 bne.n 80252be } if (len++ >= buflen) { 80252f0: 6a3b ldr r3, [r7, #32] 80252f2: 1c5a adds r2, r3, #1 80252f4: 623a str r2, [r7, #32] 80252f6: 687a ldr r2, [r7, #4] 80252f8: 429a cmp r2, r3 80252fa: dc01 bgt.n 8025300 return NULL; 80252fc: 2300 movs r3, #0 80252fe: e017 b.n 8025330 } *rp++ = '.'; 8025300: 6afb ldr r3, [r7, #44] @ 0x2c 8025302: 1c5a adds r2, r3, #1 8025304: 62fa str r2, [r7, #44] @ 0x2c 8025306: 222e movs r2, #46 @ 0x2e 8025308: 701a strb r2, [r3, #0] ap++; 802530a: 6abb ldr r3, [r7, #40] @ 0x28 802530c: 3301 adds r3, #1 802530e: 62bb str r3, [r7, #40] @ 0x28 for (n = 0; n < 4; n++) { 8025310: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 8025314: 3301 adds r3, #1 8025316: f887 3027 strb.w r3, [r7, #39] @ 0x27 802531a: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 802531e: 2b03 cmp r3, #3 8025320: d9a2 bls.n 8025268 } *--rp = 0; 8025322: 6afb ldr r3, [r7, #44] @ 0x2c 8025324: 3b01 subs r3, #1 8025326: 62fb str r3, [r7, #44] @ 0x2c 8025328: 6afb ldr r3, [r7, #44] @ 0x2c 802532a: 2200 movs r2, #0 802532c: 701a strb r2, [r3, #0] return buf; 802532e: 68bb ldr r3, [r7, #8] } 8025330: 4618 mov r0, r3 8025332: 3734 adds r7, #52 @ 0x34 8025334: 46bd mov sp, r7 8025336: f85d 7b04 ldr.w r7, [sp], #4 802533a: 4770 bx lr 802533c: cccccccd .word 0xcccccccd 08025340 : * * Should be called every 1000 msec (defined by IP_TMR_INTERVAL). */ void ip_reass_tmr(void) { 8025340: b580 push {r7, lr} 8025342: b084 sub sp, #16 8025344: af00 add r7, sp, #0 struct ip_reassdata *r, *prev = NULL; 8025346: 2300 movs r3, #0 8025348: 60bb str r3, [r7, #8] r = reassdatagrams; 802534a: 4b12 ldr r3, [pc, #72] @ (8025394 ) 802534c: 681b ldr r3, [r3, #0] 802534e: 60fb str r3, [r7, #12] while (r != NULL) { 8025350: e018 b.n 8025384 /* Decrement the timer. Once it reaches 0, * clean up the incomplete fragment assembly */ if (r->timer > 0) { 8025352: 68fb ldr r3, [r7, #12] 8025354: 7fdb ldrb r3, [r3, #31] 8025356: 2b00 cmp r3, #0 8025358: d00b beq.n 8025372 r->timer--; 802535a: 68fb ldr r3, [r7, #12] 802535c: 7fdb ldrb r3, [r3, #31] 802535e: 3b01 subs r3, #1 8025360: b2da uxtb r2, r3 8025362: 68fb ldr r3, [r7, #12] 8025364: 77da strb r2, [r3, #31] LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n", (u16_t)r->timer)); prev = r; 8025366: 68fb ldr r3, [r7, #12] 8025368: 60bb str r3, [r7, #8] r = r->next; 802536a: 68fb ldr r3, [r7, #12] 802536c: 681b ldr r3, [r3, #0] 802536e: 60fb str r3, [r7, #12] 8025370: e008 b.n 8025384 } else { /* reassembly timed out */ struct ip_reassdata *tmp; LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer timed out\n")); tmp = r; 8025372: 68fb ldr r3, [r7, #12] 8025374: 607b str r3, [r7, #4] /* get the next pointer before freeing */ r = r->next; 8025376: 68fb ldr r3, [r7, #12] 8025378: 681b ldr r3, [r3, #0] 802537a: 60fb str r3, [r7, #12] /* free the helper struct and all enqueued pbufs */ ip_reass_free_complete_datagram(tmp, prev); 802537c: 68b9 ldr r1, [r7, #8] 802537e: 6878 ldr r0, [r7, #4] 8025380: f000 f80a bl 8025398 while (r != NULL) { 8025384: 68fb ldr r3, [r7, #12] 8025386: 2b00 cmp r3, #0 8025388: d1e3 bne.n 8025352 } } } 802538a: bf00 nop 802538c: bf00 nop 802538e: 3710 adds r7, #16 8025390: 46bd mov sp, r7 8025392: bd80 pop {r7, pc} 8025394: 2402b024 .word 0x2402b024 08025398 : * @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) { 8025398: b580 push {r7, lr} 802539a: b088 sub sp, #32 802539c: af00 add r7, sp, #0 802539e: 6078 str r0, [r7, #4] 80253a0: 6039 str r1, [r7, #0] u16_t pbufs_freed = 0; 80253a2: 2300 movs r3, #0 80253a4: 83fb strh r3, [r7, #30] u16_t clen; struct pbuf *p; struct ip_reass_helper *iprh; LWIP_ASSERT("prev != ipr", prev != ipr); 80253a6: 683a ldr r2, [r7, #0] 80253a8: 687b ldr r3, [r7, #4] 80253aa: 429a cmp r2, r3 80253ac: d105 bne.n 80253ba 80253ae: 4b45 ldr r3, [pc, #276] @ (80254c4 ) 80253b0: 22ab movs r2, #171 @ 0xab 80253b2: 4945 ldr r1, [pc, #276] @ (80254c8 ) 80253b4: 4845 ldr r0, [pc, #276] @ (80254cc ) 80253b6: f004 fb09 bl 80299cc if (prev != NULL) { 80253ba: 683b ldr r3, [r7, #0] 80253bc: 2b00 cmp r3, #0 80253be: d00a beq.n 80253d6 LWIP_ASSERT("prev->next == ipr", prev->next == ipr); 80253c0: 683b ldr r3, [r7, #0] 80253c2: 681b ldr r3, [r3, #0] 80253c4: 687a ldr r2, [r7, #4] 80253c6: 429a cmp r2, r3 80253c8: d005 beq.n 80253d6 80253ca: 4b3e ldr r3, [pc, #248] @ (80254c4 ) 80253cc: 22ad movs r2, #173 @ 0xad 80253ce: 4940 ldr r1, [pc, #256] @ (80254d0 ) 80253d0: 483e ldr r0, [pc, #248] @ (80254cc ) 80253d2: f004 fafb bl 80299cc } MIB2_STATS_INC(mib2.ipreasmfails); #if LWIP_ICMP iprh = (struct ip_reass_helper *)ipr->p->payload; 80253d6: 687b ldr r3, [r7, #4] 80253d8: 685b ldr r3, [r3, #4] 80253da: 685b ldr r3, [r3, #4] 80253dc: 617b str r3, [r7, #20] if (iprh->start == 0) { 80253de: 697b ldr r3, [r7, #20] 80253e0: 889b ldrh r3, [r3, #4] 80253e2: b29b uxth r3, r3 80253e4: 2b00 cmp r3, #0 80253e6: d12a bne.n 802543e /* The first fragment was received, send ICMP time exceeded. */ /* First, de-queue the first pbuf from r->p. */ p = ipr->p; 80253e8: 687b ldr r3, [r7, #4] 80253ea: 685b ldr r3, [r3, #4] 80253ec: 61bb str r3, [r7, #24] ipr->p = iprh->next_pbuf; 80253ee: 697b ldr r3, [r7, #20] 80253f0: 681a ldr r2, [r3, #0] 80253f2: 687b ldr r3, [r7, #4] 80253f4: 605a str r2, [r3, #4] /* Then, copy the original header into it. */ SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN); 80253f6: 69bb ldr r3, [r7, #24] 80253f8: 6858 ldr r0, [r3, #4] 80253fa: 687b ldr r3, [r7, #4] 80253fc: 3308 adds r3, #8 80253fe: 2214 movs r2, #20 8025400: 4619 mov r1, r3 8025402: f004 fd6c bl 8029ede icmp_time_exceeded(p, ICMP_TE_FRAG); 8025406: 2101 movs r1, #1 8025408: 69b8 ldr r0, [r7, #24] 802540a: f7ff fa4d bl 80248a8 clen = pbuf_clen(p); 802540e: 69b8 ldr r0, [r7, #24] 8025410: f7f5 f8f2 bl 801a5f8 8025414: 4603 mov r3, r0 8025416: 827b strh r3, [r7, #18] LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); 8025418: 8bfa ldrh r2, [r7, #30] 802541a: 8a7b ldrh r3, [r7, #18] 802541c: 4413 add r3, r2 802541e: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8025422: db05 blt.n 8025430 8025424: 4b27 ldr r3, [pc, #156] @ (80254c4 ) 8025426: 22bc movs r2, #188 @ 0xbc 8025428: 492a ldr r1, [pc, #168] @ (80254d4 ) 802542a: 4828 ldr r0, [pc, #160] @ (80254cc ) 802542c: f004 face bl 80299cc pbufs_freed = (u16_t)(pbufs_freed + clen); 8025430: 8bfa ldrh r2, [r7, #30] 8025432: 8a7b ldrh r3, [r7, #18] 8025434: 4413 add r3, r2 8025436: 83fb strh r3, [r7, #30] pbuf_free(p); 8025438: 69b8 ldr r0, [r7, #24] 802543a: f7f5 f84f bl 801a4dc } #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; 802543e: 687b ldr r3, [r7, #4] 8025440: 685b ldr r3, [r3, #4] 8025442: 61bb str r3, [r7, #24] while (p != NULL) { 8025444: e01f b.n 8025486 struct pbuf *pcur; iprh = (struct ip_reass_helper *)p->payload; 8025446: 69bb ldr r3, [r7, #24] 8025448: 685b ldr r3, [r3, #4] 802544a: 617b str r3, [r7, #20] pcur = p; 802544c: 69bb ldr r3, [r7, #24] 802544e: 60fb str r3, [r7, #12] /* get the next pointer before freeing */ p = iprh->next_pbuf; 8025450: 697b ldr r3, [r7, #20] 8025452: 681b ldr r3, [r3, #0] 8025454: 61bb str r3, [r7, #24] clen = pbuf_clen(pcur); 8025456: 68f8 ldr r0, [r7, #12] 8025458: f7f5 f8ce bl 801a5f8 802545c: 4603 mov r3, r0 802545e: 827b strh r3, [r7, #18] LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); 8025460: 8bfa ldrh r2, [r7, #30] 8025462: 8a7b ldrh r3, [r7, #18] 8025464: 4413 add r3, r2 8025466: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 802546a: db05 blt.n 8025478 802546c: 4b15 ldr r3, [pc, #84] @ (80254c4 ) 802546e: 22cc movs r2, #204 @ 0xcc 8025470: 4918 ldr r1, [pc, #96] @ (80254d4 ) 8025472: 4816 ldr r0, [pc, #88] @ (80254cc ) 8025474: f004 faaa bl 80299cc pbufs_freed = (u16_t)(pbufs_freed + clen); 8025478: 8bfa ldrh r2, [r7, #30] 802547a: 8a7b ldrh r3, [r7, #18] 802547c: 4413 add r3, r2 802547e: 83fb strh r3, [r7, #30] pbuf_free(pcur); 8025480: 68f8 ldr r0, [r7, #12] 8025482: f7f5 f82b bl 801a4dc while (p != NULL) { 8025486: 69bb ldr r3, [r7, #24] 8025488: 2b00 cmp r3, #0 802548a: d1dc bne.n 8025446 } /* Then, unchain the struct ip_reassdata from the list and free it. */ ip_reass_dequeue_datagram(ipr, prev); 802548c: 6839 ldr r1, [r7, #0] 802548e: 6878 ldr r0, [r7, #4] 8025490: f000 f8c2 bl 8025618 LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed); 8025494: 4b10 ldr r3, [pc, #64] @ (80254d8 ) 8025496: 881b ldrh r3, [r3, #0] 8025498: 8bfa ldrh r2, [r7, #30] 802549a: 429a cmp r2, r3 802549c: d905 bls.n 80254aa 802549e: 4b09 ldr r3, [pc, #36] @ (80254c4 ) 80254a0: 22d2 movs r2, #210 @ 0xd2 80254a2: 490e ldr r1, [pc, #56] @ (80254dc ) 80254a4: 4809 ldr r0, [pc, #36] @ (80254cc ) 80254a6: f004 fa91 bl 80299cc ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed); 80254aa: 4b0b ldr r3, [pc, #44] @ (80254d8 ) 80254ac: 881a ldrh r2, [r3, #0] 80254ae: 8bfb ldrh r3, [r7, #30] 80254b0: 1ad3 subs r3, r2, r3 80254b2: b29a uxth r2, r3 80254b4: 4b08 ldr r3, [pc, #32] @ (80254d8 ) 80254b6: 801a strh r2, [r3, #0] return pbufs_freed; 80254b8: 8bfb ldrh r3, [r7, #30] } 80254ba: 4618 mov r0, r3 80254bc: 3720 adds r7, #32 80254be: 46bd mov sp, r7 80254c0: bd80 pop {r7, pc} 80254c2: bf00 nop 80254c4: 0803066c .word 0x0803066c 80254c8: 080306a8 .word 0x080306a8 80254cc: 080306b4 .word 0x080306b4 80254d0: 080306dc .word 0x080306dc 80254d4: 080306f0 .word 0x080306f0 80254d8: 2402b028 .word 0x2402b028 80254dc: 08030710 .word 0x08030710 080254e0 : * (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) { 80254e0: b580 push {r7, lr} 80254e2: b08a sub sp, #40 @ 0x28 80254e4: af00 add r7, sp, #0 80254e6: 6078 str r0, [r7, #4] 80254e8: 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; 80254ea: 2300 movs r3, #0 80254ec: 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; 80254ee: 2300 movs r3, #0 80254f0: 623b str r3, [r7, #32] prev = NULL; 80254f2: 2300 movs r3, #0 80254f4: 61fb str r3, [r7, #28] oldest_prev = NULL; 80254f6: 2300 movs r3, #0 80254f8: 61bb str r3, [r7, #24] other_datagrams = 0; 80254fa: 2300 movs r3, #0 80254fc: 613b str r3, [r7, #16] r = reassdatagrams; 80254fe: 4b28 ldr r3, [pc, #160] @ (80255a0 ) 8025500: 681b ldr r3, [r3, #0] 8025502: 627b str r3, [r7, #36] @ 0x24 while (r != NULL) { 8025504: e030 b.n 8025568 if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) { 8025506: 6a7b ldr r3, [r7, #36] @ 0x24 8025508: 695a ldr r2, [r3, #20] 802550a: 687b ldr r3, [r7, #4] 802550c: 68db ldr r3, [r3, #12] 802550e: 429a cmp r2, r3 8025510: d10c bne.n 802552c 8025512: 6a7b ldr r3, [r7, #36] @ 0x24 8025514: 699a ldr r2, [r3, #24] 8025516: 687b ldr r3, [r7, #4] 8025518: 691b ldr r3, [r3, #16] 802551a: 429a cmp r2, r3 802551c: d106 bne.n 802552c 802551e: 6a7b ldr r3, [r7, #36] @ 0x24 8025520: 899a ldrh r2, [r3, #12] 8025522: 687b ldr r3, [r7, #4] 8025524: 889b ldrh r3, [r3, #4] 8025526: b29b uxth r3, r3 8025528: 429a cmp r2, r3 802552a: d014 beq.n 8025556 /* Not the same datagram as fraghdr */ other_datagrams++; 802552c: 693b ldr r3, [r7, #16] 802552e: 3301 adds r3, #1 8025530: 613b str r3, [r7, #16] if (oldest == NULL) { 8025532: 6a3b ldr r3, [r7, #32] 8025534: 2b00 cmp r3, #0 8025536: d104 bne.n 8025542 oldest = r; 8025538: 6a7b ldr r3, [r7, #36] @ 0x24 802553a: 623b str r3, [r7, #32] oldest_prev = prev; 802553c: 69fb ldr r3, [r7, #28] 802553e: 61bb str r3, [r7, #24] 8025540: e009 b.n 8025556 } else if (r->timer <= oldest->timer) { 8025542: 6a7b ldr r3, [r7, #36] @ 0x24 8025544: 7fda ldrb r2, [r3, #31] 8025546: 6a3b ldr r3, [r7, #32] 8025548: 7fdb ldrb r3, [r3, #31] 802554a: 429a cmp r2, r3 802554c: d803 bhi.n 8025556 /* older than the previous oldest */ oldest = r; 802554e: 6a7b ldr r3, [r7, #36] @ 0x24 8025550: 623b str r3, [r7, #32] oldest_prev = prev; 8025552: 69fb ldr r3, [r7, #28] 8025554: 61bb str r3, [r7, #24] } } if (r->next != NULL) { 8025556: 6a7b ldr r3, [r7, #36] @ 0x24 8025558: 681b ldr r3, [r3, #0] 802555a: 2b00 cmp r3, #0 802555c: d001 beq.n 8025562 prev = r; 802555e: 6a7b ldr r3, [r7, #36] @ 0x24 8025560: 61fb str r3, [r7, #28] } r = r->next; 8025562: 6a7b ldr r3, [r7, #36] @ 0x24 8025564: 681b ldr r3, [r3, #0] 8025566: 627b str r3, [r7, #36] @ 0x24 while (r != NULL) { 8025568: 6a7b ldr r3, [r7, #36] @ 0x24 802556a: 2b00 cmp r3, #0 802556c: d1cb bne.n 8025506 } if (oldest != NULL) { 802556e: 6a3b ldr r3, [r7, #32] 8025570: 2b00 cmp r3, #0 8025572: d008 beq.n 8025586 pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev); 8025574: 69b9 ldr r1, [r7, #24] 8025576: 6a38 ldr r0, [r7, #32] 8025578: f7ff ff0e bl 8025398 802557c: 60f8 str r0, [r7, #12] pbufs_freed += pbufs_freed_current; 802557e: 697a ldr r2, [r7, #20] 8025580: 68fb ldr r3, [r7, #12] 8025582: 4413 add r3, r2 8025584: 617b str r3, [r7, #20] } } while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1)); 8025586: 697a ldr r2, [r7, #20] 8025588: 683b ldr r3, [r7, #0] 802558a: 429a cmp r2, r3 802558c: da02 bge.n 8025594 802558e: 693b ldr r3, [r7, #16] 8025590: 2b01 cmp r3, #1 8025592: dcac bgt.n 80254ee return pbufs_freed; 8025594: 697b ldr r3, [r7, #20] } 8025596: 4618 mov r0, r3 8025598: 3728 adds r7, #40 @ 0x28 802559a: 46bd mov sp, r7 802559c: bd80 pop {r7, pc} 802559e: bf00 nop 80255a0: 2402b024 .word 0x2402b024 080255a4 : * @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) { 80255a4: b580 push {r7, lr} 80255a6: b084 sub sp, #16 80255a8: af00 add r7, sp, #0 80255aa: 6078 str r0, [r7, #4] 80255ac: 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); 80255ae: 2004 movs r0, #4 80255b0: f7f4 f830 bl 8019614 80255b4: 60f8 str r0, [r7, #12] if (ipr == NULL) { 80255b6: 68fb ldr r3, [r7, #12] 80255b8: 2b00 cmp r3, #0 80255ba: d110 bne.n 80255de #if IP_REASS_FREE_OLDEST if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) { 80255bc: 6839 ldr r1, [r7, #0] 80255be: 6878 ldr r0, [r7, #4] 80255c0: f7ff ff8e bl 80254e0 80255c4: 4602 mov r2, r0 80255c6: 683b ldr r3, [r7, #0] 80255c8: 4293 cmp r3, r2 80255ca: dc03 bgt.n 80255d4 ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA); 80255cc: 2004 movs r0, #4 80255ce: f7f4 f821 bl 8019614 80255d2: 60f8 str r0, [r7, #12] } if (ipr == NULL) 80255d4: 68fb ldr r3, [r7, #12] 80255d6: 2b00 cmp r3, #0 80255d8: d101 bne.n 80255de #endif /* IP_REASS_FREE_OLDEST */ { IPFRAG_STATS_INC(ip_frag.memerr); LWIP_DEBUGF(IP_REASS_DEBUG, ("Failed to alloc reassdata struct\n")); return NULL; 80255da: 2300 movs r3, #0 80255dc: e016 b.n 802560c } } memset(ipr, 0, sizeof(struct ip_reassdata)); 80255de: 2220 movs r2, #32 80255e0: 2100 movs r1, #0 80255e2: 68f8 ldr r0, [r7, #12] 80255e4: f004 fb84 bl 8029cf0 ipr->timer = IP_REASS_MAXAGE; 80255e8: 68fb ldr r3, [r7, #12] 80255ea: 220f movs r2, #15 80255ec: 77da strb r2, [r3, #31] /* enqueue the new structure to the front of the list */ ipr->next = reassdatagrams; 80255ee: 4b09 ldr r3, [pc, #36] @ (8025614 ) 80255f0: 681a ldr r2, [r3, #0] 80255f2: 68fb ldr r3, [r7, #12] 80255f4: 601a str r2, [r3, #0] reassdatagrams = ipr; 80255f6: 4a07 ldr r2, [pc, #28] @ (8025614 ) 80255f8: 68fb ldr r3, [r7, #12] 80255fa: 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); 80255fc: 68fb ldr r3, [r7, #12] 80255fe: 3308 adds r3, #8 8025600: 2214 movs r2, #20 8025602: 6879 ldr r1, [r7, #4] 8025604: 4618 mov r0, r3 8025606: f004 fc6a bl 8029ede return ipr; 802560a: 68fb ldr r3, [r7, #12] } 802560c: 4618 mov r0, r3 802560e: 3710 adds r7, #16 8025610: 46bd mov sp, r7 8025612: bd80 pop {r7, pc} 8025614: 2402b024 .word 0x2402b024 08025618 : * 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) { 8025618: b580 push {r7, lr} 802561a: b082 sub sp, #8 802561c: af00 add r7, sp, #0 802561e: 6078 str r0, [r7, #4] 8025620: 6039 str r1, [r7, #0] /* dequeue the reass struct */ if (reassdatagrams == ipr) { 8025622: 4b10 ldr r3, [pc, #64] @ (8025664 ) 8025624: 681b ldr r3, [r3, #0] 8025626: 687a ldr r2, [r7, #4] 8025628: 429a cmp r2, r3 802562a: d104 bne.n 8025636 /* it was the first in the list */ reassdatagrams = ipr->next; 802562c: 687b ldr r3, [r7, #4] 802562e: 681b ldr r3, [r3, #0] 8025630: 4a0c ldr r2, [pc, #48] @ (8025664 ) 8025632: 6013 str r3, [r2, #0] 8025634: e00d b.n 8025652 } else { /* it wasn't the first, so it must have a valid 'prev' */ LWIP_ASSERT("sanity check linked list", prev != NULL); 8025636: 683b ldr r3, [r7, #0] 8025638: 2b00 cmp r3, #0 802563a: d106 bne.n 802564a 802563c: 4b0a ldr r3, [pc, #40] @ (8025668 ) 802563e: f240 1245 movw r2, #325 @ 0x145 8025642: 490a ldr r1, [pc, #40] @ (802566c ) 8025644: 480a ldr r0, [pc, #40] @ (8025670 ) 8025646: f004 f9c1 bl 80299cc prev->next = ipr->next; 802564a: 687b ldr r3, [r7, #4] 802564c: 681a ldr r2, [r3, #0] 802564e: 683b ldr r3, [r7, #0] 8025650: 601a str r2, [r3, #0] } /* now we can free the ip_reassdata struct */ memp_free(MEMP_REASSDATA, ipr); 8025652: 6879 ldr r1, [r7, #4] 8025654: 2004 movs r0, #4 8025656: f7f4 f853 bl 8019700 } 802565a: bf00 nop 802565c: 3708 adds r7, #8 802565e: 46bd mov sp, r7 8025660: bd80 pop {r7, pc} 8025662: bf00 nop 8025664: 2402b024 .word 0x2402b024 8025668: 0803066c .word 0x0803066c 802566c: 08030734 .word 0x08030734 8025670: 080306b4 .word 0x080306b4 08025674 : * @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) { 8025674: b580 push {r7, lr} 8025676: b08c sub sp, #48 @ 0x30 8025678: af00 add r7, sp, #0 802567a: 60f8 str r0, [r7, #12] 802567c: 60b9 str r1, [r7, #8] 802567e: 607a str r2, [r7, #4] struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev = NULL; 8025680: 2300 movs r3, #0 8025682: 62bb str r3, [r7, #40] @ 0x28 struct pbuf *q; u16_t offset, len; u8_t hlen; struct ip_hdr *fraghdr; int valid = 1; 8025684: 2301 movs r3, #1 8025686: 623b str r3, [r7, #32] /* Extract length and fragment offset from current fragment */ fraghdr = (struct ip_hdr *)new_p->payload; 8025688: 68bb ldr r3, [r7, #8] 802568a: 685b ldr r3, [r3, #4] 802568c: 61fb str r3, [r7, #28] len = lwip_ntohs(IPH_LEN(fraghdr)); 802568e: 69fb ldr r3, [r7, #28] 8025690: 885b ldrh r3, [r3, #2] 8025692: b29b uxth r3, r3 8025694: 4618 mov r0, r3 8025696: f7f3 fa3f bl 8018b18 802569a: 4603 mov r3, r0 802569c: 837b strh r3, [r7, #26] hlen = IPH_HL_BYTES(fraghdr); 802569e: 69fb ldr r3, [r7, #28] 80256a0: 781b ldrb r3, [r3, #0] 80256a2: f003 030f and.w r3, r3, #15 80256a6: b2db uxtb r3, r3 80256a8: 009b lsls r3, r3, #2 80256aa: 767b strb r3, [r7, #25] if (hlen > len) { 80256ac: 7e7b ldrb r3, [r7, #25] 80256ae: b29b uxth r3, r3 80256b0: 8b7a ldrh r2, [r7, #26] 80256b2: 429a cmp r2, r3 80256b4: d202 bcs.n 80256bc /* invalid datagram */ return IP_REASS_VALIDATE_PBUF_DROPPED; 80256b6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80256ba: e135 b.n 8025928 } len = (u16_t)(len - hlen); 80256bc: 7e7b ldrb r3, [r7, #25] 80256be: b29b uxth r3, r3 80256c0: 8b7a ldrh r2, [r7, #26] 80256c2: 1ad3 subs r3, r2, r3 80256c4: 837b strh r3, [r7, #26] offset = IPH_OFFSET_BYTES(fraghdr); 80256c6: 69fb ldr r3, [r7, #28] 80256c8: 88db ldrh r3, [r3, #6] 80256ca: b29b uxth r3, r3 80256cc: 4618 mov r0, r3 80256ce: f7f3 fa23 bl 8018b18 80256d2: 4603 mov r3, r0 80256d4: f3c3 030c ubfx r3, r3, #0, #13 80256d8: b29b uxth r3, r3 80256da: 00db lsls r3, r3, #3 80256dc: 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; 80256de: 68bb ldr r3, [r7, #8] 80256e0: 685b ldr r3, [r3, #4] 80256e2: 62fb str r3, [r7, #44] @ 0x2c iprh->next_pbuf = NULL; 80256e4: 6afb ldr r3, [r7, #44] @ 0x2c 80256e6: 2200 movs r2, #0 80256e8: 701a strb r2, [r3, #0] 80256ea: 2200 movs r2, #0 80256ec: 705a strb r2, [r3, #1] 80256ee: 2200 movs r2, #0 80256f0: 709a strb r2, [r3, #2] 80256f2: 2200 movs r2, #0 80256f4: 70da strb r2, [r3, #3] iprh->start = offset; 80256f6: 6afb ldr r3, [r7, #44] @ 0x2c 80256f8: 8afa ldrh r2, [r7, #22] 80256fa: 809a strh r2, [r3, #4] iprh->end = (u16_t)(offset + len); 80256fc: 8afa ldrh r2, [r7, #22] 80256fe: 8b7b ldrh r3, [r7, #26] 8025700: 4413 add r3, r2 8025702: b29a uxth r2, r3 8025704: 6afb ldr r3, [r7, #44] @ 0x2c 8025706: 80da strh r2, [r3, #6] if (iprh->end < offset) { 8025708: 6afb ldr r3, [r7, #44] @ 0x2c 802570a: 88db ldrh r3, [r3, #6] 802570c: b29b uxth r3, r3 802570e: 8afa ldrh r2, [r7, #22] 8025710: 429a cmp r2, r3 8025712: d902 bls.n 802571a /* u16_t overflow, cannot handle this */ return IP_REASS_VALIDATE_PBUF_DROPPED; 8025714: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8025718: e106 b.n 8025928 } /* 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;) { 802571a: 68fb ldr r3, [r7, #12] 802571c: 685b ldr r3, [r3, #4] 802571e: 627b str r3, [r7, #36] @ 0x24 8025720: e068 b.n 80257f4 iprh_tmp = (struct ip_reass_helper *)q->payload; 8025722: 6a7b ldr r3, [r7, #36] @ 0x24 8025724: 685b ldr r3, [r3, #4] 8025726: 613b str r3, [r7, #16] if (iprh->start < iprh_tmp->start) { 8025728: 6afb ldr r3, [r7, #44] @ 0x2c 802572a: 889b ldrh r3, [r3, #4] 802572c: b29a uxth r2, r3 802572e: 693b ldr r3, [r7, #16] 8025730: 889b ldrh r3, [r3, #4] 8025732: b29b uxth r3, r3 8025734: 429a cmp r2, r3 8025736: d235 bcs.n 80257a4 /* the new pbuf should be inserted before this */ iprh->next_pbuf = q; 8025738: 6afb ldr r3, [r7, #44] @ 0x2c 802573a: 6a7a ldr r2, [r7, #36] @ 0x24 802573c: 601a str r2, [r3, #0] if (iprh_prev != NULL) { 802573e: 6abb ldr r3, [r7, #40] @ 0x28 8025740: 2b00 cmp r3, #0 8025742: d020 beq.n 8025786 /* not the fragment with the lowest offset */ #if IP_REASS_CHECK_OVERLAP if ((iprh->start < iprh_prev->end) || (iprh->end > iprh_tmp->start)) { 8025744: 6afb ldr r3, [r7, #44] @ 0x2c 8025746: 889b ldrh r3, [r3, #4] 8025748: b29a uxth r2, r3 802574a: 6abb ldr r3, [r7, #40] @ 0x28 802574c: 88db ldrh r3, [r3, #6] 802574e: b29b uxth r3, r3 8025750: 429a cmp r2, r3 8025752: d307 bcc.n 8025764 8025754: 6afb ldr r3, [r7, #44] @ 0x2c 8025756: 88db ldrh r3, [r3, #6] 8025758: b29a uxth r2, r3 802575a: 693b ldr r3, [r7, #16] 802575c: 889b ldrh r3, [r3, #4] 802575e: b29b uxth r3, r3 8025760: 429a cmp r2, r3 8025762: d902 bls.n 802576a /* fragment overlaps with previous or following, throw away */ return IP_REASS_VALIDATE_PBUF_DROPPED; 8025764: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8025768: e0de b.n 8025928 } #endif /* IP_REASS_CHECK_OVERLAP */ iprh_prev->next_pbuf = new_p; 802576a: 6abb ldr r3, [r7, #40] @ 0x28 802576c: 68ba ldr r2, [r7, #8] 802576e: 601a str r2, [r3, #0] if (iprh_prev->end != iprh->start) { 8025770: 6abb ldr r3, [r7, #40] @ 0x28 8025772: 88db ldrh r3, [r3, #6] 8025774: b29a uxth r2, r3 8025776: 6afb ldr r3, [r7, #44] @ 0x2c 8025778: 889b ldrh r3, [r3, #4] 802577a: b29b uxth r3, r3 802577c: 429a cmp r2, r3 802577e: d03d beq.n 80257fc /* There is a fragment missing between the current * and the previous fragment */ valid = 0; 8025780: 2300 movs r3, #0 8025782: 623b str r3, [r7, #32] } #endif /* IP_REASS_CHECK_OVERLAP */ /* fragment with the lowest offset */ ipr->p = new_p; } break; 8025784: e03a b.n 80257fc if (iprh->end > iprh_tmp->start) { 8025786: 6afb ldr r3, [r7, #44] @ 0x2c 8025788: 88db ldrh r3, [r3, #6] 802578a: b29a uxth r2, r3 802578c: 693b ldr r3, [r7, #16] 802578e: 889b ldrh r3, [r3, #4] 8025790: b29b uxth r3, r3 8025792: 429a cmp r2, r3 8025794: d902 bls.n 802579c return IP_REASS_VALIDATE_PBUF_DROPPED; 8025796: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802579a: e0c5 b.n 8025928 ipr->p = new_p; 802579c: 68fb ldr r3, [r7, #12] 802579e: 68ba ldr r2, [r7, #8] 80257a0: 605a str r2, [r3, #4] break; 80257a2: e02b b.n 80257fc } else if (iprh->start == iprh_tmp->start) { 80257a4: 6afb ldr r3, [r7, #44] @ 0x2c 80257a6: 889b ldrh r3, [r3, #4] 80257a8: b29a uxth r2, r3 80257aa: 693b ldr r3, [r7, #16] 80257ac: 889b ldrh r3, [r3, #4] 80257ae: b29b uxth r3, r3 80257b0: 429a cmp r2, r3 80257b2: d102 bne.n 80257ba /* received the same datagram twice: no need to keep the datagram */ return IP_REASS_VALIDATE_PBUF_DROPPED; 80257b4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80257b8: e0b6 b.n 8025928 #if IP_REASS_CHECK_OVERLAP } else if (iprh->start < iprh_tmp->end) { 80257ba: 6afb ldr r3, [r7, #44] @ 0x2c 80257bc: 889b ldrh r3, [r3, #4] 80257be: b29a uxth r2, r3 80257c0: 693b ldr r3, [r7, #16] 80257c2: 88db ldrh r3, [r3, #6] 80257c4: b29b uxth r3, r3 80257c6: 429a cmp r2, r3 80257c8: d202 bcs.n 80257d0 /* overlap: no need to keep the new datagram */ return IP_REASS_VALIDATE_PBUF_DROPPED; 80257ca: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80257ce: e0ab b.n 8025928 #endif /* IP_REASS_CHECK_OVERLAP */ } else { /* Check if the fragments received so far have no holes. */ if (iprh_prev != NULL) { 80257d0: 6abb ldr r3, [r7, #40] @ 0x28 80257d2: 2b00 cmp r3, #0 80257d4: d009 beq.n 80257ea if (iprh_prev->end != iprh_tmp->start) { 80257d6: 6abb ldr r3, [r7, #40] @ 0x28 80257d8: 88db ldrh r3, [r3, #6] 80257da: b29a uxth r2, r3 80257dc: 693b ldr r3, [r7, #16] 80257de: 889b ldrh r3, [r3, #4] 80257e0: b29b uxth r3, r3 80257e2: 429a cmp r2, r3 80257e4: d001 beq.n 80257ea /* There is a fragment missing between the current * and the previous fragment */ valid = 0; 80257e6: 2300 movs r3, #0 80257e8: 623b str r3, [r7, #32] } } } q = iprh_tmp->next_pbuf; 80257ea: 693b ldr r3, [r7, #16] 80257ec: 681b ldr r3, [r3, #0] 80257ee: 627b str r3, [r7, #36] @ 0x24 iprh_prev = iprh_tmp; 80257f0: 693b ldr r3, [r7, #16] 80257f2: 62bb str r3, [r7, #40] @ 0x28 for (q = ipr->p; q != NULL;) { 80257f4: 6a7b ldr r3, [r7, #36] @ 0x24 80257f6: 2b00 cmp r3, #0 80257f8: d193 bne.n 8025722 80257fa: e000 b.n 80257fe break; 80257fc: bf00 nop } /* If q is NULL, then we made it to the end of the list. Determine what to do now */ if (q == NULL) { 80257fe: 6a7b ldr r3, [r7, #36] @ 0x24 8025800: 2b00 cmp r3, #0 8025802: d12d bne.n 8025860 if (iprh_prev != NULL) { 8025804: 6abb ldr r3, [r7, #40] @ 0x28 8025806: 2b00 cmp r3, #0 8025808: d01c beq.n 8025844 /* 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); 802580a: 6abb ldr r3, [r7, #40] @ 0x28 802580c: 88db ldrh r3, [r3, #6] 802580e: b29a uxth r2, r3 8025810: 6afb ldr r3, [r7, #44] @ 0x2c 8025812: 889b ldrh r3, [r3, #4] 8025814: b29b uxth r3, r3 8025816: 429a cmp r2, r3 8025818: d906 bls.n 8025828 802581a: 4b45 ldr r3, [pc, #276] @ (8025930 ) 802581c: f44f 72db mov.w r2, #438 @ 0x1b6 8025820: 4944 ldr r1, [pc, #272] @ (8025934 ) 8025822: 4845 ldr r0, [pc, #276] @ (8025938 ) 8025824: f004 f8d2 bl 80299cc #endif /* IP_REASS_CHECK_OVERLAP */ iprh_prev->next_pbuf = new_p; 8025828: 6abb ldr r3, [r7, #40] @ 0x28 802582a: 68ba ldr r2, [r7, #8] 802582c: 601a str r2, [r3, #0] if (iprh_prev->end != iprh->start) { 802582e: 6abb ldr r3, [r7, #40] @ 0x28 8025830: 88db ldrh r3, [r3, #6] 8025832: b29a uxth r2, r3 8025834: 6afb ldr r3, [r7, #44] @ 0x2c 8025836: 889b ldrh r3, [r3, #4] 8025838: b29b uxth r3, r3 802583a: 429a cmp r2, r3 802583c: d010 beq.n 8025860 valid = 0; 802583e: 2300 movs r3, #0 8025840: 623b str r3, [r7, #32] 8025842: e00d b.n 8025860 } } else { #if IP_REASS_CHECK_OVERLAP LWIP_ASSERT("no previous fragment, this must be the first fragment!", 8025844: 68fb ldr r3, [r7, #12] 8025846: 685b ldr r3, [r3, #4] 8025848: 2b00 cmp r3, #0 802584a: d006 beq.n 802585a 802584c: 4b38 ldr r3, [pc, #224] @ (8025930 ) 802584e: f44f 72df mov.w r2, #446 @ 0x1be 8025852: 493a ldr r1, [pc, #232] @ (802593c ) 8025854: 4838 ldr r0, [pc, #224] @ (8025938 ) 8025856: f004 f8b9 bl 80299cc ipr->p == NULL); #endif /* IP_REASS_CHECK_OVERLAP */ /* this is the first fragment we ever received for this ip datagram */ ipr->p = new_p; 802585a: 68fb ldr r3, [r7, #12] 802585c: 68ba ldr r2, [r7, #8] 802585e: 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)) { 8025860: 687b ldr r3, [r7, #4] 8025862: 2b00 cmp r3, #0 8025864: d105 bne.n 8025872 8025866: 68fb ldr r3, [r7, #12] 8025868: 7f9b ldrb r3, [r3, #30] 802586a: f003 0301 and.w r3, r3, #1 802586e: 2b00 cmp r3, #0 8025870: d059 beq.n 8025926 /* and had no holes so far */ if (valid) { 8025872: 6a3b ldr r3, [r7, #32] 8025874: 2b00 cmp r3, #0 8025876: d04f beq.n 8025918 /* 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)) { 8025878: 68fb ldr r3, [r7, #12] 802587a: 685b ldr r3, [r3, #4] 802587c: 2b00 cmp r3, #0 802587e: d006 beq.n 802588e 8025880: 68fb ldr r3, [r7, #12] 8025882: 685b ldr r3, [r3, #4] 8025884: 685b ldr r3, [r3, #4] 8025886: 889b ldrh r3, [r3, #4] 8025888: b29b uxth r3, r3 802588a: 2b00 cmp r3, #0 802588c: d002 beq.n 8025894 valid = 0; 802588e: 2300 movs r3, #0 8025890: 623b str r3, [r7, #32] 8025892: e041 b.n 8025918 } else { /* and check that there are no holes after this datagram */ iprh_prev = iprh; 8025894: 6afb ldr r3, [r7, #44] @ 0x2c 8025896: 62bb str r3, [r7, #40] @ 0x28 q = iprh->next_pbuf; 8025898: 6afb ldr r3, [r7, #44] @ 0x2c 802589a: 681b ldr r3, [r3, #0] 802589c: 627b str r3, [r7, #36] @ 0x24 while (q != NULL) { 802589e: e012 b.n 80258c6 iprh = (struct ip_reass_helper *)q->payload; 80258a0: 6a7b ldr r3, [r7, #36] @ 0x24 80258a2: 685b ldr r3, [r3, #4] 80258a4: 62fb str r3, [r7, #44] @ 0x2c if (iprh_prev->end != iprh->start) { 80258a6: 6abb ldr r3, [r7, #40] @ 0x28 80258a8: 88db ldrh r3, [r3, #6] 80258aa: b29a uxth r2, r3 80258ac: 6afb ldr r3, [r7, #44] @ 0x2c 80258ae: 889b ldrh r3, [r3, #4] 80258b0: b29b uxth r3, r3 80258b2: 429a cmp r2, r3 80258b4: d002 beq.n 80258bc valid = 0; 80258b6: 2300 movs r3, #0 80258b8: 623b str r3, [r7, #32] break; 80258ba: e007 b.n 80258cc } iprh_prev = iprh; 80258bc: 6afb ldr r3, [r7, #44] @ 0x2c 80258be: 62bb str r3, [r7, #40] @ 0x28 q = iprh->next_pbuf; 80258c0: 6afb ldr r3, [r7, #44] @ 0x2c 80258c2: 681b ldr r3, [r3, #0] 80258c4: 627b str r3, [r7, #36] @ 0x24 while (q != NULL) { 80258c6: 6a7b ldr r3, [r7, #36] @ 0x24 80258c8: 2b00 cmp r3, #0 80258ca: d1e9 bne.n 80258a0 } /* if still valid, all fragments are received * (because to the MF==0 already arrived */ if (valid) { 80258cc: 6a3b ldr r3, [r7, #32] 80258ce: 2b00 cmp r3, #0 80258d0: d022 beq.n 8025918 LWIP_ASSERT("sanity check", ipr->p != NULL); 80258d2: 68fb ldr r3, [r7, #12] 80258d4: 685b ldr r3, [r3, #4] 80258d6: 2b00 cmp r3, #0 80258d8: d106 bne.n 80258e8 80258da: 4b15 ldr r3, [pc, #84] @ (8025930 ) 80258dc: f240 12df movw r2, #479 @ 0x1df 80258e0: 4917 ldr r1, [pc, #92] @ (8025940 ) 80258e2: 4815 ldr r0, [pc, #84] @ (8025938 ) 80258e4: f004 f872 bl 80299cc LWIP_ASSERT("sanity check", 80258e8: 68fb ldr r3, [r7, #12] 80258ea: 685b ldr r3, [r3, #4] 80258ec: 685b ldr r3, [r3, #4] 80258ee: 6afa ldr r2, [r7, #44] @ 0x2c 80258f0: 429a cmp r2, r3 80258f2: d106 bne.n 8025902 80258f4: 4b0e ldr r3, [pc, #56] @ (8025930 ) 80258f6: f44f 72f0 mov.w r2, #480 @ 0x1e0 80258fa: 4911 ldr r1, [pc, #68] @ (8025940 ) 80258fc: 480e ldr r0, [pc, #56] @ (8025938 ) 80258fe: f004 f865 bl 80299cc ((struct ip_reass_helper *)ipr->p->payload) != iprh); LWIP_ASSERT("validate_datagram:next_pbuf!=NULL", 8025902: 6afb ldr r3, [r7, #44] @ 0x2c 8025904: 681b ldr r3, [r3, #0] 8025906: 2b00 cmp r3, #0 8025908: d006 beq.n 8025918 802590a: 4b09 ldr r3, [pc, #36] @ (8025930 ) 802590c: f44f 72f1 mov.w r2, #482 @ 0x1e2 8025910: 490c ldr r1, [pc, #48] @ (8025944 ) 8025912: 4809 ldr r0, [pc, #36] @ (8025938 ) 8025914: f004 f85a bl 80299cc } } /* 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; 8025918: 6a3b ldr r3, [r7, #32] 802591a: 2b00 cmp r3, #0 802591c: bf14 ite ne 802591e: 2301 movne r3, #1 8025920: 2300 moveq r3, #0 8025922: b2db uxtb r3, r3 8025924: e000 b.n 8025928 } /* If we come here, not all fragments were received, yet! */ return IP_REASS_VALIDATE_PBUF_QUEUED; /* not yet valid! */ 8025926: 2300 movs r3, #0 } 8025928: 4618 mov r0, r3 802592a: 3730 adds r7, #48 @ 0x30 802592c: 46bd mov sp, r7 802592e: bd80 pop {r7, pc} 8025930: 0803066c .word 0x0803066c 8025934: 08030750 .word 0x08030750 8025938: 080306b4 .word 0x080306b4 802593c: 08030770 .word 0x08030770 8025940: 080307a8 .word 0x080307a8 8025944: 080307b8 .word 0x080307b8 08025948 : * @param p points to a pbuf chain of the fragment * @return NULL if reassembly is incomplete, ? otherwise */ struct pbuf * ip4_reass(struct pbuf *p) { 8025948: b580 push {r7, lr} 802594a: b08e sub sp, #56 @ 0x38 802594c: af00 add r7, sp, #0 802594e: 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; 8025950: 687b ldr r3, [r7, #4] 8025952: 685b ldr r3, [r3, #4] 8025954: 62bb str r3, [r7, #40] @ 0x28 if (IPH_HL_BYTES(fraghdr) != IP_HLEN) { 8025956: 6abb ldr r3, [r7, #40] @ 0x28 8025958: 781b ldrb r3, [r3, #0] 802595a: f003 030f and.w r3, r3, #15 802595e: b2db uxtb r3, r3 8025960: 009b lsls r3, r3, #2 8025962: b2db uxtb r3, r3 8025964: 2b14 cmp r3, #20 8025966: f040 8171 bne.w 8025c4c 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); 802596a: 6abb ldr r3, [r7, #40] @ 0x28 802596c: 88db ldrh r3, [r3, #6] 802596e: b29b uxth r3, r3 8025970: 4618 mov r0, r3 8025972: f7f3 f8d1 bl 8018b18 8025976: 4603 mov r3, r0 8025978: f3c3 030c ubfx r3, r3, #0, #13 802597c: b29b uxth r3, r3 802597e: 00db lsls r3, r3, #3 8025980: 84fb strh r3, [r7, #38] @ 0x26 len = lwip_ntohs(IPH_LEN(fraghdr)); 8025982: 6abb ldr r3, [r7, #40] @ 0x28 8025984: 885b ldrh r3, [r3, #2] 8025986: b29b uxth r3, r3 8025988: 4618 mov r0, r3 802598a: f7f3 f8c5 bl 8018b18 802598e: 4603 mov r3, r0 8025990: 84bb strh r3, [r7, #36] @ 0x24 hlen = IPH_HL_BYTES(fraghdr); 8025992: 6abb ldr r3, [r7, #40] @ 0x28 8025994: 781b ldrb r3, [r3, #0] 8025996: f003 030f and.w r3, r3, #15 802599a: b2db uxtb r3, r3 802599c: 009b lsls r3, r3, #2 802599e: f887 3023 strb.w r3, [r7, #35] @ 0x23 if (hlen > len) { 80259a2: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 80259a6: b29b uxth r3, r3 80259a8: 8cba ldrh r2, [r7, #36] @ 0x24 80259aa: 429a cmp r2, r3 80259ac: f0c0 8150 bcc.w 8025c50 /* invalid datagram */ goto nullreturn; } len = (u16_t)(len - hlen); 80259b0: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 80259b4: b29b uxth r3, r3 80259b6: 8cba ldrh r2, [r7, #36] @ 0x24 80259b8: 1ad3 subs r3, r2, r3 80259ba: 84bb strh r3, [r7, #36] @ 0x24 /* Check if we are allowed to enqueue more datagrams. */ clen = pbuf_clen(p); 80259bc: 6878 ldr r0, [r7, #4] 80259be: f7f4 fe1b bl 801a5f8 80259c2: 4603 mov r3, r0 80259c4: 843b strh r3, [r7, #32] if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) { 80259c6: 4b8c ldr r3, [pc, #560] @ (8025bf8 ) 80259c8: 881b ldrh r3, [r3, #0] 80259ca: 461a mov r2, r3 80259cc: 8c3b ldrh r3, [r7, #32] 80259ce: 4413 add r3, r2 80259d0: 2b0a cmp r3, #10 80259d2: dd10 ble.n 80259f6 #if IP_REASS_FREE_OLDEST if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || 80259d4: 8c3b ldrh r3, [r7, #32] 80259d6: 4619 mov r1, r3 80259d8: 6ab8 ldr r0, [r7, #40] @ 0x28 80259da: f7ff fd81 bl 80254e0 80259de: 4603 mov r3, r0 80259e0: 2b00 cmp r3, #0 80259e2: f000 8137 beq.w 8025c54 ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS)) 80259e6: 4b84 ldr r3, [pc, #528] @ (8025bf8 ) 80259e8: 881b ldrh r3, [r3, #0] 80259ea: 461a mov r2, r3 80259ec: 8c3b ldrh r3, [r7, #32] 80259ee: 4413 add r3, r2 if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || 80259f0: 2b0a cmp r3, #10 80259f2: f300 812f bgt.w 8025c54 } } /* 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) { 80259f6: 4b81 ldr r3, [pc, #516] @ (8025bfc ) 80259f8: 681b ldr r3, [r3, #0] 80259fa: 633b str r3, [r7, #48] @ 0x30 80259fc: e015 b.n 8025a2a /* 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)) { 80259fe: 6b3b ldr r3, [r7, #48] @ 0x30 8025a00: 695a ldr r2, [r3, #20] 8025a02: 6abb ldr r3, [r7, #40] @ 0x28 8025a04: 68db ldr r3, [r3, #12] 8025a06: 429a cmp r2, r3 8025a08: d10c bne.n 8025a24 8025a0a: 6b3b ldr r3, [r7, #48] @ 0x30 8025a0c: 699a ldr r2, [r3, #24] 8025a0e: 6abb ldr r3, [r7, #40] @ 0x28 8025a10: 691b ldr r3, [r3, #16] 8025a12: 429a cmp r2, r3 8025a14: d106 bne.n 8025a24 8025a16: 6b3b ldr r3, [r7, #48] @ 0x30 8025a18: 899a ldrh r2, [r3, #12] 8025a1a: 6abb ldr r3, [r7, #40] @ 0x28 8025a1c: 889b ldrh r3, [r3, #4] 8025a1e: b29b uxth r3, r3 8025a20: 429a cmp r2, r3 8025a22: d006 beq.n 8025a32 for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) { 8025a24: 6b3b ldr r3, [r7, #48] @ 0x30 8025a26: 681b ldr r3, [r3, #0] 8025a28: 633b str r3, [r7, #48] @ 0x30 8025a2a: 6b3b ldr r3, [r7, #48] @ 0x30 8025a2c: 2b00 cmp r3, #0 8025a2e: d1e6 bne.n 80259fe 8025a30: e000 b.n 8025a34 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; 8025a32: bf00 nop } } if (ipr == NULL) { 8025a34: 6b3b ldr r3, [r7, #48] @ 0x30 8025a36: 2b00 cmp r3, #0 8025a38: d109 bne.n 8025a4e /* Enqueue a new datagram into the datagram queue */ ipr = ip_reass_enqueue_new_datagram(fraghdr, clen); 8025a3a: 8c3b ldrh r3, [r7, #32] 8025a3c: 4619 mov r1, r3 8025a3e: 6ab8 ldr r0, [r7, #40] @ 0x28 8025a40: f7ff fdb0 bl 80255a4 8025a44: 6338 str r0, [r7, #48] @ 0x30 /* Bail if unable to enqueue */ if (ipr == NULL) { 8025a46: 6b3b ldr r3, [r7, #48] @ 0x30 8025a48: 2b00 cmp r3, #0 8025a4a: d11c bne.n 8025a86 goto nullreturn; 8025a4c: e105 b.n 8025c5a } } else { if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && 8025a4e: 6abb ldr r3, [r7, #40] @ 0x28 8025a50: 88db ldrh r3, [r3, #6] 8025a52: b29b uxth r3, r3 8025a54: 4618 mov r0, r3 8025a56: f7f3 f85f bl 8018b18 8025a5a: 4603 mov r3, r0 8025a5c: f3c3 030c ubfx r3, r3, #0, #13 8025a60: 2b00 cmp r3, #0 8025a62: d110 bne.n 8025a86 ((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) { 8025a64: 6b3b ldr r3, [r7, #48] @ 0x30 8025a66: 89db ldrh r3, [r3, #14] 8025a68: 4618 mov r0, r3 8025a6a: f7f3 f855 bl 8018b18 8025a6e: 4603 mov r3, r0 8025a70: f3c3 030c ubfx r3, r3, #0, #13 if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && 8025a74: 2b00 cmp r3, #0 8025a76: d006 beq.n 8025a86 /* 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); 8025a78: 6b3b ldr r3, [r7, #48] @ 0x30 8025a7a: 3308 adds r3, #8 8025a7c: 2214 movs r2, #20 8025a7e: 6ab9 ldr r1, [r7, #40] @ 0x28 8025a80: 4618 mov r0, r3 8025a82: f004 fa2c bl 8029ede /* 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; 8025a86: 6abb ldr r3, [r7, #40] @ 0x28 8025a88: 88db ldrh r3, [r3, #6] 8025a8a: b29b uxth r3, r3 8025a8c: f003 0320 and.w r3, r3, #32 8025a90: 2b00 cmp r3, #0 8025a92: bf0c ite eq 8025a94: 2301 moveq r3, #1 8025a96: 2300 movne r3, #0 8025a98: b2db uxtb r3, r3 8025a9a: 61fb str r3, [r7, #28] if (is_last) { 8025a9c: 69fb ldr r3, [r7, #28] 8025a9e: 2b00 cmp r3, #0 8025aa0: d00e beq.n 8025ac0 u16_t datagram_len = (u16_t)(offset + len); 8025aa2: 8cfa ldrh r2, [r7, #38] @ 0x26 8025aa4: 8cbb ldrh r3, [r7, #36] @ 0x24 8025aa6: 4413 add r3, r2 8025aa8: 837b strh r3, [r7, #26] if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) { 8025aaa: 8b7a ldrh r2, [r7, #26] 8025aac: 8cfb ldrh r3, [r7, #38] @ 0x26 8025aae: 429a cmp r2, r3 8025ab0: f0c0 80a0 bcc.w 8025bf4 8025ab4: 8b7b ldrh r3, [r7, #26] 8025ab6: f64f 72eb movw r2, #65515 @ 0xffeb 8025aba: 4293 cmp r3, r2 8025abc: f200 809a bhi.w 8025bf4 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); 8025ac0: 69fa ldr r2, [r7, #28] 8025ac2: 6879 ldr r1, [r7, #4] 8025ac4: 6b38 ldr r0, [r7, #48] @ 0x30 8025ac6: f7ff fdd5 bl 8025674 8025aca: 6178 str r0, [r7, #20] if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) { 8025acc: 697b ldr r3, [r7, #20] 8025ace: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8025ad2: f000 809b beq.w 8025c0c /* 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); 8025ad6: 4b48 ldr r3, [pc, #288] @ (8025bf8 ) 8025ad8: 881a ldrh r2, [r3, #0] 8025ada: 8c3b ldrh r3, [r7, #32] 8025adc: 4413 add r3, r2 8025ade: b29a uxth r2, r3 8025ae0: 4b45 ldr r3, [pc, #276] @ (8025bf8 ) 8025ae2: 801a strh r2, [r3, #0] if (is_last) { 8025ae4: 69fb ldr r3, [r7, #28] 8025ae6: 2b00 cmp r3, #0 8025ae8: d00d beq.n 8025b06 u16_t datagram_len = (u16_t)(offset + len); 8025aea: 8cfa ldrh r2, [r7, #38] @ 0x26 8025aec: 8cbb ldrh r3, [r7, #36] @ 0x24 8025aee: 4413 add r3, r2 8025af0: 827b strh r3, [r7, #18] ipr->datagram_len = datagram_len; 8025af2: 6b3b ldr r3, [r7, #48] @ 0x30 8025af4: 8a7a ldrh r2, [r7, #18] 8025af6: 839a strh r2, [r3, #28] ipr->flags |= IP_REASS_FLAG_LASTFRAG; 8025af8: 6b3b ldr r3, [r7, #48] @ 0x30 8025afa: 7f9b ldrb r3, [r3, #30] 8025afc: f043 0301 orr.w r3, r3, #1 8025b00: b2da uxtb r2, r3 8025b02: 6b3b ldr r3, [r7, #48] @ 0x30 8025b04: 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) { 8025b06: 697b ldr r3, [r7, #20] 8025b08: 2b01 cmp r3, #1 8025b0a: d171 bne.n 8025bf0 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); 8025b0c: 6b3b ldr r3, [r7, #48] @ 0x30 8025b0e: 8b9b ldrh r3, [r3, #28] 8025b10: 3314 adds r3, #20 8025b12: 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; 8025b14: 6b3b ldr r3, [r7, #48] @ 0x30 8025b16: 685b ldr r3, [r3, #4] 8025b18: 685b ldr r3, [r3, #4] 8025b1a: 681b ldr r3, [r3, #0] 8025b1c: 62fb str r3, [r7, #44] @ 0x2c /* copy the original ip header back to the first pbuf */ fraghdr = (struct ip_hdr *)(ipr->p->payload); 8025b1e: 6b3b ldr r3, [r7, #48] @ 0x30 8025b20: 685b ldr r3, [r3, #4] 8025b22: 685b ldr r3, [r3, #4] 8025b24: 62bb str r3, [r7, #40] @ 0x28 SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN); 8025b26: 6b3b ldr r3, [r7, #48] @ 0x30 8025b28: 3308 adds r3, #8 8025b2a: 2214 movs r2, #20 8025b2c: 4619 mov r1, r3 8025b2e: 6ab8 ldr r0, [r7, #40] @ 0x28 8025b30: f004 f9d5 bl 8029ede IPH_LEN_SET(fraghdr, lwip_htons(datagram_len)); 8025b34: 8a3b ldrh r3, [r7, #16] 8025b36: 4618 mov r0, r3 8025b38: f7f2 ffee bl 8018b18 8025b3c: 4603 mov r3, r0 8025b3e: 461a mov r2, r3 8025b40: 6abb ldr r3, [r7, #40] @ 0x28 8025b42: 805a strh r2, [r3, #2] IPH_OFFSET_SET(fraghdr, 0); 8025b44: 6abb ldr r3, [r7, #40] @ 0x28 8025b46: 2200 movs r2, #0 8025b48: 719a strb r2, [r3, #6] 8025b4a: 2200 movs r2, #0 8025b4c: 71da strb r2, [r3, #7] IPH_CHKSUM_SET(fraghdr, 0); 8025b4e: 6abb ldr r3, [r7, #40] @ 0x28 8025b50: 2200 movs r2, #0 8025b52: 729a strb r2, [r3, #10] 8025b54: 2200 movs r2, #0 8025b56: 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; 8025b58: 6b3b ldr r3, [r7, #48] @ 0x30 8025b5a: 685b ldr r3, [r3, #4] 8025b5c: 607b str r3, [r7, #4] /* chain together the pbufs contained within the reass_data list. */ while (r != NULL) { 8025b5e: e00d b.n 8025b7c iprh = (struct ip_reass_helper *)r->payload; 8025b60: 6afb ldr r3, [r7, #44] @ 0x2c 8025b62: 685b ldr r3, [r3, #4] 8025b64: 60fb str r3, [r7, #12] /* hide the ip header for every succeeding fragment */ pbuf_remove_header(r, IP_HLEN); 8025b66: 2114 movs r1, #20 8025b68: 6af8 ldr r0, [r7, #44] @ 0x2c 8025b6a: f7f4 fbff bl 801a36c pbuf_cat(p, r); 8025b6e: 6af9 ldr r1, [r7, #44] @ 0x2c 8025b70: 6878 ldr r0, [r7, #4] 8025b72: f7f4 fd81 bl 801a678 r = iprh->next_pbuf; 8025b76: 68fb ldr r3, [r7, #12] 8025b78: 681b ldr r3, [r3, #0] 8025b7a: 62fb str r3, [r7, #44] @ 0x2c while (r != NULL) { 8025b7c: 6afb ldr r3, [r7, #44] @ 0x2c 8025b7e: 2b00 cmp r3, #0 8025b80: d1ee bne.n 8025b60 } /* find the previous entry in the linked list */ if (ipr == reassdatagrams) { 8025b82: 4b1e ldr r3, [pc, #120] @ (8025bfc ) 8025b84: 681b ldr r3, [r3, #0] 8025b86: 6b3a ldr r2, [r7, #48] @ 0x30 8025b88: 429a cmp r2, r3 8025b8a: d102 bne.n 8025b92 ipr_prev = NULL; 8025b8c: 2300 movs r3, #0 8025b8e: 637b str r3, [r7, #52] @ 0x34 8025b90: e010 b.n 8025bb4 } else { for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { 8025b92: 4b1a ldr r3, [pc, #104] @ (8025bfc ) 8025b94: 681b ldr r3, [r3, #0] 8025b96: 637b str r3, [r7, #52] @ 0x34 8025b98: e007 b.n 8025baa if (ipr_prev->next == ipr) { 8025b9a: 6b7b ldr r3, [r7, #52] @ 0x34 8025b9c: 681b ldr r3, [r3, #0] 8025b9e: 6b3a ldr r2, [r7, #48] @ 0x30 8025ba0: 429a cmp r2, r3 8025ba2: d006 beq.n 8025bb2 for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { 8025ba4: 6b7b ldr r3, [r7, #52] @ 0x34 8025ba6: 681b ldr r3, [r3, #0] 8025ba8: 637b str r3, [r7, #52] @ 0x34 8025baa: 6b7b ldr r3, [r7, #52] @ 0x34 8025bac: 2b00 cmp r3, #0 8025bae: d1f4 bne.n 8025b9a 8025bb0: e000 b.n 8025bb4 break; 8025bb2: bf00 nop } } } /* release the sources allocate for the fragment queue entry */ ip_reass_dequeue_datagram(ipr, ipr_prev); 8025bb4: 6b79 ldr r1, [r7, #52] @ 0x34 8025bb6: 6b38 ldr r0, [r7, #48] @ 0x30 8025bb8: f7ff fd2e bl 8025618 /* and adjust the number of pbufs currently queued for reassembly. */ clen = pbuf_clen(p); 8025bbc: 6878 ldr r0, [r7, #4] 8025bbe: f7f4 fd1b bl 801a5f8 8025bc2: 4603 mov r3, r0 8025bc4: 843b strh r3, [r7, #32] LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen); 8025bc6: 4b0c ldr r3, [pc, #48] @ (8025bf8 ) 8025bc8: 881b ldrh r3, [r3, #0] 8025bca: 8c3a ldrh r2, [r7, #32] 8025bcc: 429a cmp r2, r3 8025bce: d906 bls.n 8025bde 8025bd0: 4b0b ldr r3, [pc, #44] @ (8025c00 ) 8025bd2: f240 229b movw r2, #667 @ 0x29b 8025bd6: 490b ldr r1, [pc, #44] @ (8025c04 ) 8025bd8: 480b ldr r0, [pc, #44] @ (8025c08 ) 8025bda: f003 fef7 bl 80299cc ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - clen); 8025bde: 4b06 ldr r3, [pc, #24] @ (8025bf8 ) 8025be0: 881a ldrh r2, [r3, #0] 8025be2: 8c3b ldrh r3, [r7, #32] 8025be4: 1ad3 subs r3, r2, r3 8025be6: b29a uxth r2, r3 8025be8: 4b03 ldr r3, [pc, #12] @ (8025bf8 ) 8025bea: 801a strh r2, [r3, #0] MIB2_STATS_INC(mib2.ipreasmoks); /* Return the pbuf chain */ return p; 8025bec: 687b ldr r3, [r7, #4] 8025bee: e038 b.n 8025c62 } /* the datagram is not (yet?) reassembled completely */ LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_pbufcount: %d out\n", ip_reass_pbufcount)); return NULL; 8025bf0: 2300 movs r3, #0 8025bf2: e036 b.n 8025c62 goto nullreturn_ipr; 8025bf4: bf00 nop 8025bf6: e00a b.n 8025c0e 8025bf8: 2402b028 .word 0x2402b028 8025bfc: 2402b024 .word 0x2402b024 8025c00: 0803066c .word 0x0803066c 8025c04: 080307dc .word 0x080307dc 8025c08: 080306b4 .word 0x080306b4 goto nullreturn_ipr; 8025c0c: bf00 nop nullreturn_ipr: LWIP_ASSERT("ipr != NULL", ipr != NULL); 8025c0e: 6b3b ldr r3, [r7, #48] @ 0x30 8025c10: 2b00 cmp r3, #0 8025c12: d106 bne.n 8025c22 8025c14: 4b15 ldr r3, [pc, #84] @ (8025c6c ) 8025c16: f44f 722a mov.w r2, #680 @ 0x2a8 8025c1a: 4915 ldr r1, [pc, #84] @ (8025c70 ) 8025c1c: 4815 ldr r0, [pc, #84] @ (8025c74 ) 8025c1e: f003 fed5 bl 80299cc if (ipr->p == NULL) { 8025c22: 6b3b ldr r3, [r7, #48] @ 0x30 8025c24: 685b ldr r3, [r3, #4] 8025c26: 2b00 cmp r3, #0 8025c28: d116 bne.n 8025c58 /* dropped pbuf after creating a new datagram entry: remove the entry, too */ LWIP_ASSERT("not firstalthough just enqueued", ipr == reassdatagrams); 8025c2a: 4b13 ldr r3, [pc, #76] @ (8025c78 ) 8025c2c: 681b ldr r3, [r3, #0] 8025c2e: 6b3a ldr r2, [r7, #48] @ 0x30 8025c30: 429a cmp r2, r3 8025c32: d006 beq.n 8025c42 8025c34: 4b0d ldr r3, [pc, #52] @ (8025c6c ) 8025c36: f240 22ab movw r2, #683 @ 0x2ab 8025c3a: 4910 ldr r1, [pc, #64] @ (8025c7c ) 8025c3c: 480d ldr r0, [pc, #52] @ (8025c74 ) 8025c3e: f003 fec5 bl 80299cc ip_reass_dequeue_datagram(ipr, NULL); 8025c42: 2100 movs r1, #0 8025c44: 6b38 ldr r0, [r7, #48] @ 0x30 8025c46: f7ff fce7 bl 8025618 8025c4a: e006 b.n 8025c5a goto nullreturn; 8025c4c: bf00 nop 8025c4e: e004 b.n 8025c5a goto nullreturn; 8025c50: bf00 nop 8025c52: e002 b.n 8025c5a goto nullreturn; 8025c54: bf00 nop 8025c56: e000 b.n 8025c5a } nullreturn: 8025c58: bf00 nop LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: nullreturn\n")); IPFRAG_STATS_INC(ip_frag.drop); pbuf_free(p); 8025c5a: 6878 ldr r0, [r7, #4] 8025c5c: f7f4 fc3e bl 801a4dc return NULL; 8025c60: 2300 movs r3, #0 } 8025c62: 4618 mov r0, r3 8025c64: 3738 adds r7, #56 @ 0x38 8025c66: 46bd mov sp, r7 8025c68: bd80 pop {r7, pc} 8025c6a: bf00 nop 8025c6c: 0803066c .word 0x0803066c 8025c70: 080307f8 .word 0x080307f8 8025c74: 080306b4 .word 0x080306b4 8025c78: 2402b024 .word 0x2402b024 8025c7c: 08030804 .word 0x08030804 08025c80 : #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) { 8025c80: b580 push {r7, lr} 8025c82: af00 add r7, sp, #0 return (struct pbuf_custom_ref *)memp_malloc(MEMP_FRAG_PBUF); 8025c84: 2005 movs r0, #5 8025c86: f7f3 fcc5 bl 8019614 8025c8a: 4603 mov r3, r0 } 8025c8c: 4618 mov r0, r3 8025c8e: bd80 pop {r7, pc} 08025c90 : /** Free a struct pbuf_custom_ref */ static void ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref *p) { 8025c90: b580 push {r7, lr} 8025c92: b082 sub sp, #8 8025c94: af00 add r7, sp, #0 8025c96: 6078 str r0, [r7, #4] LWIP_ASSERT("p != NULL", p != NULL); 8025c98: 687b ldr r3, [r7, #4] 8025c9a: 2b00 cmp r3, #0 8025c9c: d106 bne.n 8025cac 8025c9e: 4b07 ldr r3, [pc, #28] @ (8025cbc ) 8025ca0: f44f 7231 mov.w r2, #708 @ 0x2c4 8025ca4: 4906 ldr r1, [pc, #24] @ (8025cc0 ) 8025ca6: 4807 ldr r0, [pc, #28] @ (8025cc4 ) 8025ca8: f003 fe90 bl 80299cc memp_free(MEMP_FRAG_PBUF, p); 8025cac: 6879 ldr r1, [r7, #4] 8025cae: 2005 movs r0, #5 8025cb0: f7f3 fd26 bl 8019700 } 8025cb4: bf00 nop 8025cb6: 3708 adds r7, #8 8025cb8: 46bd mov sp, r7 8025cba: bd80 pop {r7, pc} 8025cbc: 0803066c .word 0x0803066c 8025cc0: 08030824 .word 0x08030824 8025cc4: 080306b4 .word 0x080306b4 08025cc8 : /** Free-callback function to free a 'struct pbuf_custom_ref', called by * pbuf_free. */ static void ipfrag_free_pbuf_custom(struct pbuf *p) { 8025cc8: b580 push {r7, lr} 8025cca: b084 sub sp, #16 8025ccc: af00 add r7, sp, #0 8025cce: 6078 str r0, [r7, #4] struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref *)p; 8025cd0: 687b ldr r3, [r7, #4] 8025cd2: 60fb str r3, [r7, #12] LWIP_ASSERT("pcr != NULL", pcr != NULL); 8025cd4: 68fb ldr r3, [r7, #12] 8025cd6: 2b00 cmp r3, #0 8025cd8: d106 bne.n 8025ce8 8025cda: 4b11 ldr r3, [pc, #68] @ (8025d20 ) 8025cdc: f240 22ce movw r2, #718 @ 0x2ce 8025ce0: 4910 ldr r1, [pc, #64] @ (8025d24 ) 8025ce2: 4811 ldr r0, [pc, #68] @ (8025d28 ) 8025ce4: f003 fe72 bl 80299cc LWIP_ASSERT("pcr == p", (void *)pcr == (void *)p); 8025ce8: 68fa ldr r2, [r7, #12] 8025cea: 687b ldr r3, [r7, #4] 8025cec: 429a cmp r2, r3 8025cee: d006 beq.n 8025cfe 8025cf0: 4b0b ldr r3, [pc, #44] @ (8025d20 ) 8025cf2: f240 22cf movw r2, #719 @ 0x2cf 8025cf6: 490d ldr r1, [pc, #52] @ (8025d2c ) 8025cf8: 480b ldr r0, [pc, #44] @ (8025d28 ) 8025cfa: f003 fe67 bl 80299cc if (pcr->original != NULL) { 8025cfe: 68fb ldr r3, [r7, #12] 8025d00: 695b ldr r3, [r3, #20] 8025d02: 2b00 cmp r3, #0 8025d04: d004 beq.n 8025d10 pbuf_free(pcr->original); 8025d06: 68fb ldr r3, [r7, #12] 8025d08: 695b ldr r3, [r3, #20] 8025d0a: 4618 mov r0, r3 8025d0c: f7f4 fbe6 bl 801a4dc } ip_frag_free_pbuf_custom_ref(pcr); 8025d10: 68f8 ldr r0, [r7, #12] 8025d12: f7ff ffbd bl 8025c90 } 8025d16: bf00 nop 8025d18: 3710 adds r7, #16 8025d1a: 46bd mov sp, r7 8025d1c: bd80 pop {r7, pc} 8025d1e: bf00 nop 8025d20: 0803066c .word 0x0803066c 8025d24: 08030830 .word 0x08030830 8025d28: 080306b4 .word 0x080306b4 8025d2c: 0803083c .word 0x0803083c 08025d30 : * * @return ERR_OK if sent successfully, err_t otherwise */ err_t ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) { 8025d30: b580 push {r7, lr} 8025d32: b094 sub sp, #80 @ 0x50 8025d34: af02 add r7, sp, #8 8025d36: 60f8 str r0, [r7, #12] 8025d38: 60b9 str r1, [r7, #8] 8025d3a: 607a str r2, [r7, #4] struct pbuf *rambuf; #if !LWIP_NETIF_TX_SINGLE_PBUF struct pbuf *newpbuf; u16_t newpbuflen = 0; 8025d3c: 2300 movs r3, #0 8025d3e: 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); 8025d42: 68bb ldr r3, [r7, #8] 8025d44: 8d1b ldrh r3, [r3, #40] @ 0x28 8025d46: 3b14 subs r3, #20 8025d48: 2b00 cmp r3, #0 8025d4a: da00 bge.n 8025d4e 8025d4c: 3307 adds r3, #7 8025d4e: 10db asrs r3, r3, #3 8025d50: 877b strh r3, [r7, #58] @ 0x3a u16_t left, fragsize; u16_t ofo; int last; u16_t poff = IP_HLEN; 8025d52: 2314 movs r3, #20 8025d54: 87fb strh r3, [r7, #62] @ 0x3e u16_t tmp; int mf_set; original_iphdr = (struct ip_hdr *)p->payload; 8025d56: 68fb ldr r3, [r7, #12] 8025d58: 685b ldr r3, [r3, #4] 8025d5a: 637b str r3, [r7, #52] @ 0x34 iphdr = original_iphdr; 8025d5c: 6b7b ldr r3, [r7, #52] @ 0x34 8025d5e: 633b str r3, [r7, #48] @ 0x30 if (IPH_HL_BYTES(iphdr) != IP_HLEN) { 8025d60: 6b3b ldr r3, [r7, #48] @ 0x30 8025d62: 781b ldrb r3, [r3, #0] 8025d64: f003 030f and.w r3, r3, #15 8025d68: b2db uxtb r3, r3 8025d6a: 009b lsls r3, r3, #2 8025d6c: b2db uxtb r3, r3 8025d6e: 2b14 cmp r3, #20 8025d70: d002 beq.n 8025d78 /* ip4_frag() does not support IP options */ return ERR_VAL; 8025d72: f06f 0305 mvn.w r3, #5 8025d76: e110 b.n 8025f9a } LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL); 8025d78: 68fb ldr r3, [r7, #12] 8025d7a: 895b ldrh r3, [r3, #10] 8025d7c: 2b13 cmp r3, #19 8025d7e: d809 bhi.n 8025d94 8025d80: 4b88 ldr r3, [pc, #544] @ (8025fa4 ) 8025d82: f44f 723f mov.w r2, #764 @ 0x2fc 8025d86: 4988 ldr r1, [pc, #544] @ (8025fa8 ) 8025d88: 4888 ldr r0, [pc, #544] @ (8025fac ) 8025d8a: f003 fe1f bl 80299cc 8025d8e: f06f 0305 mvn.w r3, #5 8025d92: e102 b.n 8025f9a /* Save original offset */ tmp = lwip_ntohs(IPH_OFFSET(iphdr)); 8025d94: 6b3b ldr r3, [r7, #48] @ 0x30 8025d96: 88db ldrh r3, [r3, #6] 8025d98: b29b uxth r3, r3 8025d9a: 4618 mov r0, r3 8025d9c: f7f2 febc bl 8018b18 8025da0: 4603 mov r3, r0 8025da2: 87bb strh r3, [r7, #60] @ 0x3c ofo = tmp & IP_OFFMASK; 8025da4: 8fbb ldrh r3, [r7, #60] @ 0x3c 8025da6: f3c3 030c ubfx r3, r3, #0, #13 8025daa: 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; 8025dae: 8fbb ldrh r3, [r7, #60] @ 0x3c 8025db0: f403 5300 and.w r3, r3, #8192 @ 0x2000 8025db4: 62fb str r3, [r7, #44] @ 0x2c left = (u16_t)(p->tot_len - IP_HLEN); 8025db6: 68fb ldr r3, [r7, #12] 8025db8: 891b ldrh r3, [r3, #8] 8025dba: 3b14 subs r3, #20 8025dbc: f8a7 3042 strh.w r3, [r7, #66] @ 0x42 while (left) { 8025dc0: e0e1 b.n 8025f86 /* Fill this fragment */ fragsize = LWIP_MIN(left, (u16_t)(nfb * 8)); 8025dc2: 8f7b ldrh r3, [r7, #58] @ 0x3a 8025dc4: 00db lsls r3, r3, #3 8025dc6: b29b uxth r3, r3 8025dc8: f8b7 2042 ldrh.w r2, [r7, #66] @ 0x42 8025dcc: 4293 cmp r3, r2 8025dce: bf28 it cs 8025dd0: 4613 movcs r3, r2 8025dd2: 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); 8025dd4: f44f 7220 mov.w r2, #640 @ 0x280 8025dd8: 2114 movs r1, #20 8025dda: 200e movs r0, #14 8025ddc: f7f4 f868 bl 8019eb0 8025de0: 6278 str r0, [r7, #36] @ 0x24 if (rambuf == NULL) { 8025de2: 6a7b ldr r3, [r7, #36] @ 0x24 8025de4: 2b00 cmp r3, #0 8025de6: f000 80d5 beq.w 8025f94 goto memerr; } LWIP_ASSERT("this needs a pbuf in one piece!", 8025dea: 6a7b ldr r3, [r7, #36] @ 0x24 8025dec: 895b ldrh r3, [r3, #10] 8025dee: 2b13 cmp r3, #19 8025df0: d806 bhi.n 8025e00 8025df2: 4b6c ldr r3, [pc, #432] @ (8025fa4 ) 8025df4: f44f 7249 mov.w r2, #804 @ 0x324 8025df8: 496d ldr r1, [pc, #436] @ (8025fb0 ) 8025dfa: 486c ldr r0, [pc, #432] @ (8025fac ) 8025dfc: f003 fde6 bl 80299cc (rambuf->len >= (IP_HLEN))); SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN); 8025e00: 6a7b ldr r3, [r7, #36] @ 0x24 8025e02: 685b ldr r3, [r3, #4] 8025e04: 2214 movs r2, #20 8025e06: 6b79 ldr r1, [r7, #52] @ 0x34 8025e08: 4618 mov r0, r3 8025e0a: f004 f868 bl 8029ede iphdr = (struct ip_hdr *)rambuf->payload; 8025e0e: 6a7b ldr r3, [r7, #36] @ 0x24 8025e10: 685b ldr r3, [r3, #4] 8025e12: 633b str r3, [r7, #48] @ 0x30 left_to_copy = fragsize; 8025e14: 8d7b ldrh r3, [r7, #42] @ 0x2a 8025e16: f8a7 3044 strh.w r3, [r7, #68] @ 0x44 while (left_to_copy) { 8025e1a: e064 b.n 8025ee6 struct pbuf_custom_ref *pcr; u16_t plen = (u16_t)(p->len - poff); 8025e1c: 68fb ldr r3, [r7, #12] 8025e1e: 895a ldrh r2, [r3, #10] 8025e20: 8ffb ldrh r3, [r7, #62] @ 0x3e 8025e22: 1ad3 subs r3, r2, r3 8025e24: 83fb strh r3, [r7, #30] LWIP_ASSERT("p->len >= poff", p->len >= poff); 8025e26: 68fb ldr r3, [r7, #12] 8025e28: 895b ldrh r3, [r3, #10] 8025e2a: 8ffa ldrh r2, [r7, #62] @ 0x3e 8025e2c: 429a cmp r2, r3 8025e2e: d906 bls.n 8025e3e 8025e30: 4b5c ldr r3, [pc, #368] @ (8025fa4 ) 8025e32: f240 322d movw r2, #813 @ 0x32d 8025e36: 495f ldr r1, [pc, #380] @ (8025fb4 ) 8025e38: 485c ldr r0, [pc, #368] @ (8025fac ) 8025e3a: f003 fdc7 bl 80299cc newpbuflen = LWIP_MIN(left_to_copy, plen); 8025e3e: 8bfa ldrh r2, [r7, #30] 8025e40: f8b7 3044 ldrh.w r3, [r7, #68] @ 0x44 8025e44: 4293 cmp r3, r2 8025e46: bf28 it cs 8025e48: 4613 movcs r3, r2 8025e4a: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 /* Is this pbuf already empty? */ if (!newpbuflen) { 8025e4e: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8025e52: 2b00 cmp r3, #0 8025e54: d105 bne.n 8025e62 poff = 0; 8025e56: 2300 movs r3, #0 8025e58: 87fb strh r3, [r7, #62] @ 0x3e p = p->next; 8025e5a: 68fb ldr r3, [r7, #12] 8025e5c: 681b ldr r3, [r3, #0] 8025e5e: 60fb str r3, [r7, #12] continue; 8025e60: e041 b.n 8025ee6 } pcr = ip_frag_alloc_pbuf_custom_ref(); 8025e62: f7ff ff0d bl 8025c80 8025e66: 61b8 str r0, [r7, #24] if (pcr == NULL) { 8025e68: 69bb ldr r3, [r7, #24] 8025e6a: 2b00 cmp r3, #0 8025e6c: d103 bne.n 8025e76 pbuf_free(rambuf); 8025e6e: 6a78 ldr r0, [r7, #36] @ 0x24 8025e70: f7f4 fb34 bl 801a4dc goto memerr; 8025e74: e08f b.n 8025f96 } /* Mirror this pbuf, although we might not need all of it. */ newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, 8025e76: 69b8 ldr r0, [r7, #24] (u8_t *)p->payload + poff, newpbuflen); 8025e78: 68fb ldr r3, [r7, #12] 8025e7a: 685a ldr r2, [r3, #4] newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, 8025e7c: 8ffb ldrh r3, [r7, #62] @ 0x3e 8025e7e: 4413 add r3, r2 8025e80: f8b7 1046 ldrh.w r1, [r7, #70] @ 0x46 8025e84: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 8025e88: 9201 str r2, [sp, #4] 8025e8a: 9300 str r3, [sp, #0] 8025e8c: 4603 mov r3, r0 8025e8e: 2241 movs r2, #65 @ 0x41 8025e90: 2000 movs r0, #0 8025e92: f7f4 f939 bl 801a108 8025e96: 6178 str r0, [r7, #20] if (newpbuf == NULL) { 8025e98: 697b ldr r3, [r7, #20] 8025e9a: 2b00 cmp r3, #0 8025e9c: d106 bne.n 8025eac ip_frag_free_pbuf_custom_ref(pcr); 8025e9e: 69b8 ldr r0, [r7, #24] 8025ea0: f7ff fef6 bl 8025c90 pbuf_free(rambuf); 8025ea4: 6a78 ldr r0, [r7, #36] @ 0x24 8025ea6: f7f4 fb19 bl 801a4dc goto memerr; 8025eaa: e074 b.n 8025f96 } pbuf_ref(p); 8025eac: 68f8 ldr r0, [r7, #12] 8025eae: f7f4 fbbb bl 801a628 pcr->original = p; 8025eb2: 69bb ldr r3, [r7, #24] 8025eb4: 68fa ldr r2, [r7, #12] 8025eb6: 615a str r2, [r3, #20] pcr->pc.custom_free_function = ipfrag_free_pbuf_custom; 8025eb8: 69bb ldr r3, [r7, #24] 8025eba: 4a3f ldr r2, [pc, #252] @ (8025fb8 ) 8025ebc: 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); 8025ebe: 6979 ldr r1, [r7, #20] 8025ec0: 6a78 ldr r0, [r7, #36] @ 0x24 8025ec2: f7f4 fbd9 bl 801a678 left_to_copy = (u16_t)(left_to_copy - newpbuflen); 8025ec6: f8b7 2044 ldrh.w r2, [r7, #68] @ 0x44 8025eca: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8025ece: 1ad3 subs r3, r2, r3 8025ed0: f8a7 3044 strh.w r3, [r7, #68] @ 0x44 if (left_to_copy) { 8025ed4: f8b7 3044 ldrh.w r3, [r7, #68] @ 0x44 8025ed8: 2b00 cmp r3, #0 8025eda: d004 beq.n 8025ee6 poff = 0; 8025edc: 2300 movs r3, #0 8025ede: 87fb strh r3, [r7, #62] @ 0x3e p = p->next; 8025ee0: 68fb ldr r3, [r7, #12] 8025ee2: 681b ldr r3, [r3, #0] 8025ee4: 60fb str r3, [r7, #12] while (left_to_copy) { 8025ee6: f8b7 3044 ldrh.w r3, [r7, #68] @ 0x44 8025eea: 2b00 cmp r3, #0 8025eec: d196 bne.n 8025e1c } } poff = (u16_t)(poff + newpbuflen); 8025eee: 8ffa ldrh r2, [r7, #62] @ 0x3e 8025ef0: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8025ef4: 4413 add r3, r2 8025ef6: 87fb strh r3, [r7, #62] @ 0x3e #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ /* Correct header */ last = (left <= netif->mtu - IP_HLEN); 8025ef8: 68bb ldr r3, [r7, #8] 8025efa: 8d1b ldrh r3, [r3, #40] @ 0x28 8025efc: f1a3 0213 sub.w r2, r3, #19 8025f00: f8b7 3042 ldrh.w r3, [r7, #66] @ 0x42 8025f04: 429a cmp r2, r3 8025f06: bfcc ite gt 8025f08: 2301 movgt r3, #1 8025f0a: 2300 movle r3, #0 8025f0c: b2db uxtb r3, r3 8025f0e: 623b str r3, [r7, #32] /* Set new offset and MF flag */ tmp = (IP_OFFMASK & (ofo)); 8025f10: f8b7 3040 ldrh.w r3, [r7, #64] @ 0x40 8025f14: f3c3 030c ubfx r3, r3, #0, #13 8025f18: 87bb strh r3, [r7, #60] @ 0x3c if (!last || mf_set) { 8025f1a: 6a3b ldr r3, [r7, #32] 8025f1c: 2b00 cmp r3, #0 8025f1e: d002 beq.n 8025f26 8025f20: 6afb ldr r3, [r7, #44] @ 0x2c 8025f22: 2b00 cmp r3, #0 8025f24: d003 beq.n 8025f2e /* the last fragment has MF set if the input frame had it */ tmp = tmp | IP_MF; 8025f26: 8fbb ldrh r3, [r7, #60] @ 0x3c 8025f28: f443 5300 orr.w r3, r3, #8192 @ 0x2000 8025f2c: 87bb strh r3, [r7, #60] @ 0x3c } IPH_OFFSET_SET(iphdr, lwip_htons(tmp)); 8025f2e: 8fbb ldrh r3, [r7, #60] @ 0x3c 8025f30: 4618 mov r0, r3 8025f32: f7f2 fdf1 bl 8018b18 8025f36: 4603 mov r3, r0 8025f38: 461a mov r2, r3 8025f3a: 6b3b ldr r3, [r7, #48] @ 0x30 8025f3c: 80da strh r2, [r3, #6] IPH_LEN_SET(iphdr, lwip_htons((u16_t)(fragsize + IP_HLEN))); 8025f3e: 8d7b ldrh r3, [r7, #42] @ 0x2a 8025f40: 3314 adds r3, #20 8025f42: b29b uxth r3, r3 8025f44: 4618 mov r0, r3 8025f46: f7f2 fde7 bl 8018b18 8025f4a: 4603 mov r3, r0 8025f4c: 461a mov r2, r3 8025f4e: 6b3b ldr r3, [r7, #48] @ 0x30 8025f50: 805a strh r2, [r3, #2] IPH_CHKSUM_SET(iphdr, 0); 8025f52: 6b3b ldr r3, [r7, #48] @ 0x30 8025f54: 2200 movs r2, #0 8025f56: 729a strb r2, [r3, #10] 8025f58: 2200 movs r2, #0 8025f5a: 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); 8025f5c: 68bb ldr r3, [r7, #8] 8025f5e: 695b ldr r3, [r3, #20] 8025f60: 687a ldr r2, [r7, #4] 8025f62: 6a79 ldr r1, [r7, #36] @ 0x24 8025f64: 68b8 ldr r0, [r7, #8] 8025f66: 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); 8025f68: 6a78 ldr r0, [r7, #36] @ 0x24 8025f6a: f7f4 fab7 bl 801a4dc left = (u16_t)(left - fragsize); 8025f6e: f8b7 2042 ldrh.w r2, [r7, #66] @ 0x42 8025f72: 8d7b ldrh r3, [r7, #42] @ 0x2a 8025f74: 1ad3 subs r3, r2, r3 8025f76: f8a7 3042 strh.w r3, [r7, #66] @ 0x42 ofo = (u16_t)(ofo + nfb); 8025f7a: f8b7 2040 ldrh.w r2, [r7, #64] @ 0x40 8025f7e: 8f7b ldrh r3, [r7, #58] @ 0x3a 8025f80: 4413 add r3, r2 8025f82: f8a7 3040 strh.w r3, [r7, #64] @ 0x40 while (left) { 8025f86: f8b7 3042 ldrh.w r3, [r7, #66] @ 0x42 8025f8a: 2b00 cmp r3, #0 8025f8c: f47f af19 bne.w 8025dc2 } MIB2_STATS_INC(mib2.ipfragoks); return ERR_OK; 8025f90: 2300 movs r3, #0 8025f92: e002 b.n 8025f9a goto memerr; 8025f94: bf00 nop memerr: MIB2_STATS_INC(mib2.ipfragfails); return ERR_MEM; 8025f96: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8025f9a: 4618 mov r0, r3 8025f9c: 3748 adds r7, #72 @ 0x48 8025f9e: 46bd mov sp, r7 8025fa0: bd80 pop {r7, pc} 8025fa2: bf00 nop 8025fa4: 0803066c .word 0x0803066c 8025fa8: 08030848 .word 0x08030848 8025fac: 080306b4 .word 0x080306b4 8025fb0: 08030864 .word 0x08030864 8025fb4: 08030884 .word 0x08030884 8025fb8: 08025cc9 .word 0x08025cc9 08025fbc : * @see ETHARP_SUPPORT_VLAN * @see LWIP_HOOK_VLAN_CHECK */ err_t ethernet_input(struct pbuf *p, struct netif *netif) { 8025fbc: b580 push {r7, lr} 8025fbe: b086 sub sp, #24 8025fc0: af00 add r7, sp, #0 8025fc2: 6078 str r0, [r7, #4] 8025fc4: 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; 8025fc6: 230e movs r3, #14 8025fc8: 82fb strh r3, [r7, #22] #endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */ LWIP_ASSERT_CORE_LOCKED(); 8025fca: f7ea fab1 bl 8010530 if (p->len <= SIZEOF_ETH_HDR) { 8025fce: 687b ldr r3, [r7, #4] 8025fd0: 895b ldrh r3, [r3, #10] 8025fd2: 2b0e cmp r3, #14 8025fd4: d96e bls.n 80260b4 ETHARP_STATS_INC(etharp.drop); MIB2_STATS_NETIF_INC(netif, ifinerrors); goto free_and_return; } if (p->if_idx == NETIF_NO_INDEX) { 8025fd6: 687b ldr r3, [r7, #4] 8025fd8: 7bdb ldrb r3, [r3, #15] 8025fda: 2b00 cmp r3, #0 8025fdc: d106 bne.n 8025fec p->if_idx = netif_get_index(netif); 8025fde: 683b ldr r3, [r7, #0] 8025fe0: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8025fe4: 3301 adds r3, #1 8025fe6: b2da uxtb r2, r3 8025fe8: 687b ldr r3, [r7, #4] 8025fea: 73da strb r2, [r3, #15] } /* points to packet payload, which starts with an Ethernet header */ ethhdr = (struct eth_hdr *)p->payload; 8025fec: 687b ldr r3, [r7, #4] 8025fee: 685b ldr r3, [r3, #4] 8025ff0: 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; 8025ff2: 693b ldr r3, [r7, #16] 8025ff4: 7b1a ldrb r2, [r3, #12] 8025ff6: 7b5b ldrb r3, [r3, #13] 8025ff8: 021b lsls r3, r3, #8 8025ffa: 4313 orrs r3, r2 8025ffc: 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) { 8025ffe: 693b ldr r3, [r7, #16] 8026000: 781b ldrb r3, [r3, #0] 8026002: f003 0301 and.w r3, r3, #1 8026006: 2b00 cmp r3, #0 8026008: d023 beq.n 8026052 /* this might be a multicast or broadcast packet */ if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) { 802600a: 693b ldr r3, [r7, #16] 802600c: 781b ldrb r3, [r3, #0] 802600e: 2b01 cmp r3, #1 8026010: d10f bne.n 8026032 #if LWIP_IPV4 if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && 8026012: 693b ldr r3, [r7, #16] 8026014: 785b ldrb r3, [r3, #1] 8026016: 2b00 cmp r3, #0 8026018: d11b bne.n 8026052 (ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) { 802601a: 693b ldr r3, [r7, #16] 802601c: 789b ldrb r3, [r3, #2] if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && 802601e: 2b5e cmp r3, #94 @ 0x5e 8026020: d117 bne.n 8026052 /* mark the pbuf as link-layer multicast */ p->flags |= PBUF_FLAG_LLMCAST; 8026022: 687b ldr r3, [r7, #4] 8026024: 7b5b ldrb r3, [r3, #13] 8026026: f043 0310 orr.w r3, r3, #16 802602a: b2da uxtb r2, r3 802602c: 687b ldr r3, [r7, #4] 802602e: 735a strb r2, [r3, #13] 8026030: e00f b.n 8026052 (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)) { 8026032: 693b ldr r3, [r7, #16] 8026034: 2206 movs r2, #6 8026036: 4928 ldr r1, [pc, #160] @ (80260d8 ) 8026038: 4618 mov r0, r3 802603a: f003 fe2f bl 8029c9c 802603e: 4603 mov r3, r0 8026040: 2b00 cmp r3, #0 8026042: d106 bne.n 8026052 /* mark the pbuf as link-layer broadcast */ p->flags |= PBUF_FLAG_LLBCAST; 8026044: 687b ldr r3, [r7, #4] 8026046: 7b5b ldrb r3, [r3, #13] 8026048: f043 0308 orr.w r3, r3, #8 802604c: b2da uxtb r2, r3 802604e: 687b ldr r3, [r7, #4] 8026050: 735a strb r2, [r3, #13] } } switch (type) { 8026052: 89fb ldrh r3, [r7, #14] 8026054: 2b08 cmp r3, #8 8026056: d003 beq.n 8026060 8026058: f5b3 6fc1 cmp.w r3, #1544 @ 0x608 802605c: d014 beq.n 8026088 } #endif ETHARP_STATS_INC(etharp.proterr); ETHARP_STATS_INC(etharp.drop); MIB2_STATS_NETIF_INC(netif, ifinunknownprotos); goto free_and_return; 802605e: e032 b.n 80260c6 if (!(netif->flags & NETIF_FLAG_ETHARP)) { 8026060: 683b ldr r3, [r7, #0] 8026062: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8026066: f003 0308 and.w r3, r3, #8 802606a: 2b00 cmp r3, #0 802606c: d024 beq.n 80260b8 if (pbuf_remove_header(p, next_hdr_offset)) { 802606e: 8afb ldrh r3, [r7, #22] 8026070: 4619 mov r1, r3 8026072: 6878 ldr r0, [r7, #4] 8026074: f7f4 f97a bl 801a36c 8026078: 4603 mov r3, r0 802607a: 2b00 cmp r3, #0 802607c: d11e bne.n 80260bc ip4_input(p, netif); 802607e: 6839 ldr r1, [r7, #0] 8026080: 6878 ldr r0, [r7, #4] 8026082: f7fe fd2f bl 8024ae4 break; 8026086: e013 b.n 80260b0 if (!(netif->flags & NETIF_FLAG_ETHARP)) { 8026088: 683b ldr r3, [r7, #0] 802608a: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 802608e: f003 0308 and.w r3, r3, #8 8026092: 2b00 cmp r3, #0 8026094: d014 beq.n 80260c0 if (pbuf_remove_header(p, next_hdr_offset)) { 8026096: 8afb ldrh r3, [r7, #22] 8026098: 4619 mov r1, r3 802609a: 6878 ldr r0, [r7, #4] 802609c: f7f4 f966 bl 801a36c 80260a0: 4603 mov r3, r0 80260a2: 2b00 cmp r3, #0 80260a4: d10e bne.n 80260c4 etharp_input(p, netif); 80260a6: 6839 ldr r1, [r7, #0] 80260a8: 6878 ldr r0, [r7, #4] 80260aa: f7fd fe9d bl 8023de8 break; 80260ae: bf00 nop } /* This means the pbuf is freed or consumed, so the caller doesn't have to free it again */ return ERR_OK; 80260b0: 2300 movs r3, #0 80260b2: e00c b.n 80260ce goto free_and_return; 80260b4: bf00 nop 80260b6: e006 b.n 80260c6 goto free_and_return; 80260b8: bf00 nop 80260ba: e004 b.n 80260c6 goto free_and_return; 80260bc: bf00 nop 80260be: e002 b.n 80260c6 goto free_and_return; 80260c0: bf00 nop 80260c2: e000 b.n 80260c6 goto free_and_return; 80260c4: bf00 nop free_and_return: pbuf_free(p); 80260c6: 6878 ldr r0, [r7, #4] 80260c8: f7f4 fa08 bl 801a4dc return ERR_OK; 80260cc: 2300 movs r3, #0 } 80260ce: 4618 mov r0, r3 80260d0: 3718 adds r7, #24 80260d2: 46bd mov sp, r7 80260d4: bd80 pop {r7, pc} 80260d6: bf00 nop 80260d8: 08030c18 .word 0x08030c18 080260dc : * @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) { 80260dc: b580 push {r7, lr} 80260de: b086 sub sp, #24 80260e0: af00 add r7, sp, #0 80260e2: 60f8 str r0, [r7, #12] 80260e4: 60b9 str r1, [r7, #8] 80260e6: 607a str r2, [r7, #4] 80260e8: 603b str r3, [r7, #0] struct eth_hdr *ethhdr; u16_t eth_type_be = lwip_htons(eth_type); 80260ea: 8c3b ldrh r3, [r7, #32] 80260ec: 4618 mov r0, r3 80260ee: f7f2 fd13 bl 8018b18 80260f2: 4603 mov r3, r0 80260f4: 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) { 80260f6: 210e movs r1, #14 80260f8: 68b8 ldr r0, [r7, #8] 80260fa: f7f4 f927 bl 801a34c 80260fe: 4603 mov r3, r0 8026100: 2b00 cmp r3, #0 8026102: d127 bne.n 8026154 goto pbuf_header_failed; } } LWIP_ASSERT_CORE_LOCKED(); 8026104: f7ea fa14 bl 8010530 ethhdr = (struct eth_hdr *)p->payload; 8026108: 68bb ldr r3, [r7, #8] 802610a: 685b ldr r3, [r3, #4] 802610c: 613b str r3, [r7, #16] ethhdr->type = eth_type_be; 802610e: 693b ldr r3, [r7, #16] 8026110: 8afa ldrh r2, [r7, #22] 8026112: 819a strh r2, [r3, #12] SMEMCPY(ðhdr->dest, dst, ETH_HWADDR_LEN); 8026114: 693b ldr r3, [r7, #16] 8026116: 2206 movs r2, #6 8026118: 6839 ldr r1, [r7, #0] 802611a: 4618 mov r0, r3 802611c: f003 fedf bl 8029ede SMEMCPY(ðhdr->src, src, ETH_HWADDR_LEN); 8026120: 693b ldr r3, [r7, #16] 8026122: 3306 adds r3, #6 8026124: 2206 movs r2, #6 8026126: 6879 ldr r1, [r7, #4] 8026128: 4618 mov r0, r3 802612a: f003 fed8 bl 8029ede LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!", 802612e: 68fb ldr r3, [r7, #12] 8026130: f893 3030 ldrb.w r3, [r3, #48] @ 0x30 8026134: 2b06 cmp r3, #6 8026136: d006 beq.n 8026146 8026138: 4b0a ldr r3, [pc, #40] @ (8026164 ) 802613a: f44f 7299 mov.w r2, #306 @ 0x132 802613e: 490a ldr r1, [pc, #40] @ (8026168 ) 8026140: 480a ldr r0, [pc, #40] @ (802616c ) 8026142: f003 fc43 bl 80299cc (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); 8026146: 68fb ldr r3, [r7, #12] 8026148: 699b ldr r3, [r3, #24] 802614a: 68b9 ldr r1, [r7, #8] 802614c: 68f8 ldr r0, [r7, #12] 802614e: 4798 blx r3 8026150: 4603 mov r3, r0 8026152: e002 b.n 802615a goto pbuf_header_failed; 8026154: 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; 8026156: f06f 0301 mvn.w r3, #1 } 802615a: 4618 mov r0, r3 802615c: 3718 adds r7, #24 802615e: 46bd mov sp, r7 8026160: bd80 pop {r7, pc} 8026162: bf00 nop 8026164: 08030894 .word 0x08030894 8026168: 080308cc .word 0x080308cc 802616c: 08030900 .word 0x08030900 08026170 : #endif /*-----------------------------------------------------------------------------------*/ // Creates an empty mailbox. err_t sys_mbox_new(sys_mbox_t *mbox, int size) { 8026170: b580 push {r7, lr} 8026172: b082 sub sp, #8 8026174: af00 add r7, sp, #0 8026176: 6078 str r0, [r7, #4] 8026178: 6039 str r1, [r7, #0] #if (osCMSIS < 0x20000U) osMessageQDef(QUEUE, size, void *); *mbox = osMessageCreate(osMessageQ(QUEUE), NULL); #else *mbox = osMessageQueueNew(size, sizeof(void *), NULL); 802617a: 683b ldr r3, [r7, #0] 802617c: 2200 movs r2, #0 802617e: 2104 movs r1, #4 8026180: 4618 mov r0, r3 8026182: f7ea fe6b bl 8010e5c 8026186: 4602 mov r2, r0 8026188: 687b ldr r3, [r7, #4] 802618a: 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) 802618c: 687b ldr r3, [r7, #4] 802618e: 681b ldr r3, [r3, #0] 8026190: 2b00 cmp r3, #0 8026192: d102 bne.n 802619a return ERR_MEM; 8026194: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026198: e000 b.n 802619c return ERR_OK; 802619a: 2300 movs r3, #0 } 802619c: 4618 mov r0, r3 802619e: 3708 adds r7, #8 80261a0: 46bd mov sp, r7 80261a2: bd80 pop {r7, pc} 080261a4 : 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) { 80261a4: b580 push {r7, lr} 80261a6: b082 sub sp, #8 80261a8: af00 add r7, sp, #0 80261aa: 6078 str r0, [r7, #4] #if (osCMSIS < 0x20000U) if(osMessageWaiting(*mbox)) #else if(osMessageQueueGetCount(*mbox)) 80261ac: 687b ldr r3, [r7, #4] 80261ae: 681b ldr r3, [r3, #0] 80261b0: 4618 mov r0, r3 80261b2: f7ea ff85 bl 80110c0 } #if (osCMSIS < 0x20000U) osMessageDelete(*mbox); #else osMessageQueueDelete(*mbox); 80261b6: 687b ldr r3, [r7, #4] 80261b8: 681b ldr r3, [r3, #0] 80261ba: 4618 mov r0, r3 80261bc: f7ea ffa0 bl 8011100 #endif #if SYS_STATS --lwip_stats.sys.mbox.used; #endif /* SYS_STATS */ } 80261c0: bf00 nop 80261c2: 3708 adds r7, #8 80261c4: 46bd mov sp, r7 80261c6: bd80 pop {r7, pc} 080261c8 : /*-----------------------------------------------------------------------------------*/ // Try to post the "msg" to the mailbox. err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg) { 80261c8: b580 push {r7, lr} 80261ca: b084 sub sp, #16 80261cc: af00 add r7, sp, #0 80261ce: 6078 str r0, [r7, #4] 80261d0: 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) 80261d2: 687b ldr r3, [r7, #4] 80261d4: 6818 ldr r0, [r3, #0] 80261d6: 4639 mov r1, r7 80261d8: 2300 movs r3, #0 80261da: 2200 movs r2, #0 80261dc: f7ea feb2 bl 8010f44 80261e0: 4603 mov r3, r0 80261e2: 2b00 cmp r3, #0 80261e4: d102 bne.n 80261ec #endif { result = ERR_OK; 80261e6: 2300 movs r3, #0 80261e8: 73fb strb r3, [r7, #15] 80261ea: e001 b.n 80261f0 } else { // could not post, queue must be full result = ERR_MEM; 80261ec: 23ff movs r3, #255 @ 0xff 80261ee: 73fb strb r3, [r7, #15] #if SYS_STATS lwip_stats.sys.mbox.err++; #endif /* SYS_STATS */ } return result; 80261f0: f997 300f ldrsb.w r3, [r7, #15] } 80261f4: 4618 mov r0, r3 80261f6: 3710 adds r7, #16 80261f8: 46bd mov sp, r7 80261fa: bd80 pop {r7, pc} 080261fc : 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) { 80261fc: b580 push {r7, lr} 80261fe: b086 sub sp, #24 8026200: af00 add r7, sp, #0 8026202: 60f8 str r0, [r7, #12] 8026204: 60b9 str r1, [r7, #8] 8026206: 607a str r2, [r7, #4] #if (osCMSIS < 0x20000U) osEvent event; uint32_t starttime = osKernelSysTick(); #else osStatus_t status; uint32_t starttime = osKernelGetTickCount(); 8026208: f7ea fb08 bl 801081c 802620c: 6178 str r0, [r7, #20] #endif if(timeout != 0) 802620e: 687b ldr r3, [r7, #4] 8026210: 2b00 cmp r3, #0 8026212: d013 beq.n 802623c { *msg = (void *)event.value.v; return (osKernelSysTick() - starttime); } #else status = osMessageQueueGet(*mbox, msg, 0, timeout); 8026214: 68fb ldr r3, [r7, #12] 8026216: 6818 ldr r0, [r3, #0] 8026218: 687b ldr r3, [r7, #4] 802621a: 2200 movs r2, #0 802621c: 68b9 ldr r1, [r7, #8] 802621e: f7ea fef1 bl 8011004 8026222: 6138 str r0, [r7, #16] if (status == osOK) 8026224: 693b ldr r3, [r7, #16] 8026226: 2b00 cmp r3, #0 8026228: d105 bne.n 8026236 { return (osKernelGetTickCount() - starttime); 802622a: f7ea faf7 bl 801081c 802622e: 4602 mov r2, r0 8026230: 697b ldr r3, [r7, #20] 8026232: 1ad3 subs r3, r2, r3 8026234: e00f b.n 8026256 } #endif else { return SYS_ARCH_TIMEOUT; 8026236: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802623a: e00c b.n 8026256 #if (osCMSIS < 0x20000U) event = osMessageGet (*mbox, osWaitForever); *msg = (void *)event.value.v; return (osKernelSysTick() - starttime); #else osMessageQueueGet(*mbox, msg, 0, osWaitForever ); 802623c: 68fb ldr r3, [r7, #12] 802623e: 6818 ldr r0, [r3, #0] 8026240: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026244: 2200 movs r2, #0 8026246: 68b9 ldr r1, [r7, #8] 8026248: f7ea fedc bl 8011004 return (osKernelGetTickCount() - starttime); 802624c: f7ea fae6 bl 801081c 8026250: 4602 mov r2, r0 8026252: 697b ldr r3, [r7, #20] 8026254: 1ad3 subs r3, r2, r3 #endif } } 8026256: 4618 mov r0, r3 8026258: 3718 adds r7, #24 802625a: 46bd mov sp, r7 802625c: bd80 pop {r7, pc} 0802625e : /* 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) { 802625e: b580 push {r7, lr} 8026260: b082 sub sp, #8 8026262: af00 add r7, sp, #0 8026264: 6078 str r0, [r7, #4] 8026266: 6039 str r1, [r7, #0] if(event.status == osEventMessage) { *msg = (void *)event.value.v; #else if (osMessageQueueGet(*mbox, msg, 0, 0) == osOK) 8026268: 687b ldr r3, [r7, #4] 802626a: 6818 ldr r0, [r3, #0] 802626c: 2300 movs r3, #0 802626e: 2200 movs r2, #0 8026270: 6839 ldr r1, [r7, #0] 8026272: f7ea fec7 bl 8011004 8026276: 4603 mov r3, r0 8026278: 2b00 cmp r3, #0 802627a: d101 bne.n 8026280 { #endif return ERR_OK; 802627c: 2300 movs r3, #0 802627e: e001 b.n 8026284 } else { return SYS_MBOX_EMPTY; 8026280: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } } 8026284: 4618 mov r0, r3 8026286: 3708 adds r7, #8 8026288: 46bd mov sp, r7 802628a: bd80 pop {r7, pc} 0802628c : /*----------------------------------------------------------------------------------*/ int sys_mbox_valid(sys_mbox_t *mbox) { 802628c: b480 push {r7} 802628e: b083 sub sp, #12 8026290: af00 add r7, sp, #0 8026292: 6078 str r0, [r7, #4] if (*mbox == SYS_MBOX_NULL) 8026294: 687b ldr r3, [r7, #4] 8026296: 681b ldr r3, [r3, #0] 8026298: 2b00 cmp r3, #0 802629a: d101 bne.n 80262a0 return 0; 802629c: 2300 movs r3, #0 802629e: e000 b.n 80262a2 else return 1; 80262a0: 2301 movs r3, #1 } 80262a2: 4618 mov r0, r3 80262a4: 370c adds r7, #12 80262a6: 46bd mov sp, r7 80262a8: f85d 7b04 ldr.w r7, [sp], #4 80262ac: 4770 bx lr 080262ae : /*-----------------------------------------------------------------------------------*/ void sys_mbox_set_invalid(sys_mbox_t *mbox) { 80262ae: b480 push {r7} 80262b0: b083 sub sp, #12 80262b2: af00 add r7, sp, #0 80262b4: 6078 str r0, [r7, #4] *mbox = SYS_MBOX_NULL; 80262b6: 687b ldr r3, [r7, #4] 80262b8: 2200 movs r2, #0 80262ba: 601a str r2, [r3, #0] } 80262bc: bf00 nop 80262be: 370c adds r7, #12 80262c0: 46bd mov sp, r7 80262c2: f85d 7b04 ldr.w r7, [sp], #4 80262c6: 4770 bx lr 080262c8 : /*-----------------------------------------------------------------------------------*/ // 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) { 80262c8: b580 push {r7, lr} 80262ca: b082 sub sp, #8 80262cc: af00 add r7, sp, #0 80262ce: 6078 str r0, [r7, #4] 80262d0: 460b mov r3, r1 80262d2: 70fb strb r3, [r7, #3] #if (osCMSIS < 0x20000U) osSemaphoreDef(SEM); *sem = osSemaphoreCreate (osSemaphore(SEM), 1); #else *sem = osSemaphoreNew(UINT16_MAX, count, NULL); 80262d4: 78fb ldrb r3, [r7, #3] 80262d6: 2200 movs r2, #0 80262d8: 4619 mov r1, r3 80262da: f64f 70ff movw r0, #65535 @ 0xffff 80262de: f7ea fc79 bl 8010bd4 80262e2: 4602 mov r2, r0 80262e4: 687b ldr r3, [r7, #4] 80262e6: 601a str r2, [r3, #0] #endif if(*sem == NULL) 80262e8: 687b ldr r3, [r7, #4] 80262ea: 681b ldr r3, [r3, #0] 80262ec: 2b00 cmp r3, #0 80262ee: d102 bne.n 80262f6 { #if SYS_STATS ++lwip_stats.sys.sem.err; #endif /* SYS_STATS */ return ERR_MEM; 80262f0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80262f4: e009 b.n 802630a } if(count == 0) // Means it can't be taken 80262f6: 78fb ldrb r3, [r7, #3] 80262f8: 2b00 cmp r3, #0 80262fa: d105 bne.n 8026308 { #if (osCMSIS < 0x20000U) osSemaphoreWait(*sem, 0); #else osSemaphoreAcquire(*sem, 0); 80262fc: 687b ldr r3, [r7, #4] 80262fe: 681b ldr r3, [r3, #0] 8026300: 2100 movs r1, #0 8026302: 4618 mov r0, r3 8026304: f7ea fcf0 bl 8010ce8 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; 8026308: 2300 movs r3, #0 } 802630a: 4618 mov r0, r3 802630c: 3708 adds r7, #8 802630e: 46bd mov sp, r7 8026310: bd80 pop {r7, pc} 08026312 : 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) { 8026312: b580 push {r7, lr} 8026314: b084 sub sp, #16 8026316: af00 add r7, sp, #0 8026318: 6078 str r0, [r7, #4] 802631a: 6039 str r1, [r7, #0] #if (osCMSIS < 0x20000U) uint32_t starttime = osKernelSysTick(); #else uint32_t starttime = osKernelGetTickCount(); 802631c: f7ea fa7e bl 801081c 8026320: 60f8 str r0, [r7, #12] #endif if(timeout != 0) 8026322: 683b ldr r3, [r7, #0] 8026324: 2b00 cmp r3, #0 8026326: d011 beq.n 802634c #if (osCMSIS < 0x20000U) if(osSemaphoreWait (*sem, timeout) == osOK) { return (osKernelSysTick() - starttime); #else if(osSemaphoreAcquire(*sem, timeout) == osOK) 8026328: 687b ldr r3, [r7, #4] 802632a: 681b ldr r3, [r3, #0] 802632c: 6839 ldr r1, [r7, #0] 802632e: 4618 mov r0, r3 8026330: f7ea fcda bl 8010ce8 8026334: 4603 mov r3, r0 8026336: 2b00 cmp r3, #0 8026338: d105 bne.n 8026346 { return (osKernelGetTickCount() - starttime); 802633a: f7ea fa6f bl 801081c 802633e: 4602 mov r2, r0 8026340: 68fb ldr r3, [r7, #12] 8026342: 1ad3 subs r3, r2, r3 8026344: e012 b.n 802636c #endif } else { return SYS_ARCH_TIMEOUT; 8026346: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802634a: e00f b.n 802636c { #if (osCMSIS < 0x20000U) while(osSemaphoreWait (*sem, osWaitForever) != osOK); return (osKernelSysTick() - starttime); #else while(osSemaphoreAcquire(*sem, osWaitForever) != osOK); 802634c: bf00 nop 802634e: 687b ldr r3, [r7, #4] 8026350: 681b ldr r3, [r3, #0] 8026352: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8026356: 4618 mov r0, r3 8026358: f7ea fcc6 bl 8010ce8 802635c: 4603 mov r3, r0 802635e: 2b00 cmp r3, #0 8026360: d1f5 bne.n 802634e return (osKernelGetTickCount() - starttime); 8026362: f7ea fa5b bl 801081c 8026366: 4602 mov r2, r0 8026368: 68fb ldr r3, [r7, #12] 802636a: 1ad3 subs r3, r2, r3 #endif } } 802636c: 4618 mov r0, r3 802636e: 3710 adds r7, #16 8026370: 46bd mov sp, r7 8026372: bd80 pop {r7, pc} 08026374 : /*-----------------------------------------------------------------------------------*/ // Signals a semaphore void sys_sem_signal(sys_sem_t *sem) { 8026374: b580 push {r7, lr} 8026376: b082 sub sp, #8 8026378: af00 add r7, sp, #0 802637a: 6078 str r0, [r7, #4] osSemaphoreRelease(*sem); 802637c: 687b ldr r3, [r7, #4] 802637e: 681b ldr r3, [r3, #0] 8026380: 4618 mov r0, r3 8026382: f7ea fd03 bl 8010d8c } 8026386: bf00 nop 8026388: 3708 adds r7, #8 802638a: 46bd mov sp, r7 802638c: bd80 pop {r7, pc} 0802638e : /*-----------------------------------------------------------------------------------*/ // Deallocates a semaphore void sys_sem_free(sys_sem_t *sem) { 802638e: b580 push {r7, lr} 8026390: b082 sub sp, #8 8026392: af00 add r7, sp, #0 8026394: 6078 str r0, [r7, #4] #if SYS_STATS --lwip_stats.sys.sem.used; #endif /* SYS_STATS */ osSemaphoreDelete(*sem); 8026396: 687b ldr r3, [r7, #4] 8026398: 681b ldr r3, [r3, #0] 802639a: 4618 mov r0, r3 802639c: f7ea fd3a bl 8010e14 } 80263a0: bf00 nop 80263a2: 3708 adds r7, #8 80263a4: 46bd mov sp, r7 80263a6: bd80 pop {r7, pc} 080263a8 : /*-----------------------------------------------------------------------------------*/ int sys_sem_valid(sys_sem_t *sem) { 80263a8: b480 push {r7} 80263aa: b083 sub sp, #12 80263ac: af00 add r7, sp, #0 80263ae: 6078 str r0, [r7, #4] if (*sem == SYS_SEM_NULL) 80263b0: 687b ldr r3, [r7, #4] 80263b2: 681b ldr r3, [r3, #0] 80263b4: 2b00 cmp r3, #0 80263b6: d101 bne.n 80263bc return 0; 80263b8: 2300 movs r3, #0 80263ba: e000 b.n 80263be else return 1; 80263bc: 2301 movs r3, #1 } 80263be: 4618 mov r0, r3 80263c0: 370c adds r7, #12 80263c2: 46bd mov sp, r7 80263c4: f85d 7b04 ldr.w r7, [sp], #4 80263c8: 4770 bx lr 080263ca : /*-----------------------------------------------------------------------------------*/ void sys_sem_set_invalid(sys_sem_t *sem) { 80263ca: b480 push {r7} 80263cc: b083 sub sp, #12 80263ce: af00 add r7, sp, #0 80263d0: 6078 str r0, [r7, #4] *sem = SYS_SEM_NULL; 80263d2: 687b ldr r3, [r7, #4] 80263d4: 2200 movs r2, #0 80263d6: 601a str r2, [r3, #0] } 80263d8: bf00 nop 80263da: 370c adds r7, #12 80263dc: 46bd mov sp, r7 80263de: f85d 7b04 ldr.w r7, [sp], #4 80263e2: 4770 bx lr 080263e4 : #else osMutexId_t lwip_sys_mutex; #endif // Initialize sys arch void sys_init(void) { 80263e4: b580 push {r7, lr} 80263e6: af00 add r7, sp, #0 #if (osCMSIS < 0x20000U) lwip_sys_mutex = osMutexCreate(osMutex(lwip_sys_mutex)); #else lwip_sys_mutex = osMutexNew(NULL); 80263e8: 2000 movs r0, #0 80263ea: f7ea fae5 bl 80109b8 80263ee: 4603 mov r3, r0 80263f0: 4a01 ldr r2, [pc, #4] @ (80263f8 ) 80263f2: 6013 str r3, [r2, #0] #endif } 80263f4: bf00 nop 80263f6: bd80 pop {r7, pc} 80263f8: 2402b02c .word 0x2402b02c 080263fc : /* Mutexes*/ /*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/ #if LWIP_COMPAT_MUTEX == 0 /* Create a new mutex*/ err_t sys_mutex_new(sys_mutex_t *mutex) { 80263fc: b580 push {r7, lr} 80263fe: b082 sub sp, #8 8026400: af00 add r7, sp, #0 8026402: 6078 str r0, [r7, #4] #if (osCMSIS < 0x20000U) osMutexDef(MUTEX); *mutex = osMutexCreate(osMutex(MUTEX)); #else *mutex = osMutexNew(NULL); 8026404: 2000 movs r0, #0 8026406: f7ea fad7 bl 80109b8 802640a: 4602 mov r2, r0 802640c: 687b ldr r3, [r7, #4] 802640e: 601a str r2, [r3, #0] #endif if(*mutex == NULL) 8026410: 687b ldr r3, [r7, #4] 8026412: 681b ldr r3, [r3, #0] 8026414: 2b00 cmp r3, #0 8026416: d102 bne.n 802641e { #if SYS_STATS ++lwip_stats.sys.mutex.err; #endif /* SYS_STATS */ return ERR_MEM; 8026418: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802641c: e000 b.n 8026420 ++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; 802641e: 2300 movs r3, #0 } 8026420: 4618 mov r0, r3 8026422: 3708 adds r7, #8 8026424: 46bd mov sp, r7 8026426: bd80 pop {r7, pc} 08026428 : osMutexDelete(*mutex); } /*-----------------------------------------------------------------------------------*/ /* Lock a mutex*/ void sys_mutex_lock(sys_mutex_t *mutex) { 8026428: b580 push {r7, lr} 802642a: b082 sub sp, #8 802642c: af00 add r7, sp, #0 802642e: 6078 str r0, [r7, #4] #if (osCMSIS < 0x20000U) osMutexWait(*mutex, osWaitForever); #else osMutexAcquire(*mutex, osWaitForever); 8026430: 687b ldr r3, [r7, #4] 8026432: 681b ldr r3, [r3, #0] 8026434: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8026438: 4618 mov r0, r3 802643a: f7ea fb43 bl 8010ac4 #endif } 802643e: bf00 nop 8026440: 3708 adds r7, #8 8026442: 46bd mov sp, r7 8026444: bd80 pop {r7, pc} 08026446 : /*-----------------------------------------------------------------------------------*/ /* Unlock a mutex*/ void sys_mutex_unlock(sys_mutex_t *mutex) { 8026446: b580 push {r7, lr} 8026448: b082 sub sp, #8 802644a: af00 add r7, sp, #0 802644c: 6078 str r0, [r7, #4] osMutexRelease(*mutex); 802644e: 687b ldr r3, [r7, #4] 8026450: 681b ldr r3, [r3, #0] 8026452: 4618 mov r0, r3 8026454: f7ea fb81 bl 8010b5a } 8026458: bf00 nop 802645a: 3708 adds r7, #8 802645c: 46bd mov sp, r7 802645e: bd80 pop {r7, pc} 08026460 : 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) { 8026460: b580 push {r7, lr} 8026462: b08e sub sp, #56 @ 0x38 8026464: af00 add r7, sp, #0 8026466: 60f8 str r0, [r7, #12] 8026468: 60b9 str r1, [r7, #8] 802646a: 607a str r2, [r7, #4] 802646c: 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 = { 802646e: f107 0314 add.w r3, r7, #20 8026472: 2224 movs r2, #36 @ 0x24 8026474: 2100 movs r1, #0 8026476: 4618 mov r0, r3 8026478: f003 fc3a bl 8029cf0 802647c: 68fb ldr r3, [r7, #12] 802647e: 617b str r3, [r7, #20] 8026480: 683b ldr r3, [r7, #0] 8026482: 62bb str r3, [r7, #40] @ 0x28 8026484: 6c3b ldr r3, [r7, #64] @ 0x40 8026486: 62fb str r3, [r7, #44] @ 0x2c .name = name, .stack_size = stacksize, .priority = (osPriority_t)prio, }; return osThreadNew(thread, arg, &attributes); 8026488: f107 0314 add.w r3, r7, #20 802648c: 461a mov r2, r3 802648e: 6879 ldr r1, [r7, #4] 8026490: 68b8 ldr r0, [r7, #8] 8026492: f7ea f9d8 bl 8010846 8026496: 4603 mov r3, r0 #endif } 8026498: 4618 mov r0, r3 802649a: 3738 adds r7, #56 @ 0x38 802649c: 46bd mov sp, r7 802649e: bd80 pop {r7, pc} 080264a0 : Note: This function is based on FreeRTOS API, because no equivalent CMSIS-RTOS API is available */ sys_prot_t sys_arch_protect(void) { 80264a0: b580 push {r7, lr} 80264a2: af00 add r7, sp, #0 #if (osCMSIS < 0x20000U) osMutexWait(lwip_sys_mutex, osWaitForever); #else osMutexAcquire(lwip_sys_mutex, osWaitForever); 80264a4: 4b04 ldr r3, [pc, #16] @ (80264b8 ) 80264a6: 681b ldr r3, [r3, #0] 80264a8: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80264ac: 4618 mov r0, r3 80264ae: f7ea fb09 bl 8010ac4 #endif return (sys_prot_t)1; 80264b2: 2301 movs r3, #1 } 80264b4: 4618 mov r0, r3 80264b6: bd80 pop {r7, pc} 80264b8: 2402b02c .word 0x2402b02c 080264bc : Note: This function is based on FreeRTOS API, because no equivalent CMSIS-RTOS API is available */ void sys_arch_unprotect(sys_prot_t pval) { 80264bc: b580 push {r7, lr} 80264be: b082 sub sp, #8 80264c0: af00 add r7, sp, #0 80264c2: 6078 str r0, [r7, #4] ( void ) pval; osMutexRelease(lwip_sys_mutex); 80264c4: 4b04 ldr r3, [pc, #16] @ (80264d8 ) 80264c6: 681b ldr r3, [r3, #0] 80264c8: 4618 mov r0, r3 80264ca: f7ea fb46 bl 8010b5a } 80264ce: bf00 nop 80264d0: 3708 adds r7, #8 80264d2: 46bd mov sp, r7 80264d4: bd80 pop {r7, pc} 80264d6: bf00 nop 80264d8: 2402b02c .word 0x2402b02c 080264dc : #include //#include "cmsis_os.h" osMutexId_t mqttMutex; static void NewMessageData(MessageData* md, MQTTString* aTopicName, MQTTMessage* aMessage) { 80264dc: b480 push {r7} 80264de: b085 sub sp, #20 80264e0: af00 add r7, sp, #0 80264e2: 60f8 str r0, [r7, #12] 80264e4: 60b9 str r1, [r7, #8] 80264e6: 607a str r2, [r7, #4] md->topicName = aTopicName; 80264e8: 68fb ldr r3, [r7, #12] 80264ea: 68ba ldr r2, [r7, #8] 80264ec: 605a str r2, [r3, #4] md->message = aMessage; 80264ee: 68fb ldr r3, [r7, #12] 80264f0: 687a ldr r2, [r7, #4] 80264f2: 601a str r2, [r3, #0] } 80264f4: bf00 nop 80264f6: 3714 adds r7, #20 80264f8: 46bd mov sp, r7 80264fa: f85d 7b04 ldr.w r7, [sp], #4 80264fe: 4770 bx lr 08026500 : static int getNextPacketId(MQTTClient *c) { 8026500: b480 push {r7} 8026502: b083 sub sp, #12 8026504: af00 add r7, sp, #0 8026506: 6078 str r0, [r7, #4] return c->next_packetid = (c->next_packetid == MAX_PACKET_ID) ? 1 : c->next_packetid + 1; 8026508: 687b ldr r3, [r7, #4] 802650a: 681b ldr r3, [r3, #0] 802650c: f64f 72ff movw r2, #65535 @ 0xffff 8026510: 4293 cmp r3, r2 8026512: d003 beq.n 802651c 8026514: 687b ldr r3, [r7, #4] 8026516: 681b ldr r3, [r3, #0] 8026518: 3301 adds r3, #1 802651a: e000 b.n 802651e 802651c: 2301 movs r3, #1 802651e: 687a ldr r2, [r7, #4] 8026520: 6013 str r3, [r2, #0] 8026522: 687b ldr r3, [r7, #4] 8026524: 681b ldr r3, [r3, #0] } 8026526: 4618 mov r0, r3 8026528: 370c adds r7, #12 802652a: 46bd mov sp, r7 802652c: f85d 7b04 ldr.w r7, [sp], #4 8026530: 4770 bx lr 08026532 : static int sendPacket(MQTTClient* c, int length, Timer* timer) { 8026532: b5f0 push {r4, r5, r6, r7, lr} 8026534: b087 sub sp, #28 8026536: af00 add r7, sp, #0 8026538: 60f8 str r0, [r7, #12] 802653a: 60b9 str r1, [r7, #8] 802653c: 607a str r2, [r7, #4] int rc = FAILURE, 802653e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026542: 617b str r3, [r7, #20] sent = 0; 8026544: 2300 movs r3, #0 8026546: 613b str r3, [r7, #16] while (sent < length && !TimerIsExpired(timer)) 8026548: e018 b.n 802657c { rc = c->ipstack->mqttwrite(c->ipstack, &c->buf[sent], length, TimerLeftMS(timer)); 802654a: 68fb ldr r3, [r7, #12] 802654c: 6d5b ldr r3, [r3, #84] @ 0x54 802654e: 689c ldr r4, [r3, #8] 8026550: 68fb ldr r3, [r7, #12] 8026552: 6d5d ldr r5, [r3, #84] @ 0x54 8026554: 68fb ldr r3, [r7, #12] 8026556: 691a ldr r2, [r3, #16] 8026558: 693b ldr r3, [r7, #16] 802655a: 18d6 adds r6, r2, r3 802655c: 6878 ldr r0, [r7, #4] 802655e: f000 fed3 bl 8027308 8026562: 4603 mov r3, r0 8026564: 68ba ldr r2, [r7, #8] 8026566: 4631 mov r1, r6 8026568: 4628 mov r0, r5 802656a: 47a0 blx r4 802656c: 6178 str r0, [r7, #20] if (rc < 0) // there was an error writing the data 802656e: 697b ldr r3, [r7, #20] 8026570: 2b00 cmp r3, #0 8026572: db0e blt.n 8026592 break; sent += rc; 8026574: 693a ldr r2, [r7, #16] 8026576: 697b ldr r3, [r7, #20] 8026578: 4413 add r3, r2 802657a: 613b str r3, [r7, #16] while (sent < length && !TimerIsExpired(timer)) 802657c: 693a ldr r2, [r7, #16] 802657e: 68bb ldr r3, [r7, #8] 8026580: 429a cmp r2, r3 8026582: da07 bge.n 8026594 8026584: 6878 ldr r0, [r7, #4] 8026586: f000 fe7d bl 8027284 802658a: 4603 mov r3, r0 802658c: 2b00 cmp r3, #0 802658e: d0dc beq.n 802654a 8026590: e000 b.n 8026594 break; 8026592: bf00 nop } if (sent == length) 8026594: 693a ldr r2, [r7, #16] 8026596: 68bb ldr r3, [r7, #8] 8026598: 429a cmp r2, r3 802659a: d10b bne.n 80265b4 { TimerCountdown(&c->last_sent, c->keepAliveInterval); // record the fact that we have MQTT_SUCCESSfully sent the packet 802659c: 68fb ldr r3, [r7, #12] 802659e: f103 0258 add.w r2, r3, #88 @ 0x58 80265a2: 68fb ldr r3, [r7, #12] 80265a4: 699b ldr r3, [r3, #24] 80265a6: 4619 mov r1, r3 80265a8: 4610 mov r0, r2 80265aa: f000 fe95 bl 80272d8 rc = MQTT_SUCCESS; 80265ae: 2300 movs r3, #0 80265b0: 617b str r3, [r7, #20] 80265b2: e002 b.n 80265ba } else rc = FAILURE; 80265b4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80265b8: 617b str r3, [r7, #20] return rc; 80265ba: 697b ldr r3, [r7, #20] } 80265bc: 4618 mov r0, r3 80265be: 371c adds r7, #28 80265c0: 46bd mov sp, r7 80265c2: bdf0 pop {r4, r5, r6, r7, pc} 080265c4 : 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) { 80265c4: b580 push {r7, lr} 80265c6: b086 sub sp, #24 80265c8: af00 add r7, sp, #0 80265ca: 60f8 str r0, [r7, #12] 80265cc: 60b9 str r1, [r7, #8] 80265ce: 607a str r2, [r7, #4] 80265d0: 603b str r3, [r7, #0] int i; c->ipstack = network; 80265d2: 68fb ldr r3, [r7, #12] 80265d4: 68ba ldr r2, [r7, #8] 80265d6: 655a str r2, [r3, #84] @ 0x54 for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 80265d8: 2300 movs r3, #0 80265da: 617b str r3, [r7, #20] 80265dc: e008 b.n 80265f0 c->messageHandlers[i].topicFilter = 0; 80265de: 68fb ldr r3, [r7, #12] 80265e0: 697a ldr r2, [r7, #20] 80265e2: 3205 adds r2, #5 80265e4: 2100 movs r1, #0 80265e6: f843 1032 str.w r1, [r3, r2, lsl #3] for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 80265ea: 697b ldr r3, [r7, #20] 80265ec: 3301 adds r3, #1 80265ee: 617b str r3, [r7, #20] 80265f0: 697b ldr r3, [r7, #20] 80265f2: 2b04 cmp r3, #4 80265f4: ddf3 ble.n 80265de c->command_timeout_ms = command_timeout_ms; 80265f6: 68fb ldr r3, [r7, #12] 80265f8: 687a ldr r2, [r7, #4] 80265fa: 605a str r2, [r3, #4] c->buf = sendbuf; 80265fc: 68fb ldr r3, [r7, #12] 80265fe: 683a ldr r2, [r7, #0] 8026600: 611a str r2, [r3, #16] c->buf_size = sendbuf_size; 8026602: 68fb ldr r3, [r7, #12] 8026604: 6a3a ldr r2, [r7, #32] 8026606: 609a str r2, [r3, #8] c->readbuf = readbuf; 8026608: 68fb ldr r3, [r7, #12] 802660a: 6a7a ldr r2, [r7, #36] @ 0x24 802660c: 615a str r2, [r3, #20] c->readbuf_size = readbuf_size; 802660e: 68fb ldr r3, [r7, #12] 8026610: 6aba ldr r2, [r7, #40] @ 0x28 8026612: 60da str r2, [r3, #12] c->isconnected = 0; 8026614: 68fb ldr r3, [r7, #12] 8026616: 2200 movs r2, #0 8026618: 621a str r2, [r3, #32] c->cleansession = 0; 802661a: 68fb ldr r3, [r7, #12] 802661c: 2200 movs r2, #0 802661e: 625a str r2, [r3, #36] @ 0x24 c->ping_outstanding = 0; 8026620: 68fb ldr r3, [r7, #12] 8026622: 2200 movs r2, #0 8026624: 771a strb r2, [r3, #28] c->defaultMessageHandler = NULL; 8026626: 68fb ldr r3, [r7, #12] 8026628: 2200 movs r2, #0 802662a: 651a str r2, [r3, #80] @ 0x50 c->next_packetid = 1; 802662c: 68fb ldr r3, [r7, #12] 802662e: 2201 movs r2, #1 8026630: 601a str r2, [r3, #0] TimerInit(&c->last_sent); 8026632: 68fb ldr r3, [r7, #12] 8026634: 3358 adds r3, #88 @ 0x58 8026636: 4618 mov r0, r3 8026638: f000 fe7c bl 8027334 TimerInit(&c->last_received); 802663c: 68fb ldr r3, [r7, #12] 802663e: 3360 adds r3, #96 @ 0x60 8026640: 4618 mov r0, r3 8026642: f000 fe77 bl 8027334 #if defined(MQTT_TASK) MutexInit(&c->mutex); #endif if(mqttMutex == NULL) 8026646: 4b07 ldr r3, [pc, #28] @ (8026664 ) 8026648: 681b ldr r3, [r3, #0] 802664a: 2b00 cmp r3, #0 802664c: d105 bne.n 802665a { // osMutexDef(mqttMutex); // mqttMutex = osMutexNew(NULL); c->mutex = osMutexNew(NULL); 802664e: 2000 movs r0, #0 8026650: f7ea f9b2 bl 80109b8 8026654: 4602 mov r2, r0 8026656: 68fb ldr r3, [r7, #12] 8026658: 669a str r2, [r3, #104] @ 0x68 } } 802665a: bf00 nop 802665c: 3718 adds r7, #24 802665e: 46bd mov sp, r7 8026660: bd80 pop {r7, pc} 8026662: bf00 nop 8026664: 2402b030 .word 0x2402b030 08026668 : static int decodePacket(MQTTClient* c, int* value, int timeout) { 8026668: b590 push {r4, r7, lr} 802666a: b08b sub sp, #44 @ 0x2c 802666c: af00 add r7, sp, #0 802666e: 60f8 str r0, [r7, #12] 8026670: 60b9 str r1, [r7, #8] 8026672: 607a str r2, [r7, #4] unsigned char i; int multiplier = 1; 8026674: 2301 movs r3, #1 8026676: 627b str r3, [r7, #36] @ 0x24 int len = 0; 8026678: 2300 movs r3, #0 802667a: 623b str r3, [r7, #32] const int MAX_NO_OF_REMAINING_LENGTH_BYTES = 4; 802667c: 2304 movs r3, #4 802667e: 61fb str r3, [r7, #28] *value = 0; 8026680: 68bb ldr r3, [r7, #8] 8026682: 2200 movs r2, #0 8026684: 601a str r2, [r3, #0] do { int rc = MQTTPACKET_READ_ERROR; 8026686: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802668a: 61bb str r3, [r7, #24] if (++len > MAX_NO_OF_REMAINING_LENGTH_BYTES) 802668c: 6a3b ldr r3, [r7, #32] 802668e: 3301 adds r3, #1 8026690: 623b str r3, [r7, #32] 8026692: 6a3a ldr r2, [r7, #32] 8026694: 69fb ldr r3, [r7, #28] 8026696: 429a cmp r2, r3 8026698: dd03 ble.n 80266a2 { rc = MQTTPACKET_READ_ERROR; /* bad data */ 802669a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802669e: 61bb str r3, [r7, #24] goto exit; 80266a0: e021 b.n 80266e6 } rc = c->ipstack->mqttread(c->ipstack, &i, 1, timeout); 80266a2: 68fb ldr r3, [r7, #12] 80266a4: 6d5b ldr r3, [r3, #84] @ 0x54 80266a6: 685c ldr r4, [r3, #4] 80266a8: 68fb ldr r3, [r7, #12] 80266aa: 6d58 ldr r0, [r3, #84] @ 0x54 80266ac: f107 0117 add.w r1, r7, #23 80266b0: 687b ldr r3, [r7, #4] 80266b2: 2201 movs r2, #1 80266b4: 47a0 blx r4 80266b6: 61b8 str r0, [r7, #24] if (rc != 1) 80266b8: 69bb ldr r3, [r7, #24] 80266ba: 2b01 cmp r3, #1 80266bc: d112 bne.n 80266e4 goto exit; *value += (i & 127) * multiplier; 80266be: 68bb ldr r3, [r7, #8] 80266c0: 681a ldr r2, [r3, #0] 80266c2: 7dfb ldrb r3, [r7, #23] 80266c4: f003 037f and.w r3, r3, #127 @ 0x7f 80266c8: 6a79 ldr r1, [r7, #36] @ 0x24 80266ca: fb01 f303 mul.w r3, r1, r3 80266ce: 441a add r2, r3 80266d0: 68bb ldr r3, [r7, #8] 80266d2: 601a str r2, [r3, #0] multiplier *= 128; 80266d4: 6a7b ldr r3, [r7, #36] @ 0x24 80266d6: 01db lsls r3, r3, #7 80266d8: 627b str r3, [r7, #36] @ 0x24 } while ((i & 128) != 0); 80266da: 7dfb ldrb r3, [r7, #23] 80266dc: b25b sxtb r3, r3 80266de: 2b00 cmp r3, #0 80266e0: dbd1 blt.n 8026686 exit: 80266e2: e000 b.n 80266e6 goto exit; 80266e4: bf00 nop return len; 80266e6: 6a3b ldr r3, [r7, #32] } 80266e8: 4618 mov r0, r3 80266ea: 372c adds r7, #44 @ 0x2c 80266ec: 46bd mov sp, r7 80266ee: bd90 pop {r4, r7, pc} 080266f0 : static int readPacket(MQTTClient* c, Timer* timer) { 80266f0: b5f0 push {r4, r5, r6, r7, lr} 80266f2: b089 sub sp, #36 @ 0x24 80266f4: af00 add r7, sp, #0 80266f6: 60f8 str r0, [r7, #12] 80266f8: 60b9 str r1, [r7, #8] MQTTHeader header = {0}; 80266fa: 2300 movs r3, #0 80266fc: 617b str r3, [r7, #20] int len = 0; 80266fe: 2300 movs r3, #0 8026700: 61bb str r3, [r7, #24] int rem_len = 0; 8026702: 2300 movs r3, #0 8026704: 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)); 8026706: 68fb ldr r3, [r7, #12] 8026708: 6d5b ldr r3, [r3, #84] @ 0x54 802670a: 685c ldr r4, [r3, #4] 802670c: 68fb ldr r3, [r7, #12] 802670e: 6d5d ldr r5, [r3, #84] @ 0x54 8026710: 68fb ldr r3, [r7, #12] 8026712: 695e ldr r6, [r3, #20] 8026714: 68b8 ldr r0, [r7, #8] 8026716: f000 fdf7 bl 8027308 802671a: 4603 mov r3, r0 802671c: 2201 movs r2, #1 802671e: 4631 mov r1, r6 8026720: 4628 mov r0, r5 8026722: 47a0 blx r4 8026724: 61f8 str r0, [r7, #28] if (rc != 1) 8026726: 69fb ldr r3, [r7, #28] 8026728: 2b01 cmp r3, #1 802672a: d15d bne.n 80267e8 goto exit; len = 1; 802672c: 2301 movs r3, #1 802672e: 61bb str r3, [r7, #24] /* 2. read the remaining length. This is variable in itself */ decodePacket(c, &rem_len, TimerLeftMS(timer)); 8026730: 68b8 ldr r0, [r7, #8] 8026732: f000 fde9 bl 8027308 8026736: 4602 mov r2, r0 8026738: f107 0310 add.w r3, r7, #16 802673c: 4619 mov r1, r3 802673e: 68f8 ldr r0, [r7, #12] 8026740: f7ff ff92 bl 8026668 len += MQTTPacket_encode(c->readbuf + 1, rem_len); /* put the original remaining length back into the buffer */ 8026744: 68fb ldr r3, [r7, #12] 8026746: 695b ldr r3, [r3, #20] 8026748: 3301 adds r3, #1 802674a: 693a ldr r2, [r7, #16] 802674c: 4611 mov r1, r2 802674e: 4618 mov r0, r3 8026750: f001 f959 bl 8027a06 8026754: 4602 mov r2, r0 8026756: 69bb ldr r3, [r7, #24] 8026758: 4413 add r3, r2 802675a: 61bb str r3, [r7, #24] if (rem_len > (c->readbuf_size - len)) 802675c: 68fb ldr r3, [r7, #12] 802675e: 68da ldr r2, [r3, #12] 8026760: 69bb ldr r3, [r7, #24] 8026762: 1ad3 subs r3, r2, r3 8026764: 693a ldr r2, [r7, #16] 8026766: 4293 cmp r3, r2 8026768: d203 bcs.n 8026772 { rc = BUFFER_OVERFLOW; 802676a: f06f 0301 mvn.w r3, #1 802676e: 61fb str r3, [r7, #28] goto exit; 8026770: e03d b.n 80267ee } /* 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)) { 8026772: 693b ldr r3, [r7, #16] 8026774: 2b00 cmp r3, #0 8026776: dd20 ble.n 80267ba 8026778: 68fb ldr r3, [r7, #12] 802677a: 6d5b ldr r3, [r3, #84] @ 0x54 802677c: 685c ldr r4, [r3, #4] 802677e: 68fb ldr r3, [r7, #12] 8026780: 6d5d ldr r5, [r3, #84] @ 0x54 8026782: 68fb ldr r3, [r7, #12] 8026784: 695a ldr r2, [r3, #20] 8026786: 69bb ldr r3, [r7, #24] 8026788: 18d6 adds r6, r2, r3 802678a: 693b ldr r3, [r7, #16] 802678c: 607b str r3, [r7, #4] 802678e: 68b8 ldr r0, [r7, #8] 8026790: f000 fdba bl 8027308 8026794: 4603 mov r3, r0 8026796: 687a ldr r2, [r7, #4] 8026798: 4631 mov r1, r6 802679a: 4628 mov r0, r5 802679c: 47a0 blx r4 802679e: 4602 mov r2, r0 80267a0: 693b ldr r3, [r7, #16] 80267a2: 429a cmp r2, r3 80267a4: bf14 ite ne 80267a6: 2301 movne r3, #1 80267a8: 2300 moveq r3, #0 80267aa: b2db uxtb r3, r3 80267ac: 61fb str r3, [r7, #28] 80267ae: 69fb ldr r3, [r7, #28] 80267b0: 2b00 cmp r3, #0 80267b2: d002 beq.n 80267ba rc = 0; 80267b4: 2300 movs r3, #0 80267b6: 61fb str r3, [r7, #28] goto exit; 80267b8: e019 b.n 80267ee } header.byte = c->readbuf[0]; 80267ba: 68fb ldr r3, [r7, #12] 80267bc: 695b ldr r3, [r3, #20] 80267be: 781b ldrb r3, [r3, #0] 80267c0: 753b strb r3, [r7, #20] rc = header.bits.type; 80267c2: 7d3b ldrb r3, [r7, #20] 80267c4: f3c3 1303 ubfx r3, r3, #4, #4 80267c8: b2db uxtb r3, r3 80267ca: 61fb str r3, [r7, #28] if (c->keepAliveInterval > 0) 80267cc: 68fb ldr r3, [r7, #12] 80267ce: 699b ldr r3, [r3, #24] 80267d0: 2b00 cmp r3, #0 80267d2: d00b beq.n 80267ec TimerCountdown(&c->last_received, c->keepAliveInterval); // record the fact that we have MQTT_SUCCESSfully received a packet 80267d4: 68fb ldr r3, [r7, #12] 80267d6: f103 0260 add.w r2, r3, #96 @ 0x60 80267da: 68fb ldr r3, [r7, #12] 80267dc: 699b ldr r3, [r3, #24] 80267de: 4619 mov r1, r3 80267e0: 4610 mov r0, r2 80267e2: f000 fd79 bl 80272d8 80267e6: e002 b.n 80267ee goto exit; 80267e8: bf00 nop 80267ea: e000 b.n 80267ee exit: 80267ec: bf00 nop return rc; 80267ee: 69fb ldr r3, [r7, #28] } 80267f0: 4618 mov r0, r3 80267f2: 3724 adds r7, #36 @ 0x24 80267f4: 46bd mov sp, r7 80267f6: bdf0 pop {r4, r5, r6, r7, pc} 080267f8 : // 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) { 80267f8: b480 push {r7} 80267fa: b087 sub sp, #28 80267fc: af00 add r7, sp, #0 80267fe: 6078 str r0, [r7, #4] 8026800: 6039 str r1, [r7, #0] char* curf = topicFilter; 8026802: 687b ldr r3, [r7, #4] 8026804: 617b str r3, [r7, #20] char* curn = topicName->lenstring.data; 8026806: 683b ldr r3, [r7, #0] 8026808: 689b ldr r3, [r3, #8] 802680a: 613b str r3, [r7, #16] char* curn_end = curn + topicName->lenstring.len; 802680c: 683b ldr r3, [r7, #0] 802680e: 685b ldr r3, [r3, #4] 8026810: 461a mov r2, r3 8026812: 693b ldr r3, [r7, #16] 8026814: 4413 add r3, r2 8026816: 60bb str r3, [r7, #8] while (*curf && curn < curn_end) 8026818: e039 b.n 802688e { if (*curn == '/' && *curf != '/') 802681a: 693b ldr r3, [r7, #16] 802681c: 781b ldrb r3, [r3, #0] 802681e: 2b2f cmp r3, #47 @ 0x2f 8026820: d103 bne.n 802682a 8026822: 697b ldr r3, [r7, #20] 8026824: 781b ldrb r3, [r3, #0] 8026826: 2b2f cmp r3, #47 @ 0x2f 8026828: d13a bne.n 80268a0 break; if (*curf != '+' && *curf != '#' && *curf != *curn) 802682a: 697b ldr r3, [r7, #20] 802682c: 781b ldrb r3, [r3, #0] 802682e: 2b2b cmp r3, #43 @ 0x2b 8026830: d009 beq.n 8026846 8026832: 697b ldr r3, [r7, #20] 8026834: 781b ldrb r3, [r3, #0] 8026836: 2b23 cmp r3, #35 @ 0x23 8026838: d005 beq.n 8026846 802683a: 697b ldr r3, [r7, #20] 802683c: 781a ldrb r2, [r3, #0] 802683e: 693b ldr r3, [r7, #16] 8026840: 781b ldrb r3, [r3, #0] 8026842: 429a cmp r2, r3 8026844: d12e bne.n 80268a4 break; if (*curf == '+') 8026846: 697b ldr r3, [r7, #20] 8026848: 781b ldrb r3, [r3, #0] 802684a: 2b2b cmp r3, #43 @ 0x2b 802684c: d112 bne.n 8026874 { // skip until we meet the next separator, or end of string char* nextpos = curn + 1; 802684e: 693b ldr r3, [r7, #16] 8026850: 3301 adds r3, #1 8026852: 60fb str r3, [r7, #12] while (nextpos < curn_end && *nextpos != '/') 8026854: e005 b.n 8026862 nextpos = ++curn + 1; 8026856: 693b ldr r3, [r7, #16] 8026858: 3301 adds r3, #1 802685a: 613b str r3, [r7, #16] 802685c: 693b ldr r3, [r7, #16] 802685e: 3301 adds r3, #1 8026860: 60fb str r3, [r7, #12] while (nextpos < curn_end && *nextpos != '/') 8026862: 68fa ldr r2, [r7, #12] 8026864: 68bb ldr r3, [r7, #8] 8026866: 429a cmp r2, r3 8026868: d20b bcs.n 8026882 802686a: 68fb ldr r3, [r7, #12] 802686c: 781b ldrb r3, [r3, #0] 802686e: 2b2f cmp r3, #47 @ 0x2f 8026870: d1f1 bne.n 8026856 8026872: e006 b.n 8026882 } else if (*curf == '#') 8026874: 697b ldr r3, [r7, #20] 8026876: 781b ldrb r3, [r3, #0] 8026878: 2b23 cmp r3, #35 @ 0x23 802687a: d102 bne.n 8026882 curn = curn_end - 1; // skip until end of string 802687c: 68bb ldr r3, [r7, #8] 802687e: 3b01 subs r3, #1 8026880: 613b str r3, [r7, #16] curf++; 8026882: 697b ldr r3, [r7, #20] 8026884: 3301 adds r3, #1 8026886: 617b str r3, [r7, #20] curn++; 8026888: 693b ldr r3, [r7, #16] 802688a: 3301 adds r3, #1 802688c: 613b str r3, [r7, #16] while (*curf && curn < curn_end) 802688e: 697b ldr r3, [r7, #20] 8026890: 781b ldrb r3, [r3, #0] 8026892: 2b00 cmp r3, #0 8026894: d007 beq.n 80268a6 8026896: 693a ldr r2, [r7, #16] 8026898: 68bb ldr r3, [r7, #8] 802689a: 429a cmp r2, r3 802689c: d3bd bcc.n 802681a 802689e: e002 b.n 80268a6 break; 80268a0: bf00 nop 80268a2: e000 b.n 80268a6 break; 80268a4: bf00 nop }; return (curn == curn_end) && (*curf == '\0'); 80268a6: 693a ldr r2, [r7, #16] 80268a8: 68bb ldr r3, [r7, #8] 80268aa: 429a cmp r2, r3 80268ac: d105 bne.n 80268ba 80268ae: 697b ldr r3, [r7, #20] 80268b0: 781b ldrb r3, [r3, #0] 80268b2: 2b00 cmp r3, #0 80268b4: d101 bne.n 80268ba 80268b6: 2301 movs r3, #1 80268b8: e000 b.n 80268bc 80268ba: 2300 movs r3, #0 80268bc: b2db uxtb r3, r3 } 80268be: 4618 mov r0, r3 80268c0: 371c adds r7, #28 80268c2: 46bd mov sp, r7 80268c4: f85d 7b04 ldr.w r7, [sp], #4 80268c8: 4770 bx lr 080268ca : int deliverMessage(MQTTClient* c, MQTTString* topicName, MQTTMessage* message) { 80268ca: b580 push {r7, lr} 80268cc: b08a sub sp, #40 @ 0x28 80268ce: af00 add r7, sp, #0 80268d0: 60f8 str r0, [r7, #12] 80268d2: 60b9 str r1, [r7, #8] 80268d4: 607a str r2, [r7, #4] int i; int rc = FAILURE; 80268d6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80268da: 623b str r3, [r7, #32] // we have to find the right message handler - indexed by topic for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 80268dc: 2300 movs r3, #0 80268de: 627b str r3, [r7, #36] @ 0x24 80268e0: e03c b.n 802695c { if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) || 80268e2: 68fb ldr r3, [r7, #12] 80268e4: 6a7a ldr r2, [r7, #36] @ 0x24 80268e6: 3205 adds r2, #5 80268e8: f853 3032 ldr.w r3, [r3, r2, lsl #3] 80268ec: 2b00 cmp r3, #0 80268ee: d032 beq.n 8026956 80268f0: 68fb ldr r3, [r7, #12] 80268f2: 6a7a ldr r2, [r7, #36] @ 0x24 80268f4: 3205 adds r2, #5 80268f6: f853 3032 ldr.w r3, [r3, r2, lsl #3] 80268fa: 4619 mov r1, r3 80268fc: 68b8 ldr r0, [r7, #8] 80268fe: f001 fa51 bl 8027da4 8026902: 4603 mov r3, r0 8026904: 2b00 cmp r3, #0 8026906: d10b bne.n 8026920 isTopicMatched((char*)c->messageHandlers[i].topicFilter, topicName))) 8026908: 68fb ldr r3, [r7, #12] 802690a: 6a7a ldr r2, [r7, #36] @ 0x24 802690c: 3205 adds r2, #5 802690e: f853 3032 ldr.w r3, [r3, r2, lsl #3] 8026912: 68b9 ldr r1, [r7, #8] 8026914: 4618 mov r0, r3 8026916: f7ff ff6f bl 80267f8 802691a: 4603 mov r3, r0 if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) || 802691c: 2b00 cmp r3, #0 802691e: d01a beq.n 8026956 { if (c->messageHandlers[i].fp != NULL) 8026920: 68fa ldr r2, [r7, #12] 8026922: 6a7b ldr r3, [r7, #36] @ 0x24 8026924: 3305 adds r3, #5 8026926: 00db lsls r3, r3, #3 8026928: 4413 add r3, r2 802692a: 685b ldr r3, [r3, #4] 802692c: 2b00 cmp r3, #0 802692e: d012 beq.n 8026956 { MessageData md; NewMessageData(&md, topicName, message); 8026930: f107 0318 add.w r3, r7, #24 8026934: 687a ldr r2, [r7, #4] 8026936: 68b9 ldr r1, [r7, #8] 8026938: 4618 mov r0, r3 802693a: f7ff fdcf bl 80264dc c->messageHandlers[i].fp(&md); 802693e: 68fa ldr r2, [r7, #12] 8026940: 6a7b ldr r3, [r7, #36] @ 0x24 8026942: 3305 adds r3, #5 8026944: 00db lsls r3, r3, #3 8026946: 4413 add r3, r2 8026948: 685b ldr r3, [r3, #4] 802694a: f107 0218 add.w r2, r7, #24 802694e: 4610 mov r0, r2 8026950: 4798 blx r3 rc = MQTT_SUCCESS; 8026952: 2300 movs r3, #0 8026954: 623b str r3, [r7, #32] for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8026956: 6a7b ldr r3, [r7, #36] @ 0x24 8026958: 3301 adds r3, #1 802695a: 627b str r3, [r7, #36] @ 0x24 802695c: 6a7b ldr r3, [r7, #36] @ 0x24 802695e: 2b04 cmp r3, #4 8026960: ddbf ble.n 80268e2 } } } if (rc == FAILURE && c->defaultMessageHandler != NULL) 8026962: 6a3b ldr r3, [r7, #32] 8026964: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8026968: d112 bne.n 8026990 802696a: 68fb ldr r3, [r7, #12] 802696c: 6d1b ldr r3, [r3, #80] @ 0x50 802696e: 2b00 cmp r3, #0 8026970: d00e beq.n 8026990 { MessageData md; NewMessageData(&md, topicName, message); 8026972: f107 0310 add.w r3, r7, #16 8026976: 687a ldr r2, [r7, #4] 8026978: 68b9 ldr r1, [r7, #8] 802697a: 4618 mov r0, r3 802697c: f7ff fdae bl 80264dc c->defaultMessageHandler(&md); 8026980: 68fb ldr r3, [r7, #12] 8026982: 6d1b ldr r3, [r3, #80] @ 0x50 8026984: f107 0210 add.w r2, r7, #16 8026988: 4610 mov r0, r2 802698a: 4798 blx r3 rc = MQTT_SUCCESS; 802698c: 2300 movs r3, #0 802698e: 623b str r3, [r7, #32] } return rc; 8026990: 6a3b ldr r3, [r7, #32] } 8026992: 4618 mov r0, r3 8026994: 3728 adds r7, #40 @ 0x28 8026996: 46bd mov sp, r7 8026998: bd80 pop {r7, pc} 0802699a : int keepalive(MQTTClient* c) { 802699a: b580 push {r7, lr} 802699c: b086 sub sp, #24 802699e: af00 add r7, sp, #0 80269a0: 6078 str r0, [r7, #4] int rc = MQTT_SUCCESS; 80269a2: 2300 movs r3, #0 80269a4: 617b str r3, [r7, #20] if (c->keepAliveInterval == 0) 80269a6: 687b ldr r3, [r7, #4] 80269a8: 699b ldr r3, [r3, #24] 80269aa: 2b00 cmp r3, #0 80269ac: d03e beq.n 8026a2c goto exit; if (TimerIsExpired(&c->last_sent) || TimerIsExpired(&c->last_received)) 80269ae: 687b ldr r3, [r7, #4] 80269b0: 3358 adds r3, #88 @ 0x58 80269b2: 4618 mov r0, r3 80269b4: f000 fc66 bl 8027284 80269b8: 4603 mov r3, r0 80269ba: 2b00 cmp r3, #0 80269bc: d107 bne.n 80269ce 80269be: 687b ldr r3, [r7, #4] 80269c0: 3360 adds r3, #96 @ 0x60 80269c2: 4618 mov r0, r3 80269c4: f000 fc5e bl 8027284 80269c8: 4603 mov r3, r0 80269ca: 2b00 cmp r3, #0 80269cc: d030 beq.n 8026a30 { if (c->ping_outstanding) 80269ce: 687b ldr r3, [r7, #4] 80269d0: 7f1b ldrb r3, [r3, #28] 80269d2: 2b00 cmp r3, #0 80269d4: d003 beq.n 80269de rc = FAILURE; /* PINGRESP not received in keepalive interval */ 80269d6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80269da: 617b str r3, [r7, #20] 80269dc: e029 b.n 8026a32 else { Timer timer; TimerInit(&timer); 80269de: f107 0308 add.w r3, r7, #8 80269e2: 4618 mov r0, r3 80269e4: f000 fca6 bl 8027334 TimerCountdownMS(&timer, 1000); 80269e8: f107 0308 add.w r3, r7, #8 80269ec: f44f 717a mov.w r1, #1000 @ 0x3e8 80269f0: 4618 mov r0, r3 80269f2: f000 fc5d bl 80272b0 int len = MQTTSerialize_pingreq(c->buf, c->buf_size); 80269f6: 687b ldr r3, [r7, #4] 80269f8: 691a ldr r2, [r3, #16] 80269fa: 687b ldr r3, [r7, #4] 80269fc: 689b ldr r3, [r3, #8] 80269fe: 4619 mov r1, r3 8026a00: 4610 mov r0, r2 8026a02: f000 ff34 bl 802786e 8026a06: 6138 str r0, [r7, #16] if (len > 0 && (rc = sendPacket(c, len, &timer)) == MQTT_SUCCESS) // send the ping packet 8026a08: 693b ldr r3, [r7, #16] 8026a0a: 2b00 cmp r3, #0 8026a0c: dd11 ble.n 8026a32 8026a0e: f107 0308 add.w r3, r7, #8 8026a12: 461a mov r2, r3 8026a14: 6939 ldr r1, [r7, #16] 8026a16: 6878 ldr r0, [r7, #4] 8026a18: f7ff fd8b bl 8026532 8026a1c: 6178 str r0, [r7, #20] 8026a1e: 697b ldr r3, [r7, #20] 8026a20: 2b00 cmp r3, #0 8026a22: d106 bne.n 8026a32 c->ping_outstanding = 1; 8026a24: 687b ldr r3, [r7, #4] 8026a26: 2201 movs r2, #1 8026a28: 771a strb r2, [r3, #28] 8026a2a: e002 b.n 8026a32 goto exit; 8026a2c: bf00 nop 8026a2e: e000 b.n 8026a32 } } exit: 8026a30: bf00 nop return rc; 8026a32: 697b ldr r3, [r7, #20] } 8026a34: 4618 mov r0, r3 8026a36: 3718 adds r7, #24 8026a38: 46bd mov sp, r7 8026a3a: bd80 pop {r7, pc} 08026a3c : void MQTTCleanSession(MQTTClient* c) { 8026a3c: b480 push {r7} 8026a3e: b085 sub sp, #20 8026a40: af00 add r7, sp, #0 8026a42: 6078 str r0, [r7, #4] int i = 0; 8026a44: 2300 movs r3, #0 8026a46: 60fb str r3, [r7, #12] for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8026a48: 2300 movs r3, #0 8026a4a: 60fb str r3, [r7, #12] 8026a4c: e008 b.n 8026a60 c->messageHandlers[i].topicFilter = NULL; 8026a4e: 687b ldr r3, [r7, #4] 8026a50: 68fa ldr r2, [r7, #12] 8026a52: 3205 adds r2, #5 8026a54: 2100 movs r1, #0 8026a56: f843 1032 str.w r1, [r3, r2, lsl #3] for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8026a5a: 68fb ldr r3, [r7, #12] 8026a5c: 3301 adds r3, #1 8026a5e: 60fb str r3, [r7, #12] 8026a60: 68fb ldr r3, [r7, #12] 8026a62: 2b04 cmp r3, #4 8026a64: ddf3 ble.n 8026a4e } 8026a66: bf00 nop 8026a68: bf00 nop 8026a6a: 3714 adds r7, #20 8026a6c: 46bd mov sp, r7 8026a6e: f85d 7b04 ldr.w r7, [sp], #4 8026a72: 4770 bx lr 08026a74 : void MQTTCloseSession(MQTTClient* c) { 8026a74: b580 push {r7, lr} 8026a76: b082 sub sp, #8 8026a78: af00 add r7, sp, #0 8026a7a: 6078 str r0, [r7, #4] c->ping_outstanding = 0; 8026a7c: 687b ldr r3, [r7, #4] 8026a7e: 2200 movs r2, #0 8026a80: 771a strb r2, [r3, #28] c->isconnected = 0; 8026a82: 687b ldr r3, [r7, #4] 8026a84: 2200 movs r2, #0 8026a86: 621a str r2, [r3, #32] if (c->cleansession) 8026a88: 687b ldr r3, [r7, #4] 8026a8a: 6a5b ldr r3, [r3, #36] @ 0x24 8026a8c: 2b00 cmp r3, #0 8026a8e: d002 beq.n 8026a96 MQTTCleanSession(c); 8026a90: 6878 ldr r0, [r7, #4] 8026a92: f7ff ffd3 bl 8026a3c } 8026a96: bf00 nop 8026a98: 3708 adds r7, #8 8026a9a: 46bd mov sp, r7 8026a9c: bd80 pop {r7, pc} ... 08026aa0 : int cycle(MQTTClient* c, Timer* timer) { 8026aa0: b5f0 push {r4, r5, r6, r7, lr} 8026aa2: b095 sub sp, #84 @ 0x54 8026aa4: af06 add r7, sp, #24 8026aa6: 6078 str r0, [r7, #4] 8026aa8: 6039 str r1, [r7, #0] int len = 0, 8026aaa: 2300 movs r3, #0 8026aac: 637b str r3, [r7, #52] @ 0x34 rc = MQTT_SUCCESS; 8026aae: 2300 movs r3, #0 8026ab0: 633b str r3, [r7, #48] @ 0x30 int packet_type = readPacket(c, timer); /* read the socket, see what work is due */ 8026ab2: 6839 ldr r1, [r7, #0] 8026ab4: 6878 ldr r0, [r7, #4] 8026ab6: f7ff fe1b bl 80266f0 8026aba: 62f8 str r0, [r7, #44] @ 0x2c switch (packet_type) 8026abc: 6afb ldr r3, [r7, #44] @ 0x2c 8026abe: 2b0d cmp r3, #13 8026ac0: d81e bhi.n 8026b00 8026ac2: a201 add r2, pc, #4 @ (adr r2, 8026ac8 ) 8026ac4: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8026ac8: 08026c57 .word 0x08026c57 8026acc: 08026b01 .word 0x08026b01 8026ad0: 08026c57 .word 0x08026c57 8026ad4: 08026b07 .word 0x08026b07 8026ad8: 08026c57 .word 0x08026c57 8026adc: 08026bd3 .word 0x08026bd3 8026ae0: 08026bd3 .word 0x08026bd3 8026ae4: 08026c57 .word 0x08026c57 8026ae8: 08026b01 .word 0x08026b01 8026aec: 08026c57 .word 0x08026c57 8026af0: 08026b01 .word 0x08026b01 8026af4: 08026c57 .word 0x08026c57 8026af8: 08026b01 .word 0x08026b01 8026afc: 08026c4f .word 0x08026c4f { default: /* no more data to read, unrecoverable. Or read packet fails due to unexpected network error */ rc = packet_type; 8026b00: 6afb ldr r3, [r7, #44] @ 0x2c 8026b02: 633b str r3, [r7, #48] @ 0x30 goto exit; 8026b04: e0b9 b.n 8026c7a case PUBLISH: { MQTTString topicName; MQTTMessage msg; int intQoS; msg.payloadlen = 0; /* this is a size_t, but deserialize publish sets this as int */ 8026b06: 2300 movs r3, #0 8026b08: 61fb str r3, [r7, #28] if (MQTTDeserialize_publish(&msg.dup, &intQoS, &msg.retained, &msg.id, &topicName, 8026b0a: 687b ldr r3, [r7, #4] 8026b0c: 695b ldr r3, [r3, #20] (unsigned char**)&msg.payload, (int*)&msg.payloadlen, c->readbuf, c->readbuf_size) != 1) 8026b0e: 687a ldr r2, [r7, #4] 8026b10: 68d2 ldr r2, [r2, #12] if (MQTTDeserialize_publish(&msg.dup, &intQoS, &msg.retained, &msg.id, &topicName, 8026b12: 4616 mov r6, r2 8026b14: f107 0210 add.w r2, r7, #16 8026b18: 1d15 adds r5, r2, #4 8026b1a: f107 0210 add.w r2, r7, #16 8026b1e: 1c54 adds r4, r2, #1 8026b20: f107 010c add.w r1, r7, #12 8026b24: f107 0210 add.w r2, r7, #16 8026b28: 1c90 adds r0, r2, #2 8026b2a: 9604 str r6, [sp, #16] 8026b2c: 9303 str r3, [sp, #12] 8026b2e: f107 0310 add.w r3, r7, #16 8026b32: 330c adds r3, #12 8026b34: 9302 str r3, [sp, #8] 8026b36: f107 0310 add.w r3, r7, #16 8026b3a: 3308 adds r3, #8 8026b3c: 9301 str r3, [sp, #4] 8026b3e: f107 0320 add.w r3, r7, #32 8026b42: 9300 str r3, [sp, #0] 8026b44: 462b mov r3, r5 8026b46: 4622 mov r2, r4 8026b48: f000 fea0 bl 802788c 8026b4c: 4603 mov r3, r0 8026b4e: 2b01 cmp r3, #1 8026b50: f040 8090 bne.w 8026c74 goto exit; msg.qos = (enum QoS)intQoS; 8026b54: 68fb ldr r3, [r7, #12] 8026b56: b2db uxtb r3, r3 8026b58: 743b strb r3, [r7, #16] deliverMessage(c, &topicName, &msg); 8026b5a: f107 0210 add.w r2, r7, #16 8026b5e: f107 0320 add.w r3, r7, #32 8026b62: 4619 mov r1, r3 8026b64: 6878 ldr r0, [r7, #4] 8026b66: f7ff feb0 bl 80268ca if (msg.qos != QOS0) 8026b6a: 7c3b ldrb r3, [r7, #16] 8026b6c: 2b00 cmp r3, #0 8026b6e: d074 beq.n 8026c5a { if (msg.qos == QOS1) 8026b70: 7c3b ldrb r3, [r7, #16] 8026b72: 2b01 cmp r3, #1 8026b74: d10c bne.n 8026b90 len = MQTTSerialize_ack(c->buf, c->buf_size, PUBACK, 0, msg.id); 8026b76: 687b ldr r3, [r7, #4] 8026b78: 6918 ldr r0, [r3, #16] 8026b7a: 687b ldr r3, [r7, #4] 8026b7c: 689b ldr r3, [r3, #8] 8026b7e: 4619 mov r1, r3 8026b80: 8abb ldrh r3, [r7, #20] 8026b82: 9300 str r3, [sp, #0] 8026b84: 2300 movs r3, #0 8026b86: 2204 movs r2, #4 8026b88: f001 f9d9 bl 8027f3e 8026b8c: 6378 str r0, [r7, #52] @ 0x34 8026b8e: e00e b.n 8026bae else if (msg.qos == QOS2) 8026b90: 7c3b ldrb r3, [r7, #16] 8026b92: 2b02 cmp r3, #2 8026b94: d10b bne.n 8026bae len = MQTTSerialize_ack(c->buf, c->buf_size, PUBREC, 0, msg.id); 8026b96: 687b ldr r3, [r7, #4] 8026b98: 6918 ldr r0, [r3, #16] 8026b9a: 687b ldr r3, [r7, #4] 8026b9c: 689b ldr r3, [r3, #8] 8026b9e: 4619 mov r1, r3 8026ba0: 8abb ldrh r3, [r7, #20] 8026ba2: 9300 str r3, [sp, #0] 8026ba4: 2300 movs r3, #0 8026ba6: 2205 movs r2, #5 8026ba8: f001 f9c9 bl 8027f3e 8026bac: 6378 str r0, [r7, #52] @ 0x34 if (len <= 0) 8026bae: 6b7b ldr r3, [r7, #52] @ 0x34 8026bb0: 2b00 cmp r3, #0 8026bb2: dc03 bgt.n 8026bbc rc = FAILURE; 8026bb4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026bb8: 633b str r3, [r7, #48] @ 0x30 8026bba: e005 b.n 8026bc8 else rc = sendPacket(c, len, timer); 8026bbc: 683a ldr r2, [r7, #0] 8026bbe: 6b79 ldr r1, [r7, #52] @ 0x34 8026bc0: 6878 ldr r0, [r7, #4] 8026bc2: f7ff fcb6 bl 8026532 8026bc6: 6338 str r0, [r7, #48] @ 0x30 if (rc == FAILURE) 8026bc8: 6b3b ldr r3, [r7, #48] @ 0x30 8026bca: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8026bce: d144 bne.n 8026c5a goto exit; // there was a problem 8026bd0: e053 b.n 8026c7a case PUBREC: case PUBREL: { unsigned short mypacketid; unsigned char dup, type; if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1) 8026bd2: 687b ldr r3, [r7, #4] 8026bd4: 695c ldr r4, [r3, #20] 8026bd6: 687b ldr r3, [r7, #4] 8026bd8: 68db ldr r3, [r3, #12] 8026bda: f107 020a add.w r2, r7, #10 8026bde: f107 0109 add.w r1, r7, #9 8026be2: f107 0008 add.w r0, r7, #8 8026be6: 9300 str r3, [sp, #0] 8026be8: 4623 mov r3, r4 8026bea: f000 fec1 bl 8027970 8026bee: 4603 mov r3, r0 8026bf0: 2b01 cmp r3, #1 8026bf2: d003 beq.n 8026bfc rc = FAILURE; 8026bf4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026bf8: 633b str r3, [r7, #48] @ 0x30 8026bfa: e023 b.n 8026c44 else if ((len = MQTTSerialize_ack(c->buf, c->buf_size, 8026bfc: 687b ldr r3, [r7, #4] 8026bfe: 6918 ldr r0, [r3, #16] 8026c00: 687b ldr r3, [r7, #4] 8026c02: 689b ldr r3, [r3, #8] 8026c04: 4619 mov r1, r3 8026c06: 6afb ldr r3, [r7, #44] @ 0x2c 8026c08: 2b05 cmp r3, #5 8026c0a: d101 bne.n 8026c10 8026c0c: 2206 movs r2, #6 8026c0e: e000 b.n 8026c12 8026c10: 2207 movs r2, #7 8026c12: 897b ldrh r3, [r7, #10] 8026c14: 9300 str r3, [sp, #0] 8026c16: 2300 movs r3, #0 8026c18: f001 f991 bl 8027f3e 8026c1c: 6378 str r0, [r7, #52] @ 0x34 8026c1e: 6b7b ldr r3, [r7, #52] @ 0x34 8026c20: 2b00 cmp r3, #0 8026c22: dc03 bgt.n 8026c2c (packet_type == PUBREC) ? PUBREL : PUBCOMP, 0, mypacketid)) <= 0) rc = FAILURE; 8026c24: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026c28: 633b str r3, [r7, #48] @ 0x30 8026c2a: e00b b.n 8026c44 else if ((rc = sendPacket(c, len, timer)) != MQTT_SUCCESS) // send the PUBREL packet 8026c2c: 683a ldr r2, [r7, #0] 8026c2e: 6b79 ldr r1, [r7, #52] @ 0x34 8026c30: 6878 ldr r0, [r7, #4] 8026c32: f7ff fc7e bl 8026532 8026c36: 6338 str r0, [r7, #48] @ 0x30 8026c38: 6b3b ldr r3, [r7, #48] @ 0x30 8026c3a: 2b00 cmp r3, #0 8026c3c: d002 beq.n 8026c44 rc = FAILURE; // there was a problem 8026c3e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026c42: 633b str r3, [r7, #48] @ 0x30 if (rc == FAILURE) 8026c44: 6b3b ldr r3, [r7, #48] @ 0x30 8026c46: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8026c4a: d108 bne.n 8026c5e goto exit; // there was a problem 8026c4c: e015 b.n 8026c7a } case PUBCOMP: break; case PINGRESP: c->ping_outstanding = 0; 8026c4e: 687b ldr r3, [r7, #4] 8026c50: 2200 movs r2, #0 8026c52: 771a strb r2, [r3, #28] break; 8026c54: e004 b.n 8026c60 break; 8026c56: bf00 nop 8026c58: e002 b.n 8026c60 break; 8026c5a: bf00 nop 8026c5c: e000 b.n 8026c60 break; 8026c5e: bf00 nop } if (keepalive(c) != MQTT_SUCCESS) { 8026c60: 6878 ldr r0, [r7, #4] 8026c62: f7ff fe9a bl 802699a 8026c66: 4603 mov r3, r0 8026c68: 2b00 cmp r3, #0 8026c6a: d005 beq.n 8026c78 //check only keepalive FAILURE status so that previous FAILURE status can be considered as FAULT rc = FAILURE; 8026c6c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026c70: 633b str r3, [r7, #48] @ 0x30 8026c72: e002 b.n 8026c7a goto exit; 8026c74: bf00 nop 8026c76: e000 b.n 8026c7a } exit: 8026c78: bf00 nop if (rc == MQTT_SUCCESS) 8026c7a: 6b3b ldr r3, [r7, #48] @ 0x30 8026c7c: 2b00 cmp r3, #0 8026c7e: d102 bne.n 8026c86 rc = packet_type; 8026c80: 6afb ldr r3, [r7, #44] @ 0x2c 8026c82: 633b str r3, [r7, #48] @ 0x30 8026c84: e006 b.n 8026c94 else if (c->isconnected) 8026c86: 687b ldr r3, [r7, #4] 8026c88: 6a1b ldr r3, [r3, #32] 8026c8a: 2b00 cmp r3, #0 8026c8c: d002 beq.n 8026c94 MQTTCloseSession(c); 8026c8e: 6878 ldr r0, [r7, #4] 8026c90: f7ff fef0 bl 8026a74 return rc; 8026c94: 6b3b ldr r3, [r7, #48] @ 0x30 } 8026c96: 4618 mov r0, r3 8026c98: 373c adds r7, #60 @ 0x3c 8026c9a: 46bd mov sp, r7 8026c9c: bdf0 pop {r4, r5, r6, r7, pc} 8026c9e: bf00 nop 08026ca0 : int MQTTYield(MQTTClient* c, int timeout_ms) { 8026ca0: b580 push {r7, lr} 8026ca2: b086 sub sp, #24 8026ca4: af00 add r7, sp, #0 8026ca6: 6078 str r0, [r7, #4] 8026ca8: 6039 str r1, [r7, #0] int rc = MQTT_SUCCESS; 8026caa: 2300 movs r3, #0 8026cac: 617b str r3, [r7, #20] Timer timer; TimerInit(&timer); 8026cae: f107 030c add.w r3, r7, #12 8026cb2: 4618 mov r0, r3 8026cb4: f000 fb3e bl 8027334 TimerCountdownMS(&timer, timeout_ms); 8026cb8: 683a ldr r2, [r7, #0] 8026cba: f107 030c add.w r3, r7, #12 8026cbe: 4611 mov r1, r2 8026cc0: 4618 mov r0, r3 8026cc2: f000 faf5 bl 80272b0 do { if (cycle(c, &timer) < 0) 8026cc6: f107 030c add.w r3, r7, #12 8026cca: 4619 mov r1, r3 8026ccc: 6878 ldr r0, [r7, #4] 8026cce: f7ff fee7 bl 8026aa0 8026cd2: 4603 mov r3, r0 8026cd4: 2b00 cmp r3, #0 8026cd6: da03 bge.n 8026ce0 { rc = FAILURE; 8026cd8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026cdc: 617b str r3, [r7, #20] break; 8026cde: e007 b.n 8026cf0 } } while (!TimerIsExpired(&timer)); 8026ce0: f107 030c add.w r3, r7, #12 8026ce4: 4618 mov r0, r3 8026ce6: f000 facd bl 8027284 8026cea: 4603 mov r3, r0 8026cec: 2b00 cmp r3, #0 8026cee: d0ea beq.n 8026cc6 return rc; 8026cf0: 697b ldr r3, [r7, #20] } 8026cf2: 4618 mov r0, r3 8026cf4: 3718 adds r7, #24 8026cf6: 46bd mov sp, r7 8026cf8: bd80 pop {r7, pc} 08026cfa : } #endif int waitfor(MQTTClient* c, int packet_type, Timer* timer) { 8026cfa: b580 push {r7, lr} 8026cfc: b086 sub sp, #24 8026cfe: af00 add r7, sp, #0 8026d00: 60f8 str r0, [r7, #12] 8026d02: 60b9 str r1, [r7, #8] 8026d04: 607a str r2, [r7, #4] int rc = FAILURE; 8026d06: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026d0a: 617b str r3, [r7, #20] do { if (TimerIsExpired(timer)) 8026d0c: 6878 ldr r0, [r7, #4] 8026d0e: f000 fab9 bl 8027284 8026d12: 4603 mov r3, r0 8026d14: 2b00 cmp r3, #0 8026d16: d10c bne.n 8026d32 break; // we timed out rc = cycle(c, timer); 8026d18: 6879 ldr r1, [r7, #4] 8026d1a: 68f8 ldr r0, [r7, #12] 8026d1c: f7ff fec0 bl 8026aa0 8026d20: 6178 str r0, [r7, #20] } while (rc != packet_type && rc >= 0); 8026d22: 697a ldr r2, [r7, #20] 8026d24: 68bb ldr r3, [r7, #8] 8026d26: 429a cmp r2, r3 8026d28: d004 beq.n 8026d34 8026d2a: 697b ldr r3, [r7, #20] 8026d2c: 2b00 cmp r3, #0 8026d2e: daed bge.n 8026d0c 8026d30: e000 b.n 8026d34 break; // we timed out 8026d32: bf00 nop return rc; 8026d34: 697b ldr r3, [r7, #20] } 8026d36: 4618 mov r0, r3 8026d38: 3718 adds r7, #24 8026d3a: 46bd mov sp, r7 8026d3c: bd80 pop {r7, pc} ... 08026d40 : int MQTTConnectWithResults(MQTTClient* c, MQTTPacket_connectData* options, MQTTConnackData* data) { 8026d40: b580 push {r7, lr} 8026d42: b09e sub sp, #120 @ 0x78 8026d44: af00 add r7, sp, #0 8026d46: 60f8 str r0, [r7, #12] 8026d48: 60b9 str r1, [r7, #8] 8026d4a: 607a str r2, [r7, #4] Timer connect_timer; int rc = FAILURE; 8026d4c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026d50: 677b str r3, [r7, #116] @ 0x74 MQTTPacket_connectData default_options = MQTTPacket_connectData_initializer; 8026d52: 4a49 ldr r2, [pc, #292] @ (8026e78 ) 8026d54: f107 0310 add.w r3, r7, #16 8026d58: 4611 mov r1, r2 8026d5a: 2258 movs r2, #88 @ 0x58 8026d5c: 4618 mov r0, r3 8026d5e: f003 f8be bl 8029ede int len = 0; 8026d62: 2300 movs r3, #0 8026d64: 673b str r3, [r7, #112] @ 0x70 #if defined(MQTT_TASK) MutexLock(&c->mutex); #endif // osMutexAcquire(mqttMutex, osWaitForever); osMutexAcquire(c->mutex, osWaitForever); 8026d66: 68fb ldr r3, [r7, #12] 8026d68: 6e9b ldr r3, [r3, #104] @ 0x68 8026d6a: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8026d6e: 4618 mov r0, r3 8026d70: f7e9 fea8 bl 8010ac4 if (c->isconnected) /* don't send connect packet again if we are already connected */ 8026d74: 68fb ldr r3, [r7, #12] 8026d76: 6a1b ldr r3, [r3, #32] 8026d78: 2b00 cmp r3, #0 8026d7a: d164 bne.n 8026e46 goto exit; TimerInit(&connect_timer); 8026d7c: f107 0368 add.w r3, r7, #104 @ 0x68 8026d80: 4618 mov r0, r3 8026d82: f000 fad7 bl 8027334 TimerCountdownMS(&connect_timer, c->command_timeout_ms); 8026d86: 68fb ldr r3, [r7, #12] 8026d88: 685a ldr r2, [r3, #4] 8026d8a: f107 0368 add.w r3, r7, #104 @ 0x68 8026d8e: 4611 mov r1, r2 8026d90: 4618 mov r0, r3 8026d92: f000 fa8d bl 80272b0 if (options == 0) 8026d96: 68bb ldr r3, [r7, #8] 8026d98: 2b00 cmp r3, #0 8026d9a: d102 bne.n 8026da2 options = &default_options; /* set default options if none were supplied */ 8026d9c: f107 0310 add.w r3, r7, #16 8026da0: 60bb str r3, [r7, #8] c->keepAliveInterval = options->keepAliveInterval; 8026da2: 68bb ldr r3, [r7, #8] 8026da4: 8b1b ldrh r3, [r3, #24] 8026da6: 461a mov r2, r3 8026da8: 68fb ldr r3, [r7, #12] 8026daa: 619a str r2, [r3, #24] c->cleansession = options->cleansession; 8026dac: 68bb ldr r3, [r7, #8] 8026dae: 7e9b ldrb r3, [r3, #26] 8026db0: 461a mov r2, r3 8026db2: 68fb ldr r3, [r7, #12] 8026db4: 625a str r2, [r3, #36] @ 0x24 TimerCountdown(&c->last_received, c->keepAliveInterval); 8026db6: 68fb ldr r3, [r7, #12] 8026db8: f103 0260 add.w r2, r3, #96 @ 0x60 8026dbc: 68fb ldr r3, [r7, #12] 8026dbe: 699b ldr r3, [r3, #24] 8026dc0: 4619 mov r1, r3 8026dc2: 4610 mov r0, r2 8026dc4: f000 fa88 bl 80272d8 if ((len = MQTTSerialize_connect(c->buf, c->buf_size, options)) <= 0) 8026dc8: 68fb ldr r3, [r7, #12] 8026dca: 6918 ldr r0, [r3, #16] 8026dcc: 68fb ldr r3, [r7, #12] 8026dce: 689b ldr r3, [r3, #8] 8026dd0: 68ba ldr r2, [r7, #8] 8026dd2: 4619 mov r1, r3 8026dd4: f000 fbd2 bl 802757c 8026dd8: 6738 str r0, [r7, #112] @ 0x70 8026dda: 6f3b ldr r3, [r7, #112] @ 0x70 8026ddc: 2b00 cmp r3, #0 8026dde: dd34 ble.n 8026e4a goto exit; if ((rc = sendPacket(c, len, &connect_timer)) != MQTT_SUCCESS) // send the connect packet 8026de0: f107 0368 add.w r3, r7, #104 @ 0x68 8026de4: 461a mov r2, r3 8026de6: 6f39 ldr r1, [r7, #112] @ 0x70 8026de8: 68f8 ldr r0, [r7, #12] 8026dea: f7ff fba2 bl 8026532 8026dee: 6778 str r0, [r7, #116] @ 0x74 8026df0: 6f7b ldr r3, [r7, #116] @ 0x74 8026df2: 2b00 cmp r3, #0 8026df4: d12b bne.n 8026e4e goto exit; // there was a problem // this will be a blocking call, wait for the connack if (waitfor(c, CONNACK, &connect_timer) == CONNACK) 8026df6: f107 0368 add.w r3, r7, #104 @ 0x68 8026dfa: 461a mov r2, r3 8026dfc: 2102 movs r1, #2 8026dfe: 68f8 ldr r0, [r7, #12] 8026e00: f7ff ff7b bl 8026cfa 8026e04: 4603 mov r3, r0 8026e06: 2b02 cmp r3, #2 8026e08: d119 bne.n 8026e3e { data->rc = 0; 8026e0a: 687b ldr r3, [r7, #4] 8026e0c: 2200 movs r2, #0 8026e0e: 701a strb r2, [r3, #0] data->sessionPresent = 0; 8026e10: 687b ldr r3, [r7, #4] 8026e12: 2200 movs r2, #0 8026e14: 705a strb r2, [r3, #1] if (MQTTDeserialize_connack(&data->sessionPresent, &data->rc, c->readbuf, c->readbuf_size) == 1) 8026e16: 687b ldr r3, [r7, #4] 8026e18: 1c58 adds r0, r3, #1 8026e1a: 6879 ldr r1, [r7, #4] 8026e1c: 68fb ldr r3, [r7, #12] 8026e1e: 695a ldr r2, [r3, #20] 8026e20: 68fb ldr r3, [r7, #12] 8026e22: 68db ldr r3, [r3, #12] 8026e24: f000 fc96 bl 8027754 8026e28: 4603 mov r3, r0 8026e2a: 2b01 cmp r3, #1 8026e2c: d103 bne.n 8026e36 rc = data->rc; 8026e2e: 687b ldr r3, [r7, #4] 8026e30: 781b ldrb r3, [r3, #0] 8026e32: 677b str r3, [r7, #116] @ 0x74 8026e34: e00c b.n 8026e50 // rc = MQTT_SUCCESS; else rc = FAILURE; 8026e36: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026e3a: 677b str r3, [r7, #116] @ 0x74 8026e3c: e008 b.n 8026e50 } else rc = FAILURE; 8026e3e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026e42: 677b str r3, [r7, #116] @ 0x74 8026e44: e004 b.n 8026e50 goto exit; 8026e46: bf00 nop 8026e48: e002 b.n 8026e50 goto exit; 8026e4a: bf00 nop 8026e4c: e000 b.n 8026e50 goto exit; // there was a problem 8026e4e: bf00 nop exit: if (rc == MQTT_SUCCESS) 8026e50: 6f7b ldr r3, [r7, #116] @ 0x74 8026e52: 2b00 cmp r3, #0 8026e54: d105 bne.n 8026e62 { c->isconnected = 1; 8026e56: 68fb ldr r3, [r7, #12] 8026e58: 2201 movs r2, #1 8026e5a: 621a str r2, [r3, #32] c->ping_outstanding = 0; 8026e5c: 68fb ldr r3, [r7, #12] 8026e5e: 2200 movs r2, #0 8026e60: 771a strb r2, [r3, #28] #if defined(MQTT_TASK) MutexUnlock(&c->mutex); #endif // osMutexRelease(mqttMutex); osMutexRelease(c->mutex); 8026e62: 68fb ldr r3, [r7, #12] 8026e64: 6e9b ldr r3, [r3, #104] @ 0x68 8026e66: 4618 mov r0, r3 8026e68: f7e9 fe77 bl 8010b5a return rc; 8026e6c: 6f7b ldr r3, [r7, #116] @ 0x74 } 8026e6e: 4618 mov r0, r3 8026e70: 3778 adds r7, #120 @ 0x78 8026e72: 46bd mov sp, r7 8026e74: bd80 pop {r7, pc} 8026e76: bf00 nop 8026e78: 08030928 .word 0x08030928 08026e7c : int MQTTConnect(MQTTClient* c, MQTTPacket_connectData* options) { 8026e7c: b580 push {r7, lr} 8026e7e: b084 sub sp, #16 8026e80: af00 add r7, sp, #0 8026e82: 6078 str r0, [r7, #4] 8026e84: 6039 str r1, [r7, #0] MQTTConnackData data; return MQTTConnectWithResults(c, options, &data); 8026e86: f107 030c add.w r3, r7, #12 8026e8a: 461a mov r2, r3 8026e8c: 6839 ldr r1, [r7, #0] 8026e8e: 6878 ldr r0, [r7, #4] 8026e90: f7ff ff56 bl 8026d40 8026e94: 4603 mov r3, r0 } 8026e96: 4618 mov r0, r3 8026e98: 3710 adds r7, #16 8026e9a: 46bd mov sp, r7 8026e9c: bd80 pop {r7, pc} 08026e9e : int MQTTSetMessageHandler(MQTTClient* c, const char* topicFilter, messageHandler messageHandler) { 8026e9e: b580 push {r7, lr} 8026ea0: b086 sub sp, #24 8026ea2: af00 add r7, sp, #0 8026ea4: 60f8 str r0, [r7, #12] 8026ea6: 60b9 str r1, [r7, #8] 8026ea8: 607a str r2, [r7, #4] int rc = FAILURE; 8026eaa: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026eae: 617b str r3, [r7, #20] int i = -1; 8026eb0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026eb4: 613b str r3, [r7, #16] /* first check for an existing matching slot */ for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8026eb6: 2300 movs r3, #0 8026eb8: 613b str r3, [r7, #16] 8026eba: e028 b.n 8026f0e { if (c->messageHandlers[i].topicFilter != NULL && strcmp(c->messageHandlers[i].topicFilter, topicFilter) == 0) 8026ebc: 68fb ldr r3, [r7, #12] 8026ebe: 693a ldr r2, [r7, #16] 8026ec0: 3205 adds r2, #5 8026ec2: f853 3032 ldr.w r3, [r3, r2, lsl #3] 8026ec6: 2b00 cmp r3, #0 8026ec8: d01e beq.n 8026f08 8026eca: 68fb ldr r3, [r7, #12] 8026ecc: 693a ldr r2, [r7, #16] 8026ece: 3205 adds r2, #5 8026ed0: f853 3032 ldr.w r3, [r3, r2, lsl #3] 8026ed4: 68b9 ldr r1, [r7, #8] 8026ed6: 4618 mov r0, r3 8026ed8: f7d9 fa02 bl 80002e0 8026edc: 4603 mov r3, r0 8026ede: 2b00 cmp r3, #0 8026ee0: d112 bne.n 8026f08 { if (messageHandler == NULL) /* remove existing */ 8026ee2: 687b ldr r3, [r7, #4] 8026ee4: 2b00 cmp r3, #0 8026ee6: d10c bne.n 8026f02 { c->messageHandlers[i].topicFilter = NULL; 8026ee8: 68fb ldr r3, [r7, #12] 8026eea: 693a ldr r2, [r7, #16] 8026eec: 3205 adds r2, #5 8026eee: 2100 movs r1, #0 8026ef0: f843 1032 str.w r1, [r3, r2, lsl #3] c->messageHandlers[i].fp = NULL; 8026ef4: 68fa ldr r2, [r7, #12] 8026ef6: 693b ldr r3, [r7, #16] 8026ef8: 3305 adds r3, #5 8026efa: 00db lsls r3, r3, #3 8026efc: 4413 add r3, r2 8026efe: 2200 movs r2, #0 8026f00: 605a str r2, [r3, #4] } rc = MQTT_SUCCESS; /* return i when adding new subscription */ 8026f02: 2300 movs r3, #0 8026f04: 617b str r3, [r7, #20] break; 8026f06: e005 b.n 8026f14 for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8026f08: 693b ldr r3, [r7, #16] 8026f0a: 3301 adds r3, #1 8026f0c: 613b str r3, [r7, #16] 8026f0e: 693b ldr r3, [r7, #16] 8026f10: 2b04 cmp r3, #4 8026f12: ddd3 ble.n 8026ebc } } /* if no existing, look for empty slot (unless we are removing) */ if (messageHandler != NULL) { 8026f14: 687b ldr r3, [r7, #4] 8026f16: 2b00 cmp r3, #0 8026f18: d026 beq.n 8026f68 if (rc == FAILURE) 8026f1a: 697b ldr r3, [r7, #20] 8026f1c: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8026f20: d112 bne.n 8026f48 { for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8026f22: 2300 movs r3, #0 8026f24: 613b str r3, [r7, #16] 8026f26: e00c b.n 8026f42 { if (c->messageHandlers[i].topicFilter == NULL) 8026f28: 68fb ldr r3, [r7, #12] 8026f2a: 693a ldr r2, [r7, #16] 8026f2c: 3205 adds r2, #5 8026f2e: f853 3032 ldr.w r3, [r3, r2, lsl #3] 8026f32: 2b00 cmp r3, #0 8026f34: d102 bne.n 8026f3c { rc = MQTT_SUCCESS; 8026f36: 2300 movs r3, #0 8026f38: 617b str r3, [r7, #20] break; 8026f3a: e005 b.n 8026f48 for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8026f3c: 693b ldr r3, [r7, #16] 8026f3e: 3301 adds r3, #1 8026f40: 613b str r3, [r7, #16] 8026f42: 693b ldr r3, [r7, #16] 8026f44: 2b04 cmp r3, #4 8026f46: ddef ble.n 8026f28 } } } if (i < MAX_MESSAGE_HANDLERS) 8026f48: 693b ldr r3, [r7, #16] 8026f4a: 2b04 cmp r3, #4 8026f4c: dc0c bgt.n 8026f68 { c->messageHandlers[i].topicFilter = topicFilter; 8026f4e: 68fb ldr r3, [r7, #12] 8026f50: 693a ldr r2, [r7, #16] 8026f52: 3205 adds r2, #5 8026f54: 68b9 ldr r1, [r7, #8] 8026f56: f843 1032 str.w r1, [r3, r2, lsl #3] c->messageHandlers[i].fp = messageHandler; 8026f5a: 68fa ldr r2, [r7, #12] 8026f5c: 693b ldr r3, [r7, #16] 8026f5e: 3305 adds r3, #5 8026f60: 00db lsls r3, r3, #3 8026f62: 4413 add r3, r2 8026f64: 687a ldr r2, [r7, #4] 8026f66: 605a str r2, [r3, #4] } } return rc; 8026f68: 697b ldr r3, [r7, #20] } 8026f6a: 4618 mov r0, r3 8026f6c: 3718 adds r7, #24 8026f6e: 46bd mov sp, r7 8026f70: bd80 pop {r7, pc} 08026f72 : int MQTTSubscribeWithResults(MQTTClient* c, const char* topicFilter, enum QoS qos, messageHandler messageHandler, MQTTSubackData* data) { 8026f72: b5b0 push {r4, r5, r7, lr} 8026f74: b094 sub sp, #80 @ 0x50 8026f76: af04 add r7, sp, #16 8026f78: 60f8 str r0, [r7, #12] 8026f7a: 60b9 str r1, [r7, #8] 8026f7c: 603b str r3, [r7, #0] 8026f7e: 4613 mov r3, r2 8026f80: 71fb strb r3, [r7, #7] int rc = FAILURE; 8026f82: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026f86: 63fb str r3, [r7, #60] @ 0x3c Timer timer; int len = 0; 8026f88: 2300 movs r3, #0 8026f8a: 63bb str r3, [r7, #56] @ 0x38 MQTTString topic = MQTTString_initializer; 8026f8c: 2300 movs r3, #0 8026f8e: 627b str r3, [r7, #36] @ 0x24 8026f90: 2300 movs r3, #0 8026f92: 62bb str r3, [r7, #40] @ 0x28 8026f94: 2300 movs r3, #0 8026f96: 62fb str r3, [r7, #44] @ 0x2c topic.cstring = (char *)topicFilter; 8026f98: 68bb ldr r3, [r7, #8] 8026f9a: 627b str r3, [r7, #36] @ 0x24 #if defined(MQTT_TASK) MutexLock(&c->mutex); #endif // osMutexAcquire(mqttMutex, osWaitForever); osMutexAcquire(c->mutex, osWaitForever); 8026f9c: 68fb ldr r3, [r7, #12] 8026f9e: 6e9b ldr r3, [r3, #104] @ 0x68 8026fa0: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8026fa4: 4618 mov r0, r3 8026fa6: f7e9 fd8d bl 8010ac4 if (!c->isconnected) 8026faa: 68fb ldr r3, [r7, #12] 8026fac: 6a1b ldr r3, [r3, #32] 8026fae: 2b00 cmp r3, #0 8026fb0: d069 beq.n 8027086 goto exit; TimerInit(&timer); 8026fb2: f107 0330 add.w r3, r7, #48 @ 0x30 8026fb6: 4618 mov r0, r3 8026fb8: f000 f9bc bl 8027334 TimerCountdownMS(&timer, c->command_timeout_ms); 8026fbc: 68fb ldr r3, [r7, #12] 8026fbe: 685a ldr r2, [r3, #4] 8026fc0: f107 0330 add.w r3, r7, #48 @ 0x30 8026fc4: 4611 mov r1, r2 8026fc6: 4618 mov r0, r3 8026fc8: f000 f972 bl 80272b0 int _qos[1] = {(int)qos}; 8026fcc: 79fb ldrb r3, [r7, #7] 8026fce: 623b str r3, [r7, #32] len = MQTTSerialize_subscribe(c->buf, c->buf_size, 0, getNextPacketId(c), 1, &topic, _qos); 8026fd0: 68fb ldr r3, [r7, #12] 8026fd2: 691c ldr r4, [r3, #16] 8026fd4: 68fb ldr r3, [r7, #12] 8026fd6: 689b ldr r3, [r3, #8] 8026fd8: 461d mov r5, r3 8026fda: 68f8 ldr r0, [r7, #12] 8026fdc: f7ff fa90 bl 8026500 8026fe0: 4603 mov r3, r0 8026fe2: b29a uxth r2, r3 8026fe4: f107 0320 add.w r3, r7, #32 8026fe8: 9302 str r3, [sp, #8] 8026fea: f107 0324 add.w r3, r7, #36 @ 0x24 8026fee: 9301 str r3, [sp, #4] 8026ff0: 2301 movs r3, #1 8026ff2: 9300 str r3, [sp, #0] 8026ff4: 4613 mov r3, r2 8026ff6: 2200 movs r2, #0 8026ff8: 4629 mov r1, r5 8026ffa: 4620 mov r0, r4 8026ffc: f001 f81b bl 8028036 8027000: 63b8 str r0, [r7, #56] @ 0x38 // len = MQTTSerialize_subscribe(c->buf, c->buf_size, 0, getNextPacketId(c), 1, &topic, (int*)&qos); if (len <= 0) 8027002: 6bbb ldr r3, [r7, #56] @ 0x38 8027004: 2b00 cmp r3, #0 8027006: dd40 ble.n 802708a goto exit; if ((rc = sendPacket(c, len, &timer)) != MQTT_SUCCESS) // send the subscribe packet 8027008: f107 0330 add.w r3, r7, #48 @ 0x30 802700c: 461a mov r2, r3 802700e: 6bb9 ldr r1, [r7, #56] @ 0x38 8027010: 68f8 ldr r0, [r7, #12] 8027012: f7ff fa8e bl 8026532 8027016: 63f8 str r0, [r7, #60] @ 0x3c 8027018: 6bfb ldr r3, [r7, #60] @ 0x3c 802701a: 2b00 cmp r3, #0 802701c: d137 bne.n 802708e goto exit; // there was a problem if (waitfor(c, SUBACK, &timer) == SUBACK) // wait for suback 802701e: f107 0330 add.w r3, r7, #48 @ 0x30 8027022: 461a mov r2, r3 8027024: 2109 movs r1, #9 8027026: 68f8 ldr r0, [r7, #12] 8027028: f7ff fe67 bl 8026cfa 802702c: 4603 mov r3, r0 802702e: 2b09 cmp r3, #9 8027030: d125 bne.n 802707e { int count = 0; 8027032: 2300 movs r3, #0 8027034: 61fb str r3, [r7, #28] unsigned short mypacketid; data->grantedQoS = QOS0; 8027036: 6d3b ldr r3, [r7, #80] @ 0x50 8027038: 2200 movs r2, #0 802703a: 701a strb r2, [r3, #0] int _grantedQoS[1] = {(int)&data->grantedQoS}; 802703c: 6d3b ldr r3, [r7, #80] @ 0x50 802703e: 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) 8027040: 68fb ldr r3, [r7, #12] 8027042: 695b ldr r3, [r3, #20] 8027044: 68fa ldr r2, [r7, #12] 8027046: 68d2 ldr r2, [r2, #12] 8027048: 4614 mov r4, r2 802704a: f107 0114 add.w r1, r7, #20 802704e: f107 021c add.w r2, r7, #28 8027052: f107 001a add.w r0, r7, #26 8027056: 9401 str r4, [sp, #4] 8027058: 9300 str r3, [sp, #0] 802705a: 460b mov r3, r1 802705c: 2101 movs r1, #1 802705e: f001 f866 bl 802812e 8027062: 4603 mov r3, r0 8027064: 2b01 cmp r3, #1 8027066: d113 bne.n 8027090 { if (data->grantedQoS != 0x80) 8027068: 6d3b ldr r3, [r7, #80] @ 0x50 802706a: 781b ldrb r3, [r3, #0] 802706c: 2b80 cmp r3, #128 @ 0x80 802706e: d00f beq.n 8027090 rc = MQTTSetMessageHandler(c, topicFilter, messageHandler); 8027070: 683a ldr r2, [r7, #0] 8027072: 68b9 ldr r1, [r7, #8] 8027074: 68f8 ldr r0, [r7, #12] 8027076: f7ff ff12 bl 8026e9e 802707a: 63f8 str r0, [r7, #60] @ 0x3c 802707c: e008 b.n 8027090 } } else rc = FAILURE; 802707e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027082: 63fb str r3, [r7, #60] @ 0x3c 8027084: e004 b.n 8027090 goto exit; 8027086: bf00 nop 8027088: e002 b.n 8027090 goto exit; 802708a: bf00 nop 802708c: e000 b.n 8027090 goto exit; // there was a problem 802708e: bf00 nop exit: if (rc == FAILURE) 8027090: 6bfb ldr r3, [r7, #60] @ 0x3c 8027092: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8027096: d102 bne.n 802709e MQTTCloseSession(c); 8027098: 68f8 ldr r0, [r7, #12] 802709a: f7ff fceb bl 8026a74 #if defined(MQTT_TASK) MutexUnlock(&c->mutex); #endif // osMutexRelease(mqttMutex); osMutexRelease(c->mutex); 802709e: 68fb ldr r3, [r7, #12] 80270a0: 6e9b ldr r3, [r3, #104] @ 0x68 80270a2: 4618 mov r0, r3 80270a4: f7e9 fd59 bl 8010b5a return rc; 80270a8: 6bfb ldr r3, [r7, #60] @ 0x3c } 80270aa: 4618 mov r0, r3 80270ac: 3740 adds r7, #64 @ 0x40 80270ae: 46bd mov sp, r7 80270b0: bdb0 pop {r4, r5, r7, pc} 080270b2 : int MQTTSubscribe(MQTTClient* c, const char* topicFilter, enum QoS qos, messageHandler messageHandler) { 80270b2: b580 push {r7, lr} 80270b4: b088 sub sp, #32 80270b6: af02 add r7, sp, #8 80270b8: 60f8 str r0, [r7, #12] 80270ba: 60b9 str r1, [r7, #8] 80270bc: 603b str r3, [r7, #0] 80270be: 4613 mov r3, r2 80270c0: 71fb strb r3, [r7, #7] MQTTSubackData data; return MQTTSubscribeWithResults(c, topicFilter, qos, messageHandler, &data); 80270c2: 79fa ldrb r2, [r7, #7] 80270c4: f107 0314 add.w r3, r7, #20 80270c8: 9300 str r3, [sp, #0] 80270ca: 683b ldr r3, [r7, #0] 80270cc: 68b9 ldr r1, [r7, #8] 80270ce: 68f8 ldr r0, [r7, #12] 80270d0: f7ff ff4f bl 8026f72 80270d4: 4603 mov r3, r0 } 80270d6: 4618 mov r0, r3 80270d8: 3718 adds r7, #24 80270da: 46bd mov sp, r7 80270dc: bd80 pop {r7, pc} 080270de : return rc; } int MQTTPublish(MQTTClient* c, const char* topicName, MQTTMessage* message) { 80270de: b5f0 push {r4, r5, r6, r7, lr} 80270e0: b097 sub sp, #92 @ 0x5c 80270e2: af08 add r7, sp, #32 80270e4: 60f8 str r0, [r7, #12] 80270e6: 60b9 str r1, [r7, #8] 80270e8: 607a str r2, [r7, #4] int rc = FAILURE; 80270ea: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80270ee: 637b str r3, [r7, #52] @ 0x34 Timer timer; MQTTString topic = MQTTString_initializer; 80270f0: 2300 movs r3, #0 80270f2: 61fb str r3, [r7, #28] 80270f4: 2300 movs r3, #0 80270f6: 623b str r3, [r7, #32] 80270f8: 2300 movs r3, #0 80270fa: 627b str r3, [r7, #36] @ 0x24 topic.cstring = (char *)topicName; 80270fc: 68bb ldr r3, [r7, #8] 80270fe: 61fb str r3, [r7, #28] int len = 0; 8027100: 2300 movs r3, #0 8027102: 633b str r3, [r7, #48] @ 0x30 #if defined(MQTT_TASK) MutexLock(&c->mutex); #endif // osMutexAcquire(mqttMutex, osWaitForever); osMutexAcquire(c->mutex, osWaitForever); 8027104: 68fb ldr r3, [r7, #12] 8027106: 6e9b ldr r3, [r3, #104] @ 0x68 8027108: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 802710c: 4618 mov r0, r3 802710e: f7e9 fcd9 bl 8010ac4 if (!c->isconnected) 8027112: 68fb ldr r3, [r7, #12] 8027114: 6a1b ldr r3, [r3, #32] 8027116: 2b00 cmp r3, #0 8027118: f000 809b beq.w 8027252 goto exit; TimerInit(&timer); 802711c: f107 0328 add.w r3, r7, #40 @ 0x28 8027120: 4618 mov r0, r3 8027122: f000 f907 bl 8027334 TimerCountdownMS(&timer, c->command_timeout_ms); 8027126: 68fb ldr r3, [r7, #12] 8027128: 685a ldr r2, [r3, #4] 802712a: f107 0328 add.w r3, r7, #40 @ 0x28 802712e: 4611 mov r1, r2 8027130: 4618 mov r0, r3 8027132: f000 f8bd bl 80272b0 if (message->qos == QOS1 || message->qos == QOS2) 8027136: 687b ldr r3, [r7, #4] 8027138: 781b ldrb r3, [r3, #0] 802713a: 2b01 cmp r3, #1 802713c: d003 beq.n 8027146 802713e: 687b ldr r3, [r7, #4] 8027140: 781b ldrb r3, [r3, #0] 8027142: 2b02 cmp r3, #2 8027144: d106 bne.n 8027154 message->id = getNextPacketId(c); 8027146: 68f8 ldr r0, [r7, #12] 8027148: f7ff f9da bl 8026500 802714c: 4603 mov r3, r0 802714e: b29a uxth r2, r3 8027150: 687b ldr r3, [r7, #4] 8027152: 809a strh r2, [r3, #4] len = MQTTSerialize_publish(c->buf, c->buf_size, 0, message->qos, message->retained, message->id, 8027154: 68fb ldr r3, [r7, #12] 8027156: 691b ldr r3, [r3, #16] 8027158: 603b str r3, [r7, #0] 802715a: 68fb ldr r3, [r7, #12] 802715c: 689b ldr r3, [r3, #8] 802715e: 469c mov ip, r3 8027160: 687b ldr r3, [r7, #4] 8027162: 781b ldrb r3, [r3, #0] 8027164: 469e mov lr, r3 8027166: 687b ldr r3, [r7, #4] 8027168: 785d ldrb r5, [r3, #1] 802716a: 687b ldr r3, [r7, #4] 802716c: 889e ldrh r6, [r3, #4] topic, (unsigned char*)message->payload, message->payloadlen); 802716e: 687b ldr r3, [r7, #4] 8027170: 689b ldr r3, [r3, #8] 8027172: 687a ldr r2, [r7, #4] 8027174: 68d2 ldr r2, [r2, #12] len = MQTTSerialize_publish(c->buf, c->buf_size, 0, message->qos, message->retained, message->id, 8027176: 9206 str r2, [sp, #24] 8027178: 9305 str r3, [sp, #20] 802717a: ac02 add r4, sp, #8 802717c: f107 031c add.w r3, r7, #28 8027180: e893 0007 ldmia.w r3, {r0, r1, r2} 8027184: e884 0007 stmia.w r4, {r0, r1, r2} 8027188: 9601 str r6, [sp, #4] 802718a: 9500 str r5, [sp, #0] 802718c: 4673 mov r3, lr 802718e: 2200 movs r2, #0 8027190: 4661 mov r1, ip 8027192: 6838 ldr r0, [r7, #0] 8027194: f000 fe5d bl 8027e52 8027198: 6338 str r0, [r7, #48] @ 0x30 if (len <= 0) 802719a: 6b3b ldr r3, [r7, #48] @ 0x30 802719c: 2b00 cmp r3, #0 802719e: dd5a ble.n 8027256 goto exit; if ((rc = sendPacket(c, len, &timer)) != MQTT_SUCCESS) // send the subscribe packet 80271a0: f107 0328 add.w r3, r7, #40 @ 0x28 80271a4: 461a mov r2, r3 80271a6: 6b39 ldr r1, [r7, #48] @ 0x30 80271a8: 68f8 ldr r0, [r7, #12] 80271aa: f7ff f9c2 bl 8026532 80271ae: 6378 str r0, [r7, #52] @ 0x34 80271b0: 6b7b ldr r3, [r7, #52] @ 0x34 80271b2: 2b00 cmp r3, #0 80271b4: d151 bne.n 802725a goto exit; // there was a problem if (message->qos == QOS1) 80271b6: 687b ldr r3, [r7, #4] 80271b8: 781b ldrb r3, [r3, #0] 80271ba: 2b01 cmp r3, #1 80271bc: d122 bne.n 8027204 { if (waitfor(c, PUBACK, &timer) == PUBACK) 80271be: f107 0328 add.w r3, r7, #40 @ 0x28 80271c2: 461a mov r2, r3 80271c4: 2104 movs r1, #4 80271c6: 68f8 ldr r0, [r7, #12] 80271c8: f7ff fd97 bl 8026cfa 80271cc: 4603 mov r3, r0 80271ce: 2b04 cmp r3, #4 80271d0: d114 bne.n 80271fc { unsigned short mypacketid; unsigned char dup, type; if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1) 80271d2: 68fb ldr r3, [r7, #12] 80271d4: 695c ldr r4, [r3, #20] 80271d6: 68fb ldr r3, [r7, #12] 80271d8: 68db ldr r3, [r3, #12] 80271da: f107 021a add.w r2, r7, #26 80271de: f107 0119 add.w r1, r7, #25 80271e2: f107 0018 add.w r0, r7, #24 80271e6: 9300 str r3, [sp, #0] 80271e8: 4623 mov r3, r4 80271ea: f000 fbc1 bl 8027970 80271ee: 4603 mov r3, r0 80271f0: 2b01 cmp r3, #1 80271f2: d035 beq.n 8027260 rc = FAILURE; 80271f4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80271f8: 637b str r3, [r7, #52] @ 0x34 80271fa: e031 b.n 8027260 } else rc = FAILURE; 80271fc: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027200: 637b str r3, [r7, #52] @ 0x34 8027202: e02d b.n 8027260 } else if (message->qos == QOS2) 8027204: 687b ldr r3, [r7, #4] 8027206: 781b ldrb r3, [r3, #0] 8027208: 2b02 cmp r3, #2 802720a: d128 bne.n 802725e { if (waitfor(c, PUBCOMP, &timer) == PUBCOMP) 802720c: f107 0328 add.w r3, r7, #40 @ 0x28 8027210: 461a mov r2, r3 8027212: 2107 movs r1, #7 8027214: 68f8 ldr r0, [r7, #12] 8027216: f7ff fd70 bl 8026cfa 802721a: 4603 mov r3, r0 802721c: 2b07 cmp r3, #7 802721e: d114 bne.n 802724a { unsigned short mypacketid; unsigned char dup, type; if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1) 8027220: 68fb ldr r3, [r7, #12] 8027222: 695c ldr r4, [r3, #20] 8027224: 68fb ldr r3, [r7, #12] 8027226: 68db ldr r3, [r3, #12] 8027228: f107 0216 add.w r2, r7, #22 802722c: f107 0115 add.w r1, r7, #21 8027230: f107 0014 add.w r0, r7, #20 8027234: 9300 str r3, [sp, #0] 8027236: 4623 mov r3, r4 8027238: f000 fb9a bl 8027970 802723c: 4603 mov r3, r0 802723e: 2b01 cmp r3, #1 8027240: d00e beq.n 8027260 rc = FAILURE; 8027242: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027246: 637b str r3, [r7, #52] @ 0x34 8027248: e00a b.n 8027260 } else rc = FAILURE; 802724a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802724e: 637b str r3, [r7, #52] @ 0x34 8027250: e006 b.n 8027260 goto exit; 8027252: bf00 nop 8027254: e004 b.n 8027260 goto exit; 8027256: bf00 nop 8027258: e002 b.n 8027260 goto exit; // there was a problem 802725a: bf00 nop 802725c: e000 b.n 8027260 } exit: 802725e: bf00 nop if (rc == FAILURE) 8027260: 6b7b ldr r3, [r7, #52] @ 0x34 8027262: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8027266: d102 bne.n 802726e MQTTCloseSession(c); 8027268: 68f8 ldr r0, [r7, #12] 802726a: f7ff fc03 bl 8026a74 #if defined(MQTT_TASK) MutexUnlock(&c->mutex); #endif // osMutexRelease(mqttMutex); osMutexRelease(c->mutex); 802726e: 68fb ldr r3, [r7, #12] 8027270: 6e9b ldr r3, [r3, #104] @ 0x68 8027272: 4618 mov r0, r3 8027274: f7e9 fc71 bl 8010b5a return rc; 8027278: 6b7b ldr r3, [r7, #52] @ 0x34 } 802727a: 4618 mov r0, r3 802727c: 373c adds r7, #60 @ 0x3c 802727e: 46bd mov sp, r7 8027280: bdf0 pop {r4, r5, r6, r7, pc} ... 08027284 : #define SERVER_IP4 34 uint32_t MilliTimer; //Timer functions char TimerIsExpired(Timer *timer) { 8027284: b480 push {r7} 8027286: b085 sub sp, #20 8027288: af00 add r7, sp, #0 802728a: 6078 str r0, [r7, #4] long left = timer->end_time - MilliTimer; 802728c: 687b ldr r3, [r7, #4] 802728e: 685a ldr r2, [r3, #4] 8027290: 4b06 ldr r3, [pc, #24] @ (80272ac ) 8027292: 681b ldr r3, [r3, #0] 8027294: 1ad3 subs r3, r2, r3 8027296: 60fb str r3, [r7, #12] return (left < 0); 8027298: 68fb ldr r3, [r7, #12] 802729a: 0fdb lsrs r3, r3, #31 802729c: b2db uxtb r3, r3 } 802729e: 4618 mov r0, r3 80272a0: 3714 adds r7, #20 80272a2: 46bd mov sp, r7 80272a4: f85d 7b04 ldr.w r7, [sp], #4 80272a8: 4770 bx lr 80272aa: bf00 nop 80272ac: 2402b034 .word 0x2402b034 080272b0 : void TimerCountdownMS(Timer *timer, unsigned int timeout) { 80272b0: b480 push {r7} 80272b2: b083 sub sp, #12 80272b4: af00 add r7, sp, #0 80272b6: 6078 str r0, [r7, #4] 80272b8: 6039 str r1, [r7, #0] timer->end_time = MilliTimer + timeout; 80272ba: 4b06 ldr r3, [pc, #24] @ (80272d4 ) 80272bc: 681a ldr r2, [r3, #0] 80272be: 683b ldr r3, [r7, #0] 80272c0: 441a add r2, r3 80272c2: 687b ldr r3, [r7, #4] 80272c4: 605a str r2, [r3, #4] } 80272c6: bf00 nop 80272c8: 370c adds r7, #12 80272ca: 46bd mov sp, r7 80272cc: f85d 7b04 ldr.w r7, [sp], #4 80272d0: 4770 bx lr 80272d2: bf00 nop 80272d4: 2402b034 .word 0x2402b034 080272d8 : void TimerCountdown(Timer *timer, unsigned int timeout) { 80272d8: b480 push {r7} 80272da: b083 sub sp, #12 80272dc: af00 add r7, sp, #0 80272de: 6078 str r0, [r7, #4] 80272e0: 6039 str r1, [r7, #0] timer->end_time = MilliTimer + (timeout * 1000); 80272e2: 683b ldr r3, [r7, #0] 80272e4: f44f 727a mov.w r2, #1000 @ 0x3e8 80272e8: fb03 f202 mul.w r2, r3, r2 80272ec: 4b05 ldr r3, [pc, #20] @ (8027304 ) 80272ee: 681b ldr r3, [r3, #0] 80272f0: 441a add r2, r3 80272f2: 687b ldr r3, [r7, #4] 80272f4: 605a str r2, [r3, #4] } 80272f6: bf00 nop 80272f8: 370c adds r7, #12 80272fa: 46bd mov sp, r7 80272fc: f85d 7b04 ldr.w r7, [sp], #4 8027300: 4770 bx lr 8027302: bf00 nop 8027304: 2402b034 .word 0x2402b034 08027308 : int TimerLeftMS(Timer *timer) { 8027308: b480 push {r7} 802730a: b085 sub sp, #20 802730c: af00 add r7, sp, #0 802730e: 6078 str r0, [r7, #4] long left = timer->end_time - MilliTimer; 8027310: 687b ldr r3, [r7, #4] 8027312: 685a ldr r2, [r3, #4] 8027314: 4b06 ldr r3, [pc, #24] @ (8027330 ) 8027316: 681b ldr r3, [r3, #0] 8027318: 1ad3 subs r3, r2, r3 802731a: 60fb str r3, [r7, #12] return (left < 0) ? 0 : left; 802731c: 68fb ldr r3, [r7, #12] 802731e: ea23 73e3 bic.w r3, r3, r3, asr #31 } 8027322: 4618 mov r0, r3 8027324: 3714 adds r7, #20 8027326: 46bd mov sp, r7 8027328: f85d 7b04 ldr.w r7, [sp], #4 802732c: 4770 bx lr 802732e: bf00 nop 8027330: 2402b034 .word 0x2402b034 08027334 : void TimerInit(Timer *timer) { 8027334: b480 push {r7} 8027336: b083 sub sp, #12 8027338: af00 add r7, sp, #0 802733a: 6078 str r0, [r7, #4] timer->end_time = 0; 802733c: 687b ldr r3, [r7, #4] 802733e: 2200 movs r2, #0 8027340: 605a str r2, [r3, #4] } 8027342: bf00 nop 8027344: 370c adds r7, #12 8027346: 46bd mov sp, r7 8027348: f85d 7b04 ldr.w r7, [sp], #4 802734c: 4770 bx lr ... 08027350 : #ifdef MQTT_LWIP_SOCKET void NewNetwork(Network *n) { 8027350: b480 push {r7} 8027352: b083 sub sp, #12 8027354: af00 add r7, sp, #0 8027356: 6078 str r0, [r7, #4] n->socket = 0; //clear 8027358: 687b ldr r3, [r7, #4] 802735a: 2200 movs r2, #0 802735c: 601a str r2, [r3, #0] n->mqttread = net_read; //receive function 802735e: 687b ldr r3, [r7, #4] 8027360: 4a06 ldr r2, [pc, #24] @ (802737c ) 8027362: 605a str r2, [r3, #4] n->mqttwrite = net_write; //send function 8027364: 687b ldr r3, [r7, #4] 8027366: 4a06 ldr r2, [pc, #24] @ (8027380 ) 8027368: 609a str r2, [r3, #8] n->disconnect = net_disconnect; //disconnection function 802736a: 687b ldr r3, [r7, #4] 802736c: 4a05 ldr r2, [pc, #20] @ (8027384 ) 802736e: 60da str r2, [r3, #12] } 8027370: bf00 nop 8027372: 370c adds r7, #12 8027374: 46bd mov sp, r7 8027376: f85d 7b04 ldr.w r7, [sp], #4 802737a: 4770 bx lr 802737c: 08027425 .word 0x08027425 8027380: 08027475 .word 0x08027475 8027384: 0802749b .word 0x0802749b 08027388 : int ConnectNetwork(Network *n, char *ip, int port) { 8027388: b580 push {r7, lr} 802738a: b088 sub sp, #32 802738c: af00 add r7, sp, #0 802738e: 60f8 str r0, [r7, #12] 8027390: 60b9 str r1, [r7, #8] 8027392: 607a str r2, [r7, #4] struct sockaddr_in server_addr; if(n->socket) 8027394: 68fb ldr r3, [r7, #12] 8027396: 681b ldr r3, [r3, #0] 8027398: 2b00 cmp r3, #0 802739a: d004 beq.n 80273a6 { close(n->socket); 802739c: 68fb ldr r3, [r7, #12] 802739e: 681b ldr r3, [r3, #0] 80273a0: 4618 mov r0, r3 80273a2: f7f0 fa65 bl 8017870 } n->socket = socket(PF_INET, SOCK_STREAM, 0); //create socket 80273a6: 2200 movs r2, #0 80273a8: 2101 movs r1, #1 80273aa: 2002 movs r0, #2 80273ac: f7f0 ff72 bl 8018294 80273b0: 4602 mov r2, r0 80273b2: 68fb ldr r3, [r7, #12] 80273b4: 601a str r2, [r3, #0] if(n->socket < 0) 80273b6: 68fb ldr r3, [r7, #12] 80273b8: 681b ldr r3, [r3, #0] 80273ba: 2b00 cmp r3, #0 80273bc: da05 bge.n 80273ca { n->socket = 0; 80273be: 68fb ldr r3, [r7, #12] 80273c0: 2200 movs r2, #0 80273c2: 601a str r2, [r3, #0] return -1; 80273c4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80273c8: e028 b.n 802741c } memset(&server_addr, 0, sizeof(struct sockaddr_in)); //broker address info 80273ca: f107 0310 add.w r3, r7, #16 80273ce: 2210 movs r2, #16 80273d0: 2100 movs r1, #0 80273d2: 4618 mov r0, r3 80273d4: f002 fc8c bl 8029cf0 server_addr.sin_family = AF_INET; 80273d8: 2302 movs r3, #2 80273da: 747b strb r3, [r7, #17] server_addr.sin_addr.s_addr = inet_addr(ip); 80273dc: 68b8 ldr r0, [r7, #8] 80273de: f7fd fde0 bl 8024fa2 80273e2: 4603 mov r3, r0 80273e4: 617b str r3, [r7, #20] server_addr.sin_port = htons(port); 80273e6: 687b ldr r3, [r7, #4] 80273e8: b29b uxth r3, r3 80273ea: 4618 mov r0, r3 80273ec: f7f1 fb94 bl 8018b18 80273f0: 4603 mov r3, r0 80273f2: 827b strh r3, [r7, #18] if(connect(n->socket, (struct sockaddr*)&server_addr, sizeof(struct sockaddr_in)) < 0) //connect to the broker 80273f4: 68fb ldr r3, [r7, #12] 80273f6: 681b ldr r3, [r3, #0] 80273f8: f107 0110 add.w r1, r7, #16 80273fc: 2210 movs r2, #16 80273fe: 4618 mov r0, r3 8027400: f7f0 fa8c bl 801791c 8027404: 4603 mov r3, r0 8027406: 2b00 cmp r3, #0 8027408: da07 bge.n 802741a { close(n->socket); 802740a: 68fb ldr r3, [r7, #12] 802740c: 681b ldr r3, [r3, #0] 802740e: 4618 mov r0, r3 8027410: f7f0 fa2e bl 8017870 return -1; 8027414: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027418: e000 b.n 802741c } return 0; 802741a: 2300 movs r3, #0 } 802741c: 4618 mov r0, r3 802741e: 3720 adds r7, #32 8027420: 46bd mov sp, r7 8027422: bd80 pop {r7, pc} 08027424 : int net_read(Network *n, unsigned char *buffer, int len, int timeout_ms) { 8027424: b580 push {r7, lr} 8027426: b086 sub sp, #24 8027428: af00 add r7, sp, #0 802742a: 60f8 str r0, [r7, #12] 802742c: 60b9 str r1, [r7, #8] 802742e: 607a str r2, [r7, #4] 8027430: 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 8027432: 68fb ldr r3, [r7, #12] 8027434: 681b ldr r3, [r3, #0] 8027436: f107 0214 add.w r2, r7, #20 802743a: 490d ldr r1, [pc, #52] @ (8027470 ) 802743c: 4618 mov r0, r3 802743e: f7f1 f917 bl 8018670 8027442: 4603 mov r3, r0 8027444: 2b00 cmp r3, #0 8027446: da02 bge.n 802744e 8027448: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802744c: e00c b.n 8027468 if(available > 0) 802744e: 697b ldr r3, [r7, #20] 8027450: 2b00 cmp r3, #0 8027452: dd08 ble.n 8027466 { return recv(n->socket, buffer, len, 0); 8027454: 68fb ldr r3, [r7, #12] 8027456: 6818 ldr r0, [r3, #0] 8027458: 687a ldr r2, [r7, #4] 802745a: 2300 movs r3, #0 802745c: 68b9 ldr r1, [r7, #8] 802745e: f7f0 fdf3 bl 8018048 8027462: 4603 mov r3, r0 8027464: e000 b.n 8027468 } return 0; 8027466: 2300 movs r3, #0 } 8027468: 4618 mov r0, r3 802746a: 3718 adds r7, #24 802746c: 46bd mov sp, r7 802746e: bd80 pop {r7, pc} 8027470: 4004667f .word 0x4004667f 08027474 : int net_write(Network *n, unsigned char *buffer, int len, int timeout_ms) { 8027474: b580 push {r7, lr} 8027476: b084 sub sp, #16 8027478: af00 add r7, sp, #0 802747a: 60f8 str r0, [r7, #12] 802747c: 60b9 str r1, [r7, #8] 802747e: 607a str r2, [r7, #4] 8027480: 603b str r3, [r7, #0] return send(n->socket, buffer, len, 0); 8027482: 68fb ldr r3, [r7, #12] 8027484: 6818 ldr r0, [r3, #0] 8027486: 687a ldr r2, [r7, #4] 8027488: 2300 movs r3, #0 802748a: 68b9 ldr r1, [r7, #8] 802748c: f7f0 fdf2 bl 8018074 8027490: 4603 mov r3, r0 } 8027492: 4618 mov r0, r3 8027494: 3710 adds r7, #16 8027496: 46bd mov sp, r7 8027498: bd80 pop {r7, pc} 0802749a : void net_disconnect(Network *n) { 802749a: b580 push {r7, lr} 802749c: b082 sub sp, #8 802749e: af00 add r7, sp, #0 80274a0: 6078 str r0, [r7, #4] close(n->socket); 80274a2: 687b ldr r3, [r7, #4] 80274a4: 681b ldr r3, [r3, #0] 80274a6: 4618 mov r0, r3 80274a8: f7f0 f9e2 bl 8017870 n->socket = 0; 80274ac: 687b ldr r3, [r7, #4] 80274ae: 2200 movs r2, #0 80274b0: 601a str r2, [r3, #0] } 80274b2: bf00 nop 80274b4: 3708 adds r7, #8 80274b6: 46bd mov sp, r7 80274b8: bd80 pop {r7, pc} 080274ba : * 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) { 80274ba: b590 push {r4, r7, lr} 80274bc: b085 sub sp, #20 80274be: af00 add r7, sp, #0 80274c0: 6078 str r0, [r7, #4] int len = 0; 80274c2: 2300 movs r3, #0 80274c4: 60fb str r3, [r7, #12] FUNC_ENTRY; if (options->MQTTVersion == 3) 80274c6: 687b ldr r3, [r7, #4] 80274c8: 7a1b ldrb r3, [r3, #8] 80274ca: 2b03 cmp r3, #3 80274cc: d102 bne.n 80274d4 len = 12; /* variable depending on MQTT or MQIsdp */ 80274ce: 230c movs r3, #12 80274d0: 60fb str r3, [r7, #12] 80274d2: e005 b.n 80274e0 else if (options->MQTTVersion == 4) 80274d4: 687b ldr r3, [r7, #4] 80274d6: 7a1b ldrb r3, [r3, #8] 80274d8: 2b04 cmp r3, #4 80274da: d101 bne.n 80274e0 len = 10; 80274dc: 230a movs r3, #10 80274de: 60fb str r3, [r7, #12] len += MQTTstrlen(options->clientID)+2; 80274e0: 687b ldr r3, [r7, #4] 80274e2: 330c adds r3, #12 80274e4: e893 0007 ldmia.w r3, {r0, r1, r2} 80274e8: f000 fc43 bl 8027d72 80274ec: 4603 mov r3, r0 80274ee: 3302 adds r3, #2 80274f0: 68fa ldr r2, [r7, #12] 80274f2: 4413 add r3, r2 80274f4: 60fb str r3, [r7, #12] if (options->willFlag) 80274f6: 687b ldr r3, [r7, #4] 80274f8: 7edb ldrb r3, [r3, #27] 80274fa: 2b00 cmp r3, #0 80274fc: d013 beq.n 8027526 len += MQTTstrlen(options->will.topicName)+2 + MQTTstrlen(options->will.message)+2; 80274fe: 687b ldr r3, [r7, #4] 8027500: 3324 adds r3, #36 @ 0x24 8027502: e893 0007 ldmia.w r3, {r0, r1, r2} 8027506: f000 fc34 bl 8027d72 802750a: 4603 mov r3, r0 802750c: 1c9c adds r4, r3, #2 802750e: 687b ldr r3, [r7, #4] 8027510: 3330 adds r3, #48 @ 0x30 8027512: e893 0007 ldmia.w r3, {r0, r1, r2} 8027516: f000 fc2c bl 8027d72 802751a: 4603 mov r3, r0 802751c: 4423 add r3, r4 802751e: 3302 adds r3, #2 8027520: 68fa ldr r2, [r7, #12] 8027522: 4413 add r3, r2 8027524: 60fb str r3, [r7, #12] if (options->username.cstring || options->username.lenstring.data) 8027526: 687b ldr r3, [r7, #4] 8027528: 6c1b ldr r3, [r3, #64] @ 0x40 802752a: 2b00 cmp r3, #0 802752c: d103 bne.n 8027536 802752e: 687b ldr r3, [r7, #4] 8027530: 6c9b ldr r3, [r3, #72] @ 0x48 8027532: 2b00 cmp r3, #0 8027534: d00a beq.n 802754c len += MQTTstrlen(options->username)+2; 8027536: 687b ldr r3, [r7, #4] 8027538: 3340 adds r3, #64 @ 0x40 802753a: e893 0007 ldmia.w r3, {r0, r1, r2} 802753e: f000 fc18 bl 8027d72 8027542: 4603 mov r3, r0 8027544: 3302 adds r3, #2 8027546: 68fa ldr r2, [r7, #12] 8027548: 4413 add r3, r2 802754a: 60fb str r3, [r7, #12] if (options->password.cstring || options->password.lenstring.data) 802754c: 687b ldr r3, [r7, #4] 802754e: 6cdb ldr r3, [r3, #76] @ 0x4c 8027550: 2b00 cmp r3, #0 8027552: d103 bne.n 802755c 8027554: 687b ldr r3, [r7, #4] 8027556: 6d5b ldr r3, [r3, #84] @ 0x54 8027558: 2b00 cmp r3, #0 802755a: d00a beq.n 8027572 len += MQTTstrlen(options->password)+2; 802755c: 687b ldr r3, [r7, #4] 802755e: 334c adds r3, #76 @ 0x4c 8027560: e893 0007 ldmia.w r3, {r0, r1, r2} 8027564: f000 fc05 bl 8027d72 8027568: 4603 mov r3, r0 802756a: 3302 adds r3, #2 802756c: 68fa ldr r2, [r7, #12] 802756e: 4413 add r3, r2 8027570: 60fb str r3, [r7, #12] FUNC_EXIT_RC(len); return len; 8027572: 68fb ldr r3, [r7, #12] } 8027574: 4618 mov r0, r3 8027576: 3714 adds r7, #20 8027578: 46bd mov sp, r7 802757a: bd90 pop {r4, r7, pc} 0802757c : * @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) { 802757c: b580 push {r7, lr} 802757e: b08a sub sp, #40 @ 0x28 8027580: af00 add r7, sp, #0 8027582: 60f8 str r0, [r7, #12] 8027584: 60b9 str r1, [r7, #8] 8027586: 607a str r2, [r7, #4] unsigned char *ptr = buf; 8027588: 68fb ldr r3, [r7, #12] 802758a: 61fb str r3, [r7, #28] MQTTHeader header = {0}; 802758c: 2300 movs r3, #0 802758e: 61bb str r3, [r7, #24] MQTTConnectFlags flags = {0}; 8027590: 2300 movs r3, #0 8027592: 617b str r3, [r7, #20] int len = 0; 8027594: 2300 movs r3, #0 8027596: 623b str r3, [r7, #32] int rc = -1; 8027598: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802759c: 627b str r3, [r7, #36] @ 0x24 FUNC_ENTRY; if (MQTTPacket_len(len = MQTTSerialize_connectLength(options)) > buflen) 802759e: 6878 ldr r0, [r7, #4] 80275a0: f7ff ff8b bl 80274ba 80275a4: 6238 str r0, [r7, #32] 80275a6: 6a38 ldr r0, [r7, #32] 80275a8: f000 fa98 bl 8027adc 80275ac: 4602 mov r2, r0 80275ae: 68bb ldr r3, [r7, #8] 80275b0: 4293 cmp r3, r2 80275b2: da03 bge.n 80275bc { rc = MQTTPACKET_BUFFER_TOO_SHORT; 80275b4: f06f 0301 mvn.w r3, #1 80275b8: 627b str r3, [r7, #36] @ 0x24 goto exit; 80275ba: e0c2 b.n 8027742 } header.byte = 0; 80275bc: 2300 movs r3, #0 80275be: 763b strb r3, [r7, #24] header.bits.type = CONNECT; 80275c0: 7e3b ldrb r3, [r7, #24] 80275c2: 2201 movs r2, #1 80275c4: f362 1307 bfi r3, r2, #4, #4 80275c8: 763b strb r3, [r7, #24] writeChar(&ptr, header.byte); /* write header */ 80275ca: 7e3a ldrb r2, [r7, #24] 80275cc: f107 031c add.w r3, r7, #28 80275d0: 4611 mov r1, r2 80275d2: 4618 mov r0, r3 80275d4: f000 fb11 bl 8027bfa ptr += MQTTPacket_encode(ptr, len); /* write remaining length */ 80275d8: 69fb ldr r3, [r7, #28] 80275da: 6a39 ldr r1, [r7, #32] 80275dc: 4618 mov r0, r3 80275de: f000 fa12 bl 8027a06 80275e2: 4602 mov r2, r0 80275e4: 69fb ldr r3, [r7, #28] 80275e6: 4413 add r3, r2 80275e8: 61fb str r3, [r7, #28] if (options->MQTTVersion == 4) 80275ea: 687b ldr r3, [r7, #4] 80275ec: 7a1b ldrb r3, [r3, #8] 80275ee: 2b04 cmp r3, #4 80275f0: d10c bne.n 802760c { writeCString(&ptr, "MQTT"); 80275f2: f107 031c add.w r3, r7, #28 80275f6: 4955 ldr r1, [pc, #340] @ (802774c ) 80275f8: 4618 mov r0, r3 80275fa: f000 fb3c bl 8027c76 writeChar(&ptr, (char) 4); 80275fe: f107 031c add.w r3, r7, #28 8027602: 2104 movs r1, #4 8027604: 4618 mov r0, r3 8027606: f000 faf8 bl 8027bfa 802760a: e00b b.n 8027624 } else { writeCString(&ptr, "MQIsdp"); 802760c: f107 031c add.w r3, r7, #28 8027610: 494f ldr r1, [pc, #316] @ (8027750 ) 8027612: 4618 mov r0, r3 8027614: f000 fb2f bl 8027c76 writeChar(&ptr, (char) 3); 8027618: f107 031c add.w r3, r7, #28 802761c: 2103 movs r1, #3 802761e: 4618 mov r0, r3 8027620: f000 faeb bl 8027bfa } flags.all = 0; 8027624: 2300 movs r3, #0 8027626: 753b strb r3, [r7, #20] flags.bits.cleansession = options->cleansession; 8027628: 687b ldr r3, [r7, #4] 802762a: 7e9b ldrb r3, [r3, #26] 802762c: f003 0301 and.w r3, r3, #1 8027630: b2da uxtb r2, r3 8027632: 7d3b ldrb r3, [r7, #20] 8027634: f362 0341 bfi r3, r2, #1, #1 8027638: 753b strb r3, [r7, #20] flags.bits.will = (options->willFlag) ? 1 : 0; 802763a: 687b ldr r3, [r7, #4] 802763c: 7edb ldrb r3, [r3, #27] 802763e: 2b00 cmp r3, #0 8027640: bf14 ite ne 8027642: 2301 movne r3, #1 8027644: 2300 moveq r3, #0 8027646: b2da uxtb r2, r3 8027648: 7d3b ldrb r3, [r7, #20] 802764a: f362 0382 bfi r3, r2, #2, #1 802764e: 753b strb r3, [r7, #20] if (flags.bits.will) 8027650: 7d3b ldrb r3, [r7, #20] 8027652: f003 0304 and.w r3, r3, #4 8027656: b2db uxtb r3, r3 8027658: 2b00 cmp r3, #0 802765a: d013 beq.n 8027684 { flags.bits.willQoS = options->will.qos; 802765c: 687b ldr r3, [r7, #4] 802765e: f893 303d ldrb.w r3, [r3, #61] @ 0x3d 8027662: f003 0303 and.w r3, r3, #3 8027666: b2da uxtb r2, r3 8027668: 7d3b ldrb r3, [r7, #20] 802766a: f362 03c4 bfi r3, r2, #3, #2 802766e: 753b strb r3, [r7, #20] flags.bits.willRetain = options->will.retained; 8027670: 687b ldr r3, [r7, #4] 8027672: f893 303c ldrb.w r3, [r3, #60] @ 0x3c 8027676: f003 0301 and.w r3, r3, #1 802767a: b2da uxtb r2, r3 802767c: 7d3b ldrb r3, [r7, #20] 802767e: f362 1345 bfi r3, r2, #5, #1 8027682: 753b strb r3, [r7, #20] } if (options->username.cstring || options->username.lenstring.data) 8027684: 687b ldr r3, [r7, #4] 8027686: 6c1b ldr r3, [r3, #64] @ 0x40 8027688: 2b00 cmp r3, #0 802768a: d103 bne.n 8027694 802768c: 687b ldr r3, [r7, #4] 802768e: 6c9b ldr r3, [r3, #72] @ 0x48 8027690: 2b00 cmp r3, #0 8027692: d003 beq.n 802769c flags.bits.username = 1; 8027694: 7d3b ldrb r3, [r7, #20] 8027696: f043 0380 orr.w r3, r3, #128 @ 0x80 802769a: 753b strb r3, [r7, #20] if (options->password.cstring || options->password.lenstring.data) 802769c: 687b ldr r3, [r7, #4] 802769e: 6cdb ldr r3, [r3, #76] @ 0x4c 80276a0: 2b00 cmp r3, #0 80276a2: d103 bne.n 80276ac 80276a4: 687b ldr r3, [r7, #4] 80276a6: 6d5b ldr r3, [r3, #84] @ 0x54 80276a8: 2b00 cmp r3, #0 80276aa: d003 beq.n 80276b4 flags.bits.password = 1; 80276ac: 7d3b ldrb r3, [r7, #20] 80276ae: f043 0340 orr.w r3, r3, #64 @ 0x40 80276b2: 753b strb r3, [r7, #20] writeChar(&ptr, flags.all); 80276b4: 7d3a ldrb r2, [r7, #20] 80276b6: f107 031c add.w r3, r7, #28 80276ba: 4611 mov r1, r2 80276bc: 4618 mov r0, r3 80276be: f000 fa9c bl 8027bfa writeInt(&ptr, options->keepAliveInterval); 80276c2: 687b ldr r3, [r7, #4] 80276c4: 8b1b ldrh r3, [r3, #24] 80276c6: 461a mov r2, r3 80276c8: f107 031c add.w r3, r7, #28 80276cc: 4611 mov r1, r2 80276ce: 4618 mov r0, r3 80276d0: f000 faa8 bl 8027c24 writeMQTTString(&ptr, options->clientID); 80276d4: 687b ldr r3, [r7, #4] 80276d6: f107 001c add.w r0, r7, #28 80276da: 330c adds r3, #12 80276dc: cb0e ldmia r3, {r1, r2, r3} 80276de: f000 fae9 bl 8027cb4 if (options->willFlag) 80276e2: 687b ldr r3, [r7, #4] 80276e4: 7edb ldrb r3, [r3, #27] 80276e6: 2b00 cmp r3, #0 80276e8: d00d beq.n 8027706 { writeMQTTString(&ptr, options->will.topicName); 80276ea: 687b ldr r3, [r7, #4] 80276ec: f107 001c add.w r0, r7, #28 80276f0: 3324 adds r3, #36 @ 0x24 80276f2: cb0e ldmia r3, {r1, r2, r3} 80276f4: f000 fade bl 8027cb4 writeMQTTString(&ptr, options->will.message); 80276f8: 687b ldr r3, [r7, #4] 80276fa: f107 001c add.w r0, r7, #28 80276fe: 3330 adds r3, #48 @ 0x30 8027700: cb0e ldmia r3, {r1, r2, r3} 8027702: f000 fad7 bl 8027cb4 } if (flags.bits.username) 8027706: 7d3b ldrb r3, [r7, #20] 8027708: f023 037f bic.w r3, r3, #127 @ 0x7f 802770c: b2db uxtb r3, r3 802770e: 2b00 cmp r3, #0 8027710: d006 beq.n 8027720 writeMQTTString(&ptr, options->username); 8027712: 687b ldr r3, [r7, #4] 8027714: f107 001c add.w r0, r7, #28 8027718: 3340 adds r3, #64 @ 0x40 802771a: cb0e ldmia r3, {r1, r2, r3} 802771c: f000 faca bl 8027cb4 if (flags.bits.password) 8027720: 7d3b ldrb r3, [r7, #20] 8027722: f003 0340 and.w r3, r3, #64 @ 0x40 8027726: b2db uxtb r3, r3 8027728: 2b00 cmp r3, #0 802772a: d006 beq.n 802773a writeMQTTString(&ptr, options->password); 802772c: 687b ldr r3, [r7, #4] 802772e: f107 001c add.w r0, r7, #28 8027732: 334c adds r3, #76 @ 0x4c 8027734: cb0e ldmia r3, {r1, r2, r3} 8027736: f000 fabd bl 8027cb4 rc = ptr - buf; 802773a: 69fa ldr r2, [r7, #28] 802773c: 68fb ldr r3, [r7, #12] 802773e: 1ad3 subs r3, r2, r3 8027740: 627b str r3, [r7, #36] @ 0x24 exit: FUNC_EXIT_RC(rc); return rc; 8027742: 6a7b ldr r3, [r7, #36] @ 0x24 } 8027744: 4618 mov r0, r3 8027746: 3728 adds r7, #40 @ 0x28 8027748: 46bd mov sp, r7 802774a: bd80 pop {r7, pc} 802774c: 08030980 .word 0x08030980 8027750: 08030988 .word 0x08030988 08027754 : * @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) { 8027754: b580 push {r7, lr} 8027756: b08a sub sp, #40 @ 0x28 8027758: af00 add r7, sp, #0 802775a: 60f8 str r0, [r7, #12] 802775c: 60b9 str r1, [r7, #8] 802775e: 607a str r2, [r7, #4] 8027760: 603b str r3, [r7, #0] MQTTHeader header = {0}; 8027762: 2300 movs r3, #0 8027764: 61fb str r3, [r7, #28] unsigned char* curdata = buf; 8027766: 687b ldr r3, [r7, #4] 8027768: 61bb str r3, [r7, #24] unsigned char* enddata = NULL; 802776a: 2300 movs r3, #0 802776c: 623b str r3, [r7, #32] int rc = 0; 802776e: 2300 movs r3, #0 8027770: 627b str r3, [r7, #36] @ 0x24 int mylen; MQTTConnackFlags flags = {0}; 8027772: 2300 movs r3, #0 8027774: 613b str r3, [r7, #16] FUNC_ENTRY; header.byte = readChar(&curdata); 8027776: f107 0318 add.w r3, r7, #24 802777a: 4618 mov r0, r3 802777c: f000 fa29 bl 8027bd2 8027780: 4603 mov r3, r0 8027782: 773b strb r3, [r7, #28] if (header.bits.type != CONNACK) 8027784: 7f3b ldrb r3, [r7, #28] 8027786: f023 030f bic.w r3, r3, #15 802778a: b2db uxtb r3, r3 802778c: 2b20 cmp r3, #32 802778e: d12e bne.n 80277ee goto exit; curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 8027790: 69bb ldr r3, [r7, #24] 8027792: f107 0214 add.w r2, r7, #20 8027796: 4611 mov r1, r2 8027798: 4618 mov r0, r3 802779a: f000 f9e9 bl 8027b70 802779e: 6278 str r0, [r7, #36] @ 0x24 80277a0: 6a7a ldr r2, [r7, #36] @ 0x24 80277a2: 69bb ldr r3, [r7, #24] 80277a4: 4413 add r3, r2 80277a6: 61bb str r3, [r7, #24] enddata = curdata + mylen; 80277a8: 69bb ldr r3, [r7, #24] 80277aa: 697a ldr r2, [r7, #20] 80277ac: 4413 add r3, r2 80277ae: 623b str r3, [r7, #32] if (enddata - curdata < 2) 80277b0: 69bb ldr r3, [r7, #24] 80277b2: 6a3a ldr r2, [r7, #32] 80277b4: 1ad3 subs r3, r2, r3 80277b6: 2b01 cmp r3, #1 80277b8: dd1b ble.n 80277f2 goto exit; flags.all = readChar(&curdata); 80277ba: f107 0318 add.w r3, r7, #24 80277be: 4618 mov r0, r3 80277c0: f000 fa07 bl 8027bd2 80277c4: 4603 mov r3, r0 80277c6: 743b strb r3, [r7, #16] *sessionPresent = flags.bits.sessionpresent; 80277c8: 7c3b ldrb r3, [r7, #16] 80277ca: f3c3 0300 ubfx r3, r3, #0, #1 80277ce: b2db uxtb r3, r3 80277d0: 461a mov r2, r3 80277d2: 68fb ldr r3, [r7, #12] 80277d4: 701a strb r2, [r3, #0] *connack_rc = readChar(&curdata); 80277d6: f107 0318 add.w r3, r7, #24 80277da: 4618 mov r0, r3 80277dc: f000 f9f9 bl 8027bd2 80277e0: 4603 mov r3, r0 80277e2: 461a mov r2, r3 80277e4: 68bb ldr r3, [r7, #8] 80277e6: 701a strb r2, [r3, #0] rc = 1; 80277e8: 2301 movs r3, #1 80277ea: 627b str r3, [r7, #36] @ 0x24 80277ec: e002 b.n 80277f4 goto exit; 80277ee: bf00 nop 80277f0: e000 b.n 80277f4 goto exit; 80277f2: bf00 nop exit: FUNC_EXIT_RC(rc); return rc; 80277f4: 6a7b ldr r3, [r7, #36] @ 0x24 } 80277f6: 4618 mov r0, r3 80277f8: 3728 adds r7, #40 @ 0x28 80277fa: 46bd mov sp, r7 80277fc: bd80 pop {r7, pc} 080277fe : * @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) { 80277fe: b580 push {r7, lr} 8027800: b088 sub sp, #32 8027802: af00 add r7, sp, #0 8027804: 60f8 str r0, [r7, #12] 8027806: 60b9 str r1, [r7, #8] 8027808: 4613 mov r3, r2 802780a: 71fb strb r3, [r7, #7] MQTTHeader header = {0}; 802780c: 2300 movs r3, #0 802780e: 61bb str r3, [r7, #24] int rc = -1; 8027810: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027814: 61fb str r3, [r7, #28] unsigned char *ptr = buf; 8027816: 68fb ldr r3, [r7, #12] 8027818: 617b str r3, [r7, #20] FUNC_ENTRY; if (buflen < 2) 802781a: 68bb ldr r3, [r7, #8] 802781c: 2b01 cmp r3, #1 802781e: dc03 bgt.n 8027828 { rc = MQTTPACKET_BUFFER_TOO_SHORT; 8027820: f06f 0301 mvn.w r3, #1 8027824: 61fb str r3, [r7, #28] goto exit; 8027826: e01d b.n 8027864 } header.byte = 0; 8027828: 2300 movs r3, #0 802782a: 763b strb r3, [r7, #24] header.bits.type = packettype; 802782c: 79fb ldrb r3, [r7, #7] 802782e: f003 030f and.w r3, r3, #15 8027832: b2da uxtb r2, r3 8027834: 7e3b ldrb r3, [r7, #24] 8027836: f362 1307 bfi r3, r2, #4, #4 802783a: 763b strb r3, [r7, #24] writeChar(&ptr, header.byte); /* write header */ 802783c: 7e3a ldrb r2, [r7, #24] 802783e: f107 0314 add.w r3, r7, #20 8027842: 4611 mov r1, r2 8027844: 4618 mov r0, r3 8027846: f000 f9d8 bl 8027bfa ptr += MQTTPacket_encode(ptr, 0); /* write remaining length */ 802784a: 697b ldr r3, [r7, #20] 802784c: 2100 movs r1, #0 802784e: 4618 mov r0, r3 8027850: f000 f8d9 bl 8027a06 8027854: 4602 mov r2, r0 8027856: 697b ldr r3, [r7, #20] 8027858: 4413 add r3, r2 802785a: 617b str r3, [r7, #20] rc = ptr - buf; 802785c: 697a ldr r2, [r7, #20] 802785e: 68fb ldr r3, [r7, #12] 8027860: 1ad3 subs r3, r2, r3 8027862: 61fb str r3, [r7, #28] exit: FUNC_EXIT_RC(rc); return rc; 8027864: 69fb ldr r3, [r7, #28] } 8027866: 4618 mov r0, r3 8027868: 3720 adds r7, #32 802786a: 46bd mov sp, r7 802786c: bd80 pop {r7, pc} 0802786e : * @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) { 802786e: b580 push {r7, lr} 8027870: b082 sub sp, #8 8027872: af00 add r7, sp, #0 8027874: 6078 str r0, [r7, #4] 8027876: 6039 str r1, [r7, #0] return MQTTSerialize_zero(buf, buflen, PINGREQ); 8027878: 220c movs r2, #12 802787a: 6839 ldr r1, [r7, #0] 802787c: 6878 ldr r0, [r7, #4] 802787e: f7ff ffbe bl 80277fe 8027882: 4603 mov r3, r0 } 8027884: 4618 mov r0, r3 8027886: 3708 adds r7, #8 8027888: 46bd mov sp, r7 802788a: bd80 pop {r7, pc} 0802788c : * @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) { 802788c: b580 push {r7, lr} 802788e: b08a sub sp, #40 @ 0x28 8027890: af00 add r7, sp, #0 8027892: 60f8 str r0, [r7, #12] 8027894: 60b9 str r1, [r7, #8] 8027896: 607a str r2, [r7, #4] 8027898: 603b str r3, [r7, #0] MQTTHeader header = {0}; 802789a: 2300 movs r3, #0 802789c: 61fb str r3, [r7, #28] unsigned char* curdata = buf; 802789e: 6bfb ldr r3, [r7, #60] @ 0x3c 80278a0: 61bb str r3, [r7, #24] unsigned char* enddata = NULL; 80278a2: 2300 movs r3, #0 80278a4: 623b str r3, [r7, #32] int rc = 0; 80278a6: 2300 movs r3, #0 80278a8: 627b str r3, [r7, #36] @ 0x24 int mylen = 0; 80278aa: 2300 movs r3, #0 80278ac: 617b str r3, [r7, #20] FUNC_ENTRY; header.byte = readChar(&curdata); 80278ae: f107 0318 add.w r3, r7, #24 80278b2: 4618 mov r0, r3 80278b4: f000 f98d bl 8027bd2 80278b8: 4603 mov r3, r0 80278ba: 773b strb r3, [r7, #28] if (header.bits.type != PUBLISH) 80278bc: 7f3b ldrb r3, [r7, #28] 80278be: f023 030f bic.w r3, r3, #15 80278c2: b2db uxtb r3, r3 80278c4: 2b30 cmp r3, #48 @ 0x30 80278c6: d14b bne.n 8027960 goto exit; *dup = header.bits.dup; 80278c8: 7f3b ldrb r3, [r7, #28] 80278ca: f3c3 03c0 ubfx r3, r3, #3, #1 80278ce: b2db uxtb r3, r3 80278d0: 461a mov r2, r3 80278d2: 68fb ldr r3, [r7, #12] 80278d4: 701a strb r2, [r3, #0] *qos = header.bits.qos; 80278d6: 7f3b ldrb r3, [r7, #28] 80278d8: f3c3 0341 ubfx r3, r3, #1, #2 80278dc: b2db uxtb r3, r3 80278de: 461a mov r2, r3 80278e0: 68bb ldr r3, [r7, #8] 80278e2: 601a str r2, [r3, #0] *retained = header.bits.retain; 80278e4: 7f3b ldrb r3, [r7, #28] 80278e6: f3c3 0300 ubfx r3, r3, #0, #1 80278ea: b2db uxtb r3, r3 80278ec: 461a mov r2, r3 80278ee: 687b ldr r3, [r7, #4] 80278f0: 701a strb r2, [r3, #0] curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 80278f2: 69bb ldr r3, [r7, #24] 80278f4: f107 0214 add.w r2, r7, #20 80278f8: 4611 mov r1, r2 80278fa: 4618 mov r0, r3 80278fc: f000 f938 bl 8027b70 8027900: 6278 str r0, [r7, #36] @ 0x24 8027902: 6a7a ldr r2, [r7, #36] @ 0x24 8027904: 69bb ldr r3, [r7, #24] 8027906: 4413 add r3, r2 8027908: 61bb str r3, [r7, #24] enddata = curdata + mylen; 802790a: 69bb ldr r3, [r7, #24] 802790c: 697a ldr r2, [r7, #20] 802790e: 4413 add r3, r2 8027910: 623b str r3, [r7, #32] if (!readMQTTLenString(topicName, &curdata, enddata) || 8027912: f107 0318 add.w r3, r7, #24 8027916: 6a3a ldr r2, [r7, #32] 8027918: 4619 mov r1, r3 802791a: 6b38 ldr r0, [r7, #48] @ 0x30 802791c: f000 f9f8 bl 8027d10 8027920: 4603 mov r3, r0 8027922: 2b00 cmp r3, #0 8027924: d01e beq.n 8027964 enddata - curdata < 0) /* do we have enough data to read the protocol version byte? */ 8027926: 69bb ldr r3, [r7, #24] 8027928: 6a3a ldr r2, [r7, #32] 802792a: 1ad3 subs r3, r2, r3 if (!readMQTTLenString(topicName, &curdata, enddata) || 802792c: 2b00 cmp r3, #0 802792e: db19 blt.n 8027964 goto exit; if (*qos > 0) 8027930: 68bb ldr r3, [r7, #8] 8027932: 681b ldr r3, [r3, #0] 8027934: 2b00 cmp r3, #0 8027936: dd08 ble.n 802794a *packetid = readInt(&curdata); 8027938: f107 0318 add.w r3, r7, #24 802793c: 4618 mov r0, r3 802793e: f000 f92d bl 8027b9c 8027942: 4603 mov r3, r0 8027944: b29a uxth r2, r3 8027946: 683b ldr r3, [r7, #0] 8027948: 801a strh r2, [r3, #0] *payloadlen = enddata - curdata; 802794a: 69bb ldr r3, [r7, #24] 802794c: 6a3a ldr r2, [r7, #32] 802794e: 1ad2 subs r2, r2, r3 8027950: 6bbb ldr r3, [r7, #56] @ 0x38 8027952: 601a str r2, [r3, #0] *payload = curdata; 8027954: 69ba ldr r2, [r7, #24] 8027956: 6b7b ldr r3, [r7, #52] @ 0x34 8027958: 601a str r2, [r3, #0] rc = 1; 802795a: 2301 movs r3, #1 802795c: 627b str r3, [r7, #36] @ 0x24 802795e: e002 b.n 8027966 goto exit; 8027960: bf00 nop 8027962: e000 b.n 8027966 goto exit; 8027964: bf00 nop exit: FUNC_EXIT_RC(rc); return rc; 8027966: 6a7b ldr r3, [r7, #36] @ 0x24 } 8027968: 4618 mov r0, r3 802796a: 3728 adds r7, #40 @ 0x28 802796c: 46bd mov sp, r7 802796e: bd80 pop {r7, pc} 08027970 : * @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) { 8027970: b580 push {r7, lr} 8027972: b08a sub sp, #40 @ 0x28 8027974: af00 add r7, sp, #0 8027976: 60f8 str r0, [r7, #12] 8027978: 60b9 str r1, [r7, #8] 802797a: 607a str r2, [r7, #4] 802797c: 603b str r3, [r7, #0] MQTTHeader header = {0}; 802797e: 2300 movs r3, #0 8027980: 61fb str r3, [r7, #28] unsigned char* curdata = buf; 8027982: 683b ldr r3, [r7, #0] 8027984: 61bb str r3, [r7, #24] unsigned char* enddata = NULL; 8027986: 2300 movs r3, #0 8027988: 623b str r3, [r7, #32] int rc = 0; 802798a: 2300 movs r3, #0 802798c: 627b str r3, [r7, #36] @ 0x24 int mylen; FUNC_ENTRY; header.byte = readChar(&curdata); 802798e: f107 0318 add.w r3, r7, #24 8027992: 4618 mov r0, r3 8027994: f000 f91d bl 8027bd2 8027998: 4603 mov r3, r0 802799a: 773b strb r3, [r7, #28] *dup = header.bits.dup; 802799c: 7f3b ldrb r3, [r7, #28] 802799e: f3c3 03c0 ubfx r3, r3, #3, #1 80279a2: b2db uxtb r3, r3 80279a4: 461a mov r2, r3 80279a6: 68bb ldr r3, [r7, #8] 80279a8: 701a strb r2, [r3, #0] *packettype = header.bits.type; 80279aa: 7f3b ldrb r3, [r7, #28] 80279ac: f3c3 1303 ubfx r3, r3, #4, #4 80279b0: b2db uxtb r3, r3 80279b2: 461a mov r2, r3 80279b4: 68fb ldr r3, [r7, #12] 80279b6: 701a strb r2, [r3, #0] curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 80279b8: 69bb ldr r3, [r7, #24] 80279ba: f107 0214 add.w r2, r7, #20 80279be: 4611 mov r1, r2 80279c0: 4618 mov r0, r3 80279c2: f000 f8d5 bl 8027b70 80279c6: 6278 str r0, [r7, #36] @ 0x24 80279c8: 6a7a ldr r2, [r7, #36] @ 0x24 80279ca: 69bb ldr r3, [r7, #24] 80279cc: 4413 add r3, r2 80279ce: 61bb str r3, [r7, #24] enddata = curdata + mylen; 80279d0: 69bb ldr r3, [r7, #24] 80279d2: 697a ldr r2, [r7, #20] 80279d4: 4413 add r3, r2 80279d6: 623b str r3, [r7, #32] if (enddata - curdata < 2) 80279d8: 69bb ldr r3, [r7, #24] 80279da: 6a3a ldr r2, [r7, #32] 80279dc: 1ad3 subs r3, r2, r3 80279de: 2b01 cmp r3, #1 80279e0: dd0b ble.n 80279fa goto exit; *packetid = readInt(&curdata); 80279e2: f107 0318 add.w r3, r7, #24 80279e6: 4618 mov r0, r3 80279e8: f000 f8d8 bl 8027b9c 80279ec: 4603 mov r3, r0 80279ee: b29a uxth r2, r3 80279f0: 687b ldr r3, [r7, #4] 80279f2: 801a strh r2, [r3, #0] rc = 1; 80279f4: 2301 movs r3, #1 80279f6: 627b str r3, [r7, #36] @ 0x24 80279f8: e000 b.n 80279fc goto exit; 80279fa: bf00 nop exit: FUNC_EXIT_RC(rc); return rc; 80279fc: 6a7b ldr r3, [r7, #36] @ 0x24 } 80279fe: 4618 mov r0, r3 8027a00: 3728 adds r7, #40 @ 0x28 8027a02: 46bd mov sp, r7 8027a04: bd80 pop {r7, pc} 08027a06 : * @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) { 8027a06: b480 push {r7} 8027a08: b085 sub sp, #20 8027a0a: af00 add r7, sp, #0 8027a0c: 6078 str r0, [r7, #4] 8027a0e: 6039 str r1, [r7, #0] int rc = 0; 8027a10: 2300 movs r3, #0 8027a12: 60fb str r3, [r7, #12] FUNC_ENTRY; do { char d = length % 128; 8027a14: 683b ldr r3, [r7, #0] 8027a16: 425a negs r2, r3 8027a18: f003 037f and.w r3, r3, #127 @ 0x7f 8027a1c: f002 027f and.w r2, r2, #127 @ 0x7f 8027a20: bf58 it pl 8027a22: 4253 negpl r3, r2 8027a24: 72fb strb r3, [r7, #11] length /= 128; 8027a26: 683b ldr r3, [r7, #0] 8027a28: 2b00 cmp r3, #0 8027a2a: da00 bge.n 8027a2e 8027a2c: 337f adds r3, #127 @ 0x7f 8027a2e: 11db asrs r3, r3, #7 8027a30: 603b str r3, [r7, #0] /* if there are more digits to encode, set the top bit of this digit */ if (length > 0) 8027a32: 683b ldr r3, [r7, #0] 8027a34: 2b00 cmp r3, #0 8027a36: dd03 ble.n 8027a40 d |= 0x80; 8027a38: 7afb ldrb r3, [r7, #11] 8027a3a: f063 037f orn r3, r3, #127 @ 0x7f 8027a3e: 72fb strb r3, [r7, #11] buf[rc++] = d; 8027a40: 68fb ldr r3, [r7, #12] 8027a42: 1c5a adds r2, r3, #1 8027a44: 60fa str r2, [r7, #12] 8027a46: 461a mov r2, r3 8027a48: 687b ldr r3, [r7, #4] 8027a4a: 4413 add r3, r2 8027a4c: 7afa ldrb r2, [r7, #11] 8027a4e: 701a strb r2, [r3, #0] } while (length > 0); 8027a50: 683b ldr r3, [r7, #0] 8027a52: 2b00 cmp r3, #0 8027a54: dcde bgt.n 8027a14 FUNC_EXIT_RC(rc); return rc; 8027a56: 68fb ldr r3, [r7, #12] } 8027a58: 4618 mov r0, r3 8027a5a: 3714 adds r7, #20 8027a5c: 46bd mov sp, r7 8027a5e: f85d 7b04 ldr.w r7, [sp], #4 8027a62: 4770 bx lr 08027a64 : * @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) { 8027a64: b580 push {r7, lr} 8027a66: b086 sub sp, #24 8027a68: af00 add r7, sp, #0 8027a6a: 6078 str r0, [r7, #4] 8027a6c: 6039 str r1, [r7, #0] unsigned char c; int multiplier = 1; 8027a6e: 2301 movs r3, #1 8027a70: 617b str r3, [r7, #20] int len = 0; 8027a72: 2300 movs r3, #0 8027a74: 613b str r3, [r7, #16] #define MAX_NO_OF_REMAINING_LENGTH_BYTES 4 FUNC_ENTRY; *value = 0; 8027a76: 683b ldr r3, [r7, #0] 8027a78: 2200 movs r2, #0 8027a7a: 601a str r2, [r3, #0] do { int rc = MQTTPACKET_READ_ERROR; 8027a7c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027a80: 60fb str r3, [r7, #12] if (++len > MAX_NO_OF_REMAINING_LENGTH_BYTES) 8027a82: 693b ldr r3, [r7, #16] 8027a84: 3301 adds r3, #1 8027a86: 613b str r3, [r7, #16] 8027a88: 693b ldr r3, [r7, #16] 8027a8a: 2b04 cmp r3, #4 8027a8c: dd03 ble.n 8027a96 { rc = MQTTPACKET_READ_ERROR; /* bad data */ 8027a8e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027a92: 60fb str r3, [r7, #12] goto exit; 8027a94: e01d b.n 8027ad2 } rc = (*getcharfn)(&c, 1); 8027a96: f107 020b add.w r2, r7, #11 8027a9a: 687b ldr r3, [r7, #4] 8027a9c: 2101 movs r1, #1 8027a9e: 4610 mov r0, r2 8027aa0: 4798 blx r3 8027aa2: 60f8 str r0, [r7, #12] if (rc != 1) 8027aa4: 68fb ldr r3, [r7, #12] 8027aa6: 2b01 cmp r3, #1 8027aa8: d112 bne.n 8027ad0 goto exit; *value += (c & 127) * multiplier; 8027aaa: 683b ldr r3, [r7, #0] 8027aac: 681a ldr r2, [r3, #0] 8027aae: 7afb ldrb r3, [r7, #11] 8027ab0: f003 037f and.w r3, r3, #127 @ 0x7f 8027ab4: 6979 ldr r1, [r7, #20] 8027ab6: fb01 f303 mul.w r3, r1, r3 8027aba: 441a add r2, r3 8027abc: 683b ldr r3, [r7, #0] 8027abe: 601a str r2, [r3, #0] multiplier *= 128; 8027ac0: 697b ldr r3, [r7, #20] 8027ac2: 01db lsls r3, r3, #7 8027ac4: 617b str r3, [r7, #20] } while ((c & 128) != 0); 8027ac6: 7afb ldrb r3, [r7, #11] 8027ac8: b25b sxtb r3, r3 8027aca: 2b00 cmp r3, #0 8027acc: dbd6 blt.n 8027a7c exit: 8027ace: e000 b.n 8027ad2 goto exit; 8027ad0: bf00 nop FUNC_EXIT_RC(len); return len; 8027ad2: 693b ldr r3, [r7, #16] } 8027ad4: 4618 mov r0, r3 8027ad6: 3718 adds r7, #24 8027ad8: 46bd mov sp, r7 8027ada: bd80 pop {r7, pc} 08027adc : int MQTTPacket_len(int rem_len) { 8027adc: b480 push {r7} 8027ade: b083 sub sp, #12 8027ae0: af00 add r7, sp, #0 8027ae2: 6078 str r0, [r7, #4] rem_len += 1; /* header byte */ 8027ae4: 687b ldr r3, [r7, #4] 8027ae6: 3301 adds r3, #1 8027ae8: 607b str r3, [r7, #4] /* now remaining_length field */ if (rem_len < 128) 8027aea: 687b ldr r3, [r7, #4] 8027aec: 2b7f cmp r3, #127 @ 0x7f 8027aee: dc03 bgt.n 8027af8 rem_len += 1; 8027af0: 687b ldr r3, [r7, #4] 8027af2: 3301 adds r3, #1 8027af4: 607b str r3, [r7, #4] 8027af6: e012 b.n 8027b1e else if (rem_len < 16384) 8027af8: 687b ldr r3, [r7, #4] 8027afa: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 8027afe: da03 bge.n 8027b08 rem_len += 2; 8027b00: 687b ldr r3, [r7, #4] 8027b02: 3302 adds r3, #2 8027b04: 607b str r3, [r7, #4] 8027b06: e00a b.n 8027b1e else if (rem_len < 2097151) 8027b08: 687b ldr r3, [r7, #4] 8027b0a: 4a08 ldr r2, [pc, #32] @ (8027b2c ) 8027b0c: 4293 cmp r3, r2 8027b0e: dc03 bgt.n 8027b18 rem_len += 3; 8027b10: 687b ldr r3, [r7, #4] 8027b12: 3303 adds r3, #3 8027b14: 607b str r3, [r7, #4] 8027b16: e002 b.n 8027b1e else rem_len += 4; 8027b18: 687b ldr r3, [r7, #4] 8027b1a: 3304 adds r3, #4 8027b1c: 607b str r3, [r7, #4] return rem_len; 8027b1e: 687b ldr r3, [r7, #4] } 8027b20: 4618 mov r0, r3 8027b22: 370c adds r7, #12 8027b24: 46bd mov sp, r7 8027b26: f85d 7b04 ldr.w r7, [sp], #4 8027b2a: 4770 bx lr 8027b2c: 001ffffe .word 0x001ffffe 08027b30 : static unsigned char* bufptr; int bufchar(unsigned char* c, int count) { 8027b30: b480 push {r7} 8027b32: b085 sub sp, #20 8027b34: af00 add r7, sp, #0 8027b36: 6078 str r0, [r7, #4] 8027b38: 6039 str r1, [r7, #0] int i; for (i = 0; i < count; ++i) 8027b3a: 2300 movs r3, #0 8027b3c: 60fb str r3, [r7, #12] 8027b3e: e00a b.n 8027b56 *c = *bufptr++; 8027b40: 4b0a ldr r3, [pc, #40] @ (8027b6c ) 8027b42: 681b ldr r3, [r3, #0] 8027b44: 1c5a adds r2, r3, #1 8027b46: 4909 ldr r1, [pc, #36] @ (8027b6c ) 8027b48: 600a str r2, [r1, #0] 8027b4a: 781a ldrb r2, [r3, #0] 8027b4c: 687b ldr r3, [r7, #4] 8027b4e: 701a strb r2, [r3, #0] for (i = 0; i < count; ++i) 8027b50: 68fb ldr r3, [r7, #12] 8027b52: 3301 adds r3, #1 8027b54: 60fb str r3, [r7, #12] 8027b56: 68fa ldr r2, [r7, #12] 8027b58: 683b ldr r3, [r7, #0] 8027b5a: 429a cmp r2, r3 8027b5c: dbf0 blt.n 8027b40 return count; 8027b5e: 683b ldr r3, [r7, #0] } 8027b60: 4618 mov r0, r3 8027b62: 3714 adds r7, #20 8027b64: 46bd mov sp, r7 8027b66: f85d 7b04 ldr.w r7, [sp], #4 8027b6a: 4770 bx lr 8027b6c: 2402b038 .word 0x2402b038 08027b70 : int MQTTPacket_decodeBuf(unsigned char* buf, int* value) { 8027b70: b580 push {r7, lr} 8027b72: b082 sub sp, #8 8027b74: af00 add r7, sp, #0 8027b76: 6078 str r0, [r7, #4] 8027b78: 6039 str r1, [r7, #0] bufptr = buf; 8027b7a: 4a06 ldr r2, [pc, #24] @ (8027b94 ) 8027b7c: 687b ldr r3, [r7, #4] 8027b7e: 6013 str r3, [r2, #0] return MQTTPacket_decode(bufchar, value); 8027b80: 6839 ldr r1, [r7, #0] 8027b82: 4805 ldr r0, [pc, #20] @ (8027b98 ) 8027b84: f7ff ff6e bl 8027a64 8027b88: 4603 mov r3, r0 } 8027b8a: 4618 mov r0, r3 8027b8c: 3708 adds r7, #8 8027b8e: 46bd mov sp, r7 8027b90: bd80 pop {r7, pc} 8027b92: bf00 nop 8027b94: 2402b038 .word 0x2402b038 8027b98: 08027b31 .word 0x08027b31 08027b9c : * 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) { 8027b9c: b480 push {r7} 8027b9e: b085 sub sp, #20 8027ba0: af00 add r7, sp, #0 8027ba2: 6078 str r0, [r7, #4] unsigned char* ptr = *pptr; 8027ba4: 687b ldr r3, [r7, #4] 8027ba6: 681b ldr r3, [r3, #0] 8027ba8: 60fb str r3, [r7, #12] int len = 256*(*ptr) + (*(ptr+1)); 8027baa: 68fb ldr r3, [r7, #12] 8027bac: 781b ldrb r3, [r3, #0] 8027bae: 021b lsls r3, r3, #8 8027bb0: 68fa ldr r2, [r7, #12] 8027bb2: 3201 adds r2, #1 8027bb4: 7812 ldrb r2, [r2, #0] 8027bb6: 4413 add r3, r2 8027bb8: 60bb str r3, [r7, #8] *pptr += 2; 8027bba: 687b ldr r3, [r7, #4] 8027bbc: 681b ldr r3, [r3, #0] 8027bbe: 1c9a adds r2, r3, #2 8027bc0: 687b ldr r3, [r7, #4] 8027bc2: 601a str r2, [r3, #0] return len; 8027bc4: 68bb ldr r3, [r7, #8] } 8027bc6: 4618 mov r0, r3 8027bc8: 3714 adds r7, #20 8027bca: 46bd mov sp, r7 8027bcc: f85d 7b04 ldr.w r7, [sp], #4 8027bd0: 4770 bx lr 08027bd2 : * 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) { 8027bd2: b480 push {r7} 8027bd4: b085 sub sp, #20 8027bd6: af00 add r7, sp, #0 8027bd8: 6078 str r0, [r7, #4] char c = **pptr; 8027bda: 687b ldr r3, [r7, #4] 8027bdc: 681b ldr r3, [r3, #0] 8027bde: 781b ldrb r3, [r3, #0] 8027be0: 73fb strb r3, [r7, #15] (*pptr)++; 8027be2: 687b ldr r3, [r7, #4] 8027be4: 681b ldr r3, [r3, #0] 8027be6: 1c5a adds r2, r3, #1 8027be8: 687b ldr r3, [r7, #4] 8027bea: 601a str r2, [r3, #0] return c; 8027bec: 7bfb ldrb r3, [r7, #15] } 8027bee: 4618 mov r0, r3 8027bf0: 3714 adds r7, #20 8027bf2: 46bd mov sp, r7 8027bf4: f85d 7b04 ldr.w r7, [sp], #4 8027bf8: 4770 bx lr 08027bfa : * 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) { 8027bfa: b480 push {r7} 8027bfc: b083 sub sp, #12 8027bfe: af00 add r7, sp, #0 8027c00: 6078 str r0, [r7, #4] 8027c02: 460b mov r3, r1 8027c04: 70fb strb r3, [r7, #3] **pptr = c; 8027c06: 687b ldr r3, [r7, #4] 8027c08: 681b ldr r3, [r3, #0] 8027c0a: 78fa ldrb r2, [r7, #3] 8027c0c: 701a strb r2, [r3, #0] (*pptr)++; 8027c0e: 687b ldr r3, [r7, #4] 8027c10: 681b ldr r3, [r3, #0] 8027c12: 1c5a adds r2, r3, #1 8027c14: 687b ldr r3, [r7, #4] 8027c16: 601a str r2, [r3, #0] } 8027c18: bf00 nop 8027c1a: 370c adds r7, #12 8027c1c: 46bd mov sp, r7 8027c1e: f85d 7b04 ldr.w r7, [sp], #4 8027c22: 4770 bx lr 08027c24 : * 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) { 8027c24: b480 push {r7} 8027c26: b083 sub sp, #12 8027c28: af00 add r7, sp, #0 8027c2a: 6078 str r0, [r7, #4] 8027c2c: 6039 str r1, [r7, #0] **pptr = (unsigned char)(anInt / 256); 8027c2e: 683b ldr r3, [r7, #0] 8027c30: 2b00 cmp r3, #0 8027c32: da00 bge.n 8027c36 8027c34: 33ff adds r3, #255 @ 0xff 8027c36: 121b asrs r3, r3, #8 8027c38: 461a mov r2, r3 8027c3a: 687b ldr r3, [r7, #4] 8027c3c: 681b ldr r3, [r3, #0] 8027c3e: b2d2 uxtb r2, r2 8027c40: 701a strb r2, [r3, #0] (*pptr)++; 8027c42: 687b ldr r3, [r7, #4] 8027c44: 681b ldr r3, [r3, #0] 8027c46: 1c5a adds r2, r3, #1 8027c48: 687b ldr r3, [r7, #4] 8027c4a: 601a str r2, [r3, #0] **pptr = (unsigned char)(anInt % 256); 8027c4c: 683b ldr r3, [r7, #0] 8027c4e: 425a negs r2, r3 8027c50: b2db uxtb r3, r3 8027c52: b2d2 uxtb r2, r2 8027c54: bf58 it pl 8027c56: 4253 negpl r3, r2 8027c58: 687a ldr r2, [r7, #4] 8027c5a: 6812 ldr r2, [r2, #0] 8027c5c: b2db uxtb r3, r3 8027c5e: 7013 strb r3, [r2, #0] (*pptr)++; 8027c60: 687b ldr r3, [r7, #4] 8027c62: 681b ldr r3, [r3, #0] 8027c64: 1c5a adds r2, r3, #1 8027c66: 687b ldr r3, [r7, #4] 8027c68: 601a str r2, [r3, #0] } 8027c6a: bf00 nop 8027c6c: 370c adds r7, #12 8027c6e: 46bd mov sp, r7 8027c70: f85d 7b04 ldr.w r7, [sp], #4 8027c74: 4770 bx lr 08027c76 : * 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) { 8027c76: b580 push {r7, lr} 8027c78: b084 sub sp, #16 8027c7a: af00 add r7, sp, #0 8027c7c: 6078 str r0, [r7, #4] 8027c7e: 6039 str r1, [r7, #0] int len = strlen(string); 8027c80: 6838 ldr r0, [r7, #0] 8027c82: f7d8 fb8d bl 80003a0 8027c86: 4603 mov r3, r0 8027c88: 60fb str r3, [r7, #12] writeInt(pptr, len); 8027c8a: 68f9 ldr r1, [r7, #12] 8027c8c: 6878 ldr r0, [r7, #4] 8027c8e: f7ff ffc9 bl 8027c24 memcpy(*pptr, string, len); 8027c92: 687b ldr r3, [r7, #4] 8027c94: 681b ldr r3, [r3, #0] 8027c96: 68fa ldr r2, [r7, #12] 8027c98: 6839 ldr r1, [r7, #0] 8027c9a: 4618 mov r0, r3 8027c9c: f002 f91f bl 8029ede *pptr += len; 8027ca0: 687b ldr r3, [r7, #4] 8027ca2: 681a ldr r2, [r3, #0] 8027ca4: 68fb ldr r3, [r7, #12] 8027ca6: 441a add r2, r3 8027ca8: 687b ldr r3, [r7, #4] 8027caa: 601a str r2, [r3, #0] } 8027cac: bf00 nop 8027cae: 3710 adds r7, #16 8027cb0: 46bd mov sp, r7 8027cb2: bd80 pop {r7, pc} 08027cb4 : return len; } void writeMQTTString(unsigned char** pptr, MQTTString mqttstring) { 8027cb4: b580 push {r7, lr} 8027cb6: b084 sub sp, #16 8027cb8: af00 add r7, sp, #0 8027cba: 60f8 str r0, [r7, #12] 8027cbc: 4638 mov r0, r7 8027cbe: e880 000e stmia.w r0, {r1, r2, r3} if (mqttstring.lenstring.len > 0) 8027cc2: 687b ldr r3, [r7, #4] 8027cc4: 2b00 cmp r3, #0 8027cc6: dd12 ble.n 8027cee { writeInt(pptr, mqttstring.lenstring.len); 8027cc8: 687b ldr r3, [r7, #4] 8027cca: 4619 mov r1, r3 8027ccc: 68f8 ldr r0, [r7, #12] 8027cce: f7ff ffa9 bl 8027c24 memcpy(*pptr, mqttstring.lenstring.data, mqttstring.lenstring.len); 8027cd2: 68fb ldr r3, [r7, #12] 8027cd4: 681b ldr r3, [r3, #0] 8027cd6: 68b9 ldr r1, [r7, #8] 8027cd8: 687a ldr r2, [r7, #4] 8027cda: 4618 mov r0, r3 8027cdc: f002 f8ff bl 8029ede *pptr += mqttstring.lenstring.len; 8027ce0: 68fb ldr r3, [r7, #12] 8027ce2: 681b ldr r3, [r3, #0] 8027ce4: 687a ldr r2, [r7, #4] 8027ce6: 441a add r2, r3 8027ce8: 68fb ldr r3, [r7, #12] 8027cea: 601a str r2, [r3, #0] } else if (mqttstring.cstring) writeCString(pptr, mqttstring.cstring); else writeInt(pptr, 0); } 8027cec: e00c b.n 8027d08 else if (mqttstring.cstring) 8027cee: 683b ldr r3, [r7, #0] 8027cf0: 2b00 cmp r3, #0 8027cf2: d005 beq.n 8027d00 writeCString(pptr, mqttstring.cstring); 8027cf4: 683b ldr r3, [r7, #0] 8027cf6: 4619 mov r1, r3 8027cf8: 68f8 ldr r0, [r7, #12] 8027cfa: f7ff ffbc bl 8027c76 } 8027cfe: e003 b.n 8027d08 writeInt(pptr, 0); 8027d00: 2100 movs r1, #0 8027d02: 68f8 ldr r0, [r7, #12] 8027d04: f7ff ff8e bl 8027c24 } 8027d08: bf00 nop 8027d0a: 3710 adds r7, #16 8027d0c: 46bd mov sp, r7 8027d0e: bd80 pop {r7, pc} 08027d10 : * @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) { 8027d10: b580 push {r7, lr} 8027d12: b086 sub sp, #24 8027d14: af00 add r7, sp, #0 8027d16: 60f8 str r0, [r7, #12] 8027d18: 60b9 str r1, [r7, #8] 8027d1a: 607a str r2, [r7, #4] int rc = 0; 8027d1c: 2300 movs r3, #0 8027d1e: 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? */ 8027d20: 68bb ldr r3, [r7, #8] 8027d22: 681b ldr r3, [r3, #0] 8027d24: 687a ldr r2, [r7, #4] 8027d26: 1ad3 subs r3, r2, r3 8027d28: 2b01 cmp r3, #1 8027d2a: dd1a ble.n 8027d62 { mqttstring->lenstring.len = readInt(pptr); /* increments pptr to point past length */ 8027d2c: 68b8 ldr r0, [r7, #8] 8027d2e: f7ff ff35 bl 8027b9c 8027d32: 4602 mov r2, r0 8027d34: 68fb ldr r3, [r7, #12] 8027d36: 605a str r2, [r3, #4] if (&(*pptr)[mqttstring->lenstring.len] <= enddata) 8027d38: 68bb ldr r3, [r7, #8] 8027d3a: 681b ldr r3, [r3, #0] 8027d3c: 68fa ldr r2, [r7, #12] 8027d3e: 6852 ldr r2, [r2, #4] 8027d40: 4413 add r3, r2 8027d42: 687a ldr r2, [r7, #4] 8027d44: 429a cmp r2, r3 8027d46: d30c bcc.n 8027d62 { mqttstring->lenstring.data = (char*)*pptr; 8027d48: 68bb ldr r3, [r7, #8] 8027d4a: 681a ldr r2, [r3, #0] 8027d4c: 68fb ldr r3, [r7, #12] 8027d4e: 609a str r2, [r3, #8] *pptr += mqttstring->lenstring.len; 8027d50: 68bb ldr r3, [r7, #8] 8027d52: 681b ldr r3, [r3, #0] 8027d54: 68fa ldr r2, [r7, #12] 8027d56: 6852 ldr r2, [r2, #4] 8027d58: 441a add r2, r3 8027d5a: 68bb ldr r3, [r7, #8] 8027d5c: 601a str r2, [r3, #0] rc = 1; 8027d5e: 2301 movs r3, #1 8027d60: 617b str r3, [r7, #20] } } mqttstring->cstring = NULL; 8027d62: 68fb ldr r3, [r7, #12] 8027d64: 2200 movs r2, #0 8027d66: 601a str r2, [r3, #0] FUNC_EXIT_RC(rc); return rc; 8027d68: 697b ldr r3, [r7, #20] } 8027d6a: 4618 mov r0, r3 8027d6c: 3718 adds r7, #24 8027d6e: 46bd mov sp, r7 8027d70: bd80 pop {r7, pc} 08027d72 : * 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) { 8027d72: b580 push {r7, lr} 8027d74: b086 sub sp, #24 8027d76: af00 add r7, sp, #0 8027d78: 1d3b adds r3, r7, #4 8027d7a: e883 0007 stmia.w r3, {r0, r1, r2} int rc = 0; 8027d7e: 2300 movs r3, #0 8027d80: 617b str r3, [r7, #20] if (mqttstring.cstring) 8027d82: 687b ldr r3, [r7, #4] 8027d84: 2b00 cmp r3, #0 8027d86: d006 beq.n 8027d96 rc = strlen(mqttstring.cstring); 8027d88: 687b ldr r3, [r7, #4] 8027d8a: 4618 mov r0, r3 8027d8c: f7d8 fb08 bl 80003a0 8027d90: 4603 mov r3, r0 8027d92: 617b str r3, [r7, #20] 8027d94: e001 b.n 8027d9a else rc = mqttstring.lenstring.len; 8027d96: 68bb ldr r3, [r7, #8] 8027d98: 617b str r3, [r7, #20] return rc; 8027d9a: 697b ldr r3, [r7, #20] } 8027d9c: 4618 mov r0, r3 8027d9e: 3718 adds r7, #24 8027da0: 46bd mov sp, r7 8027da2: bd80 pop {r7, pc} 08027da4 : * @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) { 8027da4: b580 push {r7, lr} 8027da6: b086 sub sp, #24 8027da8: af00 add r7, sp, #0 8027daa: 6078 str r0, [r7, #4] 8027dac: 6039 str r1, [r7, #0] int alen = 0, 8027dae: 2300 movs r3, #0 8027db0: 617b str r3, [r7, #20] blen = 0; 8027db2: 2300 movs r3, #0 8027db4: 60fb str r3, [r7, #12] char *aptr; if (a->cstring) 8027db6: 687b ldr r3, [r7, #4] 8027db8: 681b ldr r3, [r3, #0] 8027dba: 2b00 cmp r3, #0 8027dbc: d00a beq.n 8027dd4 { aptr = a->cstring; 8027dbe: 687b ldr r3, [r7, #4] 8027dc0: 681b ldr r3, [r3, #0] 8027dc2: 613b str r3, [r7, #16] alen = strlen(a->cstring); 8027dc4: 687b ldr r3, [r7, #4] 8027dc6: 681b ldr r3, [r3, #0] 8027dc8: 4618 mov r0, r3 8027dca: f7d8 fae9 bl 80003a0 8027dce: 4603 mov r3, r0 8027dd0: 617b str r3, [r7, #20] 8027dd2: e005 b.n 8027de0 } else { aptr = a->lenstring.data; 8027dd4: 687b ldr r3, [r7, #4] 8027dd6: 689b ldr r3, [r3, #8] 8027dd8: 613b str r3, [r7, #16] alen = a->lenstring.len; 8027dda: 687b ldr r3, [r7, #4] 8027ddc: 685b ldr r3, [r3, #4] 8027dde: 617b str r3, [r7, #20] } blen = strlen(bptr); 8027de0: 6838 ldr r0, [r7, #0] 8027de2: f7d8 fadd bl 80003a0 8027de6: 4603 mov r3, r0 8027de8: 60fb str r3, [r7, #12] return (alen == blen) && (strncmp(aptr, bptr, alen) == 0); 8027dea: 697a ldr r2, [r7, #20] 8027dec: 68fb ldr r3, [r7, #12] 8027dee: 429a cmp r2, r3 8027df0: d10a bne.n 8027e08 8027df2: 697b ldr r3, [r7, #20] 8027df4: 461a mov r2, r3 8027df6: 6839 ldr r1, [r7, #0] 8027df8: 6938 ldr r0, [r7, #16] 8027dfa: f001 ff81 bl 8029d00 8027dfe: 4603 mov r3, r0 8027e00: 2b00 cmp r3, #0 8027e02: d101 bne.n 8027e08 8027e04: 2301 movs r3, #1 8027e06: e000 b.n 8027e0a 8027e08: 2300 movs r3, #0 } 8027e0a: 4618 mov r0, r3 8027e0c: 3718 adds r7, #24 8027e0e: 46bd mov sp, r7 8027e10: bd80 pop {r7, pc} 08027e12 : * @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) { 8027e12: b580 push {r7, lr} 8027e14: b086 sub sp, #24 8027e16: af00 add r7, sp, #0 8027e18: 60f8 str r0, [r7, #12] 8027e1a: 4638 mov r0, r7 8027e1c: e880 000e stmia.w r0, {r1, r2, r3} int len = 0; 8027e20: 2300 movs r3, #0 8027e22: 617b str r3, [r7, #20] len += 2 + MQTTstrlen(topicName) + payloadlen; 8027e24: 463b mov r3, r7 8027e26: e893 0007 ldmia.w r3, {r0, r1, r2} 8027e2a: f7ff ffa2 bl 8027d72 8027e2e: 4603 mov r3, r0 8027e30: 1c9a adds r2, r3, #2 8027e32: 6a3b ldr r3, [r7, #32] 8027e34: 4413 add r3, r2 8027e36: 697a ldr r2, [r7, #20] 8027e38: 4413 add r3, r2 8027e3a: 617b str r3, [r7, #20] if (qos > 0) 8027e3c: 68fb ldr r3, [r7, #12] 8027e3e: 2b00 cmp r3, #0 8027e40: dd02 ble.n 8027e48 len += 2; /* packetid */ 8027e42: 697b ldr r3, [r7, #20] 8027e44: 3302 adds r3, #2 8027e46: 617b str r3, [r7, #20] return len; 8027e48: 697b ldr r3, [r7, #20] } 8027e4a: 4618 mov r0, r3 8027e4c: 3718 adds r7, #24 8027e4e: 46bd mov sp, r7 8027e50: bd80 pop {r7, pc} 08027e52 : * @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) { 8027e52: b580 push {r7, lr} 8027e54: b08a sub sp, #40 @ 0x28 8027e56: af02 add r7, sp, #8 8027e58: 60f8 str r0, [r7, #12] 8027e5a: 60b9 str r1, [r7, #8] 8027e5c: 603b str r3, [r7, #0] 8027e5e: 4613 mov r3, r2 8027e60: 71fb strb r3, [r7, #7] unsigned char *ptr = buf; 8027e62: 68fb ldr r3, [r7, #12] 8027e64: 617b str r3, [r7, #20] MQTTHeader header = {0}; 8027e66: 2300 movs r3, #0 8027e68: 613b str r3, [r7, #16] int rem_len = 0; 8027e6a: 2300 movs r3, #0 8027e6c: 61bb str r3, [r7, #24] int rc = 0; 8027e6e: 2300 movs r3, #0 8027e70: 61fb str r3, [r7, #28] FUNC_ENTRY; if (MQTTPacket_len(rem_len = MQTTSerialize_publishLength(qos, topicName, payloadlen)) > buflen) 8027e72: 6c3b ldr r3, [r7, #64] @ 0x40 8027e74: 9300 str r3, [sp, #0] 8027e76: f107 0330 add.w r3, r7, #48 @ 0x30 8027e7a: cb0e ldmia r3, {r1, r2, r3} 8027e7c: 6838 ldr r0, [r7, #0] 8027e7e: f7ff ffc8 bl 8027e12 8027e82: 61b8 str r0, [r7, #24] 8027e84: 69b8 ldr r0, [r7, #24] 8027e86: f7ff fe29 bl 8027adc 8027e8a: 4602 mov r2, r0 8027e8c: 68bb ldr r3, [r7, #8] 8027e8e: 4293 cmp r3, r2 8027e90: da03 bge.n 8027e9a { rc = MQTTPACKET_BUFFER_TOO_SHORT; 8027e92: f06f 0301 mvn.w r3, #1 8027e96: 61fb str r3, [r7, #28] goto exit; 8027e98: e04c b.n 8027f34 } header.bits.type = PUBLISH; 8027e9a: 7c3b ldrb r3, [r7, #16] 8027e9c: 2203 movs r2, #3 8027e9e: f362 1307 bfi r3, r2, #4, #4 8027ea2: 743b strb r3, [r7, #16] header.bits.dup = dup; 8027ea4: 79fb ldrb r3, [r7, #7] 8027ea6: f003 0301 and.w r3, r3, #1 8027eaa: b2da uxtb r2, r3 8027eac: 7c3b ldrb r3, [r7, #16] 8027eae: f362 03c3 bfi r3, r2, #3, #1 8027eb2: 743b strb r3, [r7, #16] header.bits.qos = qos; 8027eb4: 683b ldr r3, [r7, #0] 8027eb6: f003 0303 and.w r3, r3, #3 8027eba: b2da uxtb r2, r3 8027ebc: 7c3b ldrb r3, [r7, #16] 8027ebe: f362 0342 bfi r3, r2, #1, #2 8027ec2: 743b strb r3, [r7, #16] header.bits.retain = retained; 8027ec4: f897 3028 ldrb.w r3, [r7, #40] @ 0x28 8027ec8: f003 0301 and.w r3, r3, #1 8027ecc: b2da uxtb r2, r3 8027ece: 7c3b ldrb r3, [r7, #16] 8027ed0: f362 0300 bfi r3, r2, #0, #1 8027ed4: 743b strb r3, [r7, #16] writeChar(&ptr, header.byte); /* write header */ 8027ed6: 7c3a ldrb r2, [r7, #16] 8027ed8: f107 0314 add.w r3, r7, #20 8027edc: 4611 mov r1, r2 8027ede: 4618 mov r0, r3 8027ee0: f7ff fe8b bl 8027bfa ptr += MQTTPacket_encode(ptr, rem_len); /* write remaining length */; 8027ee4: 697b ldr r3, [r7, #20] 8027ee6: 69b9 ldr r1, [r7, #24] 8027ee8: 4618 mov r0, r3 8027eea: f7ff fd8c bl 8027a06 8027eee: 4602 mov r2, r0 8027ef0: 697b ldr r3, [r7, #20] 8027ef2: 4413 add r3, r2 8027ef4: 617b str r3, [r7, #20] writeMQTTString(&ptr, topicName); 8027ef6: f107 0014 add.w r0, r7, #20 8027efa: f107 0330 add.w r3, r7, #48 @ 0x30 8027efe: cb0e ldmia r3, {r1, r2, r3} 8027f00: f7ff fed8 bl 8027cb4 if (qos > 0) 8027f04: 683b ldr r3, [r7, #0] 8027f06: 2b00 cmp r3, #0 8027f08: dd06 ble.n 8027f18 writeInt(&ptr, packetid); 8027f0a: 8dba ldrh r2, [r7, #44] @ 0x2c 8027f0c: f107 0314 add.w r3, r7, #20 8027f10: 4611 mov r1, r2 8027f12: 4618 mov r0, r3 8027f14: f7ff fe86 bl 8027c24 memcpy(ptr, payload, payloadlen); 8027f18: 697b ldr r3, [r7, #20] 8027f1a: 6c3a ldr r2, [r7, #64] @ 0x40 8027f1c: 6bf9 ldr r1, [r7, #60] @ 0x3c 8027f1e: 4618 mov r0, r3 8027f20: f001 ffdd bl 8029ede ptr += payloadlen; 8027f24: 697a ldr r2, [r7, #20] 8027f26: 6c3b ldr r3, [r7, #64] @ 0x40 8027f28: 4413 add r3, r2 8027f2a: 617b str r3, [r7, #20] rc = ptr - buf; 8027f2c: 697a ldr r2, [r7, #20] 8027f2e: 68fb ldr r3, [r7, #12] 8027f30: 1ad3 subs r3, r2, r3 8027f32: 61fb str r3, [r7, #28] exit: FUNC_EXIT_RC(rc); return rc; 8027f34: 69fb ldr r3, [r7, #28] } 8027f36: 4618 mov r0, r3 8027f38: 3720 adds r7, #32 8027f3a: 46bd mov sp, r7 8027f3c: bd80 pop {r7, pc} 08027f3e : * @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) { 8027f3e: b580 push {r7, lr} 8027f40: b088 sub sp, #32 8027f42: af00 add r7, sp, #0 8027f44: 60f8 str r0, [r7, #12] 8027f46: 60b9 str r1, [r7, #8] 8027f48: 4611 mov r1, r2 8027f4a: 461a mov r2, r3 8027f4c: 460b mov r3, r1 8027f4e: 71fb strb r3, [r7, #7] 8027f50: 4613 mov r3, r2 8027f52: 71bb strb r3, [r7, #6] MQTTHeader header = {0}; 8027f54: 2300 movs r3, #0 8027f56: 61bb str r3, [r7, #24] int rc = 0; 8027f58: 2300 movs r3, #0 8027f5a: 61fb str r3, [r7, #28] unsigned char *ptr = buf; 8027f5c: 68fb ldr r3, [r7, #12] 8027f5e: 617b str r3, [r7, #20] FUNC_ENTRY; if (buflen < 4) 8027f60: 68bb ldr r3, [r7, #8] 8027f62: 2b03 cmp r3, #3 8027f64: dc03 bgt.n 8027f6e { rc = MQTTPACKET_BUFFER_TOO_SHORT; 8027f66: f06f 0301 mvn.w r3, #1 8027f6a: 61fb str r3, [r7, #28] goto exit; 8027f6c: e037 b.n 8027fde } header.bits.type = packettype; 8027f6e: 79fb ldrb r3, [r7, #7] 8027f70: f003 030f and.w r3, r3, #15 8027f74: b2da uxtb r2, r3 8027f76: 7e3b ldrb r3, [r7, #24] 8027f78: f362 1307 bfi r3, r2, #4, #4 8027f7c: 763b strb r3, [r7, #24] header.bits.dup = dup; 8027f7e: 79bb ldrb r3, [r7, #6] 8027f80: f003 0301 and.w r3, r3, #1 8027f84: b2da uxtb r2, r3 8027f86: 7e3b ldrb r3, [r7, #24] 8027f88: f362 03c3 bfi r3, r2, #3, #1 8027f8c: 763b strb r3, [r7, #24] header.bits.qos = (packettype == PUBREL) ? 1 : 0; 8027f8e: 79fb ldrb r3, [r7, #7] 8027f90: 2b06 cmp r3, #6 8027f92: bf0c ite eq 8027f94: 2301 moveq r3, #1 8027f96: 2300 movne r3, #0 8027f98: b2db uxtb r3, r3 8027f9a: f003 0303 and.w r3, r3, #3 8027f9e: b2da uxtb r2, r3 8027fa0: 7e3b ldrb r3, [r7, #24] 8027fa2: f362 0342 bfi r3, r2, #1, #2 8027fa6: 763b strb r3, [r7, #24] writeChar(&ptr, header.byte); /* write header */ 8027fa8: 7e3a ldrb r2, [r7, #24] 8027faa: f107 0314 add.w r3, r7, #20 8027fae: 4611 mov r1, r2 8027fb0: 4618 mov r0, r3 8027fb2: f7ff fe22 bl 8027bfa ptr += MQTTPacket_encode(ptr, 2); /* write remaining length */ 8027fb6: 697b ldr r3, [r7, #20] 8027fb8: 2102 movs r1, #2 8027fba: 4618 mov r0, r3 8027fbc: f7ff fd23 bl 8027a06 8027fc0: 4602 mov r2, r0 8027fc2: 697b ldr r3, [r7, #20] 8027fc4: 4413 add r3, r2 8027fc6: 617b str r3, [r7, #20] writeInt(&ptr, packetid); 8027fc8: 8d3a ldrh r2, [r7, #40] @ 0x28 8027fca: f107 0314 add.w r3, r7, #20 8027fce: 4611 mov r1, r2 8027fd0: 4618 mov r0, r3 8027fd2: f7ff fe27 bl 8027c24 rc = ptr - buf; 8027fd6: 697a ldr r2, [r7, #20] 8027fd8: 68fb ldr r3, [r7, #12] 8027fda: 1ad3 subs r3, r2, r3 8027fdc: 61fb str r3, [r7, #28] exit: FUNC_EXIT_RC(rc); return rc; 8027fde: 69fb ldr r3, [r7, #28] } 8027fe0: 4618 mov r0, r3 8027fe2: 3720 adds r7, #32 8027fe4: 46bd mov sp, r7 8027fe6: bd80 pop {r7, pc} 08027fe8 : * @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[]) { 8027fe8: b580 push {r7, lr} 8027fea: b084 sub sp, #16 8027fec: af00 add r7, sp, #0 8027fee: 6078 str r0, [r7, #4] 8027ff0: 6039 str r1, [r7, #0] int i; int len = 2; /* packetid */ 8027ff2: 2302 movs r3, #2 8027ff4: 60bb str r3, [r7, #8] for (i = 0; i < count; ++i) 8027ff6: 2300 movs r3, #0 8027ff8: 60fb str r3, [r7, #12] 8027ffa: e013 b.n 8028024 len += 2 + MQTTstrlen(topicFilters[i]) + 1; /* length + topic + req_qos */ 8027ffc: 68fa ldr r2, [r7, #12] 8027ffe: 4613 mov r3, r2 8028000: 005b lsls r3, r3, #1 8028002: 4413 add r3, r2 8028004: 009b lsls r3, r3, #2 8028006: 461a mov r2, r3 8028008: 683b ldr r3, [r7, #0] 802800a: 4413 add r3, r2 802800c: e893 0007 ldmia.w r3, {r0, r1, r2} 8028010: f7ff feaf bl 8027d72 8028014: 4603 mov r3, r0 8028016: 3303 adds r3, #3 8028018: 68ba ldr r2, [r7, #8] 802801a: 4413 add r3, r2 802801c: 60bb str r3, [r7, #8] for (i = 0; i < count; ++i) 802801e: 68fb ldr r3, [r7, #12] 8028020: 3301 adds r3, #1 8028022: 60fb str r3, [r7, #12] 8028024: 68fa ldr r2, [r7, #12] 8028026: 687b ldr r3, [r7, #4] 8028028: 429a cmp r2, r3 802802a: dbe7 blt.n 8027ffc return len; 802802c: 68bb ldr r3, [r7, #8] } 802802e: 4618 mov r0, r3 8028030: 3710 adds r7, #16 8028032: 46bd mov sp, r7 8028034: bd80 pop {r7, pc} 08028036 : * @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[]) { 8028036: b580 push {r7, lr} 8028038: b08a sub sp, #40 @ 0x28 802803a: af00 add r7, sp, #0 802803c: 60f8 str r0, [r7, #12] 802803e: 60b9 str r1, [r7, #8] 8028040: 4611 mov r1, r2 8028042: 461a mov r2, r3 8028044: 460b mov r3, r1 8028046: 71fb strb r3, [r7, #7] 8028048: 4613 mov r3, r2 802804a: 80bb strh r3, [r7, #4] unsigned char *ptr = buf; 802804c: 68fb ldr r3, [r7, #12] 802804e: 61bb str r3, [r7, #24] MQTTHeader header = {0}; 8028050: 2300 movs r3, #0 8028052: 617b str r3, [r7, #20] int rem_len = 0; 8028054: 2300 movs r3, #0 8028056: 61fb str r3, [r7, #28] int rc = 0; 8028058: 2300 movs r3, #0 802805a: 627b str r3, [r7, #36] @ 0x24 int i = 0; 802805c: 2300 movs r3, #0 802805e: 623b str r3, [r7, #32] FUNC_ENTRY; if (MQTTPacket_len(rem_len = MQTTSerialize_subscribeLength(count, topicFilters)) > buflen) 8028060: 6b79 ldr r1, [r7, #52] @ 0x34 8028062: 6b38 ldr r0, [r7, #48] @ 0x30 8028064: f7ff ffc0 bl 8027fe8 8028068: 61f8 str r0, [r7, #28] 802806a: 69f8 ldr r0, [r7, #28] 802806c: f7ff fd36 bl 8027adc 8028070: 4602 mov r2, r0 8028072: 68bb ldr r3, [r7, #8] 8028074: 4293 cmp r3, r2 8028076: da03 bge.n 8028080 { rc = MQTTPACKET_BUFFER_TOO_SHORT; 8028078: f06f 0301 mvn.w r3, #1 802807c: 627b str r3, [r7, #36] @ 0x24 goto exit; 802807e: e051 b.n 8028124 } header.byte = 0; 8028080: 2300 movs r3, #0 8028082: 753b strb r3, [r7, #20] header.bits.type = SUBSCRIBE; 8028084: 7d3b ldrb r3, [r7, #20] 8028086: 2208 movs r2, #8 8028088: f362 1307 bfi r3, r2, #4, #4 802808c: 753b strb r3, [r7, #20] header.bits.dup = dup; 802808e: 79fb ldrb r3, [r7, #7] 8028090: f003 0301 and.w r3, r3, #1 8028094: b2da uxtb r2, r3 8028096: 7d3b ldrb r3, [r7, #20] 8028098: f362 03c3 bfi r3, r2, #3, #1 802809c: 753b strb r3, [r7, #20] header.bits.qos = 1; 802809e: 7d3b ldrb r3, [r7, #20] 80280a0: 2201 movs r2, #1 80280a2: f362 0342 bfi r3, r2, #1, #2 80280a6: 753b strb r3, [r7, #20] writeChar(&ptr, header.byte); /* write header */ 80280a8: 7d3a ldrb r2, [r7, #20] 80280aa: f107 0318 add.w r3, r7, #24 80280ae: 4611 mov r1, r2 80280b0: 4618 mov r0, r3 80280b2: f7ff fda2 bl 8027bfa ptr += MQTTPacket_encode(ptr, rem_len); /* write remaining length */; 80280b6: 69bb ldr r3, [r7, #24] 80280b8: 69f9 ldr r1, [r7, #28] 80280ba: 4618 mov r0, r3 80280bc: f7ff fca3 bl 8027a06 80280c0: 4602 mov r2, r0 80280c2: 69bb ldr r3, [r7, #24] 80280c4: 4413 add r3, r2 80280c6: 61bb str r3, [r7, #24] writeInt(&ptr, packetid); 80280c8: 88ba ldrh r2, [r7, #4] 80280ca: f107 0318 add.w r3, r7, #24 80280ce: 4611 mov r1, r2 80280d0: 4618 mov r0, r3 80280d2: f7ff fda7 bl 8027c24 for (i = 0; i < count; ++i) 80280d6: 2300 movs r3, #0 80280d8: 623b str r3, [r7, #32] 80280da: e01b b.n 8028114 { writeMQTTString(&ptr, topicFilters[i]); 80280dc: 6a3a ldr r2, [r7, #32] 80280de: 4613 mov r3, r2 80280e0: 005b lsls r3, r3, #1 80280e2: 4413 add r3, r2 80280e4: 009b lsls r3, r3, #2 80280e6: 461a mov r2, r3 80280e8: 6b7b ldr r3, [r7, #52] @ 0x34 80280ea: 4413 add r3, r2 80280ec: f107 0018 add.w r0, r7, #24 80280f0: cb0e ldmia r3, {r1, r2, r3} 80280f2: f7ff fddf bl 8027cb4 writeChar(&ptr, requestedQoSs[i]); 80280f6: 6a3b ldr r3, [r7, #32] 80280f8: 009b lsls r3, r3, #2 80280fa: 6bba ldr r2, [r7, #56] @ 0x38 80280fc: 4413 add r3, r2 80280fe: 681b ldr r3, [r3, #0] 8028100: b2da uxtb r2, r3 8028102: f107 0318 add.w r3, r7, #24 8028106: 4611 mov r1, r2 8028108: 4618 mov r0, r3 802810a: f7ff fd76 bl 8027bfa for (i = 0; i < count; ++i) 802810e: 6a3b ldr r3, [r7, #32] 8028110: 3301 adds r3, #1 8028112: 623b str r3, [r7, #32] 8028114: 6a3a ldr r2, [r7, #32] 8028116: 6b3b ldr r3, [r7, #48] @ 0x30 8028118: 429a cmp r2, r3 802811a: dbdf blt.n 80280dc } rc = ptr - buf; 802811c: 69ba ldr r2, [r7, #24] 802811e: 68fb ldr r3, [r7, #12] 8028120: 1ad3 subs r3, r2, r3 8028122: 627b str r3, [r7, #36] @ 0x24 exit: FUNC_EXIT_RC(rc); return rc; 8028124: 6a7b ldr r3, [r7, #36] @ 0x24 } 8028126: 4618 mov r0, r3 8028128: 3728 adds r7, #40 @ 0x28 802812a: 46bd mov sp, r7 802812c: bd80 pop {r7, pc} 0802812e : * @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) { 802812e: b580 push {r7, lr} 8028130: b08a sub sp, #40 @ 0x28 8028132: af00 add r7, sp, #0 8028134: 60f8 str r0, [r7, #12] 8028136: 60b9 str r1, [r7, #8] 8028138: 607a str r2, [r7, #4] 802813a: 603b str r3, [r7, #0] MQTTHeader header = {0}; 802813c: 2300 movs r3, #0 802813e: 61fb str r3, [r7, #28] unsigned char* curdata = buf; 8028140: 6b3b ldr r3, [r7, #48] @ 0x30 8028142: 61bb str r3, [r7, #24] unsigned char* enddata = NULL; 8028144: 2300 movs r3, #0 8028146: 623b str r3, [r7, #32] int rc = 0; 8028148: 2300 movs r3, #0 802814a: 627b str r3, [r7, #36] @ 0x24 int mylen; FUNC_ENTRY; header.byte = readChar(&curdata); 802814c: f107 0318 add.w r3, r7, #24 8028150: 4618 mov r0, r3 8028152: f7ff fd3e bl 8027bd2 8028156: 4603 mov r3, r0 8028158: 773b strb r3, [r7, #28] if (header.bits.type != SUBACK) 802815a: 7f3b ldrb r3, [r7, #28] 802815c: f023 030f bic.w r3, r3, #15 8028160: b2db uxtb r3, r3 8028162: 2b90 cmp r3, #144 @ 0x90 8028164: d142 bne.n 80281ec goto exit; curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 8028166: 69bb ldr r3, [r7, #24] 8028168: f107 0214 add.w r2, r7, #20 802816c: 4611 mov r1, r2 802816e: 4618 mov r0, r3 8028170: f7ff fcfe bl 8027b70 8028174: 6278 str r0, [r7, #36] @ 0x24 8028176: 6a7a ldr r2, [r7, #36] @ 0x24 8028178: 69bb ldr r3, [r7, #24] 802817a: 4413 add r3, r2 802817c: 61bb str r3, [r7, #24] enddata = curdata + mylen; 802817e: 69bb ldr r3, [r7, #24] 8028180: 697a ldr r2, [r7, #20] 8028182: 4413 add r3, r2 8028184: 623b str r3, [r7, #32] if (enddata - curdata < 2) 8028186: 69bb ldr r3, [r7, #24] 8028188: 6a3a ldr r2, [r7, #32] 802818a: 1ad3 subs r3, r2, r3 802818c: 2b01 cmp r3, #1 802818e: dd2f ble.n 80281f0 goto exit; *packetid = readInt(&curdata); 8028190: f107 0318 add.w r3, r7, #24 8028194: 4618 mov r0, r3 8028196: f7ff fd01 bl 8027b9c 802819a: 4603 mov r3, r0 802819c: b29a uxth r2, r3 802819e: 68fb ldr r3, [r7, #12] 80281a0: 801a strh r2, [r3, #0] *count = 0; 80281a2: 687b ldr r3, [r7, #4] 80281a4: 2200 movs r2, #0 80281a6: 601a str r2, [r3, #0] while (curdata < enddata) 80281a8: e019 b.n 80281de { if (*count > maxcount) 80281aa: 687b ldr r3, [r7, #4] 80281ac: 681b ldr r3, [r3, #0] 80281ae: 68ba ldr r2, [r7, #8] 80281b0: 429a cmp r2, r3 80281b2: da03 bge.n 80281bc { rc = -1; 80281b4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80281b8: 627b str r3, [r7, #36] @ 0x24 goto exit; 80281ba: e01a b.n 80281f2 } grantedQoSs[(*count)++] = readChar(&curdata); 80281bc: f107 0318 add.w r3, r7, #24 80281c0: 4618 mov r0, r3 80281c2: f7ff fd06 bl 8027bd2 80281c6: 4603 mov r3, r0 80281c8: 4618 mov r0, r3 80281ca: 687b ldr r3, [r7, #4] 80281cc: 681b ldr r3, [r3, #0] 80281ce: 1c59 adds r1, r3, #1 80281d0: 687a ldr r2, [r7, #4] 80281d2: 6011 str r1, [r2, #0] 80281d4: 009b lsls r3, r3, #2 80281d6: 683a ldr r2, [r7, #0] 80281d8: 4413 add r3, r2 80281da: 4602 mov r2, r0 80281dc: 601a str r2, [r3, #0] while (curdata < enddata) 80281de: 69bb ldr r3, [r7, #24] 80281e0: 6a3a ldr r2, [r7, #32] 80281e2: 429a cmp r2, r3 80281e4: d8e1 bhi.n 80281aa } rc = 1; 80281e6: 2301 movs r3, #1 80281e8: 627b str r3, [r7, #36] @ 0x24 80281ea: e002 b.n 80281f2 goto exit; 80281ec: bf00 nop 80281ee: e000 b.n 80281f2 goto exit; 80281f0: bf00 nop exit: FUNC_EXIT_RC(rc); return rc; 80281f2: 6a7b ldr r3, [r7, #36] @ 0x24 } 80281f4: 4618 mov r0, r3 80281f6: 3728 adds r7, #40 @ 0x28 80281f8: 46bd mov sp, r7 80281fa: bd80 pop {r7, pc} 080281fc : 80281fc: 4b02 ldr r3, [pc, #8] @ (8028208 ) 80281fe: 4601 mov r1, r0 8028200: 6818 ldr r0, [r3, #0] 8028202: f000 b82d b.w 8028260 <_malloc_r> 8028206: bf00 nop 8028208: 240001d4 .word 0x240001d4 0802820c : 802820c: 4b02 ldr r3, [pc, #8] @ (8028218 ) 802820e: 4601 mov r1, r0 8028210: 6818 ldr r0, [r3, #0] 8028212: f002 bc7b b.w 802ab0c <_free_r> 8028216: bf00 nop 8028218: 240001d4 .word 0x240001d4 0802821c : 802821c: b570 push {r4, r5, r6, lr} 802821e: 4e0f ldr r6, [pc, #60] @ (802825c ) 8028220: 460c mov r4, r1 8028222: 6831 ldr r1, [r6, #0] 8028224: 4605 mov r5, r0 8028226: b911 cbnz r1, 802822e 8028228: f001 fe0a bl 8029e40 <_sbrk_r> 802822c: 6030 str r0, [r6, #0] 802822e: 4621 mov r1, r4 8028230: 4628 mov r0, r5 8028232: f001 fe05 bl 8029e40 <_sbrk_r> 8028236: 1c43 adds r3, r0, #1 8028238: d103 bne.n 8028242 802823a: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 802823e: 4620 mov r0, r4 8028240: bd70 pop {r4, r5, r6, pc} 8028242: 1cc4 adds r4, r0, #3 8028244: f024 0403 bic.w r4, r4, #3 8028248: 42a0 cmp r0, r4 802824a: d0f8 beq.n 802823e 802824c: 1a21 subs r1, r4, r0 802824e: 4628 mov r0, r5 8028250: f001 fdf6 bl 8029e40 <_sbrk_r> 8028254: 3001 adds r0, #1 8028256: d1f2 bne.n 802823e 8028258: e7ef b.n 802823a 802825a: bf00 nop 802825c: 2402b03c .word 0x2402b03c 08028260 <_malloc_r>: 8028260: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8028264: 1ccd adds r5, r1, #3 8028266: f025 0503 bic.w r5, r5, #3 802826a: 3508 adds r5, #8 802826c: 2d0c cmp r5, #12 802826e: bf38 it cc 8028270: 250c movcc r5, #12 8028272: 2d00 cmp r5, #0 8028274: 4606 mov r6, r0 8028276: db01 blt.n 802827c <_malloc_r+0x1c> 8028278: 42a9 cmp r1, r5 802827a: d904 bls.n 8028286 <_malloc_r+0x26> 802827c: 230c movs r3, #12 802827e: 6033 str r3, [r6, #0] 8028280: 2000 movs r0, #0 8028282: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8028286: f8df 80d4 ldr.w r8, [pc, #212] @ 802835c <_malloc_r+0xfc> 802828a: f000 f869 bl 8028360 <__malloc_lock> 802828e: f8d8 3000 ldr.w r3, [r8] 8028292: 461c mov r4, r3 8028294: bb44 cbnz r4, 80282e8 <_malloc_r+0x88> 8028296: 4629 mov r1, r5 8028298: 4630 mov r0, r6 802829a: f7ff ffbf bl 802821c 802829e: 1c43 adds r3, r0, #1 80282a0: 4604 mov r4, r0 80282a2: d158 bne.n 8028356 <_malloc_r+0xf6> 80282a4: f8d8 4000 ldr.w r4, [r8] 80282a8: 4627 mov r7, r4 80282aa: 2f00 cmp r7, #0 80282ac: d143 bne.n 8028336 <_malloc_r+0xd6> 80282ae: 2c00 cmp r4, #0 80282b0: d04b beq.n 802834a <_malloc_r+0xea> 80282b2: 6823 ldr r3, [r4, #0] 80282b4: 4639 mov r1, r7 80282b6: 4630 mov r0, r6 80282b8: eb04 0903 add.w r9, r4, r3 80282bc: f001 fdc0 bl 8029e40 <_sbrk_r> 80282c0: 4581 cmp r9, r0 80282c2: d142 bne.n 802834a <_malloc_r+0xea> 80282c4: 6821 ldr r1, [r4, #0] 80282c6: 1a6d subs r5, r5, r1 80282c8: 4629 mov r1, r5 80282ca: 4630 mov r0, r6 80282cc: f7ff ffa6 bl 802821c 80282d0: 3001 adds r0, #1 80282d2: d03a beq.n 802834a <_malloc_r+0xea> 80282d4: 6823 ldr r3, [r4, #0] 80282d6: 442b add r3, r5 80282d8: 6023 str r3, [r4, #0] 80282da: f8d8 3000 ldr.w r3, [r8] 80282de: 685a ldr r2, [r3, #4] 80282e0: bb62 cbnz r2, 802833c <_malloc_r+0xdc> 80282e2: f8c8 7000 str.w r7, [r8] 80282e6: e00f b.n 8028308 <_malloc_r+0xa8> 80282e8: 6822 ldr r2, [r4, #0] 80282ea: 1b52 subs r2, r2, r5 80282ec: d420 bmi.n 8028330 <_malloc_r+0xd0> 80282ee: 2a0b cmp r2, #11 80282f0: d917 bls.n 8028322 <_malloc_r+0xc2> 80282f2: 1961 adds r1, r4, r5 80282f4: 42a3 cmp r3, r4 80282f6: 6025 str r5, [r4, #0] 80282f8: bf18 it ne 80282fa: 6059 strne r1, [r3, #4] 80282fc: 6863 ldr r3, [r4, #4] 80282fe: bf08 it eq 8028300: f8c8 1000 streq.w r1, [r8] 8028304: 5162 str r2, [r4, r5] 8028306: 604b str r3, [r1, #4] 8028308: 4630 mov r0, r6 802830a: f000 f82f bl 802836c <__malloc_unlock> 802830e: f104 000b add.w r0, r4, #11 8028312: 1d23 adds r3, r4, #4 8028314: f020 0007 bic.w r0, r0, #7 8028318: 1ac2 subs r2, r0, r3 802831a: bf1c itt ne 802831c: 1a1b subne r3, r3, r0 802831e: 50a3 strne r3, [r4, r2] 8028320: e7af b.n 8028282 <_malloc_r+0x22> 8028322: 6862 ldr r2, [r4, #4] 8028324: 42a3 cmp r3, r4 8028326: bf0c ite eq 8028328: f8c8 2000 streq.w r2, [r8] 802832c: 605a strne r2, [r3, #4] 802832e: e7eb b.n 8028308 <_malloc_r+0xa8> 8028330: 4623 mov r3, r4 8028332: 6864 ldr r4, [r4, #4] 8028334: e7ae b.n 8028294 <_malloc_r+0x34> 8028336: 463c mov r4, r7 8028338: 687f ldr r7, [r7, #4] 802833a: e7b6 b.n 80282aa <_malloc_r+0x4a> 802833c: 461a mov r2, r3 802833e: 685b ldr r3, [r3, #4] 8028340: 42a3 cmp r3, r4 8028342: d1fb bne.n 802833c <_malloc_r+0xdc> 8028344: 2300 movs r3, #0 8028346: 6053 str r3, [r2, #4] 8028348: e7de b.n 8028308 <_malloc_r+0xa8> 802834a: 230c movs r3, #12 802834c: 6033 str r3, [r6, #0] 802834e: 4630 mov r0, r6 8028350: f000 f80c bl 802836c <__malloc_unlock> 8028354: e794 b.n 8028280 <_malloc_r+0x20> 8028356: 6005 str r5, [r0, #0] 8028358: e7d6 b.n 8028308 <_malloc_r+0xa8> 802835a: bf00 nop 802835c: 2402b040 .word 0x2402b040 08028360 <__malloc_lock>: 8028360: 4801 ldr r0, [pc, #4] @ (8028368 <__malloc_lock+0x8>) 8028362: f001 bdba b.w 8029eda <__retarget_lock_acquire_recursive> 8028366: bf00 nop 8028368: 2402b184 .word 0x2402b184 0802836c <__malloc_unlock>: 802836c: 4801 ldr r0, [pc, #4] @ (8028374 <__malloc_unlock+0x8>) 802836e: f001 bdb5 b.w 8029edc <__retarget_lock_release_recursive> 8028372: bf00 nop 8028374: 2402b184 .word 0x2402b184 08028378 : 8028378: 4b16 ldr r3, [pc, #88] @ (80283d4 ) 802837a: b510 push {r4, lr} 802837c: 681c ldr r4, [r3, #0] 802837e: 6b23 ldr r3, [r4, #48] @ 0x30 8028380: b9b3 cbnz r3, 80283b0 8028382: 2018 movs r0, #24 8028384: f7ff ff3a bl 80281fc 8028388: 4602 mov r2, r0 802838a: 6320 str r0, [r4, #48] @ 0x30 802838c: b920 cbnz r0, 8028398 802838e: 4b12 ldr r3, [pc, #72] @ (80283d8 ) 8028390: 4812 ldr r0, [pc, #72] @ (80283dc ) 8028392: 2152 movs r1, #82 @ 0x52 8028394: f001 fdbc bl 8029f10 <__assert_func> 8028398: 4911 ldr r1, [pc, #68] @ (80283e0 ) 802839a: 4b12 ldr r3, [pc, #72] @ (80283e4 ) 802839c: e9c0 1300 strd r1, r3, [r0] 80283a0: 4b11 ldr r3, [pc, #68] @ (80283e8 ) 80283a2: 6083 str r3, [r0, #8] 80283a4: 230b movs r3, #11 80283a6: 8183 strh r3, [r0, #12] 80283a8: 2100 movs r1, #0 80283aa: 2001 movs r0, #1 80283ac: e9c2 0104 strd r0, r1, [r2, #16] 80283b0: 6b21 ldr r1, [r4, #48] @ 0x30 80283b2: 480e ldr r0, [pc, #56] @ (80283ec ) 80283b4: 690b ldr r3, [r1, #16] 80283b6: 694c ldr r4, [r1, #20] 80283b8: 4a0d ldr r2, [pc, #52] @ (80283f0 ) 80283ba: 4358 muls r0, r3 80283bc: fb02 0004 mla r0, r2, r4, r0 80283c0: fba3 3202 umull r3, r2, r3, r2 80283c4: 3301 adds r3, #1 80283c6: eb40 0002 adc.w r0, r0, r2 80283ca: e9c1 3004 strd r3, r0, [r1, #16] 80283ce: f020 4000 bic.w r0, r0, #2147483648 @ 0x80000000 80283d2: bd10 pop {r4, pc} 80283d4: 240001d4 .word 0x240001d4 80283d8: 08030c26 .word 0x08030c26 80283dc: 08030c3d .word 0x08030c3d 80283e0: abcd330e .word 0xabcd330e 80283e4: e66d1234 .word 0xe66d1234 80283e8: 0005deec .word 0x0005deec 80283ec: 5851f42d .word 0x5851f42d 80283f0: 4c957f2d .word 0x4c957f2d 080283f4 : 80283f4: 4b02 ldr r3, [pc, #8] @ (8028400 ) 80283f6: 460a mov r2, r1 80283f8: 4601 mov r1, r0 80283fa: 6818 ldr r0, [r3, #0] 80283fc: f000 b802 b.w 8028404 <_realloc_r> 8028400: 240001d4 .word 0x240001d4 08028404 <_realloc_r>: 8028404: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8028408: 4680 mov r8, r0 802840a: 4615 mov r5, r2 802840c: 460c mov r4, r1 802840e: b921 cbnz r1, 802841a <_realloc_r+0x16> 8028410: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} 8028414: 4611 mov r1, r2 8028416: f7ff bf23 b.w 8028260 <_malloc_r> 802841a: b92a cbnz r2, 8028428 <_realloc_r+0x24> 802841c: f002 fb76 bl 802ab0c <_free_r> 8028420: 2400 movs r4, #0 8028422: 4620 mov r0, r4 8028424: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8028428: f003 fbb5 bl 802bb96 <_malloc_usable_size_r> 802842c: 4285 cmp r5, r0 802842e: 4606 mov r6, r0 8028430: d802 bhi.n 8028438 <_realloc_r+0x34> 8028432: ebb5 0f50 cmp.w r5, r0, lsr #1 8028436: d8f4 bhi.n 8028422 <_realloc_r+0x1e> 8028438: 4629 mov r1, r5 802843a: 4640 mov r0, r8 802843c: f7ff ff10 bl 8028260 <_malloc_r> 8028440: 4607 mov r7, r0 8028442: 2800 cmp r0, #0 8028444: d0ec beq.n 8028420 <_realloc_r+0x1c> 8028446: 42b5 cmp r5, r6 8028448: 462a mov r2, r5 802844a: 4621 mov r1, r4 802844c: bf28 it cs 802844e: 4632 movcs r2, r6 8028450: f001 fd45 bl 8029ede 8028454: 4621 mov r1, r4 8028456: 4640 mov r0, r8 8028458: f002 fb58 bl 802ab0c <_free_r> 802845c: 463c mov r4, r7 802845e: e7e0 b.n 8028422 <_realloc_r+0x1e> 08028460 : 8028460: b570 push {r4, r5, r6, lr} 8028462: 4604 mov r4, r0 8028464: 460d mov r5, r1 8028466: 4616 mov r6, r2 8028468: ec45 4b10 vmov d0, r4, r5 802846c: f003 fa58 bl 802b920 <__ulp> 8028470: b17e cbz r6, 8028492 8028472: f3c5 530a ubfx r3, r5, #20, #11 8028476: f1c3 036b rsb r3, r3, #107 @ 0x6b 802847a: 2b00 cmp r3, #0 802847c: dd09 ble.n 8028492 802847e: 051b lsls r3, r3, #20 8028480: f103 517f add.w r1, r3, #1069547520 @ 0x3fc00000 8028484: 2000 movs r0, #0 8028486: f501 1140 add.w r1, r1, #3145728 @ 0x300000 802848a: ec41 0b17 vmov d7, r0, r1 802848e: ee20 0b07 vmul.f64 d0, d0, d7 8028492: bd70 pop {r4, r5, r6, pc} 8028494: 0000 movs r0, r0 ... 08028498 <_strtod_l>: 8028498: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802849c: ed2d 8b0a vpush {d8-d12} 80284a0: b097 sub sp, #92 @ 0x5c 80284a2: 4688 mov r8, r1 80284a4: 920e str r2, [sp, #56] @ 0x38 80284a6: 2200 movs r2, #0 80284a8: 9212 str r2, [sp, #72] @ 0x48 80284aa: 9005 str r0, [sp, #20] 80284ac: f04f 0a00 mov.w sl, #0 80284b0: f04f 0b00 mov.w fp, #0 80284b4: 460a mov r2, r1 80284b6: 9211 str r2, [sp, #68] @ 0x44 80284b8: 7811 ldrb r1, [r2, #0] 80284ba: 292b cmp r1, #43 @ 0x2b 80284bc: d04c beq.n 8028558 <_strtod_l+0xc0> 80284be: d839 bhi.n 8028534 <_strtod_l+0x9c> 80284c0: 290d cmp r1, #13 80284c2: d833 bhi.n 802852c <_strtod_l+0x94> 80284c4: 2908 cmp r1, #8 80284c6: d833 bhi.n 8028530 <_strtod_l+0x98> 80284c8: 2900 cmp r1, #0 80284ca: d03c beq.n 8028546 <_strtod_l+0xae> 80284cc: 2200 movs r2, #0 80284ce: 9208 str r2, [sp, #32] 80284d0: 9d11 ldr r5, [sp, #68] @ 0x44 80284d2: 782a ldrb r2, [r5, #0] 80284d4: 2a30 cmp r2, #48 @ 0x30 80284d6: f040 80b5 bne.w 8028644 <_strtod_l+0x1ac> 80284da: 786a ldrb r2, [r5, #1] 80284dc: f002 02df and.w r2, r2, #223 @ 0xdf 80284e0: 2a58 cmp r2, #88 @ 0x58 80284e2: d170 bne.n 80285c6 <_strtod_l+0x12e> 80284e4: 9302 str r3, [sp, #8] 80284e6: 9b08 ldr r3, [sp, #32] 80284e8: 9301 str r3, [sp, #4] 80284ea: ab12 add r3, sp, #72 @ 0x48 80284ec: 9300 str r3, [sp, #0] 80284ee: 4a8b ldr r2, [pc, #556] @ (802871c <_strtod_l+0x284>) 80284f0: 9805 ldr r0, [sp, #20] 80284f2: ab13 add r3, sp, #76 @ 0x4c 80284f4: a911 add r1, sp, #68 @ 0x44 80284f6: f002 fbbb bl 802ac70 <__gethex> 80284fa: f010 060f ands.w r6, r0, #15 80284fe: 4604 mov r4, r0 8028500: d005 beq.n 802850e <_strtod_l+0x76> 8028502: 2e06 cmp r6, #6 8028504: d12a bne.n 802855c <_strtod_l+0xc4> 8028506: 3501 adds r5, #1 8028508: 2300 movs r3, #0 802850a: 9511 str r5, [sp, #68] @ 0x44 802850c: 9308 str r3, [sp, #32] 802850e: 9b0e ldr r3, [sp, #56] @ 0x38 8028510: 2b00 cmp r3, #0 8028512: f040 852f bne.w 8028f74 <_strtod_l+0xadc> 8028516: 9b08 ldr r3, [sp, #32] 8028518: ec4b ab10 vmov d0, sl, fp 802851c: b1cb cbz r3, 8028552 <_strtod_l+0xba> 802851e: eeb1 0b40 vneg.f64 d0, d0 8028522: b017 add sp, #92 @ 0x5c 8028524: ecbd 8b0a vpop {d8-d12} 8028528: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802852c: 2920 cmp r1, #32 802852e: d1cd bne.n 80284cc <_strtod_l+0x34> 8028530: 3201 adds r2, #1 8028532: e7c0 b.n 80284b6 <_strtod_l+0x1e> 8028534: 292d cmp r1, #45 @ 0x2d 8028536: d1c9 bne.n 80284cc <_strtod_l+0x34> 8028538: 2101 movs r1, #1 802853a: 9108 str r1, [sp, #32] 802853c: 1c51 adds r1, r2, #1 802853e: 9111 str r1, [sp, #68] @ 0x44 8028540: 7852 ldrb r2, [r2, #1] 8028542: 2a00 cmp r2, #0 8028544: d1c4 bne.n 80284d0 <_strtod_l+0x38> 8028546: 9b0e ldr r3, [sp, #56] @ 0x38 8028548: f8cd 8044 str.w r8, [sp, #68] @ 0x44 802854c: 2b00 cmp r3, #0 802854e: f040 850f bne.w 8028f70 <_strtod_l+0xad8> 8028552: ec4b ab10 vmov d0, sl, fp 8028556: e7e4 b.n 8028522 <_strtod_l+0x8a> 8028558: 2100 movs r1, #0 802855a: e7ee b.n 802853a <_strtod_l+0xa2> 802855c: 9a12 ldr r2, [sp, #72] @ 0x48 802855e: b13a cbz r2, 8028570 <_strtod_l+0xd8> 8028560: 2135 movs r1, #53 @ 0x35 8028562: a814 add r0, sp, #80 @ 0x50 8028564: f003 fad3 bl 802bb0e <__copybits> 8028568: 9912 ldr r1, [sp, #72] @ 0x48 802856a: 9805 ldr r0, [sp, #20] 802856c: f002 fea4 bl 802b2b8 <_Bfree> 8028570: 1e73 subs r3, r6, #1 8028572: 9a13 ldr r2, [sp, #76] @ 0x4c 8028574: 2b04 cmp r3, #4 8028576: d806 bhi.n 8028586 <_strtod_l+0xee> 8028578: e8df f003 tbb [pc, r3] 802857c: 201d0314 .word 0x201d0314 8028580: 14 .byte 0x14 8028581: 00 .byte 0x00 8028582: e9dd ab14 ldrd sl, fp, [sp, #80] @ 0x50 8028586: 05e3 lsls r3, r4, #23 8028588: bf48 it mi 802858a: f04b 4b00 orrmi.w fp, fp, #2147483648 @ 0x80000000 802858e: f02b 4300 bic.w r3, fp, #2147483648 @ 0x80000000 8028592: 0d1b lsrs r3, r3, #20 8028594: 051b lsls r3, r3, #20 8028596: 2b00 cmp r3, #0 8028598: d1b9 bne.n 802850e <_strtod_l+0x76> 802859a: f001 fc73 bl 8029e84 <__errno> 802859e: 2322 movs r3, #34 @ 0x22 80285a0: 6003 str r3, [r0, #0] 80285a2: e7b4 b.n 802850e <_strtod_l+0x76> 80285a4: e9dd a314 ldrd sl, r3, [sp, #80] @ 0x50 80285a8: f202 4233 addw r2, r2, #1075 @ 0x433 80285ac: f423 1380 bic.w r3, r3, #1048576 @ 0x100000 80285b0: ea43 5b02 orr.w fp, r3, r2, lsl #20 80285b4: e7e7 b.n 8028586 <_strtod_l+0xee> 80285b6: f8df b16c ldr.w fp, [pc, #364] @ 8028724 <_strtod_l+0x28c> 80285ba: e7e4 b.n 8028586 <_strtod_l+0xee> 80285bc: f06f 4b00 mvn.w fp, #2147483648 @ 0x80000000 80285c0: f04f 3aff mov.w sl, #4294967295 @ 0xffffffff 80285c4: e7df b.n 8028586 <_strtod_l+0xee> 80285c6: 9b11 ldr r3, [sp, #68] @ 0x44 80285c8: 1c5a adds r2, r3, #1 80285ca: 9211 str r2, [sp, #68] @ 0x44 80285cc: 785b ldrb r3, [r3, #1] 80285ce: 2b30 cmp r3, #48 @ 0x30 80285d0: d0f9 beq.n 80285c6 <_strtod_l+0x12e> 80285d2: 2b00 cmp r3, #0 80285d4: d09b beq.n 802850e <_strtod_l+0x76> 80285d6: 2301 movs r3, #1 80285d8: 2600 movs r6, #0 80285da: 9307 str r3, [sp, #28] 80285dc: 9b11 ldr r3, [sp, #68] @ 0x44 80285de: 930a str r3, [sp, #40] @ 0x28 80285e0: 46b1 mov r9, r6 80285e2: 4635 mov r5, r6 80285e4: 220a movs r2, #10 80285e6: 9811 ldr r0, [sp, #68] @ 0x44 80285e8: 7804 ldrb r4, [r0, #0] 80285ea: f1a4 0330 sub.w r3, r4, #48 @ 0x30 80285ee: b2d9 uxtb r1, r3 80285f0: 2909 cmp r1, #9 80285f2: d929 bls.n 8028648 <_strtod_l+0x1b0> 80285f4: 494a ldr r1, [pc, #296] @ (8028720 <_strtod_l+0x288>) 80285f6: 2201 movs r2, #1 80285f8: f001 fb82 bl 8029d00 80285fc: b378 cbz r0, 802865e <_strtod_l+0x1c6> 80285fe: 2000 movs r0, #0 8028600: 4622 mov r2, r4 8028602: 462b mov r3, r5 8028604: 4607 mov r7, r0 8028606: 9006 str r0, [sp, #24] 8028608: 2a65 cmp r2, #101 @ 0x65 802860a: d001 beq.n 8028610 <_strtod_l+0x178> 802860c: 2a45 cmp r2, #69 @ 0x45 802860e: d117 bne.n 8028640 <_strtod_l+0x1a8> 8028610: b91b cbnz r3, 802861a <_strtod_l+0x182> 8028612: 9b07 ldr r3, [sp, #28] 8028614: 4303 orrs r3, r0 8028616: d096 beq.n 8028546 <_strtod_l+0xae> 8028618: 2300 movs r3, #0 802861a: f8dd 8044 ldr.w r8, [sp, #68] @ 0x44 802861e: f108 0201 add.w r2, r8, #1 8028622: 9211 str r2, [sp, #68] @ 0x44 8028624: f898 2001 ldrb.w r2, [r8, #1] 8028628: 2a2b cmp r2, #43 @ 0x2b 802862a: d06b beq.n 8028704 <_strtod_l+0x26c> 802862c: 2a2d cmp r2, #45 @ 0x2d 802862e: d071 beq.n 8028714 <_strtod_l+0x27c> 8028630: f04f 0e00 mov.w lr, #0 8028634: f1a2 0430 sub.w r4, r2, #48 @ 0x30 8028638: 2c09 cmp r4, #9 802863a: d979 bls.n 8028730 <_strtod_l+0x298> 802863c: f8cd 8044 str.w r8, [sp, #68] @ 0x44 8028640: 2400 movs r4, #0 8028642: e094 b.n 802876e <_strtod_l+0x2d6> 8028644: 2300 movs r3, #0 8028646: e7c7 b.n 80285d8 <_strtod_l+0x140> 8028648: 2d08 cmp r5, #8 802864a: f100 0001 add.w r0, r0, #1 802864e: bfd4 ite le 8028650: fb02 3909 mlale r9, r2, r9, r3 8028654: fb02 3606 mlagt r6, r2, r6, r3 8028658: 3501 adds r5, #1 802865a: 9011 str r0, [sp, #68] @ 0x44 802865c: e7c3 b.n 80285e6 <_strtod_l+0x14e> 802865e: 9b11 ldr r3, [sp, #68] @ 0x44 8028660: 1c5a adds r2, r3, #1 8028662: 9211 str r2, [sp, #68] @ 0x44 8028664: 785a ldrb r2, [r3, #1] 8028666: b375 cbz r5, 80286c6 <_strtod_l+0x22e> 8028668: 4607 mov r7, r0 802866a: 462b mov r3, r5 802866c: f1a2 0130 sub.w r1, r2, #48 @ 0x30 8028670: 2909 cmp r1, #9 8028672: d913 bls.n 802869c <_strtod_l+0x204> 8028674: 2101 movs r1, #1 8028676: 9106 str r1, [sp, #24] 8028678: e7c6 b.n 8028608 <_strtod_l+0x170> 802867a: 9b11 ldr r3, [sp, #68] @ 0x44 802867c: 1c5a adds r2, r3, #1 802867e: 9211 str r2, [sp, #68] @ 0x44 8028680: 785a ldrb r2, [r3, #1] 8028682: 3001 adds r0, #1 8028684: 2a30 cmp r2, #48 @ 0x30 8028686: d0f8 beq.n 802867a <_strtod_l+0x1e2> 8028688: f1a2 0331 sub.w r3, r2, #49 @ 0x31 802868c: 2b08 cmp r3, #8 802868e: f200 8476 bhi.w 8028f7e <_strtod_l+0xae6> 8028692: 9b11 ldr r3, [sp, #68] @ 0x44 8028694: 930a str r3, [sp, #40] @ 0x28 8028696: 4607 mov r7, r0 8028698: 2000 movs r0, #0 802869a: 4603 mov r3, r0 802869c: 3a30 subs r2, #48 @ 0x30 802869e: f100 0101 add.w r1, r0, #1 80286a2: d023 beq.n 80286ec <_strtod_l+0x254> 80286a4: 440f add r7, r1 80286a6: eb00 0c03 add.w ip, r0, r3 80286aa: 4619 mov r1, r3 80286ac: 240a movs r4, #10 80286ae: 4561 cmp r1, ip 80286b0: d10b bne.n 80286ca <_strtod_l+0x232> 80286b2: 1c5c adds r4, r3, #1 80286b4: 4403 add r3, r0 80286b6: 2b08 cmp r3, #8 80286b8: 4404 add r4, r0 80286ba: dc11 bgt.n 80286e0 <_strtod_l+0x248> 80286bc: 230a movs r3, #10 80286be: fb03 2909 mla r9, r3, r9, r2 80286c2: 2100 movs r1, #0 80286c4: e013 b.n 80286ee <_strtod_l+0x256> 80286c6: 4628 mov r0, r5 80286c8: e7dc b.n 8028684 <_strtod_l+0x1ec> 80286ca: 2908 cmp r1, #8 80286cc: f101 0101 add.w r1, r1, #1 80286d0: dc02 bgt.n 80286d8 <_strtod_l+0x240> 80286d2: fb04 f909 mul.w r9, r4, r9 80286d6: e7ea b.n 80286ae <_strtod_l+0x216> 80286d8: 2910 cmp r1, #16 80286da: bfd8 it le 80286dc: 4366 mulle r6, r4 80286de: e7e6 b.n 80286ae <_strtod_l+0x216> 80286e0: 2b0f cmp r3, #15 80286e2: dcee bgt.n 80286c2 <_strtod_l+0x22a> 80286e4: 230a movs r3, #10 80286e6: fb03 2606 mla r6, r3, r6, r2 80286ea: e7ea b.n 80286c2 <_strtod_l+0x22a> 80286ec: 461c mov r4, r3 80286ee: 9b11 ldr r3, [sp, #68] @ 0x44 80286f0: 1c5a adds r2, r3, #1 80286f2: 9211 str r2, [sp, #68] @ 0x44 80286f4: 785a ldrb r2, [r3, #1] 80286f6: 4608 mov r0, r1 80286f8: 4623 mov r3, r4 80286fa: e7b7 b.n 802866c <_strtod_l+0x1d4> 80286fc: 2301 movs r3, #1 80286fe: 2700 movs r7, #0 8028700: 9306 str r3, [sp, #24] 8028702: e786 b.n 8028612 <_strtod_l+0x17a> 8028704: f04f 0e00 mov.w lr, #0 8028708: f108 0202 add.w r2, r8, #2 802870c: 9211 str r2, [sp, #68] @ 0x44 802870e: f898 2002 ldrb.w r2, [r8, #2] 8028712: e78f b.n 8028634 <_strtod_l+0x19c> 8028714: f04f 0e01 mov.w lr, #1 8028718: e7f6 b.n 8028708 <_strtod_l+0x270> 802871a: bf00 nop 802871c: 08030cac .word 0x08030cac 8028720: 08030c95 .word 0x08030c95 8028724: 7ff00000 .word 0x7ff00000 8028728: 9a11 ldr r2, [sp, #68] @ 0x44 802872a: 1c54 adds r4, r2, #1 802872c: 9411 str r4, [sp, #68] @ 0x44 802872e: 7852 ldrb r2, [r2, #1] 8028730: 2a30 cmp r2, #48 @ 0x30 8028732: d0f9 beq.n 8028728 <_strtod_l+0x290> 8028734: f1a2 0431 sub.w r4, r2, #49 @ 0x31 8028738: 2c08 cmp r4, #8 802873a: d881 bhi.n 8028640 <_strtod_l+0x1a8> 802873c: f1a2 0c30 sub.w ip, r2, #48 @ 0x30 8028740: 9a11 ldr r2, [sp, #68] @ 0x44 8028742: 9209 str r2, [sp, #36] @ 0x24 8028744: 9a11 ldr r2, [sp, #68] @ 0x44 8028746: 1c51 adds r1, r2, #1 8028748: 9111 str r1, [sp, #68] @ 0x44 802874a: 7852 ldrb r2, [r2, #1] 802874c: f1a2 0430 sub.w r4, r2, #48 @ 0x30 8028750: 2c09 cmp r4, #9 8028752: d938 bls.n 80287c6 <_strtod_l+0x32e> 8028754: 9c09 ldr r4, [sp, #36] @ 0x24 8028756: 1b0c subs r4, r1, r4 8028758: 2c08 cmp r4, #8 802875a: f644 641f movw r4, #19999 @ 0x4e1f 802875e: dc02 bgt.n 8028766 <_strtod_l+0x2ce> 8028760: 4564 cmp r4, ip 8028762: bfa8 it ge 8028764: 4664 movge r4, ip 8028766: f1be 0f00 cmp.w lr, #0 802876a: d000 beq.n 802876e <_strtod_l+0x2d6> 802876c: 4264 negs r4, r4 802876e: 2b00 cmp r3, #0 8028770: d14e bne.n 8028810 <_strtod_l+0x378> 8028772: 9b07 ldr r3, [sp, #28] 8028774: 4318 orrs r0, r3 8028776: f47f aeca bne.w 802850e <_strtod_l+0x76> 802877a: 9b06 ldr r3, [sp, #24] 802877c: 2b00 cmp r3, #0 802877e: f47f aee2 bne.w 8028546 <_strtod_l+0xae> 8028782: 2a69 cmp r2, #105 @ 0x69 8028784: d027 beq.n 80287d6 <_strtod_l+0x33e> 8028786: dc24 bgt.n 80287d2 <_strtod_l+0x33a> 8028788: 2a49 cmp r2, #73 @ 0x49 802878a: d024 beq.n 80287d6 <_strtod_l+0x33e> 802878c: 2a4e cmp r2, #78 @ 0x4e 802878e: f47f aeda bne.w 8028546 <_strtod_l+0xae> 8028792: 4997 ldr r1, [pc, #604] @ (80289f0 <_strtod_l+0x558>) 8028794: a811 add r0, sp, #68 @ 0x44 8028796: f002 fc8d bl 802b0b4 <__match> 802879a: 2800 cmp r0, #0 802879c: f43f aed3 beq.w 8028546 <_strtod_l+0xae> 80287a0: 9b11 ldr r3, [sp, #68] @ 0x44 80287a2: 781b ldrb r3, [r3, #0] 80287a4: 2b28 cmp r3, #40 @ 0x28 80287a6: d12d bne.n 8028804 <_strtod_l+0x36c> 80287a8: 4992 ldr r1, [pc, #584] @ (80289f4 <_strtod_l+0x55c>) 80287aa: aa14 add r2, sp, #80 @ 0x50 80287ac: a811 add r0, sp, #68 @ 0x44 80287ae: f002 fc95 bl 802b0dc <__hexnan> 80287b2: 2805 cmp r0, #5 80287b4: d126 bne.n 8028804 <_strtod_l+0x36c> 80287b6: 9b15 ldr r3, [sp, #84] @ 0x54 80287b8: f8dd a050 ldr.w sl, [sp, #80] @ 0x50 80287bc: f043 4bff orr.w fp, r3, #2139095040 @ 0x7f800000 80287c0: f44b 0be0 orr.w fp, fp, #7340032 @ 0x700000 80287c4: e6a3 b.n 802850e <_strtod_l+0x76> 80287c6: 240a movs r4, #10 80287c8: fb04 2c0c mla ip, r4, ip, r2 80287cc: f1ac 0c30 sub.w ip, ip, #48 @ 0x30 80287d0: e7b8 b.n 8028744 <_strtod_l+0x2ac> 80287d2: 2a6e cmp r2, #110 @ 0x6e 80287d4: e7db b.n 802878e <_strtod_l+0x2f6> 80287d6: 4988 ldr r1, [pc, #544] @ (80289f8 <_strtod_l+0x560>) 80287d8: a811 add r0, sp, #68 @ 0x44 80287da: f002 fc6b bl 802b0b4 <__match> 80287de: 2800 cmp r0, #0 80287e0: f43f aeb1 beq.w 8028546 <_strtod_l+0xae> 80287e4: 9b11 ldr r3, [sp, #68] @ 0x44 80287e6: 4985 ldr r1, [pc, #532] @ (80289fc <_strtod_l+0x564>) 80287e8: 3b01 subs r3, #1 80287ea: a811 add r0, sp, #68 @ 0x44 80287ec: 9311 str r3, [sp, #68] @ 0x44 80287ee: f002 fc61 bl 802b0b4 <__match> 80287f2: b910 cbnz r0, 80287fa <_strtod_l+0x362> 80287f4: 9b11 ldr r3, [sp, #68] @ 0x44 80287f6: 3301 adds r3, #1 80287f8: 9311 str r3, [sp, #68] @ 0x44 80287fa: f8df b214 ldr.w fp, [pc, #532] @ 8028a10 <_strtod_l+0x578> 80287fe: f04f 0a00 mov.w sl, #0 8028802: e684 b.n 802850e <_strtod_l+0x76> 8028804: 487e ldr r0, [pc, #504] @ (8028a00 <_strtod_l+0x568>) 8028806: f001 fb7b bl 8029f00 802880a: ec5b ab10 vmov sl, fp, d0 802880e: e67e b.n 802850e <_strtod_l+0x76> 8028810: ee07 9a90 vmov s15, r9 8028814: 1be2 subs r2, r4, r7 8028816: eeb8 7b67 vcvt.f64.u32 d7, s15 802881a: 2d00 cmp r5, #0 802881c: bf08 it eq 802881e: 461d moveq r5, r3 8028820: 2b10 cmp r3, #16 8028822: 9209 str r2, [sp, #36] @ 0x24 8028824: 461a mov r2, r3 8028826: bfa8 it ge 8028828: 2210 movge r2, #16 802882a: 2b09 cmp r3, #9 802882c: ec5b ab17 vmov sl, fp, d7 8028830: dc15 bgt.n 802885e <_strtod_l+0x3c6> 8028832: 1be1 subs r1, r4, r7 8028834: 2900 cmp r1, #0 8028836: f43f ae6a beq.w 802850e <_strtod_l+0x76> 802883a: eba4 0107 sub.w r1, r4, r7 802883e: dd72 ble.n 8028926 <_strtod_l+0x48e> 8028840: 2916 cmp r1, #22 8028842: dc59 bgt.n 80288f8 <_strtod_l+0x460> 8028844: 4b6f ldr r3, [pc, #444] @ (8028a04 <_strtod_l+0x56c>) 8028846: 9a09 ldr r2, [sp, #36] @ 0x24 8028848: eb03 03c2 add.w r3, r3, r2, lsl #3 802884c: ed93 7b00 vldr d7, [r3] 8028850: ec4b ab16 vmov d6, sl, fp 8028854: ee27 7b06 vmul.f64 d7, d7, d6 8028858: ec5b ab17 vmov sl, fp, d7 802885c: e657 b.n 802850e <_strtod_l+0x76> 802885e: 4969 ldr r1, [pc, #420] @ (8028a04 <_strtod_l+0x56c>) 8028860: eb01 01c2 add.w r1, r1, r2, lsl #3 8028864: ed11 5b12 vldr d5, [r1, #-72] @ 0xffffffb8 8028868: ee06 6a90 vmov s13, r6 802886c: 2b0f cmp r3, #15 802886e: eeb8 6b66 vcvt.f64.u32 d6, s13 8028872: eea7 6b05 vfma.f64 d6, d7, d5 8028876: ec5b ab16 vmov sl, fp, d6 802887a: ddda ble.n 8028832 <_strtod_l+0x39a> 802887c: 1a9a subs r2, r3, r2 802887e: 1be1 subs r1, r4, r7 8028880: 440a add r2, r1 8028882: 2a00 cmp r2, #0 8028884: f340 8094 ble.w 80289b0 <_strtod_l+0x518> 8028888: f012 000f ands.w r0, r2, #15 802888c: d00a beq.n 80288a4 <_strtod_l+0x40c> 802888e: 495d ldr r1, [pc, #372] @ (8028a04 <_strtod_l+0x56c>) 8028890: eb01 01c0 add.w r1, r1, r0, lsl #3 8028894: ed91 7b00 vldr d7, [r1] 8028898: ec4b ab16 vmov d6, sl, fp 802889c: ee27 7b06 vmul.f64 d7, d7, d6 80288a0: ec5b ab17 vmov sl, fp, d7 80288a4: f032 020f bics.w r2, r2, #15 80288a8: d073 beq.n 8028992 <_strtod_l+0x4fa> 80288aa: f5b2 7f9a cmp.w r2, #308 @ 0x134 80288ae: dd47 ble.n 8028940 <_strtod_l+0x4a8> 80288b0: 2400 movs r4, #0 80288b2: 4625 mov r5, r4 80288b4: 9407 str r4, [sp, #28] 80288b6: 4626 mov r6, r4 80288b8: 9a05 ldr r2, [sp, #20] 80288ba: f8df b154 ldr.w fp, [pc, #340] @ 8028a10 <_strtod_l+0x578> 80288be: 2322 movs r3, #34 @ 0x22 80288c0: 6013 str r3, [r2, #0] 80288c2: f04f 0a00 mov.w sl, #0 80288c6: 9b07 ldr r3, [sp, #28] 80288c8: 2b00 cmp r3, #0 80288ca: f43f ae20 beq.w 802850e <_strtod_l+0x76> 80288ce: 9912 ldr r1, [sp, #72] @ 0x48 80288d0: 9805 ldr r0, [sp, #20] 80288d2: f002 fcf1 bl 802b2b8 <_Bfree> 80288d6: 9805 ldr r0, [sp, #20] 80288d8: 4631 mov r1, r6 80288da: f002 fced bl 802b2b8 <_Bfree> 80288de: 9805 ldr r0, [sp, #20] 80288e0: 4629 mov r1, r5 80288e2: f002 fce9 bl 802b2b8 <_Bfree> 80288e6: 9907 ldr r1, [sp, #28] 80288e8: 9805 ldr r0, [sp, #20] 80288ea: f002 fce5 bl 802b2b8 <_Bfree> 80288ee: 9805 ldr r0, [sp, #20] 80288f0: 4621 mov r1, r4 80288f2: f002 fce1 bl 802b2b8 <_Bfree> 80288f6: e60a b.n 802850e <_strtod_l+0x76> 80288f8: f1c3 0125 rsb r1, r3, #37 @ 0x25 80288fc: 1be0 subs r0, r4, r7 80288fe: 4281 cmp r1, r0 8028900: dbbc blt.n 802887c <_strtod_l+0x3e4> 8028902: 4a40 ldr r2, [pc, #256] @ (8028a04 <_strtod_l+0x56c>) 8028904: f1c3 030f rsb r3, r3, #15 8028908: eb02 01c3 add.w r1, r2, r3, lsl #3 802890c: ed91 7b00 vldr d7, [r1] 8028910: 9909 ldr r1, [sp, #36] @ 0x24 8028912: ec4b ab16 vmov d6, sl, fp 8028916: 1acb subs r3, r1, r3 8028918: eb02 02c3 add.w r2, r2, r3, lsl #3 802891c: ee27 7b06 vmul.f64 d7, d7, d6 8028920: ed92 6b00 vldr d6, [r2] 8028924: e796 b.n 8028854 <_strtod_l+0x3bc> 8028926: 3116 adds r1, #22 8028928: dba8 blt.n 802887c <_strtod_l+0x3e4> 802892a: 4b36 ldr r3, [pc, #216] @ (8028a04 <_strtod_l+0x56c>) 802892c: 1b3c subs r4, r7, r4 802892e: eb03 04c4 add.w r4, r3, r4, lsl #3 8028932: ed94 7b00 vldr d7, [r4] 8028936: ec4b ab16 vmov d6, sl, fp 802893a: ee86 7b07 vdiv.f64 d7, d6, d7 802893e: e78b b.n 8028858 <_strtod_l+0x3c0> 8028940: 2000 movs r0, #0 8028942: ec4b ab17 vmov d7, sl, fp 8028946: 4e30 ldr r6, [pc, #192] @ (8028a08 <_strtod_l+0x570>) 8028948: 1112 asrs r2, r2, #4 802894a: 4601 mov r1, r0 802894c: 2a01 cmp r2, #1 802894e: dc23 bgt.n 8028998 <_strtod_l+0x500> 8028950: b108 cbz r0, 8028956 <_strtod_l+0x4be> 8028952: ec5b ab17 vmov sl, fp, d7 8028956: 4a2c ldr r2, [pc, #176] @ (8028a08 <_strtod_l+0x570>) 8028958: 482c ldr r0, [pc, #176] @ (8028a0c <_strtod_l+0x574>) 802895a: eb02 02c1 add.w r2, r2, r1, lsl #3 802895e: ed92 7b00 vldr d7, [r2] 8028962: f1ab 7b54 sub.w fp, fp, #55574528 @ 0x3500000 8028966: ec4b ab16 vmov d6, sl, fp 802896a: 4a29 ldr r2, [pc, #164] @ (8028a10 <_strtod_l+0x578>) 802896c: ee27 7b06 vmul.f64 d7, d7, d6 8028970: ee17 1a90 vmov r1, s15 8028974: 400a ands r2, r1 8028976: 4282 cmp r2, r0 8028978: ec5b ab17 vmov sl, fp, d7 802897c: d898 bhi.n 80288b0 <_strtod_l+0x418> 802897e: f5a0 1080 sub.w r0, r0, #1048576 @ 0x100000 8028982: 4282 cmp r2, r0 8028984: bf86 itte hi 8028986: f8df b08c ldrhi.w fp, [pc, #140] @ 8028a14 <_strtod_l+0x57c> 802898a: f04f 3aff movhi.w sl, #4294967295 @ 0xffffffff 802898e: f101 7b54 addls.w fp, r1, #55574528 @ 0x3500000 8028992: 2200 movs r2, #0 8028994: 9206 str r2, [sp, #24] 8028996: e076 b.n 8028a86 <_strtod_l+0x5ee> 8028998: f012 0f01 tst.w r2, #1 802899c: d004 beq.n 80289a8 <_strtod_l+0x510> 802899e: ed96 6b00 vldr d6, [r6] 80289a2: 2001 movs r0, #1 80289a4: ee27 7b06 vmul.f64 d7, d7, d6 80289a8: 3101 adds r1, #1 80289aa: 1052 asrs r2, r2, #1 80289ac: 3608 adds r6, #8 80289ae: e7cd b.n 802894c <_strtod_l+0x4b4> 80289b0: d0ef beq.n 8028992 <_strtod_l+0x4fa> 80289b2: 4252 negs r2, r2 80289b4: f012 000f ands.w r0, r2, #15 80289b8: d00a beq.n 80289d0 <_strtod_l+0x538> 80289ba: 4912 ldr r1, [pc, #72] @ (8028a04 <_strtod_l+0x56c>) 80289bc: eb01 01c0 add.w r1, r1, r0, lsl #3 80289c0: ed91 7b00 vldr d7, [r1] 80289c4: ec4b ab16 vmov d6, sl, fp 80289c8: ee86 7b07 vdiv.f64 d7, d6, d7 80289cc: ec5b ab17 vmov sl, fp, d7 80289d0: 1112 asrs r2, r2, #4 80289d2: d0de beq.n 8028992 <_strtod_l+0x4fa> 80289d4: 2a1f cmp r2, #31 80289d6: dd1f ble.n 8028a18 <_strtod_l+0x580> 80289d8: 2400 movs r4, #0 80289da: 4625 mov r5, r4 80289dc: 9407 str r4, [sp, #28] 80289de: 4626 mov r6, r4 80289e0: 9a05 ldr r2, [sp, #20] 80289e2: 2322 movs r3, #34 @ 0x22 80289e4: f04f 0a00 mov.w sl, #0 80289e8: f04f 0b00 mov.w fp, #0 80289ec: 6013 str r3, [r2, #0] 80289ee: e76a b.n 80288c6 <_strtod_l+0x42e> 80289f0: 08030df6 .word 0x08030df6 80289f4: 08030c98 .word 0x08030c98 80289f8: 08030dee .word 0x08030dee 80289fc: 08030e64 .word 0x08030e64 8028a00: 08030e60 .word 0x08030e60 8028a04: 08030fc8 .word 0x08030fc8 8028a08: 08030fa0 .word 0x08030fa0 8028a0c: 7ca00000 .word 0x7ca00000 8028a10: 7ff00000 .word 0x7ff00000 8028a14: 7fefffff .word 0x7fefffff 8028a18: f012 0110 ands.w r1, r2, #16 8028a1c: bf18 it ne 8028a1e: 216a movne r1, #106 @ 0x6a 8028a20: 9106 str r1, [sp, #24] 8028a22: ec4b ab17 vmov d7, sl, fp 8028a26: 49b0 ldr r1, [pc, #704] @ (8028ce8 <_strtod_l+0x850>) 8028a28: 2000 movs r0, #0 8028a2a: 07d6 lsls r6, r2, #31 8028a2c: d504 bpl.n 8028a38 <_strtod_l+0x5a0> 8028a2e: ed91 6b00 vldr d6, [r1] 8028a32: 2001 movs r0, #1 8028a34: ee27 7b06 vmul.f64 d7, d7, d6 8028a38: 1052 asrs r2, r2, #1 8028a3a: f101 0108 add.w r1, r1, #8 8028a3e: d1f4 bne.n 8028a2a <_strtod_l+0x592> 8028a40: b108 cbz r0, 8028a46 <_strtod_l+0x5ae> 8028a42: ec5b ab17 vmov sl, fp, d7 8028a46: 9a06 ldr r2, [sp, #24] 8028a48: b1b2 cbz r2, 8028a78 <_strtod_l+0x5e0> 8028a4a: f3cb 510a ubfx r1, fp, #20, #11 8028a4e: f1c1 026b rsb r2, r1, #107 @ 0x6b 8028a52: 2a00 cmp r2, #0 8028a54: 4658 mov r0, fp 8028a56: dd0f ble.n 8028a78 <_strtod_l+0x5e0> 8028a58: 2a1f cmp r2, #31 8028a5a: dd55 ble.n 8028b08 <_strtod_l+0x670> 8028a5c: 2a34 cmp r2, #52 @ 0x34 8028a5e: bfde ittt le 8028a60: f04f 32ff movle.w r2, #4294967295 @ 0xffffffff 8028a64: f1c1 014b rsble r1, r1, #75 @ 0x4b 8028a68: 408a lslle r2, r1 8028a6a: f04f 0a00 mov.w sl, #0 8028a6e: bfcc ite gt 8028a70: f04f 7b5c movgt.w fp, #57671680 @ 0x3700000 8028a74: ea02 0b00 andle.w fp, r2, r0 8028a78: ec4b ab17 vmov d7, sl, fp 8028a7c: eeb5 7b40 vcmp.f64 d7, #0.0 8028a80: eef1 fa10 vmrs APSR_nzcv, fpscr 8028a84: d0a8 beq.n 80289d8 <_strtod_l+0x540> 8028a86: 990a ldr r1, [sp, #40] @ 0x28 8028a88: 9805 ldr r0, [sp, #20] 8028a8a: f8cd 9000 str.w r9, [sp] 8028a8e: 462a mov r2, r5 8028a90: f002 fc7a bl 802b388 <__s2b> 8028a94: 9007 str r0, [sp, #28] 8028a96: 2800 cmp r0, #0 8028a98: f43f af0a beq.w 80288b0 <_strtod_l+0x418> 8028a9c: 9b09 ldr r3, [sp, #36] @ 0x24 8028a9e: 1b3f subs r7, r7, r4 8028aa0: 2b00 cmp r3, #0 8028aa2: bfb4 ite lt 8028aa4: 463b movlt r3, r7 8028aa6: 2300 movge r3, #0 8028aa8: 930a str r3, [sp, #40] @ 0x28 8028aaa: 9b09 ldr r3, [sp, #36] @ 0x24 8028aac: ed9f bb8a vldr d11, [pc, #552] @ 8028cd8 <_strtod_l+0x840> 8028ab0: ea23 73e3 bic.w r3, r3, r3, asr #31 8028ab4: 2400 movs r4, #0 8028ab6: 930d str r3, [sp, #52] @ 0x34 8028ab8: 4625 mov r5, r4 8028aba: 9b07 ldr r3, [sp, #28] 8028abc: 9805 ldr r0, [sp, #20] 8028abe: 6859 ldr r1, [r3, #4] 8028ac0: f002 fbba bl 802b238 <_Balloc> 8028ac4: 4606 mov r6, r0 8028ac6: 2800 cmp r0, #0 8028ac8: f43f aef6 beq.w 80288b8 <_strtod_l+0x420> 8028acc: 9b07 ldr r3, [sp, #28] 8028ace: 691a ldr r2, [r3, #16] 8028ad0: ec4b ab19 vmov d9, sl, fp 8028ad4: 3202 adds r2, #2 8028ad6: f103 010c add.w r1, r3, #12 8028ada: 0092 lsls r2, r2, #2 8028adc: 300c adds r0, #12 8028ade: f001 f9fe bl 8029ede 8028ae2: eeb0 0b49 vmov.f64 d0, d9 8028ae6: 9805 ldr r0, [sp, #20] 8028ae8: aa14 add r2, sp, #80 @ 0x50 8028aea: a913 add r1, sp, #76 @ 0x4c 8028aec: f002 ff88 bl 802ba00 <__d2b> 8028af0: 9012 str r0, [sp, #72] @ 0x48 8028af2: 2800 cmp r0, #0 8028af4: f43f aee0 beq.w 80288b8 <_strtod_l+0x420> 8028af8: 9805 ldr r0, [sp, #20] 8028afa: 2101 movs r1, #1 8028afc: f002 fcda bl 802b4b4 <__i2b> 8028b00: 4605 mov r5, r0 8028b02: b940 cbnz r0, 8028b16 <_strtod_l+0x67e> 8028b04: 2500 movs r5, #0 8028b06: e6d7 b.n 80288b8 <_strtod_l+0x420> 8028b08: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8028b0c: fa01 f202 lsl.w r2, r1, r2 8028b10: ea02 0a0a and.w sl, r2, sl 8028b14: e7b0 b.n 8028a78 <_strtod_l+0x5e0> 8028b16: 9f13 ldr r7, [sp, #76] @ 0x4c 8028b18: 9a14 ldr r2, [sp, #80] @ 0x50 8028b1a: 2f00 cmp r7, #0 8028b1c: bfab itete ge 8028b1e: 9b0a ldrge r3, [sp, #40] @ 0x28 8028b20: 9b0d ldrlt r3, [sp, #52] @ 0x34 8028b22: f8dd 8034 ldrge.w r8, [sp, #52] @ 0x34 8028b26: f8dd 9028 ldrlt.w r9, [sp, #40] @ 0x28 8028b2a: bfac ite ge 8028b2c: eb07 0903 addge.w r9, r7, r3 8028b30: eba3 0807 sublt.w r8, r3, r7 8028b34: 9b06 ldr r3, [sp, #24] 8028b36: 1aff subs r7, r7, r3 8028b38: 4417 add r7, r2 8028b3a: f1c2 0336 rsb r3, r2, #54 @ 0x36 8028b3e: 4a6b ldr r2, [pc, #428] @ (8028cec <_strtod_l+0x854>) 8028b40: 3f01 subs r7, #1 8028b42: 4297 cmp r7, r2 8028b44: da51 bge.n 8028bea <_strtod_l+0x752> 8028b46: 1bd1 subs r1, r2, r7 8028b48: 291f cmp r1, #31 8028b4a: eba3 0301 sub.w r3, r3, r1 8028b4e: f04f 0201 mov.w r2, #1 8028b52: dc3e bgt.n 8028bd2 <_strtod_l+0x73a> 8028b54: 408a lsls r2, r1 8028b56: 920c str r2, [sp, #48] @ 0x30 8028b58: 2200 movs r2, #0 8028b5a: 920b str r2, [sp, #44] @ 0x2c 8028b5c: eb09 0703 add.w r7, r9, r3 8028b60: 4498 add r8, r3 8028b62: 9b06 ldr r3, [sp, #24] 8028b64: 45b9 cmp r9, r7 8028b66: 4498 add r8, r3 8028b68: 464b mov r3, r9 8028b6a: bfa8 it ge 8028b6c: 463b movge r3, r7 8028b6e: 4543 cmp r3, r8 8028b70: bfa8 it ge 8028b72: 4643 movge r3, r8 8028b74: 2b00 cmp r3, #0 8028b76: bfc2 ittt gt 8028b78: 1aff subgt r7, r7, r3 8028b7a: eba8 0803 subgt.w r8, r8, r3 8028b7e: eba9 0903 subgt.w r9, r9, r3 8028b82: 9b0a ldr r3, [sp, #40] @ 0x28 8028b84: 2b00 cmp r3, #0 8028b86: dd16 ble.n 8028bb6 <_strtod_l+0x71e> 8028b88: 4629 mov r1, r5 8028b8a: 9805 ldr r0, [sp, #20] 8028b8c: 461a mov r2, r3 8028b8e: f002 fd51 bl 802b634 <__pow5mult> 8028b92: 4605 mov r5, r0 8028b94: 2800 cmp r0, #0 8028b96: d0b5 beq.n 8028b04 <_strtod_l+0x66c> 8028b98: 4601 mov r1, r0 8028b9a: 9a12 ldr r2, [sp, #72] @ 0x48 8028b9c: 9805 ldr r0, [sp, #20] 8028b9e: f002 fc9f bl 802b4e0 <__multiply> 8028ba2: 900f str r0, [sp, #60] @ 0x3c 8028ba4: 2800 cmp r0, #0 8028ba6: f43f ae87 beq.w 80288b8 <_strtod_l+0x420> 8028baa: 9912 ldr r1, [sp, #72] @ 0x48 8028bac: 9805 ldr r0, [sp, #20] 8028bae: f002 fb83 bl 802b2b8 <_Bfree> 8028bb2: 9b0f ldr r3, [sp, #60] @ 0x3c 8028bb4: 9312 str r3, [sp, #72] @ 0x48 8028bb6: 2f00 cmp r7, #0 8028bb8: dc1b bgt.n 8028bf2 <_strtod_l+0x75a> 8028bba: 9b09 ldr r3, [sp, #36] @ 0x24 8028bbc: 2b00 cmp r3, #0 8028bbe: dd21 ble.n 8028c04 <_strtod_l+0x76c> 8028bc0: 4631 mov r1, r6 8028bc2: 9a0d ldr r2, [sp, #52] @ 0x34 8028bc4: 9805 ldr r0, [sp, #20] 8028bc6: f002 fd35 bl 802b634 <__pow5mult> 8028bca: 4606 mov r6, r0 8028bcc: b9d0 cbnz r0, 8028c04 <_strtod_l+0x76c> 8028bce: 2600 movs r6, #0 8028bd0: e672 b.n 80288b8 <_strtod_l+0x420> 8028bd2: f1c7 477f rsb r7, r7, #4278190080 @ 0xff000000 8028bd6: f507 077f add.w r7, r7, #16711680 @ 0xff0000 8028bda: f507 477b add.w r7, r7, #64256 @ 0xfb00 8028bde: 37e2 adds r7, #226 @ 0xe2 8028be0: fa02 f107 lsl.w r1, r2, r7 8028be4: 910b str r1, [sp, #44] @ 0x2c 8028be6: 920c str r2, [sp, #48] @ 0x30 8028be8: e7b8 b.n 8028b5c <_strtod_l+0x6c4> 8028bea: 2200 movs r2, #0 8028bec: 920b str r2, [sp, #44] @ 0x2c 8028bee: 2201 movs r2, #1 8028bf0: e7f9 b.n 8028be6 <_strtod_l+0x74e> 8028bf2: 9912 ldr r1, [sp, #72] @ 0x48 8028bf4: 9805 ldr r0, [sp, #20] 8028bf6: 463a mov r2, r7 8028bf8: f002 fd76 bl 802b6e8 <__lshift> 8028bfc: 9012 str r0, [sp, #72] @ 0x48 8028bfe: 2800 cmp r0, #0 8028c00: d1db bne.n 8028bba <_strtod_l+0x722> 8028c02: e659 b.n 80288b8 <_strtod_l+0x420> 8028c04: f1b8 0f00 cmp.w r8, #0 8028c08: dd07 ble.n 8028c1a <_strtod_l+0x782> 8028c0a: 4631 mov r1, r6 8028c0c: 9805 ldr r0, [sp, #20] 8028c0e: 4642 mov r2, r8 8028c10: f002 fd6a bl 802b6e8 <__lshift> 8028c14: 4606 mov r6, r0 8028c16: 2800 cmp r0, #0 8028c18: d0d9 beq.n 8028bce <_strtod_l+0x736> 8028c1a: f1b9 0f00 cmp.w r9, #0 8028c1e: dd08 ble.n 8028c32 <_strtod_l+0x79a> 8028c20: 4629 mov r1, r5 8028c22: 9805 ldr r0, [sp, #20] 8028c24: 464a mov r2, r9 8028c26: f002 fd5f bl 802b6e8 <__lshift> 8028c2a: 4605 mov r5, r0 8028c2c: 2800 cmp r0, #0 8028c2e: f43f ae43 beq.w 80288b8 <_strtod_l+0x420> 8028c32: 9912 ldr r1, [sp, #72] @ 0x48 8028c34: 9805 ldr r0, [sp, #20] 8028c36: 4632 mov r2, r6 8028c38: f002 fdde bl 802b7f8 <__mdiff> 8028c3c: 4604 mov r4, r0 8028c3e: 2800 cmp r0, #0 8028c40: f43f ae3a beq.w 80288b8 <_strtod_l+0x420> 8028c44: 2300 movs r3, #0 8028c46: f8d0 800c ldr.w r8, [r0, #12] 8028c4a: 60c3 str r3, [r0, #12] 8028c4c: 4629 mov r1, r5 8028c4e: f002 fdb7 bl 802b7c0 <__mcmp> 8028c52: 2800 cmp r0, #0 8028c54: da4e bge.n 8028cf4 <_strtod_l+0x85c> 8028c56: ea58 080a orrs.w r8, r8, sl 8028c5a: d174 bne.n 8028d46 <_strtod_l+0x8ae> 8028c5c: f3cb 0313 ubfx r3, fp, #0, #20 8028c60: 2b00 cmp r3, #0 8028c62: d170 bne.n 8028d46 <_strtod_l+0x8ae> 8028c64: f02b 4300 bic.w r3, fp, #2147483648 @ 0x80000000 8028c68: 0d1b lsrs r3, r3, #20 8028c6a: 051b lsls r3, r3, #20 8028c6c: f1b3 6fd6 cmp.w r3, #112197632 @ 0x6b00000 8028c70: d969 bls.n 8028d46 <_strtod_l+0x8ae> 8028c72: 6963 ldr r3, [r4, #20] 8028c74: b913 cbnz r3, 8028c7c <_strtod_l+0x7e4> 8028c76: 6923 ldr r3, [r4, #16] 8028c78: 2b01 cmp r3, #1 8028c7a: dd64 ble.n 8028d46 <_strtod_l+0x8ae> 8028c7c: 4621 mov r1, r4 8028c7e: 2201 movs r2, #1 8028c80: 9805 ldr r0, [sp, #20] 8028c82: f002 fd31 bl 802b6e8 <__lshift> 8028c86: 4629 mov r1, r5 8028c88: 4604 mov r4, r0 8028c8a: f002 fd99 bl 802b7c0 <__mcmp> 8028c8e: 2800 cmp r0, #0 8028c90: dd59 ble.n 8028d46 <_strtod_l+0x8ae> 8028c92: f02b 4300 bic.w r3, fp, #2147483648 @ 0x80000000 8028c96: 9a06 ldr r2, [sp, #24] 8028c98: 0d1b lsrs r3, r3, #20 8028c9a: 051b lsls r3, r3, #20 8028c9c: 2a00 cmp r2, #0 8028c9e: d070 beq.n 8028d82 <_strtod_l+0x8ea> 8028ca0: f1b3 6fd6 cmp.w r3, #112197632 @ 0x6b00000 8028ca4: d86d bhi.n 8028d82 <_strtod_l+0x8ea> 8028ca6: f1b3 7f5c cmp.w r3, #57671680 @ 0x3700000 8028caa: f67f ae99 bls.w 80289e0 <_strtod_l+0x548> 8028cae: ed9f 7b0c vldr d7, [pc, #48] @ 8028ce0 <_strtod_l+0x848> 8028cb2: ec4b ab16 vmov d6, sl, fp 8028cb6: 4b0e ldr r3, [pc, #56] @ (8028cf0 <_strtod_l+0x858>) 8028cb8: ee26 7b07 vmul.f64 d7, d6, d7 8028cbc: ee17 2a90 vmov r2, s15 8028cc0: 4013 ands r3, r2 8028cc2: ec5b ab17 vmov sl, fp, d7 8028cc6: 2b00 cmp r3, #0 8028cc8: f47f ae01 bne.w 80288ce <_strtod_l+0x436> 8028ccc: 9a05 ldr r2, [sp, #20] 8028cce: 2322 movs r3, #34 @ 0x22 8028cd0: 6013 str r3, [r2, #0] 8028cd2: e5fc b.n 80288ce <_strtod_l+0x436> 8028cd4: f3af 8000 nop.w 8028cd8: ffc00000 .word 0xffc00000 8028cdc: 41dfffff .word 0x41dfffff 8028ce0: 00000000 .word 0x00000000 8028ce4: 39500000 .word 0x39500000 8028ce8: 08030cc0 .word 0x08030cc0 8028cec: fffffc02 .word 0xfffffc02 8028cf0: 7ff00000 .word 0x7ff00000 8028cf4: 46d9 mov r9, fp 8028cf6: d15d bne.n 8028db4 <_strtod_l+0x91c> 8028cf8: f3cb 0313 ubfx r3, fp, #0, #20 8028cfc: f1b8 0f00 cmp.w r8, #0 8028d00: d02a beq.n 8028d58 <_strtod_l+0x8c0> 8028d02: 4aab ldr r2, [pc, #684] @ (8028fb0 <_strtod_l+0xb18>) 8028d04: 4293 cmp r3, r2 8028d06: d12a bne.n 8028d5e <_strtod_l+0x8c6> 8028d08: 9b06 ldr r3, [sp, #24] 8028d0a: 4652 mov r2, sl 8028d0c: b1fb cbz r3, 8028d4e <_strtod_l+0x8b6> 8028d0e: 4ba9 ldr r3, [pc, #676] @ (8028fb4 <_strtod_l+0xb1c>) 8028d10: ea0b 0303 and.w r3, fp, r3 8028d14: f1b3 6fd4 cmp.w r3, #111149056 @ 0x6a00000 8028d18: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8028d1c: d81a bhi.n 8028d54 <_strtod_l+0x8bc> 8028d1e: 0d1b lsrs r3, r3, #20 8028d20: f1c3 036b rsb r3, r3, #107 @ 0x6b 8028d24: fa01 f303 lsl.w r3, r1, r3 8028d28: 429a cmp r2, r3 8028d2a: d118 bne.n 8028d5e <_strtod_l+0x8c6> 8028d2c: 4ba2 ldr r3, [pc, #648] @ (8028fb8 <_strtod_l+0xb20>) 8028d2e: 4599 cmp r9, r3 8028d30: d102 bne.n 8028d38 <_strtod_l+0x8a0> 8028d32: 3201 adds r2, #1 8028d34: f43f adc0 beq.w 80288b8 <_strtod_l+0x420> 8028d38: 4b9e ldr r3, [pc, #632] @ (8028fb4 <_strtod_l+0xb1c>) 8028d3a: ea09 0303 and.w r3, r9, r3 8028d3e: f503 1b80 add.w fp, r3, #1048576 @ 0x100000 8028d42: f04f 0a00 mov.w sl, #0 8028d46: 9b06 ldr r3, [sp, #24] 8028d48: 2b00 cmp r3, #0 8028d4a: d1b0 bne.n 8028cae <_strtod_l+0x816> 8028d4c: e5bf b.n 80288ce <_strtod_l+0x436> 8028d4e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8028d52: e7e9 b.n 8028d28 <_strtod_l+0x890> 8028d54: 460b mov r3, r1 8028d56: e7e7 b.n 8028d28 <_strtod_l+0x890> 8028d58: ea53 030a orrs.w r3, r3, sl 8028d5c: d099 beq.n 8028c92 <_strtod_l+0x7fa> 8028d5e: 9b0b ldr r3, [sp, #44] @ 0x2c 8028d60: b1c3 cbz r3, 8028d94 <_strtod_l+0x8fc> 8028d62: ea13 0f09 tst.w r3, r9 8028d66: d0ee beq.n 8028d46 <_strtod_l+0x8ae> 8028d68: 9a06 ldr r2, [sp, #24] 8028d6a: 4650 mov r0, sl 8028d6c: 4659 mov r1, fp 8028d6e: f1b8 0f00 cmp.w r8, #0 8028d72: d013 beq.n 8028d9c <_strtod_l+0x904> 8028d74: f7ff fb74 bl 8028460 8028d78: ee39 7b00 vadd.f64 d7, d9, d0 8028d7c: ec5b ab17 vmov sl, fp, d7 8028d80: e7e1 b.n 8028d46 <_strtod_l+0x8ae> 8028d82: f5a3 1380 sub.w r3, r3, #1048576 @ 0x100000 8028d86: ea6f 5b13 mvn.w fp, r3, lsr #20 8028d8a: ea6f 5b0b mvn.w fp, fp, lsl #20 8028d8e: f04f 3aff mov.w sl, #4294967295 @ 0xffffffff 8028d92: e7d8 b.n 8028d46 <_strtod_l+0x8ae> 8028d94: 9b0c ldr r3, [sp, #48] @ 0x30 8028d96: ea13 0f0a tst.w r3, sl 8028d9a: e7e4 b.n 8028d66 <_strtod_l+0x8ce> 8028d9c: f7ff fb60 bl 8028460 8028da0: ee39 0b40 vsub.f64 d0, d9, d0 8028da4: eeb5 0b40 vcmp.f64 d0, #0.0 8028da8: eef1 fa10 vmrs APSR_nzcv, fpscr 8028dac: ec5b ab10 vmov sl, fp, d0 8028db0: d1c9 bne.n 8028d46 <_strtod_l+0x8ae> 8028db2: e615 b.n 80289e0 <_strtod_l+0x548> 8028db4: 4629 mov r1, r5 8028db6: 4620 mov r0, r4 8028db8: f002 fe7a bl 802bab0 <__ratio> 8028dbc: eeb0 7b00 vmov.f64 d7, #0 @ 0x40000000 2.0 8028dc0: eeb4 0bc7 vcmpe.f64 d0, d7 8028dc4: eef1 fa10 vmrs APSR_nzcv, fpscr 8028dc8: d85d bhi.n 8028e86 <_strtod_l+0x9ee> 8028dca: f1b8 0f00 cmp.w r8, #0 8028dce: d164 bne.n 8028e9a <_strtod_l+0xa02> 8028dd0: f1ba 0f00 cmp.w sl, #0 8028dd4: d14b bne.n 8028e6e <_strtod_l+0x9d6> 8028dd6: f3cb 0313 ubfx r3, fp, #0, #20 8028dda: eeb7 8b00 vmov.f64 d8, #112 @ 0x3f800000 1.0 8028dde: 2b00 cmp r3, #0 8028de0: d160 bne.n 8028ea4 <_strtod_l+0xa0c> 8028de2: eeb4 0bc8 vcmpe.f64 d0, d8 8028de6: eeb6 8b00 vmov.f64 d8, #96 @ 0x3f000000 0.5 8028dea: eef1 fa10 vmrs APSR_nzcv, fpscr 8028dee: d401 bmi.n 8028df4 <_strtod_l+0x95c> 8028df0: ee20 8b08 vmul.f64 d8, d0, d8 8028df4: eeb1 ab48 vneg.f64 d10, d8 8028df8: 486e ldr r0, [pc, #440] @ (8028fb4 <_strtod_l+0xb1c>) 8028dfa: 4970 ldr r1, [pc, #448] @ (8028fbc <_strtod_l+0xb24>) 8028dfc: ea09 0700 and.w r7, r9, r0 8028e00: 428f cmp r7, r1 8028e02: ec53 2b1a vmov r2, r3, d10 8028e06: d17d bne.n 8028f04 <_strtod_l+0xa6c> 8028e08: f1a9 7b54 sub.w fp, r9, #55574528 @ 0x3500000 8028e0c: ec4b ab1c vmov d12, sl, fp 8028e10: eeb0 0b4c vmov.f64 d0, d12 8028e14: f002 fd84 bl 802b920 <__ulp> 8028e18: 4866 ldr r0, [pc, #408] @ (8028fb4 <_strtod_l+0xb1c>) 8028e1a: eea0 cb0a vfma.f64 d12, d0, d10 8028e1e: ee1c 3a90 vmov r3, s25 8028e22: 4a67 ldr r2, [pc, #412] @ (8028fc0 <_strtod_l+0xb28>) 8028e24: ea03 0100 and.w r1, r3, r0 8028e28: 4291 cmp r1, r2 8028e2a: ec5b ab1c vmov sl, fp, d12 8028e2e: d93c bls.n 8028eaa <_strtod_l+0xa12> 8028e30: ee19 2a90 vmov r2, s19 8028e34: 4b60 ldr r3, [pc, #384] @ (8028fb8 <_strtod_l+0xb20>) 8028e36: 429a cmp r2, r3 8028e38: d104 bne.n 8028e44 <_strtod_l+0x9ac> 8028e3a: ee19 3a10 vmov r3, s18 8028e3e: 3301 adds r3, #1 8028e40: f43f ad3a beq.w 80288b8 <_strtod_l+0x420> 8028e44: f8df b170 ldr.w fp, [pc, #368] @ 8028fb8 <_strtod_l+0xb20> 8028e48: f04f 3aff mov.w sl, #4294967295 @ 0xffffffff 8028e4c: 9912 ldr r1, [sp, #72] @ 0x48 8028e4e: 9805 ldr r0, [sp, #20] 8028e50: f002 fa32 bl 802b2b8 <_Bfree> 8028e54: 9805 ldr r0, [sp, #20] 8028e56: 4631 mov r1, r6 8028e58: f002 fa2e bl 802b2b8 <_Bfree> 8028e5c: 9805 ldr r0, [sp, #20] 8028e5e: 4629 mov r1, r5 8028e60: f002 fa2a bl 802b2b8 <_Bfree> 8028e64: 9805 ldr r0, [sp, #20] 8028e66: 4621 mov r1, r4 8028e68: f002 fa26 bl 802b2b8 <_Bfree> 8028e6c: e625 b.n 8028aba <_strtod_l+0x622> 8028e6e: f1ba 0f01 cmp.w sl, #1 8028e72: d103 bne.n 8028e7c <_strtod_l+0x9e4> 8028e74: f1bb 0f00 cmp.w fp, #0 8028e78: f43f adb2 beq.w 80289e0 <_strtod_l+0x548> 8028e7c: eebf ab00 vmov.f64 d10, #240 @ 0xbf800000 -1.0 8028e80: eeb7 8b00 vmov.f64 d8, #112 @ 0x3f800000 1.0 8028e84: e7b8 b.n 8028df8 <_strtod_l+0x960> 8028e86: eeb6 8b00 vmov.f64 d8, #96 @ 0x3f000000 0.5 8028e8a: ee20 8b08 vmul.f64 d8, d0, d8 8028e8e: f1b8 0f00 cmp.w r8, #0 8028e92: d0af beq.n 8028df4 <_strtod_l+0x95c> 8028e94: eeb0 ab48 vmov.f64 d10, d8 8028e98: e7ae b.n 8028df8 <_strtod_l+0x960> 8028e9a: eeb7 ab00 vmov.f64 d10, #112 @ 0x3f800000 1.0 8028e9e: eeb0 8b4a vmov.f64 d8, d10 8028ea2: e7a9 b.n 8028df8 <_strtod_l+0x960> 8028ea4: eebf ab00 vmov.f64 d10, #240 @ 0xbf800000 -1.0 8028ea8: e7a6 b.n 8028df8 <_strtod_l+0x960> 8028eaa: f103 7b54 add.w fp, r3, #55574528 @ 0x3500000 8028eae: 9b06 ldr r3, [sp, #24] 8028eb0: 46d9 mov r9, fp 8028eb2: 2b00 cmp r3, #0 8028eb4: d1ca bne.n 8028e4c <_strtod_l+0x9b4> 8028eb6: f02b 4300 bic.w r3, fp, #2147483648 @ 0x80000000 8028eba: 0d1b lsrs r3, r3, #20 8028ebc: 051b lsls r3, r3, #20 8028ebe: 429f cmp r7, r3 8028ec0: d1c4 bne.n 8028e4c <_strtod_l+0x9b4> 8028ec2: ec51 0b18 vmov r0, r1, d8 8028ec6: f7d7 fc47 bl 8000758 <__aeabi_d2lz> 8028eca: f7d7 fbff bl 80006cc <__aeabi_l2d> 8028ece: f3cb 0913 ubfx r9, fp, #0, #20 8028ed2: ec41 0b17 vmov d7, r0, r1 8028ed6: ea49 090a orr.w r9, r9, sl 8028eda: ea59 0908 orrs.w r9, r9, r8 8028ede: ee38 8b47 vsub.f64 d8, d8, d7 8028ee2: d03c beq.n 8028f5e <_strtod_l+0xac6> 8028ee4: ed9f 7b2c vldr d7, [pc, #176] @ 8028f98 <_strtod_l+0xb00> 8028ee8: eeb4 8bc7 vcmpe.f64 d8, d7 8028eec: eef1 fa10 vmrs APSR_nzcv, fpscr 8028ef0: f53f aced bmi.w 80288ce <_strtod_l+0x436> 8028ef4: ed9f 7b2a vldr d7, [pc, #168] @ 8028fa0 <_strtod_l+0xb08> 8028ef8: eeb4 8bc7 vcmpe.f64 d8, d7 8028efc: eef1 fa10 vmrs APSR_nzcv, fpscr 8028f00: dda4 ble.n 8028e4c <_strtod_l+0x9b4> 8028f02: e4e4 b.n 80288ce <_strtod_l+0x436> 8028f04: 9906 ldr r1, [sp, #24] 8028f06: b1e1 cbz r1, 8028f42 <_strtod_l+0xaaa> 8028f08: f1b7 6fd4 cmp.w r7, #111149056 @ 0x6a00000 8028f0c: d819 bhi.n 8028f42 <_strtod_l+0xaaa> 8028f0e: eeb4 8bcb vcmpe.f64 d8, d11 8028f12: eef1 fa10 vmrs APSR_nzcv, fpscr 8028f16: d811 bhi.n 8028f3c <_strtod_l+0xaa4> 8028f18: eebc 8bc8 vcvt.u32.f64 s16, d8 8028f1c: ee18 3a10 vmov r3, s16 8028f20: 2b01 cmp r3, #1 8028f22: bf38 it cc 8028f24: 2301 movcc r3, #1 8028f26: ee08 3a10 vmov s16, r3 8028f2a: eeb8 8b48 vcvt.f64.u32 d8, s16 8028f2e: f1b8 0f00 cmp.w r8, #0 8028f32: d111 bne.n 8028f58 <_strtod_l+0xac0> 8028f34: eeb1 7b48 vneg.f64 d7, d8 8028f38: ec53 2b17 vmov r2, r3, d7 8028f3c: f103 61d6 add.w r1, r3, #112197632 @ 0x6b00000 8028f40: 1bcb subs r3, r1, r7 8028f42: eeb0 0b49 vmov.f64 d0, d9 8028f46: ec43 2b1a vmov d10, r2, r3 8028f4a: f002 fce9 bl 802b920 <__ulp> 8028f4e: eeaa 9b00 vfma.f64 d9, d10, d0 8028f52: ec5b ab19 vmov sl, fp, d9 8028f56: e7aa b.n 8028eae <_strtod_l+0xa16> 8028f58: eeb0 7b48 vmov.f64 d7, d8 8028f5c: e7ec b.n 8028f38 <_strtod_l+0xaa0> 8028f5e: ed9f 7b12 vldr d7, [pc, #72] @ 8028fa8 <_strtod_l+0xb10> 8028f62: eeb4 8bc7 vcmpe.f64 d8, d7 8028f66: eef1 fa10 vmrs APSR_nzcv, fpscr 8028f6a: f57f af6f bpl.w 8028e4c <_strtod_l+0x9b4> 8028f6e: e4ae b.n 80288ce <_strtod_l+0x436> 8028f70: 2300 movs r3, #0 8028f72: 9308 str r3, [sp, #32] 8028f74: 9a0e ldr r2, [sp, #56] @ 0x38 8028f76: 9b11 ldr r3, [sp, #68] @ 0x44 8028f78: 6013 str r3, [r2, #0] 8028f7a: f7ff bacc b.w 8028516 <_strtod_l+0x7e> 8028f7e: 2a65 cmp r2, #101 @ 0x65 8028f80: f43f abbc beq.w 80286fc <_strtod_l+0x264> 8028f84: 2a45 cmp r2, #69 @ 0x45 8028f86: f43f abb9 beq.w 80286fc <_strtod_l+0x264> 8028f8a: 2301 movs r3, #1 8028f8c: 9306 str r3, [sp, #24] 8028f8e: f7ff bbf0 b.w 8028772 <_strtod_l+0x2da> 8028f92: bf00 nop 8028f94: f3af 8000 nop.w 8028f98: 94a03595 .word 0x94a03595 8028f9c: 3fdfffff .word 0x3fdfffff 8028fa0: 35afe535 .word 0x35afe535 8028fa4: 3fe00000 .word 0x3fe00000 8028fa8: 94a03595 .word 0x94a03595 8028fac: 3fcfffff .word 0x3fcfffff 8028fb0: 000fffff .word 0x000fffff 8028fb4: 7ff00000 .word 0x7ff00000 8028fb8: 7fefffff .word 0x7fefffff 8028fbc: 7fe00000 .word 0x7fe00000 8028fc0: 7c9fffff .word 0x7c9fffff 08028fc4 : 8028fc4: 460a mov r2, r1 8028fc6: 4601 mov r1, r0 8028fc8: 4802 ldr r0, [pc, #8] @ (8028fd4 ) 8028fca: 4b03 ldr r3, [pc, #12] @ (8028fd8 ) 8028fcc: 6800 ldr r0, [r0, #0] 8028fce: f7ff ba63 b.w 8028498 <_strtod_l> 8028fd2: bf00 nop 8028fd4: 240001d4 .word 0x240001d4 8028fd8: 24000068 .word 0x24000068 08028fdc <__cvt>: 8028fdc: b5f0 push {r4, r5, r6, r7, lr} 8028fde: ed2d 8b02 vpush {d8} 8028fe2: eeb0 8b40 vmov.f64 d8, d0 8028fe6: b085 sub sp, #20 8028fe8: 4617 mov r7, r2 8028fea: 9d0d ldr r5, [sp, #52] @ 0x34 8028fec: 9e0c ldr r6, [sp, #48] @ 0x30 8028fee: ee18 2a90 vmov r2, s17 8028ff2: f025 0520 bic.w r5, r5, #32 8028ff6: 2a00 cmp r2, #0 8028ff8: bfb6 itet lt 8028ffa: 222d movlt r2, #45 @ 0x2d 8028ffc: 2200 movge r2, #0 8028ffe: eeb1 8b40 vneglt.f64 d8, d0 8029002: 2d46 cmp r5, #70 @ 0x46 8029004: 460c mov r4, r1 8029006: 701a strb r2, [r3, #0] 8029008: d004 beq.n 8029014 <__cvt+0x38> 802900a: 2d45 cmp r5, #69 @ 0x45 802900c: d100 bne.n 8029010 <__cvt+0x34> 802900e: 3401 adds r4, #1 8029010: 2102 movs r1, #2 8029012: e000 b.n 8029016 <__cvt+0x3a> 8029014: 2103 movs r1, #3 8029016: ab03 add r3, sp, #12 8029018: 9301 str r3, [sp, #4] 802901a: ab02 add r3, sp, #8 802901c: 9300 str r3, [sp, #0] 802901e: 4622 mov r2, r4 8029020: 4633 mov r3, r6 8029022: eeb0 0b48 vmov.f64 d0, d8 8029026: f001 f81b bl 802a060 <_dtoa_r> 802902a: 2d47 cmp r5, #71 @ 0x47 802902c: d114 bne.n 8029058 <__cvt+0x7c> 802902e: 07fb lsls r3, r7, #31 8029030: d50a bpl.n 8029048 <__cvt+0x6c> 8029032: 1902 adds r2, r0, r4 8029034: eeb5 8b40 vcmp.f64 d8, #0.0 8029038: eef1 fa10 vmrs APSR_nzcv, fpscr 802903c: bf08 it eq 802903e: 9203 streq r2, [sp, #12] 8029040: 2130 movs r1, #48 @ 0x30 8029042: 9b03 ldr r3, [sp, #12] 8029044: 4293 cmp r3, r2 8029046: d319 bcc.n 802907c <__cvt+0xa0> 8029048: 9b03 ldr r3, [sp, #12] 802904a: 9a0e ldr r2, [sp, #56] @ 0x38 802904c: 1a1b subs r3, r3, r0 802904e: 6013 str r3, [r2, #0] 8029050: b005 add sp, #20 8029052: ecbd 8b02 vpop {d8} 8029056: bdf0 pop {r4, r5, r6, r7, pc} 8029058: 2d46 cmp r5, #70 @ 0x46 802905a: eb00 0204 add.w r2, r0, r4 802905e: d1e9 bne.n 8029034 <__cvt+0x58> 8029060: 7803 ldrb r3, [r0, #0] 8029062: 2b30 cmp r3, #48 @ 0x30 8029064: d107 bne.n 8029076 <__cvt+0x9a> 8029066: eeb5 8b40 vcmp.f64 d8, #0.0 802906a: eef1 fa10 vmrs APSR_nzcv, fpscr 802906e: bf1c itt ne 8029070: f1c4 0401 rsbne r4, r4, #1 8029074: 6034 strne r4, [r6, #0] 8029076: 6833 ldr r3, [r6, #0] 8029078: 441a add r2, r3 802907a: e7db b.n 8029034 <__cvt+0x58> 802907c: 1c5c adds r4, r3, #1 802907e: 9403 str r4, [sp, #12] 8029080: 7019 strb r1, [r3, #0] 8029082: e7de b.n 8029042 <__cvt+0x66> 08029084 <__exponent>: 8029084: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 8029086: 2900 cmp r1, #0 8029088: bfba itte lt 802908a: 4249 neglt r1, r1 802908c: 232d movlt r3, #45 @ 0x2d 802908e: 232b movge r3, #43 @ 0x2b 8029090: 2909 cmp r1, #9 8029092: 7002 strb r2, [r0, #0] 8029094: 7043 strb r3, [r0, #1] 8029096: dd29 ble.n 80290ec <__exponent+0x68> 8029098: f10d 0307 add.w r3, sp, #7 802909c: 461d mov r5, r3 802909e: 270a movs r7, #10 80290a0: 461a mov r2, r3 80290a2: fbb1 f6f7 udiv r6, r1, r7 80290a6: fb07 1416 mls r4, r7, r6, r1 80290aa: 3430 adds r4, #48 @ 0x30 80290ac: f802 4c01 strb.w r4, [r2, #-1] 80290b0: 460c mov r4, r1 80290b2: 2c63 cmp r4, #99 @ 0x63 80290b4: f103 33ff add.w r3, r3, #4294967295 @ 0xffffffff 80290b8: 4631 mov r1, r6 80290ba: dcf1 bgt.n 80290a0 <__exponent+0x1c> 80290bc: 3130 adds r1, #48 @ 0x30 80290be: 1e94 subs r4, r2, #2 80290c0: f803 1c01 strb.w r1, [r3, #-1] 80290c4: 1c41 adds r1, r0, #1 80290c6: 4623 mov r3, r4 80290c8: 42ab cmp r3, r5 80290ca: d30a bcc.n 80290e2 <__exponent+0x5e> 80290cc: f10d 0309 add.w r3, sp, #9 80290d0: 1a9b subs r3, r3, r2 80290d2: 42ac cmp r4, r5 80290d4: bf88 it hi 80290d6: 2300 movhi r3, #0 80290d8: 3302 adds r3, #2 80290da: 4403 add r3, r0 80290dc: 1a18 subs r0, r3, r0 80290de: b003 add sp, #12 80290e0: bdf0 pop {r4, r5, r6, r7, pc} 80290e2: f813 6b01 ldrb.w r6, [r3], #1 80290e6: f801 6f01 strb.w r6, [r1, #1]! 80290ea: e7ed b.n 80290c8 <__exponent+0x44> 80290ec: 2330 movs r3, #48 @ 0x30 80290ee: 3130 adds r1, #48 @ 0x30 80290f0: 7083 strb r3, [r0, #2] 80290f2: 70c1 strb r1, [r0, #3] 80290f4: 1d03 adds r3, r0, #4 80290f6: e7f1 b.n 80290dc <__exponent+0x58> 080290f8 <_printf_float>: 80290f8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80290fc: b08d sub sp, #52 @ 0x34 80290fe: 460c mov r4, r1 8029100: f8dd 8058 ldr.w r8, [sp, #88] @ 0x58 8029104: 4616 mov r6, r2 8029106: 461f mov r7, r3 8029108: 4605 mov r5, r0 802910a: f000 fe0b bl 8029d24 <_localeconv_r> 802910e: f8d0 b000 ldr.w fp, [r0] 8029112: 4658 mov r0, fp 8029114: f7d7 f944 bl 80003a0 8029118: 2300 movs r3, #0 802911a: 930a str r3, [sp, #40] @ 0x28 802911c: f8d8 3000 ldr.w r3, [r8] 8029120: f894 9018 ldrb.w r9, [r4, #24] 8029124: 6822 ldr r2, [r4, #0] 8029126: 9005 str r0, [sp, #20] 8029128: 3307 adds r3, #7 802912a: f023 0307 bic.w r3, r3, #7 802912e: f103 0108 add.w r1, r3, #8 8029132: f8c8 1000 str.w r1, [r8] 8029136: ed93 0b00 vldr d0, [r3] 802913a: ed9f 6b97 vldr d6, [pc, #604] @ 8029398 <_printf_float+0x2a0> 802913e: eeb0 7bc0 vabs.f64 d7, d0 8029142: eeb4 7b46 vcmp.f64 d7, d6 8029146: eef1 fa10 vmrs APSR_nzcv, fpscr 802914a: ed84 0b12 vstr d0, [r4, #72] @ 0x48 802914e: dd24 ble.n 802919a <_printf_float+0xa2> 8029150: eeb5 0bc0 vcmpe.f64 d0, #0.0 8029154: eef1 fa10 vmrs APSR_nzcv, fpscr 8029158: d502 bpl.n 8029160 <_printf_float+0x68> 802915a: 232d movs r3, #45 @ 0x2d 802915c: f884 3043 strb.w r3, [r4, #67] @ 0x43 8029160: 498f ldr r1, [pc, #572] @ (80293a0 <_printf_float+0x2a8>) 8029162: 4b90 ldr r3, [pc, #576] @ (80293a4 <_printf_float+0x2ac>) 8029164: f1b9 0f47 cmp.w r9, #71 @ 0x47 8029168: bf94 ite ls 802916a: 4688 movls r8, r1 802916c: 4698 movhi r8, r3 802916e: f022 0204 bic.w r2, r2, #4 8029172: 2303 movs r3, #3 8029174: 6123 str r3, [r4, #16] 8029176: 6022 str r2, [r4, #0] 8029178: f04f 0a00 mov.w sl, #0 802917c: 9700 str r7, [sp, #0] 802917e: 4633 mov r3, r6 8029180: aa0b add r2, sp, #44 @ 0x2c 8029182: 4621 mov r1, r4 8029184: 4628 mov r0, r5 8029186: f000 f9d1 bl 802952c <_printf_common> 802918a: 3001 adds r0, #1 802918c: f040 8089 bne.w 80292a2 <_printf_float+0x1aa> 8029190: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8029194: b00d add sp, #52 @ 0x34 8029196: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802919a: eeb4 0b40 vcmp.f64 d0, d0 802919e: eef1 fa10 vmrs APSR_nzcv, fpscr 80291a2: d709 bvc.n 80291b8 <_printf_float+0xc0> 80291a4: ee10 3a90 vmov r3, s1 80291a8: 2b00 cmp r3, #0 80291aa: bfbc itt lt 80291ac: 232d movlt r3, #45 @ 0x2d 80291ae: f884 3043 strblt.w r3, [r4, #67] @ 0x43 80291b2: 497d ldr r1, [pc, #500] @ (80293a8 <_printf_float+0x2b0>) 80291b4: 4b7d ldr r3, [pc, #500] @ (80293ac <_printf_float+0x2b4>) 80291b6: e7d5 b.n 8029164 <_printf_float+0x6c> 80291b8: 6863 ldr r3, [r4, #4] 80291ba: 1c59 adds r1, r3, #1 80291bc: f009 0adf and.w sl, r9, #223 @ 0xdf 80291c0: d139 bne.n 8029236 <_printf_float+0x13e> 80291c2: 2306 movs r3, #6 80291c4: 6063 str r3, [r4, #4] 80291c6: f442 6280 orr.w r2, r2, #1024 @ 0x400 80291ca: 2300 movs r3, #0 80291cc: 6022 str r2, [r4, #0] 80291ce: 9303 str r3, [sp, #12] 80291d0: ab0a add r3, sp, #40 @ 0x28 80291d2: e9cd 9301 strd r9, r3, [sp, #4] 80291d6: ab09 add r3, sp, #36 @ 0x24 80291d8: 9300 str r3, [sp, #0] 80291da: 6861 ldr r1, [r4, #4] 80291dc: f10d 0323 add.w r3, sp, #35 @ 0x23 80291e0: 4628 mov r0, r5 80291e2: f7ff fefb bl 8028fdc <__cvt> 80291e6: f1ba 0f47 cmp.w sl, #71 @ 0x47 80291ea: 9909 ldr r1, [sp, #36] @ 0x24 80291ec: 4680 mov r8, r0 80291ee: d129 bne.n 8029244 <_printf_float+0x14c> 80291f0: 1cc8 adds r0, r1, #3 80291f2: db02 blt.n 80291fa <_printf_float+0x102> 80291f4: 6863 ldr r3, [r4, #4] 80291f6: 4299 cmp r1, r3 80291f8: dd41 ble.n 802927e <_printf_float+0x186> 80291fa: f1a9 0902 sub.w r9, r9, #2 80291fe: fa5f f989 uxtb.w r9, r9 8029202: 3901 subs r1, #1 8029204: 464a mov r2, r9 8029206: f104 0050 add.w r0, r4, #80 @ 0x50 802920a: 9109 str r1, [sp, #36] @ 0x24 802920c: f7ff ff3a bl 8029084 <__exponent> 8029210: 9a0a ldr r2, [sp, #40] @ 0x28 8029212: 1813 adds r3, r2, r0 8029214: 2a01 cmp r2, #1 8029216: 4682 mov sl, r0 8029218: 6123 str r3, [r4, #16] 802921a: dc02 bgt.n 8029222 <_printf_float+0x12a> 802921c: 6822 ldr r2, [r4, #0] 802921e: 07d2 lsls r2, r2, #31 8029220: d501 bpl.n 8029226 <_printf_float+0x12e> 8029222: 3301 adds r3, #1 8029224: 6123 str r3, [r4, #16] 8029226: f89d 3023 ldrb.w r3, [sp, #35] @ 0x23 802922a: 2b00 cmp r3, #0 802922c: d0a6 beq.n 802917c <_printf_float+0x84> 802922e: 232d movs r3, #45 @ 0x2d 8029230: f884 3043 strb.w r3, [r4, #67] @ 0x43 8029234: e7a2 b.n 802917c <_printf_float+0x84> 8029236: f1ba 0f47 cmp.w sl, #71 @ 0x47 802923a: d1c4 bne.n 80291c6 <_printf_float+0xce> 802923c: 2b00 cmp r3, #0 802923e: d1c2 bne.n 80291c6 <_printf_float+0xce> 8029240: 2301 movs r3, #1 8029242: e7bf b.n 80291c4 <_printf_float+0xcc> 8029244: f1b9 0f65 cmp.w r9, #101 @ 0x65 8029248: d9db bls.n 8029202 <_printf_float+0x10a> 802924a: f1b9 0f66 cmp.w r9, #102 @ 0x66 802924e: d118 bne.n 8029282 <_printf_float+0x18a> 8029250: 2900 cmp r1, #0 8029252: 6863 ldr r3, [r4, #4] 8029254: dd0b ble.n 802926e <_printf_float+0x176> 8029256: 6121 str r1, [r4, #16] 8029258: b913 cbnz r3, 8029260 <_printf_float+0x168> 802925a: 6822 ldr r2, [r4, #0] 802925c: 07d0 lsls r0, r2, #31 802925e: d502 bpl.n 8029266 <_printf_float+0x16e> 8029260: 3301 adds r3, #1 8029262: 440b add r3, r1 8029264: 6123 str r3, [r4, #16] 8029266: 65a1 str r1, [r4, #88] @ 0x58 8029268: f04f 0a00 mov.w sl, #0 802926c: e7db b.n 8029226 <_printf_float+0x12e> 802926e: b913 cbnz r3, 8029276 <_printf_float+0x17e> 8029270: 6822 ldr r2, [r4, #0] 8029272: 07d2 lsls r2, r2, #31 8029274: d501 bpl.n 802927a <_printf_float+0x182> 8029276: 3302 adds r3, #2 8029278: e7f4 b.n 8029264 <_printf_float+0x16c> 802927a: 2301 movs r3, #1 802927c: e7f2 b.n 8029264 <_printf_float+0x16c> 802927e: f04f 0967 mov.w r9, #103 @ 0x67 8029282: 9b0a ldr r3, [sp, #40] @ 0x28 8029284: 4299 cmp r1, r3 8029286: db05 blt.n 8029294 <_printf_float+0x19c> 8029288: 6823 ldr r3, [r4, #0] 802928a: 6121 str r1, [r4, #16] 802928c: 07d8 lsls r0, r3, #31 802928e: d5ea bpl.n 8029266 <_printf_float+0x16e> 8029290: 1c4b adds r3, r1, #1 8029292: e7e7 b.n 8029264 <_printf_float+0x16c> 8029294: 2900 cmp r1, #0 8029296: bfd4 ite le 8029298: f1c1 0202 rsble r2, r1, #2 802929c: 2201 movgt r2, #1 802929e: 4413 add r3, r2 80292a0: e7e0 b.n 8029264 <_printf_float+0x16c> 80292a2: 6823 ldr r3, [r4, #0] 80292a4: 055a lsls r2, r3, #21 80292a6: d407 bmi.n 80292b8 <_printf_float+0x1c0> 80292a8: 6923 ldr r3, [r4, #16] 80292aa: 4642 mov r2, r8 80292ac: 4631 mov r1, r6 80292ae: 4628 mov r0, r5 80292b0: 47b8 blx r7 80292b2: 3001 adds r0, #1 80292b4: d12a bne.n 802930c <_printf_float+0x214> 80292b6: e76b b.n 8029190 <_printf_float+0x98> 80292b8: f1b9 0f65 cmp.w r9, #101 @ 0x65 80292bc: f240 80e0 bls.w 8029480 <_printf_float+0x388> 80292c0: ed94 7b12 vldr d7, [r4, #72] @ 0x48 80292c4: eeb5 7b40 vcmp.f64 d7, #0.0 80292c8: eef1 fa10 vmrs APSR_nzcv, fpscr 80292cc: d133 bne.n 8029336 <_printf_float+0x23e> 80292ce: 4a38 ldr r2, [pc, #224] @ (80293b0 <_printf_float+0x2b8>) 80292d0: 2301 movs r3, #1 80292d2: 4631 mov r1, r6 80292d4: 4628 mov r0, r5 80292d6: 47b8 blx r7 80292d8: 3001 adds r0, #1 80292da: f43f af59 beq.w 8029190 <_printf_float+0x98> 80292de: e9dd 3809 ldrd r3, r8, [sp, #36] @ 0x24 80292e2: 4543 cmp r3, r8 80292e4: db02 blt.n 80292ec <_printf_float+0x1f4> 80292e6: 6823 ldr r3, [r4, #0] 80292e8: 07d8 lsls r0, r3, #31 80292ea: d50f bpl.n 802930c <_printf_float+0x214> 80292ec: 9b05 ldr r3, [sp, #20] 80292ee: 465a mov r2, fp 80292f0: 4631 mov r1, r6 80292f2: 4628 mov r0, r5 80292f4: 47b8 blx r7 80292f6: 3001 adds r0, #1 80292f8: f43f af4a beq.w 8029190 <_printf_float+0x98> 80292fc: f04f 0900 mov.w r9, #0 8029300: f108 38ff add.w r8, r8, #4294967295 @ 0xffffffff 8029304: f104 0a1a add.w sl, r4, #26 8029308: 45c8 cmp r8, r9 802930a: dc09 bgt.n 8029320 <_printf_float+0x228> 802930c: 6823 ldr r3, [r4, #0] 802930e: 079b lsls r3, r3, #30 8029310: f100 8107 bmi.w 8029522 <_printf_float+0x42a> 8029314: 68e0 ldr r0, [r4, #12] 8029316: 9b0b ldr r3, [sp, #44] @ 0x2c 8029318: 4298 cmp r0, r3 802931a: bfb8 it lt 802931c: 4618 movlt r0, r3 802931e: e739 b.n 8029194 <_printf_float+0x9c> 8029320: 2301 movs r3, #1 8029322: 4652 mov r2, sl 8029324: 4631 mov r1, r6 8029326: 4628 mov r0, r5 8029328: 47b8 blx r7 802932a: 3001 adds r0, #1 802932c: f43f af30 beq.w 8029190 <_printf_float+0x98> 8029330: f109 0901 add.w r9, r9, #1 8029334: e7e8 b.n 8029308 <_printf_float+0x210> 8029336: 9b09 ldr r3, [sp, #36] @ 0x24 8029338: 2b00 cmp r3, #0 802933a: dc3b bgt.n 80293b4 <_printf_float+0x2bc> 802933c: 4a1c ldr r2, [pc, #112] @ (80293b0 <_printf_float+0x2b8>) 802933e: 2301 movs r3, #1 8029340: 4631 mov r1, r6 8029342: 4628 mov r0, r5 8029344: 47b8 blx r7 8029346: 3001 adds r0, #1 8029348: f43f af22 beq.w 8029190 <_printf_float+0x98> 802934c: e9dd 3909 ldrd r3, r9, [sp, #36] @ 0x24 8029350: ea59 0303 orrs.w r3, r9, r3 8029354: d102 bne.n 802935c <_printf_float+0x264> 8029356: 6823 ldr r3, [r4, #0] 8029358: 07d9 lsls r1, r3, #31 802935a: d5d7 bpl.n 802930c <_printf_float+0x214> 802935c: 9b05 ldr r3, [sp, #20] 802935e: 465a mov r2, fp 8029360: 4631 mov r1, r6 8029362: 4628 mov r0, r5 8029364: 47b8 blx r7 8029366: 3001 adds r0, #1 8029368: f43f af12 beq.w 8029190 <_printf_float+0x98> 802936c: f04f 0a00 mov.w sl, #0 8029370: f104 0b1a add.w fp, r4, #26 8029374: 9b09 ldr r3, [sp, #36] @ 0x24 8029376: 425b negs r3, r3 8029378: 4553 cmp r3, sl 802937a: dc01 bgt.n 8029380 <_printf_float+0x288> 802937c: 464b mov r3, r9 802937e: e794 b.n 80292aa <_printf_float+0x1b2> 8029380: 2301 movs r3, #1 8029382: 465a mov r2, fp 8029384: 4631 mov r1, r6 8029386: 4628 mov r0, r5 8029388: 47b8 blx r7 802938a: 3001 adds r0, #1 802938c: f43f af00 beq.w 8029190 <_printf_float+0x98> 8029390: f10a 0a01 add.w sl, sl, #1 8029394: e7ee b.n 8029374 <_printf_float+0x27c> 8029396: bf00 nop 8029398: ffffffff .word 0xffffffff 802939c: 7fefffff .word 0x7fefffff 80293a0: 08030de9 .word 0x08030de9 80293a4: 08030ded .word 0x08030ded 80293a8: 08030df1 .word 0x08030df1 80293ac: 08030df5 .word 0x08030df5 80293b0: 08030df9 .word 0x08030df9 80293b4: 6da3 ldr r3, [r4, #88] @ 0x58 80293b6: f8dd a028 ldr.w sl, [sp, #40] @ 0x28 80293ba: 4553 cmp r3, sl 80293bc: bfa8 it ge 80293be: 4653 movge r3, sl 80293c0: 2b00 cmp r3, #0 80293c2: 4699 mov r9, r3 80293c4: dc37 bgt.n 8029436 <_printf_float+0x33e> 80293c6: 2300 movs r3, #0 80293c8: 9307 str r3, [sp, #28] 80293ca: ea29 79e9 bic.w r9, r9, r9, asr #31 80293ce: f104 021a add.w r2, r4, #26 80293d2: 6da3 ldr r3, [r4, #88] @ 0x58 80293d4: 9907 ldr r1, [sp, #28] 80293d6: 9306 str r3, [sp, #24] 80293d8: eba3 0309 sub.w r3, r3, r9 80293dc: 428b cmp r3, r1 80293de: dc31 bgt.n 8029444 <_printf_float+0x34c> 80293e0: 9b09 ldr r3, [sp, #36] @ 0x24 80293e2: 459a cmp sl, r3 80293e4: dc3b bgt.n 802945e <_printf_float+0x366> 80293e6: 6823 ldr r3, [r4, #0] 80293e8: 07da lsls r2, r3, #31 80293ea: d438 bmi.n 802945e <_printf_float+0x366> 80293ec: 9b09 ldr r3, [sp, #36] @ 0x24 80293ee: ebaa 0903 sub.w r9, sl, r3 80293f2: 9b06 ldr r3, [sp, #24] 80293f4: ebaa 0303 sub.w r3, sl, r3 80293f8: 4599 cmp r9, r3 80293fa: bfa8 it ge 80293fc: 4699 movge r9, r3 80293fe: f1b9 0f00 cmp.w r9, #0 8029402: dc34 bgt.n 802946e <_printf_float+0x376> 8029404: f04f 0800 mov.w r8, #0 8029408: ea29 79e9 bic.w r9, r9, r9, asr #31 802940c: f104 0b1a add.w fp, r4, #26 8029410: 9b09 ldr r3, [sp, #36] @ 0x24 8029412: ebaa 0303 sub.w r3, sl, r3 8029416: eba3 0309 sub.w r3, r3, r9 802941a: 4543 cmp r3, r8 802941c: f77f af76 ble.w 802930c <_printf_float+0x214> 8029420: 2301 movs r3, #1 8029422: 465a mov r2, fp 8029424: 4631 mov r1, r6 8029426: 4628 mov r0, r5 8029428: 47b8 blx r7 802942a: 3001 adds r0, #1 802942c: f43f aeb0 beq.w 8029190 <_printf_float+0x98> 8029430: f108 0801 add.w r8, r8, #1 8029434: e7ec b.n 8029410 <_printf_float+0x318> 8029436: 4642 mov r2, r8 8029438: 4631 mov r1, r6 802943a: 4628 mov r0, r5 802943c: 47b8 blx r7 802943e: 3001 adds r0, #1 8029440: d1c1 bne.n 80293c6 <_printf_float+0x2ce> 8029442: e6a5 b.n 8029190 <_printf_float+0x98> 8029444: 2301 movs r3, #1 8029446: 4631 mov r1, r6 8029448: 4628 mov r0, r5 802944a: 9206 str r2, [sp, #24] 802944c: 47b8 blx r7 802944e: 3001 adds r0, #1 8029450: f43f ae9e beq.w 8029190 <_printf_float+0x98> 8029454: 9b07 ldr r3, [sp, #28] 8029456: 9a06 ldr r2, [sp, #24] 8029458: 3301 adds r3, #1 802945a: 9307 str r3, [sp, #28] 802945c: e7b9 b.n 80293d2 <_printf_float+0x2da> 802945e: 9b05 ldr r3, [sp, #20] 8029460: 465a mov r2, fp 8029462: 4631 mov r1, r6 8029464: 4628 mov r0, r5 8029466: 47b8 blx r7 8029468: 3001 adds r0, #1 802946a: d1bf bne.n 80293ec <_printf_float+0x2f4> 802946c: e690 b.n 8029190 <_printf_float+0x98> 802946e: 9a06 ldr r2, [sp, #24] 8029470: 464b mov r3, r9 8029472: 4442 add r2, r8 8029474: 4631 mov r1, r6 8029476: 4628 mov r0, r5 8029478: 47b8 blx r7 802947a: 3001 adds r0, #1 802947c: d1c2 bne.n 8029404 <_printf_float+0x30c> 802947e: e687 b.n 8029190 <_printf_float+0x98> 8029480: f8dd 9028 ldr.w r9, [sp, #40] @ 0x28 8029484: f1b9 0f01 cmp.w r9, #1 8029488: dc01 bgt.n 802948e <_printf_float+0x396> 802948a: 07db lsls r3, r3, #31 802948c: d536 bpl.n 80294fc <_printf_float+0x404> 802948e: 2301 movs r3, #1 8029490: 4642 mov r2, r8 8029492: 4631 mov r1, r6 8029494: 4628 mov r0, r5 8029496: 47b8 blx r7 8029498: 3001 adds r0, #1 802949a: f43f ae79 beq.w 8029190 <_printf_float+0x98> 802949e: 9b05 ldr r3, [sp, #20] 80294a0: 465a mov r2, fp 80294a2: 4631 mov r1, r6 80294a4: 4628 mov r0, r5 80294a6: 47b8 blx r7 80294a8: 3001 adds r0, #1 80294aa: f43f ae71 beq.w 8029190 <_printf_float+0x98> 80294ae: ed94 7b12 vldr d7, [r4, #72] @ 0x48 80294b2: eeb5 7b40 vcmp.f64 d7, #0.0 80294b6: eef1 fa10 vmrs APSR_nzcv, fpscr 80294ba: f109 39ff add.w r9, r9, #4294967295 @ 0xffffffff 80294be: d018 beq.n 80294f2 <_printf_float+0x3fa> 80294c0: 464b mov r3, r9 80294c2: f108 0201 add.w r2, r8, #1 80294c6: 4631 mov r1, r6 80294c8: 4628 mov r0, r5 80294ca: 47b8 blx r7 80294cc: 3001 adds r0, #1 80294ce: d10c bne.n 80294ea <_printf_float+0x3f2> 80294d0: e65e b.n 8029190 <_printf_float+0x98> 80294d2: 2301 movs r3, #1 80294d4: 465a mov r2, fp 80294d6: 4631 mov r1, r6 80294d8: 4628 mov r0, r5 80294da: 47b8 blx r7 80294dc: 3001 adds r0, #1 80294de: f43f ae57 beq.w 8029190 <_printf_float+0x98> 80294e2: f108 0801 add.w r8, r8, #1 80294e6: 45c8 cmp r8, r9 80294e8: dbf3 blt.n 80294d2 <_printf_float+0x3da> 80294ea: 4653 mov r3, sl 80294ec: f104 0250 add.w r2, r4, #80 @ 0x50 80294f0: e6dc b.n 80292ac <_printf_float+0x1b4> 80294f2: f04f 0800 mov.w r8, #0 80294f6: f104 0b1a add.w fp, r4, #26 80294fa: e7f4 b.n 80294e6 <_printf_float+0x3ee> 80294fc: 2301 movs r3, #1 80294fe: 4642 mov r2, r8 8029500: e7e1 b.n 80294c6 <_printf_float+0x3ce> 8029502: 2301 movs r3, #1 8029504: 464a mov r2, r9 8029506: 4631 mov r1, r6 8029508: 4628 mov r0, r5 802950a: 47b8 blx r7 802950c: 3001 adds r0, #1 802950e: f43f ae3f beq.w 8029190 <_printf_float+0x98> 8029512: f108 0801 add.w r8, r8, #1 8029516: 68e3 ldr r3, [r4, #12] 8029518: 990b ldr r1, [sp, #44] @ 0x2c 802951a: 1a5b subs r3, r3, r1 802951c: 4543 cmp r3, r8 802951e: dcf0 bgt.n 8029502 <_printf_float+0x40a> 8029520: e6f8 b.n 8029314 <_printf_float+0x21c> 8029522: f04f 0800 mov.w r8, #0 8029526: f104 0919 add.w r9, r4, #25 802952a: e7f4 b.n 8029516 <_printf_float+0x41e> 0802952c <_printf_common>: 802952c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8029530: 4616 mov r6, r2 8029532: 4698 mov r8, r3 8029534: 688a ldr r2, [r1, #8] 8029536: 690b ldr r3, [r1, #16] 8029538: f8dd 9020 ldr.w r9, [sp, #32] 802953c: 4293 cmp r3, r2 802953e: bfb8 it lt 8029540: 4613 movlt r3, r2 8029542: 6033 str r3, [r6, #0] 8029544: f891 2043 ldrb.w r2, [r1, #67] @ 0x43 8029548: 4607 mov r7, r0 802954a: 460c mov r4, r1 802954c: b10a cbz r2, 8029552 <_printf_common+0x26> 802954e: 3301 adds r3, #1 8029550: 6033 str r3, [r6, #0] 8029552: 6823 ldr r3, [r4, #0] 8029554: 0699 lsls r1, r3, #26 8029556: bf42 ittt mi 8029558: 6833 ldrmi r3, [r6, #0] 802955a: 3302 addmi r3, #2 802955c: 6033 strmi r3, [r6, #0] 802955e: 6825 ldr r5, [r4, #0] 8029560: f015 0506 ands.w r5, r5, #6 8029564: d106 bne.n 8029574 <_printf_common+0x48> 8029566: f104 0a19 add.w sl, r4, #25 802956a: 68e3 ldr r3, [r4, #12] 802956c: 6832 ldr r2, [r6, #0] 802956e: 1a9b subs r3, r3, r2 8029570: 42ab cmp r3, r5 8029572: dc26 bgt.n 80295c2 <_printf_common+0x96> 8029574: f894 3043 ldrb.w r3, [r4, #67] @ 0x43 8029578: 6822 ldr r2, [r4, #0] 802957a: 3b00 subs r3, #0 802957c: bf18 it ne 802957e: 2301 movne r3, #1 8029580: 0692 lsls r2, r2, #26 8029582: d42b bmi.n 80295dc <_printf_common+0xb0> 8029584: f104 0243 add.w r2, r4, #67 @ 0x43 8029588: 4641 mov r1, r8 802958a: 4638 mov r0, r7 802958c: 47c8 blx r9 802958e: 3001 adds r0, #1 8029590: d01e beq.n 80295d0 <_printf_common+0xa4> 8029592: 6823 ldr r3, [r4, #0] 8029594: 6922 ldr r2, [r4, #16] 8029596: f003 0306 and.w r3, r3, #6 802959a: 2b04 cmp r3, #4 802959c: bf02 ittt eq 802959e: 68e5 ldreq r5, [r4, #12] 80295a0: 6833 ldreq r3, [r6, #0] 80295a2: 1aed subeq r5, r5, r3 80295a4: 68a3 ldr r3, [r4, #8] 80295a6: bf0c ite eq 80295a8: ea25 75e5 biceq.w r5, r5, r5, asr #31 80295ac: 2500 movne r5, #0 80295ae: 4293 cmp r3, r2 80295b0: bfc4 itt gt 80295b2: 1a9b subgt r3, r3, r2 80295b4: 18ed addgt r5, r5, r3 80295b6: 2600 movs r6, #0 80295b8: 341a adds r4, #26 80295ba: 42b5 cmp r5, r6 80295bc: d11a bne.n 80295f4 <_printf_common+0xc8> 80295be: 2000 movs r0, #0 80295c0: e008 b.n 80295d4 <_printf_common+0xa8> 80295c2: 2301 movs r3, #1 80295c4: 4652 mov r2, sl 80295c6: 4641 mov r1, r8 80295c8: 4638 mov r0, r7 80295ca: 47c8 blx r9 80295cc: 3001 adds r0, #1 80295ce: d103 bne.n 80295d8 <_printf_common+0xac> 80295d0: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 80295d4: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 80295d8: 3501 adds r5, #1 80295da: e7c6 b.n 802956a <_printf_common+0x3e> 80295dc: 18e1 adds r1, r4, r3 80295de: 1c5a adds r2, r3, #1 80295e0: 2030 movs r0, #48 @ 0x30 80295e2: f881 0043 strb.w r0, [r1, #67] @ 0x43 80295e6: 4422 add r2, r4 80295e8: f894 1045 ldrb.w r1, [r4, #69] @ 0x45 80295ec: f882 1043 strb.w r1, [r2, #67] @ 0x43 80295f0: 3302 adds r3, #2 80295f2: e7c7 b.n 8029584 <_printf_common+0x58> 80295f4: 2301 movs r3, #1 80295f6: 4622 mov r2, r4 80295f8: 4641 mov r1, r8 80295fa: 4638 mov r0, r7 80295fc: 47c8 blx r9 80295fe: 3001 adds r0, #1 8029600: d0e6 beq.n 80295d0 <_printf_common+0xa4> 8029602: 3601 adds r6, #1 8029604: e7d9 b.n 80295ba <_printf_common+0x8e> ... 08029608 <_printf_i>: 8029608: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr} 802960c: 7e0f ldrb r7, [r1, #24] 802960e: 9e0c ldr r6, [sp, #48] @ 0x30 8029610: 2f78 cmp r7, #120 @ 0x78 8029612: 4691 mov r9, r2 8029614: 4680 mov r8, r0 8029616: 460c mov r4, r1 8029618: 469a mov sl, r3 802961a: f101 0243 add.w r2, r1, #67 @ 0x43 802961e: d807 bhi.n 8029630 <_printf_i+0x28> 8029620: 2f62 cmp r7, #98 @ 0x62 8029622: d80a bhi.n 802963a <_printf_i+0x32> 8029624: 2f00 cmp r7, #0 8029626: f000 80d2 beq.w 80297ce <_printf_i+0x1c6> 802962a: 2f58 cmp r7, #88 @ 0x58 802962c: f000 80b9 beq.w 80297a2 <_printf_i+0x19a> 8029630: f104 0642 add.w r6, r4, #66 @ 0x42 8029634: f884 7042 strb.w r7, [r4, #66] @ 0x42 8029638: e03a b.n 80296b0 <_printf_i+0xa8> 802963a: f1a7 0363 sub.w r3, r7, #99 @ 0x63 802963e: 2b15 cmp r3, #21 8029640: d8f6 bhi.n 8029630 <_printf_i+0x28> 8029642: a101 add r1, pc, #4 @ (adr r1, 8029648 <_printf_i+0x40>) 8029644: f851 f023 ldr.w pc, [r1, r3, lsl #2] 8029648: 080296a1 .word 0x080296a1 802964c: 080296b5 .word 0x080296b5 8029650: 08029631 .word 0x08029631 8029654: 08029631 .word 0x08029631 8029658: 08029631 .word 0x08029631 802965c: 08029631 .word 0x08029631 8029660: 080296b5 .word 0x080296b5 8029664: 08029631 .word 0x08029631 8029668: 08029631 .word 0x08029631 802966c: 08029631 .word 0x08029631 8029670: 08029631 .word 0x08029631 8029674: 080297b5 .word 0x080297b5 8029678: 080296df .word 0x080296df 802967c: 0802976f .word 0x0802976f 8029680: 08029631 .word 0x08029631 8029684: 08029631 .word 0x08029631 8029688: 080297d7 .word 0x080297d7 802968c: 08029631 .word 0x08029631 8029690: 080296df .word 0x080296df 8029694: 08029631 .word 0x08029631 8029698: 08029631 .word 0x08029631 802969c: 08029777 .word 0x08029777 80296a0: 6833 ldr r3, [r6, #0] 80296a2: 1d1a adds r2, r3, #4 80296a4: 681b ldr r3, [r3, #0] 80296a6: 6032 str r2, [r6, #0] 80296a8: f104 0642 add.w r6, r4, #66 @ 0x42 80296ac: f884 3042 strb.w r3, [r4, #66] @ 0x42 80296b0: 2301 movs r3, #1 80296b2: e09d b.n 80297f0 <_printf_i+0x1e8> 80296b4: 6833 ldr r3, [r6, #0] 80296b6: 6820 ldr r0, [r4, #0] 80296b8: 1d19 adds r1, r3, #4 80296ba: 6031 str r1, [r6, #0] 80296bc: 0606 lsls r6, r0, #24 80296be: d501 bpl.n 80296c4 <_printf_i+0xbc> 80296c0: 681d ldr r5, [r3, #0] 80296c2: e003 b.n 80296cc <_printf_i+0xc4> 80296c4: 0645 lsls r5, r0, #25 80296c6: d5fb bpl.n 80296c0 <_printf_i+0xb8> 80296c8: f9b3 5000 ldrsh.w r5, [r3] 80296cc: 2d00 cmp r5, #0 80296ce: da03 bge.n 80296d8 <_printf_i+0xd0> 80296d0: 232d movs r3, #45 @ 0x2d 80296d2: 426d negs r5, r5 80296d4: f884 3043 strb.w r3, [r4, #67] @ 0x43 80296d8: 4859 ldr r0, [pc, #356] @ (8029840 <_printf_i+0x238>) 80296da: 230a movs r3, #10 80296dc: e011 b.n 8029702 <_printf_i+0xfa> 80296de: 6821 ldr r1, [r4, #0] 80296e0: 6833 ldr r3, [r6, #0] 80296e2: 0608 lsls r0, r1, #24 80296e4: f853 5b04 ldr.w r5, [r3], #4 80296e8: d402 bmi.n 80296f0 <_printf_i+0xe8> 80296ea: 0649 lsls r1, r1, #25 80296ec: bf48 it mi 80296ee: b2ad uxthmi r5, r5 80296f0: 2f6f cmp r7, #111 @ 0x6f 80296f2: 4853 ldr r0, [pc, #332] @ (8029840 <_printf_i+0x238>) 80296f4: 6033 str r3, [r6, #0] 80296f6: bf14 ite ne 80296f8: 230a movne r3, #10 80296fa: 2308 moveq r3, #8 80296fc: 2100 movs r1, #0 80296fe: f884 1043 strb.w r1, [r4, #67] @ 0x43 8029702: 6866 ldr r6, [r4, #4] 8029704: 60a6 str r6, [r4, #8] 8029706: 2e00 cmp r6, #0 8029708: bfa2 ittt ge 802970a: 6821 ldrge r1, [r4, #0] 802970c: f021 0104 bicge.w r1, r1, #4 8029710: 6021 strge r1, [r4, #0] 8029712: b90d cbnz r5, 8029718 <_printf_i+0x110> 8029714: 2e00 cmp r6, #0 8029716: d04b beq.n 80297b0 <_printf_i+0x1a8> 8029718: 4616 mov r6, r2 802971a: fbb5 f1f3 udiv r1, r5, r3 802971e: fb03 5711 mls r7, r3, r1, r5 8029722: 5dc7 ldrb r7, [r0, r7] 8029724: f806 7d01 strb.w r7, [r6, #-1]! 8029728: 462f mov r7, r5 802972a: 42bb cmp r3, r7 802972c: 460d mov r5, r1 802972e: d9f4 bls.n 802971a <_printf_i+0x112> 8029730: 2b08 cmp r3, #8 8029732: d10b bne.n 802974c <_printf_i+0x144> 8029734: 6823 ldr r3, [r4, #0] 8029736: 07df lsls r7, r3, #31 8029738: d508 bpl.n 802974c <_printf_i+0x144> 802973a: 6923 ldr r3, [r4, #16] 802973c: 6861 ldr r1, [r4, #4] 802973e: 4299 cmp r1, r3 8029740: bfde ittt le 8029742: 2330 movle r3, #48 @ 0x30 8029744: f806 3c01 strble.w r3, [r6, #-1] 8029748: f106 36ff addle.w r6, r6, #4294967295 @ 0xffffffff 802974c: 1b92 subs r2, r2, r6 802974e: 6122 str r2, [r4, #16] 8029750: f8cd a000 str.w sl, [sp] 8029754: 464b mov r3, r9 8029756: aa03 add r2, sp, #12 8029758: 4621 mov r1, r4 802975a: 4640 mov r0, r8 802975c: f7ff fee6 bl 802952c <_printf_common> 8029760: 3001 adds r0, #1 8029762: d14a bne.n 80297fa <_printf_i+0x1f2> 8029764: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8029768: b004 add sp, #16 802976a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802976e: 6823 ldr r3, [r4, #0] 8029770: f043 0320 orr.w r3, r3, #32 8029774: 6023 str r3, [r4, #0] 8029776: 4833 ldr r0, [pc, #204] @ (8029844 <_printf_i+0x23c>) 8029778: 2778 movs r7, #120 @ 0x78 802977a: f884 7045 strb.w r7, [r4, #69] @ 0x45 802977e: 6823 ldr r3, [r4, #0] 8029780: 6831 ldr r1, [r6, #0] 8029782: 061f lsls r7, r3, #24 8029784: f851 5b04 ldr.w r5, [r1], #4 8029788: d402 bmi.n 8029790 <_printf_i+0x188> 802978a: 065f lsls r7, r3, #25 802978c: bf48 it mi 802978e: b2ad uxthmi r5, r5 8029790: 6031 str r1, [r6, #0] 8029792: 07d9 lsls r1, r3, #31 8029794: bf44 itt mi 8029796: f043 0320 orrmi.w r3, r3, #32 802979a: 6023 strmi r3, [r4, #0] 802979c: b11d cbz r5, 80297a6 <_printf_i+0x19e> 802979e: 2310 movs r3, #16 80297a0: e7ac b.n 80296fc <_printf_i+0xf4> 80297a2: 4827 ldr r0, [pc, #156] @ (8029840 <_printf_i+0x238>) 80297a4: e7e9 b.n 802977a <_printf_i+0x172> 80297a6: 6823 ldr r3, [r4, #0] 80297a8: f023 0320 bic.w r3, r3, #32 80297ac: 6023 str r3, [r4, #0] 80297ae: e7f6 b.n 802979e <_printf_i+0x196> 80297b0: 4616 mov r6, r2 80297b2: e7bd b.n 8029730 <_printf_i+0x128> 80297b4: 6833 ldr r3, [r6, #0] 80297b6: 6825 ldr r5, [r4, #0] 80297b8: 6961 ldr r1, [r4, #20] 80297ba: 1d18 adds r0, r3, #4 80297bc: 6030 str r0, [r6, #0] 80297be: 062e lsls r6, r5, #24 80297c0: 681b ldr r3, [r3, #0] 80297c2: d501 bpl.n 80297c8 <_printf_i+0x1c0> 80297c4: 6019 str r1, [r3, #0] 80297c6: e002 b.n 80297ce <_printf_i+0x1c6> 80297c8: 0668 lsls r0, r5, #25 80297ca: d5fb bpl.n 80297c4 <_printf_i+0x1bc> 80297cc: 8019 strh r1, [r3, #0] 80297ce: 2300 movs r3, #0 80297d0: 6123 str r3, [r4, #16] 80297d2: 4616 mov r6, r2 80297d4: e7bc b.n 8029750 <_printf_i+0x148> 80297d6: 6833 ldr r3, [r6, #0] 80297d8: 1d1a adds r2, r3, #4 80297da: 6032 str r2, [r6, #0] 80297dc: 681e ldr r6, [r3, #0] 80297de: 6862 ldr r2, [r4, #4] 80297e0: 2100 movs r1, #0 80297e2: 4630 mov r0, r6 80297e4: f7d6 fd8c bl 8000300 80297e8: b108 cbz r0, 80297ee <_printf_i+0x1e6> 80297ea: 1b80 subs r0, r0, r6 80297ec: 6060 str r0, [r4, #4] 80297ee: 6863 ldr r3, [r4, #4] 80297f0: 6123 str r3, [r4, #16] 80297f2: 2300 movs r3, #0 80297f4: f884 3043 strb.w r3, [r4, #67] @ 0x43 80297f8: e7aa b.n 8029750 <_printf_i+0x148> 80297fa: 6923 ldr r3, [r4, #16] 80297fc: 4632 mov r2, r6 80297fe: 4649 mov r1, r9 8029800: 4640 mov r0, r8 8029802: 47d0 blx sl 8029804: 3001 adds r0, #1 8029806: d0ad beq.n 8029764 <_printf_i+0x15c> 8029808: 6823 ldr r3, [r4, #0] 802980a: 079b lsls r3, r3, #30 802980c: d413 bmi.n 8029836 <_printf_i+0x22e> 802980e: 68e0 ldr r0, [r4, #12] 8029810: 9b03 ldr r3, [sp, #12] 8029812: 4298 cmp r0, r3 8029814: bfb8 it lt 8029816: 4618 movlt r0, r3 8029818: e7a6 b.n 8029768 <_printf_i+0x160> 802981a: 2301 movs r3, #1 802981c: 4632 mov r2, r6 802981e: 4649 mov r1, r9 8029820: 4640 mov r0, r8 8029822: 47d0 blx sl 8029824: 3001 adds r0, #1 8029826: d09d beq.n 8029764 <_printf_i+0x15c> 8029828: 3501 adds r5, #1 802982a: 68e3 ldr r3, [r4, #12] 802982c: 9903 ldr r1, [sp, #12] 802982e: 1a5b subs r3, r3, r1 8029830: 42ab cmp r3, r5 8029832: dcf2 bgt.n 802981a <_printf_i+0x212> 8029834: e7eb b.n 802980e <_printf_i+0x206> 8029836: 2500 movs r5, #0 8029838: f104 0619 add.w r6, r4, #25 802983c: e7f5 b.n 802982a <_printf_i+0x222> 802983e: bf00 nop 8029840: 08030dfb .word 0x08030dfb 8029844: 08030e0c .word 0x08030e0c 08029848 : 8029848: 2300 movs r3, #0 802984a: b510 push {r4, lr} 802984c: 4604 mov r4, r0 802984e: e9c0 3300 strd r3, r3, [r0] 8029852: e9c0 3304 strd r3, r3, [r0, #16] 8029856: 6083 str r3, [r0, #8] 8029858: 8181 strh r1, [r0, #12] 802985a: 6643 str r3, [r0, #100] @ 0x64 802985c: 81c2 strh r2, [r0, #14] 802985e: 6183 str r3, [r0, #24] 8029860: 4619 mov r1, r3 8029862: 2208 movs r2, #8 8029864: 305c adds r0, #92 @ 0x5c 8029866: f000 fa43 bl 8029cf0 802986a: 4b0d ldr r3, [pc, #52] @ (80298a0 ) 802986c: 6263 str r3, [r4, #36] @ 0x24 802986e: 4b0d ldr r3, [pc, #52] @ (80298a4 ) 8029870: 62a3 str r3, [r4, #40] @ 0x28 8029872: 4b0d ldr r3, [pc, #52] @ (80298a8 ) 8029874: 62e3 str r3, [r4, #44] @ 0x2c 8029876: 4b0d ldr r3, [pc, #52] @ (80298ac ) 8029878: 6323 str r3, [r4, #48] @ 0x30 802987a: 4b0d ldr r3, [pc, #52] @ (80298b0 ) 802987c: 6224 str r4, [r4, #32] 802987e: 429c cmp r4, r3 8029880: d006 beq.n 8029890 8029882: f103 0268 add.w r2, r3, #104 @ 0x68 8029886: 4294 cmp r4, r2 8029888: d002 beq.n 8029890 802988a: 33d0 adds r3, #208 @ 0xd0 802988c: 429c cmp r4, r3 802988e: d105 bne.n 802989c 8029890: f104 0058 add.w r0, r4, #88 @ 0x58 8029894: e8bd 4010 ldmia.w sp!, {r4, lr} 8029898: f000 bb1e b.w 8029ed8 <__retarget_lock_init_recursive> 802989c: bd10 pop {r4, pc} 802989e: bf00 nop 80298a0: 08029aed .word 0x08029aed 80298a4: 08029b0f .word 0x08029b0f 80298a8: 08029b47 .word 0x08029b47 80298ac: 08029b6b .word 0x08029b6b 80298b0: 2402b044 .word 0x2402b044 080298b4 : 80298b4: 4a02 ldr r2, [pc, #8] @ (80298c0 ) 80298b6: 4903 ldr r1, [pc, #12] @ (80298c4 ) 80298b8: 4803 ldr r0, [pc, #12] @ (80298c8 ) 80298ba: f000 b869 b.w 8029990 <_fwalk_sglue> 80298be: bf00 nop 80298c0: 2400005c .word 0x2400005c 80298c4: 0802c1fd .word 0x0802c1fd 80298c8: 240001d8 .word 0x240001d8 080298cc : 80298cc: 6841 ldr r1, [r0, #4] 80298ce: 4b0c ldr r3, [pc, #48] @ (8029900 ) 80298d0: 4299 cmp r1, r3 80298d2: b510 push {r4, lr} 80298d4: 4604 mov r4, r0 80298d6: d001 beq.n 80298dc 80298d8: f002 fc90 bl 802c1fc <_fflush_r> 80298dc: 68a1 ldr r1, [r4, #8] 80298de: 4b09 ldr r3, [pc, #36] @ (8029904 ) 80298e0: 4299 cmp r1, r3 80298e2: d002 beq.n 80298ea 80298e4: 4620 mov r0, r4 80298e6: f002 fc89 bl 802c1fc <_fflush_r> 80298ea: 68e1 ldr r1, [r4, #12] 80298ec: 4b06 ldr r3, [pc, #24] @ (8029908 ) 80298ee: 4299 cmp r1, r3 80298f0: d004 beq.n 80298fc 80298f2: 4620 mov r0, r4 80298f4: e8bd 4010 ldmia.w sp!, {r4, lr} 80298f8: f002 bc80 b.w 802c1fc <_fflush_r> 80298fc: bd10 pop {r4, pc} 80298fe: bf00 nop 8029900: 2402b044 .word 0x2402b044 8029904: 2402b0ac .word 0x2402b0ac 8029908: 2402b114 .word 0x2402b114 0802990c : 802990c: b510 push {r4, lr} 802990e: 4b0b ldr r3, [pc, #44] @ (802993c ) 8029910: 4c0b ldr r4, [pc, #44] @ (8029940 ) 8029912: 4a0c ldr r2, [pc, #48] @ (8029944 ) 8029914: 601a str r2, [r3, #0] 8029916: 4620 mov r0, r4 8029918: 2200 movs r2, #0 802991a: 2104 movs r1, #4 802991c: f7ff ff94 bl 8029848 8029920: f104 0068 add.w r0, r4, #104 @ 0x68 8029924: 2201 movs r2, #1 8029926: 2109 movs r1, #9 8029928: f7ff ff8e bl 8029848 802992c: f104 00d0 add.w r0, r4, #208 @ 0xd0 8029930: 2202 movs r2, #2 8029932: e8bd 4010 ldmia.w sp!, {r4, lr} 8029936: 2112 movs r1, #18 8029938: f7ff bf86 b.w 8029848 802993c: 2402b17c .word 0x2402b17c 8029940: 2402b044 .word 0x2402b044 8029944: 080298b5 .word 0x080298b5 08029948 <__sfp_lock_acquire>: 8029948: 4801 ldr r0, [pc, #4] @ (8029950 <__sfp_lock_acquire+0x8>) 802994a: f000 bac6 b.w 8029eda <__retarget_lock_acquire_recursive> 802994e: bf00 nop 8029950: 2402b185 .word 0x2402b185 08029954 <__sfp_lock_release>: 8029954: 4801 ldr r0, [pc, #4] @ (802995c <__sfp_lock_release+0x8>) 8029956: f000 bac1 b.w 8029edc <__retarget_lock_release_recursive> 802995a: bf00 nop 802995c: 2402b185 .word 0x2402b185 08029960 <__sinit>: 8029960: b510 push {r4, lr} 8029962: 4604 mov r4, r0 8029964: f7ff fff0 bl 8029948 <__sfp_lock_acquire> 8029968: 6a23 ldr r3, [r4, #32] 802996a: b11b cbz r3, 8029974 <__sinit+0x14> 802996c: e8bd 4010 ldmia.w sp!, {r4, lr} 8029970: f7ff bff0 b.w 8029954 <__sfp_lock_release> 8029974: 4b04 ldr r3, [pc, #16] @ (8029988 <__sinit+0x28>) 8029976: 6223 str r3, [r4, #32] 8029978: 4b04 ldr r3, [pc, #16] @ (802998c <__sinit+0x2c>) 802997a: 681b ldr r3, [r3, #0] 802997c: 2b00 cmp r3, #0 802997e: d1f5 bne.n 802996c <__sinit+0xc> 8029980: f7ff ffc4 bl 802990c 8029984: e7f2 b.n 802996c <__sinit+0xc> 8029986: bf00 nop 8029988: 080298cd .word 0x080298cd 802998c: 2402b17c .word 0x2402b17c 08029990 <_fwalk_sglue>: 8029990: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8029994: 4607 mov r7, r0 8029996: 4688 mov r8, r1 8029998: 4614 mov r4, r2 802999a: 2600 movs r6, #0 802999c: e9d4 9501 ldrd r9, r5, [r4, #4] 80299a0: f1b9 0901 subs.w r9, r9, #1 80299a4: d505 bpl.n 80299b2 <_fwalk_sglue+0x22> 80299a6: 6824 ldr r4, [r4, #0] 80299a8: 2c00 cmp r4, #0 80299aa: d1f7 bne.n 802999c <_fwalk_sglue+0xc> 80299ac: 4630 mov r0, r6 80299ae: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 80299b2: 89ab ldrh r3, [r5, #12] 80299b4: 2b01 cmp r3, #1 80299b6: d907 bls.n 80299c8 <_fwalk_sglue+0x38> 80299b8: f9b5 300e ldrsh.w r3, [r5, #14] 80299bc: 3301 adds r3, #1 80299be: d003 beq.n 80299c8 <_fwalk_sglue+0x38> 80299c0: 4629 mov r1, r5 80299c2: 4638 mov r0, r7 80299c4: 47c0 blx r8 80299c6: 4306 orrs r6, r0 80299c8: 3568 adds r5, #104 @ 0x68 80299ca: e7e9 b.n 80299a0 <_fwalk_sglue+0x10> 080299cc : 80299cc: b40f push {r0, r1, r2, r3} 80299ce: b507 push {r0, r1, r2, lr} 80299d0: 4906 ldr r1, [pc, #24] @ (80299ec ) 80299d2: ab04 add r3, sp, #16 80299d4: 6808 ldr r0, [r1, #0] 80299d6: f853 2b04 ldr.w r2, [r3], #4 80299da: 6881 ldr r1, [r0, #8] 80299dc: 9301 str r3, [sp, #4] 80299de: f002 fa71 bl 802bec4 <_vfiprintf_r> 80299e2: b003 add sp, #12 80299e4: f85d eb04 ldr.w lr, [sp], #4 80299e8: b004 add sp, #16 80299ea: 4770 bx lr 80299ec: 240001d4 .word 0x240001d4 080299f0 <_puts_r>: 80299f0: 6a03 ldr r3, [r0, #32] 80299f2: b570 push {r4, r5, r6, lr} 80299f4: 6884 ldr r4, [r0, #8] 80299f6: 4605 mov r5, r0 80299f8: 460e mov r6, r1 80299fa: b90b cbnz r3, 8029a00 <_puts_r+0x10> 80299fc: f7ff ffb0 bl 8029960 <__sinit> 8029a00: 6e63 ldr r3, [r4, #100] @ 0x64 8029a02: 07db lsls r3, r3, #31 8029a04: d405 bmi.n 8029a12 <_puts_r+0x22> 8029a06: 89a3 ldrh r3, [r4, #12] 8029a08: 0598 lsls r0, r3, #22 8029a0a: d402 bmi.n 8029a12 <_puts_r+0x22> 8029a0c: 6da0 ldr r0, [r4, #88] @ 0x58 8029a0e: f000 fa64 bl 8029eda <__retarget_lock_acquire_recursive> 8029a12: 89a3 ldrh r3, [r4, #12] 8029a14: 0719 lsls r1, r3, #28 8029a16: d502 bpl.n 8029a1e <_puts_r+0x2e> 8029a18: 6923 ldr r3, [r4, #16] 8029a1a: 2b00 cmp r3, #0 8029a1c: d135 bne.n 8029a8a <_puts_r+0x9a> 8029a1e: 4621 mov r1, r4 8029a20: 4628 mov r0, r5 8029a22: f000 f8e5 bl 8029bf0 <__swsetup_r> 8029a26: b380 cbz r0, 8029a8a <_puts_r+0x9a> 8029a28: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 8029a2c: 6e63 ldr r3, [r4, #100] @ 0x64 8029a2e: 07da lsls r2, r3, #31 8029a30: d405 bmi.n 8029a3e <_puts_r+0x4e> 8029a32: 89a3 ldrh r3, [r4, #12] 8029a34: 059b lsls r3, r3, #22 8029a36: d402 bmi.n 8029a3e <_puts_r+0x4e> 8029a38: 6da0 ldr r0, [r4, #88] @ 0x58 8029a3a: f000 fa4f bl 8029edc <__retarget_lock_release_recursive> 8029a3e: 4628 mov r0, r5 8029a40: bd70 pop {r4, r5, r6, pc} 8029a42: 2b00 cmp r3, #0 8029a44: da04 bge.n 8029a50 <_puts_r+0x60> 8029a46: 69a2 ldr r2, [r4, #24] 8029a48: 429a cmp r2, r3 8029a4a: dc17 bgt.n 8029a7c <_puts_r+0x8c> 8029a4c: 290a cmp r1, #10 8029a4e: d015 beq.n 8029a7c <_puts_r+0x8c> 8029a50: 6823 ldr r3, [r4, #0] 8029a52: 1c5a adds r2, r3, #1 8029a54: 6022 str r2, [r4, #0] 8029a56: 7019 strb r1, [r3, #0] 8029a58: 68a3 ldr r3, [r4, #8] 8029a5a: f816 1f01 ldrb.w r1, [r6, #1]! 8029a5e: 3b01 subs r3, #1 8029a60: 60a3 str r3, [r4, #8] 8029a62: 2900 cmp r1, #0 8029a64: d1ed bne.n 8029a42 <_puts_r+0x52> 8029a66: 2b00 cmp r3, #0 8029a68: da11 bge.n 8029a8e <_puts_r+0x9e> 8029a6a: 4622 mov r2, r4 8029a6c: 210a movs r1, #10 8029a6e: 4628 mov r0, r5 8029a70: f000 f87f bl 8029b72 <__swbuf_r> 8029a74: 3001 adds r0, #1 8029a76: d0d7 beq.n 8029a28 <_puts_r+0x38> 8029a78: 250a movs r5, #10 8029a7a: e7d7 b.n 8029a2c <_puts_r+0x3c> 8029a7c: 4622 mov r2, r4 8029a7e: 4628 mov r0, r5 8029a80: f000 f877 bl 8029b72 <__swbuf_r> 8029a84: 3001 adds r0, #1 8029a86: d1e7 bne.n 8029a58 <_puts_r+0x68> 8029a88: e7ce b.n 8029a28 <_puts_r+0x38> 8029a8a: 3e01 subs r6, #1 8029a8c: e7e4 b.n 8029a58 <_puts_r+0x68> 8029a8e: 6823 ldr r3, [r4, #0] 8029a90: 1c5a adds r2, r3, #1 8029a92: 6022 str r2, [r4, #0] 8029a94: 220a movs r2, #10 8029a96: 701a strb r2, [r3, #0] 8029a98: e7ee b.n 8029a78 <_puts_r+0x88> ... 08029a9c : 8029a9c: 4b02 ldr r3, [pc, #8] @ (8029aa8 ) 8029a9e: 4601 mov r1, r0 8029aa0: 6818 ldr r0, [r3, #0] 8029aa2: f7ff bfa5 b.w 80299f0 <_puts_r> 8029aa6: bf00 nop 8029aa8: 240001d4 .word 0x240001d4 08029aac : 8029aac: b40e push {r1, r2, r3} 8029aae: b500 push {lr} 8029ab0: b09c sub sp, #112 @ 0x70 8029ab2: ab1d add r3, sp, #116 @ 0x74 8029ab4: 9002 str r0, [sp, #8] 8029ab6: 9006 str r0, [sp, #24] 8029ab8: f06f 4100 mvn.w r1, #2147483648 @ 0x80000000 8029abc: 4809 ldr r0, [pc, #36] @ (8029ae4 ) 8029abe: 9107 str r1, [sp, #28] 8029ac0: 9104 str r1, [sp, #16] 8029ac2: 4909 ldr r1, [pc, #36] @ (8029ae8 ) 8029ac4: f853 2b04 ldr.w r2, [r3], #4 8029ac8: 9105 str r1, [sp, #20] 8029aca: 6800 ldr r0, [r0, #0] 8029acc: 9301 str r3, [sp, #4] 8029ace: a902 add r1, sp, #8 8029ad0: f002 f8d2 bl 802bc78 <_svfiprintf_r> 8029ad4: 9b02 ldr r3, [sp, #8] 8029ad6: 2200 movs r2, #0 8029ad8: 701a strb r2, [r3, #0] 8029ada: b01c add sp, #112 @ 0x70 8029adc: f85d eb04 ldr.w lr, [sp], #4 8029ae0: b003 add sp, #12 8029ae2: 4770 bx lr 8029ae4: 240001d4 .word 0x240001d4 8029ae8: ffff0208 .word 0xffff0208 08029aec <__sread>: 8029aec: b510 push {r4, lr} 8029aee: 460c mov r4, r1 8029af0: f9b1 100e ldrsh.w r1, [r1, #14] 8029af4: f000 f992 bl 8029e1c <_read_r> 8029af8: 2800 cmp r0, #0 8029afa: bfab itete ge 8029afc: 6d63 ldrge r3, [r4, #84] @ 0x54 8029afe: 89a3 ldrhlt r3, [r4, #12] 8029b00: 181b addge r3, r3, r0 8029b02: f423 5380 biclt.w r3, r3, #4096 @ 0x1000 8029b06: bfac ite ge 8029b08: 6563 strge r3, [r4, #84] @ 0x54 8029b0a: 81a3 strhlt r3, [r4, #12] 8029b0c: bd10 pop {r4, pc} 08029b0e <__swrite>: 8029b0e: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8029b12: 461f mov r7, r3 8029b14: 898b ldrh r3, [r1, #12] 8029b16: 05db lsls r3, r3, #23 8029b18: 4605 mov r5, r0 8029b1a: 460c mov r4, r1 8029b1c: 4616 mov r6, r2 8029b1e: d505 bpl.n 8029b2c <__swrite+0x1e> 8029b20: f9b1 100e ldrsh.w r1, [r1, #14] 8029b24: 2302 movs r3, #2 8029b26: 2200 movs r2, #0 8029b28: f000 f966 bl 8029df8 <_lseek_r> 8029b2c: 89a3 ldrh r3, [r4, #12] 8029b2e: f9b4 100e ldrsh.w r1, [r4, #14] 8029b32: f423 5380 bic.w r3, r3, #4096 @ 0x1000 8029b36: 81a3 strh r3, [r4, #12] 8029b38: 4632 mov r2, r6 8029b3a: 463b mov r3, r7 8029b3c: 4628 mov r0, r5 8029b3e: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} 8029b42: f000 b98d b.w 8029e60 <_write_r> 08029b46 <__sseek>: 8029b46: b510 push {r4, lr} 8029b48: 460c mov r4, r1 8029b4a: f9b1 100e ldrsh.w r1, [r1, #14] 8029b4e: f000 f953 bl 8029df8 <_lseek_r> 8029b52: 1c43 adds r3, r0, #1 8029b54: 89a3 ldrh r3, [r4, #12] 8029b56: bf15 itete ne 8029b58: 6560 strne r0, [r4, #84] @ 0x54 8029b5a: f423 5380 biceq.w r3, r3, #4096 @ 0x1000 8029b5e: f443 5380 orrne.w r3, r3, #4096 @ 0x1000 8029b62: 81a3 strheq r3, [r4, #12] 8029b64: bf18 it ne 8029b66: 81a3 strhne r3, [r4, #12] 8029b68: bd10 pop {r4, pc} 08029b6a <__sclose>: 8029b6a: f9b1 100e ldrsh.w r1, [r1, #14] 8029b6e: f000 b8dd b.w 8029d2c <_close_r> 08029b72 <__swbuf_r>: 8029b72: b5f8 push {r3, r4, r5, r6, r7, lr} 8029b74: 460e mov r6, r1 8029b76: 4614 mov r4, r2 8029b78: 4605 mov r5, r0 8029b7a: b118 cbz r0, 8029b84 <__swbuf_r+0x12> 8029b7c: 6a03 ldr r3, [r0, #32] 8029b7e: b90b cbnz r3, 8029b84 <__swbuf_r+0x12> 8029b80: f7ff feee bl 8029960 <__sinit> 8029b84: 69a3 ldr r3, [r4, #24] 8029b86: 60a3 str r3, [r4, #8] 8029b88: 89a3 ldrh r3, [r4, #12] 8029b8a: 071a lsls r2, r3, #28 8029b8c: d501 bpl.n 8029b92 <__swbuf_r+0x20> 8029b8e: 6923 ldr r3, [r4, #16] 8029b90: b943 cbnz r3, 8029ba4 <__swbuf_r+0x32> 8029b92: 4621 mov r1, r4 8029b94: 4628 mov r0, r5 8029b96: f000 f82b bl 8029bf0 <__swsetup_r> 8029b9a: b118 cbz r0, 8029ba4 <__swbuf_r+0x32> 8029b9c: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff 8029ba0: 4638 mov r0, r7 8029ba2: bdf8 pop {r3, r4, r5, r6, r7, pc} 8029ba4: 6823 ldr r3, [r4, #0] 8029ba6: 6922 ldr r2, [r4, #16] 8029ba8: 1a98 subs r0, r3, r2 8029baa: 6963 ldr r3, [r4, #20] 8029bac: b2f6 uxtb r6, r6 8029bae: 4283 cmp r3, r0 8029bb0: 4637 mov r7, r6 8029bb2: dc05 bgt.n 8029bc0 <__swbuf_r+0x4e> 8029bb4: 4621 mov r1, r4 8029bb6: 4628 mov r0, r5 8029bb8: f002 fb20 bl 802c1fc <_fflush_r> 8029bbc: 2800 cmp r0, #0 8029bbe: d1ed bne.n 8029b9c <__swbuf_r+0x2a> 8029bc0: 68a3 ldr r3, [r4, #8] 8029bc2: 3b01 subs r3, #1 8029bc4: 60a3 str r3, [r4, #8] 8029bc6: 6823 ldr r3, [r4, #0] 8029bc8: 1c5a adds r2, r3, #1 8029bca: 6022 str r2, [r4, #0] 8029bcc: 701e strb r6, [r3, #0] 8029bce: 6962 ldr r2, [r4, #20] 8029bd0: 1c43 adds r3, r0, #1 8029bd2: 429a cmp r2, r3 8029bd4: d004 beq.n 8029be0 <__swbuf_r+0x6e> 8029bd6: 89a3 ldrh r3, [r4, #12] 8029bd8: 07db lsls r3, r3, #31 8029bda: d5e1 bpl.n 8029ba0 <__swbuf_r+0x2e> 8029bdc: 2e0a cmp r6, #10 8029bde: d1df bne.n 8029ba0 <__swbuf_r+0x2e> 8029be0: 4621 mov r1, r4 8029be2: 4628 mov r0, r5 8029be4: f002 fb0a bl 802c1fc <_fflush_r> 8029be8: 2800 cmp r0, #0 8029bea: d0d9 beq.n 8029ba0 <__swbuf_r+0x2e> 8029bec: e7d6 b.n 8029b9c <__swbuf_r+0x2a> ... 08029bf0 <__swsetup_r>: 8029bf0: b538 push {r3, r4, r5, lr} 8029bf2: 4b29 ldr r3, [pc, #164] @ (8029c98 <__swsetup_r+0xa8>) 8029bf4: 4605 mov r5, r0 8029bf6: 6818 ldr r0, [r3, #0] 8029bf8: 460c mov r4, r1 8029bfa: b118 cbz r0, 8029c04 <__swsetup_r+0x14> 8029bfc: 6a03 ldr r3, [r0, #32] 8029bfe: b90b cbnz r3, 8029c04 <__swsetup_r+0x14> 8029c00: f7ff feae bl 8029960 <__sinit> 8029c04: f9b4 300c ldrsh.w r3, [r4, #12] 8029c08: 0719 lsls r1, r3, #28 8029c0a: d422 bmi.n 8029c52 <__swsetup_r+0x62> 8029c0c: 06da lsls r2, r3, #27 8029c0e: d407 bmi.n 8029c20 <__swsetup_r+0x30> 8029c10: 2209 movs r2, #9 8029c12: 602a str r2, [r5, #0] 8029c14: f043 0340 orr.w r3, r3, #64 @ 0x40 8029c18: 81a3 strh r3, [r4, #12] 8029c1a: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8029c1e: e033 b.n 8029c88 <__swsetup_r+0x98> 8029c20: 0758 lsls r0, r3, #29 8029c22: d512 bpl.n 8029c4a <__swsetup_r+0x5a> 8029c24: 6b61 ldr r1, [r4, #52] @ 0x34 8029c26: b141 cbz r1, 8029c3a <__swsetup_r+0x4a> 8029c28: f104 0344 add.w r3, r4, #68 @ 0x44 8029c2c: 4299 cmp r1, r3 8029c2e: d002 beq.n 8029c36 <__swsetup_r+0x46> 8029c30: 4628 mov r0, r5 8029c32: f000 ff6b bl 802ab0c <_free_r> 8029c36: 2300 movs r3, #0 8029c38: 6363 str r3, [r4, #52] @ 0x34 8029c3a: 89a3 ldrh r3, [r4, #12] 8029c3c: f023 0324 bic.w r3, r3, #36 @ 0x24 8029c40: 81a3 strh r3, [r4, #12] 8029c42: 2300 movs r3, #0 8029c44: 6063 str r3, [r4, #4] 8029c46: 6923 ldr r3, [r4, #16] 8029c48: 6023 str r3, [r4, #0] 8029c4a: 89a3 ldrh r3, [r4, #12] 8029c4c: f043 0308 orr.w r3, r3, #8 8029c50: 81a3 strh r3, [r4, #12] 8029c52: 6923 ldr r3, [r4, #16] 8029c54: b94b cbnz r3, 8029c6a <__swsetup_r+0x7a> 8029c56: 89a3 ldrh r3, [r4, #12] 8029c58: f403 7320 and.w r3, r3, #640 @ 0x280 8029c5c: f5b3 7f00 cmp.w r3, #512 @ 0x200 8029c60: d003 beq.n 8029c6a <__swsetup_r+0x7a> 8029c62: 4621 mov r1, r4 8029c64: 4628 mov r0, r5 8029c66: f002 fb29 bl 802c2bc <__smakebuf_r> 8029c6a: f9b4 300c ldrsh.w r3, [r4, #12] 8029c6e: f013 0201 ands.w r2, r3, #1 8029c72: d00a beq.n 8029c8a <__swsetup_r+0x9a> 8029c74: 2200 movs r2, #0 8029c76: 60a2 str r2, [r4, #8] 8029c78: 6962 ldr r2, [r4, #20] 8029c7a: 4252 negs r2, r2 8029c7c: 61a2 str r2, [r4, #24] 8029c7e: 6922 ldr r2, [r4, #16] 8029c80: b942 cbnz r2, 8029c94 <__swsetup_r+0xa4> 8029c82: f013 0080 ands.w r0, r3, #128 @ 0x80 8029c86: d1c5 bne.n 8029c14 <__swsetup_r+0x24> 8029c88: bd38 pop {r3, r4, r5, pc} 8029c8a: 0799 lsls r1, r3, #30 8029c8c: bf58 it pl 8029c8e: 6962 ldrpl r2, [r4, #20] 8029c90: 60a2 str r2, [r4, #8] 8029c92: e7f4 b.n 8029c7e <__swsetup_r+0x8e> 8029c94: 2000 movs r0, #0 8029c96: e7f7 b.n 8029c88 <__swsetup_r+0x98> 8029c98: 240001d4 .word 0x240001d4 08029c9c : 8029c9c: b510 push {r4, lr} 8029c9e: 3901 subs r1, #1 8029ca0: 4402 add r2, r0 8029ca2: 4290 cmp r0, r2 8029ca4: d101 bne.n 8029caa 8029ca6: 2000 movs r0, #0 8029ca8: e005 b.n 8029cb6 8029caa: 7803 ldrb r3, [r0, #0] 8029cac: f811 4f01 ldrb.w r4, [r1, #1]! 8029cb0: 42a3 cmp r3, r4 8029cb2: d001 beq.n 8029cb8 8029cb4: 1b18 subs r0, r3, r4 8029cb6: bd10 pop {r4, pc} 8029cb8: 3001 adds r0, #1 8029cba: e7f2 b.n 8029ca2 08029cbc : 8029cbc: 4288 cmp r0, r1 8029cbe: b510 push {r4, lr} 8029cc0: eb01 0402 add.w r4, r1, r2 8029cc4: d902 bls.n 8029ccc 8029cc6: 4284 cmp r4, r0 8029cc8: 4623 mov r3, r4 8029cca: d807 bhi.n 8029cdc 8029ccc: 1e43 subs r3, r0, #1 8029cce: 42a1 cmp r1, r4 8029cd0: d008 beq.n 8029ce4 8029cd2: f811 2b01 ldrb.w r2, [r1], #1 8029cd6: f803 2f01 strb.w r2, [r3, #1]! 8029cda: e7f8 b.n 8029cce 8029cdc: 4402 add r2, r0 8029cde: 4601 mov r1, r0 8029ce0: 428a cmp r2, r1 8029ce2: d100 bne.n 8029ce6 8029ce4: bd10 pop {r4, pc} 8029ce6: f813 4d01 ldrb.w r4, [r3, #-1]! 8029cea: f802 4d01 strb.w r4, [r2, #-1]! 8029cee: e7f7 b.n 8029ce0 08029cf0 : 8029cf0: 4402 add r2, r0 8029cf2: 4603 mov r3, r0 8029cf4: 4293 cmp r3, r2 8029cf6: d100 bne.n 8029cfa 8029cf8: 4770 bx lr 8029cfa: f803 1b01 strb.w r1, [r3], #1 8029cfe: e7f9 b.n 8029cf4 08029d00 : 8029d00: b510 push {r4, lr} 8029d02: b16a cbz r2, 8029d20 8029d04: 3901 subs r1, #1 8029d06: 1884 adds r4, r0, r2 8029d08: f810 2b01 ldrb.w r2, [r0], #1 8029d0c: f811 3f01 ldrb.w r3, [r1, #1]! 8029d10: 429a cmp r2, r3 8029d12: d103 bne.n 8029d1c 8029d14: 42a0 cmp r0, r4 8029d16: d001 beq.n 8029d1c 8029d18: 2a00 cmp r2, #0 8029d1a: d1f5 bne.n 8029d08 8029d1c: 1ad0 subs r0, r2, r3 8029d1e: bd10 pop {r4, pc} 8029d20: 4610 mov r0, r2 8029d22: e7fc b.n 8029d1e 08029d24 <_localeconv_r>: 8029d24: 4800 ldr r0, [pc, #0] @ (8029d28 <_localeconv_r+0x4>) 8029d26: 4770 bx lr 8029d28: 24000158 .word 0x24000158 08029d2c <_close_r>: 8029d2c: b538 push {r3, r4, r5, lr} 8029d2e: 4d06 ldr r5, [pc, #24] @ (8029d48 <_close_r+0x1c>) 8029d30: 2300 movs r3, #0 8029d32: 4604 mov r4, r0 8029d34: 4608 mov r0, r1 8029d36: 602b str r3, [r5, #0] 8029d38: f7d9 ff3c bl 8003bb4 <_close> 8029d3c: 1c43 adds r3, r0, #1 8029d3e: d102 bne.n 8029d46 <_close_r+0x1a> 8029d40: 682b ldr r3, [r5, #0] 8029d42: b103 cbz r3, 8029d46 <_close_r+0x1a> 8029d44: 6023 str r3, [r4, #0] 8029d46: bd38 pop {r3, r4, r5, pc} 8029d48: 2402b180 .word 0x2402b180 08029d4c <_reclaim_reent>: 8029d4c: 4b29 ldr r3, [pc, #164] @ (8029df4 <_reclaim_reent+0xa8>) 8029d4e: 681b ldr r3, [r3, #0] 8029d50: 4283 cmp r3, r0 8029d52: b570 push {r4, r5, r6, lr} 8029d54: 4604 mov r4, r0 8029d56: d04b beq.n 8029df0 <_reclaim_reent+0xa4> 8029d58: 69c3 ldr r3, [r0, #28] 8029d5a: b1ab cbz r3, 8029d88 <_reclaim_reent+0x3c> 8029d5c: 68db ldr r3, [r3, #12] 8029d5e: b16b cbz r3, 8029d7c <_reclaim_reent+0x30> 8029d60: 2500 movs r5, #0 8029d62: 69e3 ldr r3, [r4, #28] 8029d64: 68db ldr r3, [r3, #12] 8029d66: 5959 ldr r1, [r3, r5] 8029d68: 2900 cmp r1, #0 8029d6a: d13b bne.n 8029de4 <_reclaim_reent+0x98> 8029d6c: 3504 adds r5, #4 8029d6e: 2d80 cmp r5, #128 @ 0x80 8029d70: d1f7 bne.n 8029d62 <_reclaim_reent+0x16> 8029d72: 69e3 ldr r3, [r4, #28] 8029d74: 4620 mov r0, r4 8029d76: 68d9 ldr r1, [r3, #12] 8029d78: f000 fec8 bl 802ab0c <_free_r> 8029d7c: 69e3 ldr r3, [r4, #28] 8029d7e: 6819 ldr r1, [r3, #0] 8029d80: b111 cbz r1, 8029d88 <_reclaim_reent+0x3c> 8029d82: 4620 mov r0, r4 8029d84: f000 fec2 bl 802ab0c <_free_r> 8029d88: 6961 ldr r1, [r4, #20] 8029d8a: b111 cbz r1, 8029d92 <_reclaim_reent+0x46> 8029d8c: 4620 mov r0, r4 8029d8e: f000 febd bl 802ab0c <_free_r> 8029d92: 69e1 ldr r1, [r4, #28] 8029d94: b111 cbz r1, 8029d9c <_reclaim_reent+0x50> 8029d96: 4620 mov r0, r4 8029d98: f000 feb8 bl 802ab0c <_free_r> 8029d9c: 6b21 ldr r1, [r4, #48] @ 0x30 8029d9e: b111 cbz r1, 8029da6 <_reclaim_reent+0x5a> 8029da0: 4620 mov r0, r4 8029da2: f000 feb3 bl 802ab0c <_free_r> 8029da6: 6b61 ldr r1, [r4, #52] @ 0x34 8029da8: b111 cbz r1, 8029db0 <_reclaim_reent+0x64> 8029daa: 4620 mov r0, r4 8029dac: f000 feae bl 802ab0c <_free_r> 8029db0: 6ba1 ldr r1, [r4, #56] @ 0x38 8029db2: b111 cbz r1, 8029dba <_reclaim_reent+0x6e> 8029db4: 4620 mov r0, r4 8029db6: f000 fea9 bl 802ab0c <_free_r> 8029dba: 6ca1 ldr r1, [r4, #72] @ 0x48 8029dbc: b111 cbz r1, 8029dc4 <_reclaim_reent+0x78> 8029dbe: 4620 mov r0, r4 8029dc0: f000 fea4 bl 802ab0c <_free_r> 8029dc4: 6c61 ldr r1, [r4, #68] @ 0x44 8029dc6: b111 cbz r1, 8029dce <_reclaim_reent+0x82> 8029dc8: 4620 mov r0, r4 8029dca: f000 fe9f bl 802ab0c <_free_r> 8029dce: 6ae1 ldr r1, [r4, #44] @ 0x2c 8029dd0: b111 cbz r1, 8029dd8 <_reclaim_reent+0x8c> 8029dd2: 4620 mov r0, r4 8029dd4: f000 fe9a bl 802ab0c <_free_r> 8029dd8: 6a23 ldr r3, [r4, #32] 8029dda: b14b cbz r3, 8029df0 <_reclaim_reent+0xa4> 8029ddc: 4620 mov r0, r4 8029dde: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} 8029de2: 4718 bx r3 8029de4: 680e ldr r6, [r1, #0] 8029de6: 4620 mov r0, r4 8029de8: f000 fe90 bl 802ab0c <_free_r> 8029dec: 4631 mov r1, r6 8029dee: e7bb b.n 8029d68 <_reclaim_reent+0x1c> 8029df0: bd70 pop {r4, r5, r6, pc} 8029df2: bf00 nop 8029df4: 240001d4 .word 0x240001d4 08029df8 <_lseek_r>: 8029df8: b538 push {r3, r4, r5, lr} 8029dfa: 4d07 ldr r5, [pc, #28] @ (8029e18 <_lseek_r+0x20>) 8029dfc: 4604 mov r4, r0 8029dfe: 4608 mov r0, r1 8029e00: 4611 mov r1, r2 8029e02: 2200 movs r2, #0 8029e04: 602a str r2, [r5, #0] 8029e06: 461a mov r2, r3 8029e08: f7d9 fefb bl 8003c02 <_lseek> 8029e0c: 1c43 adds r3, r0, #1 8029e0e: d102 bne.n 8029e16 <_lseek_r+0x1e> 8029e10: 682b ldr r3, [r5, #0] 8029e12: b103 cbz r3, 8029e16 <_lseek_r+0x1e> 8029e14: 6023 str r3, [r4, #0] 8029e16: bd38 pop {r3, r4, r5, pc} 8029e18: 2402b180 .word 0x2402b180 08029e1c <_read_r>: 8029e1c: b538 push {r3, r4, r5, lr} 8029e1e: 4d07 ldr r5, [pc, #28] @ (8029e3c <_read_r+0x20>) 8029e20: 4604 mov r4, r0 8029e22: 4608 mov r0, r1 8029e24: 4611 mov r1, r2 8029e26: 2200 movs r2, #0 8029e28: 602a str r2, [r5, #0] 8029e2a: 461a mov r2, r3 8029e2c: f7d9 fe89 bl 8003b42 <_read> 8029e30: 1c43 adds r3, r0, #1 8029e32: d102 bne.n 8029e3a <_read_r+0x1e> 8029e34: 682b ldr r3, [r5, #0] 8029e36: b103 cbz r3, 8029e3a <_read_r+0x1e> 8029e38: 6023 str r3, [r4, #0] 8029e3a: bd38 pop {r3, r4, r5, pc} 8029e3c: 2402b180 .word 0x2402b180 08029e40 <_sbrk_r>: 8029e40: b538 push {r3, r4, r5, lr} 8029e42: 4d06 ldr r5, [pc, #24] @ (8029e5c <_sbrk_r+0x1c>) 8029e44: 2300 movs r3, #0 8029e46: 4604 mov r4, r0 8029e48: 4608 mov r0, r1 8029e4a: 602b str r3, [r5, #0] 8029e4c: f7d9 fee6 bl 8003c1c <_sbrk> 8029e50: 1c43 adds r3, r0, #1 8029e52: d102 bne.n 8029e5a <_sbrk_r+0x1a> 8029e54: 682b ldr r3, [r5, #0] 8029e56: b103 cbz r3, 8029e5a <_sbrk_r+0x1a> 8029e58: 6023 str r3, [r4, #0] 8029e5a: bd38 pop {r3, r4, r5, pc} 8029e5c: 2402b180 .word 0x2402b180 08029e60 <_write_r>: 8029e60: b538 push {r3, r4, r5, lr} 8029e62: 4d07 ldr r5, [pc, #28] @ (8029e80 <_write_r+0x20>) 8029e64: 4604 mov r4, r0 8029e66: 4608 mov r0, r1 8029e68: 4611 mov r1, r2 8029e6a: 2200 movs r2, #0 8029e6c: 602a str r2, [r5, #0] 8029e6e: 461a mov r2, r3 8029e70: f7d9 fe84 bl 8003b7c <_write> 8029e74: 1c43 adds r3, r0, #1 8029e76: d102 bne.n 8029e7e <_write_r+0x1e> 8029e78: 682b ldr r3, [r5, #0] 8029e7a: b103 cbz r3, 8029e7e <_write_r+0x1e> 8029e7c: 6023 str r3, [r4, #0] 8029e7e: bd38 pop {r3, r4, r5, pc} 8029e80: 2402b180 .word 0x2402b180 08029e84 <__errno>: 8029e84: 4b01 ldr r3, [pc, #4] @ (8029e8c <__errno+0x8>) 8029e86: 6818 ldr r0, [r3, #0] 8029e88: 4770 bx lr 8029e8a: bf00 nop 8029e8c: 240001d4 .word 0x240001d4 08029e90 <__libc_init_array>: 8029e90: b570 push {r4, r5, r6, lr} 8029e92: 4d0d ldr r5, [pc, #52] @ (8029ec8 <__libc_init_array+0x38>) 8029e94: 4c0d ldr r4, [pc, #52] @ (8029ecc <__libc_init_array+0x3c>) 8029e96: 1b64 subs r4, r4, r5 8029e98: 10a4 asrs r4, r4, #2 8029e9a: 2600 movs r6, #0 8029e9c: 42a6 cmp r6, r4 8029e9e: d109 bne.n 8029eb4 <__libc_init_array+0x24> 8029ea0: 4d0b ldr r5, [pc, #44] @ (8029ed0 <__libc_init_array+0x40>) 8029ea2: 4c0c ldr r4, [pc, #48] @ (8029ed4 <__libc_init_array+0x44>) 8029ea4: f002 fac8 bl 802c438 <_init> 8029ea8: 1b64 subs r4, r4, r5 8029eaa: 10a4 asrs r4, r4, #2 8029eac: 2600 movs r6, #0 8029eae: 42a6 cmp r6, r4 8029eb0: d105 bne.n 8029ebe <__libc_init_array+0x2e> 8029eb2: bd70 pop {r4, r5, r6, pc} 8029eb4: f855 3b04 ldr.w r3, [r5], #4 8029eb8: 4798 blx r3 8029eba: 3601 adds r6, #1 8029ebc: e7ee b.n 8029e9c <__libc_init_array+0xc> 8029ebe: f855 3b04 ldr.w r3, [r5], #4 8029ec2: 4798 blx r3 8029ec4: 3601 adds r6, #1 8029ec6: e7f2 b.n 8029eae <__libc_init_array+0x1e> 8029ec8: 080310ac .word 0x080310ac 8029ecc: 080310ac .word 0x080310ac 8029ed0: 080310ac .word 0x080310ac 8029ed4: 080310b0 .word 0x080310b0 08029ed8 <__retarget_lock_init_recursive>: 8029ed8: 4770 bx lr 08029eda <__retarget_lock_acquire_recursive>: 8029eda: 4770 bx lr 08029edc <__retarget_lock_release_recursive>: 8029edc: 4770 bx lr 08029ede : 8029ede: 440a add r2, r1 8029ee0: 4291 cmp r1, r2 8029ee2: f100 33ff add.w r3, r0, #4294967295 @ 0xffffffff 8029ee6: d100 bne.n 8029eea 8029ee8: 4770 bx lr 8029eea: b510 push {r4, lr} 8029eec: f811 4b01 ldrb.w r4, [r1], #1 8029ef0: f803 4f01 strb.w r4, [r3, #1]! 8029ef4: 4291 cmp r1, r2 8029ef6: d1f9 bne.n 8029eec 8029ef8: bd10 pop {r4, pc} 8029efa: 0000 movs r0, r0 8029efc: 0000 movs r0, r0 ... 08029f00 : 8029f00: ed9f 0b01 vldr d0, [pc, #4] @ 8029f08 8029f04: 4770 bx lr 8029f06: bf00 nop 8029f08: 00000000 .word 0x00000000 8029f0c: 7ff80000 .word 0x7ff80000 08029f10 <__assert_func>: 8029f10: b51f push {r0, r1, r2, r3, r4, lr} 8029f12: 4614 mov r4, r2 8029f14: 461a mov r2, r3 8029f16: 4b09 ldr r3, [pc, #36] @ (8029f3c <__assert_func+0x2c>) 8029f18: 681b ldr r3, [r3, #0] 8029f1a: 4605 mov r5, r0 8029f1c: 68d8 ldr r0, [r3, #12] 8029f1e: b954 cbnz r4, 8029f36 <__assert_func+0x26> 8029f20: 4b07 ldr r3, [pc, #28] @ (8029f40 <__assert_func+0x30>) 8029f22: 461c mov r4, r3 8029f24: e9cd 3401 strd r3, r4, [sp, #4] 8029f28: 9100 str r1, [sp, #0] 8029f2a: 462b mov r3, r5 8029f2c: 4905 ldr r1, [pc, #20] @ (8029f44 <__assert_func+0x34>) 8029f2e: f002 f98d bl 802c24c 8029f32: f002 fa21 bl 802c378 8029f36: 4b04 ldr r3, [pc, #16] @ (8029f48 <__assert_func+0x38>) 8029f38: e7f4 b.n 8029f24 <__assert_func+0x14> 8029f3a: bf00 nop 8029f3c: 240001d4 .word 0x240001d4 8029f40: 08030e60 .word 0x08030e60 8029f44: 08030e32 .word 0x08030e32 8029f48: 08030e25 .word 0x08030e25 08029f4c : 8029f4c: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8029f50: 6903 ldr r3, [r0, #16] 8029f52: 690c ldr r4, [r1, #16] 8029f54: 42a3 cmp r3, r4 8029f56: 4607 mov r7, r0 8029f58: db7e blt.n 802a058 8029f5a: 3c01 subs r4, #1 8029f5c: f101 0814 add.w r8, r1, #20 8029f60: 00a3 lsls r3, r4, #2 8029f62: f100 0514 add.w r5, r0, #20 8029f66: 9300 str r3, [sp, #0] 8029f68: eb05 0384 add.w r3, r5, r4, lsl #2 8029f6c: 9301 str r3, [sp, #4] 8029f6e: f858 3024 ldr.w r3, [r8, r4, lsl #2] 8029f72: f855 2024 ldr.w r2, [r5, r4, lsl #2] 8029f76: 3301 adds r3, #1 8029f78: 429a cmp r2, r3 8029f7a: eb08 0984 add.w r9, r8, r4, lsl #2 8029f7e: fbb2 f6f3 udiv r6, r2, r3 8029f82: d32e bcc.n 8029fe2 8029f84: f04f 0a00 mov.w sl, #0 8029f88: 46c4 mov ip, r8 8029f8a: 46ae mov lr, r5 8029f8c: 46d3 mov fp, sl 8029f8e: f85c 3b04 ldr.w r3, [ip], #4 8029f92: b298 uxth r0, r3 8029f94: fb06 a000 mla r0, r6, r0, sl 8029f98: 0c02 lsrs r2, r0, #16 8029f9a: 0c1b lsrs r3, r3, #16 8029f9c: fb06 2303 mla r3, r6, r3, r2 8029fa0: f8de 2000 ldr.w r2, [lr] 8029fa4: b280 uxth r0, r0 8029fa6: b292 uxth r2, r2 8029fa8: 1a12 subs r2, r2, r0 8029faa: 445a add r2, fp 8029fac: f8de 0000 ldr.w r0, [lr] 8029fb0: ea4f 4a13 mov.w sl, r3, lsr #16 8029fb4: b29b uxth r3, r3 8029fb6: ebc3 4322 rsb r3, r3, r2, asr #16 8029fba: eb03 4310 add.w r3, r3, r0, lsr #16 8029fbe: b292 uxth r2, r2 8029fc0: ea42 4203 orr.w r2, r2, r3, lsl #16 8029fc4: 45e1 cmp r9, ip 8029fc6: f84e 2b04 str.w r2, [lr], #4 8029fca: ea4f 4b23 mov.w fp, r3, asr #16 8029fce: d2de bcs.n 8029f8e 8029fd0: 9b00 ldr r3, [sp, #0] 8029fd2: 58eb ldr r3, [r5, r3] 8029fd4: b92b cbnz r3, 8029fe2 8029fd6: 9b01 ldr r3, [sp, #4] 8029fd8: 3b04 subs r3, #4 8029fda: 429d cmp r5, r3 8029fdc: 461a mov r2, r3 8029fde: d32f bcc.n 802a040 8029fe0: 613c str r4, [r7, #16] 8029fe2: 4638 mov r0, r7 8029fe4: f001 fbec bl 802b7c0 <__mcmp> 8029fe8: 2800 cmp r0, #0 8029fea: db25 blt.n 802a038 8029fec: 4629 mov r1, r5 8029fee: 2000 movs r0, #0 8029ff0: f858 2b04 ldr.w r2, [r8], #4 8029ff4: f8d1 c000 ldr.w ip, [r1] 8029ff8: fa1f fe82 uxth.w lr, r2 8029ffc: fa1f f38c uxth.w r3, ip 802a000: eba3 030e sub.w r3, r3, lr 802a004: 4403 add r3, r0 802a006: 0c12 lsrs r2, r2, #16 802a008: ebc2 4223 rsb r2, r2, r3, asr #16 802a00c: eb02 421c add.w r2, r2, ip, lsr #16 802a010: b29b uxth r3, r3 802a012: ea43 4302 orr.w r3, r3, r2, lsl #16 802a016: 45c1 cmp r9, r8 802a018: f841 3b04 str.w r3, [r1], #4 802a01c: ea4f 4022 mov.w r0, r2, asr #16 802a020: d2e6 bcs.n 8029ff0 802a022: f855 2024 ldr.w r2, [r5, r4, lsl #2] 802a026: eb05 0384 add.w r3, r5, r4, lsl #2 802a02a: b922 cbnz r2, 802a036 802a02c: 3b04 subs r3, #4 802a02e: 429d cmp r5, r3 802a030: 461a mov r2, r3 802a032: d30b bcc.n 802a04c 802a034: 613c str r4, [r7, #16] 802a036: 3601 adds r6, #1 802a038: 4630 mov r0, r6 802a03a: b003 add sp, #12 802a03c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802a040: 6812 ldr r2, [r2, #0] 802a042: 3b04 subs r3, #4 802a044: 2a00 cmp r2, #0 802a046: d1cb bne.n 8029fe0 802a048: 3c01 subs r4, #1 802a04a: e7c6 b.n 8029fda 802a04c: 6812 ldr r2, [r2, #0] 802a04e: 3b04 subs r3, #4 802a050: 2a00 cmp r2, #0 802a052: d1ef bne.n 802a034 802a054: 3c01 subs r4, #1 802a056: e7ea b.n 802a02e 802a058: 2000 movs r0, #0 802a05a: e7ee b.n 802a03a 802a05c: 0000 movs r0, r0 ... 0802a060 <_dtoa_r>: 802a060: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802a064: ed2d 8b02 vpush {d8} 802a068: 69c7 ldr r7, [r0, #28] 802a06a: b091 sub sp, #68 @ 0x44 802a06c: ed8d 0b02 vstr d0, [sp, #8] 802a070: ec55 4b10 vmov r4, r5, d0 802a074: 9e1c ldr r6, [sp, #112] @ 0x70 802a076: 9107 str r1, [sp, #28] 802a078: 4681 mov r9, r0 802a07a: 9209 str r2, [sp, #36] @ 0x24 802a07c: 930d str r3, [sp, #52] @ 0x34 802a07e: b97f cbnz r7, 802a0a0 <_dtoa_r+0x40> 802a080: 2010 movs r0, #16 802a082: f7fe f8bb bl 80281fc 802a086: 4602 mov r2, r0 802a088: f8c9 001c str.w r0, [r9, #28] 802a08c: b920 cbnz r0, 802a098 <_dtoa_r+0x38> 802a08e: 4ba0 ldr r3, [pc, #640] @ (802a310 <_dtoa_r+0x2b0>) 802a090: 21ef movs r1, #239 @ 0xef 802a092: 48a0 ldr r0, [pc, #640] @ (802a314 <_dtoa_r+0x2b4>) 802a094: f7ff ff3c bl 8029f10 <__assert_func> 802a098: e9c0 7701 strd r7, r7, [r0, #4] 802a09c: 6007 str r7, [r0, #0] 802a09e: 60c7 str r7, [r0, #12] 802a0a0: f8d9 301c ldr.w r3, [r9, #28] 802a0a4: 6819 ldr r1, [r3, #0] 802a0a6: b159 cbz r1, 802a0c0 <_dtoa_r+0x60> 802a0a8: 685a ldr r2, [r3, #4] 802a0aa: 604a str r2, [r1, #4] 802a0ac: 2301 movs r3, #1 802a0ae: 4093 lsls r3, r2 802a0b0: 608b str r3, [r1, #8] 802a0b2: 4648 mov r0, r9 802a0b4: f001 f900 bl 802b2b8 <_Bfree> 802a0b8: f8d9 301c ldr.w r3, [r9, #28] 802a0bc: 2200 movs r2, #0 802a0be: 601a str r2, [r3, #0] 802a0c0: 1e2b subs r3, r5, #0 802a0c2: bfbb ittet lt 802a0c4: f023 4300 biclt.w r3, r3, #2147483648 @ 0x80000000 802a0c8: 9303 strlt r3, [sp, #12] 802a0ca: 2300 movge r3, #0 802a0cc: 2201 movlt r2, #1 802a0ce: bfac ite ge 802a0d0: 6033 strge r3, [r6, #0] 802a0d2: 6032 strlt r2, [r6, #0] 802a0d4: 4b90 ldr r3, [pc, #576] @ (802a318 <_dtoa_r+0x2b8>) 802a0d6: 9e03 ldr r6, [sp, #12] 802a0d8: 43b3 bics r3, r6 802a0da: d110 bne.n 802a0fe <_dtoa_r+0x9e> 802a0dc: 9a0d ldr r2, [sp, #52] @ 0x34 802a0de: f242 730f movw r3, #9999 @ 0x270f 802a0e2: 6013 str r3, [r2, #0] 802a0e4: f3c6 0313 ubfx r3, r6, #0, #20 802a0e8: 4323 orrs r3, r4 802a0ea: f000 84de beq.w 802aaaa <_dtoa_r+0xa4a> 802a0ee: 9b1d ldr r3, [sp, #116] @ 0x74 802a0f0: 4f8a ldr r7, [pc, #552] @ (802a31c <_dtoa_r+0x2bc>) 802a0f2: 2b00 cmp r3, #0 802a0f4: f000 84e0 beq.w 802aab8 <_dtoa_r+0xa58> 802a0f8: 1cfb adds r3, r7, #3 802a0fa: f000 bcdb b.w 802aab4 <_dtoa_r+0xa54> 802a0fe: ed9d 8b02 vldr d8, [sp, #8] 802a102: eeb5 8b40 vcmp.f64 d8, #0.0 802a106: eef1 fa10 vmrs APSR_nzcv, fpscr 802a10a: d10a bne.n 802a122 <_dtoa_r+0xc2> 802a10c: 9a0d ldr r2, [sp, #52] @ 0x34 802a10e: 2301 movs r3, #1 802a110: 6013 str r3, [r2, #0] 802a112: 9b1d ldr r3, [sp, #116] @ 0x74 802a114: b113 cbz r3, 802a11c <_dtoa_r+0xbc> 802a116: 9a1d ldr r2, [sp, #116] @ 0x74 802a118: 4b81 ldr r3, [pc, #516] @ (802a320 <_dtoa_r+0x2c0>) 802a11a: 6013 str r3, [r2, #0] 802a11c: 4f81 ldr r7, [pc, #516] @ (802a324 <_dtoa_r+0x2c4>) 802a11e: f000 bccb b.w 802aab8 <_dtoa_r+0xa58> 802a122: aa0e add r2, sp, #56 @ 0x38 802a124: a90f add r1, sp, #60 @ 0x3c 802a126: 4648 mov r0, r9 802a128: eeb0 0b48 vmov.f64 d0, d8 802a12c: f001 fc68 bl 802ba00 <__d2b> 802a130: f3c6 530a ubfx r3, r6, #20, #11 802a134: 9a0e ldr r2, [sp, #56] @ 0x38 802a136: 9001 str r0, [sp, #4] 802a138: 2b00 cmp r3, #0 802a13a: d045 beq.n 802a1c8 <_dtoa_r+0x168> 802a13c: eeb0 7b48 vmov.f64 d7, d8 802a140: ee18 1a90 vmov r1, s17 802a144: f3c1 0113 ubfx r1, r1, #0, #20 802a148: f041 517f orr.w r1, r1, #1069547520 @ 0x3fc00000 802a14c: f441 1140 orr.w r1, r1, #3145728 @ 0x300000 802a150: f2a3 33ff subw r3, r3, #1023 @ 0x3ff 802a154: 2500 movs r5, #0 802a156: ee07 1a90 vmov s15, r1 802a15a: eeb7 6b08 vmov.f64 d6, #120 @ 0x3fc00000 1.5 802a15e: ed9f 5b66 vldr d5, [pc, #408] @ 802a2f8 <_dtoa_r+0x298> 802a162: ee37 7b46 vsub.f64 d7, d7, d6 802a166: ed9f 6b66 vldr d6, [pc, #408] @ 802a300 <_dtoa_r+0x2a0> 802a16a: eea7 6b05 vfma.f64 d6, d7, d5 802a16e: ed9f 5b66 vldr d5, [pc, #408] @ 802a308 <_dtoa_r+0x2a8> 802a172: ee07 3a90 vmov s15, r3 802a176: eeb8 4be7 vcvt.f64.s32 d4, s15 802a17a: eeb0 7b46 vmov.f64 d7, d6 802a17e: eea4 7b05 vfma.f64 d7, d4, d5 802a182: eefd 6bc7 vcvt.s32.f64 s13, d7 802a186: eeb5 7bc0 vcmpe.f64 d7, #0.0 802a18a: eef1 fa10 vmrs APSR_nzcv, fpscr 802a18e: ee16 8a90 vmov r8, s13 802a192: d508 bpl.n 802a1a6 <_dtoa_r+0x146> 802a194: eeb8 6be6 vcvt.f64.s32 d6, s13 802a198: eeb4 6b47 vcmp.f64 d6, d7 802a19c: eef1 fa10 vmrs APSR_nzcv, fpscr 802a1a0: bf18 it ne 802a1a2: f108 38ff addne.w r8, r8, #4294967295 @ 0xffffffff 802a1a6: f1b8 0f16 cmp.w r8, #22 802a1aa: d82b bhi.n 802a204 <_dtoa_r+0x1a4> 802a1ac: 495e ldr r1, [pc, #376] @ (802a328 <_dtoa_r+0x2c8>) 802a1ae: eb01 01c8 add.w r1, r1, r8, lsl #3 802a1b2: ed91 7b00 vldr d7, [r1] 802a1b6: eeb4 8bc7 vcmpe.f64 d8, d7 802a1ba: eef1 fa10 vmrs APSR_nzcv, fpscr 802a1be: d501 bpl.n 802a1c4 <_dtoa_r+0x164> 802a1c0: f108 38ff add.w r8, r8, #4294967295 @ 0xffffffff 802a1c4: 2100 movs r1, #0 802a1c6: e01e b.n 802a206 <_dtoa_r+0x1a6> 802a1c8: 9b0f ldr r3, [sp, #60] @ 0x3c 802a1ca: 4413 add r3, r2 802a1cc: f203 4132 addw r1, r3, #1074 @ 0x432 802a1d0: 2920 cmp r1, #32 802a1d2: bfc1 itttt gt 802a1d4: f1c1 0140 rsbgt r1, r1, #64 @ 0x40 802a1d8: 408e lslgt r6, r1 802a1da: f203 4112 addwgt r1, r3, #1042 @ 0x412 802a1de: fa24 f101 lsrgt.w r1, r4, r1 802a1e2: bfd6 itet le 802a1e4: f1c1 0120 rsble r1, r1, #32 802a1e8: 4331 orrgt r1, r6 802a1ea: fa04 f101 lslle.w r1, r4, r1 802a1ee: ee07 1a90 vmov s15, r1 802a1f2: eeb8 7b67 vcvt.f64.u32 d7, s15 802a1f6: 3b01 subs r3, #1 802a1f8: ee17 1a90 vmov r1, s15 802a1fc: 2501 movs r5, #1 802a1fe: f1a1 71f8 sub.w r1, r1, #32505856 @ 0x1f00000 802a202: e7a8 b.n 802a156 <_dtoa_r+0xf6> 802a204: 2101 movs r1, #1 802a206: 1ad2 subs r2, r2, r3 802a208: 1e53 subs r3, r2, #1 802a20a: 9306 str r3, [sp, #24] 802a20c: bf45 ittet mi 802a20e: f1c2 0301 rsbmi r3, r2, #1 802a212: 9305 strmi r3, [sp, #20] 802a214: 2300 movpl r3, #0 802a216: 2300 movmi r3, #0 802a218: bf4c ite mi 802a21a: 9306 strmi r3, [sp, #24] 802a21c: 9305 strpl r3, [sp, #20] 802a21e: f1b8 0f00 cmp.w r8, #0 802a222: 910c str r1, [sp, #48] @ 0x30 802a224: db18 blt.n 802a258 <_dtoa_r+0x1f8> 802a226: 9b06 ldr r3, [sp, #24] 802a228: f8cd 8028 str.w r8, [sp, #40] @ 0x28 802a22c: 4443 add r3, r8 802a22e: 9306 str r3, [sp, #24] 802a230: 2300 movs r3, #0 802a232: 9a07 ldr r2, [sp, #28] 802a234: 2a09 cmp r2, #9 802a236: d849 bhi.n 802a2cc <_dtoa_r+0x26c> 802a238: 2a05 cmp r2, #5 802a23a: bfc4 itt gt 802a23c: 3a04 subgt r2, #4 802a23e: 9207 strgt r2, [sp, #28] 802a240: 9a07 ldr r2, [sp, #28] 802a242: f1a2 0202 sub.w r2, r2, #2 802a246: bfcc ite gt 802a248: 2400 movgt r4, #0 802a24a: 2401 movle r4, #1 802a24c: 2a03 cmp r2, #3 802a24e: d848 bhi.n 802a2e2 <_dtoa_r+0x282> 802a250: e8df f002 tbb [pc, r2] 802a254: 3a2c2e0b .word 0x3a2c2e0b 802a258: 9b05 ldr r3, [sp, #20] 802a25a: 2200 movs r2, #0 802a25c: eba3 0308 sub.w r3, r3, r8 802a260: 9305 str r3, [sp, #20] 802a262: 920a str r2, [sp, #40] @ 0x28 802a264: f1c8 0300 rsb r3, r8, #0 802a268: e7e3 b.n 802a232 <_dtoa_r+0x1d2> 802a26a: 2200 movs r2, #0 802a26c: 9208 str r2, [sp, #32] 802a26e: 9a09 ldr r2, [sp, #36] @ 0x24 802a270: 2a00 cmp r2, #0 802a272: dc39 bgt.n 802a2e8 <_dtoa_r+0x288> 802a274: f04f 0b01 mov.w fp, #1 802a278: 46da mov sl, fp 802a27a: 465a mov r2, fp 802a27c: f8cd b024 str.w fp, [sp, #36] @ 0x24 802a280: f8d9 701c ldr.w r7, [r9, #28] 802a284: 2100 movs r1, #0 802a286: 2004 movs r0, #4 802a288: f100 0614 add.w r6, r0, #20 802a28c: 4296 cmp r6, r2 802a28e: d930 bls.n 802a2f2 <_dtoa_r+0x292> 802a290: 6079 str r1, [r7, #4] 802a292: 4648 mov r0, r9 802a294: 9304 str r3, [sp, #16] 802a296: f000 ffcf bl 802b238 <_Balloc> 802a29a: 9b04 ldr r3, [sp, #16] 802a29c: 4607 mov r7, r0 802a29e: 2800 cmp r0, #0 802a2a0: d146 bne.n 802a330 <_dtoa_r+0x2d0> 802a2a2: 4b22 ldr r3, [pc, #136] @ (802a32c <_dtoa_r+0x2cc>) 802a2a4: 4602 mov r2, r0 802a2a6: f240 11af movw r1, #431 @ 0x1af 802a2aa: e6f2 b.n 802a092 <_dtoa_r+0x32> 802a2ac: 2201 movs r2, #1 802a2ae: e7dd b.n 802a26c <_dtoa_r+0x20c> 802a2b0: 2200 movs r2, #0 802a2b2: 9208 str r2, [sp, #32] 802a2b4: 9a09 ldr r2, [sp, #36] @ 0x24 802a2b6: eb08 0b02 add.w fp, r8, r2 802a2ba: f10b 0a01 add.w sl, fp, #1 802a2be: 4652 mov r2, sl 802a2c0: 2a01 cmp r2, #1 802a2c2: bfb8 it lt 802a2c4: 2201 movlt r2, #1 802a2c6: e7db b.n 802a280 <_dtoa_r+0x220> 802a2c8: 2201 movs r2, #1 802a2ca: e7f2 b.n 802a2b2 <_dtoa_r+0x252> 802a2cc: 2401 movs r4, #1 802a2ce: 2200 movs r2, #0 802a2d0: e9cd 2407 strd r2, r4, [sp, #28] 802a2d4: f04f 3bff mov.w fp, #4294967295 @ 0xffffffff 802a2d8: 2100 movs r1, #0 802a2da: 46da mov sl, fp 802a2dc: 2212 movs r2, #18 802a2de: 9109 str r1, [sp, #36] @ 0x24 802a2e0: e7ce b.n 802a280 <_dtoa_r+0x220> 802a2e2: 2201 movs r2, #1 802a2e4: 9208 str r2, [sp, #32] 802a2e6: e7f5 b.n 802a2d4 <_dtoa_r+0x274> 802a2e8: f8dd b024 ldr.w fp, [sp, #36] @ 0x24 802a2ec: 46da mov sl, fp 802a2ee: 465a mov r2, fp 802a2f0: e7c6 b.n 802a280 <_dtoa_r+0x220> 802a2f2: 3101 adds r1, #1 802a2f4: 0040 lsls r0, r0, #1 802a2f6: e7c7 b.n 802a288 <_dtoa_r+0x228> 802a2f8: 636f4361 .word 0x636f4361 802a2fc: 3fd287a7 .word 0x3fd287a7 802a300: 8b60c8b3 .word 0x8b60c8b3 802a304: 3fc68a28 .word 0x3fc68a28 802a308: 509f79fb .word 0x509f79fb 802a30c: 3fd34413 .word 0x3fd34413 802a310: 08030c26 .word 0x08030c26 802a314: 08030e6e .word 0x08030e6e 802a318: 7ff00000 .word 0x7ff00000 802a31c: 08030e6a .word 0x08030e6a 802a320: 08030dfa .word 0x08030dfa 802a324: 08030df9 .word 0x08030df9 802a328: 08030fc8 .word 0x08030fc8 802a32c: 08030ec6 .word 0x08030ec6 802a330: f8d9 201c ldr.w r2, [r9, #28] 802a334: f1ba 0f0e cmp.w sl, #14 802a338: 6010 str r0, [r2, #0] 802a33a: d86f bhi.n 802a41c <_dtoa_r+0x3bc> 802a33c: 2c00 cmp r4, #0 802a33e: d06d beq.n 802a41c <_dtoa_r+0x3bc> 802a340: f1b8 0f00 cmp.w r8, #0 802a344: f340 80c2 ble.w 802a4cc <_dtoa_r+0x46c> 802a348: 4aca ldr r2, [pc, #808] @ (802a674 <_dtoa_r+0x614>) 802a34a: f008 010f and.w r1, r8, #15 802a34e: eb02 02c1 add.w r2, r2, r1, lsl #3 802a352: f418 7f80 tst.w r8, #256 @ 0x100 802a356: ed92 7b00 vldr d7, [r2] 802a35a: ea4f 1128 mov.w r1, r8, asr #4 802a35e: f000 80a9 beq.w 802a4b4 <_dtoa_r+0x454> 802a362: 4ac5 ldr r2, [pc, #788] @ (802a678 <_dtoa_r+0x618>) 802a364: ed92 6b08 vldr d6, [r2, #32] 802a368: ee88 6b06 vdiv.f64 d6, d8, d6 802a36c: ed8d 6b02 vstr d6, [sp, #8] 802a370: f001 010f and.w r1, r1, #15 802a374: 2203 movs r2, #3 802a376: 48c0 ldr r0, [pc, #768] @ (802a678 <_dtoa_r+0x618>) 802a378: 2900 cmp r1, #0 802a37a: f040 809d bne.w 802a4b8 <_dtoa_r+0x458> 802a37e: ed9d 6b02 vldr d6, [sp, #8] 802a382: ee86 7b07 vdiv.f64 d7, d6, d7 802a386: ed8d 7b02 vstr d7, [sp, #8] 802a38a: 990c ldr r1, [sp, #48] @ 0x30 802a38c: ed9d 7b02 vldr d7, [sp, #8] 802a390: 2900 cmp r1, #0 802a392: f000 80c1 beq.w 802a518 <_dtoa_r+0x4b8> 802a396: eeb7 6b00 vmov.f64 d6, #112 @ 0x3f800000 1.0 802a39a: eeb4 7bc6 vcmpe.f64 d7, d6 802a39e: eef1 fa10 vmrs APSR_nzcv, fpscr 802a3a2: f140 80b9 bpl.w 802a518 <_dtoa_r+0x4b8> 802a3a6: f1ba 0f00 cmp.w sl, #0 802a3aa: f000 80b5 beq.w 802a518 <_dtoa_r+0x4b8> 802a3ae: f1bb 0f00 cmp.w fp, #0 802a3b2: dd31 ble.n 802a418 <_dtoa_r+0x3b8> 802a3b4: eeb2 6b04 vmov.f64 d6, #36 @ 0x41200000 10.0 802a3b8: ee27 7b06 vmul.f64 d7, d7, d6 802a3bc: ed8d 7b02 vstr d7, [sp, #8] 802a3c0: f108 31ff add.w r1, r8, #4294967295 @ 0xffffffff 802a3c4: 9104 str r1, [sp, #16] 802a3c6: 3201 adds r2, #1 802a3c8: 465c mov r4, fp 802a3ca: ed9d 6b02 vldr d6, [sp, #8] 802a3ce: eeb1 5b0c vmov.f64 d5, #28 @ 0x40e00000 7.0 802a3d2: ee07 2a90 vmov s15, r2 802a3d6: eeb8 7be7 vcvt.f64.s32 d7, s15 802a3da: eea7 5b06 vfma.f64 d5, d7, d6 802a3de: ee15 2a90 vmov r2, s11 802a3e2: ec51 0b15 vmov r0, r1, d5 802a3e6: f1a2 7150 sub.w r1, r2, #54525952 @ 0x3400000 802a3ea: 2c00 cmp r4, #0 802a3ec: f040 8098 bne.w 802a520 <_dtoa_r+0x4c0> 802a3f0: eeb1 7b04 vmov.f64 d7, #20 @ 0x40a00000 5.0 802a3f4: ee36 6b47 vsub.f64 d6, d6, d7 802a3f8: ec41 0b17 vmov d7, r0, r1 802a3fc: eeb4 6bc7 vcmpe.f64 d6, d7 802a400: eef1 fa10 vmrs APSR_nzcv, fpscr 802a404: f300 8261 bgt.w 802a8ca <_dtoa_r+0x86a> 802a408: eeb1 7b47 vneg.f64 d7, d7 802a40c: eeb4 6bc7 vcmpe.f64 d6, d7 802a410: eef1 fa10 vmrs APSR_nzcv, fpscr 802a414: f100 80f5 bmi.w 802a602 <_dtoa_r+0x5a2> 802a418: ed8d 8b02 vstr d8, [sp, #8] 802a41c: 9a0f ldr r2, [sp, #60] @ 0x3c 802a41e: 2a00 cmp r2, #0 802a420: f2c0 812c blt.w 802a67c <_dtoa_r+0x61c> 802a424: f1b8 0f0e cmp.w r8, #14 802a428: f300 8128 bgt.w 802a67c <_dtoa_r+0x61c> 802a42c: 4b91 ldr r3, [pc, #580] @ (802a674 <_dtoa_r+0x614>) 802a42e: eb03 03c8 add.w r3, r3, r8, lsl #3 802a432: ed93 6b00 vldr d6, [r3] 802a436: 9b09 ldr r3, [sp, #36] @ 0x24 802a438: 2b00 cmp r3, #0 802a43a: da03 bge.n 802a444 <_dtoa_r+0x3e4> 802a43c: f1ba 0f00 cmp.w sl, #0 802a440: f340 80d2 ble.w 802a5e8 <_dtoa_r+0x588> 802a444: eeb2 4b04 vmov.f64 d4, #36 @ 0x41200000 10.0 802a448: ed9d 7b02 vldr d7, [sp, #8] 802a44c: 463e mov r6, r7 802a44e: ee87 5b06 vdiv.f64 d5, d7, d6 802a452: eebd 5bc5 vcvt.s32.f64 s10, d5 802a456: ee15 3a10 vmov r3, s10 802a45a: 3330 adds r3, #48 @ 0x30 802a45c: f806 3b01 strb.w r3, [r6], #1 802a460: 1bf3 subs r3, r6, r7 802a462: 459a cmp sl, r3 802a464: eeb8 3bc5 vcvt.f64.s32 d3, s10 802a468: eea3 7b46 vfms.f64 d7, d3, d6 802a46c: f040 80f8 bne.w 802a660 <_dtoa_r+0x600> 802a470: ee37 7b07 vadd.f64 d7, d7, d7 802a474: eeb4 7bc6 vcmpe.f64 d7, d6 802a478: eef1 fa10 vmrs APSR_nzcv, fpscr 802a47c: f300 80dd bgt.w 802a63a <_dtoa_r+0x5da> 802a480: eeb4 7b46 vcmp.f64 d7, d6 802a484: eef1 fa10 vmrs APSR_nzcv, fpscr 802a488: d104 bne.n 802a494 <_dtoa_r+0x434> 802a48a: ee15 3a10 vmov r3, s10 802a48e: 07db lsls r3, r3, #31 802a490: f100 80d3 bmi.w 802a63a <_dtoa_r+0x5da> 802a494: 9901 ldr r1, [sp, #4] 802a496: 4648 mov r0, r9 802a498: f000 ff0e bl 802b2b8 <_Bfree> 802a49c: 2300 movs r3, #0 802a49e: 9a0d ldr r2, [sp, #52] @ 0x34 802a4a0: 7033 strb r3, [r6, #0] 802a4a2: f108 0301 add.w r3, r8, #1 802a4a6: 6013 str r3, [r2, #0] 802a4a8: 9b1d ldr r3, [sp, #116] @ 0x74 802a4aa: 2b00 cmp r3, #0 802a4ac: f000 8304 beq.w 802aab8 <_dtoa_r+0xa58> 802a4b0: 601e str r6, [r3, #0] 802a4b2: e301 b.n 802aab8 <_dtoa_r+0xa58> 802a4b4: 2202 movs r2, #2 802a4b6: e75e b.n 802a376 <_dtoa_r+0x316> 802a4b8: 07cc lsls r4, r1, #31 802a4ba: d504 bpl.n 802a4c6 <_dtoa_r+0x466> 802a4bc: ed90 6b00 vldr d6, [r0] 802a4c0: 3201 adds r2, #1 802a4c2: ee27 7b06 vmul.f64 d7, d7, d6 802a4c6: 1049 asrs r1, r1, #1 802a4c8: 3008 adds r0, #8 802a4ca: e755 b.n 802a378 <_dtoa_r+0x318> 802a4cc: d022 beq.n 802a514 <_dtoa_r+0x4b4> 802a4ce: f1c8 0100 rsb r1, r8, #0 802a4d2: 4a68 ldr r2, [pc, #416] @ (802a674 <_dtoa_r+0x614>) 802a4d4: f001 000f and.w r0, r1, #15 802a4d8: eb02 02c0 add.w r2, r2, r0, lsl #3 802a4dc: ed92 7b00 vldr d7, [r2] 802a4e0: ee28 7b07 vmul.f64 d7, d8, d7 802a4e4: ed8d 7b02 vstr d7, [sp, #8] 802a4e8: 4863 ldr r0, [pc, #396] @ (802a678 <_dtoa_r+0x618>) 802a4ea: 1109 asrs r1, r1, #4 802a4ec: 2400 movs r4, #0 802a4ee: 2202 movs r2, #2 802a4f0: b929 cbnz r1, 802a4fe <_dtoa_r+0x49e> 802a4f2: 2c00 cmp r4, #0 802a4f4: f43f af49 beq.w 802a38a <_dtoa_r+0x32a> 802a4f8: ed8d 7b02 vstr d7, [sp, #8] 802a4fc: e745 b.n 802a38a <_dtoa_r+0x32a> 802a4fe: 07ce lsls r6, r1, #31 802a500: d505 bpl.n 802a50e <_dtoa_r+0x4ae> 802a502: ed90 6b00 vldr d6, [r0] 802a506: 3201 adds r2, #1 802a508: 2401 movs r4, #1 802a50a: ee27 7b06 vmul.f64 d7, d7, d6 802a50e: 1049 asrs r1, r1, #1 802a510: 3008 adds r0, #8 802a512: e7ed b.n 802a4f0 <_dtoa_r+0x490> 802a514: 2202 movs r2, #2 802a516: e738 b.n 802a38a <_dtoa_r+0x32a> 802a518: f8cd 8010 str.w r8, [sp, #16] 802a51c: 4654 mov r4, sl 802a51e: e754 b.n 802a3ca <_dtoa_r+0x36a> 802a520: 4a54 ldr r2, [pc, #336] @ (802a674 <_dtoa_r+0x614>) 802a522: eb02 02c4 add.w r2, r2, r4, lsl #3 802a526: ed12 4b02 vldr d4, [r2, #-8] 802a52a: 9a08 ldr r2, [sp, #32] 802a52c: ec41 0b17 vmov d7, r0, r1 802a530: 443c add r4, r7 802a532: b34a cbz r2, 802a588 <_dtoa_r+0x528> 802a534: eeb6 3b00 vmov.f64 d3, #96 @ 0x3f000000 0.5 802a538: eeb7 2b00 vmov.f64 d2, #112 @ 0x3f800000 1.0 802a53c: 463e mov r6, r7 802a53e: ee83 5b04 vdiv.f64 d5, d3, d4 802a542: eeb2 3b04 vmov.f64 d3, #36 @ 0x41200000 10.0 802a546: ee35 7b47 vsub.f64 d7, d5, d7 802a54a: eefd 4bc6 vcvt.s32.f64 s9, d6 802a54e: ee14 2a90 vmov r2, s9 802a552: eeb8 5be4 vcvt.f64.s32 d5, s9 802a556: 3230 adds r2, #48 @ 0x30 802a558: ee36 6b45 vsub.f64 d6, d6, d5 802a55c: eeb4 6bc7 vcmpe.f64 d6, d7 802a560: eef1 fa10 vmrs APSR_nzcv, fpscr 802a564: f806 2b01 strb.w r2, [r6], #1 802a568: d438 bmi.n 802a5dc <_dtoa_r+0x57c> 802a56a: ee32 5b46 vsub.f64 d5, d2, d6 802a56e: eeb4 5bc7 vcmpe.f64 d5, d7 802a572: eef1 fa10 vmrs APSR_nzcv, fpscr 802a576: d462 bmi.n 802a63e <_dtoa_r+0x5de> 802a578: 42a6 cmp r6, r4 802a57a: f43f af4d beq.w 802a418 <_dtoa_r+0x3b8> 802a57e: ee27 7b03 vmul.f64 d7, d7, d3 802a582: ee26 6b03 vmul.f64 d6, d6, d3 802a586: e7e0 b.n 802a54a <_dtoa_r+0x4ea> 802a588: 4621 mov r1, r4 802a58a: 463e mov r6, r7 802a58c: ee27 7b04 vmul.f64 d7, d7, d4 802a590: eeb2 3b04 vmov.f64 d3, #36 @ 0x41200000 10.0 802a594: eefd 4bc6 vcvt.s32.f64 s9, d6 802a598: ee14 2a90 vmov r2, s9 802a59c: 3230 adds r2, #48 @ 0x30 802a59e: f806 2b01 strb.w r2, [r6], #1 802a5a2: 42a6 cmp r6, r4 802a5a4: eeb8 5be4 vcvt.f64.s32 d5, s9 802a5a8: ee36 6b45 vsub.f64 d6, d6, d5 802a5ac: d119 bne.n 802a5e2 <_dtoa_r+0x582> 802a5ae: eeb6 5b00 vmov.f64 d5, #96 @ 0x3f000000 0.5 802a5b2: ee37 4b05 vadd.f64 d4, d7, d5 802a5b6: eeb4 6bc4 vcmpe.f64 d6, d4 802a5ba: eef1 fa10 vmrs APSR_nzcv, fpscr 802a5be: dc3e bgt.n 802a63e <_dtoa_r+0x5de> 802a5c0: ee35 5b47 vsub.f64 d5, d5, d7 802a5c4: eeb4 6bc5 vcmpe.f64 d6, d5 802a5c8: eef1 fa10 vmrs APSR_nzcv, fpscr 802a5cc: f57f af24 bpl.w 802a418 <_dtoa_r+0x3b8> 802a5d0: 460e mov r6, r1 802a5d2: 3901 subs r1, #1 802a5d4: f816 3c01 ldrb.w r3, [r6, #-1] 802a5d8: 2b30 cmp r3, #48 @ 0x30 802a5da: d0f9 beq.n 802a5d0 <_dtoa_r+0x570> 802a5dc: f8dd 8010 ldr.w r8, [sp, #16] 802a5e0: e758 b.n 802a494 <_dtoa_r+0x434> 802a5e2: ee26 6b03 vmul.f64 d6, d6, d3 802a5e6: e7d5 b.n 802a594 <_dtoa_r+0x534> 802a5e8: d10b bne.n 802a602 <_dtoa_r+0x5a2> 802a5ea: eeb1 7b04 vmov.f64 d7, #20 @ 0x40a00000 5.0 802a5ee: ee26 6b07 vmul.f64 d6, d6, d7 802a5f2: ed9d 7b02 vldr d7, [sp, #8] 802a5f6: eeb4 6bc7 vcmpe.f64 d6, d7 802a5fa: eef1 fa10 vmrs APSR_nzcv, fpscr 802a5fe: f2c0 8161 blt.w 802a8c4 <_dtoa_r+0x864> 802a602: 2400 movs r4, #0 802a604: 4625 mov r5, r4 802a606: 9b09 ldr r3, [sp, #36] @ 0x24 802a608: 43db mvns r3, r3 802a60a: 9304 str r3, [sp, #16] 802a60c: 463e mov r6, r7 802a60e: f04f 0800 mov.w r8, #0 802a612: 4621 mov r1, r4 802a614: 4648 mov r0, r9 802a616: f000 fe4f bl 802b2b8 <_Bfree> 802a61a: 2d00 cmp r5, #0 802a61c: d0de beq.n 802a5dc <_dtoa_r+0x57c> 802a61e: f1b8 0f00 cmp.w r8, #0 802a622: d005 beq.n 802a630 <_dtoa_r+0x5d0> 802a624: 45a8 cmp r8, r5 802a626: d003 beq.n 802a630 <_dtoa_r+0x5d0> 802a628: 4641 mov r1, r8 802a62a: 4648 mov r0, r9 802a62c: f000 fe44 bl 802b2b8 <_Bfree> 802a630: 4629 mov r1, r5 802a632: 4648 mov r0, r9 802a634: f000 fe40 bl 802b2b8 <_Bfree> 802a638: e7d0 b.n 802a5dc <_dtoa_r+0x57c> 802a63a: f8cd 8010 str.w r8, [sp, #16] 802a63e: 4633 mov r3, r6 802a640: 461e mov r6, r3 802a642: f813 2d01 ldrb.w r2, [r3, #-1]! 802a646: 2a39 cmp r2, #57 @ 0x39 802a648: d106 bne.n 802a658 <_dtoa_r+0x5f8> 802a64a: 429f cmp r7, r3 802a64c: d1f8 bne.n 802a640 <_dtoa_r+0x5e0> 802a64e: 9a04 ldr r2, [sp, #16] 802a650: 3201 adds r2, #1 802a652: 9204 str r2, [sp, #16] 802a654: 2230 movs r2, #48 @ 0x30 802a656: 703a strb r2, [r7, #0] 802a658: 781a ldrb r2, [r3, #0] 802a65a: 3201 adds r2, #1 802a65c: 701a strb r2, [r3, #0] 802a65e: e7bd b.n 802a5dc <_dtoa_r+0x57c> 802a660: ee27 7b04 vmul.f64 d7, d7, d4 802a664: eeb5 7b40 vcmp.f64 d7, #0.0 802a668: eef1 fa10 vmrs APSR_nzcv, fpscr 802a66c: f47f aeef bne.w 802a44e <_dtoa_r+0x3ee> 802a670: e710 b.n 802a494 <_dtoa_r+0x434> 802a672: bf00 nop 802a674: 08030fc8 .word 0x08030fc8 802a678: 08030fa0 .word 0x08030fa0 802a67c: 9908 ldr r1, [sp, #32] 802a67e: 2900 cmp r1, #0 802a680: f000 80e3 beq.w 802a84a <_dtoa_r+0x7ea> 802a684: 9907 ldr r1, [sp, #28] 802a686: 2901 cmp r1, #1 802a688: f300 80c8 bgt.w 802a81c <_dtoa_r+0x7bc> 802a68c: 2d00 cmp r5, #0 802a68e: f000 80c1 beq.w 802a814 <_dtoa_r+0x7b4> 802a692: f202 4233 addw r2, r2, #1075 @ 0x433 802a696: 9e05 ldr r6, [sp, #20] 802a698: 461c mov r4, r3 802a69a: 9304 str r3, [sp, #16] 802a69c: 9b05 ldr r3, [sp, #20] 802a69e: 4413 add r3, r2 802a6a0: 9305 str r3, [sp, #20] 802a6a2: 9b06 ldr r3, [sp, #24] 802a6a4: 2101 movs r1, #1 802a6a6: 4413 add r3, r2 802a6a8: 4648 mov r0, r9 802a6aa: 9306 str r3, [sp, #24] 802a6ac: f000 ff02 bl 802b4b4 <__i2b> 802a6b0: 9b04 ldr r3, [sp, #16] 802a6b2: 4605 mov r5, r0 802a6b4: b166 cbz r6, 802a6d0 <_dtoa_r+0x670> 802a6b6: 9a06 ldr r2, [sp, #24] 802a6b8: 2a00 cmp r2, #0 802a6ba: dd09 ble.n 802a6d0 <_dtoa_r+0x670> 802a6bc: 42b2 cmp r2, r6 802a6be: 9905 ldr r1, [sp, #20] 802a6c0: bfa8 it ge 802a6c2: 4632 movge r2, r6 802a6c4: 1a89 subs r1, r1, r2 802a6c6: 9105 str r1, [sp, #20] 802a6c8: 9906 ldr r1, [sp, #24] 802a6ca: 1ab6 subs r6, r6, r2 802a6cc: 1a8a subs r2, r1, r2 802a6ce: 9206 str r2, [sp, #24] 802a6d0: b1fb cbz r3, 802a712 <_dtoa_r+0x6b2> 802a6d2: 9a08 ldr r2, [sp, #32] 802a6d4: 2a00 cmp r2, #0 802a6d6: f000 80bc beq.w 802a852 <_dtoa_r+0x7f2> 802a6da: b19c cbz r4, 802a704 <_dtoa_r+0x6a4> 802a6dc: 4629 mov r1, r5 802a6de: 4622 mov r2, r4 802a6e0: 4648 mov r0, r9 802a6e2: 930b str r3, [sp, #44] @ 0x2c 802a6e4: f000 ffa6 bl 802b634 <__pow5mult> 802a6e8: 9a01 ldr r2, [sp, #4] 802a6ea: 4601 mov r1, r0 802a6ec: 4605 mov r5, r0 802a6ee: 4648 mov r0, r9 802a6f0: f000 fef6 bl 802b4e0 <__multiply> 802a6f4: 9901 ldr r1, [sp, #4] 802a6f6: 9004 str r0, [sp, #16] 802a6f8: 4648 mov r0, r9 802a6fa: f000 fddd bl 802b2b8 <_Bfree> 802a6fe: 9a04 ldr r2, [sp, #16] 802a700: 9b0b ldr r3, [sp, #44] @ 0x2c 802a702: 9201 str r2, [sp, #4] 802a704: 1b1a subs r2, r3, r4 802a706: d004 beq.n 802a712 <_dtoa_r+0x6b2> 802a708: 9901 ldr r1, [sp, #4] 802a70a: 4648 mov r0, r9 802a70c: f000 ff92 bl 802b634 <__pow5mult> 802a710: 9001 str r0, [sp, #4] 802a712: 2101 movs r1, #1 802a714: 4648 mov r0, r9 802a716: f000 fecd bl 802b4b4 <__i2b> 802a71a: 9b0a ldr r3, [sp, #40] @ 0x28 802a71c: 4604 mov r4, r0 802a71e: 2b00 cmp r3, #0 802a720: f000 81d0 beq.w 802aac4 <_dtoa_r+0xa64> 802a724: 461a mov r2, r3 802a726: 4601 mov r1, r0 802a728: 4648 mov r0, r9 802a72a: f000 ff83 bl 802b634 <__pow5mult> 802a72e: 9b07 ldr r3, [sp, #28] 802a730: 2b01 cmp r3, #1 802a732: 4604 mov r4, r0 802a734: f300 8095 bgt.w 802a862 <_dtoa_r+0x802> 802a738: 9b02 ldr r3, [sp, #8] 802a73a: 2b00 cmp r3, #0 802a73c: f040 808b bne.w 802a856 <_dtoa_r+0x7f6> 802a740: 9b03 ldr r3, [sp, #12] 802a742: f3c3 0213 ubfx r2, r3, #0, #20 802a746: 2a00 cmp r2, #0 802a748: f040 8087 bne.w 802a85a <_dtoa_r+0x7fa> 802a74c: f023 4200 bic.w r2, r3, #2147483648 @ 0x80000000 802a750: 0d12 lsrs r2, r2, #20 802a752: 0512 lsls r2, r2, #20 802a754: 2a00 cmp r2, #0 802a756: f000 8082 beq.w 802a85e <_dtoa_r+0x7fe> 802a75a: 9b05 ldr r3, [sp, #20] 802a75c: 3301 adds r3, #1 802a75e: 9305 str r3, [sp, #20] 802a760: 9b06 ldr r3, [sp, #24] 802a762: 3301 adds r3, #1 802a764: 9306 str r3, [sp, #24] 802a766: 2301 movs r3, #1 802a768: 930b str r3, [sp, #44] @ 0x2c 802a76a: 9b0a ldr r3, [sp, #40] @ 0x28 802a76c: 2b00 cmp r3, #0 802a76e: f000 81af beq.w 802aad0 <_dtoa_r+0xa70> 802a772: 6922 ldr r2, [r4, #16] 802a774: eb04 0282 add.w r2, r4, r2, lsl #2 802a778: 6910 ldr r0, [r2, #16] 802a77a: f000 fe4f bl 802b41c <__hi0bits> 802a77e: f1c0 0020 rsb r0, r0, #32 802a782: 9b06 ldr r3, [sp, #24] 802a784: 4418 add r0, r3 802a786: f010 001f ands.w r0, r0, #31 802a78a: d076 beq.n 802a87a <_dtoa_r+0x81a> 802a78c: f1c0 0220 rsb r2, r0, #32 802a790: 2a04 cmp r2, #4 802a792: dd69 ble.n 802a868 <_dtoa_r+0x808> 802a794: 9b05 ldr r3, [sp, #20] 802a796: f1c0 001c rsb r0, r0, #28 802a79a: 4403 add r3, r0 802a79c: 9305 str r3, [sp, #20] 802a79e: 9b06 ldr r3, [sp, #24] 802a7a0: 4406 add r6, r0 802a7a2: 4403 add r3, r0 802a7a4: 9306 str r3, [sp, #24] 802a7a6: 9b05 ldr r3, [sp, #20] 802a7a8: 2b00 cmp r3, #0 802a7aa: dd05 ble.n 802a7b8 <_dtoa_r+0x758> 802a7ac: 9901 ldr r1, [sp, #4] 802a7ae: 461a mov r2, r3 802a7b0: 4648 mov r0, r9 802a7b2: f000 ff99 bl 802b6e8 <__lshift> 802a7b6: 9001 str r0, [sp, #4] 802a7b8: 9b06 ldr r3, [sp, #24] 802a7ba: 2b00 cmp r3, #0 802a7bc: dd05 ble.n 802a7ca <_dtoa_r+0x76a> 802a7be: 4621 mov r1, r4 802a7c0: 461a mov r2, r3 802a7c2: 4648 mov r0, r9 802a7c4: f000 ff90 bl 802b6e8 <__lshift> 802a7c8: 4604 mov r4, r0 802a7ca: 9b0c ldr r3, [sp, #48] @ 0x30 802a7cc: 2b00 cmp r3, #0 802a7ce: d056 beq.n 802a87e <_dtoa_r+0x81e> 802a7d0: 9801 ldr r0, [sp, #4] 802a7d2: 4621 mov r1, r4 802a7d4: f000 fff4 bl 802b7c0 <__mcmp> 802a7d8: 2800 cmp r0, #0 802a7da: da50 bge.n 802a87e <_dtoa_r+0x81e> 802a7dc: f108 33ff add.w r3, r8, #4294967295 @ 0xffffffff 802a7e0: 9304 str r3, [sp, #16] 802a7e2: 9901 ldr r1, [sp, #4] 802a7e4: 2300 movs r3, #0 802a7e6: 220a movs r2, #10 802a7e8: 4648 mov r0, r9 802a7ea: f000 fd87 bl 802b2fc <__multadd> 802a7ee: 9b08 ldr r3, [sp, #32] 802a7f0: 9001 str r0, [sp, #4] 802a7f2: 2b00 cmp r3, #0 802a7f4: f000 816e beq.w 802aad4 <_dtoa_r+0xa74> 802a7f8: 4629 mov r1, r5 802a7fa: 2300 movs r3, #0 802a7fc: 220a movs r2, #10 802a7fe: 4648 mov r0, r9 802a800: f000 fd7c bl 802b2fc <__multadd> 802a804: f1bb 0f00 cmp.w fp, #0 802a808: 4605 mov r5, r0 802a80a: dc64 bgt.n 802a8d6 <_dtoa_r+0x876> 802a80c: 9b07 ldr r3, [sp, #28] 802a80e: 2b02 cmp r3, #2 802a810: dc3e bgt.n 802a890 <_dtoa_r+0x830> 802a812: e060 b.n 802a8d6 <_dtoa_r+0x876> 802a814: 9a0e ldr r2, [sp, #56] @ 0x38 802a816: f1c2 0236 rsb r2, r2, #54 @ 0x36 802a81a: e73c b.n 802a696 <_dtoa_r+0x636> 802a81c: f10a 34ff add.w r4, sl, #4294967295 @ 0xffffffff 802a820: 42a3 cmp r3, r4 802a822: bfbf itttt lt 802a824: 1ae2 sublt r2, r4, r3 802a826: 9b0a ldrlt r3, [sp, #40] @ 0x28 802a828: 189b addlt r3, r3, r2 802a82a: 930a strlt r3, [sp, #40] @ 0x28 802a82c: bfae itee ge 802a82e: 1b1c subge r4, r3, r4 802a830: 4623 movlt r3, r4 802a832: 2400 movlt r4, #0 802a834: f1ba 0f00 cmp.w sl, #0 802a838: bfb5 itete lt 802a83a: 9a05 ldrlt r2, [sp, #20] 802a83c: 9e05 ldrge r6, [sp, #20] 802a83e: eba2 060a sublt.w r6, r2, sl 802a842: 4652 movge r2, sl 802a844: bfb8 it lt 802a846: 2200 movlt r2, #0 802a848: e727 b.n 802a69a <_dtoa_r+0x63a> 802a84a: 9e05 ldr r6, [sp, #20] 802a84c: 9d08 ldr r5, [sp, #32] 802a84e: 461c mov r4, r3 802a850: e730 b.n 802a6b4 <_dtoa_r+0x654> 802a852: 461a mov r2, r3 802a854: e758 b.n 802a708 <_dtoa_r+0x6a8> 802a856: 2300 movs r3, #0 802a858: e786 b.n 802a768 <_dtoa_r+0x708> 802a85a: 9b02 ldr r3, [sp, #8] 802a85c: e784 b.n 802a768 <_dtoa_r+0x708> 802a85e: 920b str r2, [sp, #44] @ 0x2c 802a860: e783 b.n 802a76a <_dtoa_r+0x70a> 802a862: 2300 movs r3, #0 802a864: 930b str r3, [sp, #44] @ 0x2c 802a866: e784 b.n 802a772 <_dtoa_r+0x712> 802a868: d09d beq.n 802a7a6 <_dtoa_r+0x746> 802a86a: 9b05 ldr r3, [sp, #20] 802a86c: 321c adds r2, #28 802a86e: 4413 add r3, r2 802a870: 9305 str r3, [sp, #20] 802a872: 9b06 ldr r3, [sp, #24] 802a874: 4416 add r6, r2 802a876: 4413 add r3, r2 802a878: e794 b.n 802a7a4 <_dtoa_r+0x744> 802a87a: 4602 mov r2, r0 802a87c: e7f5 b.n 802a86a <_dtoa_r+0x80a> 802a87e: f1ba 0f00 cmp.w sl, #0 802a882: f8cd 8010 str.w r8, [sp, #16] 802a886: 46d3 mov fp, sl 802a888: dc21 bgt.n 802a8ce <_dtoa_r+0x86e> 802a88a: 9b07 ldr r3, [sp, #28] 802a88c: 2b02 cmp r3, #2 802a88e: dd1e ble.n 802a8ce <_dtoa_r+0x86e> 802a890: f1bb 0f00 cmp.w fp, #0 802a894: f47f aeb7 bne.w 802a606 <_dtoa_r+0x5a6> 802a898: 4621 mov r1, r4 802a89a: 465b mov r3, fp 802a89c: 2205 movs r2, #5 802a89e: 4648 mov r0, r9 802a8a0: f000 fd2c bl 802b2fc <__multadd> 802a8a4: 4601 mov r1, r0 802a8a6: 4604 mov r4, r0 802a8a8: 9801 ldr r0, [sp, #4] 802a8aa: f000 ff89 bl 802b7c0 <__mcmp> 802a8ae: 2800 cmp r0, #0 802a8b0: f77f aea9 ble.w 802a606 <_dtoa_r+0x5a6> 802a8b4: 463e mov r6, r7 802a8b6: 2331 movs r3, #49 @ 0x31 802a8b8: f806 3b01 strb.w r3, [r6], #1 802a8bc: 9b04 ldr r3, [sp, #16] 802a8be: 3301 adds r3, #1 802a8c0: 9304 str r3, [sp, #16] 802a8c2: e6a4 b.n 802a60e <_dtoa_r+0x5ae> 802a8c4: f8cd 8010 str.w r8, [sp, #16] 802a8c8: 4654 mov r4, sl 802a8ca: 4625 mov r5, r4 802a8cc: e7f2 b.n 802a8b4 <_dtoa_r+0x854> 802a8ce: 9b08 ldr r3, [sp, #32] 802a8d0: 2b00 cmp r3, #0 802a8d2: f000 8103 beq.w 802aadc <_dtoa_r+0xa7c> 802a8d6: 2e00 cmp r6, #0 802a8d8: dd05 ble.n 802a8e6 <_dtoa_r+0x886> 802a8da: 4629 mov r1, r5 802a8dc: 4632 mov r2, r6 802a8de: 4648 mov r0, r9 802a8e0: f000 ff02 bl 802b6e8 <__lshift> 802a8e4: 4605 mov r5, r0 802a8e6: 9b0b ldr r3, [sp, #44] @ 0x2c 802a8e8: 2b00 cmp r3, #0 802a8ea: d058 beq.n 802a99e <_dtoa_r+0x93e> 802a8ec: 6869 ldr r1, [r5, #4] 802a8ee: 4648 mov r0, r9 802a8f0: f000 fca2 bl 802b238 <_Balloc> 802a8f4: 4606 mov r6, r0 802a8f6: b928 cbnz r0, 802a904 <_dtoa_r+0x8a4> 802a8f8: 4b82 ldr r3, [pc, #520] @ (802ab04 <_dtoa_r+0xaa4>) 802a8fa: 4602 mov r2, r0 802a8fc: f240 21ef movw r1, #751 @ 0x2ef 802a900: f7ff bbc7 b.w 802a092 <_dtoa_r+0x32> 802a904: 692a ldr r2, [r5, #16] 802a906: 3202 adds r2, #2 802a908: 0092 lsls r2, r2, #2 802a90a: f105 010c add.w r1, r5, #12 802a90e: 300c adds r0, #12 802a910: f7ff fae5 bl 8029ede 802a914: 2201 movs r2, #1 802a916: 4631 mov r1, r6 802a918: 4648 mov r0, r9 802a91a: f000 fee5 bl 802b6e8 <__lshift> 802a91e: 1c7b adds r3, r7, #1 802a920: 9305 str r3, [sp, #20] 802a922: eb07 030b add.w r3, r7, fp 802a926: 9309 str r3, [sp, #36] @ 0x24 802a928: 9b02 ldr r3, [sp, #8] 802a92a: f003 0301 and.w r3, r3, #1 802a92e: 46a8 mov r8, r5 802a930: 9308 str r3, [sp, #32] 802a932: 4605 mov r5, r0 802a934: 9b05 ldr r3, [sp, #20] 802a936: 9801 ldr r0, [sp, #4] 802a938: 4621 mov r1, r4 802a93a: f103 3bff add.w fp, r3, #4294967295 @ 0xffffffff 802a93e: f7ff fb05 bl 8029f4c 802a942: 4641 mov r1, r8 802a944: 9002 str r0, [sp, #8] 802a946: f100 0a30 add.w sl, r0, #48 @ 0x30 802a94a: 9801 ldr r0, [sp, #4] 802a94c: f000 ff38 bl 802b7c0 <__mcmp> 802a950: 462a mov r2, r5 802a952: 9006 str r0, [sp, #24] 802a954: 4621 mov r1, r4 802a956: 4648 mov r0, r9 802a958: f000 ff4e bl 802b7f8 <__mdiff> 802a95c: 68c2 ldr r2, [r0, #12] 802a95e: 4606 mov r6, r0 802a960: b9fa cbnz r2, 802a9a2 <_dtoa_r+0x942> 802a962: 4601 mov r1, r0 802a964: 9801 ldr r0, [sp, #4] 802a966: f000 ff2b bl 802b7c0 <__mcmp> 802a96a: 4602 mov r2, r0 802a96c: 4631 mov r1, r6 802a96e: 4648 mov r0, r9 802a970: 920a str r2, [sp, #40] @ 0x28 802a972: f000 fca1 bl 802b2b8 <_Bfree> 802a976: 9b07 ldr r3, [sp, #28] 802a978: 9a0a ldr r2, [sp, #40] @ 0x28 802a97a: 9e05 ldr r6, [sp, #20] 802a97c: ea43 0102 orr.w r1, r3, r2 802a980: 9b08 ldr r3, [sp, #32] 802a982: 4319 orrs r1, r3 802a984: d10f bne.n 802a9a6 <_dtoa_r+0x946> 802a986: f1ba 0f39 cmp.w sl, #57 @ 0x39 802a98a: d028 beq.n 802a9de <_dtoa_r+0x97e> 802a98c: 9b06 ldr r3, [sp, #24] 802a98e: 2b00 cmp r3, #0 802a990: dd02 ble.n 802a998 <_dtoa_r+0x938> 802a992: 9b02 ldr r3, [sp, #8] 802a994: f103 0a31 add.w sl, r3, #49 @ 0x31 802a998: f88b a000 strb.w sl, [fp] 802a99c: e639 b.n 802a612 <_dtoa_r+0x5b2> 802a99e: 4628 mov r0, r5 802a9a0: e7bd b.n 802a91e <_dtoa_r+0x8be> 802a9a2: 2201 movs r2, #1 802a9a4: e7e2 b.n 802a96c <_dtoa_r+0x90c> 802a9a6: 9b06 ldr r3, [sp, #24] 802a9a8: 2b00 cmp r3, #0 802a9aa: db04 blt.n 802a9b6 <_dtoa_r+0x956> 802a9ac: 9907 ldr r1, [sp, #28] 802a9ae: 430b orrs r3, r1 802a9b0: 9908 ldr r1, [sp, #32] 802a9b2: 430b orrs r3, r1 802a9b4: d120 bne.n 802a9f8 <_dtoa_r+0x998> 802a9b6: 2a00 cmp r2, #0 802a9b8: ddee ble.n 802a998 <_dtoa_r+0x938> 802a9ba: 9901 ldr r1, [sp, #4] 802a9bc: 2201 movs r2, #1 802a9be: 4648 mov r0, r9 802a9c0: f000 fe92 bl 802b6e8 <__lshift> 802a9c4: 4621 mov r1, r4 802a9c6: 9001 str r0, [sp, #4] 802a9c8: f000 fefa bl 802b7c0 <__mcmp> 802a9cc: 2800 cmp r0, #0 802a9ce: dc03 bgt.n 802a9d8 <_dtoa_r+0x978> 802a9d0: d1e2 bne.n 802a998 <_dtoa_r+0x938> 802a9d2: f01a 0f01 tst.w sl, #1 802a9d6: d0df beq.n 802a998 <_dtoa_r+0x938> 802a9d8: f1ba 0f39 cmp.w sl, #57 @ 0x39 802a9dc: d1d9 bne.n 802a992 <_dtoa_r+0x932> 802a9de: 2339 movs r3, #57 @ 0x39 802a9e0: f88b 3000 strb.w r3, [fp] 802a9e4: 4633 mov r3, r6 802a9e6: 461e mov r6, r3 802a9e8: 3b01 subs r3, #1 802a9ea: f816 2c01 ldrb.w r2, [r6, #-1] 802a9ee: 2a39 cmp r2, #57 @ 0x39 802a9f0: d053 beq.n 802aa9a <_dtoa_r+0xa3a> 802a9f2: 3201 adds r2, #1 802a9f4: 701a strb r2, [r3, #0] 802a9f6: e60c b.n 802a612 <_dtoa_r+0x5b2> 802a9f8: 2a00 cmp r2, #0 802a9fa: dd07 ble.n 802aa0c <_dtoa_r+0x9ac> 802a9fc: f1ba 0f39 cmp.w sl, #57 @ 0x39 802aa00: d0ed beq.n 802a9de <_dtoa_r+0x97e> 802aa02: f10a 0301 add.w r3, sl, #1 802aa06: f88b 3000 strb.w r3, [fp] 802aa0a: e602 b.n 802a612 <_dtoa_r+0x5b2> 802aa0c: 9b05 ldr r3, [sp, #20] 802aa0e: 9a05 ldr r2, [sp, #20] 802aa10: f803 ac01 strb.w sl, [r3, #-1] 802aa14: 9b09 ldr r3, [sp, #36] @ 0x24 802aa16: 4293 cmp r3, r2 802aa18: d029 beq.n 802aa6e <_dtoa_r+0xa0e> 802aa1a: 9901 ldr r1, [sp, #4] 802aa1c: 2300 movs r3, #0 802aa1e: 220a movs r2, #10 802aa20: 4648 mov r0, r9 802aa22: f000 fc6b bl 802b2fc <__multadd> 802aa26: 45a8 cmp r8, r5 802aa28: 9001 str r0, [sp, #4] 802aa2a: f04f 0300 mov.w r3, #0 802aa2e: f04f 020a mov.w r2, #10 802aa32: 4641 mov r1, r8 802aa34: 4648 mov r0, r9 802aa36: d107 bne.n 802aa48 <_dtoa_r+0x9e8> 802aa38: f000 fc60 bl 802b2fc <__multadd> 802aa3c: 4680 mov r8, r0 802aa3e: 4605 mov r5, r0 802aa40: 9b05 ldr r3, [sp, #20] 802aa42: 3301 adds r3, #1 802aa44: 9305 str r3, [sp, #20] 802aa46: e775 b.n 802a934 <_dtoa_r+0x8d4> 802aa48: f000 fc58 bl 802b2fc <__multadd> 802aa4c: 4629 mov r1, r5 802aa4e: 4680 mov r8, r0 802aa50: 2300 movs r3, #0 802aa52: 220a movs r2, #10 802aa54: 4648 mov r0, r9 802aa56: f000 fc51 bl 802b2fc <__multadd> 802aa5a: 4605 mov r5, r0 802aa5c: e7f0 b.n 802aa40 <_dtoa_r+0x9e0> 802aa5e: f1bb 0f00 cmp.w fp, #0 802aa62: bfcc ite gt 802aa64: 465e movgt r6, fp 802aa66: 2601 movle r6, #1 802aa68: 443e add r6, r7 802aa6a: f04f 0800 mov.w r8, #0 802aa6e: 9901 ldr r1, [sp, #4] 802aa70: 2201 movs r2, #1 802aa72: 4648 mov r0, r9 802aa74: f000 fe38 bl 802b6e8 <__lshift> 802aa78: 4621 mov r1, r4 802aa7a: 9001 str r0, [sp, #4] 802aa7c: f000 fea0 bl 802b7c0 <__mcmp> 802aa80: 2800 cmp r0, #0 802aa82: dcaf bgt.n 802a9e4 <_dtoa_r+0x984> 802aa84: d102 bne.n 802aa8c <_dtoa_r+0xa2c> 802aa86: f01a 0f01 tst.w sl, #1 802aa8a: d1ab bne.n 802a9e4 <_dtoa_r+0x984> 802aa8c: 4633 mov r3, r6 802aa8e: 461e mov r6, r3 802aa90: f813 2d01 ldrb.w r2, [r3, #-1]! 802aa94: 2a30 cmp r2, #48 @ 0x30 802aa96: d0fa beq.n 802aa8e <_dtoa_r+0xa2e> 802aa98: e5bb b.n 802a612 <_dtoa_r+0x5b2> 802aa9a: 429f cmp r7, r3 802aa9c: d1a3 bne.n 802a9e6 <_dtoa_r+0x986> 802aa9e: 9b04 ldr r3, [sp, #16] 802aaa0: 3301 adds r3, #1 802aaa2: 9304 str r3, [sp, #16] 802aaa4: 2331 movs r3, #49 @ 0x31 802aaa6: 703b strb r3, [r7, #0] 802aaa8: e5b3 b.n 802a612 <_dtoa_r+0x5b2> 802aaaa: 9b1d ldr r3, [sp, #116] @ 0x74 802aaac: 4f16 ldr r7, [pc, #88] @ (802ab08 <_dtoa_r+0xaa8>) 802aaae: b11b cbz r3, 802aab8 <_dtoa_r+0xa58> 802aab0: f107 0308 add.w r3, r7, #8 802aab4: 9a1d ldr r2, [sp, #116] @ 0x74 802aab6: 6013 str r3, [r2, #0] 802aab8: 4638 mov r0, r7 802aaba: b011 add sp, #68 @ 0x44 802aabc: ecbd 8b02 vpop {d8} 802aac0: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802aac4: 9b07 ldr r3, [sp, #28] 802aac6: 2b01 cmp r3, #1 802aac8: f77f ae36 ble.w 802a738 <_dtoa_r+0x6d8> 802aacc: 9b0a ldr r3, [sp, #40] @ 0x28 802aace: 930b str r3, [sp, #44] @ 0x2c 802aad0: 2001 movs r0, #1 802aad2: e656 b.n 802a782 <_dtoa_r+0x722> 802aad4: f1bb 0f00 cmp.w fp, #0 802aad8: f77f aed7 ble.w 802a88a <_dtoa_r+0x82a> 802aadc: 463e mov r6, r7 802aade: 9801 ldr r0, [sp, #4] 802aae0: 4621 mov r1, r4 802aae2: f7ff fa33 bl 8029f4c 802aae6: f100 0a30 add.w sl, r0, #48 @ 0x30 802aaea: f806 ab01 strb.w sl, [r6], #1 802aaee: 1bf2 subs r2, r6, r7 802aaf0: 4593 cmp fp, r2 802aaf2: ddb4 ble.n 802aa5e <_dtoa_r+0x9fe> 802aaf4: 9901 ldr r1, [sp, #4] 802aaf6: 2300 movs r3, #0 802aaf8: 220a movs r2, #10 802aafa: 4648 mov r0, r9 802aafc: f000 fbfe bl 802b2fc <__multadd> 802ab00: 9001 str r0, [sp, #4] 802ab02: e7ec b.n 802aade <_dtoa_r+0xa7e> 802ab04: 08030ec6 .word 0x08030ec6 802ab08: 08030e61 .word 0x08030e61 0802ab0c <_free_r>: 802ab0c: b538 push {r3, r4, r5, lr} 802ab0e: 4605 mov r5, r0 802ab10: 2900 cmp r1, #0 802ab12: d041 beq.n 802ab98 <_free_r+0x8c> 802ab14: f851 3c04 ldr.w r3, [r1, #-4] 802ab18: 1f0c subs r4, r1, #4 802ab1a: 2b00 cmp r3, #0 802ab1c: bfb8 it lt 802ab1e: 18e4 addlt r4, r4, r3 802ab20: f7fd fc1e bl 8028360 <__malloc_lock> 802ab24: 4a1d ldr r2, [pc, #116] @ (802ab9c <_free_r+0x90>) 802ab26: 6813 ldr r3, [r2, #0] 802ab28: b933 cbnz r3, 802ab38 <_free_r+0x2c> 802ab2a: 6063 str r3, [r4, #4] 802ab2c: 6014 str r4, [r2, #0] 802ab2e: 4628 mov r0, r5 802ab30: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} 802ab34: f7fd bc1a b.w 802836c <__malloc_unlock> 802ab38: 42a3 cmp r3, r4 802ab3a: d908 bls.n 802ab4e <_free_r+0x42> 802ab3c: 6820 ldr r0, [r4, #0] 802ab3e: 1821 adds r1, r4, r0 802ab40: 428b cmp r3, r1 802ab42: bf01 itttt eq 802ab44: 6819 ldreq r1, [r3, #0] 802ab46: 685b ldreq r3, [r3, #4] 802ab48: 1809 addeq r1, r1, r0 802ab4a: 6021 streq r1, [r4, #0] 802ab4c: e7ed b.n 802ab2a <_free_r+0x1e> 802ab4e: 461a mov r2, r3 802ab50: 685b ldr r3, [r3, #4] 802ab52: b10b cbz r3, 802ab58 <_free_r+0x4c> 802ab54: 42a3 cmp r3, r4 802ab56: d9fa bls.n 802ab4e <_free_r+0x42> 802ab58: 6811 ldr r1, [r2, #0] 802ab5a: 1850 adds r0, r2, r1 802ab5c: 42a0 cmp r0, r4 802ab5e: d10b bne.n 802ab78 <_free_r+0x6c> 802ab60: 6820 ldr r0, [r4, #0] 802ab62: 4401 add r1, r0 802ab64: 1850 adds r0, r2, r1 802ab66: 4283 cmp r3, r0 802ab68: 6011 str r1, [r2, #0] 802ab6a: d1e0 bne.n 802ab2e <_free_r+0x22> 802ab6c: 6818 ldr r0, [r3, #0] 802ab6e: 685b ldr r3, [r3, #4] 802ab70: 6053 str r3, [r2, #4] 802ab72: 4408 add r0, r1 802ab74: 6010 str r0, [r2, #0] 802ab76: e7da b.n 802ab2e <_free_r+0x22> 802ab78: d902 bls.n 802ab80 <_free_r+0x74> 802ab7a: 230c movs r3, #12 802ab7c: 602b str r3, [r5, #0] 802ab7e: e7d6 b.n 802ab2e <_free_r+0x22> 802ab80: 6820 ldr r0, [r4, #0] 802ab82: 1821 adds r1, r4, r0 802ab84: 428b cmp r3, r1 802ab86: bf04 itt eq 802ab88: 6819 ldreq r1, [r3, #0] 802ab8a: 685b ldreq r3, [r3, #4] 802ab8c: 6063 str r3, [r4, #4] 802ab8e: bf04 itt eq 802ab90: 1809 addeq r1, r1, r0 802ab92: 6021 streq r1, [r4, #0] 802ab94: 6054 str r4, [r2, #4] 802ab96: e7ca b.n 802ab2e <_free_r+0x22> 802ab98: bd38 pop {r3, r4, r5, pc} 802ab9a: bf00 nop 802ab9c: 2402b040 .word 0x2402b040 0802aba0 : 802aba0: 6903 ldr r3, [r0, #16] 802aba2: ebb3 1f61 cmp.w r3, r1, asr #5 802aba6: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802abaa: ea4f 1261 mov.w r2, r1, asr #5 802abae: f100 0414 add.w r4, r0, #20 802abb2: dd45 ble.n 802ac40 802abb4: f011 011f ands.w r1, r1, #31 802abb8: eb04 0683 add.w r6, r4, r3, lsl #2 802abbc: eb04 0582 add.w r5, r4, r2, lsl #2 802abc0: d10c bne.n 802abdc 802abc2: f100 0710 add.w r7, r0, #16 802abc6: 4629 mov r1, r5 802abc8: 42b1 cmp r1, r6 802abca: d334 bcc.n 802ac36 802abcc: 1a9b subs r3, r3, r2 802abce: 009b lsls r3, r3, #2 802abd0: 1eea subs r2, r5, #3 802abd2: 4296 cmp r6, r2 802abd4: bf38 it cc 802abd6: 2300 movcc r3, #0 802abd8: 4423 add r3, r4 802abda: e015 b.n 802ac08 802abdc: f854 7022 ldr.w r7, [r4, r2, lsl #2] 802abe0: f1c1 0820 rsb r8, r1, #32 802abe4: 40cf lsrs r7, r1 802abe6: f105 0e04 add.w lr, r5, #4 802abea: 46a1 mov r9, r4 802abec: 4576 cmp r6, lr 802abee: 46f4 mov ip, lr 802abf0: d815 bhi.n 802ac1e 802abf2: 1a9a subs r2, r3, r2 802abf4: 0092 lsls r2, r2, #2 802abf6: 3a04 subs r2, #4 802abf8: 3501 adds r5, #1 802abfa: 42ae cmp r6, r5 802abfc: bf38 it cc 802abfe: 2200 movcc r2, #0 802ac00: 18a3 adds r3, r4, r2 802ac02: 50a7 str r7, [r4, r2] 802ac04: b107 cbz r7, 802ac08 802ac06: 3304 adds r3, #4 802ac08: 1b1a subs r2, r3, r4 802ac0a: 42a3 cmp r3, r4 802ac0c: ea4f 02a2 mov.w r2, r2, asr #2 802ac10: bf08 it eq 802ac12: 2300 moveq r3, #0 802ac14: 6102 str r2, [r0, #16] 802ac16: bf08 it eq 802ac18: 6143 streq r3, [r0, #20] 802ac1a: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 802ac1e: f8dc c000 ldr.w ip, [ip] 802ac22: fa0c fc08 lsl.w ip, ip, r8 802ac26: ea4c 0707 orr.w r7, ip, r7 802ac2a: f849 7b04 str.w r7, [r9], #4 802ac2e: f85e 7b04 ldr.w r7, [lr], #4 802ac32: 40cf lsrs r7, r1 802ac34: e7da b.n 802abec 802ac36: f851 cb04 ldr.w ip, [r1], #4 802ac3a: f847 cf04 str.w ip, [r7, #4]! 802ac3e: e7c3 b.n 802abc8 802ac40: 4623 mov r3, r4 802ac42: e7e1 b.n 802ac08 0802ac44 <__hexdig_fun>: 802ac44: f1a0 0330 sub.w r3, r0, #48 @ 0x30 802ac48: 2b09 cmp r3, #9 802ac4a: d802 bhi.n 802ac52 <__hexdig_fun+0xe> 802ac4c: 3820 subs r0, #32 802ac4e: b2c0 uxtb r0, r0 802ac50: 4770 bx lr 802ac52: f1a0 0361 sub.w r3, r0, #97 @ 0x61 802ac56: 2b05 cmp r3, #5 802ac58: d801 bhi.n 802ac5e <__hexdig_fun+0x1a> 802ac5a: 3847 subs r0, #71 @ 0x47 802ac5c: e7f7 b.n 802ac4e <__hexdig_fun+0xa> 802ac5e: f1a0 0341 sub.w r3, r0, #65 @ 0x41 802ac62: 2b05 cmp r3, #5 802ac64: d801 bhi.n 802ac6a <__hexdig_fun+0x26> 802ac66: 3827 subs r0, #39 @ 0x27 802ac68: e7f1 b.n 802ac4e <__hexdig_fun+0xa> 802ac6a: 2000 movs r0, #0 802ac6c: 4770 bx lr ... 0802ac70 <__gethex>: 802ac70: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802ac74: b085 sub sp, #20 802ac76: 468a mov sl, r1 802ac78: 9302 str r3, [sp, #8] 802ac7a: 680b ldr r3, [r1, #0] 802ac7c: 9001 str r0, [sp, #4] 802ac7e: 4690 mov r8, r2 802ac80: 1c9c adds r4, r3, #2 802ac82: 46a1 mov r9, r4 802ac84: f814 0b01 ldrb.w r0, [r4], #1 802ac88: 2830 cmp r0, #48 @ 0x30 802ac8a: d0fa beq.n 802ac82 <__gethex+0x12> 802ac8c: eba9 0303 sub.w r3, r9, r3 802ac90: f1a3 0b02 sub.w fp, r3, #2 802ac94: f7ff ffd6 bl 802ac44 <__hexdig_fun> 802ac98: 4605 mov r5, r0 802ac9a: 2800 cmp r0, #0 802ac9c: d168 bne.n 802ad70 <__gethex+0x100> 802ac9e: 49a0 ldr r1, [pc, #640] @ (802af20 <__gethex+0x2b0>) 802aca0: 2201 movs r2, #1 802aca2: 4648 mov r0, r9 802aca4: f7ff f82c bl 8029d00 802aca8: 4607 mov r7, r0 802acaa: 2800 cmp r0, #0 802acac: d167 bne.n 802ad7e <__gethex+0x10e> 802acae: f899 0001 ldrb.w r0, [r9, #1] 802acb2: 4626 mov r6, r4 802acb4: f7ff ffc6 bl 802ac44 <__hexdig_fun> 802acb8: 2800 cmp r0, #0 802acba: d062 beq.n 802ad82 <__gethex+0x112> 802acbc: 4623 mov r3, r4 802acbe: 7818 ldrb r0, [r3, #0] 802acc0: 2830 cmp r0, #48 @ 0x30 802acc2: 4699 mov r9, r3 802acc4: f103 0301 add.w r3, r3, #1 802acc8: d0f9 beq.n 802acbe <__gethex+0x4e> 802acca: f7ff ffbb bl 802ac44 <__hexdig_fun> 802acce: fab0 f580 clz r5, r0 802acd2: 096d lsrs r5, r5, #5 802acd4: f04f 0b01 mov.w fp, #1 802acd8: 464a mov r2, r9 802acda: 4616 mov r6, r2 802acdc: 3201 adds r2, #1 802acde: 7830 ldrb r0, [r6, #0] 802ace0: f7ff ffb0 bl 802ac44 <__hexdig_fun> 802ace4: 2800 cmp r0, #0 802ace6: d1f8 bne.n 802acda <__gethex+0x6a> 802ace8: 498d ldr r1, [pc, #564] @ (802af20 <__gethex+0x2b0>) 802acea: 2201 movs r2, #1 802acec: 4630 mov r0, r6 802acee: f7ff f807 bl 8029d00 802acf2: 2800 cmp r0, #0 802acf4: d13f bne.n 802ad76 <__gethex+0x106> 802acf6: b944 cbnz r4, 802ad0a <__gethex+0x9a> 802acf8: 1c74 adds r4, r6, #1 802acfa: 4622 mov r2, r4 802acfc: 4616 mov r6, r2 802acfe: 3201 adds r2, #1 802ad00: 7830 ldrb r0, [r6, #0] 802ad02: f7ff ff9f bl 802ac44 <__hexdig_fun> 802ad06: 2800 cmp r0, #0 802ad08: d1f8 bne.n 802acfc <__gethex+0x8c> 802ad0a: 1ba4 subs r4, r4, r6 802ad0c: 00a7 lsls r7, r4, #2 802ad0e: 7833 ldrb r3, [r6, #0] 802ad10: f003 03df and.w r3, r3, #223 @ 0xdf 802ad14: 2b50 cmp r3, #80 @ 0x50 802ad16: d13e bne.n 802ad96 <__gethex+0x126> 802ad18: 7873 ldrb r3, [r6, #1] 802ad1a: 2b2b cmp r3, #43 @ 0x2b 802ad1c: d033 beq.n 802ad86 <__gethex+0x116> 802ad1e: 2b2d cmp r3, #45 @ 0x2d 802ad20: d034 beq.n 802ad8c <__gethex+0x11c> 802ad22: 1c71 adds r1, r6, #1 802ad24: 2400 movs r4, #0 802ad26: 7808 ldrb r0, [r1, #0] 802ad28: f7ff ff8c bl 802ac44 <__hexdig_fun> 802ad2c: 1e43 subs r3, r0, #1 802ad2e: b2db uxtb r3, r3 802ad30: 2b18 cmp r3, #24 802ad32: d830 bhi.n 802ad96 <__gethex+0x126> 802ad34: f1a0 0210 sub.w r2, r0, #16 802ad38: f811 0f01 ldrb.w r0, [r1, #1]! 802ad3c: f7ff ff82 bl 802ac44 <__hexdig_fun> 802ad40: f100 3cff add.w ip, r0, #4294967295 @ 0xffffffff 802ad44: fa5f fc8c uxtb.w ip, ip 802ad48: f1bc 0f18 cmp.w ip, #24 802ad4c: f04f 030a mov.w r3, #10 802ad50: d91e bls.n 802ad90 <__gethex+0x120> 802ad52: b104 cbz r4, 802ad56 <__gethex+0xe6> 802ad54: 4252 negs r2, r2 802ad56: 4417 add r7, r2 802ad58: f8ca 1000 str.w r1, [sl] 802ad5c: b1ed cbz r5, 802ad9a <__gethex+0x12a> 802ad5e: f1bb 0f00 cmp.w fp, #0 802ad62: bf0c ite eq 802ad64: 2506 moveq r5, #6 802ad66: 2500 movne r5, #0 802ad68: 4628 mov r0, r5 802ad6a: b005 add sp, #20 802ad6c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802ad70: 2500 movs r5, #0 802ad72: 462c mov r4, r5 802ad74: e7b0 b.n 802acd8 <__gethex+0x68> 802ad76: 2c00 cmp r4, #0 802ad78: d1c7 bne.n 802ad0a <__gethex+0x9a> 802ad7a: 4627 mov r7, r4 802ad7c: e7c7 b.n 802ad0e <__gethex+0x9e> 802ad7e: 464e mov r6, r9 802ad80: 462f mov r7, r5 802ad82: 2501 movs r5, #1 802ad84: e7c3 b.n 802ad0e <__gethex+0x9e> 802ad86: 2400 movs r4, #0 802ad88: 1cb1 adds r1, r6, #2 802ad8a: e7cc b.n 802ad26 <__gethex+0xb6> 802ad8c: 2401 movs r4, #1 802ad8e: e7fb b.n 802ad88 <__gethex+0x118> 802ad90: fb03 0002 mla r0, r3, r2, r0 802ad94: e7ce b.n 802ad34 <__gethex+0xc4> 802ad96: 4631 mov r1, r6 802ad98: e7de b.n 802ad58 <__gethex+0xe8> 802ad9a: eba6 0309 sub.w r3, r6, r9 802ad9e: 3b01 subs r3, #1 802ada0: 4629 mov r1, r5 802ada2: 2b07 cmp r3, #7 802ada4: dc0a bgt.n 802adbc <__gethex+0x14c> 802ada6: 9801 ldr r0, [sp, #4] 802ada8: f000 fa46 bl 802b238 <_Balloc> 802adac: 4604 mov r4, r0 802adae: b940 cbnz r0, 802adc2 <__gethex+0x152> 802adb0: 4b5c ldr r3, [pc, #368] @ (802af24 <__gethex+0x2b4>) 802adb2: 4602 mov r2, r0 802adb4: 21e4 movs r1, #228 @ 0xe4 802adb6: 485c ldr r0, [pc, #368] @ (802af28 <__gethex+0x2b8>) 802adb8: f7ff f8aa bl 8029f10 <__assert_func> 802adbc: 3101 adds r1, #1 802adbe: 105b asrs r3, r3, #1 802adc0: e7ef b.n 802ada2 <__gethex+0x132> 802adc2: f100 0a14 add.w sl, r0, #20 802adc6: 2300 movs r3, #0 802adc8: 4655 mov r5, sl 802adca: 469b mov fp, r3 802adcc: 45b1 cmp r9, r6 802adce: d337 bcc.n 802ae40 <__gethex+0x1d0> 802add0: f845 bb04 str.w fp, [r5], #4 802add4: eba5 050a sub.w r5, r5, sl 802add8: 10ad asrs r5, r5, #2 802adda: 6125 str r5, [r4, #16] 802addc: 4658 mov r0, fp 802adde: f000 fb1d bl 802b41c <__hi0bits> 802ade2: 016d lsls r5, r5, #5 802ade4: f8d8 6000 ldr.w r6, [r8] 802ade8: 1a2d subs r5, r5, r0 802adea: 42b5 cmp r5, r6 802adec: dd54 ble.n 802ae98 <__gethex+0x228> 802adee: 1bad subs r5, r5, r6 802adf0: 4629 mov r1, r5 802adf2: 4620 mov r0, r4 802adf4: f000 feae bl 802bb54 <__any_on> 802adf8: 4681 mov r9, r0 802adfa: b178 cbz r0, 802ae1c <__gethex+0x1ac> 802adfc: 1e6b subs r3, r5, #1 802adfe: 1159 asrs r1, r3, #5 802ae00: f003 021f and.w r2, r3, #31 802ae04: f85a 1021 ldr.w r1, [sl, r1, lsl #2] 802ae08: f04f 0901 mov.w r9, #1 802ae0c: fa09 f202 lsl.w r2, r9, r2 802ae10: 420a tst r2, r1 802ae12: d003 beq.n 802ae1c <__gethex+0x1ac> 802ae14: 454b cmp r3, r9 802ae16: dc36 bgt.n 802ae86 <__gethex+0x216> 802ae18: f04f 0902 mov.w r9, #2 802ae1c: 4629 mov r1, r5 802ae1e: 4620 mov r0, r4 802ae20: f7ff febe bl 802aba0 802ae24: 442f add r7, r5 802ae26: f8d8 3008 ldr.w r3, [r8, #8] 802ae2a: 42bb cmp r3, r7 802ae2c: da42 bge.n 802aeb4 <__gethex+0x244> 802ae2e: 9801 ldr r0, [sp, #4] 802ae30: 4621 mov r1, r4 802ae32: f000 fa41 bl 802b2b8 <_Bfree> 802ae36: 9a0e ldr r2, [sp, #56] @ 0x38 802ae38: 2300 movs r3, #0 802ae3a: 6013 str r3, [r2, #0] 802ae3c: 25a3 movs r5, #163 @ 0xa3 802ae3e: e793 b.n 802ad68 <__gethex+0xf8> 802ae40: f816 2d01 ldrb.w r2, [r6, #-1]! 802ae44: 2a2e cmp r2, #46 @ 0x2e 802ae46: d012 beq.n 802ae6e <__gethex+0x1fe> 802ae48: 2b20 cmp r3, #32 802ae4a: d104 bne.n 802ae56 <__gethex+0x1e6> 802ae4c: f845 bb04 str.w fp, [r5], #4 802ae50: f04f 0b00 mov.w fp, #0 802ae54: 465b mov r3, fp 802ae56: 7830 ldrb r0, [r6, #0] 802ae58: 9303 str r3, [sp, #12] 802ae5a: f7ff fef3 bl 802ac44 <__hexdig_fun> 802ae5e: 9b03 ldr r3, [sp, #12] 802ae60: f000 000f and.w r0, r0, #15 802ae64: 4098 lsls r0, r3 802ae66: ea4b 0b00 orr.w fp, fp, r0 802ae6a: 3304 adds r3, #4 802ae6c: e7ae b.n 802adcc <__gethex+0x15c> 802ae6e: 45b1 cmp r9, r6 802ae70: d8ea bhi.n 802ae48 <__gethex+0x1d8> 802ae72: 492b ldr r1, [pc, #172] @ (802af20 <__gethex+0x2b0>) 802ae74: 9303 str r3, [sp, #12] 802ae76: 2201 movs r2, #1 802ae78: 4630 mov r0, r6 802ae7a: f7fe ff41 bl 8029d00 802ae7e: 9b03 ldr r3, [sp, #12] 802ae80: 2800 cmp r0, #0 802ae82: d1e1 bne.n 802ae48 <__gethex+0x1d8> 802ae84: e7a2 b.n 802adcc <__gethex+0x15c> 802ae86: 1ea9 subs r1, r5, #2 802ae88: 4620 mov r0, r4 802ae8a: f000 fe63 bl 802bb54 <__any_on> 802ae8e: 2800 cmp r0, #0 802ae90: d0c2 beq.n 802ae18 <__gethex+0x1a8> 802ae92: f04f 0903 mov.w r9, #3 802ae96: e7c1 b.n 802ae1c <__gethex+0x1ac> 802ae98: da09 bge.n 802aeae <__gethex+0x23e> 802ae9a: 1b75 subs r5, r6, r5 802ae9c: 4621 mov r1, r4 802ae9e: 9801 ldr r0, [sp, #4] 802aea0: 462a mov r2, r5 802aea2: f000 fc21 bl 802b6e8 <__lshift> 802aea6: 1b7f subs r7, r7, r5 802aea8: 4604 mov r4, r0 802aeaa: f100 0a14 add.w sl, r0, #20 802aeae: f04f 0900 mov.w r9, #0 802aeb2: e7b8 b.n 802ae26 <__gethex+0x1b6> 802aeb4: f8d8 5004 ldr.w r5, [r8, #4] 802aeb8: 42bd cmp r5, r7 802aeba: dd6f ble.n 802af9c <__gethex+0x32c> 802aebc: 1bed subs r5, r5, r7 802aebe: 42ae cmp r6, r5 802aec0: dc34 bgt.n 802af2c <__gethex+0x2bc> 802aec2: f8d8 300c ldr.w r3, [r8, #12] 802aec6: 2b02 cmp r3, #2 802aec8: d022 beq.n 802af10 <__gethex+0x2a0> 802aeca: 2b03 cmp r3, #3 802aecc: d024 beq.n 802af18 <__gethex+0x2a8> 802aece: 2b01 cmp r3, #1 802aed0: d115 bne.n 802aefe <__gethex+0x28e> 802aed2: 42ae cmp r6, r5 802aed4: d113 bne.n 802aefe <__gethex+0x28e> 802aed6: 2e01 cmp r6, #1 802aed8: d10b bne.n 802aef2 <__gethex+0x282> 802aeda: 9a02 ldr r2, [sp, #8] 802aedc: f8d8 3004 ldr.w r3, [r8, #4] 802aee0: 6013 str r3, [r2, #0] 802aee2: 2301 movs r3, #1 802aee4: 6123 str r3, [r4, #16] 802aee6: f8ca 3000 str.w r3, [sl] 802aeea: 9b0e ldr r3, [sp, #56] @ 0x38 802aeec: 2562 movs r5, #98 @ 0x62 802aeee: 601c str r4, [r3, #0] 802aef0: e73a b.n 802ad68 <__gethex+0xf8> 802aef2: 1e71 subs r1, r6, #1 802aef4: 4620 mov r0, r4 802aef6: f000 fe2d bl 802bb54 <__any_on> 802aefa: 2800 cmp r0, #0 802aefc: d1ed bne.n 802aeda <__gethex+0x26a> 802aefe: 9801 ldr r0, [sp, #4] 802af00: 4621 mov r1, r4 802af02: f000 f9d9 bl 802b2b8 <_Bfree> 802af06: 9a0e ldr r2, [sp, #56] @ 0x38 802af08: 2300 movs r3, #0 802af0a: 6013 str r3, [r2, #0] 802af0c: 2550 movs r5, #80 @ 0x50 802af0e: e72b b.n 802ad68 <__gethex+0xf8> 802af10: 9b0f ldr r3, [sp, #60] @ 0x3c 802af12: 2b00 cmp r3, #0 802af14: d1f3 bne.n 802aefe <__gethex+0x28e> 802af16: e7e0 b.n 802aeda <__gethex+0x26a> 802af18: 9b0f ldr r3, [sp, #60] @ 0x3c 802af1a: 2b00 cmp r3, #0 802af1c: d1dd bne.n 802aeda <__gethex+0x26a> 802af1e: e7ee b.n 802aefe <__gethex+0x28e> 802af20: 08030c95 .word 0x08030c95 802af24: 08030ec6 .word 0x08030ec6 802af28: 08030ed7 .word 0x08030ed7 802af2c: 1e6f subs r7, r5, #1 802af2e: f1b9 0f00 cmp.w r9, #0 802af32: d130 bne.n 802af96 <__gethex+0x326> 802af34: b127 cbz r7, 802af40 <__gethex+0x2d0> 802af36: 4639 mov r1, r7 802af38: 4620 mov r0, r4 802af3a: f000 fe0b bl 802bb54 <__any_on> 802af3e: 4681 mov r9, r0 802af40: 117a asrs r2, r7, #5 802af42: 2301 movs r3, #1 802af44: f85a 2022 ldr.w r2, [sl, r2, lsl #2] 802af48: f007 071f and.w r7, r7, #31 802af4c: 40bb lsls r3, r7 802af4e: 4213 tst r3, r2 802af50: 4629 mov r1, r5 802af52: 4620 mov r0, r4 802af54: bf18 it ne 802af56: f049 0902 orrne.w r9, r9, #2 802af5a: f7ff fe21 bl 802aba0 802af5e: f8d8 7004 ldr.w r7, [r8, #4] 802af62: 1b76 subs r6, r6, r5 802af64: 2502 movs r5, #2 802af66: f1b9 0f00 cmp.w r9, #0 802af6a: d047 beq.n 802affc <__gethex+0x38c> 802af6c: f8d8 300c ldr.w r3, [r8, #12] 802af70: 2b02 cmp r3, #2 802af72: d015 beq.n 802afa0 <__gethex+0x330> 802af74: 2b03 cmp r3, #3 802af76: d017 beq.n 802afa8 <__gethex+0x338> 802af78: 2b01 cmp r3, #1 802af7a: d109 bne.n 802af90 <__gethex+0x320> 802af7c: f019 0f02 tst.w r9, #2 802af80: d006 beq.n 802af90 <__gethex+0x320> 802af82: f8da 3000 ldr.w r3, [sl] 802af86: ea49 0903 orr.w r9, r9, r3 802af8a: f019 0f01 tst.w r9, #1 802af8e: d10e bne.n 802afae <__gethex+0x33e> 802af90: f045 0510 orr.w r5, r5, #16 802af94: e032 b.n 802affc <__gethex+0x38c> 802af96: f04f 0901 mov.w r9, #1 802af9a: e7d1 b.n 802af40 <__gethex+0x2d0> 802af9c: 2501 movs r5, #1 802af9e: e7e2 b.n 802af66 <__gethex+0x2f6> 802afa0: 9b0f ldr r3, [sp, #60] @ 0x3c 802afa2: f1c3 0301 rsb r3, r3, #1 802afa6: 930f str r3, [sp, #60] @ 0x3c 802afa8: 9b0f ldr r3, [sp, #60] @ 0x3c 802afaa: 2b00 cmp r3, #0 802afac: d0f0 beq.n 802af90 <__gethex+0x320> 802afae: f8d4 b010 ldr.w fp, [r4, #16] 802afb2: f104 0314 add.w r3, r4, #20 802afb6: ea4f 0a8b mov.w sl, fp, lsl #2 802afba: eb03 018b add.w r1, r3, fp, lsl #2 802afbe: f04f 0c00 mov.w ip, #0 802afc2: 4618 mov r0, r3 802afc4: f853 2b04 ldr.w r2, [r3], #4 802afc8: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff 802afcc: d01b beq.n 802b006 <__gethex+0x396> 802afce: 3201 adds r2, #1 802afd0: 6002 str r2, [r0, #0] 802afd2: 2d02 cmp r5, #2 802afd4: f104 0314 add.w r3, r4, #20 802afd8: d13c bne.n 802b054 <__gethex+0x3e4> 802afda: f8d8 2000 ldr.w r2, [r8] 802afde: 3a01 subs r2, #1 802afe0: 42b2 cmp r2, r6 802afe2: d109 bne.n 802aff8 <__gethex+0x388> 802afe4: 1171 asrs r1, r6, #5 802afe6: 2201 movs r2, #1 802afe8: f853 3021 ldr.w r3, [r3, r1, lsl #2] 802afec: f006 061f and.w r6, r6, #31 802aff0: fa02 f606 lsl.w r6, r2, r6 802aff4: 421e tst r6, r3 802aff6: d13a bne.n 802b06e <__gethex+0x3fe> 802aff8: f045 0520 orr.w r5, r5, #32 802affc: 9b0e ldr r3, [sp, #56] @ 0x38 802affe: 601c str r4, [r3, #0] 802b000: 9b02 ldr r3, [sp, #8] 802b002: 601f str r7, [r3, #0] 802b004: e6b0 b.n 802ad68 <__gethex+0xf8> 802b006: 4299 cmp r1, r3 802b008: f843 cc04 str.w ip, [r3, #-4] 802b00c: d8d9 bhi.n 802afc2 <__gethex+0x352> 802b00e: 68a3 ldr r3, [r4, #8] 802b010: 459b cmp fp, r3 802b012: db17 blt.n 802b044 <__gethex+0x3d4> 802b014: 6861 ldr r1, [r4, #4] 802b016: 9801 ldr r0, [sp, #4] 802b018: 3101 adds r1, #1 802b01a: f000 f90d bl 802b238 <_Balloc> 802b01e: 4681 mov r9, r0 802b020: b918 cbnz r0, 802b02a <__gethex+0x3ba> 802b022: 4b1a ldr r3, [pc, #104] @ (802b08c <__gethex+0x41c>) 802b024: 4602 mov r2, r0 802b026: 2184 movs r1, #132 @ 0x84 802b028: e6c5 b.n 802adb6 <__gethex+0x146> 802b02a: 6922 ldr r2, [r4, #16] 802b02c: 3202 adds r2, #2 802b02e: f104 010c add.w r1, r4, #12 802b032: 0092 lsls r2, r2, #2 802b034: 300c adds r0, #12 802b036: f7fe ff52 bl 8029ede 802b03a: 4621 mov r1, r4 802b03c: 9801 ldr r0, [sp, #4] 802b03e: f000 f93b bl 802b2b8 <_Bfree> 802b042: 464c mov r4, r9 802b044: 6923 ldr r3, [r4, #16] 802b046: 1c5a adds r2, r3, #1 802b048: eb04 0383 add.w r3, r4, r3, lsl #2 802b04c: 6122 str r2, [r4, #16] 802b04e: 2201 movs r2, #1 802b050: 615a str r2, [r3, #20] 802b052: e7be b.n 802afd2 <__gethex+0x362> 802b054: 6922 ldr r2, [r4, #16] 802b056: 455a cmp r2, fp 802b058: dd0b ble.n 802b072 <__gethex+0x402> 802b05a: 2101 movs r1, #1 802b05c: 4620 mov r0, r4 802b05e: f7ff fd9f bl 802aba0 802b062: f8d8 3008 ldr.w r3, [r8, #8] 802b066: 3701 adds r7, #1 802b068: 42bb cmp r3, r7 802b06a: f6ff aee0 blt.w 802ae2e <__gethex+0x1be> 802b06e: 2501 movs r5, #1 802b070: e7c2 b.n 802aff8 <__gethex+0x388> 802b072: f016 061f ands.w r6, r6, #31 802b076: d0fa beq.n 802b06e <__gethex+0x3fe> 802b078: 4453 add r3, sl 802b07a: f1c6 0620 rsb r6, r6, #32 802b07e: f853 0c04 ldr.w r0, [r3, #-4] 802b082: f000 f9cb bl 802b41c <__hi0bits> 802b086: 42b0 cmp r0, r6 802b088: dbe7 blt.n 802b05a <__gethex+0x3ea> 802b08a: e7f0 b.n 802b06e <__gethex+0x3fe> 802b08c: 08030ec6 .word 0x08030ec6 0802b090 : 802b090: f1c2 0208 rsb r2, r2, #8 802b094: 0092 lsls r2, r2, #2 802b096: b570 push {r4, r5, r6, lr} 802b098: f1c2 0620 rsb r6, r2, #32 802b09c: 6843 ldr r3, [r0, #4] 802b09e: 6804 ldr r4, [r0, #0] 802b0a0: fa03 f506 lsl.w r5, r3, r6 802b0a4: 432c orrs r4, r5 802b0a6: 40d3 lsrs r3, r2 802b0a8: 6004 str r4, [r0, #0] 802b0aa: f840 3f04 str.w r3, [r0, #4]! 802b0ae: 4288 cmp r0, r1 802b0b0: d3f4 bcc.n 802b09c 802b0b2: bd70 pop {r4, r5, r6, pc} 0802b0b4 <__match>: 802b0b4: b530 push {r4, r5, lr} 802b0b6: 6803 ldr r3, [r0, #0] 802b0b8: 3301 adds r3, #1 802b0ba: f811 4b01 ldrb.w r4, [r1], #1 802b0be: b914 cbnz r4, 802b0c6 <__match+0x12> 802b0c0: 6003 str r3, [r0, #0] 802b0c2: 2001 movs r0, #1 802b0c4: bd30 pop {r4, r5, pc} 802b0c6: f813 2b01 ldrb.w r2, [r3], #1 802b0ca: f1a2 0541 sub.w r5, r2, #65 @ 0x41 802b0ce: 2d19 cmp r5, #25 802b0d0: bf98 it ls 802b0d2: 3220 addls r2, #32 802b0d4: 42a2 cmp r2, r4 802b0d6: d0f0 beq.n 802b0ba <__match+0x6> 802b0d8: 2000 movs r0, #0 802b0da: e7f3 b.n 802b0c4 <__match+0x10> 0802b0dc <__hexnan>: 802b0dc: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802b0e0: 680b ldr r3, [r1, #0] 802b0e2: 6801 ldr r1, [r0, #0] 802b0e4: 115e asrs r6, r3, #5 802b0e6: eb02 0686 add.w r6, r2, r6, lsl #2 802b0ea: f013 031f ands.w r3, r3, #31 802b0ee: b087 sub sp, #28 802b0f0: bf18 it ne 802b0f2: 3604 addne r6, #4 802b0f4: 2500 movs r5, #0 802b0f6: 1f37 subs r7, r6, #4 802b0f8: 4682 mov sl, r0 802b0fa: 4690 mov r8, r2 802b0fc: 9301 str r3, [sp, #4] 802b0fe: f846 5c04 str.w r5, [r6, #-4] 802b102: 46b9 mov r9, r7 802b104: 463c mov r4, r7 802b106: 9502 str r5, [sp, #8] 802b108: 46ab mov fp, r5 802b10a: 784a ldrb r2, [r1, #1] 802b10c: 1c4b adds r3, r1, #1 802b10e: 9303 str r3, [sp, #12] 802b110: b342 cbz r2, 802b164 <__hexnan+0x88> 802b112: 4610 mov r0, r2 802b114: 9105 str r1, [sp, #20] 802b116: 9204 str r2, [sp, #16] 802b118: f7ff fd94 bl 802ac44 <__hexdig_fun> 802b11c: 2800 cmp r0, #0 802b11e: d151 bne.n 802b1c4 <__hexnan+0xe8> 802b120: 9a04 ldr r2, [sp, #16] 802b122: 9905 ldr r1, [sp, #20] 802b124: 2a20 cmp r2, #32 802b126: d818 bhi.n 802b15a <__hexnan+0x7e> 802b128: 9b02 ldr r3, [sp, #8] 802b12a: 459b cmp fp, r3 802b12c: dd13 ble.n 802b156 <__hexnan+0x7a> 802b12e: 454c cmp r4, r9 802b130: d206 bcs.n 802b140 <__hexnan+0x64> 802b132: 2d07 cmp r5, #7 802b134: dc04 bgt.n 802b140 <__hexnan+0x64> 802b136: 462a mov r2, r5 802b138: 4649 mov r1, r9 802b13a: 4620 mov r0, r4 802b13c: f7ff ffa8 bl 802b090 802b140: 4544 cmp r4, r8 802b142: d952 bls.n 802b1ea <__hexnan+0x10e> 802b144: 2300 movs r3, #0 802b146: f1a4 0904 sub.w r9, r4, #4 802b14a: f844 3c04 str.w r3, [r4, #-4] 802b14e: f8cd b008 str.w fp, [sp, #8] 802b152: 464c mov r4, r9 802b154: 461d mov r5, r3 802b156: 9903 ldr r1, [sp, #12] 802b158: e7d7 b.n 802b10a <__hexnan+0x2e> 802b15a: 2a29 cmp r2, #41 @ 0x29 802b15c: d157 bne.n 802b20e <__hexnan+0x132> 802b15e: 3102 adds r1, #2 802b160: f8ca 1000 str.w r1, [sl] 802b164: f1bb 0f00 cmp.w fp, #0 802b168: d051 beq.n 802b20e <__hexnan+0x132> 802b16a: 454c cmp r4, r9 802b16c: d206 bcs.n 802b17c <__hexnan+0xa0> 802b16e: 2d07 cmp r5, #7 802b170: dc04 bgt.n 802b17c <__hexnan+0xa0> 802b172: 462a mov r2, r5 802b174: 4649 mov r1, r9 802b176: 4620 mov r0, r4 802b178: f7ff ff8a bl 802b090 802b17c: 4544 cmp r4, r8 802b17e: d936 bls.n 802b1ee <__hexnan+0x112> 802b180: f1a8 0204 sub.w r2, r8, #4 802b184: 4623 mov r3, r4 802b186: f853 1b04 ldr.w r1, [r3], #4 802b18a: f842 1f04 str.w r1, [r2, #4]! 802b18e: 429f cmp r7, r3 802b190: d2f9 bcs.n 802b186 <__hexnan+0xaa> 802b192: 1b3b subs r3, r7, r4 802b194: f023 0303 bic.w r3, r3, #3 802b198: 3304 adds r3, #4 802b19a: 3401 adds r4, #1 802b19c: 3e03 subs r6, #3 802b19e: 42b4 cmp r4, r6 802b1a0: bf88 it hi 802b1a2: 2304 movhi r3, #4 802b1a4: 4443 add r3, r8 802b1a6: 2200 movs r2, #0 802b1a8: f843 2b04 str.w r2, [r3], #4 802b1ac: 429f cmp r7, r3 802b1ae: d2fb bcs.n 802b1a8 <__hexnan+0xcc> 802b1b0: 683b ldr r3, [r7, #0] 802b1b2: b91b cbnz r3, 802b1bc <__hexnan+0xe0> 802b1b4: 4547 cmp r7, r8 802b1b6: d128 bne.n 802b20a <__hexnan+0x12e> 802b1b8: 2301 movs r3, #1 802b1ba: 603b str r3, [r7, #0] 802b1bc: 2005 movs r0, #5 802b1be: b007 add sp, #28 802b1c0: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802b1c4: 3501 adds r5, #1 802b1c6: 2d08 cmp r5, #8 802b1c8: f10b 0b01 add.w fp, fp, #1 802b1cc: dd06 ble.n 802b1dc <__hexnan+0x100> 802b1ce: 4544 cmp r4, r8 802b1d0: d9c1 bls.n 802b156 <__hexnan+0x7a> 802b1d2: 2300 movs r3, #0 802b1d4: f844 3c04 str.w r3, [r4, #-4] 802b1d8: 2501 movs r5, #1 802b1da: 3c04 subs r4, #4 802b1dc: 6822 ldr r2, [r4, #0] 802b1de: f000 000f and.w r0, r0, #15 802b1e2: ea40 1002 orr.w r0, r0, r2, lsl #4 802b1e6: 6020 str r0, [r4, #0] 802b1e8: e7b5 b.n 802b156 <__hexnan+0x7a> 802b1ea: 2508 movs r5, #8 802b1ec: e7b3 b.n 802b156 <__hexnan+0x7a> 802b1ee: 9b01 ldr r3, [sp, #4] 802b1f0: 2b00 cmp r3, #0 802b1f2: d0dd beq.n 802b1b0 <__hexnan+0xd4> 802b1f4: f1c3 0320 rsb r3, r3, #32 802b1f8: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 802b1fc: 40da lsrs r2, r3 802b1fe: f856 3c04 ldr.w r3, [r6, #-4] 802b202: 4013 ands r3, r2 802b204: f846 3c04 str.w r3, [r6, #-4] 802b208: e7d2 b.n 802b1b0 <__hexnan+0xd4> 802b20a: 3f04 subs r7, #4 802b20c: e7d0 b.n 802b1b0 <__hexnan+0xd4> 802b20e: 2004 movs r0, #4 802b210: e7d5 b.n 802b1be <__hexnan+0xe2> 0802b212 <__ascii_mbtowc>: 802b212: b082 sub sp, #8 802b214: b901 cbnz r1, 802b218 <__ascii_mbtowc+0x6> 802b216: a901 add r1, sp, #4 802b218: b142 cbz r2, 802b22c <__ascii_mbtowc+0x1a> 802b21a: b14b cbz r3, 802b230 <__ascii_mbtowc+0x1e> 802b21c: 7813 ldrb r3, [r2, #0] 802b21e: 600b str r3, [r1, #0] 802b220: 7812 ldrb r2, [r2, #0] 802b222: 1e10 subs r0, r2, #0 802b224: bf18 it ne 802b226: 2001 movne r0, #1 802b228: b002 add sp, #8 802b22a: 4770 bx lr 802b22c: 4610 mov r0, r2 802b22e: e7fb b.n 802b228 <__ascii_mbtowc+0x16> 802b230: f06f 0001 mvn.w r0, #1 802b234: e7f8 b.n 802b228 <__ascii_mbtowc+0x16> ... 0802b238 <_Balloc>: 802b238: b570 push {r4, r5, r6, lr} 802b23a: 69c6 ldr r6, [r0, #28] 802b23c: 4604 mov r4, r0 802b23e: 460d mov r5, r1 802b240: b976 cbnz r6, 802b260 <_Balloc+0x28> 802b242: 2010 movs r0, #16 802b244: f7fc ffda bl 80281fc 802b248: 4602 mov r2, r0 802b24a: 61e0 str r0, [r4, #28] 802b24c: b920 cbnz r0, 802b258 <_Balloc+0x20> 802b24e: 4b18 ldr r3, [pc, #96] @ (802b2b0 <_Balloc+0x78>) 802b250: 4818 ldr r0, [pc, #96] @ (802b2b4 <_Balloc+0x7c>) 802b252: 216b movs r1, #107 @ 0x6b 802b254: f7fe fe5c bl 8029f10 <__assert_func> 802b258: e9c0 6601 strd r6, r6, [r0, #4] 802b25c: 6006 str r6, [r0, #0] 802b25e: 60c6 str r6, [r0, #12] 802b260: 69e6 ldr r6, [r4, #28] 802b262: 68f3 ldr r3, [r6, #12] 802b264: b183 cbz r3, 802b288 <_Balloc+0x50> 802b266: 69e3 ldr r3, [r4, #28] 802b268: 68db ldr r3, [r3, #12] 802b26a: f853 0025 ldr.w r0, [r3, r5, lsl #2] 802b26e: b9b8 cbnz r0, 802b2a0 <_Balloc+0x68> 802b270: 2101 movs r1, #1 802b272: fa01 f605 lsl.w r6, r1, r5 802b276: 1d72 adds r2, r6, #5 802b278: 0092 lsls r2, r2, #2 802b27a: 4620 mov r0, r4 802b27c: f001 f883 bl 802c386 <_calloc_r> 802b280: b160 cbz r0, 802b29c <_Balloc+0x64> 802b282: e9c0 5601 strd r5, r6, [r0, #4] 802b286: e00e b.n 802b2a6 <_Balloc+0x6e> 802b288: 2221 movs r2, #33 @ 0x21 802b28a: 2104 movs r1, #4 802b28c: 4620 mov r0, r4 802b28e: f001 f87a bl 802c386 <_calloc_r> 802b292: 69e3 ldr r3, [r4, #28] 802b294: 60f0 str r0, [r6, #12] 802b296: 68db ldr r3, [r3, #12] 802b298: 2b00 cmp r3, #0 802b29a: d1e4 bne.n 802b266 <_Balloc+0x2e> 802b29c: 2000 movs r0, #0 802b29e: bd70 pop {r4, r5, r6, pc} 802b2a0: 6802 ldr r2, [r0, #0] 802b2a2: f843 2025 str.w r2, [r3, r5, lsl #2] 802b2a6: 2300 movs r3, #0 802b2a8: e9c0 3303 strd r3, r3, [r0, #12] 802b2ac: e7f7 b.n 802b29e <_Balloc+0x66> 802b2ae: bf00 nop 802b2b0: 08030c26 .word 0x08030c26 802b2b4: 08030f37 .word 0x08030f37 0802b2b8 <_Bfree>: 802b2b8: b570 push {r4, r5, r6, lr} 802b2ba: 69c6 ldr r6, [r0, #28] 802b2bc: 4605 mov r5, r0 802b2be: 460c mov r4, r1 802b2c0: b976 cbnz r6, 802b2e0 <_Bfree+0x28> 802b2c2: 2010 movs r0, #16 802b2c4: f7fc ff9a bl 80281fc 802b2c8: 4602 mov r2, r0 802b2ca: 61e8 str r0, [r5, #28] 802b2cc: b920 cbnz r0, 802b2d8 <_Bfree+0x20> 802b2ce: 4b09 ldr r3, [pc, #36] @ (802b2f4 <_Bfree+0x3c>) 802b2d0: 4809 ldr r0, [pc, #36] @ (802b2f8 <_Bfree+0x40>) 802b2d2: 218f movs r1, #143 @ 0x8f 802b2d4: f7fe fe1c bl 8029f10 <__assert_func> 802b2d8: e9c0 6601 strd r6, r6, [r0, #4] 802b2dc: 6006 str r6, [r0, #0] 802b2de: 60c6 str r6, [r0, #12] 802b2e0: b13c cbz r4, 802b2f2 <_Bfree+0x3a> 802b2e2: 69eb ldr r3, [r5, #28] 802b2e4: 6862 ldr r2, [r4, #4] 802b2e6: 68db ldr r3, [r3, #12] 802b2e8: f853 1022 ldr.w r1, [r3, r2, lsl #2] 802b2ec: 6021 str r1, [r4, #0] 802b2ee: f843 4022 str.w r4, [r3, r2, lsl #2] 802b2f2: bd70 pop {r4, r5, r6, pc} 802b2f4: 08030c26 .word 0x08030c26 802b2f8: 08030f37 .word 0x08030f37 0802b2fc <__multadd>: 802b2fc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802b300: 690d ldr r5, [r1, #16] 802b302: 4607 mov r7, r0 802b304: 460c mov r4, r1 802b306: 461e mov r6, r3 802b308: f101 0c14 add.w ip, r1, #20 802b30c: 2000 movs r0, #0 802b30e: f8dc 3000 ldr.w r3, [ip] 802b312: b299 uxth r1, r3 802b314: fb02 6101 mla r1, r2, r1, r6 802b318: 0c1e lsrs r6, r3, #16 802b31a: 0c0b lsrs r3, r1, #16 802b31c: fb02 3306 mla r3, r2, r6, r3 802b320: b289 uxth r1, r1 802b322: 3001 adds r0, #1 802b324: eb01 4103 add.w r1, r1, r3, lsl #16 802b328: 4285 cmp r5, r0 802b32a: f84c 1b04 str.w r1, [ip], #4 802b32e: ea4f 4613 mov.w r6, r3, lsr #16 802b332: dcec bgt.n 802b30e <__multadd+0x12> 802b334: b30e cbz r6, 802b37a <__multadd+0x7e> 802b336: 68a3 ldr r3, [r4, #8] 802b338: 42ab cmp r3, r5 802b33a: dc19 bgt.n 802b370 <__multadd+0x74> 802b33c: 6861 ldr r1, [r4, #4] 802b33e: 4638 mov r0, r7 802b340: 3101 adds r1, #1 802b342: f7ff ff79 bl 802b238 <_Balloc> 802b346: 4680 mov r8, r0 802b348: b928 cbnz r0, 802b356 <__multadd+0x5a> 802b34a: 4602 mov r2, r0 802b34c: 4b0c ldr r3, [pc, #48] @ (802b380 <__multadd+0x84>) 802b34e: 480d ldr r0, [pc, #52] @ (802b384 <__multadd+0x88>) 802b350: 21ba movs r1, #186 @ 0xba 802b352: f7fe fddd bl 8029f10 <__assert_func> 802b356: 6922 ldr r2, [r4, #16] 802b358: 3202 adds r2, #2 802b35a: f104 010c add.w r1, r4, #12 802b35e: 0092 lsls r2, r2, #2 802b360: 300c adds r0, #12 802b362: f7fe fdbc bl 8029ede 802b366: 4621 mov r1, r4 802b368: 4638 mov r0, r7 802b36a: f7ff ffa5 bl 802b2b8 <_Bfree> 802b36e: 4644 mov r4, r8 802b370: eb04 0385 add.w r3, r4, r5, lsl #2 802b374: 3501 adds r5, #1 802b376: 615e str r6, [r3, #20] 802b378: 6125 str r5, [r4, #16] 802b37a: 4620 mov r0, r4 802b37c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802b380: 08030ec6 .word 0x08030ec6 802b384: 08030f37 .word 0x08030f37 0802b388 <__s2b>: 802b388: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 802b38c: 460c mov r4, r1 802b38e: 4615 mov r5, r2 802b390: 461f mov r7, r3 802b392: 2209 movs r2, #9 802b394: 3308 adds r3, #8 802b396: 4606 mov r6, r0 802b398: fb93 f3f2 sdiv r3, r3, r2 802b39c: 2100 movs r1, #0 802b39e: 2201 movs r2, #1 802b3a0: 429a cmp r2, r3 802b3a2: db09 blt.n 802b3b8 <__s2b+0x30> 802b3a4: 4630 mov r0, r6 802b3a6: f7ff ff47 bl 802b238 <_Balloc> 802b3aa: b940 cbnz r0, 802b3be <__s2b+0x36> 802b3ac: 4602 mov r2, r0 802b3ae: 4b19 ldr r3, [pc, #100] @ (802b414 <__s2b+0x8c>) 802b3b0: 4819 ldr r0, [pc, #100] @ (802b418 <__s2b+0x90>) 802b3b2: 21d3 movs r1, #211 @ 0xd3 802b3b4: f7fe fdac bl 8029f10 <__assert_func> 802b3b8: 0052 lsls r2, r2, #1 802b3ba: 3101 adds r1, #1 802b3bc: e7f0 b.n 802b3a0 <__s2b+0x18> 802b3be: 9b08 ldr r3, [sp, #32] 802b3c0: 6143 str r3, [r0, #20] 802b3c2: 2d09 cmp r5, #9 802b3c4: f04f 0301 mov.w r3, #1 802b3c8: 6103 str r3, [r0, #16] 802b3ca: dd16 ble.n 802b3fa <__s2b+0x72> 802b3cc: f104 0909 add.w r9, r4, #9 802b3d0: 46c8 mov r8, r9 802b3d2: 442c add r4, r5 802b3d4: f818 3b01 ldrb.w r3, [r8], #1 802b3d8: 4601 mov r1, r0 802b3da: 3b30 subs r3, #48 @ 0x30 802b3dc: 220a movs r2, #10 802b3de: 4630 mov r0, r6 802b3e0: f7ff ff8c bl 802b2fc <__multadd> 802b3e4: 45a0 cmp r8, r4 802b3e6: d1f5 bne.n 802b3d4 <__s2b+0x4c> 802b3e8: f1a5 0408 sub.w r4, r5, #8 802b3ec: 444c add r4, r9 802b3ee: 1b2d subs r5, r5, r4 802b3f0: 1963 adds r3, r4, r5 802b3f2: 42bb cmp r3, r7 802b3f4: db04 blt.n 802b400 <__s2b+0x78> 802b3f6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802b3fa: 340a adds r4, #10 802b3fc: 2509 movs r5, #9 802b3fe: e7f6 b.n 802b3ee <__s2b+0x66> 802b400: f814 3b01 ldrb.w r3, [r4], #1 802b404: 4601 mov r1, r0 802b406: 3b30 subs r3, #48 @ 0x30 802b408: 220a movs r2, #10 802b40a: 4630 mov r0, r6 802b40c: f7ff ff76 bl 802b2fc <__multadd> 802b410: e7ee b.n 802b3f0 <__s2b+0x68> 802b412: bf00 nop 802b414: 08030ec6 .word 0x08030ec6 802b418: 08030f37 .word 0x08030f37 0802b41c <__hi0bits>: 802b41c: f5b0 3f80 cmp.w r0, #65536 @ 0x10000 802b420: 4603 mov r3, r0 802b422: bf36 itet cc 802b424: 0403 lslcc r3, r0, #16 802b426: 2000 movcs r0, #0 802b428: 2010 movcc r0, #16 802b42a: f1b3 7f80 cmp.w r3, #16777216 @ 0x1000000 802b42e: bf3c itt cc 802b430: 021b lslcc r3, r3, #8 802b432: 3008 addcc r0, #8 802b434: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 802b438: bf3c itt cc 802b43a: 011b lslcc r3, r3, #4 802b43c: 3004 addcc r0, #4 802b43e: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 802b442: bf3c itt cc 802b444: 009b lslcc r3, r3, #2 802b446: 3002 addcc r0, #2 802b448: 2b00 cmp r3, #0 802b44a: db05 blt.n 802b458 <__hi0bits+0x3c> 802b44c: f013 4f80 tst.w r3, #1073741824 @ 0x40000000 802b450: f100 0001 add.w r0, r0, #1 802b454: bf08 it eq 802b456: 2020 moveq r0, #32 802b458: 4770 bx lr 0802b45a <__lo0bits>: 802b45a: 6803 ldr r3, [r0, #0] 802b45c: 4602 mov r2, r0 802b45e: f013 0007 ands.w r0, r3, #7 802b462: d00b beq.n 802b47c <__lo0bits+0x22> 802b464: 07d9 lsls r1, r3, #31 802b466: d421 bmi.n 802b4ac <__lo0bits+0x52> 802b468: 0798 lsls r0, r3, #30 802b46a: bf49 itett mi 802b46c: 085b lsrmi r3, r3, #1 802b46e: 089b lsrpl r3, r3, #2 802b470: 2001 movmi r0, #1 802b472: 6013 strmi r3, [r2, #0] 802b474: bf5c itt pl 802b476: 6013 strpl r3, [r2, #0] 802b478: 2002 movpl r0, #2 802b47a: 4770 bx lr 802b47c: b299 uxth r1, r3 802b47e: b909 cbnz r1, 802b484 <__lo0bits+0x2a> 802b480: 0c1b lsrs r3, r3, #16 802b482: 2010 movs r0, #16 802b484: b2d9 uxtb r1, r3 802b486: b909 cbnz r1, 802b48c <__lo0bits+0x32> 802b488: 3008 adds r0, #8 802b48a: 0a1b lsrs r3, r3, #8 802b48c: 0719 lsls r1, r3, #28 802b48e: bf04 itt eq 802b490: 091b lsreq r3, r3, #4 802b492: 3004 addeq r0, #4 802b494: 0799 lsls r1, r3, #30 802b496: bf04 itt eq 802b498: 089b lsreq r3, r3, #2 802b49a: 3002 addeq r0, #2 802b49c: 07d9 lsls r1, r3, #31 802b49e: d403 bmi.n 802b4a8 <__lo0bits+0x4e> 802b4a0: 085b lsrs r3, r3, #1 802b4a2: f100 0001 add.w r0, r0, #1 802b4a6: d003 beq.n 802b4b0 <__lo0bits+0x56> 802b4a8: 6013 str r3, [r2, #0] 802b4aa: 4770 bx lr 802b4ac: 2000 movs r0, #0 802b4ae: 4770 bx lr 802b4b0: 2020 movs r0, #32 802b4b2: 4770 bx lr 0802b4b4 <__i2b>: 802b4b4: b510 push {r4, lr} 802b4b6: 460c mov r4, r1 802b4b8: 2101 movs r1, #1 802b4ba: f7ff febd bl 802b238 <_Balloc> 802b4be: 4602 mov r2, r0 802b4c0: b928 cbnz r0, 802b4ce <__i2b+0x1a> 802b4c2: 4b05 ldr r3, [pc, #20] @ (802b4d8 <__i2b+0x24>) 802b4c4: 4805 ldr r0, [pc, #20] @ (802b4dc <__i2b+0x28>) 802b4c6: f240 1145 movw r1, #325 @ 0x145 802b4ca: f7fe fd21 bl 8029f10 <__assert_func> 802b4ce: 2301 movs r3, #1 802b4d0: 6144 str r4, [r0, #20] 802b4d2: 6103 str r3, [r0, #16] 802b4d4: bd10 pop {r4, pc} 802b4d6: bf00 nop 802b4d8: 08030ec6 .word 0x08030ec6 802b4dc: 08030f37 .word 0x08030f37 0802b4e0 <__multiply>: 802b4e0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802b4e4: 4614 mov r4, r2 802b4e6: 690a ldr r2, [r1, #16] 802b4e8: 6923 ldr r3, [r4, #16] 802b4ea: 429a cmp r2, r3 802b4ec: bfa8 it ge 802b4ee: 4623 movge r3, r4 802b4f0: 460f mov r7, r1 802b4f2: bfa4 itt ge 802b4f4: 460c movge r4, r1 802b4f6: 461f movge r7, r3 802b4f8: f8d4 a010 ldr.w sl, [r4, #16] 802b4fc: f8d7 9010 ldr.w r9, [r7, #16] 802b500: 68a3 ldr r3, [r4, #8] 802b502: 6861 ldr r1, [r4, #4] 802b504: eb0a 0609 add.w r6, sl, r9 802b508: 42b3 cmp r3, r6 802b50a: b085 sub sp, #20 802b50c: bfb8 it lt 802b50e: 3101 addlt r1, #1 802b510: f7ff fe92 bl 802b238 <_Balloc> 802b514: b930 cbnz r0, 802b524 <__multiply+0x44> 802b516: 4602 mov r2, r0 802b518: 4b44 ldr r3, [pc, #272] @ (802b62c <__multiply+0x14c>) 802b51a: 4845 ldr r0, [pc, #276] @ (802b630 <__multiply+0x150>) 802b51c: f44f 71b1 mov.w r1, #354 @ 0x162 802b520: f7fe fcf6 bl 8029f10 <__assert_func> 802b524: f100 0514 add.w r5, r0, #20 802b528: eb05 0886 add.w r8, r5, r6, lsl #2 802b52c: 462b mov r3, r5 802b52e: 2200 movs r2, #0 802b530: 4543 cmp r3, r8 802b532: d321 bcc.n 802b578 <__multiply+0x98> 802b534: f107 0114 add.w r1, r7, #20 802b538: f104 0214 add.w r2, r4, #20 802b53c: eb02 028a add.w r2, r2, sl, lsl #2 802b540: eb01 0389 add.w r3, r1, r9, lsl #2 802b544: 9302 str r3, [sp, #8] 802b546: 1b13 subs r3, r2, r4 802b548: 3b15 subs r3, #21 802b54a: f023 0303 bic.w r3, r3, #3 802b54e: 3304 adds r3, #4 802b550: f104 0715 add.w r7, r4, #21 802b554: 42ba cmp r2, r7 802b556: bf38 it cc 802b558: 2304 movcc r3, #4 802b55a: 9301 str r3, [sp, #4] 802b55c: 9b02 ldr r3, [sp, #8] 802b55e: 9103 str r1, [sp, #12] 802b560: 428b cmp r3, r1 802b562: d80c bhi.n 802b57e <__multiply+0x9e> 802b564: 2e00 cmp r6, #0 802b566: dd03 ble.n 802b570 <__multiply+0x90> 802b568: f858 3d04 ldr.w r3, [r8, #-4]! 802b56c: 2b00 cmp r3, #0 802b56e: d05b beq.n 802b628 <__multiply+0x148> 802b570: 6106 str r6, [r0, #16] 802b572: b005 add sp, #20 802b574: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802b578: f843 2b04 str.w r2, [r3], #4 802b57c: e7d8 b.n 802b530 <__multiply+0x50> 802b57e: f8b1 a000 ldrh.w sl, [r1] 802b582: f1ba 0f00 cmp.w sl, #0 802b586: d024 beq.n 802b5d2 <__multiply+0xf2> 802b588: f104 0e14 add.w lr, r4, #20 802b58c: 46a9 mov r9, r5 802b58e: f04f 0c00 mov.w ip, #0 802b592: f85e 7b04 ldr.w r7, [lr], #4 802b596: f8d9 3000 ldr.w r3, [r9] 802b59a: fa1f fb87 uxth.w fp, r7 802b59e: b29b uxth r3, r3 802b5a0: fb0a 330b mla r3, sl, fp, r3 802b5a4: ea4f 4b17 mov.w fp, r7, lsr #16 802b5a8: f8d9 7000 ldr.w r7, [r9] 802b5ac: 4463 add r3, ip 802b5ae: ea4f 4c17 mov.w ip, r7, lsr #16 802b5b2: fb0a c70b mla r7, sl, fp, ip 802b5b6: eb07 4713 add.w r7, r7, r3, lsr #16 802b5ba: b29b uxth r3, r3 802b5bc: ea43 4307 orr.w r3, r3, r7, lsl #16 802b5c0: 4572 cmp r2, lr 802b5c2: f849 3b04 str.w r3, [r9], #4 802b5c6: ea4f 4c17 mov.w ip, r7, lsr #16 802b5ca: d8e2 bhi.n 802b592 <__multiply+0xb2> 802b5cc: 9b01 ldr r3, [sp, #4] 802b5ce: f845 c003 str.w ip, [r5, r3] 802b5d2: 9b03 ldr r3, [sp, #12] 802b5d4: f8b3 9002 ldrh.w r9, [r3, #2] 802b5d8: 3104 adds r1, #4 802b5da: f1b9 0f00 cmp.w r9, #0 802b5de: d021 beq.n 802b624 <__multiply+0x144> 802b5e0: 682b ldr r3, [r5, #0] 802b5e2: f104 0c14 add.w ip, r4, #20 802b5e6: 46ae mov lr, r5 802b5e8: f04f 0a00 mov.w sl, #0 802b5ec: f8bc b000 ldrh.w fp, [ip] 802b5f0: f8be 7002 ldrh.w r7, [lr, #2] 802b5f4: fb09 770b mla r7, r9, fp, r7 802b5f8: 4457 add r7, sl 802b5fa: b29b uxth r3, r3 802b5fc: ea43 4307 orr.w r3, r3, r7, lsl #16 802b600: f84e 3b04 str.w r3, [lr], #4 802b604: f85c 3b04 ldr.w r3, [ip], #4 802b608: ea4f 4a13 mov.w sl, r3, lsr #16 802b60c: f8be 3000 ldrh.w r3, [lr] 802b610: fb09 330a mla r3, r9, sl, r3 802b614: eb03 4317 add.w r3, r3, r7, lsr #16 802b618: 4562 cmp r2, ip 802b61a: ea4f 4a13 mov.w sl, r3, lsr #16 802b61e: d8e5 bhi.n 802b5ec <__multiply+0x10c> 802b620: 9f01 ldr r7, [sp, #4] 802b622: 51eb str r3, [r5, r7] 802b624: 3504 adds r5, #4 802b626: e799 b.n 802b55c <__multiply+0x7c> 802b628: 3e01 subs r6, #1 802b62a: e79b b.n 802b564 <__multiply+0x84> 802b62c: 08030ec6 .word 0x08030ec6 802b630: 08030f37 .word 0x08030f37 0802b634 <__pow5mult>: 802b634: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 802b638: 4615 mov r5, r2 802b63a: f012 0203 ands.w r2, r2, #3 802b63e: 4607 mov r7, r0 802b640: 460e mov r6, r1 802b642: d007 beq.n 802b654 <__pow5mult+0x20> 802b644: 4c25 ldr r4, [pc, #148] @ (802b6dc <__pow5mult+0xa8>) 802b646: 3a01 subs r2, #1 802b648: 2300 movs r3, #0 802b64a: f854 2022 ldr.w r2, [r4, r2, lsl #2] 802b64e: f7ff fe55 bl 802b2fc <__multadd> 802b652: 4606 mov r6, r0 802b654: 10ad asrs r5, r5, #2 802b656: d03d beq.n 802b6d4 <__pow5mult+0xa0> 802b658: 69fc ldr r4, [r7, #28] 802b65a: b97c cbnz r4, 802b67c <__pow5mult+0x48> 802b65c: 2010 movs r0, #16 802b65e: f7fc fdcd bl 80281fc 802b662: 4602 mov r2, r0 802b664: 61f8 str r0, [r7, #28] 802b666: b928 cbnz r0, 802b674 <__pow5mult+0x40> 802b668: 4b1d ldr r3, [pc, #116] @ (802b6e0 <__pow5mult+0xac>) 802b66a: 481e ldr r0, [pc, #120] @ (802b6e4 <__pow5mult+0xb0>) 802b66c: f240 11b3 movw r1, #435 @ 0x1b3 802b670: f7fe fc4e bl 8029f10 <__assert_func> 802b674: e9c0 4401 strd r4, r4, [r0, #4] 802b678: 6004 str r4, [r0, #0] 802b67a: 60c4 str r4, [r0, #12] 802b67c: f8d7 801c ldr.w r8, [r7, #28] 802b680: f8d8 4008 ldr.w r4, [r8, #8] 802b684: b94c cbnz r4, 802b69a <__pow5mult+0x66> 802b686: f240 2171 movw r1, #625 @ 0x271 802b68a: 4638 mov r0, r7 802b68c: f7ff ff12 bl 802b4b4 <__i2b> 802b690: 2300 movs r3, #0 802b692: f8c8 0008 str.w r0, [r8, #8] 802b696: 4604 mov r4, r0 802b698: 6003 str r3, [r0, #0] 802b69a: f04f 0900 mov.w r9, #0 802b69e: 07eb lsls r3, r5, #31 802b6a0: d50a bpl.n 802b6b8 <__pow5mult+0x84> 802b6a2: 4631 mov r1, r6 802b6a4: 4622 mov r2, r4 802b6a6: 4638 mov r0, r7 802b6a8: f7ff ff1a bl 802b4e0 <__multiply> 802b6ac: 4631 mov r1, r6 802b6ae: 4680 mov r8, r0 802b6b0: 4638 mov r0, r7 802b6b2: f7ff fe01 bl 802b2b8 <_Bfree> 802b6b6: 4646 mov r6, r8 802b6b8: 106d asrs r5, r5, #1 802b6ba: d00b beq.n 802b6d4 <__pow5mult+0xa0> 802b6bc: 6820 ldr r0, [r4, #0] 802b6be: b938 cbnz r0, 802b6d0 <__pow5mult+0x9c> 802b6c0: 4622 mov r2, r4 802b6c2: 4621 mov r1, r4 802b6c4: 4638 mov r0, r7 802b6c6: f7ff ff0b bl 802b4e0 <__multiply> 802b6ca: 6020 str r0, [r4, #0] 802b6cc: f8c0 9000 str.w r9, [r0] 802b6d0: 4604 mov r4, r0 802b6d2: e7e4 b.n 802b69e <__pow5mult+0x6a> 802b6d4: 4630 mov r0, r6 802b6d6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802b6da: bf00 nop 802b6dc: 08030f90 .word 0x08030f90 802b6e0: 08030c26 .word 0x08030c26 802b6e4: 08030f37 .word 0x08030f37 0802b6e8 <__lshift>: 802b6e8: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802b6ec: 460c mov r4, r1 802b6ee: 6849 ldr r1, [r1, #4] 802b6f0: 6923 ldr r3, [r4, #16] 802b6f2: eb03 1862 add.w r8, r3, r2, asr #5 802b6f6: 68a3 ldr r3, [r4, #8] 802b6f8: 4607 mov r7, r0 802b6fa: 4691 mov r9, r2 802b6fc: ea4f 1a62 mov.w sl, r2, asr #5 802b700: f108 0601 add.w r6, r8, #1 802b704: 42b3 cmp r3, r6 802b706: db0b blt.n 802b720 <__lshift+0x38> 802b708: 4638 mov r0, r7 802b70a: f7ff fd95 bl 802b238 <_Balloc> 802b70e: 4605 mov r5, r0 802b710: b948 cbnz r0, 802b726 <__lshift+0x3e> 802b712: 4602 mov r2, r0 802b714: 4b28 ldr r3, [pc, #160] @ (802b7b8 <__lshift+0xd0>) 802b716: 4829 ldr r0, [pc, #164] @ (802b7bc <__lshift+0xd4>) 802b718: f44f 71ef mov.w r1, #478 @ 0x1de 802b71c: f7fe fbf8 bl 8029f10 <__assert_func> 802b720: 3101 adds r1, #1 802b722: 005b lsls r3, r3, #1 802b724: e7ee b.n 802b704 <__lshift+0x1c> 802b726: 2300 movs r3, #0 802b728: f100 0114 add.w r1, r0, #20 802b72c: f100 0210 add.w r2, r0, #16 802b730: 4618 mov r0, r3 802b732: 4553 cmp r3, sl 802b734: db33 blt.n 802b79e <__lshift+0xb6> 802b736: 6920 ldr r0, [r4, #16] 802b738: ea2a 7aea bic.w sl, sl, sl, asr #31 802b73c: f104 0314 add.w r3, r4, #20 802b740: f019 091f ands.w r9, r9, #31 802b744: eb01 018a add.w r1, r1, sl, lsl #2 802b748: eb03 0c80 add.w ip, r3, r0, lsl #2 802b74c: d02b beq.n 802b7a6 <__lshift+0xbe> 802b74e: f1c9 0e20 rsb lr, r9, #32 802b752: 468a mov sl, r1 802b754: 2200 movs r2, #0 802b756: 6818 ldr r0, [r3, #0] 802b758: fa00 f009 lsl.w r0, r0, r9 802b75c: 4310 orrs r0, r2 802b75e: f84a 0b04 str.w r0, [sl], #4 802b762: f853 2b04 ldr.w r2, [r3], #4 802b766: 459c cmp ip, r3 802b768: fa22 f20e lsr.w r2, r2, lr 802b76c: d8f3 bhi.n 802b756 <__lshift+0x6e> 802b76e: ebac 0304 sub.w r3, ip, r4 802b772: 3b15 subs r3, #21 802b774: f023 0303 bic.w r3, r3, #3 802b778: 3304 adds r3, #4 802b77a: f104 0015 add.w r0, r4, #21 802b77e: 4584 cmp ip, r0 802b780: bf38 it cc 802b782: 2304 movcc r3, #4 802b784: 50ca str r2, [r1, r3] 802b786: b10a cbz r2, 802b78c <__lshift+0xa4> 802b788: f108 0602 add.w r6, r8, #2 802b78c: 3e01 subs r6, #1 802b78e: 4638 mov r0, r7 802b790: 612e str r6, [r5, #16] 802b792: 4621 mov r1, r4 802b794: f7ff fd90 bl 802b2b8 <_Bfree> 802b798: 4628 mov r0, r5 802b79a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802b79e: f842 0f04 str.w r0, [r2, #4]! 802b7a2: 3301 adds r3, #1 802b7a4: e7c5 b.n 802b732 <__lshift+0x4a> 802b7a6: 3904 subs r1, #4 802b7a8: f853 2b04 ldr.w r2, [r3], #4 802b7ac: f841 2f04 str.w r2, [r1, #4]! 802b7b0: 459c cmp ip, r3 802b7b2: d8f9 bhi.n 802b7a8 <__lshift+0xc0> 802b7b4: e7ea b.n 802b78c <__lshift+0xa4> 802b7b6: bf00 nop 802b7b8: 08030ec6 .word 0x08030ec6 802b7bc: 08030f37 .word 0x08030f37 0802b7c0 <__mcmp>: 802b7c0: 690a ldr r2, [r1, #16] 802b7c2: 4603 mov r3, r0 802b7c4: 6900 ldr r0, [r0, #16] 802b7c6: 1a80 subs r0, r0, r2 802b7c8: b530 push {r4, r5, lr} 802b7ca: d10e bne.n 802b7ea <__mcmp+0x2a> 802b7cc: 3314 adds r3, #20 802b7ce: 3114 adds r1, #20 802b7d0: eb03 0482 add.w r4, r3, r2, lsl #2 802b7d4: eb01 0182 add.w r1, r1, r2, lsl #2 802b7d8: f854 5d04 ldr.w r5, [r4, #-4]! 802b7dc: f851 2d04 ldr.w r2, [r1, #-4]! 802b7e0: 4295 cmp r5, r2 802b7e2: d003 beq.n 802b7ec <__mcmp+0x2c> 802b7e4: d205 bcs.n 802b7f2 <__mcmp+0x32> 802b7e6: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802b7ea: bd30 pop {r4, r5, pc} 802b7ec: 42a3 cmp r3, r4 802b7ee: d3f3 bcc.n 802b7d8 <__mcmp+0x18> 802b7f0: e7fb b.n 802b7ea <__mcmp+0x2a> 802b7f2: 2001 movs r0, #1 802b7f4: e7f9 b.n 802b7ea <__mcmp+0x2a> ... 0802b7f8 <__mdiff>: 802b7f8: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802b7fc: 4689 mov r9, r1 802b7fe: 4606 mov r6, r0 802b800: 4611 mov r1, r2 802b802: 4648 mov r0, r9 802b804: 4614 mov r4, r2 802b806: f7ff ffdb bl 802b7c0 <__mcmp> 802b80a: 1e05 subs r5, r0, #0 802b80c: d112 bne.n 802b834 <__mdiff+0x3c> 802b80e: 4629 mov r1, r5 802b810: 4630 mov r0, r6 802b812: f7ff fd11 bl 802b238 <_Balloc> 802b816: 4602 mov r2, r0 802b818: b928 cbnz r0, 802b826 <__mdiff+0x2e> 802b81a: 4b3f ldr r3, [pc, #252] @ (802b918 <__mdiff+0x120>) 802b81c: f240 2137 movw r1, #567 @ 0x237 802b820: 483e ldr r0, [pc, #248] @ (802b91c <__mdiff+0x124>) 802b822: f7fe fb75 bl 8029f10 <__assert_func> 802b826: 2301 movs r3, #1 802b828: e9c0 3504 strd r3, r5, [r0, #16] 802b82c: 4610 mov r0, r2 802b82e: b003 add sp, #12 802b830: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802b834: bfbc itt lt 802b836: 464b movlt r3, r9 802b838: 46a1 movlt r9, r4 802b83a: 4630 mov r0, r6 802b83c: f8d9 1004 ldr.w r1, [r9, #4] 802b840: bfba itte lt 802b842: 461c movlt r4, r3 802b844: 2501 movlt r5, #1 802b846: 2500 movge r5, #0 802b848: f7ff fcf6 bl 802b238 <_Balloc> 802b84c: 4602 mov r2, r0 802b84e: b918 cbnz r0, 802b858 <__mdiff+0x60> 802b850: 4b31 ldr r3, [pc, #196] @ (802b918 <__mdiff+0x120>) 802b852: f240 2145 movw r1, #581 @ 0x245 802b856: e7e3 b.n 802b820 <__mdiff+0x28> 802b858: f8d9 7010 ldr.w r7, [r9, #16] 802b85c: 6926 ldr r6, [r4, #16] 802b85e: 60c5 str r5, [r0, #12] 802b860: f109 0310 add.w r3, r9, #16 802b864: f109 0514 add.w r5, r9, #20 802b868: f104 0e14 add.w lr, r4, #20 802b86c: f100 0b14 add.w fp, r0, #20 802b870: eb05 0887 add.w r8, r5, r7, lsl #2 802b874: eb0e 0686 add.w r6, lr, r6, lsl #2 802b878: 9301 str r3, [sp, #4] 802b87a: 46d9 mov r9, fp 802b87c: f04f 0c00 mov.w ip, #0 802b880: 9b01 ldr r3, [sp, #4] 802b882: f85e 0b04 ldr.w r0, [lr], #4 802b886: f853 af04 ldr.w sl, [r3, #4]! 802b88a: 9301 str r3, [sp, #4] 802b88c: fa1f f38a uxth.w r3, sl 802b890: 4619 mov r1, r3 802b892: b283 uxth r3, r0 802b894: 1acb subs r3, r1, r3 802b896: 0c00 lsrs r0, r0, #16 802b898: 4463 add r3, ip 802b89a: ebc0 401a rsb r0, r0, sl, lsr #16 802b89e: eb00 4023 add.w r0, r0, r3, asr #16 802b8a2: b29b uxth r3, r3 802b8a4: ea43 4300 orr.w r3, r3, r0, lsl #16 802b8a8: 4576 cmp r6, lr 802b8aa: f849 3b04 str.w r3, [r9], #4 802b8ae: ea4f 4c20 mov.w ip, r0, asr #16 802b8b2: d8e5 bhi.n 802b880 <__mdiff+0x88> 802b8b4: 1b33 subs r3, r6, r4 802b8b6: 3b15 subs r3, #21 802b8b8: f023 0303 bic.w r3, r3, #3 802b8bc: 3415 adds r4, #21 802b8be: 3304 adds r3, #4 802b8c0: 42a6 cmp r6, r4 802b8c2: bf38 it cc 802b8c4: 2304 movcc r3, #4 802b8c6: 441d add r5, r3 802b8c8: 445b add r3, fp 802b8ca: 461e mov r6, r3 802b8cc: 462c mov r4, r5 802b8ce: 4544 cmp r4, r8 802b8d0: d30e bcc.n 802b8f0 <__mdiff+0xf8> 802b8d2: f108 0103 add.w r1, r8, #3 802b8d6: 1b49 subs r1, r1, r5 802b8d8: f021 0103 bic.w r1, r1, #3 802b8dc: 3d03 subs r5, #3 802b8de: 45a8 cmp r8, r5 802b8e0: bf38 it cc 802b8e2: 2100 movcc r1, #0 802b8e4: 440b add r3, r1 802b8e6: f853 1d04 ldr.w r1, [r3, #-4]! 802b8ea: b191 cbz r1, 802b912 <__mdiff+0x11a> 802b8ec: 6117 str r7, [r2, #16] 802b8ee: e79d b.n 802b82c <__mdiff+0x34> 802b8f0: f854 1b04 ldr.w r1, [r4], #4 802b8f4: 46e6 mov lr, ip 802b8f6: 0c08 lsrs r0, r1, #16 802b8f8: fa1c fc81 uxtah ip, ip, r1 802b8fc: 4471 add r1, lr 802b8fe: eb00 402c add.w r0, r0, ip, asr #16 802b902: b289 uxth r1, r1 802b904: ea41 4100 orr.w r1, r1, r0, lsl #16 802b908: f846 1b04 str.w r1, [r6], #4 802b90c: ea4f 4c20 mov.w ip, r0, asr #16 802b910: e7dd b.n 802b8ce <__mdiff+0xd6> 802b912: 3f01 subs r7, #1 802b914: e7e7 b.n 802b8e6 <__mdiff+0xee> 802b916: bf00 nop 802b918: 08030ec6 .word 0x08030ec6 802b91c: 08030f37 .word 0x08030f37 0802b920 <__ulp>: 802b920: b082 sub sp, #8 802b922: ed8d 0b00 vstr d0, [sp] 802b926: 9a01 ldr r2, [sp, #4] 802b928: 4b0f ldr r3, [pc, #60] @ (802b968 <__ulp+0x48>) 802b92a: 4013 ands r3, r2 802b92c: f1a3 7350 sub.w r3, r3, #54525952 @ 0x3400000 802b930: 2b00 cmp r3, #0 802b932: dc08 bgt.n 802b946 <__ulp+0x26> 802b934: 425b negs r3, r3 802b936: f1b3 7fa0 cmp.w r3, #20971520 @ 0x1400000 802b93a: ea4f 5223 mov.w r2, r3, asr #20 802b93e: da04 bge.n 802b94a <__ulp+0x2a> 802b940: f44f 2300 mov.w r3, #524288 @ 0x80000 802b944: 4113 asrs r3, r2 802b946: 2200 movs r2, #0 802b948: e008 b.n 802b95c <__ulp+0x3c> 802b94a: f1a2 0314 sub.w r3, r2, #20 802b94e: 2b1e cmp r3, #30 802b950: bfda itte le 802b952: f04f 4200 movle.w r2, #2147483648 @ 0x80000000 802b956: 40da lsrle r2, r3 802b958: 2201 movgt r2, #1 802b95a: 2300 movs r3, #0 802b95c: 4619 mov r1, r3 802b95e: 4610 mov r0, r2 802b960: ec41 0b10 vmov d0, r0, r1 802b964: b002 add sp, #8 802b966: 4770 bx lr 802b968: 7ff00000 .word 0x7ff00000 0802b96c <__b2d>: 802b96c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802b970: 6906 ldr r6, [r0, #16] 802b972: f100 0814 add.w r8, r0, #20 802b976: eb08 0686 add.w r6, r8, r6, lsl #2 802b97a: 1f37 subs r7, r6, #4 802b97c: f856 2c04 ldr.w r2, [r6, #-4] 802b980: 4610 mov r0, r2 802b982: f7ff fd4b bl 802b41c <__hi0bits> 802b986: f1c0 0320 rsb r3, r0, #32 802b98a: 280a cmp r0, #10 802b98c: 600b str r3, [r1, #0] 802b98e: 491b ldr r1, [pc, #108] @ (802b9fc <__b2d+0x90>) 802b990: dc15 bgt.n 802b9be <__b2d+0x52> 802b992: f1c0 0c0b rsb ip, r0, #11 802b996: fa22 f30c lsr.w r3, r2, ip 802b99a: 45b8 cmp r8, r7 802b99c: ea43 0501 orr.w r5, r3, r1 802b9a0: bf34 ite cc 802b9a2: f856 3c08 ldrcc.w r3, [r6, #-8] 802b9a6: 2300 movcs r3, #0 802b9a8: 3015 adds r0, #21 802b9aa: fa02 f000 lsl.w r0, r2, r0 802b9ae: fa23 f30c lsr.w r3, r3, ip 802b9b2: 4303 orrs r3, r0 802b9b4: 461c mov r4, r3 802b9b6: ec45 4b10 vmov d0, r4, r5 802b9ba: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802b9be: 45b8 cmp r8, r7 802b9c0: bf3a itte cc 802b9c2: f856 3c08 ldrcc.w r3, [r6, #-8] 802b9c6: f1a6 0708 subcc.w r7, r6, #8 802b9ca: 2300 movcs r3, #0 802b9cc: 380b subs r0, #11 802b9ce: d012 beq.n 802b9f6 <__b2d+0x8a> 802b9d0: f1c0 0120 rsb r1, r0, #32 802b9d4: fa23 f401 lsr.w r4, r3, r1 802b9d8: 4082 lsls r2, r0 802b9da: 4322 orrs r2, r4 802b9dc: 4547 cmp r7, r8 802b9de: f042 557f orr.w r5, r2, #1069547520 @ 0x3fc00000 802b9e2: bf8c ite hi 802b9e4: f857 2c04 ldrhi.w r2, [r7, #-4] 802b9e8: 2200 movls r2, #0 802b9ea: 4083 lsls r3, r0 802b9ec: 40ca lsrs r2, r1 802b9ee: f445 1540 orr.w r5, r5, #3145728 @ 0x300000 802b9f2: 4313 orrs r3, r2 802b9f4: e7de b.n 802b9b4 <__b2d+0x48> 802b9f6: ea42 0501 orr.w r5, r2, r1 802b9fa: e7db b.n 802b9b4 <__b2d+0x48> 802b9fc: 3ff00000 .word 0x3ff00000 0802ba00 <__d2b>: 802ba00: e92d 43f7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr} 802ba04: 460f mov r7, r1 802ba06: 2101 movs r1, #1 802ba08: ec59 8b10 vmov r8, r9, d0 802ba0c: 4616 mov r6, r2 802ba0e: f7ff fc13 bl 802b238 <_Balloc> 802ba12: 4604 mov r4, r0 802ba14: b930 cbnz r0, 802ba24 <__d2b+0x24> 802ba16: 4602 mov r2, r0 802ba18: 4b23 ldr r3, [pc, #140] @ (802baa8 <__d2b+0xa8>) 802ba1a: 4824 ldr r0, [pc, #144] @ (802baac <__d2b+0xac>) 802ba1c: f240 310f movw r1, #783 @ 0x30f 802ba20: f7fe fa76 bl 8029f10 <__assert_func> 802ba24: f3c9 550a ubfx r5, r9, #20, #11 802ba28: f3c9 0313 ubfx r3, r9, #0, #20 802ba2c: b10d cbz r5, 802ba32 <__d2b+0x32> 802ba2e: f443 1380 orr.w r3, r3, #1048576 @ 0x100000 802ba32: 9301 str r3, [sp, #4] 802ba34: f1b8 0300 subs.w r3, r8, #0 802ba38: d023 beq.n 802ba82 <__d2b+0x82> 802ba3a: 4668 mov r0, sp 802ba3c: 9300 str r3, [sp, #0] 802ba3e: f7ff fd0c bl 802b45a <__lo0bits> 802ba42: e9dd 1200 ldrd r1, r2, [sp] 802ba46: b1d0 cbz r0, 802ba7e <__d2b+0x7e> 802ba48: f1c0 0320 rsb r3, r0, #32 802ba4c: fa02 f303 lsl.w r3, r2, r3 802ba50: 430b orrs r3, r1 802ba52: 40c2 lsrs r2, r0 802ba54: 6163 str r3, [r4, #20] 802ba56: 9201 str r2, [sp, #4] 802ba58: 9b01 ldr r3, [sp, #4] 802ba5a: 61a3 str r3, [r4, #24] 802ba5c: 2b00 cmp r3, #0 802ba5e: bf0c ite eq 802ba60: 2201 moveq r2, #1 802ba62: 2202 movne r2, #2 802ba64: 6122 str r2, [r4, #16] 802ba66: b1a5 cbz r5, 802ba92 <__d2b+0x92> 802ba68: f2a5 4533 subw r5, r5, #1075 @ 0x433 802ba6c: 4405 add r5, r0 802ba6e: 603d str r5, [r7, #0] 802ba70: f1c0 0035 rsb r0, r0, #53 @ 0x35 802ba74: 6030 str r0, [r6, #0] 802ba76: 4620 mov r0, r4 802ba78: b003 add sp, #12 802ba7a: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 802ba7e: 6161 str r1, [r4, #20] 802ba80: e7ea b.n 802ba58 <__d2b+0x58> 802ba82: a801 add r0, sp, #4 802ba84: f7ff fce9 bl 802b45a <__lo0bits> 802ba88: 9b01 ldr r3, [sp, #4] 802ba8a: 6163 str r3, [r4, #20] 802ba8c: 3020 adds r0, #32 802ba8e: 2201 movs r2, #1 802ba90: e7e8 b.n 802ba64 <__d2b+0x64> 802ba92: eb04 0382 add.w r3, r4, r2, lsl #2 802ba96: f2a0 4032 subw r0, r0, #1074 @ 0x432 802ba9a: 6038 str r0, [r7, #0] 802ba9c: 6918 ldr r0, [r3, #16] 802ba9e: f7ff fcbd bl 802b41c <__hi0bits> 802baa2: ebc0 1042 rsb r0, r0, r2, lsl #5 802baa6: e7e5 b.n 802ba74 <__d2b+0x74> 802baa8: 08030ec6 .word 0x08030ec6 802baac: 08030f37 .word 0x08030f37 0802bab0 <__ratio>: 802bab0: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802bab4: 4688 mov r8, r1 802bab6: 4669 mov r1, sp 802bab8: 4681 mov r9, r0 802baba: f7ff ff57 bl 802b96c <__b2d> 802babe: a901 add r1, sp, #4 802bac0: 4640 mov r0, r8 802bac2: ec55 4b10 vmov r4, r5, d0 802bac6: f7ff ff51 bl 802b96c <__b2d> 802baca: f8d8 3010 ldr.w r3, [r8, #16] 802bace: f8d9 2010 ldr.w r2, [r9, #16] 802bad2: 1ad2 subs r2, r2, r3 802bad4: e9dd 3100 ldrd r3, r1, [sp] 802bad8: 1a5b subs r3, r3, r1 802bada: eb03 1342 add.w r3, r3, r2, lsl #5 802bade: ec57 6b10 vmov r6, r7, d0 802bae2: 2b00 cmp r3, #0 802bae4: bfd6 itet le 802bae6: ebc3 3303 rsble r3, r3, r3, lsl #12 802baea: 462a movgt r2, r5 802baec: 463a movle r2, r7 802baee: 46ab mov fp, r5 802baf0: 46a2 mov sl, r4 802baf2: bfce itee gt 802baf4: eb02 5b03 addgt.w fp, r2, r3, lsl #20 802baf8: eb02 5303 addle.w r3, r2, r3, lsl #20 802bafc: ee00 3a90 vmovle s1, r3 802bb00: ec4b ab17 vmov d7, sl, fp 802bb04: ee87 0b00 vdiv.f64 d0, d7, d0 802bb08: b003 add sp, #12 802bb0a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802bb0e <__copybits>: 802bb0e: 3901 subs r1, #1 802bb10: b570 push {r4, r5, r6, lr} 802bb12: 1149 asrs r1, r1, #5 802bb14: 6914 ldr r4, [r2, #16] 802bb16: 3101 adds r1, #1 802bb18: f102 0314 add.w r3, r2, #20 802bb1c: eb00 0181 add.w r1, r0, r1, lsl #2 802bb20: eb03 0484 add.w r4, r3, r4, lsl #2 802bb24: 1f05 subs r5, r0, #4 802bb26: 42a3 cmp r3, r4 802bb28: d30c bcc.n 802bb44 <__copybits+0x36> 802bb2a: 1aa3 subs r3, r4, r2 802bb2c: 3b11 subs r3, #17 802bb2e: f023 0303 bic.w r3, r3, #3 802bb32: 3211 adds r2, #17 802bb34: 42a2 cmp r2, r4 802bb36: bf88 it hi 802bb38: 2300 movhi r3, #0 802bb3a: 4418 add r0, r3 802bb3c: 2300 movs r3, #0 802bb3e: 4288 cmp r0, r1 802bb40: d305 bcc.n 802bb4e <__copybits+0x40> 802bb42: bd70 pop {r4, r5, r6, pc} 802bb44: f853 6b04 ldr.w r6, [r3], #4 802bb48: f845 6f04 str.w r6, [r5, #4]! 802bb4c: e7eb b.n 802bb26 <__copybits+0x18> 802bb4e: f840 3b04 str.w r3, [r0], #4 802bb52: e7f4 b.n 802bb3e <__copybits+0x30> 0802bb54 <__any_on>: 802bb54: f100 0214 add.w r2, r0, #20 802bb58: 6900 ldr r0, [r0, #16] 802bb5a: 114b asrs r3, r1, #5 802bb5c: 4298 cmp r0, r3 802bb5e: b510 push {r4, lr} 802bb60: db11 blt.n 802bb86 <__any_on+0x32> 802bb62: dd0a ble.n 802bb7a <__any_on+0x26> 802bb64: f011 011f ands.w r1, r1, #31 802bb68: d007 beq.n 802bb7a <__any_on+0x26> 802bb6a: f852 4023 ldr.w r4, [r2, r3, lsl #2] 802bb6e: fa24 f001 lsr.w r0, r4, r1 802bb72: fa00 f101 lsl.w r1, r0, r1 802bb76: 428c cmp r4, r1 802bb78: d10b bne.n 802bb92 <__any_on+0x3e> 802bb7a: eb02 0383 add.w r3, r2, r3, lsl #2 802bb7e: 4293 cmp r3, r2 802bb80: d803 bhi.n 802bb8a <__any_on+0x36> 802bb82: 2000 movs r0, #0 802bb84: bd10 pop {r4, pc} 802bb86: 4603 mov r3, r0 802bb88: e7f7 b.n 802bb7a <__any_on+0x26> 802bb8a: f853 1d04 ldr.w r1, [r3, #-4]! 802bb8e: 2900 cmp r1, #0 802bb90: d0f5 beq.n 802bb7e <__any_on+0x2a> 802bb92: 2001 movs r0, #1 802bb94: e7f6 b.n 802bb84 <__any_on+0x30> 0802bb96 <_malloc_usable_size_r>: 802bb96: f851 3c04 ldr.w r3, [r1, #-4] 802bb9a: 1f18 subs r0, r3, #4 802bb9c: 2b00 cmp r3, #0 802bb9e: bfbc itt lt 802bba0: 580b ldrlt r3, [r1, r0] 802bba2: 18c0 addlt r0, r0, r3 802bba4: 4770 bx lr 0802bba6 <__ascii_wctomb>: 802bba6: 4603 mov r3, r0 802bba8: 4608 mov r0, r1 802bbaa: b141 cbz r1, 802bbbe <__ascii_wctomb+0x18> 802bbac: 2aff cmp r2, #255 @ 0xff 802bbae: d904 bls.n 802bbba <__ascii_wctomb+0x14> 802bbb0: 228a movs r2, #138 @ 0x8a 802bbb2: 601a str r2, [r3, #0] 802bbb4: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802bbb8: 4770 bx lr 802bbba: 700a strb r2, [r1, #0] 802bbbc: 2001 movs r0, #1 802bbbe: 4770 bx lr 0802bbc0 <__ssputs_r>: 802bbc0: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802bbc4: 688e ldr r6, [r1, #8] 802bbc6: 461f mov r7, r3 802bbc8: 42be cmp r6, r7 802bbca: 680b ldr r3, [r1, #0] 802bbcc: 4682 mov sl, r0 802bbce: 460c mov r4, r1 802bbd0: 4690 mov r8, r2 802bbd2: d82d bhi.n 802bc30 <__ssputs_r+0x70> 802bbd4: f9b1 200c ldrsh.w r2, [r1, #12] 802bbd8: f412 6f90 tst.w r2, #1152 @ 0x480 802bbdc: d026 beq.n 802bc2c <__ssputs_r+0x6c> 802bbde: 6965 ldr r5, [r4, #20] 802bbe0: 6909 ldr r1, [r1, #16] 802bbe2: eb05 0545 add.w r5, r5, r5, lsl #1 802bbe6: eba3 0901 sub.w r9, r3, r1 802bbea: eb05 75d5 add.w r5, r5, r5, lsr #31 802bbee: 1c7b adds r3, r7, #1 802bbf0: 444b add r3, r9 802bbf2: 106d asrs r5, r5, #1 802bbf4: 429d cmp r5, r3 802bbf6: bf38 it cc 802bbf8: 461d movcc r5, r3 802bbfa: 0553 lsls r3, r2, #21 802bbfc: d527 bpl.n 802bc4e <__ssputs_r+0x8e> 802bbfe: 4629 mov r1, r5 802bc00: f7fc fb2e bl 8028260 <_malloc_r> 802bc04: 4606 mov r6, r0 802bc06: b360 cbz r0, 802bc62 <__ssputs_r+0xa2> 802bc08: 6921 ldr r1, [r4, #16] 802bc0a: 464a mov r2, r9 802bc0c: f7fe f967 bl 8029ede 802bc10: 89a3 ldrh r3, [r4, #12] 802bc12: f423 6390 bic.w r3, r3, #1152 @ 0x480 802bc16: f043 0380 orr.w r3, r3, #128 @ 0x80 802bc1a: 81a3 strh r3, [r4, #12] 802bc1c: 6126 str r6, [r4, #16] 802bc1e: 6165 str r5, [r4, #20] 802bc20: 444e add r6, r9 802bc22: eba5 0509 sub.w r5, r5, r9 802bc26: 6026 str r6, [r4, #0] 802bc28: 60a5 str r5, [r4, #8] 802bc2a: 463e mov r6, r7 802bc2c: 42be cmp r6, r7 802bc2e: d900 bls.n 802bc32 <__ssputs_r+0x72> 802bc30: 463e mov r6, r7 802bc32: 6820 ldr r0, [r4, #0] 802bc34: 4632 mov r2, r6 802bc36: 4641 mov r1, r8 802bc38: f7fe f840 bl 8029cbc 802bc3c: 68a3 ldr r3, [r4, #8] 802bc3e: 1b9b subs r3, r3, r6 802bc40: 60a3 str r3, [r4, #8] 802bc42: 6823 ldr r3, [r4, #0] 802bc44: 4433 add r3, r6 802bc46: 6023 str r3, [r4, #0] 802bc48: 2000 movs r0, #0 802bc4a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802bc4e: 462a mov r2, r5 802bc50: f7fc fbd8 bl 8028404 <_realloc_r> 802bc54: 4606 mov r6, r0 802bc56: 2800 cmp r0, #0 802bc58: d1e0 bne.n 802bc1c <__ssputs_r+0x5c> 802bc5a: 6921 ldr r1, [r4, #16] 802bc5c: 4650 mov r0, sl 802bc5e: f7fe ff55 bl 802ab0c <_free_r> 802bc62: 230c movs r3, #12 802bc64: f8ca 3000 str.w r3, [sl] 802bc68: 89a3 ldrh r3, [r4, #12] 802bc6a: f043 0340 orr.w r3, r3, #64 @ 0x40 802bc6e: 81a3 strh r3, [r4, #12] 802bc70: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802bc74: e7e9 b.n 802bc4a <__ssputs_r+0x8a> ... 0802bc78 <_svfiprintf_r>: 802bc78: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802bc7c: 4698 mov r8, r3 802bc7e: 898b ldrh r3, [r1, #12] 802bc80: 061b lsls r3, r3, #24 802bc82: b09d sub sp, #116 @ 0x74 802bc84: 4607 mov r7, r0 802bc86: 460d mov r5, r1 802bc88: 4614 mov r4, r2 802bc8a: d510 bpl.n 802bcae <_svfiprintf_r+0x36> 802bc8c: 690b ldr r3, [r1, #16] 802bc8e: b973 cbnz r3, 802bcae <_svfiprintf_r+0x36> 802bc90: 2140 movs r1, #64 @ 0x40 802bc92: f7fc fae5 bl 8028260 <_malloc_r> 802bc96: 6028 str r0, [r5, #0] 802bc98: 6128 str r0, [r5, #16] 802bc9a: b930 cbnz r0, 802bcaa <_svfiprintf_r+0x32> 802bc9c: 230c movs r3, #12 802bc9e: 603b str r3, [r7, #0] 802bca0: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802bca4: b01d add sp, #116 @ 0x74 802bca6: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802bcaa: 2340 movs r3, #64 @ 0x40 802bcac: 616b str r3, [r5, #20] 802bcae: 2300 movs r3, #0 802bcb0: 9309 str r3, [sp, #36] @ 0x24 802bcb2: 2320 movs r3, #32 802bcb4: f88d 3029 strb.w r3, [sp, #41] @ 0x29 802bcb8: f8cd 800c str.w r8, [sp, #12] 802bcbc: 2330 movs r3, #48 @ 0x30 802bcbe: f8df 819c ldr.w r8, [pc, #412] @ 802be5c <_svfiprintf_r+0x1e4> 802bcc2: f88d 302a strb.w r3, [sp, #42] @ 0x2a 802bcc6: f04f 0901 mov.w r9, #1 802bcca: 4623 mov r3, r4 802bccc: 469a mov sl, r3 802bcce: f813 2b01 ldrb.w r2, [r3], #1 802bcd2: b10a cbz r2, 802bcd8 <_svfiprintf_r+0x60> 802bcd4: 2a25 cmp r2, #37 @ 0x25 802bcd6: d1f9 bne.n 802bccc <_svfiprintf_r+0x54> 802bcd8: ebba 0b04 subs.w fp, sl, r4 802bcdc: d00b beq.n 802bcf6 <_svfiprintf_r+0x7e> 802bcde: 465b mov r3, fp 802bce0: 4622 mov r2, r4 802bce2: 4629 mov r1, r5 802bce4: 4638 mov r0, r7 802bce6: f7ff ff6b bl 802bbc0 <__ssputs_r> 802bcea: 3001 adds r0, #1 802bcec: f000 80a7 beq.w 802be3e <_svfiprintf_r+0x1c6> 802bcf0: 9a09 ldr r2, [sp, #36] @ 0x24 802bcf2: 445a add r2, fp 802bcf4: 9209 str r2, [sp, #36] @ 0x24 802bcf6: f89a 3000 ldrb.w r3, [sl] 802bcfa: 2b00 cmp r3, #0 802bcfc: f000 809f beq.w 802be3e <_svfiprintf_r+0x1c6> 802bd00: 2300 movs r3, #0 802bd02: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 802bd06: e9cd 2305 strd r2, r3, [sp, #20] 802bd0a: f10a 0a01 add.w sl, sl, #1 802bd0e: 9304 str r3, [sp, #16] 802bd10: 9307 str r3, [sp, #28] 802bd12: f88d 3053 strb.w r3, [sp, #83] @ 0x53 802bd16: 931a str r3, [sp, #104] @ 0x68 802bd18: 4654 mov r4, sl 802bd1a: 2205 movs r2, #5 802bd1c: f814 1b01 ldrb.w r1, [r4], #1 802bd20: 484e ldr r0, [pc, #312] @ (802be5c <_svfiprintf_r+0x1e4>) 802bd22: f7d4 faed bl 8000300 802bd26: 9a04 ldr r2, [sp, #16] 802bd28: b9d8 cbnz r0, 802bd62 <_svfiprintf_r+0xea> 802bd2a: 06d0 lsls r0, r2, #27 802bd2c: bf44 itt mi 802bd2e: 2320 movmi r3, #32 802bd30: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53 802bd34: 0711 lsls r1, r2, #28 802bd36: bf44 itt mi 802bd38: 232b movmi r3, #43 @ 0x2b 802bd3a: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53 802bd3e: f89a 3000 ldrb.w r3, [sl] 802bd42: 2b2a cmp r3, #42 @ 0x2a 802bd44: d015 beq.n 802bd72 <_svfiprintf_r+0xfa> 802bd46: 9a07 ldr r2, [sp, #28] 802bd48: 4654 mov r4, sl 802bd4a: 2000 movs r0, #0 802bd4c: f04f 0c0a mov.w ip, #10 802bd50: 4621 mov r1, r4 802bd52: f811 3b01 ldrb.w r3, [r1], #1 802bd56: 3b30 subs r3, #48 @ 0x30 802bd58: 2b09 cmp r3, #9 802bd5a: d94b bls.n 802bdf4 <_svfiprintf_r+0x17c> 802bd5c: b1b0 cbz r0, 802bd8c <_svfiprintf_r+0x114> 802bd5e: 9207 str r2, [sp, #28] 802bd60: e014 b.n 802bd8c <_svfiprintf_r+0x114> 802bd62: eba0 0308 sub.w r3, r0, r8 802bd66: fa09 f303 lsl.w r3, r9, r3 802bd6a: 4313 orrs r3, r2 802bd6c: 9304 str r3, [sp, #16] 802bd6e: 46a2 mov sl, r4 802bd70: e7d2 b.n 802bd18 <_svfiprintf_r+0xa0> 802bd72: 9b03 ldr r3, [sp, #12] 802bd74: 1d19 adds r1, r3, #4 802bd76: 681b ldr r3, [r3, #0] 802bd78: 9103 str r1, [sp, #12] 802bd7a: 2b00 cmp r3, #0 802bd7c: bfbb ittet lt 802bd7e: 425b neglt r3, r3 802bd80: f042 0202 orrlt.w r2, r2, #2 802bd84: 9307 strge r3, [sp, #28] 802bd86: 9307 strlt r3, [sp, #28] 802bd88: bfb8 it lt 802bd8a: 9204 strlt r2, [sp, #16] 802bd8c: 7823 ldrb r3, [r4, #0] 802bd8e: 2b2e cmp r3, #46 @ 0x2e 802bd90: d10a bne.n 802bda8 <_svfiprintf_r+0x130> 802bd92: 7863 ldrb r3, [r4, #1] 802bd94: 2b2a cmp r3, #42 @ 0x2a 802bd96: d132 bne.n 802bdfe <_svfiprintf_r+0x186> 802bd98: 9b03 ldr r3, [sp, #12] 802bd9a: 1d1a adds r2, r3, #4 802bd9c: 681b ldr r3, [r3, #0] 802bd9e: 9203 str r2, [sp, #12] 802bda0: ea43 73e3 orr.w r3, r3, r3, asr #31 802bda4: 3402 adds r4, #2 802bda6: 9305 str r3, [sp, #20] 802bda8: f8df a0c0 ldr.w sl, [pc, #192] @ 802be6c <_svfiprintf_r+0x1f4> 802bdac: 7821 ldrb r1, [r4, #0] 802bdae: 2203 movs r2, #3 802bdb0: 4650 mov r0, sl 802bdb2: f7d4 faa5 bl 8000300 802bdb6: b138 cbz r0, 802bdc8 <_svfiprintf_r+0x150> 802bdb8: 9b04 ldr r3, [sp, #16] 802bdba: eba0 000a sub.w r0, r0, sl 802bdbe: 2240 movs r2, #64 @ 0x40 802bdc0: 4082 lsls r2, r0 802bdc2: 4313 orrs r3, r2 802bdc4: 3401 adds r4, #1 802bdc6: 9304 str r3, [sp, #16] 802bdc8: f814 1b01 ldrb.w r1, [r4], #1 802bdcc: 4824 ldr r0, [pc, #144] @ (802be60 <_svfiprintf_r+0x1e8>) 802bdce: f88d 1028 strb.w r1, [sp, #40] @ 0x28 802bdd2: 2206 movs r2, #6 802bdd4: f7d4 fa94 bl 8000300 802bdd8: 2800 cmp r0, #0 802bdda: d036 beq.n 802be4a <_svfiprintf_r+0x1d2> 802bddc: 4b21 ldr r3, [pc, #132] @ (802be64 <_svfiprintf_r+0x1ec>) 802bdde: bb1b cbnz r3, 802be28 <_svfiprintf_r+0x1b0> 802bde0: 9b03 ldr r3, [sp, #12] 802bde2: 3307 adds r3, #7 802bde4: f023 0307 bic.w r3, r3, #7 802bde8: 3308 adds r3, #8 802bdea: 9303 str r3, [sp, #12] 802bdec: 9b09 ldr r3, [sp, #36] @ 0x24 802bdee: 4433 add r3, r6 802bdf0: 9309 str r3, [sp, #36] @ 0x24 802bdf2: e76a b.n 802bcca <_svfiprintf_r+0x52> 802bdf4: fb0c 3202 mla r2, ip, r2, r3 802bdf8: 460c mov r4, r1 802bdfa: 2001 movs r0, #1 802bdfc: e7a8 b.n 802bd50 <_svfiprintf_r+0xd8> 802bdfe: 2300 movs r3, #0 802be00: 3401 adds r4, #1 802be02: 9305 str r3, [sp, #20] 802be04: 4619 mov r1, r3 802be06: f04f 0c0a mov.w ip, #10 802be0a: 4620 mov r0, r4 802be0c: f810 2b01 ldrb.w r2, [r0], #1 802be10: 3a30 subs r2, #48 @ 0x30 802be12: 2a09 cmp r2, #9 802be14: d903 bls.n 802be1e <_svfiprintf_r+0x1a6> 802be16: 2b00 cmp r3, #0 802be18: d0c6 beq.n 802bda8 <_svfiprintf_r+0x130> 802be1a: 9105 str r1, [sp, #20] 802be1c: e7c4 b.n 802bda8 <_svfiprintf_r+0x130> 802be1e: fb0c 2101 mla r1, ip, r1, r2 802be22: 4604 mov r4, r0 802be24: 2301 movs r3, #1 802be26: e7f0 b.n 802be0a <_svfiprintf_r+0x192> 802be28: ab03 add r3, sp, #12 802be2a: 9300 str r3, [sp, #0] 802be2c: 462a mov r2, r5 802be2e: 4b0e ldr r3, [pc, #56] @ (802be68 <_svfiprintf_r+0x1f0>) 802be30: a904 add r1, sp, #16 802be32: 4638 mov r0, r7 802be34: f7fd f960 bl 80290f8 <_printf_float> 802be38: 1c42 adds r2, r0, #1 802be3a: 4606 mov r6, r0 802be3c: d1d6 bne.n 802bdec <_svfiprintf_r+0x174> 802be3e: 89ab ldrh r3, [r5, #12] 802be40: 065b lsls r3, r3, #25 802be42: f53f af2d bmi.w 802bca0 <_svfiprintf_r+0x28> 802be46: 9809 ldr r0, [sp, #36] @ 0x24 802be48: e72c b.n 802bca4 <_svfiprintf_r+0x2c> 802be4a: ab03 add r3, sp, #12 802be4c: 9300 str r3, [sp, #0] 802be4e: 462a mov r2, r5 802be50: 4b05 ldr r3, [pc, #20] @ (802be68 <_svfiprintf_r+0x1f0>) 802be52: a904 add r1, sp, #16 802be54: 4638 mov r0, r7 802be56: f7fd fbd7 bl 8029608 <_printf_i> 802be5a: e7ed b.n 802be38 <_svfiprintf_r+0x1c0> 802be5c: 08031090 .word 0x08031090 802be60: 0803109a .word 0x0803109a 802be64: 080290f9 .word 0x080290f9 802be68: 0802bbc1 .word 0x0802bbc1 802be6c: 08031096 .word 0x08031096 0802be70 <__sfputc_r>: 802be70: 6893 ldr r3, [r2, #8] 802be72: 3b01 subs r3, #1 802be74: 2b00 cmp r3, #0 802be76: b410 push {r4} 802be78: 6093 str r3, [r2, #8] 802be7a: da08 bge.n 802be8e <__sfputc_r+0x1e> 802be7c: 6994 ldr r4, [r2, #24] 802be7e: 42a3 cmp r3, r4 802be80: db01 blt.n 802be86 <__sfputc_r+0x16> 802be82: 290a cmp r1, #10 802be84: d103 bne.n 802be8e <__sfputc_r+0x1e> 802be86: f85d 4b04 ldr.w r4, [sp], #4 802be8a: f7fd be72 b.w 8029b72 <__swbuf_r> 802be8e: 6813 ldr r3, [r2, #0] 802be90: 1c58 adds r0, r3, #1 802be92: 6010 str r0, [r2, #0] 802be94: 7019 strb r1, [r3, #0] 802be96: 4608 mov r0, r1 802be98: f85d 4b04 ldr.w r4, [sp], #4 802be9c: 4770 bx lr 0802be9e <__sfputs_r>: 802be9e: b5f8 push {r3, r4, r5, r6, r7, lr} 802bea0: 4606 mov r6, r0 802bea2: 460f mov r7, r1 802bea4: 4614 mov r4, r2 802bea6: 18d5 adds r5, r2, r3 802bea8: 42ac cmp r4, r5 802beaa: d101 bne.n 802beb0 <__sfputs_r+0x12> 802beac: 2000 movs r0, #0 802beae: e007 b.n 802bec0 <__sfputs_r+0x22> 802beb0: f814 1b01 ldrb.w r1, [r4], #1 802beb4: 463a mov r2, r7 802beb6: 4630 mov r0, r6 802beb8: f7ff ffda bl 802be70 <__sfputc_r> 802bebc: 1c43 adds r3, r0, #1 802bebe: d1f3 bne.n 802bea8 <__sfputs_r+0xa> 802bec0: bdf8 pop {r3, r4, r5, r6, r7, pc} ... 0802bec4 <_vfiprintf_r>: 802bec4: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802bec8: 460d mov r5, r1 802beca: b09d sub sp, #116 @ 0x74 802becc: 4614 mov r4, r2 802bece: 4698 mov r8, r3 802bed0: 4606 mov r6, r0 802bed2: b118 cbz r0, 802bedc <_vfiprintf_r+0x18> 802bed4: 6a03 ldr r3, [r0, #32] 802bed6: b90b cbnz r3, 802bedc <_vfiprintf_r+0x18> 802bed8: f7fd fd42 bl 8029960 <__sinit> 802bedc: 6e6b ldr r3, [r5, #100] @ 0x64 802bede: 07d9 lsls r1, r3, #31 802bee0: d405 bmi.n 802beee <_vfiprintf_r+0x2a> 802bee2: 89ab ldrh r3, [r5, #12] 802bee4: 059a lsls r2, r3, #22 802bee6: d402 bmi.n 802beee <_vfiprintf_r+0x2a> 802bee8: 6da8 ldr r0, [r5, #88] @ 0x58 802beea: f7fd fff6 bl 8029eda <__retarget_lock_acquire_recursive> 802beee: 89ab ldrh r3, [r5, #12] 802bef0: 071b lsls r3, r3, #28 802bef2: d501 bpl.n 802bef8 <_vfiprintf_r+0x34> 802bef4: 692b ldr r3, [r5, #16] 802bef6: b99b cbnz r3, 802bf20 <_vfiprintf_r+0x5c> 802bef8: 4629 mov r1, r5 802befa: 4630 mov r0, r6 802befc: f7fd fe78 bl 8029bf0 <__swsetup_r> 802bf00: b170 cbz r0, 802bf20 <_vfiprintf_r+0x5c> 802bf02: 6e6b ldr r3, [r5, #100] @ 0x64 802bf04: 07dc lsls r4, r3, #31 802bf06: d504 bpl.n 802bf12 <_vfiprintf_r+0x4e> 802bf08: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802bf0c: b01d add sp, #116 @ 0x74 802bf0e: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802bf12: 89ab ldrh r3, [r5, #12] 802bf14: 0598 lsls r0, r3, #22 802bf16: d4f7 bmi.n 802bf08 <_vfiprintf_r+0x44> 802bf18: 6da8 ldr r0, [r5, #88] @ 0x58 802bf1a: f7fd ffdf bl 8029edc <__retarget_lock_release_recursive> 802bf1e: e7f3 b.n 802bf08 <_vfiprintf_r+0x44> 802bf20: 2300 movs r3, #0 802bf22: 9309 str r3, [sp, #36] @ 0x24 802bf24: 2320 movs r3, #32 802bf26: f88d 3029 strb.w r3, [sp, #41] @ 0x29 802bf2a: f8cd 800c str.w r8, [sp, #12] 802bf2e: 2330 movs r3, #48 @ 0x30 802bf30: f8df 81ac ldr.w r8, [pc, #428] @ 802c0e0 <_vfiprintf_r+0x21c> 802bf34: f88d 302a strb.w r3, [sp, #42] @ 0x2a 802bf38: f04f 0901 mov.w r9, #1 802bf3c: 4623 mov r3, r4 802bf3e: 469a mov sl, r3 802bf40: f813 2b01 ldrb.w r2, [r3], #1 802bf44: b10a cbz r2, 802bf4a <_vfiprintf_r+0x86> 802bf46: 2a25 cmp r2, #37 @ 0x25 802bf48: d1f9 bne.n 802bf3e <_vfiprintf_r+0x7a> 802bf4a: ebba 0b04 subs.w fp, sl, r4 802bf4e: d00b beq.n 802bf68 <_vfiprintf_r+0xa4> 802bf50: 465b mov r3, fp 802bf52: 4622 mov r2, r4 802bf54: 4629 mov r1, r5 802bf56: 4630 mov r0, r6 802bf58: f7ff ffa1 bl 802be9e <__sfputs_r> 802bf5c: 3001 adds r0, #1 802bf5e: f000 80a7 beq.w 802c0b0 <_vfiprintf_r+0x1ec> 802bf62: 9a09 ldr r2, [sp, #36] @ 0x24 802bf64: 445a add r2, fp 802bf66: 9209 str r2, [sp, #36] @ 0x24 802bf68: f89a 3000 ldrb.w r3, [sl] 802bf6c: 2b00 cmp r3, #0 802bf6e: f000 809f beq.w 802c0b0 <_vfiprintf_r+0x1ec> 802bf72: 2300 movs r3, #0 802bf74: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 802bf78: e9cd 2305 strd r2, r3, [sp, #20] 802bf7c: f10a 0a01 add.w sl, sl, #1 802bf80: 9304 str r3, [sp, #16] 802bf82: 9307 str r3, [sp, #28] 802bf84: f88d 3053 strb.w r3, [sp, #83] @ 0x53 802bf88: 931a str r3, [sp, #104] @ 0x68 802bf8a: 4654 mov r4, sl 802bf8c: 2205 movs r2, #5 802bf8e: f814 1b01 ldrb.w r1, [r4], #1 802bf92: 4853 ldr r0, [pc, #332] @ (802c0e0 <_vfiprintf_r+0x21c>) 802bf94: f7d4 f9b4 bl 8000300 802bf98: 9a04 ldr r2, [sp, #16] 802bf9a: b9d8 cbnz r0, 802bfd4 <_vfiprintf_r+0x110> 802bf9c: 06d1 lsls r1, r2, #27 802bf9e: bf44 itt mi 802bfa0: 2320 movmi r3, #32 802bfa2: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53 802bfa6: 0713 lsls r3, r2, #28 802bfa8: bf44 itt mi 802bfaa: 232b movmi r3, #43 @ 0x2b 802bfac: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53 802bfb0: f89a 3000 ldrb.w r3, [sl] 802bfb4: 2b2a cmp r3, #42 @ 0x2a 802bfb6: d015 beq.n 802bfe4 <_vfiprintf_r+0x120> 802bfb8: 9a07 ldr r2, [sp, #28] 802bfba: 4654 mov r4, sl 802bfbc: 2000 movs r0, #0 802bfbe: f04f 0c0a mov.w ip, #10 802bfc2: 4621 mov r1, r4 802bfc4: f811 3b01 ldrb.w r3, [r1], #1 802bfc8: 3b30 subs r3, #48 @ 0x30 802bfca: 2b09 cmp r3, #9 802bfcc: d94b bls.n 802c066 <_vfiprintf_r+0x1a2> 802bfce: b1b0 cbz r0, 802bffe <_vfiprintf_r+0x13a> 802bfd0: 9207 str r2, [sp, #28] 802bfd2: e014 b.n 802bffe <_vfiprintf_r+0x13a> 802bfd4: eba0 0308 sub.w r3, r0, r8 802bfd8: fa09 f303 lsl.w r3, r9, r3 802bfdc: 4313 orrs r3, r2 802bfde: 9304 str r3, [sp, #16] 802bfe0: 46a2 mov sl, r4 802bfe2: e7d2 b.n 802bf8a <_vfiprintf_r+0xc6> 802bfe4: 9b03 ldr r3, [sp, #12] 802bfe6: 1d19 adds r1, r3, #4 802bfe8: 681b ldr r3, [r3, #0] 802bfea: 9103 str r1, [sp, #12] 802bfec: 2b00 cmp r3, #0 802bfee: bfbb ittet lt 802bff0: 425b neglt r3, r3 802bff2: f042 0202 orrlt.w r2, r2, #2 802bff6: 9307 strge r3, [sp, #28] 802bff8: 9307 strlt r3, [sp, #28] 802bffa: bfb8 it lt 802bffc: 9204 strlt r2, [sp, #16] 802bffe: 7823 ldrb r3, [r4, #0] 802c000: 2b2e cmp r3, #46 @ 0x2e 802c002: d10a bne.n 802c01a <_vfiprintf_r+0x156> 802c004: 7863 ldrb r3, [r4, #1] 802c006: 2b2a cmp r3, #42 @ 0x2a 802c008: d132 bne.n 802c070 <_vfiprintf_r+0x1ac> 802c00a: 9b03 ldr r3, [sp, #12] 802c00c: 1d1a adds r2, r3, #4 802c00e: 681b ldr r3, [r3, #0] 802c010: 9203 str r2, [sp, #12] 802c012: ea43 73e3 orr.w r3, r3, r3, asr #31 802c016: 3402 adds r4, #2 802c018: 9305 str r3, [sp, #20] 802c01a: f8df a0d4 ldr.w sl, [pc, #212] @ 802c0f0 <_vfiprintf_r+0x22c> 802c01e: 7821 ldrb r1, [r4, #0] 802c020: 2203 movs r2, #3 802c022: 4650 mov r0, sl 802c024: f7d4 f96c bl 8000300 802c028: b138 cbz r0, 802c03a <_vfiprintf_r+0x176> 802c02a: 9b04 ldr r3, [sp, #16] 802c02c: eba0 000a sub.w r0, r0, sl 802c030: 2240 movs r2, #64 @ 0x40 802c032: 4082 lsls r2, r0 802c034: 4313 orrs r3, r2 802c036: 3401 adds r4, #1 802c038: 9304 str r3, [sp, #16] 802c03a: f814 1b01 ldrb.w r1, [r4], #1 802c03e: 4829 ldr r0, [pc, #164] @ (802c0e4 <_vfiprintf_r+0x220>) 802c040: f88d 1028 strb.w r1, [sp, #40] @ 0x28 802c044: 2206 movs r2, #6 802c046: f7d4 f95b bl 8000300 802c04a: 2800 cmp r0, #0 802c04c: d03f beq.n 802c0ce <_vfiprintf_r+0x20a> 802c04e: 4b26 ldr r3, [pc, #152] @ (802c0e8 <_vfiprintf_r+0x224>) 802c050: bb1b cbnz r3, 802c09a <_vfiprintf_r+0x1d6> 802c052: 9b03 ldr r3, [sp, #12] 802c054: 3307 adds r3, #7 802c056: f023 0307 bic.w r3, r3, #7 802c05a: 3308 adds r3, #8 802c05c: 9303 str r3, [sp, #12] 802c05e: 9b09 ldr r3, [sp, #36] @ 0x24 802c060: 443b add r3, r7 802c062: 9309 str r3, [sp, #36] @ 0x24 802c064: e76a b.n 802bf3c <_vfiprintf_r+0x78> 802c066: fb0c 3202 mla r2, ip, r2, r3 802c06a: 460c mov r4, r1 802c06c: 2001 movs r0, #1 802c06e: e7a8 b.n 802bfc2 <_vfiprintf_r+0xfe> 802c070: 2300 movs r3, #0 802c072: 3401 adds r4, #1 802c074: 9305 str r3, [sp, #20] 802c076: 4619 mov r1, r3 802c078: f04f 0c0a mov.w ip, #10 802c07c: 4620 mov r0, r4 802c07e: f810 2b01 ldrb.w r2, [r0], #1 802c082: 3a30 subs r2, #48 @ 0x30 802c084: 2a09 cmp r2, #9 802c086: d903 bls.n 802c090 <_vfiprintf_r+0x1cc> 802c088: 2b00 cmp r3, #0 802c08a: d0c6 beq.n 802c01a <_vfiprintf_r+0x156> 802c08c: 9105 str r1, [sp, #20] 802c08e: e7c4 b.n 802c01a <_vfiprintf_r+0x156> 802c090: fb0c 2101 mla r1, ip, r1, r2 802c094: 4604 mov r4, r0 802c096: 2301 movs r3, #1 802c098: e7f0 b.n 802c07c <_vfiprintf_r+0x1b8> 802c09a: ab03 add r3, sp, #12 802c09c: 9300 str r3, [sp, #0] 802c09e: 462a mov r2, r5 802c0a0: 4b12 ldr r3, [pc, #72] @ (802c0ec <_vfiprintf_r+0x228>) 802c0a2: a904 add r1, sp, #16 802c0a4: 4630 mov r0, r6 802c0a6: f7fd f827 bl 80290f8 <_printf_float> 802c0aa: 4607 mov r7, r0 802c0ac: 1c78 adds r0, r7, #1 802c0ae: d1d6 bne.n 802c05e <_vfiprintf_r+0x19a> 802c0b0: 6e6b ldr r3, [r5, #100] @ 0x64 802c0b2: 07d9 lsls r1, r3, #31 802c0b4: d405 bmi.n 802c0c2 <_vfiprintf_r+0x1fe> 802c0b6: 89ab ldrh r3, [r5, #12] 802c0b8: 059a lsls r2, r3, #22 802c0ba: d402 bmi.n 802c0c2 <_vfiprintf_r+0x1fe> 802c0bc: 6da8 ldr r0, [r5, #88] @ 0x58 802c0be: f7fd ff0d bl 8029edc <__retarget_lock_release_recursive> 802c0c2: 89ab ldrh r3, [r5, #12] 802c0c4: 065b lsls r3, r3, #25 802c0c6: f53f af1f bmi.w 802bf08 <_vfiprintf_r+0x44> 802c0ca: 9809 ldr r0, [sp, #36] @ 0x24 802c0cc: e71e b.n 802bf0c <_vfiprintf_r+0x48> 802c0ce: ab03 add r3, sp, #12 802c0d0: 9300 str r3, [sp, #0] 802c0d2: 462a mov r2, r5 802c0d4: 4b05 ldr r3, [pc, #20] @ (802c0ec <_vfiprintf_r+0x228>) 802c0d6: a904 add r1, sp, #16 802c0d8: 4630 mov r0, r6 802c0da: f7fd fa95 bl 8029608 <_printf_i> 802c0de: e7e4 b.n 802c0aa <_vfiprintf_r+0x1e6> 802c0e0: 08031090 .word 0x08031090 802c0e4: 0803109a .word 0x0803109a 802c0e8: 080290f9 .word 0x080290f9 802c0ec: 0802be9f .word 0x0802be9f 802c0f0: 08031096 .word 0x08031096 0802c0f4 <__sflush_r>: 802c0f4: f9b1 200c ldrsh.w r2, [r1, #12] 802c0f8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802c0fc: 0716 lsls r6, r2, #28 802c0fe: 4605 mov r5, r0 802c100: 460c mov r4, r1 802c102: d454 bmi.n 802c1ae <__sflush_r+0xba> 802c104: 684b ldr r3, [r1, #4] 802c106: 2b00 cmp r3, #0 802c108: dc02 bgt.n 802c110 <__sflush_r+0x1c> 802c10a: 6c0b ldr r3, [r1, #64] @ 0x40 802c10c: 2b00 cmp r3, #0 802c10e: dd48 ble.n 802c1a2 <__sflush_r+0xae> 802c110: 6ae6 ldr r6, [r4, #44] @ 0x2c 802c112: 2e00 cmp r6, #0 802c114: d045 beq.n 802c1a2 <__sflush_r+0xae> 802c116: 2300 movs r3, #0 802c118: f412 5280 ands.w r2, r2, #4096 @ 0x1000 802c11c: 682f ldr r7, [r5, #0] 802c11e: 6a21 ldr r1, [r4, #32] 802c120: 602b str r3, [r5, #0] 802c122: d030 beq.n 802c186 <__sflush_r+0x92> 802c124: 6d62 ldr r2, [r4, #84] @ 0x54 802c126: 89a3 ldrh r3, [r4, #12] 802c128: 0759 lsls r1, r3, #29 802c12a: d505 bpl.n 802c138 <__sflush_r+0x44> 802c12c: 6863 ldr r3, [r4, #4] 802c12e: 1ad2 subs r2, r2, r3 802c130: 6b63 ldr r3, [r4, #52] @ 0x34 802c132: b10b cbz r3, 802c138 <__sflush_r+0x44> 802c134: 6c23 ldr r3, [r4, #64] @ 0x40 802c136: 1ad2 subs r2, r2, r3 802c138: 2300 movs r3, #0 802c13a: 6ae6 ldr r6, [r4, #44] @ 0x2c 802c13c: 6a21 ldr r1, [r4, #32] 802c13e: 4628 mov r0, r5 802c140: 47b0 blx r6 802c142: 1c43 adds r3, r0, #1 802c144: 89a3 ldrh r3, [r4, #12] 802c146: d106 bne.n 802c156 <__sflush_r+0x62> 802c148: 6829 ldr r1, [r5, #0] 802c14a: 291d cmp r1, #29 802c14c: d82b bhi.n 802c1a6 <__sflush_r+0xb2> 802c14e: 4a2a ldr r2, [pc, #168] @ (802c1f8 <__sflush_r+0x104>) 802c150: 410a asrs r2, r1 802c152: 07d6 lsls r6, r2, #31 802c154: d427 bmi.n 802c1a6 <__sflush_r+0xb2> 802c156: 2200 movs r2, #0 802c158: 6062 str r2, [r4, #4] 802c15a: 04d9 lsls r1, r3, #19 802c15c: 6922 ldr r2, [r4, #16] 802c15e: 6022 str r2, [r4, #0] 802c160: d504 bpl.n 802c16c <__sflush_r+0x78> 802c162: 1c42 adds r2, r0, #1 802c164: d101 bne.n 802c16a <__sflush_r+0x76> 802c166: 682b ldr r3, [r5, #0] 802c168: b903 cbnz r3, 802c16c <__sflush_r+0x78> 802c16a: 6560 str r0, [r4, #84] @ 0x54 802c16c: 6b61 ldr r1, [r4, #52] @ 0x34 802c16e: 602f str r7, [r5, #0] 802c170: b1b9 cbz r1, 802c1a2 <__sflush_r+0xae> 802c172: f104 0344 add.w r3, r4, #68 @ 0x44 802c176: 4299 cmp r1, r3 802c178: d002 beq.n 802c180 <__sflush_r+0x8c> 802c17a: 4628 mov r0, r5 802c17c: f7fe fcc6 bl 802ab0c <_free_r> 802c180: 2300 movs r3, #0 802c182: 6363 str r3, [r4, #52] @ 0x34 802c184: e00d b.n 802c1a2 <__sflush_r+0xae> 802c186: 2301 movs r3, #1 802c188: 4628 mov r0, r5 802c18a: 47b0 blx r6 802c18c: 4602 mov r2, r0 802c18e: 1c50 adds r0, r2, #1 802c190: d1c9 bne.n 802c126 <__sflush_r+0x32> 802c192: 682b ldr r3, [r5, #0] 802c194: 2b00 cmp r3, #0 802c196: d0c6 beq.n 802c126 <__sflush_r+0x32> 802c198: 2b1d cmp r3, #29 802c19a: d001 beq.n 802c1a0 <__sflush_r+0xac> 802c19c: 2b16 cmp r3, #22 802c19e: d11e bne.n 802c1de <__sflush_r+0xea> 802c1a0: 602f str r7, [r5, #0] 802c1a2: 2000 movs r0, #0 802c1a4: e022 b.n 802c1ec <__sflush_r+0xf8> 802c1a6: f043 0340 orr.w r3, r3, #64 @ 0x40 802c1aa: b21b sxth r3, r3 802c1ac: e01b b.n 802c1e6 <__sflush_r+0xf2> 802c1ae: 690f ldr r7, [r1, #16] 802c1b0: 2f00 cmp r7, #0 802c1b2: d0f6 beq.n 802c1a2 <__sflush_r+0xae> 802c1b4: 0793 lsls r3, r2, #30 802c1b6: 680e ldr r6, [r1, #0] 802c1b8: bf08 it eq 802c1ba: 694b ldreq r3, [r1, #20] 802c1bc: 600f str r7, [r1, #0] 802c1be: bf18 it ne 802c1c0: 2300 movne r3, #0 802c1c2: eba6 0807 sub.w r8, r6, r7 802c1c6: 608b str r3, [r1, #8] 802c1c8: f1b8 0f00 cmp.w r8, #0 802c1cc: dde9 ble.n 802c1a2 <__sflush_r+0xae> 802c1ce: 6a21 ldr r1, [r4, #32] 802c1d0: 6aa6 ldr r6, [r4, #40] @ 0x28 802c1d2: 4643 mov r3, r8 802c1d4: 463a mov r2, r7 802c1d6: 4628 mov r0, r5 802c1d8: 47b0 blx r6 802c1da: 2800 cmp r0, #0 802c1dc: dc08 bgt.n 802c1f0 <__sflush_r+0xfc> 802c1de: f9b4 300c ldrsh.w r3, [r4, #12] 802c1e2: f043 0340 orr.w r3, r3, #64 @ 0x40 802c1e6: 81a3 strh r3, [r4, #12] 802c1e8: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802c1ec: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802c1f0: 4407 add r7, r0 802c1f2: eba8 0800 sub.w r8, r8, r0 802c1f6: e7e7 b.n 802c1c8 <__sflush_r+0xd4> 802c1f8: dfbffffe .word 0xdfbffffe 0802c1fc <_fflush_r>: 802c1fc: b538 push {r3, r4, r5, lr} 802c1fe: 690b ldr r3, [r1, #16] 802c200: 4605 mov r5, r0 802c202: 460c mov r4, r1 802c204: b913 cbnz r3, 802c20c <_fflush_r+0x10> 802c206: 2500 movs r5, #0 802c208: 4628 mov r0, r5 802c20a: bd38 pop {r3, r4, r5, pc} 802c20c: b118 cbz r0, 802c216 <_fflush_r+0x1a> 802c20e: 6a03 ldr r3, [r0, #32] 802c210: b90b cbnz r3, 802c216 <_fflush_r+0x1a> 802c212: f7fd fba5 bl 8029960 <__sinit> 802c216: f9b4 300c ldrsh.w r3, [r4, #12] 802c21a: 2b00 cmp r3, #0 802c21c: d0f3 beq.n 802c206 <_fflush_r+0xa> 802c21e: 6e62 ldr r2, [r4, #100] @ 0x64 802c220: 07d0 lsls r0, r2, #31 802c222: d404 bmi.n 802c22e <_fflush_r+0x32> 802c224: 0599 lsls r1, r3, #22 802c226: d402 bmi.n 802c22e <_fflush_r+0x32> 802c228: 6da0 ldr r0, [r4, #88] @ 0x58 802c22a: f7fd fe56 bl 8029eda <__retarget_lock_acquire_recursive> 802c22e: 4628 mov r0, r5 802c230: 4621 mov r1, r4 802c232: f7ff ff5f bl 802c0f4 <__sflush_r> 802c236: 6e63 ldr r3, [r4, #100] @ 0x64 802c238: 07da lsls r2, r3, #31 802c23a: 4605 mov r5, r0 802c23c: d4e4 bmi.n 802c208 <_fflush_r+0xc> 802c23e: 89a3 ldrh r3, [r4, #12] 802c240: 059b lsls r3, r3, #22 802c242: d4e1 bmi.n 802c208 <_fflush_r+0xc> 802c244: 6da0 ldr r0, [r4, #88] @ 0x58 802c246: f7fd fe49 bl 8029edc <__retarget_lock_release_recursive> 802c24a: e7dd b.n 802c208 <_fflush_r+0xc> 0802c24c : 802c24c: b40e push {r1, r2, r3} 802c24e: b503 push {r0, r1, lr} 802c250: 4601 mov r1, r0 802c252: ab03 add r3, sp, #12 802c254: 4805 ldr r0, [pc, #20] @ (802c26c ) 802c256: f853 2b04 ldr.w r2, [r3], #4 802c25a: 6800 ldr r0, [r0, #0] 802c25c: 9301 str r3, [sp, #4] 802c25e: f7ff fe31 bl 802bec4 <_vfiprintf_r> 802c262: b002 add sp, #8 802c264: f85d eb04 ldr.w lr, [sp], #4 802c268: b003 add sp, #12 802c26a: 4770 bx lr 802c26c: 240001d4 .word 0x240001d4 0802c270 <__swhatbuf_r>: 802c270: b570 push {r4, r5, r6, lr} 802c272: 460c mov r4, r1 802c274: f9b1 100e ldrsh.w r1, [r1, #14] 802c278: 2900 cmp r1, #0 802c27a: b096 sub sp, #88 @ 0x58 802c27c: 4615 mov r5, r2 802c27e: 461e mov r6, r3 802c280: da0d bge.n 802c29e <__swhatbuf_r+0x2e> 802c282: 89a3 ldrh r3, [r4, #12] 802c284: f013 0f80 tst.w r3, #128 @ 0x80 802c288: f04f 0100 mov.w r1, #0 802c28c: bf14 ite ne 802c28e: 2340 movne r3, #64 @ 0x40 802c290: f44f 6380 moveq.w r3, #1024 @ 0x400 802c294: 2000 movs r0, #0 802c296: 6031 str r1, [r6, #0] 802c298: 602b str r3, [r5, #0] 802c29a: b016 add sp, #88 @ 0x58 802c29c: bd70 pop {r4, r5, r6, pc} 802c29e: 466a mov r2, sp 802c2a0: f000 f848 bl 802c334 <_fstat_r> 802c2a4: 2800 cmp r0, #0 802c2a6: dbec blt.n 802c282 <__swhatbuf_r+0x12> 802c2a8: 9901 ldr r1, [sp, #4] 802c2aa: f401 4170 and.w r1, r1, #61440 @ 0xf000 802c2ae: f5a1 5300 sub.w r3, r1, #8192 @ 0x2000 802c2b2: 4259 negs r1, r3 802c2b4: 4159 adcs r1, r3 802c2b6: f44f 6380 mov.w r3, #1024 @ 0x400 802c2ba: e7eb b.n 802c294 <__swhatbuf_r+0x24> 0802c2bc <__smakebuf_r>: 802c2bc: 898b ldrh r3, [r1, #12] 802c2be: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 802c2c0: 079d lsls r5, r3, #30 802c2c2: 4606 mov r6, r0 802c2c4: 460c mov r4, r1 802c2c6: d507 bpl.n 802c2d8 <__smakebuf_r+0x1c> 802c2c8: f104 0347 add.w r3, r4, #71 @ 0x47 802c2cc: 6023 str r3, [r4, #0] 802c2ce: 6123 str r3, [r4, #16] 802c2d0: 2301 movs r3, #1 802c2d2: 6163 str r3, [r4, #20] 802c2d4: b003 add sp, #12 802c2d6: bdf0 pop {r4, r5, r6, r7, pc} 802c2d8: ab01 add r3, sp, #4 802c2da: 466a mov r2, sp 802c2dc: f7ff ffc8 bl 802c270 <__swhatbuf_r> 802c2e0: 9f00 ldr r7, [sp, #0] 802c2e2: 4605 mov r5, r0 802c2e4: 4639 mov r1, r7 802c2e6: 4630 mov r0, r6 802c2e8: f7fb ffba bl 8028260 <_malloc_r> 802c2ec: b948 cbnz r0, 802c302 <__smakebuf_r+0x46> 802c2ee: f9b4 300c ldrsh.w r3, [r4, #12] 802c2f2: 059a lsls r2, r3, #22 802c2f4: d4ee bmi.n 802c2d4 <__smakebuf_r+0x18> 802c2f6: f023 0303 bic.w r3, r3, #3 802c2fa: f043 0302 orr.w r3, r3, #2 802c2fe: 81a3 strh r3, [r4, #12] 802c300: e7e2 b.n 802c2c8 <__smakebuf_r+0xc> 802c302: 89a3 ldrh r3, [r4, #12] 802c304: 6020 str r0, [r4, #0] 802c306: f043 0380 orr.w r3, r3, #128 @ 0x80 802c30a: 81a3 strh r3, [r4, #12] 802c30c: 9b01 ldr r3, [sp, #4] 802c30e: e9c4 0704 strd r0, r7, [r4, #16] 802c312: b15b cbz r3, 802c32c <__smakebuf_r+0x70> 802c314: f9b4 100e ldrsh.w r1, [r4, #14] 802c318: 4630 mov r0, r6 802c31a: f000 f81d bl 802c358 <_isatty_r> 802c31e: b128 cbz r0, 802c32c <__smakebuf_r+0x70> 802c320: 89a3 ldrh r3, [r4, #12] 802c322: f023 0303 bic.w r3, r3, #3 802c326: f043 0301 orr.w r3, r3, #1 802c32a: 81a3 strh r3, [r4, #12] 802c32c: 89a3 ldrh r3, [r4, #12] 802c32e: 431d orrs r5, r3 802c330: 81a5 strh r5, [r4, #12] 802c332: e7cf b.n 802c2d4 <__smakebuf_r+0x18> 0802c334 <_fstat_r>: 802c334: b538 push {r3, r4, r5, lr} 802c336: 4d07 ldr r5, [pc, #28] @ (802c354 <_fstat_r+0x20>) 802c338: 2300 movs r3, #0 802c33a: 4604 mov r4, r0 802c33c: 4608 mov r0, r1 802c33e: 4611 mov r1, r2 802c340: 602b str r3, [r5, #0] 802c342: f7d7 fc43 bl 8003bcc <_fstat> 802c346: 1c43 adds r3, r0, #1 802c348: d102 bne.n 802c350 <_fstat_r+0x1c> 802c34a: 682b ldr r3, [r5, #0] 802c34c: b103 cbz r3, 802c350 <_fstat_r+0x1c> 802c34e: 6023 str r3, [r4, #0] 802c350: bd38 pop {r3, r4, r5, pc} 802c352: bf00 nop 802c354: 2402b180 .word 0x2402b180 0802c358 <_isatty_r>: 802c358: b538 push {r3, r4, r5, lr} 802c35a: 4d06 ldr r5, [pc, #24] @ (802c374 <_isatty_r+0x1c>) 802c35c: 2300 movs r3, #0 802c35e: 4604 mov r4, r0 802c360: 4608 mov r0, r1 802c362: 602b str r3, [r5, #0] 802c364: f7d7 fc42 bl 8003bec <_isatty> 802c368: 1c43 adds r3, r0, #1 802c36a: d102 bne.n 802c372 <_isatty_r+0x1a> 802c36c: 682b ldr r3, [r5, #0] 802c36e: b103 cbz r3, 802c372 <_isatty_r+0x1a> 802c370: 6023 str r3, [r4, #0] 802c372: bd38 pop {r3, r4, r5, pc} 802c374: 2402b180 .word 0x2402b180 0802c378 : 802c378: b508 push {r3, lr} 802c37a: 2006 movs r0, #6 802c37c: f000 f840 bl 802c400 802c380: 2001 movs r0, #1 802c382: f7d7 fbd3 bl 8003b2c <_exit> 0802c386 <_calloc_r>: 802c386: b570 push {r4, r5, r6, lr} 802c388: fba1 5402 umull r5, r4, r1, r2 802c38c: b93c cbnz r4, 802c39e <_calloc_r+0x18> 802c38e: 4629 mov r1, r5 802c390: f7fb ff66 bl 8028260 <_malloc_r> 802c394: 4606 mov r6, r0 802c396: b928 cbnz r0, 802c3a4 <_calloc_r+0x1e> 802c398: 2600 movs r6, #0 802c39a: 4630 mov r0, r6 802c39c: bd70 pop {r4, r5, r6, pc} 802c39e: 220c movs r2, #12 802c3a0: 6002 str r2, [r0, #0] 802c3a2: e7f9 b.n 802c398 <_calloc_r+0x12> 802c3a4: 462a mov r2, r5 802c3a6: 4621 mov r1, r4 802c3a8: f7fd fca2 bl 8029cf0 802c3ac: e7f5 b.n 802c39a <_calloc_r+0x14> 0802c3ae <_raise_r>: 802c3ae: 291f cmp r1, #31 802c3b0: b538 push {r3, r4, r5, lr} 802c3b2: 4605 mov r5, r0 802c3b4: 460c mov r4, r1 802c3b6: d904 bls.n 802c3c2 <_raise_r+0x14> 802c3b8: 2316 movs r3, #22 802c3ba: 6003 str r3, [r0, #0] 802c3bc: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802c3c0: bd38 pop {r3, r4, r5, pc} 802c3c2: 6bc2 ldr r2, [r0, #60] @ 0x3c 802c3c4: b112 cbz r2, 802c3cc <_raise_r+0x1e> 802c3c6: f852 3021 ldr.w r3, [r2, r1, lsl #2] 802c3ca: b94b cbnz r3, 802c3e0 <_raise_r+0x32> 802c3cc: 4628 mov r0, r5 802c3ce: f000 f831 bl 802c434 <_getpid_r> 802c3d2: 4622 mov r2, r4 802c3d4: 4601 mov r1, r0 802c3d6: 4628 mov r0, r5 802c3d8: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} 802c3dc: f000 b818 b.w 802c410 <_kill_r> 802c3e0: 2b01 cmp r3, #1 802c3e2: d00a beq.n 802c3fa <_raise_r+0x4c> 802c3e4: 1c59 adds r1, r3, #1 802c3e6: d103 bne.n 802c3f0 <_raise_r+0x42> 802c3e8: 2316 movs r3, #22 802c3ea: 6003 str r3, [r0, #0] 802c3ec: 2001 movs r0, #1 802c3ee: e7e7 b.n 802c3c0 <_raise_r+0x12> 802c3f0: 2100 movs r1, #0 802c3f2: f842 1024 str.w r1, [r2, r4, lsl #2] 802c3f6: 4620 mov r0, r4 802c3f8: 4798 blx r3 802c3fa: 2000 movs r0, #0 802c3fc: e7e0 b.n 802c3c0 <_raise_r+0x12> ... 0802c400 : 802c400: 4b02 ldr r3, [pc, #8] @ (802c40c ) 802c402: 4601 mov r1, r0 802c404: 6818 ldr r0, [r3, #0] 802c406: f7ff bfd2 b.w 802c3ae <_raise_r> 802c40a: bf00 nop 802c40c: 240001d4 .word 0x240001d4 0802c410 <_kill_r>: 802c410: b538 push {r3, r4, r5, lr} 802c412: 4d07 ldr r5, [pc, #28] @ (802c430 <_kill_r+0x20>) 802c414: 2300 movs r3, #0 802c416: 4604 mov r4, r0 802c418: 4608 mov r0, r1 802c41a: 4611 mov r1, r2 802c41c: 602b str r3, [r5, #0] 802c41e: f7d7 fb73 bl 8003b08 <_kill> 802c422: 1c43 adds r3, r0, #1 802c424: d102 bne.n 802c42c <_kill_r+0x1c> 802c426: 682b ldr r3, [r5, #0] 802c428: b103 cbz r3, 802c42c <_kill_r+0x1c> 802c42a: 6023 str r3, [r4, #0] 802c42c: bd38 pop {r3, r4, r5, pc} 802c42e: bf00 nop 802c430: 2402b180 .word 0x2402b180 0802c434 <_getpid_r>: 802c434: f7d7 bb5f b.w 8003af6 <_getpid> 0802c438 <_init>: 802c438: b5f8 push {r3, r4, r5, r6, r7, lr} 802c43a: bf00 nop 802c43c: bcf8 pop {r3, r4, r5, r6, r7} 802c43e: bc08 pop {r3} 802c440: 469e mov lr, r3 802c442: 4770 bx lr 0802c444 <_fini>: 802c444: b5f8 push {r3, r4, r5, r6, r7, lr} 802c446: bf00 nop 802c448: bcf8 pop {r3, r4, r5, r6, r7} 802c44a: bc08 pop {r3} 802c44c: 469e mov lr, r3 802c44e: 4770 bx lr