stm32f042k6.elf: file format elf32-littlearm Sections: Idx Name Size VMA LMA File off Algn 0 .isr_vector 000000c0 08000000 08000000 00001000 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .text 00007420 080000c0 080000c0 000010c0 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .rodata 000000cc 080074e0 080074e0 000084e0 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .ARM.extab 00000000 080075ac 080075ac 00009170 2**0 CONTENTS, READONLY 4 .ARM 00000000 080075ac 080075ac 00009170 2**0 CONTENTS, READONLY 5 .preinit_array 00000000 080075ac 080075ac 00009170 2**0 CONTENTS, ALLOC, LOAD, DATA 6 .init_array 00000004 080075ac 080075ac 000085ac 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 7 .fini_array 00000004 080075b0 080075b0 000085b0 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 8 .data 00000170 20000000 080075b4 00009000 2**2 CONTENTS, ALLOC, LOAD, DATA 9 .bss 000007e4 20000170 08007724 00009170 2**2 ALLOC 10 ._user_heap_stack 00000604 20000954 08007724 00009954 2**0 ALLOC 11 .ARM.attributes 00000028 00000000 00000000 00009170 2**0 CONTENTS, READONLY 12 .debug_info 0000afee 00000000 00000000 00009198 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 13 .debug_abbrev 000028f0 00000000 00000000 00014186 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 14 .debug_aranges 000009d0 00000000 00000000 00016a78 2**3 CONTENTS, READONLY, DEBUGGING, OCTETS 15 .debug_rnglists 00000726 00000000 00000000 00017448 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 16 .debug_macro 00019e92 00000000 00000000 00017b6e 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 17 .debug_line 0000da5d 00000000 00000000 00031a00 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 18 .debug_str 00089298 00000000 00000000 0003f45d 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 19 .comment 00000043 00000000 00000000 000c86f5 2**0 CONTENTS, READONLY 20 .debug_frame 0000205c 00000000 00000000 000c8738 2**2 CONTENTS, READONLY, DEBUGGING, OCTETS 21 .debug_line_str 00000062 00000000 00000000 000ca794 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS Disassembly of section .text: 080000c0 <__do_global_dtors_aux>: 80000c0: b510 push {r4, lr} 80000c2: 4c06 ldr r4, [pc, #24] @ (80000dc <__do_global_dtors_aux+0x1c>) 80000c4: 7823 ldrb r3, [r4, #0] 80000c6: 2b00 cmp r3, #0 80000c8: d107 bne.n 80000da <__do_global_dtors_aux+0x1a> 80000ca: 4b05 ldr r3, [pc, #20] @ (80000e0 <__do_global_dtors_aux+0x20>) 80000cc: 2b00 cmp r3, #0 80000ce: d002 beq.n 80000d6 <__do_global_dtors_aux+0x16> 80000d0: 4804 ldr r0, [pc, #16] @ (80000e4 <__do_global_dtors_aux+0x24>) 80000d2: e000 b.n 80000d6 <__do_global_dtors_aux+0x16> 80000d4: bf00 nop 80000d6: 2301 movs r3, #1 80000d8: 7023 strb r3, [r4, #0] 80000da: bd10 pop {r4, pc} 80000dc: 20000170 .word 0x20000170 80000e0: 00000000 .word 0x00000000 80000e4: 080074c8 .word 0x080074c8 080000e8 : 80000e8: 4b04 ldr r3, [pc, #16] @ (80000fc ) 80000ea: b510 push {r4, lr} 80000ec: 2b00 cmp r3, #0 80000ee: d003 beq.n 80000f8 80000f0: 4903 ldr r1, [pc, #12] @ (8000100 ) 80000f2: 4804 ldr r0, [pc, #16] @ (8000104 ) 80000f4: e000 b.n 80000f8 80000f6: bf00 nop 80000f8: bd10 pop {r4, pc} 80000fa: 46c0 nop @ (mov r8, r8) 80000fc: 00000000 .word 0x00000000 8000100: 20000174 .word 0x20000174 8000104: 080074c8 .word 0x080074c8 08000108 <__udivsi3>: 8000108: 2200 movs r2, #0 800010a: 0843 lsrs r3, r0, #1 800010c: 428b cmp r3, r1 800010e: d374 bcc.n 80001fa <__udivsi3+0xf2> 8000110: 0903 lsrs r3, r0, #4 8000112: 428b cmp r3, r1 8000114: d35f bcc.n 80001d6 <__udivsi3+0xce> 8000116: 0a03 lsrs r3, r0, #8 8000118: 428b cmp r3, r1 800011a: d344 bcc.n 80001a6 <__udivsi3+0x9e> 800011c: 0b03 lsrs r3, r0, #12 800011e: 428b cmp r3, r1 8000120: d328 bcc.n 8000174 <__udivsi3+0x6c> 8000122: 0c03 lsrs r3, r0, #16 8000124: 428b cmp r3, r1 8000126: d30d bcc.n 8000144 <__udivsi3+0x3c> 8000128: 22ff movs r2, #255 @ 0xff 800012a: 0209 lsls r1, r1, #8 800012c: ba12 rev r2, r2 800012e: 0c03 lsrs r3, r0, #16 8000130: 428b cmp r3, r1 8000132: d302 bcc.n 800013a <__udivsi3+0x32> 8000134: 1212 asrs r2, r2, #8 8000136: 0209 lsls r1, r1, #8 8000138: d065 beq.n 8000206 <__udivsi3+0xfe> 800013a: 0b03 lsrs r3, r0, #12 800013c: 428b cmp r3, r1 800013e: d319 bcc.n 8000174 <__udivsi3+0x6c> 8000140: e000 b.n 8000144 <__udivsi3+0x3c> 8000142: 0a09 lsrs r1, r1, #8 8000144: 0bc3 lsrs r3, r0, #15 8000146: 428b cmp r3, r1 8000148: d301 bcc.n 800014e <__udivsi3+0x46> 800014a: 03cb lsls r3, r1, #15 800014c: 1ac0 subs r0, r0, r3 800014e: 4152 adcs r2, r2 8000150: 0b83 lsrs r3, r0, #14 8000152: 428b cmp r3, r1 8000154: d301 bcc.n 800015a <__udivsi3+0x52> 8000156: 038b lsls r3, r1, #14 8000158: 1ac0 subs r0, r0, r3 800015a: 4152 adcs r2, r2 800015c: 0b43 lsrs r3, r0, #13 800015e: 428b cmp r3, r1 8000160: d301 bcc.n 8000166 <__udivsi3+0x5e> 8000162: 034b lsls r3, r1, #13 8000164: 1ac0 subs r0, r0, r3 8000166: 4152 adcs r2, r2 8000168: 0b03 lsrs r3, r0, #12 800016a: 428b cmp r3, r1 800016c: d301 bcc.n 8000172 <__udivsi3+0x6a> 800016e: 030b lsls r3, r1, #12 8000170: 1ac0 subs r0, r0, r3 8000172: 4152 adcs r2, r2 8000174: 0ac3 lsrs r3, r0, #11 8000176: 428b cmp r3, r1 8000178: d301 bcc.n 800017e <__udivsi3+0x76> 800017a: 02cb lsls r3, r1, #11 800017c: 1ac0 subs r0, r0, r3 800017e: 4152 adcs r2, r2 8000180: 0a83 lsrs r3, r0, #10 8000182: 428b cmp r3, r1 8000184: d301 bcc.n 800018a <__udivsi3+0x82> 8000186: 028b lsls r3, r1, #10 8000188: 1ac0 subs r0, r0, r3 800018a: 4152 adcs r2, r2 800018c: 0a43 lsrs r3, r0, #9 800018e: 428b cmp r3, r1 8000190: d301 bcc.n 8000196 <__udivsi3+0x8e> 8000192: 024b lsls r3, r1, #9 8000194: 1ac0 subs r0, r0, r3 8000196: 4152 adcs r2, r2 8000198: 0a03 lsrs r3, r0, #8 800019a: 428b cmp r3, r1 800019c: d301 bcc.n 80001a2 <__udivsi3+0x9a> 800019e: 020b lsls r3, r1, #8 80001a0: 1ac0 subs r0, r0, r3 80001a2: 4152 adcs r2, r2 80001a4: d2cd bcs.n 8000142 <__udivsi3+0x3a> 80001a6: 09c3 lsrs r3, r0, #7 80001a8: 428b cmp r3, r1 80001aa: d301 bcc.n 80001b0 <__udivsi3+0xa8> 80001ac: 01cb lsls r3, r1, #7 80001ae: 1ac0 subs r0, r0, r3 80001b0: 4152 adcs r2, r2 80001b2: 0983 lsrs r3, r0, #6 80001b4: 428b cmp r3, r1 80001b6: d301 bcc.n 80001bc <__udivsi3+0xb4> 80001b8: 018b lsls r3, r1, #6 80001ba: 1ac0 subs r0, r0, r3 80001bc: 4152 adcs r2, r2 80001be: 0943 lsrs r3, r0, #5 80001c0: 428b cmp r3, r1 80001c2: d301 bcc.n 80001c8 <__udivsi3+0xc0> 80001c4: 014b lsls r3, r1, #5 80001c6: 1ac0 subs r0, r0, r3 80001c8: 4152 adcs r2, r2 80001ca: 0903 lsrs r3, r0, #4 80001cc: 428b cmp r3, r1 80001ce: d301 bcc.n 80001d4 <__udivsi3+0xcc> 80001d0: 010b lsls r3, r1, #4 80001d2: 1ac0 subs r0, r0, r3 80001d4: 4152 adcs r2, r2 80001d6: 08c3 lsrs r3, r0, #3 80001d8: 428b cmp r3, r1 80001da: d301 bcc.n 80001e0 <__udivsi3+0xd8> 80001dc: 00cb lsls r3, r1, #3 80001de: 1ac0 subs r0, r0, r3 80001e0: 4152 adcs r2, r2 80001e2: 0883 lsrs r3, r0, #2 80001e4: 428b cmp r3, r1 80001e6: d301 bcc.n 80001ec <__udivsi3+0xe4> 80001e8: 008b lsls r3, r1, #2 80001ea: 1ac0 subs r0, r0, r3 80001ec: 4152 adcs r2, r2 80001ee: 0843 lsrs r3, r0, #1 80001f0: 428b cmp r3, r1 80001f2: d301 bcc.n 80001f8 <__udivsi3+0xf0> 80001f4: 004b lsls r3, r1, #1 80001f6: 1ac0 subs r0, r0, r3 80001f8: 4152 adcs r2, r2 80001fa: 1a41 subs r1, r0, r1 80001fc: d200 bcs.n 8000200 <__udivsi3+0xf8> 80001fe: 4601 mov r1, r0 8000200: 4152 adcs r2, r2 8000202: 4610 mov r0, r2 8000204: 4770 bx lr 8000206: e7ff b.n 8000208 <__udivsi3+0x100> 8000208: b501 push {r0, lr} 800020a: 2000 movs r0, #0 800020c: f000 f806 bl 800021c <__aeabi_idiv0> 8000210: bd02 pop {r1, pc} 8000212: 46c0 nop @ (mov r8, r8) 08000214 <__aeabi_uidivmod>: 8000214: 2900 cmp r1, #0 8000216: d0f7 beq.n 8000208 <__udivsi3+0x100> 8000218: e776 b.n 8000108 <__udivsi3> 800021a: 4770 bx lr 0800021c <__aeabi_idiv0>: 800021c: 4770 bx lr 800021e: 46c0 nop @ (mov r8, r8) 08000220 : /* USER CODE END 1 */ /** Configure pins */ void MX_GPIO_Init(void) { 8000220: b580 push {r7, lr} 8000222: b086 sub sp, #24 8000224: af00 add r7, sp, #0 GPIO_InitTypeDef GPIO_InitStruct = {0}; 8000226: 1d3b adds r3, r7, #4 8000228: 0018 movs r0, r3 800022a: 2314 movs r3, #20 800022c: 001a movs r2, r3 800022e: 2100 movs r1, #0 8000230: f007 f91e bl 8007470 /* GPIO Ports Clock Enable */ __HAL_RCC_GPIOA_CLK_ENABLE(); 8000234: 4b10 ldr r3, [pc, #64] @ (8000278 ) 8000236: 695a ldr r2, [r3, #20] 8000238: 4b0f ldr r3, [pc, #60] @ (8000278 ) 800023a: 2180 movs r1, #128 @ 0x80 800023c: 0289 lsls r1, r1, #10 800023e: 430a orrs r2, r1 8000240: 615a str r2, [r3, #20] 8000242: 4b0d ldr r3, [pc, #52] @ (8000278 ) 8000244: 695a ldr r2, [r3, #20] 8000246: 2380 movs r3, #128 @ 0x80 8000248: 029b lsls r3, r3, #10 800024a: 4013 ands r3, r2 800024c: 603b str r3, [r7, #0] 800024e: 683b ldr r3, [r7, #0] /*Configure GPIO pins : PA0 PA1 PA2 PA3 PA4 PA5 PA6 PA7 */ GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3 8000250: 1d3b adds r3, r7, #4 8000252: 22ff movs r2, #255 @ 0xff 8000254: 601a str r2, [r3, #0] |GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7; GPIO_InitStruct.Mode = GPIO_MODE_INPUT; 8000256: 1d3b adds r3, r7, #4 8000258: 2200 movs r2, #0 800025a: 605a str r2, [r3, #4] GPIO_InitStruct.Pull = GPIO_PULLDOWN; 800025c: 1d3b adds r3, r7, #4 800025e: 2202 movs r2, #2 8000260: 609a str r2, [r3, #8] HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); 8000262: 1d3a adds r2, r7, #4 8000264: 2390 movs r3, #144 @ 0x90 8000266: 05db lsls r3, r3, #23 8000268: 0011 movs r1, r2 800026a: 0018 movs r0, r3 800026c: f000 fa9a bl 80007a4 } 8000270: 46c0 nop @ (mov r8, r8) 8000272: 46bd mov sp, r7 8000274: b006 add sp, #24 8000276: bd80 pop {r7, pc} 8000278: 40021000 .word 0x40021000 0800027c
: /** * @brief The application entry point. * @retval int */ int main(void) { 800027c: b580 push {r7, lr} 800027e: b082 sub sp, #8 8000280: af00 add r7, sp, #0 /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); 8000282: f000 f929 bl 80004d8 /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); 8000286: f000 f83b bl 8000300 /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); 800028a: f7ff ffc9 bl 8000220 MX_USB_DEVICE_Init(); 800028e: f006 fc67 bl 8006b60 while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ memset(&report, 0, sizeof(report)); 8000292: 4b17 ldr r3, [pc, #92] @ (80002f0 ) 8000294: 220a movs r2, #10 8000296: 2100 movs r1, #0 8000298: 0018 movs r0, r3 800029a: f007 f8e9 bl 8007470 for (int i = 0; i < 8; i++) { 800029e: 2300 movs r3, #0 80002a0: 607b str r3, [r7, #4] 80002a2: e018 b.n 80002d6 if (HAL_GPIO_ReadPin(GPIOA, pins[i])) { 80002a4: 4b13 ldr r3, [pc, #76] @ (80002f4 ) 80002a6: 687a ldr r2, [r7, #4] 80002a8: 0052 lsls r2, r2, #1 80002aa: 5ad2 ldrh r2, [r2, r3] 80002ac: 2390 movs r3, #144 @ 0x90 80002ae: 05db lsls r3, r3, #23 80002b0: 0011 movs r1, r2 80002b2: 0018 movs r0, r3 80002b4: f000 fbde bl 8000a74 80002b8: 1e03 subs r3, r0, #0 80002ba: d009 beq.n 80002d0 report.KEYS[i] = key_mapping[i]; 80002bc: 4a0e ldr r2, [pc, #56] @ (80002f8 ) 80002be: 687b ldr r3, [r7, #4] 80002c0: 18d3 adds r3, r2, r3 80002c2: 7819 ldrb r1, [r3, #0] 80002c4: 4a0a ldr r2, [pc, #40] @ (80002f0 ) 80002c6: 687b ldr r3, [r7, #4] 80002c8: 18d3 adds r3, r2, r3 80002ca: 3302 adds r3, #2 80002cc: 1c0a adds r2, r1, #0 80002ce: 701a strb r2, [r3, #0] for (int i = 0; i < 8; i++) { 80002d0: 687b ldr r3, [r7, #4] 80002d2: 3301 adds r3, #1 80002d4: 607b str r3, [r7, #4] 80002d6: 687b ldr r3, [r7, #4] 80002d8: 2b07 cmp r3, #7 80002da: dde3 ble.n 80002a4 } } USBD_HID_SendReport(&hUsbDeviceFS, &report, sizeof(report)); 80002dc: 4904 ldr r1, [pc, #16] @ (80002f0 ) 80002de: 4b07 ldr r3, [pc, #28] @ (80002fc ) 80002e0: 220a movs r2, #10 80002e2: 0018 movs r0, r3 80002e4: f005 f9e4 bl 80056b0 HAL_Delay(50); 80002e8: 2032 movs r0, #50 @ 0x32 80002ea: f000 f959 bl 80005a0 memset(&report, 0, sizeof(report)); 80002ee: e7d0 b.n 8000292 80002f0: 2000018c .word 0x2000018c 80002f4: 20000008 .word 0x20000008 80002f8: 20000000 .word 0x20000000 80002fc: 200001a0 .word 0x200001a0 08000300 : /** * @brief System Clock Configuration * @retval None */ void SystemClock_Config(void) { 8000300: b590 push {r4, r7, lr} 8000302: b099 sub sp, #100 @ 0x64 8000304: af00 add r7, sp, #0 RCC_OscInitTypeDef RCC_OscInitStruct = {0}; 8000306: 242c movs r4, #44 @ 0x2c 8000308: 193b adds r3, r7, r4 800030a: 0018 movs r0, r3 800030c: 2334 movs r3, #52 @ 0x34 800030e: 001a movs r2, r3 8000310: 2100 movs r1, #0 8000312: f007 f8ad bl 8007470 RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; 8000316: 231c movs r3, #28 8000318: 18fb adds r3, r7, r3 800031a: 0018 movs r0, r3 800031c: 2310 movs r3, #16 800031e: 001a movs r2, r3 8000320: 2100 movs r1, #0 8000322: f007 f8a5 bl 8007470 RCC_PeriphCLKInitTypeDef PeriphClkInit = {0}; 8000326: 1d3b adds r3, r7, #4 8000328: 0018 movs r0, r3 800032a: 2318 movs r3, #24 800032c: 001a movs r2, r3 800032e: 2100 movs r1, #0 8000330: f007 f89e bl 8007470 /** Initializes the RCC Oscillators according to the specified parameters * in the RCC_OscInitTypeDef structure. */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48; 8000334: 193b adds r3, r7, r4 8000336: 2220 movs r2, #32 8000338: 601a str r2, [r3, #0] RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; 800033a: 193b adds r3, r7, r4 800033c: 2201 movs r2, #1 800033e: 621a str r2, [r3, #32] RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE; 8000340: 193b adds r3, r7, r4 8000342: 2200 movs r2, #0 8000344: 625a str r2, [r3, #36] @ 0x24 if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) 8000346: 193b adds r3, r7, r4 8000348: 0018 movs r0, r3 800034a: f002 f9db bl 8002704 800034e: 1e03 subs r3, r0, #0 8000350: d001 beq.n 8000356 { Error_Handler(); 8000352: f000 f829 bl 80003a8 } /** Initializes the CPU, AHB and APB buses clocks */ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK 8000356: 211c movs r1, #28 8000358: 187b adds r3, r7, r1 800035a: 2207 movs r2, #7 800035c: 601a str r2, [r3, #0] |RCC_CLOCKTYPE_PCLK1; RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI48; 800035e: 187b adds r3, r7, r1 8000360: 2203 movs r2, #3 8000362: 605a str r2, [r3, #4] RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; 8000364: 187b adds r3, r7, r1 8000366: 2200 movs r2, #0 8000368: 609a str r2, [r3, #8] RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; 800036a: 187b adds r3, r7, r1 800036c: 2200 movs r2, #0 800036e: 60da str r2, [r3, #12] if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) 8000370: 187b adds r3, r7, r1 8000372: 2101 movs r1, #1 8000374: 0018 movs r0, r3 8000376: f002 fd4b bl 8002e10 800037a: 1e03 subs r3, r0, #0 800037c: d001 beq.n 8000382 { Error_Handler(); 800037e: f000 f813 bl 80003a8 } PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB; 8000382: 1d3b adds r3, r7, #4 8000384: 2280 movs r2, #128 @ 0x80 8000386: 0292 lsls r2, r2, #10 8000388: 601a str r2, [r3, #0] PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_HSI48; 800038a: 1d3b adds r3, r7, #4 800038c: 2200 movs r2, #0 800038e: 615a str r2, [r3, #20] if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) 8000390: 1d3b adds r3, r7, #4 8000392: 0018 movs r0, r3 8000394: f002 fe88 bl 80030a8 8000398: 1e03 subs r3, r0, #0 800039a: d001 beq.n 80003a0 { Error_Handler(); 800039c: f000 f804 bl 80003a8 } } 80003a0: 46c0 nop @ (mov r8, r8) 80003a2: 46bd mov sp, r7 80003a4: b019 add sp, #100 @ 0x64 80003a6: bd90 pop {r4, r7, pc} 080003a8 : /** * @brief This function is executed in case of error occurrence. * @retval None */ void Error_Handler(void) { 80003a8: b580 push {r7, lr} 80003aa: af00 add r7, sp, #0 \details Disables IRQ interrupts by setting the I-bit in the CPSR. Can only be executed in Privileged modes. */ __STATIC_FORCEINLINE void __disable_irq(void) { __ASM volatile ("cpsid i" : : : "memory"); 80003ac: b672 cpsid i } 80003ae: 46c0 nop @ (mov r8, r8) /* USER CODE BEGIN Error_Handler_Debug */ /* User can add his own implementation to report the HAL error return state */ __disable_irq(); while (1) 80003b0: 46c0 nop @ (mov r8, r8) 80003b2: e7fd b.n 80003b0 080003b4 : /* USER CODE END 0 */ /** * Initializes the Global MSP. */ void HAL_MspInit(void) { 80003b4: b580 push {r7, lr} 80003b6: b082 sub sp, #8 80003b8: af00 add r7, sp, #0 /* USER CODE BEGIN MspInit 0 */ /* USER CODE END MspInit 0 */ __HAL_RCC_SYSCFG_CLK_ENABLE(); 80003ba: 4b0f ldr r3, [pc, #60] @ (80003f8 ) 80003bc: 699a ldr r2, [r3, #24] 80003be: 4b0e ldr r3, [pc, #56] @ (80003f8 ) 80003c0: 2101 movs r1, #1 80003c2: 430a orrs r2, r1 80003c4: 619a str r2, [r3, #24] 80003c6: 4b0c ldr r3, [pc, #48] @ (80003f8 ) 80003c8: 699b ldr r3, [r3, #24] 80003ca: 2201 movs r2, #1 80003cc: 4013 ands r3, r2 80003ce: 607b str r3, [r7, #4] 80003d0: 687b ldr r3, [r7, #4] __HAL_RCC_PWR_CLK_ENABLE(); 80003d2: 4b09 ldr r3, [pc, #36] @ (80003f8 ) 80003d4: 69da ldr r2, [r3, #28] 80003d6: 4b08 ldr r3, [pc, #32] @ (80003f8 ) 80003d8: 2180 movs r1, #128 @ 0x80 80003da: 0549 lsls r1, r1, #21 80003dc: 430a orrs r2, r1 80003de: 61da str r2, [r3, #28] 80003e0: 4b05 ldr r3, [pc, #20] @ (80003f8 ) 80003e2: 69da ldr r2, [r3, #28] 80003e4: 2380 movs r3, #128 @ 0x80 80003e6: 055b lsls r3, r3, #21 80003e8: 4013 ands r3, r2 80003ea: 603b str r3, [r7, #0] 80003ec: 683b ldr r3, [r7, #0] /* System interrupt init*/ /* USER CODE BEGIN MspInit 1 */ /* USER CODE END MspInit 1 */ } 80003ee: 46c0 nop @ (mov r8, r8) 80003f0: 46bd mov sp, r7 80003f2: b002 add sp, #8 80003f4: bd80 pop {r7, pc} 80003f6: 46c0 nop @ (mov r8, r8) 80003f8: 40021000 .word 0x40021000 080003fc : /******************************************************************************/ /** * @brief This function handles Non maskable interrupt. */ void NMI_Handler(void) { 80003fc: b580 push {r7, lr} 80003fe: 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) 8000400: 46c0 nop @ (mov r8, r8) 8000402: e7fd b.n 8000400 08000404 : /** * @brief This function handles Hard fault interrupt. */ void HardFault_Handler(void) { 8000404: b580 push {r7, lr} 8000406: af00 add r7, sp, #0 /* USER CODE BEGIN HardFault_IRQn 0 */ /* USER CODE END HardFault_IRQn 0 */ while (1) 8000408: 46c0 nop @ (mov r8, r8) 800040a: e7fd b.n 8000408 0800040c : /** * @brief This function handles System service call via SWI instruction. */ void SVC_Handler(void) { 800040c: b580 push {r7, lr} 800040e: af00 add r7, sp, #0 /* USER CODE END SVC_IRQn 0 */ /* USER CODE BEGIN SVC_IRQn 1 */ /* USER CODE END SVC_IRQn 1 */ } 8000410: 46c0 nop @ (mov r8, r8) 8000412: 46bd mov sp, r7 8000414: bd80 pop {r7, pc} 08000416 : /** * @brief This function handles Pendable request for system service. */ void PendSV_Handler(void) { 8000416: b580 push {r7, lr} 8000418: af00 add r7, sp, #0 /* USER CODE END PendSV_IRQn 0 */ /* USER CODE BEGIN PendSV_IRQn 1 */ /* USER CODE END PendSV_IRQn 1 */ } 800041a: 46c0 nop @ (mov r8, r8) 800041c: 46bd mov sp, r7 800041e: bd80 pop {r7, pc} 08000420 : /** * @brief This function handles System tick timer. */ void SysTick_Handler(void) { 8000420: b580 push {r7, lr} 8000422: af00 add r7, sp, #0 /* USER CODE BEGIN SysTick_IRQn 0 */ /* USER CODE END SysTick_IRQn 0 */ HAL_IncTick(); 8000424: f000 f8a0 bl 8000568 /* USER CODE BEGIN SysTick_IRQn 1 */ /* USER CODE END SysTick_IRQn 1 */ } 8000428: 46c0 nop @ (mov r8, r8) 800042a: 46bd mov sp, r7 800042c: bd80 pop {r7, pc} ... 08000430 : /** * @brief This function handles USB global Interrupt / USB wake-up interrupt through EXTI line 18. */ void USB_IRQHandler(void) { 8000430: b580 push {r7, lr} 8000432: af00 add r7, sp, #0 /* USER CODE BEGIN USB_IRQn 0 */ /* USER CODE END USB_IRQn 0 */ HAL_PCD_IRQHandler(&hpcd_USB_FS); 8000434: 4b03 ldr r3, [pc, #12] @ (8000444 ) 8000436: 0018 movs r0, r3 8000438: f000 fc54 bl 8000ce4 /* USER CODE BEGIN USB_IRQn 1 */ /* USER CODE END USB_IRQn 1 */ } 800043c: 46c0 nop @ (mov r8, r8) 800043e: 46bd mov sp, r7 8000440: bd80 pop {r7, pc} 8000442: 46c0 nop @ (mov r8, r8) 8000444: 20000664 .word 0x20000664 08000448 : * @brief Setup the microcontroller system * @param None * @retval None */ void SystemInit(void) { 8000448: b580 push {r7, lr} 800044a: af00 add r7, sp, #0 before branch to main program. This call is made inside the "startup_stm32f0xx.s" file. User can setups the default system clock (System clock source, PLL Multiplier and Divider factors, AHB/APBx prescalers and Flash settings). */ } 800044c: 46c0 nop @ (mov r8, r8) 800044e: 46bd mov sp, r7 8000450: bd80 pop {r7, pc} ... 08000454 : .section .text.Reset_Handler .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: ldr r0, =_estack 8000454: 4813 ldr r0, [pc, #76] @ (80004a4 ) mov sp, r0 /* set stack pointer */ 8000456: 4685 mov sp, r0 /* Call the clock system initialization function.*/ bl SystemInit 8000458: f7ff fff6 bl 8000448 /*Check if boot space corresponds to test memory*/ LDR R0,=0x00000004 800045c: 4812 ldr r0, [pc, #72] @ (80004a8 ) LDR R1, [R0] 800045e: 6801 ldr r1, [r0, #0] LSRS R1, R1, #24 8000460: 0e09 lsrs r1, r1, #24 LDR R2,=0x1F 8000462: 4a12 ldr r2, [pc, #72] @ (80004ac ) CMP R1, R2 8000464: 4291 cmp r1, r2 BNE ApplicationStart 8000466: d105 bne.n 8000474 /*SYSCFG clock enable*/ LDR R0,=0x40021018 8000468: 4811 ldr r0, [pc, #68] @ (80004b0 ) LDR R1,=0x00000001 800046a: 4912 ldr r1, [pc, #72] @ (80004b4 ) STR R1, [R0] 800046c: 6001 str r1, [r0, #0] /*Set CFGR1 register with flash memory remap at address 0*/ LDR R0,=0x40010000 800046e: 4812 ldr r0, [pc, #72] @ (80004b8 ) LDR R1,=0x00000000 8000470: 4912 ldr r1, [pc, #72] @ (80004bc ) STR R1, [R0] 8000472: 6001 str r1, [r0, #0] 08000474 : ApplicationStart: /* Copy the data segment initializers from flash to SRAM */ ldr r0, =_sdata 8000474: 4812 ldr r0, [pc, #72] @ (80004c0 ) ldr r1, =_edata 8000476: 4913 ldr r1, [pc, #76] @ (80004c4 ) ldr r2, =_sidata 8000478: 4a13 ldr r2, [pc, #76] @ (80004c8 ) movs r3, #0 800047a: 2300 movs r3, #0 b LoopCopyDataInit 800047c: e002 b.n 8000484 0800047e : CopyDataInit: ldr r4, [r2, r3] 800047e: 58d4 ldr r4, [r2, r3] str r4, [r0, r3] 8000480: 50c4 str r4, [r0, r3] adds r3, r3, #4 8000482: 3304 adds r3, #4 08000484 : LoopCopyDataInit: adds r4, r0, r3 8000484: 18c4 adds r4, r0, r3 cmp r4, r1 8000486: 428c cmp r4, r1 bcc CopyDataInit 8000488: d3f9 bcc.n 800047e /* Zero fill the bss segment. */ ldr r2, =_sbss 800048a: 4a10 ldr r2, [pc, #64] @ (80004cc ) ldr r4, =_ebss 800048c: 4c10 ldr r4, [pc, #64] @ (80004d0 ) movs r3, #0 800048e: 2300 movs r3, #0 b LoopFillZerobss 8000490: e001 b.n 8000496 08000492 : FillZerobss: str r3, [r2] 8000492: 6013 str r3, [r2, #0] adds r2, r2, #4 8000494: 3204 adds r2, #4 08000496 : LoopFillZerobss: cmp r2, r4 8000496: 42a2 cmp r2, r4 bcc FillZerobss 8000498: d3fb bcc.n 8000492 /* Call static constructors */ bl __libc_init_array 800049a: f006 fff1 bl 8007480 <__libc_init_array> /* Call the application's entry point.*/ bl main 800049e: f7ff feed bl 800027c
080004a2 : LoopForever: b LoopForever 80004a2: e7fe b.n 80004a2 ldr r0, =_estack 80004a4: 20001800 .word 0x20001800 LDR R0,=0x00000004 80004a8: 00000004 .word 0x00000004 LDR R2,=0x1F 80004ac: 0000001f .word 0x0000001f LDR R0,=0x40021018 80004b0: 40021018 .word 0x40021018 LDR R1,=0x00000001 80004b4: 00000001 .word 0x00000001 LDR R0,=0x40010000 80004b8: 40010000 .word 0x40010000 LDR R1,=0x00000000 80004bc: 00000000 .word 0x00000000 ldr r0, =_sdata 80004c0: 20000000 .word 0x20000000 ldr r1, =_edata 80004c4: 20000170 .word 0x20000170 ldr r2, =_sidata 80004c8: 080075b4 .word 0x080075b4 ldr r2, =_sbss 80004cc: 20000170 .word 0x20000170 ldr r4, =_ebss 80004d0: 20000954 .word 0x20000954 080004d4 : * @retval : None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop 80004d4: e7fe b.n 80004d4 ... 080004d8 : * In the default implementation,Systick is used as source of time base. * The tick variable is incremented each 1ms in its ISR. * @retval HAL status */ HAL_StatusTypeDef HAL_Init(void) { 80004d8: b580 push {r7, lr} 80004da: af00 add r7, sp, #0 /* Configure Flash prefetch */ #if (PREFETCH_ENABLE != 0) __HAL_FLASH_PREFETCH_BUFFER_ENABLE(); 80004dc: 4b07 ldr r3, [pc, #28] @ (80004fc ) 80004de: 681a ldr r2, [r3, #0] 80004e0: 4b06 ldr r3, [pc, #24] @ (80004fc ) 80004e2: 2110 movs r1, #16 80004e4: 430a orrs r2, r1 80004e6: 601a str r2, [r3, #0] #endif /* PREFETCH_ENABLE */ /* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */ HAL_InitTick(TICK_INT_PRIORITY); 80004e8: 2003 movs r0, #3 80004ea: f000 f809 bl 8000500 /* Init the low level hardware */ HAL_MspInit(); 80004ee: f7ff ff61 bl 80003b4 /* Return function status */ return HAL_OK; 80004f2: 2300 movs r3, #0 } 80004f4: 0018 movs r0, r3 80004f6: 46bd mov sp, r7 80004f8: bd80 pop {r7, pc} 80004fa: 46c0 nop @ (mov r8, r8) 80004fc: 40022000 .word 0x40022000 08000500 : * implementation in user file. * @param TickPriority Tick interrupt priority. * @retval HAL status */ __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) { 8000500: b590 push {r4, r7, lr} 8000502: b083 sub sp, #12 8000504: af00 add r7, sp, #0 8000506: 6078 str r0, [r7, #4] /*Configure the SysTick to have interrupt in 1ms time basis*/ if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U) 8000508: 4b14 ldr r3, [pc, #80] @ (800055c ) 800050a: 681c ldr r4, [r3, #0] 800050c: 4b14 ldr r3, [pc, #80] @ (8000560 ) 800050e: 781b ldrb r3, [r3, #0] 8000510: 0019 movs r1, r3 8000512: 23fa movs r3, #250 @ 0xfa 8000514: 0098 lsls r0, r3, #2 8000516: f7ff fdf7 bl 8000108 <__udivsi3> 800051a: 0003 movs r3, r0 800051c: 0019 movs r1, r3 800051e: 0020 movs r0, r4 8000520: f7ff fdf2 bl 8000108 <__udivsi3> 8000524: 0003 movs r3, r0 8000526: 0018 movs r0, r3 8000528: f000 f92f bl 800078a 800052c: 1e03 subs r3, r0, #0 800052e: d001 beq.n 8000534 { return HAL_ERROR; 8000530: 2301 movs r3, #1 8000532: e00f b.n 8000554 } /* Configure the SysTick IRQ priority */ if (TickPriority < (1UL << __NVIC_PRIO_BITS)) 8000534: 687b ldr r3, [r7, #4] 8000536: 2b03 cmp r3, #3 8000538: d80b bhi.n 8000552 { HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U); 800053a: 6879 ldr r1, [r7, #4] 800053c: 2301 movs r3, #1 800053e: 425b negs r3, r3 8000540: 2200 movs r2, #0 8000542: 0018 movs r0, r3 8000544: f000 f8fc bl 8000740 uwTickPrio = TickPriority; 8000548: 4b06 ldr r3, [pc, #24] @ (8000564 ) 800054a: 687a ldr r2, [r7, #4] 800054c: 601a str r2, [r3, #0] { return HAL_ERROR; } /* Return function status */ return HAL_OK; 800054e: 2300 movs r3, #0 8000550: e000 b.n 8000554 return HAL_ERROR; 8000552: 2301 movs r3, #1 } 8000554: 0018 movs r0, r3 8000556: 46bd mov sp, r7 8000558: b003 add sp, #12 800055a: bd90 pop {r4, r7, pc} 800055c: 20000018 .word 0x20000018 8000560: 20000020 .word 0x20000020 8000564: 2000001c .word 0x2000001c 08000568 : * @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) { 8000568: b580 push {r7, lr} 800056a: af00 add r7, sp, #0 uwTick += uwTickFreq; 800056c: 4b05 ldr r3, [pc, #20] @ (8000584 ) 800056e: 781b ldrb r3, [r3, #0] 8000570: 001a movs r2, r3 8000572: 4b05 ldr r3, [pc, #20] @ (8000588 ) 8000574: 681b ldr r3, [r3, #0] 8000576: 18d2 adds r2, r2, r3 8000578: 4b03 ldr r3, [pc, #12] @ (8000588 ) 800057a: 601a str r2, [r3, #0] } 800057c: 46c0 nop @ (mov r8, r8) 800057e: 46bd mov sp, r7 8000580: bd80 pop {r7, pc} 8000582: 46c0 nop @ (mov r8, r8) 8000584: 20000020 .word 0x20000020 8000588: 20000198 .word 0x20000198 0800058c : * @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) { 800058c: b580 push {r7, lr} 800058e: af00 add r7, sp, #0 return uwTick; 8000590: 4b02 ldr r3, [pc, #8] @ (800059c ) 8000592: 681b ldr r3, [r3, #0] } 8000594: 0018 movs r0, r3 8000596: 46bd mov sp, r7 8000598: bd80 pop {r7, pc} 800059a: 46c0 nop @ (mov r8, r8) 800059c: 20000198 .word 0x20000198 080005a0 : * implementations in user file. * @param Delay specifies the delay time length, in milliseconds. * @retval None */ __weak void HAL_Delay(uint32_t Delay) { 80005a0: b580 push {r7, lr} 80005a2: b084 sub sp, #16 80005a4: af00 add r7, sp, #0 80005a6: 6078 str r0, [r7, #4] uint32_t tickstart = HAL_GetTick(); 80005a8: f7ff fff0 bl 800058c 80005ac: 0003 movs r3, r0 80005ae: 60bb str r3, [r7, #8] uint32_t wait = Delay; 80005b0: 687b ldr r3, [r7, #4] 80005b2: 60fb str r3, [r7, #12] /* Add a freq to guarantee minimum wait */ if (wait < HAL_MAX_DELAY) 80005b4: 68fb ldr r3, [r7, #12] 80005b6: 3301 adds r3, #1 80005b8: d005 beq.n 80005c6 { wait += (uint32_t)(uwTickFreq); 80005ba: 4b0a ldr r3, [pc, #40] @ (80005e4 ) 80005bc: 781b ldrb r3, [r3, #0] 80005be: 001a movs r2, r3 80005c0: 68fb ldr r3, [r7, #12] 80005c2: 189b adds r3, r3, r2 80005c4: 60fb str r3, [r7, #12] } while((HAL_GetTick() - tickstart) < wait) 80005c6: 46c0 nop @ (mov r8, r8) 80005c8: f7ff ffe0 bl 800058c 80005cc: 0002 movs r2, r0 80005ce: 68bb ldr r3, [r7, #8] 80005d0: 1ad3 subs r3, r2, r3 80005d2: 68fa ldr r2, [r7, #12] 80005d4: 429a cmp r2, r3 80005d6: d8f7 bhi.n 80005c8 { } } 80005d8: 46c0 nop @ (mov r8, r8) 80005da: 46c0 nop @ (mov r8, r8) 80005dc: 46bd mov sp, r7 80005de: b004 add sp, #16 80005e0: bd80 pop {r7, pc} 80005e2: 46c0 nop @ (mov r8, r8) 80005e4: 20000020 .word 0x20000020 080005e8 <__NVIC_EnableIRQ>: \details Enables a device specific interrupt in the NVIC interrupt controller. \param [in] IRQn Device specific interrupt number. \note IRQn must not be negative. */ __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) { 80005e8: b580 push {r7, lr} 80005ea: b082 sub sp, #8 80005ec: af00 add r7, sp, #0 80005ee: 0002 movs r2, r0 80005f0: 1dfb adds r3, r7, #7 80005f2: 701a strb r2, [r3, #0] if ((int32_t)(IRQn) >= 0) 80005f4: 1dfb adds r3, r7, #7 80005f6: 781b ldrb r3, [r3, #0] 80005f8: 2b7f cmp r3, #127 @ 0x7f 80005fa: d809 bhi.n 8000610 <__NVIC_EnableIRQ+0x28> { NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); 80005fc: 1dfb adds r3, r7, #7 80005fe: 781b ldrb r3, [r3, #0] 8000600: 001a movs r2, r3 8000602: 231f movs r3, #31 8000604: 401a ands r2, r3 8000606: 4b04 ldr r3, [pc, #16] @ (8000618 <__NVIC_EnableIRQ+0x30>) 8000608: 2101 movs r1, #1 800060a: 4091 lsls r1, r2 800060c: 000a movs r2, r1 800060e: 601a str r2, [r3, #0] } } 8000610: 46c0 nop @ (mov r8, r8) 8000612: 46bd mov sp, r7 8000614: b002 add sp, #8 8000616: bd80 pop {r7, pc} 8000618: e000e100 .word 0xe000e100 0800061c <__NVIC_SetPriority>: \param [in] IRQn Interrupt number. \param [in] priority Priority to set. \note The priority cannot be set for every processor exception. */ __STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) { 800061c: b590 push {r4, r7, lr} 800061e: b083 sub sp, #12 8000620: af00 add r7, sp, #0 8000622: 0002 movs r2, r0 8000624: 6039 str r1, [r7, #0] 8000626: 1dfb adds r3, r7, #7 8000628: 701a strb r2, [r3, #0] if ((int32_t)(IRQn) >= 0) 800062a: 1dfb adds r3, r7, #7 800062c: 781b ldrb r3, [r3, #0] 800062e: 2b7f cmp r3, #127 @ 0x7f 8000630: d828 bhi.n 8000684 <__NVIC_SetPriority+0x68> { NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | 8000632: 4a2f ldr r2, [pc, #188] @ (80006f0 <__NVIC_SetPriority+0xd4>) 8000634: 1dfb adds r3, r7, #7 8000636: 781b ldrb r3, [r3, #0] 8000638: b25b sxtb r3, r3 800063a: 089b lsrs r3, r3, #2 800063c: 33c0 adds r3, #192 @ 0xc0 800063e: 009b lsls r3, r3, #2 8000640: 589b ldr r3, [r3, r2] 8000642: 1dfa adds r2, r7, #7 8000644: 7812 ldrb r2, [r2, #0] 8000646: 0011 movs r1, r2 8000648: 2203 movs r2, #3 800064a: 400a ands r2, r1 800064c: 00d2 lsls r2, r2, #3 800064e: 21ff movs r1, #255 @ 0xff 8000650: 4091 lsls r1, r2 8000652: 000a movs r2, r1 8000654: 43d2 mvns r2, r2 8000656: 401a ands r2, r3 8000658: 0011 movs r1, r2 (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); 800065a: 683b ldr r3, [r7, #0] 800065c: 019b lsls r3, r3, #6 800065e: 22ff movs r2, #255 @ 0xff 8000660: 401a ands r2, r3 8000662: 1dfb adds r3, r7, #7 8000664: 781b ldrb r3, [r3, #0] 8000666: 0018 movs r0, r3 8000668: 2303 movs r3, #3 800066a: 4003 ands r3, r0 800066c: 00db lsls r3, r3, #3 800066e: 409a lsls r2, r3 NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | 8000670: 481f ldr r0, [pc, #124] @ (80006f0 <__NVIC_SetPriority+0xd4>) 8000672: 1dfb adds r3, r7, #7 8000674: 781b ldrb r3, [r3, #0] 8000676: b25b sxtb r3, r3 8000678: 089b lsrs r3, r3, #2 800067a: 430a orrs r2, r1 800067c: 33c0 adds r3, #192 @ 0xc0 800067e: 009b lsls r3, r3, #2 8000680: 501a str r2, [r3, r0] else { SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); } } 8000682: e031 b.n 80006e8 <__NVIC_SetPriority+0xcc> SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | 8000684: 4a1b ldr r2, [pc, #108] @ (80006f4 <__NVIC_SetPriority+0xd8>) 8000686: 1dfb adds r3, r7, #7 8000688: 781b ldrb r3, [r3, #0] 800068a: 0019 movs r1, r3 800068c: 230f movs r3, #15 800068e: 400b ands r3, r1 8000690: 3b08 subs r3, #8 8000692: 089b lsrs r3, r3, #2 8000694: 3306 adds r3, #6 8000696: 009b lsls r3, r3, #2 8000698: 18d3 adds r3, r2, r3 800069a: 3304 adds r3, #4 800069c: 681b ldr r3, [r3, #0] 800069e: 1dfa adds r2, r7, #7 80006a0: 7812 ldrb r2, [r2, #0] 80006a2: 0011 movs r1, r2 80006a4: 2203 movs r2, #3 80006a6: 400a ands r2, r1 80006a8: 00d2 lsls r2, r2, #3 80006aa: 21ff movs r1, #255 @ 0xff 80006ac: 4091 lsls r1, r2 80006ae: 000a movs r2, r1 80006b0: 43d2 mvns r2, r2 80006b2: 401a ands r2, r3 80006b4: 0011 movs r1, r2 (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); 80006b6: 683b ldr r3, [r7, #0] 80006b8: 019b lsls r3, r3, #6 80006ba: 22ff movs r2, #255 @ 0xff 80006bc: 401a ands r2, r3 80006be: 1dfb adds r3, r7, #7 80006c0: 781b ldrb r3, [r3, #0] 80006c2: 0018 movs r0, r3 80006c4: 2303 movs r3, #3 80006c6: 4003 ands r3, r0 80006c8: 00db lsls r3, r3, #3 80006ca: 409a lsls r2, r3 SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | 80006cc: 4809 ldr r0, [pc, #36] @ (80006f4 <__NVIC_SetPriority+0xd8>) 80006ce: 1dfb adds r3, r7, #7 80006d0: 781b ldrb r3, [r3, #0] 80006d2: 001c movs r4, r3 80006d4: 230f movs r3, #15 80006d6: 4023 ands r3, r4 80006d8: 3b08 subs r3, #8 80006da: 089b lsrs r3, r3, #2 80006dc: 430a orrs r2, r1 80006de: 3306 adds r3, #6 80006e0: 009b lsls r3, r3, #2 80006e2: 18c3 adds r3, r0, r3 80006e4: 3304 adds r3, #4 80006e6: 601a str r2, [r3, #0] } 80006e8: 46c0 nop @ (mov r8, r8) 80006ea: 46bd mov sp, r7 80006ec: b003 add sp, #12 80006ee: bd90 pop {r4, r7, pc} 80006f0: e000e100 .word 0xe000e100 80006f4: e000ed00 .word 0xe000ed00 080006f8 : \note When the variable __Vendor_SysTickConfig is set to 1, then the function SysTick_Config is not included. In this case, the file device.h must contain a vendor-specific implementation of this function. */ __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) { 80006f8: b580 push {r7, lr} 80006fa: b082 sub sp, #8 80006fc: af00 add r7, sp, #0 80006fe: 6078 str r0, [r7, #4] if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) 8000700: 687b ldr r3, [r7, #4] 8000702: 1e5a subs r2, r3, #1 8000704: 2380 movs r3, #128 @ 0x80 8000706: 045b lsls r3, r3, #17 8000708: 429a cmp r2, r3 800070a: d301 bcc.n 8000710 { return (1UL); /* Reload value impossible */ 800070c: 2301 movs r3, #1 800070e: e010 b.n 8000732 } SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ 8000710: 4b0a ldr r3, [pc, #40] @ (800073c ) 8000712: 687a ldr r2, [r7, #4] 8000714: 3a01 subs r2, #1 8000716: 605a str r2, [r3, #4] NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ 8000718: 2301 movs r3, #1 800071a: 425b negs r3, r3 800071c: 2103 movs r1, #3 800071e: 0018 movs r0, r3 8000720: f7ff ff7c bl 800061c <__NVIC_SetPriority> SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ 8000724: 4b05 ldr r3, [pc, #20] @ (800073c ) 8000726: 2200 movs r2, #0 8000728: 609a str r2, [r3, #8] SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | 800072a: 4b04 ldr r3, [pc, #16] @ (800073c ) 800072c: 2207 movs r2, #7 800072e: 601a str r2, [r3, #0] SysTick_CTRL_TICKINT_Msk | SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ return (0UL); /* Function successful */ 8000730: 2300 movs r3, #0 } 8000732: 0018 movs r0, r3 8000734: 46bd mov sp, r7 8000736: b002 add sp, #8 8000738: bd80 pop {r7, pc} 800073a: 46c0 nop @ (mov r8, r8) 800073c: e000e010 .word 0xe000e010 08000740 : * with stm32f0xx devices, this parameter is a dummy value and it is ignored, because * no subpriority supported in Cortex M0 based products. * @retval None */ void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority) { 8000740: b580 push {r7, lr} 8000742: b084 sub sp, #16 8000744: af00 add r7, sp, #0 8000746: 60b9 str r1, [r7, #8] 8000748: 607a str r2, [r7, #4] 800074a: 210f movs r1, #15 800074c: 187b adds r3, r7, r1 800074e: 1c02 adds r2, r0, #0 8000750: 701a strb r2, [r3, #0] /* Check the parameters */ assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority)); NVIC_SetPriority(IRQn,PreemptPriority); 8000752: 68ba ldr r2, [r7, #8] 8000754: 187b adds r3, r7, r1 8000756: 781b ldrb r3, [r3, #0] 8000758: b25b sxtb r3, r3 800075a: 0011 movs r1, r2 800075c: 0018 movs r0, r3 800075e: f7ff ff5d bl 800061c <__NVIC_SetPriority> /* Prevent unused argument(s) compilation warning */ UNUSED(SubPriority); } 8000762: 46c0 nop @ (mov r8, r8) 8000764: 46bd mov sp, r7 8000766: b004 add sp, #16 8000768: bd80 pop {r7, pc} 0800076a : * 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 (stm32f0xxxx.h)) * @retval None */ void HAL_NVIC_EnableIRQ(IRQn_Type IRQn) { 800076a: b580 push {r7, lr} 800076c: b082 sub sp, #8 800076e: af00 add r7, sp, #0 8000770: 0002 movs r2, r0 8000772: 1dfb adds r3, r7, #7 8000774: 701a strb r2, [r3, #0] /* Check the parameters */ assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); /* Enable interrupt */ NVIC_EnableIRQ(IRQn); 8000776: 1dfb adds r3, r7, #7 8000778: 781b ldrb r3, [r3, #0] 800077a: b25b sxtb r3, r3 800077c: 0018 movs r0, r3 800077e: f7ff ff33 bl 80005e8 <__NVIC_EnableIRQ> } 8000782: 46c0 nop @ (mov r8, r8) 8000784: 46bd mov sp, r7 8000786: b002 add sp, #8 8000788: bd80 pop {r7, pc} 0800078a : * @param TicksNumb Specifies the ticks Number of ticks between two interrupts. * @retval status: - 0 Function succeeded. * - 1 Function failed. */ uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb) { 800078a: b580 push {r7, lr} 800078c: b082 sub sp, #8 800078e: af00 add r7, sp, #0 8000790: 6078 str r0, [r7, #4] return SysTick_Config(TicksNumb); 8000792: 687b ldr r3, [r7, #4] 8000794: 0018 movs r0, r3 8000796: f7ff ffaf bl 80006f8 800079a: 0003 movs r3, r0 } 800079c: 0018 movs r0, r3 800079e: 46bd mov sp, r7 80007a0: b002 add sp, #8 80007a2: bd80 pop {r7, pc} 080007a4 : * @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) { 80007a4: b580 push {r7, lr} 80007a6: b086 sub sp, #24 80007a8: af00 add r7, sp, #0 80007aa: 6078 str r0, [r7, #4] 80007ac: 6039 str r1, [r7, #0] uint32_t position = 0x00u; 80007ae: 2300 movs r3, #0 80007b0: 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) 80007b2: e149 b.n 8000a48 { /* Get current io position */ iocurrent = (GPIO_Init->Pin) & (1uL << position); 80007b4: 683b ldr r3, [r7, #0] 80007b6: 681b ldr r3, [r3, #0] 80007b8: 2101 movs r1, #1 80007ba: 697a ldr r2, [r7, #20] 80007bc: 4091 lsls r1, r2 80007be: 000a movs r2, r1 80007c0: 4013 ands r3, r2 80007c2: 60fb str r3, [r7, #12] if (iocurrent != 0x00u) 80007c4: 68fb ldr r3, [r7, #12] 80007c6: 2b00 cmp r3, #0 80007c8: d100 bne.n 80007cc 80007ca: e13a b.n 8000a42 { /*--------------------- GPIO Mode Configuration ------------------------*/ /* In case of Output or Alternate function mode selection */ if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || 80007cc: 683b ldr r3, [r7, #0] 80007ce: 685b ldr r3, [r3, #4] 80007d0: 2203 movs r2, #3 80007d2: 4013 ands r3, r2 80007d4: 2b01 cmp r3, #1 80007d6: d005 beq.n 80007e4 ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)) 80007d8: 683b ldr r3, [r7, #0] 80007da: 685b ldr r3, [r3, #4] 80007dc: 2203 movs r2, #3 80007de: 4013 ands r3, r2 if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || 80007e0: 2b02 cmp r3, #2 80007e2: d130 bne.n 8000846 { /* Check the Speed parameter */ assert_param(IS_GPIO_SPEED(GPIO_Init->Speed)); /* Configure the IO Speed */ temp = GPIOx->OSPEEDR; 80007e4: 687b ldr r3, [r7, #4] 80007e6: 689b ldr r3, [r3, #8] 80007e8: 613b str r3, [r7, #16] temp &= ~(GPIO_OSPEEDER_OSPEEDR0 << (position * 2u)); 80007ea: 697b ldr r3, [r7, #20] 80007ec: 005b lsls r3, r3, #1 80007ee: 2203 movs r2, #3 80007f0: 409a lsls r2, r3 80007f2: 0013 movs r3, r2 80007f4: 43da mvns r2, r3 80007f6: 693b ldr r3, [r7, #16] 80007f8: 4013 ands r3, r2 80007fa: 613b str r3, [r7, #16] temp |= (GPIO_Init->Speed << (position * 2u)); 80007fc: 683b ldr r3, [r7, #0] 80007fe: 68da ldr r2, [r3, #12] 8000800: 697b ldr r3, [r7, #20] 8000802: 005b lsls r3, r3, #1 8000804: 409a lsls r2, r3 8000806: 0013 movs r3, r2 8000808: 693a ldr r2, [r7, #16] 800080a: 4313 orrs r3, r2 800080c: 613b str r3, [r7, #16] GPIOx->OSPEEDR = temp; 800080e: 687b ldr r3, [r7, #4] 8000810: 693a ldr r2, [r7, #16] 8000812: 609a str r2, [r3, #8] /* Configure the IO Output Type */ temp = GPIOx->OTYPER; 8000814: 687b ldr r3, [r7, #4] 8000816: 685b ldr r3, [r3, #4] 8000818: 613b str r3, [r7, #16] temp &= ~(GPIO_OTYPER_OT_0 << position) ; 800081a: 2201 movs r2, #1 800081c: 697b ldr r3, [r7, #20] 800081e: 409a lsls r2, r3 8000820: 0013 movs r3, r2 8000822: 43da mvns r2, r3 8000824: 693b ldr r3, [r7, #16] 8000826: 4013 ands r3, r2 8000828: 613b str r3, [r7, #16] temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position); 800082a: 683b ldr r3, [r7, #0] 800082c: 685b ldr r3, [r3, #4] 800082e: 091b lsrs r3, r3, #4 8000830: 2201 movs r2, #1 8000832: 401a ands r2, r3 8000834: 697b ldr r3, [r7, #20] 8000836: 409a lsls r2, r3 8000838: 0013 movs r3, r2 800083a: 693a ldr r2, [r7, #16] 800083c: 4313 orrs r3, r2 800083e: 613b str r3, [r7, #16] GPIOx->OTYPER = temp; 8000840: 687b ldr r3, [r7, #4] 8000842: 693a ldr r2, [r7, #16] 8000844: 605a str r2, [r3, #4] } if((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG) 8000846: 683b ldr r3, [r7, #0] 8000848: 685b ldr r3, [r3, #4] 800084a: 2203 movs r2, #3 800084c: 4013 ands r3, r2 800084e: 2b03 cmp r3, #3 8000850: d017 beq.n 8000882 { /* 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; 8000852: 687b ldr r3, [r7, #4] 8000854: 68db ldr r3, [r3, #12] 8000856: 613b str r3, [r7, #16] temp &= ~(GPIO_PUPDR_PUPDR0 << (position * 2u)); 8000858: 697b ldr r3, [r7, #20] 800085a: 005b lsls r3, r3, #1 800085c: 2203 movs r2, #3 800085e: 409a lsls r2, r3 8000860: 0013 movs r3, r2 8000862: 43da mvns r2, r3 8000864: 693b ldr r3, [r7, #16] 8000866: 4013 ands r3, r2 8000868: 613b str r3, [r7, #16] temp |= ((GPIO_Init->Pull) << (position * 2u)); 800086a: 683b ldr r3, [r7, #0] 800086c: 689a ldr r2, [r3, #8] 800086e: 697b ldr r3, [r7, #20] 8000870: 005b lsls r3, r3, #1 8000872: 409a lsls r2, r3 8000874: 0013 movs r3, r2 8000876: 693a ldr r2, [r7, #16] 8000878: 4313 orrs r3, r2 800087a: 613b str r3, [r7, #16] GPIOx->PUPDR = temp; 800087c: 687b ldr r3, [r7, #4] 800087e: 693a ldr r2, [r7, #16] 8000880: 60da str r2, [r3, #12] } /* In case of Alternate function mode selection */ if((GPIO_Init->Mode & GPIO_MODE) == MODE_AF) 8000882: 683b ldr r3, [r7, #0] 8000884: 685b ldr r3, [r3, #4] 8000886: 2203 movs r2, #3 8000888: 4013 ands r3, r2 800088a: 2b02 cmp r3, #2 800088c: d123 bne.n 80008d6 /* 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]; 800088e: 697b ldr r3, [r7, #20] 8000890: 08da lsrs r2, r3, #3 8000892: 687b ldr r3, [r7, #4] 8000894: 3208 adds r2, #8 8000896: 0092 lsls r2, r2, #2 8000898: 58d3 ldr r3, [r2, r3] 800089a: 613b str r3, [r7, #16] temp &= ~(0xFu << ((position & 0x07u) * 4u)); 800089c: 697b ldr r3, [r7, #20] 800089e: 2207 movs r2, #7 80008a0: 4013 ands r3, r2 80008a2: 009b lsls r3, r3, #2 80008a4: 220f movs r2, #15 80008a6: 409a lsls r2, r3 80008a8: 0013 movs r3, r2 80008aa: 43da mvns r2, r3 80008ac: 693b ldr r3, [r7, #16] 80008ae: 4013 ands r3, r2 80008b0: 613b str r3, [r7, #16] temp |= ((GPIO_Init->Alternate) << ((position & 0x07u) * 4u)); 80008b2: 683b ldr r3, [r7, #0] 80008b4: 691a ldr r2, [r3, #16] 80008b6: 697b ldr r3, [r7, #20] 80008b8: 2107 movs r1, #7 80008ba: 400b ands r3, r1 80008bc: 009b lsls r3, r3, #2 80008be: 409a lsls r2, r3 80008c0: 0013 movs r3, r2 80008c2: 693a ldr r2, [r7, #16] 80008c4: 4313 orrs r3, r2 80008c6: 613b str r3, [r7, #16] GPIOx->AFR[position >> 3u] = temp; 80008c8: 697b ldr r3, [r7, #20] 80008ca: 08da lsrs r2, r3, #3 80008cc: 687b ldr r3, [r7, #4] 80008ce: 3208 adds r2, #8 80008d0: 0092 lsls r2, r2, #2 80008d2: 6939 ldr r1, [r7, #16] 80008d4: 50d1 str r1, [r2, r3] } /* Configure IO Direction mode (Input, Output, Alternate or Analog) */ temp = GPIOx->MODER; 80008d6: 687b ldr r3, [r7, #4] 80008d8: 681b ldr r3, [r3, #0] 80008da: 613b str r3, [r7, #16] temp &= ~(GPIO_MODER_MODER0 << (position * 2u)); 80008dc: 697b ldr r3, [r7, #20] 80008de: 005b lsls r3, r3, #1 80008e0: 2203 movs r2, #3 80008e2: 409a lsls r2, r3 80008e4: 0013 movs r3, r2 80008e6: 43da mvns r2, r3 80008e8: 693b ldr r3, [r7, #16] 80008ea: 4013 ands r3, r2 80008ec: 613b str r3, [r7, #16] temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2u)); 80008ee: 683b ldr r3, [r7, #0] 80008f0: 685b ldr r3, [r3, #4] 80008f2: 2203 movs r2, #3 80008f4: 401a ands r2, r3 80008f6: 697b ldr r3, [r7, #20] 80008f8: 005b lsls r3, r3, #1 80008fa: 409a lsls r2, r3 80008fc: 0013 movs r3, r2 80008fe: 693a ldr r2, [r7, #16] 8000900: 4313 orrs r3, r2 8000902: 613b str r3, [r7, #16] GPIOx->MODER = temp; 8000904: 687b ldr r3, [r7, #4] 8000906: 693a ldr r2, [r7, #16] 8000908: 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) 800090a: 683b ldr r3, [r7, #0] 800090c: 685a ldr r2, [r3, #4] 800090e: 23c0 movs r3, #192 @ 0xc0 8000910: 029b lsls r3, r3, #10 8000912: 4013 ands r3, r2 8000914: d100 bne.n 8000918 8000916: e094 b.n 8000a42 { /* Enable SYSCFG Clock */ __HAL_RCC_SYSCFG_CLK_ENABLE(); 8000918: 4b51 ldr r3, [pc, #324] @ (8000a60 ) 800091a: 699a ldr r2, [r3, #24] 800091c: 4b50 ldr r3, [pc, #320] @ (8000a60 ) 800091e: 2101 movs r1, #1 8000920: 430a orrs r2, r1 8000922: 619a str r2, [r3, #24] 8000924: 4b4e ldr r3, [pc, #312] @ (8000a60 ) 8000926: 699b ldr r3, [r3, #24] 8000928: 2201 movs r2, #1 800092a: 4013 ands r3, r2 800092c: 60bb str r3, [r7, #8] 800092e: 68bb ldr r3, [r7, #8] temp = SYSCFG->EXTICR[position >> 2u]; 8000930: 4a4c ldr r2, [pc, #304] @ (8000a64 ) 8000932: 697b ldr r3, [r7, #20] 8000934: 089b lsrs r3, r3, #2 8000936: 3302 adds r3, #2 8000938: 009b lsls r3, r3, #2 800093a: 589b ldr r3, [r3, r2] 800093c: 613b str r3, [r7, #16] temp &= ~(0x0FuL << (4u * (position & 0x03u))); 800093e: 697b ldr r3, [r7, #20] 8000940: 2203 movs r2, #3 8000942: 4013 ands r3, r2 8000944: 009b lsls r3, r3, #2 8000946: 220f movs r2, #15 8000948: 409a lsls r2, r3 800094a: 0013 movs r3, r2 800094c: 43da mvns r2, r3 800094e: 693b ldr r3, [r7, #16] 8000950: 4013 ands r3, r2 8000952: 613b str r3, [r7, #16] temp |= (GPIO_GET_INDEX(GPIOx) << (4u * (position & 0x03u))); 8000954: 687a ldr r2, [r7, #4] 8000956: 2390 movs r3, #144 @ 0x90 8000958: 05db lsls r3, r3, #23 800095a: 429a cmp r2, r3 800095c: d00d beq.n 800097a 800095e: 687b ldr r3, [r7, #4] 8000960: 4a41 ldr r2, [pc, #260] @ (8000a68 ) 8000962: 4293 cmp r3, r2 8000964: d007 beq.n 8000976 8000966: 687b ldr r3, [r7, #4] 8000968: 4a40 ldr r2, [pc, #256] @ (8000a6c ) 800096a: 4293 cmp r3, r2 800096c: d101 bne.n 8000972 800096e: 2302 movs r3, #2 8000970: e004 b.n 800097c 8000972: 2305 movs r3, #5 8000974: e002 b.n 800097c 8000976: 2301 movs r3, #1 8000978: e000 b.n 800097c 800097a: 2300 movs r3, #0 800097c: 697a ldr r2, [r7, #20] 800097e: 2103 movs r1, #3 8000980: 400a ands r2, r1 8000982: 0092 lsls r2, r2, #2 8000984: 4093 lsls r3, r2 8000986: 693a ldr r2, [r7, #16] 8000988: 4313 orrs r3, r2 800098a: 613b str r3, [r7, #16] SYSCFG->EXTICR[position >> 2u] = temp; 800098c: 4935 ldr r1, [pc, #212] @ (8000a64 ) 800098e: 697b ldr r3, [r7, #20] 8000990: 089b lsrs r3, r3, #2 8000992: 3302 adds r3, #2 8000994: 009b lsls r3, r3, #2 8000996: 693a ldr r2, [r7, #16] 8000998: 505a str r2, [r3, r1] /* Clear Rising Falling edge configuration */ temp = EXTI->RTSR; 800099a: 4b35 ldr r3, [pc, #212] @ (8000a70 ) 800099c: 689b ldr r3, [r3, #8] 800099e: 613b str r3, [r7, #16] temp &= ~(iocurrent); 80009a0: 68fb ldr r3, [r7, #12] 80009a2: 43da mvns r2, r3 80009a4: 693b ldr r3, [r7, #16] 80009a6: 4013 ands r3, r2 80009a8: 613b str r3, [r7, #16] if((GPIO_Init->Mode & TRIGGER_RISING) != 0x00u) 80009aa: 683b ldr r3, [r7, #0] 80009ac: 685a ldr r2, [r3, #4] 80009ae: 2380 movs r3, #128 @ 0x80 80009b0: 035b lsls r3, r3, #13 80009b2: 4013 ands r3, r2 80009b4: d003 beq.n 80009be { temp |= iocurrent; 80009b6: 693a ldr r2, [r7, #16] 80009b8: 68fb ldr r3, [r7, #12] 80009ba: 4313 orrs r3, r2 80009bc: 613b str r3, [r7, #16] } EXTI->RTSR = temp; 80009be: 4b2c ldr r3, [pc, #176] @ (8000a70 ) 80009c0: 693a ldr r2, [r7, #16] 80009c2: 609a str r2, [r3, #8] temp = EXTI->FTSR; 80009c4: 4b2a ldr r3, [pc, #168] @ (8000a70 ) 80009c6: 68db ldr r3, [r3, #12] 80009c8: 613b str r3, [r7, #16] temp &= ~(iocurrent); 80009ca: 68fb ldr r3, [r7, #12] 80009cc: 43da mvns r2, r3 80009ce: 693b ldr r3, [r7, #16] 80009d0: 4013 ands r3, r2 80009d2: 613b str r3, [r7, #16] if((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00u) 80009d4: 683b ldr r3, [r7, #0] 80009d6: 685a ldr r2, [r3, #4] 80009d8: 2380 movs r3, #128 @ 0x80 80009da: 039b lsls r3, r3, #14 80009dc: 4013 ands r3, r2 80009de: d003 beq.n 80009e8 { temp |= iocurrent; 80009e0: 693a ldr r2, [r7, #16] 80009e2: 68fb ldr r3, [r7, #12] 80009e4: 4313 orrs r3, r2 80009e6: 613b str r3, [r7, #16] } EXTI->FTSR = temp; 80009e8: 4b21 ldr r3, [pc, #132] @ (8000a70 ) 80009ea: 693a ldr r2, [r7, #16] 80009ec: 60da str r2, [r3, #12] /* Clear EXTI line configuration */ temp = EXTI->EMR; 80009ee: 4b20 ldr r3, [pc, #128] @ (8000a70 ) 80009f0: 685b ldr r3, [r3, #4] 80009f2: 613b str r3, [r7, #16] temp &= ~(iocurrent); 80009f4: 68fb ldr r3, [r7, #12] 80009f6: 43da mvns r2, r3 80009f8: 693b ldr r3, [r7, #16] 80009fa: 4013 ands r3, r2 80009fc: 613b str r3, [r7, #16] if((GPIO_Init->Mode & EXTI_EVT) != 0x00u) 80009fe: 683b ldr r3, [r7, #0] 8000a00: 685a ldr r2, [r3, #4] 8000a02: 2380 movs r3, #128 @ 0x80 8000a04: 029b lsls r3, r3, #10 8000a06: 4013 ands r3, r2 8000a08: d003 beq.n 8000a12 { temp |= iocurrent; 8000a0a: 693a ldr r2, [r7, #16] 8000a0c: 68fb ldr r3, [r7, #12] 8000a0e: 4313 orrs r3, r2 8000a10: 613b str r3, [r7, #16] } EXTI->EMR = temp; 8000a12: 4b17 ldr r3, [pc, #92] @ (8000a70 ) 8000a14: 693a ldr r2, [r7, #16] 8000a16: 605a str r2, [r3, #4] temp = EXTI->IMR; 8000a18: 4b15 ldr r3, [pc, #84] @ (8000a70 ) 8000a1a: 681b ldr r3, [r3, #0] 8000a1c: 613b str r3, [r7, #16] temp &= ~(iocurrent); 8000a1e: 68fb ldr r3, [r7, #12] 8000a20: 43da mvns r2, r3 8000a22: 693b ldr r3, [r7, #16] 8000a24: 4013 ands r3, r2 8000a26: 613b str r3, [r7, #16] if((GPIO_Init->Mode & EXTI_IT) != 0x00u) 8000a28: 683b ldr r3, [r7, #0] 8000a2a: 685a ldr r2, [r3, #4] 8000a2c: 2380 movs r3, #128 @ 0x80 8000a2e: 025b lsls r3, r3, #9 8000a30: 4013 ands r3, r2 8000a32: d003 beq.n 8000a3c { temp |= iocurrent; 8000a34: 693a ldr r2, [r7, #16] 8000a36: 68fb ldr r3, [r7, #12] 8000a38: 4313 orrs r3, r2 8000a3a: 613b str r3, [r7, #16] } EXTI->IMR = temp; 8000a3c: 4b0c ldr r3, [pc, #48] @ (8000a70 ) 8000a3e: 693a ldr r2, [r7, #16] 8000a40: 601a str r2, [r3, #0] } } position++; 8000a42: 697b ldr r3, [r7, #20] 8000a44: 3301 adds r3, #1 8000a46: 617b str r3, [r7, #20] while (((GPIO_Init->Pin) >> position) != 0x00u) 8000a48: 683b ldr r3, [r7, #0] 8000a4a: 681a ldr r2, [r3, #0] 8000a4c: 697b ldr r3, [r7, #20] 8000a4e: 40da lsrs r2, r3 8000a50: 1e13 subs r3, r2, #0 8000a52: d000 beq.n 8000a56 8000a54: e6ae b.n 80007b4 } } 8000a56: 46c0 nop @ (mov r8, r8) 8000a58: 46c0 nop @ (mov r8, r8) 8000a5a: 46bd mov sp, r7 8000a5c: b006 add sp, #24 8000a5e: bd80 pop {r7, pc} 8000a60: 40021000 .word 0x40021000 8000a64: 40010000 .word 0x40010000 8000a68: 48000400 .word 0x48000400 8000a6c: 48000800 .word 0x48000800 8000a70: 40010400 .word 0x40010400 08000a74 : * @param GPIO_Pin specifies the port bit to read. * This parameter can be GPIO_PIN_x where x can be (0..15). * @retval The input port pin value. */ GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin) { 8000a74: b580 push {r7, lr} 8000a76: b084 sub sp, #16 8000a78: af00 add r7, sp, #0 8000a7a: 6078 str r0, [r7, #4] 8000a7c: 000a movs r2, r1 8000a7e: 1cbb adds r3, r7, #2 8000a80: 801a strh r2, [r3, #0] GPIO_PinState bitstatus; /* Check the parameters */ assert_param(IS_GPIO_PIN(GPIO_Pin)); if ((GPIOx->IDR & GPIO_Pin) != (uint32_t)GPIO_PIN_RESET) 8000a82: 687b ldr r3, [r7, #4] 8000a84: 691b ldr r3, [r3, #16] 8000a86: 1cba adds r2, r7, #2 8000a88: 8812 ldrh r2, [r2, #0] 8000a8a: 4013 ands r3, r2 8000a8c: d004 beq.n 8000a98 { bitstatus = GPIO_PIN_SET; 8000a8e: 230f movs r3, #15 8000a90: 18fb adds r3, r7, r3 8000a92: 2201 movs r2, #1 8000a94: 701a strb r2, [r3, #0] 8000a96: e003 b.n 8000aa0 } else { bitstatus = GPIO_PIN_RESET; 8000a98: 230f movs r3, #15 8000a9a: 18fb adds r3, r7, r3 8000a9c: 2200 movs r2, #0 8000a9e: 701a strb r2, [r3, #0] } return bitstatus; 8000aa0: 230f movs r3, #15 8000aa2: 18fb adds r3, r7, r3 8000aa4: 781b ldrb r3, [r3, #0] } 8000aa6: 0018 movs r0, r3 8000aa8: 46bd mov sp, r7 8000aaa: b004 add sp, #16 8000aac: bd80 pop {r7, pc} ... 08000ab0 : * parameters in the PCD_InitTypeDef and initialize the associated handle. * @param hpcd PCD handle * @retval HAL status */ HAL_StatusTypeDef HAL_PCD_Init(PCD_HandleTypeDef *hpcd) { 8000ab0: b590 push {r4, r7, lr} 8000ab2: b085 sub sp, #20 8000ab4: af00 add r7, sp, #0 8000ab6: 6078 str r0, [r7, #4] uint8_t i; /* Check the PCD handle allocation */ if (hpcd == NULL) 8000ab8: 687b ldr r3, [r7, #4] 8000aba: 2b00 cmp r3, #0 8000abc: d101 bne.n 8000ac2 { return HAL_ERROR; 8000abe: 2301 movs r3, #1 8000ac0: e0e4 b.n 8000c8c } /* Check the parameters */ assert_param(IS_PCD_ALL_INSTANCE(hpcd->Instance)); if (hpcd->State == HAL_PCD_STATE_RESET) 8000ac2: 687b ldr r3, [r7, #4] 8000ac4: 4a73 ldr r2, [pc, #460] @ (8000c94 ) 8000ac6: 5c9b ldrb r3, [r3, r2] 8000ac8: b2db uxtb r3, r3 8000aca: 2b00 cmp r3, #0 8000acc: d108 bne.n 8000ae0 { /* Allocate lock resource and initialize it */ hpcd->Lock = HAL_UNLOCKED; 8000ace: 687a ldr r2, [r7, #4] 8000ad0: 23a4 movs r3, #164 @ 0xa4 8000ad2: 009b lsls r3, r3, #2 8000ad4: 2100 movs r1, #0 8000ad6: 54d1 strb r1, [r2, r3] /* Init the low level hardware */ hpcd->MspInitCallback(hpcd); #else /* Init the low level hardware : GPIO, CLOCK, NVIC... */ HAL_PCD_MspInit(hpcd); 8000ad8: 687b ldr r3, [r7, #4] 8000ada: 0018 movs r0, r3 8000adc: f006 f996 bl 8006e0c #endif /* (USE_HAL_PCD_REGISTER_CALLBACKS) */ } hpcd->State = HAL_PCD_STATE_BUSY; 8000ae0: 687b ldr r3, [r7, #4] 8000ae2: 4a6c ldr r2, [pc, #432] @ (8000c94 ) 8000ae4: 2103 movs r1, #3 8000ae6: 5499 strb r1, [r3, r2] /* Disable the Interrupts */ __HAL_PCD_DISABLE(hpcd); 8000ae8: 687b ldr r3, [r7, #4] 8000aea: 681b ldr r3, [r3, #0] 8000aec: 0018 movs r0, r3 8000aee: f002 fbdf bl 80032b0 /* Init endpoints structures */ for (i = 0U; i < hpcd->Init.dev_endpoints; i++) 8000af2: 230f movs r3, #15 8000af4: 18fb adds r3, r7, r3 8000af6: 2200 movs r2, #0 8000af8: 701a strb r2, [r3, #0] 8000afa: e047 b.n 8000b8c { /* Init ep structure */ hpcd->IN_ep[i].is_in = 1U; 8000afc: 200f movs r0, #15 8000afe: 183b adds r3, r7, r0 8000b00: 781a ldrb r2, [r3, #0] 8000b02: 6879 ldr r1, [r7, #4] 8000b04: 0013 movs r3, r2 8000b06: 009b lsls r3, r3, #2 8000b08: 189b adds r3, r3, r2 8000b0a: 00db lsls r3, r3, #3 8000b0c: 18cb adds r3, r1, r3 8000b0e: 3311 adds r3, #17 8000b10: 2201 movs r2, #1 8000b12: 701a strb r2, [r3, #0] hpcd->IN_ep[i].num = i; 8000b14: 183b adds r3, r7, r0 8000b16: 781a ldrb r2, [r3, #0] 8000b18: 6879 ldr r1, [r7, #4] 8000b1a: 0013 movs r3, r2 8000b1c: 009b lsls r3, r3, #2 8000b1e: 189b adds r3, r3, r2 8000b20: 00db lsls r3, r3, #3 8000b22: 18cb adds r3, r1, r3 8000b24: 3310 adds r3, #16 8000b26: 183a adds r2, r7, r0 8000b28: 7812 ldrb r2, [r2, #0] 8000b2a: 701a strb r2, [r3, #0] /* Control until ep is activated */ hpcd->IN_ep[i].type = EP_TYPE_CTRL; 8000b2c: 183b adds r3, r7, r0 8000b2e: 781a ldrb r2, [r3, #0] 8000b30: 6879 ldr r1, [r7, #4] 8000b32: 0013 movs r3, r2 8000b34: 009b lsls r3, r3, #2 8000b36: 189b adds r3, r3, r2 8000b38: 00db lsls r3, r3, #3 8000b3a: 18cb adds r3, r1, r3 8000b3c: 3313 adds r3, #19 8000b3e: 2200 movs r2, #0 8000b40: 701a strb r2, [r3, #0] hpcd->IN_ep[i].maxpacket = 0U; 8000b42: 183b adds r3, r7, r0 8000b44: 781a ldrb r2, [r3, #0] 8000b46: 6879 ldr r1, [r7, #4] 8000b48: 0013 movs r3, r2 8000b4a: 009b lsls r3, r3, #2 8000b4c: 189b adds r3, r3, r2 8000b4e: 00db lsls r3, r3, #3 8000b50: 18cb adds r3, r1, r3 8000b52: 3320 adds r3, #32 8000b54: 2200 movs r2, #0 8000b56: 601a str r2, [r3, #0] hpcd->IN_ep[i].xfer_buff = 0U; 8000b58: 183b adds r3, r7, r0 8000b5a: 781a ldrb r2, [r3, #0] 8000b5c: 6879 ldr r1, [r7, #4] 8000b5e: 0013 movs r3, r2 8000b60: 009b lsls r3, r3, #2 8000b62: 189b adds r3, r3, r2 8000b64: 00db lsls r3, r3, #3 8000b66: 18cb adds r3, r1, r3 8000b68: 3324 adds r3, #36 @ 0x24 8000b6a: 2200 movs r2, #0 8000b6c: 601a str r2, [r3, #0] hpcd->IN_ep[i].xfer_len = 0U; 8000b6e: 183b adds r3, r7, r0 8000b70: 781b ldrb r3, [r3, #0] 8000b72: 6879 ldr r1, [r7, #4] 8000b74: 1c5a adds r2, r3, #1 8000b76: 0013 movs r3, r2 8000b78: 009b lsls r3, r3, #2 8000b7a: 189b adds r3, r3, r2 8000b7c: 00db lsls r3, r3, #3 8000b7e: 2200 movs r2, #0 8000b80: 505a str r2, [r3, r1] for (i = 0U; i < hpcd->Init.dev_endpoints; i++) 8000b82: 183b adds r3, r7, r0 8000b84: 781a ldrb r2, [r3, #0] 8000b86: 183b adds r3, r7, r0 8000b88: 3201 adds r2, #1 8000b8a: 701a strb r2, [r3, #0] 8000b8c: 687b ldr r3, [r7, #4] 8000b8e: 791b ldrb r3, [r3, #4] 8000b90: 210f movs r1, #15 8000b92: 187a adds r2, r7, r1 8000b94: 7812 ldrb r2, [r2, #0] 8000b96: 429a cmp r2, r3 8000b98: d3b0 bcc.n 8000afc } for (i = 0U; i < hpcd->Init.dev_endpoints; i++) 8000b9a: 187b adds r3, r7, r1 8000b9c: 2200 movs r2, #0 8000b9e: 701a strb r2, [r3, #0] 8000ba0: e056 b.n 8000c50 { hpcd->OUT_ep[i].is_in = 0U; 8000ba2: 240f movs r4, #15 8000ba4: 193b adds r3, r7, r4 8000ba6: 781a ldrb r2, [r3, #0] 8000ba8: 6878 ldr r0, [r7, #4] 8000baa: 2352 movs r3, #82 @ 0x52 8000bac: 33ff adds r3, #255 @ 0xff 8000bae: 0019 movs r1, r3 8000bb0: 0013 movs r3, r2 8000bb2: 009b lsls r3, r3, #2 8000bb4: 189b adds r3, r3, r2 8000bb6: 00db lsls r3, r3, #3 8000bb8: 18c3 adds r3, r0, r3 8000bba: 185b adds r3, r3, r1 8000bbc: 2200 movs r2, #0 8000bbe: 701a strb r2, [r3, #0] hpcd->OUT_ep[i].num = i; 8000bc0: 193b adds r3, r7, r4 8000bc2: 781a ldrb r2, [r3, #0] 8000bc4: 6878 ldr r0, [r7, #4] 8000bc6: 23a8 movs r3, #168 @ 0xa8 8000bc8: 0059 lsls r1, r3, #1 8000bca: 0013 movs r3, r2 8000bcc: 009b lsls r3, r3, #2 8000bce: 189b adds r3, r3, r2 8000bd0: 00db lsls r3, r3, #3 8000bd2: 18c3 adds r3, r0, r3 8000bd4: 185b adds r3, r3, r1 8000bd6: 193a adds r2, r7, r4 8000bd8: 7812 ldrb r2, [r2, #0] 8000bda: 701a strb r2, [r3, #0] /* Control until ep is activated */ hpcd->OUT_ep[i].type = EP_TYPE_CTRL; 8000bdc: 193b adds r3, r7, r4 8000bde: 781a ldrb r2, [r3, #0] 8000be0: 6878 ldr r0, [r7, #4] 8000be2: 2354 movs r3, #84 @ 0x54 8000be4: 33ff adds r3, #255 @ 0xff 8000be6: 0019 movs r1, r3 8000be8: 0013 movs r3, r2 8000bea: 009b lsls r3, r3, #2 8000bec: 189b adds r3, r3, r2 8000bee: 00db lsls r3, r3, #3 8000bf0: 18c3 adds r3, r0, r3 8000bf2: 185b adds r3, r3, r1 8000bf4: 2200 movs r2, #0 8000bf6: 701a strb r2, [r3, #0] hpcd->OUT_ep[i].maxpacket = 0U; 8000bf8: 193b adds r3, r7, r4 8000bfa: 781a ldrb r2, [r3, #0] 8000bfc: 6878 ldr r0, [r7, #4] 8000bfe: 23b0 movs r3, #176 @ 0xb0 8000c00: 0059 lsls r1, r3, #1 8000c02: 0013 movs r3, r2 8000c04: 009b lsls r3, r3, #2 8000c06: 189b adds r3, r3, r2 8000c08: 00db lsls r3, r3, #3 8000c0a: 18c3 adds r3, r0, r3 8000c0c: 185b adds r3, r3, r1 8000c0e: 2200 movs r2, #0 8000c10: 601a str r2, [r3, #0] hpcd->OUT_ep[i].xfer_buff = 0U; 8000c12: 193b adds r3, r7, r4 8000c14: 781a ldrb r2, [r3, #0] 8000c16: 6878 ldr r0, [r7, #4] 8000c18: 23b2 movs r3, #178 @ 0xb2 8000c1a: 0059 lsls r1, r3, #1 8000c1c: 0013 movs r3, r2 8000c1e: 009b lsls r3, r3, #2 8000c20: 189b adds r3, r3, r2 8000c22: 00db lsls r3, r3, #3 8000c24: 18c3 adds r3, r0, r3 8000c26: 185b adds r3, r3, r1 8000c28: 2200 movs r2, #0 8000c2a: 601a str r2, [r3, #0] hpcd->OUT_ep[i].xfer_len = 0U; 8000c2c: 193b adds r3, r7, r4 8000c2e: 781a ldrb r2, [r3, #0] 8000c30: 6878 ldr r0, [r7, #4] 8000c32: 23b4 movs r3, #180 @ 0xb4 8000c34: 0059 lsls r1, r3, #1 8000c36: 0013 movs r3, r2 8000c38: 009b lsls r3, r3, #2 8000c3a: 189b adds r3, r3, r2 8000c3c: 00db lsls r3, r3, #3 8000c3e: 18c3 adds r3, r0, r3 8000c40: 185b adds r3, r3, r1 8000c42: 2200 movs r2, #0 8000c44: 601a str r2, [r3, #0] for (i = 0U; i < hpcd->Init.dev_endpoints; i++) 8000c46: 193b adds r3, r7, r4 8000c48: 781a ldrb r2, [r3, #0] 8000c4a: 193b adds r3, r7, r4 8000c4c: 3201 adds r2, #1 8000c4e: 701a strb r2, [r3, #0] 8000c50: 687b ldr r3, [r7, #4] 8000c52: 791b ldrb r3, [r3, #4] 8000c54: 220f movs r2, #15 8000c56: 18ba adds r2, r7, r2 8000c58: 7812 ldrb r2, [r2, #0] 8000c5a: 429a cmp r2, r3 8000c5c: d3a1 bcc.n 8000ba2 } /* Init Device */ (void)USB_DevInit(hpcd->Instance, hpcd->Init); 8000c5e: 687b ldr r3, [r7, #4] 8000c60: 6818 ldr r0, [r3, #0] 8000c62: 687b ldr r3, [r7, #4] 8000c64: 6859 ldr r1, [r3, #4] 8000c66: 689a ldr r2, [r3, #8] 8000c68: f002 fb3c bl 80032e4 hpcd->USB_Address = 0U; 8000c6c: 687b ldr r3, [r7, #4] 8000c6e: 2200 movs r2, #0 8000c70: 731a strb r2, [r3, #12] hpcd->State = HAL_PCD_STATE_READY; 8000c72: 687b ldr r3, [r7, #4] 8000c74: 4a07 ldr r2, [pc, #28] @ (8000c94 ) 8000c76: 2101 movs r1, #1 8000c78: 5499 strb r1, [r3, r2] /* Activate LPM */ if (hpcd->Init.lpm_enable == 1U) 8000c7a: 687b ldr r3, [r7, #4] 8000c7c: 7a9b ldrb r3, [r3, #10] 8000c7e: 2b01 cmp r3, #1 8000c80: d103 bne.n 8000c8a { (void)HAL_PCDEx_ActivateLPM(hpcd); 8000c82: 687b ldr r3, [r7, #4] 8000c84: 0018 movs r0, r3 8000c86: f001 fd07 bl 8002698 } return HAL_OK; 8000c8a: 2300 movs r3, #0 } 8000c8c: 0018 movs r0, r3 8000c8e: 46bd mov sp, r7 8000c90: b005 add sp, #20 8000c92: bd90 pop {r4, r7, pc} 8000c94: 00000291 .word 0x00000291 08000c98 : * @brief Start the USB device * @param hpcd PCD handle * @retval HAL status */ HAL_StatusTypeDef HAL_PCD_Start(PCD_HandleTypeDef *hpcd) { 8000c98: b580 push {r7, lr} 8000c9a: b082 sub sp, #8 8000c9c: af00 add r7, sp, #0 8000c9e: 6078 str r0, [r7, #4] __HAL_LOCK(hpcd); 8000ca0: 687a ldr r2, [r7, #4] 8000ca2: 23a4 movs r3, #164 @ 0xa4 8000ca4: 009b lsls r3, r3, #2 8000ca6: 5cd3 ldrb r3, [r2, r3] 8000ca8: 2b01 cmp r3, #1 8000caa: d101 bne.n 8000cb0 8000cac: 2302 movs r3, #2 8000cae: e014 b.n 8000cda 8000cb0: 687a ldr r2, [r7, #4] 8000cb2: 23a4 movs r3, #164 @ 0xa4 8000cb4: 009b lsls r3, r3, #2 8000cb6: 2101 movs r1, #1 8000cb8: 54d1 strb r1, [r2, r3] __HAL_PCD_ENABLE(hpcd); 8000cba: 687b ldr r3, [r7, #4] 8000cbc: 681b ldr r3, [r3, #0] 8000cbe: 0018 movs r0, r3 8000cc0: f002 fae0 bl 8003284 (void)USB_DevConnect(hpcd->Instance); 8000cc4: 687b ldr r3, [r7, #4] 8000cc6: 681b ldr r3, [r3, #0] 8000cc8: 0018 movs r0, r3 8000cca: f004 fad5 bl 8005278 __HAL_UNLOCK(hpcd); 8000cce: 687a ldr r2, [r7, #4] 8000cd0: 23a4 movs r3, #164 @ 0xa4 8000cd2: 009b lsls r3, r3, #2 8000cd4: 2100 movs r1, #0 8000cd6: 54d1 strb r1, [r2, r3] return HAL_OK; 8000cd8: 2300 movs r3, #0 } 8000cda: 0018 movs r0, r3 8000cdc: 46bd mov sp, r7 8000cde: b002 add sp, #8 8000ce0: bd80 pop {r7, pc} ... 08000ce4 : * @brief This function handles PCD interrupt request. * @param hpcd PCD handle * @retval HAL status */ void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd) { 8000ce4: b580 push {r7, lr} 8000ce6: b084 sub sp, #16 8000ce8: af00 add r7, sp, #0 8000cea: 6078 str r0, [r7, #4] uint32_t wIstr = USB_ReadInterrupts(hpcd->Instance); 8000cec: 687b ldr r3, [r7, #4] 8000cee: 681b ldr r3, [r3, #0] 8000cf0: 0018 movs r0, r3 8000cf2: f004 fad7 bl 80052a4 8000cf6: 0003 movs r3, r0 8000cf8: 60fb str r3, [r7, #12] if ((wIstr & USB_ISTR_CTR) == USB_ISTR_CTR) 8000cfa: 68fa ldr r2, [r7, #12] 8000cfc: 2380 movs r3, #128 @ 0x80 8000cfe: 021b lsls r3, r3, #8 8000d00: 4013 ands r3, r2 8000d02: d004 beq.n 8000d0e { /* servicing of the endpoint correct transfer interrupt */ /* clear of the CTR flag into the sub */ (void)PCD_EP_ISR_Handler(hpcd); 8000d04: 687b ldr r3, [r7, #4] 8000d06: 0018 movs r0, r3 8000d08: f000 fb48 bl 800139c return; 8000d0c: e11d b.n 8000f4a } if ((wIstr & USB_ISTR_RESET) == USB_ISTR_RESET) 8000d0e: 68fa ldr r2, [r7, #12] 8000d10: 2380 movs r3, #128 @ 0x80 8000d12: 00db lsls r3, r3, #3 8000d14: 4013 ands r3, r2 8000d16: d015 beq.n 8000d44 { __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_RESET); 8000d18: 687b ldr r3, [r7, #4] 8000d1a: 681b ldr r3, [r3, #0] 8000d1c: 2244 movs r2, #68 @ 0x44 8000d1e: 5a9b ldrh r3, [r3, r2] 8000d20: b29a uxth r2, r3 8000d22: 687b ldr r3, [r7, #4] 8000d24: 681b ldr r3, [r3, #0] 8000d26: 498a ldr r1, [pc, #552] @ (8000f50 ) 8000d28: 400a ands r2, r1 8000d2a: b291 uxth r1, r2 8000d2c: 2244 movs r2, #68 @ 0x44 8000d2e: 5299 strh r1, [r3, r2] #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->ResetCallback(hpcd); #else HAL_PCD_ResetCallback(hpcd); 8000d30: 687b ldr r3, [r7, #4] 8000d32: 0018 movs r0, r3 8000d34: f006 f8f5 bl 8006f22 #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ (void)HAL_PCD_SetAddress(hpcd, 0U); 8000d38: 687b ldr r3, [r7, #4] 8000d3a: 2100 movs r1, #0 8000d3c: 0018 movs r0, r3 8000d3e: f000 f915 bl 8000f6c return; 8000d42: e102 b.n 8000f4a } if ((wIstr & USB_ISTR_PMAOVR) == USB_ISTR_PMAOVR) 8000d44: 68fa ldr r2, [r7, #12] 8000d46: 2380 movs r3, #128 @ 0x80 8000d48: 01db lsls r3, r3, #7 8000d4a: 4013 ands r3, r2 8000d4c: d00c beq.n 8000d68 { __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_PMAOVR); 8000d4e: 687b ldr r3, [r7, #4] 8000d50: 681b ldr r3, [r3, #0] 8000d52: 2244 movs r2, #68 @ 0x44 8000d54: 5a9b ldrh r3, [r3, r2] 8000d56: b29a uxth r2, r3 8000d58: 687b ldr r3, [r7, #4] 8000d5a: 681b ldr r3, [r3, #0] 8000d5c: 497d ldr r1, [pc, #500] @ (8000f54 ) 8000d5e: 400a ands r2, r1 8000d60: b291 uxth r1, r2 8000d62: 2244 movs r2, #68 @ 0x44 8000d64: 5299 strh r1, [r3, r2] return; 8000d66: e0f0 b.n 8000f4a } if ((wIstr & USB_ISTR_ERR) == USB_ISTR_ERR) 8000d68: 68fa ldr r2, [r7, #12] 8000d6a: 2380 movs r3, #128 @ 0x80 8000d6c: 019b lsls r3, r3, #6 8000d6e: 4013 ands r3, r2 8000d70: d00c beq.n 8000d8c { __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_ERR); 8000d72: 687b ldr r3, [r7, #4] 8000d74: 681b ldr r3, [r3, #0] 8000d76: 2244 movs r2, #68 @ 0x44 8000d78: 5a9b ldrh r3, [r3, r2] 8000d7a: b29a uxth r2, r3 8000d7c: 687b ldr r3, [r7, #4] 8000d7e: 681b ldr r3, [r3, #0] 8000d80: 4975 ldr r1, [pc, #468] @ (8000f58 ) 8000d82: 400a ands r2, r1 8000d84: b291 uxth r1, r2 8000d86: 2244 movs r2, #68 @ 0x44 8000d88: 5299 strh r1, [r3, r2] return; 8000d8a: e0de b.n 8000f4a } if ((wIstr & USB_ISTR_WKUP) == USB_ISTR_WKUP) 8000d8c: 68fa ldr r2, [r7, #12] 8000d8e: 2380 movs r3, #128 @ 0x80 8000d90: 015b lsls r3, r3, #5 8000d92: 4013 ands r3, r2 8000d94: d038 beq.n 8000e08 { hpcd->Instance->CNTR &= (uint16_t) ~(USB_CNTR_LPMODE); 8000d96: 687b ldr r3, [r7, #4] 8000d98: 681b ldr r3, [r3, #0] 8000d9a: 2240 movs r2, #64 @ 0x40 8000d9c: 5a9b ldrh r3, [r3, r2] 8000d9e: b29a uxth r2, r3 8000da0: 687b ldr r3, [r7, #4] 8000da2: 681b ldr r3, [r3, #0] 8000da4: 2104 movs r1, #4 8000da6: 438a bics r2, r1 8000da8: b291 uxth r1, r2 8000daa: 2240 movs r2, #64 @ 0x40 8000dac: 5299 strh r1, [r3, r2] hpcd->Instance->CNTR &= (uint16_t) ~(USB_CNTR_FSUSP); 8000dae: 687b ldr r3, [r7, #4] 8000db0: 681b ldr r3, [r3, #0] 8000db2: 2240 movs r2, #64 @ 0x40 8000db4: 5a9b ldrh r3, [r3, r2] 8000db6: b29a uxth r2, r3 8000db8: 687b ldr r3, [r7, #4] 8000dba: 681b ldr r3, [r3, #0] 8000dbc: 2108 movs r1, #8 8000dbe: 438a bics r2, r1 8000dc0: b291 uxth r1, r2 8000dc2: 2240 movs r2, #64 @ 0x40 8000dc4: 5299 strh r1, [r3, r2] if (hpcd->LPM_State == LPM_L1) 8000dc6: 687a ldr r2, [r7, #4] 8000dc8: 23b2 movs r3, #178 @ 0xb2 8000dca: 009b lsls r3, r3, #2 8000dcc: 5cd3 ldrb r3, [r2, r3] 8000dce: 2b01 cmp r3, #1 8000dd0: d109 bne.n 8000de6 { hpcd->LPM_State = LPM_L0; 8000dd2: 687a ldr r2, [r7, #4] 8000dd4: 23b2 movs r3, #178 @ 0xb2 8000dd6: 009b lsls r3, r3, #2 8000dd8: 2100 movs r1, #0 8000dda: 54d1 strb r1, [r2, r3] #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->LPMCallback(hpcd, PCD_LPM_L0_ACTIVE); #else HAL_PCDEx_LPM_Callback(hpcd, PCD_LPM_L0_ACTIVE); 8000ddc: 687b ldr r3, [r7, #4] 8000dde: 2100 movs r1, #0 8000de0: 0018 movs r0, r3 8000de2: f001 fc83 bl 80026ec } #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->ResumeCallback(hpcd); #else HAL_PCD_ResumeCallback(hpcd); 8000de6: 687b ldr r3, [r7, #4] 8000de8: 0018 movs r0, r3 8000dea: f006 f8db bl 8006fa4 #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_WKUP); 8000dee: 687b ldr r3, [r7, #4] 8000df0: 681b ldr r3, [r3, #0] 8000df2: 2244 movs r2, #68 @ 0x44 8000df4: 5a9b ldrh r3, [r3, r2] 8000df6: b29a uxth r2, r3 8000df8: 687b ldr r3, [r7, #4] 8000dfa: 681b ldr r3, [r3, #0] 8000dfc: 4957 ldr r1, [pc, #348] @ (8000f5c ) 8000dfe: 400a ands r2, r1 8000e00: b291 uxth r1, r2 8000e02: 2244 movs r2, #68 @ 0x44 8000e04: 5299 strh r1, [r3, r2] return; 8000e06: e0a0 b.n 8000f4a } if ((wIstr & USB_ISTR_SUSP) == USB_ISTR_SUSP) 8000e08: 68fa ldr r2, [r7, #12] 8000e0a: 2380 movs r3, #128 @ 0x80 8000e0c: 011b lsls r3, r3, #4 8000e0e: 4013 ands r3, r2 8000e10: d028 beq.n 8000e64 { /* Force low-power mode in the macrocell */ hpcd->Instance->CNTR |= (uint16_t)USB_CNTR_FSUSP; 8000e12: 687b ldr r3, [r7, #4] 8000e14: 681b ldr r3, [r3, #0] 8000e16: 2240 movs r2, #64 @ 0x40 8000e18: 5a9b ldrh r3, [r3, r2] 8000e1a: b29a uxth r2, r3 8000e1c: 687b ldr r3, [r7, #4] 8000e1e: 681b ldr r3, [r3, #0] 8000e20: 2108 movs r1, #8 8000e22: 430a orrs r2, r1 8000e24: b291 uxth r1, r2 8000e26: 2240 movs r2, #64 @ 0x40 8000e28: 5299 strh r1, [r3, r2] /* clear of the ISTR bit must be done after setting of CNTR_FSUSP */ __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_SUSP); 8000e2a: 687b ldr r3, [r7, #4] 8000e2c: 681b ldr r3, [r3, #0] 8000e2e: 2244 movs r2, #68 @ 0x44 8000e30: 5a9b ldrh r3, [r3, r2] 8000e32: b29a uxth r2, r3 8000e34: 687b ldr r3, [r7, #4] 8000e36: 681b ldr r3, [r3, #0] 8000e38: 4949 ldr r1, [pc, #292] @ (8000f60 ) 8000e3a: 400a ands r2, r1 8000e3c: b291 uxth r1, r2 8000e3e: 2244 movs r2, #68 @ 0x44 8000e40: 5299 strh r1, [r3, r2] hpcd->Instance->CNTR |= (uint16_t)USB_CNTR_LPMODE; 8000e42: 687b ldr r3, [r7, #4] 8000e44: 681b ldr r3, [r3, #0] 8000e46: 2240 movs r2, #64 @ 0x40 8000e48: 5a9b ldrh r3, [r3, r2] 8000e4a: b29a uxth r2, r3 8000e4c: 687b ldr r3, [r7, #4] 8000e4e: 681b ldr r3, [r3, #0] 8000e50: 2104 movs r1, #4 8000e52: 430a orrs r2, r1 8000e54: b291 uxth r1, r2 8000e56: 2240 movs r2, #64 @ 0x40 8000e58: 5299 strh r1, [r3, r2] #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->SuspendCallback(hpcd); #else HAL_PCD_SuspendCallback(hpcd); 8000e5a: 687b ldr r3, [r7, #4] 8000e5c: 0018 movs r0, r3 8000e5e: f006 f885 bl 8006f6c #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ return; 8000e62: e072 b.n 8000f4a } /* Handle LPM Interrupt */ if ((wIstr & USB_ISTR_L1REQ) == USB_ISTR_L1REQ) 8000e64: 68fb ldr r3, [r7, #12] 8000e66: 2280 movs r2, #128 @ 0x80 8000e68: 4013 ands r3, r2 8000e6a: d046 beq.n 8000efa { __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_L1REQ); 8000e6c: 687b ldr r3, [r7, #4] 8000e6e: 681b ldr r3, [r3, #0] 8000e70: 2244 movs r2, #68 @ 0x44 8000e72: 5a9b ldrh r3, [r3, r2] 8000e74: b29a uxth r2, r3 8000e76: 687b ldr r3, [r7, #4] 8000e78: 681b ldr r3, [r3, #0] 8000e7a: 2180 movs r1, #128 @ 0x80 8000e7c: 438a bics r2, r1 8000e7e: b291 uxth r1, r2 8000e80: 2244 movs r2, #68 @ 0x44 8000e82: 5299 strh r1, [r3, r2] if (hpcd->LPM_State == LPM_L0) 8000e84: 687a ldr r2, [r7, #4] 8000e86: 23b2 movs r3, #178 @ 0xb2 8000e88: 009b lsls r3, r3, #2 8000e8a: 5cd3 ldrb r3, [r2, r3] 8000e8c: 2b00 cmp r3, #0 8000e8e: d12f bne.n 8000ef0 { /* Force suspend and low-power mode before going to L1 state*/ hpcd->Instance->CNTR |= (uint16_t)USB_CNTR_LPMODE; 8000e90: 687b ldr r3, [r7, #4] 8000e92: 681b ldr r3, [r3, #0] 8000e94: 2240 movs r2, #64 @ 0x40 8000e96: 5a9b ldrh r3, [r3, r2] 8000e98: b29a uxth r2, r3 8000e9a: 687b ldr r3, [r7, #4] 8000e9c: 681b ldr r3, [r3, #0] 8000e9e: 2104 movs r1, #4 8000ea0: 430a orrs r2, r1 8000ea2: b291 uxth r1, r2 8000ea4: 2240 movs r2, #64 @ 0x40 8000ea6: 5299 strh r1, [r3, r2] hpcd->Instance->CNTR |= (uint16_t)USB_CNTR_FSUSP; 8000ea8: 687b ldr r3, [r7, #4] 8000eaa: 681b ldr r3, [r3, #0] 8000eac: 2240 movs r2, #64 @ 0x40 8000eae: 5a9b ldrh r3, [r3, r2] 8000eb0: b29a uxth r2, r3 8000eb2: 687b ldr r3, [r7, #4] 8000eb4: 681b ldr r3, [r3, #0] 8000eb6: 2108 movs r1, #8 8000eb8: 430a orrs r2, r1 8000eba: b291 uxth r1, r2 8000ebc: 2240 movs r2, #64 @ 0x40 8000ebe: 5299 strh r1, [r3, r2] hpcd->LPM_State = LPM_L1; 8000ec0: 687a ldr r2, [r7, #4] 8000ec2: 23b2 movs r3, #178 @ 0xb2 8000ec4: 009b lsls r3, r3, #2 8000ec6: 2101 movs r1, #1 8000ec8: 54d1 strb r1, [r2, r3] hpcd->BESL = ((uint32_t)hpcd->Instance->LPMCSR & USB_LPMCSR_BESL) >> 2; 8000eca: 687b ldr r3, [r7, #4] 8000ecc: 681b ldr r3, [r3, #0] 8000ece: 2254 movs r2, #84 @ 0x54 8000ed0: 5a9b ldrh r3, [r3, r2] 8000ed2: b29b uxth r3, r3 8000ed4: 089b lsrs r3, r3, #2 8000ed6: 223c movs r2, #60 @ 0x3c 8000ed8: 4013 ands r3, r2 8000eda: 0019 movs r1, r3 8000edc: 687a ldr r2, [r7, #4] 8000ede: 23b3 movs r3, #179 @ 0xb3 8000ee0: 009b lsls r3, r3, #2 8000ee2: 50d1 str r1, [r2, r3] #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->LPMCallback(hpcd, PCD_LPM_L1_ACTIVE); #else HAL_PCDEx_LPM_Callback(hpcd, PCD_LPM_L1_ACTIVE); 8000ee4: 687b ldr r3, [r7, #4] 8000ee6: 2101 movs r1, #1 8000ee8: 0018 movs r0, r3 8000eea: f001 fbff bl 80026ec #else HAL_PCD_SuspendCallback(hpcd); #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } return; 8000eee: e02c b.n 8000f4a HAL_PCD_SuspendCallback(hpcd); 8000ef0: 687b ldr r3, [r7, #4] 8000ef2: 0018 movs r0, r3 8000ef4: f006 f83a bl 8006f6c return; 8000ef8: e027 b.n 8000f4a } if ((wIstr & USB_ISTR_SOF) == USB_ISTR_SOF) 8000efa: 68fa ldr r2, [r7, #12] 8000efc: 2380 movs r3, #128 @ 0x80 8000efe: 009b lsls r3, r3, #2 8000f00: 4013 ands r3, r2 8000f02: d010 beq.n 8000f26 { __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_SOF); 8000f04: 687b ldr r3, [r7, #4] 8000f06: 681b ldr r3, [r3, #0] 8000f08: 2244 movs r2, #68 @ 0x44 8000f0a: 5a9b ldrh r3, [r3, r2] 8000f0c: b29a uxth r2, r3 8000f0e: 687b ldr r3, [r7, #4] 8000f10: 681b ldr r3, [r3, #0] 8000f12: 4914 ldr r1, [pc, #80] @ (8000f64 ) 8000f14: 400a ands r2, r1 8000f16: b291 uxth r1, r2 8000f18: 2244 movs r2, #68 @ 0x44 8000f1a: 5299 strh r1, [r3, r2] #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->SOFCallback(hpcd); #else HAL_PCD_SOFCallback(hpcd); 8000f1c: 687b ldr r3, [r7, #4] 8000f1e: 0018 movs r0, r3 8000f20: f005 fff0 bl 8006f04 #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ return; 8000f24: e011 b.n 8000f4a } if ((wIstr & USB_ISTR_ESOF) == USB_ISTR_ESOF) 8000f26: 68fa ldr r2, [r7, #12] 8000f28: 2380 movs r3, #128 @ 0x80 8000f2a: 005b lsls r3, r3, #1 8000f2c: 4013 ands r3, r2 8000f2e: d00c beq.n 8000f4a { /* clear ESOF flag in ISTR */ __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_ESOF); 8000f30: 687b ldr r3, [r7, #4] 8000f32: 681b ldr r3, [r3, #0] 8000f34: 2244 movs r2, #68 @ 0x44 8000f36: 5a9b ldrh r3, [r3, r2] 8000f38: b29a uxth r2, r3 8000f3a: 687b ldr r3, [r7, #4] 8000f3c: 681b ldr r3, [r3, #0] 8000f3e: 490a ldr r1, [pc, #40] @ (8000f68 ) 8000f40: 400a ands r2, r1 8000f42: b291 uxth r1, r2 8000f44: 2244 movs r2, #68 @ 0x44 8000f46: 5299 strh r1, [r3, r2] return; 8000f48: 46c0 nop @ (mov r8, r8) } } 8000f4a: 46bd mov sp, r7 8000f4c: b004 add sp, #16 8000f4e: bd80 pop {r7, pc} 8000f50: fffffbff .word 0xfffffbff 8000f54: ffffbfff .word 0xffffbfff 8000f58: ffffdfff .word 0xffffdfff 8000f5c: ffffefff .word 0xffffefff 8000f60: fffff7ff .word 0xfffff7ff 8000f64: fffffdff .word 0xfffffdff 8000f68: fffffeff .word 0xfffffeff 08000f6c : * @param hpcd PCD handle * @param address new device address * @retval HAL status */ HAL_StatusTypeDef HAL_PCD_SetAddress(PCD_HandleTypeDef *hpcd, uint8_t address) { 8000f6c: b580 push {r7, lr} 8000f6e: b082 sub sp, #8 8000f70: af00 add r7, sp, #0 8000f72: 6078 str r0, [r7, #4] 8000f74: 000a movs r2, r1 8000f76: 1cfb adds r3, r7, #3 8000f78: 701a strb r2, [r3, #0] __HAL_LOCK(hpcd); 8000f7a: 687a ldr r2, [r7, #4] 8000f7c: 23a4 movs r3, #164 @ 0xa4 8000f7e: 009b lsls r3, r3, #2 8000f80: 5cd3 ldrb r3, [r2, r3] 8000f82: 2b01 cmp r3, #1 8000f84: d101 bne.n 8000f8a 8000f86: 2302 movs r3, #2 8000f88: e016 b.n 8000fb8 8000f8a: 687a ldr r2, [r7, #4] 8000f8c: 23a4 movs r3, #164 @ 0xa4 8000f8e: 009b lsls r3, r3, #2 8000f90: 2101 movs r1, #1 8000f92: 54d1 strb r1, [r2, r3] hpcd->USB_Address = address; 8000f94: 687b ldr r3, [r7, #4] 8000f96: 1cfa adds r2, r7, #3 8000f98: 7812 ldrb r2, [r2, #0] 8000f9a: 731a strb r2, [r3, #12] (void)USB_SetDevAddress(hpcd->Instance, address); 8000f9c: 687b ldr r3, [r7, #4] 8000f9e: 681a ldr r2, [r3, #0] 8000fa0: 1cfb adds r3, r7, #3 8000fa2: 781b ldrb r3, [r3, #0] 8000fa4: 0019 movs r1, r3 8000fa6: 0010 movs r0, r2 8000fa8: f004 f952 bl 8005250 __HAL_UNLOCK(hpcd); 8000fac: 687a ldr r2, [r7, #4] 8000fae: 23a4 movs r3, #164 @ 0xa4 8000fb0: 009b lsls r3, r3, #2 8000fb2: 2100 movs r1, #0 8000fb4: 54d1 strb r1, [r2, r3] return HAL_OK; 8000fb6: 2300 movs r3, #0 } 8000fb8: 0018 movs r0, r3 8000fba: 46bd mov sp, r7 8000fbc: b002 add sp, #8 8000fbe: bd80 pop {r7, pc} 08000fc0 : * @param ep_type endpoint type * @retval HAL status */ HAL_StatusTypeDef HAL_PCD_EP_Open(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint16_t ep_mps, uint8_t ep_type) { 8000fc0: b590 push {r4, r7, lr} 8000fc2: b085 sub sp, #20 8000fc4: af00 add r7, sp, #0 8000fc6: 6078 str r0, [r7, #4] 8000fc8: 000c movs r4, r1 8000fca: 0010 movs r0, r2 8000fcc: 0019 movs r1, r3 8000fce: 1cfb adds r3, r7, #3 8000fd0: 1c22 adds r2, r4, #0 8000fd2: 701a strb r2, [r3, #0] 8000fd4: 003b movs r3, r7 8000fd6: 1c02 adds r2, r0, #0 8000fd8: 801a strh r2, [r3, #0] 8000fda: 1cbb adds r3, r7, #2 8000fdc: 1c0a adds r2, r1, #0 8000fde: 701a strb r2, [r3, #0] HAL_StatusTypeDef ret = HAL_OK; 8000fe0: 230b movs r3, #11 8000fe2: 18fb adds r3, r7, r3 8000fe4: 2200 movs r2, #0 8000fe6: 701a strb r2, [r3, #0] PCD_EPTypeDef *ep; if ((ep_addr & 0x80U) == 0x80U) 8000fe8: 1cfb adds r3, r7, #3 8000fea: 781b ldrb r3, [r3, #0] 8000fec: b25b sxtb r3, r3 8000fee: 2b00 cmp r3, #0 8000ff0: da0f bge.n 8001012 { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 8000ff2: 1cfb adds r3, r7, #3 8000ff4: 781b ldrb r3, [r3, #0] 8000ff6: 2207 movs r2, #7 8000ff8: 401a ands r2, r3 8000ffa: 0013 movs r3, r2 8000ffc: 009b lsls r3, r3, #2 8000ffe: 189b adds r3, r3, r2 8001000: 00db lsls r3, r3, #3 8001002: 3310 adds r3, #16 8001004: 687a ldr r2, [r7, #4] 8001006: 18d3 adds r3, r2, r3 8001008: 60fb str r3, [r7, #12] ep->is_in = 1U; 800100a: 68fb ldr r3, [r7, #12] 800100c: 2201 movs r2, #1 800100e: 705a strb r2, [r3, #1] 8001010: e00f b.n 8001032 } else { ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK]; 8001012: 1cfb adds r3, r7, #3 8001014: 781b ldrb r3, [r3, #0] 8001016: 2207 movs r2, #7 8001018: 401a ands r2, r3 800101a: 0013 movs r3, r2 800101c: 009b lsls r3, r3, #2 800101e: 189b adds r3, r3, r2 8001020: 00db lsls r3, r3, #3 8001022: 3351 adds r3, #81 @ 0x51 8001024: 33ff adds r3, #255 @ 0xff 8001026: 687a ldr r2, [r7, #4] 8001028: 18d3 adds r3, r2, r3 800102a: 60fb str r3, [r7, #12] ep->is_in = 0U; 800102c: 68fb ldr r3, [r7, #12] 800102e: 2200 movs r2, #0 8001030: 705a strb r2, [r3, #1] } ep->num = ep_addr & EP_ADDR_MSK; 8001032: 1cfb adds r3, r7, #3 8001034: 781b ldrb r3, [r3, #0] 8001036: 2207 movs r2, #7 8001038: 4013 ands r3, r2 800103a: b2da uxtb r2, r3 800103c: 68fb ldr r3, [r7, #12] 800103e: 701a strb r2, [r3, #0] ep->maxpacket = ep_mps; 8001040: 003b movs r3, r7 8001042: 881a ldrh r2, [r3, #0] 8001044: 68fb ldr r3, [r7, #12] 8001046: 611a str r2, [r3, #16] ep->type = ep_type; 8001048: 68fb ldr r3, [r7, #12] 800104a: 1cba adds r2, r7, #2 800104c: 7812 ldrb r2, [r2, #0] 800104e: 70da strb r2, [r3, #3] /* Set initial data PID. */ if (ep_type == EP_TYPE_BULK) 8001050: 1cbb adds r3, r7, #2 8001052: 781b ldrb r3, [r3, #0] 8001054: 2b02 cmp r3, #2 8001056: d102 bne.n 800105e { ep->data_pid_start = 0U; 8001058: 68fb ldr r3, [r7, #12] 800105a: 2200 movs r2, #0 800105c: 711a strb r2, [r3, #4] } __HAL_LOCK(hpcd); 800105e: 687a ldr r2, [r7, #4] 8001060: 23a4 movs r3, #164 @ 0xa4 8001062: 009b lsls r3, r3, #2 8001064: 5cd3 ldrb r3, [r2, r3] 8001066: 2b01 cmp r3, #1 8001068: d101 bne.n 800106e 800106a: 2302 movs r3, #2 800106c: e013 b.n 8001096 800106e: 687a ldr r2, [r7, #4] 8001070: 23a4 movs r3, #164 @ 0xa4 8001072: 009b lsls r3, r3, #2 8001074: 2101 movs r1, #1 8001076: 54d1 strb r1, [r2, r3] (void)USB_ActivateEndpoint(hpcd->Instance, ep); 8001078: 687b ldr r3, [r7, #4] 800107a: 681b ldr r3, [r3, #0] 800107c: 68fa ldr r2, [r7, #12] 800107e: 0011 movs r1, r2 8001080: 0018 movs r0, r3 8001082: f002 f94b bl 800331c __HAL_UNLOCK(hpcd); 8001086: 687a ldr r2, [r7, #4] 8001088: 23a4 movs r3, #164 @ 0xa4 800108a: 009b lsls r3, r3, #2 800108c: 2100 movs r1, #0 800108e: 54d1 strb r1, [r2, r3] return ret; 8001090: 230b movs r3, #11 8001092: 18fb adds r3, r7, r3 8001094: 781b ldrb r3, [r3, #0] } 8001096: 0018 movs r0, r3 8001098: 46bd mov sp, r7 800109a: b005 add sp, #20 800109c: bd90 pop {r4, r7, pc} 0800109e : * @param hpcd PCD handle * @param ep_addr endpoint address * @retval HAL status */ HAL_StatusTypeDef HAL_PCD_EP_Close(PCD_HandleTypeDef *hpcd, uint8_t ep_addr) { 800109e: b580 push {r7, lr} 80010a0: b084 sub sp, #16 80010a2: af00 add r7, sp, #0 80010a4: 6078 str r0, [r7, #4] 80010a6: 000a movs r2, r1 80010a8: 1cfb adds r3, r7, #3 80010aa: 701a strb r2, [r3, #0] PCD_EPTypeDef *ep; if ((ep_addr & 0x80U) == 0x80U) 80010ac: 1cfb adds r3, r7, #3 80010ae: 781b ldrb r3, [r3, #0] 80010b0: b25b sxtb r3, r3 80010b2: 2b00 cmp r3, #0 80010b4: da0f bge.n 80010d6 { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 80010b6: 1cfb adds r3, r7, #3 80010b8: 781b ldrb r3, [r3, #0] 80010ba: 2207 movs r2, #7 80010bc: 401a ands r2, r3 80010be: 0013 movs r3, r2 80010c0: 009b lsls r3, r3, #2 80010c2: 189b adds r3, r3, r2 80010c4: 00db lsls r3, r3, #3 80010c6: 3310 adds r3, #16 80010c8: 687a ldr r2, [r7, #4] 80010ca: 18d3 adds r3, r2, r3 80010cc: 60fb str r3, [r7, #12] ep->is_in = 1U; 80010ce: 68fb ldr r3, [r7, #12] 80010d0: 2201 movs r2, #1 80010d2: 705a strb r2, [r3, #1] 80010d4: e00f b.n 80010f6 } else { ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK]; 80010d6: 1cfb adds r3, r7, #3 80010d8: 781b ldrb r3, [r3, #0] 80010da: 2207 movs r2, #7 80010dc: 401a ands r2, r3 80010de: 0013 movs r3, r2 80010e0: 009b lsls r3, r3, #2 80010e2: 189b adds r3, r3, r2 80010e4: 00db lsls r3, r3, #3 80010e6: 3351 adds r3, #81 @ 0x51 80010e8: 33ff adds r3, #255 @ 0xff 80010ea: 687a ldr r2, [r7, #4] 80010ec: 18d3 adds r3, r2, r3 80010ee: 60fb str r3, [r7, #12] ep->is_in = 0U; 80010f0: 68fb ldr r3, [r7, #12] 80010f2: 2200 movs r2, #0 80010f4: 705a strb r2, [r3, #1] } ep->num = ep_addr & EP_ADDR_MSK; 80010f6: 1cfb adds r3, r7, #3 80010f8: 781b ldrb r3, [r3, #0] 80010fa: 2207 movs r2, #7 80010fc: 4013 ands r3, r2 80010fe: b2da uxtb r2, r3 8001100: 68fb ldr r3, [r7, #12] 8001102: 701a strb r2, [r3, #0] __HAL_LOCK(hpcd); 8001104: 687a ldr r2, [r7, #4] 8001106: 23a4 movs r3, #164 @ 0xa4 8001108: 009b lsls r3, r3, #2 800110a: 5cd3 ldrb r3, [r2, r3] 800110c: 2b01 cmp r3, #1 800110e: d101 bne.n 8001114 8001110: 2302 movs r3, #2 8001112: e011 b.n 8001138 8001114: 687a ldr r2, [r7, #4] 8001116: 23a4 movs r3, #164 @ 0xa4 8001118: 009b lsls r3, r3, #2 800111a: 2101 movs r1, #1 800111c: 54d1 strb r1, [r2, r3] (void)USB_DeactivateEndpoint(hpcd->Instance, ep); 800111e: 687b ldr r3, [r7, #4] 8001120: 681b ldr r3, [r3, #0] 8001122: 68fa ldr r2, [r7, #12] 8001124: 0011 movs r1, r2 8001126: 0018 movs r0, r3 8001128: f002 fca0 bl 8003a6c __HAL_UNLOCK(hpcd); 800112c: 687a ldr r2, [r7, #4] 800112e: 23a4 movs r3, #164 @ 0xa4 8001130: 009b lsls r3, r3, #2 8001132: 2100 movs r1, #0 8001134: 54d1 strb r1, [r2, r3] return HAL_OK; 8001136: 2300 movs r3, #0 } 8001138: 0018 movs r0, r3 800113a: 46bd mov sp, r7 800113c: b004 add sp, #16 800113e: bd80 pop {r7, pc} 08001140 : * @param pBuf pointer to the reception buffer * @param len amount of data to be received * @retval HAL status */ HAL_StatusTypeDef HAL_PCD_EP_Receive(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint8_t *pBuf, uint32_t len) { 8001140: b580 push {r7, lr} 8001142: b086 sub sp, #24 8001144: af00 add r7, sp, #0 8001146: 60f8 str r0, [r7, #12] 8001148: 607a str r2, [r7, #4] 800114a: 603b str r3, [r7, #0] 800114c: 200b movs r0, #11 800114e: 183b adds r3, r7, r0 8001150: 1c0a adds r2, r1, #0 8001152: 701a strb r2, [r3, #0] PCD_EPTypeDef *ep; ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK]; 8001154: 0001 movs r1, r0 8001156: 187b adds r3, r7, r1 8001158: 781b ldrb r3, [r3, #0] 800115a: 2207 movs r2, #7 800115c: 401a ands r2, r3 800115e: 0013 movs r3, r2 8001160: 009b lsls r3, r3, #2 8001162: 189b adds r3, r3, r2 8001164: 00db lsls r3, r3, #3 8001166: 3351 adds r3, #81 @ 0x51 8001168: 33ff adds r3, #255 @ 0xff 800116a: 68fa ldr r2, [r7, #12] 800116c: 18d3 adds r3, r2, r3 800116e: 617b str r3, [r7, #20] /*setup and start the Xfer */ ep->xfer_buff = pBuf; 8001170: 697b ldr r3, [r7, #20] 8001172: 687a ldr r2, [r7, #4] 8001174: 615a str r2, [r3, #20] ep->xfer_len = len; 8001176: 697b ldr r3, [r7, #20] 8001178: 683a ldr r2, [r7, #0] 800117a: 619a str r2, [r3, #24] ep->xfer_count = 0U; 800117c: 697b ldr r3, [r7, #20] 800117e: 2200 movs r2, #0 8001180: 61da str r2, [r3, #28] ep->is_in = 0U; 8001182: 697b ldr r3, [r7, #20] 8001184: 2200 movs r2, #0 8001186: 705a strb r2, [r3, #1] ep->num = ep_addr & EP_ADDR_MSK; 8001188: 187b adds r3, r7, r1 800118a: 781b ldrb r3, [r3, #0] 800118c: 2207 movs r2, #7 800118e: 4013 ands r3, r2 8001190: b2da uxtb r2, r3 8001192: 697b ldr r3, [r7, #20] 8001194: 701a strb r2, [r3, #0] (void)USB_EPStartXfer(hpcd->Instance, ep); 8001196: 68fb ldr r3, [r7, #12] 8001198: 681b ldr r3, [r3, #0] 800119a: 697a ldr r2, [r7, #20] 800119c: 0011 movs r1, r2 800119e: 0018 movs r0, r3 80011a0: f002 fe24 bl 8003dec return HAL_OK; 80011a4: 2300 movs r3, #0 } 80011a6: 0018 movs r0, r3 80011a8: 46bd mov sp, r7 80011aa: b006 add sp, #24 80011ac: bd80 pop {r7, pc} 080011ae : * @param pBuf pointer to the transmission buffer * @param len amount of data to be sent * @retval HAL status */ HAL_StatusTypeDef HAL_PCD_EP_Transmit(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint8_t *pBuf, uint32_t len) { 80011ae: b580 push {r7, lr} 80011b0: b086 sub sp, #24 80011b2: af00 add r7, sp, #0 80011b4: 60f8 str r0, [r7, #12] 80011b6: 607a str r2, [r7, #4] 80011b8: 603b str r3, [r7, #0] 80011ba: 200b movs r0, #11 80011bc: 183b adds r3, r7, r0 80011be: 1c0a adds r2, r1, #0 80011c0: 701a strb r2, [r3, #0] PCD_EPTypeDef *ep; ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 80011c2: 183b adds r3, r7, r0 80011c4: 781b ldrb r3, [r3, #0] 80011c6: 2207 movs r2, #7 80011c8: 401a ands r2, r3 80011ca: 0013 movs r3, r2 80011cc: 009b lsls r3, r3, #2 80011ce: 189b adds r3, r3, r2 80011d0: 00db lsls r3, r3, #3 80011d2: 3310 adds r3, #16 80011d4: 68fa ldr r2, [r7, #12] 80011d6: 18d3 adds r3, r2, r3 80011d8: 617b str r3, [r7, #20] /*setup and start the Xfer */ ep->xfer_buff = pBuf; 80011da: 697b ldr r3, [r7, #20] 80011dc: 687a ldr r2, [r7, #4] 80011de: 615a str r2, [r3, #20] ep->xfer_len = len; 80011e0: 697b ldr r3, [r7, #20] 80011e2: 683a ldr r2, [r7, #0] 80011e4: 619a str r2, [r3, #24] ep->xfer_fill_db = 1U; 80011e6: 697b ldr r3, [r7, #20] 80011e8: 2224 movs r2, #36 @ 0x24 80011ea: 2101 movs r1, #1 80011ec: 5499 strb r1, [r3, r2] ep->xfer_len_db = len; 80011ee: 697b ldr r3, [r7, #20] 80011f0: 683a ldr r2, [r7, #0] 80011f2: 621a str r2, [r3, #32] ep->xfer_count = 0U; 80011f4: 697b ldr r3, [r7, #20] 80011f6: 2200 movs r2, #0 80011f8: 61da str r2, [r3, #28] ep->is_in = 1U; 80011fa: 697b ldr r3, [r7, #20] 80011fc: 2201 movs r2, #1 80011fe: 705a strb r2, [r3, #1] ep->num = ep_addr & EP_ADDR_MSK; 8001200: 183b adds r3, r7, r0 8001202: 781b ldrb r3, [r3, #0] 8001204: 2207 movs r2, #7 8001206: 4013 ands r3, r2 8001208: b2da uxtb r2, r3 800120a: 697b ldr r3, [r7, #20] 800120c: 701a strb r2, [r3, #0] (void)USB_EPStartXfer(hpcd->Instance, ep); 800120e: 68fb ldr r3, [r7, #12] 8001210: 681b ldr r3, [r3, #0] 8001212: 697a ldr r2, [r7, #20] 8001214: 0011 movs r1, r2 8001216: 0018 movs r0, r3 8001218: f002 fde8 bl 8003dec return HAL_OK; 800121c: 2300 movs r3, #0 } 800121e: 0018 movs r0, r3 8001220: 46bd mov sp, r7 8001222: b006 add sp, #24 8001224: bd80 pop {r7, pc} 08001226 : * @param hpcd PCD handle * @param ep_addr endpoint address * @retval HAL status */ HAL_StatusTypeDef HAL_PCD_EP_SetStall(PCD_HandleTypeDef *hpcd, uint8_t ep_addr) { 8001226: b580 push {r7, lr} 8001228: b084 sub sp, #16 800122a: af00 add r7, sp, #0 800122c: 6078 str r0, [r7, #4] 800122e: 000a movs r2, r1 8001230: 1cfb adds r3, r7, #3 8001232: 701a strb r2, [r3, #0] PCD_EPTypeDef *ep; if (((uint32_t)ep_addr & EP_ADDR_MSK) > hpcd->Init.dev_endpoints) 8001234: 1cfb adds r3, r7, #3 8001236: 781b ldrb r3, [r3, #0] 8001238: 2207 movs r2, #7 800123a: 4013 ands r3, r2 800123c: 687a ldr r2, [r7, #4] 800123e: 7912 ldrb r2, [r2, #4] 8001240: 4293 cmp r3, r2 8001242: d901 bls.n 8001248 { return HAL_ERROR; 8001244: 2301 movs r3, #1 8001246: e046 b.n 80012d6 } if ((0x80U & ep_addr) == 0x80U) 8001248: 1cfb adds r3, r7, #3 800124a: 781b ldrb r3, [r3, #0] 800124c: b25b sxtb r3, r3 800124e: 2b00 cmp r3, #0 8001250: da0f bge.n 8001272 { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 8001252: 1cfb adds r3, r7, #3 8001254: 781b ldrb r3, [r3, #0] 8001256: 2207 movs r2, #7 8001258: 401a ands r2, r3 800125a: 0013 movs r3, r2 800125c: 009b lsls r3, r3, #2 800125e: 189b adds r3, r3, r2 8001260: 00db lsls r3, r3, #3 8001262: 3310 adds r3, #16 8001264: 687a ldr r2, [r7, #4] 8001266: 18d3 adds r3, r2, r3 8001268: 60fb str r3, [r7, #12] ep->is_in = 1U; 800126a: 68fb ldr r3, [r7, #12] 800126c: 2201 movs r2, #1 800126e: 705a strb r2, [r3, #1] 8001270: e00d b.n 800128e } else { ep = &hpcd->OUT_ep[ep_addr]; 8001272: 1cfb adds r3, r7, #3 8001274: 781a ldrb r2, [r3, #0] 8001276: 0013 movs r3, r2 8001278: 009b lsls r3, r3, #2 800127a: 189b adds r3, r3, r2 800127c: 00db lsls r3, r3, #3 800127e: 3351 adds r3, #81 @ 0x51 8001280: 33ff adds r3, #255 @ 0xff 8001282: 687a ldr r2, [r7, #4] 8001284: 18d3 adds r3, r2, r3 8001286: 60fb str r3, [r7, #12] ep->is_in = 0U; 8001288: 68fb ldr r3, [r7, #12] 800128a: 2200 movs r2, #0 800128c: 705a strb r2, [r3, #1] } ep->is_stall = 1U; 800128e: 68fb ldr r3, [r7, #12] 8001290: 2201 movs r2, #1 8001292: 709a strb r2, [r3, #2] ep->num = ep_addr & EP_ADDR_MSK; 8001294: 1cfb adds r3, r7, #3 8001296: 781b ldrb r3, [r3, #0] 8001298: 2207 movs r2, #7 800129a: 4013 ands r3, r2 800129c: b2da uxtb r2, r3 800129e: 68fb ldr r3, [r7, #12] 80012a0: 701a strb r2, [r3, #0] __HAL_LOCK(hpcd); 80012a2: 687a ldr r2, [r7, #4] 80012a4: 23a4 movs r3, #164 @ 0xa4 80012a6: 009b lsls r3, r3, #2 80012a8: 5cd3 ldrb r3, [r2, r3] 80012aa: 2b01 cmp r3, #1 80012ac: d101 bne.n 80012b2 80012ae: 2302 movs r3, #2 80012b0: e011 b.n 80012d6 80012b2: 687a ldr r2, [r7, #4] 80012b4: 23a4 movs r3, #164 @ 0xa4 80012b6: 009b lsls r3, r3, #2 80012b8: 2101 movs r1, #1 80012ba: 54d1 strb r1, [r2, r3] (void)USB_EPSetStall(hpcd->Instance, ep); 80012bc: 687b ldr r3, [r7, #4] 80012be: 681b ldr r3, [r3, #0] 80012c0: 68fa ldr r2, [r7, #12] 80012c2: 0011 movs r1, r2 80012c4: 0018 movs r0, r3 80012c6: f003 fec1 bl 800504c __HAL_UNLOCK(hpcd); 80012ca: 687a ldr r2, [r7, #4] 80012cc: 23a4 movs r3, #164 @ 0xa4 80012ce: 009b lsls r3, r3, #2 80012d0: 2100 movs r1, #0 80012d2: 54d1 strb r1, [r2, r3] return HAL_OK; 80012d4: 2300 movs r3, #0 } 80012d6: 0018 movs r0, r3 80012d8: 46bd mov sp, r7 80012da: b004 add sp, #16 80012dc: bd80 pop {r7, pc} 080012de : * @param hpcd PCD handle * @param ep_addr endpoint address * @retval HAL status */ HAL_StatusTypeDef HAL_PCD_EP_ClrStall(PCD_HandleTypeDef *hpcd, uint8_t ep_addr) { 80012de: b580 push {r7, lr} 80012e0: b084 sub sp, #16 80012e2: af00 add r7, sp, #0 80012e4: 6078 str r0, [r7, #4] 80012e6: 000a movs r2, r1 80012e8: 1cfb adds r3, r7, #3 80012ea: 701a strb r2, [r3, #0] PCD_EPTypeDef *ep; if (((uint32_t)ep_addr & 0x0FU) > hpcd->Init.dev_endpoints) 80012ec: 1cfb adds r3, r7, #3 80012ee: 781b ldrb r3, [r3, #0] 80012f0: 220f movs r2, #15 80012f2: 4013 ands r3, r2 80012f4: 687a ldr r2, [r7, #4] 80012f6: 7912 ldrb r2, [r2, #4] 80012f8: 4293 cmp r3, r2 80012fa: d901 bls.n 8001300 { return HAL_ERROR; 80012fc: 2301 movs r3, #1 80012fe: e048 b.n 8001392 } if ((0x80U & ep_addr) == 0x80U) 8001300: 1cfb adds r3, r7, #3 8001302: 781b ldrb r3, [r3, #0] 8001304: b25b sxtb r3, r3 8001306: 2b00 cmp r3, #0 8001308: da0f bge.n 800132a { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 800130a: 1cfb adds r3, r7, #3 800130c: 781b ldrb r3, [r3, #0] 800130e: 2207 movs r2, #7 8001310: 401a ands r2, r3 8001312: 0013 movs r3, r2 8001314: 009b lsls r3, r3, #2 8001316: 189b adds r3, r3, r2 8001318: 00db lsls r3, r3, #3 800131a: 3310 adds r3, #16 800131c: 687a ldr r2, [r7, #4] 800131e: 18d3 adds r3, r2, r3 8001320: 60fb str r3, [r7, #12] ep->is_in = 1U; 8001322: 68fb ldr r3, [r7, #12] 8001324: 2201 movs r2, #1 8001326: 705a strb r2, [r3, #1] 8001328: e00f b.n 800134a } else { ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK]; 800132a: 1cfb adds r3, r7, #3 800132c: 781b ldrb r3, [r3, #0] 800132e: 2207 movs r2, #7 8001330: 401a ands r2, r3 8001332: 0013 movs r3, r2 8001334: 009b lsls r3, r3, #2 8001336: 189b adds r3, r3, r2 8001338: 00db lsls r3, r3, #3 800133a: 3351 adds r3, #81 @ 0x51 800133c: 33ff adds r3, #255 @ 0xff 800133e: 687a ldr r2, [r7, #4] 8001340: 18d3 adds r3, r2, r3 8001342: 60fb str r3, [r7, #12] ep->is_in = 0U; 8001344: 68fb ldr r3, [r7, #12] 8001346: 2200 movs r2, #0 8001348: 705a strb r2, [r3, #1] } ep->is_stall = 0U; 800134a: 68fb ldr r3, [r7, #12] 800134c: 2200 movs r2, #0 800134e: 709a strb r2, [r3, #2] ep->num = ep_addr & EP_ADDR_MSK; 8001350: 1cfb adds r3, r7, #3 8001352: 781b ldrb r3, [r3, #0] 8001354: 2207 movs r2, #7 8001356: 4013 ands r3, r2 8001358: b2da uxtb r2, r3 800135a: 68fb ldr r3, [r7, #12] 800135c: 701a strb r2, [r3, #0] __HAL_LOCK(hpcd); 800135e: 687a ldr r2, [r7, #4] 8001360: 23a4 movs r3, #164 @ 0xa4 8001362: 009b lsls r3, r3, #2 8001364: 5cd3 ldrb r3, [r2, r3] 8001366: 2b01 cmp r3, #1 8001368: d101 bne.n 800136e 800136a: 2302 movs r3, #2 800136c: e011 b.n 8001392 800136e: 687a ldr r2, [r7, #4] 8001370: 23a4 movs r3, #164 @ 0xa4 8001372: 009b lsls r3, r3, #2 8001374: 2101 movs r1, #1 8001376: 54d1 strb r1, [r2, r3] (void)USB_EPClearStall(hpcd->Instance, ep); 8001378: 687b ldr r3, [r7, #4] 800137a: 681b ldr r3, [r3, #0] 800137c: 68fa ldr r2, [r7, #12] 800137e: 0011 movs r1, r2 8001380: 0018 movs r0, r3 8001382: f003 feb3 bl 80050ec __HAL_UNLOCK(hpcd); 8001386: 687a ldr r2, [r7, #4] 8001388: 23a4 movs r3, #164 @ 0xa4 800138a: 009b lsls r3, r3, #2 800138c: 2100 movs r1, #0 800138e: 54d1 strb r1, [r2, r3] return HAL_OK; 8001390: 2300 movs r3, #0 } 8001392: 0018 movs r0, r3 8001394: 46bd mov sp, r7 8001396: b004 add sp, #16 8001398: bd80 pop {r7, pc} ... 0800139c : * @brief This function handles PCD Endpoint interrupt request. * @param hpcd PCD handle * @retval HAL status */ static HAL_StatusTypeDef PCD_EP_ISR_Handler(PCD_HandleTypeDef *hpcd) { 800139c: b5b0 push {r4, r5, r7, lr} 800139e: b096 sub sp, #88 @ 0x58 80013a0: af00 add r7, sp, #0 80013a2: 6078 str r0, [r7, #4] #if (USE_USB_DOUBLE_BUFFER != 1U) count = 0U; #endif /* USE_USB_DOUBLE_BUFFER */ /* stay in loop while pending interrupts */ while ((hpcd->Instance->ISTR & USB_ISTR_CTR) != 0U) 80013a4: f000 fbea bl 8001b7c { wIstr = hpcd->Instance->ISTR; 80013a8: 687b ldr r3, [r7, #4] 80013aa: 681a ldr r2, [r3, #0] 80013ac: 2048 movs r0, #72 @ 0x48 80013ae: 183b adds r3, r7, r0 80013b0: 2144 movs r1, #68 @ 0x44 80013b2: 5a52 ldrh r2, [r2, r1] 80013b4: 801a strh r2, [r3, #0] /* extract highest priority endpoint number */ epindex = (uint8_t)(wIstr & USB_ISTR_EP_ID); 80013b6: 183b adds r3, r7, r0 80013b8: 881b ldrh r3, [r3, #0] 80013ba: b2da uxtb r2, r3 80013bc: 244f movs r4, #79 @ 0x4f 80013be: 193b adds r3, r7, r4 80013c0: 210f movs r1, #15 80013c2: 400a ands r2, r1 80013c4: 701a strb r2, [r3, #0] if (epindex == 0U) 80013c6: 193b adds r3, r7, r4 80013c8: 781b ldrb r3, [r3, #0] 80013ca: 2b00 cmp r3, #0 80013cc: d000 beq.n 80013d0 80013ce: e18d b.n 80016ec { /* Decode and service control endpoint interrupt */ /* DIR bit = origin of the interrupt */ if ((wIstr & USB_ISTR_DIR) == 0U) 80013d0: 183b adds r3, r7, r0 80013d2: 881b ldrh r3, [r3, #0] 80013d4: 2210 movs r2, #16 80013d6: 4013 ands r3, r2 80013d8: d152 bne.n 8001480 { /* DIR = 0 */ /* DIR = 0 => IN int */ /* DIR = 0 implies that (EP_CTR_TX = 1) always */ PCD_CLEAR_TX_EP_CTR(hpcd->Instance, PCD_ENDP0); 80013da: 687b ldr r3, [r7, #4] 80013dc: 681b ldr r3, [r3, #0] 80013de: 881b ldrh r3, [r3, #0] 80013e0: b29a uxth r2, r3 80013e2: 200e movs r0, #14 80013e4: 183b adds r3, r7, r0 80013e6: 49ba ldr r1, [pc, #744] @ (80016d0 ) 80013e8: 400a ands r2, r1 80013ea: 801a strh r2, [r3, #0] 80013ec: 687b ldr r3, [r7, #4] 80013ee: 681b ldr r3, [r3, #0] 80013f0: 183a adds r2, r7, r0 80013f2: 8812 ldrh r2, [r2, #0] 80013f4: 49b7 ldr r1, [pc, #732] @ (80016d4 ) 80013f6: 430a orrs r2, r1 80013f8: b292 uxth r2, r2 80013fa: 801a strh r2, [r3, #0] ep = &hpcd->IN_ep[0]; 80013fc: 687b ldr r3, [r7, #4] 80013fe: 3310 adds r3, #16 8001400: 657b str r3, [r7, #84] @ 0x54 ep->xfer_count = PCD_GET_EP_TX_CNT(hpcd->Instance, ep->num); 8001402: 687b ldr r3, [r7, #4] 8001404: 681b ldr r3, [r3, #0] 8001406: 2250 movs r2, #80 @ 0x50 8001408: 5a9b ldrh r3, [r3, r2] 800140a: b29b uxth r3, r3 800140c: 001a movs r2, r3 800140e: 6d7b ldr r3, [r7, #84] @ 0x54 8001410: 781b ldrb r3, [r3, #0] 8001412: 00db lsls r3, r3, #3 8001414: 18d2 adds r2, r2, r3 8001416: 687b ldr r3, [r7, #4] 8001418: 681b ldr r3, [r3, #0] 800141a: 18d3 adds r3, r2, r3 800141c: 4aae ldr r2, [pc, #696] @ (80016d8 ) 800141e: 4694 mov ip, r2 8001420: 4463 add r3, ip 8001422: 881b ldrh r3, [r3, #0] 8001424: 059b lsls r3, r3, #22 8001426: 0d9a lsrs r2, r3, #22 8001428: 6d7b ldr r3, [r7, #84] @ 0x54 800142a: 61da str r2, [r3, #28] ep->xfer_buff += ep->xfer_count; 800142c: 6d7b ldr r3, [r7, #84] @ 0x54 800142e: 695a ldr r2, [r3, #20] 8001430: 6d7b ldr r3, [r7, #84] @ 0x54 8001432: 69db ldr r3, [r3, #28] 8001434: 18d2 adds r2, r2, r3 8001436: 6d7b ldr r3, [r7, #84] @ 0x54 8001438: 615a str r2, [r3, #20] /* TX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataInStageCallback(hpcd, 0U); #else HAL_PCD_DataInStageCallback(hpcd, 0U); 800143a: 687b ldr r3, [r7, #4] 800143c: 2100 movs r1, #0 800143e: 0018 movs r0, r3 8001440: f005 fd42 bl 8006ec8 #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ if ((hpcd->USB_Address > 0U) && (ep->xfer_len == 0U)) 8001444: 687b ldr r3, [r7, #4] 8001446: 7b1b ldrb r3, [r3, #12] 8001448: b2db uxtb r3, r3 800144a: 2b00 cmp r3, #0 800144c: d101 bne.n 8001452 800144e: f000 fb95 bl 8001b7c 8001452: 6d7b ldr r3, [r7, #84] @ 0x54 8001454: 699b ldr r3, [r3, #24] 8001456: 2b00 cmp r3, #0 8001458: d001 beq.n 800145e 800145a: f000 fb8f bl 8001b7c { hpcd->Instance->DADDR = ((uint16_t)hpcd->USB_Address | USB_DADDR_EF); 800145e: 687b ldr r3, [r7, #4] 8001460: 7b1b ldrb r3, [r3, #12] 8001462: b2db uxtb r3, r3 8001464: 2280 movs r2, #128 @ 0x80 8001466: 4252 negs r2, r2 8001468: 4313 orrs r3, r2 800146a: b2da uxtb r2, r3 800146c: 687b ldr r3, [r7, #4] 800146e: 681b ldr r3, [r3, #0] 8001470: 0011 movs r1, r2 8001472: 224c movs r2, #76 @ 0x4c 8001474: 5299 strh r1, [r3, r2] hpcd->USB_Address = 0U; 8001476: 687b ldr r3, [r7, #4] 8001478: 2200 movs r2, #0 800147a: 731a strb r2, [r3, #12] 800147c: f000 fb7e bl 8001b7c { /* DIR = 1 */ /* DIR = 1 & CTR_RX => SETUP or OUT int */ /* DIR = 1 & (CTR_TX | CTR_RX) => 2 int pending */ ep = &hpcd->OUT_ep[0]; 8001480: 687b ldr r3, [r7, #4] 8001482: 3351 adds r3, #81 @ 0x51 8001484: 33ff adds r3, #255 @ 0xff 8001486: 657b str r3, [r7, #84] @ 0x54 wEPVal = PCD_GET_ENDPOINT(hpcd->Instance, PCD_ENDP0); 8001488: 687b ldr r3, [r7, #4] 800148a: 681a ldr r2, [r3, #0] 800148c: 214c movs r1, #76 @ 0x4c 800148e: 187b adds r3, r7, r1 8001490: 8812 ldrh r2, [r2, #0] 8001492: 801a strh r2, [r3, #0] if ((wEPVal & USB_EP_SETUP) != 0U) 8001494: 187b adds r3, r7, r1 8001496: 881a ldrh r2, [r3, #0] 8001498: 2380 movs r3, #128 @ 0x80 800149a: 011b lsls r3, r3, #4 800149c: 4013 ands r3, r2 800149e: d037 beq.n 8001510 { /* Get SETUP Packet */ ep->xfer_count = PCD_GET_EP_RX_CNT(hpcd->Instance, ep->num); 80014a0: 687b ldr r3, [r7, #4] 80014a2: 681b ldr r3, [r3, #0] 80014a4: 2250 movs r2, #80 @ 0x50 80014a6: 5a9b ldrh r3, [r3, r2] 80014a8: b29b uxth r3, r3 80014aa: 001a movs r2, r3 80014ac: 6d7b ldr r3, [r7, #84] @ 0x54 80014ae: 781b ldrb r3, [r3, #0] 80014b0: 00db lsls r3, r3, #3 80014b2: 18d2 adds r2, r2, r3 80014b4: 687b ldr r3, [r7, #4] 80014b6: 681b ldr r3, [r3, #0] 80014b8: 18d3 adds r3, r2, r3 80014ba: 4a88 ldr r2, [pc, #544] @ (80016dc ) 80014bc: 4694 mov ip, r2 80014be: 4463 add r3, ip 80014c0: 881b ldrh r3, [r3, #0] 80014c2: 059b lsls r3, r3, #22 80014c4: 0d9a lsrs r2, r3, #22 80014c6: 6d7b ldr r3, [r7, #84] @ 0x54 80014c8: 61da str r2, [r3, #28] USB_ReadPMA(hpcd->Instance, (uint8_t *)hpcd->Setup, 80014ca: 687b ldr r3, [r7, #4] 80014cc: 6818 ldr r0, [r3, #0] 80014ce: 687b ldr r3, [r7, #4] 80014d0: 22a6 movs r2, #166 @ 0xa6 80014d2: 0092 lsls r2, r2, #2 80014d4: 1899 adds r1, r3, r2 80014d6: 6d7b ldr r3, [r7, #84] @ 0x54 80014d8: 88da ldrh r2, [r3, #6] ep->pmaadress, (uint16_t)ep->xfer_count); 80014da: 6d7b ldr r3, [r7, #84] @ 0x54 80014dc: 69db ldr r3, [r3, #28] USB_ReadPMA(hpcd->Instance, (uint8_t *)hpcd->Setup, 80014de: b29b uxth r3, r3 80014e0: f003 ff38 bl 8005354 /* SETUP bit kept frozen while CTR_RX = 1 */ PCD_CLEAR_RX_EP_CTR(hpcd->Instance, PCD_ENDP0); 80014e4: 687b ldr r3, [r7, #4] 80014e6: 681b ldr r3, [r3, #0] 80014e8: 881b ldrh r3, [r3, #0] 80014ea: b29a uxth r2, r3 80014ec: 2010 movs r0, #16 80014ee: 183b adds r3, r7, r0 80014f0: 497b ldr r1, [pc, #492] @ (80016e0 ) 80014f2: 400a ands r2, r1 80014f4: 801a strh r2, [r3, #0] 80014f6: 687b ldr r3, [r7, #4] 80014f8: 681b ldr r3, [r3, #0] 80014fa: 183a adds r2, r7, r0 80014fc: 8812 ldrh r2, [r2, #0] 80014fe: 2180 movs r1, #128 @ 0x80 8001500: 430a orrs r2, r1 8001502: b292 uxth r2, r2 8001504: 801a strh r2, [r3, #0] /* Process SETUP Packet*/ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->SetupStageCallback(hpcd); #else HAL_PCD_SetupStageCallback(hpcd); 8001506: 687b ldr r3, [r7, #4] 8001508: 0018 movs r0, r3 800150a: f005 fca7 bl 8006e5c 800150e: e335 b.n 8001b7c #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } else if ((wEPVal & USB_EP_CTR_RX) != 0U) 8001510: 234c movs r3, #76 @ 0x4c 8001512: 18fb adds r3, r7, r3 8001514: 2200 movs r2, #0 8001516: 5e9b ldrsh r3, [r3, r2] 8001518: 2b00 cmp r3, #0 800151a: db00 blt.n 800151e 800151c: e32e b.n 8001b7c { PCD_CLEAR_RX_EP_CTR(hpcd->Instance, PCD_ENDP0); 800151e: 687b ldr r3, [r7, #4] 8001520: 681b ldr r3, [r3, #0] 8001522: 881b ldrh r3, [r3, #0] 8001524: b29a uxth r2, r3 8001526: 201e movs r0, #30 8001528: 183b adds r3, r7, r0 800152a: 496d ldr r1, [pc, #436] @ (80016e0 ) 800152c: 400a ands r2, r1 800152e: 801a strh r2, [r3, #0] 8001530: 687b ldr r3, [r7, #4] 8001532: 681b ldr r3, [r3, #0] 8001534: 183a adds r2, r7, r0 8001536: 8812 ldrh r2, [r2, #0] 8001538: 2180 movs r1, #128 @ 0x80 800153a: 430a orrs r2, r1 800153c: b292 uxth r2, r2 800153e: 801a strh r2, [r3, #0] /* Get Control Data OUT Packet */ ep->xfer_count = PCD_GET_EP_RX_CNT(hpcd->Instance, ep->num); 8001540: 687b ldr r3, [r7, #4] 8001542: 681b ldr r3, [r3, #0] 8001544: 2250 movs r2, #80 @ 0x50 8001546: 5a9b ldrh r3, [r3, r2] 8001548: b29b uxth r3, r3 800154a: 001a movs r2, r3 800154c: 6d7b ldr r3, [r7, #84] @ 0x54 800154e: 781b ldrb r3, [r3, #0] 8001550: 00db lsls r3, r3, #3 8001552: 18d2 adds r2, r2, r3 8001554: 687b ldr r3, [r7, #4] 8001556: 681b ldr r3, [r3, #0] 8001558: 18d3 adds r3, r2, r3 800155a: 4a60 ldr r2, [pc, #384] @ (80016dc ) 800155c: 4694 mov ip, r2 800155e: 4463 add r3, ip 8001560: 881b ldrh r3, [r3, #0] 8001562: 059b lsls r3, r3, #22 8001564: 0d9a lsrs r2, r3, #22 8001566: 6d7b ldr r3, [r7, #84] @ 0x54 8001568: 61da str r2, [r3, #28] if ((ep->xfer_count != 0U) && (ep->xfer_buff != 0U)) 800156a: 6d7b ldr r3, [r7, #84] @ 0x54 800156c: 69db ldr r3, [r3, #28] 800156e: 2b00 cmp r3, #0 8001570: d01a beq.n 80015a8 8001572: 6d7b ldr r3, [r7, #84] @ 0x54 8001574: 695b ldr r3, [r3, #20] 8001576: 2b00 cmp r3, #0 8001578: d016 beq.n 80015a8 { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, 800157a: 687b ldr r3, [r7, #4] 800157c: 6818 ldr r0, [r3, #0] 800157e: 6d7b ldr r3, [r7, #84] @ 0x54 8001580: 6959 ldr r1, [r3, #20] 8001582: 6d7b ldr r3, [r7, #84] @ 0x54 8001584: 88da ldrh r2, [r3, #6] ep->pmaadress, (uint16_t)ep->xfer_count); 8001586: 6d7b ldr r3, [r7, #84] @ 0x54 8001588: 69db ldr r3, [r3, #28] USB_ReadPMA(hpcd->Instance, ep->xfer_buff, 800158a: b29b uxth r3, r3 800158c: f003 fee2 bl 8005354 ep->xfer_buff += ep->xfer_count; 8001590: 6d7b ldr r3, [r7, #84] @ 0x54 8001592: 695a ldr r2, [r3, #20] 8001594: 6d7b ldr r3, [r7, #84] @ 0x54 8001596: 69db ldr r3, [r3, #28] 8001598: 18d2 adds r2, r2, r3 800159a: 6d7b ldr r3, [r7, #84] @ 0x54 800159c: 615a str r2, [r3, #20] /* Process Control Data OUT Packet */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataOutStageCallback(hpcd, 0U); #else HAL_PCD_DataOutStageCallback(hpcd, 0U); 800159e: 687b ldr r3, [r7, #4] 80015a0: 2100 movs r1, #0 80015a2: 0018 movs r0, r3 80015a4: f005 fc6f bl 8006e86 #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } wEPVal = (uint16_t)PCD_GET_ENDPOINT(hpcd->Instance, PCD_ENDP0); 80015a8: 687b ldr r3, [r7, #4] 80015aa: 681a ldr r2, [r3, #0] 80015ac: 214c movs r1, #76 @ 0x4c 80015ae: 187b adds r3, r7, r1 80015b0: 8812 ldrh r2, [r2, #0] 80015b2: 801a strh r2, [r3, #0] if (((wEPVal & USB_EP_SETUP) == 0U) && ((wEPVal & USB_EP_RX_STRX) != USB_EP_RX_VALID)) 80015b4: 187b adds r3, r7, r1 80015b6: 881a ldrh r2, [r3, #0] 80015b8: 2380 movs r3, #128 @ 0x80 80015ba: 011b lsls r3, r3, #4 80015bc: 4013 ands r3, r2 80015be: d000 beq.n 80015c2 80015c0: e2dc b.n 8001b7c 80015c2: 187b adds r3, r7, r1 80015c4: 881a ldrh r2, [r3, #0] 80015c6: 23c0 movs r3, #192 @ 0xc0 80015c8: 019b lsls r3, r3, #6 80015ca: 401a ands r2, r3 80015cc: 23c0 movs r3, #192 @ 0xc0 80015ce: 019b lsls r3, r3, #6 80015d0: 429a cmp r2, r3 80015d2: d100 bne.n 80015d6 80015d4: e2d2 b.n 8001b7c { PCD_SET_EP_RX_CNT(hpcd->Instance, PCD_ENDP0, ep->maxpacket); 80015d6: 687b ldr r3, [r7, #4] 80015d8: 681b ldr r3, [r3, #0] 80015da: 61bb str r3, [r7, #24] 80015dc: 687b ldr r3, [r7, #4] 80015de: 681b ldr r3, [r3, #0] 80015e0: 2250 movs r2, #80 @ 0x50 80015e2: 5a9b ldrh r3, [r3, r2] 80015e4: b29b uxth r3, r3 80015e6: 001a movs r2, r3 80015e8: 69bb ldr r3, [r7, #24] 80015ea: 189b adds r3, r3, r2 80015ec: 61bb str r3, [r7, #24] 80015ee: 69bb ldr r3, [r7, #24] 80015f0: 4a3a ldr r2, [pc, #232] @ (80016dc ) 80015f2: 4694 mov ip, r2 80015f4: 4463 add r3, ip 80015f6: 617b str r3, [r7, #20] 80015f8: 697b ldr r3, [r7, #20] 80015fa: 881b ldrh r3, [r3, #0] 80015fc: b29b uxth r3, r3 80015fe: 059b lsls r3, r3, #22 8001600: 0d9b lsrs r3, r3, #22 8001602: b29a uxth r2, r3 8001604: 697b ldr r3, [r7, #20] 8001606: 801a strh r2, [r3, #0] 8001608: 6d7b ldr r3, [r7, #84] @ 0x54 800160a: 691b ldr r3, [r3, #16] 800160c: 2b00 cmp r3, #0 800160e: d108 bne.n 8001622 8001610: 697b ldr r3, [r7, #20] 8001612: 881b ldrh r3, [r3, #0] 8001614: b29b uxth r3, r3 8001616: 4a2f ldr r2, [pc, #188] @ (80016d4 ) 8001618: 4313 orrs r3, r2 800161a: b29a uxth r2, r3 800161c: 697b ldr r3, [r7, #20] 800161e: 801a strh r2, [r3, #0] 8001620: e035 b.n 800168e 8001622: 6d7b ldr r3, [r7, #84] @ 0x54 8001624: 691b ldr r3, [r3, #16] 8001626: 2b3e cmp r3, #62 @ 0x3e 8001628: d817 bhi.n 800165a 800162a: 6d7b ldr r3, [r7, #84] @ 0x54 800162c: 691b ldr r3, [r3, #16] 800162e: 085b lsrs r3, r3, #1 8001630: 647b str r3, [r7, #68] @ 0x44 8001632: 6d7b ldr r3, [r7, #84] @ 0x54 8001634: 691b ldr r3, [r3, #16] 8001636: 2201 movs r2, #1 8001638: 4013 ands r3, r2 800163a: d002 beq.n 8001642 800163c: 6c7b ldr r3, [r7, #68] @ 0x44 800163e: 3301 adds r3, #1 8001640: 647b str r3, [r7, #68] @ 0x44 8001642: 697b ldr r3, [r7, #20] 8001644: 881b ldrh r3, [r3, #0] 8001646: b29a uxth r2, r3 8001648: 6c7b ldr r3, [r7, #68] @ 0x44 800164a: b29b uxth r3, r3 800164c: 029b lsls r3, r3, #10 800164e: b29b uxth r3, r3 8001650: 4313 orrs r3, r2 8001652: b29a uxth r2, r3 8001654: 697b ldr r3, [r7, #20] 8001656: 801a strh r2, [r3, #0] 8001658: e019 b.n 800168e 800165a: 6d7b ldr r3, [r7, #84] @ 0x54 800165c: 691b ldr r3, [r3, #16] 800165e: 095b lsrs r3, r3, #5 8001660: 647b str r3, [r7, #68] @ 0x44 8001662: 6d7b ldr r3, [r7, #84] @ 0x54 8001664: 691b ldr r3, [r3, #16] 8001666: 221f movs r2, #31 8001668: 4013 ands r3, r2 800166a: d102 bne.n 8001672 800166c: 6c7b ldr r3, [r7, #68] @ 0x44 800166e: 3b01 subs r3, #1 8001670: 647b str r3, [r7, #68] @ 0x44 8001672: 697b ldr r3, [r7, #20] 8001674: 881b ldrh r3, [r3, #0] 8001676: b29a uxth r2, r3 8001678: 6c7b ldr r3, [r7, #68] @ 0x44 800167a: b29b uxth r3, r3 800167c: 029b lsls r3, r3, #10 800167e: b29b uxth r3, r3 8001680: 4313 orrs r3, r2 8001682: b29b uxth r3, r3 8001684: 4a13 ldr r2, [pc, #76] @ (80016d4 ) 8001686: 4313 orrs r3, r2 8001688: b29a uxth r2, r3 800168a: 697b ldr r3, [r7, #20] 800168c: 801a strh r2, [r3, #0] PCD_SET_EP_RX_STATUS(hpcd->Instance, PCD_ENDP0, USB_EP_RX_VALID); 800168e: 687b ldr r3, [r7, #4] 8001690: 681b ldr r3, [r3, #0] 8001692: 881b ldrh r3, [r3, #0] 8001694: b29a uxth r2, r3 8001696: 2012 movs r0, #18 8001698: 183b adds r3, r7, r0 800169a: 4912 ldr r1, [pc, #72] @ (80016e4 ) 800169c: 400a ands r2, r1 800169e: 801a strh r2, [r3, #0] 80016a0: 183b adds r3, r7, r0 80016a2: 183a adds r2, r7, r0 80016a4: 8812 ldrh r2, [r2, #0] 80016a6: 2180 movs r1, #128 @ 0x80 80016a8: 0149 lsls r1, r1, #5 80016aa: 404a eors r2, r1 80016ac: 801a strh r2, [r3, #0] 80016ae: 183b adds r3, r7, r0 80016b0: 183a adds r2, r7, r0 80016b2: 8812 ldrh r2, [r2, #0] 80016b4: 2180 movs r1, #128 @ 0x80 80016b6: 0189 lsls r1, r1, #6 80016b8: 404a eors r2, r1 80016ba: 801a strh r2, [r3, #0] 80016bc: 687b ldr r3, [r7, #4] 80016be: 681b ldr r3, [r3, #0] 80016c0: 183a adds r2, r7, r0 80016c2: 8812 ldrh r2, [r2, #0] 80016c4: 4908 ldr r1, [pc, #32] @ (80016e8 ) 80016c6: 430a orrs r2, r1 80016c8: b292 uxth r2, r2 80016ca: 801a strh r2, [r3, #0] 80016cc: e256 b.n 8001b7c 80016ce: 46c0 nop @ (mov r8, r8) 80016d0: ffff8f0f .word 0xffff8f0f 80016d4: ffff8000 .word 0xffff8000 80016d8: 00000402 .word 0x00000402 80016dc: 00000406 .word 0x00000406 80016e0: 00000f8f .word 0x00000f8f 80016e4: ffffbf8f .word 0xffffbf8f 80016e8: ffff8080 .word 0xffff8080 } else { /* Decode and service non control endpoints interrupt */ /* process related endpoint register */ wEPVal = PCD_GET_ENDPOINT(hpcd->Instance, epindex); 80016ec: 687b ldr r3, [r7, #4] 80016ee: 681b ldr r3, [r3, #0] 80016f0: 001a movs r2, r3 80016f2: 204f movs r0, #79 @ 0x4f 80016f4: 183b adds r3, r7, r0 80016f6: 781b ldrb r3, [r3, #0] 80016f8: 009b lsls r3, r3, #2 80016fa: 18d2 adds r2, r2, r3 80016fc: 214c movs r1, #76 @ 0x4c 80016fe: 187b adds r3, r7, r1 8001700: 8812 ldrh r2, [r2, #0] 8001702: 801a strh r2, [r3, #0] if ((wEPVal & USB_EP_CTR_RX) != 0U) 8001704: 187b adds r3, r7, r1 8001706: 2200 movs r2, #0 8001708: 5e9b ldrsh r3, [r3, r2] 800170a: 2b00 cmp r3, #0 800170c: db00 blt.n 8001710 800170e: e0fa b.n 8001906 { /* clear int flag */ PCD_CLEAR_RX_EP_CTR(hpcd->Instance, epindex); 8001710: 687b ldr r3, [r7, #4] 8001712: 681b ldr r3, [r3, #0] 8001714: 001a movs r2, r3 8001716: 183b adds r3, r7, r0 8001718: 781b ldrb r3, [r3, #0] 800171a: 009b lsls r3, r3, #2 800171c: 18d3 adds r3, r2, r3 800171e: 881b ldrh r3, [r3, #0] 8001720: b29a uxth r2, r3 8001722: 244a movs r4, #74 @ 0x4a 8001724: 193b adds r3, r7, r4 8001726: 49d1 ldr r1, [pc, #836] @ (8001a6c ) 8001728: 400a ands r2, r1 800172a: 801a strh r2, [r3, #0] 800172c: 687b ldr r3, [r7, #4] 800172e: 681b ldr r3, [r3, #0] 8001730: 001a movs r2, r3 8001732: 183b adds r3, r7, r0 8001734: 781b ldrb r3, [r3, #0] 8001736: 009b lsls r3, r3, #2 8001738: 18d3 adds r3, r2, r3 800173a: 193a adds r2, r7, r4 800173c: 8812 ldrh r2, [r2, #0] 800173e: 2180 movs r1, #128 @ 0x80 8001740: 430a orrs r2, r1 8001742: b292 uxth r2, r2 8001744: 801a strh r2, [r3, #0] ep = &hpcd->OUT_ep[epindex]; 8001746: 183b adds r3, r7, r0 8001748: 781a ldrb r2, [r3, #0] 800174a: 0013 movs r3, r2 800174c: 009b lsls r3, r3, #2 800174e: 189b adds r3, r3, r2 8001750: 00db lsls r3, r3, #3 8001752: 3351 adds r3, #81 @ 0x51 8001754: 33ff adds r3, #255 @ 0xff 8001756: 687a ldr r2, [r7, #4] 8001758: 18d3 adds r3, r2, r3 800175a: 657b str r3, [r7, #84] @ 0x54 /* OUT Single Buffering */ if (ep->doublebuffer == 0U) 800175c: 6d7b ldr r3, [r7, #84] @ 0x54 800175e: 7b1b ldrb r3, [r3, #12] 8001760: 2b00 cmp r3, #0 8001762: d125 bne.n 80017b0 { count = (uint16_t)PCD_GET_EP_RX_CNT(hpcd->Instance, ep->num); 8001764: 687b ldr r3, [r7, #4] 8001766: 681b ldr r3, [r3, #0] 8001768: 2250 movs r2, #80 @ 0x50 800176a: 5a9b ldrh r3, [r3, r2] 800176c: b29b uxth r3, r3 800176e: 001a movs r2, r3 8001770: 6d7b ldr r3, [r7, #84] @ 0x54 8001772: 781b ldrb r3, [r3, #0] 8001774: 00db lsls r3, r3, #3 8001776: 18d2 adds r2, r2, r3 8001778: 687b ldr r3, [r7, #4] 800177a: 681b ldr r3, [r3, #0] 800177c: 18d3 adds r3, r2, r3 800177e: 4abc ldr r2, [pc, #752] @ (8001a70 ) 8001780: 4694 mov ip, r2 8001782: 4463 add r3, ip 8001784: 881a ldrh r2, [r3, #0] 8001786: 2450 movs r4, #80 @ 0x50 8001788: 193b adds r3, r7, r4 800178a: 0592 lsls r2, r2, #22 800178c: 0d92 lsrs r2, r2, #22 800178e: 801a strh r2, [r3, #0] if (count != 0U) 8001790: 193b adds r3, r7, r4 8001792: 881b ldrh r3, [r3, #0] 8001794: 2b00 cmp r3, #0 8001796: d100 bne.n 800179a 8001798: e08d b.n 80018b6 { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaadress, count); 800179a: 687b ldr r3, [r7, #4] 800179c: 6818 ldr r0, [r3, #0] 800179e: 6d7b ldr r3, [r7, #84] @ 0x54 80017a0: 6959 ldr r1, [r3, #20] 80017a2: 6d7b ldr r3, [r7, #84] @ 0x54 80017a4: 88da ldrh r2, [r3, #6] 80017a6: 193b adds r3, r7, r4 80017a8: 881b ldrh r3, [r3, #0] 80017aa: f003 fdd3 bl 8005354 80017ae: e082 b.n 80018b6 } #if (USE_USB_DOUBLE_BUFFER == 1U) else { /* manage double buffer bulk out */ if (ep->type == EP_TYPE_BULK) 80017b0: 6d7b ldr r3, [r7, #84] @ 0x54 80017b2: 78db ldrb r3, [r3, #3] 80017b4: 2b02 cmp r3, #2 80017b6: d10c bne.n 80017d2 { count = HAL_PCD_EP_DB_Receive(hpcd, ep, wEPVal); 80017b8: 2350 movs r3, #80 @ 0x50 80017ba: 18fc adds r4, r7, r3 80017bc: 234c movs r3, #76 @ 0x4c 80017be: 18fb adds r3, r7, r3 80017c0: 881a ldrh r2, [r3, #0] 80017c2: 6d79 ldr r1, [r7, #84] @ 0x54 80017c4: 687b ldr r3, [r7, #4] 80017c6: 0018 movs r0, r3 80017c8: f000 f9ec bl 8001ba4 80017cc: 0003 movs r3, r0 80017ce: 8023 strh r3, [r4, #0] 80017d0: e071 b.n 80018b6 } else /* manage double buffer iso out */ { /* free EP OUT Buffer */ PCD_FREE_USER_BUFFER(hpcd->Instance, ep->num, 0U); 80017d2: 687b ldr r3, [r7, #4] 80017d4: 681b ldr r3, [r3, #0] 80017d6: 001a movs r2, r3 80017d8: 6d7b ldr r3, [r7, #84] @ 0x54 80017da: 781b ldrb r3, [r3, #0] 80017dc: 009b lsls r3, r3, #2 80017de: 18d3 adds r3, r2, r3 80017e0: 881b ldrh r3, [r3, #0] 80017e2: b29a uxth r2, r3 80017e4: 2052 movs r0, #82 @ 0x52 80017e6: 183b adds r3, r7, r0 80017e8: 49a2 ldr r1, [pc, #648] @ (8001a74 ) 80017ea: 400a ands r2, r1 80017ec: 801a strh r2, [r3, #0] 80017ee: 687b ldr r3, [r7, #4] 80017f0: 681b ldr r3, [r3, #0] 80017f2: 001a movs r2, r3 80017f4: 6d7b ldr r3, [r7, #84] @ 0x54 80017f6: 781b ldrb r3, [r3, #0] 80017f8: 009b lsls r3, r3, #2 80017fa: 18d3 adds r3, r2, r3 80017fc: 183a adds r2, r7, r0 80017fe: 8812 ldrh r2, [r2, #0] 8001800: 499d ldr r1, [pc, #628] @ (8001a78 ) 8001802: 430a orrs r2, r1 8001804: b292 uxth r2, r2 8001806: 801a strh r2, [r3, #0] if ((PCD_GET_ENDPOINT(hpcd->Instance, ep->num) & USB_EP_DTOG_RX) != 0U) 8001808: 687b ldr r3, [r7, #4] 800180a: 681b ldr r3, [r3, #0] 800180c: 001a movs r2, r3 800180e: 6d7b ldr r3, [r7, #84] @ 0x54 8001810: 781b ldrb r3, [r3, #0] 8001812: 009b lsls r3, r3, #2 8001814: 18d3 adds r3, r2, r3 8001816: 881b ldrh r3, [r3, #0] 8001818: b29b uxth r3, r3 800181a: 001a movs r2, r3 800181c: 2380 movs r3, #128 @ 0x80 800181e: 01db lsls r3, r3, #7 8001820: 4013 ands r3, r2 8001822: d024 beq.n 800186e { /* read from endpoint BUF0Addr buffer */ count = (uint16_t)PCD_GET_EP_DBUF0_CNT(hpcd->Instance, ep->num); 8001824: 687b ldr r3, [r7, #4] 8001826: 681b ldr r3, [r3, #0] 8001828: 2250 movs r2, #80 @ 0x50 800182a: 5a9b ldrh r3, [r3, r2] 800182c: b29b uxth r3, r3 800182e: 001a movs r2, r3 8001830: 6d7b ldr r3, [r7, #84] @ 0x54 8001832: 781b ldrb r3, [r3, #0] 8001834: 00db lsls r3, r3, #3 8001836: 18d2 adds r2, r2, r3 8001838: 687b ldr r3, [r7, #4] 800183a: 681b ldr r3, [r3, #0] 800183c: 18d3 adds r3, r2, r3 800183e: 4a8f ldr r2, [pc, #572] @ (8001a7c ) 8001840: 4694 mov ip, r2 8001842: 4463 add r3, ip 8001844: 881a ldrh r2, [r3, #0] 8001846: 2450 movs r4, #80 @ 0x50 8001848: 193b adds r3, r7, r4 800184a: 0592 lsls r2, r2, #22 800184c: 0d92 lsrs r2, r2, #22 800184e: 801a strh r2, [r3, #0] if (count != 0U) 8001850: 193b adds r3, r7, r4 8001852: 881b ldrh r3, [r3, #0] 8001854: 2b00 cmp r3, #0 8001856: d02e beq.n 80018b6 { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr0, count); 8001858: 687b ldr r3, [r7, #4] 800185a: 6818 ldr r0, [r3, #0] 800185c: 6d7b ldr r3, [r7, #84] @ 0x54 800185e: 6959 ldr r1, [r3, #20] 8001860: 6d7b ldr r3, [r7, #84] @ 0x54 8001862: 891a ldrh r2, [r3, #8] 8001864: 193b adds r3, r7, r4 8001866: 881b ldrh r3, [r3, #0] 8001868: f003 fd74 bl 8005354 800186c: e023 b.n 80018b6 } } else { /* read from endpoint BUF1Addr buffer */ count = (uint16_t)PCD_GET_EP_DBUF1_CNT(hpcd->Instance, ep->num); 800186e: 687b ldr r3, [r7, #4] 8001870: 681b ldr r3, [r3, #0] 8001872: 2250 movs r2, #80 @ 0x50 8001874: 5a9b ldrh r3, [r3, r2] 8001876: b29b uxth r3, r3 8001878: 001a movs r2, r3 800187a: 6d7b ldr r3, [r7, #84] @ 0x54 800187c: 781b ldrb r3, [r3, #0] 800187e: 00db lsls r3, r3, #3 8001880: 18d2 adds r2, r2, r3 8001882: 687b ldr r3, [r7, #4] 8001884: 681b ldr r3, [r3, #0] 8001886: 18d3 adds r3, r2, r3 8001888: 4a79 ldr r2, [pc, #484] @ (8001a70 ) 800188a: 4694 mov ip, r2 800188c: 4463 add r3, ip 800188e: 881a ldrh r2, [r3, #0] 8001890: 2450 movs r4, #80 @ 0x50 8001892: 193b adds r3, r7, r4 8001894: 0592 lsls r2, r2, #22 8001896: 0d92 lsrs r2, r2, #22 8001898: 801a strh r2, [r3, #0] if (count != 0U) 800189a: 193b adds r3, r7, r4 800189c: 881b ldrh r3, [r3, #0] 800189e: 2b00 cmp r3, #0 80018a0: d009 beq.n 80018b6 { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr1, count); 80018a2: 687b ldr r3, [r7, #4] 80018a4: 6818 ldr r0, [r3, #0] 80018a6: 6d7b ldr r3, [r7, #84] @ 0x54 80018a8: 6959 ldr r1, [r3, #20] 80018aa: 6d7b ldr r3, [r7, #84] @ 0x54 80018ac: 895a ldrh r2, [r3, #10] 80018ae: 193b adds r3, r7, r4 80018b0: 881b ldrh r3, [r3, #0] 80018b2: f003 fd4f bl 8005354 } } #endif /* (USE_USB_DOUBLE_BUFFER == 1U) */ /* multi-packet on the NON control OUT endpoint */ ep->xfer_count += count; 80018b6: 6d7b ldr r3, [r7, #84] @ 0x54 80018b8: 69da ldr r2, [r3, #28] 80018ba: 2150 movs r1, #80 @ 0x50 80018bc: 187b adds r3, r7, r1 80018be: 881b ldrh r3, [r3, #0] 80018c0: 18d2 adds r2, r2, r3 80018c2: 6d7b ldr r3, [r7, #84] @ 0x54 80018c4: 61da str r2, [r3, #28] ep->xfer_buff += count; 80018c6: 6d7b ldr r3, [r7, #84] @ 0x54 80018c8: 695a ldr r2, [r3, #20] 80018ca: 187b adds r3, r7, r1 80018cc: 881b ldrh r3, [r3, #0] 80018ce: 18d2 adds r2, r2, r3 80018d0: 6d7b ldr r3, [r7, #84] @ 0x54 80018d2: 615a str r2, [r3, #20] if ((ep->xfer_len == 0U) || (count < ep->maxpacket)) 80018d4: 6d7b ldr r3, [r7, #84] @ 0x54 80018d6: 699b ldr r3, [r3, #24] 80018d8: 2b00 cmp r3, #0 80018da: d005 beq.n 80018e8 80018dc: 187b adds r3, r7, r1 80018de: 881a ldrh r2, [r3, #0] 80018e0: 6d7b ldr r3, [r7, #84] @ 0x54 80018e2: 691b ldr r3, [r3, #16] 80018e4: 429a cmp r2, r3 80018e6: d207 bcs.n 80018f8 { /* RX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataOutStageCallback(hpcd, ep->num); #else HAL_PCD_DataOutStageCallback(hpcd, ep->num); 80018e8: 6d7b ldr r3, [r7, #84] @ 0x54 80018ea: 781a ldrb r2, [r3, #0] 80018ec: 687b ldr r3, [r7, #4] 80018ee: 0011 movs r1, r2 80018f0: 0018 movs r0, r3 80018f2: f005 fac8 bl 8006e86 80018f6: e006 b.n 8001906 #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } else { (void)USB_EPStartXfer(hpcd->Instance, ep); 80018f8: 687b ldr r3, [r7, #4] 80018fa: 681b ldr r3, [r3, #0] 80018fc: 6d7a ldr r2, [r7, #84] @ 0x54 80018fe: 0011 movs r1, r2 8001900: 0018 movs r0, r3 8001902: f002 fa73 bl 8003dec } } if ((wEPVal & USB_EP_CTR_TX) != 0U) 8001906: 244c movs r4, #76 @ 0x4c 8001908: 193b adds r3, r7, r4 800190a: 881b ldrh r3, [r3, #0] 800190c: 2280 movs r2, #128 @ 0x80 800190e: 4013 ands r3, r2 8001910: d100 bne.n 8001914 8001912: e133 b.n 8001b7c { ep = &hpcd->IN_ep[epindex]; 8001914: 204f movs r0, #79 @ 0x4f 8001916: 183b adds r3, r7, r0 8001918: 781a ldrb r2, [r3, #0] 800191a: 0013 movs r3, r2 800191c: 009b lsls r3, r3, #2 800191e: 189b adds r3, r3, r2 8001920: 00db lsls r3, r3, #3 8001922: 3310 adds r3, #16 8001924: 687a ldr r2, [r7, #4] 8001926: 18d3 adds r3, r2, r3 8001928: 657b str r3, [r7, #84] @ 0x54 /* clear int flag */ PCD_CLEAR_TX_EP_CTR(hpcd->Instance, epindex); 800192a: 687b ldr r3, [r7, #4] 800192c: 681b ldr r3, [r3, #0] 800192e: 001a movs r2, r3 8001930: 183b adds r3, r7, r0 8001932: 781b ldrb r3, [r3, #0] 8001934: 009b lsls r3, r3, #2 8001936: 18d3 adds r3, r2, r3 8001938: 881b ldrh r3, [r3, #0] 800193a: b29a uxth r2, r3 800193c: 2542 movs r5, #66 @ 0x42 800193e: 197b adds r3, r7, r5 8001940: 494f ldr r1, [pc, #316] @ (8001a80 ) 8001942: 400a ands r2, r1 8001944: 801a strh r2, [r3, #0] 8001946: 687b ldr r3, [r7, #4] 8001948: 681b ldr r3, [r3, #0] 800194a: 001a movs r2, r3 800194c: 183b adds r3, r7, r0 800194e: 781b ldrb r3, [r3, #0] 8001950: 009b lsls r3, r3, #2 8001952: 18d3 adds r3, r2, r3 8001954: 197a adds r2, r7, r5 8001956: 8812 ldrh r2, [r2, #0] 8001958: 494a ldr r1, [pc, #296] @ (8001a84 ) 800195a: 430a orrs r2, r1 800195c: b292 uxth r2, r2 800195e: 801a strh r2, [r3, #0] if (ep->type == EP_TYPE_ISOC) 8001960: 6d7b ldr r3, [r7, #84] @ 0x54 8001962: 78db ldrb r3, [r3, #3] 8001964: 2b01 cmp r3, #1 8001966: d000 beq.n 800196a 8001968: e0af b.n 8001aca { ep->xfer_len = 0U; 800196a: 6d7b ldr r3, [r7, #84] @ 0x54 800196c: 2200 movs r2, #0 800196e: 619a str r2, [r3, #24] #if (USE_USB_DOUBLE_BUFFER == 1U) if (ep->doublebuffer != 0U) 8001970: 6d7b ldr r3, [r7, #84] @ 0x54 8001972: 7b1b ldrb r3, [r3, #12] 8001974: 2b00 cmp r3, #0 8001976: d100 bne.n 800197a 8001978: e09f b.n 8001aba { if ((wEPVal & USB_EP_DTOG_TX) != 0U) 800197a: 193b adds r3, r7, r4 800197c: 881b ldrh r3, [r3, #0] 800197e: 2240 movs r2, #64 @ 0x40 8001980: 4013 ands r3, r2 8001982: d046 beq.n 8001a12 { PCD_SET_EP_DBUF0_CNT(hpcd->Instance, ep->num, ep->is_in, 0U); 8001984: 6d7b ldr r3, [r7, #84] @ 0x54 8001986: 785b ldrb r3, [r3, #1] 8001988: 2b00 cmp r3, #0 800198a: d125 bne.n 80019d8 800198c: 687b ldr r3, [r7, #4] 800198e: 681b ldr r3, [r3, #0] 8001990: 627b str r3, [r7, #36] @ 0x24 8001992: 687b ldr r3, [r7, #4] 8001994: 681b ldr r3, [r3, #0] 8001996: 2250 movs r2, #80 @ 0x50 8001998: 5a9b ldrh r3, [r3, r2] 800199a: b29b uxth r3, r3 800199c: 001a movs r2, r3 800199e: 6a7b ldr r3, [r7, #36] @ 0x24 80019a0: 189b adds r3, r3, r2 80019a2: 627b str r3, [r7, #36] @ 0x24 80019a4: 6d7b ldr r3, [r7, #84] @ 0x54 80019a6: 781b ldrb r3, [r3, #0] 80019a8: 00da lsls r2, r3, #3 80019aa: 6a7b ldr r3, [r7, #36] @ 0x24 80019ac: 18d3 adds r3, r2, r3 80019ae: 4a33 ldr r2, [pc, #204] @ (8001a7c ) 80019b0: 4694 mov ip, r2 80019b2: 4463 add r3, ip 80019b4: 623b str r3, [r7, #32] 80019b6: 6a3b ldr r3, [r7, #32] 80019b8: 881b ldrh r3, [r3, #0] 80019ba: b29b uxth r3, r3 80019bc: 059b lsls r3, r3, #22 80019be: 0d9b lsrs r3, r3, #22 80019c0: b29a uxth r2, r3 80019c2: 6a3b ldr r3, [r7, #32] 80019c4: 801a strh r2, [r3, #0] 80019c6: 6a3b ldr r3, [r7, #32] 80019c8: 881b ldrh r3, [r3, #0] 80019ca: b29b uxth r3, r3 80019cc: 4a2d ldr r2, [pc, #180] @ (8001a84 ) 80019ce: 4313 orrs r3, r2 80019d0: b29a uxth r2, r3 80019d2: 6a3b ldr r3, [r7, #32] 80019d4: 801a strh r2, [r3, #0] 80019d6: e070 b.n 8001aba 80019d8: 6d7b ldr r3, [r7, #84] @ 0x54 80019da: 785b ldrb r3, [r3, #1] 80019dc: 2b01 cmp r3, #1 80019de: d16c bne.n 8001aba 80019e0: 687b ldr r3, [r7, #4] 80019e2: 681b ldr r3, [r3, #0] 80019e4: 62fb str r3, [r7, #44] @ 0x2c 80019e6: 687b ldr r3, [r7, #4] 80019e8: 681b ldr r3, [r3, #0] 80019ea: 2250 movs r2, #80 @ 0x50 80019ec: 5a9b ldrh r3, [r3, r2] 80019ee: b29b uxth r3, r3 80019f0: 001a movs r2, r3 80019f2: 6afb ldr r3, [r7, #44] @ 0x2c 80019f4: 189b adds r3, r3, r2 80019f6: 62fb str r3, [r7, #44] @ 0x2c 80019f8: 6d7b ldr r3, [r7, #84] @ 0x54 80019fa: 781b ldrb r3, [r3, #0] 80019fc: 00da lsls r2, r3, #3 80019fe: 6afb ldr r3, [r7, #44] @ 0x2c 8001a00: 18d3 adds r3, r2, r3 8001a02: 4a1e ldr r2, [pc, #120] @ (8001a7c ) 8001a04: 4694 mov ip, r2 8001a06: 4463 add r3, ip 8001a08: 62bb str r3, [r7, #40] @ 0x28 8001a0a: 6abb ldr r3, [r7, #40] @ 0x28 8001a0c: 2200 movs r2, #0 8001a0e: 801a strh r2, [r3, #0] 8001a10: e053 b.n 8001aba } else { PCD_SET_EP_DBUF1_CNT(hpcd->Instance, ep->num, ep->is_in, 0U); 8001a12: 687b ldr r3, [r7, #4] 8001a14: 681b ldr r3, [r3, #0] 8001a16: 63fb str r3, [r7, #60] @ 0x3c 8001a18: 6d7b ldr r3, [r7, #84] @ 0x54 8001a1a: 785b ldrb r3, [r3, #1] 8001a1c: 2b00 cmp r3, #0 8001a1e: d133 bne.n 8001a88 8001a20: 687b ldr r3, [r7, #4] 8001a22: 681b ldr r3, [r3, #0] 8001a24: 637b str r3, [r7, #52] @ 0x34 8001a26: 687b ldr r3, [r7, #4] 8001a28: 681b ldr r3, [r3, #0] 8001a2a: 2250 movs r2, #80 @ 0x50 8001a2c: 5a9b ldrh r3, [r3, r2] 8001a2e: b29b uxth r3, r3 8001a30: 001a movs r2, r3 8001a32: 6b7b ldr r3, [r7, #52] @ 0x34 8001a34: 189b adds r3, r3, r2 8001a36: 637b str r3, [r7, #52] @ 0x34 8001a38: 6d7b ldr r3, [r7, #84] @ 0x54 8001a3a: 781b ldrb r3, [r3, #0] 8001a3c: 00da lsls r2, r3, #3 8001a3e: 6b7b ldr r3, [r7, #52] @ 0x34 8001a40: 18d3 adds r3, r2, r3 8001a42: 4a0b ldr r2, [pc, #44] @ (8001a70 ) 8001a44: 4694 mov ip, r2 8001a46: 4463 add r3, ip 8001a48: 633b str r3, [r7, #48] @ 0x30 8001a4a: 6b3b ldr r3, [r7, #48] @ 0x30 8001a4c: 881b ldrh r3, [r3, #0] 8001a4e: b29b uxth r3, r3 8001a50: 059b lsls r3, r3, #22 8001a52: 0d9b lsrs r3, r3, #22 8001a54: b29a uxth r2, r3 8001a56: 6b3b ldr r3, [r7, #48] @ 0x30 8001a58: 801a strh r2, [r3, #0] 8001a5a: 6b3b ldr r3, [r7, #48] @ 0x30 8001a5c: 881b ldrh r3, [r3, #0] 8001a5e: b29b uxth r3, r3 8001a60: 4a08 ldr r2, [pc, #32] @ (8001a84 ) 8001a62: 4313 orrs r3, r2 8001a64: b29a uxth r2, r3 8001a66: 6b3b ldr r3, [r7, #48] @ 0x30 8001a68: 801a strh r2, [r3, #0] 8001a6a: e026 b.n 8001aba 8001a6c: 00000f8f .word 0x00000f8f 8001a70: 00000406 .word 0x00000406 8001a74: ffff8f8f .word 0xffff8f8f 8001a78: ffff80c0 .word 0xffff80c0 8001a7c: 00000402 .word 0x00000402 8001a80: ffff8f0f .word 0xffff8f0f 8001a84: ffff8000 .word 0xffff8000 8001a88: 6d7b ldr r3, [r7, #84] @ 0x54 8001a8a: 785b ldrb r3, [r3, #1] 8001a8c: 2b01 cmp r3, #1 8001a8e: d114 bne.n 8001aba 8001a90: 687b ldr r3, [r7, #4] 8001a92: 681b ldr r3, [r3, #0] 8001a94: 2250 movs r2, #80 @ 0x50 8001a96: 5a9b ldrh r3, [r3, r2] 8001a98: b29b uxth r3, r3 8001a9a: 001a movs r2, r3 8001a9c: 6bfb ldr r3, [r7, #60] @ 0x3c 8001a9e: 189b adds r3, r3, r2 8001aa0: 63fb str r3, [r7, #60] @ 0x3c 8001aa2: 6d7b ldr r3, [r7, #84] @ 0x54 8001aa4: 781b ldrb r3, [r3, #0] 8001aa6: 00da lsls r2, r3, #3 8001aa8: 6bfb ldr r3, [r7, #60] @ 0x3c 8001aaa: 18d3 adds r3, r2, r3 8001aac: 4a3b ldr r2, [pc, #236] @ (8001b9c ) 8001aae: 4694 mov ip, r2 8001ab0: 4463 add r3, ip 8001ab2: 63bb str r3, [r7, #56] @ 0x38 8001ab4: 6bbb ldr r3, [r7, #56] @ 0x38 8001ab6: 2200 movs r2, #0 8001ab8: 801a strh r2, [r3, #0] /* TX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataInStageCallback(hpcd, ep->num); #else HAL_PCD_DataInStageCallback(hpcd, ep->num); 8001aba: 6d7b ldr r3, [r7, #84] @ 0x54 8001abc: 781a ldrb r2, [r3, #0] 8001abe: 687b ldr r3, [r7, #4] 8001ac0: 0011 movs r1, r2 8001ac2: 0018 movs r0, r3 8001ac4: f005 fa00 bl 8006ec8 8001ac8: e058 b.n 8001b7c #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } else { /* Manage Single Buffer Transaction */ if ((wEPVal & USB_EP_KIND) == 0U) 8001aca: 234c movs r3, #76 @ 0x4c 8001acc: 18fb adds r3, r7, r3 8001ace: 881a ldrh r2, [r3, #0] 8001ad0: 2380 movs r3, #128 @ 0x80 8001ad2: 005b lsls r3, r3, #1 8001ad4: 4013 ands r3, r2 8001ad6: d149 bne.n 8001b6c { /* multi-packet on the NON control IN endpoint */ TxPctSize = (uint16_t)PCD_GET_EP_TX_CNT(hpcd->Instance, ep->num); 8001ad8: 687b ldr r3, [r7, #4] 8001ada: 681b ldr r3, [r3, #0] 8001adc: 2250 movs r2, #80 @ 0x50 8001ade: 5a9b ldrh r3, [r3, r2] 8001ae0: b29b uxth r3, r3 8001ae2: 001a movs r2, r3 8001ae4: 6d7b ldr r3, [r7, #84] @ 0x54 8001ae6: 781b ldrb r3, [r3, #0] 8001ae8: 00db lsls r3, r3, #3 8001aea: 18d2 adds r2, r2, r3 8001aec: 687b ldr r3, [r7, #4] 8001aee: 681b ldr r3, [r3, #0] 8001af0: 18d3 adds r3, r2, r3 8001af2: 4a2b ldr r2, [pc, #172] @ (8001ba0 ) 8001af4: 4694 mov ip, r2 8001af6: 4463 add r3, ip 8001af8: 881a ldrh r2, [r3, #0] 8001afa: 2140 movs r1, #64 @ 0x40 8001afc: 187b adds r3, r7, r1 8001afe: 0592 lsls r2, r2, #22 8001b00: 0d92 lsrs r2, r2, #22 8001b02: 801a strh r2, [r3, #0] if (ep->xfer_len > TxPctSize) 8001b04: 6d7b ldr r3, [r7, #84] @ 0x54 8001b06: 699a ldr r2, [r3, #24] 8001b08: 187b adds r3, r7, r1 8001b0a: 881b ldrh r3, [r3, #0] 8001b0c: 429a cmp r2, r3 8001b0e: d907 bls.n 8001b20 { ep->xfer_len -= TxPctSize; 8001b10: 6d7b ldr r3, [r7, #84] @ 0x54 8001b12: 699a ldr r2, [r3, #24] 8001b14: 187b adds r3, r7, r1 8001b16: 881b ldrh r3, [r3, #0] 8001b18: 1ad2 subs r2, r2, r3 8001b1a: 6d7b ldr r3, [r7, #84] @ 0x54 8001b1c: 619a str r2, [r3, #24] 8001b1e: e002 b.n 8001b26 } else { ep->xfer_len = 0U; 8001b20: 6d7b ldr r3, [r7, #84] @ 0x54 8001b22: 2200 movs r2, #0 8001b24: 619a str r2, [r3, #24] } /* Zero Length Packet? */ if (ep->xfer_len == 0U) 8001b26: 6d7b ldr r3, [r7, #84] @ 0x54 8001b28: 699b ldr r3, [r3, #24] 8001b2a: 2b00 cmp r3, #0 8001b2c: d107 bne.n 8001b3e { /* TX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataInStageCallback(hpcd, ep->num); #else HAL_PCD_DataInStageCallback(hpcd, ep->num); 8001b2e: 6d7b ldr r3, [r7, #84] @ 0x54 8001b30: 781a ldrb r2, [r3, #0] 8001b32: 687b ldr r3, [r7, #4] 8001b34: 0011 movs r1, r2 8001b36: 0018 movs r0, r3 8001b38: f005 f9c6 bl 8006ec8 8001b3c: e01e b.n 8001b7c #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } else { /* Transfer is not yet Done */ ep->xfer_buff += TxPctSize; 8001b3e: 6d7b ldr r3, [r7, #84] @ 0x54 8001b40: 695a ldr r2, [r3, #20] 8001b42: 2140 movs r1, #64 @ 0x40 8001b44: 187b adds r3, r7, r1 8001b46: 881b ldrh r3, [r3, #0] 8001b48: 18d2 adds r2, r2, r3 8001b4a: 6d7b ldr r3, [r7, #84] @ 0x54 8001b4c: 615a str r2, [r3, #20] ep->xfer_count += TxPctSize; 8001b4e: 6d7b ldr r3, [r7, #84] @ 0x54 8001b50: 69da ldr r2, [r3, #28] 8001b52: 187b adds r3, r7, r1 8001b54: 881b ldrh r3, [r3, #0] 8001b56: 18d2 adds r2, r2, r3 8001b58: 6d7b ldr r3, [r7, #84] @ 0x54 8001b5a: 61da str r2, [r3, #28] (void)USB_EPStartXfer(hpcd->Instance, ep); 8001b5c: 687b ldr r3, [r7, #4] 8001b5e: 681b ldr r3, [r3, #0] 8001b60: 6d7a ldr r2, [r7, #84] @ 0x54 8001b62: 0011 movs r1, r2 8001b64: 0018 movs r0, r3 8001b66: f002 f941 bl 8003dec 8001b6a: e007 b.n 8001b7c } #if (USE_USB_DOUBLE_BUFFER == 1U) /* Double Buffer bulk IN (bulk transfer Len > Ep_Mps) */ else { (void)HAL_PCD_EP_DB_Transmit(hpcd, ep, wEPVal); 8001b6c: 234c movs r3, #76 @ 0x4c 8001b6e: 18fb adds r3, r7, r3 8001b70: 881a ldrh r2, [r3, #0] 8001b72: 6d79 ldr r1, [r7, #84] @ 0x54 8001b74: 687b ldr r3, [r7, #4] 8001b76: 0018 movs r0, r3 8001b78: f000 f930 bl 8001ddc while ((hpcd->Instance->ISTR & USB_ISTR_CTR) != 0U) 8001b7c: 687b ldr r3, [r7, #4] 8001b7e: 681b ldr r3, [r3, #0] 8001b80: 2244 movs r2, #68 @ 0x44 8001b82: 5a9b ldrh r3, [r3, r2] 8001b84: b29b uxth r3, r3 8001b86: b21b sxth r3, r3 8001b88: 2b00 cmp r3, #0 8001b8a: da01 bge.n 8001b90 8001b8c: f7ff fc0c bl 80013a8 } } } } return HAL_OK; 8001b90: 2300 movs r3, #0 } 8001b92: 0018 movs r0, r3 8001b94: 46bd mov sp, r7 8001b96: b016 add sp, #88 @ 0x58 8001b98: bdb0 pop {r4, r5, r7, pc} 8001b9a: 46c0 nop @ (mov r8, r8) 8001b9c: 00000406 .word 0x00000406 8001ba0: 00000402 .word 0x00000402 08001ba4 : * @param wEPVal Last snapshot of EPRx register value taken in ISR * @retval HAL status */ static uint16_t HAL_PCD_EP_DB_Receive(PCD_HandleTypeDef *hpcd, PCD_EPTypeDef *ep, uint16_t wEPVal) { 8001ba4: b590 push {r4, r7, lr} 8001ba6: b089 sub sp, #36 @ 0x24 8001ba8: af00 add r7, sp, #0 8001baa: 60f8 str r0, [r7, #12] 8001bac: 60b9 str r1, [r7, #8] 8001bae: 1dbb adds r3, r7, #6 8001bb0: 801a strh r2, [r3, #0] uint16_t count; /* Manage Buffer0 OUT */ if ((wEPVal & USB_EP_DTOG_RX) != 0U) 8001bb2: 1dbb adds r3, r7, #6 8001bb4: 881a ldrh r2, [r3, #0] 8001bb6: 2380 movs r3, #128 @ 0x80 8001bb8: 01db lsls r3, r3, #7 8001bba: 4013 ands r3, r2 8001bbc: d100 bne.n 8001bc0 8001bbe: e07d b.n 8001cbc { /* Get count of received Data on buffer0 */ count = (uint16_t)PCD_GET_EP_DBUF0_CNT(hpcd->Instance, ep->num); 8001bc0: 68fb ldr r3, [r7, #12] 8001bc2: 681b ldr r3, [r3, #0] 8001bc4: 2250 movs r2, #80 @ 0x50 8001bc6: 5a9b ldrh r3, [r3, r2] 8001bc8: b29b uxth r3, r3 8001bca: 001a movs r2, r3 8001bcc: 68bb ldr r3, [r7, #8] 8001bce: 781b ldrb r3, [r3, #0] 8001bd0: 00db lsls r3, r3, #3 8001bd2: 18d2 adds r2, r2, r3 8001bd4: 68fb ldr r3, [r7, #12] 8001bd6: 681b ldr r3, [r3, #0] 8001bd8: 18d3 adds r3, r2, r3 8001bda: 4a7a ldr r2, [pc, #488] @ (8001dc4 ) 8001bdc: 4694 mov ip, r2 8001bde: 4463 add r3, ip 8001be0: 881a ldrh r2, [r3, #0] 8001be2: 211a movs r1, #26 8001be4: 187b adds r3, r7, r1 8001be6: 0592 lsls r2, r2, #22 8001be8: 0d92 lsrs r2, r2, #22 8001bea: 801a strh r2, [r3, #0] if (ep->xfer_len >= count) 8001bec: 68bb ldr r3, [r7, #8] 8001bee: 699a ldr r2, [r3, #24] 8001bf0: 187b adds r3, r7, r1 8001bf2: 881b ldrh r3, [r3, #0] 8001bf4: 429a cmp r2, r3 8001bf6: d307 bcc.n 8001c08 { ep->xfer_len -= count; 8001bf8: 68bb ldr r3, [r7, #8] 8001bfa: 699a ldr r2, [r3, #24] 8001bfc: 187b adds r3, r7, r1 8001bfe: 881b ldrh r3, [r3, #0] 8001c00: 1ad2 subs r2, r2, r3 8001c02: 68bb ldr r3, [r7, #8] 8001c04: 619a str r2, [r3, #24] 8001c06: e002 b.n 8001c0e } else { ep->xfer_len = 0U; 8001c08: 68bb ldr r3, [r7, #8] 8001c0a: 2200 movs r2, #0 8001c0c: 619a str r2, [r3, #24] } if (ep->xfer_len == 0U) 8001c0e: 68bb ldr r3, [r7, #8] 8001c10: 699b ldr r3, [r3, #24] 8001c12: 2b00 cmp r3, #0 8001c14: d121 bne.n 8001c5a { /* set NAK to OUT endpoint since double buffer is enabled */ PCD_SET_EP_RX_STATUS(hpcd->Instance, ep->num, USB_EP_RX_NAK); 8001c16: 68fb ldr r3, [r7, #12] 8001c18: 681b ldr r3, [r3, #0] 8001c1a: 001a movs r2, r3 8001c1c: 68bb ldr r3, [r7, #8] 8001c1e: 781b ldrb r3, [r3, #0] 8001c20: 009b lsls r3, r3, #2 8001c22: 18d3 adds r3, r2, r3 8001c24: 881b ldrh r3, [r3, #0] 8001c26: b29a uxth r2, r3 8001c28: 2018 movs r0, #24 8001c2a: 183b adds r3, r7, r0 8001c2c: 4966 ldr r1, [pc, #408] @ (8001dc8 ) 8001c2e: 400a ands r2, r1 8001c30: 801a strh r2, [r3, #0] 8001c32: 183b adds r3, r7, r0 8001c34: 183a adds r2, r7, r0 8001c36: 8812 ldrh r2, [r2, #0] 8001c38: 2180 movs r1, #128 @ 0x80 8001c3a: 0189 lsls r1, r1, #6 8001c3c: 404a eors r2, r1 8001c3e: 801a strh r2, [r3, #0] 8001c40: 68fb ldr r3, [r7, #12] 8001c42: 681b ldr r3, [r3, #0] 8001c44: 001a movs r2, r3 8001c46: 68bb ldr r3, [r7, #8] 8001c48: 781b ldrb r3, [r3, #0] 8001c4a: 009b lsls r3, r3, #2 8001c4c: 18d3 adds r3, r2, r3 8001c4e: 183a adds r2, r7, r0 8001c50: 8812 ldrh r2, [r2, #0] 8001c52: 495e ldr r1, [pc, #376] @ (8001dcc ) 8001c54: 430a orrs r2, r1 8001c56: b292 uxth r2, r2 8001c58: 801a strh r2, [r3, #0] } /* Check if Buffer1 is in blocked state which requires to toggle */ if ((wEPVal & USB_EP_DTOG_TX) != 0U) 8001c5a: 1dbb adds r3, r7, #6 8001c5c: 881b ldrh r3, [r3, #0] 8001c5e: 2240 movs r2, #64 @ 0x40 8001c60: 4013 ands r3, r2 8001c62: d01a beq.n 8001c9a { PCD_FREE_USER_BUFFER(hpcd->Instance, ep->num, 0U); 8001c64: 68fb ldr r3, [r7, #12] 8001c66: 681b ldr r3, [r3, #0] 8001c68: 001a movs r2, r3 8001c6a: 68bb ldr r3, [r7, #8] 8001c6c: 781b ldrb r3, [r3, #0] 8001c6e: 009b lsls r3, r3, #2 8001c70: 18d3 adds r3, r2, r3 8001c72: 881b ldrh r3, [r3, #0] 8001c74: b29a uxth r2, r3 8001c76: 2016 movs r0, #22 8001c78: 183b adds r3, r7, r0 8001c7a: 4955 ldr r1, [pc, #340] @ (8001dd0 ) 8001c7c: 400a ands r2, r1 8001c7e: 801a strh r2, [r3, #0] 8001c80: 68fb ldr r3, [r7, #12] 8001c82: 681b ldr r3, [r3, #0] 8001c84: 001a movs r2, r3 8001c86: 68bb ldr r3, [r7, #8] 8001c88: 781b ldrb r3, [r3, #0] 8001c8a: 009b lsls r3, r3, #2 8001c8c: 18d3 adds r3, r2, r3 8001c8e: 183a adds r2, r7, r0 8001c90: 8812 ldrh r2, [r2, #0] 8001c92: 4950 ldr r1, [pc, #320] @ (8001dd4 ) 8001c94: 430a orrs r2, r1 8001c96: b292 uxth r2, r2 8001c98: 801a strh r2, [r3, #0] } if (count != 0U) 8001c9a: 241a movs r4, #26 8001c9c: 193b adds r3, r7, r4 8001c9e: 881b ldrh r3, [r3, #0] 8001ca0: 2b00 cmp r3, #0 8001ca2: d100 bne.n 8001ca6 8001ca4: e086 b.n 8001db4 { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr0, count); 8001ca6: 68fb ldr r3, [r7, #12] 8001ca8: 6818 ldr r0, [r3, #0] 8001caa: 68bb ldr r3, [r7, #8] 8001cac: 6959 ldr r1, [r3, #20] 8001cae: 68bb ldr r3, [r7, #8] 8001cb0: 891a ldrh r2, [r3, #8] 8001cb2: 193b adds r3, r7, r4 8001cb4: 881b ldrh r3, [r3, #0] 8001cb6: f003 fb4d bl 8005354 8001cba: e07b b.n 8001db4 } /* Manage Buffer 1 DTOG_RX=0 */ else { /* Get count of received data */ count = (uint16_t)PCD_GET_EP_DBUF1_CNT(hpcd->Instance, ep->num); 8001cbc: 68fb ldr r3, [r7, #12] 8001cbe: 681b ldr r3, [r3, #0] 8001cc0: 2250 movs r2, #80 @ 0x50 8001cc2: 5a9b ldrh r3, [r3, r2] 8001cc4: b29b uxth r3, r3 8001cc6: 001a movs r2, r3 8001cc8: 68bb ldr r3, [r7, #8] 8001cca: 781b ldrb r3, [r3, #0] 8001ccc: 00db lsls r3, r3, #3 8001cce: 18d2 adds r2, r2, r3 8001cd0: 68fb ldr r3, [r7, #12] 8001cd2: 681b ldr r3, [r3, #0] 8001cd4: 18d3 adds r3, r2, r3 8001cd6: 4a40 ldr r2, [pc, #256] @ (8001dd8 ) 8001cd8: 4694 mov ip, r2 8001cda: 4463 add r3, ip 8001cdc: 881a ldrh r2, [r3, #0] 8001cde: 211a movs r1, #26 8001ce0: 187b adds r3, r7, r1 8001ce2: 0592 lsls r2, r2, #22 8001ce4: 0d92 lsrs r2, r2, #22 8001ce6: 801a strh r2, [r3, #0] if (ep->xfer_len >= count) 8001ce8: 68bb ldr r3, [r7, #8] 8001cea: 699a ldr r2, [r3, #24] 8001cec: 187b adds r3, r7, r1 8001cee: 881b ldrh r3, [r3, #0] 8001cf0: 429a cmp r2, r3 8001cf2: d307 bcc.n 8001d04 { ep->xfer_len -= count; 8001cf4: 68bb ldr r3, [r7, #8] 8001cf6: 699a ldr r2, [r3, #24] 8001cf8: 187b adds r3, r7, r1 8001cfa: 881b ldrh r3, [r3, #0] 8001cfc: 1ad2 subs r2, r2, r3 8001cfe: 68bb ldr r3, [r7, #8] 8001d00: 619a str r2, [r3, #24] 8001d02: e002 b.n 8001d0a } else { ep->xfer_len = 0U; 8001d04: 68bb ldr r3, [r7, #8] 8001d06: 2200 movs r2, #0 8001d08: 619a str r2, [r3, #24] } if (ep->xfer_len == 0U) 8001d0a: 68bb ldr r3, [r7, #8] 8001d0c: 699b ldr r3, [r3, #24] 8001d0e: 2b00 cmp r3, #0 8001d10: d121 bne.n 8001d56 { /* set NAK on the current endpoint */ PCD_SET_EP_RX_STATUS(hpcd->Instance, ep->num, USB_EP_RX_NAK); 8001d12: 68fb ldr r3, [r7, #12] 8001d14: 681b ldr r3, [r3, #0] 8001d16: 001a movs r2, r3 8001d18: 68bb ldr r3, [r7, #8] 8001d1a: 781b ldrb r3, [r3, #0] 8001d1c: 009b lsls r3, r3, #2 8001d1e: 18d3 adds r3, r2, r3 8001d20: 881b ldrh r3, [r3, #0] 8001d22: b29a uxth r2, r3 8001d24: 201e movs r0, #30 8001d26: 183b adds r3, r7, r0 8001d28: 4927 ldr r1, [pc, #156] @ (8001dc8 ) 8001d2a: 400a ands r2, r1 8001d2c: 801a strh r2, [r3, #0] 8001d2e: 183b adds r3, r7, r0 8001d30: 183a adds r2, r7, r0 8001d32: 8812 ldrh r2, [r2, #0] 8001d34: 2180 movs r1, #128 @ 0x80 8001d36: 0189 lsls r1, r1, #6 8001d38: 404a eors r2, r1 8001d3a: 801a strh r2, [r3, #0] 8001d3c: 68fb ldr r3, [r7, #12] 8001d3e: 681b ldr r3, [r3, #0] 8001d40: 001a movs r2, r3 8001d42: 68bb ldr r3, [r7, #8] 8001d44: 781b ldrb r3, [r3, #0] 8001d46: 009b lsls r3, r3, #2 8001d48: 18d3 adds r3, r2, r3 8001d4a: 183a adds r2, r7, r0 8001d4c: 8812 ldrh r2, [r2, #0] 8001d4e: 491f ldr r1, [pc, #124] @ (8001dcc ) 8001d50: 430a orrs r2, r1 8001d52: b292 uxth r2, r2 8001d54: 801a strh r2, [r3, #0] } /*Need to FreeUser Buffer*/ if ((wEPVal & USB_EP_DTOG_TX) == 0U) 8001d56: 1dbb adds r3, r7, #6 8001d58: 881b ldrh r3, [r3, #0] 8001d5a: 2240 movs r2, #64 @ 0x40 8001d5c: 4013 ands r3, r2 8001d5e: d11a bne.n 8001d96 { PCD_FREE_USER_BUFFER(hpcd->Instance, ep->num, 0U); 8001d60: 68fb ldr r3, [r7, #12] 8001d62: 681b ldr r3, [r3, #0] 8001d64: 001a movs r2, r3 8001d66: 68bb ldr r3, [r7, #8] 8001d68: 781b ldrb r3, [r3, #0] 8001d6a: 009b lsls r3, r3, #2 8001d6c: 18d3 adds r3, r2, r3 8001d6e: 881b ldrh r3, [r3, #0] 8001d70: b29a uxth r2, r3 8001d72: 201c movs r0, #28 8001d74: 183b adds r3, r7, r0 8001d76: 4916 ldr r1, [pc, #88] @ (8001dd0 ) 8001d78: 400a ands r2, r1 8001d7a: 801a strh r2, [r3, #0] 8001d7c: 68fb ldr r3, [r7, #12] 8001d7e: 681b ldr r3, [r3, #0] 8001d80: 001a movs r2, r3 8001d82: 68bb ldr r3, [r7, #8] 8001d84: 781b ldrb r3, [r3, #0] 8001d86: 009b lsls r3, r3, #2 8001d88: 18d3 adds r3, r2, r3 8001d8a: 183a adds r2, r7, r0 8001d8c: 8812 ldrh r2, [r2, #0] 8001d8e: 4911 ldr r1, [pc, #68] @ (8001dd4 ) 8001d90: 430a orrs r2, r1 8001d92: b292 uxth r2, r2 8001d94: 801a strh r2, [r3, #0] } if (count != 0U) 8001d96: 241a movs r4, #26 8001d98: 193b adds r3, r7, r4 8001d9a: 881b ldrh r3, [r3, #0] 8001d9c: 2b00 cmp r3, #0 8001d9e: d009 beq.n 8001db4 { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr1, count); 8001da0: 68fb ldr r3, [r7, #12] 8001da2: 6818 ldr r0, [r3, #0] 8001da4: 68bb ldr r3, [r7, #8] 8001da6: 6959 ldr r1, [r3, #20] 8001da8: 68bb ldr r3, [r7, #8] 8001daa: 895a ldrh r2, [r3, #10] 8001dac: 193b adds r3, r7, r4 8001dae: 881b ldrh r3, [r3, #0] 8001db0: f003 fad0 bl 8005354 } } return count; 8001db4: 231a movs r3, #26 8001db6: 18fb adds r3, r7, r3 8001db8: 881b ldrh r3, [r3, #0] } 8001dba: 0018 movs r0, r3 8001dbc: 46bd mov sp, r7 8001dbe: b009 add sp, #36 @ 0x24 8001dc0: bd90 pop {r4, r7, pc} 8001dc2: 46c0 nop @ (mov r8, r8) 8001dc4: 00000402 .word 0x00000402 8001dc8: ffffbf8f .word 0xffffbf8f 8001dcc: ffff8080 .word 0xffff8080 8001dd0: ffff8f8f .word 0xffff8f8f 8001dd4: ffff80c0 .word 0xffff80c0 8001dd8: 00000406 .word 0x00000406 08001ddc : * @param wEPVal Last snapshot of EPRx register value taken in ISR * @retval HAL status */ static HAL_StatusTypeDef HAL_PCD_EP_DB_Transmit(PCD_HandleTypeDef *hpcd, PCD_EPTypeDef *ep, uint16_t wEPVal) { 8001ddc: b580 push {r7, lr} 8001dde: b0a4 sub sp, #144 @ 0x90 8001de0: af00 add r7, sp, #0 8001de2: 60f8 str r0, [r7, #12] 8001de4: 60b9 str r1, [r7, #8] 8001de6: 1dbb adds r3, r7, #6 8001de8: 801a strh r2, [r3, #0] uint32_t len; uint16_t TxPctSize; /* Data Buffer0 ACK received */ if ((wEPVal & USB_EP_DTOG_TX) != 0U) 8001dea: 1dbb adds r3, r7, #6 8001dec: 881b ldrh r3, [r3, #0] 8001dee: 2240 movs r2, #64 @ 0x40 8001df0: 4013 ands r3, r2 8001df2: d100 bne.n 8001df6 8001df4: e1e4 b.n 80021c0 { /* multi-packet on the NON control IN endpoint */ TxPctSize = (uint16_t)PCD_GET_EP_DBUF0_CNT(hpcd->Instance, ep->num); 8001df6: 68fb ldr r3, [r7, #12] 8001df8: 681b ldr r3, [r3, #0] 8001dfa: 2250 movs r2, #80 @ 0x50 8001dfc: 5a9b ldrh r3, [r3, r2] 8001dfe: b29b uxth r3, r3 8001e00: 001a movs r2, r3 8001e02: 68bb ldr r3, [r7, #8] 8001e04: 781b ldrb r3, [r3, #0] 8001e06: 00db lsls r3, r3, #3 8001e08: 18d2 adds r2, r2, r3 8001e0a: 68fb ldr r3, [r7, #12] 8001e0c: 681b ldr r3, [r3, #0] 8001e0e: 18d3 adds r3, r2, r3 8001e10: 4ad0 ldr r2, [pc, #832] @ (8002154 ) 8001e12: 4694 mov ip, r2 8001e14: 4463 add r3, ip 8001e16: 881a ldrh r2, [r3, #0] 8001e18: 2188 movs r1, #136 @ 0x88 8001e1a: 187b adds r3, r7, r1 8001e1c: 0592 lsls r2, r2, #22 8001e1e: 0d92 lsrs r2, r2, #22 8001e20: 801a strh r2, [r3, #0] if (ep->xfer_len > TxPctSize) 8001e22: 68bb ldr r3, [r7, #8] 8001e24: 699a ldr r2, [r3, #24] 8001e26: 187b adds r3, r7, r1 8001e28: 881b ldrh r3, [r3, #0] 8001e2a: 429a cmp r2, r3 8001e2c: d907 bls.n 8001e3e { ep->xfer_len -= TxPctSize; 8001e2e: 68bb ldr r3, [r7, #8] 8001e30: 699a ldr r2, [r3, #24] 8001e32: 187b adds r3, r7, r1 8001e34: 881b ldrh r3, [r3, #0] 8001e36: 1ad2 subs r2, r2, r3 8001e38: 68bb ldr r3, [r7, #8] 8001e3a: 619a str r2, [r3, #24] 8001e3c: e002 b.n 8001e44 } else { ep->xfer_len = 0U; 8001e3e: 68bb ldr r3, [r7, #8] 8001e40: 2200 movs r2, #0 8001e42: 619a str r2, [r3, #24] } /* Transfer is completed */ if (ep->xfer_len == 0U) 8001e44: 68bb ldr r3, [r7, #8] 8001e46: 699b ldr r3, [r3, #24] 8001e48: 2b00 cmp r3, #0 8001e4a: d000 beq.n 8001e4e 8001e4c: e0b5 b.n 8001fba { PCD_SET_EP_DBUF0_CNT(hpcd->Instance, ep->num, ep->is_in, 0U); 8001e4e: 68bb ldr r3, [r7, #8] 8001e50: 785b ldrb r3, [r3, #1] 8001e52: 2b00 cmp r3, #0 8001e54: d125 bne.n 8001ea2 8001e56: 68fb ldr r3, [r7, #12] 8001e58: 681b ldr r3, [r3, #0] 8001e5a: 62fb str r3, [r7, #44] @ 0x2c 8001e5c: 68fb ldr r3, [r7, #12] 8001e5e: 681b ldr r3, [r3, #0] 8001e60: 2250 movs r2, #80 @ 0x50 8001e62: 5a9b ldrh r3, [r3, r2] 8001e64: b29b uxth r3, r3 8001e66: 001a movs r2, r3 8001e68: 6afb ldr r3, [r7, #44] @ 0x2c 8001e6a: 189b adds r3, r3, r2 8001e6c: 62fb str r3, [r7, #44] @ 0x2c 8001e6e: 68bb ldr r3, [r7, #8] 8001e70: 781b ldrb r3, [r3, #0] 8001e72: 00da lsls r2, r3, #3 8001e74: 6afb ldr r3, [r7, #44] @ 0x2c 8001e76: 18d3 adds r3, r2, r3 8001e78: 4ab6 ldr r2, [pc, #728] @ (8002154 ) 8001e7a: 4694 mov ip, r2 8001e7c: 4463 add r3, ip 8001e7e: 62bb str r3, [r7, #40] @ 0x28 8001e80: 6abb ldr r3, [r7, #40] @ 0x28 8001e82: 881b ldrh r3, [r3, #0] 8001e84: b29b uxth r3, r3 8001e86: 059b lsls r3, r3, #22 8001e88: 0d9b lsrs r3, r3, #22 8001e8a: b29a uxth r2, r3 8001e8c: 6abb ldr r3, [r7, #40] @ 0x28 8001e8e: 801a strh r2, [r3, #0] 8001e90: 6abb ldr r3, [r7, #40] @ 0x28 8001e92: 881b ldrh r3, [r3, #0] 8001e94: b29b uxth r3, r3 8001e96: 4ab0 ldr r2, [pc, #704] @ (8002158 ) 8001e98: 4313 orrs r3, r2 8001e9a: b29a uxth r2, r3 8001e9c: 6abb ldr r3, [r7, #40] @ 0x28 8001e9e: 801a strh r2, [r3, #0] 8001ea0: e01b b.n 8001eda 8001ea2: 68bb ldr r3, [r7, #8] 8001ea4: 785b ldrb r3, [r3, #1] 8001ea6: 2b01 cmp r3, #1 8001ea8: d117 bne.n 8001eda 8001eaa: 68fb ldr r3, [r7, #12] 8001eac: 681b ldr r3, [r3, #0] 8001eae: 637b str r3, [r7, #52] @ 0x34 8001eb0: 68fb ldr r3, [r7, #12] 8001eb2: 681b ldr r3, [r3, #0] 8001eb4: 2250 movs r2, #80 @ 0x50 8001eb6: 5a9b ldrh r3, [r3, r2] 8001eb8: b29b uxth r3, r3 8001eba: 001a movs r2, r3 8001ebc: 6b7b ldr r3, [r7, #52] @ 0x34 8001ebe: 189b adds r3, r3, r2 8001ec0: 637b str r3, [r7, #52] @ 0x34 8001ec2: 68bb ldr r3, [r7, #8] 8001ec4: 781b ldrb r3, [r3, #0] 8001ec6: 00da lsls r2, r3, #3 8001ec8: 6b7b ldr r3, [r7, #52] @ 0x34 8001eca: 18d3 adds r3, r2, r3 8001ecc: 4aa1 ldr r2, [pc, #644] @ (8002154 ) 8001ece: 4694 mov ip, r2 8001ed0: 4463 add r3, ip 8001ed2: 633b str r3, [r7, #48] @ 0x30 8001ed4: 6b3b ldr r3, [r7, #48] @ 0x30 8001ed6: 2200 movs r2, #0 8001ed8: 801a strh r2, [r3, #0] PCD_SET_EP_DBUF1_CNT(hpcd->Instance, ep->num, ep->is_in, 0U); 8001eda: 68fb ldr r3, [r7, #12] 8001edc: 681b ldr r3, [r3, #0] 8001ede: 627b str r3, [r7, #36] @ 0x24 8001ee0: 68bb ldr r3, [r7, #8] 8001ee2: 785b ldrb r3, [r3, #1] 8001ee4: 2b00 cmp r3, #0 8001ee6: d125 bne.n 8001f34 8001ee8: 68fb ldr r3, [r7, #12] 8001eea: 681b ldr r3, [r3, #0] 8001eec: 61fb str r3, [r7, #28] 8001eee: 68fb ldr r3, [r7, #12] 8001ef0: 681b ldr r3, [r3, #0] 8001ef2: 2250 movs r2, #80 @ 0x50 8001ef4: 5a9b ldrh r3, [r3, r2] 8001ef6: b29b uxth r3, r3 8001ef8: 001a movs r2, r3 8001efa: 69fb ldr r3, [r7, #28] 8001efc: 189b adds r3, r3, r2 8001efe: 61fb str r3, [r7, #28] 8001f00: 68bb ldr r3, [r7, #8] 8001f02: 781b ldrb r3, [r3, #0] 8001f04: 00da lsls r2, r3, #3 8001f06: 69fb ldr r3, [r7, #28] 8001f08: 18d3 adds r3, r2, r3 8001f0a: 4a94 ldr r2, [pc, #592] @ (800215c ) 8001f0c: 4694 mov ip, r2 8001f0e: 4463 add r3, ip 8001f10: 61bb str r3, [r7, #24] 8001f12: 69bb ldr r3, [r7, #24] 8001f14: 881b ldrh r3, [r3, #0] 8001f16: b29b uxth r3, r3 8001f18: 059b lsls r3, r3, #22 8001f1a: 0d9b lsrs r3, r3, #22 8001f1c: b29a uxth r2, r3 8001f1e: 69bb ldr r3, [r7, #24] 8001f20: 801a strh r2, [r3, #0] 8001f22: 69bb ldr r3, [r7, #24] 8001f24: 881b ldrh r3, [r3, #0] 8001f26: b29b uxth r3, r3 8001f28: 4a8b ldr r2, [pc, #556] @ (8002158 ) 8001f2a: 4313 orrs r3, r2 8001f2c: b29a uxth r2, r3 8001f2e: 69bb ldr r3, [r7, #24] 8001f30: 801a strh r2, [r3, #0] 8001f32: e018 b.n 8001f66 8001f34: 68bb ldr r3, [r7, #8] 8001f36: 785b ldrb r3, [r3, #1] 8001f38: 2b01 cmp r3, #1 8001f3a: d114 bne.n 8001f66 8001f3c: 68fb ldr r3, [r7, #12] 8001f3e: 681b ldr r3, [r3, #0] 8001f40: 2250 movs r2, #80 @ 0x50 8001f42: 5a9b ldrh r3, [r3, r2] 8001f44: b29b uxth r3, r3 8001f46: 001a movs r2, r3 8001f48: 6a7b ldr r3, [r7, #36] @ 0x24 8001f4a: 189b adds r3, r3, r2 8001f4c: 627b str r3, [r7, #36] @ 0x24 8001f4e: 68bb ldr r3, [r7, #8] 8001f50: 781b ldrb r3, [r3, #0] 8001f52: 00da lsls r2, r3, #3 8001f54: 6a7b ldr r3, [r7, #36] @ 0x24 8001f56: 18d3 adds r3, r2, r3 8001f58: 4a80 ldr r2, [pc, #512] @ (800215c ) 8001f5a: 4694 mov ip, r2 8001f5c: 4463 add r3, ip 8001f5e: 623b str r3, [r7, #32] 8001f60: 6a3b ldr r3, [r7, #32] 8001f62: 2200 movs r2, #0 8001f64: 801a strh r2, [r3, #0] /* TX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataInStageCallback(hpcd, ep->num); #else HAL_PCD_DataInStageCallback(hpcd, ep->num); 8001f66: 68bb ldr r3, [r7, #8] 8001f68: 781a ldrb r2, [r3, #0] 8001f6a: 68fb ldr r3, [r7, #12] 8001f6c: 0011 movs r1, r2 8001f6e: 0018 movs r0, r3 8001f70: f004 ffaa bl 8006ec8 #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ if ((wEPVal & USB_EP_DTOG_RX) != 0U) 8001f74: 1dbb adds r3, r7, #6 8001f76: 881a ldrh r2, [r3, #0] 8001f78: 2380 movs r3, #128 @ 0x80 8001f7a: 01db lsls r3, r3, #7 8001f7c: 4013 ands r3, r2 8001f7e: d100 bne.n 8001f82 8001f80: e308 b.n 8002594 { PCD_FREE_USER_BUFFER(hpcd->Instance, ep->num, 1U); 8001f82: 68fb ldr r3, [r7, #12] 8001f84: 681b ldr r3, [r3, #0] 8001f86: 001a movs r2, r3 8001f88: 68bb ldr r3, [r7, #8] 8001f8a: 781b ldrb r3, [r3, #0] 8001f8c: 009b lsls r3, r3, #2 8001f8e: 18d3 adds r3, r2, r3 8001f90: 881b ldrh r3, [r3, #0] 8001f92: b29a uxth r2, r3 8001f94: 2016 movs r0, #22 8001f96: 183b adds r3, r7, r0 8001f98: 4971 ldr r1, [pc, #452] @ (8002160 ) 8001f9a: 400a ands r2, r1 8001f9c: 801a strh r2, [r3, #0] 8001f9e: 68fb ldr r3, [r7, #12] 8001fa0: 681b ldr r3, [r3, #0] 8001fa2: 001a movs r2, r3 8001fa4: 68bb ldr r3, [r7, #8] 8001fa6: 781b ldrb r3, [r3, #0] 8001fa8: 009b lsls r3, r3, #2 8001faa: 18d3 adds r3, r2, r3 8001fac: 183a adds r2, r7, r0 8001fae: 8812 ldrh r2, [r2, #0] 8001fb0: 496c ldr r1, [pc, #432] @ (8002164 ) 8001fb2: 430a orrs r2, r1 8001fb4: b292 uxth r2, r2 8001fb6: 801a strh r2, [r3, #0] 8001fb8: e2ec b.n 8002594 } } else /* Transfer is not yet Done */ { /* need to Free USB Buff */ if ((wEPVal & USB_EP_DTOG_RX) != 0U) 8001fba: 1dbb adds r3, r7, #6 8001fbc: 881a ldrh r2, [r3, #0] 8001fbe: 2380 movs r3, #128 @ 0x80 8001fc0: 01db lsls r3, r3, #7 8001fc2: 4013 ands r3, r2 8001fc4: d01a beq.n 8001ffc { PCD_FREE_USER_BUFFER(hpcd->Instance, ep->num, 1U); 8001fc6: 68fb ldr r3, [r7, #12] 8001fc8: 681b ldr r3, [r3, #0] 8001fca: 001a movs r2, r3 8001fcc: 68bb ldr r3, [r7, #8] 8001fce: 781b ldrb r3, [r3, #0] 8001fd0: 009b lsls r3, r3, #2 8001fd2: 18d3 adds r3, r2, r3 8001fd4: 881b ldrh r3, [r3, #0] 8001fd6: b29a uxth r2, r3 8001fd8: 208a movs r0, #138 @ 0x8a 8001fda: 183b adds r3, r7, r0 8001fdc: 4960 ldr r1, [pc, #384] @ (8002160 ) 8001fde: 400a ands r2, r1 8001fe0: 801a strh r2, [r3, #0] 8001fe2: 68fb ldr r3, [r7, #12] 8001fe4: 681b ldr r3, [r3, #0] 8001fe6: 001a movs r2, r3 8001fe8: 68bb ldr r3, [r7, #8] 8001fea: 781b ldrb r3, [r3, #0] 8001fec: 009b lsls r3, r3, #2 8001fee: 18d3 adds r3, r2, r3 8001ff0: 183a adds r2, r7, r0 8001ff2: 8812 ldrh r2, [r2, #0] 8001ff4: 495b ldr r1, [pc, #364] @ (8002164 ) 8001ff6: 430a orrs r2, r1 8001ff8: b292 uxth r2, r2 8001ffa: 801a strh r2, [r3, #0] } /* Still there is data to Fill in the next Buffer */ if (ep->xfer_fill_db == 1U) 8001ffc: 68bb ldr r3, [r7, #8] 8001ffe: 2224 movs r2, #36 @ 0x24 8002000: 5c9b ldrb r3, [r3, r2] 8002002: 2b01 cmp r3, #1 8002004: d000 beq.n 8002008 8002006: e2c5 b.n 8002594 { ep->xfer_buff += TxPctSize; 8002008: 68bb ldr r3, [r7, #8] 800200a: 695a ldr r2, [r3, #20] 800200c: 2188 movs r1, #136 @ 0x88 800200e: 187b adds r3, r7, r1 8002010: 881b ldrh r3, [r3, #0] 8002012: 18d2 adds r2, r2, r3 8002014: 68bb ldr r3, [r7, #8] 8002016: 615a str r2, [r3, #20] ep->xfer_count += TxPctSize; 8002018: 68bb ldr r3, [r7, #8] 800201a: 69da ldr r2, [r3, #28] 800201c: 187b adds r3, r7, r1 800201e: 881b ldrh r3, [r3, #0] 8002020: 18d2 adds r2, r2, r3 8002022: 68bb ldr r3, [r7, #8] 8002024: 61da str r2, [r3, #28] /* Calculate the len of the new buffer to fill */ if (ep->xfer_len_db >= ep->maxpacket) 8002026: 68bb ldr r3, [r7, #8] 8002028: 6a1a ldr r2, [r3, #32] 800202a: 68bb ldr r3, [r7, #8] 800202c: 691b ldr r3, [r3, #16] 800202e: 429a cmp r2, r3 8002030: d30c bcc.n 800204c { len = ep->maxpacket; 8002032: 68bb ldr r3, [r7, #8] 8002034: 691b ldr r3, [r3, #16] 8002036: 218c movs r1, #140 @ 0x8c 8002038: 187a adds r2, r7, r1 800203a: 6013 str r3, [r2, #0] ep->xfer_len_db -= len; 800203c: 68bb ldr r3, [r7, #8] 800203e: 6a1a ldr r2, [r3, #32] 8002040: 187b adds r3, r7, r1 8002042: 681b ldr r3, [r3, #0] 8002044: 1ad2 subs r2, r2, r3 8002046: 68bb ldr r3, [r7, #8] 8002048: 621a str r2, [r3, #32] 800204a: e01a b.n 8002082 } else if (ep->xfer_len_db == 0U) 800204c: 68bb ldr r3, [r7, #8] 800204e: 6a1b ldr r3, [r3, #32] 8002050: 2b00 cmp r3, #0 8002052: d10a bne.n 800206a { len = TxPctSize; 8002054: 2388 movs r3, #136 @ 0x88 8002056: 18fb adds r3, r7, r3 8002058: 881b ldrh r3, [r3, #0] 800205a: 228c movs r2, #140 @ 0x8c 800205c: 18ba adds r2, r7, r2 800205e: 6013 str r3, [r2, #0] ep->xfer_fill_db = 0U; 8002060: 68bb ldr r3, [r7, #8] 8002062: 2224 movs r2, #36 @ 0x24 8002064: 2100 movs r1, #0 8002066: 5499 strb r1, [r3, r2] 8002068: e00b b.n 8002082 } else { ep->xfer_fill_db = 0U; 800206a: 68bb ldr r3, [r7, #8] 800206c: 2224 movs r2, #36 @ 0x24 800206e: 2100 movs r1, #0 8002070: 5499 strb r1, [r3, r2] len = ep->xfer_len_db; 8002072: 68bb ldr r3, [r7, #8] 8002074: 6a1b ldr r3, [r3, #32] 8002076: 228c movs r2, #140 @ 0x8c 8002078: 18ba adds r2, r7, r2 800207a: 6013 str r3, [r2, #0] ep->xfer_len_db = 0U; 800207c: 68bb ldr r3, [r7, #8] 800207e: 2200 movs r2, #0 8002080: 621a str r2, [r3, #32] } /* Write remaining Data to Buffer */ /* Set the Double buffer counter for pma buffer1 */ PCD_SET_EP_DBUF0_CNT(hpcd->Instance, ep->num, ep->is_in, len); 8002082: 68bb ldr r3, [r7, #8] 8002084: 785b ldrb r3, [r3, #1] 8002086: 2b00 cmp r3, #0 8002088: d000 beq.n 800208c 800208a: e06d b.n 8002168 800208c: 68fb ldr r3, [r7, #12] 800208e: 681b ldr r3, [r3, #0] 8002090: 63fb str r3, [r7, #60] @ 0x3c 8002092: 68fb ldr r3, [r7, #12] 8002094: 681b ldr r3, [r3, #0] 8002096: 2250 movs r2, #80 @ 0x50 8002098: 5a9b ldrh r3, [r3, r2] 800209a: b29b uxth r3, r3 800209c: 001a movs r2, r3 800209e: 6bfb ldr r3, [r7, #60] @ 0x3c 80020a0: 189b adds r3, r3, r2 80020a2: 63fb str r3, [r7, #60] @ 0x3c 80020a4: 68bb ldr r3, [r7, #8] 80020a6: 781b ldrb r3, [r3, #0] 80020a8: 00da lsls r2, r3, #3 80020aa: 6bfb ldr r3, [r7, #60] @ 0x3c 80020ac: 18d3 adds r3, r2, r3 80020ae: 4a29 ldr r2, [pc, #164] @ (8002154 ) 80020b0: 4694 mov ip, r2 80020b2: 4463 add r3, ip 80020b4: 63bb str r3, [r7, #56] @ 0x38 80020b6: 6bbb ldr r3, [r7, #56] @ 0x38 80020b8: 881b ldrh r3, [r3, #0] 80020ba: b29b uxth r3, r3 80020bc: 059b lsls r3, r3, #22 80020be: 0d9b lsrs r3, r3, #22 80020c0: b29a uxth r2, r3 80020c2: 6bbb ldr r3, [r7, #56] @ 0x38 80020c4: 801a strh r2, [r3, #0] 80020c6: 238c movs r3, #140 @ 0x8c 80020c8: 18fb adds r3, r7, r3 80020ca: 681b ldr r3, [r3, #0] 80020cc: 2b00 cmp r3, #0 80020ce: d108 bne.n 80020e2 80020d0: 6bbb ldr r3, [r7, #56] @ 0x38 80020d2: 881b ldrh r3, [r3, #0] 80020d4: b29b uxth r3, r3 80020d6: 4a20 ldr r2, [pc, #128] @ (8002158 ) 80020d8: 4313 orrs r3, r2 80020da: b29a uxth r2, r3 80020dc: 6bbb ldr r3, [r7, #56] @ 0x38 80020de: 801a strh r2, [r3, #0] 80020e0: e061 b.n 80021a6 80020e2: 228c movs r2, #140 @ 0x8c 80020e4: 18bb adds r3, r7, r2 80020e6: 681b ldr r3, [r3, #0] 80020e8: 2b3e cmp r3, #62 @ 0x3e 80020ea: d817 bhi.n 800211c 80020ec: 18bb adds r3, r7, r2 80020ee: 681b ldr r3, [r3, #0] 80020f0: 085b lsrs r3, r3, #1 80020f2: 64bb str r3, [r7, #72] @ 0x48 80020f4: 18bb adds r3, r7, r2 80020f6: 681b ldr r3, [r3, #0] 80020f8: 2201 movs r2, #1 80020fa: 4013 ands r3, r2 80020fc: d002 beq.n 8002104 80020fe: 6cbb ldr r3, [r7, #72] @ 0x48 8002100: 3301 adds r3, #1 8002102: 64bb str r3, [r7, #72] @ 0x48 8002104: 6bbb ldr r3, [r7, #56] @ 0x38 8002106: 881b ldrh r3, [r3, #0] 8002108: b29a uxth r2, r3 800210a: 6cbb ldr r3, [r7, #72] @ 0x48 800210c: b29b uxth r3, r3 800210e: 029b lsls r3, r3, #10 8002110: b29b uxth r3, r3 8002112: 4313 orrs r3, r2 8002114: b29a uxth r2, r3 8002116: 6bbb ldr r3, [r7, #56] @ 0x38 8002118: 801a strh r2, [r3, #0] 800211a: e044 b.n 80021a6 800211c: 228c movs r2, #140 @ 0x8c 800211e: 18bb adds r3, r7, r2 8002120: 681b ldr r3, [r3, #0] 8002122: 095b lsrs r3, r3, #5 8002124: 64bb str r3, [r7, #72] @ 0x48 8002126: 18bb adds r3, r7, r2 8002128: 681b ldr r3, [r3, #0] 800212a: 221f movs r2, #31 800212c: 4013 ands r3, r2 800212e: d102 bne.n 8002136 8002130: 6cbb ldr r3, [r7, #72] @ 0x48 8002132: 3b01 subs r3, #1 8002134: 64bb str r3, [r7, #72] @ 0x48 8002136: 6bbb ldr r3, [r7, #56] @ 0x38 8002138: 881b ldrh r3, [r3, #0] 800213a: b29a uxth r2, r3 800213c: 6cbb ldr r3, [r7, #72] @ 0x48 800213e: b29b uxth r3, r3 8002140: 029b lsls r3, r3, #10 8002142: b29b uxth r3, r3 8002144: 4313 orrs r3, r2 8002146: b29b uxth r3, r3 8002148: 4a03 ldr r2, [pc, #12] @ (8002158 ) 800214a: 4313 orrs r3, r2 800214c: b29a uxth r2, r3 800214e: 6bbb ldr r3, [r7, #56] @ 0x38 8002150: 801a strh r2, [r3, #0] 8002152: e028 b.n 80021a6 8002154: 00000402 .word 0x00000402 8002158: ffff8000 .word 0xffff8000 800215c: 00000406 .word 0x00000406 8002160: ffff8f8f .word 0xffff8f8f 8002164: ffffc080 .word 0xffffc080 8002168: 68bb ldr r3, [r7, #8] 800216a: 785b ldrb r3, [r3, #1] 800216c: 2b01 cmp r3, #1 800216e: d11a bne.n 80021a6 8002170: 68fb ldr r3, [r7, #12] 8002172: 681b ldr r3, [r3, #0] 8002174: 647b str r3, [r7, #68] @ 0x44 8002176: 68fb ldr r3, [r7, #12] 8002178: 681b ldr r3, [r3, #0] 800217a: 2250 movs r2, #80 @ 0x50 800217c: 5a9b ldrh r3, [r3, r2] 800217e: b29b uxth r3, r3 8002180: 001a movs r2, r3 8002182: 6c7b ldr r3, [r7, #68] @ 0x44 8002184: 189b adds r3, r3, r2 8002186: 647b str r3, [r7, #68] @ 0x44 8002188: 68bb ldr r3, [r7, #8] 800218a: 781b ldrb r3, [r3, #0] 800218c: 00da lsls r2, r3, #3 800218e: 6c7b ldr r3, [r7, #68] @ 0x44 8002190: 18d3 adds r3, r2, r3 8002192: 4ad9 ldr r2, [pc, #868] @ (80024f8 ) 8002194: 4694 mov ip, r2 8002196: 4463 add r3, ip 8002198: 643b str r3, [r7, #64] @ 0x40 800219a: 238c movs r3, #140 @ 0x8c 800219c: 18fb adds r3, r7, r3 800219e: 681b ldr r3, [r3, #0] 80021a0: b29a uxth r2, r3 80021a2: 6c3b ldr r3, [r7, #64] @ 0x40 80021a4: 801a strh r2, [r3, #0] /* Copy user buffer to USB PMA */ USB_WritePMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr0, (uint16_t)len); 80021a6: 68fb ldr r3, [r7, #12] 80021a8: 6818 ldr r0, [r3, #0] 80021aa: 68bb ldr r3, [r7, #8] 80021ac: 6959 ldr r1, [r3, #20] 80021ae: 68bb ldr r3, [r7, #8] 80021b0: 891a ldrh r2, [r3, #8] 80021b2: 238c movs r3, #140 @ 0x8c 80021b4: 18fb adds r3, r7, r3 80021b6: 681b ldr r3, [r3, #0] 80021b8: b29b uxth r3, r3 80021ba: f003 f881 bl 80052c0 80021be: e1e9 b.n 8002594 } } else /* Data Buffer1 ACK received */ { /* multi-packet on the NON control IN endpoint */ TxPctSize = (uint16_t)PCD_GET_EP_DBUF1_CNT(hpcd->Instance, ep->num); 80021c0: 68fb ldr r3, [r7, #12] 80021c2: 681b ldr r3, [r3, #0] 80021c4: 2250 movs r2, #80 @ 0x50 80021c6: 5a9b ldrh r3, [r3, r2] 80021c8: b29b uxth r3, r3 80021ca: 001a movs r2, r3 80021cc: 68bb ldr r3, [r7, #8] 80021ce: 781b ldrb r3, [r3, #0] 80021d0: 00db lsls r3, r3, #3 80021d2: 18d2 adds r2, r2, r3 80021d4: 68fb ldr r3, [r7, #12] 80021d6: 681b ldr r3, [r3, #0] 80021d8: 18d3 adds r3, r2, r3 80021da: 4ac8 ldr r2, [pc, #800] @ (80024fc ) 80021dc: 4694 mov ip, r2 80021de: 4463 add r3, ip 80021e0: 881a ldrh r2, [r3, #0] 80021e2: 2188 movs r1, #136 @ 0x88 80021e4: 187b adds r3, r7, r1 80021e6: 0592 lsls r2, r2, #22 80021e8: 0d92 lsrs r2, r2, #22 80021ea: 801a strh r2, [r3, #0] if (ep->xfer_len >= TxPctSize) 80021ec: 68bb ldr r3, [r7, #8] 80021ee: 699a ldr r2, [r3, #24] 80021f0: 187b adds r3, r7, r1 80021f2: 881b ldrh r3, [r3, #0] 80021f4: 429a cmp r2, r3 80021f6: d307 bcc.n 8002208 { ep->xfer_len -= TxPctSize; 80021f8: 68bb ldr r3, [r7, #8] 80021fa: 699a ldr r2, [r3, #24] 80021fc: 187b adds r3, r7, r1 80021fe: 881b ldrh r3, [r3, #0] 8002200: 1ad2 subs r2, r2, r3 8002202: 68bb ldr r3, [r7, #8] 8002204: 619a str r2, [r3, #24] 8002206: e002 b.n 800220e } else { ep->xfer_len = 0U; 8002208: 68bb ldr r3, [r7, #8] 800220a: 2200 movs r2, #0 800220c: 619a str r2, [r3, #24] } /* Transfer is completed */ if (ep->xfer_len == 0U) 800220e: 68bb ldr r3, [r7, #8] 8002210: 699b ldr r3, [r3, #24] 8002212: 2b00 cmp r3, #0 8002214: d000 beq.n 8002218 8002216: e0bb b.n 8002390 { PCD_SET_EP_DBUF0_CNT(hpcd->Instance, ep->num, ep->is_in, 0U); 8002218: 68bb ldr r3, [r7, #8] 800221a: 785b ldrb r3, [r3, #1] 800221c: 2b00 cmp r3, #0 800221e: d125 bne.n 800226c 8002220: 68fb ldr r3, [r7, #12] 8002222: 681b ldr r3, [r3, #0] 8002224: 67fb str r3, [r7, #124] @ 0x7c 8002226: 68fb ldr r3, [r7, #12] 8002228: 681b ldr r3, [r3, #0] 800222a: 2250 movs r2, #80 @ 0x50 800222c: 5a9b ldrh r3, [r3, r2] 800222e: b29b uxth r3, r3 8002230: 001a movs r2, r3 8002232: 6ffb ldr r3, [r7, #124] @ 0x7c 8002234: 189b adds r3, r3, r2 8002236: 67fb str r3, [r7, #124] @ 0x7c 8002238: 68bb ldr r3, [r7, #8] 800223a: 781b ldrb r3, [r3, #0] 800223c: 00da lsls r2, r3, #3 800223e: 6ffb ldr r3, [r7, #124] @ 0x7c 8002240: 18d3 adds r3, r2, r3 8002242: 4aad ldr r2, [pc, #692] @ (80024f8 ) 8002244: 4694 mov ip, r2 8002246: 4463 add r3, ip 8002248: 67bb str r3, [r7, #120] @ 0x78 800224a: 6fbb ldr r3, [r7, #120] @ 0x78 800224c: 881b ldrh r3, [r3, #0] 800224e: b29b uxth r3, r3 8002250: 059b lsls r3, r3, #22 8002252: 0d9b lsrs r3, r3, #22 8002254: b29a uxth r2, r3 8002256: 6fbb ldr r3, [r7, #120] @ 0x78 8002258: 801a strh r2, [r3, #0] 800225a: 6fbb ldr r3, [r7, #120] @ 0x78 800225c: 881b ldrh r3, [r3, #0] 800225e: b29b uxth r3, r3 8002260: 4aa7 ldr r2, [pc, #668] @ (8002500 ) 8002262: 4313 orrs r3, r2 8002264: b29a uxth r2, r3 8002266: 6fbb ldr r3, [r7, #120] @ 0x78 8002268: 801a strh r2, [r3, #0] 800226a: e01b b.n 80022a4 800226c: 68bb ldr r3, [r7, #8] 800226e: 785b ldrb r3, [r3, #1] 8002270: 2b01 cmp r3, #1 8002272: d117 bne.n 80022a4 8002274: 68fb ldr r3, [r7, #12] 8002276: 681b ldr r3, [r3, #0] 8002278: 667b str r3, [r7, #100] @ 0x64 800227a: 68fb ldr r3, [r7, #12] 800227c: 681b ldr r3, [r3, #0] 800227e: 2250 movs r2, #80 @ 0x50 8002280: 5a9b ldrh r3, [r3, r2] 8002282: b29b uxth r3, r3 8002284: 001a movs r2, r3 8002286: 6e7b ldr r3, [r7, #100] @ 0x64 8002288: 189b adds r3, r3, r2 800228a: 667b str r3, [r7, #100] @ 0x64 800228c: 68bb ldr r3, [r7, #8] 800228e: 781b ldrb r3, [r3, #0] 8002290: 00da lsls r2, r3, #3 8002292: 6e7b ldr r3, [r7, #100] @ 0x64 8002294: 18d3 adds r3, r2, r3 8002296: 4a98 ldr r2, [pc, #608] @ (80024f8 ) 8002298: 4694 mov ip, r2 800229a: 4463 add r3, ip 800229c: 663b str r3, [r7, #96] @ 0x60 800229e: 6e3b ldr r3, [r7, #96] @ 0x60 80022a0: 2200 movs r2, #0 80022a2: 801a strh r2, [r3, #0] PCD_SET_EP_DBUF1_CNT(hpcd->Instance, ep->num, ep->is_in, 0U); 80022a4: 68fb ldr r3, [r7, #12] 80022a6: 681b ldr r3, [r3, #0] 80022a8: 677b str r3, [r7, #116] @ 0x74 80022aa: 68bb ldr r3, [r7, #8] 80022ac: 785b ldrb r3, [r3, #1] 80022ae: 2b00 cmp r3, #0 80022b0: d12b bne.n 800230a 80022b2: 68fb ldr r3, [r7, #12] 80022b4: 681b ldr r3, [r3, #0] 80022b6: 66fb str r3, [r7, #108] @ 0x6c 80022b8: 68fb ldr r3, [r7, #12] 80022ba: 681b ldr r3, [r3, #0] 80022bc: 2250 movs r2, #80 @ 0x50 80022be: 5a9b ldrh r3, [r3, r2] 80022c0: b29b uxth r3, r3 80022c2: 001a movs r2, r3 80022c4: 6efb ldr r3, [r7, #108] @ 0x6c 80022c6: 189b adds r3, r3, r2 80022c8: 66fb str r3, [r7, #108] @ 0x6c 80022ca: 68bb ldr r3, [r7, #8] 80022cc: 781b ldrb r3, [r3, #0] 80022ce: 00da lsls r2, r3, #3 80022d0: 6efb ldr r3, [r7, #108] @ 0x6c 80022d2: 18d3 adds r3, r2, r3 80022d4: 4a89 ldr r2, [pc, #548] @ (80024fc ) 80022d6: 4694 mov ip, r2 80022d8: 4463 add r3, ip 80022da: 2184 movs r1, #132 @ 0x84 80022dc: 187a adds r2, r7, r1 80022de: 6013 str r3, [r2, #0] 80022e0: 187b adds r3, r7, r1 80022e2: 681b ldr r3, [r3, #0] 80022e4: 881b ldrh r3, [r3, #0] 80022e6: b29b uxth r3, r3 80022e8: 059b lsls r3, r3, #22 80022ea: 0d9b lsrs r3, r3, #22 80022ec: b29a uxth r2, r3 80022ee: 187b adds r3, r7, r1 80022f0: 681b ldr r3, [r3, #0] 80022f2: 801a strh r2, [r3, #0] 80022f4: 187b adds r3, r7, r1 80022f6: 681b ldr r3, [r3, #0] 80022f8: 881b ldrh r3, [r3, #0] 80022fa: b29b uxth r3, r3 80022fc: 4a80 ldr r2, [pc, #512] @ (8002500 ) 80022fe: 4313 orrs r3, r2 8002300: b29a uxth r2, r3 8002302: 187b adds r3, r7, r1 8002304: 681b ldr r3, [r3, #0] 8002306: 801a strh r2, [r3, #0] 8002308: e018 b.n 800233c 800230a: 68bb ldr r3, [r7, #8] 800230c: 785b ldrb r3, [r3, #1] 800230e: 2b01 cmp r3, #1 8002310: d114 bne.n 800233c 8002312: 68fb ldr r3, [r7, #12] 8002314: 681b ldr r3, [r3, #0] 8002316: 2250 movs r2, #80 @ 0x50 8002318: 5a9b ldrh r3, [r3, r2] 800231a: b29b uxth r3, r3 800231c: 001a movs r2, r3 800231e: 6f7b ldr r3, [r7, #116] @ 0x74 8002320: 189b adds r3, r3, r2 8002322: 677b str r3, [r7, #116] @ 0x74 8002324: 68bb ldr r3, [r7, #8] 8002326: 781b ldrb r3, [r3, #0] 8002328: 00da lsls r2, r3, #3 800232a: 6f7b ldr r3, [r7, #116] @ 0x74 800232c: 18d3 adds r3, r2, r3 800232e: 4a73 ldr r2, [pc, #460] @ (80024fc ) 8002330: 4694 mov ip, r2 8002332: 4463 add r3, ip 8002334: 673b str r3, [r7, #112] @ 0x70 8002336: 6f3b ldr r3, [r7, #112] @ 0x70 8002338: 2200 movs r2, #0 800233a: 801a strh r2, [r3, #0] /* TX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataInStageCallback(hpcd, ep->num); #else HAL_PCD_DataInStageCallback(hpcd, ep->num); 800233c: 68bb ldr r3, [r7, #8] 800233e: 781a ldrb r2, [r3, #0] 8002340: 68fb ldr r3, [r7, #12] 8002342: 0011 movs r1, r2 8002344: 0018 movs r0, r3 8002346: f004 fdbf bl 8006ec8 #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ /* need to Free USB Buff */ if ((wEPVal & USB_EP_DTOG_RX) == 0U) 800234a: 1dbb adds r3, r7, #6 800234c: 881a ldrh r2, [r3, #0] 800234e: 2380 movs r3, #128 @ 0x80 8002350: 01db lsls r3, r3, #7 8002352: 4013 ands r3, r2 8002354: d000 beq.n 8002358 8002356: e11d b.n 8002594 { PCD_FREE_USER_BUFFER(hpcd->Instance, ep->num, 1U); 8002358: 68fb ldr r3, [r7, #12] 800235a: 681b ldr r3, [r3, #0] 800235c: 001a movs r2, r3 800235e: 68bb ldr r3, [r7, #8] 8002360: 781b ldrb r3, [r3, #0] 8002362: 009b lsls r3, r3, #2 8002364: 18d3 adds r3, r2, r3 8002366: 881b ldrh r3, [r3, #0] 8002368: b29a uxth r2, r3 800236a: 2082 movs r0, #130 @ 0x82 800236c: 183b adds r3, r7, r0 800236e: 4965 ldr r1, [pc, #404] @ (8002504 ) 8002370: 400a ands r2, r1 8002372: 801a strh r2, [r3, #0] 8002374: 68fb ldr r3, [r7, #12] 8002376: 681b ldr r3, [r3, #0] 8002378: 001a movs r2, r3 800237a: 68bb ldr r3, [r7, #8] 800237c: 781b ldrb r3, [r3, #0] 800237e: 009b lsls r3, r3, #2 8002380: 18d3 adds r3, r2, r3 8002382: 183a adds r2, r7, r0 8002384: 8812 ldrh r2, [r2, #0] 8002386: 4960 ldr r1, [pc, #384] @ (8002508 ) 8002388: 430a orrs r2, r1 800238a: b292 uxth r2, r2 800238c: 801a strh r2, [r3, #0] 800238e: e101 b.n 8002594 } } else /* Transfer is not yet Done */ { /* need to Free USB Buff */ if ((wEPVal & USB_EP_DTOG_RX) == 0U) 8002390: 1dbb adds r3, r7, #6 8002392: 881a ldrh r2, [r3, #0] 8002394: 2380 movs r3, #128 @ 0x80 8002396: 01db lsls r3, r3, #7 8002398: 4013 ands r3, r2 800239a: d11a bne.n 80023d2 { PCD_FREE_USER_BUFFER(hpcd->Instance, ep->num, 1U); 800239c: 68fb ldr r3, [r7, #12] 800239e: 681b ldr r3, [r3, #0] 80023a0: 001a movs r2, r3 80023a2: 68bb ldr r3, [r7, #8] 80023a4: 781b ldrb r3, [r3, #0] 80023a6: 009b lsls r3, r3, #2 80023a8: 18d3 adds r3, r2, r3 80023aa: 881b ldrh r3, [r3, #0] 80023ac: b29a uxth r2, r3 80023ae: 204e movs r0, #78 @ 0x4e 80023b0: 183b adds r3, r7, r0 80023b2: 4954 ldr r1, [pc, #336] @ (8002504 ) 80023b4: 400a ands r2, r1 80023b6: 801a strh r2, [r3, #0] 80023b8: 68fb ldr r3, [r7, #12] 80023ba: 681b ldr r3, [r3, #0] 80023bc: 001a movs r2, r3 80023be: 68bb ldr r3, [r7, #8] 80023c0: 781b ldrb r3, [r3, #0] 80023c2: 009b lsls r3, r3, #2 80023c4: 18d3 adds r3, r2, r3 80023c6: 183a adds r2, r7, r0 80023c8: 8812 ldrh r2, [r2, #0] 80023ca: 494f ldr r1, [pc, #316] @ (8002508 ) 80023cc: 430a orrs r2, r1 80023ce: b292 uxth r2, r2 80023d0: 801a strh r2, [r3, #0] } /* Still there is data to Fill in the next Buffer */ if (ep->xfer_fill_db == 1U) 80023d2: 68bb ldr r3, [r7, #8] 80023d4: 2224 movs r2, #36 @ 0x24 80023d6: 5c9b ldrb r3, [r3, r2] 80023d8: 2b01 cmp r3, #1 80023da: d000 beq.n 80023de 80023dc: e0da b.n 8002594 { ep->xfer_buff += TxPctSize; 80023de: 68bb ldr r3, [r7, #8] 80023e0: 695a ldr r2, [r3, #20] 80023e2: 2188 movs r1, #136 @ 0x88 80023e4: 187b adds r3, r7, r1 80023e6: 881b ldrh r3, [r3, #0] 80023e8: 18d2 adds r2, r2, r3 80023ea: 68bb ldr r3, [r7, #8] 80023ec: 615a str r2, [r3, #20] ep->xfer_count += TxPctSize; 80023ee: 68bb ldr r3, [r7, #8] 80023f0: 69da ldr r2, [r3, #28] 80023f2: 187b adds r3, r7, r1 80023f4: 881b ldrh r3, [r3, #0] 80023f6: 18d2 adds r2, r2, r3 80023f8: 68bb ldr r3, [r7, #8] 80023fa: 61da str r2, [r3, #28] /* Calculate the len of the new buffer to fill */ if (ep->xfer_len_db >= ep->maxpacket) 80023fc: 68bb ldr r3, [r7, #8] 80023fe: 6a1a ldr r2, [r3, #32] 8002400: 68bb ldr r3, [r7, #8] 8002402: 691b ldr r3, [r3, #16] 8002404: 429a cmp r2, r3 8002406: d30c bcc.n 8002422 { len = ep->maxpacket; 8002408: 68bb ldr r3, [r7, #8] 800240a: 691b ldr r3, [r3, #16] 800240c: 218c movs r1, #140 @ 0x8c 800240e: 187a adds r2, r7, r1 8002410: 6013 str r3, [r2, #0] ep->xfer_len_db -= len; 8002412: 68bb ldr r3, [r7, #8] 8002414: 6a1a ldr r2, [r3, #32] 8002416: 187b adds r3, r7, r1 8002418: 681b ldr r3, [r3, #0] 800241a: 1ad2 subs r2, r2, r3 800241c: 68bb ldr r3, [r7, #8] 800241e: 621a str r2, [r3, #32] 8002420: e01a b.n 8002458 } else if (ep->xfer_len_db == 0U) 8002422: 68bb ldr r3, [r7, #8] 8002424: 6a1b ldr r3, [r3, #32] 8002426: 2b00 cmp r3, #0 8002428: d10a bne.n 8002440 { len = TxPctSize; 800242a: 2388 movs r3, #136 @ 0x88 800242c: 18fb adds r3, r7, r3 800242e: 881b ldrh r3, [r3, #0] 8002430: 228c movs r2, #140 @ 0x8c 8002432: 18ba adds r2, r7, r2 8002434: 6013 str r3, [r2, #0] ep->xfer_fill_db = 0U; 8002436: 68bb ldr r3, [r7, #8] 8002438: 2224 movs r2, #36 @ 0x24 800243a: 2100 movs r1, #0 800243c: 5499 strb r1, [r3, r2] 800243e: e00b b.n 8002458 } else { len = ep->xfer_len_db; 8002440: 68bb ldr r3, [r7, #8] 8002442: 6a1b ldr r3, [r3, #32] 8002444: 228c movs r2, #140 @ 0x8c 8002446: 18ba adds r2, r7, r2 8002448: 6013 str r3, [r2, #0] ep->xfer_len_db = 0U; 800244a: 68bb ldr r3, [r7, #8] 800244c: 2200 movs r2, #0 800244e: 621a str r2, [r3, #32] ep->xfer_fill_db = 0; 8002450: 68bb ldr r3, [r7, #8] 8002452: 2224 movs r2, #36 @ 0x24 8002454: 2100 movs r1, #0 8002456: 5499 strb r1, [r3, r2] } /* Set the Double buffer counter for pmabuffer1 */ PCD_SET_EP_DBUF1_CNT(hpcd->Instance, ep->num, ep->is_in, len); 8002458: 68fb ldr r3, [r7, #12] 800245a: 681b ldr r3, [r3, #0] 800245c: 657b str r3, [r7, #84] @ 0x54 800245e: 68bb ldr r3, [r7, #8] 8002460: 785b ldrb r3, [r3, #1] 8002462: 2b00 cmp r3, #0 8002464: d000 beq.n 8002468 8002466: e06d b.n 8002544 8002468: 68fb ldr r3, [r7, #12] 800246a: 681b ldr r3, [r3, #0] 800246c: 65fb str r3, [r7, #92] @ 0x5c 800246e: 68fb ldr r3, [r7, #12] 8002470: 681b ldr r3, [r3, #0] 8002472: 2250 movs r2, #80 @ 0x50 8002474: 5a9b ldrh r3, [r3, r2] 8002476: b29b uxth r3, r3 8002478: 001a movs r2, r3 800247a: 6dfb ldr r3, [r7, #92] @ 0x5c 800247c: 189b adds r3, r3, r2 800247e: 65fb str r3, [r7, #92] @ 0x5c 8002480: 68bb ldr r3, [r7, #8] 8002482: 781b ldrb r3, [r3, #0] 8002484: 00da lsls r2, r3, #3 8002486: 6dfb ldr r3, [r7, #92] @ 0x5c 8002488: 18d3 adds r3, r2, r3 800248a: 4a1c ldr r2, [pc, #112] @ (80024fc ) 800248c: 4694 mov ip, r2 800248e: 4463 add r3, ip 8002490: 65bb str r3, [r7, #88] @ 0x58 8002492: 6dbb ldr r3, [r7, #88] @ 0x58 8002494: 881b ldrh r3, [r3, #0] 8002496: b29b uxth r3, r3 8002498: 059b lsls r3, r3, #22 800249a: 0d9b lsrs r3, r3, #22 800249c: b29a uxth r2, r3 800249e: 6dbb ldr r3, [r7, #88] @ 0x58 80024a0: 801a strh r2, [r3, #0] 80024a2: 238c movs r3, #140 @ 0x8c 80024a4: 18fb adds r3, r7, r3 80024a6: 681b ldr r3, [r3, #0] 80024a8: 2b00 cmp r3, #0 80024aa: d108 bne.n 80024be 80024ac: 6dbb ldr r3, [r7, #88] @ 0x58 80024ae: 881b ldrh r3, [r3, #0] 80024b0: b29b uxth r3, r3 80024b2: 4a13 ldr r2, [pc, #76] @ (8002500 ) 80024b4: 4313 orrs r3, r2 80024b6: b29a uxth r2, r3 80024b8: 6dbb ldr r3, [r7, #88] @ 0x58 80024ba: 801a strh r2, [r3, #0] 80024bc: e05e b.n 800257c 80024be: 228c movs r2, #140 @ 0x8c 80024c0: 18bb adds r3, r7, r2 80024c2: 681b ldr r3, [r3, #0] 80024c4: 2b3e cmp r3, #62 @ 0x3e 80024c6: d821 bhi.n 800250c 80024c8: 18bb adds r3, r7, r2 80024ca: 681b ldr r3, [r3, #0] 80024cc: 085b lsrs r3, r3, #1 80024ce: 66bb str r3, [r7, #104] @ 0x68 80024d0: 18bb adds r3, r7, r2 80024d2: 681b ldr r3, [r3, #0] 80024d4: 2201 movs r2, #1 80024d6: 4013 ands r3, r2 80024d8: d002 beq.n 80024e0 80024da: 6ebb ldr r3, [r7, #104] @ 0x68 80024dc: 3301 adds r3, #1 80024de: 66bb str r3, [r7, #104] @ 0x68 80024e0: 6dbb ldr r3, [r7, #88] @ 0x58 80024e2: 881b ldrh r3, [r3, #0] 80024e4: b29a uxth r2, r3 80024e6: 6ebb ldr r3, [r7, #104] @ 0x68 80024e8: b29b uxth r3, r3 80024ea: 029b lsls r3, r3, #10 80024ec: b29b uxth r3, r3 80024ee: 4313 orrs r3, r2 80024f0: b29a uxth r2, r3 80024f2: 6dbb ldr r3, [r7, #88] @ 0x58 80024f4: 801a strh r2, [r3, #0] 80024f6: e041 b.n 800257c 80024f8: 00000402 .word 0x00000402 80024fc: 00000406 .word 0x00000406 8002500: ffff8000 .word 0xffff8000 8002504: ffff8f8f .word 0xffff8f8f 8002508: ffffc080 .word 0xffffc080 800250c: 228c movs r2, #140 @ 0x8c 800250e: 18bb adds r3, r7, r2 8002510: 681b ldr r3, [r3, #0] 8002512: 095b lsrs r3, r3, #5 8002514: 66bb str r3, [r7, #104] @ 0x68 8002516: 18bb adds r3, r7, r2 8002518: 681b ldr r3, [r3, #0] 800251a: 221f movs r2, #31 800251c: 4013 ands r3, r2 800251e: d102 bne.n 8002526 8002520: 6ebb ldr r3, [r7, #104] @ 0x68 8002522: 3b01 subs r3, #1 8002524: 66bb str r3, [r7, #104] @ 0x68 8002526: 6dbb ldr r3, [r7, #88] @ 0x58 8002528: 881b ldrh r3, [r3, #0] 800252a: b29a uxth r2, r3 800252c: 6ebb ldr r3, [r7, #104] @ 0x68 800252e: b29b uxth r3, r3 8002530: 029b lsls r3, r3, #10 8002532: b29b uxth r3, r3 8002534: 4313 orrs r3, r2 8002536: b29b uxth r3, r3 8002538: 4a2c ldr r2, [pc, #176] @ (80025ec ) 800253a: 4313 orrs r3, r2 800253c: b29a uxth r2, r3 800253e: 6dbb ldr r3, [r7, #88] @ 0x58 8002540: 801a strh r2, [r3, #0] 8002542: e01b b.n 800257c 8002544: 68bb ldr r3, [r7, #8] 8002546: 785b ldrb r3, [r3, #1] 8002548: 2b01 cmp r3, #1 800254a: d117 bne.n 800257c 800254c: 68fb ldr r3, [r7, #12] 800254e: 681b ldr r3, [r3, #0] 8002550: 2250 movs r2, #80 @ 0x50 8002552: 5a9b ldrh r3, [r3, r2] 8002554: b29b uxth r3, r3 8002556: 001a movs r2, r3 8002558: 6d7b ldr r3, [r7, #84] @ 0x54 800255a: 189b adds r3, r3, r2 800255c: 657b str r3, [r7, #84] @ 0x54 800255e: 68bb ldr r3, [r7, #8] 8002560: 781b ldrb r3, [r3, #0] 8002562: 00da lsls r2, r3, #3 8002564: 6d7b ldr r3, [r7, #84] @ 0x54 8002566: 18d3 adds r3, r2, r3 8002568: 4a21 ldr r2, [pc, #132] @ (80025f0 ) 800256a: 4694 mov ip, r2 800256c: 4463 add r3, ip 800256e: 653b str r3, [r7, #80] @ 0x50 8002570: 238c movs r3, #140 @ 0x8c 8002572: 18fb adds r3, r7, r3 8002574: 681b ldr r3, [r3, #0] 8002576: b29a uxth r2, r3 8002578: 6d3b ldr r3, [r7, #80] @ 0x50 800257a: 801a strh r2, [r3, #0] /* Copy the user buffer to USB PMA */ USB_WritePMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr1, (uint16_t)len); 800257c: 68fb ldr r3, [r7, #12] 800257e: 6818 ldr r0, [r3, #0] 8002580: 68bb ldr r3, [r7, #8] 8002582: 6959 ldr r1, [r3, #20] 8002584: 68bb ldr r3, [r7, #8] 8002586: 895a ldrh r2, [r3, #10] 8002588: 238c movs r3, #140 @ 0x8c 800258a: 18fb adds r3, r7, r3 800258c: 681b ldr r3, [r3, #0] 800258e: b29b uxth r3, r3 8002590: f002 fe96 bl 80052c0 } } } /*enable endpoint IN*/ PCD_SET_EP_TX_STATUS(hpcd->Instance, ep->num, USB_EP_TX_VALID); 8002594: 68fb ldr r3, [r7, #12] 8002596: 681b ldr r3, [r3, #0] 8002598: 001a movs r2, r3 800259a: 68bb ldr r3, [r7, #8] 800259c: 781b ldrb r3, [r3, #0] 800259e: 009b lsls r3, r3, #2 80025a0: 18d3 adds r3, r2, r3 80025a2: 881b ldrh r3, [r3, #0] 80025a4: b29a uxth r2, r3 80025a6: 2014 movs r0, #20 80025a8: 183b adds r3, r7, r0 80025aa: 4912 ldr r1, [pc, #72] @ (80025f4 ) 80025ac: 400a ands r2, r1 80025ae: 801a strh r2, [r3, #0] 80025b0: 183b adds r3, r7, r0 80025b2: 183a adds r2, r7, r0 80025b4: 8812 ldrh r2, [r2, #0] 80025b6: 2110 movs r1, #16 80025b8: 404a eors r2, r1 80025ba: 801a strh r2, [r3, #0] 80025bc: 183b adds r3, r7, r0 80025be: 183a adds r2, r7, r0 80025c0: 8812 ldrh r2, [r2, #0] 80025c2: 2120 movs r1, #32 80025c4: 404a eors r2, r1 80025c6: 801a strh r2, [r3, #0] 80025c8: 68fb ldr r3, [r7, #12] 80025ca: 681b ldr r3, [r3, #0] 80025cc: 001a movs r2, r3 80025ce: 68bb ldr r3, [r7, #8] 80025d0: 781b ldrb r3, [r3, #0] 80025d2: 009b lsls r3, r3, #2 80025d4: 18d3 adds r3, r2, r3 80025d6: 183a adds r2, r7, r0 80025d8: 8812 ldrh r2, [r2, #0] 80025da: 4907 ldr r1, [pc, #28] @ (80025f8 ) 80025dc: 430a orrs r2, r1 80025de: b292 uxth r2, r2 80025e0: 801a strh r2, [r3, #0] return HAL_OK; 80025e2: 2300 movs r3, #0 } 80025e4: 0018 movs r0, r3 80025e6: 46bd mov sp, r7 80025e8: b024 add sp, #144 @ 0x90 80025ea: bd80 pop {r7, pc} 80025ec: ffff8000 .word 0xffff8000 80025f0: 00000406 .word 0x00000406 80025f4: ffff8fbf .word 0xffff8fbf 80025f8: ffff8080 .word 0xffff8080 080025fc : * @retval HAL status */ HAL_StatusTypeDef HAL_PCDEx_PMAConfig(PCD_HandleTypeDef *hpcd, uint16_t ep_addr, uint16_t ep_kind, uint32_t pmaadress) { 80025fc: b590 push {r4, r7, lr} 80025fe: b087 sub sp, #28 8002600: af00 add r7, sp, #0 8002602: 60f8 str r0, [r7, #12] 8002604: 0008 movs r0, r1 8002606: 0011 movs r1, r2 8002608: 607b str r3, [r7, #4] 800260a: 240a movs r4, #10 800260c: 193b adds r3, r7, r4 800260e: 1c02 adds r2, r0, #0 8002610: 801a strh r2, [r3, #0] 8002612: 2308 movs r3, #8 8002614: 18fb adds r3, r7, r3 8002616: 1c0a adds r2, r1, #0 8002618: 801a strh r2, [r3, #0] PCD_EPTypeDef *ep; /* initialize ep structure*/ if ((0x80U & ep_addr) == 0x80U) 800261a: 0021 movs r1, r4 800261c: 187b adds r3, r7, r1 800261e: 881b ldrh r3, [r3, #0] 8002620: 2280 movs r2, #128 @ 0x80 8002622: 4013 ands r3, r2 8002624: b29b uxth r3, r3 8002626: 2b00 cmp r3, #0 8002628: d00c beq.n 8002644 { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 800262a: 187b adds r3, r7, r1 800262c: 881b ldrh r3, [r3, #0] 800262e: 2207 movs r2, #7 8002630: 401a ands r2, r3 8002632: 0013 movs r3, r2 8002634: 009b lsls r3, r3, #2 8002636: 189b adds r3, r3, r2 8002638: 00db lsls r3, r3, #3 800263a: 3310 adds r3, #16 800263c: 68fa ldr r2, [r7, #12] 800263e: 18d3 adds r3, r2, r3 8002640: 617b str r3, [r7, #20] 8002642: e00b b.n 800265c } else { ep = &hpcd->OUT_ep[ep_addr]; 8002644: 230a movs r3, #10 8002646: 18fb adds r3, r7, r3 8002648: 881a ldrh r2, [r3, #0] 800264a: 0013 movs r3, r2 800264c: 009b lsls r3, r3, #2 800264e: 189b adds r3, r3, r2 8002650: 00db lsls r3, r3, #3 8002652: 3351 adds r3, #81 @ 0x51 8002654: 33ff adds r3, #255 @ 0xff 8002656: 68fa ldr r2, [r7, #12] 8002658: 18d3 adds r3, r2, r3 800265a: 617b str r3, [r7, #20] } /* Here we check if the endpoint is single or double Buffer*/ if (ep_kind == PCD_SNG_BUF) 800265c: 2308 movs r3, #8 800265e: 18fb adds r3, r7, r3 8002660: 881b ldrh r3, [r3, #0] 8002662: 2b00 cmp r3, #0 8002664: d107 bne.n 8002676 { /* Single Buffer */ ep->doublebuffer = 0U; 8002666: 697b ldr r3, [r7, #20] 8002668: 2200 movs r2, #0 800266a: 731a strb r2, [r3, #12] /* Configure the PMA */ ep->pmaadress = (uint16_t)pmaadress; 800266c: 687b ldr r3, [r7, #4] 800266e: b29a uxth r2, r3 8002670: 697b ldr r3, [r7, #20] 8002672: 80da strh r2, [r3, #6] 8002674: e00b b.n 800268e } #if (USE_USB_DOUBLE_BUFFER == 1U) else /* USB_DBL_BUF */ { /* Double Buffer Endpoint */ ep->doublebuffer = 1U; 8002676: 697b ldr r3, [r7, #20] 8002678: 2201 movs r2, #1 800267a: 731a strb r2, [r3, #12] /* Configure the PMA */ ep->pmaaddr0 = (uint16_t)(pmaadress & 0xFFFFU); 800267c: 687b ldr r3, [r7, #4] 800267e: b29a uxth r2, r3 8002680: 697b ldr r3, [r7, #20] 8002682: 811a strh r2, [r3, #8] ep->pmaaddr1 = (uint16_t)((pmaadress & 0xFFFF0000U) >> 16); 8002684: 687b ldr r3, [r7, #4] 8002686: 0c1b lsrs r3, r3, #16 8002688: b29a uxth r2, r3 800268a: 697b ldr r3, [r7, #20] 800268c: 815a strh r2, [r3, #10] } #endif /* (USE_USB_DOUBLE_BUFFER == 1U) */ return HAL_OK; 800268e: 2300 movs r3, #0 } 8002690: 0018 movs r0, r3 8002692: 46bd mov sp, r7 8002694: b007 add sp, #28 8002696: bd90 pop {r4, r7, pc} 08002698 : * @brief Activate LPM feature. * @param hpcd PCD handle * @retval HAL status */ HAL_StatusTypeDef HAL_PCDEx_ActivateLPM(PCD_HandleTypeDef *hpcd) { 8002698: b580 push {r7, lr} 800269a: b084 sub sp, #16 800269c: af00 add r7, sp, #0 800269e: 6078 str r0, [r7, #4] USB_TypeDef *USBx = hpcd->Instance; 80026a0: 687b ldr r3, [r7, #4] 80026a2: 681b ldr r3, [r3, #0] 80026a4: 60fb str r3, [r7, #12] hpcd->lpm_active = 1U; 80026a6: 687a ldr r2, [r7, #4] 80026a8: 23b4 movs r3, #180 @ 0xb4 80026aa: 009b lsls r3, r3, #2 80026ac: 2101 movs r1, #1 80026ae: 50d1 str r1, [r2, r3] hpcd->LPM_State = LPM_L0; 80026b0: 687a ldr r2, [r7, #4] 80026b2: 23b2 movs r3, #178 @ 0xb2 80026b4: 009b lsls r3, r3, #2 80026b6: 2100 movs r1, #0 80026b8: 54d1 strb r1, [r2, r3] USBx->LPMCSR |= USB_LPMCSR_LMPEN; 80026ba: 68fb ldr r3, [r7, #12] 80026bc: 2254 movs r2, #84 @ 0x54 80026be: 5a9b ldrh r3, [r3, r2] 80026c0: b29b uxth r3, r3 80026c2: 2201 movs r2, #1 80026c4: 4313 orrs r3, r2 80026c6: b299 uxth r1, r3 80026c8: 68fb ldr r3, [r7, #12] 80026ca: 2254 movs r2, #84 @ 0x54 80026cc: 5299 strh r1, [r3, r2] USBx->LPMCSR |= USB_LPMCSR_LPMACK; 80026ce: 68fb ldr r3, [r7, #12] 80026d0: 2254 movs r2, #84 @ 0x54 80026d2: 5a9b ldrh r3, [r3, r2] 80026d4: b29b uxth r3, r3 80026d6: 2202 movs r2, #2 80026d8: 4313 orrs r3, r2 80026da: b299 uxth r1, r3 80026dc: 68fb ldr r3, [r7, #12] 80026de: 2254 movs r2, #84 @ 0x54 80026e0: 5299 strh r1, [r3, r2] return HAL_OK; 80026e2: 2300 movs r3, #0 } 80026e4: 0018 movs r0, r3 80026e6: 46bd mov sp, r7 80026e8: b004 add sp, #16 80026ea: bd80 pop {r7, pc} 080026ec : * @param hpcd PCD handle * @param msg LPM message * @retval HAL status */ __weak void HAL_PCDEx_LPM_Callback(PCD_HandleTypeDef *hpcd, PCD_LPM_MsgTypeDef msg) { 80026ec: b580 push {r7, lr} 80026ee: b082 sub sp, #8 80026f0: af00 add r7, sp, #0 80026f2: 6078 str r0, [r7, #4] 80026f4: 000a movs r2, r1 80026f6: 1cfb adds r3, r7, #3 80026f8: 701a strb r2, [r3, #0] UNUSED(msg); /* NOTE : This function should not be modified, when the callback is needed, the HAL_PCDEx_LPM_Callback could be implemented in the user file */ } 80026fa: 46c0 nop @ (mov r8, r8) 80026fc: 46bd mov sp, r7 80026fe: b002 add sp, #8 8002700: bd80 pop {r7, pc} ... 08002704 : * supported by this macro. User should request a transition to HSE Off * first and then HSE On or HSE Bypass. * @retval HAL status */ HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct) { 8002704: b580 push {r7, lr} 8002706: b088 sub sp, #32 8002708: af00 add r7, sp, #0 800270a: 6078 str r0, [r7, #4] uint32_t tickstart; uint32_t pll_config; uint32_t pll_config2; /* Check Null pointer */ if(RCC_OscInitStruct == NULL) 800270c: 687b ldr r3, [r7, #4] 800270e: 2b00 cmp r3, #0 8002710: d102 bne.n 8002718 { return HAL_ERROR; 8002712: 2301 movs r3, #1 8002714: f000 fb76 bl 8002e04 /* Check the parameters */ assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType)); /*------------------------------- HSE Configuration ------------------------*/ if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE) 8002718: 687b ldr r3, [r7, #4] 800271a: 681b ldr r3, [r3, #0] 800271c: 2201 movs r2, #1 800271e: 4013 ands r3, r2 8002720: d100 bne.n 8002724 8002722: e08e b.n 8002842 { /* Check the parameters */ assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState)); /* When the HSE is used as system clock or clock source for PLL in these cases it is not allowed to be disabled */ if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_HSE) 8002724: 4bc5 ldr r3, [pc, #788] @ (8002a3c ) 8002726: 685b ldr r3, [r3, #4] 8002728: 220c movs r2, #12 800272a: 4013 ands r3, r2 800272c: 2b04 cmp r3, #4 800272e: d00e beq.n 800274e || ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (__HAL_RCC_GET_PLL_OSCSOURCE() == RCC_PLLSOURCE_HSE))) 8002730: 4bc2 ldr r3, [pc, #776] @ (8002a3c ) 8002732: 685b ldr r3, [r3, #4] 8002734: 220c movs r2, #12 8002736: 4013 ands r3, r2 8002738: 2b08 cmp r3, #8 800273a: d117 bne.n 800276c 800273c: 4bbf ldr r3, [pc, #764] @ (8002a3c ) 800273e: 685a ldr r2, [r3, #4] 8002740: 23c0 movs r3, #192 @ 0xc0 8002742: 025b lsls r3, r3, #9 8002744: 401a ands r2, r3 8002746: 2380 movs r3, #128 @ 0x80 8002748: 025b lsls r3, r3, #9 800274a: 429a cmp r2, r3 800274c: d10e bne.n 800276c { if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) 800274e: 4bbb ldr r3, [pc, #748] @ (8002a3c ) 8002750: 681a ldr r2, [r3, #0] 8002752: 2380 movs r3, #128 @ 0x80 8002754: 029b lsls r3, r3, #10 8002756: 4013 ands r3, r2 8002758: d100 bne.n 800275c 800275a: e071 b.n 8002840 800275c: 687b ldr r3, [r7, #4] 800275e: 685b ldr r3, [r3, #4] 8002760: 2b00 cmp r3, #0 8002762: d000 beq.n 8002766 8002764: e06c b.n 8002840 { return HAL_ERROR; 8002766: 2301 movs r3, #1 8002768: f000 fb4c bl 8002e04 } } else { /* Set the new HSE configuration ---------------------------------------*/ __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState); 800276c: 687b ldr r3, [r7, #4] 800276e: 685b ldr r3, [r3, #4] 8002770: 2b01 cmp r3, #1 8002772: d107 bne.n 8002784 8002774: 4bb1 ldr r3, [pc, #708] @ (8002a3c ) 8002776: 681a ldr r2, [r3, #0] 8002778: 4bb0 ldr r3, [pc, #704] @ (8002a3c ) 800277a: 2180 movs r1, #128 @ 0x80 800277c: 0249 lsls r1, r1, #9 800277e: 430a orrs r2, r1 8002780: 601a str r2, [r3, #0] 8002782: e02f b.n 80027e4 8002784: 687b ldr r3, [r7, #4] 8002786: 685b ldr r3, [r3, #4] 8002788: 2b00 cmp r3, #0 800278a: d10c bne.n 80027a6 800278c: 4bab ldr r3, [pc, #684] @ (8002a3c ) 800278e: 681a ldr r2, [r3, #0] 8002790: 4baa ldr r3, [pc, #680] @ (8002a3c ) 8002792: 49ab ldr r1, [pc, #684] @ (8002a40 ) 8002794: 400a ands r2, r1 8002796: 601a str r2, [r3, #0] 8002798: 4ba8 ldr r3, [pc, #672] @ (8002a3c ) 800279a: 681a ldr r2, [r3, #0] 800279c: 4ba7 ldr r3, [pc, #668] @ (8002a3c ) 800279e: 49a9 ldr r1, [pc, #676] @ (8002a44 ) 80027a0: 400a ands r2, r1 80027a2: 601a str r2, [r3, #0] 80027a4: e01e b.n 80027e4 80027a6: 687b ldr r3, [r7, #4] 80027a8: 685b ldr r3, [r3, #4] 80027aa: 2b05 cmp r3, #5 80027ac: d10e bne.n 80027cc 80027ae: 4ba3 ldr r3, [pc, #652] @ (8002a3c ) 80027b0: 681a ldr r2, [r3, #0] 80027b2: 4ba2 ldr r3, [pc, #648] @ (8002a3c ) 80027b4: 2180 movs r1, #128 @ 0x80 80027b6: 02c9 lsls r1, r1, #11 80027b8: 430a orrs r2, r1 80027ba: 601a str r2, [r3, #0] 80027bc: 4b9f ldr r3, [pc, #636] @ (8002a3c ) 80027be: 681a ldr r2, [r3, #0] 80027c0: 4b9e ldr r3, [pc, #632] @ (8002a3c ) 80027c2: 2180 movs r1, #128 @ 0x80 80027c4: 0249 lsls r1, r1, #9 80027c6: 430a orrs r2, r1 80027c8: 601a str r2, [r3, #0] 80027ca: e00b b.n 80027e4 80027cc: 4b9b ldr r3, [pc, #620] @ (8002a3c ) 80027ce: 681a ldr r2, [r3, #0] 80027d0: 4b9a ldr r3, [pc, #616] @ (8002a3c ) 80027d2: 499b ldr r1, [pc, #620] @ (8002a40 ) 80027d4: 400a ands r2, r1 80027d6: 601a str r2, [r3, #0] 80027d8: 4b98 ldr r3, [pc, #608] @ (8002a3c ) 80027da: 681a ldr r2, [r3, #0] 80027dc: 4b97 ldr r3, [pc, #604] @ (8002a3c ) 80027de: 4999 ldr r1, [pc, #612] @ (8002a44 ) 80027e0: 400a ands r2, r1 80027e2: 601a str r2, [r3, #0] /* Check the HSE State */ if(RCC_OscInitStruct->HSEState != RCC_HSE_OFF) 80027e4: 687b ldr r3, [r7, #4] 80027e6: 685b ldr r3, [r3, #4] 80027e8: 2b00 cmp r3, #0 80027ea: d014 beq.n 8002816 { /* Get Start Tick */ tickstart = HAL_GetTick(); 80027ec: f7fd fece bl 800058c 80027f0: 0003 movs r3, r0 80027f2: 61bb str r3, [r7, #24] /* Wait till HSE is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET) 80027f4: e008 b.n 8002808 { if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE) 80027f6: f7fd fec9 bl 800058c 80027fa: 0002 movs r2, r0 80027fc: 69bb ldr r3, [r7, #24] 80027fe: 1ad3 subs r3, r2, r3 8002800: 2b64 cmp r3, #100 @ 0x64 8002802: d901 bls.n 8002808 { return HAL_TIMEOUT; 8002804: 2303 movs r3, #3 8002806: e2fd b.n 8002e04 while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET) 8002808: 4b8c ldr r3, [pc, #560] @ (8002a3c ) 800280a: 681a ldr r2, [r3, #0] 800280c: 2380 movs r3, #128 @ 0x80 800280e: 029b lsls r3, r3, #10 8002810: 4013 ands r3, r2 8002812: d0f0 beq.n 80027f6 8002814: e015 b.n 8002842 } } else { /* Get Start Tick */ tickstart = HAL_GetTick(); 8002816: f7fd feb9 bl 800058c 800281a: 0003 movs r3, r0 800281c: 61bb str r3, [r7, #24] /* Wait till HSE is disabled */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) 800281e: e008 b.n 8002832 { if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE) 8002820: f7fd feb4 bl 800058c 8002824: 0002 movs r2, r0 8002826: 69bb ldr r3, [r7, #24] 8002828: 1ad3 subs r3, r2, r3 800282a: 2b64 cmp r3, #100 @ 0x64 800282c: d901 bls.n 8002832 { return HAL_TIMEOUT; 800282e: 2303 movs r3, #3 8002830: e2e8 b.n 8002e04 while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) 8002832: 4b82 ldr r3, [pc, #520] @ (8002a3c ) 8002834: 681a ldr r2, [r3, #0] 8002836: 2380 movs r3, #128 @ 0x80 8002838: 029b lsls r3, r3, #10 800283a: 4013 ands r3, r2 800283c: d1f0 bne.n 8002820 800283e: e000 b.n 8002842 if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) 8002840: 46c0 nop @ (mov r8, r8) } } } } /*----------------------------- HSI Configuration --------------------------*/ if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI) 8002842: 687b ldr r3, [r7, #4] 8002844: 681b ldr r3, [r3, #0] 8002846: 2202 movs r2, #2 8002848: 4013 ands r3, r2 800284a: d100 bne.n 800284e 800284c: e06c b.n 8002928 /* Check the parameters */ assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState)); assert_param(IS_RCC_CALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue)); /* Check if HSI is used as system clock or as PLL source when PLL is selected as system clock */ if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_HSI) 800284e: 4b7b ldr r3, [pc, #492] @ (8002a3c ) 8002850: 685b ldr r3, [r3, #4] 8002852: 220c movs r2, #12 8002854: 4013 ands r3, r2 8002856: d00e beq.n 8002876 || ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (__HAL_RCC_GET_PLL_OSCSOURCE() == RCC_PLLSOURCE_HSI))) 8002858: 4b78 ldr r3, [pc, #480] @ (8002a3c ) 800285a: 685b ldr r3, [r3, #4] 800285c: 220c movs r2, #12 800285e: 4013 ands r3, r2 8002860: 2b08 cmp r3, #8 8002862: d11f bne.n 80028a4 8002864: 4b75 ldr r3, [pc, #468] @ (8002a3c ) 8002866: 685a ldr r2, [r3, #4] 8002868: 23c0 movs r3, #192 @ 0xc0 800286a: 025b lsls r3, r3, #9 800286c: 401a ands r2, r3 800286e: 2380 movs r3, #128 @ 0x80 8002870: 021b lsls r3, r3, #8 8002872: 429a cmp r2, r3 8002874: d116 bne.n 80028a4 { /* When HSI is used as system clock it will not disabled */ if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON)) 8002876: 4b71 ldr r3, [pc, #452] @ (8002a3c ) 8002878: 681b ldr r3, [r3, #0] 800287a: 2202 movs r2, #2 800287c: 4013 ands r3, r2 800287e: d005 beq.n 800288c 8002880: 687b ldr r3, [r7, #4] 8002882: 68db ldr r3, [r3, #12] 8002884: 2b01 cmp r3, #1 8002886: d001 beq.n 800288c { return HAL_ERROR; 8002888: 2301 movs r3, #1 800288a: e2bb b.n 8002e04 } /* Otherwise, just the calibration is allowed */ else { /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 800288c: 4b6b ldr r3, [pc, #428] @ (8002a3c ) 800288e: 681b ldr r3, [r3, #0] 8002890: 22f8 movs r2, #248 @ 0xf8 8002892: 4393 bics r3, r2 8002894: 0019 movs r1, r3 8002896: 687b ldr r3, [r7, #4] 8002898: 691b ldr r3, [r3, #16] 800289a: 00da lsls r2, r3, #3 800289c: 4b67 ldr r3, [pc, #412] @ (8002a3c ) 800289e: 430a orrs r2, r1 80028a0: 601a str r2, [r3, #0] if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON)) 80028a2: e041 b.n 8002928 } } else { /* Check the HSI State */ if(RCC_OscInitStruct->HSIState != RCC_HSI_OFF) 80028a4: 687b ldr r3, [r7, #4] 80028a6: 68db ldr r3, [r3, #12] 80028a8: 2b00 cmp r3, #0 80028aa: d024 beq.n 80028f6 { /* Enable the Internal High Speed oscillator (HSI). */ __HAL_RCC_HSI_ENABLE(); 80028ac: 4b63 ldr r3, [pc, #396] @ (8002a3c ) 80028ae: 681a ldr r2, [r3, #0] 80028b0: 4b62 ldr r3, [pc, #392] @ (8002a3c ) 80028b2: 2101 movs r1, #1 80028b4: 430a orrs r2, r1 80028b6: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 80028b8: f7fd fe68 bl 800058c 80028bc: 0003 movs r3, r0 80028be: 61bb str r3, [r7, #24] /* Wait till HSI is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) 80028c0: e008 b.n 80028d4 { if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE) 80028c2: f7fd fe63 bl 800058c 80028c6: 0002 movs r2, r0 80028c8: 69bb ldr r3, [r7, #24] 80028ca: 1ad3 subs r3, r2, r3 80028cc: 2b02 cmp r3, #2 80028ce: d901 bls.n 80028d4 { return HAL_TIMEOUT; 80028d0: 2303 movs r3, #3 80028d2: e297 b.n 8002e04 while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) 80028d4: 4b59 ldr r3, [pc, #356] @ (8002a3c ) 80028d6: 681b ldr r3, [r3, #0] 80028d8: 2202 movs r2, #2 80028da: 4013 ands r3, r2 80028dc: d0f1 beq.n 80028c2 } } /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 80028de: 4b57 ldr r3, [pc, #348] @ (8002a3c ) 80028e0: 681b ldr r3, [r3, #0] 80028e2: 22f8 movs r2, #248 @ 0xf8 80028e4: 4393 bics r3, r2 80028e6: 0019 movs r1, r3 80028e8: 687b ldr r3, [r7, #4] 80028ea: 691b ldr r3, [r3, #16] 80028ec: 00da lsls r2, r3, #3 80028ee: 4b53 ldr r3, [pc, #332] @ (8002a3c ) 80028f0: 430a orrs r2, r1 80028f2: 601a str r2, [r3, #0] 80028f4: e018 b.n 8002928 } else { /* Disable the Internal High Speed oscillator (HSI). */ __HAL_RCC_HSI_DISABLE(); 80028f6: 4b51 ldr r3, [pc, #324] @ (8002a3c ) 80028f8: 681a ldr r2, [r3, #0] 80028fa: 4b50 ldr r3, [pc, #320] @ (8002a3c ) 80028fc: 2101 movs r1, #1 80028fe: 438a bics r2, r1 8002900: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 8002902: f7fd fe43 bl 800058c 8002906: 0003 movs r3, r0 8002908: 61bb str r3, [r7, #24] /* Wait till HSI is disabled */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) 800290a: e008 b.n 800291e { if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE) 800290c: f7fd fe3e bl 800058c 8002910: 0002 movs r2, r0 8002912: 69bb ldr r3, [r7, #24] 8002914: 1ad3 subs r3, r2, r3 8002916: 2b02 cmp r3, #2 8002918: d901 bls.n 800291e { return HAL_TIMEOUT; 800291a: 2303 movs r3, #3 800291c: e272 b.n 8002e04 while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) 800291e: 4b47 ldr r3, [pc, #284] @ (8002a3c ) 8002920: 681b ldr r3, [r3, #0] 8002922: 2202 movs r2, #2 8002924: 4013 ands r3, r2 8002926: d1f1 bne.n 800290c } } } } /*------------------------------ LSI Configuration -------------------------*/ if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI) 8002928: 687b ldr r3, [r7, #4] 800292a: 681b ldr r3, [r3, #0] 800292c: 2208 movs r2, #8 800292e: 4013 ands r3, r2 8002930: d036 beq.n 80029a0 { /* Check the parameters */ assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState)); /* Check the LSI State */ if(RCC_OscInitStruct->LSIState != RCC_LSI_OFF) 8002932: 687b ldr r3, [r7, #4] 8002934: 69db ldr r3, [r3, #28] 8002936: 2b00 cmp r3, #0 8002938: d019 beq.n 800296e { /* Enable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_ENABLE(); 800293a: 4b40 ldr r3, [pc, #256] @ (8002a3c ) 800293c: 6a5a ldr r2, [r3, #36] @ 0x24 800293e: 4b3f ldr r3, [pc, #252] @ (8002a3c ) 8002940: 2101 movs r1, #1 8002942: 430a orrs r2, r1 8002944: 625a str r2, [r3, #36] @ 0x24 /* Get Start Tick */ tickstart = HAL_GetTick(); 8002946: f7fd fe21 bl 800058c 800294a: 0003 movs r3, r0 800294c: 61bb str r3, [r7, #24] /* Wait till LSI is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET) 800294e: e008 b.n 8002962 { if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE) 8002950: f7fd fe1c bl 800058c 8002954: 0002 movs r2, r0 8002956: 69bb ldr r3, [r7, #24] 8002958: 1ad3 subs r3, r2, r3 800295a: 2b02 cmp r3, #2 800295c: d901 bls.n 8002962 { return HAL_TIMEOUT; 800295e: 2303 movs r3, #3 8002960: e250 b.n 8002e04 while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET) 8002962: 4b36 ldr r3, [pc, #216] @ (8002a3c ) 8002964: 6a5b ldr r3, [r3, #36] @ 0x24 8002966: 2202 movs r2, #2 8002968: 4013 ands r3, r2 800296a: d0f1 beq.n 8002950 800296c: e018 b.n 80029a0 } } else { /* Disable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_DISABLE(); 800296e: 4b33 ldr r3, [pc, #204] @ (8002a3c ) 8002970: 6a5a ldr r2, [r3, #36] @ 0x24 8002972: 4b32 ldr r3, [pc, #200] @ (8002a3c ) 8002974: 2101 movs r1, #1 8002976: 438a bics r2, r1 8002978: 625a str r2, [r3, #36] @ 0x24 /* Get Start Tick */ tickstart = HAL_GetTick(); 800297a: f7fd fe07 bl 800058c 800297e: 0003 movs r3, r0 8002980: 61bb str r3, [r7, #24] /* Wait till LSI is disabled */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET) 8002982: e008 b.n 8002996 { if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE) 8002984: f7fd fe02 bl 800058c 8002988: 0002 movs r2, r0 800298a: 69bb ldr r3, [r7, #24] 800298c: 1ad3 subs r3, r2, r3 800298e: 2b02 cmp r3, #2 8002990: d901 bls.n 8002996 { return HAL_TIMEOUT; 8002992: 2303 movs r3, #3 8002994: e236 b.n 8002e04 while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET) 8002996: 4b29 ldr r3, [pc, #164] @ (8002a3c ) 8002998: 6a5b ldr r3, [r3, #36] @ 0x24 800299a: 2202 movs r2, #2 800299c: 4013 ands r3, r2 800299e: d1f1 bne.n 8002984 } } } } /*------------------------------ LSE Configuration -------------------------*/ if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE) 80029a0: 687b ldr r3, [r7, #4] 80029a2: 681b ldr r3, [r3, #0] 80029a4: 2204 movs r2, #4 80029a6: 4013 ands r3, r2 80029a8: d100 bne.n 80029ac 80029aa: e0b5 b.n 8002b18 { FlagStatus pwrclkchanged = RESET; 80029ac: 201f movs r0, #31 80029ae: 183b adds r3, r7, r0 80029b0: 2200 movs r2, #0 80029b2: 701a strb r2, [r3, #0] /* Check the parameters */ assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState)); /* Update LSE configuration in Backup Domain control register */ /* Requires to enable write access to Backup Domain of necessary */ if(__HAL_RCC_PWR_IS_CLK_DISABLED()) 80029b4: 4b21 ldr r3, [pc, #132] @ (8002a3c ) 80029b6: 69da ldr r2, [r3, #28] 80029b8: 2380 movs r3, #128 @ 0x80 80029ba: 055b lsls r3, r3, #21 80029bc: 4013 ands r3, r2 80029be: d110 bne.n 80029e2 { __HAL_RCC_PWR_CLK_ENABLE(); 80029c0: 4b1e ldr r3, [pc, #120] @ (8002a3c ) 80029c2: 69da ldr r2, [r3, #28] 80029c4: 4b1d ldr r3, [pc, #116] @ (8002a3c ) 80029c6: 2180 movs r1, #128 @ 0x80 80029c8: 0549 lsls r1, r1, #21 80029ca: 430a orrs r2, r1 80029cc: 61da str r2, [r3, #28] 80029ce: 4b1b ldr r3, [pc, #108] @ (8002a3c ) 80029d0: 69da ldr r2, [r3, #28] 80029d2: 2380 movs r3, #128 @ 0x80 80029d4: 055b lsls r3, r3, #21 80029d6: 4013 ands r3, r2 80029d8: 60fb str r3, [r7, #12] 80029da: 68fb ldr r3, [r7, #12] pwrclkchanged = SET; 80029dc: 183b adds r3, r7, r0 80029de: 2201 movs r2, #1 80029e0: 701a strb r2, [r3, #0] } if(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 80029e2: 4b19 ldr r3, [pc, #100] @ (8002a48 ) 80029e4: 681a ldr r2, [r3, #0] 80029e6: 2380 movs r3, #128 @ 0x80 80029e8: 005b lsls r3, r3, #1 80029ea: 4013 ands r3, r2 80029ec: d11a bne.n 8002a24 { /* Enable write access to Backup domain */ SET_BIT(PWR->CR, PWR_CR_DBP); 80029ee: 4b16 ldr r3, [pc, #88] @ (8002a48 ) 80029f0: 681a ldr r2, [r3, #0] 80029f2: 4b15 ldr r3, [pc, #84] @ (8002a48 ) 80029f4: 2180 movs r1, #128 @ 0x80 80029f6: 0049 lsls r1, r1, #1 80029f8: 430a orrs r2, r1 80029fa: 601a str r2, [r3, #0] /* Wait for Backup domain Write protection disable */ tickstart = HAL_GetTick(); 80029fc: f7fd fdc6 bl 800058c 8002a00: 0003 movs r3, r0 8002a02: 61bb str r3, [r7, #24] while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 8002a04: e008 b.n 8002a18 { if((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) 8002a06: f7fd fdc1 bl 800058c 8002a0a: 0002 movs r2, r0 8002a0c: 69bb ldr r3, [r7, #24] 8002a0e: 1ad3 subs r3, r2, r3 8002a10: 2b64 cmp r3, #100 @ 0x64 8002a12: d901 bls.n 8002a18 { return HAL_TIMEOUT; 8002a14: 2303 movs r3, #3 8002a16: e1f5 b.n 8002e04 while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 8002a18: 4b0b ldr r3, [pc, #44] @ (8002a48 ) 8002a1a: 681a ldr r2, [r3, #0] 8002a1c: 2380 movs r3, #128 @ 0x80 8002a1e: 005b lsls r3, r3, #1 8002a20: 4013 ands r3, r2 8002a22: d0f0 beq.n 8002a06 } } } /* Set the new LSE configuration -----------------------------------------*/ __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState); 8002a24: 687b ldr r3, [r7, #4] 8002a26: 689b ldr r3, [r3, #8] 8002a28: 2b01 cmp r3, #1 8002a2a: d10f bne.n 8002a4c 8002a2c: 4b03 ldr r3, [pc, #12] @ (8002a3c ) 8002a2e: 6a1a ldr r2, [r3, #32] 8002a30: 4b02 ldr r3, [pc, #8] @ (8002a3c ) 8002a32: 2101 movs r1, #1 8002a34: 430a orrs r2, r1 8002a36: 621a str r2, [r3, #32] 8002a38: e036 b.n 8002aa8 8002a3a: 46c0 nop @ (mov r8, r8) 8002a3c: 40021000 .word 0x40021000 8002a40: fffeffff .word 0xfffeffff 8002a44: fffbffff .word 0xfffbffff 8002a48: 40007000 .word 0x40007000 8002a4c: 687b ldr r3, [r7, #4] 8002a4e: 689b ldr r3, [r3, #8] 8002a50: 2b00 cmp r3, #0 8002a52: d10c bne.n 8002a6e 8002a54: 4bca ldr r3, [pc, #808] @ (8002d80 ) 8002a56: 6a1a ldr r2, [r3, #32] 8002a58: 4bc9 ldr r3, [pc, #804] @ (8002d80 ) 8002a5a: 2101 movs r1, #1 8002a5c: 438a bics r2, r1 8002a5e: 621a str r2, [r3, #32] 8002a60: 4bc7 ldr r3, [pc, #796] @ (8002d80 ) 8002a62: 6a1a ldr r2, [r3, #32] 8002a64: 4bc6 ldr r3, [pc, #792] @ (8002d80 ) 8002a66: 2104 movs r1, #4 8002a68: 438a bics r2, r1 8002a6a: 621a str r2, [r3, #32] 8002a6c: e01c b.n 8002aa8 8002a6e: 687b ldr r3, [r7, #4] 8002a70: 689b ldr r3, [r3, #8] 8002a72: 2b05 cmp r3, #5 8002a74: d10c bne.n 8002a90 8002a76: 4bc2 ldr r3, [pc, #776] @ (8002d80 ) 8002a78: 6a1a ldr r2, [r3, #32] 8002a7a: 4bc1 ldr r3, [pc, #772] @ (8002d80 ) 8002a7c: 2104 movs r1, #4 8002a7e: 430a orrs r2, r1 8002a80: 621a str r2, [r3, #32] 8002a82: 4bbf ldr r3, [pc, #764] @ (8002d80 ) 8002a84: 6a1a ldr r2, [r3, #32] 8002a86: 4bbe ldr r3, [pc, #760] @ (8002d80 ) 8002a88: 2101 movs r1, #1 8002a8a: 430a orrs r2, r1 8002a8c: 621a str r2, [r3, #32] 8002a8e: e00b b.n 8002aa8 8002a90: 4bbb ldr r3, [pc, #748] @ (8002d80 ) 8002a92: 6a1a ldr r2, [r3, #32] 8002a94: 4bba ldr r3, [pc, #744] @ (8002d80 ) 8002a96: 2101 movs r1, #1 8002a98: 438a bics r2, r1 8002a9a: 621a str r2, [r3, #32] 8002a9c: 4bb8 ldr r3, [pc, #736] @ (8002d80 ) 8002a9e: 6a1a ldr r2, [r3, #32] 8002aa0: 4bb7 ldr r3, [pc, #732] @ (8002d80 ) 8002aa2: 2104 movs r1, #4 8002aa4: 438a bics r2, r1 8002aa6: 621a str r2, [r3, #32] /* Check the LSE State */ if(RCC_OscInitStruct->LSEState != RCC_LSE_OFF) 8002aa8: 687b ldr r3, [r7, #4] 8002aaa: 689b ldr r3, [r3, #8] 8002aac: 2b00 cmp r3, #0 8002aae: d014 beq.n 8002ada { /* Get Start Tick */ tickstart = HAL_GetTick(); 8002ab0: f7fd fd6c bl 800058c 8002ab4: 0003 movs r3, r0 8002ab6: 61bb str r3, [r7, #24] /* Wait till LSE is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) 8002ab8: e009 b.n 8002ace { if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE) 8002aba: f7fd fd67 bl 800058c 8002abe: 0002 movs r2, r0 8002ac0: 69bb ldr r3, [r7, #24] 8002ac2: 1ad3 subs r3, r2, r3 8002ac4: 4aaf ldr r2, [pc, #700] @ (8002d84 ) 8002ac6: 4293 cmp r3, r2 8002ac8: d901 bls.n 8002ace { return HAL_TIMEOUT; 8002aca: 2303 movs r3, #3 8002acc: e19a b.n 8002e04 while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) 8002ace: 4bac ldr r3, [pc, #688] @ (8002d80 ) 8002ad0: 6a1b ldr r3, [r3, #32] 8002ad2: 2202 movs r2, #2 8002ad4: 4013 ands r3, r2 8002ad6: d0f0 beq.n 8002aba 8002ad8: e013 b.n 8002b02 } } else { /* Get Start Tick */ tickstart = HAL_GetTick(); 8002ada: f7fd fd57 bl 800058c 8002ade: 0003 movs r3, r0 8002ae0: 61bb str r3, [r7, #24] /* Wait till LSE is disabled */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET) 8002ae2: e009 b.n 8002af8 { if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE) 8002ae4: f7fd fd52 bl 800058c 8002ae8: 0002 movs r2, r0 8002aea: 69bb ldr r3, [r7, #24] 8002aec: 1ad3 subs r3, r2, r3 8002aee: 4aa5 ldr r2, [pc, #660] @ (8002d84 ) 8002af0: 4293 cmp r3, r2 8002af2: d901 bls.n 8002af8 { return HAL_TIMEOUT; 8002af4: 2303 movs r3, #3 8002af6: e185 b.n 8002e04 while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET) 8002af8: 4ba1 ldr r3, [pc, #644] @ (8002d80 ) 8002afa: 6a1b ldr r3, [r3, #32] 8002afc: 2202 movs r2, #2 8002afe: 4013 ands r3, r2 8002b00: d1f0 bne.n 8002ae4 } } } /* Require to disable power clock if necessary */ if(pwrclkchanged == SET) 8002b02: 231f movs r3, #31 8002b04: 18fb adds r3, r7, r3 8002b06: 781b ldrb r3, [r3, #0] 8002b08: 2b01 cmp r3, #1 8002b0a: d105 bne.n 8002b18 { __HAL_RCC_PWR_CLK_DISABLE(); 8002b0c: 4b9c ldr r3, [pc, #624] @ (8002d80 ) 8002b0e: 69da ldr r2, [r3, #28] 8002b10: 4b9b ldr r3, [pc, #620] @ (8002d80 ) 8002b12: 499d ldr r1, [pc, #628] @ (8002d88 ) 8002b14: 400a ands r2, r1 8002b16: 61da str r2, [r3, #28] } } /*----------------------------- HSI14 Configuration --------------------------*/ if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI14) == RCC_OSCILLATORTYPE_HSI14) 8002b18: 687b ldr r3, [r7, #4] 8002b1a: 681b ldr r3, [r3, #0] 8002b1c: 2210 movs r2, #16 8002b1e: 4013 ands r3, r2 8002b20: d063 beq.n 8002bea /* Check the parameters */ assert_param(IS_RCC_HSI14(RCC_OscInitStruct->HSI14State)); assert_param(IS_RCC_CALIBRATION_VALUE(RCC_OscInitStruct->HSI14CalibrationValue)); /* Check the HSI14 State */ if(RCC_OscInitStruct->HSI14State == RCC_HSI14_ON) 8002b22: 687b ldr r3, [r7, #4] 8002b24: 695b ldr r3, [r3, #20] 8002b26: 2b01 cmp r3, #1 8002b28: d12a bne.n 8002b80 { /* Disable ADC control of the Internal High Speed oscillator HSI14 */ __HAL_RCC_HSI14ADC_DISABLE(); 8002b2a: 4b95 ldr r3, [pc, #596] @ (8002d80 ) 8002b2c: 6b5a ldr r2, [r3, #52] @ 0x34 8002b2e: 4b94 ldr r3, [pc, #592] @ (8002d80 ) 8002b30: 2104 movs r1, #4 8002b32: 430a orrs r2, r1 8002b34: 635a str r2, [r3, #52] @ 0x34 /* Enable the Internal High Speed oscillator (HSI). */ __HAL_RCC_HSI14_ENABLE(); 8002b36: 4b92 ldr r3, [pc, #584] @ (8002d80 ) 8002b38: 6b5a ldr r2, [r3, #52] @ 0x34 8002b3a: 4b91 ldr r3, [pc, #580] @ (8002d80 ) 8002b3c: 2101 movs r1, #1 8002b3e: 430a orrs r2, r1 8002b40: 635a str r2, [r3, #52] @ 0x34 /* Get Start Tick */ tickstart = HAL_GetTick(); 8002b42: f7fd fd23 bl 800058c 8002b46: 0003 movs r3, r0 8002b48: 61bb str r3, [r7, #24] /* Wait till HSI is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSI14RDY) == RESET) 8002b4a: e008 b.n 8002b5e { if((HAL_GetTick() - tickstart) > HSI14_TIMEOUT_VALUE) 8002b4c: f7fd fd1e bl 800058c 8002b50: 0002 movs r2, r0 8002b52: 69bb ldr r3, [r7, #24] 8002b54: 1ad3 subs r3, r2, r3 8002b56: 2b02 cmp r3, #2 8002b58: d901 bls.n 8002b5e { return HAL_TIMEOUT; 8002b5a: 2303 movs r3, #3 8002b5c: e152 b.n 8002e04 while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSI14RDY) == RESET) 8002b5e: 4b88 ldr r3, [pc, #544] @ (8002d80 ) 8002b60: 6b5b ldr r3, [r3, #52] @ 0x34 8002b62: 2202 movs r2, #2 8002b64: 4013 ands r3, r2 8002b66: d0f1 beq.n 8002b4c } } /* Adjusts the Internal High Speed oscillator 14Mhz (HSI14) calibration value. */ __HAL_RCC_HSI14_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSI14CalibrationValue); 8002b68: 4b85 ldr r3, [pc, #532] @ (8002d80 ) 8002b6a: 6b5b ldr r3, [r3, #52] @ 0x34 8002b6c: 22f8 movs r2, #248 @ 0xf8 8002b6e: 4393 bics r3, r2 8002b70: 0019 movs r1, r3 8002b72: 687b ldr r3, [r7, #4] 8002b74: 699b ldr r3, [r3, #24] 8002b76: 00da lsls r2, r3, #3 8002b78: 4b81 ldr r3, [pc, #516] @ (8002d80 ) 8002b7a: 430a orrs r2, r1 8002b7c: 635a str r2, [r3, #52] @ 0x34 8002b7e: e034 b.n 8002bea } else if(RCC_OscInitStruct->HSI14State == RCC_HSI14_ADC_CONTROL) 8002b80: 687b ldr r3, [r7, #4] 8002b82: 695b ldr r3, [r3, #20] 8002b84: 3305 adds r3, #5 8002b86: d111 bne.n 8002bac { /* Enable ADC control of the Internal High Speed oscillator HSI14 */ __HAL_RCC_HSI14ADC_ENABLE(); 8002b88: 4b7d ldr r3, [pc, #500] @ (8002d80 ) 8002b8a: 6b5a ldr r2, [r3, #52] @ 0x34 8002b8c: 4b7c ldr r3, [pc, #496] @ (8002d80 ) 8002b8e: 2104 movs r1, #4 8002b90: 438a bics r2, r1 8002b92: 635a str r2, [r3, #52] @ 0x34 /* Adjusts the Internal High Speed oscillator 14Mhz (HSI14) calibration value. */ __HAL_RCC_HSI14_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSI14CalibrationValue); 8002b94: 4b7a ldr r3, [pc, #488] @ (8002d80 ) 8002b96: 6b5b ldr r3, [r3, #52] @ 0x34 8002b98: 22f8 movs r2, #248 @ 0xf8 8002b9a: 4393 bics r3, r2 8002b9c: 0019 movs r1, r3 8002b9e: 687b ldr r3, [r7, #4] 8002ba0: 699b ldr r3, [r3, #24] 8002ba2: 00da lsls r2, r3, #3 8002ba4: 4b76 ldr r3, [pc, #472] @ (8002d80 ) 8002ba6: 430a orrs r2, r1 8002ba8: 635a str r2, [r3, #52] @ 0x34 8002baa: e01e b.n 8002bea } else { /* Disable ADC control of the Internal High Speed oscillator HSI14 */ __HAL_RCC_HSI14ADC_DISABLE(); 8002bac: 4b74 ldr r3, [pc, #464] @ (8002d80 ) 8002bae: 6b5a ldr r2, [r3, #52] @ 0x34 8002bb0: 4b73 ldr r3, [pc, #460] @ (8002d80 ) 8002bb2: 2104 movs r1, #4 8002bb4: 430a orrs r2, r1 8002bb6: 635a str r2, [r3, #52] @ 0x34 /* Disable the Internal High Speed oscillator (HSI). */ __HAL_RCC_HSI14_DISABLE(); 8002bb8: 4b71 ldr r3, [pc, #452] @ (8002d80 ) 8002bba: 6b5a ldr r2, [r3, #52] @ 0x34 8002bbc: 4b70 ldr r3, [pc, #448] @ (8002d80 ) 8002bbe: 2101 movs r1, #1 8002bc0: 438a bics r2, r1 8002bc2: 635a str r2, [r3, #52] @ 0x34 /* Get Start Tick */ tickstart = HAL_GetTick(); 8002bc4: f7fd fce2 bl 800058c 8002bc8: 0003 movs r3, r0 8002bca: 61bb str r3, [r7, #24] /* Wait till HSI is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSI14RDY) != RESET) 8002bcc: e008 b.n 8002be0 { if((HAL_GetTick() - tickstart) > HSI14_TIMEOUT_VALUE) 8002bce: f7fd fcdd bl 800058c 8002bd2: 0002 movs r2, r0 8002bd4: 69bb ldr r3, [r7, #24] 8002bd6: 1ad3 subs r3, r2, r3 8002bd8: 2b02 cmp r3, #2 8002bda: d901 bls.n 8002be0 { return HAL_TIMEOUT; 8002bdc: 2303 movs r3, #3 8002bde: e111 b.n 8002e04 while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSI14RDY) != RESET) 8002be0: 4b67 ldr r3, [pc, #412] @ (8002d80 ) 8002be2: 6b5b ldr r3, [r3, #52] @ 0x34 8002be4: 2202 movs r2, #2 8002be6: 4013 ands r3, r2 8002be8: d1f1 bne.n 8002bce } } #if defined(RCC_HSI48_SUPPORT) /*----------------------------- HSI48 Configuration --------------------------*/ if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI48) == RCC_OSCILLATORTYPE_HSI48) 8002bea: 687b ldr r3, [r7, #4] 8002bec: 681b ldr r3, [r3, #0] 8002bee: 2220 movs r2, #32 8002bf0: 4013 ands r3, r2 8002bf2: d05c beq.n 8002cae { /* Check the parameters */ assert_param(IS_RCC_HSI48(RCC_OscInitStruct->HSI48State)); /* When the HSI48 is used as system clock it is not allowed to be disabled */ if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_HSI48) || 8002bf4: 4b62 ldr r3, [pc, #392] @ (8002d80 ) 8002bf6: 685b ldr r3, [r3, #4] 8002bf8: 220c movs r2, #12 8002bfa: 4013 ands r3, r2 8002bfc: 2b0c cmp r3, #12 8002bfe: d00e beq.n 8002c1e ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (__HAL_RCC_GET_PLL_OSCSOURCE() == RCC_PLLSOURCE_HSI48))) 8002c00: 4b5f ldr r3, [pc, #380] @ (8002d80 ) 8002c02: 685b ldr r3, [r3, #4] 8002c04: 220c movs r2, #12 8002c06: 4013 ands r3, r2 if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_HSI48) || 8002c08: 2b08 cmp r3, #8 8002c0a: d114 bne.n 8002c36 ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (__HAL_RCC_GET_PLL_OSCSOURCE() == RCC_PLLSOURCE_HSI48))) 8002c0c: 4b5c ldr r3, [pc, #368] @ (8002d80 ) 8002c0e: 685a ldr r2, [r3, #4] 8002c10: 23c0 movs r3, #192 @ 0xc0 8002c12: 025b lsls r3, r3, #9 8002c14: 401a ands r2, r3 8002c16: 23c0 movs r3, #192 @ 0xc0 8002c18: 025b lsls r3, r3, #9 8002c1a: 429a cmp r2, r3 8002c1c: d10b bne.n 8002c36 { if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) != RESET) && (RCC_OscInitStruct->HSI48State != RCC_HSI48_ON)) 8002c1e: 4b58 ldr r3, [pc, #352] @ (8002d80 ) 8002c20: 6b5a ldr r2, [r3, #52] @ 0x34 8002c22: 2380 movs r3, #128 @ 0x80 8002c24: 029b lsls r3, r3, #10 8002c26: 4013 ands r3, r2 8002c28: d040 beq.n 8002cac 8002c2a: 687b ldr r3, [r7, #4] 8002c2c: 6a1b ldr r3, [r3, #32] 8002c2e: 2b01 cmp r3, #1 8002c30: d03c beq.n 8002cac { return HAL_ERROR; 8002c32: 2301 movs r3, #1 8002c34: e0e6 b.n 8002e04 } } else { /* Check the HSI48 State */ if(RCC_OscInitStruct->HSI48State != RCC_HSI48_OFF) 8002c36: 687b ldr r3, [r7, #4] 8002c38: 6a1b ldr r3, [r3, #32] 8002c3a: 2b00 cmp r3, #0 8002c3c: d01b beq.n 8002c76 { /* Enable the Internal High Speed oscillator (HSI48). */ __HAL_RCC_HSI48_ENABLE(); 8002c3e: 4b50 ldr r3, [pc, #320] @ (8002d80 ) 8002c40: 6b5a ldr r2, [r3, #52] @ 0x34 8002c42: 4b4f ldr r3, [pc, #316] @ (8002d80 ) 8002c44: 2180 movs r1, #128 @ 0x80 8002c46: 0249 lsls r1, r1, #9 8002c48: 430a orrs r2, r1 8002c4a: 635a str r2, [r3, #52] @ 0x34 /* Get Start Tick */ tickstart = HAL_GetTick(); 8002c4c: f7fd fc9e bl 800058c 8002c50: 0003 movs r3, r0 8002c52: 61bb str r3, [r7, #24] /* Wait till HSI48 is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) == RESET) 8002c54: e008 b.n 8002c68 { if((HAL_GetTick() - tickstart) > HSI48_TIMEOUT_VALUE) 8002c56: f7fd fc99 bl 800058c 8002c5a: 0002 movs r2, r0 8002c5c: 69bb ldr r3, [r7, #24] 8002c5e: 1ad3 subs r3, r2, r3 8002c60: 2b02 cmp r3, #2 8002c62: d901 bls.n 8002c68 { return HAL_TIMEOUT; 8002c64: 2303 movs r3, #3 8002c66: e0cd b.n 8002e04 while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) == RESET) 8002c68: 4b45 ldr r3, [pc, #276] @ (8002d80 ) 8002c6a: 6b5a ldr r2, [r3, #52] @ 0x34 8002c6c: 2380 movs r3, #128 @ 0x80 8002c6e: 029b lsls r3, r3, #10 8002c70: 4013 ands r3, r2 8002c72: d0f0 beq.n 8002c56 8002c74: e01b b.n 8002cae } } else { /* Disable the Internal High Speed oscillator (HSI48). */ __HAL_RCC_HSI48_DISABLE(); 8002c76: 4b42 ldr r3, [pc, #264] @ (8002d80 ) 8002c78: 6b5a ldr r2, [r3, #52] @ 0x34 8002c7a: 4b41 ldr r3, [pc, #260] @ (8002d80 ) 8002c7c: 4943 ldr r1, [pc, #268] @ (8002d8c ) 8002c7e: 400a ands r2, r1 8002c80: 635a str r2, [r3, #52] @ 0x34 /* Get Start Tick */ tickstart = HAL_GetTick(); 8002c82: f7fd fc83 bl 800058c 8002c86: 0003 movs r3, r0 8002c88: 61bb str r3, [r7, #24] /* Wait till HSI48 is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) != RESET) 8002c8a: e008 b.n 8002c9e { if((HAL_GetTick() - tickstart) > HSI48_TIMEOUT_VALUE) 8002c8c: f7fd fc7e bl 800058c 8002c90: 0002 movs r2, r0 8002c92: 69bb ldr r3, [r7, #24] 8002c94: 1ad3 subs r3, r2, r3 8002c96: 2b02 cmp r3, #2 8002c98: d901 bls.n 8002c9e { return HAL_TIMEOUT; 8002c9a: 2303 movs r3, #3 8002c9c: e0b2 b.n 8002e04 while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) != RESET) 8002c9e: 4b38 ldr r3, [pc, #224] @ (8002d80 ) 8002ca0: 6b5a ldr r2, [r3, #52] @ 0x34 8002ca2: 2380 movs r3, #128 @ 0x80 8002ca4: 029b lsls r3, r3, #10 8002ca6: 4013 ands r3, r2 8002ca8: d1f0 bne.n 8002c8c 8002caa: e000 b.n 8002cae if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) != RESET) && (RCC_OscInitStruct->HSI48State != RCC_HSI48_ON)) 8002cac: 46c0 nop @ (mov r8, r8) #endif /* RCC_HSI48_SUPPORT */ /*-------------------------------- PLL Configuration -----------------------*/ /* Check the parameters */ assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState)); if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE) 8002cae: 687b ldr r3, [r7, #4] 8002cb0: 6a5b ldr r3, [r3, #36] @ 0x24 8002cb2: 2b00 cmp r3, #0 8002cb4: d100 bne.n 8002cb8 8002cb6: e0a4 b.n 8002e02 { /* Check if the PLL is used as system clock or not */ if(__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_PLLCLK) 8002cb8: 4b31 ldr r3, [pc, #196] @ (8002d80 ) 8002cba: 685b ldr r3, [r3, #4] 8002cbc: 220c movs r2, #12 8002cbe: 4013 ands r3, r2 8002cc0: 2b08 cmp r3, #8 8002cc2: d100 bne.n 8002cc6 8002cc4: e078 b.n 8002db8 { if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON) 8002cc6: 687b ldr r3, [r7, #4] 8002cc8: 6a5b ldr r3, [r3, #36] @ 0x24 8002cca: 2b02 cmp r3, #2 8002ccc: d14c bne.n 8002d68 assert_param(IS_RCC_PLLSOURCE(RCC_OscInitStruct->PLL.PLLSource)); assert_param(IS_RCC_PLL_MUL(RCC_OscInitStruct->PLL.PLLMUL)); assert_param(IS_RCC_PREDIV(RCC_OscInitStruct->PLL.PREDIV)); /* Disable the main PLL. */ __HAL_RCC_PLL_DISABLE(); 8002cce: 4b2c ldr r3, [pc, #176] @ (8002d80 ) 8002cd0: 681a ldr r2, [r3, #0] 8002cd2: 4b2b ldr r3, [pc, #172] @ (8002d80 ) 8002cd4: 492e ldr r1, [pc, #184] @ (8002d90 ) 8002cd6: 400a ands r2, r1 8002cd8: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 8002cda: f7fd fc57 bl 800058c 8002cde: 0003 movs r3, r0 8002ce0: 61bb str r3, [r7, #24] /* Wait till PLL is disabled */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) 8002ce2: e008 b.n 8002cf6 { if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE) 8002ce4: f7fd fc52 bl 800058c 8002ce8: 0002 movs r2, r0 8002cea: 69bb ldr r3, [r7, #24] 8002cec: 1ad3 subs r3, r2, r3 8002cee: 2b02 cmp r3, #2 8002cf0: d901 bls.n 8002cf6 { return HAL_TIMEOUT; 8002cf2: 2303 movs r3, #3 8002cf4: e086 b.n 8002e04 while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) 8002cf6: 4b22 ldr r3, [pc, #136] @ (8002d80 ) 8002cf8: 681a ldr r2, [r3, #0] 8002cfa: 2380 movs r3, #128 @ 0x80 8002cfc: 049b lsls r3, r3, #18 8002cfe: 4013 ands r3, r2 8002d00: d1f0 bne.n 8002ce4 } } /* Configure the main PLL clock source, predivider and multiplication factor. */ __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource, 8002d02: 4b1f ldr r3, [pc, #124] @ (8002d80 ) 8002d04: 6adb ldr r3, [r3, #44] @ 0x2c 8002d06: 220f movs r2, #15 8002d08: 4393 bics r3, r2 8002d0a: 0019 movs r1, r3 8002d0c: 687b ldr r3, [r7, #4] 8002d0e: 6b1a ldr r2, [r3, #48] @ 0x30 8002d10: 4b1b ldr r3, [pc, #108] @ (8002d80 ) 8002d12: 430a orrs r2, r1 8002d14: 62da str r2, [r3, #44] @ 0x2c 8002d16: 4b1a ldr r3, [pc, #104] @ (8002d80 ) 8002d18: 685b ldr r3, [r3, #4] 8002d1a: 4a1e ldr r2, [pc, #120] @ (8002d94 ) 8002d1c: 4013 ands r3, r2 8002d1e: 0019 movs r1, r3 8002d20: 687b ldr r3, [r7, #4] 8002d22: 6ada ldr r2, [r3, #44] @ 0x2c 8002d24: 687b ldr r3, [r7, #4] 8002d26: 6a9b ldr r3, [r3, #40] @ 0x28 8002d28: 431a orrs r2, r3 8002d2a: 4b15 ldr r3, [pc, #84] @ (8002d80 ) 8002d2c: 430a orrs r2, r1 8002d2e: 605a str r2, [r3, #4] RCC_OscInitStruct->PLL.PREDIV, RCC_OscInitStruct->PLL.PLLMUL); /* Enable the main PLL. */ __HAL_RCC_PLL_ENABLE(); 8002d30: 4b13 ldr r3, [pc, #76] @ (8002d80 ) 8002d32: 681a ldr r2, [r3, #0] 8002d34: 4b12 ldr r3, [pc, #72] @ (8002d80 ) 8002d36: 2180 movs r1, #128 @ 0x80 8002d38: 0449 lsls r1, r1, #17 8002d3a: 430a orrs r2, r1 8002d3c: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 8002d3e: f7fd fc25 bl 800058c 8002d42: 0003 movs r3, r0 8002d44: 61bb str r3, [r7, #24] /* Wait till PLL is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET) 8002d46: e008 b.n 8002d5a { if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE) 8002d48: f7fd fc20 bl 800058c 8002d4c: 0002 movs r2, r0 8002d4e: 69bb ldr r3, [r7, #24] 8002d50: 1ad3 subs r3, r2, r3 8002d52: 2b02 cmp r3, #2 8002d54: d901 bls.n 8002d5a { return HAL_TIMEOUT; 8002d56: 2303 movs r3, #3 8002d58: e054 b.n 8002e04 while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET) 8002d5a: 4b09 ldr r3, [pc, #36] @ (8002d80 ) 8002d5c: 681a ldr r2, [r3, #0] 8002d5e: 2380 movs r3, #128 @ 0x80 8002d60: 049b lsls r3, r3, #18 8002d62: 4013 ands r3, r2 8002d64: d0f0 beq.n 8002d48 8002d66: e04c b.n 8002e02 } } else { /* Disable the main PLL. */ __HAL_RCC_PLL_DISABLE(); 8002d68: 4b05 ldr r3, [pc, #20] @ (8002d80 ) 8002d6a: 681a ldr r2, [r3, #0] 8002d6c: 4b04 ldr r3, [pc, #16] @ (8002d80 ) 8002d6e: 4908 ldr r1, [pc, #32] @ (8002d90 ) 8002d70: 400a ands r2, r1 8002d72: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 8002d74: f7fd fc0a bl 800058c 8002d78: 0003 movs r3, r0 8002d7a: 61bb str r3, [r7, #24] /* Wait till PLL is disabled */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) 8002d7c: e015 b.n 8002daa 8002d7e: 46c0 nop @ (mov r8, r8) 8002d80: 40021000 .word 0x40021000 8002d84: 00001388 .word 0x00001388 8002d88: efffffff .word 0xefffffff 8002d8c: fffeffff .word 0xfffeffff 8002d90: feffffff .word 0xfeffffff 8002d94: ffc27fff .word 0xffc27fff { if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE) 8002d98: f7fd fbf8 bl 800058c 8002d9c: 0002 movs r2, r0 8002d9e: 69bb ldr r3, [r7, #24] 8002da0: 1ad3 subs r3, r2, r3 8002da2: 2b02 cmp r3, #2 8002da4: d901 bls.n 8002daa { return HAL_TIMEOUT; 8002da6: 2303 movs r3, #3 8002da8: e02c b.n 8002e04 while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) 8002daa: 4b18 ldr r3, [pc, #96] @ (8002e0c ) 8002dac: 681a ldr r2, [r3, #0] 8002dae: 2380 movs r3, #128 @ 0x80 8002db0: 049b lsls r3, r3, #18 8002db2: 4013 ands r3, r2 8002db4: d1f0 bne.n 8002d98 8002db6: e024 b.n 8002e02 } } else { /* Check if there is a request to disable the PLL used as System clock source */ if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) 8002db8: 687b ldr r3, [r7, #4] 8002dba: 6a5b ldr r3, [r3, #36] @ 0x24 8002dbc: 2b01 cmp r3, #1 8002dbe: d101 bne.n 8002dc4 { return HAL_ERROR; 8002dc0: 2301 movs r3, #1 8002dc2: e01f b.n 8002e04 } else { /* Do not return HAL_ERROR if request repeats the current configuration */ pll_config = RCC->CFGR; 8002dc4: 4b11 ldr r3, [pc, #68] @ (8002e0c ) 8002dc6: 685b ldr r3, [r3, #4] 8002dc8: 617b str r3, [r7, #20] pll_config2 = RCC->CFGR2; 8002dca: 4b10 ldr r3, [pc, #64] @ (8002e0c ) 8002dcc: 6adb ldr r3, [r3, #44] @ 0x2c 8002dce: 613b str r3, [r7, #16] if((READ_BIT(pll_config, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 8002dd0: 697a ldr r2, [r7, #20] 8002dd2: 23c0 movs r3, #192 @ 0xc0 8002dd4: 025b lsls r3, r3, #9 8002dd6: 401a ands r2, r3 8002dd8: 687b ldr r3, [r7, #4] 8002dda: 6a9b ldr r3, [r3, #40] @ 0x28 8002ddc: 429a cmp r2, r3 8002dde: d10e bne.n 8002dfe (READ_BIT(pll_config2, RCC_CFGR2_PREDIV) != RCC_OscInitStruct->PLL.PREDIV) || 8002de0: 693b ldr r3, [r7, #16] 8002de2: 220f movs r2, #15 8002de4: 401a ands r2, r3 8002de6: 687b ldr r3, [r7, #4] 8002de8: 6b1b ldr r3, [r3, #48] @ 0x30 if((READ_BIT(pll_config, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 8002dea: 429a cmp r2, r3 8002dec: d107 bne.n 8002dfe (READ_BIT(pll_config, RCC_CFGR_PLLMUL) != RCC_OscInitStruct->PLL.PLLMUL)) 8002dee: 697a ldr r2, [r7, #20] 8002df0: 23f0 movs r3, #240 @ 0xf0 8002df2: 039b lsls r3, r3, #14 8002df4: 401a ands r2, r3 8002df6: 687b ldr r3, [r7, #4] 8002df8: 6adb ldr r3, [r3, #44] @ 0x2c (READ_BIT(pll_config2, RCC_CFGR2_PREDIV) != RCC_OscInitStruct->PLL.PREDIV) || 8002dfa: 429a cmp r2, r3 8002dfc: d001 beq.n 8002e02 { return HAL_ERROR; 8002dfe: 2301 movs r3, #1 8002e00: e000 b.n 8002e04 } } } } return HAL_OK; 8002e02: 2300 movs r3, #0 } 8002e04: 0018 movs r0, r3 8002e06: 46bd mov sp, r7 8002e08: b008 add sp, #32 8002e0a: bd80 pop {r7, pc} 8002e0c: 40021000 .word 0x40021000 08002e10 : * You can use @ref HAL_RCC_GetClockConfig() function to know which clock is * currently used as system clock source. * @retval HAL status */ HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency) { 8002e10: b580 push {r7, lr} 8002e12: b084 sub sp, #16 8002e14: af00 add r7, sp, #0 8002e16: 6078 str r0, [r7, #4] 8002e18: 6039 str r1, [r7, #0] uint32_t tickstart; /* Check Null pointer */ if(RCC_ClkInitStruct == NULL) 8002e1a: 687b ldr r3, [r7, #4] 8002e1c: 2b00 cmp r3, #0 8002e1e: d101 bne.n 8002e24 { return HAL_ERROR; 8002e20: 2301 movs r3, #1 8002e22: e0bf b.n 8002fa4 /* 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) of the device. */ /* Increasing the number of wait states because of higher CPU frequency */ if(FLatency > __HAL_FLASH_GET_LATENCY()) 8002e24: 4b61 ldr r3, [pc, #388] @ (8002fac ) 8002e26: 681b ldr r3, [r3, #0] 8002e28: 2201 movs r2, #1 8002e2a: 4013 ands r3, r2 8002e2c: 683a ldr r2, [r7, #0] 8002e2e: 429a cmp r2, r3 8002e30: d911 bls.n 8002e56 { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ __HAL_FLASH_SET_LATENCY(FLatency); 8002e32: 4b5e ldr r3, [pc, #376] @ (8002fac ) 8002e34: 681b ldr r3, [r3, #0] 8002e36: 2201 movs r2, #1 8002e38: 4393 bics r3, r2 8002e3a: 0019 movs r1, r3 8002e3c: 4b5b ldr r3, [pc, #364] @ (8002fac ) 8002e3e: 683a ldr r2, [r7, #0] 8002e40: 430a orrs r2, r1 8002e42: 601a str r2, [r3, #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) 8002e44: 4b59 ldr r3, [pc, #356] @ (8002fac ) 8002e46: 681b ldr r3, [r3, #0] 8002e48: 2201 movs r2, #1 8002e4a: 4013 ands r3, r2 8002e4c: 683a ldr r2, [r7, #0] 8002e4e: 429a cmp r2, r3 8002e50: d001 beq.n 8002e56 { return HAL_ERROR; 8002e52: 2301 movs r3, #1 8002e54: e0a6 b.n 8002fa4 } } /*-------------------------- HCLK Configuration --------------------------*/ if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) 8002e56: 687b ldr r3, [r7, #4] 8002e58: 681b ldr r3, [r3, #0] 8002e5a: 2202 movs r2, #2 8002e5c: 4013 ands r3, r2 8002e5e: d015 beq.n 8002e8c { /* Set the highest APB divider in order to ensure that we do not go through a non-spec phase whatever we decrease or increase HCLK. */ if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) 8002e60: 687b ldr r3, [r7, #4] 8002e62: 681b ldr r3, [r3, #0] 8002e64: 2204 movs r2, #4 8002e66: 4013 ands r3, r2 8002e68: d006 beq.n 8002e78 { MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE, RCC_HCLK_DIV16); 8002e6a: 4b51 ldr r3, [pc, #324] @ (8002fb0 ) 8002e6c: 685a ldr r2, [r3, #4] 8002e6e: 4b50 ldr r3, [pc, #320] @ (8002fb0 ) 8002e70: 21e0 movs r1, #224 @ 0xe0 8002e72: 00c9 lsls r1, r1, #3 8002e74: 430a orrs r2, r1 8002e76: 605a str r2, [r3, #4] } /* Set the new HCLK clock divider */ assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider)); MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider); 8002e78: 4b4d ldr r3, [pc, #308] @ (8002fb0 ) 8002e7a: 685b ldr r3, [r3, #4] 8002e7c: 22f0 movs r2, #240 @ 0xf0 8002e7e: 4393 bics r3, r2 8002e80: 0019 movs r1, r3 8002e82: 687b ldr r3, [r7, #4] 8002e84: 689a ldr r2, [r3, #8] 8002e86: 4b4a ldr r3, [pc, #296] @ (8002fb0 ) 8002e88: 430a orrs r2, r1 8002e8a: 605a str r2, [r3, #4] } /*------------------------- SYSCLK Configuration ---------------------------*/ if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK) 8002e8c: 687b ldr r3, [r7, #4] 8002e8e: 681b ldr r3, [r3, #0] 8002e90: 2201 movs r2, #1 8002e92: 4013 ands r3, r2 8002e94: d04c beq.n 8002f30 { assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource)); /* HSE is selected as System Clock Source */ if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE) 8002e96: 687b ldr r3, [r7, #4] 8002e98: 685b ldr r3, [r3, #4] 8002e9a: 2b01 cmp r3, #1 8002e9c: d107 bne.n 8002eae { /* Check the HSE ready flag */ if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET) 8002e9e: 4b44 ldr r3, [pc, #272] @ (8002fb0 ) 8002ea0: 681a ldr r2, [r3, #0] 8002ea2: 2380 movs r3, #128 @ 0x80 8002ea4: 029b lsls r3, r3, #10 8002ea6: 4013 ands r3, r2 8002ea8: d120 bne.n 8002eec { return HAL_ERROR; 8002eaa: 2301 movs r3, #1 8002eac: e07a b.n 8002fa4 } } /* PLL is selected as System Clock Source */ else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) 8002eae: 687b ldr r3, [r7, #4] 8002eb0: 685b ldr r3, [r3, #4] 8002eb2: 2b02 cmp r3, #2 8002eb4: d107 bne.n 8002ec6 { /* Check the PLL ready flag */ if(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET) 8002eb6: 4b3e ldr r3, [pc, #248] @ (8002fb0 ) 8002eb8: 681a ldr r2, [r3, #0] 8002eba: 2380 movs r3, #128 @ 0x80 8002ebc: 049b lsls r3, r3, #18 8002ebe: 4013 ands r3, r2 8002ec0: d114 bne.n 8002eec { return HAL_ERROR; 8002ec2: 2301 movs r3, #1 8002ec4: e06e b.n 8002fa4 } } #if defined(RCC_CFGR_SWS_HSI48) /* HSI48 is selected as System Clock Source */ else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSI48) 8002ec6: 687b ldr r3, [r7, #4] 8002ec8: 685b ldr r3, [r3, #4] 8002eca: 2b03 cmp r3, #3 8002ecc: d107 bne.n 8002ede { /* Check the HSI48 ready flag */ if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) == RESET) 8002ece: 4b38 ldr r3, [pc, #224] @ (8002fb0 ) 8002ed0: 6b5a ldr r2, [r3, #52] @ 0x34 8002ed2: 2380 movs r3, #128 @ 0x80 8002ed4: 029b lsls r3, r3, #10 8002ed6: 4013 ands r3, r2 8002ed8: d108 bne.n 8002eec { return HAL_ERROR; 8002eda: 2301 movs r3, #1 8002edc: e062 b.n 8002fa4 #endif /* RCC_CFGR_SWS_HSI48 */ /* HSI is selected as System Clock Source */ else { /* Check the HSI ready flag */ if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) 8002ede: 4b34 ldr r3, [pc, #208] @ (8002fb0 ) 8002ee0: 681b ldr r3, [r3, #0] 8002ee2: 2202 movs r2, #2 8002ee4: 4013 ands r3, r2 8002ee6: d101 bne.n 8002eec { return HAL_ERROR; 8002ee8: 2301 movs r3, #1 8002eea: e05b b.n 8002fa4 } } __HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource); 8002eec: 4b30 ldr r3, [pc, #192] @ (8002fb0 ) 8002eee: 685b ldr r3, [r3, #4] 8002ef0: 2203 movs r2, #3 8002ef2: 4393 bics r3, r2 8002ef4: 0019 movs r1, r3 8002ef6: 687b ldr r3, [r7, #4] 8002ef8: 685a ldr r2, [r3, #4] 8002efa: 4b2d ldr r3, [pc, #180] @ (8002fb0 ) 8002efc: 430a orrs r2, r1 8002efe: 605a str r2, [r3, #4] /* Get Start Tick */ tickstart = HAL_GetTick(); 8002f00: f7fd fb44 bl 800058c 8002f04: 0003 movs r3, r0 8002f06: 60fb str r3, [r7, #12] while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) 8002f08: e009 b.n 8002f1e { if((HAL_GetTick() - tickstart ) > CLOCKSWITCH_TIMEOUT_VALUE) 8002f0a: f7fd fb3f bl 800058c 8002f0e: 0002 movs r2, r0 8002f10: 68fb ldr r3, [r7, #12] 8002f12: 1ad3 subs r3, r2, r3 8002f14: 4a27 ldr r2, [pc, #156] @ (8002fb4 ) 8002f16: 4293 cmp r3, r2 8002f18: d901 bls.n 8002f1e { return HAL_TIMEOUT; 8002f1a: 2303 movs r3, #3 8002f1c: e042 b.n 8002fa4 while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) 8002f1e: 4b24 ldr r3, [pc, #144] @ (8002fb0 ) 8002f20: 685b ldr r3, [r3, #4] 8002f22: 220c movs r2, #12 8002f24: 401a ands r2, r3 8002f26: 687b ldr r3, [r7, #4] 8002f28: 685b ldr r3, [r3, #4] 8002f2a: 009b lsls r3, r3, #2 8002f2c: 429a cmp r2, r3 8002f2e: d1ec bne.n 8002f0a } } } /* Decreasing the number of wait states because of lower CPU frequency */ if(FLatency < __HAL_FLASH_GET_LATENCY()) 8002f30: 4b1e ldr r3, [pc, #120] @ (8002fac ) 8002f32: 681b ldr r3, [r3, #0] 8002f34: 2201 movs r2, #1 8002f36: 4013 ands r3, r2 8002f38: 683a ldr r2, [r7, #0] 8002f3a: 429a cmp r2, r3 8002f3c: d211 bcs.n 8002f62 { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ __HAL_FLASH_SET_LATENCY(FLatency); 8002f3e: 4b1b ldr r3, [pc, #108] @ (8002fac ) 8002f40: 681b ldr r3, [r3, #0] 8002f42: 2201 movs r2, #1 8002f44: 4393 bics r3, r2 8002f46: 0019 movs r1, r3 8002f48: 4b18 ldr r3, [pc, #96] @ (8002fac ) 8002f4a: 683a ldr r2, [r7, #0] 8002f4c: 430a orrs r2, r1 8002f4e: 601a str r2, [r3, #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) 8002f50: 4b16 ldr r3, [pc, #88] @ (8002fac ) 8002f52: 681b ldr r3, [r3, #0] 8002f54: 2201 movs r2, #1 8002f56: 4013 ands r3, r2 8002f58: 683a ldr r2, [r7, #0] 8002f5a: 429a cmp r2, r3 8002f5c: d001 beq.n 8002f62 { return HAL_ERROR; 8002f5e: 2301 movs r3, #1 8002f60: e020 b.n 8002fa4 } } /*-------------------------- PCLK1 Configuration ---------------------------*/ if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) 8002f62: 687b ldr r3, [r7, #4] 8002f64: 681b ldr r3, [r3, #0] 8002f66: 2204 movs r2, #4 8002f68: 4013 ands r3, r2 8002f6a: d009 beq.n 8002f80 { assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider)); MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE, RCC_ClkInitStruct->APB1CLKDivider); 8002f6c: 4b10 ldr r3, [pc, #64] @ (8002fb0 ) 8002f6e: 685b ldr r3, [r3, #4] 8002f70: 4a11 ldr r2, [pc, #68] @ (8002fb8 ) 8002f72: 4013 ands r3, r2 8002f74: 0019 movs r1, r3 8002f76: 687b ldr r3, [r7, #4] 8002f78: 68da ldr r2, [r3, #12] 8002f7a: 4b0d ldr r3, [pc, #52] @ (8002fb0 ) 8002f7c: 430a orrs r2, r1 8002f7e: 605a str r2, [r3, #4] } /* Update the SystemCoreClock global variable */ SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE)>> RCC_CFGR_HPRE_BITNUMBER]; 8002f80: f000 f820 bl 8002fc4 8002f84: 0001 movs r1, r0 8002f86: 4b0a ldr r3, [pc, #40] @ (8002fb0 ) 8002f88: 685b ldr r3, [r3, #4] 8002f8a: 091b lsrs r3, r3, #4 8002f8c: 220f movs r2, #15 8002f8e: 4013 ands r3, r2 8002f90: 4a0a ldr r2, [pc, #40] @ (8002fbc ) 8002f92: 5cd3 ldrb r3, [r2, r3] 8002f94: 000a movs r2, r1 8002f96: 40da lsrs r2, r3 8002f98: 4b09 ldr r3, [pc, #36] @ (8002fc0 ) 8002f9a: 601a str r2, [r3, #0] /* Configure the source of time base considering new system clocks settings*/ HAL_InitTick (TICK_INT_PRIORITY); 8002f9c: 2003 movs r0, #3 8002f9e: f7fd faaf bl 8000500 return HAL_OK; 8002fa2: 2300 movs r3, #0 } 8002fa4: 0018 movs r0, r3 8002fa6: 46bd mov sp, r7 8002fa8: b004 add sp, #16 8002faa: bd80 pop {r7, pc} 8002fac: 40022000 .word 0x40022000 8002fb0: 40021000 .word 0x40021000 8002fb4: 00001388 .word 0x00001388 8002fb8: fffff8ff .word 0xfffff8ff 8002fbc: 0800751c .word 0x0800751c 8002fc0: 20000018 .word 0x20000018 08002fc4 : * right SYSCLK value. Otherwise, any configuration based on this function will be incorrect. * * @retval SYSCLK frequency */ uint32_t HAL_RCC_GetSysClockFreq(void) { 8002fc4: b580 push {r7, lr} 8002fc6: b086 sub sp, #24 8002fc8: af00 add r7, sp, #0 static const uint8_t aPLLMULFactorTable[16U] = { 2U, 3U, 4U, 5U, 6U, 7U, 8U, 9U, 10U, 11U, 12U, 13U, 14U, 15U, 16U, 16U}; static const uint8_t aPredivFactorTable[16U] = { 1U, 2U, 3U, 4U, 5U, 6U, 7U, 8U, 9U,10U, 11U, 12U, 13U, 14U, 15U, 16U}; uint32_t tmpreg = 0U, prediv = 0U, pllclk = 0U, pllmul = 0U; 8002fca: 2300 movs r3, #0 8002fcc: 60fb str r3, [r7, #12] 8002fce: 2300 movs r3, #0 8002fd0: 60bb str r3, [r7, #8] 8002fd2: 2300 movs r3, #0 8002fd4: 617b str r3, [r7, #20] 8002fd6: 2300 movs r3, #0 8002fd8: 607b str r3, [r7, #4] uint32_t sysclockfreq = 0U; 8002fda: 2300 movs r3, #0 8002fdc: 613b str r3, [r7, #16] tmpreg = RCC->CFGR; 8002fde: 4b2d ldr r3, [pc, #180] @ (8003094 ) 8002fe0: 685b ldr r3, [r3, #4] 8002fe2: 60fb str r3, [r7, #12] /* Get SYSCLK source -------------------------------------------------------*/ switch (tmpreg & RCC_CFGR_SWS) 8002fe4: 68fb ldr r3, [r7, #12] 8002fe6: 220c movs r2, #12 8002fe8: 4013 ands r3, r2 8002fea: 2b0c cmp r3, #12 8002fec: d046 beq.n 800307c 8002fee: d848 bhi.n 8003082 8002ff0: 2b04 cmp r3, #4 8002ff2: d002 beq.n 8002ffa 8002ff4: 2b08 cmp r3, #8 8002ff6: d003 beq.n 8003000 8002ff8: e043 b.n 8003082 { case RCC_SYSCLKSOURCE_STATUS_HSE: /* HSE used as system clock */ { sysclockfreq = HSE_VALUE; 8002ffa: 4b27 ldr r3, [pc, #156] @ (8003098 ) 8002ffc: 613b str r3, [r7, #16] break; 8002ffe: e043 b.n 8003088 } case RCC_SYSCLKSOURCE_STATUS_PLLCLK: /* PLL used as system clock */ { pllmul = aPLLMULFactorTable[(uint32_t)(tmpreg & RCC_CFGR_PLLMUL) >> RCC_CFGR_PLLMUL_BITNUMBER]; 8003000: 68fb ldr r3, [r7, #12] 8003002: 0c9b lsrs r3, r3, #18 8003004: 220f movs r2, #15 8003006: 4013 ands r3, r2 8003008: 4a24 ldr r2, [pc, #144] @ (800309c ) 800300a: 5cd3 ldrb r3, [r2, r3] 800300c: 607b str r3, [r7, #4] prediv = aPredivFactorTable[(uint32_t)(RCC->CFGR2 & RCC_CFGR2_PREDIV) >> RCC_CFGR2_PREDIV_BITNUMBER]; 800300e: 4b21 ldr r3, [pc, #132] @ (8003094 ) 8003010: 6adb ldr r3, [r3, #44] @ 0x2c 8003012: 220f movs r2, #15 8003014: 4013 ands r3, r2 8003016: 4a22 ldr r2, [pc, #136] @ (80030a0 ) 8003018: 5cd3 ldrb r3, [r2, r3] 800301a: 60bb str r3, [r7, #8] if ((tmpreg & RCC_CFGR_PLLSRC) == RCC_PLLSOURCE_HSE) 800301c: 68fa ldr r2, [r7, #12] 800301e: 23c0 movs r3, #192 @ 0xc0 8003020: 025b lsls r3, r3, #9 8003022: 401a ands r2, r3 8003024: 2380 movs r3, #128 @ 0x80 8003026: 025b lsls r3, r3, #9 8003028: 429a cmp r2, r3 800302a: d109 bne.n 8003040 { /* HSE used as PLL clock source : PLLCLK = HSE/PREDIV * PLLMUL */ pllclk = (uint32_t)((uint64_t) HSE_VALUE / (uint64_t) (prediv)) * ((uint64_t) pllmul); 800302c: 68b9 ldr r1, [r7, #8] 800302e: 481a ldr r0, [pc, #104] @ (8003098 ) 8003030: f7fd f86a bl 8000108 <__udivsi3> 8003034: 0003 movs r3, r0 8003036: 001a movs r2, r3 8003038: 687b ldr r3, [r7, #4] 800303a: 4353 muls r3, r2 800303c: 617b str r3, [r7, #20] 800303e: e01a b.n 8003076 } #if defined(RCC_CFGR_PLLSRC_HSI48_PREDIV) else if ((tmpreg & RCC_CFGR_PLLSRC) == RCC_PLLSOURCE_HSI48) 8003040: 68fa ldr r2, [r7, #12] 8003042: 23c0 movs r3, #192 @ 0xc0 8003044: 025b lsls r3, r3, #9 8003046: 401a ands r2, r3 8003048: 23c0 movs r3, #192 @ 0xc0 800304a: 025b lsls r3, r3, #9 800304c: 429a cmp r2, r3 800304e: d109 bne.n 8003064 { /* HSI48 used as PLL clock source : PLLCLK = HSI48/PREDIV * PLLMUL */ pllclk = (uint32_t)((uint64_t) HSI48_VALUE / (uint64_t) (prediv)) * ((uint64_t) pllmul); 8003050: 68b9 ldr r1, [r7, #8] 8003052: 4814 ldr r0, [pc, #80] @ (80030a4 ) 8003054: f7fd f858 bl 8000108 <__udivsi3> 8003058: 0003 movs r3, r0 800305a: 001a movs r2, r3 800305c: 687b ldr r3, [r7, #4] 800305e: 4353 muls r3, r2 8003060: 617b str r3, [r7, #20] 8003062: e008 b.n 8003076 #endif /* RCC_CFGR_PLLSRC_HSI48_PREDIV */ else { #if (defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F070x6) || defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || defined(STM32F070xB) || defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F030xC)) /* HSI used as PLL clock source : PLLCLK = HSI/PREDIV * PLLMUL */ pllclk = (uint32_t)((uint64_t) HSI_VALUE / (uint64_t) (prediv)) * ((uint64_t) pllmul); 8003064: 68b9 ldr r1, [r7, #8] 8003066: 480c ldr r0, [pc, #48] @ (8003098 ) 8003068: f7fd f84e bl 8000108 <__udivsi3> 800306c: 0003 movs r3, r0 800306e: 001a movs r2, r3 8003070: 687b ldr r3, [r7, #4] 8003072: 4353 muls r3, r2 8003074: 617b str r3, [r7, #20] #else /* HSI used as PLL clock source : PLLCLK = HSI/2 * PLLMUL */ pllclk = (uint32_t)((uint64_t) (HSI_VALUE >> 1U) * ((uint64_t) pllmul)); #endif } sysclockfreq = pllclk; 8003076: 697b ldr r3, [r7, #20] 8003078: 613b str r3, [r7, #16] break; 800307a: e005 b.n 8003088 } #if defined(RCC_CFGR_SWS_HSI48) case RCC_SYSCLKSOURCE_STATUS_HSI48: /* HSI48 used as system clock source */ { sysclockfreq = HSI48_VALUE; 800307c: 4b09 ldr r3, [pc, #36] @ (80030a4 ) 800307e: 613b str r3, [r7, #16] break; 8003080: e002 b.n 8003088 } #endif /* RCC_CFGR_SWS_HSI48 */ case RCC_SYSCLKSOURCE_STATUS_HSI: /* HSI used as system clock source */ default: /* HSI used as system clock */ { sysclockfreq = HSI_VALUE; 8003082: 4b05 ldr r3, [pc, #20] @ (8003098 ) 8003084: 613b str r3, [r7, #16] break; 8003086: 46c0 nop @ (mov r8, r8) } } return sysclockfreq; 8003088: 693b ldr r3, [r7, #16] } 800308a: 0018 movs r0, r3 800308c: 46bd mov sp, r7 800308e: b006 add sp, #24 8003090: bd80 pop {r7, pc} 8003092: 46c0 nop @ (mov r8, r8) 8003094: 40021000 .word 0x40021000 8003098: 007a1200 .word 0x007a1200 800309c: 0800752c .word 0x0800752c 80030a0: 0800753c .word 0x0800753c 80030a4: 02dc6c00 .word 0x02dc6c00 080030a8 : * the backup registers) and RCC_BDCR register are set to their reset values. * * @retval HAL status */ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit) { 80030a8: b580 push {r7, lr} 80030aa: b086 sub sp, #24 80030ac: af00 add r7, sp, #0 80030ae: 6078 str r0, [r7, #4] uint32_t tickstart = 0U; 80030b0: 2300 movs r3, #0 80030b2: 613b str r3, [r7, #16] uint32_t temp_reg = 0U; 80030b4: 2300 movs r3, #0 80030b6: 60fb str r3, [r7, #12] /* Check the parameters */ assert_param(IS_RCC_PERIPHCLOCK(PeriphClkInit->PeriphClockSelection)); /*---------------------------- RTC configuration -------------------------------*/ if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RTC) == (RCC_PERIPHCLK_RTC)) 80030b8: 687b ldr r3, [r7, #4] 80030ba: 681a ldr r2, [r3, #0] 80030bc: 2380 movs r3, #128 @ 0x80 80030be: 025b lsls r3, r3, #9 80030c0: 4013 ands r3, r2 80030c2: d100 bne.n 80030c6 80030c4: e08e b.n 80031e4 { /* check for RTC Parameters used to output RTCCLK */ assert_param(IS_RCC_RTCCLKSOURCE(PeriphClkInit->RTCClockSelection)); FlagStatus pwrclkchanged = RESET; 80030c6: 2017 movs r0, #23 80030c8: 183b adds r3, r7, r0 80030ca: 2200 movs r2, #0 80030cc: 701a strb r2, [r3, #0] /* As soon as function is called to change RTC clock source, activation of the power domain is done. */ /* Requires to enable write access to Backup Domain of necessary */ if(__HAL_RCC_PWR_IS_CLK_DISABLED()) 80030ce: 4b67 ldr r3, [pc, #412] @ (800326c ) 80030d0: 69da ldr r2, [r3, #28] 80030d2: 2380 movs r3, #128 @ 0x80 80030d4: 055b lsls r3, r3, #21 80030d6: 4013 ands r3, r2 80030d8: d110 bne.n 80030fc { __HAL_RCC_PWR_CLK_ENABLE(); 80030da: 4b64 ldr r3, [pc, #400] @ (800326c ) 80030dc: 69da ldr r2, [r3, #28] 80030de: 4b63 ldr r3, [pc, #396] @ (800326c ) 80030e0: 2180 movs r1, #128 @ 0x80 80030e2: 0549 lsls r1, r1, #21 80030e4: 430a orrs r2, r1 80030e6: 61da str r2, [r3, #28] 80030e8: 4b60 ldr r3, [pc, #384] @ (800326c ) 80030ea: 69da ldr r2, [r3, #28] 80030ec: 2380 movs r3, #128 @ 0x80 80030ee: 055b lsls r3, r3, #21 80030f0: 4013 ands r3, r2 80030f2: 60bb str r3, [r7, #8] 80030f4: 68bb ldr r3, [r7, #8] pwrclkchanged = SET; 80030f6: 183b adds r3, r7, r0 80030f8: 2201 movs r2, #1 80030fa: 701a strb r2, [r3, #0] } if(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 80030fc: 4b5c ldr r3, [pc, #368] @ (8003270 ) 80030fe: 681a ldr r2, [r3, #0] 8003100: 2380 movs r3, #128 @ 0x80 8003102: 005b lsls r3, r3, #1 8003104: 4013 ands r3, r2 8003106: d11a bne.n 800313e { /* Enable write access to Backup domain */ SET_BIT(PWR->CR, PWR_CR_DBP); 8003108: 4b59 ldr r3, [pc, #356] @ (8003270 ) 800310a: 681a ldr r2, [r3, #0] 800310c: 4b58 ldr r3, [pc, #352] @ (8003270 ) 800310e: 2180 movs r1, #128 @ 0x80 8003110: 0049 lsls r1, r1, #1 8003112: 430a orrs r2, r1 8003114: 601a str r2, [r3, #0] /* Wait for Backup domain Write protection disable */ tickstart = HAL_GetTick(); 8003116: f7fd fa39 bl 800058c 800311a: 0003 movs r3, r0 800311c: 613b str r3, [r7, #16] while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 800311e: e008 b.n 8003132 { if((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) 8003120: f7fd fa34 bl 800058c 8003124: 0002 movs r2, r0 8003126: 693b ldr r3, [r7, #16] 8003128: 1ad3 subs r3, r2, r3 800312a: 2b64 cmp r3, #100 @ 0x64 800312c: d901 bls.n 8003132 { return HAL_TIMEOUT; 800312e: 2303 movs r3, #3 8003130: e097 b.n 8003262 while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 8003132: 4b4f ldr r3, [pc, #316] @ (8003270 ) 8003134: 681a ldr r2, [r3, #0] 8003136: 2380 movs r3, #128 @ 0x80 8003138: 005b lsls r3, r3, #1 800313a: 4013 ands r3, r2 800313c: d0f0 beq.n 8003120 } } } /* Reset the Backup domain only if the RTC Clock source selection is modified from reset value */ temp_reg = (RCC->BDCR & RCC_BDCR_RTCSEL); 800313e: 4b4b ldr r3, [pc, #300] @ (800326c ) 8003140: 6a1a ldr r2, [r3, #32] 8003142: 23c0 movs r3, #192 @ 0xc0 8003144: 009b lsls r3, r3, #2 8003146: 4013 ands r3, r2 8003148: 60fb str r3, [r7, #12] if((temp_reg != 0x00000000U) && (temp_reg != (PeriphClkInit->RTCClockSelection & RCC_BDCR_RTCSEL))) 800314a: 68fb ldr r3, [r7, #12] 800314c: 2b00 cmp r3, #0 800314e: d034 beq.n 80031ba 8003150: 687b ldr r3, [r7, #4] 8003152: 685a ldr r2, [r3, #4] 8003154: 23c0 movs r3, #192 @ 0xc0 8003156: 009b lsls r3, r3, #2 8003158: 4013 ands r3, r2 800315a: 68fa ldr r2, [r7, #12] 800315c: 429a cmp r2, r3 800315e: d02c beq.n 80031ba { /* Store the content of BDCR register before the reset of Backup Domain */ temp_reg = (RCC->BDCR & ~(RCC_BDCR_RTCSEL)); 8003160: 4b42 ldr r3, [pc, #264] @ (800326c ) 8003162: 6a1b ldr r3, [r3, #32] 8003164: 4a43 ldr r2, [pc, #268] @ (8003274 ) 8003166: 4013 ands r3, r2 8003168: 60fb str r3, [r7, #12] /* RTC Clock selection can be changed only if the Backup Domain is reset */ __HAL_RCC_BACKUPRESET_FORCE(); 800316a: 4b40 ldr r3, [pc, #256] @ (800326c ) 800316c: 6a1a ldr r2, [r3, #32] 800316e: 4b3f ldr r3, [pc, #252] @ (800326c ) 8003170: 2180 movs r1, #128 @ 0x80 8003172: 0249 lsls r1, r1, #9 8003174: 430a orrs r2, r1 8003176: 621a str r2, [r3, #32] __HAL_RCC_BACKUPRESET_RELEASE(); 8003178: 4b3c ldr r3, [pc, #240] @ (800326c ) 800317a: 6a1a ldr r2, [r3, #32] 800317c: 4b3b ldr r3, [pc, #236] @ (800326c ) 800317e: 493e ldr r1, [pc, #248] @ (8003278 ) 8003180: 400a ands r2, r1 8003182: 621a str r2, [r3, #32] /* Restore the Content of BDCR register */ RCC->BDCR = temp_reg; 8003184: 4b39 ldr r3, [pc, #228] @ (800326c ) 8003186: 68fa ldr r2, [r7, #12] 8003188: 621a str r2, [r3, #32] /* Wait for LSERDY if LSE was enabled */ if (HAL_IS_BIT_SET(temp_reg, RCC_BDCR_LSEON)) 800318a: 68fb ldr r3, [r7, #12] 800318c: 2201 movs r2, #1 800318e: 4013 ands r3, r2 8003190: d013 beq.n 80031ba { /* Get Start Tick */ tickstart = HAL_GetTick(); 8003192: f7fd f9fb bl 800058c 8003196: 0003 movs r3, r0 8003198: 613b str r3, [r7, #16] /* Wait till LSE is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) 800319a: e009 b.n 80031b0 { if((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 800319c: f7fd f9f6 bl 800058c 80031a0: 0002 movs r2, r0 80031a2: 693b ldr r3, [r7, #16] 80031a4: 1ad3 subs r3, r2, r3 80031a6: 4a35 ldr r2, [pc, #212] @ (800327c ) 80031a8: 4293 cmp r3, r2 80031aa: d901 bls.n 80031b0 { return HAL_TIMEOUT; 80031ac: 2303 movs r3, #3 80031ae: e058 b.n 8003262 while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) 80031b0: 4b2e ldr r3, [pc, #184] @ (800326c ) 80031b2: 6a1b ldr r3, [r3, #32] 80031b4: 2202 movs r2, #2 80031b6: 4013 ands r3, r2 80031b8: d0f0 beq.n 800319c } } } } __HAL_RCC_RTC_CONFIG(PeriphClkInit->RTCClockSelection); 80031ba: 4b2c ldr r3, [pc, #176] @ (800326c ) 80031bc: 6a1b ldr r3, [r3, #32] 80031be: 4a2d ldr r2, [pc, #180] @ (8003274 ) 80031c0: 4013 ands r3, r2 80031c2: 0019 movs r1, r3 80031c4: 687b ldr r3, [r7, #4] 80031c6: 685a ldr r2, [r3, #4] 80031c8: 4b28 ldr r3, [pc, #160] @ (800326c ) 80031ca: 430a orrs r2, r1 80031cc: 621a str r2, [r3, #32] /* Require to disable power clock if necessary */ if(pwrclkchanged == SET) 80031ce: 2317 movs r3, #23 80031d0: 18fb adds r3, r7, r3 80031d2: 781b ldrb r3, [r3, #0] 80031d4: 2b01 cmp r3, #1 80031d6: d105 bne.n 80031e4 { __HAL_RCC_PWR_CLK_DISABLE(); 80031d8: 4b24 ldr r3, [pc, #144] @ (800326c ) 80031da: 69da ldr r2, [r3, #28] 80031dc: 4b23 ldr r3, [pc, #140] @ (800326c ) 80031de: 4928 ldr r1, [pc, #160] @ (8003280 ) 80031e0: 400a ands r2, r1 80031e2: 61da str r2, [r3, #28] } } /*------------------------------- USART1 Configuration ------------------------*/ if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART1) == RCC_PERIPHCLK_USART1) 80031e4: 687b ldr r3, [r7, #4] 80031e6: 681b ldr r3, [r3, #0] 80031e8: 2201 movs r2, #1 80031ea: 4013 ands r3, r2 80031ec: d009 beq.n 8003202 { /* Check the parameters */ assert_param(IS_RCC_USART1CLKSOURCE(PeriphClkInit->Usart1ClockSelection)); /* Configure the USART1 clock source */ __HAL_RCC_USART1_CONFIG(PeriphClkInit->Usart1ClockSelection); 80031ee: 4b1f ldr r3, [pc, #124] @ (800326c ) 80031f0: 6b1b ldr r3, [r3, #48] @ 0x30 80031f2: 2203 movs r2, #3 80031f4: 4393 bics r3, r2 80031f6: 0019 movs r1, r3 80031f8: 687b ldr r3, [r7, #4] 80031fa: 689a ldr r2, [r3, #8] 80031fc: 4b1b ldr r3, [pc, #108] @ (800326c ) 80031fe: 430a orrs r2, r1 8003200: 631a str r2, [r3, #48] @ 0x30 __HAL_RCC_USART3_CONFIG(PeriphClkInit->Usart3ClockSelection); } #endif /* STM32F091xC || STM32F098xx */ /*------------------------------ I2C1 Configuration ------------------------*/ if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C1) == RCC_PERIPHCLK_I2C1) 8003202: 687b ldr r3, [r7, #4] 8003204: 681b ldr r3, [r3, #0] 8003206: 2220 movs r2, #32 8003208: 4013 ands r3, r2 800320a: d009 beq.n 8003220 { /* Check the parameters */ assert_param(IS_RCC_I2C1CLKSOURCE(PeriphClkInit->I2c1ClockSelection)); /* Configure the I2C1 clock source */ __HAL_RCC_I2C1_CONFIG(PeriphClkInit->I2c1ClockSelection); 800320c: 4b17 ldr r3, [pc, #92] @ (800326c ) 800320e: 6b1b ldr r3, [r3, #48] @ 0x30 8003210: 2210 movs r2, #16 8003212: 4393 bics r3, r2 8003214: 0019 movs r1, r3 8003216: 687b ldr r3, [r7, #4] 8003218: 68da ldr r2, [r3, #12] 800321a: 4b14 ldr r3, [pc, #80] @ (800326c ) 800321c: 430a orrs r2, r1 800321e: 631a str r2, [r3, #48] @ 0x30 } #if defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F072xB) || defined(STM32F078xx) || defined(STM32F070xB) || defined(STM32F070x6) /*------------------------------ USB Configuration ------------------------*/ if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USB) == RCC_PERIPHCLK_USB) 8003220: 687b ldr r3, [r7, #4] 8003222: 681a ldr r2, [r3, #0] 8003224: 2380 movs r3, #128 @ 0x80 8003226: 029b lsls r3, r3, #10 8003228: 4013 ands r3, r2 800322a: d009 beq.n 8003240 { /* Check the parameters */ assert_param(IS_RCC_USBCLKSOURCE(PeriphClkInit->UsbClockSelection)); /* Configure the USB clock source */ __HAL_RCC_USB_CONFIG(PeriphClkInit->UsbClockSelection); 800322c: 4b0f ldr r3, [pc, #60] @ (800326c ) 800322e: 6b1b ldr r3, [r3, #48] @ 0x30 8003230: 2280 movs r2, #128 @ 0x80 8003232: 4393 bics r3, r2 8003234: 0019 movs r1, r3 8003236: 687b ldr r3, [r7, #4] 8003238: 695a ldr r2, [r3, #20] 800323a: 4b0c ldr r3, [pc, #48] @ (800326c ) 800323c: 430a orrs r2, r1 800323e: 631a str r2, [r3, #48] @ 0x30 #if defined(STM32F042x6) || defined(STM32F048xx)\ || defined(STM32F051x8) || defined(STM32F058xx)\ || defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx)\ || defined(STM32F091xC) || defined(STM32F098xx) /*------------------------------ CEC clock Configuration -------------------*/ if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CEC) == RCC_PERIPHCLK_CEC) 8003240: 687b ldr r3, [r7, #4] 8003242: 681a ldr r2, [r3, #0] 8003244: 2380 movs r3, #128 @ 0x80 8003246: 00db lsls r3, r3, #3 8003248: 4013 ands r3, r2 800324a: d009 beq.n 8003260 { /* Check the parameters */ assert_param(IS_RCC_CECCLKSOURCE(PeriphClkInit->CecClockSelection)); /* Configure the CEC clock source */ __HAL_RCC_CEC_CONFIG(PeriphClkInit->CecClockSelection); 800324c: 4b07 ldr r3, [pc, #28] @ (800326c ) 800324e: 6b1b ldr r3, [r3, #48] @ 0x30 8003250: 2240 movs r2, #64 @ 0x40 8003252: 4393 bics r3, r2 8003254: 0019 movs r1, r3 8003256: 687b ldr r3, [r7, #4] 8003258: 691a ldr r2, [r3, #16] 800325a: 4b04 ldr r3, [pc, #16] @ (800326c ) 800325c: 430a orrs r2, r1 800325e: 631a str r2, [r3, #48] @ 0x30 #endif /* STM32F042x6 || STM32F048xx || */ /* STM32F051x8 || STM32F058xx || */ /* STM32F071xB || STM32F072xB || STM32F078xx || */ /* STM32F091xC || STM32F098xx */ return HAL_OK; 8003260: 2300 movs r3, #0 } 8003262: 0018 movs r0, r3 8003264: 46bd mov sp, r7 8003266: b006 add sp, #24 8003268: bd80 pop {r7, pc} 800326a: 46c0 nop @ (mov r8, r8) 800326c: 40021000 .word 0x40021000 8003270: 40007000 .word 0x40007000 8003274: fffffcff .word 0xfffffcff 8003278: fffeffff .word 0xfffeffff 800327c: 00001388 .word 0x00001388 8003280: efffffff .word 0xefffffff 08003284 : * Enables the controller's Global Int in the AHB Config reg * @param USBx Selected device * @retval HAL status */ HAL_StatusTypeDef USB_EnableGlobalInt(USB_TypeDef *USBx) { 8003284: b580 push {r7, lr} 8003286: b084 sub sp, #16 8003288: af00 add r7, sp, #0 800328a: 6078 str r0, [r7, #4] uint32_t winterruptmask; /* Clear pending interrupts */ USBx->ISTR = 0U; 800328c: 687b ldr r3, [r7, #4] 800328e: 2244 movs r2, #68 @ 0x44 8003290: 2100 movs r1, #0 8003292: 5299 strh r1, [r3, r2] /* Set winterruptmask variable */ winterruptmask = USB_CNTR_CTRM | USB_CNTR_WKUPM | 8003294: 4b05 ldr r3, [pc, #20] @ (80032ac ) 8003296: 60fb str r3, [r7, #12] USB_CNTR_SUSPM | USB_CNTR_ERRM | USB_CNTR_SOFM | USB_CNTR_ESOFM | USB_CNTR_RESETM | USB_CNTR_L1REQM; /* Set interrupt mask */ USBx->CNTR = (uint16_t)winterruptmask; 8003298: 68fb ldr r3, [r7, #12] 800329a: b299 uxth r1, r3 800329c: 687b ldr r3, [r7, #4] 800329e: 2240 movs r2, #64 @ 0x40 80032a0: 5299 strh r1, [r3, r2] return HAL_OK; 80032a2: 2300 movs r3, #0 } 80032a4: 0018 movs r0, r3 80032a6: 46bd mov sp, r7 80032a8: b004 add sp, #16 80032aa: bd80 pop {r7, pc} 80032ac: 0000bf80 .word 0x0000bf80 080032b0 : * Disable the controller's Global Int in the AHB Config reg * @param USBx Selected device * @retval HAL status */ HAL_StatusTypeDef USB_DisableGlobalInt(USB_TypeDef *USBx) { 80032b0: b580 push {r7, lr} 80032b2: b084 sub sp, #16 80032b4: af00 add r7, sp, #0 80032b6: 6078 str r0, [r7, #4] uint32_t winterruptmask; /* Set winterruptmask variable */ winterruptmask = USB_CNTR_CTRM | USB_CNTR_WKUPM | 80032b8: 4b09 ldr r3, [pc, #36] @ (80032e0 ) 80032ba: 60fb str r3, [r7, #12] USB_CNTR_SUSPM | USB_CNTR_ERRM | USB_CNTR_SOFM | USB_CNTR_ESOFM | USB_CNTR_RESETM | USB_CNTR_L1REQM; /* Clear interrupt mask */ USBx->CNTR &= (uint16_t)(~winterruptmask); 80032bc: 687b ldr r3, [r7, #4] 80032be: 2240 movs r2, #64 @ 0x40 80032c0: 5a9b ldrh r3, [r3, r2] 80032c2: b29b uxth r3, r3 80032c4: 68fa ldr r2, [r7, #12] 80032c6: b292 uxth r2, r2 80032c8: 43d2 mvns r2, r2 80032ca: b292 uxth r2, r2 80032cc: 4013 ands r3, r2 80032ce: b299 uxth r1, r3 80032d0: 687b ldr r3, [r7, #4] 80032d2: 2240 movs r2, #64 @ 0x40 80032d4: 5299 strh r1, [r3, r2] return HAL_OK; 80032d6: 2300 movs r3, #0 } 80032d8: 0018 movs r0, r3 80032da: 46bd mov sp, r7 80032dc: b004 add sp, #16 80032de: bd80 pop {r7, pc} 80032e0: 0000bf80 .word 0x0000bf80 080032e4 : * @param cfg pointer to a USB_CfgTypeDef structure that contains * the configuration information for the specified USBx peripheral. * @retval HAL status */ HAL_StatusTypeDef USB_DevInit(USB_TypeDef *USBx, USB_CfgTypeDef cfg) { 80032e4: b580 push {r7, lr} 80032e6: b084 sub sp, #16 80032e8: af00 add r7, sp, #0 80032ea: 60f8 str r0, [r7, #12] 80032ec: 1d3b adds r3, r7, #4 80032ee: 6019 str r1, [r3, #0] 80032f0: 605a str r2, [r3, #4] /* Prevent unused argument(s) compilation warning */ UNUSED(cfg); /* Init Device */ /* CNTR_FRES = 1 */ USBx->CNTR = (uint16_t)USB_CNTR_FRES; 80032f2: 68fb ldr r3, [r7, #12] 80032f4: 2240 movs r2, #64 @ 0x40 80032f6: 2101 movs r1, #1 80032f8: 5299 strh r1, [r3, r2] /* CNTR_FRES = 0 */ USBx->CNTR = 0U; 80032fa: 68fb ldr r3, [r7, #12] 80032fc: 2240 movs r2, #64 @ 0x40 80032fe: 2100 movs r1, #0 8003300: 5299 strh r1, [r3, r2] /* Clear pending interrupts */ USBx->ISTR = 0U; 8003302: 68fb ldr r3, [r7, #12] 8003304: 2244 movs r2, #68 @ 0x44 8003306: 2100 movs r1, #0 8003308: 5299 strh r1, [r3, r2] /*Set Btable Address*/ USBx->BTABLE = BTABLE_ADDRESS; 800330a: 68fb ldr r3, [r7, #12] 800330c: 2250 movs r2, #80 @ 0x50 800330e: 2100 movs r1, #0 8003310: 5299 strh r1, [r3, r2] return HAL_OK; 8003312: 2300 movs r3, #0 } 8003314: 0018 movs r0, r3 8003316: 46bd mov sp, r7 8003318: b004 add sp, #16 800331a: bd80 pop {r7, pc} 0800331c : * @param USBx Selected device * @param ep pointer to endpoint structure * @retval HAL status */ HAL_StatusTypeDef USB_ActivateEndpoint(USB_TypeDef *USBx, USB_EPTypeDef *ep) { 800331c: b580 push {r7, lr} 800331e: b09c sub sp, #112 @ 0x70 8003320: af00 add r7, sp, #0 8003322: 6078 str r0, [r7, #4] 8003324: 6039 str r1, [r7, #0] HAL_StatusTypeDef ret = HAL_OK; 8003326: 236f movs r3, #111 @ 0x6f 8003328: 18fb adds r3, r7, r3 800332a: 2200 movs r2, #0 800332c: 701a strb r2, [r3, #0] uint16_t wEpRegVal; wEpRegVal = PCD_GET_ENDPOINT(USBx, ep->num) & USB_EP_T_MASK; 800332e: 687a ldr r2, [r7, #4] 8003330: 683b ldr r3, [r7, #0] 8003332: 781b ldrb r3, [r3, #0] 8003334: 009b lsls r3, r3, #2 8003336: 18d3 adds r3, r2, r3 8003338: 881b ldrh r3, [r3, #0] 800333a: b29a uxth r2, r3 800333c: 236c movs r3, #108 @ 0x6c 800333e: 18fb adds r3, r7, r3 8003340: 49a1 ldr r1, [pc, #644] @ (80035c8 ) 8003342: 400a ands r2, r1 8003344: 801a strh r2, [r3, #0] /* initialize Endpoint */ switch (ep->type) 8003346: 683b ldr r3, [r7, #0] 8003348: 78db ldrb r3, [r3, #3] 800334a: 2b03 cmp r3, #3 800334c: d017 beq.n 800337e 800334e: dc28 bgt.n 80033a2 8003350: 2b02 cmp r3, #2 8003352: d00e beq.n 8003372 8003354: dc25 bgt.n 80033a2 8003356: 2b00 cmp r3, #0 8003358: d002 beq.n 8003360 800335a: 2b01 cmp r3, #1 800335c: d018 beq.n 8003390 800335e: e020 b.n 80033a2 { case EP_TYPE_CTRL: wEpRegVal |= USB_EP_CONTROL; 8003360: 226c movs r2, #108 @ 0x6c 8003362: 18bb adds r3, r7, r2 8003364: 18ba adds r2, r7, r2 8003366: 8812 ldrh r2, [r2, #0] 8003368: 2180 movs r1, #128 @ 0x80 800336a: 0089 lsls r1, r1, #2 800336c: 430a orrs r2, r1 800336e: 801a strh r2, [r3, #0] break; 8003370: e01c b.n 80033ac case EP_TYPE_BULK: wEpRegVal |= USB_EP_BULK; 8003372: 226c movs r2, #108 @ 0x6c 8003374: 18bb adds r3, r7, r2 8003376: 18ba adds r2, r7, r2 8003378: 8812 ldrh r2, [r2, #0] 800337a: 801a strh r2, [r3, #0] break; 800337c: e016 b.n 80033ac case EP_TYPE_INTR: wEpRegVal |= USB_EP_INTERRUPT; 800337e: 226c movs r2, #108 @ 0x6c 8003380: 18bb adds r3, r7, r2 8003382: 18ba adds r2, r7, r2 8003384: 8812 ldrh r2, [r2, #0] 8003386: 21c0 movs r1, #192 @ 0xc0 8003388: 00c9 lsls r1, r1, #3 800338a: 430a orrs r2, r1 800338c: 801a strh r2, [r3, #0] break; 800338e: e00d b.n 80033ac case EP_TYPE_ISOC: wEpRegVal |= USB_EP_ISOCHRONOUS; 8003390: 226c movs r2, #108 @ 0x6c 8003392: 18bb adds r3, r7, r2 8003394: 18ba adds r2, r7, r2 8003396: 8812 ldrh r2, [r2, #0] 8003398: 2180 movs r1, #128 @ 0x80 800339a: 00c9 lsls r1, r1, #3 800339c: 430a orrs r2, r1 800339e: 801a strh r2, [r3, #0] break; 80033a0: e004 b.n 80033ac default: ret = HAL_ERROR; 80033a2: 236f movs r3, #111 @ 0x6f 80033a4: 18fb adds r3, r7, r3 80033a6: 2201 movs r2, #1 80033a8: 701a strb r2, [r3, #0] break; 80033aa: 46c0 nop @ (mov r8, r8) } PCD_SET_ENDPOINT(USBx, ep->num, (wEpRegVal | USB_EP_CTR_RX | USB_EP_CTR_TX)); 80033ac: 687a ldr r2, [r7, #4] 80033ae: 683b ldr r3, [r7, #0] 80033b0: 781b ldrb r3, [r3, #0] 80033b2: 009b lsls r3, r3, #2 80033b4: 18d3 adds r3, r2, r3 80033b6: 226c movs r2, #108 @ 0x6c 80033b8: 18ba adds r2, r7, r2 80033ba: 8812 ldrh r2, [r2, #0] 80033bc: 4983 ldr r1, [pc, #524] @ (80035cc ) 80033be: 430a orrs r2, r1 80033c0: b292 uxth r2, r2 80033c2: 801a strh r2, [r3, #0] PCD_SET_EP_ADDRESS(USBx, ep->num, ep->num); 80033c4: 687a ldr r2, [r7, #4] 80033c6: 683b ldr r3, [r7, #0] 80033c8: 781b ldrb r3, [r3, #0] 80033ca: 009b lsls r3, r3, #2 80033cc: 18d3 adds r3, r2, r3 80033ce: 881b ldrh r3, [r3, #0] 80033d0: b29b uxth r3, r3 80033d2: b21b sxth r3, r3 80033d4: 4a7e ldr r2, [pc, #504] @ (80035d0 ) 80033d6: 4013 ands r3, r2 80033d8: b21a sxth r2, r3 80033da: 683b ldr r3, [r7, #0] 80033dc: 781b ldrb r3, [r3, #0] 80033de: b21b sxth r3, r3 80033e0: 4313 orrs r3, r2 80033e2: b21a sxth r2, r3 80033e4: 2166 movs r1, #102 @ 0x66 80033e6: 187b adds r3, r7, r1 80033e8: 801a strh r2, [r3, #0] 80033ea: 687a ldr r2, [r7, #4] 80033ec: 683b ldr r3, [r7, #0] 80033ee: 781b ldrb r3, [r3, #0] 80033f0: 009b lsls r3, r3, #2 80033f2: 18d3 adds r3, r2, r3 80033f4: 187a adds r2, r7, r1 80033f6: 8812 ldrh r2, [r2, #0] 80033f8: 4974 ldr r1, [pc, #464] @ (80035cc ) 80033fa: 430a orrs r2, r1 80033fc: b292 uxth r2, r2 80033fe: 801a strh r2, [r3, #0] if (ep->doublebuffer == 0U) 8003400: 683b ldr r3, [r7, #0] 8003402: 7b1b ldrb r3, [r3, #12] 8003404: 2b00 cmp r3, #0 8003406: d000 beq.n 800340a 8003408: e177 b.n 80036fa { if (ep->is_in != 0U) 800340a: 683b ldr r3, [r7, #0] 800340c: 785b ldrb r3, [r3, #1] 800340e: 2b00 cmp r3, #0 8003410: d100 bne.n 8003414 8003412: e07a b.n 800350a { /*Set the endpoint Transmit buffer address */ PCD_SET_EP_TX_ADDRESS(USBx, ep->num, ep->pmaadress); 8003414: 687b ldr r3, [r7, #4] 8003416: 61bb str r3, [r7, #24] 8003418: 687b ldr r3, [r7, #4] 800341a: 2250 movs r2, #80 @ 0x50 800341c: 5a9b ldrh r3, [r3, r2] 800341e: b29b uxth r3, r3 8003420: 001a movs r2, r3 8003422: 69bb ldr r3, [r7, #24] 8003424: 189b adds r3, r3, r2 8003426: 61bb str r3, [r7, #24] 8003428: 683b ldr r3, [r7, #0] 800342a: 781b ldrb r3, [r3, #0] 800342c: 00da lsls r2, r3, #3 800342e: 69bb ldr r3, [r7, #24] 8003430: 18d3 adds r3, r2, r3 8003432: 2280 movs r2, #128 @ 0x80 8003434: 00d2 lsls r2, r2, #3 8003436: 4694 mov ip, r2 8003438: 4463 add r3, ip 800343a: 617b str r3, [r7, #20] 800343c: 683b ldr r3, [r7, #0] 800343e: 88db ldrh r3, [r3, #6] 8003440: 085b lsrs r3, r3, #1 8003442: b29b uxth r3, r3 8003444: 18db adds r3, r3, r3 8003446: b29a uxth r2, r3 8003448: 697b ldr r3, [r7, #20] 800344a: 801a strh r2, [r3, #0] PCD_CLEAR_TX_DTOG(USBx, ep->num); 800344c: 687a ldr r2, [r7, #4] 800344e: 683b ldr r3, [r7, #0] 8003450: 781b ldrb r3, [r3, #0] 8003452: 009b lsls r3, r3, #2 8003454: 18d2 adds r2, r2, r3 8003456: 2112 movs r1, #18 8003458: 187b adds r3, r7, r1 800345a: 8812 ldrh r2, [r2, #0] 800345c: 801a strh r2, [r3, #0] 800345e: 187b adds r3, r7, r1 8003460: 881b ldrh r3, [r3, #0] 8003462: 2240 movs r2, #64 @ 0x40 8003464: 4013 ands r3, r2 8003466: d016 beq.n 8003496 8003468: 687a ldr r2, [r7, #4] 800346a: 683b ldr r3, [r7, #0] 800346c: 781b ldrb r3, [r3, #0] 800346e: 009b lsls r3, r3, #2 8003470: 18d3 adds r3, r2, r3 8003472: 881b ldrh r3, [r3, #0] 8003474: b29a uxth r2, r3 8003476: 2010 movs r0, #16 8003478: 183b adds r3, r7, r0 800347a: 4955 ldr r1, [pc, #340] @ (80035d0 ) 800347c: 400a ands r2, r1 800347e: 801a strh r2, [r3, #0] 8003480: 687a ldr r2, [r7, #4] 8003482: 683b ldr r3, [r7, #0] 8003484: 781b ldrb r3, [r3, #0] 8003486: 009b lsls r3, r3, #2 8003488: 18d3 adds r3, r2, r3 800348a: 183a adds r2, r7, r0 800348c: 8812 ldrh r2, [r2, #0] 800348e: 4951 ldr r1, [pc, #324] @ (80035d4 ) 8003490: 430a orrs r2, r1 8003492: b292 uxth r2, r2 8003494: 801a strh r2, [r3, #0] if (ep->type != EP_TYPE_ISOC) 8003496: 683b ldr r3, [r7, #0] 8003498: 78db ldrb r3, [r3, #3] 800349a: 2b01 cmp r3, #1 800349c: d01d beq.n 80034da { /* Configure NAK status for the Endpoint */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_NAK); 800349e: 687a ldr r2, [r7, #4] 80034a0: 683b ldr r3, [r7, #0] 80034a2: 781b ldrb r3, [r3, #0] 80034a4: 009b lsls r3, r3, #2 80034a6: 18d3 adds r3, r2, r3 80034a8: 881b ldrh r3, [r3, #0] 80034aa: b29a uxth r2, r3 80034ac: 200c movs r0, #12 80034ae: 183b adds r3, r7, r0 80034b0: 4949 ldr r1, [pc, #292] @ (80035d8 ) 80034b2: 400a ands r2, r1 80034b4: 801a strh r2, [r3, #0] 80034b6: 183b adds r3, r7, r0 80034b8: 183a adds r2, r7, r0 80034ba: 8812 ldrh r2, [r2, #0] 80034bc: 2120 movs r1, #32 80034be: 404a eors r2, r1 80034c0: 801a strh r2, [r3, #0] 80034c2: 687a ldr r2, [r7, #4] 80034c4: 683b ldr r3, [r7, #0] 80034c6: 781b ldrb r3, [r3, #0] 80034c8: 009b lsls r3, r3, #2 80034ca: 18d3 adds r3, r2, r3 80034cc: 183a adds r2, r7, r0 80034ce: 8812 ldrh r2, [r2, #0] 80034d0: 493e ldr r1, [pc, #248] @ (80035cc ) 80034d2: 430a orrs r2, r1 80034d4: b292 uxth r2, r2 80034d6: 801a strh r2, [r3, #0] 80034d8: e2b5 b.n 8003a46 } else { /* Configure TX Endpoint to disabled state */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 80034da: 687a ldr r2, [r7, #4] 80034dc: 683b ldr r3, [r7, #0] 80034de: 781b ldrb r3, [r3, #0] 80034e0: 009b lsls r3, r3, #2 80034e2: 18d3 adds r3, r2, r3 80034e4: 881b ldrh r3, [r3, #0] 80034e6: b29a uxth r2, r3 80034e8: 200e movs r0, #14 80034ea: 183b adds r3, r7, r0 80034ec: 493a ldr r1, [pc, #232] @ (80035d8 ) 80034ee: 400a ands r2, r1 80034f0: 801a strh r2, [r3, #0] 80034f2: 687a ldr r2, [r7, #4] 80034f4: 683b ldr r3, [r7, #0] 80034f6: 781b ldrb r3, [r3, #0] 80034f8: 009b lsls r3, r3, #2 80034fa: 18d3 adds r3, r2, r3 80034fc: 183a adds r2, r7, r0 80034fe: 8812 ldrh r2, [r2, #0] 8003500: 4932 ldr r1, [pc, #200] @ (80035cc ) 8003502: 430a orrs r2, r1 8003504: b292 uxth r2, r2 8003506: 801a strh r2, [r3, #0] 8003508: e29d b.n 8003a46 } } else { /* Set the endpoint Receive buffer address */ PCD_SET_EP_RX_ADDRESS(USBx, ep->num, ep->pmaadress); 800350a: 687b ldr r3, [r7, #4] 800350c: 633b str r3, [r7, #48] @ 0x30 800350e: 687b ldr r3, [r7, #4] 8003510: 2250 movs r2, #80 @ 0x50 8003512: 5a9b ldrh r3, [r3, r2] 8003514: b29b uxth r3, r3 8003516: 001a movs r2, r3 8003518: 6b3b ldr r3, [r7, #48] @ 0x30 800351a: 189b adds r3, r3, r2 800351c: 633b str r3, [r7, #48] @ 0x30 800351e: 683b ldr r3, [r7, #0] 8003520: 781b ldrb r3, [r3, #0] 8003522: 00da lsls r2, r3, #3 8003524: 6b3b ldr r3, [r7, #48] @ 0x30 8003526: 18d3 adds r3, r2, r3 8003528: 4a2c ldr r2, [pc, #176] @ (80035dc ) 800352a: 4694 mov ip, r2 800352c: 4463 add r3, ip 800352e: 62fb str r3, [r7, #44] @ 0x2c 8003530: 683b ldr r3, [r7, #0] 8003532: 88db ldrh r3, [r3, #6] 8003534: 085b lsrs r3, r3, #1 8003536: b29b uxth r3, r3 8003538: 18db adds r3, r3, r3 800353a: b29a uxth r2, r3 800353c: 6afb ldr r3, [r7, #44] @ 0x2c 800353e: 801a strh r2, [r3, #0] /* Set the endpoint Receive buffer counter */ PCD_SET_EP_RX_CNT(USBx, ep->num, ep->maxpacket); 8003540: 687b ldr r3, [r7, #4] 8003542: 62bb str r3, [r7, #40] @ 0x28 8003544: 687b ldr r3, [r7, #4] 8003546: 2250 movs r2, #80 @ 0x50 8003548: 5a9b ldrh r3, [r3, r2] 800354a: b29b uxth r3, r3 800354c: 001a movs r2, r3 800354e: 6abb ldr r3, [r7, #40] @ 0x28 8003550: 189b adds r3, r3, r2 8003552: 62bb str r3, [r7, #40] @ 0x28 8003554: 683b ldr r3, [r7, #0] 8003556: 781b ldrb r3, [r3, #0] 8003558: 00da lsls r2, r3, #3 800355a: 6abb ldr r3, [r7, #40] @ 0x28 800355c: 18d3 adds r3, r2, r3 800355e: 4a20 ldr r2, [pc, #128] @ (80035e0 ) 8003560: 4694 mov ip, r2 8003562: 4463 add r3, ip 8003564: 627b str r3, [r7, #36] @ 0x24 8003566: 6a7b ldr r3, [r7, #36] @ 0x24 8003568: 881b ldrh r3, [r3, #0] 800356a: b29b uxth r3, r3 800356c: 059b lsls r3, r3, #22 800356e: 0d9b lsrs r3, r3, #22 8003570: b29a uxth r2, r3 8003572: 6a7b ldr r3, [r7, #36] @ 0x24 8003574: 801a strh r2, [r3, #0] 8003576: 683b ldr r3, [r7, #0] 8003578: 691b ldr r3, [r3, #16] 800357a: 2b00 cmp r3, #0 800357c: d108 bne.n 8003590 800357e: 6a7b ldr r3, [r7, #36] @ 0x24 8003580: 881b ldrh r3, [r3, #0] 8003582: b29b uxth r3, r3 8003584: 4a17 ldr r2, [pc, #92] @ (80035e4 ) 8003586: 4313 orrs r3, r2 8003588: b29a uxth r2, r3 800358a: 6a7b ldr r3, [r7, #36] @ 0x24 800358c: 801a strh r2, [r3, #0] 800358e: e045 b.n 800361c 8003590: 683b ldr r3, [r7, #0] 8003592: 691b ldr r3, [r3, #16] 8003594: 2b3e cmp r3, #62 @ 0x3e 8003596: d827 bhi.n 80035e8 8003598: 683b ldr r3, [r7, #0] 800359a: 691b ldr r3, [r3, #16] 800359c: 085b lsrs r3, r3, #1 800359e: 66bb str r3, [r7, #104] @ 0x68 80035a0: 683b ldr r3, [r7, #0] 80035a2: 691b ldr r3, [r3, #16] 80035a4: 2201 movs r2, #1 80035a6: 4013 ands r3, r2 80035a8: d002 beq.n 80035b0 80035aa: 6ebb ldr r3, [r7, #104] @ 0x68 80035ac: 3301 adds r3, #1 80035ae: 66bb str r3, [r7, #104] @ 0x68 80035b0: 6a7b ldr r3, [r7, #36] @ 0x24 80035b2: 881b ldrh r3, [r3, #0] 80035b4: b29a uxth r2, r3 80035b6: 6ebb ldr r3, [r7, #104] @ 0x68 80035b8: b29b uxth r3, r3 80035ba: 029b lsls r3, r3, #10 80035bc: b29b uxth r3, r3 80035be: 4313 orrs r3, r2 80035c0: b29a uxth r2, r3 80035c2: 6a7b ldr r3, [r7, #36] @ 0x24 80035c4: 801a strh r2, [r3, #0] 80035c6: e029 b.n 800361c 80035c8: ffff898f .word 0xffff898f 80035cc: ffff8080 .word 0xffff8080 80035d0: ffff8f8f .word 0xffff8f8f 80035d4: ffff80c0 .word 0xffff80c0 80035d8: ffff8fbf .word 0xffff8fbf 80035dc: 00000404 .word 0x00000404 80035e0: 00000406 .word 0x00000406 80035e4: ffff8000 .word 0xffff8000 80035e8: 683b ldr r3, [r7, #0] 80035ea: 691b ldr r3, [r3, #16] 80035ec: 095b lsrs r3, r3, #5 80035ee: 66bb str r3, [r7, #104] @ 0x68 80035f0: 683b ldr r3, [r7, #0] 80035f2: 691b ldr r3, [r3, #16] 80035f4: 221f movs r2, #31 80035f6: 4013 ands r3, r2 80035f8: d102 bne.n 8003600 80035fa: 6ebb ldr r3, [r7, #104] @ 0x68 80035fc: 3b01 subs r3, #1 80035fe: 66bb str r3, [r7, #104] @ 0x68 8003600: 6a7b ldr r3, [r7, #36] @ 0x24 8003602: 881b ldrh r3, [r3, #0] 8003604: b29a uxth r2, r3 8003606: 6ebb ldr r3, [r7, #104] @ 0x68 8003608: b29b uxth r3, r3 800360a: 029b lsls r3, r3, #10 800360c: b29b uxth r3, r3 800360e: 4313 orrs r3, r2 8003610: b29b uxth r3, r3 8003612: 4ab5 ldr r2, [pc, #724] @ (80038e8 ) 8003614: 4313 orrs r3, r2 8003616: b29a uxth r2, r3 8003618: 6a7b ldr r3, [r7, #36] @ 0x24 800361a: 801a strh r2, [r3, #0] PCD_CLEAR_RX_DTOG(USBx, ep->num); 800361c: 687a ldr r2, [r7, #4] 800361e: 683b ldr r3, [r7, #0] 8003620: 781b ldrb r3, [r3, #0] 8003622: 009b lsls r3, r3, #2 8003624: 18d2 adds r2, r2, r3 8003626: 2122 movs r1, #34 @ 0x22 8003628: 187b adds r3, r7, r1 800362a: 8812 ldrh r2, [r2, #0] 800362c: 801a strh r2, [r3, #0] 800362e: 187b adds r3, r7, r1 8003630: 881a ldrh r2, [r3, #0] 8003632: 2380 movs r3, #128 @ 0x80 8003634: 01db lsls r3, r3, #7 8003636: 4013 ands r3, r2 8003638: d016 beq.n 8003668 800363a: 687a ldr r2, [r7, #4] 800363c: 683b ldr r3, [r7, #0] 800363e: 781b ldrb r3, [r3, #0] 8003640: 009b lsls r3, r3, #2 8003642: 18d3 adds r3, r2, r3 8003644: 881b ldrh r3, [r3, #0] 8003646: b29a uxth r2, r3 8003648: 2020 movs r0, #32 800364a: 183b adds r3, r7, r0 800364c: 49a7 ldr r1, [pc, #668] @ (80038ec ) 800364e: 400a ands r2, r1 8003650: 801a strh r2, [r3, #0] 8003652: 687a ldr r2, [r7, #4] 8003654: 683b ldr r3, [r7, #0] 8003656: 781b ldrb r3, [r3, #0] 8003658: 009b lsls r3, r3, #2 800365a: 18d3 adds r3, r2, r3 800365c: 183a adds r2, r7, r0 800365e: 8812 ldrh r2, [r2, #0] 8003660: 49a3 ldr r1, [pc, #652] @ (80038f0 ) 8003662: 430a orrs r2, r1 8003664: b292 uxth r2, r2 8003666: 801a strh r2, [r3, #0] if (ep->num == 0U) 8003668: 683b ldr r3, [r7, #0] 800366a: 781b ldrb r3, [r3, #0] 800366c: 2b00 cmp r3, #0 800366e: d125 bne.n 80036bc { /* Configure VALID status for EP0 */ PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID); 8003670: 687a ldr r2, [r7, #4] 8003672: 683b ldr r3, [r7, #0] 8003674: 781b ldrb r3, [r3, #0] 8003676: 009b lsls r3, r3, #2 8003678: 18d3 adds r3, r2, r3 800367a: 881b ldrh r3, [r3, #0] 800367c: b29a uxth r2, r3 800367e: 201c movs r0, #28 8003680: 183b adds r3, r7, r0 8003682: 499c ldr r1, [pc, #624] @ (80038f4 ) 8003684: 400a ands r2, r1 8003686: 801a strh r2, [r3, #0] 8003688: 183b adds r3, r7, r0 800368a: 183a adds r2, r7, r0 800368c: 8812 ldrh r2, [r2, #0] 800368e: 2180 movs r1, #128 @ 0x80 8003690: 0149 lsls r1, r1, #5 8003692: 404a eors r2, r1 8003694: 801a strh r2, [r3, #0] 8003696: 183b adds r3, r7, r0 8003698: 183a adds r2, r7, r0 800369a: 8812 ldrh r2, [r2, #0] 800369c: 2180 movs r1, #128 @ 0x80 800369e: 0189 lsls r1, r1, #6 80036a0: 404a eors r2, r1 80036a2: 801a strh r2, [r3, #0] 80036a4: 687a ldr r2, [r7, #4] 80036a6: 683b ldr r3, [r7, #0] 80036a8: 781b ldrb r3, [r3, #0] 80036aa: 009b lsls r3, r3, #2 80036ac: 18d3 adds r3, r2, r3 80036ae: 183a adds r2, r7, r0 80036b0: 8812 ldrh r2, [r2, #0] 80036b2: 4991 ldr r1, [pc, #580] @ (80038f8 ) 80036b4: 430a orrs r2, r1 80036b6: b292 uxth r2, r2 80036b8: 801a strh r2, [r3, #0] 80036ba: e1c4 b.n 8003a46 } else { /* Configure NAK status for OUT Endpoint */ PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_NAK); 80036bc: 687a ldr r2, [r7, #4] 80036be: 683b ldr r3, [r7, #0] 80036c0: 781b ldrb r3, [r3, #0] 80036c2: 009b lsls r3, r3, #2 80036c4: 18d3 adds r3, r2, r3 80036c6: 881b ldrh r3, [r3, #0] 80036c8: b29a uxth r2, r3 80036ca: 201e movs r0, #30 80036cc: 183b adds r3, r7, r0 80036ce: 4989 ldr r1, [pc, #548] @ (80038f4 ) 80036d0: 400a ands r2, r1 80036d2: 801a strh r2, [r3, #0] 80036d4: 183b adds r3, r7, r0 80036d6: 183a adds r2, r7, r0 80036d8: 8812 ldrh r2, [r2, #0] 80036da: 2180 movs r1, #128 @ 0x80 80036dc: 0189 lsls r1, r1, #6 80036de: 404a eors r2, r1 80036e0: 801a strh r2, [r3, #0] 80036e2: 687a ldr r2, [r7, #4] 80036e4: 683b ldr r3, [r7, #0] 80036e6: 781b ldrb r3, [r3, #0] 80036e8: 009b lsls r3, r3, #2 80036ea: 18d3 adds r3, r2, r3 80036ec: 183a adds r2, r7, r0 80036ee: 8812 ldrh r2, [r2, #0] 80036f0: 4981 ldr r1, [pc, #516] @ (80038f8 ) 80036f2: 430a orrs r2, r1 80036f4: b292 uxth r2, r2 80036f6: 801a strh r2, [r3, #0] 80036f8: e1a5 b.n 8003a46 } #if (USE_USB_DOUBLE_BUFFER == 1U) /* Double Buffer */ else { if (ep->type == EP_TYPE_BULK) 80036fa: 683b ldr r3, [r7, #0] 80036fc: 78db ldrb r3, [r3, #3] 80036fe: 2b02 cmp r3, #2 8003700: d117 bne.n 8003732 { /* Set bulk endpoint as double buffered */ PCD_SET_BULK_EP_DBUF(USBx, ep->num); 8003702: 687a ldr r2, [r7, #4] 8003704: 683b ldr r3, [r7, #0] 8003706: 781b ldrb r3, [r3, #0] 8003708: 009b lsls r3, r3, #2 800370a: 18d3 adds r3, r2, r3 800370c: 881b ldrh r3, [r3, #0] 800370e: b29a uxth r2, r3 8003710: 2062 movs r0, #98 @ 0x62 8003712: 183b adds r3, r7, r0 8003714: 4975 ldr r1, [pc, #468] @ (80038ec ) 8003716: 400a ands r2, r1 8003718: 801a strh r2, [r3, #0] 800371a: 687a ldr r2, [r7, #4] 800371c: 683b ldr r3, [r7, #0] 800371e: 781b ldrb r3, [r3, #0] 8003720: 009b lsls r3, r3, #2 8003722: 18d3 adds r3, r2, r3 8003724: 183a adds r2, r7, r0 8003726: 8812 ldrh r2, [r2, #0] 8003728: 4974 ldr r1, [pc, #464] @ (80038fc ) 800372a: 430a orrs r2, r1 800372c: b292 uxth r2, r2 800372e: 801a strh r2, [r3, #0] 8003730: e016 b.n 8003760 } else { /* Set the ISOC endpoint in double buffer mode */ PCD_CLEAR_EP_KIND(USBx, ep->num); 8003732: 687a ldr r2, [r7, #4] 8003734: 683b ldr r3, [r7, #0] 8003736: 781b ldrb r3, [r3, #0] 8003738: 009b lsls r3, r3, #2 800373a: 18d3 adds r3, r2, r3 800373c: 881b ldrh r3, [r3, #0] 800373e: b29a uxth r2, r3 8003740: 2064 movs r0, #100 @ 0x64 8003742: 183b adds r3, r7, r0 8003744: 496e ldr r1, [pc, #440] @ (8003900 ) 8003746: 400a ands r2, r1 8003748: 801a strh r2, [r3, #0] 800374a: 687a ldr r2, [r7, #4] 800374c: 683b ldr r3, [r7, #0] 800374e: 781b ldrb r3, [r3, #0] 8003750: 009b lsls r3, r3, #2 8003752: 18d3 adds r3, r2, r3 8003754: 183a adds r2, r7, r0 8003756: 8812 ldrh r2, [r2, #0] 8003758: 4967 ldr r1, [pc, #412] @ (80038f8 ) 800375a: 430a orrs r2, r1 800375c: b292 uxth r2, r2 800375e: 801a strh r2, [r3, #0] } /* Set buffer address for double buffered mode */ PCD_SET_EP_DBUF_ADDR(USBx, ep->num, ep->pmaaddr0, ep->pmaaddr1); 8003760: 687b ldr r3, [r7, #4] 8003762: 65fb str r3, [r7, #92] @ 0x5c 8003764: 687b ldr r3, [r7, #4] 8003766: 2250 movs r2, #80 @ 0x50 8003768: 5a9b ldrh r3, [r3, r2] 800376a: b29b uxth r3, r3 800376c: 001a movs r2, r3 800376e: 6dfb ldr r3, [r7, #92] @ 0x5c 8003770: 189b adds r3, r3, r2 8003772: 65fb str r3, [r7, #92] @ 0x5c 8003774: 683b ldr r3, [r7, #0] 8003776: 781b ldrb r3, [r3, #0] 8003778: 00da lsls r2, r3, #3 800377a: 6dfb ldr r3, [r7, #92] @ 0x5c 800377c: 18d3 adds r3, r2, r3 800377e: 2280 movs r2, #128 @ 0x80 8003780: 00d2 lsls r2, r2, #3 8003782: 4694 mov ip, r2 8003784: 4463 add r3, ip 8003786: 65bb str r3, [r7, #88] @ 0x58 8003788: 683b ldr r3, [r7, #0] 800378a: 891b ldrh r3, [r3, #8] 800378c: 085b lsrs r3, r3, #1 800378e: b29b uxth r3, r3 8003790: 18db adds r3, r3, r3 8003792: b29a uxth r2, r3 8003794: 6dbb ldr r3, [r7, #88] @ 0x58 8003796: 801a strh r2, [r3, #0] 8003798: 687b ldr r3, [r7, #4] 800379a: 657b str r3, [r7, #84] @ 0x54 800379c: 687b ldr r3, [r7, #4] 800379e: 2250 movs r2, #80 @ 0x50 80037a0: 5a9b ldrh r3, [r3, r2] 80037a2: b29b uxth r3, r3 80037a4: 001a movs r2, r3 80037a6: 6d7b ldr r3, [r7, #84] @ 0x54 80037a8: 189b adds r3, r3, r2 80037aa: 657b str r3, [r7, #84] @ 0x54 80037ac: 683b ldr r3, [r7, #0] 80037ae: 781b ldrb r3, [r3, #0] 80037b0: 00da lsls r2, r3, #3 80037b2: 6d7b ldr r3, [r7, #84] @ 0x54 80037b4: 18d3 adds r3, r2, r3 80037b6: 4a53 ldr r2, [pc, #332] @ (8003904 ) 80037b8: 4694 mov ip, r2 80037ba: 4463 add r3, ip 80037bc: 653b str r3, [r7, #80] @ 0x50 80037be: 683b ldr r3, [r7, #0] 80037c0: 895b ldrh r3, [r3, #10] 80037c2: 085b lsrs r3, r3, #1 80037c4: b29b uxth r3, r3 80037c6: 18db adds r3, r3, r3 80037c8: b29a uxth r2, r3 80037ca: 6d3b ldr r3, [r7, #80] @ 0x50 80037cc: 801a strh r2, [r3, #0] if (ep->is_in == 0U) 80037ce: 683b ldr r3, [r7, #0] 80037d0: 785b ldrb r3, [r3, #1] 80037d2: 2b00 cmp r3, #0 80037d4: d000 beq.n 80037d8 80037d6: e09b b.n 8003910 { /* Clear the data toggle bits for the endpoint IN/OUT */ PCD_CLEAR_RX_DTOG(USBx, ep->num); 80037d8: 687a ldr r2, [r7, #4] 80037da: 683b ldr r3, [r7, #0] 80037dc: 781b ldrb r3, [r3, #0] 80037de: 009b lsls r3, r3, #2 80037e0: 18d2 adds r2, r2, r3 80037e2: 2140 movs r1, #64 @ 0x40 80037e4: 187b adds r3, r7, r1 80037e6: 8812 ldrh r2, [r2, #0] 80037e8: 801a strh r2, [r3, #0] 80037ea: 187b adds r3, r7, r1 80037ec: 881a ldrh r2, [r3, #0] 80037ee: 2380 movs r3, #128 @ 0x80 80037f0: 01db lsls r3, r3, #7 80037f2: 4013 ands r3, r2 80037f4: d016 beq.n 8003824 80037f6: 687a ldr r2, [r7, #4] 80037f8: 683b ldr r3, [r7, #0] 80037fa: 781b ldrb r3, [r3, #0] 80037fc: 009b lsls r3, r3, #2 80037fe: 18d3 adds r3, r2, r3 8003800: 881b ldrh r3, [r3, #0] 8003802: b29a uxth r2, r3 8003804: 203e movs r0, #62 @ 0x3e 8003806: 183b adds r3, r7, r0 8003808: 4938 ldr r1, [pc, #224] @ (80038ec ) 800380a: 400a ands r2, r1 800380c: 801a strh r2, [r3, #0] 800380e: 687a ldr r2, [r7, #4] 8003810: 683b ldr r3, [r7, #0] 8003812: 781b ldrb r3, [r3, #0] 8003814: 009b lsls r3, r3, #2 8003816: 18d3 adds r3, r2, r3 8003818: 183a adds r2, r7, r0 800381a: 8812 ldrh r2, [r2, #0] 800381c: 4934 ldr r1, [pc, #208] @ (80038f0 ) 800381e: 430a orrs r2, r1 8003820: b292 uxth r2, r2 8003822: 801a strh r2, [r3, #0] PCD_CLEAR_TX_DTOG(USBx, ep->num); 8003824: 687a ldr r2, [r7, #4] 8003826: 683b ldr r3, [r7, #0] 8003828: 781b ldrb r3, [r3, #0] 800382a: 009b lsls r3, r3, #2 800382c: 18d2 adds r2, r2, r3 800382e: 213c movs r1, #60 @ 0x3c 8003830: 187b adds r3, r7, r1 8003832: 8812 ldrh r2, [r2, #0] 8003834: 801a strh r2, [r3, #0] 8003836: 187b adds r3, r7, r1 8003838: 881b ldrh r3, [r3, #0] 800383a: 2240 movs r2, #64 @ 0x40 800383c: 4013 ands r3, r2 800383e: d016 beq.n 800386e 8003840: 687a ldr r2, [r7, #4] 8003842: 683b ldr r3, [r7, #0] 8003844: 781b ldrb r3, [r3, #0] 8003846: 009b lsls r3, r3, #2 8003848: 18d3 adds r3, r2, r3 800384a: 881b ldrh r3, [r3, #0] 800384c: b29a uxth r2, r3 800384e: 203a movs r0, #58 @ 0x3a 8003850: 183b adds r3, r7, r0 8003852: 4926 ldr r1, [pc, #152] @ (80038ec ) 8003854: 400a ands r2, r1 8003856: 801a strh r2, [r3, #0] 8003858: 687a ldr r2, [r7, #4] 800385a: 683b ldr r3, [r7, #0] 800385c: 781b ldrb r3, [r3, #0] 800385e: 009b lsls r3, r3, #2 8003860: 18d3 adds r3, r2, r3 8003862: 183a adds r2, r7, r0 8003864: 8812 ldrh r2, [r2, #0] 8003866: 4928 ldr r1, [pc, #160] @ (8003908 ) 8003868: 430a orrs r2, r1 800386a: b292 uxth r2, r2 800386c: 801a strh r2, [r3, #0] PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID); 800386e: 687a ldr r2, [r7, #4] 8003870: 683b ldr r3, [r7, #0] 8003872: 781b ldrb r3, [r3, #0] 8003874: 009b lsls r3, r3, #2 8003876: 18d3 adds r3, r2, r3 8003878: 881b ldrh r3, [r3, #0] 800387a: b29a uxth r2, r3 800387c: 2038 movs r0, #56 @ 0x38 800387e: 183b adds r3, r7, r0 8003880: 491c ldr r1, [pc, #112] @ (80038f4 ) 8003882: 400a ands r2, r1 8003884: 801a strh r2, [r3, #0] 8003886: 183b adds r3, r7, r0 8003888: 183a adds r2, r7, r0 800388a: 8812 ldrh r2, [r2, #0] 800388c: 2180 movs r1, #128 @ 0x80 800388e: 0149 lsls r1, r1, #5 8003890: 404a eors r2, r1 8003892: 801a strh r2, [r3, #0] 8003894: 183b adds r3, r7, r0 8003896: 183a adds r2, r7, r0 8003898: 8812 ldrh r2, [r2, #0] 800389a: 2180 movs r1, #128 @ 0x80 800389c: 0189 lsls r1, r1, #6 800389e: 404a eors r2, r1 80038a0: 801a strh r2, [r3, #0] 80038a2: 687a ldr r2, [r7, #4] 80038a4: 683b ldr r3, [r7, #0] 80038a6: 781b ldrb r3, [r3, #0] 80038a8: 009b lsls r3, r3, #2 80038aa: 18d3 adds r3, r2, r3 80038ac: 183a adds r2, r7, r0 80038ae: 8812 ldrh r2, [r2, #0] 80038b0: 4911 ldr r1, [pc, #68] @ (80038f8 ) 80038b2: 430a orrs r2, r1 80038b4: b292 uxth r2, r2 80038b6: 801a strh r2, [r3, #0] PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 80038b8: 687a ldr r2, [r7, #4] 80038ba: 683b ldr r3, [r7, #0] 80038bc: 781b ldrb r3, [r3, #0] 80038be: 009b lsls r3, r3, #2 80038c0: 18d3 adds r3, r2, r3 80038c2: 881b ldrh r3, [r3, #0] 80038c4: b29a uxth r2, r3 80038c6: 2036 movs r0, #54 @ 0x36 80038c8: 183b adds r3, r7, r0 80038ca: 4910 ldr r1, [pc, #64] @ (800390c ) 80038cc: 400a ands r2, r1 80038ce: 801a strh r2, [r3, #0] 80038d0: 687a ldr r2, [r7, #4] 80038d2: 683b ldr r3, [r7, #0] 80038d4: 781b ldrb r3, [r3, #0] 80038d6: 009b lsls r3, r3, #2 80038d8: 18d3 adds r3, r2, r3 80038da: 183a adds r2, r7, r0 80038dc: 8812 ldrh r2, [r2, #0] 80038de: 4906 ldr r1, [pc, #24] @ (80038f8 ) 80038e0: 430a orrs r2, r1 80038e2: b292 uxth r2, r2 80038e4: 801a strh r2, [r3, #0] 80038e6: e0ae b.n 8003a46 80038e8: ffff8000 .word 0xffff8000 80038ec: ffff8f8f .word 0xffff8f8f 80038f0: ffffc080 .word 0xffffc080 80038f4: ffffbf8f .word 0xffffbf8f 80038f8: ffff8080 .word 0xffff8080 80038fc: ffff8180 .word 0xffff8180 8003900: ffff8e8f .word 0xffff8e8f 8003904: 00000404 .word 0x00000404 8003908: ffff80c0 .word 0xffff80c0 800390c: ffff8fbf .word 0xffff8fbf } else { /* Clear the data toggle bits for the endpoint IN/OUT */ PCD_CLEAR_RX_DTOG(USBx, ep->num); 8003910: 687a ldr r2, [r7, #4] 8003912: 683b ldr r3, [r7, #0] 8003914: 781b ldrb r3, [r3, #0] 8003916: 009b lsls r3, r3, #2 8003918: 18d2 adds r2, r2, r3 800391a: 214e movs r1, #78 @ 0x4e 800391c: 187b adds r3, r7, r1 800391e: 8812 ldrh r2, [r2, #0] 8003920: 801a strh r2, [r3, #0] 8003922: 187b adds r3, r7, r1 8003924: 881a ldrh r2, [r3, #0] 8003926: 2380 movs r3, #128 @ 0x80 8003928: 01db lsls r3, r3, #7 800392a: 4013 ands r3, r2 800392c: d016 beq.n 800395c 800392e: 687a ldr r2, [r7, #4] 8003930: 683b ldr r3, [r7, #0] 8003932: 781b ldrb r3, [r3, #0] 8003934: 009b lsls r3, r3, #2 8003936: 18d3 adds r3, r2, r3 8003938: 881b ldrh r3, [r3, #0] 800393a: b29a uxth r2, r3 800393c: 204c movs r0, #76 @ 0x4c 800393e: 183b adds r3, r7, r0 8003940: 4944 ldr r1, [pc, #272] @ (8003a54 ) 8003942: 400a ands r2, r1 8003944: 801a strh r2, [r3, #0] 8003946: 687a ldr r2, [r7, #4] 8003948: 683b ldr r3, [r7, #0] 800394a: 781b ldrb r3, [r3, #0] 800394c: 009b lsls r3, r3, #2 800394e: 18d3 adds r3, r2, r3 8003950: 183a adds r2, r7, r0 8003952: 8812 ldrh r2, [r2, #0] 8003954: 4940 ldr r1, [pc, #256] @ (8003a58 ) 8003956: 430a orrs r2, r1 8003958: b292 uxth r2, r2 800395a: 801a strh r2, [r3, #0] PCD_CLEAR_TX_DTOG(USBx, ep->num); 800395c: 687a ldr r2, [r7, #4] 800395e: 683b ldr r3, [r7, #0] 8003960: 781b ldrb r3, [r3, #0] 8003962: 009b lsls r3, r3, #2 8003964: 18d2 adds r2, r2, r3 8003966: 214a movs r1, #74 @ 0x4a 8003968: 187b adds r3, r7, r1 800396a: 8812 ldrh r2, [r2, #0] 800396c: 801a strh r2, [r3, #0] 800396e: 187b adds r3, r7, r1 8003970: 881b ldrh r3, [r3, #0] 8003972: 2240 movs r2, #64 @ 0x40 8003974: 4013 ands r3, r2 8003976: d016 beq.n 80039a6 8003978: 687a ldr r2, [r7, #4] 800397a: 683b ldr r3, [r7, #0] 800397c: 781b ldrb r3, [r3, #0] 800397e: 009b lsls r3, r3, #2 8003980: 18d3 adds r3, r2, r3 8003982: 881b ldrh r3, [r3, #0] 8003984: b29a uxth r2, r3 8003986: 2048 movs r0, #72 @ 0x48 8003988: 183b adds r3, r7, r0 800398a: 4932 ldr r1, [pc, #200] @ (8003a54 ) 800398c: 400a ands r2, r1 800398e: 801a strh r2, [r3, #0] 8003990: 687a ldr r2, [r7, #4] 8003992: 683b ldr r3, [r7, #0] 8003994: 781b ldrb r3, [r3, #0] 8003996: 009b lsls r3, r3, #2 8003998: 18d3 adds r3, r2, r3 800399a: 183a adds r2, r7, r0 800399c: 8812 ldrh r2, [r2, #0] 800399e: 492f ldr r1, [pc, #188] @ (8003a5c ) 80039a0: 430a orrs r2, r1 80039a2: b292 uxth r2, r2 80039a4: 801a strh r2, [r3, #0] if (ep->type != EP_TYPE_ISOC) 80039a6: 683b ldr r3, [r7, #0] 80039a8: 78db ldrb r3, [r3, #3] 80039aa: 2b01 cmp r3, #1 80039ac: d01d beq.n 80039ea { /* Configure NAK status for the Endpoint */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_NAK); 80039ae: 687a ldr r2, [r7, #4] 80039b0: 683b ldr r3, [r7, #0] 80039b2: 781b ldrb r3, [r3, #0] 80039b4: 009b lsls r3, r3, #2 80039b6: 18d3 adds r3, r2, r3 80039b8: 881b ldrh r3, [r3, #0] 80039ba: b29a uxth r2, r3 80039bc: 2044 movs r0, #68 @ 0x44 80039be: 183b adds r3, r7, r0 80039c0: 4927 ldr r1, [pc, #156] @ (8003a60 ) 80039c2: 400a ands r2, r1 80039c4: 801a strh r2, [r3, #0] 80039c6: 183b adds r3, r7, r0 80039c8: 183a adds r2, r7, r0 80039ca: 8812 ldrh r2, [r2, #0] 80039cc: 2120 movs r1, #32 80039ce: 404a eors r2, r1 80039d0: 801a strh r2, [r3, #0] 80039d2: 687a ldr r2, [r7, #4] 80039d4: 683b ldr r3, [r7, #0] 80039d6: 781b ldrb r3, [r3, #0] 80039d8: 009b lsls r3, r3, #2 80039da: 18d3 adds r3, r2, r3 80039dc: 183a adds r2, r7, r0 80039de: 8812 ldrh r2, [r2, #0] 80039e0: 4920 ldr r1, [pc, #128] @ (8003a64 ) 80039e2: 430a orrs r2, r1 80039e4: b292 uxth r2, r2 80039e6: 801a strh r2, [r3, #0] 80039e8: e016 b.n 8003a18 } else { /* Configure TX Endpoint to disabled state */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 80039ea: 687a ldr r2, [r7, #4] 80039ec: 683b ldr r3, [r7, #0] 80039ee: 781b ldrb r3, [r3, #0] 80039f0: 009b lsls r3, r3, #2 80039f2: 18d3 adds r3, r2, r3 80039f4: 881b ldrh r3, [r3, #0] 80039f6: b29a uxth r2, r3 80039f8: 2046 movs r0, #70 @ 0x46 80039fa: 183b adds r3, r7, r0 80039fc: 4918 ldr r1, [pc, #96] @ (8003a60 ) 80039fe: 400a ands r2, r1 8003a00: 801a strh r2, [r3, #0] 8003a02: 687a ldr r2, [r7, #4] 8003a04: 683b ldr r3, [r7, #0] 8003a06: 781b ldrb r3, [r3, #0] 8003a08: 009b lsls r3, r3, #2 8003a0a: 18d3 adds r3, r2, r3 8003a0c: 183a adds r2, r7, r0 8003a0e: 8812 ldrh r2, [r2, #0] 8003a10: 4914 ldr r1, [pc, #80] @ (8003a64 ) 8003a12: 430a orrs r2, r1 8003a14: b292 uxth r2, r2 8003a16: 801a strh r2, [r3, #0] } PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS); 8003a18: 687a ldr r2, [r7, #4] 8003a1a: 683b ldr r3, [r7, #0] 8003a1c: 781b ldrb r3, [r3, #0] 8003a1e: 009b lsls r3, r3, #2 8003a20: 18d3 adds r3, r2, r3 8003a22: 881b ldrh r3, [r3, #0] 8003a24: b29a uxth r2, r3 8003a26: 2042 movs r0, #66 @ 0x42 8003a28: 183b adds r3, r7, r0 8003a2a: 490f ldr r1, [pc, #60] @ (8003a68 ) 8003a2c: 400a ands r2, r1 8003a2e: 801a strh r2, [r3, #0] 8003a30: 687a ldr r2, [r7, #4] 8003a32: 683b ldr r3, [r7, #0] 8003a34: 781b ldrb r3, [r3, #0] 8003a36: 009b lsls r3, r3, #2 8003a38: 18d3 adds r3, r2, r3 8003a3a: 183a adds r2, r7, r0 8003a3c: 8812 ldrh r2, [r2, #0] 8003a3e: 4909 ldr r1, [pc, #36] @ (8003a64 ) 8003a40: 430a orrs r2, r1 8003a42: b292 uxth r2, r2 8003a44: 801a strh r2, [r3, #0] } } #endif /* (USE_USB_DOUBLE_BUFFER == 1U) */ return ret; 8003a46: 236f movs r3, #111 @ 0x6f 8003a48: 18fb adds r3, r7, r3 8003a4a: 781b ldrb r3, [r3, #0] } 8003a4c: 0018 movs r0, r3 8003a4e: 46bd mov sp, r7 8003a50: b01c add sp, #112 @ 0x70 8003a52: bd80 pop {r7, pc} 8003a54: ffff8f8f .word 0xffff8f8f 8003a58: ffffc080 .word 0xffffc080 8003a5c: ffff80c0 .word 0xffff80c0 8003a60: ffff8fbf .word 0xffff8fbf 8003a64: ffff8080 .word 0xffff8080 8003a68: ffffbf8f .word 0xffffbf8f 08003a6c : * @param USBx Selected device * @param ep pointer to endpoint structure * @retval HAL status */ HAL_StatusTypeDef USB_DeactivateEndpoint(USB_TypeDef *USBx, USB_EPTypeDef *ep) { 8003a6c: b580 push {r7, lr} 8003a6e: b08c sub sp, #48 @ 0x30 8003a70: af00 add r7, sp, #0 8003a72: 6078 str r0, [r7, #4] 8003a74: 6039 str r1, [r7, #0] if (ep->doublebuffer == 0U) 8003a76: 683b ldr r3, [r7, #0] 8003a78: 7b1b ldrb r3, [r3, #12] 8003a7a: 2b00 cmp r3, #0 8003a7c: d000 beq.n 8003a80 8003a7e: e07e b.n 8003b7e { if (ep->is_in != 0U) 8003a80: 683b ldr r3, [r7, #0] 8003a82: 785b ldrb r3, [r3, #1] 8003a84: 2b00 cmp r3, #0 8003a86: d03c beq.n 8003b02 { PCD_CLEAR_TX_DTOG(USBx, ep->num); 8003a88: 687a ldr r2, [r7, #4] 8003a8a: 683b ldr r3, [r7, #0] 8003a8c: 781b ldrb r3, [r3, #0] 8003a8e: 009b lsls r3, r3, #2 8003a90: 18d2 adds r2, r2, r3 8003a92: 210c movs r1, #12 8003a94: 187b adds r3, r7, r1 8003a96: 8812 ldrh r2, [r2, #0] 8003a98: 801a strh r2, [r3, #0] 8003a9a: 187b adds r3, r7, r1 8003a9c: 881b ldrh r3, [r3, #0] 8003a9e: 2240 movs r2, #64 @ 0x40 8003aa0: 4013 ands r3, r2 8003aa2: d016 beq.n 8003ad2 8003aa4: 687a ldr r2, [r7, #4] 8003aa6: 683b ldr r3, [r7, #0] 8003aa8: 781b ldrb r3, [r3, #0] 8003aaa: 009b lsls r3, r3, #2 8003aac: 18d3 adds r3, r2, r3 8003aae: 881b ldrh r3, [r3, #0] 8003ab0: b29a uxth r2, r3 8003ab2: 200a movs r0, #10 8003ab4: 183b adds r3, r7, r0 8003ab6: 49c7 ldr r1, [pc, #796] @ (8003dd4 ) 8003ab8: 400a ands r2, r1 8003aba: 801a strh r2, [r3, #0] 8003abc: 687a ldr r2, [r7, #4] 8003abe: 683b ldr r3, [r7, #0] 8003ac0: 781b ldrb r3, [r3, #0] 8003ac2: 009b lsls r3, r3, #2 8003ac4: 18d3 adds r3, r2, r3 8003ac6: 183a adds r2, r7, r0 8003ac8: 8812 ldrh r2, [r2, #0] 8003aca: 49c3 ldr r1, [pc, #780] @ (8003dd8 ) 8003acc: 430a orrs r2, r1 8003ace: b292 uxth r2, r2 8003ad0: 801a strh r2, [r3, #0] /* Configure DISABLE status for the Endpoint */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 8003ad2: 687a ldr r2, [r7, #4] 8003ad4: 683b ldr r3, [r7, #0] 8003ad6: 781b ldrb r3, [r3, #0] 8003ad8: 009b lsls r3, r3, #2 8003ada: 18d3 adds r3, r2, r3 8003adc: 881b ldrh r3, [r3, #0] 8003ade: b29a uxth r2, r3 8003ae0: 2008 movs r0, #8 8003ae2: 183b adds r3, r7, r0 8003ae4: 49bd ldr r1, [pc, #756] @ (8003ddc ) 8003ae6: 400a ands r2, r1 8003ae8: 801a strh r2, [r3, #0] 8003aea: 687a ldr r2, [r7, #4] 8003aec: 683b ldr r3, [r7, #0] 8003aee: 781b ldrb r3, [r3, #0] 8003af0: 009b lsls r3, r3, #2 8003af2: 18d3 adds r3, r2, r3 8003af4: 183a adds r2, r7, r0 8003af6: 8812 ldrh r2, [r2, #0] 8003af8: 49b9 ldr r1, [pc, #740] @ (8003de0 ) 8003afa: 430a orrs r2, r1 8003afc: b292 uxth r2, r2 8003afe: 801a strh r2, [r3, #0] 8003b00: e163 b.n 8003dca } else { PCD_CLEAR_RX_DTOG(USBx, ep->num); 8003b02: 687a ldr r2, [r7, #4] 8003b04: 683b ldr r3, [r7, #0] 8003b06: 781b ldrb r3, [r3, #0] 8003b08: 009b lsls r3, r3, #2 8003b0a: 18d2 adds r2, r2, r3 8003b0c: 2112 movs r1, #18 8003b0e: 187b adds r3, r7, r1 8003b10: 8812 ldrh r2, [r2, #0] 8003b12: 801a strh r2, [r3, #0] 8003b14: 187b adds r3, r7, r1 8003b16: 881a ldrh r2, [r3, #0] 8003b18: 2380 movs r3, #128 @ 0x80 8003b1a: 01db lsls r3, r3, #7 8003b1c: 4013 ands r3, r2 8003b1e: d016 beq.n 8003b4e 8003b20: 687a ldr r2, [r7, #4] 8003b22: 683b ldr r3, [r7, #0] 8003b24: 781b ldrb r3, [r3, #0] 8003b26: 009b lsls r3, r3, #2 8003b28: 18d3 adds r3, r2, r3 8003b2a: 881b ldrh r3, [r3, #0] 8003b2c: b29a uxth r2, r3 8003b2e: 2010 movs r0, #16 8003b30: 183b adds r3, r7, r0 8003b32: 49a8 ldr r1, [pc, #672] @ (8003dd4 ) 8003b34: 400a ands r2, r1 8003b36: 801a strh r2, [r3, #0] 8003b38: 687a ldr r2, [r7, #4] 8003b3a: 683b ldr r3, [r7, #0] 8003b3c: 781b ldrb r3, [r3, #0] 8003b3e: 009b lsls r3, r3, #2 8003b40: 18d3 adds r3, r2, r3 8003b42: 183a adds r2, r7, r0 8003b44: 8812 ldrh r2, [r2, #0] 8003b46: 49a7 ldr r1, [pc, #668] @ (8003de4 ) 8003b48: 430a orrs r2, r1 8003b4a: b292 uxth r2, r2 8003b4c: 801a strh r2, [r3, #0] /* Configure DISABLE status for the Endpoint */ PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS); 8003b4e: 687a ldr r2, [r7, #4] 8003b50: 683b ldr r3, [r7, #0] 8003b52: 781b ldrb r3, [r3, #0] 8003b54: 009b lsls r3, r3, #2 8003b56: 18d3 adds r3, r2, r3 8003b58: 881b ldrh r3, [r3, #0] 8003b5a: b29a uxth r2, r3 8003b5c: 200e movs r0, #14 8003b5e: 183b adds r3, r7, r0 8003b60: 49a1 ldr r1, [pc, #644] @ (8003de8 ) 8003b62: 400a ands r2, r1 8003b64: 801a strh r2, [r3, #0] 8003b66: 687a ldr r2, [r7, #4] 8003b68: 683b ldr r3, [r7, #0] 8003b6a: 781b ldrb r3, [r3, #0] 8003b6c: 009b lsls r3, r3, #2 8003b6e: 18d3 adds r3, r2, r3 8003b70: 183a adds r2, r7, r0 8003b72: 8812 ldrh r2, [r2, #0] 8003b74: 499a ldr r1, [pc, #616] @ (8003de0 ) 8003b76: 430a orrs r2, r1 8003b78: b292 uxth r2, r2 8003b7a: 801a strh r2, [r3, #0] 8003b7c: e125 b.n 8003dca } #if (USE_USB_DOUBLE_BUFFER == 1U) /* Double Buffer */ else { if (ep->is_in == 0U) 8003b7e: 683b ldr r3, [r7, #0] 8003b80: 785b ldrb r3, [r3, #1] 8003b82: 2b00 cmp r3, #0 8003b84: d000 beq.n 8003b88 8003b86: e090 b.n 8003caa { /* Clear the data toggle bits for the endpoint IN/OUT*/ PCD_CLEAR_RX_DTOG(USBx, ep->num); 8003b88: 687a ldr r2, [r7, #4] 8003b8a: 683b ldr r3, [r7, #0] 8003b8c: 781b ldrb r3, [r3, #0] 8003b8e: 009b lsls r3, r3, #2 8003b90: 18d2 adds r2, r2, r3 8003b92: 2120 movs r1, #32 8003b94: 187b adds r3, r7, r1 8003b96: 8812 ldrh r2, [r2, #0] 8003b98: 801a strh r2, [r3, #0] 8003b9a: 187b adds r3, r7, r1 8003b9c: 881a ldrh r2, [r3, #0] 8003b9e: 2380 movs r3, #128 @ 0x80 8003ba0: 01db lsls r3, r3, #7 8003ba2: 4013 ands r3, r2 8003ba4: d016 beq.n 8003bd4 8003ba6: 687a ldr r2, [r7, #4] 8003ba8: 683b ldr r3, [r7, #0] 8003baa: 781b ldrb r3, [r3, #0] 8003bac: 009b lsls r3, r3, #2 8003bae: 18d3 adds r3, r2, r3 8003bb0: 881b ldrh r3, [r3, #0] 8003bb2: b29a uxth r2, r3 8003bb4: 201e movs r0, #30 8003bb6: 183b adds r3, r7, r0 8003bb8: 4986 ldr r1, [pc, #536] @ (8003dd4 ) 8003bba: 400a ands r2, r1 8003bbc: 801a strh r2, [r3, #0] 8003bbe: 687a ldr r2, [r7, #4] 8003bc0: 683b ldr r3, [r7, #0] 8003bc2: 781b ldrb r3, [r3, #0] 8003bc4: 009b lsls r3, r3, #2 8003bc6: 18d3 adds r3, r2, r3 8003bc8: 183a adds r2, r7, r0 8003bca: 8812 ldrh r2, [r2, #0] 8003bcc: 4985 ldr r1, [pc, #532] @ (8003de4 ) 8003bce: 430a orrs r2, r1 8003bd0: b292 uxth r2, r2 8003bd2: 801a strh r2, [r3, #0] PCD_CLEAR_TX_DTOG(USBx, ep->num); 8003bd4: 687a ldr r2, [r7, #4] 8003bd6: 683b ldr r3, [r7, #0] 8003bd8: 781b ldrb r3, [r3, #0] 8003bda: 009b lsls r3, r3, #2 8003bdc: 18d2 adds r2, r2, r3 8003bde: 211c movs r1, #28 8003be0: 187b adds r3, r7, r1 8003be2: 8812 ldrh r2, [r2, #0] 8003be4: 801a strh r2, [r3, #0] 8003be6: 187b adds r3, r7, r1 8003be8: 881b ldrh r3, [r3, #0] 8003bea: 2240 movs r2, #64 @ 0x40 8003bec: 4013 ands r3, r2 8003bee: d016 beq.n 8003c1e 8003bf0: 687a ldr r2, [r7, #4] 8003bf2: 683b ldr r3, [r7, #0] 8003bf4: 781b ldrb r3, [r3, #0] 8003bf6: 009b lsls r3, r3, #2 8003bf8: 18d3 adds r3, r2, r3 8003bfa: 881b ldrh r3, [r3, #0] 8003bfc: b29a uxth r2, r3 8003bfe: 201a movs r0, #26 8003c00: 183b adds r3, r7, r0 8003c02: 4974 ldr r1, [pc, #464] @ (8003dd4 ) 8003c04: 400a ands r2, r1 8003c06: 801a strh r2, [r3, #0] 8003c08: 687a ldr r2, [r7, #4] 8003c0a: 683b ldr r3, [r7, #0] 8003c0c: 781b ldrb r3, [r3, #0] 8003c0e: 009b lsls r3, r3, #2 8003c10: 18d3 adds r3, r2, r3 8003c12: 183a adds r2, r7, r0 8003c14: 8812 ldrh r2, [r2, #0] 8003c16: 4970 ldr r1, [pc, #448] @ (8003dd8 ) 8003c18: 430a orrs r2, r1 8003c1a: b292 uxth r2, r2 8003c1c: 801a strh r2, [r3, #0] /* Reset value of the data toggle bits for the endpoint out*/ PCD_TX_DTOG(USBx, ep->num); 8003c1e: 687a ldr r2, [r7, #4] 8003c20: 683b ldr r3, [r7, #0] 8003c22: 781b ldrb r3, [r3, #0] 8003c24: 009b lsls r3, r3, #2 8003c26: 18d3 adds r3, r2, r3 8003c28: 881b ldrh r3, [r3, #0] 8003c2a: b29a uxth r2, r3 8003c2c: 2018 movs r0, #24 8003c2e: 183b adds r3, r7, r0 8003c30: 4968 ldr r1, [pc, #416] @ (8003dd4 ) 8003c32: 400a ands r2, r1 8003c34: 801a strh r2, [r3, #0] 8003c36: 687a ldr r2, [r7, #4] 8003c38: 683b ldr r3, [r7, #0] 8003c3a: 781b ldrb r3, [r3, #0] 8003c3c: 009b lsls r3, r3, #2 8003c3e: 18d3 adds r3, r2, r3 8003c40: 183a adds r2, r7, r0 8003c42: 8812 ldrh r2, [r2, #0] 8003c44: 4964 ldr r1, [pc, #400] @ (8003dd8 ) 8003c46: 430a orrs r2, r1 8003c48: b292 uxth r2, r2 8003c4a: 801a strh r2, [r3, #0] PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS); 8003c4c: 687a ldr r2, [r7, #4] 8003c4e: 683b ldr r3, [r7, #0] 8003c50: 781b ldrb r3, [r3, #0] 8003c52: 009b lsls r3, r3, #2 8003c54: 18d3 adds r3, r2, r3 8003c56: 881b ldrh r3, [r3, #0] 8003c58: b29a uxth r2, r3 8003c5a: 2016 movs r0, #22 8003c5c: 183b adds r3, r7, r0 8003c5e: 4962 ldr r1, [pc, #392] @ (8003de8 ) 8003c60: 400a ands r2, r1 8003c62: 801a strh r2, [r3, #0] 8003c64: 687a ldr r2, [r7, #4] 8003c66: 683b ldr r3, [r7, #0] 8003c68: 781b ldrb r3, [r3, #0] 8003c6a: 009b lsls r3, r3, #2 8003c6c: 18d3 adds r3, r2, r3 8003c6e: 183a adds r2, r7, r0 8003c70: 8812 ldrh r2, [r2, #0] 8003c72: 495b ldr r1, [pc, #364] @ (8003de0 ) 8003c74: 430a orrs r2, r1 8003c76: b292 uxth r2, r2 8003c78: 801a strh r2, [r3, #0] PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 8003c7a: 687a ldr r2, [r7, #4] 8003c7c: 683b ldr r3, [r7, #0] 8003c7e: 781b ldrb r3, [r3, #0] 8003c80: 009b lsls r3, r3, #2 8003c82: 18d3 adds r3, r2, r3 8003c84: 881b ldrh r3, [r3, #0] 8003c86: b29a uxth r2, r3 8003c88: 2014 movs r0, #20 8003c8a: 183b adds r3, r7, r0 8003c8c: 4953 ldr r1, [pc, #332] @ (8003ddc ) 8003c8e: 400a ands r2, r1 8003c90: 801a strh r2, [r3, #0] 8003c92: 687a ldr r2, [r7, #4] 8003c94: 683b ldr r3, [r7, #0] 8003c96: 781b ldrb r3, [r3, #0] 8003c98: 009b lsls r3, r3, #2 8003c9a: 18d3 adds r3, r2, r3 8003c9c: 183a adds r2, r7, r0 8003c9e: 8812 ldrh r2, [r2, #0] 8003ca0: 494f ldr r1, [pc, #316] @ (8003de0 ) 8003ca2: 430a orrs r2, r1 8003ca4: b292 uxth r2, r2 8003ca6: 801a strh r2, [r3, #0] 8003ca8: e08f b.n 8003dca } else { /* Clear the data toggle bits for the endpoint IN/OUT*/ PCD_CLEAR_RX_DTOG(USBx, ep->num); 8003caa: 687a ldr r2, [r7, #4] 8003cac: 683b ldr r3, [r7, #0] 8003cae: 781b ldrb r3, [r3, #0] 8003cb0: 009b lsls r3, r3, #2 8003cb2: 18d2 adds r2, r2, r3 8003cb4: 212e movs r1, #46 @ 0x2e 8003cb6: 187b adds r3, r7, r1 8003cb8: 8812 ldrh r2, [r2, #0] 8003cba: 801a strh r2, [r3, #0] 8003cbc: 187b adds r3, r7, r1 8003cbe: 881a ldrh r2, [r3, #0] 8003cc0: 2380 movs r3, #128 @ 0x80 8003cc2: 01db lsls r3, r3, #7 8003cc4: 4013 ands r3, r2 8003cc6: d016 beq.n 8003cf6 8003cc8: 687a ldr r2, [r7, #4] 8003cca: 683b ldr r3, [r7, #0] 8003ccc: 781b ldrb r3, [r3, #0] 8003cce: 009b lsls r3, r3, #2 8003cd0: 18d3 adds r3, r2, r3 8003cd2: 881b ldrh r3, [r3, #0] 8003cd4: b29a uxth r2, r3 8003cd6: 202c movs r0, #44 @ 0x2c 8003cd8: 183b adds r3, r7, r0 8003cda: 493e ldr r1, [pc, #248] @ (8003dd4 ) 8003cdc: 400a ands r2, r1 8003cde: 801a strh r2, [r3, #0] 8003ce0: 687a ldr r2, [r7, #4] 8003ce2: 683b ldr r3, [r7, #0] 8003ce4: 781b ldrb r3, [r3, #0] 8003ce6: 009b lsls r3, r3, #2 8003ce8: 18d3 adds r3, r2, r3 8003cea: 183a adds r2, r7, r0 8003cec: 8812 ldrh r2, [r2, #0] 8003cee: 493d ldr r1, [pc, #244] @ (8003de4 ) 8003cf0: 430a orrs r2, r1 8003cf2: b292 uxth r2, r2 8003cf4: 801a strh r2, [r3, #0] PCD_CLEAR_TX_DTOG(USBx, ep->num); 8003cf6: 687a ldr r2, [r7, #4] 8003cf8: 683b ldr r3, [r7, #0] 8003cfa: 781b ldrb r3, [r3, #0] 8003cfc: 009b lsls r3, r3, #2 8003cfe: 18d2 adds r2, r2, r3 8003d00: 212a movs r1, #42 @ 0x2a 8003d02: 187b adds r3, r7, r1 8003d04: 8812 ldrh r2, [r2, #0] 8003d06: 801a strh r2, [r3, #0] 8003d08: 187b adds r3, r7, r1 8003d0a: 881b ldrh r3, [r3, #0] 8003d0c: 2240 movs r2, #64 @ 0x40 8003d0e: 4013 ands r3, r2 8003d10: d016 beq.n 8003d40 8003d12: 687a ldr r2, [r7, #4] 8003d14: 683b ldr r3, [r7, #0] 8003d16: 781b ldrb r3, [r3, #0] 8003d18: 009b lsls r3, r3, #2 8003d1a: 18d3 adds r3, r2, r3 8003d1c: 881b ldrh r3, [r3, #0] 8003d1e: b29a uxth r2, r3 8003d20: 2028 movs r0, #40 @ 0x28 8003d22: 183b adds r3, r7, r0 8003d24: 492b ldr r1, [pc, #172] @ (8003dd4 ) 8003d26: 400a ands r2, r1 8003d28: 801a strh r2, [r3, #0] 8003d2a: 687a ldr r2, [r7, #4] 8003d2c: 683b ldr r3, [r7, #0] 8003d2e: 781b ldrb r3, [r3, #0] 8003d30: 009b lsls r3, r3, #2 8003d32: 18d3 adds r3, r2, r3 8003d34: 183a adds r2, r7, r0 8003d36: 8812 ldrh r2, [r2, #0] 8003d38: 4927 ldr r1, [pc, #156] @ (8003dd8 ) 8003d3a: 430a orrs r2, r1 8003d3c: b292 uxth r2, r2 8003d3e: 801a strh r2, [r3, #0] PCD_RX_DTOG(USBx, ep->num); 8003d40: 687a ldr r2, [r7, #4] 8003d42: 683b ldr r3, [r7, #0] 8003d44: 781b ldrb r3, [r3, #0] 8003d46: 009b lsls r3, r3, #2 8003d48: 18d3 adds r3, r2, r3 8003d4a: 881b ldrh r3, [r3, #0] 8003d4c: b29a uxth r2, r3 8003d4e: 2026 movs r0, #38 @ 0x26 8003d50: 183b adds r3, r7, r0 8003d52: 4920 ldr r1, [pc, #128] @ (8003dd4 ) 8003d54: 400a ands r2, r1 8003d56: 801a strh r2, [r3, #0] 8003d58: 687a ldr r2, [r7, #4] 8003d5a: 683b ldr r3, [r7, #0] 8003d5c: 781b ldrb r3, [r3, #0] 8003d5e: 009b lsls r3, r3, #2 8003d60: 18d3 adds r3, r2, r3 8003d62: 183a adds r2, r7, r0 8003d64: 8812 ldrh r2, [r2, #0] 8003d66: 491f ldr r1, [pc, #124] @ (8003de4 ) 8003d68: 430a orrs r2, r1 8003d6a: b292 uxth r2, r2 8003d6c: 801a strh r2, [r3, #0] /* Configure DISABLE status for the Endpoint*/ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 8003d6e: 687a ldr r2, [r7, #4] 8003d70: 683b ldr r3, [r7, #0] 8003d72: 781b ldrb r3, [r3, #0] 8003d74: 009b lsls r3, r3, #2 8003d76: 18d3 adds r3, r2, r3 8003d78: 881b ldrh r3, [r3, #0] 8003d7a: b29a uxth r2, r3 8003d7c: 2024 movs r0, #36 @ 0x24 8003d7e: 183b adds r3, r7, r0 8003d80: 4916 ldr r1, [pc, #88] @ (8003ddc ) 8003d82: 400a ands r2, r1 8003d84: 801a strh r2, [r3, #0] 8003d86: 687a ldr r2, [r7, #4] 8003d88: 683b ldr r3, [r7, #0] 8003d8a: 781b ldrb r3, [r3, #0] 8003d8c: 009b lsls r3, r3, #2 8003d8e: 18d3 adds r3, r2, r3 8003d90: 183a adds r2, r7, r0 8003d92: 8812 ldrh r2, [r2, #0] 8003d94: 4912 ldr r1, [pc, #72] @ (8003de0 ) 8003d96: 430a orrs r2, r1 8003d98: b292 uxth r2, r2 8003d9a: 801a strh r2, [r3, #0] PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS); 8003d9c: 687a ldr r2, [r7, #4] 8003d9e: 683b ldr r3, [r7, #0] 8003da0: 781b ldrb r3, [r3, #0] 8003da2: 009b lsls r3, r3, #2 8003da4: 18d3 adds r3, r2, r3 8003da6: 881b ldrh r3, [r3, #0] 8003da8: b29a uxth r2, r3 8003daa: 2022 movs r0, #34 @ 0x22 8003dac: 183b adds r3, r7, r0 8003dae: 490e ldr r1, [pc, #56] @ (8003de8 ) 8003db0: 400a ands r2, r1 8003db2: 801a strh r2, [r3, #0] 8003db4: 687a ldr r2, [r7, #4] 8003db6: 683b ldr r3, [r7, #0] 8003db8: 781b ldrb r3, [r3, #0] 8003dba: 009b lsls r3, r3, #2 8003dbc: 18d3 adds r3, r2, r3 8003dbe: 183a adds r2, r7, r0 8003dc0: 8812 ldrh r2, [r2, #0] 8003dc2: 4907 ldr r1, [pc, #28] @ (8003de0 ) 8003dc4: 430a orrs r2, r1 8003dc6: b292 uxth r2, r2 8003dc8: 801a strh r2, [r3, #0] } } #endif /* (USE_USB_DOUBLE_BUFFER == 1U) */ return HAL_OK; 8003dca: 2300 movs r3, #0 } 8003dcc: 0018 movs r0, r3 8003dce: 46bd mov sp, r7 8003dd0: b00c add sp, #48 @ 0x30 8003dd2: bd80 pop {r7, pc} 8003dd4: ffff8f8f .word 0xffff8f8f 8003dd8: ffff80c0 .word 0xffff80c0 8003ddc: ffff8fbf .word 0xffff8fbf 8003de0: ffff8080 .word 0xffff8080 8003de4: ffffc080 .word 0xffffc080 8003de8: ffffbf8f .word 0xffffbf8f 08003dec : * @param USBx Selected device * @param ep pointer to endpoint structure * @retval HAL status */ HAL_StatusTypeDef USB_EPStartXfer(USB_TypeDef *USBx, USB_EPTypeDef *ep) { 8003dec: b590 push {r4, r7, lr} 8003dee: b0c3 sub sp, #268 @ 0x10c 8003df0: af00 add r7, sp, #0 8003df2: 6078 str r0, [r7, #4] 8003df4: 6039 str r1, [r7, #0] uint16_t pmabuffer; uint16_t wEPVal; #endif /* (USE_USB_DOUBLE_BUFFER == 1U) */ /* IN endpoint */ if (ep->is_in == 1U) 8003df6: 683b ldr r3, [r7, #0] 8003df8: 785b ldrb r3, [r3, #1] 8003dfa: 2b01 cmp r3, #1 8003dfc: d001 beq.n 8003e02 8003dfe: f000 fd2d bl 800485c { /*Multi packet transfer*/ if (ep->xfer_len > ep->maxpacket) 8003e02: 683b ldr r3, [r7, #0] 8003e04: 699a ldr r2, [r3, #24] 8003e06: 683b ldr r3, [r7, #0] 8003e08: 691b ldr r3, [r3, #16] 8003e0a: 429a cmp r2, r3 8003e0c: d905 bls.n 8003e1a { len = ep->maxpacket; 8003e0e: 683b ldr r3, [r7, #0] 8003e10: 691b ldr r3, [r3, #16] 8003e12: 1d7a adds r2, r7, #5 8003e14: 32ff adds r2, #255 @ 0xff 8003e16: 6013 str r3, [r2, #0] 8003e18: e004 b.n 8003e24 } else { len = ep->xfer_len; 8003e1a: 683b ldr r3, [r7, #0] 8003e1c: 699b ldr r3, [r3, #24] 8003e1e: 1d7a adds r2, r7, #5 8003e20: 32ff adds r2, #255 @ 0xff 8003e22: 6013 str r3, [r2, #0] } /* configure and validate Tx endpoint */ if (ep->doublebuffer == 0U) 8003e24: 683b ldr r3, [r7, #0] 8003e26: 7b1b ldrb r3, [r3, #12] 8003e28: 2b00 cmp r3, #0 8003e2a: d125 bne.n 8003e78 { USB_WritePMA(USBx, ep->xfer_buff, ep->pmaadress, (uint16_t)len); 8003e2c: 683b ldr r3, [r7, #0] 8003e2e: 6959 ldr r1, [r3, #20] 8003e30: 683b ldr r3, [r7, #0] 8003e32: 88da ldrh r2, [r3, #6] 8003e34: 1d7b adds r3, r7, #5 8003e36: 33ff adds r3, #255 @ 0xff 8003e38: 681b ldr r3, [r3, #0] 8003e3a: b29b uxth r3, r3 8003e3c: 6878 ldr r0, [r7, #4] 8003e3e: f001 fa3f bl 80052c0 PCD_SET_EP_TX_CNT(USBx, ep->num, len); 8003e42: 687b ldr r3, [r7, #4] 8003e44: 613b str r3, [r7, #16] 8003e46: 687b ldr r3, [r7, #4] 8003e48: 2250 movs r2, #80 @ 0x50 8003e4a: 5a9b ldrh r3, [r3, r2] 8003e4c: b29b uxth r3, r3 8003e4e: 001a movs r2, r3 8003e50: 693b ldr r3, [r7, #16] 8003e52: 189b adds r3, r3, r2 8003e54: 613b str r3, [r7, #16] 8003e56: 683b ldr r3, [r7, #0] 8003e58: 781b ldrb r3, [r3, #0] 8003e5a: 00da lsls r2, r3, #3 8003e5c: 693b ldr r3, [r7, #16] 8003e5e: 18d3 adds r3, r2, r3 8003e60: 4ad7 ldr r2, [pc, #860] @ (80041c0 ) 8003e62: 4694 mov ip, r2 8003e64: 4463 add r3, ip 8003e66: 60fb str r3, [r7, #12] 8003e68: 1d7b adds r3, r7, #5 8003e6a: 33ff adds r3, #255 @ 0xff 8003e6c: 681b ldr r3, [r3, #0] 8003e6e: b29a uxth r2, r3 8003e70: 68fb ldr r3, [r7, #12] 8003e72: 801a strh r2, [r3, #0] 8003e74: f000 fccd bl 8004812 } #if (USE_USB_DOUBLE_BUFFER == 1U) else { /* double buffer bulk management */ if (ep->type == EP_TYPE_BULK) 8003e78: 683b ldr r3, [r7, #0] 8003e7a: 78db ldrb r3, [r3, #3] 8003e7c: 2b02 cmp r3, #2 8003e7e: d000 beq.n 8003e82 8003e80: e362 b.n 8004548 { if (ep->xfer_len_db > ep->maxpacket) 8003e82: 683b ldr r3, [r7, #0] 8003e84: 6a1a ldr r2, [r3, #32] 8003e86: 683b ldr r3, [r7, #0] 8003e88: 691b ldr r3, [r3, #16] 8003e8a: 429a cmp r2, r3 8003e8c: d800 bhi.n 8003e90 8003e8e: e309 b.n 80044a4 { /* enable double buffer */ PCD_SET_BULK_EP_DBUF(USBx, ep->num); 8003e90: 687a ldr r2, [r7, #4] 8003e92: 683b ldr r3, [r7, #0] 8003e94: 781b ldrb r3, [r3, #0] 8003e96: 009b lsls r3, r3, #2 8003e98: 18d3 adds r3, r2, r3 8003e9a: 881b ldrh r3, [r3, #0] 8003e9c: b29a uxth r2, r3 8003e9e: 2056 movs r0, #86 @ 0x56 8003ea0: 183b adds r3, r7, r0 8003ea2: 49c8 ldr r1, [pc, #800] @ (80041c4 ) 8003ea4: 400a ands r2, r1 8003ea6: 801a strh r2, [r3, #0] 8003ea8: 687a ldr r2, [r7, #4] 8003eaa: 683b ldr r3, [r7, #0] 8003eac: 781b ldrb r3, [r3, #0] 8003eae: 009b lsls r3, r3, #2 8003eb0: 18d3 adds r3, r2, r3 8003eb2: 183a adds r2, r7, r0 8003eb4: 8812 ldrh r2, [r2, #0] 8003eb6: 49c4 ldr r1, [pc, #784] @ (80041c8 ) 8003eb8: 430a orrs r2, r1 8003eba: b292 uxth r2, r2 8003ebc: 801a strh r2, [r3, #0] /* each Time to write in PMA xfer_len_db will */ ep->xfer_len_db -= len; 8003ebe: 683b ldr r3, [r7, #0] 8003ec0: 6a1a ldr r2, [r3, #32] 8003ec2: 1d7b adds r3, r7, #5 8003ec4: 33ff adds r3, #255 @ 0xff 8003ec6: 681b ldr r3, [r3, #0] 8003ec8: 1ad2 subs r2, r2, r3 8003eca: 683b ldr r3, [r7, #0] 8003ecc: 621a str r2, [r3, #32] /* Fill the two first buffer in the Buffer0 & Buffer1 */ if ((PCD_GET_ENDPOINT(USBx, ep->num) & USB_EP_DTOG_TX) != 0U) 8003ece: 687a ldr r2, [r7, #4] 8003ed0: 683b ldr r3, [r7, #0] 8003ed2: 781b ldrb r3, [r3, #0] 8003ed4: 009b lsls r3, r3, #2 8003ed6: 18d3 adds r3, r2, r3 8003ed8: 881b ldrh r3, [r3, #0] 8003eda: b29b uxth r3, r3 8003edc: 001a movs r2, r3 8003ede: 2340 movs r3, #64 @ 0x40 8003ee0: 4013 ands r3, r2 8003ee2: d100 bne.n 8003ee6 8003ee4: e176 b.n 80041d4 { /* Set the Double buffer counter for pmabuffer1 */ PCD_SET_EP_DBUF1_CNT(USBx, ep->num, ep->is_in, len); 8003ee6: 687b ldr r3, [r7, #4] 8003ee8: 633b str r3, [r7, #48] @ 0x30 8003eea: 683b ldr r3, [r7, #0] 8003eec: 785b ldrb r3, [r3, #1] 8003eee: 2b00 cmp r3, #0 8003ef0: d000 beq.n 8003ef4 8003ef2: e074 b.n 8003fde 8003ef4: 687b ldr r3, [r7, #4] 8003ef6: 62bb str r3, [r7, #40] @ 0x28 8003ef8: 687b ldr r3, [r7, #4] 8003efa: 2250 movs r2, #80 @ 0x50 8003efc: 5a9b ldrh r3, [r3, r2] 8003efe: b29b uxth r3, r3 8003f00: 001a movs r2, r3 8003f02: 6abb ldr r3, [r7, #40] @ 0x28 8003f04: 189b adds r3, r3, r2 8003f06: 62bb str r3, [r7, #40] @ 0x28 8003f08: 683b ldr r3, [r7, #0] 8003f0a: 781b ldrb r3, [r3, #0] 8003f0c: 00da lsls r2, r3, #3 8003f0e: 6abb ldr r3, [r7, #40] @ 0x28 8003f10: 18d3 adds r3, r2, r3 8003f12: 4aae ldr r2, [pc, #696] @ (80041cc ) 8003f14: 4694 mov ip, r2 8003f16: 4463 add r3, ip 8003f18: 627b str r3, [r7, #36] @ 0x24 8003f1a: 6a7b ldr r3, [r7, #36] @ 0x24 8003f1c: 881b ldrh r3, [r3, #0] 8003f1e: b29b uxth r3, r3 8003f20: 059b lsls r3, r3, #22 8003f22: 0d9b lsrs r3, r3, #22 8003f24: b29a uxth r2, r3 8003f26: 6a7b ldr r3, [r7, #36] @ 0x24 8003f28: 801a strh r2, [r3, #0] 8003f2a: 1d7b adds r3, r7, #5 8003f2c: 33ff adds r3, #255 @ 0xff 8003f2e: 681b ldr r3, [r3, #0] 8003f30: 2b00 cmp r3, #0 8003f32: d108 bne.n 8003f46 8003f34: 6a7b ldr r3, [r7, #36] @ 0x24 8003f36: 881b ldrh r3, [r3, #0] 8003f38: b29b uxth r3, r3 8003f3a: 4aa5 ldr r2, [pc, #660] @ (80041d0 ) 8003f3c: 4313 orrs r3, r2 8003f3e: b29a uxth r2, r3 8003f40: 6a7b ldr r3, [r7, #36] @ 0x24 8003f42: 801a strh r2, [r3, #0] 8003f44: e066 b.n 8004014 8003f46: 1d7b adds r3, r7, #5 8003f48: 33ff adds r3, #255 @ 0xff 8003f4a: 681b ldr r3, [r3, #0] 8003f4c: 2b3e cmp r3, #62 @ 0x3e 8003f4e: d821 bhi.n 8003f94 8003f50: 1d7b adds r3, r7, #5 8003f52: 33ff adds r3, #255 @ 0xff 8003f54: 681b ldr r3, [r3, #0] 8003f56: 085b lsrs r3, r3, #1 8003f58: 1c7a adds r2, r7, #1 8003f5a: 32ff adds r2, #255 @ 0xff 8003f5c: 6013 str r3, [r2, #0] 8003f5e: 1d7b adds r3, r7, #5 8003f60: 33ff adds r3, #255 @ 0xff 8003f62: 681b ldr r3, [r3, #0] 8003f64: 2201 movs r2, #1 8003f66: 4013 ands r3, r2 8003f68: d006 beq.n 8003f78 8003f6a: 1c7b adds r3, r7, #1 8003f6c: 33ff adds r3, #255 @ 0xff 8003f6e: 681b ldr r3, [r3, #0] 8003f70: 3301 adds r3, #1 8003f72: 1c7a adds r2, r7, #1 8003f74: 32ff adds r2, #255 @ 0xff 8003f76: 6013 str r3, [r2, #0] 8003f78: 6a7b ldr r3, [r7, #36] @ 0x24 8003f7a: 881b ldrh r3, [r3, #0] 8003f7c: b29a uxth r2, r3 8003f7e: 1c7b adds r3, r7, #1 8003f80: 33ff adds r3, #255 @ 0xff 8003f82: 681b ldr r3, [r3, #0] 8003f84: b29b uxth r3, r3 8003f86: 029b lsls r3, r3, #10 8003f88: b29b uxth r3, r3 8003f8a: 4313 orrs r3, r2 8003f8c: b29a uxth r2, r3 8003f8e: 6a7b ldr r3, [r7, #36] @ 0x24 8003f90: 801a strh r2, [r3, #0] 8003f92: e03f b.n 8004014 8003f94: 1d7b adds r3, r7, #5 8003f96: 33ff adds r3, #255 @ 0xff 8003f98: 681b ldr r3, [r3, #0] 8003f9a: 095b lsrs r3, r3, #5 8003f9c: 1c7a adds r2, r7, #1 8003f9e: 32ff adds r2, #255 @ 0xff 8003fa0: 6013 str r3, [r2, #0] 8003fa2: 1d7b adds r3, r7, #5 8003fa4: 33ff adds r3, #255 @ 0xff 8003fa6: 681b ldr r3, [r3, #0] 8003fa8: 221f movs r2, #31 8003faa: 4013 ands r3, r2 8003fac: d106 bne.n 8003fbc 8003fae: 1c7b adds r3, r7, #1 8003fb0: 33ff adds r3, #255 @ 0xff 8003fb2: 681b ldr r3, [r3, #0] 8003fb4: 3b01 subs r3, #1 8003fb6: 1c7a adds r2, r7, #1 8003fb8: 32ff adds r2, #255 @ 0xff 8003fba: 6013 str r3, [r2, #0] 8003fbc: 6a7b ldr r3, [r7, #36] @ 0x24 8003fbe: 881b ldrh r3, [r3, #0] 8003fc0: b29a uxth r2, r3 8003fc2: 1c7b adds r3, r7, #1 8003fc4: 33ff adds r3, #255 @ 0xff 8003fc6: 681b ldr r3, [r3, #0] 8003fc8: b29b uxth r3, r3 8003fca: 029b lsls r3, r3, #10 8003fcc: b29b uxth r3, r3 8003fce: 4313 orrs r3, r2 8003fd0: b29b uxth r3, r3 8003fd2: 4a7f ldr r2, [pc, #508] @ (80041d0 ) 8003fd4: 4313 orrs r3, r2 8003fd6: b29a uxth r2, r3 8003fd8: 6a7b ldr r3, [r7, #36] @ 0x24 8003fda: 801a strh r2, [r3, #0] 8003fdc: e01a b.n 8004014 8003fde: 683b ldr r3, [r7, #0] 8003fe0: 785b ldrb r3, [r3, #1] 8003fe2: 2b01 cmp r3, #1 8003fe4: d116 bne.n 8004014 8003fe6: 687b ldr r3, [r7, #4] 8003fe8: 2250 movs r2, #80 @ 0x50 8003fea: 5a9b ldrh r3, [r3, r2] 8003fec: b29b uxth r3, r3 8003fee: 001a movs r2, r3 8003ff0: 6b3b ldr r3, [r7, #48] @ 0x30 8003ff2: 189b adds r3, r3, r2 8003ff4: 633b str r3, [r7, #48] @ 0x30 8003ff6: 683b ldr r3, [r7, #0] 8003ff8: 781b ldrb r3, [r3, #0] 8003ffa: 00da lsls r2, r3, #3 8003ffc: 6b3b ldr r3, [r7, #48] @ 0x30 8003ffe: 18d3 adds r3, r2, r3 8004000: 4a72 ldr r2, [pc, #456] @ (80041cc ) 8004002: 4694 mov ip, r2 8004004: 4463 add r3, ip 8004006: 62fb str r3, [r7, #44] @ 0x2c 8004008: 1d7b adds r3, r7, #5 800400a: 33ff adds r3, #255 @ 0xff 800400c: 681b ldr r3, [r3, #0] 800400e: b29a uxth r2, r3 8004010: 6afb ldr r3, [r7, #44] @ 0x2c 8004012: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr1; 8004014: 2076 movs r0, #118 @ 0x76 8004016: 183b adds r3, r7, r0 8004018: 683a ldr r2, [r7, #0] 800401a: 8952 ldrh r2, [r2, #10] 800401c: 801a strh r2, [r3, #0] /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 800401e: 683b ldr r3, [r7, #0] 8004020: 6959 ldr r1, [r3, #20] 8004022: 1d7b adds r3, r7, #5 8004024: 33ff adds r3, #255 @ 0xff 8004026: 681b ldr r3, [r3, #0] 8004028: b29c uxth r4, r3 800402a: 183b adds r3, r7, r0 800402c: 881a ldrh r2, [r3, #0] 800402e: 6878 ldr r0, [r7, #4] 8004030: 0023 movs r3, r4 8004032: f001 f945 bl 80052c0 ep->xfer_buff += len; 8004036: 683b ldr r3, [r7, #0] 8004038: 695a ldr r2, [r3, #20] 800403a: 1d7b adds r3, r7, #5 800403c: 33ff adds r3, #255 @ 0xff 800403e: 681b ldr r3, [r3, #0] 8004040: 18d2 adds r2, r2, r3 8004042: 683b ldr r3, [r7, #0] 8004044: 615a str r2, [r3, #20] if (ep->xfer_len_db > ep->maxpacket) 8004046: 683b ldr r3, [r7, #0] 8004048: 6a1a ldr r2, [r3, #32] 800404a: 683b ldr r3, [r7, #0] 800404c: 691b ldr r3, [r3, #16] 800404e: 429a cmp r2, r3 8004050: d908 bls.n 8004064 { ep->xfer_len_db -= len; 8004052: 683b ldr r3, [r7, #0] 8004054: 6a1a ldr r2, [r3, #32] 8004056: 1d7b adds r3, r7, #5 8004058: 33ff adds r3, #255 @ 0xff 800405a: 681b ldr r3, [r3, #0] 800405c: 1ad2 subs r2, r2, r3 800405e: 683b ldr r3, [r7, #0] 8004060: 621a str r2, [r3, #32] 8004062: e007 b.n 8004074 } else { len = ep->xfer_len_db; 8004064: 683b ldr r3, [r7, #0] 8004066: 6a1b ldr r3, [r3, #32] 8004068: 1d7a adds r2, r7, #5 800406a: 32ff adds r2, #255 @ 0xff 800406c: 6013 str r3, [r2, #0] ep->xfer_len_db = 0U; 800406e: 683b ldr r3, [r7, #0] 8004070: 2200 movs r2, #0 8004072: 621a str r2, [r3, #32] } /* Set the Double buffer counter for pmabuffer0 */ PCD_SET_EP_DBUF0_CNT(USBx, ep->num, ep->is_in, len); 8004074: 683b ldr r3, [r7, #0] 8004076: 785b ldrb r3, [r3, #1] 8004078: 2b00 cmp r3, #0 800407a: d000 beq.n 800407e 800407c: e070 b.n 8004160 800407e: 687b ldr r3, [r7, #4] 8004080: 61bb str r3, [r7, #24] 8004082: 687b ldr r3, [r7, #4] 8004084: 2250 movs r2, #80 @ 0x50 8004086: 5a9b ldrh r3, [r3, r2] 8004088: b29b uxth r3, r3 800408a: 001a movs r2, r3 800408c: 69bb ldr r3, [r7, #24] 800408e: 189b adds r3, r3, r2 8004090: 61bb str r3, [r7, #24] 8004092: 683b ldr r3, [r7, #0] 8004094: 781b ldrb r3, [r3, #0] 8004096: 00da lsls r2, r3, #3 8004098: 69bb ldr r3, [r7, #24] 800409a: 18d3 adds r3, r2, r3 800409c: 4a48 ldr r2, [pc, #288] @ (80041c0 ) 800409e: 4694 mov ip, r2 80040a0: 4463 add r3, ip 80040a2: 617b str r3, [r7, #20] 80040a4: 697b ldr r3, [r7, #20] 80040a6: 881b ldrh r3, [r3, #0] 80040a8: b29b uxth r3, r3 80040aa: 059b lsls r3, r3, #22 80040ac: 0d9b lsrs r3, r3, #22 80040ae: b29a uxth r2, r3 80040b0: 697b ldr r3, [r7, #20] 80040b2: 801a strh r2, [r3, #0] 80040b4: 1d7b adds r3, r7, #5 80040b6: 33ff adds r3, #255 @ 0xff 80040b8: 681b ldr r3, [r3, #0] 80040ba: 2b00 cmp r3, #0 80040bc: d108 bne.n 80040d0 80040be: 697b ldr r3, [r7, #20] 80040c0: 881b ldrh r3, [r3, #0] 80040c2: b29b uxth r3, r3 80040c4: 4a42 ldr r2, [pc, #264] @ (80041d0 ) 80040c6: 4313 orrs r3, r2 80040c8: b29a uxth r2, r3 80040ca: 697b ldr r3, [r7, #20] 80040cc: 801a strh r2, [r3, #0] 80040ce: e064 b.n 800419a 80040d0: 1d7b adds r3, r7, #5 80040d2: 33ff adds r3, #255 @ 0xff 80040d4: 681b ldr r3, [r3, #0] 80040d6: 2b3e cmp r3, #62 @ 0x3e 80040d8: d81f bhi.n 800411a 80040da: 1d7b adds r3, r7, #5 80040dc: 33ff adds r3, #255 @ 0xff 80040de: 681b ldr r3, [r3, #0] 80040e0: 085b lsrs r3, r3, #1 80040e2: 21fc movs r1, #252 @ 0xfc 80040e4: 187a adds r2, r7, r1 80040e6: 6013 str r3, [r2, #0] 80040e8: 1d7b adds r3, r7, #5 80040ea: 33ff adds r3, #255 @ 0xff 80040ec: 681b ldr r3, [r3, #0] 80040ee: 2201 movs r2, #1 80040f0: 4013 ands r3, r2 80040f2: d004 beq.n 80040fe 80040f4: 187b adds r3, r7, r1 80040f6: 681b ldr r3, [r3, #0] 80040f8: 3301 adds r3, #1 80040fa: 187a adds r2, r7, r1 80040fc: 6013 str r3, [r2, #0] 80040fe: 697b ldr r3, [r7, #20] 8004100: 881b ldrh r3, [r3, #0] 8004102: b29a uxth r2, r3 8004104: 23fc movs r3, #252 @ 0xfc 8004106: 18fb adds r3, r7, r3 8004108: 681b ldr r3, [r3, #0] 800410a: b29b uxth r3, r3 800410c: 029b lsls r3, r3, #10 800410e: b29b uxth r3, r3 8004110: 4313 orrs r3, r2 8004112: b29a uxth r2, r3 8004114: 697b ldr r3, [r7, #20] 8004116: 801a strh r2, [r3, #0] 8004118: e03f b.n 800419a 800411a: 1d7b adds r3, r7, #5 800411c: 33ff adds r3, #255 @ 0xff 800411e: 681b ldr r3, [r3, #0] 8004120: 095b lsrs r3, r3, #5 8004122: 21fc movs r1, #252 @ 0xfc 8004124: 187a adds r2, r7, r1 8004126: 6013 str r3, [r2, #0] 8004128: 1d7b adds r3, r7, #5 800412a: 33ff adds r3, #255 @ 0xff 800412c: 681b ldr r3, [r3, #0] 800412e: 221f movs r2, #31 8004130: 4013 ands r3, r2 8004132: d104 bne.n 800413e 8004134: 187b adds r3, r7, r1 8004136: 681b ldr r3, [r3, #0] 8004138: 3b01 subs r3, #1 800413a: 187a adds r2, r7, r1 800413c: 6013 str r3, [r2, #0] 800413e: 697b ldr r3, [r7, #20] 8004140: 881b ldrh r3, [r3, #0] 8004142: b29a uxth r2, r3 8004144: 23fc movs r3, #252 @ 0xfc 8004146: 18fb adds r3, r7, r3 8004148: 681b ldr r3, [r3, #0] 800414a: b29b uxth r3, r3 800414c: 029b lsls r3, r3, #10 800414e: b29b uxth r3, r3 8004150: 4313 orrs r3, r2 8004152: b29b uxth r3, r3 8004154: 4a1e ldr r2, [pc, #120] @ (80041d0 ) 8004156: 4313 orrs r3, r2 8004158: b29a uxth r2, r3 800415a: 697b ldr r3, [r7, #20] 800415c: 801a strh r2, [r3, #0] 800415e: e01c b.n 800419a 8004160: 683b ldr r3, [r7, #0] 8004162: 785b ldrb r3, [r3, #1] 8004164: 2b01 cmp r3, #1 8004166: d118 bne.n 800419a 8004168: 687b ldr r3, [r7, #4] 800416a: 623b str r3, [r7, #32] 800416c: 687b ldr r3, [r7, #4] 800416e: 2250 movs r2, #80 @ 0x50 8004170: 5a9b ldrh r3, [r3, r2] 8004172: b29b uxth r3, r3 8004174: 001a movs r2, r3 8004176: 6a3b ldr r3, [r7, #32] 8004178: 189b adds r3, r3, r2 800417a: 623b str r3, [r7, #32] 800417c: 683b ldr r3, [r7, #0] 800417e: 781b ldrb r3, [r3, #0] 8004180: 00da lsls r2, r3, #3 8004182: 6a3b ldr r3, [r7, #32] 8004184: 18d3 adds r3, r2, r3 8004186: 4a0e ldr r2, [pc, #56] @ (80041c0 ) 8004188: 4694 mov ip, r2 800418a: 4463 add r3, ip 800418c: 61fb str r3, [r7, #28] 800418e: 1d7b adds r3, r7, #5 8004190: 33ff adds r3, #255 @ 0xff 8004192: 681b ldr r3, [r3, #0] 8004194: b29a uxth r2, r3 8004196: 69fb ldr r3, [r7, #28] 8004198: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr0; 800419a: 2076 movs r0, #118 @ 0x76 800419c: 183b adds r3, r7, r0 800419e: 683a ldr r2, [r7, #0] 80041a0: 8912 ldrh r2, [r2, #8] 80041a2: 801a strh r2, [r3, #0] /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 80041a4: 683b ldr r3, [r7, #0] 80041a6: 6959 ldr r1, [r3, #20] 80041a8: 1d7b adds r3, r7, #5 80041aa: 33ff adds r3, #255 @ 0xff 80041ac: 681b ldr r3, [r3, #0] 80041ae: b29c uxth r4, r3 80041b0: 183b adds r3, r7, r0 80041b2: 881a ldrh r2, [r3, #0] 80041b4: 6878 ldr r0, [r7, #4] 80041b6: 0023 movs r3, r4 80041b8: f001 f882 bl 80052c0 80041bc: e329 b.n 8004812 80041be: 46c0 nop @ (mov r8, r8) 80041c0: 00000402 .word 0x00000402 80041c4: ffff8f8f .word 0xffff8f8f 80041c8: ffff8180 .word 0xffff8180 80041cc: 00000406 .word 0x00000406 80041d0: ffff8000 .word 0xffff8000 } else { /* Set the Double buffer counter for pmabuffer0 */ PCD_SET_EP_DBUF0_CNT(USBx, ep->num, ep->is_in, len); 80041d4: 683b ldr r3, [r7, #0] 80041d6: 785b ldrb r3, [r3, #1] 80041d8: 2b00 cmp r3, #0 80041da: d000 beq.n 80041de 80041dc: e070 b.n 80042c0 80041de: 687b ldr r3, [r7, #4] 80041e0: 64bb str r3, [r7, #72] @ 0x48 80041e2: 687b ldr r3, [r7, #4] 80041e4: 2250 movs r2, #80 @ 0x50 80041e6: 5a9b ldrh r3, [r3, r2] 80041e8: b29b uxth r3, r3 80041ea: 001a movs r2, r3 80041ec: 6cbb ldr r3, [r7, #72] @ 0x48 80041ee: 189b adds r3, r3, r2 80041f0: 64bb str r3, [r7, #72] @ 0x48 80041f2: 683b ldr r3, [r7, #0] 80041f4: 781b ldrb r3, [r3, #0] 80041f6: 00da lsls r2, r3, #3 80041f8: 6cbb ldr r3, [r7, #72] @ 0x48 80041fa: 18d3 adds r3, r2, r3 80041fc: 4acd ldr r2, [pc, #820] @ (8004534 ) 80041fe: 4694 mov ip, r2 8004200: 4463 add r3, ip 8004202: 647b str r3, [r7, #68] @ 0x44 8004204: 6c7b ldr r3, [r7, #68] @ 0x44 8004206: 881b ldrh r3, [r3, #0] 8004208: b29b uxth r3, r3 800420a: 059b lsls r3, r3, #22 800420c: 0d9b lsrs r3, r3, #22 800420e: b29a uxth r2, r3 8004210: 6c7b ldr r3, [r7, #68] @ 0x44 8004212: 801a strh r2, [r3, #0] 8004214: 1d7b adds r3, r7, #5 8004216: 33ff adds r3, #255 @ 0xff 8004218: 681b ldr r3, [r3, #0] 800421a: 2b00 cmp r3, #0 800421c: d108 bne.n 8004230 800421e: 6c7b ldr r3, [r7, #68] @ 0x44 8004220: 881b ldrh r3, [r3, #0] 8004222: b29b uxth r3, r3 8004224: 4ac4 ldr r2, [pc, #784] @ (8004538 ) 8004226: 4313 orrs r3, r2 8004228: b29a uxth r2, r3 800422a: 6c7b ldr r3, [r7, #68] @ 0x44 800422c: 801a strh r2, [r3, #0] 800422e: e064 b.n 80042fa 8004230: 1d7b adds r3, r7, #5 8004232: 33ff adds r3, #255 @ 0xff 8004234: 681b ldr r3, [r3, #0] 8004236: 2b3e cmp r3, #62 @ 0x3e 8004238: d81f bhi.n 800427a 800423a: 1d7b adds r3, r7, #5 800423c: 33ff adds r3, #255 @ 0xff 800423e: 681b ldr r3, [r3, #0] 8004240: 085b lsrs r3, r3, #1 8004242: 21f8 movs r1, #248 @ 0xf8 8004244: 187a adds r2, r7, r1 8004246: 6013 str r3, [r2, #0] 8004248: 1d7b adds r3, r7, #5 800424a: 33ff adds r3, #255 @ 0xff 800424c: 681b ldr r3, [r3, #0] 800424e: 2201 movs r2, #1 8004250: 4013 ands r3, r2 8004252: d004 beq.n 800425e 8004254: 187b adds r3, r7, r1 8004256: 681b ldr r3, [r3, #0] 8004258: 3301 adds r3, #1 800425a: 187a adds r2, r7, r1 800425c: 6013 str r3, [r2, #0] 800425e: 6c7b ldr r3, [r7, #68] @ 0x44 8004260: 881b ldrh r3, [r3, #0] 8004262: b29a uxth r2, r3 8004264: 23f8 movs r3, #248 @ 0xf8 8004266: 18fb adds r3, r7, r3 8004268: 681b ldr r3, [r3, #0] 800426a: b29b uxth r3, r3 800426c: 029b lsls r3, r3, #10 800426e: b29b uxth r3, r3 8004270: 4313 orrs r3, r2 8004272: b29a uxth r2, r3 8004274: 6c7b ldr r3, [r7, #68] @ 0x44 8004276: 801a strh r2, [r3, #0] 8004278: e03f b.n 80042fa 800427a: 1d7b adds r3, r7, #5 800427c: 33ff adds r3, #255 @ 0xff 800427e: 681b ldr r3, [r3, #0] 8004280: 095b lsrs r3, r3, #5 8004282: 21f8 movs r1, #248 @ 0xf8 8004284: 187a adds r2, r7, r1 8004286: 6013 str r3, [r2, #0] 8004288: 1d7b adds r3, r7, #5 800428a: 33ff adds r3, #255 @ 0xff 800428c: 681b ldr r3, [r3, #0] 800428e: 221f movs r2, #31 8004290: 4013 ands r3, r2 8004292: d104 bne.n 800429e 8004294: 187b adds r3, r7, r1 8004296: 681b ldr r3, [r3, #0] 8004298: 3b01 subs r3, #1 800429a: 187a adds r2, r7, r1 800429c: 6013 str r3, [r2, #0] 800429e: 6c7b ldr r3, [r7, #68] @ 0x44 80042a0: 881b ldrh r3, [r3, #0] 80042a2: b29a uxth r2, r3 80042a4: 23f8 movs r3, #248 @ 0xf8 80042a6: 18fb adds r3, r7, r3 80042a8: 681b ldr r3, [r3, #0] 80042aa: b29b uxth r3, r3 80042ac: 029b lsls r3, r3, #10 80042ae: b29b uxth r3, r3 80042b0: 4313 orrs r3, r2 80042b2: b29b uxth r3, r3 80042b4: 4aa0 ldr r2, [pc, #640] @ (8004538 ) 80042b6: 4313 orrs r3, r2 80042b8: b29a uxth r2, r3 80042ba: 6c7b ldr r3, [r7, #68] @ 0x44 80042bc: 801a strh r2, [r3, #0] 80042be: e01c b.n 80042fa 80042c0: 683b ldr r3, [r7, #0] 80042c2: 785b ldrb r3, [r3, #1] 80042c4: 2b01 cmp r3, #1 80042c6: d118 bne.n 80042fa 80042c8: 687b ldr r3, [r7, #4] 80042ca: 653b str r3, [r7, #80] @ 0x50 80042cc: 687b ldr r3, [r7, #4] 80042ce: 2250 movs r2, #80 @ 0x50 80042d0: 5a9b ldrh r3, [r3, r2] 80042d2: b29b uxth r3, r3 80042d4: 001a movs r2, r3 80042d6: 6d3b ldr r3, [r7, #80] @ 0x50 80042d8: 189b adds r3, r3, r2 80042da: 653b str r3, [r7, #80] @ 0x50 80042dc: 683b ldr r3, [r7, #0] 80042de: 781b ldrb r3, [r3, #0] 80042e0: 00da lsls r2, r3, #3 80042e2: 6d3b ldr r3, [r7, #80] @ 0x50 80042e4: 18d3 adds r3, r2, r3 80042e6: 4a93 ldr r2, [pc, #588] @ (8004534 ) 80042e8: 4694 mov ip, r2 80042ea: 4463 add r3, ip 80042ec: 64fb str r3, [r7, #76] @ 0x4c 80042ee: 1d7b adds r3, r7, #5 80042f0: 33ff adds r3, #255 @ 0xff 80042f2: 681b ldr r3, [r3, #0] 80042f4: b29a uxth r2, r3 80042f6: 6cfb ldr r3, [r7, #76] @ 0x4c 80042f8: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr0; 80042fa: 2076 movs r0, #118 @ 0x76 80042fc: 183b adds r3, r7, r0 80042fe: 683a ldr r2, [r7, #0] 8004300: 8912 ldrh r2, [r2, #8] 8004302: 801a strh r2, [r3, #0] /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 8004304: 683b ldr r3, [r7, #0] 8004306: 6959 ldr r1, [r3, #20] 8004308: 1d7b adds r3, r7, #5 800430a: 33ff adds r3, #255 @ 0xff 800430c: 681b ldr r3, [r3, #0] 800430e: b29c uxth r4, r3 8004310: 183b adds r3, r7, r0 8004312: 881a ldrh r2, [r3, #0] 8004314: 6878 ldr r0, [r7, #4] 8004316: 0023 movs r3, r4 8004318: f000 ffd2 bl 80052c0 ep->xfer_buff += len; 800431c: 683b ldr r3, [r7, #0] 800431e: 695a ldr r2, [r3, #20] 8004320: 1d7b adds r3, r7, #5 8004322: 33ff adds r3, #255 @ 0xff 8004324: 681b ldr r3, [r3, #0] 8004326: 18d2 adds r2, r2, r3 8004328: 683b ldr r3, [r7, #0] 800432a: 615a str r2, [r3, #20] if (ep->xfer_len_db > ep->maxpacket) 800432c: 683b ldr r3, [r7, #0] 800432e: 6a1a ldr r2, [r3, #32] 8004330: 683b ldr r3, [r7, #0] 8004332: 691b ldr r3, [r3, #16] 8004334: 429a cmp r2, r3 8004336: d908 bls.n 800434a { ep->xfer_len_db -= len; 8004338: 683b ldr r3, [r7, #0] 800433a: 6a1a ldr r2, [r3, #32] 800433c: 1d7b adds r3, r7, #5 800433e: 33ff adds r3, #255 @ 0xff 8004340: 681b ldr r3, [r3, #0] 8004342: 1ad2 subs r2, r2, r3 8004344: 683b ldr r3, [r7, #0] 8004346: 621a str r2, [r3, #32] 8004348: e007 b.n 800435a } else { len = ep->xfer_len_db; 800434a: 683b ldr r3, [r7, #0] 800434c: 6a1b ldr r3, [r3, #32] 800434e: 1d7a adds r2, r7, #5 8004350: 32ff adds r2, #255 @ 0xff 8004352: 6013 str r3, [r2, #0] ep->xfer_len_db = 0U; 8004354: 683b ldr r3, [r7, #0] 8004356: 2200 movs r2, #0 8004358: 621a str r2, [r3, #32] } /* Set the Double buffer counter for pmabuffer1 */ PCD_SET_EP_DBUF1_CNT(USBx, ep->num, ep->is_in, len); 800435a: 687b ldr r3, [r7, #4] 800435c: 643b str r3, [r7, #64] @ 0x40 800435e: 683b ldr r3, [r7, #0] 8004360: 785b ldrb r3, [r3, #1] 8004362: 2b00 cmp r3, #0 8004364: d000 beq.n 8004368 8004366: e070 b.n 800444a 8004368: 687b ldr r3, [r7, #4] 800436a: 63bb str r3, [r7, #56] @ 0x38 800436c: 687b ldr r3, [r7, #4] 800436e: 2250 movs r2, #80 @ 0x50 8004370: 5a9b ldrh r3, [r3, r2] 8004372: b29b uxth r3, r3 8004374: 001a movs r2, r3 8004376: 6bbb ldr r3, [r7, #56] @ 0x38 8004378: 189b adds r3, r3, r2 800437a: 63bb str r3, [r7, #56] @ 0x38 800437c: 683b ldr r3, [r7, #0] 800437e: 781b ldrb r3, [r3, #0] 8004380: 00da lsls r2, r3, #3 8004382: 6bbb ldr r3, [r7, #56] @ 0x38 8004384: 18d3 adds r3, r2, r3 8004386: 4a6d ldr r2, [pc, #436] @ (800453c ) 8004388: 4694 mov ip, r2 800438a: 4463 add r3, ip 800438c: 637b str r3, [r7, #52] @ 0x34 800438e: 6b7b ldr r3, [r7, #52] @ 0x34 8004390: 881b ldrh r3, [r3, #0] 8004392: b29b uxth r3, r3 8004394: 059b lsls r3, r3, #22 8004396: 0d9b lsrs r3, r3, #22 8004398: b29a uxth r2, r3 800439a: 6b7b ldr r3, [r7, #52] @ 0x34 800439c: 801a strh r2, [r3, #0] 800439e: 1d7b adds r3, r7, #5 80043a0: 33ff adds r3, #255 @ 0xff 80043a2: 681b ldr r3, [r3, #0] 80043a4: 2b00 cmp r3, #0 80043a6: d108 bne.n 80043ba 80043a8: 6b7b ldr r3, [r7, #52] @ 0x34 80043aa: 881b ldrh r3, [r3, #0] 80043ac: b29b uxth r3, r3 80043ae: 4a62 ldr r2, [pc, #392] @ (8004538 ) 80043b0: 4313 orrs r3, r2 80043b2: b29a uxth r2, r3 80043b4: 6b7b ldr r3, [r7, #52] @ 0x34 80043b6: 801a strh r2, [r3, #0] 80043b8: e062 b.n 8004480 80043ba: 1d7b adds r3, r7, #5 80043bc: 33ff adds r3, #255 @ 0xff 80043be: 681b ldr r3, [r3, #0] 80043c0: 2b3e cmp r3, #62 @ 0x3e 80043c2: d81f bhi.n 8004404 80043c4: 1d7b adds r3, r7, #5 80043c6: 33ff adds r3, #255 @ 0xff 80043c8: 681b ldr r3, [r3, #0] 80043ca: 085b lsrs r3, r3, #1 80043cc: 21f4 movs r1, #244 @ 0xf4 80043ce: 187a adds r2, r7, r1 80043d0: 6013 str r3, [r2, #0] 80043d2: 1d7b adds r3, r7, #5 80043d4: 33ff adds r3, #255 @ 0xff 80043d6: 681b ldr r3, [r3, #0] 80043d8: 2201 movs r2, #1 80043da: 4013 ands r3, r2 80043dc: d004 beq.n 80043e8 80043de: 187b adds r3, r7, r1 80043e0: 681b ldr r3, [r3, #0] 80043e2: 3301 adds r3, #1 80043e4: 187a adds r2, r7, r1 80043e6: 6013 str r3, [r2, #0] 80043e8: 6b7b ldr r3, [r7, #52] @ 0x34 80043ea: 881b ldrh r3, [r3, #0] 80043ec: b29a uxth r2, r3 80043ee: 23f4 movs r3, #244 @ 0xf4 80043f0: 18fb adds r3, r7, r3 80043f2: 681b ldr r3, [r3, #0] 80043f4: b29b uxth r3, r3 80043f6: 029b lsls r3, r3, #10 80043f8: b29b uxth r3, r3 80043fa: 4313 orrs r3, r2 80043fc: b29a uxth r2, r3 80043fe: 6b7b ldr r3, [r7, #52] @ 0x34 8004400: 801a strh r2, [r3, #0] 8004402: e03d b.n 8004480 8004404: 1d7b adds r3, r7, #5 8004406: 33ff adds r3, #255 @ 0xff 8004408: 681b ldr r3, [r3, #0] 800440a: 095b lsrs r3, r3, #5 800440c: 21f4 movs r1, #244 @ 0xf4 800440e: 187a adds r2, r7, r1 8004410: 6013 str r3, [r2, #0] 8004412: 1d7b adds r3, r7, #5 8004414: 33ff adds r3, #255 @ 0xff 8004416: 681b ldr r3, [r3, #0] 8004418: 221f movs r2, #31 800441a: 4013 ands r3, r2 800441c: d104 bne.n 8004428 800441e: 187b adds r3, r7, r1 8004420: 681b ldr r3, [r3, #0] 8004422: 3b01 subs r3, #1 8004424: 187a adds r2, r7, r1 8004426: 6013 str r3, [r2, #0] 8004428: 6b7b ldr r3, [r7, #52] @ 0x34 800442a: 881b ldrh r3, [r3, #0] 800442c: b29a uxth r2, r3 800442e: 23f4 movs r3, #244 @ 0xf4 8004430: 18fb adds r3, r7, r3 8004432: 681b ldr r3, [r3, #0] 8004434: b29b uxth r3, r3 8004436: 029b lsls r3, r3, #10 8004438: b29b uxth r3, r3 800443a: 4313 orrs r3, r2 800443c: b29b uxth r3, r3 800443e: 4a3e ldr r2, [pc, #248] @ (8004538 ) 8004440: 4313 orrs r3, r2 8004442: b29a uxth r2, r3 8004444: 6b7b ldr r3, [r7, #52] @ 0x34 8004446: 801a strh r2, [r3, #0] 8004448: e01a b.n 8004480 800444a: 683b ldr r3, [r7, #0] 800444c: 785b ldrb r3, [r3, #1] 800444e: 2b01 cmp r3, #1 8004450: d116 bne.n 8004480 8004452: 687b ldr r3, [r7, #4] 8004454: 2250 movs r2, #80 @ 0x50 8004456: 5a9b ldrh r3, [r3, r2] 8004458: b29b uxth r3, r3 800445a: 001a movs r2, r3 800445c: 6c3b ldr r3, [r7, #64] @ 0x40 800445e: 189b adds r3, r3, r2 8004460: 643b str r3, [r7, #64] @ 0x40 8004462: 683b ldr r3, [r7, #0] 8004464: 781b ldrb r3, [r3, #0] 8004466: 00da lsls r2, r3, #3 8004468: 6c3b ldr r3, [r7, #64] @ 0x40 800446a: 18d3 adds r3, r2, r3 800446c: 4a33 ldr r2, [pc, #204] @ (800453c ) 800446e: 4694 mov ip, r2 8004470: 4463 add r3, ip 8004472: 63fb str r3, [r7, #60] @ 0x3c 8004474: 1d7b adds r3, r7, #5 8004476: 33ff adds r3, #255 @ 0xff 8004478: 681b ldr r3, [r3, #0] 800447a: b29a uxth r2, r3 800447c: 6bfb ldr r3, [r7, #60] @ 0x3c 800447e: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr1; 8004480: 2076 movs r0, #118 @ 0x76 8004482: 183b adds r3, r7, r0 8004484: 683a ldr r2, [r7, #0] 8004486: 8952 ldrh r2, [r2, #10] 8004488: 801a strh r2, [r3, #0] /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 800448a: 683b ldr r3, [r7, #0] 800448c: 6959 ldr r1, [r3, #20] 800448e: 1d7b adds r3, r7, #5 8004490: 33ff adds r3, #255 @ 0xff 8004492: 681b ldr r3, [r3, #0] 8004494: b29c uxth r4, r3 8004496: 183b adds r3, r7, r0 8004498: 881a ldrh r2, [r3, #0] 800449a: 6878 ldr r0, [r7, #4] 800449c: 0023 movs r3, r4 800449e: f000 ff0f bl 80052c0 80044a2: e1b6 b.n 8004812 } } /* auto Switch to single buffer mode when transfer xfer_len_db; 80044a4: 683b ldr r3, [r7, #0] 80044a6: 6a1b ldr r3, [r3, #32] 80044a8: 1d7a adds r2, r7, #5 80044aa: 32ff adds r2, #255 @ 0xff 80044ac: 6013 str r3, [r2, #0] /* disable double buffer mode for Bulk endpoint */ PCD_CLEAR_BULK_EP_DBUF(USBx, ep->num); 80044ae: 687a ldr r2, [r7, #4] 80044b0: 683b ldr r3, [r7, #0] 80044b2: 781b ldrb r3, [r3, #0] 80044b4: 009b lsls r3, r3, #2 80044b6: 18d3 adds r3, r2, r3 80044b8: 881b ldrh r3, [r3, #0] 80044ba: b29a uxth r2, r3 80044bc: 2062 movs r0, #98 @ 0x62 80044be: 183b adds r3, r7, r0 80044c0: 491f ldr r1, [pc, #124] @ (8004540 ) 80044c2: 400a ands r2, r1 80044c4: 801a strh r2, [r3, #0] 80044c6: 687a ldr r2, [r7, #4] 80044c8: 683b ldr r3, [r7, #0] 80044ca: 781b ldrb r3, [r3, #0] 80044cc: 009b lsls r3, r3, #2 80044ce: 18d3 adds r3, r2, r3 80044d0: 183a adds r2, r7, r0 80044d2: 8812 ldrh r2, [r2, #0] 80044d4: 491b ldr r1, [pc, #108] @ (8004544 ) 80044d6: 430a orrs r2, r1 80044d8: b292 uxth r2, r2 80044da: 801a strh r2, [r3, #0] /* Set Tx count with nbre of byte to be transmitted */ PCD_SET_EP_TX_CNT(USBx, ep->num, len); 80044dc: 687b ldr r3, [r7, #4] 80044de: 65fb str r3, [r7, #92] @ 0x5c 80044e0: 687b ldr r3, [r7, #4] 80044e2: 2250 movs r2, #80 @ 0x50 80044e4: 5a9b ldrh r3, [r3, r2] 80044e6: b29b uxth r3, r3 80044e8: 001a movs r2, r3 80044ea: 6dfb ldr r3, [r7, #92] @ 0x5c 80044ec: 189b adds r3, r3, r2 80044ee: 65fb str r3, [r7, #92] @ 0x5c 80044f0: 683b ldr r3, [r7, #0] 80044f2: 781b ldrb r3, [r3, #0] 80044f4: 00da lsls r2, r3, #3 80044f6: 6dfb ldr r3, [r7, #92] @ 0x5c 80044f8: 18d3 adds r3, r2, r3 80044fa: 4a0e ldr r2, [pc, #56] @ (8004534 ) 80044fc: 4694 mov ip, r2 80044fe: 4463 add r3, ip 8004500: 65bb str r3, [r7, #88] @ 0x58 8004502: 1d7b adds r3, r7, #5 8004504: 33ff adds r3, #255 @ 0xff 8004506: 681b ldr r3, [r3, #0] 8004508: b29a uxth r2, r3 800450a: 6dbb ldr r3, [r7, #88] @ 0x58 800450c: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr0; 800450e: 2076 movs r0, #118 @ 0x76 8004510: 183b adds r3, r7, r0 8004512: 683a ldr r2, [r7, #0] 8004514: 8912 ldrh r2, [r2, #8] 8004516: 801a strh r2, [r3, #0] /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 8004518: 683b ldr r3, [r7, #0] 800451a: 6959 ldr r1, [r3, #20] 800451c: 1d7b adds r3, r7, #5 800451e: 33ff adds r3, #255 @ 0xff 8004520: 681b ldr r3, [r3, #0] 8004522: b29c uxth r4, r3 8004524: 183b adds r3, r7, r0 8004526: 881a ldrh r2, [r3, #0] 8004528: 6878 ldr r0, [r7, #4] 800452a: 0023 movs r3, r4 800452c: f000 fec8 bl 80052c0 8004530: e16f b.n 8004812 8004532: 46c0 nop @ (mov r8, r8) 8004534: 00000402 .word 0x00000402 8004538: ffff8000 .word 0xffff8000 800453c: 00000406 .word 0x00000406 8004540: ffff8e8f .word 0xffff8e8f 8004544: ffff8080 .word 0xffff8080 } } else /* manage isochronous double buffer IN mode */ { /* each Time to write in PMA xfer_len_db will */ ep->xfer_len_db -= len; 8004548: 683b ldr r3, [r7, #0] 800454a: 6a1a ldr r2, [r3, #32] 800454c: 1d7b adds r3, r7, #5 800454e: 33ff adds r3, #255 @ 0xff 8004550: 681b ldr r3, [r3, #0] 8004552: 1ad2 subs r2, r2, r3 8004554: 683b ldr r3, [r7, #0] 8004556: 621a str r2, [r3, #32] /* Fill the data buffer */ if ((PCD_GET_ENDPOINT(USBx, ep->num) & USB_EP_DTOG_TX) != 0U) 8004558: 687a ldr r2, [r7, #4] 800455a: 683b ldr r3, [r7, #0] 800455c: 781b ldrb r3, [r3, #0] 800455e: 009b lsls r3, r3, #2 8004560: 18d3 adds r3, r2, r3 8004562: 881b ldrh r3, [r3, #0] 8004564: b29b uxth r3, r3 8004566: 001a movs r2, r3 8004568: 2340 movs r3, #64 @ 0x40 800456a: 4013 ands r3, r2 800456c: d100 bne.n 8004570 800456e: e0a4 b.n 80046ba { /* Set the Double buffer counter for pmabuffer1 */ PCD_SET_EP_DBUF1_CNT(USBx, ep->num, ep->is_in, len); 8004570: 687b ldr r3, [r7, #4] 8004572: 673b str r3, [r7, #112] @ 0x70 8004574: 683b ldr r3, [r7, #0] 8004576: 785b ldrb r3, [r3, #1] 8004578: 2b00 cmp r3, #0 800457a: d000 beq.n 800457e 800457c: e070 b.n 8004660 800457e: 687b ldr r3, [r7, #4] 8004580: 66bb str r3, [r7, #104] @ 0x68 8004582: 687b ldr r3, [r7, #4] 8004584: 2250 movs r2, #80 @ 0x50 8004586: 5a9b ldrh r3, [r3, r2] 8004588: b29b uxth r3, r3 800458a: 001a movs r2, r3 800458c: 6ebb ldr r3, [r7, #104] @ 0x68 800458e: 189b adds r3, r3, r2 8004590: 66bb str r3, [r7, #104] @ 0x68 8004592: 683b ldr r3, [r7, #0] 8004594: 781b ldrb r3, [r3, #0] 8004596: 00da lsls r2, r3, #3 8004598: 6ebb ldr r3, [r7, #104] @ 0x68 800459a: 18d3 adds r3, r2, r3 800459c: 4ada ldr r2, [pc, #872] @ (8004908 ) 800459e: 4694 mov ip, r2 80045a0: 4463 add r3, ip 80045a2: 667b str r3, [r7, #100] @ 0x64 80045a4: 6e7b ldr r3, [r7, #100] @ 0x64 80045a6: 881b ldrh r3, [r3, #0] 80045a8: b29b uxth r3, r3 80045aa: 059b lsls r3, r3, #22 80045ac: 0d9b lsrs r3, r3, #22 80045ae: b29a uxth r2, r3 80045b0: 6e7b ldr r3, [r7, #100] @ 0x64 80045b2: 801a strh r2, [r3, #0] 80045b4: 1d7b adds r3, r7, #5 80045b6: 33ff adds r3, #255 @ 0xff 80045b8: 681b ldr r3, [r3, #0] 80045ba: 2b00 cmp r3, #0 80045bc: d108 bne.n 80045d0 80045be: 6e7b ldr r3, [r7, #100] @ 0x64 80045c0: 881b ldrh r3, [r3, #0] 80045c2: b29b uxth r3, r3 80045c4: 4ad1 ldr r2, [pc, #836] @ (800490c ) 80045c6: 4313 orrs r3, r2 80045c8: b29a uxth r2, r3 80045ca: 6e7b ldr r3, [r7, #100] @ 0x64 80045cc: 801a strh r2, [r3, #0] 80045ce: e062 b.n 8004696 80045d0: 1d7b adds r3, r7, #5 80045d2: 33ff adds r3, #255 @ 0xff 80045d4: 681b ldr r3, [r3, #0] 80045d6: 2b3e cmp r3, #62 @ 0x3e 80045d8: d81f bhi.n 800461a 80045da: 1d7b adds r3, r7, #5 80045dc: 33ff adds r3, #255 @ 0xff 80045de: 681b ldr r3, [r3, #0] 80045e0: 085b lsrs r3, r3, #1 80045e2: 21f0 movs r1, #240 @ 0xf0 80045e4: 187a adds r2, r7, r1 80045e6: 6013 str r3, [r2, #0] 80045e8: 1d7b adds r3, r7, #5 80045ea: 33ff adds r3, #255 @ 0xff 80045ec: 681b ldr r3, [r3, #0] 80045ee: 2201 movs r2, #1 80045f0: 4013 ands r3, r2 80045f2: d004 beq.n 80045fe 80045f4: 187b adds r3, r7, r1 80045f6: 681b ldr r3, [r3, #0] 80045f8: 3301 adds r3, #1 80045fa: 187a adds r2, r7, r1 80045fc: 6013 str r3, [r2, #0] 80045fe: 6e7b ldr r3, [r7, #100] @ 0x64 8004600: 881b ldrh r3, [r3, #0] 8004602: b29a uxth r2, r3 8004604: 23f0 movs r3, #240 @ 0xf0 8004606: 18fb adds r3, r7, r3 8004608: 681b ldr r3, [r3, #0] 800460a: b29b uxth r3, r3 800460c: 029b lsls r3, r3, #10 800460e: b29b uxth r3, r3 8004610: 4313 orrs r3, r2 8004612: b29a uxth r2, r3 8004614: 6e7b ldr r3, [r7, #100] @ 0x64 8004616: 801a strh r2, [r3, #0] 8004618: e03d b.n 8004696 800461a: 1d7b adds r3, r7, #5 800461c: 33ff adds r3, #255 @ 0xff 800461e: 681b ldr r3, [r3, #0] 8004620: 095b lsrs r3, r3, #5 8004622: 21f0 movs r1, #240 @ 0xf0 8004624: 187a adds r2, r7, r1 8004626: 6013 str r3, [r2, #0] 8004628: 1d7b adds r3, r7, #5 800462a: 33ff adds r3, #255 @ 0xff 800462c: 681b ldr r3, [r3, #0] 800462e: 221f movs r2, #31 8004630: 4013 ands r3, r2 8004632: d104 bne.n 800463e 8004634: 187b adds r3, r7, r1 8004636: 681b ldr r3, [r3, #0] 8004638: 3b01 subs r3, #1 800463a: 187a adds r2, r7, r1 800463c: 6013 str r3, [r2, #0] 800463e: 6e7b ldr r3, [r7, #100] @ 0x64 8004640: 881b ldrh r3, [r3, #0] 8004642: b29a uxth r2, r3 8004644: 23f0 movs r3, #240 @ 0xf0 8004646: 18fb adds r3, r7, r3 8004648: 681b ldr r3, [r3, #0] 800464a: b29b uxth r3, r3 800464c: 029b lsls r3, r3, #10 800464e: b29b uxth r3, r3 8004650: 4313 orrs r3, r2 8004652: b29b uxth r3, r3 8004654: 4aad ldr r2, [pc, #692] @ (800490c ) 8004656: 4313 orrs r3, r2 8004658: b29a uxth r2, r3 800465a: 6e7b ldr r3, [r7, #100] @ 0x64 800465c: 801a strh r2, [r3, #0] 800465e: e01a b.n 8004696 8004660: 683b ldr r3, [r7, #0] 8004662: 785b ldrb r3, [r3, #1] 8004664: 2b01 cmp r3, #1 8004666: d116 bne.n 8004696 8004668: 687b ldr r3, [r7, #4] 800466a: 2250 movs r2, #80 @ 0x50 800466c: 5a9b ldrh r3, [r3, r2] 800466e: b29b uxth r3, r3 8004670: 001a movs r2, r3 8004672: 6f3b ldr r3, [r7, #112] @ 0x70 8004674: 189b adds r3, r3, r2 8004676: 673b str r3, [r7, #112] @ 0x70 8004678: 683b ldr r3, [r7, #0] 800467a: 781b ldrb r3, [r3, #0] 800467c: 00da lsls r2, r3, #3 800467e: 6f3b ldr r3, [r7, #112] @ 0x70 8004680: 18d3 adds r3, r2, r3 8004682: 4aa1 ldr r2, [pc, #644] @ (8004908 ) 8004684: 4694 mov ip, r2 8004686: 4463 add r3, ip 8004688: 66fb str r3, [r7, #108] @ 0x6c 800468a: 1d7b adds r3, r7, #5 800468c: 33ff adds r3, #255 @ 0xff 800468e: 681b ldr r3, [r3, #0] 8004690: b29a uxth r2, r3 8004692: 6efb ldr r3, [r7, #108] @ 0x6c 8004694: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr1; 8004696: 2076 movs r0, #118 @ 0x76 8004698: 183b adds r3, r7, r0 800469a: 683a ldr r2, [r7, #0] 800469c: 8952 ldrh r2, [r2, #10] 800469e: 801a strh r2, [r3, #0] /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 80046a0: 683b ldr r3, [r7, #0] 80046a2: 6959 ldr r1, [r3, #20] 80046a4: 1d7b adds r3, r7, #5 80046a6: 33ff adds r3, #255 @ 0xff 80046a8: 681b ldr r3, [r3, #0] 80046aa: b29c uxth r4, r3 80046ac: 183b adds r3, r7, r0 80046ae: 881a ldrh r2, [r3, #0] 80046b0: 6878 ldr r0, [r7, #4] 80046b2: 0023 movs r3, r4 80046b4: f000 fe04 bl 80052c0 80046b8: e0ab b.n 8004812 } else { /* Set the Double buffer counter for pmabuffer0 */ PCD_SET_EP_DBUF0_CNT(USBx, ep->num, ep->is_in, len); 80046ba: 683b ldr r3, [r7, #0] 80046bc: 785b ldrb r3, [r3, #1] 80046be: 2b00 cmp r3, #0 80046c0: d000 beq.n 80046c4 80046c2: e070 b.n 80047a6 80046c4: 687b ldr r3, [r7, #4] 80046c6: 67fb str r3, [r7, #124] @ 0x7c 80046c8: 687b ldr r3, [r7, #4] 80046ca: 2250 movs r2, #80 @ 0x50 80046cc: 5a9b ldrh r3, [r3, r2] 80046ce: b29b uxth r3, r3 80046d0: 001a movs r2, r3 80046d2: 6ffb ldr r3, [r7, #124] @ 0x7c 80046d4: 189b adds r3, r3, r2 80046d6: 67fb str r3, [r7, #124] @ 0x7c 80046d8: 683b ldr r3, [r7, #0] 80046da: 781b ldrb r3, [r3, #0] 80046dc: 00da lsls r2, r3, #3 80046de: 6ffb ldr r3, [r7, #124] @ 0x7c 80046e0: 18d3 adds r3, r2, r3 80046e2: 4a8b ldr r2, [pc, #556] @ (8004910 ) 80046e4: 4694 mov ip, r2 80046e6: 4463 add r3, ip 80046e8: 67bb str r3, [r7, #120] @ 0x78 80046ea: 6fbb ldr r3, [r7, #120] @ 0x78 80046ec: 881b ldrh r3, [r3, #0] 80046ee: b29b uxth r3, r3 80046f0: 059b lsls r3, r3, #22 80046f2: 0d9b lsrs r3, r3, #22 80046f4: b29a uxth r2, r3 80046f6: 6fbb ldr r3, [r7, #120] @ 0x78 80046f8: 801a strh r2, [r3, #0] 80046fa: 1d7b adds r3, r7, #5 80046fc: 33ff adds r3, #255 @ 0xff 80046fe: 681b ldr r3, [r3, #0] 8004700: 2b00 cmp r3, #0 8004702: d108 bne.n 8004716 8004704: 6fbb ldr r3, [r7, #120] @ 0x78 8004706: 881b ldrh r3, [r3, #0] 8004708: b29b uxth r3, r3 800470a: 4a80 ldr r2, [pc, #512] @ (800490c ) 800470c: 4313 orrs r3, r2 800470e: b29a uxth r2, r3 8004710: 6fbb ldr r3, [r7, #120] @ 0x78 8004712: 801a strh r2, [r3, #0] 8004714: e06c b.n 80047f0 8004716: 1d7b adds r3, r7, #5 8004718: 33ff adds r3, #255 @ 0xff 800471a: 681b ldr r3, [r3, #0] 800471c: 2b3e cmp r3, #62 @ 0x3e 800471e: d81f bhi.n 8004760 8004720: 1d7b adds r3, r7, #5 8004722: 33ff adds r3, #255 @ 0xff 8004724: 681b ldr r3, [r3, #0] 8004726: 085b lsrs r3, r3, #1 8004728: 21ec movs r1, #236 @ 0xec 800472a: 187a adds r2, r7, r1 800472c: 6013 str r3, [r2, #0] 800472e: 1d7b adds r3, r7, #5 8004730: 33ff adds r3, #255 @ 0xff 8004732: 681b ldr r3, [r3, #0] 8004734: 2201 movs r2, #1 8004736: 4013 ands r3, r2 8004738: d004 beq.n 8004744 800473a: 187b adds r3, r7, r1 800473c: 681b ldr r3, [r3, #0] 800473e: 3301 adds r3, #1 8004740: 187a adds r2, r7, r1 8004742: 6013 str r3, [r2, #0] 8004744: 6fbb ldr r3, [r7, #120] @ 0x78 8004746: 881b ldrh r3, [r3, #0] 8004748: b29a uxth r2, r3 800474a: 23ec movs r3, #236 @ 0xec 800474c: 18fb adds r3, r7, r3 800474e: 681b ldr r3, [r3, #0] 8004750: b29b uxth r3, r3 8004752: 029b lsls r3, r3, #10 8004754: b29b uxth r3, r3 8004756: 4313 orrs r3, r2 8004758: b29a uxth r2, r3 800475a: 6fbb ldr r3, [r7, #120] @ 0x78 800475c: 801a strh r2, [r3, #0] 800475e: e047 b.n 80047f0 8004760: 1d7b adds r3, r7, #5 8004762: 33ff adds r3, #255 @ 0xff 8004764: 681b ldr r3, [r3, #0] 8004766: 095b lsrs r3, r3, #5 8004768: 21ec movs r1, #236 @ 0xec 800476a: 187a adds r2, r7, r1 800476c: 6013 str r3, [r2, #0] 800476e: 1d7b adds r3, r7, #5 8004770: 33ff adds r3, #255 @ 0xff 8004772: 681b ldr r3, [r3, #0] 8004774: 221f movs r2, #31 8004776: 4013 ands r3, r2 8004778: d104 bne.n 8004784 800477a: 187b adds r3, r7, r1 800477c: 681b ldr r3, [r3, #0] 800477e: 3b01 subs r3, #1 8004780: 187a adds r2, r7, r1 8004782: 6013 str r3, [r2, #0] 8004784: 6fbb ldr r3, [r7, #120] @ 0x78 8004786: 881b ldrh r3, [r3, #0] 8004788: b29a uxth r2, r3 800478a: 23ec movs r3, #236 @ 0xec 800478c: 18fb adds r3, r7, r3 800478e: 681b ldr r3, [r3, #0] 8004790: b29b uxth r3, r3 8004792: 029b lsls r3, r3, #10 8004794: b29b uxth r3, r3 8004796: 4313 orrs r3, r2 8004798: b29b uxth r3, r3 800479a: 4a5c ldr r2, [pc, #368] @ (800490c ) 800479c: 4313 orrs r3, r2 800479e: b29a uxth r2, r3 80047a0: 6fbb ldr r3, [r7, #120] @ 0x78 80047a2: 801a strh r2, [r3, #0] 80047a4: e024 b.n 80047f0 80047a6: 683b ldr r3, [r7, #0] 80047a8: 785b ldrb r3, [r3, #1] 80047aa: 2b01 cmp r3, #1 80047ac: d120 bne.n 80047f0 80047ae: 687b ldr r3, [r7, #4] 80047b0: 2184 movs r1, #132 @ 0x84 80047b2: 187a adds r2, r7, r1 80047b4: 6013 str r3, [r2, #0] 80047b6: 687b ldr r3, [r7, #4] 80047b8: 2250 movs r2, #80 @ 0x50 80047ba: 5a9b ldrh r3, [r3, r2] 80047bc: b29b uxth r3, r3 80047be: 001a movs r2, r3 80047c0: 187b adds r3, r7, r1 80047c2: 681b ldr r3, [r3, #0] 80047c4: 189b adds r3, r3, r2 80047c6: 187a adds r2, r7, r1 80047c8: 6013 str r3, [r2, #0] 80047ca: 683b ldr r3, [r7, #0] 80047cc: 781b ldrb r3, [r3, #0] 80047ce: 00da lsls r2, r3, #3 80047d0: 187b adds r3, r7, r1 80047d2: 681b ldr r3, [r3, #0] 80047d4: 18d3 adds r3, r2, r3 80047d6: 4a4e ldr r2, [pc, #312] @ (8004910 ) 80047d8: 4694 mov ip, r2 80047da: 4463 add r3, ip 80047dc: 2180 movs r1, #128 @ 0x80 80047de: 187a adds r2, r7, r1 80047e0: 6013 str r3, [r2, #0] 80047e2: 1d7b adds r3, r7, #5 80047e4: 33ff adds r3, #255 @ 0xff 80047e6: 681b ldr r3, [r3, #0] 80047e8: b29a uxth r2, r3 80047ea: 187b adds r3, r7, r1 80047ec: 681b ldr r3, [r3, #0] 80047ee: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr0; 80047f0: 2076 movs r0, #118 @ 0x76 80047f2: 183b adds r3, r7, r0 80047f4: 683a ldr r2, [r7, #0] 80047f6: 8912 ldrh r2, [r2, #8] 80047f8: 801a strh r2, [r3, #0] /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 80047fa: 683b ldr r3, [r7, #0] 80047fc: 6959 ldr r1, [r3, #20] 80047fe: 1d7b adds r3, r7, #5 8004800: 33ff adds r3, #255 @ 0xff 8004802: 681b ldr r3, [r3, #0] 8004804: b29c uxth r4, r3 8004806: 183b adds r3, r7, r0 8004808: 881a ldrh r2, [r3, #0] 800480a: 6878 ldr r0, [r7, #4] 800480c: 0023 movs r3, r4 800480e: f000 fd57 bl 80052c0 } } } #endif /* (USE_USB_DOUBLE_BUFFER == 1U) */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_VALID); 8004812: 687a ldr r2, [r7, #4] 8004814: 683b ldr r3, [r7, #0] 8004816: 781b ldrb r3, [r3, #0] 8004818: 009b lsls r3, r3, #2 800481a: 18d3 adds r3, r2, r3 800481c: 881b ldrh r3, [r3, #0] 800481e: b29a uxth r2, r3 8004820: 200a movs r0, #10 8004822: 183b adds r3, r7, r0 8004824: 493b ldr r1, [pc, #236] @ (8004914 ) 8004826: 400a ands r2, r1 8004828: 801a strh r2, [r3, #0] 800482a: 183b adds r3, r7, r0 800482c: 183a adds r2, r7, r0 800482e: 8812 ldrh r2, [r2, #0] 8004830: 2110 movs r1, #16 8004832: 404a eors r2, r1 8004834: 801a strh r2, [r3, #0] 8004836: 183b adds r3, r7, r0 8004838: 183a adds r2, r7, r0 800483a: 8812 ldrh r2, [r2, #0] 800483c: 2120 movs r1, #32 800483e: 404a eors r2, r1 8004840: 801a strh r2, [r3, #0] 8004842: 687a ldr r2, [r7, #4] 8004844: 683b ldr r3, [r7, #0] 8004846: 781b ldrb r3, [r3, #0] 8004848: 009b lsls r3, r3, #2 800484a: 18d3 adds r3, r2, r3 800484c: 183a adds r2, r7, r0 800484e: 8812 ldrh r2, [r2, #0] 8004850: 4931 ldr r1, [pc, #196] @ (8004918 ) 8004852: 430a orrs r2, r1 8004854: b292 uxth r2, r2 8004856: 801a strh r2, [r3, #0] 8004858: f000 fbe9 bl 800502e } else /* OUT endpoint */ { if (ep->doublebuffer == 0U) 800485c: 683b ldr r3, [r7, #0] 800485e: 7b1b ldrb r3, [r3, #12] 8004860: 2b00 cmp r3, #0 8004862: d000 beq.n 8004866 8004864: e0a8 b.n 80049b8 { /* Multi packet transfer */ if (ep->xfer_len > ep->maxpacket) 8004866: 683b ldr r3, [r7, #0] 8004868: 699a ldr r2, [r3, #24] 800486a: 683b ldr r3, [r7, #0] 800486c: 691b ldr r3, [r3, #16] 800486e: 429a cmp r2, r3 8004870: d90d bls.n 800488e { len = ep->maxpacket; 8004872: 683b ldr r3, [r7, #0] 8004874: 691b ldr r3, [r3, #16] 8004876: 1d7a adds r2, r7, #5 8004878: 32ff adds r2, #255 @ 0xff 800487a: 6013 str r3, [r2, #0] ep->xfer_len -= len; 800487c: 683b ldr r3, [r7, #0] 800487e: 699a ldr r2, [r3, #24] 8004880: 1d7b adds r3, r7, #5 8004882: 33ff adds r3, #255 @ 0xff 8004884: 681b ldr r3, [r3, #0] 8004886: 1ad2 subs r2, r2, r3 8004888: 683b ldr r3, [r7, #0] 800488a: 619a str r2, [r3, #24] 800488c: e007 b.n 800489e } else { len = ep->xfer_len; 800488e: 683b ldr r3, [r7, #0] 8004890: 699b ldr r3, [r3, #24] 8004892: 1d7a adds r2, r7, #5 8004894: 32ff adds r2, #255 @ 0xff 8004896: 6013 str r3, [r2, #0] ep->xfer_len = 0U; 8004898: 683b ldr r3, [r7, #0] 800489a: 2200 movs r2, #0 800489c: 619a str r2, [r3, #24] } /* configure and validate Rx endpoint */ PCD_SET_EP_RX_CNT(USBx, ep->num, len); 800489e: 687b ldr r3, [r7, #4] 80048a0: 2190 movs r1, #144 @ 0x90 80048a2: 187a adds r2, r7, r1 80048a4: 6013 str r3, [r2, #0] 80048a6: 687b ldr r3, [r7, #4] 80048a8: 2250 movs r2, #80 @ 0x50 80048aa: 5a9b ldrh r3, [r3, r2] 80048ac: b29b uxth r3, r3 80048ae: 001a movs r2, r3 80048b0: 187b adds r3, r7, r1 80048b2: 681b ldr r3, [r3, #0] 80048b4: 189b adds r3, r3, r2 80048b6: 187a adds r2, r7, r1 80048b8: 6013 str r3, [r2, #0] 80048ba: 683b ldr r3, [r7, #0] 80048bc: 781b ldrb r3, [r3, #0] 80048be: 00da lsls r2, r3, #3 80048c0: 187b adds r3, r7, r1 80048c2: 681b ldr r3, [r3, #0] 80048c4: 18d3 adds r3, r2, r3 80048c6: 4a10 ldr r2, [pc, #64] @ (8004908 ) 80048c8: 4694 mov ip, r2 80048ca: 4463 add r3, ip 80048cc: 218c movs r1, #140 @ 0x8c 80048ce: 187a adds r2, r7, r1 80048d0: 6013 str r3, [r2, #0] 80048d2: 187b adds r3, r7, r1 80048d4: 681b ldr r3, [r3, #0] 80048d6: 881b ldrh r3, [r3, #0] 80048d8: b29b uxth r3, r3 80048da: 059b lsls r3, r3, #22 80048dc: 0d9b lsrs r3, r3, #22 80048de: b29a uxth r2, r3 80048e0: 187b adds r3, r7, r1 80048e2: 681b ldr r3, [r3, #0] 80048e4: 801a strh r2, [r3, #0] 80048e6: 1d7b adds r3, r7, #5 80048e8: 33ff adds r3, #255 @ 0xff 80048ea: 681b ldr r3, [r3, #0] 80048ec: 2b00 cmp r3, #0 80048ee: d115 bne.n 800491c 80048f0: 187b adds r3, r7, r1 80048f2: 681b ldr r3, [r3, #0] 80048f4: 881b ldrh r3, [r3, #0] 80048f6: b29b uxth r3, r3 80048f8: 4a04 ldr r2, [pc, #16] @ (800490c ) 80048fa: 4313 orrs r3, r2 80048fc: b29a uxth r2, r3 80048fe: 187b adds r3, r7, r1 8004900: 681b ldr r3, [r3, #0] 8004902: 801a strh r2, [r3, #0] 8004904: e36e b.n 8004fe4 8004906: 46c0 nop @ (mov r8, r8) 8004908: 00000406 .word 0x00000406 800490c: ffff8000 .word 0xffff8000 8004910: 00000402 .word 0x00000402 8004914: ffff8fbf .word 0xffff8fbf 8004918: ffff8080 .word 0xffff8080 800491c: 1d7b adds r3, r7, #5 800491e: 33ff adds r3, #255 @ 0xff 8004920: 681b ldr r3, [r3, #0] 8004922: 2b3e cmp r3, #62 @ 0x3e 8004924: d822 bhi.n 800496c 8004926: 1d7b adds r3, r7, #5 8004928: 33ff adds r3, #255 @ 0xff 800492a: 681b ldr r3, [r3, #0] 800492c: 085b lsrs r3, r3, #1 800492e: 21e8 movs r1, #232 @ 0xe8 8004930: 187a adds r2, r7, r1 8004932: 6013 str r3, [r2, #0] 8004934: 1d7b adds r3, r7, #5 8004936: 33ff adds r3, #255 @ 0xff 8004938: 681b ldr r3, [r3, #0] 800493a: 2201 movs r2, #1 800493c: 4013 ands r3, r2 800493e: d004 beq.n 800494a 8004940: 187b adds r3, r7, r1 8004942: 681b ldr r3, [r3, #0] 8004944: 3301 adds r3, #1 8004946: 187a adds r2, r7, r1 8004948: 6013 str r3, [r2, #0] 800494a: 218c movs r1, #140 @ 0x8c 800494c: 187b adds r3, r7, r1 800494e: 681b ldr r3, [r3, #0] 8004950: 881b ldrh r3, [r3, #0] 8004952: b29a uxth r2, r3 8004954: 23e8 movs r3, #232 @ 0xe8 8004956: 18fb adds r3, r7, r3 8004958: 681b ldr r3, [r3, #0] 800495a: b29b uxth r3, r3 800495c: 029b lsls r3, r3, #10 800495e: b29b uxth r3, r3 8004960: 4313 orrs r3, r2 8004962: b29a uxth r2, r3 8004964: 187b adds r3, r7, r1 8004966: 681b ldr r3, [r3, #0] 8004968: 801a strh r2, [r3, #0] 800496a: e33b b.n 8004fe4 800496c: 1d7b adds r3, r7, #5 800496e: 33ff adds r3, #255 @ 0xff 8004970: 681b ldr r3, [r3, #0] 8004972: 095b lsrs r3, r3, #5 8004974: 21e8 movs r1, #232 @ 0xe8 8004976: 187a adds r2, r7, r1 8004978: 6013 str r3, [r2, #0] 800497a: 1d7b adds r3, r7, #5 800497c: 33ff adds r3, #255 @ 0xff 800497e: 681b ldr r3, [r3, #0] 8004980: 221f movs r2, #31 8004982: 4013 ands r3, r2 8004984: d104 bne.n 8004990 8004986: 187b adds r3, r7, r1 8004988: 681b ldr r3, [r3, #0] 800498a: 3b01 subs r3, #1 800498c: 187a adds r2, r7, r1 800498e: 6013 str r3, [r2, #0] 8004990: 218c movs r1, #140 @ 0x8c 8004992: 187b adds r3, r7, r1 8004994: 681b ldr r3, [r3, #0] 8004996: 881b ldrh r3, [r3, #0] 8004998: b29a uxth r2, r3 800499a: 23e8 movs r3, #232 @ 0xe8 800499c: 18fb adds r3, r7, r3 800499e: 681b ldr r3, [r3, #0] 80049a0: b29b uxth r3, r3 80049a2: 029b lsls r3, r3, #10 80049a4: b29b uxth r3, r3 80049a6: 4313 orrs r3, r2 80049a8: b29b uxth r3, r3 80049aa: 4ad7 ldr r2, [pc, #860] @ (8004d08 ) 80049ac: 4313 orrs r3, r2 80049ae: b29a uxth r2, r3 80049b0: 187b adds r3, r7, r1 80049b2: 681b ldr r3, [r3, #0] 80049b4: 801a strh r2, [r3, #0] 80049b6: e315 b.n 8004fe4 #if (USE_USB_DOUBLE_BUFFER == 1U) else { /* First Transfer Coming From HAL_PCD_EP_Receive & From ISR */ /* Set the Double buffer counter */ if (ep->type == EP_TYPE_BULK) 80049b8: 683b ldr r3, [r7, #0] 80049ba: 78db ldrb r3, [r3, #3] 80049bc: 2b02 cmp r3, #2 80049be: d000 beq.n 80049c2 80049c0: e189 b.n 8004cd6 { PCD_SET_EP_DBUF_CNT(USBx, ep->num, ep->is_in, ep->maxpacket); 80049c2: 683b ldr r3, [r7, #0] 80049c4: 785b ldrb r3, [r3, #1] 80049c6: 2b00 cmp r3, #0 80049c8: d000 beq.n 80049cc 80049ca: e07b b.n 8004ac4 80049cc: 687b ldr r3, [r7, #4] 80049ce: 21ac movs r1, #172 @ 0xac 80049d0: 187a adds r2, r7, r1 80049d2: 6013 str r3, [r2, #0] 80049d4: 687b ldr r3, [r7, #4] 80049d6: 2250 movs r2, #80 @ 0x50 80049d8: 5a9b ldrh r3, [r3, r2] 80049da: b29b uxth r3, r3 80049dc: 001a movs r2, r3 80049de: 187b adds r3, r7, r1 80049e0: 681b ldr r3, [r3, #0] 80049e2: 189b adds r3, r3, r2 80049e4: 187a adds r2, r7, r1 80049e6: 6013 str r3, [r2, #0] 80049e8: 683b ldr r3, [r7, #0] 80049ea: 781b ldrb r3, [r3, #0] 80049ec: 00da lsls r2, r3, #3 80049ee: 187b adds r3, r7, r1 80049f0: 681b ldr r3, [r3, #0] 80049f2: 18d3 adds r3, r2, r3 80049f4: 4ac5 ldr r2, [pc, #788] @ (8004d0c ) 80049f6: 4694 mov ip, r2 80049f8: 4463 add r3, ip 80049fa: 21a8 movs r1, #168 @ 0xa8 80049fc: 187a adds r2, r7, r1 80049fe: 6013 str r3, [r2, #0] 8004a00: 187b adds r3, r7, r1 8004a02: 681b ldr r3, [r3, #0] 8004a04: 881b ldrh r3, [r3, #0] 8004a06: b29b uxth r3, r3 8004a08: 059b lsls r3, r3, #22 8004a0a: 0d9b lsrs r3, r3, #22 8004a0c: b29a uxth r2, r3 8004a0e: 187b adds r3, r7, r1 8004a10: 681b ldr r3, [r3, #0] 8004a12: 801a strh r2, [r3, #0] 8004a14: 683b ldr r3, [r7, #0] 8004a16: 691b ldr r3, [r3, #16] 8004a18: 2b00 cmp r3, #0 8004a1a: d10a bne.n 8004a32 8004a1c: 187b adds r3, r7, r1 8004a1e: 681b ldr r3, [r3, #0] 8004a20: 881b ldrh r3, [r3, #0] 8004a22: b29b uxth r3, r3 8004a24: 4ab8 ldr r2, [pc, #736] @ (8004d08 ) 8004a26: 4313 orrs r3, r2 8004a28: b29a uxth r2, r3 8004a2a: 187b adds r3, r7, r1 8004a2c: 681b ldr r3, [r3, #0] 8004a2e: 801a strh r2, [r3, #0] 8004a30: e06c b.n 8004b0c 8004a32: 683b ldr r3, [r7, #0] 8004a34: 691b ldr r3, [r3, #16] 8004a36: 2b3e cmp r3, #62 @ 0x3e 8004a38: d820 bhi.n 8004a7c 8004a3a: 683b ldr r3, [r7, #0] 8004a3c: 691b ldr r3, [r3, #16] 8004a3e: 085b lsrs r3, r3, #1 8004a40: 21e4 movs r1, #228 @ 0xe4 8004a42: 187a adds r2, r7, r1 8004a44: 6013 str r3, [r2, #0] 8004a46: 683b ldr r3, [r7, #0] 8004a48: 691b ldr r3, [r3, #16] 8004a4a: 2201 movs r2, #1 8004a4c: 4013 ands r3, r2 8004a4e: d004 beq.n 8004a5a 8004a50: 187b adds r3, r7, r1 8004a52: 681b ldr r3, [r3, #0] 8004a54: 3301 adds r3, #1 8004a56: 187a adds r2, r7, r1 8004a58: 6013 str r3, [r2, #0] 8004a5a: 21a8 movs r1, #168 @ 0xa8 8004a5c: 187b adds r3, r7, r1 8004a5e: 681b ldr r3, [r3, #0] 8004a60: 881b ldrh r3, [r3, #0] 8004a62: b29a uxth r2, r3 8004a64: 23e4 movs r3, #228 @ 0xe4 8004a66: 18fb adds r3, r7, r3 8004a68: 681b ldr r3, [r3, #0] 8004a6a: b29b uxth r3, r3 8004a6c: 029b lsls r3, r3, #10 8004a6e: b29b uxth r3, r3 8004a70: 4313 orrs r3, r2 8004a72: b29a uxth r2, r3 8004a74: 187b adds r3, r7, r1 8004a76: 681b ldr r3, [r3, #0] 8004a78: 801a strh r2, [r3, #0] 8004a7a: e047 b.n 8004b0c 8004a7c: 683b ldr r3, [r7, #0] 8004a7e: 691b ldr r3, [r3, #16] 8004a80: 095b lsrs r3, r3, #5 8004a82: 21e4 movs r1, #228 @ 0xe4 8004a84: 187a adds r2, r7, r1 8004a86: 6013 str r3, [r2, #0] 8004a88: 683b ldr r3, [r7, #0] 8004a8a: 691b ldr r3, [r3, #16] 8004a8c: 221f movs r2, #31 8004a8e: 4013 ands r3, r2 8004a90: d104 bne.n 8004a9c 8004a92: 187b adds r3, r7, r1 8004a94: 681b ldr r3, [r3, #0] 8004a96: 3b01 subs r3, #1 8004a98: 187a adds r2, r7, r1 8004a9a: 6013 str r3, [r2, #0] 8004a9c: 21a8 movs r1, #168 @ 0xa8 8004a9e: 187b adds r3, r7, r1 8004aa0: 681b ldr r3, [r3, #0] 8004aa2: 881b ldrh r3, [r3, #0] 8004aa4: b29a uxth r2, r3 8004aa6: 23e4 movs r3, #228 @ 0xe4 8004aa8: 18fb adds r3, r7, r3 8004aaa: 681b ldr r3, [r3, #0] 8004aac: b29b uxth r3, r3 8004aae: 029b lsls r3, r3, #10 8004ab0: b29b uxth r3, r3 8004ab2: 4313 orrs r3, r2 8004ab4: b29b uxth r3, r3 8004ab6: 4a94 ldr r2, [pc, #592] @ (8004d08 ) 8004ab8: 4313 orrs r3, r2 8004aba: b29a uxth r2, r3 8004abc: 187b adds r3, r7, r1 8004abe: 681b ldr r3, [r3, #0] 8004ac0: 801a strh r2, [r3, #0] 8004ac2: e023 b.n 8004b0c 8004ac4: 683b ldr r3, [r7, #0] 8004ac6: 785b ldrb r3, [r3, #1] 8004ac8: 2b01 cmp r3, #1 8004aca: d11f bne.n 8004b0c 8004acc: 687b ldr r3, [r7, #4] 8004ace: 21b4 movs r1, #180 @ 0xb4 8004ad0: 187a adds r2, r7, r1 8004ad2: 6013 str r3, [r2, #0] 8004ad4: 687b ldr r3, [r7, #4] 8004ad6: 2250 movs r2, #80 @ 0x50 8004ad8: 5a9b ldrh r3, [r3, r2] 8004ada: b29b uxth r3, r3 8004adc: 001a movs r2, r3 8004ade: 187b adds r3, r7, r1 8004ae0: 681b ldr r3, [r3, #0] 8004ae2: 189b adds r3, r3, r2 8004ae4: 187a adds r2, r7, r1 8004ae6: 6013 str r3, [r2, #0] 8004ae8: 683b ldr r3, [r7, #0] 8004aea: 781b ldrb r3, [r3, #0] 8004aec: 00da lsls r2, r3, #3 8004aee: 187b adds r3, r7, r1 8004af0: 681b ldr r3, [r3, #0] 8004af2: 18d3 adds r3, r2, r3 8004af4: 4a85 ldr r2, [pc, #532] @ (8004d0c ) 8004af6: 4694 mov ip, r2 8004af8: 4463 add r3, ip 8004afa: 21b0 movs r1, #176 @ 0xb0 8004afc: 187a adds r2, r7, r1 8004afe: 6013 str r3, [r2, #0] 8004b00: 683b ldr r3, [r7, #0] 8004b02: 691b ldr r3, [r3, #16] 8004b04: b29a uxth r2, r3 8004b06: 187b adds r3, r7, r1 8004b08: 681b ldr r3, [r3, #0] 8004b0a: 801a strh r2, [r3, #0] 8004b0c: 687b ldr r3, [r7, #4] 8004b0e: 22a4 movs r2, #164 @ 0xa4 8004b10: 18ba adds r2, r7, r2 8004b12: 6013 str r3, [r2, #0] 8004b14: 683b ldr r3, [r7, #0] 8004b16: 785b ldrb r3, [r3, #1] 8004b18: 2b00 cmp r3, #0 8004b1a: d000 beq.n 8004b1e 8004b1c: e07b b.n 8004c16 8004b1e: 687b ldr r3, [r7, #4] 8004b20: 219c movs r1, #156 @ 0x9c 8004b22: 187a adds r2, r7, r1 8004b24: 6013 str r3, [r2, #0] 8004b26: 687b ldr r3, [r7, #4] 8004b28: 2250 movs r2, #80 @ 0x50 8004b2a: 5a9b ldrh r3, [r3, r2] 8004b2c: b29b uxth r3, r3 8004b2e: 001a movs r2, r3 8004b30: 187b adds r3, r7, r1 8004b32: 681b ldr r3, [r3, #0] 8004b34: 189b adds r3, r3, r2 8004b36: 187a adds r2, r7, r1 8004b38: 6013 str r3, [r2, #0] 8004b3a: 683b ldr r3, [r7, #0] 8004b3c: 781b ldrb r3, [r3, #0] 8004b3e: 00da lsls r2, r3, #3 8004b40: 187b adds r3, r7, r1 8004b42: 681b ldr r3, [r3, #0] 8004b44: 18d3 adds r3, r2, r3 8004b46: 4a72 ldr r2, [pc, #456] @ (8004d10 ) 8004b48: 4694 mov ip, r2 8004b4a: 4463 add r3, ip 8004b4c: 2198 movs r1, #152 @ 0x98 8004b4e: 187a adds r2, r7, r1 8004b50: 6013 str r3, [r2, #0] 8004b52: 187b adds r3, r7, r1 8004b54: 681b ldr r3, [r3, #0] 8004b56: 881b ldrh r3, [r3, #0] 8004b58: b29b uxth r3, r3 8004b5a: 059b lsls r3, r3, #22 8004b5c: 0d9b lsrs r3, r3, #22 8004b5e: b29a uxth r2, r3 8004b60: 187b adds r3, r7, r1 8004b62: 681b ldr r3, [r3, #0] 8004b64: 801a strh r2, [r3, #0] 8004b66: 683b ldr r3, [r7, #0] 8004b68: 691b ldr r3, [r3, #16] 8004b6a: 2b00 cmp r3, #0 8004b6c: d10a bne.n 8004b84 8004b6e: 187b adds r3, r7, r1 8004b70: 681b ldr r3, [r3, #0] 8004b72: 881b ldrh r3, [r3, #0] 8004b74: b29b uxth r3, r3 8004b76: 4a64 ldr r2, [pc, #400] @ (8004d08 ) 8004b78: 4313 orrs r3, r2 8004b7a: b29a uxth r2, r3 8004b7c: 187b adds r3, r7, r1 8004b7e: 681b ldr r3, [r3, #0] 8004b80: 801a strh r2, [r3, #0] 8004b82: e069 b.n 8004c58 8004b84: 683b ldr r3, [r7, #0] 8004b86: 691b ldr r3, [r3, #16] 8004b88: 2b3e cmp r3, #62 @ 0x3e 8004b8a: d820 bhi.n 8004bce 8004b8c: 683b ldr r3, [r7, #0] 8004b8e: 691b ldr r3, [r3, #16] 8004b90: 085b lsrs r3, r3, #1 8004b92: 21e0 movs r1, #224 @ 0xe0 8004b94: 187a adds r2, r7, r1 8004b96: 6013 str r3, [r2, #0] 8004b98: 683b ldr r3, [r7, #0] 8004b9a: 691b ldr r3, [r3, #16] 8004b9c: 2201 movs r2, #1 8004b9e: 4013 ands r3, r2 8004ba0: d004 beq.n 8004bac 8004ba2: 187b adds r3, r7, r1 8004ba4: 681b ldr r3, [r3, #0] 8004ba6: 3301 adds r3, #1 8004ba8: 187a adds r2, r7, r1 8004baa: 6013 str r3, [r2, #0] 8004bac: 2198 movs r1, #152 @ 0x98 8004bae: 187b adds r3, r7, r1 8004bb0: 681b ldr r3, [r3, #0] 8004bb2: 881b ldrh r3, [r3, #0] 8004bb4: b29a uxth r2, r3 8004bb6: 23e0 movs r3, #224 @ 0xe0 8004bb8: 18fb adds r3, r7, r3 8004bba: 681b ldr r3, [r3, #0] 8004bbc: b29b uxth r3, r3 8004bbe: 029b lsls r3, r3, #10 8004bc0: b29b uxth r3, r3 8004bc2: 4313 orrs r3, r2 8004bc4: b29a uxth r2, r3 8004bc6: 187b adds r3, r7, r1 8004bc8: 681b ldr r3, [r3, #0] 8004bca: 801a strh r2, [r3, #0] 8004bcc: e044 b.n 8004c58 8004bce: 683b ldr r3, [r7, #0] 8004bd0: 691b ldr r3, [r3, #16] 8004bd2: 095b lsrs r3, r3, #5 8004bd4: 21e0 movs r1, #224 @ 0xe0 8004bd6: 187a adds r2, r7, r1 8004bd8: 6013 str r3, [r2, #0] 8004bda: 683b ldr r3, [r7, #0] 8004bdc: 691b ldr r3, [r3, #16] 8004bde: 221f movs r2, #31 8004be0: 4013 ands r3, r2 8004be2: d104 bne.n 8004bee 8004be4: 187b adds r3, r7, r1 8004be6: 681b ldr r3, [r3, #0] 8004be8: 3b01 subs r3, #1 8004bea: 187a adds r2, r7, r1 8004bec: 6013 str r3, [r2, #0] 8004bee: 2198 movs r1, #152 @ 0x98 8004bf0: 187b adds r3, r7, r1 8004bf2: 681b ldr r3, [r3, #0] 8004bf4: 881b ldrh r3, [r3, #0] 8004bf6: b29a uxth r2, r3 8004bf8: 23e0 movs r3, #224 @ 0xe0 8004bfa: 18fb adds r3, r7, r3 8004bfc: 681b ldr r3, [r3, #0] 8004bfe: b29b uxth r3, r3 8004c00: 029b lsls r3, r3, #10 8004c02: b29b uxth r3, r3 8004c04: 4313 orrs r3, r2 8004c06: b29b uxth r3, r3 8004c08: 4a3f ldr r2, [pc, #252] @ (8004d08 ) 8004c0a: 4313 orrs r3, r2 8004c0c: b29a uxth r2, r3 8004c0e: 187b adds r3, r7, r1 8004c10: 681b ldr r3, [r3, #0] 8004c12: 801a strh r2, [r3, #0] 8004c14: e020 b.n 8004c58 8004c16: 683b ldr r3, [r7, #0] 8004c18: 785b ldrb r3, [r3, #1] 8004c1a: 2b01 cmp r3, #1 8004c1c: d11c bne.n 8004c58 8004c1e: 687b ldr r3, [r7, #4] 8004c20: 2250 movs r2, #80 @ 0x50 8004c22: 5a9b ldrh r3, [r3, r2] 8004c24: b29b uxth r3, r3 8004c26: 001a movs r2, r3 8004c28: 21a4 movs r1, #164 @ 0xa4 8004c2a: 187b adds r3, r7, r1 8004c2c: 681b ldr r3, [r3, #0] 8004c2e: 189b adds r3, r3, r2 8004c30: 187a adds r2, r7, r1 8004c32: 6013 str r3, [r2, #0] 8004c34: 683b ldr r3, [r7, #0] 8004c36: 781b ldrb r3, [r3, #0] 8004c38: 00da lsls r2, r3, #3 8004c3a: 187b adds r3, r7, r1 8004c3c: 681b ldr r3, [r3, #0] 8004c3e: 18d3 adds r3, r2, r3 8004c40: 4a33 ldr r2, [pc, #204] @ (8004d10 ) 8004c42: 4694 mov ip, r2 8004c44: 4463 add r3, ip 8004c46: 21a0 movs r1, #160 @ 0xa0 8004c48: 187a adds r2, r7, r1 8004c4a: 6013 str r3, [r2, #0] 8004c4c: 683b ldr r3, [r7, #0] 8004c4e: 691b ldr r3, [r3, #16] 8004c50: b29a uxth r2, r3 8004c52: 187b adds r3, r7, r1 8004c54: 681b ldr r3, [r3, #0] 8004c56: 801a strh r2, [r3, #0] /* Coming from ISR */ if (ep->xfer_count != 0U) 8004c58: 683b ldr r3, [r7, #0] 8004c5a: 69db ldr r3, [r3, #28] 8004c5c: 2b00 cmp r3, #0 8004c5e: d100 bne.n 8004c62 8004c60: e1c0 b.n 8004fe4 { /* update last value to check if there is blocking state */ wEPVal = PCD_GET_ENDPOINT(USBx, ep->num); 8004c62: 687a ldr r2, [r7, #4] 8004c64: 683b ldr r3, [r7, #0] 8004c66: 781b ldrb r3, [r3, #0] 8004c68: 009b lsls r3, r3, #2 8004c6a: 18d2 adds r2, r2, r3 8004c6c: 2196 movs r1, #150 @ 0x96 8004c6e: 187b adds r3, r7, r1 8004c70: 8812 ldrh r2, [r2, #0] 8004c72: 801a strh r2, [r3, #0] /*Blocking State */ if ((((wEPVal & USB_EP_DTOG_RX) != 0U) && ((wEPVal & USB_EP_DTOG_TX) != 0U)) || 8004c74: 187b adds r3, r7, r1 8004c76: 881a ldrh r2, [r3, #0] 8004c78: 2380 movs r3, #128 @ 0x80 8004c7a: 01db lsls r3, r3, #7 8004c7c: 4013 ands r3, r2 8004c7e: d004 beq.n 8004c8a 8004c80: 187b adds r3, r7, r1 8004c82: 881b ldrh r3, [r3, #0] 8004c84: 2240 movs r2, #64 @ 0x40 8004c86: 4013 ands r3, r2 8004c88: d10d bne.n 8004ca6 (((wEPVal & USB_EP_DTOG_RX) == 0U) && ((wEPVal & USB_EP_DTOG_TX) == 0U))) 8004c8a: 2196 movs r1, #150 @ 0x96 8004c8c: 187b adds r3, r7, r1 8004c8e: 881a ldrh r2, [r3, #0] 8004c90: 2380 movs r3, #128 @ 0x80 8004c92: 01db lsls r3, r3, #7 8004c94: 4013 ands r3, r2 if ((((wEPVal & USB_EP_DTOG_RX) != 0U) && ((wEPVal & USB_EP_DTOG_TX) != 0U)) || 8004c96: d000 beq.n 8004c9a 8004c98: e1a4 b.n 8004fe4 (((wEPVal & USB_EP_DTOG_RX) == 0U) && ((wEPVal & USB_EP_DTOG_TX) == 0U))) 8004c9a: 187b adds r3, r7, r1 8004c9c: 881b ldrh r3, [r3, #0] 8004c9e: 2240 movs r2, #64 @ 0x40 8004ca0: 4013 ands r3, r2 8004ca2: d000 beq.n 8004ca6 8004ca4: e19e b.n 8004fe4 { PCD_FREE_USER_BUFFER(USBx, ep->num, 0U); 8004ca6: 687a ldr r2, [r7, #4] 8004ca8: 683b ldr r3, [r7, #0] 8004caa: 781b ldrb r3, [r3, #0] 8004cac: 009b lsls r3, r3, #2 8004cae: 18d3 adds r3, r2, r3 8004cb0: 881b ldrh r3, [r3, #0] 8004cb2: b29a uxth r2, r3 8004cb4: 2094 movs r0, #148 @ 0x94 8004cb6: 183b adds r3, r7, r0 8004cb8: 4916 ldr r1, [pc, #88] @ (8004d14 ) 8004cba: 400a ands r2, r1 8004cbc: 801a strh r2, [r3, #0] 8004cbe: 687a ldr r2, [r7, #4] 8004cc0: 683b ldr r3, [r7, #0] 8004cc2: 781b ldrb r3, [r3, #0] 8004cc4: 009b lsls r3, r3, #2 8004cc6: 18d3 adds r3, r2, r3 8004cc8: 183a adds r2, r7, r0 8004cca: 8812 ldrh r2, [r2, #0] 8004ccc: 4912 ldr r1, [pc, #72] @ (8004d18 ) 8004cce: 430a orrs r2, r1 8004cd0: b292 uxth r2, r2 8004cd2: 801a strh r2, [r3, #0] 8004cd4: e186 b.n 8004fe4 } } } /* iso out double */ else if (ep->type == EP_TYPE_ISOC) 8004cd6: 683b ldr r3, [r7, #0] 8004cd8: 78db ldrb r3, [r3, #3] 8004cda: 2b01 cmp r3, #1 8004cdc: d000 beq.n 8004ce0 8004cde: e17f b.n 8004fe0 { /* Multi packet transfer */ if (ep->xfer_len > ep->maxpacket) 8004ce0: 683b ldr r3, [r7, #0] 8004ce2: 699a ldr r2, [r3, #24] 8004ce4: 683b ldr r3, [r7, #0] 8004ce6: 691b ldr r3, [r3, #16] 8004ce8: 429a cmp r2, r3 8004cea: d917 bls.n 8004d1c { len = ep->maxpacket; 8004cec: 683b ldr r3, [r7, #0] 8004cee: 691b ldr r3, [r3, #16] 8004cf0: 1d7a adds r2, r7, #5 8004cf2: 32ff adds r2, #255 @ 0xff 8004cf4: 6013 str r3, [r2, #0] ep->xfer_len -= len; 8004cf6: 683b ldr r3, [r7, #0] 8004cf8: 699a ldr r2, [r3, #24] 8004cfa: 1d7b adds r3, r7, #5 8004cfc: 33ff adds r3, #255 @ 0xff 8004cfe: 681b ldr r3, [r3, #0] 8004d00: 1ad2 subs r2, r2, r3 8004d02: 683b ldr r3, [r7, #0] 8004d04: 619a str r2, [r3, #24] 8004d06: e011 b.n 8004d2c 8004d08: ffff8000 .word 0xffff8000 8004d0c: 00000402 .word 0x00000402 8004d10: 00000406 .word 0x00000406 8004d14: ffff8f8f .word 0xffff8f8f 8004d18: ffff80c0 .word 0xffff80c0 } else { len = ep->xfer_len; 8004d1c: 683b ldr r3, [r7, #0] 8004d1e: 699b ldr r3, [r3, #24] 8004d20: 1d7a adds r2, r7, #5 8004d22: 32ff adds r2, #255 @ 0xff 8004d24: 6013 str r3, [r2, #0] ep->xfer_len = 0U; 8004d26: 683b ldr r3, [r7, #0] 8004d28: 2200 movs r2, #0 8004d2a: 619a str r2, [r3, #24] } PCD_SET_EP_DBUF_CNT(USBx, ep->num, ep->is_in, len); 8004d2c: 683b ldr r3, [r7, #0] 8004d2e: 785b ldrb r3, [r3, #1] 8004d30: 2b00 cmp r3, #0 8004d32: d000 beq.n 8004d36 8004d34: e081 b.n 8004e3a 8004d36: 687b ldr r3, [r7, #4] 8004d38: 21cc movs r1, #204 @ 0xcc 8004d3a: 187a adds r2, r7, r1 8004d3c: 6013 str r3, [r2, #0] 8004d3e: 687b ldr r3, [r7, #4] 8004d40: 2250 movs r2, #80 @ 0x50 8004d42: 5a9b ldrh r3, [r3, r2] 8004d44: b29b uxth r3, r3 8004d46: 001a movs r2, r3 8004d48: 187b adds r3, r7, r1 8004d4a: 681b ldr r3, [r3, #0] 8004d4c: 189b adds r3, r3, r2 8004d4e: 187a adds r2, r7, r1 8004d50: 6013 str r3, [r2, #0] 8004d52: 683b ldr r3, [r7, #0] 8004d54: 781b ldrb r3, [r3, #0] 8004d56: 00da lsls r2, r3, #3 8004d58: 187b adds r3, r7, r1 8004d5a: 681b ldr r3, [r3, #0] 8004d5c: 18d3 adds r3, r2, r3 8004d5e: 4ab6 ldr r2, [pc, #728] @ (8005038 ) 8004d60: 4694 mov ip, r2 8004d62: 4463 add r3, ip 8004d64: 21c8 movs r1, #200 @ 0xc8 8004d66: 187a adds r2, r7, r1 8004d68: 6013 str r3, [r2, #0] 8004d6a: 187b adds r3, r7, r1 8004d6c: 681b ldr r3, [r3, #0] 8004d6e: 881b ldrh r3, [r3, #0] 8004d70: b29b uxth r3, r3 8004d72: 059b lsls r3, r3, #22 8004d74: 0d9b lsrs r3, r3, #22 8004d76: b29a uxth r2, r3 8004d78: 187b adds r3, r7, r1 8004d7a: 681b ldr r3, [r3, #0] 8004d7c: 801a strh r2, [r3, #0] 8004d7e: 1d7b adds r3, r7, #5 8004d80: 33ff adds r3, #255 @ 0xff 8004d82: 681b ldr r3, [r3, #0] 8004d84: 2b00 cmp r3, #0 8004d86: d10a bne.n 8004d9e 8004d88: 187b adds r3, r7, r1 8004d8a: 681b ldr r3, [r3, #0] 8004d8c: 881b ldrh r3, [r3, #0] 8004d8e: b29b uxth r3, r3 8004d90: 4aaa ldr r2, [pc, #680] @ (800503c ) 8004d92: 4313 orrs r3, r2 8004d94: b29a uxth r2, r3 8004d96: 187b adds r3, r7, r1 8004d98: 681b ldr r3, [r3, #0] 8004d9a: 801a strh r2, [r3, #0] 8004d9c: e072 b.n 8004e84 8004d9e: 1d7b adds r3, r7, #5 8004da0: 33ff adds r3, #255 @ 0xff 8004da2: 681b ldr r3, [r3, #0] 8004da4: 2b3e cmp r3, #62 @ 0x3e 8004da6: d822 bhi.n 8004dee 8004da8: 1d7b adds r3, r7, #5 8004daa: 33ff adds r3, #255 @ 0xff 8004dac: 681b ldr r3, [r3, #0] 8004dae: 085b lsrs r3, r3, #1 8004db0: 21dc movs r1, #220 @ 0xdc 8004db2: 187a adds r2, r7, r1 8004db4: 6013 str r3, [r2, #0] 8004db6: 1d7b adds r3, r7, #5 8004db8: 33ff adds r3, #255 @ 0xff 8004dba: 681b ldr r3, [r3, #0] 8004dbc: 2201 movs r2, #1 8004dbe: 4013 ands r3, r2 8004dc0: d004 beq.n 8004dcc 8004dc2: 187b adds r3, r7, r1 8004dc4: 681b ldr r3, [r3, #0] 8004dc6: 3301 adds r3, #1 8004dc8: 187a adds r2, r7, r1 8004dca: 6013 str r3, [r2, #0] 8004dcc: 21c8 movs r1, #200 @ 0xc8 8004dce: 187b adds r3, r7, r1 8004dd0: 681b ldr r3, [r3, #0] 8004dd2: 881b ldrh r3, [r3, #0] 8004dd4: b29a uxth r2, r3 8004dd6: 23dc movs r3, #220 @ 0xdc 8004dd8: 18fb adds r3, r7, r3 8004dda: 681b ldr r3, [r3, #0] 8004ddc: b29b uxth r3, r3 8004dde: 029b lsls r3, r3, #10 8004de0: b29b uxth r3, r3 8004de2: 4313 orrs r3, r2 8004de4: b29a uxth r2, r3 8004de6: 187b adds r3, r7, r1 8004de8: 681b ldr r3, [r3, #0] 8004dea: 801a strh r2, [r3, #0] 8004dec: e04a b.n 8004e84 8004dee: 1d7b adds r3, r7, #5 8004df0: 33ff adds r3, #255 @ 0xff 8004df2: 681b ldr r3, [r3, #0] 8004df4: 095b lsrs r3, r3, #5 8004df6: 21dc movs r1, #220 @ 0xdc 8004df8: 187a adds r2, r7, r1 8004dfa: 6013 str r3, [r2, #0] 8004dfc: 1d7b adds r3, r7, #5 8004dfe: 33ff adds r3, #255 @ 0xff 8004e00: 681b ldr r3, [r3, #0] 8004e02: 221f movs r2, #31 8004e04: 4013 ands r3, r2 8004e06: d104 bne.n 8004e12 8004e08: 187b adds r3, r7, r1 8004e0a: 681b ldr r3, [r3, #0] 8004e0c: 3b01 subs r3, #1 8004e0e: 187a adds r2, r7, r1 8004e10: 6013 str r3, [r2, #0] 8004e12: 21c8 movs r1, #200 @ 0xc8 8004e14: 187b adds r3, r7, r1 8004e16: 681b ldr r3, [r3, #0] 8004e18: 881b ldrh r3, [r3, #0] 8004e1a: b29a uxth r2, r3 8004e1c: 23dc movs r3, #220 @ 0xdc 8004e1e: 18fb adds r3, r7, r3 8004e20: 681b ldr r3, [r3, #0] 8004e22: b29b uxth r3, r3 8004e24: 029b lsls r3, r3, #10 8004e26: b29b uxth r3, r3 8004e28: 4313 orrs r3, r2 8004e2a: b29b uxth r3, r3 8004e2c: 4a83 ldr r2, [pc, #524] @ (800503c ) 8004e2e: 4313 orrs r3, r2 8004e30: b29a uxth r2, r3 8004e32: 187b adds r3, r7, r1 8004e34: 681b ldr r3, [r3, #0] 8004e36: 801a strh r2, [r3, #0] 8004e38: e024 b.n 8004e84 8004e3a: 683b ldr r3, [r7, #0] 8004e3c: 785b ldrb r3, [r3, #1] 8004e3e: 2b01 cmp r3, #1 8004e40: d120 bne.n 8004e84 8004e42: 687b ldr r3, [r7, #4] 8004e44: 21d4 movs r1, #212 @ 0xd4 8004e46: 187a adds r2, r7, r1 8004e48: 6013 str r3, [r2, #0] 8004e4a: 687b ldr r3, [r7, #4] 8004e4c: 2250 movs r2, #80 @ 0x50 8004e4e: 5a9b ldrh r3, [r3, r2] 8004e50: b29b uxth r3, r3 8004e52: 001a movs r2, r3 8004e54: 187b adds r3, r7, r1 8004e56: 681b ldr r3, [r3, #0] 8004e58: 189b adds r3, r3, r2 8004e5a: 187a adds r2, r7, r1 8004e5c: 6013 str r3, [r2, #0] 8004e5e: 683b ldr r3, [r7, #0] 8004e60: 781b ldrb r3, [r3, #0] 8004e62: 00da lsls r2, r3, #3 8004e64: 187b adds r3, r7, r1 8004e66: 681b ldr r3, [r3, #0] 8004e68: 18d3 adds r3, r2, r3 8004e6a: 4a73 ldr r2, [pc, #460] @ (8005038 ) 8004e6c: 4694 mov ip, r2 8004e6e: 4463 add r3, ip 8004e70: 21d0 movs r1, #208 @ 0xd0 8004e72: 187a adds r2, r7, r1 8004e74: 6013 str r3, [r2, #0] 8004e76: 1d7b adds r3, r7, #5 8004e78: 33ff adds r3, #255 @ 0xff 8004e7a: 681b ldr r3, [r3, #0] 8004e7c: b29a uxth r2, r3 8004e7e: 187b adds r3, r7, r1 8004e80: 681b ldr r3, [r3, #0] 8004e82: 801a strh r2, [r3, #0] 8004e84: 687b ldr r3, [r7, #4] 8004e86: 22c4 movs r2, #196 @ 0xc4 8004e88: 18ba adds r2, r7, r2 8004e8a: 6013 str r3, [r2, #0] 8004e8c: 683b ldr r3, [r7, #0] 8004e8e: 785b ldrb r3, [r3, #1] 8004e90: 2b00 cmp r3, #0 8004e92: d000 beq.n 8004e96 8004e94: e081 b.n 8004f9a 8004e96: 687b ldr r3, [r7, #4] 8004e98: 21bc movs r1, #188 @ 0xbc 8004e9a: 187a adds r2, r7, r1 8004e9c: 6013 str r3, [r2, #0] 8004e9e: 687b ldr r3, [r7, #4] 8004ea0: 2250 movs r2, #80 @ 0x50 8004ea2: 5a9b ldrh r3, [r3, r2] 8004ea4: b29b uxth r3, r3 8004ea6: 001a movs r2, r3 8004ea8: 187b adds r3, r7, r1 8004eaa: 681b ldr r3, [r3, #0] 8004eac: 189b adds r3, r3, r2 8004eae: 187a adds r2, r7, r1 8004eb0: 6013 str r3, [r2, #0] 8004eb2: 683b ldr r3, [r7, #0] 8004eb4: 781b ldrb r3, [r3, #0] 8004eb6: 00da lsls r2, r3, #3 8004eb8: 187b adds r3, r7, r1 8004eba: 681b ldr r3, [r3, #0] 8004ebc: 18d3 adds r3, r2, r3 8004ebe: 4a60 ldr r2, [pc, #384] @ (8005040 ) 8004ec0: 4694 mov ip, r2 8004ec2: 4463 add r3, ip 8004ec4: 21b8 movs r1, #184 @ 0xb8 8004ec6: 187a adds r2, r7, r1 8004ec8: 6013 str r3, [r2, #0] 8004eca: 187b adds r3, r7, r1 8004ecc: 681b ldr r3, [r3, #0] 8004ece: 881b ldrh r3, [r3, #0] 8004ed0: b29b uxth r3, r3 8004ed2: 059b lsls r3, r3, #22 8004ed4: 0d9b lsrs r3, r3, #22 8004ed6: b29a uxth r2, r3 8004ed8: 187b adds r3, r7, r1 8004eda: 681b ldr r3, [r3, #0] 8004edc: 801a strh r2, [r3, #0] 8004ede: 1d7b adds r3, r7, #5 8004ee0: 33ff adds r3, #255 @ 0xff 8004ee2: 681b ldr r3, [r3, #0] 8004ee4: 2b00 cmp r3, #0 8004ee6: d10a bne.n 8004efe 8004ee8: 187b adds r3, r7, r1 8004eea: 681b ldr r3, [r3, #0] 8004eec: 881b ldrh r3, [r3, #0] 8004eee: b29b uxth r3, r3 8004ef0: 4a52 ldr r2, [pc, #328] @ (800503c ) 8004ef2: 4313 orrs r3, r2 8004ef4: b29a uxth r2, r3 8004ef6: 187b adds r3, r7, r1 8004ef8: 681b ldr r3, [r3, #0] 8004efa: 801a strh r2, [r3, #0] 8004efc: e072 b.n 8004fe4 8004efe: 1d7b adds r3, r7, #5 8004f00: 33ff adds r3, #255 @ 0xff 8004f02: 681b ldr r3, [r3, #0] 8004f04: 2b3e cmp r3, #62 @ 0x3e 8004f06: d822 bhi.n 8004f4e 8004f08: 1d7b adds r3, r7, #5 8004f0a: 33ff adds r3, #255 @ 0xff 8004f0c: 681b ldr r3, [r3, #0] 8004f0e: 085b lsrs r3, r3, #1 8004f10: 21d8 movs r1, #216 @ 0xd8 8004f12: 187a adds r2, r7, r1 8004f14: 6013 str r3, [r2, #0] 8004f16: 1d7b adds r3, r7, #5 8004f18: 33ff adds r3, #255 @ 0xff 8004f1a: 681b ldr r3, [r3, #0] 8004f1c: 2201 movs r2, #1 8004f1e: 4013 ands r3, r2 8004f20: d004 beq.n 8004f2c 8004f22: 187b adds r3, r7, r1 8004f24: 681b ldr r3, [r3, #0] 8004f26: 3301 adds r3, #1 8004f28: 187a adds r2, r7, r1 8004f2a: 6013 str r3, [r2, #0] 8004f2c: 21b8 movs r1, #184 @ 0xb8 8004f2e: 187b adds r3, r7, r1 8004f30: 681b ldr r3, [r3, #0] 8004f32: 881b ldrh r3, [r3, #0] 8004f34: b29a uxth r2, r3 8004f36: 23d8 movs r3, #216 @ 0xd8 8004f38: 18fb adds r3, r7, r3 8004f3a: 681b ldr r3, [r3, #0] 8004f3c: b29b uxth r3, r3 8004f3e: 029b lsls r3, r3, #10 8004f40: b29b uxth r3, r3 8004f42: 4313 orrs r3, r2 8004f44: b29a uxth r2, r3 8004f46: 187b adds r3, r7, r1 8004f48: 681b ldr r3, [r3, #0] 8004f4a: 801a strh r2, [r3, #0] 8004f4c: e04a b.n 8004fe4 8004f4e: 1d7b adds r3, r7, #5 8004f50: 33ff adds r3, #255 @ 0xff 8004f52: 681b ldr r3, [r3, #0] 8004f54: 095b lsrs r3, r3, #5 8004f56: 21d8 movs r1, #216 @ 0xd8 8004f58: 187a adds r2, r7, r1 8004f5a: 6013 str r3, [r2, #0] 8004f5c: 1d7b adds r3, r7, #5 8004f5e: 33ff adds r3, #255 @ 0xff 8004f60: 681b ldr r3, [r3, #0] 8004f62: 221f movs r2, #31 8004f64: 4013 ands r3, r2 8004f66: d104 bne.n 8004f72 8004f68: 187b adds r3, r7, r1 8004f6a: 681b ldr r3, [r3, #0] 8004f6c: 3b01 subs r3, #1 8004f6e: 187a adds r2, r7, r1 8004f70: 6013 str r3, [r2, #0] 8004f72: 21b8 movs r1, #184 @ 0xb8 8004f74: 187b adds r3, r7, r1 8004f76: 681b ldr r3, [r3, #0] 8004f78: 881b ldrh r3, [r3, #0] 8004f7a: b29a uxth r2, r3 8004f7c: 23d8 movs r3, #216 @ 0xd8 8004f7e: 18fb adds r3, r7, r3 8004f80: 681b ldr r3, [r3, #0] 8004f82: b29b uxth r3, r3 8004f84: 029b lsls r3, r3, #10 8004f86: b29b uxth r3, r3 8004f88: 4313 orrs r3, r2 8004f8a: b29b uxth r3, r3 8004f8c: 4a2b ldr r2, [pc, #172] @ (800503c ) 8004f8e: 4313 orrs r3, r2 8004f90: b29a uxth r2, r3 8004f92: 187b adds r3, r7, r1 8004f94: 681b ldr r3, [r3, #0] 8004f96: 801a strh r2, [r3, #0] 8004f98: e024 b.n 8004fe4 8004f9a: 683b ldr r3, [r7, #0] 8004f9c: 785b ldrb r3, [r3, #1] 8004f9e: 2b01 cmp r3, #1 8004fa0: d120 bne.n 8004fe4 8004fa2: 687b ldr r3, [r7, #4] 8004fa4: 2250 movs r2, #80 @ 0x50 8004fa6: 5a9b ldrh r3, [r3, r2] 8004fa8: b29b uxth r3, r3 8004faa: 001a movs r2, r3 8004fac: 21c4 movs r1, #196 @ 0xc4 8004fae: 187b adds r3, r7, r1 8004fb0: 681b ldr r3, [r3, #0] 8004fb2: 189b adds r3, r3, r2 8004fb4: 187a adds r2, r7, r1 8004fb6: 6013 str r3, [r2, #0] 8004fb8: 683b ldr r3, [r7, #0] 8004fba: 781b ldrb r3, [r3, #0] 8004fbc: 00da lsls r2, r3, #3 8004fbe: 187b adds r3, r7, r1 8004fc0: 681b ldr r3, [r3, #0] 8004fc2: 18d3 adds r3, r2, r3 8004fc4: 4a1e ldr r2, [pc, #120] @ (8005040 ) 8004fc6: 4694 mov ip, r2 8004fc8: 4463 add r3, ip 8004fca: 21c0 movs r1, #192 @ 0xc0 8004fcc: 187a adds r2, r7, r1 8004fce: 6013 str r3, [r2, #0] 8004fd0: 1d7b adds r3, r7, #5 8004fd2: 33ff adds r3, #255 @ 0xff 8004fd4: 681b ldr r3, [r3, #0] 8004fd6: b29a uxth r2, r3 8004fd8: 187b adds r3, r7, r1 8004fda: 681b ldr r3, [r3, #0] 8004fdc: 801a strh r2, [r3, #0] 8004fde: e001 b.n 8004fe4 } else { return HAL_ERROR; 8004fe0: 2301 movs r3, #1 8004fe2: e025 b.n 8005030 } } #endif /* (USE_USB_DOUBLE_BUFFER == 1U) */ PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID); 8004fe4: 687a ldr r2, [r7, #4] 8004fe6: 683b ldr r3, [r7, #0] 8004fe8: 781b ldrb r3, [r3, #0] 8004fea: 009b lsls r3, r3, #2 8004fec: 18d3 adds r3, r2, r3 8004fee: 881b ldrh r3, [r3, #0] 8004ff0: b29a uxth r2, r3 8004ff2: 208a movs r0, #138 @ 0x8a 8004ff4: 183b adds r3, r7, r0 8004ff6: 4913 ldr r1, [pc, #76] @ (8005044 ) 8004ff8: 400a ands r2, r1 8004ffa: 801a strh r2, [r3, #0] 8004ffc: 183b adds r3, r7, r0 8004ffe: 183a adds r2, r7, r0 8005000: 8812 ldrh r2, [r2, #0] 8005002: 2180 movs r1, #128 @ 0x80 8005004: 0149 lsls r1, r1, #5 8005006: 404a eors r2, r1 8005008: 801a strh r2, [r3, #0] 800500a: 183b adds r3, r7, r0 800500c: 183a adds r2, r7, r0 800500e: 8812 ldrh r2, [r2, #0] 8005010: 2180 movs r1, #128 @ 0x80 8005012: 0189 lsls r1, r1, #6 8005014: 404a eors r2, r1 8005016: 801a strh r2, [r3, #0] 8005018: 687a ldr r2, [r7, #4] 800501a: 683b ldr r3, [r7, #0] 800501c: 781b ldrb r3, [r3, #0] 800501e: 009b lsls r3, r3, #2 8005020: 18d3 adds r3, r2, r3 8005022: 183a adds r2, r7, r0 8005024: 8812 ldrh r2, [r2, #0] 8005026: 4908 ldr r1, [pc, #32] @ (8005048 ) 8005028: 430a orrs r2, r1 800502a: b292 uxth r2, r2 800502c: 801a strh r2, [r3, #0] } return HAL_OK; 800502e: 2300 movs r3, #0 } 8005030: 0018 movs r0, r3 8005032: 46bd mov sp, r7 8005034: b043 add sp, #268 @ 0x10c 8005036: bd90 pop {r4, r7, pc} 8005038: 00000402 .word 0x00000402 800503c: ffff8000 .word 0xffff8000 8005040: 00000406 .word 0x00000406 8005044: ffffbf8f .word 0xffffbf8f 8005048: ffff8080 .word 0xffff8080 0800504c : * @param USBx Selected device * @param ep pointer to endpoint structure * @retval HAL status */ HAL_StatusTypeDef USB_EPSetStall(USB_TypeDef *USBx, USB_EPTypeDef *ep) { 800504c: b580 push {r7, lr} 800504e: b084 sub sp, #16 8005050: af00 add r7, sp, #0 8005052: 6078 str r0, [r7, #4] 8005054: 6039 str r1, [r7, #0] if (ep->is_in != 0U) 8005056: 683b ldr r3, [r7, #0] 8005058: 785b ldrb r3, [r3, #1] 800505a: 2b00 cmp r3, #0 800505c: d01d beq.n 800509a { PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_STALL); 800505e: 687a ldr r2, [r7, #4] 8005060: 683b ldr r3, [r7, #0] 8005062: 781b ldrb r3, [r3, #0] 8005064: 009b lsls r3, r3, #2 8005066: 18d3 adds r3, r2, r3 8005068: 881b ldrh r3, [r3, #0] 800506a: b29a uxth r2, r3 800506c: 200c movs r0, #12 800506e: 183b adds r3, r7, r0 8005070: 491b ldr r1, [pc, #108] @ (80050e0 ) 8005072: 400a ands r2, r1 8005074: 801a strh r2, [r3, #0] 8005076: 183b adds r3, r7, r0 8005078: 183a adds r2, r7, r0 800507a: 8812 ldrh r2, [r2, #0] 800507c: 2110 movs r1, #16 800507e: 404a eors r2, r1 8005080: 801a strh r2, [r3, #0] 8005082: 687a ldr r2, [r7, #4] 8005084: 683b ldr r3, [r7, #0] 8005086: 781b ldrb r3, [r3, #0] 8005088: 009b lsls r3, r3, #2 800508a: 18d3 adds r3, r2, r3 800508c: 183a adds r2, r7, r0 800508e: 8812 ldrh r2, [r2, #0] 8005090: 4914 ldr r1, [pc, #80] @ (80050e4 ) 8005092: 430a orrs r2, r1 8005094: b292 uxth r2, r2 8005096: 801a strh r2, [r3, #0] 8005098: e01d b.n 80050d6 } else { PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_STALL); 800509a: 687a ldr r2, [r7, #4] 800509c: 683b ldr r3, [r7, #0] 800509e: 781b ldrb r3, [r3, #0] 80050a0: 009b lsls r3, r3, #2 80050a2: 18d3 adds r3, r2, r3 80050a4: 881b ldrh r3, [r3, #0] 80050a6: b29a uxth r2, r3 80050a8: 200e movs r0, #14 80050aa: 183b adds r3, r7, r0 80050ac: 490e ldr r1, [pc, #56] @ (80050e8 ) 80050ae: 400a ands r2, r1 80050b0: 801a strh r2, [r3, #0] 80050b2: 183b adds r3, r7, r0 80050b4: 183a adds r2, r7, r0 80050b6: 8812 ldrh r2, [r2, #0] 80050b8: 2180 movs r1, #128 @ 0x80 80050ba: 0149 lsls r1, r1, #5 80050bc: 404a eors r2, r1 80050be: 801a strh r2, [r3, #0] 80050c0: 687a ldr r2, [r7, #4] 80050c2: 683b ldr r3, [r7, #0] 80050c4: 781b ldrb r3, [r3, #0] 80050c6: 009b lsls r3, r3, #2 80050c8: 18d3 adds r3, r2, r3 80050ca: 183a adds r2, r7, r0 80050cc: 8812 ldrh r2, [r2, #0] 80050ce: 4905 ldr r1, [pc, #20] @ (80050e4 ) 80050d0: 430a orrs r2, r1 80050d2: b292 uxth r2, r2 80050d4: 801a strh r2, [r3, #0] } return HAL_OK; 80050d6: 2300 movs r3, #0 } 80050d8: 0018 movs r0, r3 80050da: 46bd mov sp, r7 80050dc: b004 add sp, #16 80050de: bd80 pop {r7, pc} 80050e0: ffff8fbf .word 0xffff8fbf 80050e4: ffff8080 .word 0xffff8080 80050e8: ffffbf8f .word 0xffffbf8f 080050ec : * @param USBx Selected device * @param ep pointer to endpoint structure * @retval HAL status */ HAL_StatusTypeDef USB_EPClearStall(USB_TypeDef *USBx, USB_EPTypeDef *ep) { 80050ec: b580 push {r7, lr} 80050ee: b086 sub sp, #24 80050f0: af00 add r7, sp, #0 80050f2: 6078 str r0, [r7, #4] 80050f4: 6039 str r1, [r7, #0] if (ep->doublebuffer == 0U) 80050f6: 683b ldr r3, [r7, #0] 80050f8: 7b1b ldrb r3, [r3, #12] 80050fa: 2b00 cmp r3, #0 80050fc: d000 beq.n 8005100 80050fe: e095 b.n 800522c { if (ep->is_in != 0U) 8005100: 683b ldr r3, [r7, #0] 8005102: 785b ldrb r3, [r3, #1] 8005104: 2b00 cmp r3, #0 8005106: d046 beq.n 8005196 { PCD_CLEAR_TX_DTOG(USBx, ep->num); 8005108: 687a ldr r2, [r7, #4] 800510a: 683b ldr r3, [r7, #0] 800510c: 781b ldrb r3, [r3, #0] 800510e: 009b lsls r3, r3, #2 8005110: 18d2 adds r2, r2, r3 8005112: 2110 movs r1, #16 8005114: 187b adds r3, r7, r1 8005116: 8812 ldrh r2, [r2, #0] 8005118: 801a strh r2, [r3, #0] 800511a: 187b adds r3, r7, r1 800511c: 881b ldrh r3, [r3, #0] 800511e: 2240 movs r2, #64 @ 0x40 8005120: 4013 ands r3, r2 8005122: d016 beq.n 8005152 8005124: 687a ldr r2, [r7, #4] 8005126: 683b ldr r3, [r7, #0] 8005128: 781b ldrb r3, [r3, #0] 800512a: 009b lsls r3, r3, #2 800512c: 18d3 adds r3, r2, r3 800512e: 881b ldrh r3, [r3, #0] 8005130: b29a uxth r2, r3 8005132: 200e movs r0, #14 8005134: 183b adds r3, r7, r0 8005136: 4940 ldr r1, [pc, #256] @ (8005238 ) 8005138: 400a ands r2, r1 800513a: 801a strh r2, [r3, #0] 800513c: 687a ldr r2, [r7, #4] 800513e: 683b ldr r3, [r7, #0] 8005140: 781b ldrb r3, [r3, #0] 8005142: 009b lsls r3, r3, #2 8005144: 18d3 adds r3, r2, r3 8005146: 183a adds r2, r7, r0 8005148: 8812 ldrh r2, [r2, #0] 800514a: 493c ldr r1, [pc, #240] @ (800523c ) 800514c: 430a orrs r2, r1 800514e: b292 uxth r2, r2 8005150: 801a strh r2, [r3, #0] if (ep->type != EP_TYPE_ISOC) 8005152: 683b ldr r3, [r7, #0] 8005154: 78db ldrb r3, [r3, #3] 8005156: 2b01 cmp r3, #1 8005158: d068 beq.n 800522c { /* Configure NAK status for the Endpoint */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_NAK); 800515a: 687a ldr r2, [r7, #4] 800515c: 683b ldr r3, [r7, #0] 800515e: 781b ldrb r3, [r3, #0] 8005160: 009b lsls r3, r3, #2 8005162: 18d3 adds r3, r2, r3 8005164: 881b ldrh r3, [r3, #0] 8005166: b29a uxth r2, r3 8005168: 200c movs r0, #12 800516a: 183b adds r3, r7, r0 800516c: 4934 ldr r1, [pc, #208] @ (8005240 ) 800516e: 400a ands r2, r1 8005170: 801a strh r2, [r3, #0] 8005172: 183b adds r3, r7, r0 8005174: 183a adds r2, r7, r0 8005176: 8812 ldrh r2, [r2, #0] 8005178: 2120 movs r1, #32 800517a: 404a eors r2, r1 800517c: 801a strh r2, [r3, #0] 800517e: 687a ldr r2, [r7, #4] 8005180: 683b ldr r3, [r7, #0] 8005182: 781b ldrb r3, [r3, #0] 8005184: 009b lsls r3, r3, #2 8005186: 18d3 adds r3, r2, r3 8005188: 183a adds r2, r7, r0 800518a: 8812 ldrh r2, [r2, #0] 800518c: 492d ldr r1, [pc, #180] @ (8005244 ) 800518e: 430a orrs r2, r1 8005190: b292 uxth r2, r2 8005192: 801a strh r2, [r3, #0] 8005194: e04a b.n 800522c } } else { PCD_CLEAR_RX_DTOG(USBx, ep->num); 8005196: 687a ldr r2, [r7, #4] 8005198: 683b ldr r3, [r7, #0] 800519a: 781b ldrb r3, [r3, #0] 800519c: 009b lsls r3, r3, #2 800519e: 18d2 adds r2, r2, r3 80051a0: 2116 movs r1, #22 80051a2: 187b adds r3, r7, r1 80051a4: 8812 ldrh r2, [r2, #0] 80051a6: 801a strh r2, [r3, #0] 80051a8: 187b adds r3, r7, r1 80051aa: 881a ldrh r2, [r3, #0] 80051ac: 2380 movs r3, #128 @ 0x80 80051ae: 01db lsls r3, r3, #7 80051b0: 4013 ands r3, r2 80051b2: d016 beq.n 80051e2 80051b4: 687a ldr r2, [r7, #4] 80051b6: 683b ldr r3, [r7, #0] 80051b8: 781b ldrb r3, [r3, #0] 80051ba: 009b lsls r3, r3, #2 80051bc: 18d3 adds r3, r2, r3 80051be: 881b ldrh r3, [r3, #0] 80051c0: b29a uxth r2, r3 80051c2: 2014 movs r0, #20 80051c4: 183b adds r3, r7, r0 80051c6: 491c ldr r1, [pc, #112] @ (8005238 ) 80051c8: 400a ands r2, r1 80051ca: 801a strh r2, [r3, #0] 80051cc: 687a ldr r2, [r7, #4] 80051ce: 683b ldr r3, [r7, #0] 80051d0: 781b ldrb r3, [r3, #0] 80051d2: 009b lsls r3, r3, #2 80051d4: 18d3 adds r3, r2, r3 80051d6: 183a adds r2, r7, r0 80051d8: 8812 ldrh r2, [r2, #0] 80051da: 491b ldr r1, [pc, #108] @ (8005248 ) 80051dc: 430a orrs r2, r1 80051de: b292 uxth r2, r2 80051e0: 801a strh r2, [r3, #0] /* Configure VALID status for the Endpoint */ PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID); 80051e2: 687a ldr r2, [r7, #4] 80051e4: 683b ldr r3, [r7, #0] 80051e6: 781b ldrb r3, [r3, #0] 80051e8: 009b lsls r3, r3, #2 80051ea: 18d3 adds r3, r2, r3 80051ec: 881b ldrh r3, [r3, #0] 80051ee: b29a uxth r2, r3 80051f0: 2012 movs r0, #18 80051f2: 183b adds r3, r7, r0 80051f4: 4915 ldr r1, [pc, #84] @ (800524c ) 80051f6: 400a ands r2, r1 80051f8: 801a strh r2, [r3, #0] 80051fa: 183b adds r3, r7, r0 80051fc: 183a adds r2, r7, r0 80051fe: 8812 ldrh r2, [r2, #0] 8005200: 2180 movs r1, #128 @ 0x80 8005202: 0149 lsls r1, r1, #5 8005204: 404a eors r2, r1 8005206: 801a strh r2, [r3, #0] 8005208: 183b adds r3, r7, r0 800520a: 183a adds r2, r7, r0 800520c: 8812 ldrh r2, [r2, #0] 800520e: 2180 movs r1, #128 @ 0x80 8005210: 0189 lsls r1, r1, #6 8005212: 404a eors r2, r1 8005214: 801a strh r2, [r3, #0] 8005216: 687a ldr r2, [r7, #4] 8005218: 683b ldr r3, [r7, #0] 800521a: 781b ldrb r3, [r3, #0] 800521c: 009b lsls r3, r3, #2 800521e: 18d3 adds r3, r2, r3 8005220: 183a adds r2, r7, r0 8005222: 8812 ldrh r2, [r2, #0] 8005224: 4907 ldr r1, [pc, #28] @ (8005244 ) 8005226: 430a orrs r2, r1 8005228: b292 uxth r2, r2 800522a: 801a strh r2, [r3, #0] } } return HAL_OK; 800522c: 2300 movs r3, #0 } 800522e: 0018 movs r0, r3 8005230: 46bd mov sp, r7 8005232: b006 add sp, #24 8005234: bd80 pop {r7, pc} 8005236: 46c0 nop @ (mov r8, r8) 8005238: ffff8f8f .word 0xffff8f8f 800523c: ffff80c0 .word 0xffff80c0 8005240: ffff8fbf .word 0xffff8fbf 8005244: ffff8080 .word 0xffff8080 8005248: ffffc080 .word 0xffffc080 800524c: ffffbf8f .word 0xffffbf8f 08005250 : * @param address new device address to be assigned * This parameter can be a value from 0 to 255 * @retval HAL status */ HAL_StatusTypeDef USB_SetDevAddress(USB_TypeDef *USBx, uint8_t address) { 8005250: b580 push {r7, lr} 8005252: b082 sub sp, #8 8005254: af00 add r7, sp, #0 8005256: 6078 str r0, [r7, #4] 8005258: 000a movs r2, r1 800525a: 1cfb adds r3, r7, #3 800525c: 701a strb r2, [r3, #0] if (address == 0U) 800525e: 1cfb adds r3, r7, #3 8005260: 781b ldrb r3, [r3, #0] 8005262: 2b00 cmp r3, #0 8005264: d103 bne.n 800526e { /* set device address and enable function */ USBx->DADDR = (uint16_t)USB_DADDR_EF; 8005266: 687b ldr r3, [r7, #4] 8005268: 224c movs r2, #76 @ 0x4c 800526a: 2180 movs r1, #128 @ 0x80 800526c: 5299 strh r1, [r3, r2] } return HAL_OK; 800526e: 2300 movs r3, #0 } 8005270: 0018 movs r0, r3 8005272: 46bd mov sp, r7 8005274: b002 add sp, #8 8005276: bd80 pop {r7, pc} 08005278 : * @brief USB_DevConnect Connect the USB device by enabling the pull-up/pull-down * @param USBx Selected device * @retval HAL status */ HAL_StatusTypeDef USB_DevConnect(USB_TypeDef *USBx) { 8005278: b580 push {r7, lr} 800527a: b082 sub sp, #8 800527c: af00 add r7, sp, #0 800527e: 6078 str r0, [r7, #4] /* Enabling DP Pull-UP bit to Connect internal PU resistor on USB DP line */ USBx->BCDR |= (uint16_t)USB_BCDR_DPPU; 8005280: 687b ldr r3, [r7, #4] 8005282: 2258 movs r2, #88 @ 0x58 8005284: 5a9b ldrh r3, [r3, r2] 8005286: b29b uxth r3, r3 8005288: 4a05 ldr r2, [pc, #20] @ (80052a0 ) 800528a: 4313 orrs r3, r2 800528c: b299 uxth r1, r3 800528e: 687b ldr r3, [r7, #4] 8005290: 2258 movs r2, #88 @ 0x58 8005292: 5299 strh r1, [r3, r2] return HAL_OK; 8005294: 2300 movs r3, #0 } 8005296: 0018 movs r0, r3 8005298: 46bd mov sp, r7 800529a: b002 add sp, #8 800529c: bd80 pop {r7, pc} 800529e: 46c0 nop @ (mov r8, r8) 80052a0: ffff8000 .word 0xffff8000 080052a4 : * @brief USB_ReadInterrupts return the global USB interrupt status * @param USBx Selected device * @retval USB Global Interrupt status */ uint32_t USB_ReadInterrupts(USB_TypeDef const *USBx) { 80052a4: b580 push {r7, lr} 80052a6: b084 sub sp, #16 80052a8: af00 add r7, sp, #0 80052aa: 6078 str r0, [r7, #4] uint32_t tmpreg; tmpreg = USBx->ISTR; 80052ac: 687b ldr r3, [r7, #4] 80052ae: 2244 movs r2, #68 @ 0x44 80052b0: 5a9b ldrh r3, [r3, r2] 80052b2: b29b uxth r3, r3 80052b4: 60fb str r3, [r7, #12] return tmpreg; 80052b6: 68fb ldr r3, [r7, #12] } 80052b8: 0018 movs r0, r3 80052ba: 46bd mov sp, r7 80052bc: b004 add sp, #16 80052be: bd80 pop {r7, pc} 080052c0 : * @param wPMABufAddr address into PMA. * @param wNBytes no. of bytes to be copied. * @retval None */ void USB_WritePMA(USB_TypeDef const *USBx, uint8_t *pbUsrBuf, uint16_t wPMABufAddr, uint16_t wNBytes) { 80052c0: b580 push {r7, lr} 80052c2: b08a sub sp, #40 @ 0x28 80052c4: af00 add r7, sp, #0 80052c6: 60f8 str r0, [r7, #12] 80052c8: 60b9 str r1, [r7, #8] 80052ca: 0019 movs r1, r3 80052cc: 1dbb adds r3, r7, #6 80052ce: 801a strh r2, [r3, #0] 80052d0: 1d3b adds r3, r7, #4 80052d2: 1c0a adds r2, r1, #0 80052d4: 801a strh r2, [r3, #0] uint32_t n = ((uint32_t)wNBytes + 1U) >> 1; 80052d6: 1d3b adds r3, r7, #4 80052d8: 881b ldrh r3, [r3, #0] 80052da: 3301 adds r3, #1 80052dc: 085b lsrs r3, r3, #1 80052de: 61bb str r3, [r7, #24] uint32_t BaseAddr = (uint32_t)USBx; 80052e0: 68fb ldr r3, [r7, #12] 80052e2: 617b str r3, [r7, #20] uint32_t count; uint16_t WrVal; __IO uint16_t *pdwVal; uint8_t *pBuf = pbUsrBuf; 80052e4: 68bb ldr r3, [r7, #8] 80052e6: 61fb str r3, [r7, #28] pdwVal = (__IO uint16_t *)(BaseAddr + 0x400U + ((uint32_t)wPMABufAddr * PMA_ACCESS)); 80052e8: 1dbb adds r3, r7, #6 80052ea: 881a ldrh r2, [r3, #0] 80052ec: 697b ldr r3, [r7, #20] 80052ee: 18d3 adds r3, r2, r3 80052f0: 2280 movs r2, #128 @ 0x80 80052f2: 00d2 lsls r2, r2, #3 80052f4: 4694 mov ip, r2 80052f6: 4463 add r3, ip 80052f8: 623b str r3, [r7, #32] for (count = n; count != 0U; count--) 80052fa: 69bb ldr r3, [r7, #24] 80052fc: 627b str r3, [r7, #36] @ 0x24 80052fe: e021 b.n 8005344 { WrVal = pBuf[0]; 8005300: 69fb ldr r3, [r7, #28] 8005302: 781a ldrb r2, [r3, #0] 8005304: 2112 movs r1, #18 8005306: 187b adds r3, r7, r1 8005308: 801a strh r2, [r3, #0] WrVal |= (uint16_t)pBuf[1] << 8; 800530a: 69fb ldr r3, [r7, #28] 800530c: 3301 adds r3, #1 800530e: 781b ldrb r3, [r3, #0] 8005310: b21b sxth r3, r3 8005312: 021b lsls r3, r3, #8 8005314: b21a sxth r2, r3 8005316: 187b adds r3, r7, r1 8005318: 2000 movs r0, #0 800531a: 5e1b ldrsh r3, [r3, r0] 800531c: 4313 orrs r3, r2 800531e: b21a sxth r2, r3 8005320: 187b adds r3, r7, r1 8005322: 801a strh r2, [r3, #0] *pdwVal = (WrVal & 0xFFFFU); 8005324: 6a3b ldr r3, [r7, #32] 8005326: 187a adds r2, r7, r1 8005328: 8812 ldrh r2, [r2, #0] 800532a: 801a strh r2, [r3, #0] pdwVal++; 800532c: 6a3b ldr r3, [r7, #32] 800532e: 3302 adds r3, #2 8005330: 623b str r3, [r7, #32] #if PMA_ACCESS > 1U pdwVal++; #endif /* PMA_ACCESS */ pBuf++; 8005332: 69fb ldr r3, [r7, #28] 8005334: 3301 adds r3, #1 8005336: 61fb str r3, [r7, #28] pBuf++; 8005338: 69fb ldr r3, [r7, #28] 800533a: 3301 adds r3, #1 800533c: 61fb str r3, [r7, #28] for (count = n; count != 0U; count--) 800533e: 6a7b ldr r3, [r7, #36] @ 0x24 8005340: 3b01 subs r3, #1 8005342: 627b str r3, [r7, #36] @ 0x24 8005344: 6a7b ldr r3, [r7, #36] @ 0x24 8005346: 2b00 cmp r3, #0 8005348: d1da bne.n 8005300 } } 800534a: 46c0 nop @ (mov r8, r8) 800534c: 46c0 nop @ (mov r8, r8) 800534e: 46bd mov sp, r7 8005350: b00a add sp, #40 @ 0x28 8005352: bd80 pop {r7, pc} 08005354 : * @param wPMABufAddr address into PMA. * @param wNBytes no. of bytes to be copied. * @retval None */ void USB_ReadPMA(USB_TypeDef const *USBx, uint8_t *pbUsrBuf, uint16_t wPMABufAddr, uint16_t wNBytes) { 8005354: b580 push {r7, lr} 8005356: b08a sub sp, #40 @ 0x28 8005358: af00 add r7, sp, #0 800535a: 60f8 str r0, [r7, #12] 800535c: 60b9 str r1, [r7, #8] 800535e: 0019 movs r1, r3 8005360: 1dbb adds r3, r7, #6 8005362: 801a strh r2, [r3, #0] 8005364: 1d3b adds r3, r7, #4 8005366: 1c0a adds r2, r1, #0 8005368: 801a strh r2, [r3, #0] uint32_t n = (uint32_t)wNBytes >> 1; 800536a: 1d3b adds r3, r7, #4 800536c: 881b ldrh r3, [r3, #0] 800536e: 085b lsrs r3, r3, #1 8005370: b29b uxth r3, r3 8005372: 61bb str r3, [r7, #24] uint32_t BaseAddr = (uint32_t)USBx; 8005374: 68fb ldr r3, [r7, #12] 8005376: 617b str r3, [r7, #20] uint32_t count; uint32_t RdVal; __IO uint16_t *pdwVal; uint8_t *pBuf = pbUsrBuf; 8005378: 68bb ldr r3, [r7, #8] 800537a: 61fb str r3, [r7, #28] pdwVal = (__IO uint16_t *)(BaseAddr + 0x400U + ((uint32_t)wPMABufAddr * PMA_ACCESS)); 800537c: 1dbb adds r3, r7, #6 800537e: 881a ldrh r2, [r3, #0] 8005380: 697b ldr r3, [r7, #20] 8005382: 18d3 adds r3, r2, r3 8005384: 2280 movs r2, #128 @ 0x80 8005386: 00d2 lsls r2, r2, #3 8005388: 4694 mov ip, r2 800538a: 4463 add r3, ip 800538c: 623b str r3, [r7, #32] for (count = n; count != 0U; count--) 800538e: 69bb ldr r3, [r7, #24] 8005390: 627b str r3, [r7, #36] @ 0x24 8005392: e018 b.n 80053c6 { RdVal = *(__IO uint16_t *)pdwVal; 8005394: 6a3b ldr r3, [r7, #32] 8005396: 881b ldrh r3, [r3, #0] 8005398: b29b uxth r3, r3 800539a: 613b str r3, [r7, #16] pdwVal++; 800539c: 6a3b ldr r3, [r7, #32] 800539e: 3302 adds r3, #2 80053a0: 623b str r3, [r7, #32] *pBuf = (uint8_t)((RdVal >> 0) & 0xFFU); 80053a2: 693b ldr r3, [r7, #16] 80053a4: b2da uxtb r2, r3 80053a6: 69fb ldr r3, [r7, #28] 80053a8: 701a strb r2, [r3, #0] pBuf++; 80053aa: 69fb ldr r3, [r7, #28] 80053ac: 3301 adds r3, #1 80053ae: 61fb str r3, [r7, #28] *pBuf = (uint8_t)((RdVal >> 8) & 0xFFU); 80053b0: 693b ldr r3, [r7, #16] 80053b2: 0a1b lsrs r3, r3, #8 80053b4: b2da uxtb r2, r3 80053b6: 69fb ldr r3, [r7, #28] 80053b8: 701a strb r2, [r3, #0] pBuf++; 80053ba: 69fb ldr r3, [r7, #28] 80053bc: 3301 adds r3, #1 80053be: 61fb str r3, [r7, #28] for (count = n; count != 0U; count--) 80053c0: 6a7b ldr r3, [r7, #36] @ 0x24 80053c2: 3b01 subs r3, #1 80053c4: 627b str r3, [r7, #36] @ 0x24 80053c6: 6a7b ldr r3, [r7, #36] @ 0x24 80053c8: 2b00 cmp r3, #0 80053ca: d1e3 bne.n 8005394 #if PMA_ACCESS > 1U pdwVal++; #endif /* PMA_ACCESS */ } if ((wNBytes % 2U) != 0U) 80053cc: 1d3b adds r3, r7, #4 80053ce: 881b ldrh r3, [r3, #0] 80053d0: 2201 movs r2, #1 80053d2: 4013 ands r3, r2 80053d4: b29b uxth r3, r3 80053d6: 2b00 cmp r3, #0 80053d8: d007 beq.n 80053ea { RdVal = *pdwVal; 80053da: 6a3b ldr r3, [r7, #32] 80053dc: 881b ldrh r3, [r3, #0] 80053de: b29b uxth r3, r3 80053e0: 613b str r3, [r7, #16] *pBuf = (uint8_t)((RdVal >> 0) & 0xFFU); 80053e2: 693b ldr r3, [r7, #16] 80053e4: b2da uxtb r2, r3 80053e6: 69fb ldr r3, [r7, #28] 80053e8: 701a strb r2, [r3, #0] } } 80053ea: 46c0 nop @ (mov r8, r8) 80053ec: 46bd mov sp, r7 80053ee: b00a add sp, #40 @ 0x28 80053f0: bd80 pop {r7, pc} 080053f2 : * @param pdev: device instance * @param cfgidx: Configuration index * @retval status */ static uint8_t USBD_HID_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx) { 80053f2: b580 push {r7, lr} 80053f4: b082 sub sp, #8 80053f6: af00 add r7, sp, #0 80053f8: 6078 str r0, [r7, #4] 80053fa: 000a movs r2, r1 80053fc: 1cfb adds r3, r7, #3 80053fe: 701a strb r2, [r3, #0] /* Open EP IN */ USBD_LL_OpenEP(pdev, HID_EPIN_ADDR, USBD_EP_TYPE_INTR, HID_EPIN_SIZE); 8005400: 6878 ldr r0, [r7, #4] 8005402: 2304 movs r3, #4 8005404: 2203 movs r2, #3 8005406: 2181 movs r1, #129 @ 0x81 8005408: f001 fe5f bl 80070ca pdev->ep_in[HID_EPIN_ADDR & 0xFU].is_used = 1U; 800540c: 687b ldr r3, [r7, #4] 800540e: 2201 movs r2, #1 8005410: 62da str r2, [r3, #44] @ 0x2c pdev->pClassData = USBD_malloc(sizeof(USBD_HID_HandleTypeDef)); 8005412: 2010 movs r0, #16 8005414: f001 ffda bl 80073cc 8005418: 0001 movs r1, r0 800541a: 687a ldr r2, [r7, #4] 800541c: 23ae movs r3, #174 @ 0xae 800541e: 009b lsls r3, r3, #2 8005420: 50d1 str r1, [r2, r3] if (pdev->pClassData == NULL) 8005422: 687a ldr r2, [r7, #4] 8005424: 23ae movs r3, #174 @ 0xae 8005426: 009b lsls r3, r3, #2 8005428: 58d3 ldr r3, [r2, r3] 800542a: 2b00 cmp r3, #0 800542c: d101 bne.n 8005432 { return USBD_FAIL; 800542e: 2302 movs r3, #2 8005430: e006 b.n 8005440 } ((USBD_HID_HandleTypeDef *)pdev->pClassData)->state = HID_IDLE; 8005432: 687a ldr r2, [r7, #4] 8005434: 23ae movs r3, #174 @ 0xae 8005436: 009b lsls r3, r3, #2 8005438: 58d3 ldr r3, [r2, r3] 800543a: 2200 movs r2, #0 800543c: 731a strb r2, [r3, #12] return USBD_OK; 800543e: 2300 movs r3, #0 } 8005440: 0018 movs r0, r3 8005442: 46bd mov sp, r7 8005444: b002 add sp, #8 8005446: bd80 pop {r7, pc} 08005448 : * @param cfgidx: Configuration index * @retval status */ static uint8_t USBD_HID_DeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx) { 8005448: b580 push {r7, lr} 800544a: b082 sub sp, #8 800544c: af00 add r7, sp, #0 800544e: 6078 str r0, [r7, #4] 8005450: 000a movs r2, r1 8005452: 1cfb adds r3, r7, #3 8005454: 701a strb r2, [r3, #0] /* Close HID EPs */ USBD_LL_CloseEP(pdev, HID_EPIN_ADDR); 8005456: 687b ldr r3, [r7, #4] 8005458: 2181 movs r1, #129 @ 0x81 800545a: 0018 movs r0, r3 800545c: f001 fe6c bl 8007138 pdev->ep_in[HID_EPIN_ADDR & 0xFU].is_used = 0U; 8005460: 687b ldr r3, [r7, #4] 8005462: 2200 movs r2, #0 8005464: 62da str r2, [r3, #44] @ 0x2c /* FRee allocated memory */ if (pdev->pClassData != NULL) 8005466: 687a ldr r2, [r7, #4] 8005468: 23ae movs r3, #174 @ 0xae 800546a: 009b lsls r3, r3, #2 800546c: 58d3 ldr r3, [r2, r3] 800546e: 2b00 cmp r3, #0 8005470: d00b beq.n 800548a { USBD_free(pdev->pClassData); 8005472: 687a ldr r2, [r7, #4] 8005474: 23ae movs r3, #174 @ 0xae 8005476: 009b lsls r3, r3, #2 8005478: 58d3 ldr r3, [r2, r3] 800547a: 0018 movs r0, r3 800547c: f001 ffb2 bl 80073e4 pdev->pClassData = NULL; 8005480: 687a ldr r2, [r7, #4] 8005482: 23ae movs r3, #174 @ 0xae 8005484: 009b lsls r3, r3, #2 8005486: 2100 movs r1, #0 8005488: 50d1 str r1, [r2, r3] } return USBD_OK; 800548a: 2300 movs r3, #0 } 800548c: 0018 movs r0, r3 800548e: 46bd mov sp, r7 8005490: b002 add sp, #8 8005492: bd80 pop {r7, pc} 08005494 : * @param req: usb requests * @retval status */ static uint8_t USBD_HID_Setup(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8005494: b580 push {r7, lr} 8005496: b088 sub sp, #32 8005498: af00 add r7, sp, #0 800549a: 6078 str r0, [r7, #4] 800549c: 6039 str r1, [r7, #0] USBD_HID_HandleTypeDef *hhid = (USBD_HID_HandleTypeDef *) pdev->pClassData; 800549e: 687a ldr r2, [r7, #4] 80054a0: 23ae movs r3, #174 @ 0xae 80054a2: 009b lsls r3, r3, #2 80054a4: 58d3 ldr r3, [r2, r3] 80054a6: 613b str r3, [r7, #16] uint16_t len = 0U; 80054a8: 231e movs r3, #30 80054aa: 18fb adds r3, r7, r3 80054ac: 2200 movs r2, #0 80054ae: 801a strh r2, [r3, #0] uint8_t *pbuf = NULL; 80054b0: 2300 movs r3, #0 80054b2: 61bb str r3, [r7, #24] uint16_t status_info = 0U; 80054b4: 230e movs r3, #14 80054b6: 18fb adds r3, r7, r3 80054b8: 2200 movs r2, #0 80054ba: 801a strh r2, [r3, #0] USBD_StatusTypeDef ret = USBD_OK; 80054bc: 2317 movs r3, #23 80054be: 18fb adds r3, r7, r3 80054c0: 2200 movs r2, #0 80054c2: 701a strb r2, [r3, #0] switch (req->bmRequest & USB_REQ_TYPE_MASK) 80054c4: 683b ldr r3, [r7, #0] 80054c6: 781b ldrb r3, [r3, #0] 80054c8: 001a movs r2, r3 80054ca: 2360 movs r3, #96 @ 0x60 80054cc: 4013 ands r3, r2 80054ce: d03a beq.n 8005546 80054d0: 2b20 cmp r3, #32 80054d2: d000 beq.n 80054d6 80054d4: e0d6 b.n 8005684 { case USB_REQ_TYPE_CLASS : switch (req->bRequest) 80054d6: 683b ldr r3, [r7, #0] 80054d8: 785b ldrb r3, [r3, #1] 80054da: 2b0b cmp r3, #11 80054dc: d008 beq.n 80054f0 80054de: dc26 bgt.n 800552e 80054e0: 2b0a cmp r3, #10 80054e2: d013 beq.n 800550c 80054e4: dc23 bgt.n 800552e 80054e6: 2b02 cmp r3, #2 80054e8: d019 beq.n 800551e 80054ea: 2b03 cmp r3, #3 80054ec: d007 beq.n 80054fe 80054ee: e01e b.n 800552e { case HID_REQ_SET_PROTOCOL: hhid->Protocol = (uint8_t)(req->wValue); 80054f0: 683b ldr r3, [r7, #0] 80054f2: 885b ldrh r3, [r3, #2] 80054f4: b2db uxtb r3, r3 80054f6: 001a movs r2, r3 80054f8: 693b ldr r3, [r7, #16] 80054fa: 601a str r2, [r3, #0] break; 80054fc: e022 b.n 8005544 case HID_REQ_GET_PROTOCOL: USBD_CtlSendData(pdev, (uint8_t *)(void *)&hhid->Protocol, 1U); 80054fe: 6939 ldr r1, [r7, #16] 8005500: 687b ldr r3, [r7, #4] 8005502: 2201 movs r2, #1 8005504: 0018 movs r0, r3 8005506: f001 fabc bl 8006a82 break; 800550a: e01b b.n 8005544 case HID_REQ_SET_IDLE: hhid->IdleState = (uint8_t)(req->wValue >> 8); 800550c: 683b ldr r3, [r7, #0] 800550e: 885b ldrh r3, [r3, #2] 8005510: 0a1b lsrs r3, r3, #8 8005512: b29b uxth r3, r3 8005514: b2db uxtb r3, r3 8005516: 001a movs r2, r3 8005518: 693b ldr r3, [r7, #16] 800551a: 605a str r2, [r3, #4] break; 800551c: e012 b.n 8005544 case HID_REQ_GET_IDLE: USBD_CtlSendData(pdev, (uint8_t *)(void *)&hhid->IdleState, 1U); 800551e: 693b ldr r3, [r7, #16] 8005520: 1d19 adds r1, r3, #4 8005522: 687b ldr r3, [r7, #4] 8005524: 2201 movs r2, #1 8005526: 0018 movs r0, r3 8005528: f001 faab bl 8006a82 break; 800552c: e00a b.n 8005544 default: USBD_CtlError(pdev, req); 800552e: 683a ldr r2, [r7, #0] 8005530: 687b ldr r3, [r7, #4] 8005532: 0011 movs r1, r2 8005534: 0018 movs r0, r3 8005536: f001 fa26 bl 8006986 ret = USBD_FAIL; 800553a: 2317 movs r3, #23 800553c: 18fb adds r3, r7, r3 800553e: 2202 movs r2, #2 8005540: 701a strb r2, [r3, #0] break; 8005542: 46c0 nop @ (mov r8, r8) } break; 8005544: e0a9 b.n 800569a case USB_REQ_TYPE_STANDARD: switch (req->bRequest) 8005546: 683b ldr r3, [r7, #0] 8005548: 785b ldrb r3, [r3, #1] 800554a: 2b0b cmp r3, #11 800554c: d100 bne.n 8005550 800554e: e075 b.n 800563c 8005550: dd00 ble.n 8005554 8005552: e08b b.n 800566c 8005554: 2b0a cmp r3, #10 8005556: d057 beq.n 8005608 8005558: dd00 ble.n 800555c 800555a: e087 b.n 800566c 800555c: 2b00 cmp r3, #0 800555e: d002 beq.n 8005566 8005560: 2b06 cmp r3, #6 8005562: d019 beq.n 8005598 8005564: e082 b.n 800566c { case USB_REQ_GET_STATUS: if (pdev->dev_state == USBD_STATE_CONFIGURED) 8005566: 687a ldr r2, [r7, #4] 8005568: 23a7 movs r3, #167 @ 0xa7 800556a: 009b lsls r3, r3, #2 800556c: 5cd3 ldrb r3, [r2, r3] 800556e: 2b03 cmp r3, #3 8005570: d107 bne.n 8005582 { USBD_CtlSendData(pdev, (uint8_t *)(void *)&status_info, 2U); 8005572: 230e movs r3, #14 8005574: 18f9 adds r1, r7, r3 8005576: 687b ldr r3, [r7, #4] 8005578: 2202 movs r2, #2 800557a: 0018 movs r0, r3 800557c: f001 fa81 bl 8006a82 else { USBD_CtlError(pdev, req); ret = USBD_FAIL; } break; 8005580: e07f b.n 8005682 USBD_CtlError(pdev, req); 8005582: 683a ldr r2, [r7, #0] 8005584: 687b ldr r3, [r7, #4] 8005586: 0011 movs r1, r2 8005588: 0018 movs r0, r3 800558a: f001 f9fc bl 8006986 ret = USBD_FAIL; 800558e: 2317 movs r3, #23 8005590: 18fb adds r3, r7, r3 8005592: 2202 movs r2, #2 8005594: 701a strb r2, [r3, #0] break; 8005596: e074 b.n 8005682 case USB_REQ_GET_DESCRIPTOR: if (req->wValue >> 8 == HID_REPORT_DESC) 8005598: 683b ldr r3, [r7, #0] 800559a: 885b ldrh r3, [r3, #2] 800559c: 0a1b lsrs r3, r3, #8 800559e: b29b uxth r3, r3 80055a0: 2b22 cmp r3, #34 @ 0x22 80055a2: d10b bne.n 80055bc { len = MIN(HID_MOUSE_REPORT_DESC_SIZE, req->wLength); 80055a4: 683b ldr r3, [r7, #0] 80055a6: 88db ldrh r3, [r3, #6] 80055a8: 221e movs r2, #30 80055aa: 18ba adds r2, r7, r2 80055ac: b299 uxth r1, r3 80055ae: 293f cmp r1, #63 @ 0x3f 80055b0: d900 bls.n 80055b4 80055b2: 233f movs r3, #63 @ 0x3f 80055b4: 8013 strh r3, [r2, #0] pbuf = HID_MOUSE_ReportDesc; 80055b6: 4b3c ldr r3, [pc, #240] @ (80056a8 ) 80055b8: 61bb str r3, [r7, #24] 80055ba: e01c b.n 80055f6 } else if (req->wValue >> 8 == HID_DESCRIPTOR_TYPE) 80055bc: 683b ldr r3, [r7, #0] 80055be: 885b ldrh r3, [r3, #2] 80055c0: 0a1b lsrs r3, r3, #8 80055c2: b29b uxth r3, r3 80055c4: 2b21 cmp r3, #33 @ 0x21 80055c6: d10b bne.n 80055e0 { pbuf = USBD_HID_Desc; 80055c8: 4b38 ldr r3, [pc, #224] @ (80056ac ) 80055ca: 61bb str r3, [r7, #24] len = MIN(USB_HID_DESC_SIZ, req->wLength); 80055cc: 683b ldr r3, [r7, #0] 80055ce: 88db ldrh r3, [r3, #6] 80055d0: 221e movs r2, #30 80055d2: 18ba adds r2, r7, r2 80055d4: b299 uxth r1, r3 80055d6: 2909 cmp r1, #9 80055d8: d900 bls.n 80055dc 80055da: 2309 movs r3, #9 80055dc: 8013 strh r3, [r2, #0] 80055de: e00a b.n 80055f6 } else { USBD_CtlError(pdev, req); 80055e0: 683a ldr r2, [r7, #0] 80055e2: 687b ldr r3, [r7, #4] 80055e4: 0011 movs r1, r2 80055e6: 0018 movs r0, r3 80055e8: f001 f9cd bl 8006986 ret = USBD_FAIL; 80055ec: 2317 movs r3, #23 80055ee: 18fb adds r3, r7, r3 80055f0: 2202 movs r2, #2 80055f2: 701a strb r2, [r3, #0] break; 80055f4: e045 b.n 8005682 } USBD_CtlSendData(pdev, pbuf, len); 80055f6: 231e movs r3, #30 80055f8: 18fb adds r3, r7, r3 80055fa: 881a ldrh r2, [r3, #0] 80055fc: 69b9 ldr r1, [r7, #24] 80055fe: 687b ldr r3, [r7, #4] 8005600: 0018 movs r0, r3 8005602: f001 fa3e bl 8006a82 break; 8005606: e03c b.n 8005682 case USB_REQ_GET_INTERFACE : if (pdev->dev_state == USBD_STATE_CONFIGURED) 8005608: 687a ldr r2, [r7, #4] 800560a: 23a7 movs r3, #167 @ 0xa7 800560c: 009b lsls r3, r3, #2 800560e: 5cd3 ldrb r3, [r2, r3] 8005610: 2b03 cmp r3, #3 8005612: d108 bne.n 8005626 { USBD_CtlSendData(pdev, (uint8_t *)(void *)&hhid->AltSetting, 1U); 8005614: 693b ldr r3, [r7, #16] 8005616: 3308 adds r3, #8 8005618: 0019 movs r1, r3 800561a: 687b ldr r3, [r7, #4] 800561c: 2201 movs r2, #1 800561e: 0018 movs r0, r3 8005620: f001 fa2f bl 8006a82 else { USBD_CtlError(pdev, req); ret = USBD_FAIL; } break; 8005624: e02d b.n 8005682 USBD_CtlError(pdev, req); 8005626: 683a ldr r2, [r7, #0] 8005628: 687b ldr r3, [r7, #4] 800562a: 0011 movs r1, r2 800562c: 0018 movs r0, r3 800562e: f001 f9aa bl 8006986 ret = USBD_FAIL; 8005632: 2317 movs r3, #23 8005634: 18fb adds r3, r7, r3 8005636: 2202 movs r2, #2 8005638: 701a strb r2, [r3, #0] break; 800563a: e022 b.n 8005682 case USB_REQ_SET_INTERFACE : if (pdev->dev_state == USBD_STATE_CONFIGURED) 800563c: 687a ldr r2, [r7, #4] 800563e: 23a7 movs r3, #167 @ 0xa7 8005640: 009b lsls r3, r3, #2 8005642: 5cd3 ldrb r3, [r2, r3] 8005644: 2b03 cmp r3, #3 8005646: d106 bne.n 8005656 { hhid->AltSetting = (uint8_t)(req->wValue); 8005648: 683b ldr r3, [r7, #0] 800564a: 885b ldrh r3, [r3, #2] 800564c: b2db uxtb r3, r3 800564e: 001a movs r2, r3 8005650: 693b ldr r3, [r7, #16] 8005652: 609a str r2, [r3, #8] else { USBD_CtlError(pdev, req); ret = USBD_FAIL; } break; 8005654: e015 b.n 8005682 USBD_CtlError(pdev, req); 8005656: 683a ldr r2, [r7, #0] 8005658: 687b ldr r3, [r7, #4] 800565a: 0011 movs r1, r2 800565c: 0018 movs r0, r3 800565e: f001 f992 bl 8006986 ret = USBD_FAIL; 8005662: 2317 movs r3, #23 8005664: 18fb adds r3, r7, r3 8005666: 2202 movs r2, #2 8005668: 701a strb r2, [r3, #0] break; 800566a: e00a b.n 8005682 default: USBD_CtlError(pdev, req); 800566c: 683a ldr r2, [r7, #0] 800566e: 687b ldr r3, [r7, #4] 8005670: 0011 movs r1, r2 8005672: 0018 movs r0, r3 8005674: f001 f987 bl 8006986 ret = USBD_FAIL; 8005678: 2317 movs r3, #23 800567a: 18fb adds r3, r7, r3 800567c: 2202 movs r2, #2 800567e: 701a strb r2, [r3, #0] break; 8005680: 46c0 nop @ (mov r8, r8) } break; 8005682: e00a b.n 800569a default: USBD_CtlError(pdev, req); 8005684: 683a ldr r2, [r7, #0] 8005686: 687b ldr r3, [r7, #4] 8005688: 0011 movs r1, r2 800568a: 0018 movs r0, r3 800568c: f001 f97b bl 8006986 ret = USBD_FAIL; 8005690: 2317 movs r3, #23 8005692: 18fb adds r3, r7, r3 8005694: 2202 movs r2, #2 8005696: 701a strb r2, [r3, #0] break; 8005698: 46c0 nop @ (mov r8, r8) } return ret; 800569a: 2317 movs r3, #23 800569c: 18fb adds r3, r7, r3 800569e: 781b ldrb r3, [r3, #0] } 80056a0: 0018 movs r0, r3 80056a2: 46bd mov sp, r7 80056a4: b008 add sp, #32 80056a6: bd80 pop {r7, pc} 80056a8: 200000e0 .word 0x200000e0 80056ac: 200000c8 .word 0x200000c8 080056b0 : * @retval status */ uint8_t USBD_HID_SendReport(USBD_HandleTypeDef *pdev, uint8_t *report, uint16_t len) { 80056b0: b580 push {r7, lr} 80056b2: b086 sub sp, #24 80056b4: af00 add r7, sp, #0 80056b6: 60f8 str r0, [r7, #12] 80056b8: 60b9 str r1, [r7, #8] 80056ba: 1dbb adds r3, r7, #6 80056bc: 801a strh r2, [r3, #0] USBD_HID_HandleTypeDef *hhid = (USBD_HID_HandleTypeDef *)pdev->pClassData; 80056be: 68fa ldr r2, [r7, #12] 80056c0: 23ae movs r3, #174 @ 0xae 80056c2: 009b lsls r3, r3, #2 80056c4: 58d3 ldr r3, [r2, r3] 80056c6: 617b str r3, [r7, #20] if (pdev->dev_state == USBD_STATE_CONFIGURED) 80056c8: 68fa ldr r2, [r7, #12] 80056ca: 23a7 movs r3, #167 @ 0xa7 80056cc: 009b lsls r3, r3, #2 80056ce: 5cd3 ldrb r3, [r2, r3] 80056d0: 2b03 cmp r3, #3 80056d2: d10d bne.n 80056f0 { if (hhid->state == HID_IDLE) 80056d4: 697b ldr r3, [r7, #20] 80056d6: 7b1b ldrb r3, [r3, #12] 80056d8: 2b00 cmp r3, #0 80056da: d109 bne.n 80056f0 { hhid->state = HID_BUSY; 80056dc: 697b ldr r3, [r7, #20] 80056de: 2201 movs r2, #1 80056e0: 731a strb r2, [r3, #12] USBD_LL_Transmit(pdev, 80056e2: 1dbb adds r3, r7, #6 80056e4: 881b ldrh r3, [r3, #0] 80056e6: 68ba ldr r2, [r7, #8] 80056e8: 68f8 ldr r0, [r7, #12] 80056ea: 2181 movs r1, #129 @ 0x81 80056ec: f001 fe00 bl 80072f0 HID_EPIN_ADDR, report, len); } } return USBD_OK; 80056f0: 2300 movs r3, #0 } 80056f2: 0018 movs r0, r3 80056f4: 46bd mov sp, r7 80056f6: b006 add sp, #24 80056f8: bd80 pop {r7, pc} ... 080056fc : * @param speed : current device speed * @param length : pointer data length * @retval pointer to descriptor buffer */ static uint8_t *USBD_HID_GetFSCfgDesc(uint16_t *length) { 80056fc: b580 push {r7, lr} 80056fe: b082 sub sp, #8 8005700: af00 add r7, sp, #0 8005702: 6078 str r0, [r7, #4] *length = sizeof(USBD_HID_CfgFSDesc); 8005704: 687b ldr r3, [r7, #4] 8005706: 2222 movs r2, #34 @ 0x22 8005708: 801a strh r2, [r3, #0] return USBD_HID_CfgFSDesc; 800570a: 4b02 ldr r3, [pc, #8] @ (8005714 ) } 800570c: 0018 movs r0, r3 800570e: 46bd mov sp, r7 8005710: b002 add sp, #8 8005712: bd80 pop {r7, pc} 8005714: 2000005c .word 0x2000005c 08005718 : * @param speed : current device speed * @param length : pointer data length * @retval pointer to descriptor buffer */ static uint8_t *USBD_HID_GetHSCfgDesc(uint16_t *length) { 8005718: b580 push {r7, lr} 800571a: b082 sub sp, #8 800571c: af00 add r7, sp, #0 800571e: 6078 str r0, [r7, #4] *length = sizeof(USBD_HID_CfgHSDesc); 8005720: 687b ldr r3, [r7, #4] 8005722: 2222 movs r2, #34 @ 0x22 8005724: 801a strh r2, [r3, #0] return USBD_HID_CfgHSDesc; 8005726: 4b02 ldr r3, [pc, #8] @ (8005730 ) } 8005728: 0018 movs r0, r3 800572a: 46bd mov sp, r7 800572c: b002 add sp, #8 800572e: bd80 pop {r7, pc} 8005730: 20000080 .word 0x20000080 08005734 : * @param speed : current device speed * @param length : pointer data length * @retval pointer to descriptor buffer */ static uint8_t *USBD_HID_GetOtherSpeedCfgDesc(uint16_t *length) { 8005734: b580 push {r7, lr} 8005736: b082 sub sp, #8 8005738: af00 add r7, sp, #0 800573a: 6078 str r0, [r7, #4] *length = sizeof(USBD_HID_OtherSpeedCfgDesc); 800573c: 687b ldr r3, [r7, #4] 800573e: 2222 movs r2, #34 @ 0x22 8005740: 801a strh r2, [r3, #0] return USBD_HID_OtherSpeedCfgDesc; 8005742: 4b02 ldr r3, [pc, #8] @ (800574c ) } 8005744: 0018 movs r0, r3 8005746: 46bd mov sp, r7 8005748: b002 add sp, #8 800574a: bd80 pop {r7, pc} 800574c: 200000a4 .word 0x200000a4 08005750 : * @param epnum: endpoint index * @retval status */ static uint8_t USBD_HID_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum) { 8005750: b580 push {r7, lr} 8005752: b082 sub sp, #8 8005754: af00 add r7, sp, #0 8005756: 6078 str r0, [r7, #4] 8005758: 000a movs r2, r1 800575a: 1cfb adds r3, r7, #3 800575c: 701a strb r2, [r3, #0] /* Ensure that the FIFO is empty before a new transfer, this condition could be caused by a new transfer before the end of the previous transfer */ ((USBD_HID_HandleTypeDef *)pdev->pClassData)->state = HID_IDLE; 800575e: 687a ldr r2, [r7, #4] 8005760: 23ae movs r3, #174 @ 0xae 8005762: 009b lsls r3, r3, #2 8005764: 58d3 ldr r3, [r2, r3] 8005766: 2200 movs r2, #0 8005768: 731a strb r2, [r3, #12] return USBD_OK; 800576a: 2300 movs r3, #0 } 800576c: 0018 movs r0, r3 800576e: 46bd mov sp, r7 8005770: b002 add sp, #8 8005772: bd80 pop {r7, pc} 08005774 : * return Device Qualifier descriptor * @param length : pointer data length * @retval pointer to descriptor buffer */ static uint8_t *USBD_HID_GetDeviceQualifierDesc(uint16_t *length) { 8005774: b580 push {r7, lr} 8005776: b082 sub sp, #8 8005778: af00 add r7, sp, #0 800577a: 6078 str r0, [r7, #4] *length = sizeof(USBD_HID_DeviceQualifierDesc); 800577c: 687b ldr r3, [r7, #4] 800577e: 220a movs r2, #10 8005780: 801a strh r2, [r3, #0] return USBD_HID_DeviceQualifierDesc; 8005782: 4b02 ldr r3, [pc, #8] @ (800578c ) } 8005784: 0018 movs r0, r3 8005786: 46bd mov sp, r7 8005788: b002 add sp, #8 800578a: bd80 pop {r7, pc} 800578c: 200000d4 .word 0x200000d4 08005790 : * @param id: Low level core index * @retval None */ USBD_StatusTypeDef USBD_Init(USBD_HandleTypeDef *pdev, USBD_DescriptorsTypeDef *pdesc, uint8_t id) { 8005790: b580 push {r7, lr} 8005792: b084 sub sp, #16 8005794: af00 add r7, sp, #0 8005796: 60f8 str r0, [r7, #12] 8005798: 60b9 str r1, [r7, #8] 800579a: 1dfb adds r3, r7, #7 800579c: 701a strb r2, [r3, #0] /* Check whether the USB Host handle is valid */ if (pdev == NULL) 800579e: 68fb ldr r3, [r7, #12] 80057a0: 2b00 cmp r3, #0 80057a2: d101 bne.n 80057a8 { #if (USBD_DEBUG_LEVEL > 1U) USBD_ErrLog("Invalid Device handle"); #endif return USBD_FAIL; 80057a4: 2302 movs r3, #2 80057a6: e020 b.n 80057ea } /* Unlink previous class*/ if (pdev->pClass != NULL) 80057a8: 68fa ldr r2, [r7, #12] 80057aa: 23ad movs r3, #173 @ 0xad 80057ac: 009b lsls r3, r3, #2 80057ae: 58d3 ldr r3, [r2, r3] 80057b0: 2b00 cmp r3, #0 80057b2: d004 beq.n 80057be { pdev->pClass = NULL; 80057b4: 68fa ldr r2, [r7, #12] 80057b6: 23ad movs r3, #173 @ 0xad 80057b8: 009b lsls r3, r3, #2 80057ba: 2100 movs r1, #0 80057bc: 50d1 str r1, [r2, r3] } /* Assign USBD Descriptors */ if (pdesc != NULL) 80057be: 68bb ldr r3, [r7, #8] 80057c0: 2b00 cmp r3, #0 80057c2: d004 beq.n 80057ce { pdev->pDesc = pdesc; 80057c4: 68fa ldr r2, [r7, #12] 80057c6: 23ac movs r3, #172 @ 0xac 80057c8: 009b lsls r3, r3, #2 80057ca: 68b9 ldr r1, [r7, #8] 80057cc: 50d1 str r1, [r2, r3] } /* Set Device initial State */ pdev->dev_state = USBD_STATE_DEFAULT; 80057ce: 68fa ldr r2, [r7, #12] 80057d0: 23a7 movs r3, #167 @ 0xa7 80057d2: 009b lsls r3, r3, #2 80057d4: 2101 movs r1, #1 80057d6: 54d1 strb r1, [r2, r3] pdev->id = id; 80057d8: 68fb ldr r3, [r7, #12] 80057da: 1dfa adds r2, r7, #7 80057dc: 7812 ldrb r2, [r2, #0] 80057de: 701a strb r2, [r3, #0] /* Initialize low level driver */ USBD_LL_Init(pdev); 80057e0: 68fb ldr r3, [r7, #12] 80057e2: 0018 movs r0, r3 80057e4: f001 fbfc bl 8006fe0 return USBD_OK; 80057e8: 2300 movs r3, #0 } 80057ea: 0018 movs r0, r3 80057ec: 46bd mov sp, r7 80057ee: b004 add sp, #16 80057f0: bd80 pop {r7, pc} 080057f2 : * @param pDevice : Device Handle * @param pclass: Class handle * @retval USBD Status */ USBD_StatusTypeDef USBD_RegisterClass(USBD_HandleTypeDef *pdev, USBD_ClassTypeDef *pclass) { 80057f2: b580 push {r7, lr} 80057f4: b084 sub sp, #16 80057f6: af00 add r7, sp, #0 80057f8: 6078 str r0, [r7, #4] 80057fa: 6039 str r1, [r7, #0] USBD_StatusTypeDef status = USBD_OK; 80057fc: 200f movs r0, #15 80057fe: 183b adds r3, r7, r0 8005800: 2200 movs r2, #0 8005802: 701a strb r2, [r3, #0] if (pclass != NULL) 8005804: 683b ldr r3, [r7, #0] 8005806: 2b00 cmp r3, #0 8005808: d008 beq.n 800581c { /* link the class to the USB Device handle */ pdev->pClass = pclass; 800580a: 687a ldr r2, [r7, #4] 800580c: 23ad movs r3, #173 @ 0xad 800580e: 009b lsls r3, r3, #2 8005810: 6839 ldr r1, [r7, #0] 8005812: 50d1 str r1, [r2, r3] status = USBD_OK; 8005814: 183b adds r3, r7, r0 8005816: 2200 movs r2, #0 8005818: 701a strb r2, [r3, #0] 800581a: e003 b.n 8005824 else { #if (USBD_DEBUG_LEVEL > 1U) USBD_ErrLog("Invalid Class handle"); #endif status = USBD_FAIL; 800581c: 230f movs r3, #15 800581e: 18fb adds r3, r7, r3 8005820: 2202 movs r2, #2 8005822: 701a strb r2, [r3, #0] } return status; 8005824: 230f movs r3, #15 8005826: 18fb adds r3, r7, r3 8005828: 781b ldrb r3, [r3, #0] } 800582a: 0018 movs r0, r3 800582c: 46bd mov sp, r7 800582e: b004 add sp, #16 8005830: bd80 pop {r7, pc} 08005832 : * Start the USB Device Core. * @param pdev: Device Handle * @retval USBD Status */ USBD_StatusTypeDef USBD_Start(USBD_HandleTypeDef *pdev) { 8005832: b580 push {r7, lr} 8005834: b082 sub sp, #8 8005836: af00 add r7, sp, #0 8005838: 6078 str r0, [r7, #4] /* Start the low level driver */ USBD_LL_Start(pdev); 800583a: 687b ldr r3, [r7, #4] 800583c: 0018 movs r0, r3 800583e: f001 fc1f bl 8007080 return USBD_OK; 8005842: 2300 movs r3, #0 } 8005844: 0018 movs r0, r3 8005846: 46bd mov sp, r7 8005848: b002 add sp, #8 800584a: bd80 pop {r7, pc} 0800584c : * Launch test mode process * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_RunTestMode(USBD_HandleTypeDef *pdev) { 800584c: b580 push {r7, lr} 800584e: b082 sub sp, #8 8005850: af00 add r7, sp, #0 8005852: 6078 str r0, [r7, #4] /* Prevent unused argument compilation warning */ UNUSED(pdev); return USBD_OK; 8005854: 2300 movs r3, #0 } 8005856: 0018 movs r0, r3 8005858: 46bd mov sp, r7 800585a: b002 add sp, #8 800585c: bd80 pop {r7, pc} 0800585e : * @param cfgidx: configuration index * @retval status */ USBD_StatusTypeDef USBD_SetClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx) { 800585e: b590 push {r4, r7, lr} 8005860: b085 sub sp, #20 8005862: af00 add r7, sp, #0 8005864: 6078 str r0, [r7, #4] 8005866: 000a movs r2, r1 8005868: 1cfb adds r3, r7, #3 800586a: 701a strb r2, [r3, #0] USBD_StatusTypeDef ret = USBD_FAIL; 800586c: 240f movs r4, #15 800586e: 193b adds r3, r7, r4 8005870: 2202 movs r2, #2 8005872: 701a strb r2, [r3, #0] if (pdev->pClass != NULL) 8005874: 687a ldr r2, [r7, #4] 8005876: 23ad movs r3, #173 @ 0xad 8005878: 009b lsls r3, r3, #2 800587a: 58d3 ldr r3, [r2, r3] 800587c: 2b00 cmp r3, #0 800587e: d00e beq.n 800589e { /* Set configuration and Start the Class*/ if (pdev->pClass->Init(pdev, cfgidx) == 0U) 8005880: 687a ldr r2, [r7, #4] 8005882: 23ad movs r3, #173 @ 0xad 8005884: 009b lsls r3, r3, #2 8005886: 58d3 ldr r3, [r2, r3] 8005888: 681b ldr r3, [r3, #0] 800588a: 1cfa adds r2, r7, #3 800588c: 7811 ldrb r1, [r2, #0] 800588e: 687a ldr r2, [r7, #4] 8005890: 0010 movs r0, r2 8005892: 4798 blx r3 8005894: 1e03 subs r3, r0, #0 8005896: d102 bne.n 800589e { ret = USBD_OK; 8005898: 193b adds r3, r7, r4 800589a: 2200 movs r2, #0 800589c: 701a strb r2, [r3, #0] } } return ret; 800589e: 230f movs r3, #15 80058a0: 18fb adds r3, r7, r3 80058a2: 781b ldrb r3, [r3, #0] } 80058a4: 0018 movs r0, r3 80058a6: 46bd mov sp, r7 80058a8: b005 add sp, #20 80058aa: bd90 pop {r4, r7, pc} 080058ac : * @param pdev: device instance * @param cfgidx: configuration index * @retval status: USBD_StatusTypeDef */ USBD_StatusTypeDef USBD_ClrClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx) { 80058ac: b580 push {r7, lr} 80058ae: b082 sub sp, #8 80058b0: af00 add r7, sp, #0 80058b2: 6078 str r0, [r7, #4] 80058b4: 000a movs r2, r1 80058b6: 1cfb adds r3, r7, #3 80058b8: 701a strb r2, [r3, #0] /* Clear configuration and De-initialize the Class process*/ pdev->pClass->DeInit(pdev, cfgidx); 80058ba: 687a ldr r2, [r7, #4] 80058bc: 23ad movs r3, #173 @ 0xad 80058be: 009b lsls r3, r3, #2 80058c0: 58d3 ldr r3, [r2, r3] 80058c2: 685b ldr r3, [r3, #4] 80058c4: 1cfa adds r2, r7, #3 80058c6: 7811 ldrb r1, [r2, #0] 80058c8: 687a ldr r2, [r7, #4] 80058ca: 0010 movs r0, r2 80058cc: 4798 blx r3 return USBD_OK; 80058ce: 2300 movs r3, #0 } 80058d0: 0018 movs r0, r3 80058d2: 46bd mov sp, r7 80058d4: b002 add sp, #8 80058d6: bd80 pop {r7, pc} 080058d8 : * Handle the setup stage * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_SetupStage(USBD_HandleTypeDef *pdev, uint8_t *psetup) { 80058d8: b580 push {r7, lr} 80058da: b082 sub sp, #8 80058dc: af00 add r7, sp, #0 80058de: 6078 str r0, [r7, #4] 80058e0: 6039 str r1, [r7, #0] USBD_ParseSetupRequest(&pdev->request, psetup); 80058e2: 687b ldr r3, [r7, #4] 80058e4: 22aa movs r2, #170 @ 0xaa 80058e6: 0092 lsls r2, r2, #2 80058e8: 4694 mov ip, r2 80058ea: 4463 add r3, ip 80058ec: 683a ldr r2, [r7, #0] 80058ee: 0011 movs r1, r2 80058f0: 0018 movs r0, r3 80058f2: f001 f810 bl 8006916 pdev->ep0_state = USBD_EP0_SETUP; 80058f6: 687a ldr r2, [r7, #4] 80058f8: 23a5 movs r3, #165 @ 0xa5 80058fa: 009b lsls r3, r3, #2 80058fc: 2101 movs r1, #1 80058fe: 50d1 str r1, [r2, r3] pdev->ep0_data_len = pdev->request.wLength; 8005900: 687b ldr r3, [r7, #4] 8005902: 4a23 ldr r2, [pc, #140] @ (8005990 ) 8005904: 5a9b ldrh r3, [r3, r2] 8005906: 0019 movs r1, r3 8005908: 687a ldr r2, [r7, #4] 800590a: 23a6 movs r3, #166 @ 0xa6 800590c: 009b lsls r3, r3, #2 800590e: 50d1 str r1, [r2, r3] switch (pdev->request.bmRequest & 0x1FU) 8005910: 687a ldr r2, [r7, #4] 8005912: 23aa movs r3, #170 @ 0xaa 8005914: 009b lsls r3, r3, #2 8005916: 5cd3 ldrb r3, [r2, r3] 8005918: 001a movs r2, r3 800591a: 231f movs r3, #31 800591c: 4013 ands r3, r2 800591e: 2b02 cmp r3, #2 8005920: d019 beq.n 8005956 8005922: d822 bhi.n 800596a 8005924: 2b00 cmp r3, #0 8005926: d002 beq.n 800592e 8005928: 2b01 cmp r3, #1 800592a: d00a beq.n 8005942 800592c: e01d b.n 800596a { case USB_REQ_RECIPIENT_DEVICE: USBD_StdDevReq(pdev, &pdev->request); 800592e: 687b ldr r3, [r7, #4] 8005930: 22aa movs r2, #170 @ 0xaa 8005932: 0092 lsls r2, r2, #2 8005934: 189a adds r2, r3, r2 8005936: 687b ldr r3, [r7, #4] 8005938: 0011 movs r1, r2 800593a: 0018 movs r0, r3 800593c: f000 fa10 bl 8005d60 break; 8005940: e020 b.n 8005984 case USB_REQ_RECIPIENT_INTERFACE: USBD_StdItfReq(pdev, &pdev->request); 8005942: 687b ldr r3, [r7, #4] 8005944: 22aa movs r2, #170 @ 0xaa 8005946: 0092 lsls r2, r2, #2 8005948: 189a adds r2, r3, r2 800594a: 687b ldr r3, [r7, #4] 800594c: 0011 movs r1, r2 800594e: 0018 movs r0, r3 8005950: f000 fa78 bl 8005e44 break; 8005954: e016 b.n 8005984 case USB_REQ_RECIPIENT_ENDPOINT: USBD_StdEPReq(pdev, &pdev->request); 8005956: 687b ldr r3, [r7, #4] 8005958: 22aa movs r2, #170 @ 0xaa 800595a: 0092 lsls r2, r2, #2 800595c: 189a adds r2, r3, r2 800595e: 687b ldr r3, [r7, #4] 8005960: 0011 movs r1, r2 8005962: 0018 movs r0, r3 8005964: f000 fac5 bl 8005ef2 break; 8005968: e00c b.n 8005984 default: USBD_LL_StallEP(pdev, (pdev->request.bmRequest & 0x80U)); 800596a: 687a ldr r2, [r7, #4] 800596c: 23aa movs r3, #170 @ 0xaa 800596e: 009b lsls r3, r3, #2 8005970: 5cd3 ldrb r3, [r2, r3] 8005972: 227f movs r2, #127 @ 0x7f 8005974: 4393 bics r3, r2 8005976: b2da uxtb r2, r3 8005978: 687b ldr r3, [r7, #4] 800597a: 0011 movs r1, r2 800597c: 0018 movs r0, r3 800597e: f001 fc06 bl 800718e break; 8005982: 46c0 nop @ (mov r8, r8) } return USBD_OK; 8005984: 2300 movs r3, #0 } 8005986: 0018 movs r0, r3 8005988: 46bd mov sp, r7 800598a: b002 add sp, #8 800598c: bd80 pop {r7, pc} 800598e: 46c0 nop @ (mov r8, r8) 8005990: 000002ae .word 0x000002ae 08005994 : * @param epnum: endpoint index * @retval status */ USBD_StatusTypeDef USBD_LL_DataOutStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata) { 8005994: b580 push {r7, lr} 8005996: b086 sub sp, #24 8005998: af00 add r7, sp, #0 800599a: 60f8 str r0, [r7, #12] 800599c: 607a str r2, [r7, #4] 800599e: 200b movs r0, #11 80059a0: 183b adds r3, r7, r0 80059a2: 1c0a adds r2, r1, #0 80059a4: 701a strb r2, [r3, #0] USBD_EndpointTypeDef *pep; if (epnum == 0U) 80059a6: 183b adds r3, r7, r0 80059a8: 781b ldrb r3, [r3, #0] 80059aa: 2b00 cmp r3, #0 80059ac: d154 bne.n 8005a58 { pep = &pdev->ep_out[0]; 80059ae: 68fb ldr r3, [r7, #12] 80059b0: 3355 adds r3, #85 @ 0x55 80059b2: 33ff adds r3, #255 @ 0xff 80059b4: 617b str r3, [r7, #20] if (pdev->ep0_state == USBD_EP0_DATA_OUT) 80059b6: 68fa ldr r2, [r7, #12] 80059b8: 23a5 movs r3, #165 @ 0xa5 80059ba: 009b lsls r3, r3, #2 80059bc: 58d3 ldr r3, [r2, r3] 80059be: 2b03 cmp r3, #3 80059c0: d139 bne.n 8005a36 { if (pep->rem_length > pep->maxpacket) 80059c2: 697b ldr r3, [r7, #20] 80059c4: 68da ldr r2, [r3, #12] 80059c6: 697b ldr r3, [r7, #20] 80059c8: 691b ldr r3, [r3, #16] 80059ca: 429a cmp r2, r3 80059cc: d919 bls.n 8005a02 { pep->rem_length -= pep->maxpacket; 80059ce: 697b ldr r3, [r7, #20] 80059d0: 68da ldr r2, [r3, #12] 80059d2: 697b ldr r3, [r7, #20] 80059d4: 691b ldr r3, [r3, #16] 80059d6: 1ad2 subs r2, r2, r3 80059d8: 697b ldr r3, [r7, #20] 80059da: 60da str r2, [r3, #12] USBD_CtlContinueRx(pdev, pdata, (uint16_t)MIN(pep->rem_length, pep->maxpacket)); 80059dc: 697b ldr r3, [r7, #20] 80059de: 68da ldr r2, [r3, #12] 80059e0: 697b ldr r3, [r7, #20] 80059e2: 691b ldr r3, [r3, #16] USBD_CtlContinueRx(pdev, pdata, 80059e4: 429a cmp r2, r3 80059e6: d203 bcs.n 80059f0 (uint16_t)MIN(pep->rem_length, pep->maxpacket)); 80059e8: 697b ldr r3, [r7, #20] 80059ea: 68db ldr r3, [r3, #12] USBD_CtlContinueRx(pdev, pdata, 80059ec: b29b uxth r3, r3 80059ee: e002 b.n 80059f6 (uint16_t)MIN(pep->rem_length, pep->maxpacket)); 80059f0: 697b ldr r3, [r7, #20] 80059f2: 691b ldr r3, [r3, #16] USBD_CtlContinueRx(pdev, pdata, 80059f4: b29b uxth r3, r3 80059f6: 6879 ldr r1, [r7, #4] 80059f8: 68f8 ldr r0, [r7, #12] 80059fa: 001a movs r2, r3 80059fc: f001 f874 bl 8006ae8 8005a00: e045 b.n 8005a8e } else { if ((pdev->pClass->EP0_RxReady != NULL) && 8005a02: 68fa ldr r2, [r7, #12] 8005a04: 23ad movs r3, #173 @ 0xad 8005a06: 009b lsls r3, r3, #2 8005a08: 58d3 ldr r3, [r2, r3] 8005a0a: 691b ldr r3, [r3, #16] 8005a0c: 2b00 cmp r3, #0 8005a0e: d00d beq.n 8005a2c (pdev->dev_state == USBD_STATE_CONFIGURED)) 8005a10: 68fa ldr r2, [r7, #12] 8005a12: 23a7 movs r3, #167 @ 0xa7 8005a14: 009b lsls r3, r3, #2 8005a16: 5cd3 ldrb r3, [r2, r3] if ((pdev->pClass->EP0_RxReady != NULL) && 8005a18: 2b03 cmp r3, #3 8005a1a: d107 bne.n 8005a2c { pdev->pClass->EP0_RxReady(pdev); 8005a1c: 68fa ldr r2, [r7, #12] 8005a1e: 23ad movs r3, #173 @ 0xad 8005a20: 009b lsls r3, r3, #2 8005a22: 58d3 ldr r3, [r2, r3] 8005a24: 691b ldr r3, [r3, #16] 8005a26: 68fa ldr r2, [r7, #12] 8005a28: 0010 movs r0, r2 8005a2a: 4798 blx r3 } USBD_CtlSendStatus(pdev); 8005a2c: 68fb ldr r3, [r7, #12] 8005a2e: 0018 movs r0, r3 8005a30: f001 f86d bl 8006b0e 8005a34: e02b b.n 8005a8e } } else { if (pdev->ep0_state == USBD_EP0_STATUS_OUT) 8005a36: 68fa ldr r2, [r7, #12] 8005a38: 23a5 movs r3, #165 @ 0xa5 8005a3a: 009b lsls r3, r3, #2 8005a3c: 58d3 ldr r3, [r2, r3] 8005a3e: 2b05 cmp r3, #5 8005a40: d125 bne.n 8005a8e { /* * STATUS PHASE completed, update ep0_state to idle */ pdev->ep0_state = USBD_EP0_IDLE; 8005a42: 68fa ldr r2, [r7, #12] 8005a44: 23a5 movs r3, #165 @ 0xa5 8005a46: 009b lsls r3, r3, #2 8005a48: 2100 movs r1, #0 8005a4a: 50d1 str r1, [r2, r3] USBD_LL_StallEP(pdev, 0U); 8005a4c: 68fb ldr r3, [r7, #12] 8005a4e: 2100 movs r1, #0 8005a50: 0018 movs r0, r3 8005a52: f001 fb9c bl 800718e 8005a56: e01a b.n 8005a8e } } } else if ((pdev->pClass->DataOut != NULL) && 8005a58: 68fa ldr r2, [r7, #12] 8005a5a: 23ad movs r3, #173 @ 0xad 8005a5c: 009b lsls r3, r3, #2 8005a5e: 58d3 ldr r3, [r2, r3] 8005a60: 699b ldr r3, [r3, #24] 8005a62: 2b00 cmp r3, #0 8005a64: d011 beq.n 8005a8a (pdev->dev_state == USBD_STATE_CONFIGURED)) 8005a66: 68fa ldr r2, [r7, #12] 8005a68: 23a7 movs r3, #167 @ 0xa7 8005a6a: 009b lsls r3, r3, #2 8005a6c: 5cd3 ldrb r3, [r2, r3] else if ((pdev->pClass->DataOut != NULL) && 8005a6e: 2b03 cmp r3, #3 8005a70: d10b bne.n 8005a8a { pdev->pClass->DataOut(pdev, epnum); 8005a72: 68fa ldr r2, [r7, #12] 8005a74: 23ad movs r3, #173 @ 0xad 8005a76: 009b lsls r3, r3, #2 8005a78: 58d3 ldr r3, [r2, r3] 8005a7a: 699b ldr r3, [r3, #24] 8005a7c: 220b movs r2, #11 8005a7e: 18ba adds r2, r7, r2 8005a80: 7811 ldrb r1, [r2, #0] 8005a82: 68fa ldr r2, [r7, #12] 8005a84: 0010 movs r0, r2 8005a86: 4798 blx r3 8005a88: e001 b.n 8005a8e } else { /* should never be in this condition */ return USBD_FAIL; 8005a8a: 2302 movs r3, #2 8005a8c: e000 b.n 8005a90 } return USBD_OK; 8005a8e: 2300 movs r3, #0 } 8005a90: 0018 movs r0, r3 8005a92: 46bd mov sp, r7 8005a94: b006 add sp, #24 8005a96: bd80 pop {r7, pc} 08005a98 : * @param epnum: endpoint index * @retval status */ USBD_StatusTypeDef USBD_LL_DataInStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata) { 8005a98: b580 push {r7, lr} 8005a9a: b086 sub sp, #24 8005a9c: af00 add r7, sp, #0 8005a9e: 60f8 str r0, [r7, #12] 8005aa0: 607a str r2, [r7, #4] 8005aa2: 200b movs r0, #11 8005aa4: 183b adds r3, r7, r0 8005aa6: 1c0a adds r2, r1, #0 8005aa8: 701a strb r2, [r3, #0] USBD_EndpointTypeDef *pep; if (epnum == 0U) 8005aaa: 183b adds r3, r7, r0 8005aac: 781b ldrb r3, [r3, #0] 8005aae: 2b00 cmp r3, #0 8005ab0: d000 beq.n 8005ab4 8005ab2: e08e b.n 8005bd2 { pep = &pdev->ep_in[0]; 8005ab4: 68fb ldr r3, [r7, #12] 8005ab6: 3314 adds r3, #20 8005ab8: 617b str r3, [r7, #20] if (pdev->ep0_state == USBD_EP0_DATA_IN) 8005aba: 68fa ldr r2, [r7, #12] 8005abc: 23a5 movs r3, #165 @ 0xa5 8005abe: 009b lsls r3, r3, #2 8005ac0: 58d3 ldr r3, [r2, r3] 8005ac2: 2b02 cmp r3, #2 8005ac4: d164 bne.n 8005b90 { if (pep->rem_length > pep->maxpacket) 8005ac6: 697b ldr r3, [r7, #20] 8005ac8: 68da ldr r2, [r3, #12] 8005aca: 697b ldr r3, [r7, #20] 8005acc: 691b ldr r3, [r3, #16] 8005ace: 429a cmp r2, r3 8005ad0: d915 bls.n 8005afe { pep->rem_length -= pep->maxpacket; 8005ad2: 697b ldr r3, [r7, #20] 8005ad4: 68da ldr r2, [r3, #12] 8005ad6: 697b ldr r3, [r7, #20] 8005ad8: 691b ldr r3, [r3, #16] 8005ada: 1ad2 subs r2, r2, r3 8005adc: 697b ldr r3, [r7, #20] 8005ade: 60da str r2, [r3, #12] USBD_CtlContinueSendData(pdev, pdata, (uint16_t)pep->rem_length); 8005ae0: 697b ldr r3, [r7, #20] 8005ae2: 68db ldr r3, [r3, #12] 8005ae4: b29a uxth r2, r3 8005ae6: 6879 ldr r1, [r7, #4] 8005ae8: 68fb ldr r3, [r7, #12] 8005aea: 0018 movs r0, r3 8005aec: f000 ffe9 bl 8006ac2 /* Prepare endpoint for premature end of transfer */ USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U); 8005af0: 68f8 ldr r0, [r7, #12] 8005af2: 2300 movs r3, #0 8005af4: 2200 movs r2, #0 8005af6: 2100 movs r1, #0 8005af8: f001 fc31 bl 800735e 8005afc: e059 b.n 8005bb2 } else { /* last packet is MPS multiple, so send ZLP packet */ if ((pep->total_length % pep->maxpacket == 0U) && 8005afe: 697b ldr r3, [r7, #20] 8005b00: 689a ldr r2, [r3, #8] 8005b02: 697b ldr r3, [r7, #20] 8005b04: 691b ldr r3, [r3, #16] 8005b06: 0019 movs r1, r3 8005b08: 0010 movs r0, r2 8005b0a: f7fa fb83 bl 8000214 <__aeabi_uidivmod> 8005b0e: 1e0b subs r3, r1, #0 8005b10: d11f bne.n 8005b52 (pep->total_length >= pep->maxpacket) && 8005b12: 697b ldr r3, [r7, #20] 8005b14: 689a ldr r2, [r3, #8] 8005b16: 697b ldr r3, [r7, #20] 8005b18: 691b ldr r3, [r3, #16] if ((pep->total_length % pep->maxpacket == 0U) && 8005b1a: 429a cmp r2, r3 8005b1c: d319 bcc.n 8005b52 (pep->total_length < pdev->ep0_data_len)) 8005b1e: 697b ldr r3, [r7, #20] 8005b20: 689a ldr r2, [r3, #8] 8005b22: 68f9 ldr r1, [r7, #12] 8005b24: 23a6 movs r3, #166 @ 0xa6 8005b26: 009b lsls r3, r3, #2 8005b28: 58cb ldr r3, [r1, r3] (pep->total_length >= pep->maxpacket) && 8005b2a: 429a cmp r2, r3 8005b2c: d211 bcs.n 8005b52 { USBD_CtlContinueSendData(pdev, NULL, 0U); 8005b2e: 68fb ldr r3, [r7, #12] 8005b30: 2200 movs r2, #0 8005b32: 2100 movs r1, #0 8005b34: 0018 movs r0, r3 8005b36: f000 ffc4 bl 8006ac2 pdev->ep0_data_len = 0U; 8005b3a: 68fa ldr r2, [r7, #12] 8005b3c: 23a6 movs r3, #166 @ 0xa6 8005b3e: 009b lsls r3, r3, #2 8005b40: 2100 movs r1, #0 8005b42: 50d1 str r1, [r2, r3] /* Prepare endpoint for premature end of transfer */ USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U); 8005b44: 68f8 ldr r0, [r7, #12] 8005b46: 2300 movs r3, #0 8005b48: 2200 movs r2, #0 8005b4a: 2100 movs r1, #0 8005b4c: f001 fc07 bl 800735e 8005b50: e02f b.n 8005bb2 } else { if ((pdev->pClass->EP0_TxSent != NULL) && 8005b52: 68fa ldr r2, [r7, #12] 8005b54: 23ad movs r3, #173 @ 0xad 8005b56: 009b lsls r3, r3, #2 8005b58: 58d3 ldr r3, [r2, r3] 8005b5a: 68db ldr r3, [r3, #12] 8005b5c: 2b00 cmp r3, #0 8005b5e: d00d beq.n 8005b7c (pdev->dev_state == USBD_STATE_CONFIGURED)) 8005b60: 68fa ldr r2, [r7, #12] 8005b62: 23a7 movs r3, #167 @ 0xa7 8005b64: 009b lsls r3, r3, #2 8005b66: 5cd3 ldrb r3, [r2, r3] if ((pdev->pClass->EP0_TxSent != NULL) && 8005b68: 2b03 cmp r3, #3 8005b6a: d107 bne.n 8005b7c { pdev->pClass->EP0_TxSent(pdev); 8005b6c: 68fa ldr r2, [r7, #12] 8005b6e: 23ad movs r3, #173 @ 0xad 8005b70: 009b lsls r3, r3, #2 8005b72: 58d3 ldr r3, [r2, r3] 8005b74: 68db ldr r3, [r3, #12] 8005b76: 68fa ldr r2, [r7, #12] 8005b78: 0010 movs r0, r2 8005b7a: 4798 blx r3 } USBD_LL_StallEP(pdev, 0x80U); 8005b7c: 68fb ldr r3, [r7, #12] 8005b7e: 2180 movs r1, #128 @ 0x80 8005b80: 0018 movs r0, r3 8005b82: f001 fb04 bl 800718e USBD_CtlReceiveStatus(pdev); 8005b86: 68fb ldr r3, [r7, #12] 8005b88: 0018 movs r0, r3 8005b8a: f000 ffd4 bl 8006b36 8005b8e: e010 b.n 8005bb2 } } } else { if ((pdev->ep0_state == USBD_EP0_STATUS_IN) || 8005b90: 68fa ldr r2, [r7, #12] 8005b92: 23a5 movs r3, #165 @ 0xa5 8005b94: 009b lsls r3, r3, #2 8005b96: 58d3 ldr r3, [r2, r3] 8005b98: 2b04 cmp r3, #4 8005b9a: d005 beq.n 8005ba8 (pdev->ep0_state == USBD_EP0_IDLE)) 8005b9c: 68fa ldr r2, [r7, #12] 8005b9e: 23a5 movs r3, #165 @ 0xa5 8005ba0: 009b lsls r3, r3, #2 8005ba2: 58d3 ldr r3, [r2, r3] if ((pdev->ep0_state == USBD_EP0_STATUS_IN) || 8005ba4: 2b00 cmp r3, #0 8005ba6: d104 bne.n 8005bb2 { USBD_LL_StallEP(pdev, 0x80U); 8005ba8: 68fb ldr r3, [r7, #12] 8005baa: 2180 movs r1, #128 @ 0x80 8005bac: 0018 movs r0, r3 8005bae: f001 faee bl 800718e } } if (pdev->dev_test_mode == 1U) 8005bb2: 68fa ldr r2, [r7, #12] 8005bb4: 23a8 movs r3, #168 @ 0xa8 8005bb6: 009b lsls r3, r3, #2 8005bb8: 5cd3 ldrb r3, [r2, r3] 8005bba: 2b01 cmp r3, #1 8005bbc: d124 bne.n 8005c08 { USBD_RunTestMode(pdev); 8005bbe: 68fb ldr r3, [r7, #12] 8005bc0: 0018 movs r0, r3 8005bc2: f7ff fe43 bl 800584c pdev->dev_test_mode = 0U; 8005bc6: 68fa ldr r2, [r7, #12] 8005bc8: 23a8 movs r3, #168 @ 0xa8 8005bca: 009b lsls r3, r3, #2 8005bcc: 2100 movs r1, #0 8005bce: 54d1 strb r1, [r2, r3] 8005bd0: e01a b.n 8005c08 } } else if ((pdev->pClass->DataIn != NULL) && 8005bd2: 68fa ldr r2, [r7, #12] 8005bd4: 23ad movs r3, #173 @ 0xad 8005bd6: 009b lsls r3, r3, #2 8005bd8: 58d3 ldr r3, [r2, r3] 8005bda: 695b ldr r3, [r3, #20] 8005bdc: 2b00 cmp r3, #0 8005bde: d011 beq.n 8005c04 (pdev->dev_state == USBD_STATE_CONFIGURED)) 8005be0: 68fa ldr r2, [r7, #12] 8005be2: 23a7 movs r3, #167 @ 0xa7 8005be4: 009b lsls r3, r3, #2 8005be6: 5cd3 ldrb r3, [r2, r3] else if ((pdev->pClass->DataIn != NULL) && 8005be8: 2b03 cmp r3, #3 8005bea: d10b bne.n 8005c04 { pdev->pClass->DataIn(pdev, epnum); 8005bec: 68fa ldr r2, [r7, #12] 8005bee: 23ad movs r3, #173 @ 0xad 8005bf0: 009b lsls r3, r3, #2 8005bf2: 58d3 ldr r3, [r2, r3] 8005bf4: 695b ldr r3, [r3, #20] 8005bf6: 220b movs r2, #11 8005bf8: 18ba adds r2, r7, r2 8005bfa: 7811 ldrb r1, [r2, #0] 8005bfc: 68fa ldr r2, [r7, #12] 8005bfe: 0010 movs r0, r2 8005c00: 4798 blx r3 8005c02: e001 b.n 8005c08 } else { /* should never be in this condition */ return USBD_FAIL; 8005c04: 2302 movs r3, #2 8005c06: e000 b.n 8005c0a } return USBD_OK; 8005c08: 2300 movs r3, #0 } 8005c0a: 0018 movs r0, r3 8005c0c: 46bd mov sp, r7 8005c0e: b006 add sp, #24 8005c10: bd80 pop {r7, pc} 08005c12 : * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_Reset(USBD_HandleTypeDef *pdev) { 8005c12: b580 push {r7, lr} 8005c14: b082 sub sp, #8 8005c16: af00 add r7, sp, #0 8005c18: 6078 str r0, [r7, #4] /* Open EP0 OUT */ USBD_LL_OpenEP(pdev, 0x00U, USBD_EP_TYPE_CTRL, USB_MAX_EP0_SIZE); 8005c1a: 6878 ldr r0, [r7, #4] 8005c1c: 2340 movs r3, #64 @ 0x40 8005c1e: 2200 movs r2, #0 8005c20: 2100 movs r1, #0 8005c22: f001 fa52 bl 80070ca pdev->ep_out[0x00U & 0xFU].is_used = 1U; 8005c26: 687a ldr r2, [r7, #4] 8005c28: 23ac movs r3, #172 @ 0xac 8005c2a: 005b lsls r3, r3, #1 8005c2c: 2101 movs r1, #1 8005c2e: 50d1 str r1, [r2, r3] pdev->ep_out[0].maxpacket = USB_MAX_EP0_SIZE; 8005c30: 687a ldr r2, [r7, #4] 8005c32: 23b2 movs r3, #178 @ 0xb2 8005c34: 005b lsls r3, r3, #1 8005c36: 2140 movs r1, #64 @ 0x40 8005c38: 50d1 str r1, [r2, r3] /* Open EP0 IN */ USBD_LL_OpenEP(pdev, 0x80U, USBD_EP_TYPE_CTRL, USB_MAX_EP0_SIZE); 8005c3a: 6878 ldr r0, [r7, #4] 8005c3c: 2340 movs r3, #64 @ 0x40 8005c3e: 2200 movs r2, #0 8005c40: 2180 movs r1, #128 @ 0x80 8005c42: f001 fa42 bl 80070ca pdev->ep_in[0x80U & 0xFU].is_used = 1U; 8005c46: 687b ldr r3, [r7, #4] 8005c48: 2201 movs r2, #1 8005c4a: 619a str r2, [r3, #24] pdev->ep_in[0].maxpacket = USB_MAX_EP0_SIZE; 8005c4c: 687b ldr r3, [r7, #4] 8005c4e: 2240 movs r2, #64 @ 0x40 8005c50: 625a str r2, [r3, #36] @ 0x24 /* Upon Reset call user call back */ pdev->dev_state = USBD_STATE_DEFAULT; 8005c52: 687a ldr r2, [r7, #4] 8005c54: 23a7 movs r3, #167 @ 0xa7 8005c56: 009b lsls r3, r3, #2 8005c58: 2101 movs r1, #1 8005c5a: 54d1 strb r1, [r2, r3] pdev->ep0_state = USBD_EP0_IDLE; 8005c5c: 687a ldr r2, [r7, #4] 8005c5e: 23a5 movs r3, #165 @ 0xa5 8005c60: 009b lsls r3, r3, #2 8005c62: 2100 movs r1, #0 8005c64: 50d1 str r1, [r2, r3] pdev->dev_config = 0U; 8005c66: 687b ldr r3, [r7, #4] 8005c68: 2200 movs r2, #0 8005c6a: 605a str r2, [r3, #4] pdev->dev_remote_wakeup = 0U; 8005c6c: 687a ldr r2, [r7, #4] 8005c6e: 23a9 movs r3, #169 @ 0xa9 8005c70: 009b lsls r3, r3, #2 8005c72: 2100 movs r1, #0 8005c74: 50d1 str r1, [r2, r3] if (pdev->pClassData) 8005c76: 687a ldr r2, [r7, #4] 8005c78: 23ae movs r3, #174 @ 0xae 8005c7a: 009b lsls r3, r3, #2 8005c7c: 58d3 ldr r3, [r2, r3] 8005c7e: 2b00 cmp r3, #0 8005c80: d00a beq.n 8005c98 { pdev->pClass->DeInit(pdev, (uint8_t)pdev->dev_config); 8005c82: 687a ldr r2, [r7, #4] 8005c84: 23ad movs r3, #173 @ 0xad 8005c86: 009b lsls r3, r3, #2 8005c88: 58d3 ldr r3, [r2, r3] 8005c8a: 685a ldr r2, [r3, #4] 8005c8c: 687b ldr r3, [r7, #4] 8005c8e: 685b ldr r3, [r3, #4] 8005c90: b2d9 uxtb r1, r3 8005c92: 687b ldr r3, [r7, #4] 8005c94: 0018 movs r0, r3 8005c96: 4790 blx r2 } return USBD_OK; 8005c98: 2300 movs r3, #0 } 8005c9a: 0018 movs r0, r3 8005c9c: 46bd mov sp, r7 8005c9e: b002 add sp, #8 8005ca0: bd80 pop {r7, pc} 08005ca2 : * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_SetSpeed(USBD_HandleTypeDef *pdev, USBD_SpeedTypeDef speed) { 8005ca2: b580 push {r7, lr} 8005ca4: b082 sub sp, #8 8005ca6: af00 add r7, sp, #0 8005ca8: 6078 str r0, [r7, #4] 8005caa: 000a movs r2, r1 8005cac: 1cfb adds r3, r7, #3 8005cae: 701a strb r2, [r3, #0] pdev->dev_speed = speed; 8005cb0: 687b ldr r3, [r7, #4] 8005cb2: 1cfa adds r2, r7, #3 8005cb4: 7812 ldrb r2, [r2, #0] 8005cb6: 741a strb r2, [r3, #16] return USBD_OK; 8005cb8: 2300 movs r3, #0 } 8005cba: 0018 movs r0, r3 8005cbc: 46bd mov sp, r7 8005cbe: b002 add sp, #8 8005cc0: bd80 pop {r7, pc} ... 08005cc4 : * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_Suspend(USBD_HandleTypeDef *pdev) { 8005cc4: b580 push {r7, lr} 8005cc6: b082 sub sp, #8 8005cc8: af00 add r7, sp, #0 8005cca: 6078 str r0, [r7, #4] pdev->dev_old_state = pdev->dev_state; 8005ccc: 687a ldr r2, [r7, #4] 8005cce: 23a7 movs r3, #167 @ 0xa7 8005cd0: 009b lsls r3, r3, #2 8005cd2: 5cd1 ldrb r1, [r2, r3] 8005cd4: 687b ldr r3, [r7, #4] 8005cd6: 4a06 ldr r2, [pc, #24] @ (8005cf0 ) 8005cd8: 5499 strb r1, [r3, r2] pdev->dev_state = USBD_STATE_SUSPENDED; 8005cda: 687a ldr r2, [r7, #4] 8005cdc: 23a7 movs r3, #167 @ 0xa7 8005cde: 009b lsls r3, r3, #2 8005ce0: 2104 movs r1, #4 8005ce2: 54d1 strb r1, [r2, r3] return USBD_OK; 8005ce4: 2300 movs r3, #0 } 8005ce6: 0018 movs r0, r3 8005ce8: 46bd mov sp, r7 8005cea: b002 add sp, #8 8005cec: bd80 pop {r7, pc} 8005cee: 46c0 nop @ (mov r8, r8) 8005cf0: 0000029d .word 0x0000029d 08005cf4 : * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_Resume(USBD_HandleTypeDef *pdev) { 8005cf4: b580 push {r7, lr} 8005cf6: b082 sub sp, #8 8005cf8: af00 add r7, sp, #0 8005cfa: 6078 str r0, [r7, #4] if (pdev->dev_state == USBD_STATE_SUSPENDED) 8005cfc: 687a ldr r2, [r7, #4] 8005cfe: 23a7 movs r3, #167 @ 0xa7 8005d00: 009b lsls r3, r3, #2 8005d02: 5cd3 ldrb r3, [r2, r3] 8005d04: 2b04 cmp r3, #4 8005d06: d106 bne.n 8005d16 { pdev->dev_state = pdev->dev_old_state; 8005d08: 687b ldr r3, [r7, #4] 8005d0a: 4a05 ldr r2, [pc, #20] @ (8005d20 ) 8005d0c: 5c99 ldrb r1, [r3, r2] 8005d0e: 687a ldr r2, [r7, #4] 8005d10: 23a7 movs r3, #167 @ 0xa7 8005d12: 009b lsls r3, r3, #2 8005d14: 54d1 strb r1, [r2, r3] } return USBD_OK; 8005d16: 2300 movs r3, #0 } 8005d18: 0018 movs r0, r3 8005d1a: 46bd mov sp, r7 8005d1c: b002 add sp, #8 8005d1e: bd80 pop {r7, pc} 8005d20: 0000029d .word 0x0000029d 08005d24 : * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_SOF(USBD_HandleTypeDef *pdev) { 8005d24: b580 push {r7, lr} 8005d26: b082 sub sp, #8 8005d28: af00 add r7, sp, #0 8005d2a: 6078 str r0, [r7, #4] if (pdev->dev_state == USBD_STATE_CONFIGURED) 8005d2c: 687a ldr r2, [r7, #4] 8005d2e: 23a7 movs r3, #167 @ 0xa7 8005d30: 009b lsls r3, r3, #2 8005d32: 5cd3 ldrb r3, [r2, r3] 8005d34: 2b03 cmp r3, #3 8005d36: d10e bne.n 8005d56 { if (pdev->pClass->SOF != NULL) 8005d38: 687a ldr r2, [r7, #4] 8005d3a: 23ad movs r3, #173 @ 0xad 8005d3c: 009b lsls r3, r3, #2 8005d3e: 58d3 ldr r3, [r2, r3] 8005d40: 69db ldr r3, [r3, #28] 8005d42: 2b00 cmp r3, #0 8005d44: d007 beq.n 8005d56 { pdev->pClass->SOF(pdev); 8005d46: 687a ldr r2, [r7, #4] 8005d48: 23ad movs r3, #173 @ 0xad 8005d4a: 009b lsls r3, r3, #2 8005d4c: 58d3 ldr r3, [r2, r3] 8005d4e: 69db ldr r3, [r3, #28] 8005d50: 687a ldr r2, [r7, #4] 8005d52: 0010 movs r0, r2 8005d54: 4798 blx r3 } } return USBD_OK; 8005d56: 2300 movs r3, #0 } 8005d58: 0018 movs r0, r3 8005d5a: 46bd mov sp, r7 8005d5c: b002 add sp, #8 8005d5e: bd80 pop {r7, pc} 08005d60 : * @param req: usb request * @retval status */ USBD_StatusTypeDef USBD_StdDevReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8005d60: b580 push {r7, lr} 8005d62: b084 sub sp, #16 8005d64: af00 add r7, sp, #0 8005d66: 6078 str r0, [r7, #4] 8005d68: 6039 str r1, [r7, #0] USBD_StatusTypeDef ret = USBD_OK; 8005d6a: 230f movs r3, #15 8005d6c: 18fb adds r3, r7, r3 8005d6e: 2200 movs r2, #0 8005d70: 701a strb r2, [r3, #0] switch (req->bmRequest & USB_REQ_TYPE_MASK) 8005d72: 683b ldr r3, [r7, #0] 8005d74: 781b ldrb r3, [r3, #0] 8005d76: 001a movs r2, r3 8005d78: 2360 movs r3, #96 @ 0x60 8005d7a: 4013 ands r3, r2 8005d7c: 2b40 cmp r3, #64 @ 0x40 8005d7e: d004 beq.n 8005d8a 8005d80: d84f bhi.n 8005e22 8005d82: 2b00 cmp r3, #0 8005d84: d00b beq.n 8005d9e 8005d86: 2b20 cmp r3, #32 8005d88: d14b bne.n 8005e22 { case USB_REQ_TYPE_CLASS: case USB_REQ_TYPE_VENDOR: pdev->pClass->Setup(pdev, req); 8005d8a: 687a ldr r2, [r7, #4] 8005d8c: 23ad movs r3, #173 @ 0xad 8005d8e: 009b lsls r3, r3, #2 8005d90: 58d3 ldr r3, [r2, r3] 8005d92: 689b ldr r3, [r3, #8] 8005d94: 6839 ldr r1, [r7, #0] 8005d96: 687a ldr r2, [r7, #4] 8005d98: 0010 movs r0, r2 8005d9a: 4798 blx r3 break; 8005d9c: e048 b.n 8005e30 case USB_REQ_TYPE_STANDARD: switch (req->bRequest) 8005d9e: 683b ldr r3, [r7, #0] 8005da0: 785b ldrb r3, [r3, #1] 8005da2: 2b09 cmp r3, #9 8005da4: d835 bhi.n 8005e12 8005da6: 009a lsls r2, r3, #2 8005da8: 4b25 ldr r3, [pc, #148] @ (8005e40 ) 8005daa: 18d3 adds r3, r2, r3 8005dac: 681b ldr r3, [r3, #0] 8005dae: 469f mov pc, r3 { case USB_REQ_GET_DESCRIPTOR: USBD_GetDescriptor(pdev, req); 8005db0: 683a ldr r2, [r7, #0] 8005db2: 687b ldr r3, [r7, #4] 8005db4: 0011 movs r1, r2 8005db6: 0018 movs r0, r3 8005db8: f000 fa52 bl 8006260 break; 8005dbc: e030 b.n 8005e20 case USB_REQ_SET_ADDRESS: USBD_SetAddress(pdev, req); 8005dbe: 683a ldr r2, [r7, #0] 8005dc0: 687b ldr r3, [r7, #4] 8005dc2: 0011 movs r1, r2 8005dc4: 0018 movs r0, r3 8005dc6: f000 fbfd bl 80065c4 break; 8005dca: e029 b.n 8005e20 case USB_REQ_SET_CONFIGURATION: USBD_SetConfig(pdev, req); 8005dcc: 683a ldr r2, [r7, #0] 8005dce: 687b ldr r3, [r7, #4] 8005dd0: 0011 movs r1, r2 8005dd2: 0018 movs r0, r3 8005dd4: f000 fc4a bl 800666c break; 8005dd8: e022 b.n 8005e20 case USB_REQ_GET_CONFIGURATION: USBD_GetConfig(pdev, req); 8005dda: 683a ldr r2, [r7, #0] 8005ddc: 687b ldr r3, [r7, #4] 8005dde: 0011 movs r1, r2 8005de0: 0018 movs r0, r3 8005de2: f000 fce7 bl 80067b4 break; 8005de6: e01b b.n 8005e20 case USB_REQ_GET_STATUS: USBD_GetStatus(pdev, req); 8005de8: 683a ldr r2, [r7, #0] 8005dea: 687b ldr r3, [r7, #4] 8005dec: 0011 movs r1, r2 8005dee: 0018 movs r0, r3 8005df0: f000 fd1b bl 800682a break; 8005df4: e014 b.n 8005e20 case USB_REQ_SET_FEATURE: USBD_SetFeature(pdev, req); 8005df6: 683a ldr r2, [r7, #0] 8005df8: 687b ldr r3, [r7, #4] 8005dfa: 0011 movs r1, r2 8005dfc: 0018 movs r0, r3 8005dfe: f000 fd4e bl 800689e break; 8005e02: e00d b.n 8005e20 case USB_REQ_CLEAR_FEATURE: USBD_ClrFeature(pdev, req); 8005e04: 683a ldr r2, [r7, #0] 8005e06: 687b ldr r3, [r7, #4] 8005e08: 0011 movs r1, r2 8005e0a: 0018 movs r0, r3 8005e0c: f000 fd5d bl 80068ca break; 8005e10: e006 b.n 8005e20 default: USBD_CtlError(pdev, req); 8005e12: 683a ldr r2, [r7, #0] 8005e14: 687b ldr r3, [r7, #4] 8005e16: 0011 movs r1, r2 8005e18: 0018 movs r0, r3 8005e1a: f000 fdb4 bl 8006986 break; 8005e1e: 46c0 nop @ (mov r8, r8) } break; 8005e20: e006 b.n 8005e30 default: USBD_CtlError(pdev, req); 8005e22: 683a ldr r2, [r7, #0] 8005e24: 687b ldr r3, [r7, #4] 8005e26: 0011 movs r1, r2 8005e28: 0018 movs r0, r3 8005e2a: f000 fdac bl 8006986 break; 8005e2e: 46c0 nop @ (mov r8, r8) } return ret; 8005e30: 230f movs r3, #15 8005e32: 18fb adds r3, r7, r3 8005e34: 781b ldrb r3, [r3, #0] } 8005e36: 0018 movs r0, r3 8005e38: 46bd mov sp, r7 8005e3a: b004 add sp, #16 8005e3c: bd80 pop {r7, pc} 8005e3e: 46c0 nop @ (mov r8, r8) 8005e40: 0800754c .word 0x0800754c 08005e44 : * @param req: usb request * @retval status */ USBD_StatusTypeDef USBD_StdItfReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8005e44: b5b0 push {r4, r5, r7, lr} 8005e46: b084 sub sp, #16 8005e48: af00 add r7, sp, #0 8005e4a: 6078 str r0, [r7, #4] 8005e4c: 6039 str r1, [r7, #0] USBD_StatusTypeDef ret = USBD_OK; 8005e4e: 230f movs r3, #15 8005e50: 18fb adds r3, r7, r3 8005e52: 2200 movs r2, #0 8005e54: 701a strb r2, [r3, #0] switch (req->bmRequest & USB_REQ_TYPE_MASK) 8005e56: 683b ldr r3, [r7, #0] 8005e58: 781b ldrb r3, [r3, #0] 8005e5a: 001a movs r2, r3 8005e5c: 2360 movs r3, #96 @ 0x60 8005e5e: 4013 ands r3, r2 8005e60: 2b40 cmp r3, #64 @ 0x40 8005e62: d004 beq.n 8005e6e 8005e64: d839 bhi.n 8005eda 8005e66: 2b00 cmp r3, #0 8005e68: d001 beq.n 8005e6e 8005e6a: 2b20 cmp r3, #32 8005e6c: d135 bne.n 8005eda { case USB_REQ_TYPE_CLASS: case USB_REQ_TYPE_VENDOR: case USB_REQ_TYPE_STANDARD: switch (pdev->dev_state) 8005e6e: 687a ldr r2, [r7, #4] 8005e70: 23a7 movs r3, #167 @ 0xa7 8005e72: 009b lsls r3, r3, #2 8005e74: 5cd3 ldrb r3, [r2, r3] 8005e76: 3b01 subs r3, #1 8005e78: 2b02 cmp r3, #2 8005e7a: d825 bhi.n 8005ec8 { case USBD_STATE_DEFAULT: case USBD_STATE_ADDRESSED: case USBD_STATE_CONFIGURED: if (LOBYTE(req->wIndex) <= USBD_MAX_NUM_INTERFACES) 8005e7c: 683b ldr r3, [r7, #0] 8005e7e: 889b ldrh r3, [r3, #4] 8005e80: b2db uxtb r3, r3 8005e82: 2b01 cmp r3, #1 8005e84: d819 bhi.n 8005eba { ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req); 8005e86: 687a ldr r2, [r7, #4] 8005e88: 23ad movs r3, #173 @ 0xad 8005e8a: 009b lsls r3, r3, #2 8005e8c: 58d3 ldr r3, [r2, r3] 8005e8e: 689b ldr r3, [r3, #8] 8005e90: 250f movs r5, #15 8005e92: 197c adds r4, r7, r5 8005e94: 6839 ldr r1, [r7, #0] 8005e96: 687a ldr r2, [r7, #4] 8005e98: 0010 movs r0, r2 8005e9a: 4798 blx r3 8005e9c: 0003 movs r3, r0 8005e9e: 7023 strb r3, [r4, #0] if ((req->wLength == 0U) && (ret == USBD_OK)) 8005ea0: 683b ldr r3, [r7, #0] 8005ea2: 88db ldrh r3, [r3, #6] 8005ea4: 2b00 cmp r3, #0 8005ea6: d116 bne.n 8005ed6 8005ea8: 197b adds r3, r7, r5 8005eaa: 781b ldrb r3, [r3, #0] 8005eac: 2b00 cmp r3, #0 8005eae: d112 bne.n 8005ed6 { USBD_CtlSendStatus(pdev); 8005eb0: 687b ldr r3, [r7, #4] 8005eb2: 0018 movs r0, r3 8005eb4: f000 fe2b bl 8006b0e } else { USBD_CtlError(pdev, req); } break; 8005eb8: e00d b.n 8005ed6 USBD_CtlError(pdev, req); 8005eba: 683a ldr r2, [r7, #0] 8005ebc: 687b ldr r3, [r7, #4] 8005ebe: 0011 movs r1, r2 8005ec0: 0018 movs r0, r3 8005ec2: f000 fd60 bl 8006986 break; 8005ec6: e006 b.n 8005ed6 default: USBD_CtlError(pdev, req); 8005ec8: 683a ldr r2, [r7, #0] 8005eca: 687b ldr r3, [r7, #4] 8005ecc: 0011 movs r1, r2 8005ece: 0018 movs r0, r3 8005ed0: f000 fd59 bl 8006986 break; 8005ed4: e000 b.n 8005ed8 break; 8005ed6: 46c0 nop @ (mov r8, r8) } break; 8005ed8: e006 b.n 8005ee8 default: USBD_CtlError(pdev, req); 8005eda: 683a ldr r2, [r7, #0] 8005edc: 687b ldr r3, [r7, #4] 8005ede: 0011 movs r1, r2 8005ee0: 0018 movs r0, r3 8005ee2: f000 fd50 bl 8006986 break; 8005ee6: 46c0 nop @ (mov r8, r8) } return USBD_OK; 8005ee8: 2300 movs r3, #0 } 8005eea: 0018 movs r0, r3 8005eec: 46bd mov sp, r7 8005eee: b004 add sp, #16 8005ef0: bdb0 pop {r4, r5, r7, pc} 08005ef2 : * @param req: usb request * @retval status */ USBD_StatusTypeDef USBD_StdEPReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8005ef2: b5b0 push {r4, r5, r7, lr} 8005ef4: b084 sub sp, #16 8005ef6: af00 add r7, sp, #0 8005ef8: 6078 str r0, [r7, #4] 8005efa: 6039 str r1, [r7, #0] USBD_EndpointTypeDef *pep; uint8_t ep_addr; USBD_StatusTypeDef ret = USBD_OK; 8005efc: 230f movs r3, #15 8005efe: 18fb adds r3, r7, r3 8005f00: 2200 movs r2, #0 8005f02: 701a strb r2, [r3, #0] ep_addr = LOBYTE(req->wIndex); 8005f04: 683b ldr r3, [r7, #0] 8005f06: 889a ldrh r2, [r3, #4] 8005f08: 230e movs r3, #14 8005f0a: 18fb adds r3, r7, r3 8005f0c: 701a strb r2, [r3, #0] switch (req->bmRequest & USB_REQ_TYPE_MASK) 8005f0e: 683b ldr r3, [r7, #0] 8005f10: 781b ldrb r3, [r3, #0] 8005f12: 001a movs r2, r3 8005f14: 2360 movs r3, #96 @ 0x60 8005f16: 4013 ands r3, r2 8005f18: 2b40 cmp r3, #64 @ 0x40 8005f1a: d006 beq.n 8005f2a 8005f1c: d900 bls.n 8005f20 8005f1e: e190 b.n 8006242 8005f20: 2b00 cmp r3, #0 8005f22: d00c beq.n 8005f3e 8005f24: 2b20 cmp r3, #32 8005f26: d000 beq.n 8005f2a 8005f28: e18b b.n 8006242 { case USB_REQ_TYPE_CLASS: case USB_REQ_TYPE_VENDOR: pdev->pClass->Setup(pdev, req); 8005f2a: 687a ldr r2, [r7, #4] 8005f2c: 23ad movs r3, #173 @ 0xad 8005f2e: 009b lsls r3, r3, #2 8005f30: 58d3 ldr r3, [r2, r3] 8005f32: 689b ldr r3, [r3, #8] 8005f34: 6839 ldr r1, [r7, #0] 8005f36: 687a ldr r2, [r7, #4] 8005f38: 0010 movs r0, r2 8005f3a: 4798 blx r3 break; 8005f3c: e188 b.n 8006250 case USB_REQ_TYPE_STANDARD: /* Check if it is a class request */ if ((req->bmRequest & 0x60U) == 0x20U) 8005f3e: 683b ldr r3, [r7, #0] 8005f40: 781b ldrb r3, [r3, #0] 8005f42: 001a movs r2, r3 8005f44: 2360 movs r3, #96 @ 0x60 8005f46: 4013 ands r3, r2 8005f48: 2b20 cmp r3, #32 8005f4a: d10f bne.n 8005f6c { ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req); 8005f4c: 687a ldr r2, [r7, #4] 8005f4e: 23ad movs r3, #173 @ 0xad 8005f50: 009b lsls r3, r3, #2 8005f52: 58d3 ldr r3, [r2, r3] 8005f54: 689b ldr r3, [r3, #8] 8005f56: 250f movs r5, #15 8005f58: 197c adds r4, r7, r5 8005f5a: 6839 ldr r1, [r7, #0] 8005f5c: 687a ldr r2, [r7, #4] 8005f5e: 0010 movs r0, r2 8005f60: 4798 blx r3 8005f62: 0003 movs r3, r0 8005f64: 7023 strb r3, [r4, #0] return ret; 8005f66: 197b adds r3, r7, r5 8005f68: 781b ldrb r3, [r3, #0] 8005f6a: e174 b.n 8006256 } switch (req->bRequest) 8005f6c: 683b ldr r3, [r7, #0] 8005f6e: 785b ldrb r3, [r3, #1] 8005f70: 2b03 cmp r3, #3 8005f72: d007 beq.n 8005f84 8005f74: dd00 ble.n 8005f78 8005f76: e15c b.n 8006232 8005f78: 2b00 cmp r3, #0 8005f7a: d100 bne.n 8005f7e 8005f7c: e092 b.n 80060a4 8005f7e: 2b01 cmp r3, #1 8005f80: d04b beq.n 800601a 8005f82: e156 b.n 8006232 { case USB_REQ_SET_FEATURE: switch (pdev->dev_state) 8005f84: 687a ldr r2, [r7, #4] 8005f86: 23a7 movs r3, #167 @ 0xa7 8005f88: 009b lsls r3, r3, #2 8005f8a: 5cd3 ldrb r3, [r2, r3] 8005f8c: 2b02 cmp r3, #2 8005f8e: d002 beq.n 8005f96 8005f90: 2b03 cmp r3, #3 8005f92: d01d beq.n 8005fd0 8005f94: e039 b.n 800600a { case USBD_STATE_ADDRESSED: if ((ep_addr != 0x00U) && (ep_addr != 0x80U)) 8005f96: 220e movs r2, #14 8005f98: 18bb adds r3, r7, r2 8005f9a: 781b ldrb r3, [r3, #0] 8005f9c: 2b00 cmp r3, #0 8005f9e: d010 beq.n 8005fc2 8005fa0: 18bb adds r3, r7, r2 8005fa2: 781b ldrb r3, [r3, #0] 8005fa4: 2b80 cmp r3, #128 @ 0x80 8005fa6: d00c beq.n 8005fc2 { USBD_LL_StallEP(pdev, ep_addr); 8005fa8: 18bb adds r3, r7, r2 8005faa: 781a ldrb r2, [r3, #0] 8005fac: 687b ldr r3, [r7, #4] 8005fae: 0011 movs r1, r2 8005fb0: 0018 movs r0, r3 8005fb2: f001 f8ec bl 800718e USBD_LL_StallEP(pdev, 0x80U); 8005fb6: 687b ldr r3, [r7, #4] 8005fb8: 2180 movs r1, #128 @ 0x80 8005fba: 0018 movs r0, r3 8005fbc: f001 f8e7 bl 800718e } else { USBD_CtlError(pdev, req); } break; 8005fc0: e02a b.n 8006018 USBD_CtlError(pdev, req); 8005fc2: 683a ldr r2, [r7, #0] 8005fc4: 687b ldr r3, [r7, #4] 8005fc6: 0011 movs r1, r2 8005fc8: 0018 movs r0, r3 8005fca: f000 fcdc bl 8006986 break; 8005fce: e023 b.n 8006018 case USBD_STATE_CONFIGURED: if (req->wValue == USB_FEATURE_EP_HALT) 8005fd0: 683b ldr r3, [r7, #0] 8005fd2: 885b ldrh r3, [r3, #2] 8005fd4: 2b00 cmp r3, #0 8005fd6: d113 bne.n 8006000 { if ((ep_addr != 0x00U) && 8005fd8: 220e movs r2, #14 8005fda: 18bb adds r3, r7, r2 8005fdc: 781b ldrb r3, [r3, #0] 8005fde: 2b00 cmp r3, #0 8005fe0: d00e beq.n 8006000 8005fe2: 18bb adds r3, r7, r2 8005fe4: 781b ldrb r3, [r3, #0] 8005fe6: 2b80 cmp r3, #128 @ 0x80 8005fe8: d00a beq.n 8006000 (ep_addr != 0x80U) && (req->wLength == 0x00U)) 8005fea: 683b ldr r3, [r7, #0] 8005fec: 88db ldrh r3, [r3, #6] 8005fee: 2b00 cmp r3, #0 8005ff0: d106 bne.n 8006000 { USBD_LL_StallEP(pdev, ep_addr); 8005ff2: 18bb adds r3, r7, r2 8005ff4: 781a ldrb r2, [r3, #0] 8005ff6: 687b ldr r3, [r7, #4] 8005ff8: 0011 movs r1, r2 8005ffa: 0018 movs r0, r3 8005ffc: f001 f8c7 bl 800718e } } USBD_CtlSendStatus(pdev); 8006000: 687b ldr r3, [r7, #4] 8006002: 0018 movs r0, r3 8006004: f000 fd83 bl 8006b0e break; 8006008: e006 b.n 8006018 default: USBD_CtlError(pdev, req); 800600a: 683a ldr r2, [r7, #0] 800600c: 687b ldr r3, [r7, #4] 800600e: 0011 movs r1, r2 8006010: 0018 movs r0, r3 8006012: f000 fcb8 bl 8006986 break; 8006016: 46c0 nop @ (mov r8, r8) } break; 8006018: e112 b.n 8006240 case USB_REQ_CLEAR_FEATURE: switch (pdev->dev_state) 800601a: 687a ldr r2, [r7, #4] 800601c: 23a7 movs r3, #167 @ 0xa7 800601e: 009b lsls r3, r3, #2 8006020: 5cd3 ldrb r3, [r2, r3] 8006022: 2b02 cmp r3, #2 8006024: d002 beq.n 800602c 8006026: 2b03 cmp r3, #3 8006028: d01d beq.n 8006066 800602a: e032 b.n 8006092 { case USBD_STATE_ADDRESSED: if ((ep_addr != 0x00U) && (ep_addr != 0x80U)) 800602c: 220e movs r2, #14 800602e: 18bb adds r3, r7, r2 8006030: 781b ldrb r3, [r3, #0] 8006032: 2b00 cmp r3, #0 8006034: d010 beq.n 8006058 8006036: 18bb adds r3, r7, r2 8006038: 781b ldrb r3, [r3, #0] 800603a: 2b80 cmp r3, #128 @ 0x80 800603c: d00c beq.n 8006058 { USBD_LL_StallEP(pdev, ep_addr); 800603e: 18bb adds r3, r7, r2 8006040: 781a ldrb r2, [r3, #0] 8006042: 687b ldr r3, [r7, #4] 8006044: 0011 movs r1, r2 8006046: 0018 movs r0, r3 8006048: f001 f8a1 bl 800718e USBD_LL_StallEP(pdev, 0x80U); 800604c: 687b ldr r3, [r7, #4] 800604e: 2180 movs r1, #128 @ 0x80 8006050: 0018 movs r0, r3 8006052: f001 f89c bl 800718e } else { USBD_CtlError(pdev, req); } break; 8006056: e024 b.n 80060a2 USBD_CtlError(pdev, req); 8006058: 683a ldr r2, [r7, #0] 800605a: 687b ldr r3, [r7, #4] 800605c: 0011 movs r1, r2 800605e: 0018 movs r0, r3 8006060: f000 fc91 bl 8006986 break; 8006064: e01d b.n 80060a2 case USBD_STATE_CONFIGURED: if (req->wValue == USB_FEATURE_EP_HALT) 8006066: 683b ldr r3, [r7, #0] 8006068: 885b ldrh r3, [r3, #2] 800606a: 2b00 cmp r3, #0 800606c: d118 bne.n 80060a0 { if ((ep_addr & 0x7FU) != 0x00U) 800606e: 210e movs r1, #14 8006070: 187b adds r3, r7, r1 8006072: 781b ldrb r3, [r3, #0] 8006074: 227f movs r2, #127 @ 0x7f 8006076: 4013 ands r3, r2 8006078: d006 beq.n 8006088 { USBD_LL_ClearStallEP(pdev, ep_addr); 800607a: 187b adds r3, r7, r1 800607c: 781a ldrb r2, [r3, #0] 800607e: 687b ldr r3, [r7, #4] 8006080: 0011 movs r1, r2 8006082: 0018 movs r0, r3 8006084: f001 f8ae bl 80071e4 } USBD_CtlSendStatus(pdev); 8006088: 687b ldr r3, [r7, #4] 800608a: 0018 movs r0, r3 800608c: f000 fd3f bl 8006b0e } break; 8006090: e006 b.n 80060a0 default: USBD_CtlError(pdev, req); 8006092: 683a ldr r2, [r7, #0] 8006094: 687b ldr r3, [r7, #4] 8006096: 0011 movs r1, r2 8006098: 0018 movs r0, r3 800609a: f000 fc74 bl 8006986 break; 800609e: e000 b.n 80060a2 break; 80060a0: 46c0 nop @ (mov r8, r8) } break; 80060a2: e0cd b.n 8006240 case USB_REQ_GET_STATUS: switch (pdev->dev_state) 80060a4: 687a ldr r2, [r7, #4] 80060a6: 23a7 movs r3, #167 @ 0xa7 80060a8: 009b lsls r3, r3, #2 80060aa: 5cd3 ldrb r3, [r2, r3] 80060ac: 2b02 cmp r3, #2 80060ae: d002 beq.n 80060b6 80060b0: 2b03 cmp r3, #3 80060b2: d03c beq.n 800612e 80060b4: e0b5 b.n 8006222 { case USBD_STATE_ADDRESSED: if ((ep_addr != 0x00U) && (ep_addr != 0x80U)) 80060b6: 220e movs r2, #14 80060b8: 18bb adds r3, r7, r2 80060ba: 781b ldrb r3, [r3, #0] 80060bc: 2b00 cmp r3, #0 80060be: d00a beq.n 80060d6 80060c0: 18bb adds r3, r7, r2 80060c2: 781b ldrb r3, [r3, #0] 80060c4: 2b80 cmp r3, #128 @ 0x80 80060c6: d006 beq.n 80060d6 { USBD_CtlError(pdev, req); 80060c8: 683a ldr r2, [r7, #0] 80060ca: 687b ldr r3, [r7, #4] 80060cc: 0011 movs r1, r2 80060ce: 0018 movs r0, r3 80060d0: f000 fc59 bl 8006986 break; 80060d4: e0ac b.n 8006230 } pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \ 80060d6: 220e movs r2, #14 80060d8: 18bb adds r3, r7, r2 80060da: 781b ldrb r3, [r3, #0] 80060dc: b25b sxtb r3, r3 80060de: 2b00 cmp r3, #0 80060e0: da0c bge.n 80060fc 80060e2: 18bb adds r3, r7, r2 80060e4: 781b ldrb r3, [r3, #0] 80060e6: 227f movs r2, #127 @ 0x7f 80060e8: 401a ands r2, r3 80060ea: 0013 movs r3, r2 80060ec: 009b lsls r3, r3, #2 80060ee: 189b adds r3, r3, r2 80060f0: 009b lsls r3, r3, #2 80060f2: 3310 adds r3, #16 80060f4: 687a ldr r2, [r7, #4] 80060f6: 18d3 adds r3, r2, r3 80060f8: 3304 adds r3, #4 80060fa: e00d b.n 8006118 &pdev->ep_out[ep_addr & 0x7FU]; 80060fc: 230e movs r3, #14 80060fe: 18fb adds r3, r7, r3 8006100: 781b ldrb r3, [r3, #0] 8006102: 227f movs r2, #127 @ 0x7f 8006104: 401a ands r2, r3 pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \ 8006106: 0013 movs r3, r2 8006108: 009b lsls r3, r3, #2 800610a: 189b adds r3, r3, r2 800610c: 009b lsls r3, r3, #2 800610e: 3351 adds r3, #81 @ 0x51 8006110: 33ff adds r3, #255 @ 0xff 8006112: 687a ldr r2, [r7, #4] 8006114: 18d3 adds r3, r2, r3 8006116: 3304 adds r3, #4 8006118: 60bb str r3, [r7, #8] pep->status = 0x0000U; 800611a: 68bb ldr r3, [r7, #8] 800611c: 2200 movs r2, #0 800611e: 601a str r2, [r3, #0] USBD_CtlSendData(pdev, (uint8_t *)(void *)&pep->status, 2U); 8006120: 68b9 ldr r1, [r7, #8] 8006122: 687b ldr r3, [r7, #4] 8006124: 2202 movs r2, #2 8006126: 0018 movs r0, r3 8006128: f000 fcab bl 8006a82 break; 800612c: e080 b.n 8006230 case USBD_STATE_CONFIGURED: if ((ep_addr & 0x80U) == 0x80U) 800612e: 220e movs r2, #14 8006130: 18bb adds r3, r7, r2 8006132: 781b ldrb r3, [r3, #0] 8006134: b25b sxtb r3, r3 8006136: 2b00 cmp r3, #0 8006138: da14 bge.n 8006164 { if (pdev->ep_in[ep_addr & 0xFU].is_used == 0U) 800613a: 18bb adds r3, r7, r2 800613c: 781b ldrb r3, [r3, #0] 800613e: 220f movs r2, #15 8006140: 401a ands r2, r3 8006142: 6879 ldr r1, [r7, #4] 8006144: 0013 movs r3, r2 8006146: 009b lsls r3, r3, #2 8006148: 189b adds r3, r3, r2 800614a: 009b lsls r3, r3, #2 800614c: 18cb adds r3, r1, r3 800614e: 3318 adds r3, #24 8006150: 681b ldr r3, [r3, #0] 8006152: 2b00 cmp r3, #0 8006154: d11e bne.n 8006194 { USBD_CtlError(pdev, req); 8006156: 683a ldr r2, [r7, #0] 8006158: 687b ldr r3, [r7, #4] 800615a: 0011 movs r1, r2 800615c: 0018 movs r0, r3 800615e: f000 fc12 bl 8006986 break; 8006162: e065 b.n 8006230 } } else { if (pdev->ep_out[ep_addr & 0xFU].is_used == 0U) 8006164: 230e movs r3, #14 8006166: 18fb adds r3, r7, r3 8006168: 781b ldrb r3, [r3, #0] 800616a: 220f movs r2, #15 800616c: 401a ands r2, r3 800616e: 6878 ldr r0, [r7, #4] 8006170: 23ac movs r3, #172 @ 0xac 8006172: 0059 lsls r1, r3, #1 8006174: 0013 movs r3, r2 8006176: 009b lsls r3, r3, #2 8006178: 189b adds r3, r3, r2 800617a: 009b lsls r3, r3, #2 800617c: 18c3 adds r3, r0, r3 800617e: 185b adds r3, r3, r1 8006180: 681b ldr r3, [r3, #0] 8006182: 2b00 cmp r3, #0 8006184: d106 bne.n 8006194 { USBD_CtlError(pdev, req); 8006186: 683a ldr r2, [r7, #0] 8006188: 687b ldr r3, [r7, #4] 800618a: 0011 movs r1, r2 800618c: 0018 movs r0, r3 800618e: f000 fbfa bl 8006986 break; 8006192: e04d b.n 8006230 } } pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \ 8006194: 220e movs r2, #14 8006196: 18bb adds r3, r7, r2 8006198: 781b ldrb r3, [r3, #0] 800619a: b25b sxtb r3, r3 800619c: 2b00 cmp r3, #0 800619e: da0c bge.n 80061ba 80061a0: 18bb adds r3, r7, r2 80061a2: 781b ldrb r3, [r3, #0] 80061a4: 227f movs r2, #127 @ 0x7f 80061a6: 401a ands r2, r3 80061a8: 0013 movs r3, r2 80061aa: 009b lsls r3, r3, #2 80061ac: 189b adds r3, r3, r2 80061ae: 009b lsls r3, r3, #2 80061b0: 3310 adds r3, #16 80061b2: 687a ldr r2, [r7, #4] 80061b4: 18d3 adds r3, r2, r3 80061b6: 3304 adds r3, #4 80061b8: e00d b.n 80061d6 &pdev->ep_out[ep_addr & 0x7FU]; 80061ba: 230e movs r3, #14 80061bc: 18fb adds r3, r7, r3 80061be: 781b ldrb r3, [r3, #0] 80061c0: 227f movs r2, #127 @ 0x7f 80061c2: 401a ands r2, r3 pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \ 80061c4: 0013 movs r3, r2 80061c6: 009b lsls r3, r3, #2 80061c8: 189b adds r3, r3, r2 80061ca: 009b lsls r3, r3, #2 80061cc: 3351 adds r3, #81 @ 0x51 80061ce: 33ff adds r3, #255 @ 0xff 80061d0: 687a ldr r2, [r7, #4] 80061d2: 18d3 adds r3, r2, r3 80061d4: 3304 adds r3, #4 80061d6: 60bb str r3, [r7, #8] if ((ep_addr == 0x00U) || (ep_addr == 0x80U)) 80061d8: 220e movs r2, #14 80061da: 18bb adds r3, r7, r2 80061dc: 781b ldrb r3, [r3, #0] 80061de: 2b00 cmp r3, #0 80061e0: d003 beq.n 80061ea 80061e2: 18bb adds r3, r7, r2 80061e4: 781b ldrb r3, [r3, #0] 80061e6: 2b80 cmp r3, #128 @ 0x80 80061e8: d103 bne.n 80061f2 { pep->status = 0x0000U; 80061ea: 68bb ldr r3, [r7, #8] 80061ec: 2200 movs r2, #0 80061ee: 601a str r2, [r3, #0] 80061f0: e010 b.n 8006214 } else if (USBD_LL_IsStallEP(pdev, ep_addr)) 80061f2: 230e movs r3, #14 80061f4: 18fb adds r3, r7, r3 80061f6: 781a ldrb r2, [r3, #0] 80061f8: 687b ldr r3, [r7, #4] 80061fa: 0011 movs r1, r2 80061fc: 0018 movs r0, r3 80061fe: f001 f81c bl 800723a 8006202: 1e03 subs r3, r0, #0 8006204: d003 beq.n 800620e { pep->status = 0x0001U; 8006206: 68bb ldr r3, [r7, #8] 8006208: 2201 movs r2, #1 800620a: 601a str r2, [r3, #0] 800620c: e002 b.n 8006214 } else { pep->status = 0x0000U; 800620e: 68bb ldr r3, [r7, #8] 8006210: 2200 movs r2, #0 8006212: 601a str r2, [r3, #0] } USBD_CtlSendData(pdev, (uint8_t *)(void *)&pep->status, 2U); 8006214: 68b9 ldr r1, [r7, #8] 8006216: 687b ldr r3, [r7, #4] 8006218: 2202 movs r2, #2 800621a: 0018 movs r0, r3 800621c: f000 fc31 bl 8006a82 break; 8006220: e006 b.n 8006230 default: USBD_CtlError(pdev, req); 8006222: 683a ldr r2, [r7, #0] 8006224: 687b ldr r3, [r7, #4] 8006226: 0011 movs r1, r2 8006228: 0018 movs r0, r3 800622a: f000 fbac bl 8006986 break; 800622e: 46c0 nop @ (mov r8, r8) } break; 8006230: e006 b.n 8006240 default: USBD_CtlError(pdev, req); 8006232: 683a ldr r2, [r7, #0] 8006234: 687b ldr r3, [r7, #4] 8006236: 0011 movs r1, r2 8006238: 0018 movs r0, r3 800623a: f000 fba4 bl 8006986 break; 800623e: 46c0 nop @ (mov r8, r8) } break; 8006240: e006 b.n 8006250 default: USBD_CtlError(pdev, req); 8006242: 683a ldr r2, [r7, #0] 8006244: 687b ldr r3, [r7, #4] 8006246: 0011 movs r1, r2 8006248: 0018 movs r0, r3 800624a: f000 fb9c bl 8006986 break; 800624e: 46c0 nop @ (mov r8, r8) } return ret; 8006250: 230f movs r3, #15 8006252: 18fb adds r3, r7, r3 8006254: 781b ldrb r3, [r3, #0] } 8006256: 0018 movs r0, r3 8006258: 46bd mov sp, r7 800625a: b004 add sp, #16 800625c: bdb0 pop {r4, r5, r7, pc} ... 08006260 : * @param req: usb request * @retval status */ static void USBD_GetDescriptor(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8006260: b580 push {r7, lr} 8006262: b084 sub sp, #16 8006264: af00 add r7, sp, #0 8006266: 6078 str r0, [r7, #4] 8006268: 6039 str r1, [r7, #0] uint16_t len = 0U; 800626a: 2308 movs r3, #8 800626c: 18fb adds r3, r7, r3 800626e: 2200 movs r2, #0 8006270: 801a strh r2, [r3, #0] uint8_t *pbuf = NULL; 8006272: 2300 movs r3, #0 8006274: 60fb str r3, [r7, #12] uint8_t err = 0U; 8006276: 230b movs r3, #11 8006278: 18fb adds r3, r7, r3 800627a: 2200 movs r2, #0 800627c: 701a strb r2, [r3, #0] switch (req->wValue >> 8) 800627e: 683b ldr r3, [r7, #0] 8006280: 885b ldrh r3, [r3, #2] 8006282: 0a1b lsrs r3, r3, #8 8006284: b29b uxth r3, r3 8006286: 2b07 cmp r3, #7 8006288: d900 bls.n 800628c 800628a: e159 b.n 8006540 800628c: 009a lsls r2, r3, #2 800628e: 4bcb ldr r3, [pc, #812] @ (80065bc ) 8006290: 18d3 adds r3, r2, r3 8006292: 681b ldr r3, [r3, #0] 8006294: 469f mov pc, r3 err++; } break; #endif case USB_DESC_TYPE_DEVICE: pbuf = pdev->pDesc->GetDeviceDescriptor(pdev->dev_speed, &len); 8006296: 687a ldr r2, [r7, #4] 8006298: 23ac movs r3, #172 @ 0xac 800629a: 009b lsls r3, r3, #2 800629c: 58d3 ldr r3, [r2, r3] 800629e: 681b ldr r3, [r3, #0] 80062a0: 687a ldr r2, [r7, #4] 80062a2: 7c12 ldrb r2, [r2, #16] 80062a4: 2108 movs r1, #8 80062a6: 1879 adds r1, r7, r1 80062a8: 0010 movs r0, r2 80062aa: 4798 blx r3 80062ac: 0003 movs r3, r0 80062ae: 60fb str r3, [r7, #12] break; 80062b0: e153 b.n 800655a case USB_DESC_TYPE_CONFIGURATION: if (pdev->dev_speed == USBD_SPEED_HIGH) 80062b2: 687b ldr r3, [r7, #4] 80062b4: 7c1b ldrb r3, [r3, #16] 80062b6: 2b00 cmp r3, #0 80062b8: d10f bne.n 80062da { pbuf = pdev->pClass->GetHSConfigDescriptor(&len); 80062ba: 687a ldr r2, [r7, #4] 80062bc: 23ad movs r3, #173 @ 0xad 80062be: 009b lsls r3, r3, #2 80062c0: 58d3 ldr r3, [r2, r3] 80062c2: 6a9b ldr r3, [r3, #40] @ 0x28 80062c4: 2208 movs r2, #8 80062c6: 18ba adds r2, r7, r2 80062c8: 0010 movs r0, r2 80062ca: 4798 blx r3 80062cc: 0003 movs r3, r0 80062ce: 60fb str r3, [r7, #12] pbuf[1] = USB_DESC_TYPE_CONFIGURATION; 80062d0: 68fb ldr r3, [r7, #12] 80062d2: 3301 adds r3, #1 80062d4: 2202 movs r2, #2 80062d6: 701a strb r2, [r3, #0] else { pbuf = pdev->pClass->GetFSConfigDescriptor(&len); pbuf[1] = USB_DESC_TYPE_CONFIGURATION; } break; 80062d8: e13f b.n 800655a pbuf = pdev->pClass->GetFSConfigDescriptor(&len); 80062da: 687a ldr r2, [r7, #4] 80062dc: 23ad movs r3, #173 @ 0xad 80062de: 009b lsls r3, r3, #2 80062e0: 58d3 ldr r3, [r2, r3] 80062e2: 6adb ldr r3, [r3, #44] @ 0x2c 80062e4: 2208 movs r2, #8 80062e6: 18ba adds r2, r7, r2 80062e8: 0010 movs r0, r2 80062ea: 4798 blx r3 80062ec: 0003 movs r3, r0 80062ee: 60fb str r3, [r7, #12] pbuf[1] = USB_DESC_TYPE_CONFIGURATION; 80062f0: 68fb ldr r3, [r7, #12] 80062f2: 3301 adds r3, #1 80062f4: 2202 movs r2, #2 80062f6: 701a strb r2, [r3, #0] break; 80062f8: e12f b.n 800655a case USB_DESC_TYPE_STRING: switch ((uint8_t)(req->wValue)) 80062fa: 683b ldr r3, [r7, #0] 80062fc: 885b ldrh r3, [r3, #2] 80062fe: b2db uxtb r3, r3 8006300: 2b05 cmp r3, #5 8006302: d900 bls.n 8006306 8006304: e0d0 b.n 80064a8 8006306: 009a lsls r2, r3, #2 8006308: 4bad ldr r3, [pc, #692] @ (80065c0 ) 800630a: 18d3 adds r3, r2, r3 800630c: 681b ldr r3, [r3, #0] 800630e: 469f mov pc, r3 { case USBD_IDX_LANGID_STR: if (pdev->pDesc->GetLangIDStrDescriptor != NULL) 8006310: 687a ldr r2, [r7, #4] 8006312: 23ac movs r3, #172 @ 0xac 8006314: 009b lsls r3, r3, #2 8006316: 58d3 ldr r3, [r2, r3] 8006318: 685b ldr r3, [r3, #4] 800631a: 2b00 cmp r3, #0 800631c: d00d beq.n 800633a { pbuf = pdev->pDesc->GetLangIDStrDescriptor(pdev->dev_speed, &len); 800631e: 687a ldr r2, [r7, #4] 8006320: 23ac movs r3, #172 @ 0xac 8006322: 009b lsls r3, r3, #2 8006324: 58d3 ldr r3, [r2, r3] 8006326: 685b ldr r3, [r3, #4] 8006328: 687a ldr r2, [r7, #4] 800632a: 7c12 ldrb r2, [r2, #16] 800632c: 2108 movs r1, #8 800632e: 1879 adds r1, r7, r1 8006330: 0010 movs r0, r2 8006332: 4798 blx r3 8006334: 0003 movs r3, r0 8006336: 60fb str r3, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 8006338: e0c3 b.n 80064c2 USBD_CtlError(pdev, req); 800633a: 683a ldr r2, [r7, #0] 800633c: 687b ldr r3, [r7, #4] 800633e: 0011 movs r1, r2 8006340: 0018 movs r0, r3 8006342: f000 fb20 bl 8006986 err++; 8006346: 210b movs r1, #11 8006348: 187b adds r3, r7, r1 800634a: 781a ldrb r2, [r3, #0] 800634c: 187b adds r3, r7, r1 800634e: 3201 adds r2, #1 8006350: 701a strb r2, [r3, #0] break; 8006352: e0b6 b.n 80064c2 case USBD_IDX_MFC_STR: if (pdev->pDesc->GetManufacturerStrDescriptor != NULL) 8006354: 687a ldr r2, [r7, #4] 8006356: 23ac movs r3, #172 @ 0xac 8006358: 009b lsls r3, r3, #2 800635a: 58d3 ldr r3, [r2, r3] 800635c: 689b ldr r3, [r3, #8] 800635e: 2b00 cmp r3, #0 8006360: d00d beq.n 800637e { pbuf = pdev->pDesc->GetManufacturerStrDescriptor(pdev->dev_speed, &len); 8006362: 687a ldr r2, [r7, #4] 8006364: 23ac movs r3, #172 @ 0xac 8006366: 009b lsls r3, r3, #2 8006368: 58d3 ldr r3, [r2, r3] 800636a: 689b ldr r3, [r3, #8] 800636c: 687a ldr r2, [r7, #4] 800636e: 7c12 ldrb r2, [r2, #16] 8006370: 2108 movs r1, #8 8006372: 1879 adds r1, r7, r1 8006374: 0010 movs r0, r2 8006376: 4798 blx r3 8006378: 0003 movs r3, r0 800637a: 60fb str r3, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 800637c: e0a1 b.n 80064c2 USBD_CtlError(pdev, req); 800637e: 683a ldr r2, [r7, #0] 8006380: 687b ldr r3, [r7, #4] 8006382: 0011 movs r1, r2 8006384: 0018 movs r0, r3 8006386: f000 fafe bl 8006986 err++; 800638a: 210b movs r1, #11 800638c: 187b adds r3, r7, r1 800638e: 781a ldrb r2, [r3, #0] 8006390: 187b adds r3, r7, r1 8006392: 3201 adds r2, #1 8006394: 701a strb r2, [r3, #0] break; 8006396: e094 b.n 80064c2 case USBD_IDX_PRODUCT_STR: if (pdev->pDesc->GetProductStrDescriptor != NULL) 8006398: 687a ldr r2, [r7, #4] 800639a: 23ac movs r3, #172 @ 0xac 800639c: 009b lsls r3, r3, #2 800639e: 58d3 ldr r3, [r2, r3] 80063a0: 68db ldr r3, [r3, #12] 80063a2: 2b00 cmp r3, #0 80063a4: d00d beq.n 80063c2 { pbuf = pdev->pDesc->GetProductStrDescriptor(pdev->dev_speed, &len); 80063a6: 687a ldr r2, [r7, #4] 80063a8: 23ac movs r3, #172 @ 0xac 80063aa: 009b lsls r3, r3, #2 80063ac: 58d3 ldr r3, [r2, r3] 80063ae: 68db ldr r3, [r3, #12] 80063b0: 687a ldr r2, [r7, #4] 80063b2: 7c12 ldrb r2, [r2, #16] 80063b4: 2108 movs r1, #8 80063b6: 1879 adds r1, r7, r1 80063b8: 0010 movs r0, r2 80063ba: 4798 blx r3 80063bc: 0003 movs r3, r0 80063be: 60fb str r3, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 80063c0: e07f b.n 80064c2 USBD_CtlError(pdev, req); 80063c2: 683a ldr r2, [r7, #0] 80063c4: 687b ldr r3, [r7, #4] 80063c6: 0011 movs r1, r2 80063c8: 0018 movs r0, r3 80063ca: f000 fadc bl 8006986 err++; 80063ce: 210b movs r1, #11 80063d0: 187b adds r3, r7, r1 80063d2: 781a ldrb r2, [r3, #0] 80063d4: 187b adds r3, r7, r1 80063d6: 3201 adds r2, #1 80063d8: 701a strb r2, [r3, #0] break; 80063da: e072 b.n 80064c2 case USBD_IDX_SERIAL_STR: if (pdev->pDesc->GetSerialStrDescriptor != NULL) 80063dc: 687a ldr r2, [r7, #4] 80063de: 23ac movs r3, #172 @ 0xac 80063e0: 009b lsls r3, r3, #2 80063e2: 58d3 ldr r3, [r2, r3] 80063e4: 691b ldr r3, [r3, #16] 80063e6: 2b00 cmp r3, #0 80063e8: d00d beq.n 8006406 { pbuf = pdev->pDesc->GetSerialStrDescriptor(pdev->dev_speed, &len); 80063ea: 687a ldr r2, [r7, #4] 80063ec: 23ac movs r3, #172 @ 0xac 80063ee: 009b lsls r3, r3, #2 80063f0: 58d3 ldr r3, [r2, r3] 80063f2: 691b ldr r3, [r3, #16] 80063f4: 687a ldr r2, [r7, #4] 80063f6: 7c12 ldrb r2, [r2, #16] 80063f8: 2108 movs r1, #8 80063fa: 1879 adds r1, r7, r1 80063fc: 0010 movs r0, r2 80063fe: 4798 blx r3 8006400: 0003 movs r3, r0 8006402: 60fb str r3, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 8006404: e05d b.n 80064c2 USBD_CtlError(pdev, req); 8006406: 683a ldr r2, [r7, #0] 8006408: 687b ldr r3, [r7, #4] 800640a: 0011 movs r1, r2 800640c: 0018 movs r0, r3 800640e: f000 faba bl 8006986 err++; 8006412: 210b movs r1, #11 8006414: 187b adds r3, r7, r1 8006416: 781a ldrb r2, [r3, #0] 8006418: 187b adds r3, r7, r1 800641a: 3201 adds r2, #1 800641c: 701a strb r2, [r3, #0] break; 800641e: e050 b.n 80064c2 case USBD_IDX_CONFIG_STR: if (pdev->pDesc->GetConfigurationStrDescriptor != NULL) 8006420: 687a ldr r2, [r7, #4] 8006422: 23ac movs r3, #172 @ 0xac 8006424: 009b lsls r3, r3, #2 8006426: 58d3 ldr r3, [r2, r3] 8006428: 695b ldr r3, [r3, #20] 800642a: 2b00 cmp r3, #0 800642c: d00d beq.n 800644a { pbuf = pdev->pDesc->GetConfigurationStrDescriptor(pdev->dev_speed, &len); 800642e: 687a ldr r2, [r7, #4] 8006430: 23ac movs r3, #172 @ 0xac 8006432: 009b lsls r3, r3, #2 8006434: 58d3 ldr r3, [r2, r3] 8006436: 695b ldr r3, [r3, #20] 8006438: 687a ldr r2, [r7, #4] 800643a: 7c12 ldrb r2, [r2, #16] 800643c: 2108 movs r1, #8 800643e: 1879 adds r1, r7, r1 8006440: 0010 movs r0, r2 8006442: 4798 blx r3 8006444: 0003 movs r3, r0 8006446: 60fb str r3, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 8006448: e03b b.n 80064c2 USBD_CtlError(pdev, req); 800644a: 683a ldr r2, [r7, #0] 800644c: 687b ldr r3, [r7, #4] 800644e: 0011 movs r1, r2 8006450: 0018 movs r0, r3 8006452: f000 fa98 bl 8006986 err++; 8006456: 210b movs r1, #11 8006458: 187b adds r3, r7, r1 800645a: 781a ldrb r2, [r3, #0] 800645c: 187b adds r3, r7, r1 800645e: 3201 adds r2, #1 8006460: 701a strb r2, [r3, #0] break; 8006462: e02e b.n 80064c2 case USBD_IDX_INTERFACE_STR: if (pdev->pDesc->GetInterfaceStrDescriptor != NULL) 8006464: 687a ldr r2, [r7, #4] 8006466: 23ac movs r3, #172 @ 0xac 8006468: 009b lsls r3, r3, #2 800646a: 58d3 ldr r3, [r2, r3] 800646c: 699b ldr r3, [r3, #24] 800646e: 2b00 cmp r3, #0 8006470: d00d beq.n 800648e { pbuf = pdev->pDesc->GetInterfaceStrDescriptor(pdev->dev_speed, &len); 8006472: 687a ldr r2, [r7, #4] 8006474: 23ac movs r3, #172 @ 0xac 8006476: 009b lsls r3, r3, #2 8006478: 58d3 ldr r3, [r2, r3] 800647a: 699b ldr r3, [r3, #24] 800647c: 687a ldr r2, [r7, #4] 800647e: 7c12 ldrb r2, [r2, #16] 8006480: 2108 movs r1, #8 8006482: 1879 adds r1, r7, r1 8006484: 0010 movs r0, r2 8006486: 4798 blx r3 8006488: 0003 movs r3, r0 800648a: 60fb str r3, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 800648c: e019 b.n 80064c2 USBD_CtlError(pdev, req); 800648e: 683a ldr r2, [r7, #0] 8006490: 687b ldr r3, [r7, #4] 8006492: 0011 movs r1, r2 8006494: 0018 movs r0, r3 8006496: f000 fa76 bl 8006986 err++; 800649a: 210b movs r1, #11 800649c: 187b adds r3, r7, r1 800649e: 781a ldrb r2, [r3, #0] 80064a0: 187b adds r3, r7, r1 80064a2: 3201 adds r2, #1 80064a4: 701a strb r2, [r3, #0] break; 80064a6: e00c b.n 80064c2 USBD_CtlError(pdev, req); err++; } break; #else USBD_CtlError(pdev, req); 80064a8: 683a ldr r2, [r7, #0] 80064aa: 687b ldr r3, [r7, #4] 80064ac: 0011 movs r1, r2 80064ae: 0018 movs r0, r3 80064b0: f000 fa69 bl 8006986 err++; 80064b4: 210b movs r1, #11 80064b6: 187b adds r3, r7, r1 80064b8: 781a ldrb r2, [r3, #0] 80064ba: 187b adds r3, r7, r1 80064bc: 3201 adds r2, #1 80064be: 701a strb r2, [r3, #0] #endif } break; 80064c0: e04b b.n 800655a 80064c2: e04a b.n 800655a case USB_DESC_TYPE_DEVICE_QUALIFIER: if (pdev->dev_speed == USBD_SPEED_HIGH) 80064c4: 687b ldr r3, [r7, #4] 80064c6: 7c1b ldrb r3, [r3, #16] 80064c8: 2b00 cmp r3, #0 80064ca: d10b bne.n 80064e4 { pbuf = pdev->pClass->GetDeviceQualifierDescriptor(&len); 80064cc: 687a ldr r2, [r7, #4] 80064ce: 23ad movs r3, #173 @ 0xad 80064d0: 009b lsls r3, r3, #2 80064d2: 58d3 ldr r3, [r2, r3] 80064d4: 6b5b ldr r3, [r3, #52] @ 0x34 80064d6: 2208 movs r2, #8 80064d8: 18ba adds r2, r7, r2 80064da: 0010 movs r0, r2 80064dc: 4798 blx r3 80064de: 0003 movs r3, r0 80064e0: 60fb str r3, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 80064e2: e03a b.n 800655a USBD_CtlError(pdev, req); 80064e4: 683a ldr r2, [r7, #0] 80064e6: 687b ldr r3, [r7, #4] 80064e8: 0011 movs r1, r2 80064ea: 0018 movs r0, r3 80064ec: f000 fa4b bl 8006986 err++; 80064f0: 210b movs r1, #11 80064f2: 187b adds r3, r7, r1 80064f4: 781a ldrb r2, [r3, #0] 80064f6: 187b adds r3, r7, r1 80064f8: 3201 adds r2, #1 80064fa: 701a strb r2, [r3, #0] break; 80064fc: e02d b.n 800655a case USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION: if (pdev->dev_speed == USBD_SPEED_HIGH) 80064fe: 687b ldr r3, [r7, #4] 8006500: 7c1b ldrb r3, [r3, #16] 8006502: 2b00 cmp r3, #0 8006504: d10f bne.n 8006526 { pbuf = pdev->pClass->GetOtherSpeedConfigDescriptor(&len); 8006506: 687a ldr r2, [r7, #4] 8006508: 23ad movs r3, #173 @ 0xad 800650a: 009b lsls r3, r3, #2 800650c: 58d3 ldr r3, [r2, r3] 800650e: 6b1b ldr r3, [r3, #48] @ 0x30 8006510: 2208 movs r2, #8 8006512: 18ba adds r2, r7, r2 8006514: 0010 movs r0, r2 8006516: 4798 blx r3 8006518: 0003 movs r3, r0 800651a: 60fb str r3, [r7, #12] pbuf[1] = USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION; 800651c: 68fb ldr r3, [r7, #12] 800651e: 3301 adds r3, #1 8006520: 2207 movs r2, #7 8006522: 701a strb r2, [r3, #0] else { USBD_CtlError(pdev, req); err++; } break; 8006524: e019 b.n 800655a USBD_CtlError(pdev, req); 8006526: 683a ldr r2, [r7, #0] 8006528: 687b ldr r3, [r7, #4] 800652a: 0011 movs r1, r2 800652c: 0018 movs r0, r3 800652e: f000 fa2a bl 8006986 err++; 8006532: 210b movs r1, #11 8006534: 187b adds r3, r7, r1 8006536: 781a ldrb r2, [r3, #0] 8006538: 187b adds r3, r7, r1 800653a: 3201 adds r2, #1 800653c: 701a strb r2, [r3, #0] break; 800653e: e00c b.n 800655a default: USBD_CtlError(pdev, req); 8006540: 683a ldr r2, [r7, #0] 8006542: 687b ldr r3, [r7, #4] 8006544: 0011 movs r1, r2 8006546: 0018 movs r0, r3 8006548: f000 fa1d bl 8006986 err++; 800654c: 210b movs r1, #11 800654e: 187b adds r3, r7, r1 8006550: 781a ldrb r2, [r3, #0] 8006552: 187b adds r3, r7, r1 8006554: 3201 adds r2, #1 8006556: 701a strb r2, [r3, #0] break; 8006558: 46c0 nop @ (mov r8, r8) } if (err != 0U) 800655a: 230b movs r3, #11 800655c: 18fb adds r3, r7, r3 800655e: 781b ldrb r3, [r3, #0] 8006560: 2b00 cmp r3, #0 8006562: d127 bne.n 80065b4 { return; } else { if ((len != 0U) && (req->wLength != 0U)) 8006564: 2108 movs r1, #8 8006566: 187b adds r3, r7, r1 8006568: 881b ldrh r3, [r3, #0] 800656a: 2b00 cmp r3, #0 800656c: d019 beq.n 80065a2 800656e: 683b ldr r3, [r7, #0] 8006570: 88db ldrh r3, [r3, #6] 8006572: 2b00 cmp r3, #0 8006574: d015 beq.n 80065a2 { len = MIN(len, req->wLength); 8006576: 683b ldr r3, [r7, #0] 8006578: 88da ldrh r2, [r3, #6] 800657a: 187b adds r3, r7, r1 800657c: 881b ldrh r3, [r3, #0] 800657e: 1c18 adds r0, r3, #0 8006580: 1c11 adds r1, r2, #0 8006582: b28a uxth r2, r1 8006584: b283 uxth r3, r0 8006586: 429a cmp r2, r3 8006588: d900 bls.n 800658c 800658a: 1c01 adds r1, r0, #0 800658c: b28a uxth r2, r1 800658e: 2108 movs r1, #8 8006590: 187b adds r3, r7, r1 8006592: 801a strh r2, [r3, #0] (void)USBD_CtlSendData(pdev, pbuf, len); 8006594: 187b adds r3, r7, r1 8006596: 881a ldrh r2, [r3, #0] 8006598: 68f9 ldr r1, [r7, #12] 800659a: 687b ldr r3, [r7, #4] 800659c: 0018 movs r0, r3 800659e: f000 fa70 bl 8006a82 } if (req->wLength == 0U) 80065a2: 683b ldr r3, [r7, #0] 80065a4: 88db ldrh r3, [r3, #6] 80065a6: 2b00 cmp r3, #0 80065a8: d105 bne.n 80065b6 { (void)USBD_CtlSendStatus(pdev); 80065aa: 687b ldr r3, [r7, #4] 80065ac: 0018 movs r0, r3 80065ae: f000 faae bl 8006b0e 80065b2: e000 b.n 80065b6 return; 80065b4: 46c0 nop @ (mov r8, r8) } } } 80065b6: 46bd mov sp, r7 80065b8: b004 add sp, #16 80065ba: bd80 pop {r7, pc} 80065bc: 08007574 .word 0x08007574 80065c0: 08007594 .word 0x08007594 080065c4 : * @param req: usb request * @retval status */ static void USBD_SetAddress(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 80065c4: b590 push {r4, r7, lr} 80065c6: b085 sub sp, #20 80065c8: af00 add r7, sp, #0 80065ca: 6078 str r0, [r7, #4] 80065cc: 6039 str r1, [r7, #0] uint8_t dev_addr; if ((req->wIndex == 0U) && (req->wLength == 0U) && (req->wValue < 128U)) 80065ce: 683b ldr r3, [r7, #0] 80065d0: 889b ldrh r3, [r3, #4] 80065d2: 2b00 cmp r3, #0 80065d4: d13d bne.n 8006652 80065d6: 683b ldr r3, [r7, #0] 80065d8: 88db ldrh r3, [r3, #6] 80065da: 2b00 cmp r3, #0 80065dc: d139 bne.n 8006652 80065de: 683b ldr r3, [r7, #0] 80065e0: 885b ldrh r3, [r3, #2] 80065e2: 2b7f cmp r3, #127 @ 0x7f 80065e4: d835 bhi.n 8006652 { dev_addr = (uint8_t)(req->wValue) & 0x7FU; 80065e6: 683b ldr r3, [r7, #0] 80065e8: 885b ldrh r3, [r3, #2] 80065ea: b2da uxtb r2, r3 80065ec: 230f movs r3, #15 80065ee: 18fb adds r3, r7, r3 80065f0: 217f movs r1, #127 @ 0x7f 80065f2: 400a ands r2, r1 80065f4: 701a strb r2, [r3, #0] if (pdev->dev_state == USBD_STATE_CONFIGURED) 80065f6: 687a ldr r2, [r7, #4] 80065f8: 23a7 movs r3, #167 @ 0xa7 80065fa: 009b lsls r3, r3, #2 80065fc: 5cd3 ldrb r3, [r2, r3] 80065fe: 2b03 cmp r3, #3 8006600: d106 bne.n 8006610 { USBD_CtlError(pdev, req); 8006602: 683a ldr r2, [r7, #0] 8006604: 687b ldr r3, [r7, #4] 8006606: 0011 movs r1, r2 8006608: 0018 movs r0, r3 800660a: f000 f9bc bl 8006986 if (pdev->dev_state == USBD_STATE_CONFIGURED) 800660e: e027 b.n 8006660 } else { pdev->dev_address = dev_addr; 8006610: 687b ldr r3, [r7, #4] 8006612: 240f movs r4, #15 8006614: 193a adds r2, r7, r4 8006616: 4914 ldr r1, [pc, #80] @ (8006668 ) 8006618: 7812 ldrb r2, [r2, #0] 800661a: 545a strb r2, [r3, r1] USBD_LL_SetUSBAddress(pdev, dev_addr); 800661c: 193b adds r3, r7, r4 800661e: 781a ldrb r2, [r3, #0] 8006620: 687b ldr r3, [r7, #4] 8006622: 0011 movs r1, r2 8006624: 0018 movs r0, r3 8006626: f000 fe38 bl 800729a USBD_CtlSendStatus(pdev); 800662a: 687b ldr r3, [r7, #4] 800662c: 0018 movs r0, r3 800662e: f000 fa6e bl 8006b0e if (dev_addr != 0U) 8006632: 193b adds r3, r7, r4 8006634: 781b ldrb r3, [r3, #0] 8006636: 2b00 cmp r3, #0 8006638: d005 beq.n 8006646 { pdev->dev_state = USBD_STATE_ADDRESSED; 800663a: 687a ldr r2, [r7, #4] 800663c: 23a7 movs r3, #167 @ 0xa7 800663e: 009b lsls r3, r3, #2 8006640: 2102 movs r1, #2 8006642: 54d1 strb r1, [r2, r3] if (pdev->dev_state == USBD_STATE_CONFIGURED) 8006644: e00c b.n 8006660 } else { pdev->dev_state = USBD_STATE_DEFAULT; 8006646: 687a ldr r2, [r7, #4] 8006648: 23a7 movs r3, #167 @ 0xa7 800664a: 009b lsls r3, r3, #2 800664c: 2101 movs r1, #1 800664e: 54d1 strb r1, [r2, r3] if (pdev->dev_state == USBD_STATE_CONFIGURED) 8006650: e006 b.n 8006660 } } } else { USBD_CtlError(pdev, req); 8006652: 683a ldr r2, [r7, #0] 8006654: 687b ldr r3, [r7, #4] 8006656: 0011 movs r1, r2 8006658: 0018 movs r0, r3 800665a: f000 f994 bl 8006986 } } 800665e: 46c0 nop @ (mov r8, r8) 8006660: 46c0 nop @ (mov r8, r8) 8006662: 46bd mov sp, r7 8006664: b005 add sp, #20 8006666: bd90 pop {r4, r7, pc} 8006668: 0000029e .word 0x0000029e 0800666c : * @param pdev: device instance * @param req: usb request * @retval status */ static void USBD_SetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 800666c: b580 push {r7, lr} 800666e: b082 sub sp, #8 8006670: af00 add r7, sp, #0 8006672: 6078 str r0, [r7, #4] 8006674: 6039 str r1, [r7, #0] static uint8_t cfgidx; cfgidx = (uint8_t)(req->wValue); 8006676: 683b ldr r3, [r7, #0] 8006678: 885b ldrh r3, [r3, #2] 800667a: b2da uxtb r2, r3 800667c: 4b4c ldr r3, [pc, #304] @ (80067b0 ) 800667e: 701a strb r2, [r3, #0] if (cfgidx > USBD_MAX_NUM_CONFIGURATION) 8006680: 4b4b ldr r3, [pc, #300] @ (80067b0 ) 8006682: 781b ldrb r3, [r3, #0] 8006684: 2b01 cmp r3, #1 8006686: d906 bls.n 8006696 { USBD_CtlError(pdev, req); 8006688: 683a ldr r2, [r7, #0] 800668a: 687b ldr r3, [r7, #4] 800668c: 0011 movs r1, r2 800668e: 0018 movs r0, r3 8006690: f000 f979 bl 8006986 8006694: e088 b.n 80067a8 } else { switch (pdev->dev_state) 8006696: 687a ldr r2, [r7, #4] 8006698: 23a7 movs r3, #167 @ 0xa7 800669a: 009b lsls r3, r3, #2 800669c: 5cd3 ldrb r3, [r2, r3] 800669e: 2b02 cmp r3, #2 80066a0: d002 beq.n 80066a8 80066a2: 2b03 cmp r3, #3 80066a4: d029 beq.n 80066fa 80066a6: e071 b.n 800678c { case USBD_STATE_ADDRESSED: if (cfgidx) 80066a8: 4b41 ldr r3, [pc, #260] @ (80067b0 ) 80066aa: 781b ldrb r3, [r3, #0] 80066ac: 2b00 cmp r3, #0 80066ae: d01f beq.n 80066f0 { pdev->dev_config = cfgidx; 80066b0: 4b3f ldr r3, [pc, #252] @ (80067b0 ) 80066b2: 781b ldrb r3, [r3, #0] 80066b4: 001a movs r2, r3 80066b6: 687b ldr r3, [r7, #4] 80066b8: 605a str r2, [r3, #4] pdev->dev_state = USBD_STATE_CONFIGURED; 80066ba: 687a ldr r2, [r7, #4] 80066bc: 23a7 movs r3, #167 @ 0xa7 80066be: 009b lsls r3, r3, #2 80066c0: 2103 movs r1, #3 80066c2: 54d1 strb r1, [r2, r3] if (USBD_SetClassConfig(pdev, cfgidx) == USBD_FAIL) 80066c4: 4b3a ldr r3, [pc, #232] @ (80067b0 ) 80066c6: 781a ldrb r2, [r3, #0] 80066c8: 687b ldr r3, [r7, #4] 80066ca: 0011 movs r1, r2 80066cc: 0018 movs r0, r3 80066ce: f7ff f8c6 bl 800585e 80066d2: 0003 movs r3, r0 80066d4: 2b02 cmp r3, #2 80066d6: d106 bne.n 80066e6 { USBD_CtlError(pdev, req); 80066d8: 683a ldr r2, [r7, #0] 80066da: 687b ldr r3, [r7, #4] 80066dc: 0011 movs r1, r2 80066de: 0018 movs r0, r3 80066e0: f000 f951 bl 8006986 return; 80066e4: e060 b.n 80067a8 } USBD_CtlSendStatus(pdev); 80066e6: 687b ldr r3, [r7, #4] 80066e8: 0018 movs r0, r3 80066ea: f000 fa10 bl 8006b0e } else { USBD_CtlSendStatus(pdev); } break; 80066ee: e05b b.n 80067a8 USBD_CtlSendStatus(pdev); 80066f0: 687b ldr r3, [r7, #4] 80066f2: 0018 movs r0, r3 80066f4: f000 fa0b bl 8006b0e break; 80066f8: e056 b.n 80067a8 case USBD_STATE_CONFIGURED: if (cfgidx == 0U) 80066fa: 4b2d ldr r3, [pc, #180] @ (80067b0 ) 80066fc: 781b ldrb r3, [r3, #0] 80066fe: 2b00 cmp r3, #0 8006700: d115 bne.n 800672e { pdev->dev_state = USBD_STATE_ADDRESSED; 8006702: 687a ldr r2, [r7, #4] 8006704: 23a7 movs r3, #167 @ 0xa7 8006706: 009b lsls r3, r3, #2 8006708: 2102 movs r1, #2 800670a: 54d1 strb r1, [r2, r3] pdev->dev_config = cfgidx; 800670c: 4b28 ldr r3, [pc, #160] @ (80067b0 ) 800670e: 781b ldrb r3, [r3, #0] 8006710: 001a movs r2, r3 8006712: 687b ldr r3, [r7, #4] 8006714: 605a str r2, [r3, #4] USBD_ClrClassConfig(pdev, cfgidx); 8006716: 4b26 ldr r3, [pc, #152] @ (80067b0 ) 8006718: 781a ldrb r2, [r3, #0] 800671a: 687b ldr r3, [r7, #4] 800671c: 0011 movs r1, r2 800671e: 0018 movs r0, r3 8006720: f7ff f8c4 bl 80058ac USBD_CtlSendStatus(pdev); 8006724: 687b ldr r3, [r7, #4] 8006726: 0018 movs r0, r3 8006728: f000 f9f1 bl 8006b0e } else { USBD_CtlSendStatus(pdev); } break; 800672c: e03c b.n 80067a8 else if (cfgidx != pdev->dev_config) 800672e: 4b20 ldr r3, [pc, #128] @ (80067b0 ) 8006730: 781b ldrb r3, [r3, #0] 8006732: 001a movs r2, r3 8006734: 687b ldr r3, [r7, #4] 8006736: 685b ldr r3, [r3, #4] 8006738: 429a cmp r2, r3 800673a: d022 beq.n 8006782 USBD_ClrClassConfig(pdev, (uint8_t)pdev->dev_config); 800673c: 687b ldr r3, [r7, #4] 800673e: 685b ldr r3, [r3, #4] 8006740: b2da uxtb r2, r3 8006742: 687b ldr r3, [r7, #4] 8006744: 0011 movs r1, r2 8006746: 0018 movs r0, r3 8006748: f7ff f8b0 bl 80058ac pdev->dev_config = cfgidx; 800674c: 4b18 ldr r3, [pc, #96] @ (80067b0 ) 800674e: 781b ldrb r3, [r3, #0] 8006750: 001a movs r2, r3 8006752: 687b ldr r3, [r7, #4] 8006754: 605a str r2, [r3, #4] if (USBD_SetClassConfig(pdev, cfgidx) == USBD_FAIL) 8006756: 4b16 ldr r3, [pc, #88] @ (80067b0 ) 8006758: 781a ldrb r2, [r3, #0] 800675a: 687b ldr r3, [r7, #4] 800675c: 0011 movs r1, r2 800675e: 0018 movs r0, r3 8006760: f7ff f87d bl 800585e 8006764: 0003 movs r3, r0 8006766: 2b02 cmp r3, #2 8006768: d106 bne.n 8006778 USBD_CtlError(pdev, req); 800676a: 683a ldr r2, [r7, #0] 800676c: 687b ldr r3, [r7, #4] 800676e: 0011 movs r1, r2 8006770: 0018 movs r0, r3 8006772: f000 f908 bl 8006986 return; 8006776: e017 b.n 80067a8 USBD_CtlSendStatus(pdev); 8006778: 687b ldr r3, [r7, #4] 800677a: 0018 movs r0, r3 800677c: f000 f9c7 bl 8006b0e break; 8006780: e012 b.n 80067a8 USBD_CtlSendStatus(pdev); 8006782: 687b ldr r3, [r7, #4] 8006784: 0018 movs r0, r3 8006786: f000 f9c2 bl 8006b0e break; 800678a: e00d b.n 80067a8 default: USBD_CtlError(pdev, req); 800678c: 683a ldr r2, [r7, #0] 800678e: 687b ldr r3, [r7, #4] 8006790: 0011 movs r1, r2 8006792: 0018 movs r0, r3 8006794: f000 f8f7 bl 8006986 USBD_ClrClassConfig(pdev, cfgidx); 8006798: 4b05 ldr r3, [pc, #20] @ (80067b0 ) 800679a: 781a ldrb r2, [r3, #0] 800679c: 687b ldr r3, [r7, #4] 800679e: 0011 movs r1, r2 80067a0: 0018 movs r0, r3 80067a2: f7ff f883 bl 80058ac break; 80067a6: 46c0 nop @ (mov r8, r8) } } } 80067a8: 46bd mov sp, r7 80067aa: b002 add sp, #8 80067ac: bd80 pop {r7, pc} 80067ae: 46c0 nop @ (mov r8, r8) 80067b0: 2000019c .word 0x2000019c 080067b4 : * @param pdev: device instance * @param req: usb request * @retval status */ static void USBD_GetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 80067b4: b580 push {r7, lr} 80067b6: b082 sub sp, #8 80067b8: af00 add r7, sp, #0 80067ba: 6078 str r0, [r7, #4] 80067bc: 6039 str r1, [r7, #0] if (req->wLength != 1U) 80067be: 683b ldr r3, [r7, #0] 80067c0: 88db ldrh r3, [r3, #6] 80067c2: 2b01 cmp r3, #1 80067c4: d006 beq.n 80067d4 { USBD_CtlError(pdev, req); 80067c6: 683a ldr r2, [r7, #0] 80067c8: 687b ldr r3, [r7, #4] 80067ca: 0011 movs r1, r2 80067cc: 0018 movs r0, r3 80067ce: f000 f8da bl 8006986 default: USBD_CtlError(pdev, req); break; } } } 80067d2: e026 b.n 8006822 switch (pdev->dev_state) 80067d4: 687a ldr r2, [r7, #4] 80067d6: 23a7 movs r3, #167 @ 0xa7 80067d8: 009b lsls r3, r3, #2 80067da: 5cd3 ldrb r3, [r2, r3] 80067dc: 2b02 cmp r3, #2 80067de: dc02 bgt.n 80067e6 80067e0: 2b00 cmp r3, #0 80067e2: dc03 bgt.n 80067ec 80067e4: e016 b.n 8006814 80067e6: 2b03 cmp r3, #3 80067e8: d00c beq.n 8006804 80067ea: e013 b.n 8006814 pdev->dev_default_config = 0U; 80067ec: 687b ldr r3, [r7, #4] 80067ee: 2200 movs r2, #0 80067f0: 609a str r2, [r3, #8] USBD_CtlSendData(pdev, (uint8_t *)(void *)&pdev->dev_default_config, 1U); 80067f2: 687b ldr r3, [r7, #4] 80067f4: 3308 adds r3, #8 80067f6: 0019 movs r1, r3 80067f8: 687b ldr r3, [r7, #4] 80067fa: 2201 movs r2, #1 80067fc: 0018 movs r0, r3 80067fe: f000 f940 bl 8006a82 break; 8006802: e00e b.n 8006822 USBD_CtlSendData(pdev, (uint8_t *)(void *)&pdev->dev_config, 1U); 8006804: 687b ldr r3, [r7, #4] 8006806: 1d19 adds r1, r3, #4 8006808: 687b ldr r3, [r7, #4] 800680a: 2201 movs r2, #1 800680c: 0018 movs r0, r3 800680e: f000 f938 bl 8006a82 break; 8006812: e006 b.n 8006822 USBD_CtlError(pdev, req); 8006814: 683a ldr r2, [r7, #0] 8006816: 687b ldr r3, [r7, #4] 8006818: 0011 movs r1, r2 800681a: 0018 movs r0, r3 800681c: f000 f8b3 bl 8006986 break; 8006820: 46c0 nop @ (mov r8, r8) } 8006822: 46c0 nop @ (mov r8, r8) 8006824: 46bd mov sp, r7 8006826: b002 add sp, #8 8006828: bd80 pop {r7, pc} 0800682a : * @param pdev: device instance * @param req: usb request * @retval status */ static void USBD_GetStatus(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 800682a: b580 push {r7, lr} 800682c: b082 sub sp, #8 800682e: af00 add r7, sp, #0 8006830: 6078 str r0, [r7, #4] 8006832: 6039 str r1, [r7, #0] switch (pdev->dev_state) 8006834: 687a ldr r2, [r7, #4] 8006836: 23a7 movs r3, #167 @ 0xa7 8006838: 009b lsls r3, r3, #2 800683a: 5cd3 ldrb r3, [r2, r3] 800683c: 3b01 subs r3, #1 800683e: 2b02 cmp r3, #2 8006840: d822 bhi.n 8006888 { case USBD_STATE_DEFAULT: case USBD_STATE_ADDRESSED: case USBD_STATE_CONFIGURED: if (req->wLength != 0x2U) 8006842: 683b ldr r3, [r7, #0] 8006844: 88db ldrh r3, [r3, #6] 8006846: 2b02 cmp r3, #2 8006848: d006 beq.n 8006858 { USBD_CtlError(pdev, req); 800684a: 683a ldr r2, [r7, #0] 800684c: 687b ldr r3, [r7, #4] 800684e: 0011 movs r1, r2 8006850: 0018 movs r0, r3 8006852: f000 f898 bl 8006986 break; 8006856: e01e b.n 8006896 } #if (USBD_SELF_POWERED == 1U) pdev->dev_config_status = USB_CONFIG_SELF_POWERED; 8006858: 687b ldr r3, [r7, #4] 800685a: 2201 movs r2, #1 800685c: 60da str r2, [r3, #12] #else pdev->dev_config_status = 0U; #endif if (pdev->dev_remote_wakeup) 800685e: 687a ldr r2, [r7, #4] 8006860: 23a9 movs r3, #169 @ 0xa9 8006862: 009b lsls r3, r3, #2 8006864: 58d3 ldr r3, [r2, r3] 8006866: 2b00 cmp r3, #0 8006868: d005 beq.n 8006876 { pdev->dev_config_status |= USB_CONFIG_REMOTE_WAKEUP; 800686a: 687b ldr r3, [r7, #4] 800686c: 68db ldr r3, [r3, #12] 800686e: 2202 movs r2, #2 8006870: 431a orrs r2, r3 8006872: 687b ldr r3, [r7, #4] 8006874: 60da str r2, [r3, #12] } USBD_CtlSendData(pdev, (uint8_t *)(void *)&pdev->dev_config_status, 2U); 8006876: 687b ldr r3, [r7, #4] 8006878: 330c adds r3, #12 800687a: 0019 movs r1, r3 800687c: 687b ldr r3, [r7, #4] 800687e: 2202 movs r2, #2 8006880: 0018 movs r0, r3 8006882: f000 f8fe bl 8006a82 break; 8006886: e006 b.n 8006896 default: USBD_CtlError(pdev, req); 8006888: 683a ldr r2, [r7, #0] 800688a: 687b ldr r3, [r7, #4] 800688c: 0011 movs r1, r2 800688e: 0018 movs r0, r3 8006890: f000 f879 bl 8006986 break; 8006894: 46c0 nop @ (mov r8, r8) } } 8006896: 46c0 nop @ (mov r8, r8) 8006898: 46bd mov sp, r7 800689a: b002 add sp, #8 800689c: bd80 pop {r7, pc} 0800689e : * @param req: usb request * @retval status */ static void USBD_SetFeature(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 800689e: b580 push {r7, lr} 80068a0: b082 sub sp, #8 80068a2: af00 add r7, sp, #0 80068a4: 6078 str r0, [r7, #4] 80068a6: 6039 str r1, [r7, #0] if (req->wValue == USB_FEATURE_REMOTE_WAKEUP) 80068a8: 683b ldr r3, [r7, #0] 80068aa: 885b ldrh r3, [r3, #2] 80068ac: 2b01 cmp r3, #1 80068ae: d108 bne.n 80068c2 { pdev->dev_remote_wakeup = 1U; 80068b0: 687a ldr r2, [r7, #4] 80068b2: 23a9 movs r3, #169 @ 0xa9 80068b4: 009b lsls r3, r3, #2 80068b6: 2101 movs r1, #1 80068b8: 50d1 str r1, [r2, r3] USBD_CtlSendStatus(pdev); 80068ba: 687b ldr r3, [r7, #4] 80068bc: 0018 movs r0, r3 80068be: f000 f926 bl 8006b0e } } 80068c2: 46c0 nop @ (mov r8, r8) 80068c4: 46bd mov sp, r7 80068c6: b002 add sp, #8 80068c8: bd80 pop {r7, pc} 080068ca : * @param req: usb request * @retval status */ static void USBD_ClrFeature(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 80068ca: b580 push {r7, lr} 80068cc: b082 sub sp, #8 80068ce: af00 add r7, sp, #0 80068d0: 6078 str r0, [r7, #4] 80068d2: 6039 str r1, [r7, #0] switch (pdev->dev_state) 80068d4: 687a ldr r2, [r7, #4] 80068d6: 23a7 movs r3, #167 @ 0xa7 80068d8: 009b lsls r3, r3, #2 80068da: 5cd3 ldrb r3, [r2, r3] 80068dc: 3b01 subs r3, #1 80068de: 2b02 cmp r3, #2 80068e0: d80d bhi.n 80068fe { case USBD_STATE_DEFAULT: case USBD_STATE_ADDRESSED: case USBD_STATE_CONFIGURED: if (req->wValue == USB_FEATURE_REMOTE_WAKEUP) 80068e2: 683b ldr r3, [r7, #0] 80068e4: 885b ldrh r3, [r3, #2] 80068e6: 2b01 cmp r3, #1 80068e8: d110 bne.n 800690c { pdev->dev_remote_wakeup = 0U; 80068ea: 687a ldr r2, [r7, #4] 80068ec: 23a9 movs r3, #169 @ 0xa9 80068ee: 009b lsls r3, r3, #2 80068f0: 2100 movs r1, #0 80068f2: 50d1 str r1, [r2, r3] USBD_CtlSendStatus(pdev); 80068f4: 687b ldr r3, [r7, #4] 80068f6: 0018 movs r0, r3 80068f8: f000 f909 bl 8006b0e } break; 80068fc: e006 b.n 800690c default: USBD_CtlError(pdev, req); 80068fe: 683a ldr r2, [r7, #0] 8006900: 687b ldr r3, [r7, #4] 8006902: 0011 movs r1, r2 8006904: 0018 movs r0, r3 8006906: f000 f83e bl 8006986 break; 800690a: e000 b.n 800690e break; 800690c: 46c0 nop @ (mov r8, r8) } } 800690e: 46c0 nop @ (mov r8, r8) 8006910: 46bd mov sp, r7 8006912: b002 add sp, #8 8006914: bd80 pop {r7, pc} 08006916 : * @param req: usb request * @retval None */ void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata) { 8006916: b580 push {r7, lr} 8006918: b082 sub sp, #8 800691a: af00 add r7, sp, #0 800691c: 6078 str r0, [r7, #4] 800691e: 6039 str r1, [r7, #0] req->bmRequest = *(uint8_t *)(pdata); 8006920: 683b ldr r3, [r7, #0] 8006922: 781a ldrb r2, [r3, #0] 8006924: 687b ldr r3, [r7, #4] 8006926: 701a strb r2, [r3, #0] req->bRequest = *(uint8_t *)(pdata + 1U); 8006928: 683b ldr r3, [r7, #0] 800692a: 785a ldrb r2, [r3, #1] 800692c: 687b ldr r3, [r7, #4] 800692e: 705a strb r2, [r3, #1] req->wValue = SWAPBYTE(pdata + 2U); 8006930: 683b ldr r3, [r7, #0] 8006932: 3302 adds r3, #2 8006934: 781b ldrb r3, [r3, #0] 8006936: 001a movs r2, r3 8006938: 683b ldr r3, [r7, #0] 800693a: 3303 adds r3, #3 800693c: 781b ldrb r3, [r3, #0] 800693e: 021b lsls r3, r3, #8 8006940: b29b uxth r3, r3 8006942: 18d3 adds r3, r2, r3 8006944: b29a uxth r2, r3 8006946: 687b ldr r3, [r7, #4] 8006948: 805a strh r2, [r3, #2] req->wIndex = SWAPBYTE(pdata + 4U); 800694a: 683b ldr r3, [r7, #0] 800694c: 3304 adds r3, #4 800694e: 781b ldrb r3, [r3, #0] 8006950: 001a movs r2, r3 8006952: 683b ldr r3, [r7, #0] 8006954: 3305 adds r3, #5 8006956: 781b ldrb r3, [r3, #0] 8006958: 021b lsls r3, r3, #8 800695a: b29b uxth r3, r3 800695c: 18d3 adds r3, r2, r3 800695e: b29a uxth r2, r3 8006960: 687b ldr r3, [r7, #4] 8006962: 809a strh r2, [r3, #4] req->wLength = SWAPBYTE(pdata + 6U); 8006964: 683b ldr r3, [r7, #0] 8006966: 3306 adds r3, #6 8006968: 781b ldrb r3, [r3, #0] 800696a: 001a movs r2, r3 800696c: 683b ldr r3, [r7, #0] 800696e: 3307 adds r3, #7 8006970: 781b ldrb r3, [r3, #0] 8006972: 021b lsls r3, r3, #8 8006974: b29b uxth r3, r3 8006976: 18d3 adds r3, r2, r3 8006978: b29a uxth r2, r3 800697a: 687b ldr r3, [r7, #4] 800697c: 80da strh r2, [r3, #6] } 800697e: 46c0 nop @ (mov r8, r8) 8006980: 46bd mov sp, r7 8006982: b002 add sp, #8 8006984: bd80 pop {r7, pc} 08006986 : * @retval None */ void USBD_CtlError(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8006986: b580 push {r7, lr} 8006988: b082 sub sp, #8 800698a: af00 add r7, sp, #0 800698c: 6078 str r0, [r7, #4] 800698e: 6039 str r1, [r7, #0] USBD_LL_StallEP(pdev, 0x80U); 8006990: 687b ldr r3, [r7, #4] 8006992: 2180 movs r1, #128 @ 0x80 8006994: 0018 movs r0, r3 8006996: f000 fbfa bl 800718e USBD_LL_StallEP(pdev, 0U); 800699a: 687b ldr r3, [r7, #4] 800699c: 2100 movs r1, #0 800699e: 0018 movs r0, r3 80069a0: f000 fbf5 bl 800718e } 80069a4: 46c0 nop @ (mov r8, r8) 80069a6: 46bd mov sp, r7 80069a8: b002 add sp, #8 80069aa: bd80 pop {r7, pc} 080069ac : * @param unicode : Formatted string buffer (unicode) * @param len : descriptor length * @retval None */ void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len) { 80069ac: b590 push {r4, r7, lr} 80069ae: b087 sub sp, #28 80069b0: af00 add r7, sp, #0 80069b2: 60f8 str r0, [r7, #12] 80069b4: 60b9 str r1, [r7, #8] 80069b6: 607a str r2, [r7, #4] uint8_t idx = 0U; 80069b8: 2417 movs r4, #23 80069ba: 193b adds r3, r7, r4 80069bc: 2200 movs r2, #0 80069be: 701a strb r2, [r3, #0] if (desc != NULL) 80069c0: 68fb ldr r3, [r7, #12] 80069c2: 2b00 cmp r3, #0 80069c4: d03c beq.n 8006a40 { *len = (uint16_t)USBD_GetLen(desc) * 2U + 2U; 80069c6: 68fb ldr r3, [r7, #12] 80069c8: 0018 movs r0, r3 80069ca: f000 f83d bl 8006a48 80069ce: 0003 movs r3, r0 80069d0: 3301 adds r3, #1 80069d2: b29b uxth r3, r3 80069d4: 18db adds r3, r3, r3 80069d6: b29a uxth r2, r3 80069d8: 687b ldr r3, [r7, #4] 80069da: 801a strh r2, [r3, #0] unicode[idx++] = *(uint8_t *)(void *)len; 80069dc: 193b adds r3, r7, r4 80069de: 781b ldrb r3, [r3, #0] 80069e0: 193a adds r2, r7, r4 80069e2: 1c59 adds r1, r3, #1 80069e4: 7011 strb r1, [r2, #0] 80069e6: 001a movs r2, r3 80069e8: 68bb ldr r3, [r7, #8] 80069ea: 189b adds r3, r3, r2 80069ec: 687a ldr r2, [r7, #4] 80069ee: 7812 ldrb r2, [r2, #0] 80069f0: 701a strb r2, [r3, #0] unicode[idx++] = USB_DESC_TYPE_STRING; 80069f2: 193b adds r3, r7, r4 80069f4: 781b ldrb r3, [r3, #0] 80069f6: 193a adds r2, r7, r4 80069f8: 1c59 adds r1, r3, #1 80069fa: 7011 strb r1, [r2, #0] 80069fc: 001a movs r2, r3 80069fe: 68bb ldr r3, [r7, #8] 8006a00: 189b adds r3, r3, r2 8006a02: 2203 movs r2, #3 8006a04: 701a strb r2, [r3, #0] while (*desc != '\0') 8006a06: e017 b.n 8006a38 { unicode[idx++] = *desc++; 8006a08: 68fb ldr r3, [r7, #12] 8006a0a: 1c5a adds r2, r3, #1 8006a0c: 60fa str r2, [r7, #12] 8006a0e: 2417 movs r4, #23 8006a10: 193a adds r2, r7, r4 8006a12: 7812 ldrb r2, [r2, #0] 8006a14: 1939 adds r1, r7, r4 8006a16: 1c50 adds r0, r2, #1 8006a18: 7008 strb r0, [r1, #0] 8006a1a: 0011 movs r1, r2 8006a1c: 68ba ldr r2, [r7, #8] 8006a1e: 1852 adds r2, r2, r1 8006a20: 781b ldrb r3, [r3, #0] 8006a22: 7013 strb r3, [r2, #0] unicode[idx++] = 0U; 8006a24: 193b adds r3, r7, r4 8006a26: 781b ldrb r3, [r3, #0] 8006a28: 193a adds r2, r7, r4 8006a2a: 1c59 adds r1, r3, #1 8006a2c: 7011 strb r1, [r2, #0] 8006a2e: 001a movs r2, r3 8006a30: 68bb ldr r3, [r7, #8] 8006a32: 189b adds r3, r3, r2 8006a34: 2200 movs r2, #0 8006a36: 701a strb r2, [r3, #0] while (*desc != '\0') 8006a38: 68fb ldr r3, [r7, #12] 8006a3a: 781b ldrb r3, [r3, #0] 8006a3c: 2b00 cmp r3, #0 8006a3e: d1e3 bne.n 8006a08 } } } 8006a40: 46c0 nop @ (mov r8, r8) 8006a42: 46bd mov sp, r7 8006a44: b007 add sp, #28 8006a46: bd90 pop {r4, r7, pc} 08006a48 : * return the string length * @param buf : pointer to the ascii string buffer * @retval string length */ static uint8_t USBD_GetLen(uint8_t *buf) { 8006a48: b580 push {r7, lr} 8006a4a: b084 sub sp, #16 8006a4c: af00 add r7, sp, #0 8006a4e: 6078 str r0, [r7, #4] uint8_t len = 0U; 8006a50: 230f movs r3, #15 8006a52: 18fb adds r3, r7, r3 8006a54: 2200 movs r2, #0 8006a56: 701a strb r2, [r3, #0] while (*buf != '\0') 8006a58: e008 b.n 8006a6c { len++; 8006a5a: 210f movs r1, #15 8006a5c: 187b adds r3, r7, r1 8006a5e: 781a ldrb r2, [r3, #0] 8006a60: 187b adds r3, r7, r1 8006a62: 3201 adds r2, #1 8006a64: 701a strb r2, [r3, #0] buf++; 8006a66: 687b ldr r3, [r7, #4] 8006a68: 3301 adds r3, #1 8006a6a: 607b str r3, [r7, #4] while (*buf != '\0') 8006a6c: 687b ldr r3, [r7, #4] 8006a6e: 781b ldrb r3, [r3, #0] 8006a70: 2b00 cmp r3, #0 8006a72: d1f2 bne.n 8006a5a } return len; 8006a74: 230f movs r3, #15 8006a76: 18fb adds r3, r7, r3 8006a78: 781b ldrb r3, [r3, #0] } 8006a7a: 0018 movs r0, r3 8006a7c: 46bd mov sp, r7 8006a7e: b004 add sp, #16 8006a80: bd80 pop {r7, pc} 08006a82 : * @param len: length of data to be sent * @retval status */ USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev, uint8_t *pbuf, uint16_t len) { 8006a82: b580 push {r7, lr} 8006a84: b084 sub sp, #16 8006a86: af00 add r7, sp, #0 8006a88: 60f8 str r0, [r7, #12] 8006a8a: 60b9 str r1, [r7, #8] 8006a8c: 1dbb adds r3, r7, #6 8006a8e: 801a strh r2, [r3, #0] /* Set EP0 State */ pdev->ep0_state = USBD_EP0_DATA_IN; 8006a90: 68fa ldr r2, [r7, #12] 8006a92: 23a5 movs r3, #165 @ 0xa5 8006a94: 009b lsls r3, r3, #2 8006a96: 2102 movs r1, #2 8006a98: 50d1 str r1, [r2, r3] pdev->ep_in[0].total_length = len; 8006a9a: 1dbb adds r3, r7, #6 8006a9c: 881a ldrh r2, [r3, #0] 8006a9e: 68fb ldr r3, [r7, #12] 8006aa0: 61da str r2, [r3, #28] pdev->ep_in[0].rem_length = len; 8006aa2: 1dbb adds r3, r7, #6 8006aa4: 881a ldrh r2, [r3, #0] 8006aa6: 68fb ldr r3, [r7, #12] 8006aa8: 621a str r2, [r3, #32] /* Start the transfer */ USBD_LL_Transmit(pdev, 0x00U, pbuf, len); 8006aaa: 1dbb adds r3, r7, #6 8006aac: 881b ldrh r3, [r3, #0] 8006aae: 68ba ldr r2, [r7, #8] 8006ab0: 68f8 ldr r0, [r7, #12] 8006ab2: 2100 movs r1, #0 8006ab4: f000 fc1c bl 80072f0 return USBD_OK; 8006ab8: 2300 movs r3, #0 } 8006aba: 0018 movs r0, r3 8006abc: 46bd mov sp, r7 8006abe: b004 add sp, #16 8006ac0: bd80 pop {r7, pc} 08006ac2 : * @param len: length of data to be sent * @retval status */ USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev, uint8_t *pbuf, uint16_t len) { 8006ac2: b580 push {r7, lr} 8006ac4: b084 sub sp, #16 8006ac6: af00 add r7, sp, #0 8006ac8: 60f8 str r0, [r7, #12] 8006aca: 60b9 str r1, [r7, #8] 8006acc: 1dbb adds r3, r7, #6 8006ace: 801a strh r2, [r3, #0] /* Start the next transfer */ USBD_LL_Transmit(pdev, 0x00U, pbuf, len); 8006ad0: 1dbb adds r3, r7, #6 8006ad2: 881b ldrh r3, [r3, #0] 8006ad4: 68ba ldr r2, [r7, #8] 8006ad6: 68f8 ldr r0, [r7, #12] 8006ad8: 2100 movs r1, #0 8006ada: f000 fc09 bl 80072f0 return USBD_OK; 8006ade: 2300 movs r3, #0 } 8006ae0: 0018 movs r0, r3 8006ae2: 46bd mov sp, r7 8006ae4: b004 add sp, #16 8006ae6: bd80 pop {r7, pc} 08006ae8 : * @param len: length of data to be received * @retval status */ USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev, uint8_t *pbuf, uint16_t len) { 8006ae8: b580 push {r7, lr} 8006aea: b084 sub sp, #16 8006aec: af00 add r7, sp, #0 8006aee: 60f8 str r0, [r7, #12] 8006af0: 60b9 str r1, [r7, #8] 8006af2: 1dbb adds r3, r7, #6 8006af4: 801a strh r2, [r3, #0] USBD_LL_PrepareReceive(pdev, 0U, pbuf, len); 8006af6: 1dbb adds r3, r7, #6 8006af8: 881b ldrh r3, [r3, #0] 8006afa: 68ba ldr r2, [r7, #8] 8006afc: 68f8 ldr r0, [r7, #12] 8006afe: 2100 movs r1, #0 8006b00: f000 fc2d bl 800735e return USBD_OK; 8006b04: 2300 movs r3, #0 } 8006b06: 0018 movs r0, r3 8006b08: 46bd mov sp, r7 8006b0a: b004 add sp, #16 8006b0c: bd80 pop {r7, pc} 08006b0e : * send zero lzngth packet on the ctl pipe * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev) { 8006b0e: b580 push {r7, lr} 8006b10: b082 sub sp, #8 8006b12: af00 add r7, sp, #0 8006b14: 6078 str r0, [r7, #4] /* Set EP0 State */ pdev->ep0_state = USBD_EP0_STATUS_IN; 8006b16: 687a ldr r2, [r7, #4] 8006b18: 23a5 movs r3, #165 @ 0xa5 8006b1a: 009b lsls r3, r3, #2 8006b1c: 2104 movs r1, #4 8006b1e: 50d1 str r1, [r2, r3] /* Start the transfer */ USBD_LL_Transmit(pdev, 0x00U, NULL, 0U); 8006b20: 6878 ldr r0, [r7, #4] 8006b22: 2300 movs r3, #0 8006b24: 2200 movs r2, #0 8006b26: 2100 movs r1, #0 8006b28: f000 fbe2 bl 80072f0 return USBD_OK; 8006b2c: 2300 movs r3, #0 } 8006b2e: 0018 movs r0, r3 8006b30: 46bd mov sp, r7 8006b32: b002 add sp, #8 8006b34: bd80 pop {r7, pc} 08006b36 : * receive zero lzngth packet on the ctl pipe * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev) { 8006b36: b580 push {r7, lr} 8006b38: b082 sub sp, #8 8006b3a: af00 add r7, sp, #0 8006b3c: 6078 str r0, [r7, #4] /* Set EP0 State */ pdev->ep0_state = USBD_EP0_STATUS_OUT; 8006b3e: 687a ldr r2, [r7, #4] 8006b40: 23a5 movs r3, #165 @ 0xa5 8006b42: 009b lsls r3, r3, #2 8006b44: 2105 movs r1, #5 8006b46: 50d1 str r1, [r2, r3] /* Start the transfer */ USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U); 8006b48: 6878 ldr r0, [r7, #4] 8006b4a: 2300 movs r3, #0 8006b4c: 2200 movs r2, #0 8006b4e: 2100 movs r1, #0 8006b50: f000 fc05 bl 800735e return USBD_OK; 8006b54: 2300 movs r3, #0 } 8006b56: 0018 movs r0, r3 8006b58: 46bd mov sp, r7 8006b5a: b002 add sp, #8 8006b5c: bd80 pop {r7, pc} ... 08006b60 : /** * Init USB device Library, add supported class and start the library * @retval None */ void MX_USB_DEVICE_Init(void) { 8006b60: b580 push {r7, lr} 8006b62: af00 add r7, sp, #0 /* USER CODE BEGIN USB_DEVICE_Init_PreTreatment */ /* USER CODE END USB_DEVICE_Init_PreTreatment */ /* Init Device Library, add supported class and start the library. */ if (USBD_Init(&hUsbDeviceFS, &FS_Desc, DEVICE_FS) != USBD_OK) 8006b64: 490f ldr r1, [pc, #60] @ (8006ba4 ) 8006b66: 4b10 ldr r3, [pc, #64] @ (8006ba8 ) 8006b68: 2200 movs r2, #0 8006b6a: 0018 movs r0, r3 8006b6c: f7fe fe10 bl 8005790 8006b70: 1e03 subs r3, r0, #0 8006b72: d001 beq.n 8006b78 { Error_Handler(); 8006b74: f7f9 fc18 bl 80003a8 } if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_HID) != USBD_OK) 8006b78: 4a0c ldr r2, [pc, #48] @ (8006bac ) 8006b7a: 4b0b ldr r3, [pc, #44] @ (8006ba8 ) 8006b7c: 0011 movs r1, r2 8006b7e: 0018 movs r0, r3 8006b80: f7fe fe37 bl 80057f2 8006b84: 1e03 subs r3, r0, #0 8006b86: d001 beq.n 8006b8c { Error_Handler(); 8006b88: f7f9 fc0e bl 80003a8 } if (USBD_Start(&hUsbDeviceFS) != USBD_OK) 8006b8c: 4b06 ldr r3, [pc, #24] @ (8006ba8 ) 8006b8e: 0018 movs r0, r3 8006b90: f7fe fe4f bl 8005832 8006b94: 1e03 subs r3, r0, #0 8006b96: d001 beq.n 8006b9c { Error_Handler(); 8006b98: f7f9 fc06 bl 80003a8 } /* USER CODE BEGIN USB_DEVICE_Init_PostTreatment */ /* USER CODE END USB_DEVICE_Init_PostTreatment */ } 8006b9c: 46c0 nop @ (mov r8, r8) 8006b9e: 46bd mov sp, r7 8006ba0: bd80 pop {r7, pc} 8006ba2: 46c0 nop @ (mov r8, r8) 8006ba4: 20000120 .word 0x20000120 8006ba8: 200001a0 .word 0x200001a0 8006bac: 20000024 .word 0x20000024 08006bb0 : * @param speed : Current device speed * @param length : Pointer to data length variable * @retval Pointer to descriptor buffer */ uint8_t * USBD_FS_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) { 8006bb0: b580 push {r7, lr} 8006bb2: b082 sub sp, #8 8006bb4: af00 add r7, sp, #0 8006bb6: 0002 movs r2, r0 8006bb8: 6039 str r1, [r7, #0] 8006bba: 1dfb adds r3, r7, #7 8006bbc: 701a strb r2, [r3, #0] UNUSED(speed); *length = sizeof(USBD_FS_DeviceDesc); 8006bbe: 683b ldr r3, [r7, #0] 8006bc0: 2212 movs r2, #18 8006bc2: 801a strh r2, [r3, #0] return USBD_FS_DeviceDesc; 8006bc4: 4b02 ldr r3, [pc, #8] @ (8006bd0 ) } 8006bc6: 0018 movs r0, r3 8006bc8: 46bd mov sp, r7 8006bca: b002 add sp, #8 8006bcc: bd80 pop {r7, pc} 8006bce: 46c0 nop @ (mov r8, r8) 8006bd0: 2000013c .word 0x2000013c 08006bd4 : * @param speed : Current device speed * @param length : Pointer to data length variable * @retval Pointer to descriptor buffer */ uint8_t * USBD_FS_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) { 8006bd4: b580 push {r7, lr} 8006bd6: b082 sub sp, #8 8006bd8: af00 add r7, sp, #0 8006bda: 0002 movs r2, r0 8006bdc: 6039 str r1, [r7, #0] 8006bde: 1dfb adds r3, r7, #7 8006be0: 701a strb r2, [r3, #0] UNUSED(speed); *length = sizeof(USBD_LangIDDesc); 8006be2: 683b ldr r3, [r7, #0] 8006be4: 2204 movs r2, #4 8006be6: 801a strh r2, [r3, #0] return USBD_LangIDDesc; 8006be8: 4b02 ldr r3, [pc, #8] @ (8006bf4 ) } 8006bea: 0018 movs r0, r3 8006bec: 46bd mov sp, r7 8006bee: b002 add sp, #8 8006bf0: bd80 pop {r7, pc} 8006bf2: 46c0 nop @ (mov r8, r8) 8006bf4: 20000150 .word 0x20000150 08006bf8 : * @param speed : Current device speed * @param length : Pointer to data length variable * @retval Pointer to descriptor buffer */ uint8_t * USBD_FS_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) { 8006bf8: b580 push {r7, lr} 8006bfa: b082 sub sp, #8 8006bfc: af00 add r7, sp, #0 8006bfe: 0002 movs r2, r0 8006c00: 6039 str r1, [r7, #0] 8006c02: 1dfb adds r3, r7, #7 8006c04: 701a strb r2, [r3, #0] if(speed == 0) 8006c06: 1dfb adds r3, r7, #7 8006c08: 781b ldrb r3, [r3, #0] 8006c0a: 2b00 cmp r3, #0 8006c0c: d106 bne.n 8006c1c { USBD_GetString((uint8_t *)USBD_PRODUCT_STRING_FS, USBD_StrDesc, length); 8006c0e: 683a ldr r2, [r7, #0] 8006c10: 4908 ldr r1, [pc, #32] @ (8006c34 ) 8006c12: 4b09 ldr r3, [pc, #36] @ (8006c38 ) 8006c14: 0018 movs r0, r3 8006c16: f7ff fec9 bl 80069ac 8006c1a: e005 b.n 8006c28 } else { USBD_GetString((uint8_t *)USBD_PRODUCT_STRING_FS, USBD_StrDesc, length); 8006c1c: 683a ldr r2, [r7, #0] 8006c1e: 4905 ldr r1, [pc, #20] @ (8006c34 ) 8006c20: 4b05 ldr r3, [pc, #20] @ (8006c38 ) 8006c22: 0018 movs r0, r3 8006c24: f7ff fec2 bl 80069ac } return USBD_StrDesc; 8006c28: 4b02 ldr r3, [pc, #8] @ (8006c34 ) } 8006c2a: 0018 movs r0, r3 8006c2c: 46bd mov sp, r7 8006c2e: b002 add sp, #8 8006c30: bd80 pop {r7, pc} 8006c32: 46c0 nop @ (mov r8, r8) 8006c34: 20000464 .word 0x20000464 8006c38: 080074e0 .word 0x080074e0 08006c3c : * @param speed : Current device speed * @param length : Pointer to data length variable * @retval Pointer to descriptor buffer */ uint8_t * USBD_FS_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) { 8006c3c: b580 push {r7, lr} 8006c3e: b082 sub sp, #8 8006c40: af00 add r7, sp, #0 8006c42: 0002 movs r2, r0 8006c44: 6039 str r1, [r7, #0] 8006c46: 1dfb adds r3, r7, #7 8006c48: 701a strb r2, [r3, #0] UNUSED(speed); USBD_GetString((uint8_t *)USBD_MANUFACTURER_STRING, USBD_StrDesc, length); 8006c4a: 683a ldr r2, [r7, #0] 8006c4c: 4904 ldr r1, [pc, #16] @ (8006c60 ) 8006c4e: 4b05 ldr r3, [pc, #20] @ (8006c64 ) 8006c50: 0018 movs r0, r3 8006c52: f7ff feab bl 80069ac return USBD_StrDesc; 8006c56: 4b02 ldr r3, [pc, #8] @ (8006c60 ) } 8006c58: 0018 movs r0, r3 8006c5a: 46bd mov sp, r7 8006c5c: b002 add sp, #8 8006c5e: bd80 pop {r7, pc} 8006c60: 20000464 .word 0x20000464 8006c64: 080074f8 .word 0x080074f8 08006c68 : * @param speed : Current device speed * @param length : Pointer to data length variable * @retval Pointer to descriptor buffer */ uint8_t * USBD_FS_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) { 8006c68: b580 push {r7, lr} 8006c6a: b082 sub sp, #8 8006c6c: af00 add r7, sp, #0 8006c6e: 0002 movs r2, r0 8006c70: 6039 str r1, [r7, #0] 8006c72: 1dfb adds r3, r7, #7 8006c74: 701a strb r2, [r3, #0] UNUSED(speed); *length = USB_SIZ_STRING_SERIAL; 8006c76: 683b ldr r3, [r7, #0] 8006c78: 221a movs r2, #26 8006c7a: 801a strh r2, [r3, #0] /* Update the serial number string descriptor with the data from the unique * ID */ Get_SerialNum(); 8006c7c: f000 f84c bl 8006d18 /* USER CODE BEGIN USBD_FS_SerialStrDescriptor */ /* USER CODE END USBD_FS_SerialStrDescriptor */ return (uint8_t *) USBD_StringSerial; 8006c80: 4b02 ldr r3, [pc, #8] @ (8006c8c ) } 8006c82: 0018 movs r0, r3 8006c84: 46bd mov sp, r7 8006c86: b002 add sp, #8 8006c88: bd80 pop {r7, pc} 8006c8a: 46c0 nop @ (mov r8, r8) 8006c8c: 20000154 .word 0x20000154 08006c90 : * @param speed : Current device speed * @param length : Pointer to data length variable * @retval Pointer to descriptor buffer */ uint8_t * USBD_FS_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) { 8006c90: b580 push {r7, lr} 8006c92: b082 sub sp, #8 8006c94: af00 add r7, sp, #0 8006c96: 0002 movs r2, r0 8006c98: 6039 str r1, [r7, #0] 8006c9a: 1dfb adds r3, r7, #7 8006c9c: 701a strb r2, [r3, #0] if(speed == USBD_SPEED_HIGH) 8006c9e: 1dfb adds r3, r7, #7 8006ca0: 781b ldrb r3, [r3, #0] 8006ca2: 2b00 cmp r3, #0 8006ca4: d106 bne.n 8006cb4 { USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length); 8006ca6: 683a ldr r2, [r7, #0] 8006ca8: 4908 ldr r1, [pc, #32] @ (8006ccc ) 8006caa: 4b09 ldr r3, [pc, #36] @ (8006cd0 ) 8006cac: 0018 movs r0, r3 8006cae: f7ff fe7d bl 80069ac 8006cb2: e005 b.n 8006cc0 } else { USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length); 8006cb4: 683a ldr r2, [r7, #0] 8006cb6: 4905 ldr r1, [pc, #20] @ (8006ccc ) 8006cb8: 4b05 ldr r3, [pc, #20] @ (8006cd0 ) 8006cba: 0018 movs r0, r3 8006cbc: f7ff fe76 bl 80069ac } return USBD_StrDesc; 8006cc0: 4b02 ldr r3, [pc, #8] @ (8006ccc ) } 8006cc2: 0018 movs r0, r3 8006cc4: 46bd mov sp, r7 8006cc6: b002 add sp, #8 8006cc8: bd80 pop {r7, pc} 8006cca: 46c0 nop @ (mov r8, r8) 8006ccc: 20000464 .word 0x20000464 8006cd0: 08007500 .word 0x08007500 08006cd4 : * @param speed : Current device speed * @param length : Pointer to data length variable * @retval Pointer to descriptor buffer */ uint8_t * USBD_FS_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) { 8006cd4: b580 push {r7, lr} 8006cd6: b082 sub sp, #8 8006cd8: af00 add r7, sp, #0 8006cda: 0002 movs r2, r0 8006cdc: 6039 str r1, [r7, #0] 8006cde: 1dfb adds r3, r7, #7 8006ce0: 701a strb r2, [r3, #0] if(speed == 0) 8006ce2: 1dfb adds r3, r7, #7 8006ce4: 781b ldrb r3, [r3, #0] 8006ce6: 2b00 cmp r3, #0 8006ce8: d106 bne.n 8006cf8 { USBD_GetString((uint8_t *)USBD_INTERFACE_STRING_FS, USBD_StrDesc, length); 8006cea: 683a ldr r2, [r7, #0] 8006cec: 4908 ldr r1, [pc, #32] @ (8006d10 ) 8006cee: 4b09 ldr r3, [pc, #36] @ (8006d14 ) 8006cf0: 0018 movs r0, r3 8006cf2: f7ff fe5b bl 80069ac 8006cf6: e005 b.n 8006d04 } else { USBD_GetString((uint8_t *)USBD_INTERFACE_STRING_FS, USBD_StrDesc, length); 8006cf8: 683a ldr r2, [r7, #0] 8006cfa: 4905 ldr r1, [pc, #20] @ (8006d10 ) 8006cfc: 4b05 ldr r3, [pc, #20] @ (8006d14 ) 8006cfe: 0018 movs r0, r3 8006d00: f7ff fe54 bl 80069ac } return USBD_StrDesc; 8006d04: 4b02 ldr r3, [pc, #8] @ (8006d10 ) } 8006d06: 0018 movs r0, r3 8006d08: 46bd mov sp, r7 8006d0a: b002 add sp, #8 8006d0c: bd80 pop {r7, pc} 8006d0e: 46c0 nop @ (mov r8, r8) 8006d10: 20000464 .word 0x20000464 8006d14: 0800750c .word 0x0800750c 08006d18 : * @brief Create the serial number string descriptor * @param None * @retval None */ static void Get_SerialNum(void) { 8006d18: b580 push {r7, lr} 8006d1a: b084 sub sp, #16 8006d1c: af00 add r7, sp, #0 uint32_t deviceserial0; uint32_t deviceserial1; uint32_t deviceserial2; deviceserial0 = *(uint32_t *) DEVICE_ID1; 8006d1e: 4b10 ldr r3, [pc, #64] @ (8006d60 ) 8006d20: 681b ldr r3, [r3, #0] 8006d22: 60fb str r3, [r7, #12] deviceserial1 = *(uint32_t *) DEVICE_ID2; 8006d24: 4b0f ldr r3, [pc, #60] @ (8006d64 ) 8006d26: 681b ldr r3, [r3, #0] 8006d28: 60bb str r3, [r7, #8] deviceserial2 = *(uint32_t *) DEVICE_ID3; 8006d2a: 4b0f ldr r3, [pc, #60] @ (8006d68 ) 8006d2c: 681b ldr r3, [r3, #0] 8006d2e: 607b str r3, [r7, #4] deviceserial0 += deviceserial2; 8006d30: 68fa ldr r2, [r7, #12] 8006d32: 687b ldr r3, [r7, #4] 8006d34: 18d3 adds r3, r2, r3 8006d36: 60fb str r3, [r7, #12] if (deviceserial0 != 0) 8006d38: 68fb ldr r3, [r7, #12] 8006d3a: 2b00 cmp r3, #0 8006d3c: d00b beq.n 8006d56 { IntToUnicode(deviceserial0, &USBD_StringSerial[2], 8); 8006d3e: 490b ldr r1, [pc, #44] @ (8006d6c ) 8006d40: 68fb ldr r3, [r7, #12] 8006d42: 2208 movs r2, #8 8006d44: 0018 movs r0, r3 8006d46: f000 f815 bl 8006d74 IntToUnicode(deviceserial1, &USBD_StringSerial[18], 4); 8006d4a: 4909 ldr r1, [pc, #36] @ (8006d70 ) 8006d4c: 68bb ldr r3, [r7, #8] 8006d4e: 2204 movs r2, #4 8006d50: 0018 movs r0, r3 8006d52: f000 f80f bl 8006d74 } } 8006d56: 46c0 nop @ (mov r8, r8) 8006d58: 46bd mov sp, r7 8006d5a: b004 add sp, #16 8006d5c: bd80 pop {r7, pc} 8006d5e: 46c0 nop @ (mov r8, r8) 8006d60: 1ffff7ac .word 0x1ffff7ac 8006d64: 1ffff7b0 .word 0x1ffff7b0 8006d68: 1ffff7b4 .word 0x1ffff7b4 8006d6c: 20000156 .word 0x20000156 8006d70: 20000166 .word 0x20000166 08006d74 : * @param pbuf: pointer to the buffer * @param len: buffer length * @retval None */ static void IntToUnicode(uint32_t value, uint8_t * pbuf, uint8_t len) { 8006d74: b580 push {r7, lr} 8006d76: b086 sub sp, #24 8006d78: af00 add r7, sp, #0 8006d7a: 60f8 str r0, [r7, #12] 8006d7c: 60b9 str r1, [r7, #8] 8006d7e: 1dfb adds r3, r7, #7 8006d80: 701a strb r2, [r3, #0] uint8_t idx = 0; 8006d82: 2117 movs r1, #23 8006d84: 187b adds r3, r7, r1 8006d86: 2200 movs r2, #0 8006d88: 701a strb r2, [r3, #0] for (idx = 0; idx < len; idx++) 8006d8a: 187b adds r3, r7, r1 8006d8c: 2200 movs r2, #0 8006d8e: 701a strb r2, [r3, #0] 8006d90: e02f b.n 8006df2 { if (((value >> 28)) < 0xA) 8006d92: 68fb ldr r3, [r7, #12] 8006d94: 0f1b lsrs r3, r3, #28 8006d96: 2b09 cmp r3, #9 8006d98: d80d bhi.n 8006db6 { pbuf[2 * idx] = (value >> 28) + '0'; 8006d9a: 68fb ldr r3, [r7, #12] 8006d9c: 0f1b lsrs r3, r3, #28 8006d9e: b2da uxtb r2, r3 8006da0: 2317 movs r3, #23 8006da2: 18fb adds r3, r7, r3 8006da4: 781b ldrb r3, [r3, #0] 8006da6: 005b lsls r3, r3, #1 8006da8: 0019 movs r1, r3 8006daa: 68bb ldr r3, [r7, #8] 8006dac: 185b adds r3, r3, r1 8006dae: 3230 adds r2, #48 @ 0x30 8006db0: b2d2 uxtb r2, r2 8006db2: 701a strb r2, [r3, #0] 8006db4: e00c b.n 8006dd0 } else { pbuf[2 * idx] = (value >> 28) + 'A' - 10; 8006db6: 68fb ldr r3, [r7, #12] 8006db8: 0f1b lsrs r3, r3, #28 8006dba: b2da uxtb r2, r3 8006dbc: 2317 movs r3, #23 8006dbe: 18fb adds r3, r7, r3 8006dc0: 781b ldrb r3, [r3, #0] 8006dc2: 005b lsls r3, r3, #1 8006dc4: 0019 movs r1, r3 8006dc6: 68bb ldr r3, [r7, #8] 8006dc8: 185b adds r3, r3, r1 8006dca: 3237 adds r2, #55 @ 0x37 8006dcc: b2d2 uxtb r2, r2 8006dce: 701a strb r2, [r3, #0] } value = value << 4; 8006dd0: 68fb ldr r3, [r7, #12] 8006dd2: 011b lsls r3, r3, #4 8006dd4: 60fb str r3, [r7, #12] pbuf[2 * idx + 1] = 0; 8006dd6: 2117 movs r1, #23 8006dd8: 187b adds r3, r7, r1 8006dda: 781b ldrb r3, [r3, #0] 8006ddc: 005b lsls r3, r3, #1 8006dde: 3301 adds r3, #1 8006de0: 68ba ldr r2, [r7, #8] 8006de2: 18d3 adds r3, r2, r3 8006de4: 2200 movs r2, #0 8006de6: 701a strb r2, [r3, #0] for (idx = 0; idx < len; idx++) 8006de8: 187b adds r3, r7, r1 8006dea: 781a ldrb r2, [r3, #0] 8006dec: 187b adds r3, r7, r1 8006dee: 3201 adds r2, #1 8006df0: 701a strb r2, [r3, #0] 8006df2: 2317 movs r3, #23 8006df4: 18fa adds r2, r7, r3 8006df6: 1dfb adds r3, r7, #7 8006df8: 7812 ldrb r2, [r2, #0] 8006dfa: 781b ldrb r3, [r3, #0] 8006dfc: 429a cmp r2, r3 8006dfe: d3c8 bcc.n 8006d92 } } 8006e00: 46c0 nop @ (mov r8, r8) 8006e02: 46c0 nop @ (mov r8, r8) 8006e04: 46bd mov sp, r7 8006e06: b006 add sp, #24 8006e08: bd80 pop {r7, pc} ... 08006e0c : LL Driver Callbacks (PCD -> USB Device Library) *******************************************************************************/ /* MSP Init */ void HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle) { 8006e0c: b580 push {r7, lr} 8006e0e: b084 sub sp, #16 8006e10: af00 add r7, sp, #0 8006e12: 6078 str r0, [r7, #4] if(pcdHandle->Instance==USB) 8006e14: 687b ldr r3, [r7, #4] 8006e16: 681b ldr r3, [r3, #0] 8006e18: 4a0e ldr r2, [pc, #56] @ (8006e54 ) 8006e1a: 4293 cmp r3, r2 8006e1c: d115 bne.n 8006e4a { /* USER CODE BEGIN USB_MspInit 0 */ /* USER CODE END USB_MspInit 0 */ /* Peripheral clock enable */ __HAL_RCC_USB_CLK_ENABLE(); 8006e1e: 4b0e ldr r3, [pc, #56] @ (8006e58 ) 8006e20: 69da ldr r2, [r3, #28] 8006e22: 4b0d ldr r3, [pc, #52] @ (8006e58 ) 8006e24: 2180 movs r1, #128 @ 0x80 8006e26: 0409 lsls r1, r1, #16 8006e28: 430a orrs r2, r1 8006e2a: 61da str r2, [r3, #28] 8006e2c: 4b0a ldr r3, [pc, #40] @ (8006e58 ) 8006e2e: 69da ldr r2, [r3, #28] 8006e30: 2380 movs r3, #128 @ 0x80 8006e32: 041b lsls r3, r3, #16 8006e34: 4013 ands r3, r2 8006e36: 60fb str r3, [r7, #12] 8006e38: 68fb ldr r3, [r7, #12] /* Peripheral interrupt init */ HAL_NVIC_SetPriority(USB_IRQn, 0, 0); 8006e3a: 2200 movs r2, #0 8006e3c: 2100 movs r1, #0 8006e3e: 201f movs r0, #31 8006e40: f7f9 fc7e bl 8000740 HAL_NVIC_EnableIRQ(USB_IRQn); 8006e44: 201f movs r0, #31 8006e46: f7f9 fc90 bl 800076a /* USER CODE BEGIN USB_MspInit 1 */ /* USER CODE END USB_MspInit 1 */ } } 8006e4a: 46c0 nop @ (mov r8, r8) 8006e4c: 46bd mov sp, r7 8006e4e: b004 add sp, #16 8006e50: bd80 pop {r7, pc} 8006e52: 46c0 nop @ (mov r8, r8) 8006e54: 40005c00 .word 0x40005c00 8006e58: 40021000 .word 0x40021000 08006e5c : #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) static void PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd) #else void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd) #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ { 8006e5c: b580 push {r7, lr} 8006e5e: b082 sub sp, #8 8006e60: af00 add r7, sp, #0 8006e62: 6078 str r0, [r7, #4] USBD_LL_SetupStage((USBD_HandleTypeDef*)hpcd->pData, (uint8_t *)hpcd->Setup); 8006e64: 687a ldr r2, [r7, #4] 8006e66: 23b6 movs r3, #182 @ 0xb6 8006e68: 009b lsls r3, r3, #2 8006e6a: 58d2 ldr r2, [r2, r3] 8006e6c: 687b ldr r3, [r7, #4] 8006e6e: 21a6 movs r1, #166 @ 0xa6 8006e70: 0089 lsls r1, r1, #2 8006e72: 468c mov ip, r1 8006e74: 4463 add r3, ip 8006e76: 0019 movs r1, r3 8006e78: 0010 movs r0, r2 8006e7a: f7fe fd2d bl 80058d8 } 8006e7e: 46c0 nop @ (mov r8, r8) 8006e80: 46bd mov sp, r7 8006e82: b002 add sp, #8 8006e84: bd80 pop {r7, pc} 08006e86 : #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) static void PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) #else void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ { 8006e86: b590 push {r4, r7, lr} 8006e88: b083 sub sp, #12 8006e8a: af00 add r7, sp, #0 8006e8c: 6078 str r0, [r7, #4] 8006e8e: 000a movs r2, r1 8006e90: 1cfb adds r3, r7, #3 8006e92: 701a strb r2, [r3, #0] USBD_LL_DataOutStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->OUT_ep[epnum].xfer_buff); 8006e94: 687a ldr r2, [r7, #4] 8006e96: 23b6 movs r3, #182 @ 0xb6 8006e98: 009b lsls r3, r3, #2 8006e9a: 58d4 ldr r4, [r2, r3] 8006e9c: 1cfb adds r3, r7, #3 8006e9e: 781a ldrb r2, [r3, #0] 8006ea0: 6878 ldr r0, [r7, #4] 8006ea2: 23b2 movs r3, #178 @ 0xb2 8006ea4: 0059 lsls r1, r3, #1 8006ea6: 0013 movs r3, r2 8006ea8: 009b lsls r3, r3, #2 8006eaa: 189b adds r3, r3, r2 8006eac: 00db lsls r3, r3, #3 8006eae: 18c3 adds r3, r0, r3 8006eb0: 185b adds r3, r3, r1 8006eb2: 681a ldr r2, [r3, #0] 8006eb4: 1cfb adds r3, r7, #3 8006eb6: 781b ldrb r3, [r3, #0] 8006eb8: 0019 movs r1, r3 8006eba: 0020 movs r0, r4 8006ebc: f7fe fd6a bl 8005994 } 8006ec0: 46c0 nop @ (mov r8, r8) 8006ec2: 46bd mov sp, r7 8006ec4: b003 add sp, #12 8006ec6: bd90 pop {r4, r7, pc} 08006ec8 : #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) static void PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) #else void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ { 8006ec8: b580 push {r7, lr} 8006eca: b082 sub sp, #8 8006ecc: af00 add r7, sp, #0 8006ece: 6078 str r0, [r7, #4] 8006ed0: 000a movs r2, r1 8006ed2: 1cfb adds r3, r7, #3 8006ed4: 701a strb r2, [r3, #0] USBD_LL_DataInStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->IN_ep[epnum].xfer_buff); 8006ed6: 687a ldr r2, [r7, #4] 8006ed8: 23b6 movs r3, #182 @ 0xb6 8006eda: 009b lsls r3, r3, #2 8006edc: 58d0 ldr r0, [r2, r3] 8006ede: 1cfb adds r3, r7, #3 8006ee0: 781a ldrb r2, [r3, #0] 8006ee2: 6879 ldr r1, [r7, #4] 8006ee4: 0013 movs r3, r2 8006ee6: 009b lsls r3, r3, #2 8006ee8: 189b adds r3, r3, r2 8006eea: 00db lsls r3, r3, #3 8006eec: 18cb adds r3, r1, r3 8006eee: 3324 adds r3, #36 @ 0x24 8006ef0: 681a ldr r2, [r3, #0] 8006ef2: 1cfb adds r3, r7, #3 8006ef4: 781b ldrb r3, [r3, #0] 8006ef6: 0019 movs r1, r3 8006ef8: f7fe fdce bl 8005a98 } 8006efc: 46c0 nop @ (mov r8, r8) 8006efe: 46bd mov sp, r7 8006f00: b002 add sp, #8 8006f02: bd80 pop {r7, pc} 08006f04 : #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) static void PCD_SOFCallback(PCD_HandleTypeDef *hpcd) #else void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd) #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ { 8006f04: b580 push {r7, lr} 8006f06: b082 sub sp, #8 8006f08: af00 add r7, sp, #0 8006f0a: 6078 str r0, [r7, #4] USBD_LL_SOF((USBD_HandleTypeDef*)hpcd->pData); 8006f0c: 687a ldr r2, [r7, #4] 8006f0e: 23b6 movs r3, #182 @ 0xb6 8006f10: 009b lsls r3, r3, #2 8006f12: 58d3 ldr r3, [r2, r3] 8006f14: 0018 movs r0, r3 8006f16: f7fe ff05 bl 8005d24 } 8006f1a: 46c0 nop @ (mov r8, r8) 8006f1c: 46bd mov sp, r7 8006f1e: b002 add sp, #8 8006f20: bd80 pop {r7, pc} 08006f22 : #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) static void PCD_ResetCallback(PCD_HandleTypeDef *hpcd) #else void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd) #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ { 8006f22: b580 push {r7, lr} 8006f24: b084 sub sp, #16 8006f26: af00 add r7, sp, #0 8006f28: 6078 str r0, [r7, #4] USBD_SpeedTypeDef speed = USBD_SPEED_FULL; 8006f2a: 230f movs r3, #15 8006f2c: 18fb adds r3, r7, r3 8006f2e: 2201 movs r2, #1 8006f30: 701a strb r2, [r3, #0] if ( hpcd->Init.speed != PCD_SPEED_FULL) 8006f32: 687b ldr r3, [r7, #4] 8006f34: 795b ldrb r3, [r3, #5] 8006f36: 2b02 cmp r3, #2 8006f38: d001 beq.n 8006f3e { Error_Handler(); 8006f3a: f7f9 fa35 bl 80003a8 } /* Set Speed. */ USBD_LL_SetSpeed((USBD_HandleTypeDef*)hpcd->pData, speed); 8006f3e: 687a ldr r2, [r7, #4] 8006f40: 23b6 movs r3, #182 @ 0xb6 8006f42: 009b lsls r3, r3, #2 8006f44: 58d2 ldr r2, [r2, r3] 8006f46: 230f movs r3, #15 8006f48: 18fb adds r3, r7, r3 8006f4a: 781b ldrb r3, [r3, #0] 8006f4c: 0019 movs r1, r3 8006f4e: 0010 movs r0, r2 8006f50: f7fe fea7 bl 8005ca2 /* Reset Device. */ USBD_LL_Reset((USBD_HandleTypeDef*)hpcd->pData); 8006f54: 687a ldr r2, [r7, #4] 8006f56: 23b6 movs r3, #182 @ 0xb6 8006f58: 009b lsls r3, r3, #2 8006f5a: 58d3 ldr r3, [r2, r3] 8006f5c: 0018 movs r0, r3 8006f5e: f7fe fe58 bl 8005c12 } 8006f62: 46c0 nop @ (mov r8, r8) 8006f64: 46bd mov sp, r7 8006f66: b004 add sp, #16 8006f68: bd80 pop {r7, pc} ... 08006f6c : #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) static void PCD_SuspendCallback(PCD_HandleTypeDef *hpcd) #else void HAL_PCD_SuspendCallback(PCD_HandleTypeDef *hpcd) #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ { 8006f6c: b580 push {r7, lr} 8006f6e: b082 sub sp, #8 8006f70: af00 add r7, sp, #0 8006f72: 6078 str r0, [r7, #4] /* Inform USB library that core enters in suspend Mode. */ USBD_LL_Suspend((USBD_HandleTypeDef*)hpcd->pData); 8006f74: 687a ldr r2, [r7, #4] 8006f76: 23b6 movs r3, #182 @ 0xb6 8006f78: 009b lsls r3, r3, #2 8006f7a: 58d3 ldr r3, [r2, r3] 8006f7c: 0018 movs r0, r3 8006f7e: f7fe fea1 bl 8005cc4 /* Enter in STOP mode. */ /* USER CODE BEGIN 2 */ if (hpcd->Init.low_power_enable) 8006f82: 687b ldr r3, [r7, #4] 8006f84: 7a5b ldrb r3, [r3, #9] 8006f86: 2b00 cmp r3, #0 8006f88: d005 beq.n 8006f96 { /* Set SLEEPDEEP bit and SleepOnExit of Cortex System Control Register. */ SCB->SCR |= (uint32_t)((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk)); 8006f8a: 4b05 ldr r3, [pc, #20] @ (8006fa0 ) 8006f8c: 691a ldr r2, [r3, #16] 8006f8e: 4b04 ldr r3, [pc, #16] @ (8006fa0 ) 8006f90: 2106 movs r1, #6 8006f92: 430a orrs r2, r1 8006f94: 611a str r2, [r3, #16] } /* USER CODE END 2 */ } 8006f96: 46c0 nop @ (mov r8, r8) 8006f98: 46bd mov sp, r7 8006f9a: b002 add sp, #8 8006f9c: bd80 pop {r7, pc} 8006f9e: 46c0 nop @ (mov r8, r8) 8006fa0: e000ed00 .word 0xe000ed00 08006fa4 : #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) static void PCD_ResumeCallback(PCD_HandleTypeDef *hpcd) #else void HAL_PCD_ResumeCallback(PCD_HandleTypeDef *hpcd) #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ { 8006fa4: b580 push {r7, lr} 8006fa6: b082 sub sp, #8 8006fa8: af00 add r7, sp, #0 8006faa: 6078 str r0, [r7, #4] /* USER CODE BEGIN 3 */ if (hpcd->Init.low_power_enable) 8006fac: 687b ldr r3, [r7, #4] 8006fae: 7a5b ldrb r3, [r3, #9] 8006fb0: 2b00 cmp r3, #0 8006fb2: d007 beq.n 8006fc4 { /* Reset SLEEPDEEP bit of Cortex System Control Register. */ SCB->SCR &= (uint32_t)~((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk)); 8006fb4: 4b09 ldr r3, [pc, #36] @ (8006fdc ) 8006fb6: 691a ldr r2, [r3, #16] 8006fb8: 4b08 ldr r3, [pc, #32] @ (8006fdc ) 8006fba: 2106 movs r1, #6 8006fbc: 438a bics r2, r1 8006fbe: 611a str r2, [r3, #16] SystemClockConfig_Resume(); 8006fc0: f000 fa18 bl 80073f4 } /* USER CODE END 3 */ USBD_LL_Resume((USBD_HandleTypeDef*)hpcd->pData); 8006fc4: 687a ldr r2, [r7, #4] 8006fc6: 23b6 movs r3, #182 @ 0xb6 8006fc8: 009b lsls r3, r3, #2 8006fca: 58d3 ldr r3, [r2, r3] 8006fcc: 0018 movs r0, r3 8006fce: f7fe fe91 bl 8005cf4 } 8006fd2: 46c0 nop @ (mov r8, r8) 8006fd4: 46bd mov sp, r7 8006fd6: b002 add sp, #8 8006fd8: bd80 pop {r7, pc} 8006fda: 46c0 nop @ (mov r8, r8) 8006fdc: e000ed00 .word 0xe000ed00 08006fe0 : * @brief Initializes the low level portion of the device driver. * @param pdev: Device handle * @retval USBD status */ USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev) { 8006fe0: b580 push {r7, lr} 8006fe2: b082 sub sp, #8 8006fe4: af00 add r7, sp, #0 8006fe6: 6078 str r0, [r7, #4] /* Init USB Ip. */ /* Link the driver to the stack. */ hpcd_USB_FS.pData = pdev; 8006fe8: 4a23 ldr r2, [pc, #140] @ (8007078 ) 8006fea: 23b6 movs r3, #182 @ 0xb6 8006fec: 009b lsls r3, r3, #2 8006fee: 6879 ldr r1, [r7, #4] 8006ff0: 50d1 str r1, [r2, r3] pdev->pData = &hpcd_USB_FS; 8006ff2: 687a ldr r2, [r7, #4] 8006ff4: 23b0 movs r3, #176 @ 0xb0 8006ff6: 009b lsls r3, r3, #2 8006ff8: 491f ldr r1, [pc, #124] @ (8007078 ) 8006ffa: 50d1 str r1, [r2, r3] hpcd_USB_FS.Instance = USB; 8006ffc: 4b1e ldr r3, [pc, #120] @ (8007078 ) 8006ffe: 4a1f ldr r2, [pc, #124] @ (800707c ) 8007000: 601a str r2, [r3, #0] hpcd_USB_FS.Init.dev_endpoints = 8; 8007002: 4b1d ldr r3, [pc, #116] @ (8007078 ) 8007004: 2208 movs r2, #8 8007006: 711a strb r2, [r3, #4] hpcd_USB_FS.Init.speed = PCD_SPEED_FULL; 8007008: 4b1b ldr r3, [pc, #108] @ (8007078 ) 800700a: 2202 movs r2, #2 800700c: 715a strb r2, [r3, #5] hpcd_USB_FS.Init.phy_itface = PCD_PHY_EMBEDDED; 800700e: 4b1a ldr r3, [pc, #104] @ (8007078 ) 8007010: 2202 movs r2, #2 8007012: 71da strb r2, [r3, #7] hpcd_USB_FS.Init.low_power_enable = DISABLE; 8007014: 4b18 ldr r3, [pc, #96] @ (8007078 ) 8007016: 2200 movs r2, #0 8007018: 725a strb r2, [r3, #9] hpcd_USB_FS.Init.lpm_enable = DISABLE; 800701a: 4b17 ldr r3, [pc, #92] @ (8007078 ) 800701c: 2200 movs r2, #0 800701e: 729a strb r2, [r3, #10] hpcd_USB_FS.Init.battery_charging_enable = DISABLE; 8007020: 4b15 ldr r3, [pc, #84] @ (8007078 ) 8007022: 2200 movs r2, #0 8007024: 72da strb r2, [r3, #11] if (HAL_PCD_Init(&hpcd_USB_FS) != HAL_OK) 8007026: 4b14 ldr r3, [pc, #80] @ (8007078 ) 8007028: 0018 movs r0, r3 800702a: f7f9 fd41 bl 8000ab0 800702e: 1e03 subs r3, r0, #0 8007030: d001 beq.n 8007036 { Error_Handler( ); 8007032: f7f9 f9b9 bl 80003a8 HAL_PCD_RegisterDataInStageCallback(&hpcd_USB_FS, PCD_DataInStageCallback); HAL_PCD_RegisterIsoOutIncpltCallback(&hpcd_USB_FS, PCD_ISOOUTIncompleteCallback); HAL_PCD_RegisterIsoInIncpltCallback(&hpcd_USB_FS, PCD_ISOINIncompleteCallback); #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ /* USER CODE BEGIN EndPoint_Configuration */ HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x00 , PCD_SNG_BUF, 0x18); 8007036: 687a ldr r2, [r7, #4] 8007038: 23b0 movs r3, #176 @ 0xb0 800703a: 009b lsls r3, r3, #2 800703c: 58d0 ldr r0, [r2, r3] 800703e: 2318 movs r3, #24 8007040: 2200 movs r2, #0 8007042: 2100 movs r1, #0 8007044: f7fb fada bl 80025fc HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x80 , PCD_SNG_BUF, 0x58); 8007048: 687a ldr r2, [r7, #4] 800704a: 23b0 movs r3, #176 @ 0xb0 800704c: 009b lsls r3, r3, #2 800704e: 58d0 ldr r0, [r2, r3] 8007050: 2358 movs r3, #88 @ 0x58 8007052: 2200 movs r2, #0 8007054: 2180 movs r1, #128 @ 0x80 8007056: f7fb fad1 bl 80025fc /* USER CODE END EndPoint_Configuration */ /* USER CODE BEGIN EndPoint_Configuration_HID */ HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x81 , PCD_SNG_BUF, 0x100); 800705a: 687a ldr r2, [r7, #4] 800705c: 23b0 movs r3, #176 @ 0xb0 800705e: 009b lsls r3, r3, #2 8007060: 58d0 ldr r0, [r2, r3] 8007062: 2380 movs r3, #128 @ 0x80 8007064: 005b lsls r3, r3, #1 8007066: 2200 movs r2, #0 8007068: 2181 movs r1, #129 @ 0x81 800706a: f7fb fac7 bl 80025fc /* USER CODE END EndPoint_Configuration_HID */ return USBD_OK; 800706e: 2300 movs r3, #0 } 8007070: 0018 movs r0, r3 8007072: 46bd mov sp, r7 8007074: b002 add sp, #8 8007076: bd80 pop {r7, pc} 8007078: 20000664 .word 0x20000664 800707c: 40005c00 .word 0x40005c00 08007080 : * @brief Starts the low level portion of the device driver. * @param pdev: Device handle * @retval USBD status */ USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev) { 8007080: b5f0 push {r4, r5, r6, r7, lr} 8007082: b085 sub sp, #20 8007084: af00 add r7, sp, #0 8007086: 6078 str r0, [r7, #4] HAL_StatusTypeDef hal_status = HAL_OK; 8007088: 210f movs r1, #15 800708a: 187b adds r3, r7, r1 800708c: 2200 movs r2, #0 800708e: 701a strb r2, [r3, #0] USBD_StatusTypeDef usb_status = USBD_OK; 8007090: 260e movs r6, #14 8007092: 19bb adds r3, r7, r6 8007094: 2200 movs r2, #0 8007096: 701a strb r2, [r3, #0] hal_status = HAL_PCD_Start(pdev->pData); 8007098: 687a ldr r2, [r7, #4] 800709a: 23b0 movs r3, #176 @ 0xb0 800709c: 009b lsls r3, r3, #2 800709e: 58d3 ldr r3, [r2, r3] 80070a0: 000d movs r5, r1 80070a2: 187c adds r4, r7, r1 80070a4: 0018 movs r0, r3 80070a6: f7f9 fdf7 bl 8000c98 80070aa: 0003 movs r3, r0 80070ac: 7023 strb r3, [r4, #0] usb_status = USBD_Get_USB_Status(hal_status); 80070ae: 19bc adds r4, r7, r6 80070b0: 197b adds r3, r7, r5 80070b2: 781b ldrb r3, [r3, #0] 80070b4: 0018 movs r0, r3 80070b6: f000 f9a4 bl 8007402 80070ba: 0003 movs r3, r0 80070bc: 7023 strb r3, [r4, #0] return usb_status; 80070be: 19bb adds r3, r7, r6 80070c0: 781b ldrb r3, [r3, #0] } 80070c2: 0018 movs r0, r3 80070c4: 46bd mov sp, r7 80070c6: b005 add sp, #20 80070c8: bdf0 pop {r4, r5, r6, r7, pc} 080070ca : * @param ep_type: Endpoint type * @param ep_mps: Endpoint max packet size * @retval USBD status */ USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t ep_type, uint16_t ep_mps) { 80070ca: b5f0 push {r4, r5, r6, r7, lr} 80070cc: b085 sub sp, #20 80070ce: af00 add r7, sp, #0 80070d0: 6078 str r0, [r7, #4] 80070d2: 000c movs r4, r1 80070d4: 0010 movs r0, r2 80070d6: 0019 movs r1, r3 80070d8: 1cfb adds r3, r7, #3 80070da: 1c22 adds r2, r4, #0 80070dc: 701a strb r2, [r3, #0] 80070de: 1cbb adds r3, r7, #2 80070e0: 1c02 adds r2, r0, #0 80070e2: 701a strb r2, [r3, #0] 80070e4: 003b movs r3, r7 80070e6: 1c0a adds r2, r1, #0 80070e8: 801a strh r2, [r3, #0] HAL_StatusTypeDef hal_status = HAL_OK; 80070ea: 260f movs r6, #15 80070ec: 19bb adds r3, r7, r6 80070ee: 2200 movs r2, #0 80070f0: 701a strb r2, [r3, #0] USBD_StatusTypeDef usb_status = USBD_OK; 80070f2: 250e movs r5, #14 80070f4: 197b adds r3, r7, r5 80070f6: 2200 movs r2, #0 80070f8: 701a strb r2, [r3, #0] hal_status = HAL_PCD_EP_Open(pdev->pData, ep_addr, ep_mps, ep_type); 80070fa: 687a ldr r2, [r7, #4] 80070fc: 23b0 movs r3, #176 @ 0xb0 80070fe: 009b lsls r3, r3, #2 8007100: 58d0 ldr r0, [r2, r3] 8007102: 19bc adds r4, r7, r6 8007104: 1cbb adds r3, r7, #2 8007106: 781d ldrb r5, [r3, #0] 8007108: 003b movs r3, r7 800710a: 881a ldrh r2, [r3, #0] 800710c: 1cfb adds r3, r7, #3 800710e: 7819 ldrb r1, [r3, #0] 8007110: 002b movs r3, r5 8007112: f7f9 ff55 bl 8000fc0 8007116: 0003 movs r3, r0 8007118: 7023 strb r3, [r4, #0] usb_status = USBD_Get_USB_Status(hal_status); 800711a: 250e movs r5, #14 800711c: 197c adds r4, r7, r5 800711e: 19bb adds r3, r7, r6 8007120: 781b ldrb r3, [r3, #0] 8007122: 0018 movs r0, r3 8007124: f000 f96d bl 8007402 8007128: 0003 movs r3, r0 800712a: 7023 strb r3, [r4, #0] return usb_status; 800712c: 197b adds r3, r7, r5 800712e: 781b ldrb r3, [r3, #0] } 8007130: 0018 movs r0, r3 8007132: 46bd mov sp, r7 8007134: b005 add sp, #20 8007136: bdf0 pop {r4, r5, r6, r7, pc} 08007138 : * @param pdev: Device handle * @param ep_addr: Endpoint number * @retval USBD status */ USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { 8007138: b5f0 push {r4, r5, r6, r7, lr} 800713a: b085 sub sp, #20 800713c: af00 add r7, sp, #0 800713e: 6078 str r0, [r7, #4] 8007140: 000a movs r2, r1 8007142: 1cfb adds r3, r7, #3 8007144: 701a strb r2, [r3, #0] HAL_StatusTypeDef hal_status = HAL_OK; 8007146: 210f movs r1, #15 8007148: 187b adds r3, r7, r1 800714a: 2200 movs r2, #0 800714c: 701a strb r2, [r3, #0] USBD_StatusTypeDef usb_status = USBD_OK; 800714e: 260e movs r6, #14 8007150: 19bb adds r3, r7, r6 8007152: 2200 movs r2, #0 8007154: 701a strb r2, [r3, #0] hal_status = HAL_PCD_EP_Close(pdev->pData, ep_addr); 8007156: 687a ldr r2, [r7, #4] 8007158: 23b0 movs r3, #176 @ 0xb0 800715a: 009b lsls r3, r3, #2 800715c: 58d2 ldr r2, [r2, r3] 800715e: 000d movs r5, r1 8007160: 187c adds r4, r7, r1 8007162: 1cfb adds r3, r7, #3 8007164: 781b ldrb r3, [r3, #0] 8007166: 0019 movs r1, r3 8007168: 0010 movs r0, r2 800716a: f7f9 ff98 bl 800109e 800716e: 0003 movs r3, r0 8007170: 7023 strb r3, [r4, #0] usb_status = USBD_Get_USB_Status(hal_status); 8007172: 19bc adds r4, r7, r6 8007174: 197b adds r3, r7, r5 8007176: 781b ldrb r3, [r3, #0] 8007178: 0018 movs r0, r3 800717a: f000 f942 bl 8007402 800717e: 0003 movs r3, r0 8007180: 7023 strb r3, [r4, #0] return usb_status; 8007182: 19bb adds r3, r7, r6 8007184: 781b ldrb r3, [r3, #0] } 8007186: 0018 movs r0, r3 8007188: 46bd mov sp, r7 800718a: b005 add sp, #20 800718c: bdf0 pop {r4, r5, r6, r7, pc} 0800718e : * @param pdev: Device handle * @param ep_addr: Endpoint number * @retval USBD status */ USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { 800718e: b5f0 push {r4, r5, r6, r7, lr} 8007190: b085 sub sp, #20 8007192: af00 add r7, sp, #0 8007194: 6078 str r0, [r7, #4] 8007196: 000a movs r2, r1 8007198: 1cfb adds r3, r7, #3 800719a: 701a strb r2, [r3, #0] HAL_StatusTypeDef hal_status = HAL_OK; 800719c: 210f movs r1, #15 800719e: 187b adds r3, r7, r1 80071a0: 2200 movs r2, #0 80071a2: 701a strb r2, [r3, #0] USBD_StatusTypeDef usb_status = USBD_OK; 80071a4: 260e movs r6, #14 80071a6: 19bb adds r3, r7, r6 80071a8: 2200 movs r2, #0 80071aa: 701a strb r2, [r3, #0] hal_status = HAL_PCD_EP_SetStall(pdev->pData, ep_addr); 80071ac: 687a ldr r2, [r7, #4] 80071ae: 23b0 movs r3, #176 @ 0xb0 80071b0: 009b lsls r3, r3, #2 80071b2: 58d2 ldr r2, [r2, r3] 80071b4: 000d movs r5, r1 80071b6: 187c adds r4, r7, r1 80071b8: 1cfb adds r3, r7, #3 80071ba: 781b ldrb r3, [r3, #0] 80071bc: 0019 movs r1, r3 80071be: 0010 movs r0, r2 80071c0: f7fa f831 bl 8001226 80071c4: 0003 movs r3, r0 80071c6: 7023 strb r3, [r4, #0] usb_status = USBD_Get_USB_Status(hal_status); 80071c8: 19bc adds r4, r7, r6 80071ca: 197b adds r3, r7, r5 80071cc: 781b ldrb r3, [r3, #0] 80071ce: 0018 movs r0, r3 80071d0: f000 f917 bl 8007402 80071d4: 0003 movs r3, r0 80071d6: 7023 strb r3, [r4, #0] return usb_status; 80071d8: 19bb adds r3, r7, r6 80071da: 781b ldrb r3, [r3, #0] } 80071dc: 0018 movs r0, r3 80071de: 46bd mov sp, r7 80071e0: b005 add sp, #20 80071e2: bdf0 pop {r4, r5, r6, r7, pc} 080071e4 : * @param pdev: Device handle * @param ep_addr: Endpoint number * @retval USBD status */ USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { 80071e4: b5f0 push {r4, r5, r6, r7, lr} 80071e6: b085 sub sp, #20 80071e8: af00 add r7, sp, #0 80071ea: 6078 str r0, [r7, #4] 80071ec: 000a movs r2, r1 80071ee: 1cfb adds r3, r7, #3 80071f0: 701a strb r2, [r3, #0] HAL_StatusTypeDef hal_status = HAL_OK; 80071f2: 210f movs r1, #15 80071f4: 187b adds r3, r7, r1 80071f6: 2200 movs r2, #0 80071f8: 701a strb r2, [r3, #0] USBD_StatusTypeDef usb_status = USBD_OK; 80071fa: 260e movs r6, #14 80071fc: 19bb adds r3, r7, r6 80071fe: 2200 movs r2, #0 8007200: 701a strb r2, [r3, #0] hal_status = HAL_PCD_EP_ClrStall(pdev->pData, ep_addr); 8007202: 687a ldr r2, [r7, #4] 8007204: 23b0 movs r3, #176 @ 0xb0 8007206: 009b lsls r3, r3, #2 8007208: 58d2 ldr r2, [r2, r3] 800720a: 000d movs r5, r1 800720c: 187c adds r4, r7, r1 800720e: 1cfb adds r3, r7, #3 8007210: 781b ldrb r3, [r3, #0] 8007212: 0019 movs r1, r3 8007214: 0010 movs r0, r2 8007216: f7fa f862 bl 80012de 800721a: 0003 movs r3, r0 800721c: 7023 strb r3, [r4, #0] usb_status = USBD_Get_USB_Status(hal_status); 800721e: 19bc adds r4, r7, r6 8007220: 197b adds r3, r7, r5 8007222: 781b ldrb r3, [r3, #0] 8007224: 0018 movs r0, r3 8007226: f000 f8ec bl 8007402 800722a: 0003 movs r3, r0 800722c: 7023 strb r3, [r4, #0] return usb_status; 800722e: 19bb adds r3, r7, r6 8007230: 781b ldrb r3, [r3, #0] } 8007232: 0018 movs r0, r3 8007234: 46bd mov sp, r7 8007236: b005 add sp, #20 8007238: bdf0 pop {r4, r5, r6, r7, pc} 0800723a : * @param pdev: Device handle * @param ep_addr: Endpoint number * @retval Stall (1: Yes, 0: No) */ uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { 800723a: b580 push {r7, lr} 800723c: b084 sub sp, #16 800723e: af00 add r7, sp, #0 8007240: 6078 str r0, [r7, #4] 8007242: 000a movs r2, r1 8007244: 1cfb adds r3, r7, #3 8007246: 701a strb r2, [r3, #0] PCD_HandleTypeDef *hpcd = (PCD_HandleTypeDef*) pdev->pData; 8007248: 687a ldr r2, [r7, #4] 800724a: 23b0 movs r3, #176 @ 0xb0 800724c: 009b lsls r3, r3, #2 800724e: 58d3 ldr r3, [r2, r3] 8007250: 60fb str r3, [r7, #12] if((ep_addr & 0x80) == 0x80) 8007252: 1cfb adds r3, r7, #3 8007254: 781b ldrb r3, [r3, #0] 8007256: b25b sxtb r3, r3 8007258: 2b00 cmp r3, #0 800725a: da0c bge.n 8007276 { return hpcd->IN_ep[ep_addr & 0x7F].is_stall; 800725c: 1cfb adds r3, r7, #3 800725e: 781b ldrb r3, [r3, #0] 8007260: 227f movs r2, #127 @ 0x7f 8007262: 401a ands r2, r3 8007264: 68f9 ldr r1, [r7, #12] 8007266: 0013 movs r3, r2 8007268: 009b lsls r3, r3, #2 800726a: 189b adds r3, r3, r2 800726c: 00db lsls r3, r3, #3 800726e: 18cb adds r3, r1, r3 8007270: 3312 adds r3, #18 8007272: 781b ldrb r3, [r3, #0] 8007274: e00d b.n 8007292 } else { return hpcd->OUT_ep[ep_addr & 0x7F].is_stall; 8007276: 1cfb adds r3, r7, #3 8007278: 781b ldrb r3, [r3, #0] 800727a: 227f movs r2, #127 @ 0x7f 800727c: 401a ands r2, r3 800727e: 68f8 ldr r0, [r7, #12] 8007280: 23a9 movs r3, #169 @ 0xa9 8007282: 0059 lsls r1, r3, #1 8007284: 0013 movs r3, r2 8007286: 009b lsls r3, r3, #2 8007288: 189b adds r3, r3, r2 800728a: 00db lsls r3, r3, #3 800728c: 18c3 adds r3, r0, r3 800728e: 185b adds r3, r3, r1 8007290: 781b ldrb r3, [r3, #0] } } 8007292: 0018 movs r0, r3 8007294: 46bd mov sp, r7 8007296: b004 add sp, #16 8007298: bd80 pop {r7, pc} 0800729a : * @param pdev: Device handle * @param dev_addr: Device address * @retval USBD status */ USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr) { 800729a: b5f0 push {r4, r5, r6, r7, lr} 800729c: b085 sub sp, #20 800729e: af00 add r7, sp, #0 80072a0: 6078 str r0, [r7, #4] 80072a2: 000a movs r2, r1 80072a4: 1cfb adds r3, r7, #3 80072a6: 701a strb r2, [r3, #0] HAL_StatusTypeDef hal_status = HAL_OK; 80072a8: 210f movs r1, #15 80072aa: 187b adds r3, r7, r1 80072ac: 2200 movs r2, #0 80072ae: 701a strb r2, [r3, #0] USBD_StatusTypeDef usb_status = USBD_OK; 80072b0: 260e movs r6, #14 80072b2: 19bb adds r3, r7, r6 80072b4: 2200 movs r2, #0 80072b6: 701a strb r2, [r3, #0] hal_status = HAL_PCD_SetAddress(pdev->pData, dev_addr); 80072b8: 687a ldr r2, [r7, #4] 80072ba: 23b0 movs r3, #176 @ 0xb0 80072bc: 009b lsls r3, r3, #2 80072be: 58d2 ldr r2, [r2, r3] 80072c0: 000d movs r5, r1 80072c2: 187c adds r4, r7, r1 80072c4: 1cfb adds r3, r7, #3 80072c6: 781b ldrb r3, [r3, #0] 80072c8: 0019 movs r1, r3 80072ca: 0010 movs r0, r2 80072cc: f7f9 fe4e bl 8000f6c 80072d0: 0003 movs r3, r0 80072d2: 7023 strb r3, [r4, #0] usb_status = USBD_Get_USB_Status(hal_status); 80072d4: 19bc adds r4, r7, r6 80072d6: 197b adds r3, r7, r5 80072d8: 781b ldrb r3, [r3, #0] 80072da: 0018 movs r0, r3 80072dc: f000 f891 bl 8007402 80072e0: 0003 movs r3, r0 80072e2: 7023 strb r3, [r4, #0] return usb_status; 80072e4: 19bb adds r3, r7, r6 80072e6: 781b ldrb r3, [r3, #0] } 80072e8: 0018 movs r0, r3 80072ea: 46bd mov sp, r7 80072ec: b005 add sp, #20 80072ee: bdf0 pop {r4, r5, r6, r7, pc} 080072f0 : * @param pbuf: Pointer to data to be sent * @param size: Data size * @retval USBD status */ USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t size) { 80072f0: b5f0 push {r4, r5, r6, r7, lr} 80072f2: b087 sub sp, #28 80072f4: af00 add r7, sp, #0 80072f6: 60f8 str r0, [r7, #12] 80072f8: 0008 movs r0, r1 80072fa: 607a str r2, [r7, #4] 80072fc: 0019 movs r1, r3 80072fe: 230b movs r3, #11 8007300: 18fb adds r3, r7, r3 8007302: 1c02 adds r2, r0, #0 8007304: 701a strb r2, [r3, #0] 8007306: 2408 movs r4, #8 8007308: 193b adds r3, r7, r4 800730a: 1c0a adds r2, r1, #0 800730c: 801a strh r2, [r3, #0] HAL_StatusTypeDef hal_status = HAL_OK; 800730e: 2117 movs r1, #23 8007310: 187b adds r3, r7, r1 8007312: 2200 movs r2, #0 8007314: 701a strb r2, [r3, #0] USBD_StatusTypeDef usb_status = USBD_OK; 8007316: 2516 movs r5, #22 8007318: 197b adds r3, r7, r5 800731a: 2200 movs r2, #0 800731c: 701a strb r2, [r3, #0] hal_status = HAL_PCD_EP_Transmit(pdev->pData, ep_addr, pbuf, size); 800731e: 68fa ldr r2, [r7, #12] 8007320: 23b0 movs r3, #176 @ 0xb0 8007322: 009b lsls r3, r3, #2 8007324: 58d0 ldr r0, [r2, r3] 8007326: 193b adds r3, r7, r4 8007328: 881d ldrh r5, [r3, #0] 800732a: 000e movs r6, r1 800732c: 187c adds r4, r7, r1 800732e: 687a ldr r2, [r7, #4] 8007330: 230b movs r3, #11 8007332: 18fb adds r3, r7, r3 8007334: 7819 ldrb r1, [r3, #0] 8007336: 002b movs r3, r5 8007338: f7f9 ff39 bl 80011ae 800733c: 0003 movs r3, r0 800733e: 7023 strb r3, [r4, #0] usb_status = USBD_Get_USB_Status(hal_status); 8007340: 2516 movs r5, #22 8007342: 197c adds r4, r7, r5 8007344: 19bb adds r3, r7, r6 8007346: 781b ldrb r3, [r3, #0] 8007348: 0018 movs r0, r3 800734a: f000 f85a bl 8007402 800734e: 0003 movs r3, r0 8007350: 7023 strb r3, [r4, #0] return usb_status; 8007352: 197b adds r3, r7, r5 8007354: 781b ldrb r3, [r3, #0] } 8007356: 0018 movs r0, r3 8007358: 46bd mov sp, r7 800735a: b007 add sp, #28 800735c: bdf0 pop {r4, r5, r6, r7, pc} 0800735e : * @param pbuf: Pointer to data to be received * @param size: Data size * @retval USBD status */ USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t size) { 800735e: b5f0 push {r4, r5, r6, r7, lr} 8007360: b087 sub sp, #28 8007362: af00 add r7, sp, #0 8007364: 60f8 str r0, [r7, #12] 8007366: 0008 movs r0, r1 8007368: 607a str r2, [r7, #4] 800736a: 0019 movs r1, r3 800736c: 230b movs r3, #11 800736e: 18fb adds r3, r7, r3 8007370: 1c02 adds r2, r0, #0 8007372: 701a strb r2, [r3, #0] 8007374: 2408 movs r4, #8 8007376: 193b adds r3, r7, r4 8007378: 1c0a adds r2, r1, #0 800737a: 801a strh r2, [r3, #0] HAL_StatusTypeDef hal_status = HAL_OK; 800737c: 2117 movs r1, #23 800737e: 187b adds r3, r7, r1 8007380: 2200 movs r2, #0 8007382: 701a strb r2, [r3, #0] USBD_StatusTypeDef usb_status = USBD_OK; 8007384: 2516 movs r5, #22 8007386: 197b adds r3, r7, r5 8007388: 2200 movs r2, #0 800738a: 701a strb r2, [r3, #0] hal_status = HAL_PCD_EP_Receive(pdev->pData, ep_addr, pbuf, size); 800738c: 68fa ldr r2, [r7, #12] 800738e: 23b0 movs r3, #176 @ 0xb0 8007390: 009b lsls r3, r3, #2 8007392: 58d0 ldr r0, [r2, r3] 8007394: 193b adds r3, r7, r4 8007396: 881d ldrh r5, [r3, #0] 8007398: 000e movs r6, r1 800739a: 187c adds r4, r7, r1 800739c: 687a ldr r2, [r7, #4] 800739e: 230b movs r3, #11 80073a0: 18fb adds r3, r7, r3 80073a2: 7819 ldrb r1, [r3, #0] 80073a4: 002b movs r3, r5 80073a6: f7f9 fecb bl 8001140 80073aa: 0003 movs r3, r0 80073ac: 7023 strb r3, [r4, #0] usb_status = USBD_Get_USB_Status(hal_status); 80073ae: 2516 movs r5, #22 80073b0: 197c adds r4, r7, r5 80073b2: 19bb adds r3, r7, r6 80073b4: 781b ldrb r3, [r3, #0] 80073b6: 0018 movs r0, r3 80073b8: f000 f823 bl 8007402 80073bc: 0003 movs r3, r0 80073be: 7023 strb r3, [r4, #0] return usb_status; 80073c0: 197b adds r3, r7, r5 80073c2: 781b ldrb r3, [r3, #0] } 80073c4: 0018 movs r0, r3 80073c6: 46bd mov sp, r7 80073c8: b007 add sp, #28 80073ca: bdf0 pop {r4, r5, r6, r7, pc} 080073cc : * @brief Static single allocation. * @param size: Size of allocated memory * @retval None */ void *USBD_static_malloc(uint32_t size) { 80073cc: b580 push {r7, lr} 80073ce: b082 sub sp, #8 80073d0: af00 add r7, sp, #0 80073d2: 6078 str r0, [r7, #4] static uint32_t mem[(sizeof(USBD_HID_HandleTypeDef)/4)+1];/* On 32-bit boundary */ return mem; 80073d4: 4b02 ldr r3, [pc, #8] @ (80073e0 ) } 80073d6: 0018 movs r0, r3 80073d8: 46bd mov sp, r7 80073da: b002 add sp, #8 80073dc: bd80 pop {r7, pc} 80073de: 46c0 nop @ (mov r8, r8) 80073e0: 20000940 .word 0x20000940 080073e4 : * @brief Dummy memory free * @param p: Pointer to allocated memory address * @retval None */ void USBD_static_free(void *p) { 80073e4: b580 push {r7, lr} 80073e6: b082 sub sp, #8 80073e8: af00 add r7, sp, #0 80073ea: 6078 str r0, [r7, #4] } 80073ec: 46c0 nop @ (mov r8, r8) 80073ee: 46bd mov sp, r7 80073f0: b002 add sp, #8 80073f2: bd80 pop {r7, pc} 080073f4 : * @brief Configures system clock after wake-up from USB Resume CallBack: * enable HSI, PLL and select PLL as system clock source. * @retval None */ static void SystemClockConfig_Resume(void) { 80073f4: b580 push {r7, lr} 80073f6: af00 add r7, sp, #0 SystemClock_Config(); 80073f8: f7f8 ff82 bl 8000300 } 80073fc: 46c0 nop @ (mov r8, r8) 80073fe: 46bd mov sp, r7 8007400: bd80 pop {r7, pc} 08007402 : * @brief Returns the USB status depending on the HAL status: * @param hal_status: HAL status * @retval USB status */ USBD_StatusTypeDef USBD_Get_USB_Status(HAL_StatusTypeDef hal_status) { 8007402: b580 push {r7, lr} 8007404: b084 sub sp, #16 8007406: af00 add r7, sp, #0 8007408: 0002 movs r2, r0 800740a: 1dfb adds r3, r7, #7 800740c: 701a strb r2, [r3, #0] USBD_StatusTypeDef usb_status = USBD_OK; 800740e: 230f movs r3, #15 8007410: 18fb adds r3, r7, r3 8007412: 2200 movs r2, #0 8007414: 701a strb r2, [r3, #0] switch (hal_status) 8007416: 1dfb adds r3, r7, #7 8007418: 781b ldrb r3, [r3, #0] 800741a: 2b03 cmp r3, #3 800741c: d017 beq.n 800744e 800741e: dc1b bgt.n 8007458 8007420: 2b02 cmp r3, #2 8007422: d00f beq.n 8007444 8007424: dc18 bgt.n 8007458 8007426: 2b00 cmp r3, #0 8007428: d002 beq.n 8007430 800742a: 2b01 cmp r3, #1 800742c: d005 beq.n 800743a 800742e: e013 b.n 8007458 { case HAL_OK : usb_status = USBD_OK; 8007430: 230f movs r3, #15 8007432: 18fb adds r3, r7, r3 8007434: 2200 movs r2, #0 8007436: 701a strb r2, [r3, #0] break; 8007438: e013 b.n 8007462 case HAL_ERROR : usb_status = USBD_FAIL; 800743a: 230f movs r3, #15 800743c: 18fb adds r3, r7, r3 800743e: 2202 movs r2, #2 8007440: 701a strb r2, [r3, #0] break; 8007442: e00e b.n 8007462 case HAL_BUSY : usb_status = USBD_BUSY; 8007444: 230f movs r3, #15 8007446: 18fb adds r3, r7, r3 8007448: 2201 movs r2, #1 800744a: 701a strb r2, [r3, #0] break; 800744c: e009 b.n 8007462 case HAL_TIMEOUT : usb_status = USBD_FAIL; 800744e: 230f movs r3, #15 8007450: 18fb adds r3, r7, r3 8007452: 2202 movs r2, #2 8007454: 701a strb r2, [r3, #0] break; 8007456: e004 b.n 8007462 default : usb_status = USBD_FAIL; 8007458: 230f movs r3, #15 800745a: 18fb adds r3, r7, r3 800745c: 2202 movs r2, #2 800745e: 701a strb r2, [r3, #0] break; 8007460: 46c0 nop @ (mov r8, r8) } return usb_status; 8007462: 230f movs r3, #15 8007464: 18fb adds r3, r7, r3 8007466: 781b ldrb r3, [r3, #0] } 8007468: 0018 movs r0, r3 800746a: 46bd mov sp, r7 800746c: b004 add sp, #16 800746e: bd80 pop {r7, pc} 08007470 : 8007470: 0003 movs r3, r0 8007472: 1882 adds r2, r0, r2 8007474: 4293 cmp r3, r2 8007476: d100 bne.n 800747a 8007478: 4770 bx lr 800747a: 7019 strb r1, [r3, #0] 800747c: 3301 adds r3, #1 800747e: e7f9 b.n 8007474 08007480 <__libc_init_array>: 8007480: b570 push {r4, r5, r6, lr} 8007482: 2600 movs r6, #0 8007484: 4c0c ldr r4, [pc, #48] @ (80074b8 <__libc_init_array+0x38>) 8007486: 4d0d ldr r5, [pc, #52] @ (80074bc <__libc_init_array+0x3c>) 8007488: 1b64 subs r4, r4, r5 800748a: 10a4 asrs r4, r4, #2 800748c: 42a6 cmp r6, r4 800748e: d109 bne.n 80074a4 <__libc_init_array+0x24> 8007490: 2600 movs r6, #0 8007492: f000 f819 bl 80074c8 <_init> 8007496: 4c0a ldr r4, [pc, #40] @ (80074c0 <__libc_init_array+0x40>) 8007498: 4d0a ldr r5, [pc, #40] @ (80074c4 <__libc_init_array+0x44>) 800749a: 1b64 subs r4, r4, r5 800749c: 10a4 asrs r4, r4, #2 800749e: 42a6 cmp r6, r4 80074a0: d105 bne.n 80074ae <__libc_init_array+0x2e> 80074a2: bd70 pop {r4, r5, r6, pc} 80074a4: 00b3 lsls r3, r6, #2 80074a6: 58eb ldr r3, [r5, r3] 80074a8: 4798 blx r3 80074aa: 3601 adds r6, #1 80074ac: e7ee b.n 800748c <__libc_init_array+0xc> 80074ae: 00b3 lsls r3, r6, #2 80074b0: 58eb ldr r3, [r5, r3] 80074b2: 4798 blx r3 80074b4: 3601 adds r6, #1 80074b6: e7f2 b.n 800749e <__libc_init_array+0x1e> 80074b8: 080075ac .word 0x080075ac 80074bc: 080075ac .word 0x080075ac 80074c0: 080075b0 .word 0x080075b0 80074c4: 080075ac .word 0x080075ac 080074c8 <_init>: 80074c8: b5f8 push {r3, r4, r5, r6, r7, lr} 80074ca: 46c0 nop @ (mov r8, r8) 80074cc: bcf8 pop {r3, r4, r5, r6, r7} 80074ce: bc08 pop {r3} 80074d0: 469e mov lr, r3 80074d2: 4770 bx lr 080074d4 <_fini>: 80074d4: b5f8 push {r3, r4, r5, r6, r7, lr} 80074d6: 46c0 nop @ (mov r8, r8) 80074d8: bcf8 pop {r3, r4, r5, r6, r7} 80074da: bc08 pop {r3} 80074dc: 469e mov lr, r3 80074de: 4770 bx lr