STM32Board.elf: file format elf32-littlearm Sections: Idx Name Size VMA LMA File off Algn 0 .isr_vector 0000010c 08000000 08000000 00010000 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .text 000066d4 0800010c 0800010c 0001010c 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .rodata 0000006c 080067e0 080067e0 000167e0 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .ARM.extab 00000000 0800684c 0800684c 0002017c 2**0 CONTENTS 4 .ARM 00000000 0800684c 0800684c 0002017c 2**0 CONTENTS 5 .preinit_array 00000000 0800684c 0800684c 0002017c 2**0 CONTENTS, ALLOC, LOAD, DATA 6 .init_array 00000004 0800684c 0800684c 0001684c 2**2 CONTENTS, ALLOC, LOAD, DATA 7 .fini_array 00000004 08006850 08006850 00016850 2**2 CONTENTS, ALLOC, LOAD, DATA 8 .data 0000017c 20000000 08006854 00020000 2**2 CONTENTS, ALLOC, LOAD, DATA 9 .bss 000011c4 2000017c 080069d0 0002017c 2**2 ALLOC 10 ._user_heap_stack 00000600 20001340 080069d0 00021340 2**0 ALLOC 11 .ARM.attributes 00000029 00000000 00000000 0002017c 2**0 CONTENTS, READONLY 12 .debug_info 0000fc87 00000000 00000000 000201a5 2**0 CONTENTS, READONLY, DEBUGGING 13 .debug_abbrev 0000273f 00000000 00000000 0002fe2c 2**0 CONTENTS, READONLY, DEBUGGING 14 .debug_aranges 00000a08 00000000 00000000 00032570 2**3 CONTENTS, READONLY, DEBUGGING 15 .debug_ranges 000008d0 00000000 00000000 00032f78 2**3 CONTENTS, READONLY, DEBUGGING 16 .debug_macro 0001933f 00000000 00000000 00033848 2**0 CONTENTS, READONLY, DEBUGGING 17 .debug_line 0000b333 00000000 00000000 0004cb87 2**0 CONTENTS, READONLY, DEBUGGING 18 .debug_str 00084402 00000000 00000000 00057eba 2**0 CONTENTS, READONLY, DEBUGGING 19 .comment 0000007b 00000000 00000000 000dc2bc 2**0 CONTENTS, READONLY 20 .debug_frame 00002658 00000000 00000000 000dc338 2**2 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 0800010c <__do_global_dtors_aux>: 800010c: b510 push {r4, lr} 800010e: 4c05 ldr r4, [pc, #20] ; (8000124 <__do_global_dtors_aux+0x18>) 8000110: 7823 ldrb r3, [r4, #0] 8000112: b933 cbnz r3, 8000122 <__do_global_dtors_aux+0x16> 8000114: 4b04 ldr r3, [pc, #16] ; (8000128 <__do_global_dtors_aux+0x1c>) 8000116: b113 cbz r3, 800011e <__do_global_dtors_aux+0x12> 8000118: 4804 ldr r0, [pc, #16] ; (800012c <__do_global_dtors_aux+0x20>) 800011a: f3af 8000 nop.w 800011e: 2301 movs r3, #1 8000120: 7023 strb r3, [r4, #0] 8000122: bd10 pop {r4, pc} 8000124: 2000017c .word 0x2000017c 8000128: 00000000 .word 0x00000000 800012c: 080067c8 .word 0x080067c8 08000130 : 8000130: b508 push {r3, lr} 8000132: 4b03 ldr r3, [pc, #12] ; (8000140 ) 8000134: b11b cbz r3, 800013e 8000136: 4903 ldr r1, [pc, #12] ; (8000144 ) 8000138: 4803 ldr r0, [pc, #12] ; (8000148 ) 800013a: f3af 8000 nop.w 800013e: bd08 pop {r3, pc} 8000140: 00000000 .word 0x00000000 8000144: 20000180 .word 0x20000180 8000148: 080067c8 .word 0x080067c8 0800014c
: /** * @brief The application entry point. * @retval int */ int main(void) { 800014c: b580 push {r7, lr} 800014e: af00 add r7, sp, #0 /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); 8000150: f000 f924 bl 800039c /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); 8000154: f000 f805 bl 8000162 /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); 8000158: f000 f85e bl 8000218 MX_USB_DEVICE_Init(); 800015c: f005 fe92 bl 8005e84 /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) 8000160: e7fe b.n 8000160 08000162 : /** * @brief System Clock Configuration * @retval None */ void SystemClock_Config(void) { 8000162: b580 push {r7, lr} 8000164: b094 sub sp, #80 ; 0x50 8000166: af00 add r7, sp, #0 RCC_OscInitTypeDef RCC_OscInitStruct = {0}; 8000168: f107 0328 add.w r3, r7, #40 ; 0x28 800016c: 2228 movs r2, #40 ; 0x28 800016e: 2100 movs r1, #0 8000170: 4618 mov r0, r3 8000172: f006 fb21 bl 80067b8 RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; 8000176: f107 0314 add.w r3, r7, #20 800017a: 2200 movs r2, #0 800017c: 601a str r2, [r3, #0] 800017e: 605a str r2, [r3, #4] 8000180: 609a str r2, [r3, #8] 8000182: 60da str r2, [r3, #12] 8000184: 611a str r2, [r3, #16] RCC_PeriphCLKInitTypeDef PeriphClkInit = {0}; 8000186: 1d3b adds r3, r7, #4 8000188: 2200 movs r2, #0 800018a: 601a str r2, [r3, #0] 800018c: 605a str r2, [r3, #4] 800018e: 609a str r2, [r3, #8] 8000190: 60da str r2, [r3, #12] /** Initializes the RCC Oscillators according to the specified parameters * in the RCC_OscInitTypeDef structure. */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; 8000192: 2301 movs r3, #1 8000194: 62bb str r3, [r7, #40] ; 0x28 RCC_OscInitStruct.HSEState = RCC_HSE_ON; 8000196: f44f 3380 mov.w r3, #65536 ; 0x10000 800019a: 62fb str r3, [r7, #44] ; 0x2c RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1; 800019c: 2300 movs r3, #0 800019e: 633b str r3, [r7, #48] ; 0x30 RCC_OscInitStruct.HSIState = RCC_HSI_ON; 80001a0: 2301 movs r3, #1 80001a2: 63bb str r3, [r7, #56] ; 0x38 RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; 80001a4: 2302 movs r3, #2 80001a6: 647b str r3, [r7, #68] ; 0x44 RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; 80001a8: f44f 3380 mov.w r3, #65536 ; 0x10000 80001ac: 64bb str r3, [r7, #72] ; 0x48 RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6; 80001ae: f44f 1380 mov.w r3, #1048576 ; 0x100000 80001b2: 64fb str r3, [r7, #76] ; 0x4c if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) 80001b4: f107 0328 add.w r3, r7, #40 ; 0x28 80001b8: 4618 mov r0, r3 80001ba: f001 fde1 bl 8001d80 80001be: 4603 mov r3, r0 80001c0: 2b00 cmp r3, #0 80001c2: d001 beq.n 80001c8 { Error_Handler(); 80001c4: f000 f856 bl 8000274 } /** Initializes the CPU, AHB and APB buses clocks */ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK 80001c8: 230f movs r3, #15 80001ca: 617b str r3, [r7, #20] |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; 80001cc: 2302 movs r3, #2 80001ce: 61bb str r3, [r7, #24] RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; 80001d0: 2300 movs r3, #0 80001d2: 61fb str r3, [r7, #28] RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; 80001d4: f44f 6380 mov.w r3, #1024 ; 0x400 80001d8: 623b str r3, [r7, #32] RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; 80001da: 2300 movs r3, #0 80001dc: 627b str r3, [r7, #36] ; 0x24 if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) 80001de: f107 0314 add.w r3, r7, #20 80001e2: 2101 movs r1, #1 80001e4: 4618 mov r0, r3 80001e6: f002 f84b bl 8002280 80001ea: 4603 mov r3, r0 80001ec: 2b00 cmp r3, #0 80001ee: d001 beq.n 80001f4 { Error_Handler(); 80001f0: f000 f840 bl 8000274 } PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB; 80001f4: 2310 movs r3, #16 80001f6: 607b str r3, [r7, #4] PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLL; 80001f8: f44f 0380 mov.w r3, #4194304 ; 0x400000 80001fc: 613b str r3, [r7, #16] if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) 80001fe: 1d3b adds r3, r7, #4 8000200: 4618 mov r0, r3 8000202: f002 f9a7 bl 8002554 8000206: 4603 mov r3, r0 8000208: 2b00 cmp r3, #0 800020a: d001 beq.n 8000210 { Error_Handler(); 800020c: f000 f832 bl 8000274 } } 8000210: bf00 nop 8000212: 3750 adds r7, #80 ; 0x50 8000214: 46bd mov sp, r7 8000216: bd80 pop {r7, pc} 08000218 : * @brief GPIO Initialization Function * @param None * @retval None */ static void MX_GPIO_Init(void) { 8000218: b480 push {r7} 800021a: b085 sub sp, #20 800021c: af00 add r7, sp, #0 /* GPIO Ports Clock Enable */ __HAL_RCC_GPIOC_CLK_ENABLE(); 800021e: 4b14 ldr r3, [pc, #80] ; (8000270 ) 8000220: 699b ldr r3, [r3, #24] 8000222: 4a13 ldr r2, [pc, #76] ; (8000270 ) 8000224: f043 0310 orr.w r3, r3, #16 8000228: 6193 str r3, [r2, #24] 800022a: 4b11 ldr r3, [pc, #68] ; (8000270 ) 800022c: 699b ldr r3, [r3, #24] 800022e: f003 0310 and.w r3, r3, #16 8000232: 60fb str r3, [r7, #12] 8000234: 68fb ldr r3, [r7, #12] __HAL_RCC_GPIOD_CLK_ENABLE(); 8000236: 4b0e ldr r3, [pc, #56] ; (8000270 ) 8000238: 699b ldr r3, [r3, #24] 800023a: 4a0d ldr r2, [pc, #52] ; (8000270 ) 800023c: f043 0320 orr.w r3, r3, #32 8000240: 6193 str r3, [r2, #24] 8000242: 4b0b ldr r3, [pc, #44] ; (8000270 ) 8000244: 699b ldr r3, [r3, #24] 8000246: f003 0320 and.w r3, r3, #32 800024a: 60bb str r3, [r7, #8] 800024c: 68bb ldr r3, [r7, #8] __HAL_RCC_GPIOA_CLK_ENABLE(); 800024e: 4b08 ldr r3, [pc, #32] ; (8000270 ) 8000250: 699b ldr r3, [r3, #24] 8000252: 4a07 ldr r2, [pc, #28] ; (8000270 ) 8000254: f043 0304 orr.w r3, r3, #4 8000258: 6193 str r3, [r2, #24] 800025a: 4b05 ldr r3, [pc, #20] ; (8000270 ) 800025c: 699b ldr r3, [r3, #24] 800025e: f003 0304 and.w r3, r3, #4 8000262: 607b str r3, [r7, #4] 8000264: 687b ldr r3, [r7, #4] } 8000266: bf00 nop 8000268: 3714 adds r7, #20 800026a: 46bd mov sp, r7 800026c: bc80 pop {r7} 800026e: 4770 bx lr 8000270: 40021000 .word 0x40021000 08000274 : /** * @brief This function is executed in case of error occurrence. * @retval None */ void Error_Handler(void) { 8000274: b480 push {r7} 8000276: 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"); 8000278: b672 cpsid i /* USER CODE BEGIN Error_Handler_Debug */ /* User can add his own implementation to report the HAL error return state */ __disable_irq(); while (1) 800027a: e7fe b.n 800027a 0800027c : /* USER CODE END 0 */ /** * Initializes the Global MSP. */ void HAL_MspInit(void) { 800027c: b480 push {r7} 800027e: b085 sub sp, #20 8000280: af00 add r7, sp, #0 /* USER CODE BEGIN MspInit 0 */ /* USER CODE END MspInit 0 */ __HAL_RCC_AFIO_CLK_ENABLE(); 8000282: 4b15 ldr r3, [pc, #84] ; (80002d8 ) 8000284: 699b ldr r3, [r3, #24] 8000286: 4a14 ldr r2, [pc, #80] ; (80002d8 ) 8000288: f043 0301 orr.w r3, r3, #1 800028c: 6193 str r3, [r2, #24] 800028e: 4b12 ldr r3, [pc, #72] ; (80002d8 ) 8000290: 699b ldr r3, [r3, #24] 8000292: f003 0301 and.w r3, r3, #1 8000296: 60bb str r3, [r7, #8] 8000298: 68bb ldr r3, [r7, #8] __HAL_RCC_PWR_CLK_ENABLE(); 800029a: 4b0f ldr r3, [pc, #60] ; (80002d8 ) 800029c: 69db ldr r3, [r3, #28] 800029e: 4a0e ldr r2, [pc, #56] ; (80002d8 ) 80002a0: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000 80002a4: 61d3 str r3, [r2, #28] 80002a6: 4b0c ldr r3, [pc, #48] ; (80002d8 ) 80002a8: 69db ldr r3, [r3, #28] 80002aa: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 80002ae: 607b str r3, [r7, #4] 80002b0: 687b ldr r3, [r7, #4] /* System interrupt init*/ /** NOJTAG: JTAG-DP Disabled and SW-DP Enabled */ __HAL_AFIO_REMAP_SWJ_NOJTAG(); 80002b2: 4b0a ldr r3, [pc, #40] ; (80002dc ) 80002b4: 685b ldr r3, [r3, #4] 80002b6: 60fb str r3, [r7, #12] 80002b8: 68fb ldr r3, [r7, #12] 80002ba: f023 63e0 bic.w r3, r3, #117440512 ; 0x7000000 80002be: 60fb str r3, [r7, #12] 80002c0: 68fb ldr r3, [r7, #12] 80002c2: f043 7300 orr.w r3, r3, #33554432 ; 0x2000000 80002c6: 60fb str r3, [r7, #12] 80002c8: 4a04 ldr r2, [pc, #16] ; (80002dc ) 80002ca: 68fb ldr r3, [r7, #12] 80002cc: 6053 str r3, [r2, #4] /* USER CODE BEGIN MspInit 1 */ /* USER CODE END MspInit 1 */ } 80002ce: bf00 nop 80002d0: 3714 adds r7, #20 80002d2: 46bd mov sp, r7 80002d4: bc80 pop {r7} 80002d6: 4770 bx lr 80002d8: 40021000 .word 0x40021000 80002dc: 40010000 .word 0x40010000 080002e0 : /******************************************************************************/ /** * @brief This function handles Non maskable interrupt. */ void NMI_Handler(void) { 80002e0: b480 push {r7} 80002e2: 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) 80002e4: e7fe b.n 80002e4 080002e6 : /** * @brief This function handles Hard fault interrupt. */ void HardFault_Handler(void) { 80002e6: b480 push {r7} 80002e8: af00 add r7, sp, #0 /* USER CODE BEGIN HardFault_IRQn 0 */ /* USER CODE END HardFault_IRQn 0 */ while (1) 80002ea: e7fe b.n 80002ea 080002ec : /** * @brief This function handles Memory management fault. */ void MemManage_Handler(void) { 80002ec: b480 push {r7} 80002ee: af00 add r7, sp, #0 /* USER CODE BEGIN MemoryManagement_IRQn 0 */ /* USER CODE END MemoryManagement_IRQn 0 */ while (1) 80002f0: e7fe b.n 80002f0 080002f2 : /** * @brief This function handles Prefetch fault, memory access fault. */ void BusFault_Handler(void) { 80002f2: b480 push {r7} 80002f4: af00 add r7, sp, #0 /* USER CODE BEGIN BusFault_IRQn 0 */ /* USER CODE END BusFault_IRQn 0 */ while (1) 80002f6: e7fe b.n 80002f6 080002f8 : /** * @brief This function handles Undefined instruction or illegal state. */ void UsageFault_Handler(void) { 80002f8: b480 push {r7} 80002fa: af00 add r7, sp, #0 /* USER CODE BEGIN UsageFault_IRQn 0 */ /* USER CODE END UsageFault_IRQn 0 */ while (1) 80002fc: e7fe b.n 80002fc 080002fe : /** * @brief This function handles System service call via SWI instruction. */ void SVC_Handler(void) { 80002fe: b480 push {r7} 8000300: af00 add r7, sp, #0 /* USER CODE END SVCall_IRQn 0 */ /* USER CODE BEGIN SVCall_IRQn 1 */ /* USER CODE END SVCall_IRQn 1 */ } 8000302: bf00 nop 8000304: 46bd mov sp, r7 8000306: bc80 pop {r7} 8000308: 4770 bx lr 0800030a : /** * @brief This function handles Debug monitor. */ void DebugMon_Handler(void) { 800030a: b480 push {r7} 800030c: af00 add r7, sp, #0 /* USER CODE END DebugMonitor_IRQn 0 */ /* USER CODE BEGIN DebugMonitor_IRQn 1 */ /* USER CODE END DebugMonitor_IRQn 1 */ } 800030e: bf00 nop 8000310: 46bd mov sp, r7 8000312: bc80 pop {r7} 8000314: 4770 bx lr 08000316 : /** * @brief This function handles Pendable request for system service. */ void PendSV_Handler(void) { 8000316: b480 push {r7} 8000318: af00 add r7, sp, #0 /* USER CODE END PendSV_IRQn 0 */ /* USER CODE BEGIN PendSV_IRQn 1 */ /* USER CODE END PendSV_IRQn 1 */ } 800031a: bf00 nop 800031c: 46bd mov sp, r7 800031e: bc80 pop {r7} 8000320: 4770 bx lr 08000322 : /** * @brief This function handles System tick timer. */ void SysTick_Handler(void) { 8000322: b580 push {r7, lr} 8000324: af00 add r7, sp, #0 /* USER CODE BEGIN SysTick_IRQn 0 */ /* USER CODE END SysTick_IRQn 0 */ HAL_IncTick(); 8000326: f000 f87f bl 8000428 /* USER CODE BEGIN SysTick_IRQn 1 */ /* USER CODE END SysTick_IRQn 1 */ } 800032a: bf00 nop 800032c: bd80 pop {r7, pc} ... 08000330 : /** * @brief This function handles USB low priority or CAN RX0 interrupts. */ void USB_LP_CAN1_RX0_IRQHandler(void) { 8000330: b580 push {r7, lr} 8000332: af00 add r7, sp, #0 /* USER CODE BEGIN USB_LP_CAN1_RX0_IRQn 0 */ /* USER CODE END USB_LP_CAN1_RX0_IRQn 0 */ HAL_PCD_IRQHandler(&hpcd_USB_FS); 8000334: 4802 ldr r0, [pc, #8] ; (8000340 ) 8000336: f000 fad1 bl 80008dc /* USER CODE BEGIN USB_LP_CAN1_RX0_IRQn 1 */ /* USER CODE END USB_LP_CAN1_RX0_IRQn 1 */ } 800033a: bf00 nop 800033c: bd80 pop {r7, pc} 800033e: bf00 nop 8000340: 20001054 .word 0x20001054 08000344 : * @note This function should be used only after reset. * @param None * @retval None */ void SystemInit (void) { 8000344: b480 push {r7} 8000346: af00 add r7, sp, #0 /* Configure the Vector Table location -------------------------------------*/ #if defined(USER_VECT_TAB_ADDRESS) SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */ #endif /* USER_VECT_TAB_ADDRESS */ } 8000348: bf00 nop 800034a: 46bd mov sp, r7 800034c: bc80 pop {r7} 800034e: 4770 bx lr 08000350 : .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 8000350: 2100 movs r1, #0 b LoopCopyDataInit 8000352: e003 b.n 800035c 08000354 : CopyDataInit: ldr r3, =_sidata 8000354: 4b0b ldr r3, [pc, #44] ; (8000384 ) ldr r3, [r3, r1] 8000356: 585b ldr r3, [r3, r1] str r3, [r0, r1] 8000358: 5043 str r3, [r0, r1] adds r1, r1, #4 800035a: 3104 adds r1, #4 0800035c : LoopCopyDataInit: ldr r0, =_sdata 800035c: 480a ldr r0, [pc, #40] ; (8000388 ) ldr r3, =_edata 800035e: 4b0b ldr r3, [pc, #44] ; (800038c ) adds r2, r0, r1 8000360: 1842 adds r2, r0, r1 cmp r2, r3 8000362: 429a cmp r2, r3 bcc CopyDataInit 8000364: d3f6 bcc.n 8000354 ldr r2, =_sbss 8000366: 4a0a ldr r2, [pc, #40] ; (8000390 ) b LoopFillZerobss 8000368: e002 b.n 8000370 0800036a : /* Zero fill the bss segment. */ FillZerobss: movs r3, #0 800036a: 2300 movs r3, #0 str r3, [r2], #4 800036c: f842 3b04 str.w r3, [r2], #4 08000370 : LoopFillZerobss: ldr r3, = _ebss 8000370: 4b08 ldr r3, [pc, #32] ; (8000394 ) cmp r2, r3 8000372: 429a cmp r2, r3 bcc FillZerobss 8000374: d3f9 bcc.n 800036a /* Call the clock system intitialization function.*/ bl SystemInit 8000376: f7ff ffe5 bl 8000344 /* Call static constructors */ bl __libc_init_array 800037a: f006 f9f9 bl 8006770 <__libc_init_array> /* Call the application's entry point.*/ bl main 800037e: f7ff fee5 bl 800014c
bx lr 8000382: 4770 bx lr ldr r3, =_sidata 8000384: 08006854 .word 0x08006854 ldr r0, =_sdata 8000388: 20000000 .word 0x20000000 ldr r3, =_edata 800038c: 2000017c .word 0x2000017c ldr r2, =_sbss 8000390: 2000017c .word 0x2000017c ldr r3, = _ebss 8000394: 20001340 .word 0x20001340 08000398 : * @retval : None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop 8000398: e7fe b.n 8000398 ... 0800039c : * need to ensure that the SysTick time base is always set to 1 millisecond * to have correct HAL operation. * @retval HAL status */ HAL_StatusTypeDef HAL_Init(void) { 800039c: b580 push {r7, lr} 800039e: af00 add r7, sp, #0 defined(STM32F102x6) || defined(STM32F102xB) || \ defined(STM32F103x6) || defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG) || \ defined(STM32F105xC) || defined(STM32F107xC) /* Prefetch buffer is not available on value line devices */ __HAL_FLASH_PREFETCH_BUFFER_ENABLE(); 80003a0: 4b08 ldr r3, [pc, #32] ; (80003c4 ) 80003a2: 681b ldr r3, [r3, #0] 80003a4: 4a07 ldr r2, [pc, #28] ; (80003c4 ) 80003a6: f043 0310 orr.w r3, r3, #16 80003aa: 6013 str r3, [r2, #0] #endif #endif /* PREFETCH_ENABLE */ /* Set Interrupt Group Priority */ HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4); 80003ac: 2003 movs r0, #3 80003ae: f000 f923 bl 80005f8 /* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */ HAL_InitTick(TICK_INT_PRIORITY); 80003b2: 2000 movs r0, #0 80003b4: f000 f808 bl 80003c8 /* Init the low level hardware */ HAL_MspInit(); 80003b8: f7ff ff60 bl 800027c /* Return function status */ return HAL_OK; 80003bc: 2300 movs r3, #0 } 80003be: 4618 mov r0, r3 80003c0: bd80 pop {r7, pc} 80003c2: bf00 nop 80003c4: 40022000 .word 0x40022000 080003c8 : * implementation in user file. * @param TickPriority Tick interrupt priority. * @retval HAL status */ __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) { 80003c8: b580 push {r7, lr} 80003ca: b082 sub sp, #8 80003cc: af00 add r7, sp, #0 80003ce: 6078 str r0, [r7, #4] /* Configure the SysTick to have interrupt in 1ms time basis*/ if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U) 80003d0: 4b12 ldr r3, [pc, #72] ; (800041c ) 80003d2: 681a ldr r2, [r3, #0] 80003d4: 4b12 ldr r3, [pc, #72] ; (8000420 ) 80003d6: 781b ldrb r3, [r3, #0] 80003d8: 4619 mov r1, r3 80003da: f44f 737a mov.w r3, #1000 ; 0x3e8 80003de: fbb3 f3f1 udiv r3, r3, r1 80003e2: fbb2 f3f3 udiv r3, r2, r3 80003e6: 4618 mov r0, r3 80003e8: f000 f93b bl 8000662 80003ec: 4603 mov r3, r0 80003ee: 2b00 cmp r3, #0 80003f0: d001 beq.n 80003f6 { return HAL_ERROR; 80003f2: 2301 movs r3, #1 80003f4: e00e b.n 8000414 } /* Configure the SysTick IRQ priority */ if (TickPriority < (1UL << __NVIC_PRIO_BITS)) 80003f6: 687b ldr r3, [r7, #4] 80003f8: 2b0f cmp r3, #15 80003fa: d80a bhi.n 8000412 { HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U); 80003fc: 2200 movs r2, #0 80003fe: 6879 ldr r1, [r7, #4] 8000400: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff 8000404: f000 f903 bl 800060e uwTickPrio = TickPriority; 8000408: 4a06 ldr r2, [pc, #24] ; (8000424 ) 800040a: 687b ldr r3, [r7, #4] 800040c: 6013 str r3, [r2, #0] { return HAL_ERROR; } /* Return function status */ return HAL_OK; 800040e: 2300 movs r3, #0 8000410: e000 b.n 8000414 return HAL_ERROR; 8000412: 2301 movs r3, #1 } 8000414: 4618 mov r0, r3 8000416: 3708 adds r7, #8 8000418: 46bd mov sp, r7 800041a: bd80 pop {r7, pc} 800041c: 20000000 .word 0x20000000 8000420: 20000008 .word 0x20000008 8000424: 20000004 .word 0x20000004 08000428 : * @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) { 8000428: b480 push {r7} 800042a: af00 add r7, sp, #0 uwTick += uwTickFreq; 800042c: 4b05 ldr r3, [pc, #20] ; (8000444 ) 800042e: 781b ldrb r3, [r3, #0] 8000430: 461a mov r2, r3 8000432: 4b05 ldr r3, [pc, #20] ; (8000448 ) 8000434: 681b ldr r3, [r3, #0] 8000436: 4413 add r3, r2 8000438: 4a03 ldr r2, [pc, #12] ; (8000448 ) 800043a: 6013 str r3, [r2, #0] } 800043c: bf00 nop 800043e: 46bd mov sp, r7 8000440: bc80 pop {r7} 8000442: 4770 bx lr 8000444: 20000008 .word 0x20000008 8000448: 200003bc .word 0x200003bc 0800044c : * @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) { 800044c: b480 push {r7} 800044e: af00 add r7, sp, #0 return uwTick; 8000450: 4b02 ldr r3, [pc, #8] ; (800045c ) 8000452: 681b ldr r3, [r3, #0] } 8000454: 4618 mov r0, r3 8000456: 46bd mov sp, r7 8000458: bc80 pop {r7} 800045a: 4770 bx lr 800045c: 200003bc .word 0x200003bc 08000460 <__NVIC_SetPriorityGrouping>: In case of a conflict between priority grouping and available priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. \param [in] PriorityGroup Priority grouping field. */ __STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) { 8000460: b480 push {r7} 8000462: b085 sub sp, #20 8000464: af00 add r7, sp, #0 8000466: 6078 str r0, [r7, #4] uint32_t reg_value; uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ 8000468: 687b ldr r3, [r7, #4] 800046a: f003 0307 and.w r3, r3, #7 800046e: 60fb str r3, [r7, #12] reg_value = SCB->AIRCR; /* read old register configuration */ 8000470: 4b0c ldr r3, [pc, #48] ; (80004a4 <__NVIC_SetPriorityGrouping+0x44>) 8000472: 68db ldr r3, [r3, #12] 8000474: 60bb str r3, [r7, #8] reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ 8000476: 68ba ldr r2, [r7, #8] 8000478: f64f 03ff movw r3, #63743 ; 0xf8ff 800047c: 4013 ands r3, r2 800047e: 60bb str r3, [r7, #8] reg_value = (reg_value | ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ 8000480: 68fb ldr r3, [r7, #12] 8000482: 021a lsls r2, r3, #8 ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | 8000484: 68bb ldr r3, [r7, #8] 8000486: 4313 orrs r3, r2 reg_value = (reg_value | 8000488: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000 800048c: f443 3300 orr.w r3, r3, #131072 ; 0x20000 8000490: 60bb str r3, [r7, #8] SCB->AIRCR = reg_value; 8000492: 4a04 ldr r2, [pc, #16] ; (80004a4 <__NVIC_SetPriorityGrouping+0x44>) 8000494: 68bb ldr r3, [r7, #8] 8000496: 60d3 str r3, [r2, #12] } 8000498: bf00 nop 800049a: 3714 adds r7, #20 800049c: 46bd mov sp, r7 800049e: bc80 pop {r7} 80004a0: 4770 bx lr 80004a2: bf00 nop 80004a4: e000ed00 .word 0xe000ed00 080004a8 <__NVIC_GetPriorityGrouping>: \brief Get Priority Grouping \details Reads the priority grouping field from the NVIC Interrupt Controller. \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). */ __STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) { 80004a8: b480 push {r7} 80004aa: af00 add r7, sp, #0 return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); 80004ac: 4b04 ldr r3, [pc, #16] ; (80004c0 <__NVIC_GetPriorityGrouping+0x18>) 80004ae: 68db ldr r3, [r3, #12] 80004b0: 0a1b lsrs r3, r3, #8 80004b2: f003 0307 and.w r3, r3, #7 } 80004b6: 4618 mov r0, r3 80004b8: 46bd mov sp, r7 80004ba: bc80 pop {r7} 80004bc: 4770 bx lr 80004be: bf00 nop 80004c0: e000ed00 .word 0xe000ed00 080004c4 <__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) { 80004c4: b480 push {r7} 80004c6: b083 sub sp, #12 80004c8: af00 add r7, sp, #0 80004ca: 4603 mov r3, r0 80004cc: 71fb strb r3, [r7, #7] if ((int32_t)(IRQn) >= 0) 80004ce: f997 3007 ldrsb.w r3, [r7, #7] 80004d2: 2b00 cmp r3, #0 80004d4: db0b blt.n 80004ee <__NVIC_EnableIRQ+0x2a> { NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); 80004d6: 79fb ldrb r3, [r7, #7] 80004d8: f003 021f and.w r2, r3, #31 80004dc: 4906 ldr r1, [pc, #24] ; (80004f8 <__NVIC_EnableIRQ+0x34>) 80004de: f997 3007 ldrsb.w r3, [r7, #7] 80004e2: 095b lsrs r3, r3, #5 80004e4: 2001 movs r0, #1 80004e6: fa00 f202 lsl.w r2, r0, r2 80004ea: f841 2023 str.w r2, [r1, r3, lsl #2] } } 80004ee: bf00 nop 80004f0: 370c adds r7, #12 80004f2: 46bd mov sp, r7 80004f4: bc80 pop {r7} 80004f6: 4770 bx lr 80004f8: e000e100 .word 0xe000e100 080004fc <__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) { 80004fc: b480 push {r7} 80004fe: b083 sub sp, #12 8000500: af00 add r7, sp, #0 8000502: 4603 mov r3, r0 8000504: 6039 str r1, [r7, #0] 8000506: 71fb strb r3, [r7, #7] if ((int32_t)(IRQn) >= 0) 8000508: f997 3007 ldrsb.w r3, [r7, #7] 800050c: 2b00 cmp r3, #0 800050e: db0a blt.n 8000526 <__NVIC_SetPriority+0x2a> { NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 8000510: 683b ldr r3, [r7, #0] 8000512: b2da uxtb r2, r3 8000514: 490c ldr r1, [pc, #48] ; (8000548 <__NVIC_SetPriority+0x4c>) 8000516: f997 3007 ldrsb.w r3, [r7, #7] 800051a: 0112 lsls r2, r2, #4 800051c: b2d2 uxtb r2, r2 800051e: 440b add r3, r1 8000520: f883 2300 strb.w r2, [r3, #768] ; 0x300 } else { SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); } } 8000524: e00a b.n 800053c <__NVIC_SetPriority+0x40> SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 8000526: 683b ldr r3, [r7, #0] 8000528: b2da uxtb r2, r3 800052a: 4908 ldr r1, [pc, #32] ; (800054c <__NVIC_SetPriority+0x50>) 800052c: 79fb ldrb r3, [r7, #7] 800052e: f003 030f and.w r3, r3, #15 8000532: 3b04 subs r3, #4 8000534: 0112 lsls r2, r2, #4 8000536: b2d2 uxtb r2, r2 8000538: 440b add r3, r1 800053a: 761a strb r2, [r3, #24] } 800053c: bf00 nop 800053e: 370c adds r7, #12 8000540: 46bd mov sp, r7 8000542: bc80 pop {r7} 8000544: 4770 bx lr 8000546: bf00 nop 8000548: e000e100 .word 0xe000e100 800054c: e000ed00 .word 0xe000ed00 08000550 : \param [in] PreemptPriority Preemptive priority value (starting from 0). \param [in] SubPriority Subpriority value (starting from 0). \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). */ __STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) { 8000550: b480 push {r7} 8000552: b089 sub sp, #36 ; 0x24 8000554: af00 add r7, sp, #0 8000556: 60f8 str r0, [r7, #12] 8000558: 60b9 str r1, [r7, #8] 800055a: 607a str r2, [r7, #4] uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ 800055c: 68fb ldr r3, [r7, #12] 800055e: f003 0307 and.w r3, r3, #7 8000562: 61fb str r3, [r7, #28] uint32_t PreemptPriorityBits; uint32_t SubPriorityBits; PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); 8000564: 69fb ldr r3, [r7, #28] 8000566: f1c3 0307 rsb r3, r3, #7 800056a: 2b04 cmp r3, #4 800056c: bf28 it cs 800056e: 2304 movcs r3, #4 8000570: 61bb str r3, [r7, #24] SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); 8000572: 69fb ldr r3, [r7, #28] 8000574: 3304 adds r3, #4 8000576: 2b06 cmp r3, #6 8000578: d902 bls.n 8000580 800057a: 69fb ldr r3, [r7, #28] 800057c: 3b03 subs r3, #3 800057e: e000 b.n 8000582 8000580: 2300 movs r3, #0 8000582: 617b str r3, [r7, #20] return ( ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | 8000584: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff 8000588: 69bb ldr r3, [r7, #24] 800058a: fa02 f303 lsl.w r3, r2, r3 800058e: 43da mvns r2, r3 8000590: 68bb ldr r3, [r7, #8] 8000592: 401a ands r2, r3 8000594: 697b ldr r3, [r7, #20] 8000596: 409a lsls r2, r3 ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) 8000598: f04f 31ff mov.w r1, #4294967295 ; 0xffffffff 800059c: 697b ldr r3, [r7, #20] 800059e: fa01 f303 lsl.w r3, r1, r3 80005a2: 43d9 mvns r1, r3 80005a4: 687b ldr r3, [r7, #4] 80005a6: 400b ands r3, r1 ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | 80005a8: 4313 orrs r3, r2 ); } 80005aa: 4618 mov r0, r3 80005ac: 3724 adds r7, #36 ; 0x24 80005ae: 46bd mov sp, r7 80005b0: bc80 pop {r7} 80005b2: 4770 bx lr 080005b4 : \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) { 80005b4: b580 push {r7, lr} 80005b6: b082 sub sp, #8 80005b8: af00 add r7, sp, #0 80005ba: 6078 str r0, [r7, #4] if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) 80005bc: 687b ldr r3, [r7, #4] 80005be: 3b01 subs r3, #1 80005c0: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000 80005c4: d301 bcc.n 80005ca { return (1UL); /* Reload value impossible */ 80005c6: 2301 movs r3, #1 80005c8: e00f b.n 80005ea } SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ 80005ca: 4a0a ldr r2, [pc, #40] ; (80005f4 ) 80005cc: 687b ldr r3, [r7, #4] 80005ce: 3b01 subs r3, #1 80005d0: 6053 str r3, [r2, #4] NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ 80005d2: 210f movs r1, #15 80005d4: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff 80005d8: f7ff ff90 bl 80004fc <__NVIC_SetPriority> SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ 80005dc: 4b05 ldr r3, [pc, #20] ; (80005f4 ) 80005de: 2200 movs r2, #0 80005e0: 609a str r2, [r3, #8] SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | 80005e2: 4b04 ldr r3, [pc, #16] ; (80005f4 ) 80005e4: 2207 movs r2, #7 80005e6: 601a str r2, [r3, #0] SysTick_CTRL_TICKINT_Msk | SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ return (0UL); /* Function successful */ 80005e8: 2300 movs r3, #0 } 80005ea: 4618 mov r0, r3 80005ec: 3708 adds r7, #8 80005ee: 46bd mov sp, r7 80005f0: bd80 pop {r7, pc} 80005f2: bf00 nop 80005f4: e000e010 .word 0xe000e010 080005f8 : * @note When the NVIC_PriorityGroup_0 is selected, IRQ preemption is no more possible. * The pending IRQ priority will be managed only by the subpriority. * @retval None */ void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup) { 80005f8: b580 push {r7, lr} 80005fa: b082 sub sp, #8 80005fc: af00 add r7, sp, #0 80005fe: 6078 str r0, [r7, #4] /* Check the parameters */ assert_param(IS_NVIC_PRIORITY_GROUP(PriorityGroup)); /* Set the PRIGROUP[10:8] bits according to the PriorityGroup parameter value */ NVIC_SetPriorityGrouping(PriorityGroup); 8000600: 6878 ldr r0, [r7, #4] 8000602: f7ff ff2d bl 8000460 <__NVIC_SetPriorityGrouping> } 8000606: bf00 nop 8000608: 3708 adds r7, #8 800060a: 46bd mov sp, r7 800060c: bd80 pop {r7, pc} 0800060e : * This parameter can be a value between 0 and 15 * A lower priority value indicates a higher priority. * @retval None */ void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority) { 800060e: b580 push {r7, lr} 8000610: b086 sub sp, #24 8000612: af00 add r7, sp, #0 8000614: 4603 mov r3, r0 8000616: 60b9 str r1, [r7, #8] 8000618: 607a str r2, [r7, #4] 800061a: 73fb strb r3, [r7, #15] uint32_t prioritygroup = 0x00U; 800061c: 2300 movs r3, #0 800061e: 617b str r3, [r7, #20] /* Check the parameters */ assert_param(IS_NVIC_SUB_PRIORITY(SubPriority)); assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority)); prioritygroup = NVIC_GetPriorityGrouping(); 8000620: f7ff ff42 bl 80004a8 <__NVIC_GetPriorityGrouping> 8000624: 6178 str r0, [r7, #20] NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority)); 8000626: 687a ldr r2, [r7, #4] 8000628: 68b9 ldr r1, [r7, #8] 800062a: 6978 ldr r0, [r7, #20] 800062c: f7ff ff90 bl 8000550 8000630: 4602 mov r2, r0 8000632: f997 300f ldrsb.w r3, [r7, #15] 8000636: 4611 mov r1, r2 8000638: 4618 mov r0, r3 800063a: f7ff ff5f bl 80004fc <__NVIC_SetPriority> } 800063e: bf00 nop 8000640: 3718 adds r7, #24 8000642: 46bd mov sp, r7 8000644: bd80 pop {r7, pc} 08000646 : * 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 (stm32f10xxx.h)) * @retval None */ void HAL_NVIC_EnableIRQ(IRQn_Type IRQn) { 8000646: b580 push {r7, lr} 8000648: b082 sub sp, #8 800064a: af00 add r7, sp, #0 800064c: 4603 mov r3, r0 800064e: 71fb strb r3, [r7, #7] /* Check the parameters */ assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); /* Enable interrupt */ NVIC_EnableIRQ(IRQn); 8000650: f997 3007 ldrsb.w r3, [r7, #7] 8000654: 4618 mov r0, r3 8000656: f7ff ff35 bl 80004c4 <__NVIC_EnableIRQ> } 800065a: bf00 nop 800065c: 3708 adds r7, #8 800065e: 46bd mov sp, r7 8000660: bd80 pop {r7, pc} 08000662 : * @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) { 8000662: b580 push {r7, lr} 8000664: b082 sub sp, #8 8000666: af00 add r7, sp, #0 8000668: 6078 str r0, [r7, #4] return SysTick_Config(TicksNumb); 800066a: 6878 ldr r0, [r7, #4] 800066c: f7ff ffa2 bl 80005b4 8000670: 4603 mov r3, r0 } 8000672: 4618 mov r0, r3 8000674: 3708 adds r7, #8 8000676: 46bd mov sp, r7 8000678: bd80 pop {r7, pc} 0800067a : * 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) { 800067a: b5f0 push {r4, r5, r6, r7, lr} 800067c: b08b sub sp, #44 ; 0x2c 800067e: af06 add r7, sp, #24 8000680: 6078 str r0, [r7, #4] USB_OTG_GlobalTypeDef *USBx; #endif /* defined (USB_OTG_FS) */ uint8_t i; /* Check the PCD handle allocation */ if (hpcd == NULL) 8000682: 687b ldr r3, [r7, #4] 8000684: 2b00 cmp r3, #0 8000686: d101 bne.n 800068c { return HAL_ERROR; 8000688: 2301 movs r3, #1 800068a: e0fd b.n 8000888 #if defined (USB_OTG_FS) USBx = hpcd->Instance; #endif /* defined (USB_OTG_FS) */ if (hpcd->State == HAL_PCD_STATE_RESET) 800068c: 687b ldr r3, [r7, #4] 800068e: f893 32a9 ldrb.w r3, [r3, #681] ; 0x2a9 8000692: b2db uxtb r3, r3 8000694: 2b00 cmp r3, #0 8000696: d106 bne.n 80006a6 { /* Allocate lock resource and initialize it */ hpcd->Lock = HAL_UNLOCKED; 8000698: 687b ldr r3, [r7, #4] 800069a: 2200 movs r2, #0 800069c: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 /* Init the low level hardware */ hpcd->MspInitCallback(hpcd); #else /* Init the low level hardware : GPIO, CLOCK, NVIC... */ HAL_PCD_MspInit(hpcd); 80006a0: 6878 ldr r0, [r7, #4] 80006a2: f005 fdbb bl 800621c #endif /* (USE_HAL_PCD_REGISTER_CALLBACKS) */ } hpcd->State = HAL_PCD_STATE_BUSY; 80006a6: 687b ldr r3, [r7, #4] 80006a8: 2203 movs r2, #3 80006aa: f883 22a9 strb.w r2, [r3, #681] ; 0x2a9 hpcd->Init.dma_enable = 0U; } #endif /* defined (USB_OTG_FS) */ /* Disable the Interrupts */ __HAL_PCD_DISABLE(hpcd); 80006ae: 687b ldr r3, [r7, #4] 80006b0: 681b ldr r3, [r3, #0] 80006b2: 4618 mov r0, r3 80006b4: f002 f82a bl 800270c /*Init the Core (common init.) */ if (USB_CoreInit(hpcd->Instance, hpcd->Init) != HAL_OK) 80006b8: 687b ldr r3, [r7, #4] 80006ba: 681b ldr r3, [r3, #0] 80006bc: 603b str r3, [r7, #0] 80006be: 687e ldr r6, [r7, #4] 80006c0: 466d mov r5, sp 80006c2: f106 0410 add.w r4, r6, #16 80006c6: cc0f ldmia r4!, {r0, r1, r2, r3} 80006c8: c50f stmia r5!, {r0, r1, r2, r3} 80006ca: 6823 ldr r3, [r4, #0] 80006cc: 602b str r3, [r5, #0] 80006ce: 1d33 adds r3, r6, #4 80006d0: cb0e ldmia r3, {r1, r2, r3} 80006d2: 6838 ldr r0, [r7, #0] 80006d4: f001 fff4 bl 80026c0 80006d8: 4603 mov r3, r0 80006da: 2b00 cmp r3, #0 80006dc: d005 beq.n 80006ea { hpcd->State = HAL_PCD_STATE_ERROR; 80006de: 687b ldr r3, [r7, #4] 80006e0: 2202 movs r2, #2 80006e2: f883 22a9 strb.w r2, [r3, #681] ; 0x2a9 return HAL_ERROR; 80006e6: 2301 movs r3, #1 80006e8: e0ce b.n 8000888 } /* Force Device Mode*/ (void)USB_SetCurrentMode(hpcd->Instance, USB_DEVICE_MODE); 80006ea: 687b ldr r3, [r7, #4] 80006ec: 681b ldr r3, [r3, #0] 80006ee: 2100 movs r1, #0 80006f0: 4618 mov r0, r3 80006f2: f002 f825 bl 8002740 /* Init endpoints structures */ for (i = 0U; i < hpcd->Init.dev_endpoints; i++) 80006f6: 2300 movs r3, #0 80006f8: 73fb strb r3, [r7, #15] 80006fa: e04c b.n 8000796 { /* Init ep structure */ hpcd->IN_ep[i].is_in = 1U; 80006fc: 7bfb ldrb r3, [r7, #15] 80006fe: 6879 ldr r1, [r7, #4] 8000700: 1c5a adds r2, r3, #1 8000702: 4613 mov r3, r2 8000704: 009b lsls r3, r3, #2 8000706: 4413 add r3, r2 8000708: 00db lsls r3, r3, #3 800070a: 440b add r3, r1 800070c: 3301 adds r3, #1 800070e: 2201 movs r2, #1 8000710: 701a strb r2, [r3, #0] hpcd->IN_ep[i].num = i; 8000712: 7bfb ldrb r3, [r7, #15] 8000714: 6879 ldr r1, [r7, #4] 8000716: 1c5a adds r2, r3, #1 8000718: 4613 mov r3, r2 800071a: 009b lsls r3, r3, #2 800071c: 4413 add r3, r2 800071e: 00db lsls r3, r3, #3 8000720: 440b add r3, r1 8000722: 7bfa ldrb r2, [r7, #15] 8000724: 701a strb r2, [r3, #0] hpcd->IN_ep[i].tx_fifo_num = i; 8000726: 7bfa ldrb r2, [r7, #15] 8000728: 7bfb ldrb r3, [r7, #15] 800072a: b298 uxth r0, r3 800072c: 6879 ldr r1, [r7, #4] 800072e: 4613 mov r3, r2 8000730: 009b lsls r3, r3, #2 8000732: 4413 add r3, r2 8000734: 00db lsls r3, r3, #3 8000736: 440b add r3, r1 8000738: 3336 adds r3, #54 ; 0x36 800073a: 4602 mov r2, r0 800073c: 801a strh r2, [r3, #0] /* Control until ep is activated */ hpcd->IN_ep[i].type = EP_TYPE_CTRL; 800073e: 7bfb ldrb r3, [r7, #15] 8000740: 6879 ldr r1, [r7, #4] 8000742: 1c5a adds r2, r3, #1 8000744: 4613 mov r3, r2 8000746: 009b lsls r3, r3, #2 8000748: 4413 add r3, r2 800074a: 00db lsls r3, r3, #3 800074c: 440b add r3, r1 800074e: 3303 adds r3, #3 8000750: 2200 movs r2, #0 8000752: 701a strb r2, [r3, #0] hpcd->IN_ep[i].maxpacket = 0U; 8000754: 7bfa ldrb r2, [r7, #15] 8000756: 6879 ldr r1, [r7, #4] 8000758: 4613 mov r3, r2 800075a: 009b lsls r3, r3, #2 800075c: 4413 add r3, r2 800075e: 00db lsls r3, r3, #3 8000760: 440b add r3, r1 8000762: 3338 adds r3, #56 ; 0x38 8000764: 2200 movs r2, #0 8000766: 601a str r2, [r3, #0] hpcd->IN_ep[i].xfer_buff = 0U; 8000768: 7bfa ldrb r2, [r7, #15] 800076a: 6879 ldr r1, [r7, #4] 800076c: 4613 mov r3, r2 800076e: 009b lsls r3, r3, #2 8000770: 4413 add r3, r2 8000772: 00db lsls r3, r3, #3 8000774: 440b add r3, r1 8000776: 333c adds r3, #60 ; 0x3c 8000778: 2200 movs r2, #0 800077a: 601a str r2, [r3, #0] hpcd->IN_ep[i].xfer_len = 0U; 800077c: 7bfa ldrb r2, [r7, #15] 800077e: 6879 ldr r1, [r7, #4] 8000780: 4613 mov r3, r2 8000782: 009b lsls r3, r3, #2 8000784: 4413 add r3, r2 8000786: 00db lsls r3, r3, #3 8000788: 440b add r3, r1 800078a: 3340 adds r3, #64 ; 0x40 800078c: 2200 movs r2, #0 800078e: 601a str r2, [r3, #0] for (i = 0U; i < hpcd->Init.dev_endpoints; i++) 8000790: 7bfb ldrb r3, [r7, #15] 8000792: 3301 adds r3, #1 8000794: 73fb strb r3, [r7, #15] 8000796: 7bfa ldrb r2, [r7, #15] 8000798: 687b ldr r3, [r7, #4] 800079a: 685b ldr r3, [r3, #4] 800079c: 429a cmp r2, r3 800079e: d3ad bcc.n 80006fc } for (i = 0U; i < hpcd->Init.dev_endpoints; i++) 80007a0: 2300 movs r3, #0 80007a2: 73fb strb r3, [r7, #15] 80007a4: e044 b.n 8000830 { hpcd->OUT_ep[i].is_in = 0U; 80007a6: 7bfa ldrb r2, [r7, #15] 80007a8: 6879 ldr r1, [r7, #4] 80007aa: 4613 mov r3, r2 80007ac: 009b lsls r3, r3, #2 80007ae: 4413 add r3, r2 80007b0: 00db lsls r3, r3, #3 80007b2: 440b add r3, r1 80007b4: f203 1369 addw r3, r3, #361 ; 0x169 80007b8: 2200 movs r2, #0 80007ba: 701a strb r2, [r3, #0] hpcd->OUT_ep[i].num = i; 80007bc: 7bfa ldrb r2, [r7, #15] 80007be: 6879 ldr r1, [r7, #4] 80007c0: 4613 mov r3, r2 80007c2: 009b lsls r3, r3, #2 80007c4: 4413 add r3, r2 80007c6: 00db lsls r3, r3, #3 80007c8: 440b add r3, r1 80007ca: f503 73b4 add.w r3, r3, #360 ; 0x168 80007ce: 7bfa ldrb r2, [r7, #15] 80007d0: 701a strb r2, [r3, #0] /* Control until ep is activated */ hpcd->OUT_ep[i].type = EP_TYPE_CTRL; 80007d2: 7bfa ldrb r2, [r7, #15] 80007d4: 6879 ldr r1, [r7, #4] 80007d6: 4613 mov r3, r2 80007d8: 009b lsls r3, r3, #2 80007da: 4413 add r3, r2 80007dc: 00db lsls r3, r3, #3 80007de: 440b add r3, r1 80007e0: f203 136b addw r3, r3, #363 ; 0x16b 80007e4: 2200 movs r2, #0 80007e6: 701a strb r2, [r3, #0] hpcd->OUT_ep[i].maxpacket = 0U; 80007e8: 7bfa ldrb r2, [r7, #15] 80007ea: 6879 ldr r1, [r7, #4] 80007ec: 4613 mov r3, r2 80007ee: 009b lsls r3, r3, #2 80007f0: 4413 add r3, r2 80007f2: 00db lsls r3, r3, #3 80007f4: 440b add r3, r1 80007f6: f503 73bc add.w r3, r3, #376 ; 0x178 80007fa: 2200 movs r2, #0 80007fc: 601a str r2, [r3, #0] hpcd->OUT_ep[i].xfer_buff = 0U; 80007fe: 7bfa ldrb r2, [r7, #15] 8000800: 6879 ldr r1, [r7, #4] 8000802: 4613 mov r3, r2 8000804: 009b lsls r3, r3, #2 8000806: 4413 add r3, r2 8000808: 00db lsls r3, r3, #3 800080a: 440b add r3, r1 800080c: f503 73be add.w r3, r3, #380 ; 0x17c 8000810: 2200 movs r2, #0 8000812: 601a str r2, [r3, #0] hpcd->OUT_ep[i].xfer_len = 0U; 8000814: 7bfa ldrb r2, [r7, #15] 8000816: 6879 ldr r1, [r7, #4] 8000818: 4613 mov r3, r2 800081a: 009b lsls r3, r3, #2 800081c: 4413 add r3, r2 800081e: 00db lsls r3, r3, #3 8000820: 440b add r3, r1 8000822: f503 73c0 add.w r3, r3, #384 ; 0x180 8000826: 2200 movs r2, #0 8000828: 601a str r2, [r3, #0] for (i = 0U; i < hpcd->Init.dev_endpoints; i++) 800082a: 7bfb ldrb r3, [r7, #15] 800082c: 3301 adds r3, #1 800082e: 73fb strb r3, [r7, #15] 8000830: 7bfa ldrb r2, [r7, #15] 8000832: 687b ldr r3, [r7, #4] 8000834: 685b ldr r3, [r3, #4] 8000836: 429a cmp r2, r3 8000838: d3b5 bcc.n 80007a6 } /* Init Device */ if (USB_DevInit(hpcd->Instance, hpcd->Init) != HAL_OK) 800083a: 687b ldr r3, [r7, #4] 800083c: 681b ldr r3, [r3, #0] 800083e: 603b str r3, [r7, #0] 8000840: 687e ldr r6, [r7, #4] 8000842: 466d mov r5, sp 8000844: f106 0410 add.w r4, r6, #16 8000848: cc0f ldmia r4!, {r0, r1, r2, r3} 800084a: c50f stmia r5!, {r0, r1, r2, r3} 800084c: 6823 ldr r3, [r4, #0] 800084e: 602b str r3, [r5, #0] 8000850: 1d33 adds r3, r6, #4 8000852: cb0e ldmia r3, {r1, r2, r3} 8000854: 6838 ldr r0, [r7, #0] 8000856: f001 ff7f bl 8002758 800085a: 4603 mov r3, r0 800085c: 2b00 cmp r3, #0 800085e: d005 beq.n 800086c { hpcd->State = HAL_PCD_STATE_ERROR; 8000860: 687b ldr r3, [r7, #4] 8000862: 2202 movs r2, #2 8000864: f883 22a9 strb.w r2, [r3, #681] ; 0x2a9 return HAL_ERROR; 8000868: 2301 movs r3, #1 800086a: e00d b.n 8000888 } hpcd->USB_Address = 0U; 800086c: 687b ldr r3, [r7, #4] 800086e: 2200 movs r2, #0 8000870: f883 2024 strb.w r2, [r3, #36] ; 0x24 hpcd->State = HAL_PCD_STATE_READY; 8000874: 687b ldr r3, [r7, #4] 8000876: 2201 movs r2, #1 8000878: f883 22a9 strb.w r2, [r3, #681] ; 0x2a9 (void)USB_DevDisconnect(hpcd->Instance); 800087c: 687b ldr r3, [r7, #4] 800087e: 681b ldr r3, [r3, #0] 8000880: 4618 mov r0, r3 8000882: f003 ff19 bl 80046b8 return HAL_OK; 8000886: 2300 movs r3, #0 } 8000888: 4618 mov r0, r3 800088a: 3714 adds r7, #20 800088c: 46bd mov sp, r7 800088e: bdf0 pop {r4, r5, r6, r7, pc} 08000890 : * @brief Start the USB device * @param hpcd PCD handle * @retval HAL status */ HAL_StatusTypeDef HAL_PCD_Start(PCD_HandleTypeDef *hpcd) { 8000890: b580 push {r7, lr} 8000892: b082 sub sp, #8 8000894: af00 add r7, sp, #0 8000896: 6078 str r0, [r7, #4] __HAL_LOCK(hpcd); 8000898: 687b ldr r3, [r7, #4] 800089a: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 800089e: 2b01 cmp r3, #1 80008a0: d101 bne.n 80008a6 80008a2: 2302 movs r3, #2 80008a4: e016 b.n 80008d4 80008a6: 687b ldr r3, [r7, #4] 80008a8: 2201 movs r2, #1 80008aa: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 __HAL_PCD_ENABLE(hpcd); 80008ae: 687b ldr r3, [r7, #4] 80008b0: 681b ldr r3, [r3, #0] 80008b2: 4618 mov r0, r3 80008b4: f001 ff14 bl 80026e0 #if defined (USB) HAL_PCDEx_SetConnectionState(hpcd, 1U); 80008b8: 2101 movs r1, #1 80008ba: 6878 ldr r0, [r7, #4] 80008bc: f005 ff21 bl 8006702 #endif /* defined (USB) */ (void)USB_DevConnect(hpcd->Instance); 80008c0: 687b ldr r3, [r7, #4] 80008c2: 681b ldr r3, [r3, #0] 80008c4: 4618 mov r0, r3 80008c6: f003 feed bl 80046a4 __HAL_UNLOCK(hpcd); 80008ca: 687b ldr r3, [r7, #4] 80008cc: 2200 movs r2, #0 80008ce: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 return HAL_OK; 80008d2: 2300 movs r3, #0 } 80008d4: 4618 mov r0, r3 80008d6: 3708 adds r7, #8 80008d8: 46bd mov sp, r7 80008da: bd80 pop {r7, pc} 080008dc : * @brief This function handles PCD interrupt request. * @param hpcd PCD handle * @retval HAL status */ void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd) { 80008dc: b580 push {r7, lr} 80008de: b088 sub sp, #32 80008e0: af00 add r7, sp, #0 80008e2: 6078 str r0, [r7, #4] uint16_t store_ep[8]; uint8_t i; if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_CTR)) 80008e4: 687b ldr r3, [r7, #4] 80008e6: 681b ldr r3, [r3, #0] 80008e8: 4618 mov r0, r3 80008ea: f003 feef bl 80046cc 80008ee: 4603 mov r3, r0 80008f0: f403 4300 and.w r3, r3, #32768 ; 0x8000 80008f4: f5b3 4f00 cmp.w r3, #32768 ; 0x8000 80008f8: d102 bne.n 8000900 { /* servicing of the endpoint correct transfer interrupt */ /* clear of the CTR flag into the sub */ (void)PCD_EP_ISR_Handler(hpcd); 80008fa: 6878 ldr r0, [r7, #4] 80008fc: f000 fb61 bl 8000fc2 } if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_RESET)) 8000900: 687b ldr r3, [r7, #4] 8000902: 681b ldr r3, [r3, #0] 8000904: 4618 mov r0, r3 8000906: f003 fee1 bl 80046cc 800090a: 4603 mov r3, r0 800090c: f403 6380 and.w r3, r3, #1024 ; 0x400 8000910: f5b3 6f80 cmp.w r3, #1024 ; 0x400 8000914: d112 bne.n 800093c { __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_RESET); 8000916: 687b ldr r3, [r7, #4] 8000918: 681b ldr r3, [r3, #0] 800091a: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 800091e: b29a uxth r2, r3 8000920: 687b ldr r3, [r7, #4] 8000922: 681b ldr r3, [r3, #0] 8000924: f422 6280 bic.w r2, r2, #1024 ; 0x400 8000928: b292 uxth r2, r2 800092a: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->ResetCallback(hpcd); #else HAL_PCD_ResetCallback(hpcd); 800092e: 6878 ldr r0, [r7, #4] 8000930: f005 fcef bl 8006312 #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ (void)HAL_PCD_SetAddress(hpcd, 0U); 8000934: 2100 movs r1, #0 8000936: 6878 ldr r0, [r7, #4] 8000938: f000 f925 bl 8000b86 } if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_PMAOVR)) 800093c: 687b ldr r3, [r7, #4] 800093e: 681b ldr r3, [r3, #0] 8000940: 4618 mov r0, r3 8000942: f003 fec3 bl 80046cc 8000946: 4603 mov r3, r0 8000948: f403 4380 and.w r3, r3, #16384 ; 0x4000 800094c: f5b3 4f80 cmp.w r3, #16384 ; 0x4000 8000950: d10b bne.n 800096a { __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_PMAOVR); 8000952: 687b ldr r3, [r7, #4] 8000954: 681b ldr r3, [r3, #0] 8000956: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 800095a: b29a uxth r2, r3 800095c: 687b ldr r3, [r7, #4] 800095e: 681b ldr r3, [r3, #0] 8000960: f422 4280 bic.w r2, r2, #16384 ; 0x4000 8000964: b292 uxth r2, r2 8000966: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 } if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_ERR)) 800096a: 687b ldr r3, [r7, #4] 800096c: 681b ldr r3, [r3, #0] 800096e: 4618 mov r0, r3 8000970: f003 feac bl 80046cc 8000974: 4603 mov r3, r0 8000976: f403 5300 and.w r3, r3, #8192 ; 0x2000 800097a: f5b3 5f00 cmp.w r3, #8192 ; 0x2000 800097e: d10b bne.n 8000998 { __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_ERR); 8000980: 687b ldr r3, [r7, #4] 8000982: 681b ldr r3, [r3, #0] 8000984: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000988: b29a uxth r2, r3 800098a: 687b ldr r3, [r7, #4] 800098c: 681b ldr r3, [r3, #0] 800098e: f422 5200 bic.w r2, r2, #8192 ; 0x2000 8000992: b292 uxth r2, r2 8000994: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 } if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_WKUP)) 8000998: 687b ldr r3, [r7, #4] 800099a: 681b ldr r3, [r3, #0] 800099c: 4618 mov r0, r3 800099e: f003 fe95 bl 80046cc 80009a2: 4603 mov r3, r0 80009a4: f403 5380 and.w r3, r3, #4096 ; 0x1000 80009a8: f5b3 5f80 cmp.w r3, #4096 ; 0x1000 80009ac: d126 bne.n 80009fc { hpcd->Instance->CNTR &= (uint16_t) ~(USB_CNTR_LP_MODE); 80009ae: 687b ldr r3, [r7, #4] 80009b0: 681b ldr r3, [r3, #0] 80009b2: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40 80009b6: b29a uxth r2, r3 80009b8: 687b ldr r3, [r7, #4] 80009ba: 681b ldr r3, [r3, #0] 80009bc: f022 0204 bic.w r2, r2, #4 80009c0: b292 uxth r2, r2 80009c2: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 hpcd->Instance->CNTR &= (uint16_t) ~(USB_CNTR_FSUSP); 80009c6: 687b ldr r3, [r7, #4] 80009c8: 681b ldr r3, [r3, #0] 80009ca: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40 80009ce: b29a uxth r2, r3 80009d0: 687b ldr r3, [r7, #4] 80009d2: 681b ldr r3, [r3, #0] 80009d4: f022 0208 bic.w r2, r2, #8 80009d8: b292 uxth r2, r2 80009da: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->ResumeCallback(hpcd); #else HAL_PCD_ResumeCallback(hpcd); 80009de: 6878 ldr r0, [r7, #4] 80009e0: f005 fcd0 bl 8006384 #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_WKUP); 80009e4: 687b ldr r3, [r7, #4] 80009e6: 681b ldr r3, [r3, #0] 80009e8: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 80009ec: b29a uxth r2, r3 80009ee: 687b ldr r3, [r7, #4] 80009f0: 681b ldr r3, [r3, #0] 80009f2: f422 5280 bic.w r2, r2, #4096 ; 0x1000 80009f6: b292 uxth r2, r2 80009f8: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 } if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_SUSP)) 80009fc: 687b ldr r3, [r7, #4] 80009fe: 681b ldr r3, [r3, #0] 8000a00: 4618 mov r0, r3 8000a02: f003 fe63 bl 80046cc 8000a06: 4603 mov r3, r0 8000a08: f403 6300 and.w r3, r3, #2048 ; 0x800 8000a0c: f5b3 6f00 cmp.w r3, #2048 ; 0x800 8000a10: f040 8084 bne.w 8000b1c { /* WA: To Clear Wakeup flag if raised with suspend signal */ /* Store Endpoint register */ for (i = 0U; i < 8U; i++) 8000a14: 2300 movs r3, #0 8000a16: 77fb strb r3, [r7, #31] 8000a18: e011 b.n 8000a3e { store_ep[i] = PCD_GET_ENDPOINT(hpcd->Instance, i); 8000a1a: 687b ldr r3, [r7, #4] 8000a1c: 681b ldr r3, [r3, #0] 8000a1e: 461a mov r2, r3 8000a20: 7ffb ldrb r3, [r7, #31] 8000a22: 009b lsls r3, r3, #2 8000a24: 441a add r2, r3 8000a26: 7ffb ldrb r3, [r7, #31] 8000a28: 8812 ldrh r2, [r2, #0] 8000a2a: b292 uxth r2, r2 8000a2c: 005b lsls r3, r3, #1 8000a2e: f107 0120 add.w r1, r7, #32 8000a32: 440b add r3, r1 8000a34: f823 2c14 strh.w r2, [r3, #-20] for (i = 0U; i < 8U; i++) 8000a38: 7ffb ldrb r3, [r7, #31] 8000a3a: 3301 adds r3, #1 8000a3c: 77fb strb r3, [r7, #31] 8000a3e: 7ffb ldrb r3, [r7, #31] 8000a40: 2b07 cmp r3, #7 8000a42: d9ea bls.n 8000a1a } /* FORCE RESET */ hpcd->Instance->CNTR |= (uint16_t)(USB_CNTR_FRES); 8000a44: 687b ldr r3, [r7, #4] 8000a46: 681b ldr r3, [r3, #0] 8000a48: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40 8000a4c: b29a uxth r2, r3 8000a4e: 687b ldr r3, [r7, #4] 8000a50: 681b ldr r3, [r3, #0] 8000a52: f042 0201 orr.w r2, r2, #1 8000a56: b292 uxth r2, r2 8000a58: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 /* CLEAR RESET */ hpcd->Instance->CNTR &= (uint16_t)(~USB_CNTR_FRES); 8000a5c: 687b ldr r3, [r7, #4] 8000a5e: 681b ldr r3, [r3, #0] 8000a60: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40 8000a64: b29a uxth r2, r3 8000a66: 687b ldr r3, [r7, #4] 8000a68: 681b ldr r3, [r3, #0] 8000a6a: f022 0201 bic.w r2, r2, #1 8000a6e: b292 uxth r2, r2 8000a70: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 /* wait for reset flag in ISTR */ while ((hpcd->Instance->ISTR & USB_ISTR_RESET) == 0U) 8000a74: bf00 nop 8000a76: 687b ldr r3, [r7, #4] 8000a78: 681b ldr r3, [r3, #0] 8000a7a: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000a7e: b29b uxth r3, r3 8000a80: f403 6380 and.w r3, r3, #1024 ; 0x400 8000a84: 2b00 cmp r3, #0 8000a86: d0f6 beq.n 8000a76 { } /* Clear Reset Flag */ __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_RESET); 8000a88: 687b ldr r3, [r7, #4] 8000a8a: 681b ldr r3, [r3, #0] 8000a8c: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000a90: b29a uxth r2, r3 8000a92: 687b ldr r3, [r7, #4] 8000a94: 681b ldr r3, [r3, #0] 8000a96: f422 6280 bic.w r2, r2, #1024 ; 0x400 8000a9a: b292 uxth r2, r2 8000a9c: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 /* Restore Registre */ for (i = 0U; i < 8U; i++) 8000aa0: 2300 movs r3, #0 8000aa2: 77fb strb r3, [r7, #31] 8000aa4: e010 b.n 8000ac8 { PCD_SET_ENDPOINT(hpcd->Instance, i, store_ep[i]); 8000aa6: 7ffb ldrb r3, [r7, #31] 8000aa8: 687a ldr r2, [r7, #4] 8000aaa: 6812 ldr r2, [r2, #0] 8000aac: 4611 mov r1, r2 8000aae: 7ffa ldrb r2, [r7, #31] 8000ab0: 0092 lsls r2, r2, #2 8000ab2: 440a add r2, r1 8000ab4: 005b lsls r3, r3, #1 8000ab6: f107 0120 add.w r1, r7, #32 8000aba: 440b add r3, r1 8000abc: f833 3c14 ldrh.w r3, [r3, #-20] 8000ac0: 8013 strh r3, [r2, #0] for (i = 0U; i < 8U; i++) 8000ac2: 7ffb ldrb r3, [r7, #31] 8000ac4: 3301 adds r3, #1 8000ac6: 77fb strb r3, [r7, #31] 8000ac8: 7ffb ldrb r3, [r7, #31] 8000aca: 2b07 cmp r3, #7 8000acc: d9eb bls.n 8000aa6 } /* Force low-power mode in the macrocell */ hpcd->Instance->CNTR |= (uint16_t)USB_CNTR_FSUSP; 8000ace: 687b ldr r3, [r7, #4] 8000ad0: 681b ldr r3, [r3, #0] 8000ad2: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40 8000ad6: b29a uxth r2, r3 8000ad8: 687b ldr r3, [r7, #4] 8000ada: 681b ldr r3, [r3, #0] 8000adc: f042 0208 orr.w r2, r2, #8 8000ae0: b292 uxth r2, r2 8000ae2: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 /* clear of the ISTR bit must be done after setting of CNTR_FSUSP */ __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_SUSP); 8000ae6: 687b ldr r3, [r7, #4] 8000ae8: 681b ldr r3, [r3, #0] 8000aea: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000aee: b29a uxth r2, r3 8000af0: 687b ldr r3, [r7, #4] 8000af2: 681b ldr r3, [r3, #0] 8000af4: f422 6200 bic.w r2, r2, #2048 ; 0x800 8000af8: b292 uxth r2, r2 8000afa: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 hpcd->Instance->CNTR |= (uint16_t)USB_CNTR_LP_MODE; 8000afe: 687b ldr r3, [r7, #4] 8000b00: 681b ldr r3, [r3, #0] 8000b02: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40 8000b06: b29a uxth r2, r3 8000b08: 687b ldr r3, [r7, #4] 8000b0a: 681b ldr r3, [r3, #0] 8000b0c: f042 0204 orr.w r2, r2, #4 8000b10: b292 uxth r2, r2 8000b12: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->SuspendCallback(hpcd); #else HAL_PCD_SuspendCallback(hpcd); 8000b16: 6878 ldr r0, [r7, #4] 8000b18: f005 fc1a bl 8006350 #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_SOF)) 8000b1c: 687b ldr r3, [r7, #4] 8000b1e: 681b ldr r3, [r3, #0] 8000b20: 4618 mov r0, r3 8000b22: f003 fdd3 bl 80046cc 8000b26: 4603 mov r3, r0 8000b28: f403 7300 and.w r3, r3, #512 ; 0x200 8000b2c: f5b3 7f00 cmp.w r3, #512 ; 0x200 8000b30: d10e bne.n 8000b50 { __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_SOF); 8000b32: 687b ldr r3, [r7, #4] 8000b34: 681b ldr r3, [r3, #0] 8000b36: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000b3a: b29a uxth r2, r3 8000b3c: 687b ldr r3, [r7, #4] 8000b3e: 681b ldr r3, [r3, #0] 8000b40: f422 7200 bic.w r2, r2, #512 ; 0x200 8000b44: b292 uxth r2, r2 8000b46: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->SOFCallback(hpcd); #else HAL_PCD_SOFCallback(hpcd); 8000b4a: 6878 ldr r0, [r7, #4] 8000b4c: f005 fbd3 bl 80062f6 #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_ESOF)) 8000b50: 687b ldr r3, [r7, #4] 8000b52: 681b ldr r3, [r3, #0] 8000b54: 4618 mov r0, r3 8000b56: f003 fdb9 bl 80046cc 8000b5a: 4603 mov r3, r0 8000b5c: f403 7380 and.w r3, r3, #256 ; 0x100 8000b60: f5b3 7f80 cmp.w r3, #256 ; 0x100 8000b64: d10b bne.n 8000b7e { /* clear ESOF flag in ISTR */ __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_ESOF); 8000b66: 687b ldr r3, [r7, #4] 8000b68: 681b ldr r3, [r3, #0] 8000b6a: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000b6e: b29a uxth r2, r3 8000b70: 687b ldr r3, [r7, #4] 8000b72: 681b ldr r3, [r3, #0] 8000b74: f422 7280 bic.w r2, r2, #256 ; 0x100 8000b78: b292 uxth r2, r2 8000b7a: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 } } 8000b7e: bf00 nop 8000b80: 3720 adds r7, #32 8000b82: 46bd mov sp, r7 8000b84: bd80 pop {r7, pc} 08000b86 : * @param hpcd PCD handle * @param address new device address * @retval HAL status */ HAL_StatusTypeDef HAL_PCD_SetAddress(PCD_HandleTypeDef *hpcd, uint8_t address) { 8000b86: b580 push {r7, lr} 8000b88: b082 sub sp, #8 8000b8a: af00 add r7, sp, #0 8000b8c: 6078 str r0, [r7, #4] 8000b8e: 460b mov r3, r1 8000b90: 70fb strb r3, [r7, #3] __HAL_LOCK(hpcd); 8000b92: 687b ldr r3, [r7, #4] 8000b94: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 8000b98: 2b01 cmp r3, #1 8000b9a: d101 bne.n 8000ba0 8000b9c: 2302 movs r3, #2 8000b9e: e013 b.n 8000bc8 8000ba0: 687b ldr r3, [r7, #4] 8000ba2: 2201 movs r2, #1 8000ba4: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 hpcd->USB_Address = address; 8000ba8: 687b ldr r3, [r7, #4] 8000baa: 78fa ldrb r2, [r7, #3] 8000bac: f883 2024 strb.w r2, [r3, #36] ; 0x24 (void)USB_SetDevAddress(hpcd->Instance, address); 8000bb0: 687b ldr r3, [r7, #4] 8000bb2: 681b ldr r3, [r3, #0] 8000bb4: 78fa ldrb r2, [r7, #3] 8000bb6: 4611 mov r1, r2 8000bb8: 4618 mov r0, r3 8000bba: f003 fd60 bl 800467e __HAL_UNLOCK(hpcd); 8000bbe: 687b ldr r3, [r7, #4] 8000bc0: 2200 movs r2, #0 8000bc2: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 return HAL_OK; 8000bc6: 2300 movs r3, #0 } 8000bc8: 4618 mov r0, r3 8000bca: 3708 adds r7, #8 8000bcc: 46bd mov sp, r7 8000bce: bd80 pop {r7, pc} 08000bd0 : * @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) { 8000bd0: b580 push {r7, lr} 8000bd2: b084 sub sp, #16 8000bd4: af00 add r7, sp, #0 8000bd6: 6078 str r0, [r7, #4] 8000bd8: 4608 mov r0, r1 8000bda: 4611 mov r1, r2 8000bdc: 461a mov r2, r3 8000bde: 4603 mov r3, r0 8000be0: 70fb strb r3, [r7, #3] 8000be2: 460b mov r3, r1 8000be4: 803b strh r3, [r7, #0] 8000be6: 4613 mov r3, r2 8000be8: 70bb strb r3, [r7, #2] HAL_StatusTypeDef ret = HAL_OK; 8000bea: 2300 movs r3, #0 8000bec: 72fb strb r3, [r7, #11] PCD_EPTypeDef *ep; if ((ep_addr & 0x80U) == 0x80U) 8000bee: f997 3003 ldrsb.w r3, [r7, #3] 8000bf2: 2b00 cmp r3, #0 8000bf4: da0e bge.n 8000c14 { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 8000bf6: 78fb ldrb r3, [r7, #3] 8000bf8: f003 0307 and.w r3, r3, #7 8000bfc: 1c5a adds r2, r3, #1 8000bfe: 4613 mov r3, r2 8000c00: 009b lsls r3, r3, #2 8000c02: 4413 add r3, r2 8000c04: 00db lsls r3, r3, #3 8000c06: 687a ldr r2, [r7, #4] 8000c08: 4413 add r3, r2 8000c0a: 60fb str r3, [r7, #12] ep->is_in = 1U; 8000c0c: 68fb ldr r3, [r7, #12] 8000c0e: 2201 movs r2, #1 8000c10: 705a strb r2, [r3, #1] 8000c12: e00e b.n 8000c32 } else { ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK]; 8000c14: 78fb ldrb r3, [r7, #3] 8000c16: f003 0207 and.w r2, r3, #7 8000c1a: 4613 mov r3, r2 8000c1c: 009b lsls r3, r3, #2 8000c1e: 4413 add r3, r2 8000c20: 00db lsls r3, r3, #3 8000c22: f503 73b4 add.w r3, r3, #360 ; 0x168 8000c26: 687a ldr r2, [r7, #4] 8000c28: 4413 add r3, r2 8000c2a: 60fb str r3, [r7, #12] ep->is_in = 0U; 8000c2c: 68fb ldr r3, [r7, #12] 8000c2e: 2200 movs r2, #0 8000c30: 705a strb r2, [r3, #1] } ep->num = ep_addr & EP_ADDR_MSK; 8000c32: 78fb ldrb r3, [r7, #3] 8000c34: f003 0307 and.w r3, r3, #7 8000c38: b2da uxtb r2, r3 8000c3a: 68fb ldr r3, [r7, #12] 8000c3c: 701a strb r2, [r3, #0] ep->maxpacket = ep_mps; 8000c3e: 883a ldrh r2, [r7, #0] 8000c40: 68fb ldr r3, [r7, #12] 8000c42: 611a str r2, [r3, #16] ep->type = ep_type; 8000c44: 68fb ldr r3, [r7, #12] 8000c46: 78ba ldrb r2, [r7, #2] 8000c48: 70da strb r2, [r3, #3] if (ep->is_in != 0U) 8000c4a: 68fb ldr r3, [r7, #12] 8000c4c: 785b ldrb r3, [r3, #1] 8000c4e: 2b00 cmp r3, #0 8000c50: d004 beq.n 8000c5c { /* Assign a Tx FIFO */ ep->tx_fifo_num = ep->num; 8000c52: 68fb ldr r3, [r7, #12] 8000c54: 781b ldrb r3, [r3, #0] 8000c56: b29a uxth r2, r3 8000c58: 68fb ldr r3, [r7, #12] 8000c5a: 81da strh r2, [r3, #14] } /* Set initial data PID. */ if (ep_type == EP_TYPE_BULK) 8000c5c: 78bb ldrb r3, [r7, #2] 8000c5e: 2b02 cmp r3, #2 8000c60: d102 bne.n 8000c68 { ep->data_pid_start = 0U; 8000c62: 68fb ldr r3, [r7, #12] 8000c64: 2200 movs r2, #0 8000c66: 711a strb r2, [r3, #4] } __HAL_LOCK(hpcd); 8000c68: 687b ldr r3, [r7, #4] 8000c6a: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 8000c6e: 2b01 cmp r3, #1 8000c70: d101 bne.n 8000c76 8000c72: 2302 movs r3, #2 8000c74: e00e b.n 8000c94 8000c76: 687b ldr r3, [r7, #4] 8000c78: 2201 movs r2, #1 8000c7a: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 (void)USB_ActivateEndpoint(hpcd->Instance, ep); 8000c7e: 687b ldr r3, [r7, #4] 8000c80: 681b ldr r3, [r3, #0] 8000c82: 68f9 ldr r1, [r7, #12] 8000c84: 4618 mov r0, r3 8000c86: f001 fd87 bl 8002798 __HAL_UNLOCK(hpcd); 8000c8a: 687b ldr r3, [r7, #4] 8000c8c: 2200 movs r2, #0 8000c8e: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 return ret; 8000c92: 7afb ldrb r3, [r7, #11] } 8000c94: 4618 mov r0, r3 8000c96: 3710 adds r7, #16 8000c98: 46bd mov sp, r7 8000c9a: bd80 pop {r7, pc} 08000c9c : * @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) { 8000c9c: b580 push {r7, lr} 8000c9e: b084 sub sp, #16 8000ca0: af00 add r7, sp, #0 8000ca2: 6078 str r0, [r7, #4] 8000ca4: 460b mov r3, r1 8000ca6: 70fb strb r3, [r7, #3] PCD_EPTypeDef *ep; if ((ep_addr & 0x80U) == 0x80U) 8000ca8: f997 3003 ldrsb.w r3, [r7, #3] 8000cac: 2b00 cmp r3, #0 8000cae: da0e bge.n 8000cce { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 8000cb0: 78fb ldrb r3, [r7, #3] 8000cb2: f003 0307 and.w r3, r3, #7 8000cb6: 1c5a adds r2, r3, #1 8000cb8: 4613 mov r3, r2 8000cba: 009b lsls r3, r3, #2 8000cbc: 4413 add r3, r2 8000cbe: 00db lsls r3, r3, #3 8000cc0: 687a ldr r2, [r7, #4] 8000cc2: 4413 add r3, r2 8000cc4: 60fb str r3, [r7, #12] ep->is_in = 1U; 8000cc6: 68fb ldr r3, [r7, #12] 8000cc8: 2201 movs r2, #1 8000cca: 705a strb r2, [r3, #1] 8000ccc: e00e b.n 8000cec } else { ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK]; 8000cce: 78fb ldrb r3, [r7, #3] 8000cd0: f003 0207 and.w r2, r3, #7 8000cd4: 4613 mov r3, r2 8000cd6: 009b lsls r3, r3, #2 8000cd8: 4413 add r3, r2 8000cda: 00db lsls r3, r3, #3 8000cdc: f503 73b4 add.w r3, r3, #360 ; 0x168 8000ce0: 687a ldr r2, [r7, #4] 8000ce2: 4413 add r3, r2 8000ce4: 60fb str r3, [r7, #12] ep->is_in = 0U; 8000ce6: 68fb ldr r3, [r7, #12] 8000ce8: 2200 movs r2, #0 8000cea: 705a strb r2, [r3, #1] } ep->num = ep_addr & EP_ADDR_MSK; 8000cec: 78fb ldrb r3, [r7, #3] 8000cee: f003 0307 and.w r3, r3, #7 8000cf2: b2da uxtb r2, r3 8000cf4: 68fb ldr r3, [r7, #12] 8000cf6: 701a strb r2, [r3, #0] __HAL_LOCK(hpcd); 8000cf8: 687b ldr r3, [r7, #4] 8000cfa: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 8000cfe: 2b01 cmp r3, #1 8000d00: d101 bne.n 8000d06 8000d02: 2302 movs r3, #2 8000d04: e00e b.n 8000d24 8000d06: 687b ldr r3, [r7, #4] 8000d08: 2201 movs r2, #1 8000d0a: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 (void)USB_DeactivateEndpoint(hpcd->Instance, ep); 8000d0e: 687b ldr r3, [r7, #4] 8000d10: 681b ldr r3, [r3, #0] 8000d12: 68f9 ldr r1, [r7, #12] 8000d14: 4618 mov r0, r3 8000d16: f002 f8a9 bl 8002e6c __HAL_UNLOCK(hpcd); 8000d1a: 687b ldr r3, [r7, #4] 8000d1c: 2200 movs r2, #0 8000d1e: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 return HAL_OK; 8000d22: 2300 movs r3, #0 } 8000d24: 4618 mov r0, r3 8000d26: 3710 adds r7, #16 8000d28: 46bd mov sp, r7 8000d2a: bd80 pop {r7, pc} 08000d2c : * @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) { 8000d2c: b580 push {r7, lr} 8000d2e: b086 sub sp, #24 8000d30: af00 add r7, sp, #0 8000d32: 60f8 str r0, [r7, #12] 8000d34: 607a str r2, [r7, #4] 8000d36: 603b str r3, [r7, #0] 8000d38: 460b mov r3, r1 8000d3a: 72fb strb r3, [r7, #11] PCD_EPTypeDef *ep; ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK]; 8000d3c: 7afb ldrb r3, [r7, #11] 8000d3e: f003 0207 and.w r2, r3, #7 8000d42: 4613 mov r3, r2 8000d44: 009b lsls r3, r3, #2 8000d46: 4413 add r3, r2 8000d48: 00db lsls r3, r3, #3 8000d4a: f503 73b4 add.w r3, r3, #360 ; 0x168 8000d4e: 68fa ldr r2, [r7, #12] 8000d50: 4413 add r3, r2 8000d52: 617b str r3, [r7, #20] /*setup and start the Xfer */ ep->xfer_buff = pBuf; 8000d54: 697b ldr r3, [r7, #20] 8000d56: 687a ldr r2, [r7, #4] 8000d58: 615a str r2, [r3, #20] ep->xfer_len = len; 8000d5a: 697b ldr r3, [r7, #20] 8000d5c: 683a ldr r2, [r7, #0] 8000d5e: 619a str r2, [r3, #24] ep->xfer_count = 0U; 8000d60: 697b ldr r3, [r7, #20] 8000d62: 2200 movs r2, #0 8000d64: 61da str r2, [r3, #28] ep->is_in = 0U; 8000d66: 697b ldr r3, [r7, #20] 8000d68: 2200 movs r2, #0 8000d6a: 705a strb r2, [r3, #1] ep->num = ep_addr & EP_ADDR_MSK; 8000d6c: 7afb ldrb r3, [r7, #11] 8000d6e: f003 0307 and.w r3, r3, #7 8000d72: b2da uxtb r2, r3 8000d74: 697b ldr r3, [r7, #20] 8000d76: 701a strb r2, [r3, #0] if ((ep_addr & EP_ADDR_MSK) == 0U) 8000d78: 7afb ldrb r3, [r7, #11] 8000d7a: f003 0307 and.w r3, r3, #7 8000d7e: 2b00 cmp r3, #0 8000d80: d106 bne.n 8000d90 { (void)USB_EP0StartXfer(hpcd->Instance, ep); 8000d82: 68fb ldr r3, [r7, #12] 8000d84: 681b ldr r3, [r3, #0] 8000d86: 6979 ldr r1, [r7, #20] 8000d88: 4618 mov r0, r3 8000d8a: f002 fa5b bl 8003244 8000d8e: e005 b.n 8000d9c } else { (void)USB_EPStartXfer(hpcd->Instance, ep); 8000d90: 68fb ldr r3, [r7, #12] 8000d92: 681b ldr r3, [r3, #0] 8000d94: 6979 ldr r1, [r7, #20] 8000d96: 4618 mov r0, r3 8000d98: f002 fa54 bl 8003244 } return HAL_OK; 8000d9c: 2300 movs r3, #0 } 8000d9e: 4618 mov r0, r3 8000da0: 3718 adds r7, #24 8000da2: 46bd mov sp, r7 8000da4: bd80 pop {r7, pc} 08000da6 : * @param hpcd PCD handle * @param ep_addr endpoint address * @retval Data Size */ uint32_t HAL_PCD_EP_GetRxCount(PCD_HandleTypeDef *hpcd, uint8_t ep_addr) { 8000da6: b480 push {r7} 8000da8: b083 sub sp, #12 8000daa: af00 add r7, sp, #0 8000dac: 6078 str r0, [r7, #4] 8000dae: 460b mov r3, r1 8000db0: 70fb strb r3, [r7, #3] return hpcd->OUT_ep[ep_addr & EP_ADDR_MSK].xfer_count; 8000db2: 78fb ldrb r3, [r7, #3] 8000db4: f003 0207 and.w r2, r3, #7 8000db8: 6879 ldr r1, [r7, #4] 8000dba: 4613 mov r3, r2 8000dbc: 009b lsls r3, r3, #2 8000dbe: 4413 add r3, r2 8000dc0: 00db lsls r3, r3, #3 8000dc2: 440b add r3, r1 8000dc4: f503 73c2 add.w r3, r3, #388 ; 0x184 8000dc8: 681b ldr r3, [r3, #0] } 8000dca: 4618 mov r0, r3 8000dcc: 370c adds r7, #12 8000dce: 46bd mov sp, r7 8000dd0: bc80 pop {r7} 8000dd2: 4770 bx lr 08000dd4 : * @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) { 8000dd4: b580 push {r7, lr} 8000dd6: b086 sub sp, #24 8000dd8: af00 add r7, sp, #0 8000dda: 60f8 str r0, [r7, #12] 8000ddc: 607a str r2, [r7, #4] 8000dde: 603b str r3, [r7, #0] 8000de0: 460b mov r3, r1 8000de2: 72fb strb r3, [r7, #11] PCD_EPTypeDef *ep; ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 8000de4: 7afb ldrb r3, [r7, #11] 8000de6: f003 0307 and.w r3, r3, #7 8000dea: 1c5a adds r2, r3, #1 8000dec: 4613 mov r3, r2 8000dee: 009b lsls r3, r3, #2 8000df0: 4413 add r3, r2 8000df2: 00db lsls r3, r3, #3 8000df4: 68fa ldr r2, [r7, #12] 8000df6: 4413 add r3, r2 8000df8: 617b str r3, [r7, #20] /*setup and start the Xfer */ ep->xfer_buff = pBuf; 8000dfa: 697b ldr r3, [r7, #20] 8000dfc: 687a ldr r2, [r7, #4] 8000dfe: 615a str r2, [r3, #20] ep->xfer_len = len; 8000e00: 697b ldr r3, [r7, #20] 8000e02: 683a ldr r2, [r7, #0] 8000e04: 619a str r2, [r3, #24] #if defined (USB) ep->xfer_fill_db = 1U; 8000e06: 697b ldr r3, [r7, #20] 8000e08: 2201 movs r2, #1 8000e0a: f883 2024 strb.w r2, [r3, #36] ; 0x24 ep->xfer_len_db = len; 8000e0e: 697b ldr r3, [r7, #20] 8000e10: 683a ldr r2, [r7, #0] 8000e12: 621a str r2, [r3, #32] #endif /* defined (USB) */ ep->xfer_count = 0U; 8000e14: 697b ldr r3, [r7, #20] 8000e16: 2200 movs r2, #0 8000e18: 61da str r2, [r3, #28] ep->is_in = 1U; 8000e1a: 697b ldr r3, [r7, #20] 8000e1c: 2201 movs r2, #1 8000e1e: 705a strb r2, [r3, #1] ep->num = ep_addr & EP_ADDR_MSK; 8000e20: 7afb ldrb r3, [r7, #11] 8000e22: f003 0307 and.w r3, r3, #7 8000e26: b2da uxtb r2, r3 8000e28: 697b ldr r3, [r7, #20] 8000e2a: 701a strb r2, [r3, #0] if ((ep_addr & EP_ADDR_MSK) == 0U) 8000e2c: 7afb ldrb r3, [r7, #11] 8000e2e: f003 0307 and.w r3, r3, #7 8000e32: 2b00 cmp r3, #0 8000e34: d106 bne.n 8000e44 { (void)USB_EP0StartXfer(hpcd->Instance, ep); 8000e36: 68fb ldr r3, [r7, #12] 8000e38: 681b ldr r3, [r3, #0] 8000e3a: 6979 ldr r1, [r7, #20] 8000e3c: 4618 mov r0, r3 8000e3e: f002 fa01 bl 8003244 8000e42: e005 b.n 8000e50 } else { (void)USB_EPStartXfer(hpcd->Instance, ep); 8000e44: 68fb ldr r3, [r7, #12] 8000e46: 681b ldr r3, [r3, #0] 8000e48: 6979 ldr r1, [r7, #20] 8000e4a: 4618 mov r0, r3 8000e4c: f002 f9fa bl 8003244 } return HAL_OK; 8000e50: 2300 movs r3, #0 } 8000e52: 4618 mov r0, r3 8000e54: 3718 adds r7, #24 8000e56: 46bd mov sp, r7 8000e58: bd80 pop {r7, pc} 08000e5a : * @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) { 8000e5a: b580 push {r7, lr} 8000e5c: b084 sub sp, #16 8000e5e: af00 add r7, sp, #0 8000e60: 6078 str r0, [r7, #4] 8000e62: 460b mov r3, r1 8000e64: 70fb strb r3, [r7, #3] PCD_EPTypeDef *ep; if (((uint32_t)ep_addr & EP_ADDR_MSK) > hpcd->Init.dev_endpoints) 8000e66: 78fb ldrb r3, [r7, #3] 8000e68: f003 0207 and.w r2, r3, #7 8000e6c: 687b ldr r3, [r7, #4] 8000e6e: 685b ldr r3, [r3, #4] 8000e70: 429a cmp r2, r3 8000e72: d901 bls.n 8000e78 { return HAL_ERROR; 8000e74: 2301 movs r3, #1 8000e76: e04c b.n 8000f12 } if ((0x80U & ep_addr) == 0x80U) 8000e78: f997 3003 ldrsb.w r3, [r7, #3] 8000e7c: 2b00 cmp r3, #0 8000e7e: da0e bge.n 8000e9e { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 8000e80: 78fb ldrb r3, [r7, #3] 8000e82: f003 0307 and.w r3, r3, #7 8000e86: 1c5a adds r2, r3, #1 8000e88: 4613 mov r3, r2 8000e8a: 009b lsls r3, r3, #2 8000e8c: 4413 add r3, r2 8000e8e: 00db lsls r3, r3, #3 8000e90: 687a ldr r2, [r7, #4] 8000e92: 4413 add r3, r2 8000e94: 60fb str r3, [r7, #12] ep->is_in = 1U; 8000e96: 68fb ldr r3, [r7, #12] 8000e98: 2201 movs r2, #1 8000e9a: 705a strb r2, [r3, #1] 8000e9c: e00c b.n 8000eb8 } else { ep = &hpcd->OUT_ep[ep_addr]; 8000e9e: 78fa ldrb r2, [r7, #3] 8000ea0: 4613 mov r3, r2 8000ea2: 009b lsls r3, r3, #2 8000ea4: 4413 add r3, r2 8000ea6: 00db lsls r3, r3, #3 8000ea8: f503 73b4 add.w r3, r3, #360 ; 0x168 8000eac: 687a ldr r2, [r7, #4] 8000eae: 4413 add r3, r2 8000eb0: 60fb str r3, [r7, #12] ep->is_in = 0U; 8000eb2: 68fb ldr r3, [r7, #12] 8000eb4: 2200 movs r2, #0 8000eb6: 705a strb r2, [r3, #1] } ep->is_stall = 1U; 8000eb8: 68fb ldr r3, [r7, #12] 8000eba: 2201 movs r2, #1 8000ebc: 709a strb r2, [r3, #2] ep->num = ep_addr & EP_ADDR_MSK; 8000ebe: 78fb ldrb r3, [r7, #3] 8000ec0: f003 0307 and.w r3, r3, #7 8000ec4: b2da uxtb r2, r3 8000ec6: 68fb ldr r3, [r7, #12] 8000ec8: 701a strb r2, [r3, #0] __HAL_LOCK(hpcd); 8000eca: 687b ldr r3, [r7, #4] 8000ecc: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 8000ed0: 2b01 cmp r3, #1 8000ed2: d101 bne.n 8000ed8 8000ed4: 2302 movs r3, #2 8000ed6: e01c b.n 8000f12 8000ed8: 687b ldr r3, [r7, #4] 8000eda: 2201 movs r2, #1 8000edc: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 (void)USB_EPSetStall(hpcd->Instance, ep); 8000ee0: 687b ldr r3, [r7, #4] 8000ee2: 681b ldr r3, [r3, #0] 8000ee4: 68f9 ldr r1, [r7, #12] 8000ee6: 4618 mov r0, r3 8000ee8: f003 facc bl 8004484 if ((ep_addr & EP_ADDR_MSK) == 0U) 8000eec: 78fb ldrb r3, [r7, #3] 8000eee: f003 0307 and.w r3, r3, #7 8000ef2: 2b00 cmp r3, #0 8000ef4: d108 bne.n 8000f08 { (void)USB_EP0_OutStart(hpcd->Instance, (uint8_t *)hpcd->Setup); 8000ef6: 687b ldr r3, [r7, #4] 8000ef8: 681a ldr r2, [r3, #0] 8000efa: 687b ldr r3, [r7, #4] 8000efc: f503 732c add.w r3, r3, #688 ; 0x2b0 8000f00: 4619 mov r1, r3 8000f02: 4610 mov r0, r2 8000f04: f003 fbf1 bl 80046ea } __HAL_UNLOCK(hpcd); 8000f08: 687b ldr r3, [r7, #4] 8000f0a: 2200 movs r2, #0 8000f0c: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 return HAL_OK; 8000f10: 2300 movs r3, #0 } 8000f12: 4618 mov r0, r3 8000f14: 3710 adds r7, #16 8000f16: 46bd mov sp, r7 8000f18: bd80 pop {r7, pc} 08000f1a : * @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) { 8000f1a: b580 push {r7, lr} 8000f1c: b084 sub sp, #16 8000f1e: af00 add r7, sp, #0 8000f20: 6078 str r0, [r7, #4] 8000f22: 460b mov r3, r1 8000f24: 70fb strb r3, [r7, #3] PCD_EPTypeDef *ep; if (((uint32_t)ep_addr & 0x0FU) > hpcd->Init.dev_endpoints) 8000f26: 78fb ldrb r3, [r7, #3] 8000f28: f003 020f and.w r2, r3, #15 8000f2c: 687b ldr r3, [r7, #4] 8000f2e: 685b ldr r3, [r3, #4] 8000f30: 429a cmp r2, r3 8000f32: d901 bls.n 8000f38 { return HAL_ERROR; 8000f34: 2301 movs r3, #1 8000f36: e040 b.n 8000fba } if ((0x80U & ep_addr) == 0x80U) 8000f38: f997 3003 ldrsb.w r3, [r7, #3] 8000f3c: 2b00 cmp r3, #0 8000f3e: da0e bge.n 8000f5e { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 8000f40: 78fb ldrb r3, [r7, #3] 8000f42: f003 0307 and.w r3, r3, #7 8000f46: 1c5a adds r2, r3, #1 8000f48: 4613 mov r3, r2 8000f4a: 009b lsls r3, r3, #2 8000f4c: 4413 add r3, r2 8000f4e: 00db lsls r3, r3, #3 8000f50: 687a ldr r2, [r7, #4] 8000f52: 4413 add r3, r2 8000f54: 60fb str r3, [r7, #12] ep->is_in = 1U; 8000f56: 68fb ldr r3, [r7, #12] 8000f58: 2201 movs r2, #1 8000f5a: 705a strb r2, [r3, #1] 8000f5c: e00e b.n 8000f7c } else { ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK]; 8000f5e: 78fb ldrb r3, [r7, #3] 8000f60: f003 0207 and.w r2, r3, #7 8000f64: 4613 mov r3, r2 8000f66: 009b lsls r3, r3, #2 8000f68: 4413 add r3, r2 8000f6a: 00db lsls r3, r3, #3 8000f6c: f503 73b4 add.w r3, r3, #360 ; 0x168 8000f70: 687a ldr r2, [r7, #4] 8000f72: 4413 add r3, r2 8000f74: 60fb str r3, [r7, #12] ep->is_in = 0U; 8000f76: 68fb ldr r3, [r7, #12] 8000f78: 2200 movs r2, #0 8000f7a: 705a strb r2, [r3, #1] } ep->is_stall = 0U; 8000f7c: 68fb ldr r3, [r7, #12] 8000f7e: 2200 movs r2, #0 8000f80: 709a strb r2, [r3, #2] ep->num = ep_addr & EP_ADDR_MSK; 8000f82: 78fb ldrb r3, [r7, #3] 8000f84: f003 0307 and.w r3, r3, #7 8000f88: b2da uxtb r2, r3 8000f8a: 68fb ldr r3, [r7, #12] 8000f8c: 701a strb r2, [r3, #0] __HAL_LOCK(hpcd); 8000f8e: 687b ldr r3, [r7, #4] 8000f90: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 8000f94: 2b01 cmp r3, #1 8000f96: d101 bne.n 8000f9c 8000f98: 2302 movs r3, #2 8000f9a: e00e b.n 8000fba 8000f9c: 687b ldr r3, [r7, #4] 8000f9e: 2201 movs r2, #1 8000fa0: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 (void)USB_EPClearStall(hpcd->Instance, ep); 8000fa4: 687b ldr r3, [r7, #4] 8000fa6: 681b ldr r3, [r3, #0] 8000fa8: 68f9 ldr r1, [r7, #12] 8000faa: 4618 mov r0, r3 8000fac: f003 faba bl 8004524 __HAL_UNLOCK(hpcd); 8000fb0: 687b ldr r3, [r7, #4] 8000fb2: 2200 movs r2, #0 8000fb4: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 return HAL_OK; 8000fb8: 2300 movs r3, #0 } 8000fba: 4618 mov r0, r3 8000fbc: 3710 adds r7, #16 8000fbe: 46bd mov sp, r7 8000fc0: bd80 pop {r7, pc} 08000fc2 : * @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) { 8000fc2: b580 push {r7, lr} 8000fc4: b08e sub sp, #56 ; 0x38 8000fc6: af00 add r7, sp, #0 8000fc8: 6078 str r0, [r7, #4] PCD_EPTypeDef *ep; uint16_t count, wIstr, wEPVal, TxByteNbre; uint8_t epindex; /* stay in loop while pending interrupts */ while ((hpcd->Instance->ISTR & USB_ISTR_CTR) != 0U) 8000fca: e2df b.n 800158c { wIstr = hpcd->Instance->ISTR; 8000fcc: 687b ldr r3, [r7, #4] 8000fce: 681b ldr r3, [r3, #0] 8000fd0: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000fd4: 85fb strh r3, [r7, #46] ; 0x2e /* extract highest priority endpoint number */ epindex = (uint8_t)(wIstr & USB_ISTR_EP_ID); 8000fd6: 8dfb ldrh r3, [r7, #46] ; 0x2e 8000fd8: b2db uxtb r3, r3 8000fda: f003 030f and.w r3, r3, #15 8000fde: f887 302d strb.w r3, [r7, #45] ; 0x2d if (epindex == 0U) 8000fe2: f897 302d ldrb.w r3, [r7, #45] ; 0x2d 8000fe6: 2b00 cmp r3, #0 8000fe8: f040 8158 bne.w 800129c { /* Decode and service control endpoint interrupt */ /* DIR bit = origin of the interrupt */ if ((wIstr & USB_ISTR_DIR) == 0U) 8000fec: 8dfb ldrh r3, [r7, #46] ; 0x2e 8000fee: f003 0310 and.w r3, r3, #16 8000ff2: 2b00 cmp r3, #0 8000ff4: d152 bne.n 800109c { /* DIR = 0 */ /* DIR = 0 => IN int */ /* DIR = 0 implies that (EP_CTR_TX = 1) always */ PCD_CLEAR_TX_EP_CTR(hpcd->Instance, PCD_ENDP0); 8000ff6: 687b ldr r3, [r7, #4] 8000ff8: 681b ldr r3, [r3, #0] 8000ffa: 881b ldrh r3, [r3, #0] 8000ffc: b29b uxth r3, r3 8000ffe: f423 43e1 bic.w r3, r3, #28800 ; 0x7080 8001002: f023 0370 bic.w r3, r3, #112 ; 0x70 8001006: 81fb strh r3, [r7, #14] 8001008: 687b ldr r3, [r7, #4] 800100a: 681a ldr r2, [r3, #0] 800100c: 89fb ldrh r3, [r7, #14] 800100e: ea6f 4343 mvn.w r3, r3, lsl #17 8001012: ea6f 4353 mvn.w r3, r3, lsr #17 8001016: b29b uxth r3, r3 8001018: 8013 strh r3, [r2, #0] ep = &hpcd->IN_ep[0]; 800101a: 687b ldr r3, [r7, #4] 800101c: 3328 adds r3, #40 ; 0x28 800101e: 627b str r3, [r7, #36] ; 0x24 ep->xfer_count = PCD_GET_EP_TX_CNT(hpcd->Instance, ep->num); 8001020: 687b ldr r3, [r7, #4] 8001022: 681b ldr r3, [r3, #0] 8001024: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001028: b29b uxth r3, r3 800102a: 461a mov r2, r3 800102c: 6a7b ldr r3, [r7, #36] ; 0x24 800102e: 781b ldrb r3, [r3, #0] 8001030: 00db lsls r3, r3, #3 8001032: 4413 add r3, r2 8001034: 3302 adds r3, #2 8001036: 005b lsls r3, r3, #1 8001038: 687a ldr r2, [r7, #4] 800103a: 6812 ldr r2, [r2, #0] 800103c: 4413 add r3, r2 800103e: f503 6380 add.w r3, r3, #1024 ; 0x400 8001042: 881b ldrh r3, [r3, #0] 8001044: f3c3 0209 ubfx r2, r3, #0, #10 8001048: 6a7b ldr r3, [r7, #36] ; 0x24 800104a: 61da str r2, [r3, #28] ep->xfer_buff += ep->xfer_count; 800104c: 6a7b ldr r3, [r7, #36] ; 0x24 800104e: 695a ldr r2, [r3, #20] 8001050: 6a7b ldr r3, [r7, #36] ; 0x24 8001052: 69db ldr r3, [r3, #28] 8001054: 441a add r2, r3 8001056: 6a7b ldr r3, [r7, #36] ; 0x24 8001058: 615a str r2, [r3, #20] /* TX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataInStageCallback(hpcd, 0U); #else HAL_PCD_DataInStageCallback(hpcd, 0U); 800105a: 2100 movs r1, #0 800105c: 6878 ldr r0, [r7, #4] 800105e: f005 f930 bl 80062c2 #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ if ((hpcd->USB_Address > 0U) && (ep->xfer_len == 0U)) 8001062: 687b ldr r3, [r7, #4] 8001064: f893 3024 ldrb.w r3, [r3, #36] ; 0x24 8001068: b2db uxtb r3, r3 800106a: 2b00 cmp r3, #0 800106c: f000 828e beq.w 800158c 8001070: 6a7b ldr r3, [r7, #36] ; 0x24 8001072: 699b ldr r3, [r3, #24] 8001074: 2b00 cmp r3, #0 8001076: f040 8289 bne.w 800158c { hpcd->Instance->DADDR = ((uint16_t)hpcd->USB_Address | USB_DADDR_EF); 800107a: 687b ldr r3, [r7, #4] 800107c: f893 3024 ldrb.w r3, [r3, #36] ; 0x24 8001080: b2db uxtb r3, r3 8001082: f063 037f orn r3, r3, #127 ; 0x7f 8001086: b2da uxtb r2, r3 8001088: 687b ldr r3, [r7, #4] 800108a: 681b ldr r3, [r3, #0] 800108c: b292 uxth r2, r2 800108e: f8a3 204c strh.w r2, [r3, #76] ; 0x4c hpcd->USB_Address = 0U; 8001092: 687b ldr r3, [r7, #4] 8001094: 2200 movs r2, #0 8001096: f883 2024 strb.w r2, [r3, #36] ; 0x24 800109a: e277 b.n 800158c { /* DIR = 1 */ /* DIR = 1 & CTR_RX => SETUP or OUT int */ /* DIR = 1 & (CTR_TX | CTR_RX) => 2 int pending */ ep = &hpcd->OUT_ep[0]; 800109c: 687b ldr r3, [r7, #4] 800109e: f503 73b4 add.w r3, r3, #360 ; 0x168 80010a2: 627b str r3, [r7, #36] ; 0x24 wEPVal = PCD_GET_ENDPOINT(hpcd->Instance, PCD_ENDP0); 80010a4: 687b ldr r3, [r7, #4] 80010a6: 681b ldr r3, [r3, #0] 80010a8: 881b ldrh r3, [r3, #0] 80010aa: 857b strh r3, [r7, #42] ; 0x2a if ((wEPVal & USB_EP_SETUP) != 0U) 80010ac: 8d7b ldrh r3, [r7, #42] ; 0x2a 80010ae: f403 6300 and.w r3, r3, #2048 ; 0x800 80010b2: 2b00 cmp r3, #0 80010b4: d034 beq.n 8001120 { /* Get SETUP Packet */ ep->xfer_count = PCD_GET_EP_RX_CNT(hpcd->Instance, ep->num); 80010b6: 687b ldr r3, [r7, #4] 80010b8: 681b ldr r3, [r3, #0] 80010ba: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80010be: b29b uxth r3, r3 80010c0: 461a mov r2, r3 80010c2: 6a7b ldr r3, [r7, #36] ; 0x24 80010c4: 781b ldrb r3, [r3, #0] 80010c6: 00db lsls r3, r3, #3 80010c8: 4413 add r3, r2 80010ca: 3306 adds r3, #6 80010cc: 005b lsls r3, r3, #1 80010ce: 687a ldr r2, [r7, #4] 80010d0: 6812 ldr r2, [r2, #0] 80010d2: 4413 add r3, r2 80010d4: f503 6380 add.w r3, r3, #1024 ; 0x400 80010d8: 881b ldrh r3, [r3, #0] 80010da: f3c3 0209 ubfx r2, r3, #0, #10 80010de: 6a7b ldr r3, [r7, #36] ; 0x24 80010e0: 61da str r2, [r3, #28] USB_ReadPMA(hpcd->Instance, (uint8_t *)hpcd->Setup, 80010e2: 687b ldr r3, [r7, #4] 80010e4: 6818 ldr r0, [r3, #0] 80010e6: 687b ldr r3, [r7, #4] 80010e8: f503 712c add.w r1, r3, #688 ; 0x2b0 80010ec: 6a7b ldr r3, [r7, #36] ; 0x24 80010ee: 88da ldrh r2, [r3, #6] ep->pmaadress, (uint16_t)ep->xfer_count); 80010f0: 6a7b ldr r3, [r7, #36] ; 0x24 80010f2: 69db ldr r3, [r3, #28] USB_ReadPMA(hpcd->Instance, (uint8_t *)hpcd->Setup, 80010f4: b29b uxth r3, r3 80010f6: f003 fb47 bl 8004788 /* SETUP bit kept frozen while CTR_RX = 1 */ PCD_CLEAR_RX_EP_CTR(hpcd->Instance, PCD_ENDP0); 80010fa: 687b ldr r3, [r7, #4] 80010fc: 681b ldr r3, [r3, #0] 80010fe: 881b ldrh r3, [r3, #0] 8001100: b29a uxth r2, r3 8001102: f640 738f movw r3, #3983 ; 0xf8f 8001106: 4013 ands r3, r2 8001108: 823b strh r3, [r7, #16] 800110a: 687b ldr r3, [r7, #4] 800110c: 681b ldr r3, [r3, #0] 800110e: 8a3a ldrh r2, [r7, #16] 8001110: f042 0280 orr.w r2, r2, #128 ; 0x80 8001114: b292 uxth r2, r2 8001116: 801a strh r2, [r3, #0] /* Process SETUP Packet*/ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->SetupStageCallback(hpcd); #else HAL_PCD_SetupStageCallback(hpcd); 8001118: 6878 ldr r0, [r7, #4] 800111a: f005 f8a5 bl 8006268 800111e: e235 b.n 800158c #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } else if ((wEPVal & USB_EP_CTR_RX) != 0U) 8001120: f9b7 302a ldrsh.w r3, [r7, #42] ; 0x2a 8001124: 2b00 cmp r3, #0 8001126: f280 8231 bge.w 800158c { PCD_CLEAR_RX_EP_CTR(hpcd->Instance, PCD_ENDP0); 800112a: 687b ldr r3, [r7, #4] 800112c: 681b ldr r3, [r3, #0] 800112e: 881b ldrh r3, [r3, #0] 8001130: b29a uxth r2, r3 8001132: f640 738f movw r3, #3983 ; 0xf8f 8001136: 4013 ands r3, r2 8001138: 83bb strh r3, [r7, #28] 800113a: 687b ldr r3, [r7, #4] 800113c: 681b ldr r3, [r3, #0] 800113e: 8bba ldrh r2, [r7, #28] 8001140: f042 0280 orr.w r2, r2, #128 ; 0x80 8001144: b292 uxth r2, r2 8001146: 801a strh r2, [r3, #0] /* Get Control Data OUT Packet */ ep->xfer_count = PCD_GET_EP_RX_CNT(hpcd->Instance, ep->num); 8001148: 687b ldr r3, [r7, #4] 800114a: 681b ldr r3, [r3, #0] 800114c: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001150: b29b uxth r3, r3 8001152: 461a mov r2, r3 8001154: 6a7b ldr r3, [r7, #36] ; 0x24 8001156: 781b ldrb r3, [r3, #0] 8001158: 00db lsls r3, r3, #3 800115a: 4413 add r3, r2 800115c: 3306 adds r3, #6 800115e: 005b lsls r3, r3, #1 8001160: 687a ldr r2, [r7, #4] 8001162: 6812 ldr r2, [r2, #0] 8001164: 4413 add r3, r2 8001166: f503 6380 add.w r3, r3, #1024 ; 0x400 800116a: 881b ldrh r3, [r3, #0] 800116c: f3c3 0209 ubfx r2, r3, #0, #10 8001170: 6a7b ldr r3, [r7, #36] ; 0x24 8001172: 61da str r2, [r3, #28] if ((ep->xfer_count != 0U) && (ep->xfer_buff != 0U)) 8001174: 6a7b ldr r3, [r7, #36] ; 0x24 8001176: 69db ldr r3, [r3, #28] 8001178: 2b00 cmp r3, #0 800117a: d019 beq.n 80011b0 800117c: 6a7b ldr r3, [r7, #36] ; 0x24 800117e: 695b ldr r3, [r3, #20] 8001180: 2b00 cmp r3, #0 8001182: d015 beq.n 80011b0 { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, 8001184: 687b ldr r3, [r7, #4] 8001186: 6818 ldr r0, [r3, #0] 8001188: 6a7b ldr r3, [r7, #36] ; 0x24 800118a: 6959 ldr r1, [r3, #20] 800118c: 6a7b ldr r3, [r7, #36] ; 0x24 800118e: 88da ldrh r2, [r3, #6] ep->pmaadress, (uint16_t)ep->xfer_count); 8001190: 6a7b ldr r3, [r7, #36] ; 0x24 8001192: 69db ldr r3, [r3, #28] USB_ReadPMA(hpcd->Instance, ep->xfer_buff, 8001194: b29b uxth r3, r3 8001196: f003 faf7 bl 8004788 ep->xfer_buff += ep->xfer_count; 800119a: 6a7b ldr r3, [r7, #36] ; 0x24 800119c: 695a ldr r2, [r3, #20] 800119e: 6a7b ldr r3, [r7, #36] ; 0x24 80011a0: 69db ldr r3, [r3, #28] 80011a2: 441a add r2, r3 80011a4: 6a7b ldr r3, [r7, #36] ; 0x24 80011a6: 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); 80011a8: 2100 movs r1, #0 80011aa: 6878 ldr r0, [r7, #4] 80011ac: f005 f86e bl 800628c #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } PCD_SET_EP_RX_CNT(hpcd->Instance, PCD_ENDP0, ep->maxpacket); 80011b0: 687b ldr r3, [r7, #4] 80011b2: 681b ldr r3, [r3, #0] 80011b4: 61bb str r3, [r7, #24] 80011b6: 687b ldr r3, [r7, #4] 80011b8: 681b ldr r3, [r3, #0] 80011ba: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80011be: b29b uxth r3, r3 80011c0: 461a mov r2, r3 80011c2: 69bb ldr r3, [r7, #24] 80011c4: 4413 add r3, r2 80011c6: 61bb str r3, [r7, #24] 80011c8: 69bb ldr r3, [r7, #24] 80011ca: f203 430c addw r3, r3, #1036 ; 0x40c 80011ce: 617b str r3, [r7, #20] 80011d0: 6a7b ldr r3, [r7, #36] ; 0x24 80011d2: 691b ldr r3, [r3, #16] 80011d4: 2b00 cmp r3, #0 80011d6: d112 bne.n 80011fe 80011d8: 697b ldr r3, [r7, #20] 80011da: 881b ldrh r3, [r3, #0] 80011dc: b29b uxth r3, r3 80011de: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 80011e2: b29a uxth r2, r3 80011e4: 697b ldr r3, [r7, #20] 80011e6: 801a strh r2, [r3, #0] 80011e8: 697b ldr r3, [r7, #20] 80011ea: 881b ldrh r3, [r3, #0] 80011ec: b29b uxth r3, r3 80011ee: ea6f 4343 mvn.w r3, r3, lsl #17 80011f2: ea6f 4353 mvn.w r3, r3, lsr #17 80011f6: b29a uxth r2, r3 80011f8: 697b ldr r3, [r7, #20] 80011fa: 801a strh r2, [r3, #0] 80011fc: e02f b.n 800125e 80011fe: 6a7b ldr r3, [r7, #36] ; 0x24 8001200: 691b ldr r3, [r3, #16] 8001202: 2b3e cmp r3, #62 ; 0x3e 8001204: d813 bhi.n 800122e 8001206: 6a7b ldr r3, [r7, #36] ; 0x24 8001208: 691b ldr r3, [r3, #16] 800120a: 085b lsrs r3, r3, #1 800120c: 633b str r3, [r7, #48] ; 0x30 800120e: 6a7b ldr r3, [r7, #36] ; 0x24 8001210: 691b ldr r3, [r3, #16] 8001212: f003 0301 and.w r3, r3, #1 8001216: 2b00 cmp r3, #0 8001218: d002 beq.n 8001220 800121a: 6b3b ldr r3, [r7, #48] ; 0x30 800121c: 3301 adds r3, #1 800121e: 633b str r3, [r7, #48] ; 0x30 8001220: 6b3b ldr r3, [r7, #48] ; 0x30 8001222: b29b uxth r3, r3 8001224: 029b lsls r3, r3, #10 8001226: b29a uxth r2, r3 8001228: 697b ldr r3, [r7, #20] 800122a: 801a strh r2, [r3, #0] 800122c: e017 b.n 800125e 800122e: 6a7b ldr r3, [r7, #36] ; 0x24 8001230: 691b ldr r3, [r3, #16] 8001232: 095b lsrs r3, r3, #5 8001234: 633b str r3, [r7, #48] ; 0x30 8001236: 6a7b ldr r3, [r7, #36] ; 0x24 8001238: 691b ldr r3, [r3, #16] 800123a: f003 031f and.w r3, r3, #31 800123e: 2b00 cmp r3, #0 8001240: d102 bne.n 8001248 8001242: 6b3b ldr r3, [r7, #48] ; 0x30 8001244: 3b01 subs r3, #1 8001246: 633b str r3, [r7, #48] ; 0x30 8001248: 6b3b ldr r3, [r7, #48] ; 0x30 800124a: b29b uxth r3, r3 800124c: 029b lsls r3, r3, #10 800124e: b29b uxth r3, r3 8001250: ea6f 4343 mvn.w r3, r3, lsl #17 8001254: ea6f 4353 mvn.w r3, r3, lsr #17 8001258: b29a uxth r2, r3 800125a: 697b ldr r3, [r7, #20] 800125c: 801a strh r2, [r3, #0] PCD_SET_EP_RX_STATUS(hpcd->Instance, PCD_ENDP0, USB_EP_RX_VALID); 800125e: 687b ldr r3, [r7, #4] 8001260: 681b ldr r3, [r3, #0] 8001262: 881b ldrh r3, [r3, #0] 8001264: b29b uxth r3, r3 8001266: f423 4380 bic.w r3, r3, #16384 ; 0x4000 800126a: f023 0370 bic.w r3, r3, #112 ; 0x70 800126e: 827b strh r3, [r7, #18] 8001270: 8a7b ldrh r3, [r7, #18] 8001272: f483 5380 eor.w r3, r3, #4096 ; 0x1000 8001276: 827b strh r3, [r7, #18] 8001278: 8a7b ldrh r3, [r7, #18] 800127a: f483 5300 eor.w r3, r3, #8192 ; 0x2000 800127e: 827b strh r3, [r7, #18] 8001280: 687b ldr r3, [r7, #4] 8001282: 681a ldr r2, [r3, #0] 8001284: 8a7b ldrh r3, [r7, #18] 8001286: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800128a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800128e: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8001292: f043 0380 orr.w r3, r3, #128 ; 0x80 8001296: b29b uxth r3, r3 8001298: 8013 strh r3, [r2, #0] 800129a: e177 b.n 800158c } else { /* Decode and service non control endpoints interrupt */ /* process related endpoint register */ wEPVal = PCD_GET_ENDPOINT(hpcd->Instance, epindex); 800129c: 687b ldr r3, [r7, #4] 800129e: 681b ldr r3, [r3, #0] 80012a0: 461a mov r2, r3 80012a2: f897 302d ldrb.w r3, [r7, #45] ; 0x2d 80012a6: 009b lsls r3, r3, #2 80012a8: 4413 add r3, r2 80012aa: 881b ldrh r3, [r3, #0] 80012ac: 857b strh r3, [r7, #42] ; 0x2a if ((wEPVal & USB_EP_CTR_RX) != 0U) 80012ae: f9b7 302a ldrsh.w r3, [r7, #42] ; 0x2a 80012b2: 2b00 cmp r3, #0 80012b4: f280 80ea bge.w 800148c { /* clear int flag */ PCD_CLEAR_RX_EP_CTR(hpcd->Instance, epindex); 80012b8: 687b ldr r3, [r7, #4] 80012ba: 681b ldr r3, [r3, #0] 80012bc: 461a mov r2, r3 80012be: f897 302d ldrb.w r3, [r7, #45] ; 0x2d 80012c2: 009b lsls r3, r3, #2 80012c4: 4413 add r3, r2 80012c6: 881b ldrh r3, [r3, #0] 80012c8: b29a uxth r2, r3 80012ca: f640 738f movw r3, #3983 ; 0xf8f 80012ce: 4013 ands r3, r2 80012d0: 853b strh r3, [r7, #40] ; 0x28 80012d2: 687b ldr r3, [r7, #4] 80012d4: 681b ldr r3, [r3, #0] 80012d6: 461a mov r2, r3 80012d8: f897 302d ldrb.w r3, [r7, #45] ; 0x2d 80012dc: 009b lsls r3, r3, #2 80012de: 4413 add r3, r2 80012e0: 8d3a ldrh r2, [r7, #40] ; 0x28 80012e2: f042 0280 orr.w r2, r2, #128 ; 0x80 80012e6: b292 uxth r2, r2 80012e8: 801a strh r2, [r3, #0] ep = &hpcd->OUT_ep[epindex]; 80012ea: f897 202d ldrb.w r2, [r7, #45] ; 0x2d 80012ee: 4613 mov r3, r2 80012f0: 009b lsls r3, r3, #2 80012f2: 4413 add r3, r2 80012f4: 00db lsls r3, r3, #3 80012f6: f503 73b4 add.w r3, r3, #360 ; 0x168 80012fa: 687a ldr r2, [r7, #4] 80012fc: 4413 add r3, r2 80012fe: 627b str r3, [r7, #36] ; 0x24 /* OUT Single Buffering */ if (ep->doublebuffer == 0U) 8001300: 6a7b ldr r3, [r7, #36] ; 0x24 8001302: 7b1b ldrb r3, [r3, #12] 8001304: 2b00 cmp r3, #0 8001306: d122 bne.n 800134e { count = (uint16_t)PCD_GET_EP_RX_CNT(hpcd->Instance, ep->num); 8001308: 687b ldr r3, [r7, #4] 800130a: 681b ldr r3, [r3, #0] 800130c: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001310: b29b uxth r3, r3 8001312: 461a mov r2, r3 8001314: 6a7b ldr r3, [r7, #36] ; 0x24 8001316: 781b ldrb r3, [r3, #0] 8001318: 00db lsls r3, r3, #3 800131a: 4413 add r3, r2 800131c: 3306 adds r3, #6 800131e: 005b lsls r3, r3, #1 8001320: 687a ldr r2, [r7, #4] 8001322: 6812 ldr r2, [r2, #0] 8001324: 4413 add r3, r2 8001326: f503 6380 add.w r3, r3, #1024 ; 0x400 800132a: 881b ldrh r3, [r3, #0] 800132c: f3c3 0309 ubfx r3, r3, #0, #10 8001330: 86fb strh r3, [r7, #54] ; 0x36 if (count != 0U) 8001332: 8efb ldrh r3, [r7, #54] ; 0x36 8001334: 2b00 cmp r3, #0 8001336: f000 8087 beq.w 8001448 { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaadress, count); 800133a: 687b ldr r3, [r7, #4] 800133c: 6818 ldr r0, [r3, #0] 800133e: 6a7b ldr r3, [r7, #36] ; 0x24 8001340: 6959 ldr r1, [r3, #20] 8001342: 6a7b ldr r3, [r7, #36] ; 0x24 8001344: 88da ldrh r2, [r3, #6] 8001346: 8efb ldrh r3, [r7, #54] ; 0x36 8001348: f003 fa1e bl 8004788 800134c: e07c b.n 8001448 } } else { /* manage double buffer bulk out */ if (ep->type == EP_TYPE_BULK) 800134e: 6a7b ldr r3, [r7, #36] ; 0x24 8001350: 78db ldrb r3, [r3, #3] 8001352: 2b02 cmp r3, #2 8001354: d108 bne.n 8001368 { count = HAL_PCD_EP_DB_Receive(hpcd, ep, wEPVal); 8001356: 8d7b ldrh r3, [r7, #42] ; 0x2a 8001358: 461a mov r2, r3 800135a: 6a79 ldr r1, [r7, #36] ; 0x24 800135c: 6878 ldr r0, [r7, #4] 800135e: f000 f923 bl 80015a8 8001362: 4603 mov r3, r0 8001364: 86fb strh r3, [r7, #54] ; 0x36 8001366: e06f b.n 8001448 } else /* manage double buffer iso out */ { /* free EP OUT Buffer */ PCD_FreeUserBuffer(hpcd->Instance, ep->num, 0U); 8001368: 687b ldr r3, [r7, #4] 800136a: 681b ldr r3, [r3, #0] 800136c: 461a mov r2, r3 800136e: 6a7b ldr r3, [r7, #36] ; 0x24 8001370: 781b ldrb r3, [r3, #0] 8001372: 009b lsls r3, r3, #2 8001374: 4413 add r3, r2 8001376: 881b ldrh r3, [r3, #0] 8001378: b29b uxth r3, r3 800137a: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800137e: f023 0370 bic.w r3, r3, #112 ; 0x70 8001382: 847b strh r3, [r7, #34] ; 0x22 8001384: 687b ldr r3, [r7, #4] 8001386: 681b ldr r3, [r3, #0] 8001388: 461a mov r2, r3 800138a: 6a7b ldr r3, [r7, #36] ; 0x24 800138c: 781b ldrb r3, [r3, #0] 800138e: 009b lsls r3, r3, #2 8001390: 441a add r2, r3 8001392: 8c7b ldrh r3, [r7, #34] ; 0x22 8001394: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001398: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800139c: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80013a0: f043 03c0 orr.w r3, r3, #192 ; 0xc0 80013a4: b29b uxth r3, r3 80013a6: 8013 strh r3, [r2, #0] if ((PCD_GET_ENDPOINT(hpcd->Instance, ep->num) & USB_EP_DTOG_RX) != 0U) 80013a8: 687b ldr r3, [r7, #4] 80013aa: 681b ldr r3, [r3, #0] 80013ac: 461a mov r2, r3 80013ae: 6a7b ldr r3, [r7, #36] ; 0x24 80013b0: 781b ldrb r3, [r3, #0] 80013b2: 009b lsls r3, r3, #2 80013b4: 4413 add r3, r2 80013b6: 881b ldrh r3, [r3, #0] 80013b8: b29b uxth r3, r3 80013ba: f403 4380 and.w r3, r3, #16384 ; 0x4000 80013be: 2b00 cmp r3, #0 80013c0: d021 beq.n 8001406 { /* read from endpoint BUF0Addr buffer */ count = (uint16_t)PCD_GET_EP_DBUF0_CNT(hpcd->Instance, ep->num); 80013c2: 687b ldr r3, [r7, #4] 80013c4: 681b ldr r3, [r3, #0] 80013c6: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80013ca: b29b uxth r3, r3 80013cc: 461a mov r2, r3 80013ce: 6a7b ldr r3, [r7, #36] ; 0x24 80013d0: 781b ldrb r3, [r3, #0] 80013d2: 00db lsls r3, r3, #3 80013d4: 4413 add r3, r2 80013d6: 3302 adds r3, #2 80013d8: 005b lsls r3, r3, #1 80013da: 687a ldr r2, [r7, #4] 80013dc: 6812 ldr r2, [r2, #0] 80013de: 4413 add r3, r2 80013e0: f503 6380 add.w r3, r3, #1024 ; 0x400 80013e4: 881b ldrh r3, [r3, #0] 80013e6: f3c3 0309 ubfx r3, r3, #0, #10 80013ea: 86fb strh r3, [r7, #54] ; 0x36 if (count != 0U) 80013ec: 8efb ldrh r3, [r7, #54] ; 0x36 80013ee: 2b00 cmp r3, #0 80013f0: d02a beq.n 8001448 { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr0, count); 80013f2: 687b ldr r3, [r7, #4] 80013f4: 6818 ldr r0, [r3, #0] 80013f6: 6a7b ldr r3, [r7, #36] ; 0x24 80013f8: 6959 ldr r1, [r3, #20] 80013fa: 6a7b ldr r3, [r7, #36] ; 0x24 80013fc: 891a ldrh r2, [r3, #8] 80013fe: 8efb ldrh r3, [r7, #54] ; 0x36 8001400: f003 f9c2 bl 8004788 8001404: e020 b.n 8001448 } } else { /* read from endpoint BUF1Addr buffer */ count = (uint16_t)PCD_GET_EP_DBUF1_CNT(hpcd->Instance, ep->num); 8001406: 687b ldr r3, [r7, #4] 8001408: 681b ldr r3, [r3, #0] 800140a: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 800140e: b29b uxth r3, r3 8001410: 461a mov r2, r3 8001412: 6a7b ldr r3, [r7, #36] ; 0x24 8001414: 781b ldrb r3, [r3, #0] 8001416: 00db lsls r3, r3, #3 8001418: 4413 add r3, r2 800141a: 3306 adds r3, #6 800141c: 005b lsls r3, r3, #1 800141e: 687a ldr r2, [r7, #4] 8001420: 6812 ldr r2, [r2, #0] 8001422: 4413 add r3, r2 8001424: f503 6380 add.w r3, r3, #1024 ; 0x400 8001428: 881b ldrh r3, [r3, #0] 800142a: f3c3 0309 ubfx r3, r3, #0, #10 800142e: 86fb strh r3, [r7, #54] ; 0x36 if (count != 0U) 8001430: 8efb ldrh r3, [r7, #54] ; 0x36 8001432: 2b00 cmp r3, #0 8001434: d008 beq.n 8001448 { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr1, count); 8001436: 687b ldr r3, [r7, #4] 8001438: 6818 ldr r0, [r3, #0] 800143a: 6a7b ldr r3, [r7, #36] ; 0x24 800143c: 6959 ldr r1, [r3, #20] 800143e: 6a7b ldr r3, [r7, #36] ; 0x24 8001440: 895a ldrh r2, [r3, #10] 8001442: 8efb ldrh r3, [r7, #54] ; 0x36 8001444: f003 f9a0 bl 8004788 } } } } /* multi-packet on the NON control OUT endpoint */ ep->xfer_count += count; 8001448: 6a7b ldr r3, [r7, #36] ; 0x24 800144a: 69da ldr r2, [r3, #28] 800144c: 8efb ldrh r3, [r7, #54] ; 0x36 800144e: 441a add r2, r3 8001450: 6a7b ldr r3, [r7, #36] ; 0x24 8001452: 61da str r2, [r3, #28] ep->xfer_buff += count; 8001454: 6a7b ldr r3, [r7, #36] ; 0x24 8001456: 695a ldr r2, [r3, #20] 8001458: 8efb ldrh r3, [r7, #54] ; 0x36 800145a: 441a add r2, r3 800145c: 6a7b ldr r3, [r7, #36] ; 0x24 800145e: 615a str r2, [r3, #20] if ((ep->xfer_len == 0U) || (count < ep->maxpacket)) 8001460: 6a7b ldr r3, [r7, #36] ; 0x24 8001462: 699b ldr r3, [r3, #24] 8001464: 2b00 cmp r3, #0 8001466: d004 beq.n 8001472 8001468: 8efa ldrh r2, [r7, #54] ; 0x36 800146a: 6a7b ldr r3, [r7, #36] ; 0x24 800146c: 691b ldr r3, [r3, #16] 800146e: 429a cmp r2, r3 8001470: d206 bcs.n 8001480 { /* RX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataOutStageCallback(hpcd, ep->num); #else HAL_PCD_DataOutStageCallback(hpcd, ep->num); 8001472: 6a7b ldr r3, [r7, #36] ; 0x24 8001474: 781b ldrb r3, [r3, #0] 8001476: 4619 mov r1, r3 8001478: 6878 ldr r0, [r7, #4] 800147a: f004 ff07 bl 800628c 800147e: e005 b.n 800148c #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } else { (void) USB_EPStartXfer(hpcd->Instance, ep); 8001480: 687b ldr r3, [r7, #4] 8001482: 681b ldr r3, [r3, #0] 8001484: 6a79 ldr r1, [r7, #36] ; 0x24 8001486: 4618 mov r0, r3 8001488: f001 fedc bl 8003244 } } if ((wEPVal & USB_EP_CTR_TX) != 0U) 800148c: 8d7b ldrh r3, [r7, #42] ; 0x2a 800148e: f003 0380 and.w r3, r3, #128 ; 0x80 8001492: 2b00 cmp r3, #0 8001494: d07a beq.n 800158c { ep = &hpcd->IN_ep[epindex]; 8001496: f897 302d ldrb.w r3, [r7, #45] ; 0x2d 800149a: 1c5a adds r2, r3, #1 800149c: 4613 mov r3, r2 800149e: 009b lsls r3, r3, #2 80014a0: 4413 add r3, r2 80014a2: 00db lsls r3, r3, #3 80014a4: 687a ldr r2, [r7, #4] 80014a6: 4413 add r3, r2 80014a8: 627b str r3, [r7, #36] ; 0x24 /* clear int flag */ PCD_CLEAR_TX_EP_CTR(hpcd->Instance, epindex); 80014aa: 687b ldr r3, [r7, #4] 80014ac: 681b ldr r3, [r3, #0] 80014ae: 461a mov r2, r3 80014b0: f897 302d ldrb.w r3, [r7, #45] ; 0x2d 80014b4: 009b lsls r3, r3, #2 80014b6: 4413 add r3, r2 80014b8: 881b ldrh r3, [r3, #0] 80014ba: b29b uxth r3, r3 80014bc: f423 43e1 bic.w r3, r3, #28800 ; 0x7080 80014c0: f023 0370 bic.w r3, r3, #112 ; 0x70 80014c4: 843b strh r3, [r7, #32] 80014c6: 687b ldr r3, [r7, #4] 80014c8: 681b ldr r3, [r3, #0] 80014ca: 461a mov r2, r3 80014cc: f897 302d ldrb.w r3, [r7, #45] ; 0x2d 80014d0: 009b lsls r3, r3, #2 80014d2: 441a add r2, r3 80014d4: 8c3b ldrh r3, [r7, #32] 80014d6: ea6f 4343 mvn.w r3, r3, lsl #17 80014da: ea6f 4353 mvn.w r3, r3, lsr #17 80014de: b29b uxth r3, r3 80014e0: 8013 strh r3, [r2, #0] /* Manage all non bulk transaction or Bulk Single Buffer Transaction */ if ((ep->type != EP_TYPE_BULK) || 80014e2: 6a7b ldr r3, [r7, #36] ; 0x24 80014e4: 78db ldrb r3, [r3, #3] 80014e6: 2b02 cmp r3, #2 80014e8: d108 bne.n 80014fc ((ep->type == EP_TYPE_BULK) && ((wEPVal & USB_EP_KIND) == 0U))) 80014ea: 6a7b ldr r3, [r7, #36] ; 0x24 80014ec: 78db ldrb r3, [r3, #3] if ((ep->type != EP_TYPE_BULK) || 80014ee: 2b02 cmp r3, #2 80014f0: d146 bne.n 8001580 ((ep->type == EP_TYPE_BULK) && ((wEPVal & USB_EP_KIND) == 0U))) 80014f2: 8d7b ldrh r3, [r7, #42] ; 0x2a 80014f4: f403 7380 and.w r3, r3, #256 ; 0x100 80014f8: 2b00 cmp r3, #0 80014fa: d141 bne.n 8001580 { /* multi-packet on the NON control IN endpoint */ TxByteNbre = (uint16_t)PCD_GET_EP_TX_CNT(hpcd->Instance, ep->num); 80014fc: 687b ldr r3, [r7, #4] 80014fe: 681b ldr r3, [r3, #0] 8001500: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001504: b29b uxth r3, r3 8001506: 461a mov r2, r3 8001508: 6a7b ldr r3, [r7, #36] ; 0x24 800150a: 781b ldrb r3, [r3, #0] 800150c: 00db lsls r3, r3, #3 800150e: 4413 add r3, r2 8001510: 3302 adds r3, #2 8001512: 005b lsls r3, r3, #1 8001514: 687a ldr r2, [r7, #4] 8001516: 6812 ldr r2, [r2, #0] 8001518: 4413 add r3, r2 800151a: f503 6380 add.w r3, r3, #1024 ; 0x400 800151e: 881b ldrh r3, [r3, #0] 8001520: f3c3 0309 ubfx r3, r3, #0, #10 8001524: 83fb strh r3, [r7, #30] if (ep->xfer_len > TxByteNbre) 8001526: 6a7b ldr r3, [r7, #36] ; 0x24 8001528: 699a ldr r2, [r3, #24] 800152a: 8bfb ldrh r3, [r7, #30] 800152c: 429a cmp r2, r3 800152e: d906 bls.n 800153e { ep->xfer_len -= TxByteNbre; 8001530: 6a7b ldr r3, [r7, #36] ; 0x24 8001532: 699a ldr r2, [r3, #24] 8001534: 8bfb ldrh r3, [r7, #30] 8001536: 1ad2 subs r2, r2, r3 8001538: 6a7b ldr r3, [r7, #36] ; 0x24 800153a: 619a str r2, [r3, #24] 800153c: e002 b.n 8001544 } else { ep->xfer_len = 0U; 800153e: 6a7b ldr r3, [r7, #36] ; 0x24 8001540: 2200 movs r2, #0 8001542: 619a str r2, [r3, #24] } /* Zero Length Packet? */ if (ep->xfer_len == 0U) 8001544: 6a7b ldr r3, [r7, #36] ; 0x24 8001546: 699b ldr r3, [r3, #24] 8001548: 2b00 cmp r3, #0 800154a: d106 bne.n 800155a { /* TX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataInStageCallback(hpcd, ep->num); #else HAL_PCD_DataInStageCallback(hpcd, ep->num); 800154c: 6a7b ldr r3, [r7, #36] ; 0x24 800154e: 781b ldrb r3, [r3, #0] 8001550: 4619 mov r1, r3 8001552: 6878 ldr r0, [r7, #4] 8001554: f004 feb5 bl 80062c2 8001558: e018 b.n 800158c #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } else { /* Transfer is not yet Done */ ep->xfer_buff += TxByteNbre; 800155a: 6a7b ldr r3, [r7, #36] ; 0x24 800155c: 695a ldr r2, [r3, #20] 800155e: 8bfb ldrh r3, [r7, #30] 8001560: 441a add r2, r3 8001562: 6a7b ldr r3, [r7, #36] ; 0x24 8001564: 615a str r2, [r3, #20] ep->xfer_count += TxByteNbre; 8001566: 6a7b ldr r3, [r7, #36] ; 0x24 8001568: 69da ldr r2, [r3, #28] 800156a: 8bfb ldrh r3, [r7, #30] 800156c: 441a add r2, r3 800156e: 6a7b ldr r3, [r7, #36] ; 0x24 8001570: 61da str r2, [r3, #28] (void)USB_EPStartXfer(hpcd->Instance, ep); 8001572: 687b ldr r3, [r7, #4] 8001574: 681b ldr r3, [r3, #0] 8001576: 6a79 ldr r1, [r7, #36] ; 0x24 8001578: 4618 mov r0, r3 800157a: f001 fe63 bl 8003244 if (ep->xfer_len == 0U) 800157e: e005 b.n 800158c } } /* bulk in double buffer enable in case of transferLen> Ep_Mps */ else { (void)HAL_PCD_EP_DB_Transmit(hpcd, ep, wEPVal); 8001580: 8d7b ldrh r3, [r7, #42] ; 0x2a 8001582: 461a mov r2, r3 8001584: 6a79 ldr r1, [r7, #36] ; 0x24 8001586: 6878 ldr r0, [r7, #4] 8001588: f000 f91b bl 80017c2 while ((hpcd->Instance->ISTR & USB_ISTR_CTR) != 0U) 800158c: 687b ldr r3, [r7, #4] 800158e: 681b ldr r3, [r3, #0] 8001590: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8001594: b29b uxth r3, r3 8001596: b21b sxth r3, r3 8001598: 2b00 cmp r3, #0 800159a: f6ff ad17 blt.w 8000fcc } } } } return HAL_OK; 800159e: 2300 movs r3, #0 } 80015a0: 4618 mov r0, r3 80015a2: 3738 adds r7, #56 ; 0x38 80015a4: 46bd mov sp, r7 80015a6: bd80 pop {r7, pc} 080015a8 : * @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) { 80015a8: b580 push {r7, lr} 80015aa: b088 sub sp, #32 80015ac: af00 add r7, sp, #0 80015ae: 60f8 str r0, [r7, #12] 80015b0: 60b9 str r1, [r7, #8] 80015b2: 4613 mov r3, r2 80015b4: 80fb strh r3, [r7, #6] uint16_t count; /* Manage Buffer0 OUT */ if ((wEPVal & USB_EP_DTOG_RX) != 0U) 80015b6: 88fb ldrh r3, [r7, #6] 80015b8: f403 4380 and.w r3, r3, #16384 ; 0x4000 80015bc: 2b00 cmp r3, #0 80015be: d07e beq.n 80016be { /* Get count of received Data on buffer0 */ count = (uint16_t)PCD_GET_EP_DBUF0_CNT(hpcd->Instance, ep->num); 80015c0: 68fb ldr r3, [r7, #12] 80015c2: 681b ldr r3, [r3, #0] 80015c4: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80015c8: b29b uxth r3, r3 80015ca: 461a mov r2, r3 80015cc: 68bb ldr r3, [r7, #8] 80015ce: 781b ldrb r3, [r3, #0] 80015d0: 00db lsls r3, r3, #3 80015d2: 4413 add r3, r2 80015d4: 3302 adds r3, #2 80015d6: 005b lsls r3, r3, #1 80015d8: 68fa ldr r2, [r7, #12] 80015da: 6812 ldr r2, [r2, #0] 80015dc: 4413 add r3, r2 80015de: f503 6380 add.w r3, r3, #1024 ; 0x400 80015e2: 881b ldrh r3, [r3, #0] 80015e4: f3c3 0309 ubfx r3, r3, #0, #10 80015e8: 837b strh r3, [r7, #26] if (ep->xfer_len >= count) 80015ea: 68bb ldr r3, [r7, #8] 80015ec: 699a ldr r2, [r3, #24] 80015ee: 8b7b ldrh r3, [r7, #26] 80015f0: 429a cmp r2, r3 80015f2: d306 bcc.n 8001602 { ep->xfer_len -= count; 80015f4: 68bb ldr r3, [r7, #8] 80015f6: 699a ldr r2, [r3, #24] 80015f8: 8b7b ldrh r3, [r7, #26] 80015fa: 1ad2 subs r2, r2, r3 80015fc: 68bb ldr r3, [r7, #8] 80015fe: 619a str r2, [r3, #24] 8001600: e002 b.n 8001608 } else { ep->xfer_len = 0U; 8001602: 68bb ldr r3, [r7, #8] 8001604: 2200 movs r2, #0 8001606: 619a str r2, [r3, #24] } if (ep->xfer_len == 0U) 8001608: 68bb ldr r3, [r7, #8] 800160a: 699b ldr r3, [r3, #24] 800160c: 2b00 cmp r3, #0 800160e: d123 bne.n 8001658 { /* set NAK to OUT endpoint since double buffer is enabled */ PCD_SET_EP_RX_STATUS(hpcd->Instance, ep->num, USB_EP_RX_NAK); 8001610: 68fb ldr r3, [r7, #12] 8001612: 681b ldr r3, [r3, #0] 8001614: 461a mov r2, r3 8001616: 68bb ldr r3, [r7, #8] 8001618: 781b ldrb r3, [r3, #0] 800161a: 009b lsls r3, r3, #2 800161c: 4413 add r3, r2 800161e: 881b ldrh r3, [r3, #0] 8001620: b29b uxth r3, r3 8001622: f423 4380 bic.w r3, r3, #16384 ; 0x4000 8001626: f023 0370 bic.w r3, r3, #112 ; 0x70 800162a: 833b strh r3, [r7, #24] 800162c: 8b3b ldrh r3, [r7, #24] 800162e: f483 5300 eor.w r3, r3, #8192 ; 0x2000 8001632: 833b strh r3, [r7, #24] 8001634: 68fb ldr r3, [r7, #12] 8001636: 681b ldr r3, [r3, #0] 8001638: 461a mov r2, r3 800163a: 68bb ldr r3, [r7, #8] 800163c: 781b ldrb r3, [r3, #0] 800163e: 009b lsls r3, r3, #2 8001640: 441a add r2, r3 8001642: 8b3b ldrh r3, [r7, #24] 8001644: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001648: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800164c: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8001650: f043 0380 orr.w r3, r3, #128 ; 0x80 8001654: b29b uxth r3, r3 8001656: 8013 strh r3, [r2, #0] } /* Check if Buffer1 is in blocked sate which requires to toggle */ if ((wEPVal & USB_EP_DTOG_TX) != 0U) 8001658: 88fb ldrh r3, [r7, #6] 800165a: f003 0340 and.w r3, r3, #64 ; 0x40 800165e: 2b00 cmp r3, #0 8001660: d01f beq.n 80016a2 { PCD_FreeUserBuffer(hpcd->Instance, ep->num, 0U); 8001662: 68fb ldr r3, [r7, #12] 8001664: 681b ldr r3, [r3, #0] 8001666: 461a mov r2, r3 8001668: 68bb ldr r3, [r7, #8] 800166a: 781b ldrb r3, [r3, #0] 800166c: 009b lsls r3, r3, #2 800166e: 4413 add r3, r2 8001670: 881b ldrh r3, [r3, #0] 8001672: b29b uxth r3, r3 8001674: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8001678: f023 0370 bic.w r3, r3, #112 ; 0x70 800167c: 82fb strh r3, [r7, #22] 800167e: 68fb ldr r3, [r7, #12] 8001680: 681b ldr r3, [r3, #0] 8001682: 461a mov r2, r3 8001684: 68bb ldr r3, [r7, #8] 8001686: 781b ldrb r3, [r3, #0] 8001688: 009b lsls r3, r3, #2 800168a: 441a add r2, r3 800168c: 8afb ldrh r3, [r7, #22] 800168e: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001692: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8001696: f443 4300 orr.w r3, r3, #32768 ; 0x8000 800169a: f043 03c0 orr.w r3, r3, #192 ; 0xc0 800169e: b29b uxth r3, r3 80016a0: 8013 strh r3, [r2, #0] } if (count != 0U) 80016a2: 8b7b ldrh r3, [r7, #26] 80016a4: 2b00 cmp r3, #0 80016a6: f000 8087 beq.w 80017b8 { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr0, count); 80016aa: 68fb ldr r3, [r7, #12] 80016ac: 6818 ldr r0, [r3, #0] 80016ae: 68bb ldr r3, [r7, #8] 80016b0: 6959 ldr r1, [r3, #20] 80016b2: 68bb ldr r3, [r7, #8] 80016b4: 891a ldrh r2, [r3, #8] 80016b6: 8b7b ldrh r3, [r7, #26] 80016b8: f003 f866 bl 8004788 80016bc: e07c b.n 80017b8 } /* Manage Buffer 1 DTOG_RX=0 */ else { /* Get count of received data */ count = (uint16_t)PCD_GET_EP_DBUF1_CNT(hpcd->Instance, ep->num); 80016be: 68fb ldr r3, [r7, #12] 80016c0: 681b ldr r3, [r3, #0] 80016c2: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80016c6: b29b uxth r3, r3 80016c8: 461a mov r2, r3 80016ca: 68bb ldr r3, [r7, #8] 80016cc: 781b ldrb r3, [r3, #0] 80016ce: 00db lsls r3, r3, #3 80016d0: 4413 add r3, r2 80016d2: 3306 adds r3, #6 80016d4: 005b lsls r3, r3, #1 80016d6: 68fa ldr r2, [r7, #12] 80016d8: 6812 ldr r2, [r2, #0] 80016da: 4413 add r3, r2 80016dc: f503 6380 add.w r3, r3, #1024 ; 0x400 80016e0: 881b ldrh r3, [r3, #0] 80016e2: f3c3 0309 ubfx r3, r3, #0, #10 80016e6: 837b strh r3, [r7, #26] if (ep->xfer_len >= count) 80016e8: 68bb ldr r3, [r7, #8] 80016ea: 699a ldr r2, [r3, #24] 80016ec: 8b7b ldrh r3, [r7, #26] 80016ee: 429a cmp r2, r3 80016f0: d306 bcc.n 8001700 { ep->xfer_len -= count; 80016f2: 68bb ldr r3, [r7, #8] 80016f4: 699a ldr r2, [r3, #24] 80016f6: 8b7b ldrh r3, [r7, #26] 80016f8: 1ad2 subs r2, r2, r3 80016fa: 68bb ldr r3, [r7, #8] 80016fc: 619a str r2, [r3, #24] 80016fe: e002 b.n 8001706 } else { ep->xfer_len = 0U; 8001700: 68bb ldr r3, [r7, #8] 8001702: 2200 movs r2, #0 8001704: 619a str r2, [r3, #24] } if (ep->xfer_len == 0U) 8001706: 68bb ldr r3, [r7, #8] 8001708: 699b ldr r3, [r3, #24] 800170a: 2b00 cmp r3, #0 800170c: d123 bne.n 8001756 { /* set NAK on the current endpoint */ PCD_SET_EP_RX_STATUS(hpcd->Instance, ep->num, USB_EP_RX_NAK); 800170e: 68fb ldr r3, [r7, #12] 8001710: 681b ldr r3, [r3, #0] 8001712: 461a mov r2, r3 8001714: 68bb ldr r3, [r7, #8] 8001716: 781b ldrb r3, [r3, #0] 8001718: 009b lsls r3, r3, #2 800171a: 4413 add r3, r2 800171c: 881b ldrh r3, [r3, #0] 800171e: b29b uxth r3, r3 8001720: f423 4380 bic.w r3, r3, #16384 ; 0x4000 8001724: f023 0370 bic.w r3, r3, #112 ; 0x70 8001728: 83fb strh r3, [r7, #30] 800172a: 8bfb ldrh r3, [r7, #30] 800172c: f483 5300 eor.w r3, r3, #8192 ; 0x2000 8001730: 83fb strh r3, [r7, #30] 8001732: 68fb ldr r3, [r7, #12] 8001734: 681b ldr r3, [r3, #0] 8001736: 461a mov r2, r3 8001738: 68bb ldr r3, [r7, #8] 800173a: 781b ldrb r3, [r3, #0] 800173c: 009b lsls r3, r3, #2 800173e: 441a add r2, r3 8001740: 8bfb ldrh r3, [r7, #30] 8001742: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001746: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800174a: f443 4300 orr.w r3, r3, #32768 ; 0x8000 800174e: f043 0380 orr.w r3, r3, #128 ; 0x80 8001752: b29b uxth r3, r3 8001754: 8013 strh r3, [r2, #0] } /*Need to FreeUser Buffer*/ if ((wEPVal & USB_EP_DTOG_TX) == 0U) 8001756: 88fb ldrh r3, [r7, #6] 8001758: f003 0340 and.w r3, r3, #64 ; 0x40 800175c: 2b00 cmp r3, #0 800175e: d11f bne.n 80017a0 { PCD_FreeUserBuffer(hpcd->Instance, ep->num, 0U); 8001760: 68fb ldr r3, [r7, #12] 8001762: 681b ldr r3, [r3, #0] 8001764: 461a mov r2, r3 8001766: 68bb ldr r3, [r7, #8] 8001768: 781b ldrb r3, [r3, #0] 800176a: 009b lsls r3, r3, #2 800176c: 4413 add r3, r2 800176e: 881b ldrh r3, [r3, #0] 8001770: b29b uxth r3, r3 8001772: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8001776: f023 0370 bic.w r3, r3, #112 ; 0x70 800177a: 83bb strh r3, [r7, #28] 800177c: 68fb ldr r3, [r7, #12] 800177e: 681b ldr r3, [r3, #0] 8001780: 461a mov r2, r3 8001782: 68bb ldr r3, [r7, #8] 8001784: 781b ldrb r3, [r3, #0] 8001786: 009b lsls r3, r3, #2 8001788: 441a add r2, r3 800178a: 8bbb ldrh r3, [r7, #28] 800178c: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001790: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8001794: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8001798: f043 03c0 orr.w r3, r3, #192 ; 0xc0 800179c: b29b uxth r3, r3 800179e: 8013 strh r3, [r2, #0] } if (count != 0U) 80017a0: 8b7b ldrh r3, [r7, #26] 80017a2: 2b00 cmp r3, #0 80017a4: d008 beq.n 80017b8 { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr1, count); 80017a6: 68fb ldr r3, [r7, #12] 80017a8: 6818 ldr r0, [r3, #0] 80017aa: 68bb ldr r3, [r7, #8] 80017ac: 6959 ldr r1, [r3, #20] 80017ae: 68bb ldr r3, [r7, #8] 80017b0: 895a ldrh r2, [r3, #10] 80017b2: 8b7b ldrh r3, [r7, #26] 80017b4: f002 ffe8 bl 8004788 } } return count; 80017b8: 8b7b ldrh r3, [r7, #26] } 80017ba: 4618 mov r0, r3 80017bc: 3720 adds r7, #32 80017be: 46bd mov sp, r7 80017c0: bd80 pop {r7, pc} 080017c2 : * @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) { 80017c2: b580 push {r7, lr} 80017c4: b092 sub sp, #72 ; 0x48 80017c6: af00 add r7, sp, #0 80017c8: 60f8 str r0, [r7, #12] 80017ca: 60b9 str r1, [r7, #8] 80017cc: 4613 mov r3, r2 80017ce: 80fb strh r3, [r7, #6] uint32_t len; uint16_t TxByteNbre; /* Data Buffer0 ACK received */ if ((wEPVal & USB_EP_DTOG_TX) != 0U) 80017d0: 88fb ldrh r3, [r7, #6] 80017d2: f003 0340 and.w r3, r3, #64 ; 0x40 80017d6: 2b00 cmp r3, #0 80017d8: f000 8132 beq.w 8001a40 { /* multi-packet on the NON control IN endpoint */ TxByteNbre = (uint16_t)PCD_GET_EP_DBUF0_CNT(hpcd->Instance, ep->num); 80017dc: 68fb ldr r3, [r7, #12] 80017de: 681b ldr r3, [r3, #0] 80017e0: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80017e4: b29b uxth r3, r3 80017e6: 461a mov r2, r3 80017e8: 68bb ldr r3, [r7, #8] 80017ea: 781b ldrb r3, [r3, #0] 80017ec: 00db lsls r3, r3, #3 80017ee: 4413 add r3, r2 80017f0: 3302 adds r3, #2 80017f2: 005b lsls r3, r3, #1 80017f4: 68fa ldr r2, [r7, #12] 80017f6: 6812 ldr r2, [r2, #0] 80017f8: 4413 add r3, r2 80017fa: f503 6380 add.w r3, r3, #1024 ; 0x400 80017fe: 881b ldrh r3, [r3, #0] 8001800: f3c3 0309 ubfx r3, r3, #0, #10 8001804: 85fb strh r3, [r7, #46] ; 0x2e if (ep->xfer_len > TxByteNbre) 8001806: 68bb ldr r3, [r7, #8] 8001808: 699a ldr r2, [r3, #24] 800180a: 8dfb ldrh r3, [r7, #46] ; 0x2e 800180c: 429a cmp r2, r3 800180e: d906 bls.n 800181e { ep->xfer_len -= TxByteNbre; 8001810: 68bb ldr r3, [r7, #8] 8001812: 699a ldr r2, [r3, #24] 8001814: 8dfb ldrh r3, [r7, #46] ; 0x2e 8001816: 1ad2 subs r2, r2, r3 8001818: 68bb ldr r3, [r7, #8] 800181a: 619a str r2, [r3, #24] 800181c: e002 b.n 8001824 } else { ep->xfer_len = 0U; 800181e: 68bb ldr r3, [r7, #8] 8001820: 2200 movs r2, #0 8001822: 619a str r2, [r3, #24] } /* Transfer is completed */ if (ep->xfer_len == 0U) 8001824: 68bb ldr r3, [r7, #8] 8001826: 699b ldr r3, [r3, #24] 8001828: 2b00 cmp r3, #0 800182a: d12c bne.n 8001886 { /* TX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataInStageCallback(hpcd, ep->num); #else HAL_PCD_DataInStageCallback(hpcd, ep->num); 800182c: 68bb ldr r3, [r7, #8] 800182e: 781b ldrb r3, [r3, #0] 8001830: 4619 mov r1, r3 8001832: 68f8 ldr r0, [r7, #12] 8001834: f004 fd45 bl 80062c2 #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ if ((wEPVal & USB_EP_DTOG_RX) != 0U) 8001838: 88fb ldrh r3, [r7, #6] 800183a: f403 4380 and.w r3, r3, #16384 ; 0x4000 800183e: 2b00 cmp r3, #0 8001840: f000 822f beq.w 8001ca2 { PCD_FreeUserBuffer(hpcd->Instance, ep->num, 1U); 8001844: 68fb ldr r3, [r7, #12] 8001846: 681b ldr r3, [r3, #0] 8001848: 461a mov r2, r3 800184a: 68bb ldr r3, [r7, #8] 800184c: 781b ldrb r3, [r3, #0] 800184e: 009b lsls r3, r3, #2 8001850: 4413 add r3, r2 8001852: 881b ldrh r3, [r3, #0] 8001854: b29b uxth r3, r3 8001856: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800185a: f023 0370 bic.w r3, r3, #112 ; 0x70 800185e: 827b strh r3, [r7, #18] 8001860: 68fb ldr r3, [r7, #12] 8001862: 681b ldr r3, [r3, #0] 8001864: 461a mov r2, r3 8001866: 68bb ldr r3, [r7, #8] 8001868: 781b ldrb r3, [r3, #0] 800186a: 009b lsls r3, r3, #2 800186c: 441a add r2, r3 800186e: 8a7b ldrh r3, [r7, #18] 8001870: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001874: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8001878: f443 4340 orr.w r3, r3, #49152 ; 0xc000 800187c: f043 0380 orr.w r3, r3, #128 ; 0x80 8001880: b29b uxth r3, r3 8001882: 8013 strh r3, [r2, #0] 8001884: e20d b.n 8001ca2 } } else /* Transfer is not yet Done */ { /* need to Free USB Buff */ if ((wEPVal & USB_EP_DTOG_RX) != 0U) 8001886: 88fb ldrh r3, [r7, #6] 8001888: f403 4380 and.w r3, r3, #16384 ; 0x4000 800188c: 2b00 cmp r3, #0 800188e: d01f beq.n 80018d0 { PCD_FreeUserBuffer(hpcd->Instance, ep->num, 1U); 8001890: 68fb ldr r3, [r7, #12] 8001892: 681b ldr r3, [r3, #0] 8001894: 461a mov r2, r3 8001896: 68bb ldr r3, [r7, #8] 8001898: 781b ldrb r3, [r3, #0] 800189a: 009b lsls r3, r3, #2 800189c: 4413 add r3, r2 800189e: 881b ldrh r3, [r3, #0] 80018a0: b29b uxth r3, r3 80018a2: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80018a6: f023 0370 bic.w r3, r3, #112 ; 0x70 80018aa: 84bb strh r3, [r7, #36] ; 0x24 80018ac: 68fb ldr r3, [r7, #12] 80018ae: 681b ldr r3, [r3, #0] 80018b0: 461a mov r2, r3 80018b2: 68bb ldr r3, [r7, #8] 80018b4: 781b ldrb r3, [r3, #0] 80018b6: 009b lsls r3, r3, #2 80018b8: 441a add r2, r3 80018ba: 8cbb ldrh r3, [r7, #36] ; 0x24 80018bc: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80018c0: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80018c4: f443 4340 orr.w r3, r3, #49152 ; 0xc000 80018c8: f043 0380 orr.w r3, r3, #128 ; 0x80 80018cc: b29b uxth r3, r3 80018ce: 8013 strh r3, [r2, #0] } /* Still there is data to Fill in the next Buffer */ if (ep->xfer_fill_db == 1U) 80018d0: 68bb ldr r3, [r7, #8] 80018d2: f893 3024 ldrb.w r3, [r3, #36] ; 0x24 80018d6: 2b01 cmp r3, #1 80018d8: f040 81e3 bne.w 8001ca2 { ep->xfer_buff += TxByteNbre; 80018dc: 68bb ldr r3, [r7, #8] 80018de: 695a ldr r2, [r3, #20] 80018e0: 8dfb ldrh r3, [r7, #46] ; 0x2e 80018e2: 441a add r2, r3 80018e4: 68bb ldr r3, [r7, #8] 80018e6: 615a str r2, [r3, #20] ep->xfer_count += TxByteNbre; 80018e8: 68bb ldr r3, [r7, #8] 80018ea: 69da ldr r2, [r3, #28] 80018ec: 8dfb ldrh r3, [r7, #46] ; 0x2e 80018ee: 441a add r2, r3 80018f0: 68bb ldr r3, [r7, #8] 80018f2: 61da str r2, [r3, #28] /* Calculate the len of the new buffer to fill */ if (ep->xfer_len_db >= ep->maxpacket) 80018f4: 68bb ldr r3, [r7, #8] 80018f6: 6a1a ldr r2, [r3, #32] 80018f8: 68bb ldr r3, [r7, #8] 80018fa: 691b ldr r3, [r3, #16] 80018fc: 429a cmp r2, r3 80018fe: d309 bcc.n 8001914 { len = ep->maxpacket; 8001900: 68bb ldr r3, [r7, #8] 8001902: 691b ldr r3, [r3, #16] 8001904: 63bb str r3, [r7, #56] ; 0x38 ep->xfer_len_db -= len; 8001906: 68bb ldr r3, [r7, #8] 8001908: 6a1a ldr r2, [r3, #32] 800190a: 6bbb ldr r3, [r7, #56] ; 0x38 800190c: 1ad2 subs r2, r2, r3 800190e: 68bb ldr r3, [r7, #8] 8001910: 621a str r2, [r3, #32] 8001912: e014 b.n 800193e } else if (ep->xfer_len_db == 0U) 8001914: 68bb ldr r3, [r7, #8] 8001916: 6a1b ldr r3, [r3, #32] 8001918: 2b00 cmp r3, #0 800191a: d106 bne.n 800192a { len = TxByteNbre; 800191c: 8dfb ldrh r3, [r7, #46] ; 0x2e 800191e: 63bb str r3, [r7, #56] ; 0x38 ep->xfer_fill_db = 0U; 8001920: 68bb ldr r3, [r7, #8] 8001922: 2200 movs r2, #0 8001924: f883 2024 strb.w r2, [r3, #36] ; 0x24 8001928: e009 b.n 800193e } else { ep->xfer_fill_db = 0U; 800192a: 68bb ldr r3, [r7, #8] 800192c: 2200 movs r2, #0 800192e: f883 2024 strb.w r2, [r3, #36] ; 0x24 len = ep->xfer_len_db; 8001932: 68bb ldr r3, [r7, #8] 8001934: 6a1b ldr r3, [r3, #32] 8001936: 63bb str r3, [r7, #56] ; 0x38 ep->xfer_len_db = 0U; 8001938: 68bb ldr r3, [r7, #8] 800193a: 2200 movs r2, #0 800193c: 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); 800193e: 68bb ldr r3, [r7, #8] 8001940: 785b ldrb r3, [r3, #1] 8001942: 2b00 cmp r3, #0 8001944: d155 bne.n 80019f2 8001946: 68fb ldr r3, [r7, #12] 8001948: 681b ldr r3, [r3, #0] 800194a: 61bb str r3, [r7, #24] 800194c: 68fb ldr r3, [r7, #12] 800194e: 681b ldr r3, [r3, #0] 8001950: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001954: b29b uxth r3, r3 8001956: 461a mov r2, r3 8001958: 69bb ldr r3, [r7, #24] 800195a: 4413 add r3, r2 800195c: 61bb str r3, [r7, #24] 800195e: 68bb ldr r3, [r7, #8] 8001960: 781b ldrb r3, [r3, #0] 8001962: 011a lsls r2, r3, #4 8001964: 69bb ldr r3, [r7, #24] 8001966: 4413 add r3, r2 8001968: f203 4304 addw r3, r3, #1028 ; 0x404 800196c: 617b str r3, [r7, #20] 800196e: 6bbb ldr r3, [r7, #56] ; 0x38 8001970: 2b00 cmp r3, #0 8001972: d112 bne.n 800199a 8001974: 697b ldr r3, [r7, #20] 8001976: 881b ldrh r3, [r3, #0] 8001978: b29b uxth r3, r3 800197a: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 800197e: b29a uxth r2, r3 8001980: 697b ldr r3, [r7, #20] 8001982: 801a strh r2, [r3, #0] 8001984: 697b ldr r3, [r7, #20] 8001986: 881b ldrh r3, [r3, #0] 8001988: b29b uxth r3, r3 800198a: ea6f 4343 mvn.w r3, r3, lsl #17 800198e: ea6f 4353 mvn.w r3, r3, lsr #17 8001992: b29a uxth r2, r3 8001994: 697b ldr r3, [r7, #20] 8001996: 801a strh r2, [r3, #0] 8001998: e047 b.n 8001a2a 800199a: 6bbb ldr r3, [r7, #56] ; 0x38 800199c: 2b3e cmp r3, #62 ; 0x3e 800199e: d811 bhi.n 80019c4 80019a0: 6bbb ldr r3, [r7, #56] ; 0x38 80019a2: 085b lsrs r3, r3, #1 80019a4: 62bb str r3, [r7, #40] ; 0x28 80019a6: 6bbb ldr r3, [r7, #56] ; 0x38 80019a8: f003 0301 and.w r3, r3, #1 80019ac: 2b00 cmp r3, #0 80019ae: d002 beq.n 80019b6 80019b0: 6abb ldr r3, [r7, #40] ; 0x28 80019b2: 3301 adds r3, #1 80019b4: 62bb str r3, [r7, #40] ; 0x28 80019b6: 6abb ldr r3, [r7, #40] ; 0x28 80019b8: b29b uxth r3, r3 80019ba: 029b lsls r3, r3, #10 80019bc: b29a uxth r2, r3 80019be: 697b ldr r3, [r7, #20] 80019c0: 801a strh r2, [r3, #0] 80019c2: e032 b.n 8001a2a 80019c4: 6bbb ldr r3, [r7, #56] ; 0x38 80019c6: 095b lsrs r3, r3, #5 80019c8: 62bb str r3, [r7, #40] ; 0x28 80019ca: 6bbb ldr r3, [r7, #56] ; 0x38 80019cc: f003 031f and.w r3, r3, #31 80019d0: 2b00 cmp r3, #0 80019d2: d102 bne.n 80019da 80019d4: 6abb ldr r3, [r7, #40] ; 0x28 80019d6: 3b01 subs r3, #1 80019d8: 62bb str r3, [r7, #40] ; 0x28 80019da: 6abb ldr r3, [r7, #40] ; 0x28 80019dc: b29b uxth r3, r3 80019de: 029b lsls r3, r3, #10 80019e0: b29b uxth r3, r3 80019e2: ea6f 4343 mvn.w r3, r3, lsl #17 80019e6: ea6f 4353 mvn.w r3, r3, lsr #17 80019ea: b29a uxth r2, r3 80019ec: 697b ldr r3, [r7, #20] 80019ee: 801a strh r2, [r3, #0] 80019f0: e01b b.n 8001a2a 80019f2: 68bb ldr r3, [r7, #8] 80019f4: 785b ldrb r3, [r3, #1] 80019f6: 2b01 cmp r3, #1 80019f8: d117 bne.n 8001a2a 80019fa: 68fb ldr r3, [r7, #12] 80019fc: 681b ldr r3, [r3, #0] 80019fe: 623b str r3, [r7, #32] 8001a00: 68fb ldr r3, [r7, #12] 8001a02: 681b ldr r3, [r3, #0] 8001a04: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001a08: b29b uxth r3, r3 8001a0a: 461a mov r2, r3 8001a0c: 6a3b ldr r3, [r7, #32] 8001a0e: 4413 add r3, r2 8001a10: 623b str r3, [r7, #32] 8001a12: 68bb ldr r3, [r7, #8] 8001a14: 781b ldrb r3, [r3, #0] 8001a16: 011a lsls r2, r3, #4 8001a18: 6a3b ldr r3, [r7, #32] 8001a1a: 4413 add r3, r2 8001a1c: f203 4304 addw r3, r3, #1028 ; 0x404 8001a20: 61fb str r3, [r7, #28] 8001a22: 6bbb ldr r3, [r7, #56] ; 0x38 8001a24: b29a uxth r2, r3 8001a26: 69fb ldr r3, [r7, #28] 8001a28: 801a strh r2, [r3, #0] /* Copy user buffer to USB PMA */ USB_WritePMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr0, (uint16_t)len); 8001a2a: 68fb ldr r3, [r7, #12] 8001a2c: 6818 ldr r0, [r3, #0] 8001a2e: 68bb ldr r3, [r7, #8] 8001a30: 6959 ldr r1, [r3, #20] 8001a32: 68bb ldr r3, [r7, #8] 8001a34: 891a ldrh r2, [r3, #8] 8001a36: 6bbb ldr r3, [r7, #56] ; 0x38 8001a38: b29b uxth r3, r3 8001a3a: f002 fe61 bl 8004700 8001a3e: e130 b.n 8001ca2 } } else /* Data Buffer1 ACK received */ { /* multi-packet on the NON control IN endpoint */ TxByteNbre = (uint16_t)PCD_GET_EP_DBUF1_CNT(hpcd->Instance, ep->num); 8001a40: 68fb ldr r3, [r7, #12] 8001a42: 681b ldr r3, [r3, #0] 8001a44: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001a48: b29b uxth r3, r3 8001a4a: 461a mov r2, r3 8001a4c: 68bb ldr r3, [r7, #8] 8001a4e: 781b ldrb r3, [r3, #0] 8001a50: 00db lsls r3, r3, #3 8001a52: 4413 add r3, r2 8001a54: 3306 adds r3, #6 8001a56: 005b lsls r3, r3, #1 8001a58: 68fa ldr r2, [r7, #12] 8001a5a: 6812 ldr r2, [r2, #0] 8001a5c: 4413 add r3, r2 8001a5e: f503 6380 add.w r3, r3, #1024 ; 0x400 8001a62: 881b ldrh r3, [r3, #0] 8001a64: f3c3 0309 ubfx r3, r3, #0, #10 8001a68: 85fb strh r3, [r7, #46] ; 0x2e if (ep->xfer_len >= TxByteNbre) 8001a6a: 68bb ldr r3, [r7, #8] 8001a6c: 699a ldr r2, [r3, #24] 8001a6e: 8dfb ldrh r3, [r7, #46] ; 0x2e 8001a70: 429a cmp r2, r3 8001a72: d306 bcc.n 8001a82 { ep->xfer_len -= TxByteNbre; 8001a74: 68bb ldr r3, [r7, #8] 8001a76: 699a ldr r2, [r3, #24] 8001a78: 8dfb ldrh r3, [r7, #46] ; 0x2e 8001a7a: 1ad2 subs r2, r2, r3 8001a7c: 68bb ldr r3, [r7, #8] 8001a7e: 619a str r2, [r3, #24] 8001a80: e002 b.n 8001a88 } else { ep->xfer_len = 0U; 8001a82: 68bb ldr r3, [r7, #8] 8001a84: 2200 movs r2, #0 8001a86: 619a str r2, [r3, #24] } /* Transfer is completed */ if (ep->xfer_len == 0U) 8001a88: 68bb ldr r3, [r7, #8] 8001a8a: 699b ldr r3, [r3, #24] 8001a8c: 2b00 cmp r3, #0 8001a8e: d12c bne.n 8001aea { /* TX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataInStageCallback(hpcd, ep->num); #else HAL_PCD_DataInStageCallback(hpcd, ep->num); 8001a90: 68bb ldr r3, [r7, #8] 8001a92: 781b ldrb r3, [r3, #0] 8001a94: 4619 mov r1, r3 8001a96: 68f8 ldr r0, [r7, #12] 8001a98: f004 fc13 bl 80062c2 #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ /*need to Free USB Buff*/ if ((wEPVal & USB_EP_DTOG_RX) == 0U) 8001a9c: 88fb ldrh r3, [r7, #6] 8001a9e: f403 4380 and.w r3, r3, #16384 ; 0x4000 8001aa2: 2b00 cmp r3, #0 8001aa4: f040 80fd bne.w 8001ca2 { PCD_FreeUserBuffer(hpcd->Instance, ep->num, 1U); 8001aa8: 68fb ldr r3, [r7, #12] 8001aaa: 681b ldr r3, [r3, #0] 8001aac: 461a mov r2, r3 8001aae: 68bb ldr r3, [r7, #8] 8001ab0: 781b ldrb r3, [r3, #0] 8001ab2: 009b lsls r3, r3, #2 8001ab4: 4413 add r3, r2 8001ab6: 881b ldrh r3, [r3, #0] 8001ab8: b29b uxth r3, r3 8001aba: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8001abe: f023 0370 bic.w r3, r3, #112 ; 0x70 8001ac2: 84fb strh r3, [r7, #38] ; 0x26 8001ac4: 68fb ldr r3, [r7, #12] 8001ac6: 681b ldr r3, [r3, #0] 8001ac8: 461a mov r2, r3 8001aca: 68bb ldr r3, [r7, #8] 8001acc: 781b ldrb r3, [r3, #0] 8001ace: 009b lsls r3, r3, #2 8001ad0: 441a add r2, r3 8001ad2: 8cfb ldrh r3, [r7, #38] ; 0x26 8001ad4: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001ad8: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8001adc: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8001ae0: f043 0380 orr.w r3, r3, #128 ; 0x80 8001ae4: b29b uxth r3, r3 8001ae6: 8013 strh r3, [r2, #0] 8001ae8: e0db b.n 8001ca2 } } else /* Transfer is not yet Done */ { /* need to Free USB Buff */ if ((wEPVal & USB_EP_DTOG_RX) == 0U) 8001aea: 88fb ldrh r3, [r7, #6] 8001aec: f403 4380 and.w r3, r3, #16384 ; 0x4000 8001af0: 2b00 cmp r3, #0 8001af2: d11f bne.n 8001b34 { PCD_FreeUserBuffer(hpcd->Instance, ep->num, 1U); 8001af4: 68fb ldr r3, [r7, #12] 8001af6: 681b ldr r3, [r3, #0] 8001af8: 461a mov r2, r3 8001afa: 68bb ldr r3, [r7, #8] 8001afc: 781b ldrb r3, [r3, #0] 8001afe: 009b lsls r3, r3, #2 8001b00: 4413 add r3, r2 8001b02: 881b ldrh r3, [r3, #0] 8001b04: b29b uxth r3, r3 8001b06: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8001b0a: f023 0370 bic.w r3, r3, #112 ; 0x70 8001b0e: 85bb strh r3, [r7, #44] ; 0x2c 8001b10: 68fb ldr r3, [r7, #12] 8001b12: 681b ldr r3, [r3, #0] 8001b14: 461a mov r2, r3 8001b16: 68bb ldr r3, [r7, #8] 8001b18: 781b ldrb r3, [r3, #0] 8001b1a: 009b lsls r3, r3, #2 8001b1c: 441a add r2, r3 8001b1e: 8dbb ldrh r3, [r7, #44] ; 0x2c 8001b20: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001b24: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8001b28: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8001b2c: f043 0380 orr.w r3, r3, #128 ; 0x80 8001b30: b29b uxth r3, r3 8001b32: 8013 strh r3, [r2, #0] } /* Still there is data to Fill in the next Buffer */ if (ep->xfer_fill_db == 1U) 8001b34: 68bb ldr r3, [r7, #8] 8001b36: f893 3024 ldrb.w r3, [r3, #36] ; 0x24 8001b3a: 2b01 cmp r3, #1 8001b3c: f040 80b1 bne.w 8001ca2 { ep->xfer_buff += TxByteNbre; 8001b40: 68bb ldr r3, [r7, #8] 8001b42: 695a ldr r2, [r3, #20] 8001b44: 8dfb ldrh r3, [r7, #46] ; 0x2e 8001b46: 441a add r2, r3 8001b48: 68bb ldr r3, [r7, #8] 8001b4a: 615a str r2, [r3, #20] ep->xfer_count += TxByteNbre; 8001b4c: 68bb ldr r3, [r7, #8] 8001b4e: 69da ldr r2, [r3, #28] 8001b50: 8dfb ldrh r3, [r7, #46] ; 0x2e 8001b52: 441a add r2, r3 8001b54: 68bb ldr r3, [r7, #8] 8001b56: 61da str r2, [r3, #28] /* Calculate the len of the new buffer to fill */ if (ep->xfer_len_db >= ep->maxpacket) 8001b58: 68bb ldr r3, [r7, #8] 8001b5a: 6a1a ldr r2, [r3, #32] 8001b5c: 68bb ldr r3, [r7, #8] 8001b5e: 691b ldr r3, [r3, #16] 8001b60: 429a cmp r2, r3 8001b62: d309 bcc.n 8001b78 { len = ep->maxpacket; 8001b64: 68bb ldr r3, [r7, #8] 8001b66: 691b ldr r3, [r3, #16] 8001b68: 63bb str r3, [r7, #56] ; 0x38 ep->xfer_len_db -= len; 8001b6a: 68bb ldr r3, [r7, #8] 8001b6c: 6a1a ldr r2, [r3, #32] 8001b6e: 6bbb ldr r3, [r7, #56] ; 0x38 8001b70: 1ad2 subs r2, r2, r3 8001b72: 68bb ldr r3, [r7, #8] 8001b74: 621a str r2, [r3, #32] 8001b76: e014 b.n 8001ba2 } else if (ep->xfer_len_db == 0U) 8001b78: 68bb ldr r3, [r7, #8] 8001b7a: 6a1b ldr r3, [r3, #32] 8001b7c: 2b00 cmp r3, #0 8001b7e: d106 bne.n 8001b8e { len = TxByteNbre; 8001b80: 8dfb ldrh r3, [r7, #46] ; 0x2e 8001b82: 63bb str r3, [r7, #56] ; 0x38 ep->xfer_fill_db = 0U; 8001b84: 68bb ldr r3, [r7, #8] 8001b86: 2200 movs r2, #0 8001b88: f883 2024 strb.w r2, [r3, #36] ; 0x24 8001b8c: e009 b.n 8001ba2 } else { len = ep->xfer_len_db; 8001b8e: 68bb ldr r3, [r7, #8] 8001b90: 6a1b ldr r3, [r3, #32] 8001b92: 63bb str r3, [r7, #56] ; 0x38 ep->xfer_len_db = 0U; 8001b94: 68bb ldr r3, [r7, #8] 8001b96: 2200 movs r2, #0 8001b98: 621a str r2, [r3, #32] ep->xfer_fill_db = 0; 8001b9a: 68bb ldr r3, [r7, #8] 8001b9c: 2200 movs r2, #0 8001b9e: f883 2024 strb.w r2, [r3, #36] ; 0x24 } /* Set the Double buffer counter for pmabuffer1 */ PCD_SET_EP_DBUF1_CNT(hpcd->Instance, ep->num, ep->is_in, len); 8001ba2: 68fb ldr r3, [r7, #12] 8001ba4: 681b ldr r3, [r3, #0] 8001ba6: 637b str r3, [r7, #52] ; 0x34 8001ba8: 68bb ldr r3, [r7, #8] 8001baa: 785b ldrb r3, [r3, #1] 8001bac: 2b00 cmp r3, #0 8001bae: d155 bne.n 8001c5c 8001bb0: 68fb ldr r3, [r7, #12] 8001bb2: 681b ldr r3, [r3, #0] 8001bb4: 647b str r3, [r7, #68] ; 0x44 8001bb6: 68fb ldr r3, [r7, #12] 8001bb8: 681b ldr r3, [r3, #0] 8001bba: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001bbe: b29b uxth r3, r3 8001bc0: 461a mov r2, r3 8001bc2: 6c7b ldr r3, [r7, #68] ; 0x44 8001bc4: 4413 add r3, r2 8001bc6: 647b str r3, [r7, #68] ; 0x44 8001bc8: 68bb ldr r3, [r7, #8] 8001bca: 781b ldrb r3, [r3, #0] 8001bcc: 011a lsls r2, r3, #4 8001bce: 6c7b ldr r3, [r7, #68] ; 0x44 8001bd0: 4413 add r3, r2 8001bd2: f203 430c addw r3, r3, #1036 ; 0x40c 8001bd6: 643b str r3, [r7, #64] ; 0x40 8001bd8: 6bbb ldr r3, [r7, #56] ; 0x38 8001bda: 2b00 cmp r3, #0 8001bdc: d112 bne.n 8001c04 8001bde: 6c3b ldr r3, [r7, #64] ; 0x40 8001be0: 881b ldrh r3, [r3, #0] 8001be2: b29b uxth r3, r3 8001be4: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8001be8: b29a uxth r2, r3 8001bea: 6c3b ldr r3, [r7, #64] ; 0x40 8001bec: 801a strh r2, [r3, #0] 8001bee: 6c3b ldr r3, [r7, #64] ; 0x40 8001bf0: 881b ldrh r3, [r3, #0] 8001bf2: b29b uxth r3, r3 8001bf4: ea6f 4343 mvn.w r3, r3, lsl #17 8001bf8: ea6f 4353 mvn.w r3, r3, lsr #17 8001bfc: b29a uxth r2, r3 8001bfe: 6c3b ldr r3, [r7, #64] ; 0x40 8001c00: 801a strh r2, [r3, #0] 8001c02: e044 b.n 8001c8e 8001c04: 6bbb ldr r3, [r7, #56] ; 0x38 8001c06: 2b3e cmp r3, #62 ; 0x3e 8001c08: d811 bhi.n 8001c2e 8001c0a: 6bbb ldr r3, [r7, #56] ; 0x38 8001c0c: 085b lsrs r3, r3, #1 8001c0e: 63fb str r3, [r7, #60] ; 0x3c 8001c10: 6bbb ldr r3, [r7, #56] ; 0x38 8001c12: f003 0301 and.w r3, r3, #1 8001c16: 2b00 cmp r3, #0 8001c18: d002 beq.n 8001c20 8001c1a: 6bfb ldr r3, [r7, #60] ; 0x3c 8001c1c: 3301 adds r3, #1 8001c1e: 63fb str r3, [r7, #60] ; 0x3c 8001c20: 6bfb ldr r3, [r7, #60] ; 0x3c 8001c22: b29b uxth r3, r3 8001c24: 029b lsls r3, r3, #10 8001c26: b29a uxth r2, r3 8001c28: 6c3b ldr r3, [r7, #64] ; 0x40 8001c2a: 801a strh r2, [r3, #0] 8001c2c: e02f b.n 8001c8e 8001c2e: 6bbb ldr r3, [r7, #56] ; 0x38 8001c30: 095b lsrs r3, r3, #5 8001c32: 63fb str r3, [r7, #60] ; 0x3c 8001c34: 6bbb ldr r3, [r7, #56] ; 0x38 8001c36: f003 031f and.w r3, r3, #31 8001c3a: 2b00 cmp r3, #0 8001c3c: d102 bne.n 8001c44 8001c3e: 6bfb ldr r3, [r7, #60] ; 0x3c 8001c40: 3b01 subs r3, #1 8001c42: 63fb str r3, [r7, #60] ; 0x3c 8001c44: 6bfb ldr r3, [r7, #60] ; 0x3c 8001c46: b29b uxth r3, r3 8001c48: 029b lsls r3, r3, #10 8001c4a: b29b uxth r3, r3 8001c4c: ea6f 4343 mvn.w r3, r3, lsl #17 8001c50: ea6f 4353 mvn.w r3, r3, lsr #17 8001c54: b29a uxth r2, r3 8001c56: 6c3b ldr r3, [r7, #64] ; 0x40 8001c58: 801a strh r2, [r3, #0] 8001c5a: e018 b.n 8001c8e 8001c5c: 68bb ldr r3, [r7, #8] 8001c5e: 785b ldrb r3, [r3, #1] 8001c60: 2b01 cmp r3, #1 8001c62: d114 bne.n 8001c8e 8001c64: 68fb ldr r3, [r7, #12] 8001c66: 681b ldr r3, [r3, #0] 8001c68: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001c6c: b29b uxth r3, r3 8001c6e: 461a mov r2, r3 8001c70: 6b7b ldr r3, [r7, #52] ; 0x34 8001c72: 4413 add r3, r2 8001c74: 637b str r3, [r7, #52] ; 0x34 8001c76: 68bb ldr r3, [r7, #8] 8001c78: 781b ldrb r3, [r3, #0] 8001c7a: 011a lsls r2, r3, #4 8001c7c: 6b7b ldr r3, [r7, #52] ; 0x34 8001c7e: 4413 add r3, r2 8001c80: f203 430c addw r3, r3, #1036 ; 0x40c 8001c84: 633b str r3, [r7, #48] ; 0x30 8001c86: 6bbb ldr r3, [r7, #56] ; 0x38 8001c88: b29a uxth r2, r3 8001c8a: 6b3b ldr r3, [r7, #48] ; 0x30 8001c8c: 801a strh r2, [r3, #0] /* Copy the user buffer to USB PMA */ USB_WritePMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr1, (uint16_t)len); 8001c8e: 68fb ldr r3, [r7, #12] 8001c90: 6818 ldr r0, [r3, #0] 8001c92: 68bb ldr r3, [r7, #8] 8001c94: 6959 ldr r1, [r3, #20] 8001c96: 68bb ldr r3, [r7, #8] 8001c98: 895a ldrh r2, [r3, #10] 8001c9a: 6bbb ldr r3, [r7, #56] ; 0x38 8001c9c: b29b uxth r3, r3 8001c9e: f002 fd2f bl 8004700 } } } /*enable endpoint IN*/ PCD_SET_EP_TX_STATUS(hpcd->Instance, ep->num, USB_EP_TX_VALID); 8001ca2: 68fb ldr r3, [r7, #12] 8001ca4: 681b ldr r3, [r3, #0] 8001ca6: 461a mov r2, r3 8001ca8: 68bb ldr r3, [r7, #8] 8001caa: 781b ldrb r3, [r3, #0] 8001cac: 009b lsls r3, r3, #2 8001cae: 4413 add r3, r2 8001cb0: 881b ldrh r3, [r3, #0] 8001cb2: b29b uxth r3, r3 8001cb4: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8001cb8: f023 0340 bic.w r3, r3, #64 ; 0x40 8001cbc: 823b strh r3, [r7, #16] 8001cbe: 8a3b ldrh r3, [r7, #16] 8001cc0: f083 0310 eor.w r3, r3, #16 8001cc4: 823b strh r3, [r7, #16] 8001cc6: 8a3b ldrh r3, [r7, #16] 8001cc8: f083 0320 eor.w r3, r3, #32 8001ccc: 823b strh r3, [r7, #16] 8001cce: 68fb ldr r3, [r7, #12] 8001cd0: 681b ldr r3, [r3, #0] 8001cd2: 461a mov r2, r3 8001cd4: 68bb ldr r3, [r7, #8] 8001cd6: 781b ldrb r3, [r3, #0] 8001cd8: 009b lsls r3, r3, #2 8001cda: 441a add r2, r3 8001cdc: 8a3b ldrh r3, [r7, #16] 8001cde: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001ce2: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8001ce6: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8001cea: f043 0380 orr.w r3, r3, #128 ; 0x80 8001cee: b29b uxth r3, r3 8001cf0: 8013 strh r3, [r2, #0] return HAL_OK; 8001cf2: 2300 movs r3, #0 } 8001cf4: 4618 mov r0, r3 8001cf6: 3748 adds r7, #72 ; 0x48 8001cf8: 46bd mov sp, r7 8001cfa: bd80 pop {r7, pc} 08001cfc : * @retval HAL status */ HAL_StatusTypeDef HAL_PCDEx_PMAConfig(PCD_HandleTypeDef *hpcd, uint16_t ep_addr, uint16_t ep_kind, uint32_t pmaadress) { 8001cfc: b480 push {r7} 8001cfe: b087 sub sp, #28 8001d00: af00 add r7, sp, #0 8001d02: 60f8 str r0, [r7, #12] 8001d04: 607b str r3, [r7, #4] 8001d06: 460b mov r3, r1 8001d08: 817b strh r3, [r7, #10] 8001d0a: 4613 mov r3, r2 8001d0c: 813b strh r3, [r7, #8] PCD_EPTypeDef *ep; /* initialize ep structure*/ if ((0x80U & ep_addr) == 0x80U) 8001d0e: 897b ldrh r3, [r7, #10] 8001d10: f003 0380 and.w r3, r3, #128 ; 0x80 8001d14: b29b uxth r3, r3 8001d16: 2b00 cmp r3, #0 8001d18: d00b beq.n 8001d32 { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 8001d1a: 897b ldrh r3, [r7, #10] 8001d1c: f003 0307 and.w r3, r3, #7 8001d20: 1c5a adds r2, r3, #1 8001d22: 4613 mov r3, r2 8001d24: 009b lsls r3, r3, #2 8001d26: 4413 add r3, r2 8001d28: 00db lsls r3, r3, #3 8001d2a: 68fa ldr r2, [r7, #12] 8001d2c: 4413 add r3, r2 8001d2e: 617b str r3, [r7, #20] 8001d30: e009 b.n 8001d46 } else { ep = &hpcd->OUT_ep[ep_addr]; 8001d32: 897a ldrh r2, [r7, #10] 8001d34: 4613 mov r3, r2 8001d36: 009b lsls r3, r3, #2 8001d38: 4413 add r3, r2 8001d3a: 00db lsls r3, r3, #3 8001d3c: f503 73b4 add.w r3, r3, #360 ; 0x168 8001d40: 68fa ldr r2, [r7, #12] 8001d42: 4413 add r3, r2 8001d44: 617b str r3, [r7, #20] } /* Here we check if the endpoint is single or double Buffer*/ if (ep_kind == PCD_SNG_BUF) 8001d46: 893b ldrh r3, [r7, #8] 8001d48: 2b00 cmp r3, #0 8001d4a: d107 bne.n 8001d5c { /* Single Buffer */ ep->doublebuffer = 0U; 8001d4c: 697b ldr r3, [r7, #20] 8001d4e: 2200 movs r2, #0 8001d50: 731a strb r2, [r3, #12] /* Configure the PMA */ ep->pmaadress = (uint16_t)pmaadress; 8001d52: 687b ldr r3, [r7, #4] 8001d54: b29a uxth r2, r3 8001d56: 697b ldr r3, [r7, #20] 8001d58: 80da strh r2, [r3, #6] 8001d5a: e00b b.n 8001d74 } else /* USB_DBL_BUF */ { /* Double Buffer Endpoint */ ep->doublebuffer = 1U; 8001d5c: 697b ldr r3, [r7, #20] 8001d5e: 2201 movs r2, #1 8001d60: 731a strb r2, [r3, #12] /* Configure the PMA */ ep->pmaaddr0 = (uint16_t)(pmaadress & 0xFFFFU); 8001d62: 687b ldr r3, [r7, #4] 8001d64: b29a uxth r2, r3 8001d66: 697b ldr r3, [r7, #20] 8001d68: 811a strh r2, [r3, #8] ep->pmaaddr1 = (uint16_t)((pmaadress & 0xFFFF0000U) >> 16); 8001d6a: 687b ldr r3, [r7, #4] 8001d6c: 0c1b lsrs r3, r3, #16 8001d6e: b29a uxth r2, r3 8001d70: 697b ldr r3, [r7, #20] 8001d72: 815a strh r2, [r3, #10] } return HAL_OK; 8001d74: 2300 movs r3, #0 } 8001d76: 4618 mov r0, r3 8001d78: 371c adds r7, #28 8001d7a: 46bd mov sp, r7 8001d7c: bc80 pop {r7} 8001d7e: 4770 bx lr 08001d80 : * 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) { 8001d80: b580 push {r7, lr} 8001d82: b086 sub sp, #24 8001d84: af00 add r7, sp, #0 8001d86: 6078 str r0, [r7, #4] uint32_t tickstart; uint32_t pll_config; /* Check Null pointer */ if (RCC_OscInitStruct == NULL) 8001d88: 687b ldr r3, [r7, #4] 8001d8a: 2b00 cmp r3, #0 8001d8c: d101 bne.n 8001d92 { return HAL_ERROR; 8001d8e: 2301 movs r3, #1 8001d90: e26c b.n 800226c /* Check the parameters */ assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType)); /*------------------------------- HSE Configuration ------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE) 8001d92: 687b ldr r3, [r7, #4] 8001d94: 681b ldr r3, [r3, #0] 8001d96: f003 0301 and.w r3, r3, #1 8001d9a: 2b00 cmp r3, #0 8001d9c: f000 8087 beq.w 8001eae { /* 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) 8001da0: 4b92 ldr r3, [pc, #584] ; (8001fec ) 8001da2: 685b ldr r3, [r3, #4] 8001da4: f003 030c and.w r3, r3, #12 8001da8: 2b04 cmp r3, #4 8001daa: d00c beq.n 8001dc6 || ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (__HAL_RCC_GET_PLL_OSCSOURCE() == RCC_PLLSOURCE_HSE))) 8001dac: 4b8f ldr r3, [pc, #572] ; (8001fec ) 8001dae: 685b ldr r3, [r3, #4] 8001db0: f003 030c and.w r3, r3, #12 8001db4: 2b08 cmp r3, #8 8001db6: d112 bne.n 8001dde 8001db8: 4b8c ldr r3, [pc, #560] ; (8001fec ) 8001dba: 685b ldr r3, [r3, #4] 8001dbc: f403 3380 and.w r3, r3, #65536 ; 0x10000 8001dc0: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 8001dc4: d10b bne.n 8001dde { if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) 8001dc6: 4b89 ldr r3, [pc, #548] ; (8001fec ) 8001dc8: 681b ldr r3, [r3, #0] 8001dca: f403 3300 and.w r3, r3, #131072 ; 0x20000 8001dce: 2b00 cmp r3, #0 8001dd0: d06c beq.n 8001eac 8001dd2: 687b ldr r3, [r7, #4] 8001dd4: 685b ldr r3, [r3, #4] 8001dd6: 2b00 cmp r3, #0 8001dd8: d168 bne.n 8001eac { return HAL_ERROR; 8001dda: 2301 movs r3, #1 8001ddc: e246 b.n 800226c } } else { /* Set the new HSE configuration ---------------------------------------*/ __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState); 8001dde: 687b ldr r3, [r7, #4] 8001de0: 685b ldr r3, [r3, #4] 8001de2: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 8001de6: d106 bne.n 8001df6 8001de8: 4b80 ldr r3, [pc, #512] ; (8001fec ) 8001dea: 681b ldr r3, [r3, #0] 8001dec: 4a7f ldr r2, [pc, #508] ; (8001fec ) 8001dee: f443 3380 orr.w r3, r3, #65536 ; 0x10000 8001df2: 6013 str r3, [r2, #0] 8001df4: e02e b.n 8001e54 8001df6: 687b ldr r3, [r7, #4] 8001df8: 685b ldr r3, [r3, #4] 8001dfa: 2b00 cmp r3, #0 8001dfc: d10c bne.n 8001e18 8001dfe: 4b7b ldr r3, [pc, #492] ; (8001fec ) 8001e00: 681b ldr r3, [r3, #0] 8001e02: 4a7a ldr r2, [pc, #488] ; (8001fec ) 8001e04: f423 3380 bic.w r3, r3, #65536 ; 0x10000 8001e08: 6013 str r3, [r2, #0] 8001e0a: 4b78 ldr r3, [pc, #480] ; (8001fec ) 8001e0c: 681b ldr r3, [r3, #0] 8001e0e: 4a77 ldr r2, [pc, #476] ; (8001fec ) 8001e10: f423 2380 bic.w r3, r3, #262144 ; 0x40000 8001e14: 6013 str r3, [r2, #0] 8001e16: e01d b.n 8001e54 8001e18: 687b ldr r3, [r7, #4] 8001e1a: 685b ldr r3, [r3, #4] 8001e1c: f5b3 2fa0 cmp.w r3, #327680 ; 0x50000 8001e20: d10c bne.n 8001e3c 8001e22: 4b72 ldr r3, [pc, #456] ; (8001fec ) 8001e24: 681b ldr r3, [r3, #0] 8001e26: 4a71 ldr r2, [pc, #452] ; (8001fec ) 8001e28: f443 2380 orr.w r3, r3, #262144 ; 0x40000 8001e2c: 6013 str r3, [r2, #0] 8001e2e: 4b6f ldr r3, [pc, #444] ; (8001fec ) 8001e30: 681b ldr r3, [r3, #0] 8001e32: 4a6e ldr r2, [pc, #440] ; (8001fec ) 8001e34: f443 3380 orr.w r3, r3, #65536 ; 0x10000 8001e38: 6013 str r3, [r2, #0] 8001e3a: e00b b.n 8001e54 8001e3c: 4b6b ldr r3, [pc, #428] ; (8001fec ) 8001e3e: 681b ldr r3, [r3, #0] 8001e40: 4a6a ldr r2, [pc, #424] ; (8001fec ) 8001e42: f423 3380 bic.w r3, r3, #65536 ; 0x10000 8001e46: 6013 str r3, [r2, #0] 8001e48: 4b68 ldr r3, [pc, #416] ; (8001fec ) 8001e4a: 681b ldr r3, [r3, #0] 8001e4c: 4a67 ldr r2, [pc, #412] ; (8001fec ) 8001e4e: f423 2380 bic.w r3, r3, #262144 ; 0x40000 8001e52: 6013 str r3, [r2, #0] /* Check the HSE State */ if (RCC_OscInitStruct->HSEState != RCC_HSE_OFF) 8001e54: 687b ldr r3, [r7, #4] 8001e56: 685b ldr r3, [r3, #4] 8001e58: 2b00 cmp r3, #0 8001e5a: d013 beq.n 8001e84 { /* Get Start Tick */ tickstart = HAL_GetTick(); 8001e5c: f7fe faf6 bl 800044c 8001e60: 6138 str r0, [r7, #16] /* Wait till HSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET) 8001e62: e008 b.n 8001e76 { if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) 8001e64: f7fe faf2 bl 800044c 8001e68: 4602 mov r2, r0 8001e6a: 693b ldr r3, [r7, #16] 8001e6c: 1ad3 subs r3, r2, r3 8001e6e: 2b64 cmp r3, #100 ; 0x64 8001e70: d901 bls.n 8001e76 { return HAL_TIMEOUT; 8001e72: 2303 movs r3, #3 8001e74: e1fa b.n 800226c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET) 8001e76: 4b5d ldr r3, [pc, #372] ; (8001fec ) 8001e78: 681b ldr r3, [r3, #0] 8001e7a: f403 3300 and.w r3, r3, #131072 ; 0x20000 8001e7e: 2b00 cmp r3, #0 8001e80: d0f0 beq.n 8001e64 8001e82: e014 b.n 8001eae } } else { /* Get Start Tick */ tickstart = HAL_GetTick(); 8001e84: f7fe fae2 bl 800044c 8001e88: 6138 str r0, [r7, #16] /* Wait till HSE is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) 8001e8a: e008 b.n 8001e9e { if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) 8001e8c: f7fe fade bl 800044c 8001e90: 4602 mov r2, r0 8001e92: 693b ldr r3, [r7, #16] 8001e94: 1ad3 subs r3, r2, r3 8001e96: 2b64 cmp r3, #100 ; 0x64 8001e98: d901 bls.n 8001e9e { return HAL_TIMEOUT; 8001e9a: 2303 movs r3, #3 8001e9c: e1e6 b.n 800226c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) 8001e9e: 4b53 ldr r3, [pc, #332] ; (8001fec ) 8001ea0: 681b ldr r3, [r3, #0] 8001ea2: f403 3300 and.w r3, r3, #131072 ; 0x20000 8001ea6: 2b00 cmp r3, #0 8001ea8: d1f0 bne.n 8001e8c 8001eaa: e000 b.n 8001eae if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) 8001eac: bf00 nop } } } } /*----------------------------- HSI Configuration --------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI) 8001eae: 687b ldr r3, [r7, #4] 8001eb0: 681b ldr r3, [r3, #0] 8001eb2: f003 0302 and.w r3, r3, #2 8001eb6: 2b00 cmp r3, #0 8001eb8: d063 beq.n 8001f82 /* 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) 8001eba: 4b4c ldr r3, [pc, #304] ; (8001fec ) 8001ebc: 685b ldr r3, [r3, #4] 8001ebe: f003 030c and.w r3, r3, #12 8001ec2: 2b00 cmp r3, #0 8001ec4: d00b beq.n 8001ede || ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (__HAL_RCC_GET_PLL_OSCSOURCE() == RCC_PLLSOURCE_HSI_DIV2))) 8001ec6: 4b49 ldr r3, [pc, #292] ; (8001fec ) 8001ec8: 685b ldr r3, [r3, #4] 8001eca: f003 030c and.w r3, r3, #12 8001ece: 2b08 cmp r3, #8 8001ed0: d11c bne.n 8001f0c 8001ed2: 4b46 ldr r3, [pc, #280] ; (8001fec ) 8001ed4: 685b ldr r3, [r3, #4] 8001ed6: f403 3380 and.w r3, r3, #65536 ; 0x10000 8001eda: 2b00 cmp r3, #0 8001edc: d116 bne.n 8001f0c { /* 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)) 8001ede: 4b43 ldr r3, [pc, #268] ; (8001fec ) 8001ee0: 681b ldr r3, [r3, #0] 8001ee2: f003 0302 and.w r3, r3, #2 8001ee6: 2b00 cmp r3, #0 8001ee8: d005 beq.n 8001ef6 8001eea: 687b ldr r3, [r7, #4] 8001eec: 691b ldr r3, [r3, #16] 8001eee: 2b01 cmp r3, #1 8001ef0: d001 beq.n 8001ef6 { return HAL_ERROR; 8001ef2: 2301 movs r3, #1 8001ef4: e1ba b.n 800226c } /* Otherwise, just the calibration is allowed */ else { /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 8001ef6: 4b3d ldr r3, [pc, #244] ; (8001fec ) 8001ef8: 681b ldr r3, [r3, #0] 8001efa: f023 02f8 bic.w r2, r3, #248 ; 0xf8 8001efe: 687b ldr r3, [r7, #4] 8001f00: 695b ldr r3, [r3, #20] 8001f02: 00db lsls r3, r3, #3 8001f04: 4939 ldr r1, [pc, #228] ; (8001fec ) 8001f06: 4313 orrs r3, r2 8001f08: 600b str r3, [r1, #0] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON)) 8001f0a: e03a b.n 8001f82 } } else { /* Check the HSI State */ if (RCC_OscInitStruct->HSIState != RCC_HSI_OFF) 8001f0c: 687b ldr r3, [r7, #4] 8001f0e: 691b ldr r3, [r3, #16] 8001f10: 2b00 cmp r3, #0 8001f12: d020 beq.n 8001f56 { /* Enable the Internal High Speed oscillator (HSI). */ __HAL_RCC_HSI_ENABLE(); 8001f14: 4b36 ldr r3, [pc, #216] ; (8001ff0 ) 8001f16: 2201 movs r2, #1 8001f18: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 8001f1a: f7fe fa97 bl 800044c 8001f1e: 6138 str r0, [r7, #16] /* Wait till HSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) 8001f20: e008 b.n 8001f34 { if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 8001f22: f7fe fa93 bl 800044c 8001f26: 4602 mov r2, r0 8001f28: 693b ldr r3, [r7, #16] 8001f2a: 1ad3 subs r3, r2, r3 8001f2c: 2b02 cmp r3, #2 8001f2e: d901 bls.n 8001f34 { return HAL_TIMEOUT; 8001f30: 2303 movs r3, #3 8001f32: e19b b.n 800226c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) 8001f34: 4b2d ldr r3, [pc, #180] ; (8001fec ) 8001f36: 681b ldr r3, [r3, #0] 8001f38: f003 0302 and.w r3, r3, #2 8001f3c: 2b00 cmp r3, #0 8001f3e: d0f0 beq.n 8001f22 } } /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 8001f40: 4b2a ldr r3, [pc, #168] ; (8001fec ) 8001f42: 681b ldr r3, [r3, #0] 8001f44: f023 02f8 bic.w r2, r3, #248 ; 0xf8 8001f48: 687b ldr r3, [r7, #4] 8001f4a: 695b ldr r3, [r3, #20] 8001f4c: 00db lsls r3, r3, #3 8001f4e: 4927 ldr r1, [pc, #156] ; (8001fec ) 8001f50: 4313 orrs r3, r2 8001f52: 600b str r3, [r1, #0] 8001f54: e015 b.n 8001f82 } else { /* Disable the Internal High Speed oscillator (HSI). */ __HAL_RCC_HSI_DISABLE(); 8001f56: 4b26 ldr r3, [pc, #152] ; (8001ff0 ) 8001f58: 2200 movs r2, #0 8001f5a: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 8001f5c: f7fe fa76 bl 800044c 8001f60: 6138 str r0, [r7, #16] /* Wait till HSI is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) 8001f62: e008 b.n 8001f76 { if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 8001f64: f7fe fa72 bl 800044c 8001f68: 4602 mov r2, r0 8001f6a: 693b ldr r3, [r7, #16] 8001f6c: 1ad3 subs r3, r2, r3 8001f6e: 2b02 cmp r3, #2 8001f70: d901 bls.n 8001f76 { return HAL_TIMEOUT; 8001f72: 2303 movs r3, #3 8001f74: e17a b.n 800226c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) 8001f76: 4b1d ldr r3, [pc, #116] ; (8001fec ) 8001f78: 681b ldr r3, [r3, #0] 8001f7a: f003 0302 and.w r3, r3, #2 8001f7e: 2b00 cmp r3, #0 8001f80: d1f0 bne.n 8001f64 } } } } /*------------------------------ LSI Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI) 8001f82: 687b ldr r3, [r7, #4] 8001f84: 681b ldr r3, [r3, #0] 8001f86: f003 0308 and.w r3, r3, #8 8001f8a: 2b00 cmp r3, #0 8001f8c: d03a beq.n 8002004 { /* Check the parameters */ assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState)); /* Check the LSI State */ if (RCC_OscInitStruct->LSIState != RCC_LSI_OFF) 8001f8e: 687b ldr r3, [r7, #4] 8001f90: 699b ldr r3, [r3, #24] 8001f92: 2b00 cmp r3, #0 8001f94: d019 beq.n 8001fca { /* Enable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_ENABLE(); 8001f96: 4b17 ldr r3, [pc, #92] ; (8001ff4 ) 8001f98: 2201 movs r2, #1 8001f9a: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 8001f9c: f7fe fa56 bl 800044c 8001fa0: 6138 str r0, [r7, #16] /* Wait till LSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET) 8001fa2: e008 b.n 8001fb6 { if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE) 8001fa4: f7fe fa52 bl 800044c 8001fa8: 4602 mov r2, r0 8001faa: 693b ldr r3, [r7, #16] 8001fac: 1ad3 subs r3, r2, r3 8001fae: 2b02 cmp r3, #2 8001fb0: d901 bls.n 8001fb6 { return HAL_TIMEOUT; 8001fb2: 2303 movs r3, #3 8001fb4: e15a b.n 800226c while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET) 8001fb6: 4b0d ldr r3, [pc, #52] ; (8001fec ) 8001fb8: 6a5b ldr r3, [r3, #36] ; 0x24 8001fba: f003 0302 and.w r3, r3, #2 8001fbe: 2b00 cmp r3, #0 8001fc0: d0f0 beq.n 8001fa4 } } /* To have a fully stabilized clock in the specified range, a software delay of 1ms should be added.*/ RCC_Delay(1); 8001fc2: 2001 movs r0, #1 8001fc4: f000 faa8 bl 8002518 8001fc8: e01c b.n 8002004 } else { /* Disable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_DISABLE(); 8001fca: 4b0a ldr r3, [pc, #40] ; (8001ff4 ) 8001fcc: 2200 movs r2, #0 8001fce: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 8001fd0: f7fe fa3c bl 800044c 8001fd4: 6138 str r0, [r7, #16] /* Wait till LSI is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET) 8001fd6: e00f b.n 8001ff8 { if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE) 8001fd8: f7fe fa38 bl 800044c 8001fdc: 4602 mov r2, r0 8001fde: 693b ldr r3, [r7, #16] 8001fe0: 1ad3 subs r3, r2, r3 8001fe2: 2b02 cmp r3, #2 8001fe4: d908 bls.n 8001ff8 { return HAL_TIMEOUT; 8001fe6: 2303 movs r3, #3 8001fe8: e140 b.n 800226c 8001fea: bf00 nop 8001fec: 40021000 .word 0x40021000 8001ff0: 42420000 .word 0x42420000 8001ff4: 42420480 .word 0x42420480 while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET) 8001ff8: 4b9e ldr r3, [pc, #632] ; (8002274 ) 8001ffa: 6a5b ldr r3, [r3, #36] ; 0x24 8001ffc: f003 0302 and.w r3, r3, #2 8002000: 2b00 cmp r3, #0 8002002: d1e9 bne.n 8001fd8 } } } } /*------------------------------ LSE Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE) 8002004: 687b ldr r3, [r7, #4] 8002006: 681b ldr r3, [r3, #0] 8002008: f003 0304 and.w r3, r3, #4 800200c: 2b00 cmp r3, #0 800200e: f000 80a6 beq.w 800215e { FlagStatus pwrclkchanged = RESET; 8002012: 2300 movs r3, #0 8002014: 75fb strb r3, [r7, #23] /* 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()) 8002016: 4b97 ldr r3, [pc, #604] ; (8002274 ) 8002018: 69db ldr r3, [r3, #28] 800201a: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 800201e: 2b00 cmp r3, #0 8002020: d10d bne.n 800203e { __HAL_RCC_PWR_CLK_ENABLE(); 8002022: 4b94 ldr r3, [pc, #592] ; (8002274 ) 8002024: 69db ldr r3, [r3, #28] 8002026: 4a93 ldr r2, [pc, #588] ; (8002274 ) 8002028: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000 800202c: 61d3 str r3, [r2, #28] 800202e: 4b91 ldr r3, [pc, #580] ; (8002274 ) 8002030: 69db ldr r3, [r3, #28] 8002032: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 8002036: 60bb str r3, [r7, #8] 8002038: 68bb ldr r3, [r7, #8] pwrclkchanged = SET; 800203a: 2301 movs r3, #1 800203c: 75fb strb r3, [r7, #23] } if (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 800203e: 4b8e ldr r3, [pc, #568] ; (8002278 ) 8002040: 681b ldr r3, [r3, #0] 8002042: f403 7380 and.w r3, r3, #256 ; 0x100 8002046: 2b00 cmp r3, #0 8002048: d118 bne.n 800207c { /* Enable write access to Backup domain */ SET_BIT(PWR->CR, PWR_CR_DBP); 800204a: 4b8b ldr r3, [pc, #556] ; (8002278 ) 800204c: 681b ldr r3, [r3, #0] 800204e: 4a8a ldr r2, [pc, #552] ; (8002278 ) 8002050: f443 7380 orr.w r3, r3, #256 ; 0x100 8002054: 6013 str r3, [r2, #0] /* Wait for Backup domain Write protection disable */ tickstart = HAL_GetTick(); 8002056: f7fe f9f9 bl 800044c 800205a: 6138 str r0, [r7, #16] while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 800205c: e008 b.n 8002070 { if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) 800205e: f7fe f9f5 bl 800044c 8002062: 4602 mov r2, r0 8002064: 693b ldr r3, [r7, #16] 8002066: 1ad3 subs r3, r2, r3 8002068: 2b64 cmp r3, #100 ; 0x64 800206a: d901 bls.n 8002070 { return HAL_TIMEOUT; 800206c: 2303 movs r3, #3 800206e: e0fd b.n 800226c while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 8002070: 4b81 ldr r3, [pc, #516] ; (8002278 ) 8002072: 681b ldr r3, [r3, #0] 8002074: f403 7380 and.w r3, r3, #256 ; 0x100 8002078: 2b00 cmp r3, #0 800207a: d0f0 beq.n 800205e } } } /* Set the new LSE configuration -----------------------------------------*/ __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState); 800207c: 687b ldr r3, [r7, #4] 800207e: 68db ldr r3, [r3, #12] 8002080: 2b01 cmp r3, #1 8002082: d106 bne.n 8002092 8002084: 4b7b ldr r3, [pc, #492] ; (8002274 ) 8002086: 6a1b ldr r3, [r3, #32] 8002088: 4a7a ldr r2, [pc, #488] ; (8002274 ) 800208a: f043 0301 orr.w r3, r3, #1 800208e: 6213 str r3, [r2, #32] 8002090: e02d b.n 80020ee 8002092: 687b ldr r3, [r7, #4] 8002094: 68db ldr r3, [r3, #12] 8002096: 2b00 cmp r3, #0 8002098: d10c bne.n 80020b4 800209a: 4b76 ldr r3, [pc, #472] ; (8002274 ) 800209c: 6a1b ldr r3, [r3, #32] 800209e: 4a75 ldr r2, [pc, #468] ; (8002274 ) 80020a0: f023 0301 bic.w r3, r3, #1 80020a4: 6213 str r3, [r2, #32] 80020a6: 4b73 ldr r3, [pc, #460] ; (8002274 ) 80020a8: 6a1b ldr r3, [r3, #32] 80020aa: 4a72 ldr r2, [pc, #456] ; (8002274 ) 80020ac: f023 0304 bic.w r3, r3, #4 80020b0: 6213 str r3, [r2, #32] 80020b2: e01c b.n 80020ee 80020b4: 687b ldr r3, [r7, #4] 80020b6: 68db ldr r3, [r3, #12] 80020b8: 2b05 cmp r3, #5 80020ba: d10c bne.n 80020d6 80020bc: 4b6d ldr r3, [pc, #436] ; (8002274 ) 80020be: 6a1b ldr r3, [r3, #32] 80020c0: 4a6c ldr r2, [pc, #432] ; (8002274 ) 80020c2: f043 0304 orr.w r3, r3, #4 80020c6: 6213 str r3, [r2, #32] 80020c8: 4b6a ldr r3, [pc, #424] ; (8002274 ) 80020ca: 6a1b ldr r3, [r3, #32] 80020cc: 4a69 ldr r2, [pc, #420] ; (8002274 ) 80020ce: f043 0301 orr.w r3, r3, #1 80020d2: 6213 str r3, [r2, #32] 80020d4: e00b b.n 80020ee 80020d6: 4b67 ldr r3, [pc, #412] ; (8002274 ) 80020d8: 6a1b ldr r3, [r3, #32] 80020da: 4a66 ldr r2, [pc, #408] ; (8002274 ) 80020dc: f023 0301 bic.w r3, r3, #1 80020e0: 6213 str r3, [r2, #32] 80020e2: 4b64 ldr r3, [pc, #400] ; (8002274 ) 80020e4: 6a1b ldr r3, [r3, #32] 80020e6: 4a63 ldr r2, [pc, #396] ; (8002274 ) 80020e8: f023 0304 bic.w r3, r3, #4 80020ec: 6213 str r3, [r2, #32] /* Check the LSE State */ if (RCC_OscInitStruct->LSEState != RCC_LSE_OFF) 80020ee: 687b ldr r3, [r7, #4] 80020f0: 68db ldr r3, [r3, #12] 80020f2: 2b00 cmp r3, #0 80020f4: d015 beq.n 8002122 { /* Get Start Tick */ tickstart = HAL_GetTick(); 80020f6: f7fe f9a9 bl 800044c 80020fa: 6138 str r0, [r7, #16] /* Wait till LSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) 80020fc: e00a b.n 8002114 { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 80020fe: f7fe f9a5 bl 800044c 8002102: 4602 mov r2, r0 8002104: 693b ldr r3, [r7, #16] 8002106: 1ad3 subs r3, r2, r3 8002108: f241 3288 movw r2, #5000 ; 0x1388 800210c: 4293 cmp r3, r2 800210e: d901 bls.n 8002114 { return HAL_TIMEOUT; 8002110: 2303 movs r3, #3 8002112: e0ab b.n 800226c while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) 8002114: 4b57 ldr r3, [pc, #348] ; (8002274 ) 8002116: 6a1b ldr r3, [r3, #32] 8002118: f003 0302 and.w r3, r3, #2 800211c: 2b00 cmp r3, #0 800211e: d0ee beq.n 80020fe 8002120: e014 b.n 800214c } } else { /* Get Start Tick */ tickstart = HAL_GetTick(); 8002122: f7fe f993 bl 800044c 8002126: 6138 str r0, [r7, #16] /* Wait till LSE is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET) 8002128: e00a b.n 8002140 { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 800212a: f7fe f98f bl 800044c 800212e: 4602 mov r2, r0 8002130: 693b ldr r3, [r7, #16] 8002132: 1ad3 subs r3, r2, r3 8002134: f241 3288 movw r2, #5000 ; 0x1388 8002138: 4293 cmp r3, r2 800213a: d901 bls.n 8002140 { return HAL_TIMEOUT; 800213c: 2303 movs r3, #3 800213e: e095 b.n 800226c while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET) 8002140: 4b4c ldr r3, [pc, #304] ; (8002274 ) 8002142: 6a1b ldr r3, [r3, #32] 8002144: f003 0302 and.w r3, r3, #2 8002148: 2b00 cmp r3, #0 800214a: d1ee bne.n 800212a } } } /* Require to disable power clock if necessary */ if (pwrclkchanged == SET) 800214c: 7dfb ldrb r3, [r7, #23] 800214e: 2b01 cmp r3, #1 8002150: d105 bne.n 800215e { __HAL_RCC_PWR_CLK_DISABLE(); 8002152: 4b48 ldr r3, [pc, #288] ; (8002274 ) 8002154: 69db ldr r3, [r3, #28] 8002156: 4a47 ldr r2, [pc, #284] ; (8002274 ) 8002158: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000 800215c: 61d3 str r3, [r2, #28] #endif /* RCC_CR_PLL2ON */ /*-------------------------------- PLL Configuration -----------------------*/ /* Check the parameters */ assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState)); if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE) 800215e: 687b ldr r3, [r7, #4] 8002160: 69db ldr r3, [r3, #28] 8002162: 2b00 cmp r3, #0 8002164: f000 8081 beq.w 800226a { /* Check if the PLL is used as system clock or not */ if (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_PLLCLK) 8002168: 4b42 ldr r3, [pc, #264] ; (8002274 ) 800216a: 685b ldr r3, [r3, #4] 800216c: f003 030c and.w r3, r3, #12 8002170: 2b08 cmp r3, #8 8002172: d061 beq.n 8002238 { if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON) 8002174: 687b ldr r3, [r7, #4] 8002176: 69db ldr r3, [r3, #28] 8002178: 2b02 cmp r3, #2 800217a: d146 bne.n 800220a /* Check the parameters */ assert_param(IS_RCC_PLLSOURCE(RCC_OscInitStruct->PLL.PLLSource)); assert_param(IS_RCC_PLL_MUL(RCC_OscInitStruct->PLL.PLLMUL)); /* Disable the main PLL. */ __HAL_RCC_PLL_DISABLE(); 800217c: 4b3f ldr r3, [pc, #252] ; (800227c ) 800217e: 2200 movs r2, #0 8002180: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 8002182: f7fe f963 bl 800044c 8002186: 6138 str r0, [r7, #16] /* Wait till PLL is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) 8002188: e008 b.n 800219c { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 800218a: f7fe f95f bl 800044c 800218e: 4602 mov r2, r0 8002190: 693b ldr r3, [r7, #16] 8002192: 1ad3 subs r3, r2, r3 8002194: 2b02 cmp r3, #2 8002196: d901 bls.n 800219c { return HAL_TIMEOUT; 8002198: 2303 movs r3, #3 800219a: e067 b.n 800226c while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) 800219c: 4b35 ldr r3, [pc, #212] ; (8002274 ) 800219e: 681b ldr r3, [r3, #0] 80021a0: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 80021a4: 2b00 cmp r3, #0 80021a6: d1f0 bne.n 800218a } } /* Configure the HSE prediv factor --------------------------------*/ /* It can be written only when the PLL is disabled. Not used in PLL source is different than HSE */ if (RCC_OscInitStruct->PLL.PLLSource == RCC_PLLSOURCE_HSE) 80021a8: 687b ldr r3, [r7, #4] 80021aa: 6a1b ldr r3, [r3, #32] 80021ac: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 80021b0: d108 bne.n 80021c4 /* Set PREDIV1 source */ SET_BIT(RCC->CFGR2, RCC_OscInitStruct->Prediv1Source); #endif /* RCC_CFGR2_PREDIV1SRC */ /* Set PREDIV1 Value */ __HAL_RCC_HSE_PREDIV_CONFIG(RCC_OscInitStruct->HSEPredivValue); 80021b2: 4b30 ldr r3, [pc, #192] ; (8002274 ) 80021b4: 685b ldr r3, [r3, #4] 80021b6: f423 3200 bic.w r2, r3, #131072 ; 0x20000 80021ba: 687b ldr r3, [r7, #4] 80021bc: 689b ldr r3, [r3, #8] 80021be: 492d ldr r1, [pc, #180] ; (8002274 ) 80021c0: 4313 orrs r3, r2 80021c2: 604b str r3, [r1, #4] } /* Configure the main PLL clock source and multiplication factors. */ __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource, 80021c4: 4b2b ldr r3, [pc, #172] ; (8002274 ) 80021c6: 685b ldr r3, [r3, #4] 80021c8: f423 1274 bic.w r2, r3, #3997696 ; 0x3d0000 80021cc: 687b ldr r3, [r7, #4] 80021ce: 6a19 ldr r1, [r3, #32] 80021d0: 687b ldr r3, [r7, #4] 80021d2: 6a5b ldr r3, [r3, #36] ; 0x24 80021d4: 430b orrs r3, r1 80021d6: 4927 ldr r1, [pc, #156] ; (8002274 ) 80021d8: 4313 orrs r3, r2 80021da: 604b str r3, [r1, #4] RCC_OscInitStruct->PLL.PLLMUL); /* Enable the main PLL. */ __HAL_RCC_PLL_ENABLE(); 80021dc: 4b27 ldr r3, [pc, #156] ; (800227c ) 80021de: 2201 movs r2, #1 80021e0: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 80021e2: f7fe f933 bl 800044c 80021e6: 6138 str r0, [r7, #16] /* Wait till PLL is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET) 80021e8: e008 b.n 80021fc { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 80021ea: f7fe f92f bl 800044c 80021ee: 4602 mov r2, r0 80021f0: 693b ldr r3, [r7, #16] 80021f2: 1ad3 subs r3, r2, r3 80021f4: 2b02 cmp r3, #2 80021f6: d901 bls.n 80021fc { return HAL_TIMEOUT; 80021f8: 2303 movs r3, #3 80021fa: e037 b.n 800226c while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET) 80021fc: 4b1d ldr r3, [pc, #116] ; (8002274 ) 80021fe: 681b ldr r3, [r3, #0] 8002200: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 8002204: 2b00 cmp r3, #0 8002206: d0f0 beq.n 80021ea 8002208: e02f b.n 800226a } } else { /* Disable the main PLL. */ __HAL_RCC_PLL_DISABLE(); 800220a: 4b1c ldr r3, [pc, #112] ; (800227c ) 800220c: 2200 movs r2, #0 800220e: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 8002210: f7fe f91c bl 800044c 8002214: 6138 str r0, [r7, #16] /* Wait till PLL is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) 8002216: e008 b.n 800222a { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 8002218: f7fe f918 bl 800044c 800221c: 4602 mov r2, r0 800221e: 693b ldr r3, [r7, #16] 8002220: 1ad3 subs r3, r2, r3 8002222: 2b02 cmp r3, #2 8002224: d901 bls.n 800222a { return HAL_TIMEOUT; 8002226: 2303 movs r3, #3 8002228: e020 b.n 800226c while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) 800222a: 4b12 ldr r3, [pc, #72] ; (8002274 ) 800222c: 681b ldr r3, [r3, #0] 800222e: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 8002232: 2b00 cmp r3, #0 8002234: d1f0 bne.n 8002218 8002236: e018 b.n 800226a } } else { /* Check if there is a request to disable the PLL used as System clock source */ if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) 8002238: 687b ldr r3, [r7, #4] 800223a: 69db ldr r3, [r3, #28] 800223c: 2b01 cmp r3, #1 800223e: d101 bne.n 8002244 { return HAL_ERROR; 8002240: 2301 movs r3, #1 8002242: e013 b.n 800226c } else { /* Do not return HAL_ERROR if request repeats the current configuration */ pll_config = RCC->CFGR; 8002244: 4b0b ldr r3, [pc, #44] ; (8002274 ) 8002246: 685b ldr r3, [r3, #4] 8002248: 60fb str r3, [r7, #12] if ((READ_BIT(pll_config, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 800224a: 68fb ldr r3, [r7, #12] 800224c: f403 3280 and.w r2, r3, #65536 ; 0x10000 8002250: 687b ldr r3, [r7, #4] 8002252: 6a1b ldr r3, [r3, #32] 8002254: 429a cmp r2, r3 8002256: d106 bne.n 8002266 (READ_BIT(pll_config, RCC_CFGR_PLLMULL) != RCC_OscInitStruct->PLL.PLLMUL)) 8002258: 68fb ldr r3, [r7, #12] 800225a: f403 1270 and.w r2, r3, #3932160 ; 0x3c0000 800225e: 687b ldr r3, [r7, #4] 8002260: 6a5b ldr r3, [r3, #36] ; 0x24 if ((READ_BIT(pll_config, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 8002262: 429a cmp r2, r3 8002264: d001 beq.n 800226a { return HAL_ERROR; 8002266: 2301 movs r3, #1 8002268: e000 b.n 800226c } } } } return HAL_OK; 800226a: 2300 movs r3, #0 } 800226c: 4618 mov r0, r3 800226e: 3718 adds r7, #24 8002270: 46bd mov sp, r7 8002272: bd80 pop {r7, pc} 8002274: 40021000 .word 0x40021000 8002278: 40007000 .word 0x40007000 800227c: 42420060 .word 0x42420060 08002280 : * 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) { 8002280: b580 push {r7, lr} 8002282: b084 sub sp, #16 8002284: af00 add r7, sp, #0 8002286: 6078 str r0, [r7, #4] 8002288: 6039 str r1, [r7, #0] uint32_t tickstart; /* Check Null pointer */ if (RCC_ClkInitStruct == NULL) 800228a: 687b ldr r3, [r7, #4] 800228c: 2b00 cmp r3, #0 800228e: d101 bne.n 8002294 { return HAL_ERROR; 8002290: 2301 movs r3, #1 8002292: e0d0 b.n 8002436 must be correctly programmed according to the frequency of the CPU clock (HCLK) of the device. */ #if defined(FLASH_ACR_LATENCY) /* Increasing the number of wait states because of higher CPU frequency */ if (FLatency > __HAL_FLASH_GET_LATENCY()) 8002294: 4b6a ldr r3, [pc, #424] ; (8002440 ) 8002296: 681b ldr r3, [r3, #0] 8002298: f003 0307 and.w r3, r3, #7 800229c: 683a ldr r2, [r7, #0] 800229e: 429a cmp r2, r3 80022a0: d910 bls.n 80022c4 { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ __HAL_FLASH_SET_LATENCY(FLatency); 80022a2: 4b67 ldr r3, [pc, #412] ; (8002440 ) 80022a4: 681b ldr r3, [r3, #0] 80022a6: f023 0207 bic.w r2, r3, #7 80022aa: 4965 ldr r1, [pc, #404] ; (8002440 ) 80022ac: 683b ldr r3, [r7, #0] 80022ae: 4313 orrs r3, r2 80022b0: 600b str r3, [r1, #0] /* Check that the new number of wait states is taken into account to access the Flash memory by reading the FLASH_ACR register */ if (__HAL_FLASH_GET_LATENCY() != FLatency) 80022b2: 4b63 ldr r3, [pc, #396] ; (8002440 ) 80022b4: 681b ldr r3, [r3, #0] 80022b6: f003 0307 and.w r3, r3, #7 80022ba: 683a ldr r2, [r7, #0] 80022bc: 429a cmp r2, r3 80022be: d001 beq.n 80022c4 { return HAL_ERROR; 80022c0: 2301 movs r3, #1 80022c2: e0b8 b.n 8002436 } } #endif /* FLASH_ACR_LATENCY */ /*-------------------------- HCLK Configuration --------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) 80022c4: 687b ldr r3, [r7, #4] 80022c6: 681b ldr r3, [r3, #0] 80022c8: f003 0302 and.w r3, r3, #2 80022cc: 2b00 cmp r3, #0 80022ce: d020 beq.n 8002312 { /* Set the highest APBx dividers in order to ensure that we do not go through a non-spec phase whatever we decrease or increase HCLK. */ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) 80022d0: 687b ldr r3, [r7, #4] 80022d2: 681b ldr r3, [r3, #0] 80022d4: f003 0304 and.w r3, r3, #4 80022d8: 2b00 cmp r3, #0 80022da: d005 beq.n 80022e8 { MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_HCLK_DIV16); 80022dc: 4b59 ldr r3, [pc, #356] ; (8002444 ) 80022de: 685b ldr r3, [r3, #4] 80022e0: 4a58 ldr r2, [pc, #352] ; (8002444 ) 80022e2: f443 63e0 orr.w r3, r3, #1792 ; 0x700 80022e6: 6053 str r3, [r2, #4] } if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) 80022e8: 687b ldr r3, [r7, #4] 80022ea: 681b ldr r3, [r3, #0] 80022ec: f003 0308 and.w r3, r3, #8 80022f0: 2b00 cmp r3, #0 80022f2: d005 beq.n 8002300 { MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, (RCC_HCLK_DIV16 << 3)); 80022f4: 4b53 ldr r3, [pc, #332] ; (8002444 ) 80022f6: 685b ldr r3, [r3, #4] 80022f8: 4a52 ldr r2, [pc, #328] ; (8002444 ) 80022fa: f443 5360 orr.w r3, r3, #14336 ; 0x3800 80022fe: 6053 str r3, [r2, #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); 8002300: 4b50 ldr r3, [pc, #320] ; (8002444 ) 8002302: 685b ldr r3, [r3, #4] 8002304: f023 02f0 bic.w r2, r3, #240 ; 0xf0 8002308: 687b ldr r3, [r7, #4] 800230a: 689b ldr r3, [r3, #8] 800230c: 494d ldr r1, [pc, #308] ; (8002444 ) 800230e: 4313 orrs r3, r2 8002310: 604b str r3, [r1, #4] } /*------------------------- SYSCLK Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK) 8002312: 687b ldr r3, [r7, #4] 8002314: 681b ldr r3, [r3, #0] 8002316: f003 0301 and.w r3, r3, #1 800231a: 2b00 cmp r3, #0 800231c: d040 beq.n 80023a0 { assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource)); /* HSE is selected as System Clock Source */ if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE) 800231e: 687b ldr r3, [r7, #4] 8002320: 685b ldr r3, [r3, #4] 8002322: 2b01 cmp r3, #1 8002324: d107 bne.n 8002336 { /* Check the HSE ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET) 8002326: 4b47 ldr r3, [pc, #284] ; (8002444 ) 8002328: 681b ldr r3, [r3, #0] 800232a: f403 3300 and.w r3, r3, #131072 ; 0x20000 800232e: 2b00 cmp r3, #0 8002330: d115 bne.n 800235e { return HAL_ERROR; 8002332: 2301 movs r3, #1 8002334: e07f b.n 8002436 } } /* PLL is selected as System Clock Source */ else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) 8002336: 687b ldr r3, [r7, #4] 8002338: 685b ldr r3, [r3, #4] 800233a: 2b02 cmp r3, #2 800233c: d107 bne.n 800234e { /* Check the PLL ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET) 800233e: 4b41 ldr r3, [pc, #260] ; (8002444 ) 8002340: 681b ldr r3, [r3, #0] 8002342: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 8002346: 2b00 cmp r3, #0 8002348: d109 bne.n 800235e { return HAL_ERROR; 800234a: 2301 movs r3, #1 800234c: e073 b.n 8002436 } /* HSI is selected as System Clock Source */ else { /* Check the HSI ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) 800234e: 4b3d ldr r3, [pc, #244] ; (8002444 ) 8002350: 681b ldr r3, [r3, #0] 8002352: f003 0302 and.w r3, r3, #2 8002356: 2b00 cmp r3, #0 8002358: d101 bne.n 800235e { return HAL_ERROR; 800235a: 2301 movs r3, #1 800235c: e06b b.n 8002436 } } __HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource); 800235e: 4b39 ldr r3, [pc, #228] ; (8002444 ) 8002360: 685b ldr r3, [r3, #4] 8002362: f023 0203 bic.w r2, r3, #3 8002366: 687b ldr r3, [r7, #4] 8002368: 685b ldr r3, [r3, #4] 800236a: 4936 ldr r1, [pc, #216] ; (8002444 ) 800236c: 4313 orrs r3, r2 800236e: 604b str r3, [r1, #4] /* Get Start Tick */ tickstart = HAL_GetTick(); 8002370: f7fe f86c bl 800044c 8002374: 60f8 str r0, [r7, #12] while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) 8002376: e00a b.n 800238e { if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE) 8002378: f7fe f868 bl 800044c 800237c: 4602 mov r2, r0 800237e: 68fb ldr r3, [r7, #12] 8002380: 1ad3 subs r3, r2, r3 8002382: f241 3288 movw r2, #5000 ; 0x1388 8002386: 4293 cmp r3, r2 8002388: d901 bls.n 800238e { return HAL_TIMEOUT; 800238a: 2303 movs r3, #3 800238c: e053 b.n 8002436 while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) 800238e: 4b2d ldr r3, [pc, #180] ; (8002444 ) 8002390: 685b ldr r3, [r3, #4] 8002392: f003 020c and.w r2, r3, #12 8002396: 687b ldr r3, [r7, #4] 8002398: 685b ldr r3, [r3, #4] 800239a: 009b lsls r3, r3, #2 800239c: 429a cmp r2, r3 800239e: d1eb bne.n 8002378 } } #if defined(FLASH_ACR_LATENCY) /* Decreasing the number of wait states because of lower CPU frequency */ if (FLatency < __HAL_FLASH_GET_LATENCY()) 80023a0: 4b27 ldr r3, [pc, #156] ; (8002440 ) 80023a2: 681b ldr r3, [r3, #0] 80023a4: f003 0307 and.w r3, r3, #7 80023a8: 683a ldr r2, [r7, #0] 80023aa: 429a cmp r2, r3 80023ac: d210 bcs.n 80023d0 { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ __HAL_FLASH_SET_LATENCY(FLatency); 80023ae: 4b24 ldr r3, [pc, #144] ; (8002440 ) 80023b0: 681b ldr r3, [r3, #0] 80023b2: f023 0207 bic.w r2, r3, #7 80023b6: 4922 ldr r1, [pc, #136] ; (8002440 ) 80023b8: 683b ldr r3, [r7, #0] 80023ba: 4313 orrs r3, r2 80023bc: 600b str r3, [r1, #0] /* Check that the new number of wait states is taken into account to access the Flash memory by reading the FLASH_ACR register */ if (__HAL_FLASH_GET_LATENCY() != FLatency) 80023be: 4b20 ldr r3, [pc, #128] ; (8002440 ) 80023c0: 681b ldr r3, [r3, #0] 80023c2: f003 0307 and.w r3, r3, #7 80023c6: 683a ldr r2, [r7, #0] 80023c8: 429a cmp r2, r3 80023ca: d001 beq.n 80023d0 { return HAL_ERROR; 80023cc: 2301 movs r3, #1 80023ce: e032 b.n 8002436 } } #endif /* FLASH_ACR_LATENCY */ /*-------------------------- PCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) 80023d0: 687b ldr r3, [r7, #4] 80023d2: 681b ldr r3, [r3, #0] 80023d4: f003 0304 and.w r3, r3, #4 80023d8: 2b00 cmp r3, #0 80023da: d008 beq.n 80023ee { assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider)); MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider); 80023dc: 4b19 ldr r3, [pc, #100] ; (8002444 ) 80023de: 685b ldr r3, [r3, #4] 80023e0: f423 62e0 bic.w r2, r3, #1792 ; 0x700 80023e4: 687b ldr r3, [r7, #4] 80023e6: 68db ldr r3, [r3, #12] 80023e8: 4916 ldr r1, [pc, #88] ; (8002444 ) 80023ea: 4313 orrs r3, r2 80023ec: 604b str r3, [r1, #4] } /*-------------------------- PCLK2 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) 80023ee: 687b ldr r3, [r7, #4] 80023f0: 681b ldr r3, [r3, #0] 80023f2: f003 0308 and.w r3, r3, #8 80023f6: 2b00 cmp r3, #0 80023f8: d009 beq.n 800240e { assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider)); MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3)); 80023fa: 4b12 ldr r3, [pc, #72] ; (8002444 ) 80023fc: 685b ldr r3, [r3, #4] 80023fe: f423 5260 bic.w r2, r3, #14336 ; 0x3800 8002402: 687b ldr r3, [r7, #4] 8002404: 691b ldr r3, [r3, #16] 8002406: 00db lsls r3, r3, #3 8002408: 490e ldr r1, [pc, #56] ; (8002444 ) 800240a: 4313 orrs r3, r2 800240c: 604b str r3, [r1, #4] } /* Update the SystemCoreClock global variable */ SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos]; 800240e: f000 f821 bl 8002454 8002412: 4601 mov r1, r0 8002414: 4b0b ldr r3, [pc, #44] ; (8002444 ) 8002416: 685b ldr r3, [r3, #4] 8002418: 091b lsrs r3, r3, #4 800241a: f003 030f and.w r3, r3, #15 800241e: 4a0a ldr r2, [pc, #40] ; (8002448 ) 8002420: 5cd3 ldrb r3, [r2, r3] 8002422: fa21 f303 lsr.w r3, r1, r3 8002426: 4a09 ldr r2, [pc, #36] ; (800244c ) 8002428: 6013 str r3, [r2, #0] /* Configure the source of time base considering new system clocks settings*/ HAL_InitTick(uwTickPrio); 800242a: 4b09 ldr r3, [pc, #36] ; (8002450 ) 800242c: 681b ldr r3, [r3, #0] 800242e: 4618 mov r0, r3 8002430: f7fd ffca bl 80003c8 return HAL_OK; 8002434: 2300 movs r3, #0 } 8002436: 4618 mov r0, r3 8002438: 3710 adds r7, #16 800243a: 46bd mov sp, r7 800243c: bd80 pop {r7, pc} 800243e: bf00 nop 8002440: 40022000 .word 0x40022000 8002444: 40021000 .word 0x40021000 8002448: 0800683c .word 0x0800683c 800244c: 20000000 .word 0x20000000 8002450: 20000004 .word 0x20000004 08002454 : * right SYSCLK value. Otherwise, any configuration based on this function will be incorrect. * * @retval SYSCLK frequency */ uint32_t HAL_RCC_GetSysClockFreq(void) { 8002454: b490 push {r4, r7} 8002456: b08a sub sp, #40 ; 0x28 8002458: af00 add r7, sp, #0 #if defined(RCC_CFGR2_PREDIV1SRC) const uint8_t aPLLMULFactorTable[14] = {0, 0, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 13}; const uint8_t aPredivFactorTable[16] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; #else const uint8_t aPLLMULFactorTable[16] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16}; 800245a: 4b2a ldr r3, [pc, #168] ; (8002504 ) 800245c: 1d3c adds r4, r7, #4 800245e: cb0f ldmia r3, {r0, r1, r2, r3} 8002460: e884 000f stmia.w r4, {r0, r1, r2, r3} #if defined(RCC_CFGR2_PREDIV1) const uint8_t aPredivFactorTable[16] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; #else const uint8_t aPredivFactorTable[2] = {1, 2}; 8002464: 4b28 ldr r3, [pc, #160] ; (8002508 ) 8002466: 881b ldrh r3, [r3, #0] 8002468: 803b strh r3, [r7, #0] #endif /*RCC_CFGR2_PREDIV1*/ #endif uint32_t tmpreg = 0U, prediv = 0U, pllclk = 0U, pllmul = 0U; 800246a: 2300 movs r3, #0 800246c: 61fb str r3, [r7, #28] 800246e: 2300 movs r3, #0 8002470: 61bb str r3, [r7, #24] 8002472: 2300 movs r3, #0 8002474: 627b str r3, [r7, #36] ; 0x24 8002476: 2300 movs r3, #0 8002478: 617b str r3, [r7, #20] uint32_t sysclockfreq = 0U; 800247a: 2300 movs r3, #0 800247c: 623b str r3, [r7, #32] #if defined(RCC_CFGR2_PREDIV1SRC) uint32_t prediv2 = 0U, pll2mul = 0U; #endif /*RCC_CFGR2_PREDIV1SRC*/ tmpreg = RCC->CFGR; 800247e: 4b23 ldr r3, [pc, #140] ; (800250c ) 8002480: 685b ldr r3, [r3, #4] 8002482: 61fb str r3, [r7, #28] /* Get SYSCLK source -------------------------------------------------------*/ switch (tmpreg & RCC_CFGR_SWS) 8002484: 69fb ldr r3, [r7, #28] 8002486: f003 030c and.w r3, r3, #12 800248a: 2b04 cmp r3, #4 800248c: d002 beq.n 8002494 800248e: 2b08 cmp r3, #8 8002490: d003 beq.n 800249a 8002492: e02d b.n 80024f0 { case RCC_SYSCLKSOURCE_STATUS_HSE: /* HSE used as system clock */ { sysclockfreq = HSE_VALUE; 8002494: 4b1e ldr r3, [pc, #120] ; (8002510 ) 8002496: 623b str r3, [r7, #32] break; 8002498: e02d b.n 80024f6 } case RCC_SYSCLKSOURCE_STATUS_PLLCLK: /* PLL used as system clock */ { pllmul = aPLLMULFactorTable[(uint32_t)(tmpreg & RCC_CFGR_PLLMULL) >> RCC_CFGR_PLLMULL_Pos]; 800249a: 69fb ldr r3, [r7, #28] 800249c: 0c9b lsrs r3, r3, #18 800249e: f003 030f and.w r3, r3, #15 80024a2: f107 0228 add.w r2, r7, #40 ; 0x28 80024a6: 4413 add r3, r2 80024a8: f813 3c24 ldrb.w r3, [r3, #-36] 80024ac: 617b str r3, [r7, #20] if ((tmpreg & RCC_CFGR_PLLSRC) != RCC_PLLSOURCE_HSI_DIV2) 80024ae: 69fb ldr r3, [r7, #28] 80024b0: f403 3380 and.w r3, r3, #65536 ; 0x10000 80024b4: 2b00 cmp r3, #0 80024b6: d013 beq.n 80024e0 { #if defined(RCC_CFGR2_PREDIV1) prediv = aPredivFactorTable[(uint32_t)(RCC->CFGR2 & RCC_CFGR2_PREDIV1) >> RCC_CFGR2_PREDIV1_Pos]; #else prediv = aPredivFactorTable[(uint32_t)(RCC->CFGR & RCC_CFGR_PLLXTPRE) >> RCC_CFGR_PLLXTPRE_Pos]; 80024b8: 4b14 ldr r3, [pc, #80] ; (800250c ) 80024ba: 685b ldr r3, [r3, #4] 80024bc: 0c5b lsrs r3, r3, #17 80024be: f003 0301 and.w r3, r3, #1 80024c2: f107 0228 add.w r2, r7, #40 ; 0x28 80024c6: 4413 add r3, r2 80024c8: f813 3c28 ldrb.w r3, [r3, #-40] 80024cc: 61bb str r3, [r7, #24] { pllclk = pllclk / 2; } #else /* HSE used as PLL clock source : PLLCLK = HSE/PREDIV1 * PLLMUL */ pllclk = (uint32_t)((HSE_VALUE * pllmul) / prediv); 80024ce: 697b ldr r3, [r7, #20] 80024d0: 4a0f ldr r2, [pc, #60] ; (8002510 ) 80024d2: fb02 f203 mul.w r2, r2, r3 80024d6: 69bb ldr r3, [r7, #24] 80024d8: fbb2 f3f3 udiv r3, r2, r3 80024dc: 627b str r3, [r7, #36] ; 0x24 80024de: e004 b.n 80024ea #endif /*RCC_CFGR2_PREDIV1SRC*/ } else { /* HSI used as PLL clock source : PLLCLK = HSI/2 * PLLMUL */ pllclk = (uint32_t)((HSI_VALUE >> 1) * pllmul); 80024e0: 697b ldr r3, [r7, #20] 80024e2: 4a0c ldr r2, [pc, #48] ; (8002514 ) 80024e4: fb02 f303 mul.w r3, r2, r3 80024e8: 627b str r3, [r7, #36] ; 0x24 } sysclockfreq = pllclk; 80024ea: 6a7b ldr r3, [r7, #36] ; 0x24 80024ec: 623b str r3, [r7, #32] break; 80024ee: e002 b.n 80024f6 } case RCC_SYSCLKSOURCE_STATUS_HSI: /* HSI used as system clock source */ default: /* HSI used as system clock */ { sysclockfreq = HSI_VALUE; 80024f0: 4b07 ldr r3, [pc, #28] ; (8002510 ) 80024f2: 623b str r3, [r7, #32] break; 80024f4: bf00 nop } } return sysclockfreq; 80024f6: 6a3b ldr r3, [r7, #32] } 80024f8: 4618 mov r0, r3 80024fa: 3728 adds r7, #40 ; 0x28 80024fc: 46bd mov sp, r7 80024fe: bc90 pop {r4, r7} 8002500: 4770 bx lr 8002502: bf00 nop 8002504: 080067e0 .word 0x080067e0 8002508: 080067f0 .word 0x080067f0 800250c: 40021000 .word 0x40021000 8002510: 007a1200 .word 0x007a1200 8002514: 003d0900 .word 0x003d0900 08002518 : * @brief This function provides delay (in milliseconds) based on CPU cycles method. * @param mdelay: specifies the delay time length, in milliseconds. * @retval None */ static void RCC_Delay(uint32_t mdelay) { 8002518: b480 push {r7} 800251a: b085 sub sp, #20 800251c: af00 add r7, sp, #0 800251e: 6078 str r0, [r7, #4] __IO uint32_t Delay = mdelay * (SystemCoreClock / 8U / 1000U); 8002520: 4b0a ldr r3, [pc, #40] ; (800254c ) 8002522: 681b ldr r3, [r3, #0] 8002524: 4a0a ldr r2, [pc, #40] ; (8002550 ) 8002526: fba2 2303 umull r2, r3, r2, r3 800252a: 0a5b lsrs r3, r3, #9 800252c: 687a ldr r2, [r7, #4] 800252e: fb02 f303 mul.w r3, r2, r3 8002532: 60fb str r3, [r7, #12] do { __NOP(); 8002534: bf00 nop } while (Delay --); 8002536: 68fb ldr r3, [r7, #12] 8002538: 1e5a subs r2, r3, #1 800253a: 60fa str r2, [r7, #12] 800253c: 2b00 cmp r3, #0 800253e: d1f9 bne.n 8002534 } 8002540: bf00 nop 8002542: 3714 adds r7, #20 8002544: 46bd mov sp, r7 8002546: bc80 pop {r7} 8002548: 4770 bx lr 800254a: bf00 nop 800254c: 20000000 .word 0x20000000 8002550: 10624dd3 .word 0x10624dd3 08002554 : * manually disable it. * * @retval HAL status */ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit) { 8002554: b580 push {r7, lr} 8002556: b086 sub sp, #24 8002558: af00 add r7, sp, #0 800255a: 6078 str r0, [r7, #4] uint32_t tickstart = 0U, temp_reg = 0U; 800255c: 2300 movs r3, #0 800255e: 613b str r3, [r7, #16] 8002560: 2300 movs r3, #0 8002562: 60fb str r3, [r7, #12] /* Check the parameters */ assert_param(IS_RCC_PERIPHCLOCK(PeriphClkInit->PeriphClockSelection)); /*------------------------------- RTC/LCD Configuration ------------------------*/ if ((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RTC) == RCC_PERIPHCLK_RTC)) 8002564: 687b ldr r3, [r7, #4] 8002566: 681b ldr r3, [r3, #0] 8002568: f003 0301 and.w r3, r3, #1 800256c: 2b00 cmp r3, #0 800256e: d07d beq.n 800266c { /* check for RTC Parameters used to output RTCCLK */ assert_param(IS_RCC_RTCCLKSOURCE(PeriphClkInit->RTCClockSelection)); FlagStatus pwrclkchanged = RESET; 8002570: 2300 movs r3, #0 8002572: 75fb strb r3, [r7, #23] /* 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()) 8002574: 4b4f ldr r3, [pc, #316] ; (80026b4 ) 8002576: 69db ldr r3, [r3, #28] 8002578: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 800257c: 2b00 cmp r3, #0 800257e: d10d bne.n 800259c { __HAL_RCC_PWR_CLK_ENABLE(); 8002580: 4b4c ldr r3, [pc, #304] ; (80026b4 ) 8002582: 69db ldr r3, [r3, #28] 8002584: 4a4b ldr r2, [pc, #300] ; (80026b4 ) 8002586: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000 800258a: 61d3 str r3, [r2, #28] 800258c: 4b49 ldr r3, [pc, #292] ; (80026b4 ) 800258e: 69db ldr r3, [r3, #28] 8002590: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 8002594: 60bb str r3, [r7, #8] 8002596: 68bb ldr r3, [r7, #8] pwrclkchanged = SET; 8002598: 2301 movs r3, #1 800259a: 75fb strb r3, [r7, #23] } if (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 800259c: 4b46 ldr r3, [pc, #280] ; (80026b8 ) 800259e: 681b ldr r3, [r3, #0] 80025a0: f403 7380 and.w r3, r3, #256 ; 0x100 80025a4: 2b00 cmp r3, #0 80025a6: d118 bne.n 80025da { /* Enable write access to Backup domain */ SET_BIT(PWR->CR, PWR_CR_DBP); 80025a8: 4b43 ldr r3, [pc, #268] ; (80026b8 ) 80025aa: 681b ldr r3, [r3, #0] 80025ac: 4a42 ldr r2, [pc, #264] ; (80026b8 ) 80025ae: f443 7380 orr.w r3, r3, #256 ; 0x100 80025b2: 6013 str r3, [r2, #0] /* Wait for Backup domain Write protection disable */ tickstart = HAL_GetTick(); 80025b4: f7fd ff4a bl 800044c 80025b8: 6138 str r0, [r7, #16] while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 80025ba: e008 b.n 80025ce { if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) 80025bc: f7fd ff46 bl 800044c 80025c0: 4602 mov r2, r0 80025c2: 693b ldr r3, [r7, #16] 80025c4: 1ad3 subs r3, r2, r3 80025c6: 2b64 cmp r3, #100 ; 0x64 80025c8: d901 bls.n 80025ce { return HAL_TIMEOUT; 80025ca: 2303 movs r3, #3 80025cc: e06d b.n 80026aa while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 80025ce: 4b3a ldr r3, [pc, #232] ; (80026b8 ) 80025d0: 681b ldr r3, [r3, #0] 80025d2: f403 7380 and.w r3, r3, #256 ; 0x100 80025d6: 2b00 cmp r3, #0 80025d8: d0f0 beq.n 80025bc } } } /* Reset the Backup domain only if the RTC Clock source selection is modified from reset value */ temp_reg = (RCC->BDCR & RCC_BDCR_RTCSEL); 80025da: 4b36 ldr r3, [pc, #216] ; (80026b4 ) 80025dc: 6a1b ldr r3, [r3, #32] 80025de: f403 7340 and.w r3, r3, #768 ; 0x300 80025e2: 60fb str r3, [r7, #12] if ((temp_reg != 0x00000000U) && (temp_reg != (PeriphClkInit->RTCClockSelection & RCC_BDCR_RTCSEL))) 80025e4: 68fb ldr r3, [r7, #12] 80025e6: 2b00 cmp r3, #0 80025e8: d02e beq.n 8002648 80025ea: 687b ldr r3, [r7, #4] 80025ec: 685b ldr r3, [r3, #4] 80025ee: f403 7340 and.w r3, r3, #768 ; 0x300 80025f2: 68fa ldr r2, [r7, #12] 80025f4: 429a cmp r2, r3 80025f6: d027 beq.n 8002648 { /* Store the content of BDCR register before the reset of Backup Domain */ temp_reg = (RCC->BDCR & ~(RCC_BDCR_RTCSEL)); 80025f8: 4b2e ldr r3, [pc, #184] ; (80026b4 ) 80025fa: 6a1b ldr r3, [r3, #32] 80025fc: f423 7340 bic.w r3, r3, #768 ; 0x300 8002600: 60fb str r3, [r7, #12] /* RTC Clock selection can be changed only if the Backup Domain is reset */ __HAL_RCC_BACKUPRESET_FORCE(); 8002602: 4b2e ldr r3, [pc, #184] ; (80026bc ) 8002604: 2201 movs r2, #1 8002606: 601a str r2, [r3, #0] __HAL_RCC_BACKUPRESET_RELEASE(); 8002608: 4b2c ldr r3, [pc, #176] ; (80026bc ) 800260a: 2200 movs r2, #0 800260c: 601a str r2, [r3, #0] /* Restore the Content of BDCR register */ RCC->BDCR = temp_reg; 800260e: 4a29 ldr r2, [pc, #164] ; (80026b4 ) 8002610: 68fb ldr r3, [r7, #12] 8002612: 6213 str r3, [r2, #32] /* Wait for LSERDY if LSE was enabled */ if (HAL_IS_BIT_SET(temp_reg, RCC_BDCR_LSEON)) 8002614: 68fb ldr r3, [r7, #12] 8002616: f003 0301 and.w r3, r3, #1 800261a: 2b00 cmp r3, #0 800261c: d014 beq.n 8002648 { /* Get Start Tick */ tickstart = HAL_GetTick(); 800261e: f7fd ff15 bl 800044c 8002622: 6138 str r0, [r7, #16] /* Wait till LSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) 8002624: e00a b.n 800263c { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 8002626: f7fd ff11 bl 800044c 800262a: 4602 mov r2, r0 800262c: 693b ldr r3, [r7, #16] 800262e: 1ad3 subs r3, r2, r3 8002630: f241 3288 movw r2, #5000 ; 0x1388 8002634: 4293 cmp r3, r2 8002636: d901 bls.n 800263c { return HAL_TIMEOUT; 8002638: 2303 movs r3, #3 800263a: e036 b.n 80026aa while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) 800263c: 4b1d ldr r3, [pc, #116] ; (80026b4 ) 800263e: 6a1b ldr r3, [r3, #32] 8002640: f003 0302 and.w r3, r3, #2 8002644: 2b00 cmp r3, #0 8002646: d0ee beq.n 8002626 } } } } __HAL_RCC_RTC_CONFIG(PeriphClkInit->RTCClockSelection); 8002648: 4b1a ldr r3, [pc, #104] ; (80026b4 ) 800264a: 6a1b ldr r3, [r3, #32] 800264c: f423 7240 bic.w r2, r3, #768 ; 0x300 8002650: 687b ldr r3, [r7, #4] 8002652: 685b ldr r3, [r3, #4] 8002654: 4917 ldr r1, [pc, #92] ; (80026b4 ) 8002656: 4313 orrs r3, r2 8002658: 620b str r3, [r1, #32] /* Require to disable power clock if necessary */ if (pwrclkchanged == SET) 800265a: 7dfb ldrb r3, [r7, #23] 800265c: 2b01 cmp r3, #1 800265e: d105 bne.n 800266c { __HAL_RCC_PWR_CLK_DISABLE(); 8002660: 4b14 ldr r3, [pc, #80] ; (80026b4 ) 8002662: 69db ldr r3, [r3, #28] 8002664: 4a13 ldr r2, [pc, #76] ; (80026b4 ) 8002666: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000 800266a: 61d3 str r3, [r2, #28] } } /*------------------------------ ADC clock Configuration ------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_ADC) == RCC_PERIPHCLK_ADC) 800266c: 687b ldr r3, [r7, #4] 800266e: 681b ldr r3, [r3, #0] 8002670: f003 0302 and.w r3, r3, #2 8002674: 2b00 cmp r3, #0 8002676: d008 beq.n 800268a { /* Check the parameters */ assert_param(IS_RCC_ADCPLLCLK_DIV(PeriphClkInit->AdcClockSelection)); /* Configure the ADC clock source */ __HAL_RCC_ADC_CONFIG(PeriphClkInit->AdcClockSelection); 8002678: 4b0e ldr r3, [pc, #56] ; (80026b4 ) 800267a: 685b ldr r3, [r3, #4] 800267c: f423 4240 bic.w r2, r3, #49152 ; 0xc000 8002680: 687b ldr r3, [r7, #4] 8002682: 689b ldr r3, [r3, #8] 8002684: 490b ldr r1, [pc, #44] ; (80026b4 ) 8002686: 4313 orrs r3, r2 8002688: 604b str r3, [r1, #4] #if defined(STM32F102x6) || defined(STM32F102xB) || defined(STM32F103x6)\ || defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG)\ || defined(STM32F105xC) || defined(STM32F107xC) /*------------------------------ USB clock Configuration ------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USB) == RCC_PERIPHCLK_USB) 800268a: 687b ldr r3, [r7, #4] 800268c: 681b ldr r3, [r3, #0] 800268e: f003 0310 and.w r3, r3, #16 8002692: 2b00 cmp r3, #0 8002694: d008 beq.n 80026a8 { /* Check the parameters */ assert_param(IS_RCC_USBPLLCLK_DIV(PeriphClkInit->UsbClockSelection)); /* Configure the USB clock source */ __HAL_RCC_USB_CONFIG(PeriphClkInit->UsbClockSelection); 8002696: 4b07 ldr r3, [pc, #28] ; (80026b4 ) 8002698: 685b ldr r3, [r3, #4] 800269a: f423 0280 bic.w r2, r3, #4194304 ; 0x400000 800269e: 687b ldr r3, [r7, #4] 80026a0: 68db ldr r3, [r3, #12] 80026a2: 4904 ldr r1, [pc, #16] ; (80026b4 ) 80026a4: 4313 orrs r3, r2 80026a6: 604b str r3, [r1, #4] } #endif /* STM32F102x6 || STM32F102xB || STM32F103x6 || STM32F103xB || STM32F103xE || STM32F103xG || STM32F105xC || STM32F107xC */ return HAL_OK; 80026a8: 2300 movs r3, #0 } 80026aa: 4618 mov r0, r3 80026ac: 3718 adds r7, #24 80026ae: 46bd mov sp, r7 80026b0: bd80 pop {r7, pc} 80026b2: bf00 nop 80026b4: 40021000 .word 0x40021000 80026b8: 40007000 .word 0x40007000 80026bc: 42420440 .word 0x42420440 080026c0 : * @param cfg pointer to a USB_CfgTypeDef structure that contains * the configuration information for the specified USBx peripheral. * @retval HAL status */ HAL_StatusTypeDef USB_CoreInit(USB_TypeDef *USBx, USB_CfgTypeDef cfg) { 80026c0: b084 sub sp, #16 80026c2: b480 push {r7} 80026c4: b083 sub sp, #12 80026c6: af00 add r7, sp, #0 80026c8: 6078 str r0, [r7, #4] 80026ca: f107 0014 add.w r0, r7, #20 80026ce: e880 000e stmia.w r0, {r1, r2, r3} /* NOTE : - This function is not required by USB Device FS peripheral, it is used only by USB OTG FS peripheral. - This function is added to ensure compatibility across platforms. */ return HAL_OK; 80026d2: 2300 movs r3, #0 } 80026d4: 4618 mov r0, r3 80026d6: 370c adds r7, #12 80026d8: 46bd mov sp, r7 80026da: bc80 pop {r7} 80026dc: b004 add sp, #16 80026de: 4770 bx lr 080026e0 : * 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) { 80026e0: b480 push {r7} 80026e2: b085 sub sp, #20 80026e4: af00 add r7, sp, #0 80026e6: 6078 str r0, [r7, #4] uint32_t winterruptmask; /* Clear pending interrupts */ USBx->ISTR = 0U; 80026e8: 687b ldr r3, [r7, #4] 80026ea: 2200 movs r2, #0 80026ec: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 /* Set winterruptmask variable */ winterruptmask = USB_CNTR_CTRM | USB_CNTR_WKUPM | 80026f0: f44f 433f mov.w r3, #48896 ; 0xbf00 80026f4: 60fb str r3, [r7, #12] USB_CNTR_SUSPM | USB_CNTR_ERRM | USB_CNTR_SOFM | USB_CNTR_ESOFM | USB_CNTR_RESETM; /* Set interrupt mask */ USBx->CNTR = (uint16_t)winterruptmask; 80026f6: 68fb ldr r3, [r7, #12] 80026f8: b29a uxth r2, r3 80026fa: 687b ldr r3, [r7, #4] 80026fc: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 return HAL_OK; 8002700: 2300 movs r3, #0 } 8002702: 4618 mov r0, r3 8002704: 3714 adds r7, #20 8002706: 46bd mov sp, r7 8002708: bc80 pop {r7} 800270a: 4770 bx lr 0800270c : * 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) { 800270c: b480 push {r7} 800270e: b085 sub sp, #20 8002710: af00 add r7, sp, #0 8002712: 6078 str r0, [r7, #4] uint32_t winterruptmask; /* Set winterruptmask variable */ winterruptmask = USB_CNTR_CTRM | USB_CNTR_WKUPM | 8002714: f44f 433f mov.w r3, #48896 ; 0xbf00 8002718: 60fb str r3, [r7, #12] USB_CNTR_SUSPM | USB_CNTR_ERRM | USB_CNTR_SOFM | USB_CNTR_ESOFM | USB_CNTR_RESETM; /* Clear interrupt mask */ USBx->CNTR &= (uint16_t)(~winterruptmask); 800271a: 687b ldr r3, [r7, #4] 800271c: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40 8002720: b29a uxth r2, r3 8002722: 68fb ldr r3, [r7, #12] 8002724: b29b uxth r3, r3 8002726: 43db mvns r3, r3 8002728: b29b uxth r3, r3 800272a: 4013 ands r3, r2 800272c: b29a uxth r2, r3 800272e: 687b ldr r3, [r7, #4] 8002730: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 return HAL_OK; 8002734: 2300 movs r3, #0 } 8002736: 4618 mov r0, r3 8002738: 3714 adds r7, #20 800273a: 46bd mov sp, r7 800273c: bc80 pop {r7} 800273e: 4770 bx lr 08002740 : * This parameter can be one of the these values: * @arg USB_DEVICE_MODE Peripheral mode * @retval HAL status */ HAL_StatusTypeDef USB_SetCurrentMode(USB_TypeDef *USBx, USB_ModeTypeDef mode) { 8002740: b480 push {r7} 8002742: b083 sub sp, #12 8002744: af00 add r7, sp, #0 8002746: 6078 str r0, [r7, #4] 8002748: 460b mov r3, r1 800274a: 70fb strb r3, [r7, #3] /* NOTE : - This function is not required by USB Device FS peripheral, it is used only by USB OTG FS peripheral. - This function is added to ensure compatibility across platforms. */ return HAL_OK; 800274c: 2300 movs r3, #0 } 800274e: 4618 mov r0, r3 8002750: 370c adds r7, #12 8002752: 46bd mov sp, r7 8002754: bc80 pop {r7} 8002756: 4770 bx lr 08002758 : * @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) { 8002758: b084 sub sp, #16 800275a: b480 push {r7} 800275c: b083 sub sp, #12 800275e: af00 add r7, sp, #0 8002760: 6078 str r0, [r7, #4] 8002762: f107 0014 add.w r0, r7, #20 8002766: e880 000e stmia.w r0, {r1, r2, r3} /* Prevent unused argument(s) compilation warning */ UNUSED(cfg); /* Init Device */ /* CNTR_FRES = 1 */ USBx->CNTR = (uint16_t)USB_CNTR_FRES; 800276a: 687b ldr r3, [r7, #4] 800276c: 2201 movs r2, #1 800276e: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 /* CNTR_FRES = 0 */ USBx->CNTR = 0U; 8002772: 687b ldr r3, [r7, #4] 8002774: 2200 movs r2, #0 8002776: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 /* Clear pending interrupts */ USBx->ISTR = 0U; 800277a: 687b ldr r3, [r7, #4] 800277c: 2200 movs r2, #0 800277e: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 /*Set Btable Address*/ USBx->BTABLE = BTABLE_ADDRESS; 8002782: 687b ldr r3, [r7, #4] 8002784: 2200 movs r2, #0 8002786: f8a3 2050 strh.w r2, [r3, #80] ; 0x50 return HAL_OK; 800278a: 2300 movs r3, #0 } 800278c: 4618 mov r0, r3 800278e: 370c adds r7, #12 8002790: 46bd mov sp, r7 8002792: bc80 pop {r7} 8002794: b004 add sp, #16 8002796: 4770 bx lr 08002798 : * @param USBx Selected device * @param ep pointer to endpoint structure * @retval HAL status */ HAL_StatusTypeDef USB_ActivateEndpoint(USB_TypeDef *USBx, USB_EPTypeDef *ep) { 8002798: b480 push {r7} 800279a: b09b sub sp, #108 ; 0x6c 800279c: af00 add r7, sp, #0 800279e: 6078 str r0, [r7, #4] 80027a0: 6039 str r1, [r7, #0] HAL_StatusTypeDef ret = HAL_OK; 80027a2: 2300 movs r3, #0 80027a4: f887 3067 strb.w r3, [r7, #103] ; 0x67 uint16_t wEpRegVal; wEpRegVal = PCD_GET_ENDPOINT(USBx, ep->num) & USB_EP_T_MASK; 80027a8: 687a ldr r2, [r7, #4] 80027aa: 683b ldr r3, [r7, #0] 80027ac: 781b ldrb r3, [r3, #0] 80027ae: 009b lsls r3, r3, #2 80027b0: 4413 add r3, r2 80027b2: 881b ldrh r3, [r3, #0] 80027b4: b29b uxth r3, r3 80027b6: f423 43ec bic.w r3, r3, #30208 ; 0x7600 80027ba: f023 0370 bic.w r3, r3, #112 ; 0x70 80027be: f8a7 3064 strh.w r3, [r7, #100] ; 0x64 /* initialize Endpoint */ switch (ep->type) 80027c2: 683b ldr r3, [r7, #0] 80027c4: 78db ldrb r3, [r3, #3] 80027c6: 2b03 cmp r3, #3 80027c8: d81f bhi.n 800280a 80027ca: a201 add r2, pc, #4 ; (adr r2, 80027d0 ) 80027cc: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80027d0: 080027e1 .word 0x080027e1 80027d4: 080027fd .word 0x080027fd 80027d8: 08002813 .word 0x08002813 80027dc: 080027ef .word 0x080027ef { case EP_TYPE_CTRL: wEpRegVal |= USB_EP_CONTROL; 80027e0: f8b7 3064 ldrh.w r3, [r7, #100] ; 0x64 80027e4: f443 7300 orr.w r3, r3, #512 ; 0x200 80027e8: f8a7 3064 strh.w r3, [r7, #100] ; 0x64 break; 80027ec: e012 b.n 8002814 case EP_TYPE_BULK: wEpRegVal |= USB_EP_BULK; break; case EP_TYPE_INTR: wEpRegVal |= USB_EP_INTERRUPT; 80027ee: f8b7 3064 ldrh.w r3, [r7, #100] ; 0x64 80027f2: f443 63c0 orr.w r3, r3, #1536 ; 0x600 80027f6: f8a7 3064 strh.w r3, [r7, #100] ; 0x64 break; 80027fa: e00b b.n 8002814 case EP_TYPE_ISOC: wEpRegVal |= USB_EP_ISOCHRONOUS; 80027fc: f8b7 3064 ldrh.w r3, [r7, #100] ; 0x64 8002800: f443 6380 orr.w r3, r3, #1024 ; 0x400 8002804: f8a7 3064 strh.w r3, [r7, #100] ; 0x64 break; 8002808: e004 b.n 8002814 default: ret = HAL_ERROR; 800280a: 2301 movs r3, #1 800280c: f887 3067 strb.w r3, [r7, #103] ; 0x67 break; 8002810: e000 b.n 8002814 break; 8002812: bf00 nop } PCD_SET_ENDPOINT(USBx, ep->num, (wEpRegVal | USB_EP_CTR_RX | USB_EP_CTR_TX)); 8002814: 687a ldr r2, [r7, #4] 8002816: 683b ldr r3, [r7, #0] 8002818: 781b ldrb r3, [r3, #0] 800281a: 009b lsls r3, r3, #2 800281c: 441a add r2, r3 800281e: f8b7 3064 ldrh.w r3, [r7, #100] ; 0x64 8002822: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002826: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800282a: f443 4300 orr.w r3, r3, #32768 ; 0x8000 800282e: f043 0380 orr.w r3, r3, #128 ; 0x80 8002832: b29b uxth r3, r3 8002834: 8013 strh r3, [r2, #0] PCD_SET_EP_ADDRESS(USBx, ep->num, ep->num); 8002836: 687a ldr r2, [r7, #4] 8002838: 683b ldr r3, [r7, #0] 800283a: 781b ldrb r3, [r3, #0] 800283c: 009b lsls r3, r3, #2 800283e: 4413 add r3, r2 8002840: 881b ldrh r3, [r3, #0] 8002842: b29b uxth r3, r3 8002844: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002848: f023 0370 bic.w r3, r3, #112 ; 0x70 800284c: b29a uxth r2, r3 800284e: 683b ldr r3, [r7, #0] 8002850: 781b ldrb r3, [r3, #0] 8002852: b29b uxth r3, r3 8002854: 4313 orrs r3, r2 8002856: f8a7 305e strh.w r3, [r7, #94] ; 0x5e 800285a: 687a ldr r2, [r7, #4] 800285c: 683b ldr r3, [r7, #0] 800285e: 781b ldrb r3, [r3, #0] 8002860: 009b lsls r3, r3, #2 8002862: 441a add r2, r3 8002864: f8b7 305e ldrh.w r3, [r7, #94] ; 0x5e 8002868: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800286c: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002870: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002874: f043 0380 orr.w r3, r3, #128 ; 0x80 8002878: b29b uxth r3, r3 800287a: 8013 strh r3, [r2, #0] if (ep->doublebuffer == 0U) 800287c: 683b ldr r3, [r7, #0] 800287e: 7b1b ldrb r3, [r3, #12] 8002880: 2b00 cmp r3, #0 8002882: f040 8149 bne.w 8002b18 { if (ep->is_in != 0U) 8002886: 683b ldr r3, [r7, #0] 8002888: 785b ldrb r3, [r3, #1] 800288a: 2b00 cmp r3, #0 800288c: f000 8084 beq.w 8002998 { /*Set the endpoint Transmit buffer address */ PCD_SET_EP_TX_ADDRESS(USBx, ep->num, ep->pmaadress); 8002890: 687b ldr r3, [r7, #4] 8002892: 617b str r3, [r7, #20] 8002894: 687b ldr r3, [r7, #4] 8002896: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 800289a: b29b uxth r3, r3 800289c: 461a mov r2, r3 800289e: 697b ldr r3, [r7, #20] 80028a0: 4413 add r3, r2 80028a2: 617b str r3, [r7, #20] 80028a4: 683b ldr r3, [r7, #0] 80028a6: 781b ldrb r3, [r3, #0] 80028a8: 011a lsls r2, r3, #4 80028aa: 697b ldr r3, [r7, #20] 80028ac: 4413 add r3, r2 80028ae: f503 6380 add.w r3, r3, #1024 ; 0x400 80028b2: 613b str r3, [r7, #16] 80028b4: 683b ldr r3, [r7, #0] 80028b6: 88db ldrh r3, [r3, #6] 80028b8: 085b lsrs r3, r3, #1 80028ba: b29b uxth r3, r3 80028bc: 005b lsls r3, r3, #1 80028be: b29a uxth r2, r3 80028c0: 693b ldr r3, [r7, #16] 80028c2: 801a strh r2, [r3, #0] PCD_CLEAR_TX_DTOG(USBx, ep->num); 80028c4: 687a ldr r2, [r7, #4] 80028c6: 683b ldr r3, [r7, #0] 80028c8: 781b ldrb r3, [r3, #0] 80028ca: 009b lsls r3, r3, #2 80028cc: 4413 add r3, r2 80028ce: 881b ldrh r3, [r3, #0] 80028d0: 81fb strh r3, [r7, #14] 80028d2: 89fb ldrh r3, [r7, #14] 80028d4: f003 0340 and.w r3, r3, #64 ; 0x40 80028d8: 2b00 cmp r3, #0 80028da: d01b beq.n 8002914 80028dc: 687a ldr r2, [r7, #4] 80028de: 683b ldr r3, [r7, #0] 80028e0: 781b ldrb r3, [r3, #0] 80028e2: 009b lsls r3, r3, #2 80028e4: 4413 add r3, r2 80028e6: 881b ldrh r3, [r3, #0] 80028e8: b29b uxth r3, r3 80028ea: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80028ee: f023 0370 bic.w r3, r3, #112 ; 0x70 80028f2: 81bb strh r3, [r7, #12] 80028f4: 687a ldr r2, [r7, #4] 80028f6: 683b ldr r3, [r7, #0] 80028f8: 781b ldrb r3, [r3, #0] 80028fa: 009b lsls r3, r3, #2 80028fc: 441a add r2, r3 80028fe: 89bb ldrh r3, [r7, #12] 8002900: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002904: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002908: f443 4300 orr.w r3, r3, #32768 ; 0x8000 800290c: f043 03c0 orr.w r3, r3, #192 ; 0xc0 8002910: b29b uxth r3, r3 8002912: 8013 strh r3, [r2, #0] if (ep->type != EP_TYPE_ISOC) 8002914: 683b ldr r3, [r7, #0] 8002916: 78db ldrb r3, [r3, #3] 8002918: 2b01 cmp r3, #1 800291a: d020 beq.n 800295e { /* Configure NAK status for the Endpoint */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_NAK); 800291c: 687a ldr r2, [r7, #4] 800291e: 683b ldr r3, [r7, #0] 8002920: 781b ldrb r3, [r3, #0] 8002922: 009b lsls r3, r3, #2 8002924: 4413 add r3, r2 8002926: 881b ldrh r3, [r3, #0] 8002928: b29b uxth r3, r3 800292a: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800292e: f023 0340 bic.w r3, r3, #64 ; 0x40 8002932: 813b strh r3, [r7, #8] 8002934: 893b ldrh r3, [r7, #8] 8002936: f083 0320 eor.w r3, r3, #32 800293a: 813b strh r3, [r7, #8] 800293c: 687a ldr r2, [r7, #4] 800293e: 683b ldr r3, [r7, #0] 8002940: 781b ldrb r3, [r3, #0] 8002942: 009b lsls r3, r3, #2 8002944: 441a add r2, r3 8002946: 893b ldrh r3, [r7, #8] 8002948: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800294c: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002950: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002954: f043 0380 orr.w r3, r3, #128 ; 0x80 8002958: b29b uxth r3, r3 800295a: 8013 strh r3, [r2, #0] 800295c: e27f b.n 8002e5e } else { /* Configure TX Endpoint to disabled state */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 800295e: 687a ldr r2, [r7, #4] 8002960: 683b ldr r3, [r7, #0] 8002962: 781b ldrb r3, [r3, #0] 8002964: 009b lsls r3, r3, #2 8002966: 4413 add r3, r2 8002968: 881b ldrh r3, [r3, #0] 800296a: b29b uxth r3, r3 800296c: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002970: f023 0340 bic.w r3, r3, #64 ; 0x40 8002974: 817b strh r3, [r7, #10] 8002976: 687a ldr r2, [r7, #4] 8002978: 683b ldr r3, [r7, #0] 800297a: 781b ldrb r3, [r3, #0] 800297c: 009b lsls r3, r3, #2 800297e: 441a add r2, r3 8002980: 897b ldrh r3, [r7, #10] 8002982: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002986: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800298a: f443 4300 orr.w r3, r3, #32768 ; 0x8000 800298e: f043 0380 orr.w r3, r3, #128 ; 0x80 8002992: b29b uxth r3, r3 8002994: 8013 strh r3, [r2, #0] 8002996: e262 b.n 8002e5e } } else { /*Set the endpoint Receive buffer address */ PCD_SET_EP_RX_ADDRESS(USBx, ep->num, ep->pmaadress); 8002998: 687b ldr r3, [r7, #4] 800299a: 62fb str r3, [r7, #44] ; 0x2c 800299c: 687b ldr r3, [r7, #4] 800299e: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80029a2: b29b uxth r3, r3 80029a4: 461a mov r2, r3 80029a6: 6afb ldr r3, [r7, #44] ; 0x2c 80029a8: 4413 add r3, r2 80029aa: 62fb str r3, [r7, #44] ; 0x2c 80029ac: 683b ldr r3, [r7, #0] 80029ae: 781b ldrb r3, [r3, #0] 80029b0: 011a lsls r2, r3, #4 80029b2: 6afb ldr r3, [r7, #44] ; 0x2c 80029b4: 4413 add r3, r2 80029b6: f503 6381 add.w r3, r3, #1032 ; 0x408 80029ba: 62bb str r3, [r7, #40] ; 0x28 80029bc: 683b ldr r3, [r7, #0] 80029be: 88db ldrh r3, [r3, #6] 80029c0: 085b lsrs r3, r3, #1 80029c2: b29b uxth r3, r3 80029c4: 005b lsls r3, r3, #1 80029c6: b29a uxth r2, r3 80029c8: 6abb ldr r3, [r7, #40] ; 0x28 80029ca: 801a strh r2, [r3, #0] /*Set the endpoint Receive buffer counter*/ PCD_SET_EP_RX_CNT(USBx, ep->num, ep->maxpacket); 80029cc: 687b ldr r3, [r7, #4] 80029ce: 627b str r3, [r7, #36] ; 0x24 80029d0: 687b ldr r3, [r7, #4] 80029d2: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80029d6: b29b uxth r3, r3 80029d8: 461a mov r2, r3 80029da: 6a7b ldr r3, [r7, #36] ; 0x24 80029dc: 4413 add r3, r2 80029de: 627b str r3, [r7, #36] ; 0x24 80029e0: 683b ldr r3, [r7, #0] 80029e2: 781b ldrb r3, [r3, #0] 80029e4: 011a lsls r2, r3, #4 80029e6: 6a7b ldr r3, [r7, #36] ; 0x24 80029e8: 4413 add r3, r2 80029ea: f203 430c addw r3, r3, #1036 ; 0x40c 80029ee: 623b str r3, [r7, #32] 80029f0: 683b ldr r3, [r7, #0] 80029f2: 691b ldr r3, [r3, #16] 80029f4: 2b00 cmp r3, #0 80029f6: d112 bne.n 8002a1e 80029f8: 6a3b ldr r3, [r7, #32] 80029fa: 881b ldrh r3, [r3, #0] 80029fc: b29b uxth r3, r3 80029fe: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8002a02: b29a uxth r2, r3 8002a04: 6a3b ldr r3, [r7, #32] 8002a06: 801a strh r2, [r3, #0] 8002a08: 6a3b ldr r3, [r7, #32] 8002a0a: 881b ldrh r3, [r3, #0] 8002a0c: b29b uxth r3, r3 8002a0e: ea6f 4343 mvn.w r3, r3, lsl #17 8002a12: ea6f 4353 mvn.w r3, r3, lsr #17 8002a16: b29a uxth r2, r3 8002a18: 6a3b ldr r3, [r7, #32] 8002a1a: 801a strh r2, [r3, #0] 8002a1c: e02f b.n 8002a7e 8002a1e: 683b ldr r3, [r7, #0] 8002a20: 691b ldr r3, [r3, #16] 8002a22: 2b3e cmp r3, #62 ; 0x3e 8002a24: d813 bhi.n 8002a4e 8002a26: 683b ldr r3, [r7, #0] 8002a28: 691b ldr r3, [r3, #16] 8002a2a: 085b lsrs r3, r3, #1 8002a2c: 663b str r3, [r7, #96] ; 0x60 8002a2e: 683b ldr r3, [r7, #0] 8002a30: 691b ldr r3, [r3, #16] 8002a32: f003 0301 and.w r3, r3, #1 8002a36: 2b00 cmp r3, #0 8002a38: d002 beq.n 8002a40 8002a3a: 6e3b ldr r3, [r7, #96] ; 0x60 8002a3c: 3301 adds r3, #1 8002a3e: 663b str r3, [r7, #96] ; 0x60 8002a40: 6e3b ldr r3, [r7, #96] ; 0x60 8002a42: b29b uxth r3, r3 8002a44: 029b lsls r3, r3, #10 8002a46: b29a uxth r2, r3 8002a48: 6a3b ldr r3, [r7, #32] 8002a4a: 801a strh r2, [r3, #0] 8002a4c: e017 b.n 8002a7e 8002a4e: 683b ldr r3, [r7, #0] 8002a50: 691b ldr r3, [r3, #16] 8002a52: 095b lsrs r3, r3, #5 8002a54: 663b str r3, [r7, #96] ; 0x60 8002a56: 683b ldr r3, [r7, #0] 8002a58: 691b ldr r3, [r3, #16] 8002a5a: f003 031f and.w r3, r3, #31 8002a5e: 2b00 cmp r3, #0 8002a60: d102 bne.n 8002a68 8002a62: 6e3b ldr r3, [r7, #96] ; 0x60 8002a64: 3b01 subs r3, #1 8002a66: 663b str r3, [r7, #96] ; 0x60 8002a68: 6e3b ldr r3, [r7, #96] ; 0x60 8002a6a: b29b uxth r3, r3 8002a6c: 029b lsls r3, r3, #10 8002a6e: b29b uxth r3, r3 8002a70: ea6f 4343 mvn.w r3, r3, lsl #17 8002a74: ea6f 4353 mvn.w r3, r3, lsr #17 8002a78: b29a uxth r2, r3 8002a7a: 6a3b ldr r3, [r7, #32] 8002a7c: 801a strh r2, [r3, #0] PCD_CLEAR_RX_DTOG(USBx, ep->num); 8002a7e: 687a ldr r2, [r7, #4] 8002a80: 683b ldr r3, [r7, #0] 8002a82: 781b ldrb r3, [r3, #0] 8002a84: 009b lsls r3, r3, #2 8002a86: 4413 add r3, r2 8002a88: 881b ldrh r3, [r3, #0] 8002a8a: 83fb strh r3, [r7, #30] 8002a8c: 8bfb ldrh r3, [r7, #30] 8002a8e: f403 4380 and.w r3, r3, #16384 ; 0x4000 8002a92: 2b00 cmp r3, #0 8002a94: d01b beq.n 8002ace 8002a96: 687a ldr r2, [r7, #4] 8002a98: 683b ldr r3, [r7, #0] 8002a9a: 781b ldrb r3, [r3, #0] 8002a9c: 009b lsls r3, r3, #2 8002a9e: 4413 add r3, r2 8002aa0: 881b ldrh r3, [r3, #0] 8002aa2: b29b uxth r3, r3 8002aa4: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002aa8: f023 0370 bic.w r3, r3, #112 ; 0x70 8002aac: 83bb strh r3, [r7, #28] 8002aae: 687a ldr r2, [r7, #4] 8002ab0: 683b ldr r3, [r7, #0] 8002ab2: 781b ldrb r3, [r3, #0] 8002ab4: 009b lsls r3, r3, #2 8002ab6: 441a add r2, r3 8002ab8: 8bbb ldrh r3, [r7, #28] 8002aba: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002abe: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002ac2: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8002ac6: f043 0380 orr.w r3, r3, #128 ; 0x80 8002aca: b29b uxth r3, r3 8002acc: 8013 strh r3, [r2, #0] /* Configure VALID status for the Endpoint*/ PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID); 8002ace: 687a ldr r2, [r7, #4] 8002ad0: 683b ldr r3, [r7, #0] 8002ad2: 781b ldrb r3, [r3, #0] 8002ad4: 009b lsls r3, r3, #2 8002ad6: 4413 add r3, r2 8002ad8: 881b ldrh r3, [r3, #0] 8002ada: b29b uxth r3, r3 8002adc: f423 4380 bic.w r3, r3, #16384 ; 0x4000 8002ae0: f023 0370 bic.w r3, r3, #112 ; 0x70 8002ae4: 837b strh r3, [r7, #26] 8002ae6: 8b7b ldrh r3, [r7, #26] 8002ae8: f483 5380 eor.w r3, r3, #4096 ; 0x1000 8002aec: 837b strh r3, [r7, #26] 8002aee: 8b7b ldrh r3, [r7, #26] 8002af0: f483 5300 eor.w r3, r3, #8192 ; 0x2000 8002af4: 837b strh r3, [r7, #26] 8002af6: 687a ldr r2, [r7, #4] 8002af8: 683b ldr r3, [r7, #0] 8002afa: 781b ldrb r3, [r3, #0] 8002afc: 009b lsls r3, r3, #2 8002afe: 441a add r2, r3 8002b00: 8b7b ldrh r3, [r7, #26] 8002b02: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002b06: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002b0a: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002b0e: f043 0380 orr.w r3, r3, #128 ; 0x80 8002b12: b29b uxth r3, r3 8002b14: 8013 strh r3, [r2, #0] 8002b16: e1a2 b.n 8002e5e } /*Double Buffer*/ else { /* Set the endpoint as double buffered */ PCD_SET_EP_DBUF(USBx, ep->num); 8002b18: 687a ldr r2, [r7, #4] 8002b1a: 683b ldr r3, [r7, #0] 8002b1c: 781b ldrb r3, [r3, #0] 8002b1e: 009b lsls r3, r3, #2 8002b20: 4413 add r3, r2 8002b22: 881b ldrh r3, [r3, #0] 8002b24: b29b uxth r3, r3 8002b26: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002b2a: f023 0370 bic.w r3, r3, #112 ; 0x70 8002b2e: f8a7 305c strh.w r3, [r7, #92] ; 0x5c 8002b32: 687a ldr r2, [r7, #4] 8002b34: 683b ldr r3, [r7, #0] 8002b36: 781b ldrb r3, [r3, #0] 8002b38: 009b lsls r3, r3, #2 8002b3a: 441a add r2, r3 8002b3c: f8b7 305c ldrh.w r3, [r7, #92] ; 0x5c 8002b40: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002b44: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002b48: f443 4301 orr.w r3, r3, #33024 ; 0x8100 8002b4c: f043 0380 orr.w r3, r3, #128 ; 0x80 8002b50: b29b uxth r3, r3 8002b52: 8013 strh r3, [r2, #0] /* Set buffer address for double buffered mode */ PCD_SET_EP_DBUF_ADDR(USBx, ep->num, ep->pmaaddr0, ep->pmaaddr1); 8002b54: 687b ldr r3, [r7, #4] 8002b56: 65bb str r3, [r7, #88] ; 0x58 8002b58: 687b ldr r3, [r7, #4] 8002b5a: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8002b5e: b29b uxth r3, r3 8002b60: 461a mov r2, r3 8002b62: 6dbb ldr r3, [r7, #88] ; 0x58 8002b64: 4413 add r3, r2 8002b66: 65bb str r3, [r7, #88] ; 0x58 8002b68: 683b ldr r3, [r7, #0] 8002b6a: 781b ldrb r3, [r3, #0] 8002b6c: 011a lsls r2, r3, #4 8002b6e: 6dbb ldr r3, [r7, #88] ; 0x58 8002b70: 4413 add r3, r2 8002b72: f503 6380 add.w r3, r3, #1024 ; 0x400 8002b76: 657b str r3, [r7, #84] ; 0x54 8002b78: 683b ldr r3, [r7, #0] 8002b7a: 891b ldrh r3, [r3, #8] 8002b7c: 085b lsrs r3, r3, #1 8002b7e: b29b uxth r3, r3 8002b80: 005b lsls r3, r3, #1 8002b82: b29a uxth r2, r3 8002b84: 6d7b ldr r3, [r7, #84] ; 0x54 8002b86: 801a strh r2, [r3, #0] 8002b88: 687b ldr r3, [r7, #4] 8002b8a: 653b str r3, [r7, #80] ; 0x50 8002b8c: 687b ldr r3, [r7, #4] 8002b8e: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8002b92: b29b uxth r3, r3 8002b94: 461a mov r2, r3 8002b96: 6d3b ldr r3, [r7, #80] ; 0x50 8002b98: 4413 add r3, r2 8002b9a: 653b str r3, [r7, #80] ; 0x50 8002b9c: 683b ldr r3, [r7, #0] 8002b9e: 781b ldrb r3, [r3, #0] 8002ba0: 011a lsls r2, r3, #4 8002ba2: 6d3b ldr r3, [r7, #80] ; 0x50 8002ba4: 4413 add r3, r2 8002ba6: f503 6381 add.w r3, r3, #1032 ; 0x408 8002baa: 64fb str r3, [r7, #76] ; 0x4c 8002bac: 683b ldr r3, [r7, #0] 8002bae: 895b ldrh r3, [r3, #10] 8002bb0: 085b lsrs r3, r3, #1 8002bb2: b29b uxth r3, r3 8002bb4: 005b lsls r3, r3, #1 8002bb6: b29a uxth r2, r3 8002bb8: 6cfb ldr r3, [r7, #76] ; 0x4c 8002bba: 801a strh r2, [r3, #0] if (ep->is_in == 0U) 8002bbc: 683b ldr r3, [r7, #0] 8002bbe: 785b ldrb r3, [r3, #1] 8002bc0: 2b00 cmp r3, #0 8002bc2: f040 8091 bne.w 8002ce8 { /* Clear the data toggle bits for the endpoint IN/OUT */ PCD_CLEAR_RX_DTOG(USBx, ep->num); 8002bc6: 687a ldr r2, [r7, #4] 8002bc8: 683b ldr r3, [r7, #0] 8002bca: 781b ldrb r3, [r3, #0] 8002bcc: 009b lsls r3, r3, #2 8002bce: 4413 add r3, r2 8002bd0: 881b ldrh r3, [r3, #0] 8002bd2: 87bb strh r3, [r7, #60] ; 0x3c 8002bd4: 8fbb ldrh r3, [r7, #60] ; 0x3c 8002bd6: f403 4380 and.w r3, r3, #16384 ; 0x4000 8002bda: 2b00 cmp r3, #0 8002bdc: d01b beq.n 8002c16 8002bde: 687a ldr r2, [r7, #4] 8002be0: 683b ldr r3, [r7, #0] 8002be2: 781b ldrb r3, [r3, #0] 8002be4: 009b lsls r3, r3, #2 8002be6: 4413 add r3, r2 8002be8: 881b ldrh r3, [r3, #0] 8002bea: b29b uxth r3, r3 8002bec: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002bf0: f023 0370 bic.w r3, r3, #112 ; 0x70 8002bf4: 877b strh r3, [r7, #58] ; 0x3a 8002bf6: 687a ldr r2, [r7, #4] 8002bf8: 683b ldr r3, [r7, #0] 8002bfa: 781b ldrb r3, [r3, #0] 8002bfc: 009b lsls r3, r3, #2 8002bfe: 441a add r2, r3 8002c00: 8f7b ldrh r3, [r7, #58] ; 0x3a 8002c02: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002c06: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002c0a: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8002c0e: f043 0380 orr.w r3, r3, #128 ; 0x80 8002c12: b29b uxth r3, r3 8002c14: 8013 strh r3, [r2, #0] PCD_CLEAR_TX_DTOG(USBx, ep->num); 8002c16: 687a ldr r2, [r7, #4] 8002c18: 683b ldr r3, [r7, #0] 8002c1a: 781b ldrb r3, [r3, #0] 8002c1c: 009b lsls r3, r3, #2 8002c1e: 4413 add r3, r2 8002c20: 881b ldrh r3, [r3, #0] 8002c22: 873b strh r3, [r7, #56] ; 0x38 8002c24: 8f3b ldrh r3, [r7, #56] ; 0x38 8002c26: f003 0340 and.w r3, r3, #64 ; 0x40 8002c2a: 2b00 cmp r3, #0 8002c2c: d01b beq.n 8002c66 8002c2e: 687a ldr r2, [r7, #4] 8002c30: 683b ldr r3, [r7, #0] 8002c32: 781b ldrb r3, [r3, #0] 8002c34: 009b lsls r3, r3, #2 8002c36: 4413 add r3, r2 8002c38: 881b ldrh r3, [r3, #0] 8002c3a: b29b uxth r3, r3 8002c3c: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002c40: f023 0370 bic.w r3, r3, #112 ; 0x70 8002c44: 86fb strh r3, [r7, #54] ; 0x36 8002c46: 687a ldr r2, [r7, #4] 8002c48: 683b ldr r3, [r7, #0] 8002c4a: 781b ldrb r3, [r3, #0] 8002c4c: 009b lsls r3, r3, #2 8002c4e: 441a add r2, r3 8002c50: 8efb ldrh r3, [r7, #54] ; 0x36 8002c52: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002c56: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002c5a: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002c5e: f043 03c0 orr.w r3, r3, #192 ; 0xc0 8002c62: b29b uxth r3, r3 8002c64: 8013 strh r3, [r2, #0] PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID); 8002c66: 687a ldr r2, [r7, #4] 8002c68: 683b ldr r3, [r7, #0] 8002c6a: 781b ldrb r3, [r3, #0] 8002c6c: 009b lsls r3, r3, #2 8002c6e: 4413 add r3, r2 8002c70: 881b ldrh r3, [r3, #0] 8002c72: b29b uxth r3, r3 8002c74: f423 4380 bic.w r3, r3, #16384 ; 0x4000 8002c78: f023 0370 bic.w r3, r3, #112 ; 0x70 8002c7c: 86bb strh r3, [r7, #52] ; 0x34 8002c7e: 8ebb ldrh r3, [r7, #52] ; 0x34 8002c80: f483 5380 eor.w r3, r3, #4096 ; 0x1000 8002c84: 86bb strh r3, [r7, #52] ; 0x34 8002c86: 8ebb ldrh r3, [r7, #52] ; 0x34 8002c88: f483 5300 eor.w r3, r3, #8192 ; 0x2000 8002c8c: 86bb strh r3, [r7, #52] ; 0x34 8002c8e: 687a ldr r2, [r7, #4] 8002c90: 683b ldr r3, [r7, #0] 8002c92: 781b ldrb r3, [r3, #0] 8002c94: 009b lsls r3, r3, #2 8002c96: 441a add r2, r3 8002c98: 8ebb ldrh r3, [r7, #52] ; 0x34 8002c9a: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002c9e: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002ca2: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002ca6: f043 0380 orr.w r3, r3, #128 ; 0x80 8002caa: b29b uxth r3, r3 8002cac: 8013 strh r3, [r2, #0] PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 8002cae: 687a ldr r2, [r7, #4] 8002cb0: 683b ldr r3, [r7, #0] 8002cb2: 781b ldrb r3, [r3, #0] 8002cb4: 009b lsls r3, r3, #2 8002cb6: 4413 add r3, r2 8002cb8: 881b ldrh r3, [r3, #0] 8002cba: b29b uxth r3, r3 8002cbc: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002cc0: f023 0340 bic.w r3, r3, #64 ; 0x40 8002cc4: 867b strh r3, [r7, #50] ; 0x32 8002cc6: 687a ldr r2, [r7, #4] 8002cc8: 683b ldr r3, [r7, #0] 8002cca: 781b ldrb r3, [r3, #0] 8002ccc: 009b lsls r3, r3, #2 8002cce: 441a add r2, r3 8002cd0: 8e7b ldrh r3, [r7, #50] ; 0x32 8002cd2: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002cd6: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002cda: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002cde: f043 0380 orr.w r3, r3, #128 ; 0x80 8002ce2: b29b uxth r3, r3 8002ce4: 8013 strh r3, [r2, #0] 8002ce6: e0ba b.n 8002e5e } else { /* Clear the data toggle bits for the endpoint IN/OUT */ PCD_CLEAR_RX_DTOG(USBx, ep->num); 8002ce8: 687a ldr r2, [r7, #4] 8002cea: 683b ldr r3, [r7, #0] 8002cec: 781b ldrb r3, [r3, #0] 8002cee: 009b lsls r3, r3, #2 8002cf0: 4413 add r3, r2 8002cf2: 881b ldrh r3, [r3, #0] 8002cf4: f8a7 304a strh.w r3, [r7, #74] ; 0x4a 8002cf8: f8b7 304a ldrh.w r3, [r7, #74] ; 0x4a 8002cfc: f403 4380 and.w r3, r3, #16384 ; 0x4000 8002d00: 2b00 cmp r3, #0 8002d02: d01d beq.n 8002d40 8002d04: 687a ldr r2, [r7, #4] 8002d06: 683b ldr r3, [r7, #0] 8002d08: 781b ldrb r3, [r3, #0] 8002d0a: 009b lsls r3, r3, #2 8002d0c: 4413 add r3, r2 8002d0e: 881b ldrh r3, [r3, #0] 8002d10: b29b uxth r3, r3 8002d12: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002d16: f023 0370 bic.w r3, r3, #112 ; 0x70 8002d1a: f8a7 3048 strh.w r3, [r7, #72] ; 0x48 8002d1e: 687a ldr r2, [r7, #4] 8002d20: 683b ldr r3, [r7, #0] 8002d22: 781b ldrb r3, [r3, #0] 8002d24: 009b lsls r3, r3, #2 8002d26: 441a add r2, r3 8002d28: f8b7 3048 ldrh.w r3, [r7, #72] ; 0x48 8002d2c: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002d30: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002d34: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8002d38: f043 0380 orr.w r3, r3, #128 ; 0x80 8002d3c: b29b uxth r3, r3 8002d3e: 8013 strh r3, [r2, #0] PCD_CLEAR_TX_DTOG(USBx, ep->num); 8002d40: 687a ldr r2, [r7, #4] 8002d42: 683b ldr r3, [r7, #0] 8002d44: 781b ldrb r3, [r3, #0] 8002d46: 009b lsls r3, r3, #2 8002d48: 4413 add r3, r2 8002d4a: 881b ldrh r3, [r3, #0] 8002d4c: f8a7 3046 strh.w r3, [r7, #70] ; 0x46 8002d50: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46 8002d54: f003 0340 and.w r3, r3, #64 ; 0x40 8002d58: 2b00 cmp r3, #0 8002d5a: d01d beq.n 8002d98 8002d5c: 687a ldr r2, [r7, #4] 8002d5e: 683b ldr r3, [r7, #0] 8002d60: 781b ldrb r3, [r3, #0] 8002d62: 009b lsls r3, r3, #2 8002d64: 4413 add r3, r2 8002d66: 881b ldrh r3, [r3, #0] 8002d68: b29b uxth r3, r3 8002d6a: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002d6e: f023 0370 bic.w r3, r3, #112 ; 0x70 8002d72: f8a7 3044 strh.w r3, [r7, #68] ; 0x44 8002d76: 687a ldr r2, [r7, #4] 8002d78: 683b ldr r3, [r7, #0] 8002d7a: 781b ldrb r3, [r3, #0] 8002d7c: 009b lsls r3, r3, #2 8002d7e: 441a add r2, r3 8002d80: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44 8002d84: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002d88: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002d8c: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002d90: f043 03c0 orr.w r3, r3, #192 ; 0xc0 8002d94: b29b uxth r3, r3 8002d96: 8013 strh r3, [r2, #0] if (ep->type != EP_TYPE_ISOC) 8002d98: 683b ldr r3, [r7, #0] 8002d9a: 78db ldrb r3, [r3, #3] 8002d9c: 2b01 cmp r3, #1 8002d9e: d024 beq.n 8002dea { /* Configure NAK status for the Endpoint */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_NAK); 8002da0: 687a ldr r2, [r7, #4] 8002da2: 683b ldr r3, [r7, #0] 8002da4: 781b ldrb r3, [r3, #0] 8002da6: 009b lsls r3, r3, #2 8002da8: 4413 add r3, r2 8002daa: 881b ldrh r3, [r3, #0] 8002dac: b29b uxth r3, r3 8002dae: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002db2: f023 0340 bic.w r3, r3, #64 ; 0x40 8002db6: f8a7 3040 strh.w r3, [r7, #64] ; 0x40 8002dba: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40 8002dbe: f083 0320 eor.w r3, r3, #32 8002dc2: f8a7 3040 strh.w r3, [r7, #64] ; 0x40 8002dc6: 687a ldr r2, [r7, #4] 8002dc8: 683b ldr r3, [r7, #0] 8002dca: 781b ldrb r3, [r3, #0] 8002dcc: 009b lsls r3, r3, #2 8002dce: 441a add r2, r3 8002dd0: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40 8002dd4: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002dd8: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002ddc: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002de0: f043 0380 orr.w r3, r3, #128 ; 0x80 8002de4: b29b uxth r3, r3 8002de6: 8013 strh r3, [r2, #0] 8002de8: e01d b.n 8002e26 } else { /* Configure TX Endpoint to disabled state */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 8002dea: 687a ldr r2, [r7, #4] 8002dec: 683b ldr r3, [r7, #0] 8002dee: 781b ldrb r3, [r3, #0] 8002df0: 009b lsls r3, r3, #2 8002df2: 4413 add r3, r2 8002df4: 881b ldrh r3, [r3, #0] 8002df6: b29b uxth r3, r3 8002df8: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002dfc: f023 0340 bic.w r3, r3, #64 ; 0x40 8002e00: f8a7 3042 strh.w r3, [r7, #66] ; 0x42 8002e04: 687a ldr r2, [r7, #4] 8002e06: 683b ldr r3, [r7, #0] 8002e08: 781b ldrb r3, [r3, #0] 8002e0a: 009b lsls r3, r3, #2 8002e0c: 441a add r2, r3 8002e0e: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42 8002e12: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002e16: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002e1a: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002e1e: f043 0380 orr.w r3, r3, #128 ; 0x80 8002e22: b29b uxth r3, r3 8002e24: 8013 strh r3, [r2, #0] } PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS); 8002e26: 687a ldr r2, [r7, #4] 8002e28: 683b ldr r3, [r7, #0] 8002e2a: 781b ldrb r3, [r3, #0] 8002e2c: 009b lsls r3, r3, #2 8002e2e: 4413 add r3, r2 8002e30: 881b ldrh r3, [r3, #0] 8002e32: b29b uxth r3, r3 8002e34: f423 4380 bic.w r3, r3, #16384 ; 0x4000 8002e38: f023 0370 bic.w r3, r3, #112 ; 0x70 8002e3c: 87fb strh r3, [r7, #62] ; 0x3e 8002e3e: 687a ldr r2, [r7, #4] 8002e40: 683b ldr r3, [r7, #0] 8002e42: 781b ldrb r3, [r3, #0] 8002e44: 009b lsls r3, r3, #2 8002e46: 441a add r2, r3 8002e48: 8ffb ldrh r3, [r7, #62] ; 0x3e 8002e4a: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002e4e: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002e52: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002e56: f043 0380 orr.w r3, r3, #128 ; 0x80 8002e5a: b29b uxth r3, r3 8002e5c: 8013 strh r3, [r2, #0] } } return ret; 8002e5e: f897 3067 ldrb.w r3, [r7, #103] ; 0x67 } 8002e62: 4618 mov r0, r3 8002e64: 376c adds r7, #108 ; 0x6c 8002e66: 46bd mov sp, r7 8002e68: bc80 pop {r7} 8002e6a: 4770 bx lr 08002e6c : * @param USBx Selected device * @param ep pointer to endpoint structure * @retval HAL status */ HAL_StatusTypeDef USB_DeactivateEndpoint(USB_TypeDef *USBx, USB_EPTypeDef *ep) { 8002e6c: b480 push {r7} 8002e6e: b08d sub sp, #52 ; 0x34 8002e70: af00 add r7, sp, #0 8002e72: 6078 str r0, [r7, #4] 8002e74: 6039 str r1, [r7, #0] if (ep->doublebuffer == 0U) 8002e76: 683b ldr r3, [r7, #0] 8002e78: 7b1b ldrb r3, [r3, #12] 8002e7a: 2b00 cmp r3, #0 8002e7c: f040 808e bne.w 8002f9c { if (ep->is_in != 0U) 8002e80: 683b ldr r3, [r7, #0] 8002e82: 785b ldrb r3, [r3, #1] 8002e84: 2b00 cmp r3, #0 8002e86: d044 beq.n 8002f12 { PCD_CLEAR_TX_DTOG(USBx, ep->num); 8002e88: 687a ldr r2, [r7, #4] 8002e8a: 683b ldr r3, [r7, #0] 8002e8c: 781b ldrb r3, [r3, #0] 8002e8e: 009b lsls r3, r3, #2 8002e90: 4413 add r3, r2 8002e92: 881b ldrh r3, [r3, #0] 8002e94: 81bb strh r3, [r7, #12] 8002e96: 89bb ldrh r3, [r7, #12] 8002e98: f003 0340 and.w r3, r3, #64 ; 0x40 8002e9c: 2b00 cmp r3, #0 8002e9e: d01b beq.n 8002ed8 8002ea0: 687a ldr r2, [r7, #4] 8002ea2: 683b ldr r3, [r7, #0] 8002ea4: 781b ldrb r3, [r3, #0] 8002ea6: 009b lsls r3, r3, #2 8002ea8: 4413 add r3, r2 8002eaa: 881b ldrh r3, [r3, #0] 8002eac: b29b uxth r3, r3 8002eae: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002eb2: f023 0370 bic.w r3, r3, #112 ; 0x70 8002eb6: 817b strh r3, [r7, #10] 8002eb8: 687a ldr r2, [r7, #4] 8002eba: 683b ldr r3, [r7, #0] 8002ebc: 781b ldrb r3, [r3, #0] 8002ebe: 009b lsls r3, r3, #2 8002ec0: 441a add r2, r3 8002ec2: 897b ldrh r3, [r7, #10] 8002ec4: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002ec8: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002ecc: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002ed0: f043 03c0 orr.w r3, r3, #192 ; 0xc0 8002ed4: b29b uxth r3, r3 8002ed6: 8013 strh r3, [r2, #0] /* Configure DISABLE status for the Endpoint*/ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 8002ed8: 687a ldr r2, [r7, #4] 8002eda: 683b ldr r3, [r7, #0] 8002edc: 781b ldrb r3, [r3, #0] 8002ede: 009b lsls r3, r3, #2 8002ee0: 4413 add r3, r2 8002ee2: 881b ldrh r3, [r3, #0] 8002ee4: b29b uxth r3, r3 8002ee6: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002eea: f023 0340 bic.w r3, r3, #64 ; 0x40 8002eee: 813b strh r3, [r7, #8] 8002ef0: 687a ldr r2, [r7, #4] 8002ef2: 683b ldr r3, [r7, #0] 8002ef4: 781b ldrb r3, [r3, #0] 8002ef6: 009b lsls r3, r3, #2 8002ef8: 441a add r2, r3 8002efa: 893b ldrh r3, [r7, #8] 8002efc: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002f00: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002f04: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002f08: f043 0380 orr.w r3, r3, #128 ; 0x80 8002f0c: b29b uxth r3, r3 8002f0e: 8013 strh r3, [r2, #0] 8002f10: e192 b.n 8003238 } else { PCD_CLEAR_RX_DTOG(USBx, ep->num); 8002f12: 687a ldr r2, [r7, #4] 8002f14: 683b ldr r3, [r7, #0] 8002f16: 781b ldrb r3, [r3, #0] 8002f18: 009b lsls r3, r3, #2 8002f1a: 4413 add r3, r2 8002f1c: 881b ldrh r3, [r3, #0] 8002f1e: 827b strh r3, [r7, #18] 8002f20: 8a7b ldrh r3, [r7, #18] 8002f22: f403 4380 and.w r3, r3, #16384 ; 0x4000 8002f26: 2b00 cmp r3, #0 8002f28: d01b beq.n 8002f62 8002f2a: 687a ldr r2, [r7, #4] 8002f2c: 683b ldr r3, [r7, #0] 8002f2e: 781b ldrb r3, [r3, #0] 8002f30: 009b lsls r3, r3, #2 8002f32: 4413 add r3, r2 8002f34: 881b ldrh r3, [r3, #0] 8002f36: b29b uxth r3, r3 8002f38: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002f3c: f023 0370 bic.w r3, r3, #112 ; 0x70 8002f40: 823b strh r3, [r7, #16] 8002f42: 687a ldr r2, [r7, #4] 8002f44: 683b ldr r3, [r7, #0] 8002f46: 781b ldrb r3, [r3, #0] 8002f48: 009b lsls r3, r3, #2 8002f4a: 441a add r2, r3 8002f4c: 8a3b ldrh r3, [r7, #16] 8002f4e: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002f52: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002f56: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8002f5a: f043 0380 orr.w r3, r3, #128 ; 0x80 8002f5e: b29b uxth r3, r3 8002f60: 8013 strh r3, [r2, #0] /* Configure DISABLE status for the Endpoint*/ PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS); 8002f62: 687a ldr r2, [r7, #4] 8002f64: 683b ldr r3, [r7, #0] 8002f66: 781b ldrb r3, [r3, #0] 8002f68: 009b lsls r3, r3, #2 8002f6a: 4413 add r3, r2 8002f6c: 881b ldrh r3, [r3, #0] 8002f6e: b29b uxth r3, r3 8002f70: f423 4380 bic.w r3, r3, #16384 ; 0x4000 8002f74: f023 0370 bic.w r3, r3, #112 ; 0x70 8002f78: 81fb strh r3, [r7, #14] 8002f7a: 687a ldr r2, [r7, #4] 8002f7c: 683b ldr r3, [r7, #0] 8002f7e: 781b ldrb r3, [r3, #0] 8002f80: 009b lsls r3, r3, #2 8002f82: 441a add r2, r3 8002f84: 89fb ldrh r3, [r7, #14] 8002f86: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002f8a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002f8e: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002f92: f043 0380 orr.w r3, r3, #128 ; 0x80 8002f96: b29b uxth r3, r3 8002f98: 8013 strh r3, [r2, #0] 8002f9a: e14d b.n 8003238 } } /*Double Buffer*/ else { if (ep->is_in == 0U) 8002f9c: 683b ldr r3, [r7, #0] 8002f9e: 785b ldrb r3, [r3, #1] 8002fa0: 2b00 cmp r3, #0 8002fa2: f040 80a5 bne.w 80030f0 { /* Clear the data toggle bits for the endpoint IN/OUT*/ PCD_CLEAR_RX_DTOG(USBx, ep->num); 8002fa6: 687a ldr r2, [r7, #4] 8002fa8: 683b ldr r3, [r7, #0] 8002faa: 781b ldrb r3, [r3, #0] 8002fac: 009b lsls r3, r3, #2 8002fae: 4413 add r3, r2 8002fb0: 881b ldrh r3, [r3, #0] 8002fb2: 843b strh r3, [r7, #32] 8002fb4: 8c3b ldrh r3, [r7, #32] 8002fb6: f403 4380 and.w r3, r3, #16384 ; 0x4000 8002fba: 2b00 cmp r3, #0 8002fbc: d01b beq.n 8002ff6 8002fbe: 687a ldr r2, [r7, #4] 8002fc0: 683b ldr r3, [r7, #0] 8002fc2: 781b ldrb r3, [r3, #0] 8002fc4: 009b lsls r3, r3, #2 8002fc6: 4413 add r3, r2 8002fc8: 881b ldrh r3, [r3, #0] 8002fca: b29b uxth r3, r3 8002fcc: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002fd0: f023 0370 bic.w r3, r3, #112 ; 0x70 8002fd4: 83fb strh r3, [r7, #30] 8002fd6: 687a ldr r2, [r7, #4] 8002fd8: 683b ldr r3, [r7, #0] 8002fda: 781b ldrb r3, [r3, #0] 8002fdc: 009b lsls r3, r3, #2 8002fde: 441a add r2, r3 8002fe0: 8bfb ldrh r3, [r7, #30] 8002fe2: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002fe6: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002fea: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8002fee: f043 0380 orr.w r3, r3, #128 ; 0x80 8002ff2: b29b uxth r3, r3 8002ff4: 8013 strh r3, [r2, #0] PCD_CLEAR_TX_DTOG(USBx, ep->num); 8002ff6: 687a ldr r2, [r7, #4] 8002ff8: 683b ldr r3, [r7, #0] 8002ffa: 781b ldrb r3, [r3, #0] 8002ffc: 009b lsls r3, r3, #2 8002ffe: 4413 add r3, r2 8003000: 881b ldrh r3, [r3, #0] 8003002: 83bb strh r3, [r7, #28] 8003004: 8bbb ldrh r3, [r7, #28] 8003006: f003 0340 and.w r3, r3, #64 ; 0x40 800300a: 2b00 cmp r3, #0 800300c: d01b beq.n 8003046 800300e: 687a ldr r2, [r7, #4] 8003010: 683b ldr r3, [r7, #0] 8003012: 781b ldrb r3, [r3, #0] 8003014: 009b lsls r3, r3, #2 8003016: 4413 add r3, r2 8003018: 881b ldrh r3, [r3, #0] 800301a: b29b uxth r3, r3 800301c: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8003020: f023 0370 bic.w r3, r3, #112 ; 0x70 8003024: 837b strh r3, [r7, #26] 8003026: 687a ldr r2, [r7, #4] 8003028: 683b ldr r3, [r7, #0] 800302a: 781b ldrb r3, [r3, #0] 800302c: 009b lsls r3, r3, #2 800302e: 441a add r2, r3 8003030: 8b7b ldrh r3, [r7, #26] 8003032: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003036: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800303a: f443 4300 orr.w r3, r3, #32768 ; 0x8000 800303e: f043 03c0 orr.w r3, r3, #192 ; 0xc0 8003042: b29b uxth r3, r3 8003044: 8013 strh r3, [r2, #0] /* Reset value of the data toggle bits for the endpoint out*/ PCD_TX_DTOG(USBx, ep->num); 8003046: 687a ldr r2, [r7, #4] 8003048: 683b ldr r3, [r7, #0] 800304a: 781b ldrb r3, [r3, #0] 800304c: 009b lsls r3, r3, #2 800304e: 4413 add r3, r2 8003050: 881b ldrh r3, [r3, #0] 8003052: b29b uxth r3, r3 8003054: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8003058: f023 0370 bic.w r3, r3, #112 ; 0x70 800305c: 833b strh r3, [r7, #24] 800305e: 687a ldr r2, [r7, #4] 8003060: 683b ldr r3, [r7, #0] 8003062: 781b ldrb r3, [r3, #0] 8003064: 009b lsls r3, r3, #2 8003066: 441a add r2, r3 8003068: 8b3b ldrh r3, [r7, #24] 800306a: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800306e: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003072: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8003076: f043 03c0 orr.w r3, r3, #192 ; 0xc0 800307a: b29b uxth r3, r3 800307c: 8013 strh r3, [r2, #0] PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS); 800307e: 687a ldr r2, [r7, #4] 8003080: 683b ldr r3, [r7, #0] 8003082: 781b ldrb r3, [r3, #0] 8003084: 009b lsls r3, r3, #2 8003086: 4413 add r3, r2 8003088: 881b ldrh r3, [r3, #0] 800308a: b29b uxth r3, r3 800308c: f423 4380 bic.w r3, r3, #16384 ; 0x4000 8003090: f023 0370 bic.w r3, r3, #112 ; 0x70 8003094: 82fb strh r3, [r7, #22] 8003096: 687a ldr r2, [r7, #4] 8003098: 683b ldr r3, [r7, #0] 800309a: 781b ldrb r3, [r3, #0] 800309c: 009b lsls r3, r3, #2 800309e: 441a add r2, r3 80030a0: 8afb ldrh r3, [r7, #22] 80030a2: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80030a6: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80030aa: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80030ae: f043 0380 orr.w r3, r3, #128 ; 0x80 80030b2: b29b uxth r3, r3 80030b4: 8013 strh r3, [r2, #0] PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 80030b6: 687a ldr r2, [r7, #4] 80030b8: 683b ldr r3, [r7, #0] 80030ba: 781b ldrb r3, [r3, #0] 80030bc: 009b lsls r3, r3, #2 80030be: 4413 add r3, r2 80030c0: 881b ldrh r3, [r3, #0] 80030c2: b29b uxth r3, r3 80030c4: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80030c8: f023 0340 bic.w r3, r3, #64 ; 0x40 80030cc: 82bb strh r3, [r7, #20] 80030ce: 687a ldr r2, [r7, #4] 80030d0: 683b ldr r3, [r7, #0] 80030d2: 781b ldrb r3, [r3, #0] 80030d4: 009b lsls r3, r3, #2 80030d6: 441a add r2, r3 80030d8: 8abb ldrh r3, [r7, #20] 80030da: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80030de: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80030e2: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80030e6: f043 0380 orr.w r3, r3, #128 ; 0x80 80030ea: b29b uxth r3, r3 80030ec: 8013 strh r3, [r2, #0] 80030ee: e0a3 b.n 8003238 } else { /* Clear the data toggle bits for the endpoint IN/OUT*/ PCD_CLEAR_RX_DTOG(USBx, ep->num); 80030f0: 687a ldr r2, [r7, #4] 80030f2: 683b ldr r3, [r7, #0] 80030f4: 781b ldrb r3, [r3, #0] 80030f6: 009b lsls r3, r3, #2 80030f8: 4413 add r3, r2 80030fa: 881b ldrh r3, [r3, #0] 80030fc: 85fb strh r3, [r7, #46] ; 0x2e 80030fe: 8dfb ldrh r3, [r7, #46] ; 0x2e 8003100: f403 4380 and.w r3, r3, #16384 ; 0x4000 8003104: 2b00 cmp r3, #0 8003106: d01b beq.n 8003140 8003108: 687a ldr r2, [r7, #4] 800310a: 683b ldr r3, [r7, #0] 800310c: 781b ldrb r3, [r3, #0] 800310e: 009b lsls r3, r3, #2 8003110: 4413 add r3, r2 8003112: 881b ldrh r3, [r3, #0] 8003114: b29b uxth r3, r3 8003116: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800311a: f023 0370 bic.w r3, r3, #112 ; 0x70 800311e: 85bb strh r3, [r7, #44] ; 0x2c 8003120: 687a ldr r2, [r7, #4] 8003122: 683b ldr r3, [r7, #0] 8003124: 781b ldrb r3, [r3, #0] 8003126: 009b lsls r3, r3, #2 8003128: 441a add r2, r3 800312a: 8dbb ldrh r3, [r7, #44] ; 0x2c 800312c: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003130: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003134: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8003138: f043 0380 orr.w r3, r3, #128 ; 0x80 800313c: b29b uxth r3, r3 800313e: 8013 strh r3, [r2, #0] PCD_CLEAR_TX_DTOG(USBx, ep->num); 8003140: 687a ldr r2, [r7, #4] 8003142: 683b ldr r3, [r7, #0] 8003144: 781b ldrb r3, [r3, #0] 8003146: 009b lsls r3, r3, #2 8003148: 4413 add r3, r2 800314a: 881b ldrh r3, [r3, #0] 800314c: 857b strh r3, [r7, #42] ; 0x2a 800314e: 8d7b ldrh r3, [r7, #42] ; 0x2a 8003150: f003 0340 and.w r3, r3, #64 ; 0x40 8003154: 2b00 cmp r3, #0 8003156: d01b beq.n 8003190 8003158: 687a ldr r2, [r7, #4] 800315a: 683b ldr r3, [r7, #0] 800315c: 781b ldrb r3, [r3, #0] 800315e: 009b lsls r3, r3, #2 8003160: 4413 add r3, r2 8003162: 881b ldrh r3, [r3, #0] 8003164: b29b uxth r3, r3 8003166: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800316a: f023 0370 bic.w r3, r3, #112 ; 0x70 800316e: 853b strh r3, [r7, #40] ; 0x28 8003170: 687a ldr r2, [r7, #4] 8003172: 683b ldr r3, [r7, #0] 8003174: 781b ldrb r3, [r3, #0] 8003176: 009b lsls r3, r3, #2 8003178: 441a add r2, r3 800317a: 8d3b ldrh r3, [r7, #40] ; 0x28 800317c: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003180: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003184: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8003188: f043 03c0 orr.w r3, r3, #192 ; 0xc0 800318c: b29b uxth r3, r3 800318e: 8013 strh r3, [r2, #0] PCD_RX_DTOG(USBx, ep->num); 8003190: 687a ldr r2, [r7, #4] 8003192: 683b ldr r3, [r7, #0] 8003194: 781b ldrb r3, [r3, #0] 8003196: 009b lsls r3, r3, #2 8003198: 4413 add r3, r2 800319a: 881b ldrh r3, [r3, #0] 800319c: b29b uxth r3, r3 800319e: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80031a2: f023 0370 bic.w r3, r3, #112 ; 0x70 80031a6: 84fb strh r3, [r7, #38] ; 0x26 80031a8: 687a ldr r2, [r7, #4] 80031aa: 683b ldr r3, [r7, #0] 80031ac: 781b ldrb r3, [r3, #0] 80031ae: 009b lsls r3, r3, #2 80031b0: 441a add r2, r3 80031b2: 8cfb ldrh r3, [r7, #38] ; 0x26 80031b4: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80031b8: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80031bc: f443 4340 orr.w r3, r3, #49152 ; 0xc000 80031c0: f043 0380 orr.w r3, r3, #128 ; 0x80 80031c4: b29b uxth r3, r3 80031c6: 8013 strh r3, [r2, #0] /* Configure DISABLE status for the Endpoint*/ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 80031c8: 687a ldr r2, [r7, #4] 80031ca: 683b ldr r3, [r7, #0] 80031cc: 781b ldrb r3, [r3, #0] 80031ce: 009b lsls r3, r3, #2 80031d0: 4413 add r3, r2 80031d2: 881b ldrh r3, [r3, #0] 80031d4: b29b uxth r3, r3 80031d6: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80031da: f023 0340 bic.w r3, r3, #64 ; 0x40 80031de: 84bb strh r3, [r7, #36] ; 0x24 80031e0: 687a ldr r2, [r7, #4] 80031e2: 683b ldr r3, [r7, #0] 80031e4: 781b ldrb r3, [r3, #0] 80031e6: 009b lsls r3, r3, #2 80031e8: 441a add r2, r3 80031ea: 8cbb ldrh r3, [r7, #36] ; 0x24 80031ec: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80031f0: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80031f4: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80031f8: f043 0380 orr.w r3, r3, #128 ; 0x80 80031fc: b29b uxth r3, r3 80031fe: 8013 strh r3, [r2, #0] PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS); 8003200: 687a ldr r2, [r7, #4] 8003202: 683b ldr r3, [r7, #0] 8003204: 781b ldrb r3, [r3, #0] 8003206: 009b lsls r3, r3, #2 8003208: 4413 add r3, r2 800320a: 881b ldrh r3, [r3, #0] 800320c: b29b uxth r3, r3 800320e: f423 4380 bic.w r3, r3, #16384 ; 0x4000 8003212: f023 0370 bic.w r3, r3, #112 ; 0x70 8003216: 847b strh r3, [r7, #34] ; 0x22 8003218: 687a ldr r2, [r7, #4] 800321a: 683b ldr r3, [r7, #0] 800321c: 781b ldrb r3, [r3, #0] 800321e: 009b lsls r3, r3, #2 8003220: 441a add r2, r3 8003222: 8c7b ldrh r3, [r7, #34] ; 0x22 8003224: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003228: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800322c: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8003230: f043 0380 orr.w r3, r3, #128 ; 0x80 8003234: b29b uxth r3, r3 8003236: 8013 strh r3, [r2, #0] } } return HAL_OK; 8003238: 2300 movs r3, #0 } 800323a: 4618 mov r0, r3 800323c: 3734 adds r7, #52 ; 0x34 800323e: 46bd mov sp, r7 8003240: bc80 pop {r7} 8003242: 4770 bx lr 08003244 : * @param USBx Selected device * @param ep pointer to endpoint structure * @retval HAL status */ HAL_StatusTypeDef USB_EPStartXfer(USB_TypeDef *USBx, USB_EPTypeDef *ep) { 8003244: b580 push {r7, lr} 8003246: b0c4 sub sp, #272 ; 0x110 8003248: af00 add r7, sp, #0 800324a: 1d3b adds r3, r7, #4 800324c: 6018 str r0, [r3, #0] 800324e: 463b mov r3, r7 8003250: 6019 str r1, [r3, #0] uint32_t len; uint16_t pmabuffer; uint16_t wEPVal; /* IN endpoint */ if (ep->is_in == 1U) 8003252: 463b mov r3, r7 8003254: 681b ldr r3, [r3, #0] 8003256: 785b ldrb r3, [r3, #1] 8003258: 2b01 cmp r3, #1 800325a: f040 8557 bne.w 8003d0c { /*Multi packet transfer*/ if (ep->xfer_len > ep->maxpacket) 800325e: 463b mov r3, r7 8003260: 681b ldr r3, [r3, #0] 8003262: 699a ldr r2, [r3, #24] 8003264: 463b mov r3, r7 8003266: 681b ldr r3, [r3, #0] 8003268: 691b ldr r3, [r3, #16] 800326a: 429a cmp r2, r3 800326c: d905 bls.n 800327a { len = ep->maxpacket; 800326e: 463b mov r3, r7 8003270: 681b ldr r3, [r3, #0] 8003272: 691b ldr r3, [r3, #16] 8003274: f8c7 310c str.w r3, [r7, #268] ; 0x10c 8003278: e004 b.n 8003284 } else { len = ep->xfer_len; 800327a: 463b mov r3, r7 800327c: 681b ldr r3, [r3, #0] 800327e: 699b ldr r3, [r3, #24] 8003280: f8c7 310c str.w r3, [r7, #268] ; 0x10c } /* configure and validate Tx endpoint */ if (ep->doublebuffer == 0U) 8003284: 463b mov r3, r7 8003286: 681b ldr r3, [r3, #0] 8003288: 7b1b ldrb r3, [r3, #12] 800328a: 2b00 cmp r3, #0 800328c: d12c bne.n 80032e8 { USB_WritePMA(USBx, ep->xfer_buff, ep->pmaadress, (uint16_t)len); 800328e: 463b mov r3, r7 8003290: 681b ldr r3, [r3, #0] 8003292: 6959 ldr r1, [r3, #20] 8003294: 463b mov r3, r7 8003296: 681b ldr r3, [r3, #0] 8003298: 88da ldrh r2, [r3, #6] 800329a: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800329e: b29b uxth r3, r3 80032a0: 1d38 adds r0, r7, #4 80032a2: 6800 ldr r0, [r0, #0] 80032a4: f001 fa2c bl 8004700 PCD_SET_EP_TX_CNT(USBx, ep->num, len); 80032a8: 1d3b adds r3, r7, #4 80032aa: 681b ldr r3, [r3, #0] 80032ac: 617b str r3, [r7, #20] 80032ae: 1d3b adds r3, r7, #4 80032b0: 681b ldr r3, [r3, #0] 80032b2: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80032b6: b29b uxth r3, r3 80032b8: 461a mov r2, r3 80032ba: 697b ldr r3, [r7, #20] 80032bc: 4413 add r3, r2 80032be: 617b str r3, [r7, #20] 80032c0: 463b mov r3, r7 80032c2: 681b ldr r3, [r3, #0] 80032c4: 781b ldrb r3, [r3, #0] 80032c6: 011a lsls r2, r3, #4 80032c8: 697b ldr r3, [r7, #20] 80032ca: 4413 add r3, r2 80032cc: f203 4204 addw r2, r3, #1028 ; 0x404 80032d0: f107 0310 add.w r3, r7, #16 80032d4: 601a str r2, [r3, #0] 80032d6: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80032da: b29a uxth r2, r3 80032dc: f107 0310 add.w r3, r7, #16 80032e0: 681b ldr r3, [r3, #0] 80032e2: 801a strh r2, [r3, #0] 80032e4: f000 bcdd b.w 8003ca2 } else { /* double buffer bulk management */ if (ep->type == EP_TYPE_BULK) 80032e8: 463b mov r3, r7 80032ea: 681b ldr r3, [r3, #0] 80032ec: 78db ldrb r3, [r3, #3] 80032ee: 2b02 cmp r3, #2 80032f0: f040 8347 bne.w 8003982 { if (ep->xfer_len_db > ep->maxpacket) 80032f4: 463b mov r3, r7 80032f6: 681b ldr r3, [r3, #0] 80032f8: 6a1a ldr r2, [r3, #32] 80032fa: 463b mov r3, r7 80032fc: 681b ldr r3, [r3, #0] 80032fe: 691b ldr r3, [r3, #16] 8003300: 429a cmp r2, r3 8003302: f240 82eb bls.w 80038dc { /* enable double buffer */ PCD_SET_EP_DBUF(USBx, ep->num); 8003306: 1d3b adds r3, r7, #4 8003308: 681a ldr r2, [r3, #0] 800330a: 463b mov r3, r7 800330c: 681b ldr r3, [r3, #0] 800330e: 781b ldrb r3, [r3, #0] 8003310: 009b lsls r3, r3, #2 8003312: 4413 add r3, r2 8003314: 881b ldrh r3, [r3, #0] 8003316: b29b uxth r3, r3 8003318: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800331c: f023 0370 bic.w r3, r3, #112 ; 0x70 8003320: f8a7 305a strh.w r3, [r7, #90] ; 0x5a 8003324: 1d3b adds r3, r7, #4 8003326: 681a ldr r2, [r3, #0] 8003328: 463b mov r3, r7 800332a: 681b ldr r3, [r3, #0] 800332c: 781b ldrb r3, [r3, #0] 800332e: 009b lsls r3, r3, #2 8003330: 441a add r2, r3 8003332: f8b7 305a ldrh.w r3, [r7, #90] ; 0x5a 8003336: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800333a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800333e: f443 4301 orr.w r3, r3, #33024 ; 0x8100 8003342: f043 0380 orr.w r3, r3, #128 ; 0x80 8003346: b29b uxth r3, r3 8003348: 8013 strh r3, [r2, #0] /* each Time to write in PMA xfer_len_db will */ ep->xfer_len_db -= len; 800334a: 463b mov r3, r7 800334c: 681b ldr r3, [r3, #0] 800334e: 6a1a ldr r2, [r3, #32] 8003350: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003354: 1ad2 subs r2, r2, r3 8003356: 463b mov r3, r7 8003358: 681b ldr r3, [r3, #0] 800335a: 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) 800335c: 1d3b adds r3, r7, #4 800335e: 681a ldr r2, [r3, #0] 8003360: 463b mov r3, r7 8003362: 681b ldr r3, [r3, #0] 8003364: 781b ldrb r3, [r3, #0] 8003366: 009b lsls r3, r3, #2 8003368: 4413 add r3, r2 800336a: 881b ldrh r3, [r3, #0] 800336c: b29b uxth r3, r3 800336e: f003 0340 and.w r3, r3, #64 ; 0x40 8003372: 2b00 cmp r3, #0 8003374: f000 8159 beq.w 800362a { /* Set the Double buffer counter for pmabuffer1 */ PCD_SET_EP_DBUF1_CNT(USBx, ep->num, ep->is_in, len); 8003378: 1d3b adds r3, r7, #4 800337a: 681b ldr r3, [r3, #0] 800337c: 637b str r3, [r7, #52] ; 0x34 800337e: 463b mov r3, r7 8003380: 681b ldr r3, [r3, #0] 8003382: 785b ldrb r3, [r3, #1] 8003384: 2b00 cmp r3, #0 8003386: d164 bne.n 8003452 8003388: 1d3b adds r3, r7, #4 800338a: 681b ldr r3, [r3, #0] 800338c: 62fb str r3, [r7, #44] ; 0x2c 800338e: 1d3b adds r3, r7, #4 8003390: 681b ldr r3, [r3, #0] 8003392: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003396: b29b uxth r3, r3 8003398: 461a mov r2, r3 800339a: 6afb ldr r3, [r7, #44] ; 0x2c 800339c: 4413 add r3, r2 800339e: 62fb str r3, [r7, #44] ; 0x2c 80033a0: 463b mov r3, r7 80033a2: 681b ldr r3, [r3, #0] 80033a4: 781b ldrb r3, [r3, #0] 80033a6: 011a lsls r2, r3, #4 80033a8: 6afb ldr r3, [r7, #44] ; 0x2c 80033aa: 4413 add r3, r2 80033ac: f203 430c addw r3, r3, #1036 ; 0x40c 80033b0: 62bb str r3, [r7, #40] ; 0x28 80033b2: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80033b6: 2b00 cmp r3, #0 80033b8: d112 bne.n 80033e0 80033ba: 6abb ldr r3, [r7, #40] ; 0x28 80033bc: 881b ldrh r3, [r3, #0] 80033be: b29b uxth r3, r3 80033c0: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 80033c4: b29a uxth r2, r3 80033c6: 6abb ldr r3, [r7, #40] ; 0x28 80033c8: 801a strh r2, [r3, #0] 80033ca: 6abb ldr r3, [r7, #40] ; 0x28 80033cc: 881b ldrh r3, [r3, #0] 80033ce: b29b uxth r3, r3 80033d0: ea6f 4343 mvn.w r3, r3, lsl #17 80033d4: ea6f 4353 mvn.w r3, r3, lsr #17 80033d8: b29a uxth r2, r3 80033da: 6abb ldr r3, [r7, #40] ; 0x28 80033dc: 801a strh r2, [r3, #0] 80033de: e054 b.n 800348a 80033e0: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80033e4: 2b3e cmp r3, #62 ; 0x3e 80033e6: d817 bhi.n 8003418 80033e8: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80033ec: 085b lsrs r3, r3, #1 80033ee: f8c7 3104 str.w r3, [r7, #260] ; 0x104 80033f2: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80033f6: f003 0301 and.w r3, r3, #1 80033fa: 2b00 cmp r3, #0 80033fc: d004 beq.n 8003408 80033fe: f8d7 3104 ldr.w r3, [r7, #260] ; 0x104 8003402: 3301 adds r3, #1 8003404: f8c7 3104 str.w r3, [r7, #260] ; 0x104 8003408: f8d7 3104 ldr.w r3, [r7, #260] ; 0x104 800340c: b29b uxth r3, r3 800340e: 029b lsls r3, r3, #10 8003410: b29a uxth r2, r3 8003412: 6abb ldr r3, [r7, #40] ; 0x28 8003414: 801a strh r2, [r3, #0] 8003416: e038 b.n 800348a 8003418: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800341c: 095b lsrs r3, r3, #5 800341e: f8c7 3104 str.w r3, [r7, #260] ; 0x104 8003422: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003426: f003 031f and.w r3, r3, #31 800342a: 2b00 cmp r3, #0 800342c: d104 bne.n 8003438 800342e: f8d7 3104 ldr.w r3, [r7, #260] ; 0x104 8003432: 3b01 subs r3, #1 8003434: f8c7 3104 str.w r3, [r7, #260] ; 0x104 8003438: f8d7 3104 ldr.w r3, [r7, #260] ; 0x104 800343c: b29b uxth r3, r3 800343e: 029b lsls r3, r3, #10 8003440: b29b uxth r3, r3 8003442: ea6f 4343 mvn.w r3, r3, lsl #17 8003446: ea6f 4353 mvn.w r3, r3, lsr #17 800344a: b29a uxth r2, r3 800344c: 6abb ldr r3, [r7, #40] ; 0x28 800344e: 801a strh r2, [r3, #0] 8003450: e01b b.n 800348a 8003452: 463b mov r3, r7 8003454: 681b ldr r3, [r3, #0] 8003456: 785b ldrb r3, [r3, #1] 8003458: 2b01 cmp r3, #1 800345a: d116 bne.n 800348a 800345c: 1d3b adds r3, r7, #4 800345e: 681b ldr r3, [r3, #0] 8003460: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003464: b29b uxth r3, r3 8003466: 461a mov r2, r3 8003468: 6b7b ldr r3, [r7, #52] ; 0x34 800346a: 4413 add r3, r2 800346c: 637b str r3, [r7, #52] ; 0x34 800346e: 463b mov r3, r7 8003470: 681b ldr r3, [r3, #0] 8003472: 781b ldrb r3, [r3, #0] 8003474: 011a lsls r2, r3, #4 8003476: 6b7b ldr r3, [r7, #52] ; 0x34 8003478: 4413 add r3, r2 800347a: f203 430c addw r3, r3, #1036 ; 0x40c 800347e: 633b str r3, [r7, #48] ; 0x30 8003480: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003484: b29a uxth r2, r3 8003486: 6b3b ldr r3, [r7, #48] ; 0x30 8003488: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr1; 800348a: 463b mov r3, r7 800348c: 681b ldr r3, [r3, #0] 800348e: 895b ldrh r3, [r3, #10] 8003490: f8a7 310a strh.w r3, [r7, #266] ; 0x10a /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 8003494: 463b mov r3, r7 8003496: 681b ldr r3, [r3, #0] 8003498: 6959 ldr r1, [r3, #20] 800349a: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800349e: b29b uxth r3, r3 80034a0: f8b7 210a ldrh.w r2, [r7, #266] ; 0x10a 80034a4: 1d38 adds r0, r7, #4 80034a6: 6800 ldr r0, [r0, #0] 80034a8: f001 f92a bl 8004700 ep->xfer_buff += len; 80034ac: 463b mov r3, r7 80034ae: 681b ldr r3, [r3, #0] 80034b0: 695a ldr r2, [r3, #20] 80034b2: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80034b6: 441a add r2, r3 80034b8: 463b mov r3, r7 80034ba: 681b ldr r3, [r3, #0] 80034bc: 615a str r2, [r3, #20] if (ep->xfer_len_db > ep->maxpacket) 80034be: 463b mov r3, r7 80034c0: 681b ldr r3, [r3, #0] 80034c2: 6a1a ldr r2, [r3, #32] 80034c4: 463b mov r3, r7 80034c6: 681b ldr r3, [r3, #0] 80034c8: 691b ldr r3, [r3, #16] 80034ca: 429a cmp r2, r3 80034cc: d909 bls.n 80034e2 { ep->xfer_len_db -= len; 80034ce: 463b mov r3, r7 80034d0: 681b ldr r3, [r3, #0] 80034d2: 6a1a ldr r2, [r3, #32] 80034d4: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80034d8: 1ad2 subs r2, r2, r3 80034da: 463b mov r3, r7 80034dc: 681b ldr r3, [r3, #0] 80034de: 621a str r2, [r3, #32] 80034e0: e008 b.n 80034f4 } else { len = ep->xfer_len_db; 80034e2: 463b mov r3, r7 80034e4: 681b ldr r3, [r3, #0] 80034e6: 6a1b ldr r3, [r3, #32] 80034e8: f8c7 310c str.w r3, [r7, #268] ; 0x10c ep->xfer_len_db = 0U; 80034ec: 463b mov r3, r7 80034ee: 681b ldr r3, [r3, #0] 80034f0: 2200 movs r2, #0 80034f2: 621a str r2, [r3, #32] } /* Set the Double buffer counter for pmabuffer0 */ PCD_SET_EP_DBUF0_CNT(USBx, ep->num, ep->is_in, len); 80034f4: 463b mov r3, r7 80034f6: 681b ldr r3, [r3, #0] 80034f8: 785b ldrb r3, [r3, #1] 80034fa: 2b00 cmp r3, #0 80034fc: d164 bne.n 80035c8 80034fe: 1d3b adds r3, r7, #4 8003500: 681b ldr r3, [r3, #0] 8003502: 61fb str r3, [r7, #28] 8003504: 1d3b adds r3, r7, #4 8003506: 681b ldr r3, [r3, #0] 8003508: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 800350c: b29b uxth r3, r3 800350e: 461a mov r2, r3 8003510: 69fb ldr r3, [r7, #28] 8003512: 4413 add r3, r2 8003514: 61fb str r3, [r7, #28] 8003516: 463b mov r3, r7 8003518: 681b ldr r3, [r3, #0] 800351a: 781b ldrb r3, [r3, #0] 800351c: 011a lsls r2, r3, #4 800351e: 69fb ldr r3, [r7, #28] 8003520: 4413 add r3, r2 8003522: f203 4304 addw r3, r3, #1028 ; 0x404 8003526: 61bb str r3, [r7, #24] 8003528: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800352c: 2b00 cmp r3, #0 800352e: d112 bne.n 8003556 8003530: 69bb ldr r3, [r7, #24] 8003532: 881b ldrh r3, [r3, #0] 8003534: b29b uxth r3, r3 8003536: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 800353a: b29a uxth r2, r3 800353c: 69bb ldr r3, [r7, #24] 800353e: 801a strh r2, [r3, #0] 8003540: 69bb ldr r3, [r7, #24] 8003542: 881b ldrh r3, [r3, #0] 8003544: b29b uxth r3, r3 8003546: ea6f 4343 mvn.w r3, r3, lsl #17 800354a: ea6f 4353 mvn.w r3, r3, lsr #17 800354e: b29a uxth r2, r3 8003550: 69bb ldr r3, [r7, #24] 8003552: 801a strh r2, [r3, #0] 8003554: e057 b.n 8003606 8003556: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800355a: 2b3e cmp r3, #62 ; 0x3e 800355c: d817 bhi.n 800358e 800355e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003562: 085b lsrs r3, r3, #1 8003564: f8c7 3100 str.w r3, [r7, #256] ; 0x100 8003568: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800356c: f003 0301 and.w r3, r3, #1 8003570: 2b00 cmp r3, #0 8003572: d004 beq.n 800357e 8003574: f8d7 3100 ldr.w r3, [r7, #256] ; 0x100 8003578: 3301 adds r3, #1 800357a: f8c7 3100 str.w r3, [r7, #256] ; 0x100 800357e: f8d7 3100 ldr.w r3, [r7, #256] ; 0x100 8003582: b29b uxth r3, r3 8003584: 029b lsls r3, r3, #10 8003586: b29a uxth r2, r3 8003588: 69bb ldr r3, [r7, #24] 800358a: 801a strh r2, [r3, #0] 800358c: e03b b.n 8003606 800358e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003592: 095b lsrs r3, r3, #5 8003594: f8c7 3100 str.w r3, [r7, #256] ; 0x100 8003598: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800359c: f003 031f and.w r3, r3, #31 80035a0: 2b00 cmp r3, #0 80035a2: d104 bne.n 80035ae 80035a4: f8d7 3100 ldr.w r3, [r7, #256] ; 0x100 80035a8: 3b01 subs r3, #1 80035aa: f8c7 3100 str.w r3, [r7, #256] ; 0x100 80035ae: f8d7 3100 ldr.w r3, [r7, #256] ; 0x100 80035b2: b29b uxth r3, r3 80035b4: 029b lsls r3, r3, #10 80035b6: b29b uxth r3, r3 80035b8: ea6f 4343 mvn.w r3, r3, lsl #17 80035bc: ea6f 4353 mvn.w r3, r3, lsr #17 80035c0: b29a uxth r2, r3 80035c2: 69bb ldr r3, [r7, #24] 80035c4: 801a strh r2, [r3, #0] 80035c6: e01e b.n 8003606 80035c8: 463b mov r3, r7 80035ca: 681b ldr r3, [r3, #0] 80035cc: 785b ldrb r3, [r3, #1] 80035ce: 2b01 cmp r3, #1 80035d0: d119 bne.n 8003606 80035d2: 1d3b adds r3, r7, #4 80035d4: 681b ldr r3, [r3, #0] 80035d6: 627b str r3, [r7, #36] ; 0x24 80035d8: 1d3b adds r3, r7, #4 80035da: 681b ldr r3, [r3, #0] 80035dc: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80035e0: b29b uxth r3, r3 80035e2: 461a mov r2, r3 80035e4: 6a7b ldr r3, [r7, #36] ; 0x24 80035e6: 4413 add r3, r2 80035e8: 627b str r3, [r7, #36] ; 0x24 80035ea: 463b mov r3, r7 80035ec: 681b ldr r3, [r3, #0] 80035ee: 781b ldrb r3, [r3, #0] 80035f0: 011a lsls r2, r3, #4 80035f2: 6a7b ldr r3, [r7, #36] ; 0x24 80035f4: 4413 add r3, r2 80035f6: f203 4304 addw r3, r3, #1028 ; 0x404 80035fa: 623b str r3, [r7, #32] 80035fc: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003600: b29a uxth r2, r3 8003602: 6a3b ldr r3, [r7, #32] 8003604: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr0; 8003606: 463b mov r3, r7 8003608: 681b ldr r3, [r3, #0] 800360a: 891b ldrh r3, [r3, #8] 800360c: f8a7 310a strh.w r3, [r7, #266] ; 0x10a /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 8003610: 463b mov r3, r7 8003612: 681b ldr r3, [r3, #0] 8003614: 6959 ldr r1, [r3, #20] 8003616: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800361a: b29b uxth r3, r3 800361c: f8b7 210a ldrh.w r2, [r7, #266] ; 0x10a 8003620: 1d38 adds r0, r7, #4 8003622: 6800 ldr r0, [r0, #0] 8003624: f001 f86c bl 8004700 8003628: e33b b.n 8003ca2 } else { /* Set the Double buffer counter for pmabuffer0 */ PCD_SET_EP_DBUF0_CNT(USBx, ep->num, ep->is_in, len); 800362a: 463b mov r3, r7 800362c: 681b ldr r3, [r3, #0] 800362e: 785b ldrb r3, [r3, #1] 8003630: 2b00 cmp r3, #0 8003632: d164 bne.n 80036fe 8003634: 1d3b adds r3, r7, #4 8003636: 681b ldr r3, [r3, #0] 8003638: 64fb str r3, [r7, #76] ; 0x4c 800363a: 1d3b adds r3, r7, #4 800363c: 681b ldr r3, [r3, #0] 800363e: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003642: b29b uxth r3, r3 8003644: 461a mov r2, r3 8003646: 6cfb ldr r3, [r7, #76] ; 0x4c 8003648: 4413 add r3, r2 800364a: 64fb str r3, [r7, #76] ; 0x4c 800364c: 463b mov r3, r7 800364e: 681b ldr r3, [r3, #0] 8003650: 781b ldrb r3, [r3, #0] 8003652: 011a lsls r2, r3, #4 8003654: 6cfb ldr r3, [r7, #76] ; 0x4c 8003656: 4413 add r3, r2 8003658: f203 4304 addw r3, r3, #1028 ; 0x404 800365c: 64bb str r3, [r7, #72] ; 0x48 800365e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003662: 2b00 cmp r3, #0 8003664: d112 bne.n 800368c 8003666: 6cbb ldr r3, [r7, #72] ; 0x48 8003668: 881b ldrh r3, [r3, #0] 800366a: b29b uxth r3, r3 800366c: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8003670: b29a uxth r2, r3 8003672: 6cbb ldr r3, [r7, #72] ; 0x48 8003674: 801a strh r2, [r3, #0] 8003676: 6cbb ldr r3, [r7, #72] ; 0x48 8003678: 881b ldrh r3, [r3, #0] 800367a: b29b uxth r3, r3 800367c: ea6f 4343 mvn.w r3, r3, lsl #17 8003680: ea6f 4353 mvn.w r3, r3, lsr #17 8003684: b29a uxth r2, r3 8003686: 6cbb ldr r3, [r7, #72] ; 0x48 8003688: 801a strh r2, [r3, #0] 800368a: e057 b.n 800373c 800368c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003690: 2b3e cmp r3, #62 ; 0x3e 8003692: d817 bhi.n 80036c4 8003694: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003698: 085b lsrs r3, r3, #1 800369a: f8c7 30fc str.w r3, [r7, #252] ; 0xfc 800369e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80036a2: f003 0301 and.w r3, r3, #1 80036a6: 2b00 cmp r3, #0 80036a8: d004 beq.n 80036b4 80036aa: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc 80036ae: 3301 adds r3, #1 80036b0: f8c7 30fc str.w r3, [r7, #252] ; 0xfc 80036b4: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc 80036b8: b29b uxth r3, r3 80036ba: 029b lsls r3, r3, #10 80036bc: b29a uxth r2, r3 80036be: 6cbb ldr r3, [r7, #72] ; 0x48 80036c0: 801a strh r2, [r3, #0] 80036c2: e03b b.n 800373c 80036c4: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80036c8: 095b lsrs r3, r3, #5 80036ca: f8c7 30fc str.w r3, [r7, #252] ; 0xfc 80036ce: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80036d2: f003 031f and.w r3, r3, #31 80036d6: 2b00 cmp r3, #0 80036d8: d104 bne.n 80036e4 80036da: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc 80036de: 3b01 subs r3, #1 80036e0: f8c7 30fc str.w r3, [r7, #252] ; 0xfc 80036e4: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc 80036e8: b29b uxth r3, r3 80036ea: 029b lsls r3, r3, #10 80036ec: b29b uxth r3, r3 80036ee: ea6f 4343 mvn.w r3, r3, lsl #17 80036f2: ea6f 4353 mvn.w r3, r3, lsr #17 80036f6: b29a uxth r2, r3 80036f8: 6cbb ldr r3, [r7, #72] ; 0x48 80036fa: 801a strh r2, [r3, #0] 80036fc: e01e b.n 800373c 80036fe: 463b mov r3, r7 8003700: 681b ldr r3, [r3, #0] 8003702: 785b ldrb r3, [r3, #1] 8003704: 2b01 cmp r3, #1 8003706: d119 bne.n 800373c 8003708: 1d3b adds r3, r7, #4 800370a: 681b ldr r3, [r3, #0] 800370c: 657b str r3, [r7, #84] ; 0x54 800370e: 1d3b adds r3, r7, #4 8003710: 681b ldr r3, [r3, #0] 8003712: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003716: b29b uxth r3, r3 8003718: 461a mov r2, r3 800371a: 6d7b ldr r3, [r7, #84] ; 0x54 800371c: 4413 add r3, r2 800371e: 657b str r3, [r7, #84] ; 0x54 8003720: 463b mov r3, r7 8003722: 681b ldr r3, [r3, #0] 8003724: 781b ldrb r3, [r3, #0] 8003726: 011a lsls r2, r3, #4 8003728: 6d7b ldr r3, [r7, #84] ; 0x54 800372a: 4413 add r3, r2 800372c: f203 4304 addw r3, r3, #1028 ; 0x404 8003730: 653b str r3, [r7, #80] ; 0x50 8003732: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003736: b29a uxth r2, r3 8003738: 6d3b ldr r3, [r7, #80] ; 0x50 800373a: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr0; 800373c: 463b mov r3, r7 800373e: 681b ldr r3, [r3, #0] 8003740: 891b ldrh r3, [r3, #8] 8003742: f8a7 310a strh.w r3, [r7, #266] ; 0x10a /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 8003746: 463b mov r3, r7 8003748: 681b ldr r3, [r3, #0] 800374a: 6959 ldr r1, [r3, #20] 800374c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003750: b29b uxth r3, r3 8003752: f8b7 210a ldrh.w r2, [r7, #266] ; 0x10a 8003756: 1d38 adds r0, r7, #4 8003758: 6800 ldr r0, [r0, #0] 800375a: f000 ffd1 bl 8004700 ep->xfer_buff += len; 800375e: 463b mov r3, r7 8003760: 681b ldr r3, [r3, #0] 8003762: 695a ldr r2, [r3, #20] 8003764: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003768: 441a add r2, r3 800376a: 463b mov r3, r7 800376c: 681b ldr r3, [r3, #0] 800376e: 615a str r2, [r3, #20] if (ep->xfer_len_db > ep->maxpacket) 8003770: 463b mov r3, r7 8003772: 681b ldr r3, [r3, #0] 8003774: 6a1a ldr r2, [r3, #32] 8003776: 463b mov r3, r7 8003778: 681b ldr r3, [r3, #0] 800377a: 691b ldr r3, [r3, #16] 800377c: 429a cmp r2, r3 800377e: d909 bls.n 8003794 { ep->xfer_len_db -= len; 8003780: 463b mov r3, r7 8003782: 681b ldr r3, [r3, #0] 8003784: 6a1a ldr r2, [r3, #32] 8003786: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800378a: 1ad2 subs r2, r2, r3 800378c: 463b mov r3, r7 800378e: 681b ldr r3, [r3, #0] 8003790: 621a str r2, [r3, #32] 8003792: e008 b.n 80037a6 } else { len = ep->xfer_len_db; 8003794: 463b mov r3, r7 8003796: 681b ldr r3, [r3, #0] 8003798: 6a1b ldr r3, [r3, #32] 800379a: f8c7 310c str.w r3, [r7, #268] ; 0x10c ep->xfer_len_db = 0U; 800379e: 463b mov r3, r7 80037a0: 681b ldr r3, [r3, #0] 80037a2: 2200 movs r2, #0 80037a4: 621a str r2, [r3, #32] } /* Set the Double buffer counter for pmabuffer1 */ PCD_SET_EP_DBUF1_CNT(USBx, ep->num, ep->is_in, len); 80037a6: 1d3b adds r3, r7, #4 80037a8: 681b ldr r3, [r3, #0] 80037aa: 647b str r3, [r7, #68] ; 0x44 80037ac: 463b mov r3, r7 80037ae: 681b ldr r3, [r3, #0] 80037b0: 785b ldrb r3, [r3, #1] 80037b2: 2b00 cmp r3, #0 80037b4: d164 bne.n 8003880 80037b6: 1d3b adds r3, r7, #4 80037b8: 681b ldr r3, [r3, #0] 80037ba: 63fb str r3, [r7, #60] ; 0x3c 80037bc: 1d3b adds r3, r7, #4 80037be: 681b ldr r3, [r3, #0] 80037c0: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80037c4: b29b uxth r3, r3 80037c6: 461a mov r2, r3 80037c8: 6bfb ldr r3, [r7, #60] ; 0x3c 80037ca: 4413 add r3, r2 80037cc: 63fb str r3, [r7, #60] ; 0x3c 80037ce: 463b mov r3, r7 80037d0: 681b ldr r3, [r3, #0] 80037d2: 781b ldrb r3, [r3, #0] 80037d4: 011a lsls r2, r3, #4 80037d6: 6bfb ldr r3, [r7, #60] ; 0x3c 80037d8: 4413 add r3, r2 80037da: f203 430c addw r3, r3, #1036 ; 0x40c 80037de: 63bb str r3, [r7, #56] ; 0x38 80037e0: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80037e4: 2b00 cmp r3, #0 80037e6: d112 bne.n 800380e 80037e8: 6bbb ldr r3, [r7, #56] ; 0x38 80037ea: 881b ldrh r3, [r3, #0] 80037ec: b29b uxth r3, r3 80037ee: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 80037f2: b29a uxth r2, r3 80037f4: 6bbb ldr r3, [r7, #56] ; 0x38 80037f6: 801a strh r2, [r3, #0] 80037f8: 6bbb ldr r3, [r7, #56] ; 0x38 80037fa: 881b ldrh r3, [r3, #0] 80037fc: b29b uxth r3, r3 80037fe: ea6f 4343 mvn.w r3, r3, lsl #17 8003802: ea6f 4353 mvn.w r3, r3, lsr #17 8003806: b29a uxth r2, r3 8003808: 6bbb ldr r3, [r7, #56] ; 0x38 800380a: 801a strh r2, [r3, #0] 800380c: e054 b.n 80038b8 800380e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003812: 2b3e cmp r3, #62 ; 0x3e 8003814: d817 bhi.n 8003846 8003816: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800381a: 085b lsrs r3, r3, #1 800381c: f8c7 30f8 str.w r3, [r7, #248] ; 0xf8 8003820: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003824: f003 0301 and.w r3, r3, #1 8003828: 2b00 cmp r3, #0 800382a: d004 beq.n 8003836 800382c: f8d7 30f8 ldr.w r3, [r7, #248] ; 0xf8 8003830: 3301 adds r3, #1 8003832: f8c7 30f8 str.w r3, [r7, #248] ; 0xf8 8003836: f8d7 30f8 ldr.w r3, [r7, #248] ; 0xf8 800383a: b29b uxth r3, r3 800383c: 029b lsls r3, r3, #10 800383e: b29a uxth r2, r3 8003840: 6bbb ldr r3, [r7, #56] ; 0x38 8003842: 801a strh r2, [r3, #0] 8003844: e038 b.n 80038b8 8003846: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800384a: 095b lsrs r3, r3, #5 800384c: f8c7 30f8 str.w r3, [r7, #248] ; 0xf8 8003850: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003854: f003 031f and.w r3, r3, #31 8003858: 2b00 cmp r3, #0 800385a: d104 bne.n 8003866 800385c: f8d7 30f8 ldr.w r3, [r7, #248] ; 0xf8 8003860: 3b01 subs r3, #1 8003862: f8c7 30f8 str.w r3, [r7, #248] ; 0xf8 8003866: f8d7 30f8 ldr.w r3, [r7, #248] ; 0xf8 800386a: b29b uxth r3, r3 800386c: 029b lsls r3, r3, #10 800386e: b29b uxth r3, r3 8003870: ea6f 4343 mvn.w r3, r3, lsl #17 8003874: ea6f 4353 mvn.w r3, r3, lsr #17 8003878: b29a uxth r2, r3 800387a: 6bbb ldr r3, [r7, #56] ; 0x38 800387c: 801a strh r2, [r3, #0] 800387e: e01b b.n 80038b8 8003880: 463b mov r3, r7 8003882: 681b ldr r3, [r3, #0] 8003884: 785b ldrb r3, [r3, #1] 8003886: 2b01 cmp r3, #1 8003888: d116 bne.n 80038b8 800388a: 1d3b adds r3, r7, #4 800388c: 681b ldr r3, [r3, #0] 800388e: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003892: b29b uxth r3, r3 8003894: 461a mov r2, r3 8003896: 6c7b ldr r3, [r7, #68] ; 0x44 8003898: 4413 add r3, r2 800389a: 647b str r3, [r7, #68] ; 0x44 800389c: 463b mov r3, r7 800389e: 681b ldr r3, [r3, #0] 80038a0: 781b ldrb r3, [r3, #0] 80038a2: 011a lsls r2, r3, #4 80038a4: 6c7b ldr r3, [r7, #68] ; 0x44 80038a6: 4413 add r3, r2 80038a8: f203 430c addw r3, r3, #1036 ; 0x40c 80038ac: 643b str r3, [r7, #64] ; 0x40 80038ae: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80038b2: b29a uxth r2, r3 80038b4: 6c3b ldr r3, [r7, #64] ; 0x40 80038b6: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr1; 80038b8: 463b mov r3, r7 80038ba: 681b ldr r3, [r3, #0] 80038bc: 895b ldrh r3, [r3, #10] 80038be: f8a7 310a strh.w r3, [r7, #266] ; 0x10a /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 80038c2: 463b mov r3, r7 80038c4: 681b ldr r3, [r3, #0] 80038c6: 6959 ldr r1, [r3, #20] 80038c8: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80038cc: b29b uxth r3, r3 80038ce: f8b7 210a ldrh.w r2, [r7, #266] ; 0x10a 80038d2: 1d38 adds r0, r7, #4 80038d4: 6800 ldr r0, [r0, #0] 80038d6: f000 ff13 bl 8004700 80038da: e1e2 b.n 8003ca2 } } /* auto Switch to single buffer mode when transfer xfer_len_db; 80038dc: 463b mov r3, r7 80038de: 681b ldr r3, [r3, #0] 80038e0: 6a1b ldr r3, [r3, #32] 80038e2: f8c7 310c str.w r3, [r7, #268] ; 0x10c /* disable double buffer mode */ PCD_CLEAR_EP_DBUF(USBx, ep->num); 80038e6: 1d3b adds r3, r7, #4 80038e8: 681a ldr r2, [r3, #0] 80038ea: 463b mov r3, r7 80038ec: 681b ldr r3, [r3, #0] 80038ee: 781b ldrb r3, [r3, #0] 80038f0: 009b lsls r3, r3, #2 80038f2: 4413 add r3, r2 80038f4: 881b ldrh r3, [r3, #0] 80038f6: b29b uxth r3, r3 80038f8: f423 43e2 bic.w r3, r3, #28928 ; 0x7100 80038fc: f023 0370 bic.w r3, r3, #112 ; 0x70 8003900: f8a7 3066 strh.w r3, [r7, #102] ; 0x66 8003904: 1d3b adds r3, r7, #4 8003906: 681a ldr r2, [r3, #0] 8003908: 463b mov r3, r7 800390a: 681b ldr r3, [r3, #0] 800390c: 781b ldrb r3, [r3, #0] 800390e: 009b lsls r3, r3, #2 8003910: 441a add r2, r3 8003912: f8b7 3066 ldrh.w r3, [r7, #102] ; 0x66 8003916: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800391a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800391e: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8003922: f043 0380 orr.w r3, r3, #128 ; 0x80 8003926: b29b uxth r3, r3 8003928: 8013 strh r3, [r2, #0] /* Set Tx count with nbre of byte to be transmitted */ PCD_SET_EP_TX_CNT(USBx, ep->num, len); 800392a: 1d3b adds r3, r7, #4 800392c: 681b ldr r3, [r3, #0] 800392e: 663b str r3, [r7, #96] ; 0x60 8003930: 1d3b adds r3, r7, #4 8003932: 681b ldr r3, [r3, #0] 8003934: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003938: b29b uxth r3, r3 800393a: 461a mov r2, r3 800393c: 6e3b ldr r3, [r7, #96] ; 0x60 800393e: 4413 add r3, r2 8003940: 663b str r3, [r7, #96] ; 0x60 8003942: 463b mov r3, r7 8003944: 681b ldr r3, [r3, #0] 8003946: 781b ldrb r3, [r3, #0] 8003948: 011a lsls r2, r3, #4 800394a: 6e3b ldr r3, [r7, #96] ; 0x60 800394c: 4413 add r3, r2 800394e: f203 4304 addw r3, r3, #1028 ; 0x404 8003952: 65fb str r3, [r7, #92] ; 0x5c 8003954: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003958: b29a uxth r2, r3 800395a: 6dfb ldr r3, [r7, #92] ; 0x5c 800395c: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr0; 800395e: 463b mov r3, r7 8003960: 681b ldr r3, [r3, #0] 8003962: 891b ldrh r3, [r3, #8] 8003964: f8a7 310a strh.w r3, [r7, #266] ; 0x10a /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 8003968: 463b mov r3, r7 800396a: 681b ldr r3, [r3, #0] 800396c: 6959 ldr r1, [r3, #20] 800396e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003972: b29b uxth r3, r3 8003974: f8b7 210a ldrh.w r2, [r7, #266] ; 0x10a 8003978: 1d38 adds r0, r7, #4 800397a: 6800 ldr r0, [r0, #0] 800397c: f000 fec0 bl 8004700 8003980: e18f b.n 8003ca2 /* manage isochronous double buffer IN mode */ else { /* Write the data to the USB endpoint */ if ((PCD_GET_ENDPOINT(USBx, ep->num) & USB_EP_DTOG_TX) != 0U) 8003982: 1d3b adds r3, r7, #4 8003984: 681a ldr r2, [r3, #0] 8003986: 463b mov r3, r7 8003988: 681b ldr r3, [r3, #0] 800398a: 781b ldrb r3, [r3, #0] 800398c: 009b lsls r3, r3, #2 800398e: 4413 add r3, r2 8003990: 881b ldrh r3, [r3, #0] 8003992: b29b uxth r3, r3 8003994: f003 0340 and.w r3, r3, #64 ; 0x40 8003998: 2b00 cmp r3, #0 800399a: f000 808f beq.w 8003abc { /* Set the Double buffer counter for pmabuffer1 */ PCD_SET_EP_DBUF1_CNT(USBx, ep->num, ep->is_in, len); 800399e: 1d3b adds r3, r7, #4 80039a0: 681b ldr r3, [r3, #0] 80039a2: 67bb str r3, [r7, #120] ; 0x78 80039a4: 463b mov r3, r7 80039a6: 681b ldr r3, [r3, #0] 80039a8: 785b ldrb r3, [r3, #1] 80039aa: 2b00 cmp r3, #0 80039ac: d164 bne.n 8003a78 80039ae: 1d3b adds r3, r7, #4 80039b0: 681b ldr r3, [r3, #0] 80039b2: 673b str r3, [r7, #112] ; 0x70 80039b4: 1d3b adds r3, r7, #4 80039b6: 681b ldr r3, [r3, #0] 80039b8: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80039bc: b29b uxth r3, r3 80039be: 461a mov r2, r3 80039c0: 6f3b ldr r3, [r7, #112] ; 0x70 80039c2: 4413 add r3, r2 80039c4: 673b str r3, [r7, #112] ; 0x70 80039c6: 463b mov r3, r7 80039c8: 681b ldr r3, [r3, #0] 80039ca: 781b ldrb r3, [r3, #0] 80039cc: 011a lsls r2, r3, #4 80039ce: 6f3b ldr r3, [r7, #112] ; 0x70 80039d0: 4413 add r3, r2 80039d2: f203 430c addw r3, r3, #1036 ; 0x40c 80039d6: 66fb str r3, [r7, #108] ; 0x6c 80039d8: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80039dc: 2b00 cmp r3, #0 80039de: d112 bne.n 8003a06 80039e0: 6efb ldr r3, [r7, #108] ; 0x6c 80039e2: 881b ldrh r3, [r3, #0] 80039e4: b29b uxth r3, r3 80039e6: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 80039ea: b29a uxth r2, r3 80039ec: 6efb ldr r3, [r7, #108] ; 0x6c 80039ee: 801a strh r2, [r3, #0] 80039f0: 6efb ldr r3, [r7, #108] ; 0x6c 80039f2: 881b ldrh r3, [r3, #0] 80039f4: b29b uxth r3, r3 80039f6: ea6f 4343 mvn.w r3, r3, lsl #17 80039fa: ea6f 4353 mvn.w r3, r3, lsr #17 80039fe: b29a uxth r2, r3 8003a00: 6efb ldr r3, [r7, #108] ; 0x6c 8003a02: 801a strh r2, [r3, #0] 8003a04: e054 b.n 8003ab0 8003a06: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003a0a: 2b3e cmp r3, #62 ; 0x3e 8003a0c: d817 bhi.n 8003a3e 8003a0e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003a12: 085b lsrs r3, r3, #1 8003a14: f8c7 30f4 str.w r3, [r7, #244] ; 0xf4 8003a18: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003a1c: f003 0301 and.w r3, r3, #1 8003a20: 2b00 cmp r3, #0 8003a22: d004 beq.n 8003a2e 8003a24: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4 8003a28: 3301 adds r3, #1 8003a2a: f8c7 30f4 str.w r3, [r7, #244] ; 0xf4 8003a2e: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4 8003a32: b29b uxth r3, r3 8003a34: 029b lsls r3, r3, #10 8003a36: b29a uxth r2, r3 8003a38: 6efb ldr r3, [r7, #108] ; 0x6c 8003a3a: 801a strh r2, [r3, #0] 8003a3c: e038 b.n 8003ab0 8003a3e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003a42: 095b lsrs r3, r3, #5 8003a44: f8c7 30f4 str.w r3, [r7, #244] ; 0xf4 8003a48: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003a4c: f003 031f and.w r3, r3, #31 8003a50: 2b00 cmp r3, #0 8003a52: d104 bne.n 8003a5e 8003a54: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4 8003a58: 3b01 subs r3, #1 8003a5a: f8c7 30f4 str.w r3, [r7, #244] ; 0xf4 8003a5e: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4 8003a62: b29b uxth r3, r3 8003a64: 029b lsls r3, r3, #10 8003a66: b29b uxth r3, r3 8003a68: ea6f 4343 mvn.w r3, r3, lsl #17 8003a6c: ea6f 4353 mvn.w r3, r3, lsr #17 8003a70: b29a uxth r2, r3 8003a72: 6efb ldr r3, [r7, #108] ; 0x6c 8003a74: 801a strh r2, [r3, #0] 8003a76: e01b b.n 8003ab0 8003a78: 463b mov r3, r7 8003a7a: 681b ldr r3, [r3, #0] 8003a7c: 785b ldrb r3, [r3, #1] 8003a7e: 2b01 cmp r3, #1 8003a80: d116 bne.n 8003ab0 8003a82: 1d3b adds r3, r7, #4 8003a84: 681b ldr r3, [r3, #0] 8003a86: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003a8a: b29b uxth r3, r3 8003a8c: 461a mov r2, r3 8003a8e: 6fbb ldr r3, [r7, #120] ; 0x78 8003a90: 4413 add r3, r2 8003a92: 67bb str r3, [r7, #120] ; 0x78 8003a94: 463b mov r3, r7 8003a96: 681b ldr r3, [r3, #0] 8003a98: 781b ldrb r3, [r3, #0] 8003a9a: 011a lsls r2, r3, #4 8003a9c: 6fbb ldr r3, [r7, #120] ; 0x78 8003a9e: 4413 add r3, r2 8003aa0: f203 430c addw r3, r3, #1036 ; 0x40c 8003aa4: 677b str r3, [r7, #116] ; 0x74 8003aa6: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003aaa: b29a uxth r2, r3 8003aac: 6f7b ldr r3, [r7, #116] ; 0x74 8003aae: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr1; 8003ab0: 463b mov r3, r7 8003ab2: 681b ldr r3, [r3, #0] 8003ab4: 895b ldrh r3, [r3, #10] 8003ab6: f8a7 310a strh.w r3, [r7, #266] ; 0x10a 8003aba: e097 b.n 8003bec } else { /* Set the Double buffer counter for pmabuffer0 */ PCD_SET_EP_DBUF0_CNT(USBx, ep->num, ep->is_in, len); 8003abc: 463b mov r3, r7 8003abe: 681b ldr r3, [r3, #0] 8003ac0: 785b ldrb r3, [r3, #1] 8003ac2: 2b00 cmp r3, #0 8003ac4: d168 bne.n 8003b98 8003ac6: 1d3b adds r3, r7, #4 8003ac8: 681b ldr r3, [r3, #0] 8003aca: f8c7 3080 str.w r3, [r7, #128] ; 0x80 8003ace: 1d3b adds r3, r7, #4 8003ad0: 681b ldr r3, [r3, #0] 8003ad2: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003ad6: b29b uxth r3, r3 8003ad8: 461a mov r2, r3 8003ada: f8d7 3080 ldr.w r3, [r7, #128] ; 0x80 8003ade: 4413 add r3, r2 8003ae0: f8c7 3080 str.w r3, [r7, #128] ; 0x80 8003ae4: 463b mov r3, r7 8003ae6: 681b ldr r3, [r3, #0] 8003ae8: 781b ldrb r3, [r3, #0] 8003aea: 011a lsls r2, r3, #4 8003aec: f8d7 3080 ldr.w r3, [r7, #128] ; 0x80 8003af0: 4413 add r3, r2 8003af2: f203 4304 addw r3, r3, #1028 ; 0x404 8003af6: 67fb str r3, [r7, #124] ; 0x7c 8003af8: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003afc: 2b00 cmp r3, #0 8003afe: d112 bne.n 8003b26 8003b00: 6ffb ldr r3, [r7, #124] ; 0x7c 8003b02: 881b ldrh r3, [r3, #0] 8003b04: b29b uxth r3, r3 8003b06: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8003b0a: b29a uxth r2, r3 8003b0c: 6ffb ldr r3, [r7, #124] ; 0x7c 8003b0e: 801a strh r2, [r3, #0] 8003b10: 6ffb ldr r3, [r7, #124] ; 0x7c 8003b12: 881b ldrh r3, [r3, #0] 8003b14: b29b uxth r3, r3 8003b16: ea6f 4343 mvn.w r3, r3, lsl #17 8003b1a: ea6f 4353 mvn.w r3, r3, lsr #17 8003b1e: b29a uxth r2, r3 8003b20: 6ffb ldr r3, [r7, #124] ; 0x7c 8003b22: 801a strh r2, [r3, #0] 8003b24: e05d b.n 8003be2 8003b26: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003b2a: 2b3e cmp r3, #62 ; 0x3e 8003b2c: d817 bhi.n 8003b5e 8003b2e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003b32: 085b lsrs r3, r3, #1 8003b34: f8c7 30f0 str.w r3, [r7, #240] ; 0xf0 8003b38: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003b3c: f003 0301 and.w r3, r3, #1 8003b40: 2b00 cmp r3, #0 8003b42: d004 beq.n 8003b4e 8003b44: f8d7 30f0 ldr.w r3, [r7, #240] ; 0xf0 8003b48: 3301 adds r3, #1 8003b4a: f8c7 30f0 str.w r3, [r7, #240] ; 0xf0 8003b4e: f8d7 30f0 ldr.w r3, [r7, #240] ; 0xf0 8003b52: b29b uxth r3, r3 8003b54: 029b lsls r3, r3, #10 8003b56: b29a uxth r2, r3 8003b58: 6ffb ldr r3, [r7, #124] ; 0x7c 8003b5a: 801a strh r2, [r3, #0] 8003b5c: e041 b.n 8003be2 8003b5e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003b62: 095b lsrs r3, r3, #5 8003b64: f8c7 30f0 str.w r3, [r7, #240] ; 0xf0 8003b68: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003b6c: f003 031f and.w r3, r3, #31 8003b70: 2b00 cmp r3, #0 8003b72: d104 bne.n 8003b7e 8003b74: f8d7 30f0 ldr.w r3, [r7, #240] ; 0xf0 8003b78: 3b01 subs r3, #1 8003b7a: f8c7 30f0 str.w r3, [r7, #240] ; 0xf0 8003b7e: f8d7 30f0 ldr.w r3, [r7, #240] ; 0xf0 8003b82: b29b uxth r3, r3 8003b84: 029b lsls r3, r3, #10 8003b86: b29b uxth r3, r3 8003b88: ea6f 4343 mvn.w r3, r3, lsl #17 8003b8c: ea6f 4353 mvn.w r3, r3, lsr #17 8003b90: b29a uxth r2, r3 8003b92: 6ffb ldr r3, [r7, #124] ; 0x7c 8003b94: 801a strh r2, [r3, #0] 8003b96: e024 b.n 8003be2 8003b98: 463b mov r3, r7 8003b9a: 681b ldr r3, [r3, #0] 8003b9c: 785b ldrb r3, [r3, #1] 8003b9e: 2b01 cmp r3, #1 8003ba0: d11f bne.n 8003be2 8003ba2: 1d3b adds r3, r7, #4 8003ba4: 681b ldr r3, [r3, #0] 8003ba6: f8c7 3088 str.w r3, [r7, #136] ; 0x88 8003baa: 1d3b adds r3, r7, #4 8003bac: 681b ldr r3, [r3, #0] 8003bae: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003bb2: b29b uxth r3, r3 8003bb4: 461a mov r2, r3 8003bb6: f8d7 3088 ldr.w r3, [r7, #136] ; 0x88 8003bba: 4413 add r3, r2 8003bbc: f8c7 3088 str.w r3, [r7, #136] ; 0x88 8003bc0: 463b mov r3, r7 8003bc2: 681b ldr r3, [r3, #0] 8003bc4: 781b ldrb r3, [r3, #0] 8003bc6: 011a lsls r2, r3, #4 8003bc8: f8d7 3088 ldr.w r3, [r7, #136] ; 0x88 8003bcc: 4413 add r3, r2 8003bce: f203 4304 addw r3, r3, #1028 ; 0x404 8003bd2: f8c7 3084 str.w r3, [r7, #132] ; 0x84 8003bd6: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003bda: b29a uxth r2, r3 8003bdc: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84 8003be0: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr0; 8003be2: 463b mov r3, r7 8003be4: 681b ldr r3, [r3, #0] 8003be6: 891b ldrh r3, [r3, #8] 8003be8: f8a7 310a strh.w r3, [r7, #266] ; 0x10a } USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 8003bec: 463b mov r3, r7 8003bee: 681b ldr r3, [r3, #0] 8003bf0: 6959 ldr r1, [r3, #20] 8003bf2: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003bf6: b29b uxth r3, r3 8003bf8: f8b7 210a ldrh.w r2, [r7, #266] ; 0x10a 8003bfc: 1d38 adds r0, r7, #4 8003bfe: 6800 ldr r0, [r0, #0] 8003c00: f000 fd7e bl 8004700 PCD_FreeUserBuffer(USBx, ep->num, ep->is_in); 8003c04: 463b mov r3, r7 8003c06: 681b ldr r3, [r3, #0] 8003c08: 785b ldrb r3, [r3, #1] 8003c0a: 2b00 cmp r3, #0 8003c0c: d122 bne.n 8003c54 8003c0e: 1d3b adds r3, r7, #4 8003c10: 681a ldr r2, [r3, #0] 8003c12: 463b mov r3, r7 8003c14: 681b ldr r3, [r3, #0] 8003c16: 781b ldrb r3, [r3, #0] 8003c18: 009b lsls r3, r3, #2 8003c1a: 4413 add r3, r2 8003c1c: 881b ldrh r3, [r3, #0] 8003c1e: b29b uxth r3, r3 8003c20: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8003c24: f023 0370 bic.w r3, r3, #112 ; 0x70 8003c28: f8a7 3068 strh.w r3, [r7, #104] ; 0x68 8003c2c: 1d3b adds r3, r7, #4 8003c2e: 681a ldr r2, [r3, #0] 8003c30: 463b mov r3, r7 8003c32: 681b ldr r3, [r3, #0] 8003c34: 781b ldrb r3, [r3, #0] 8003c36: 009b lsls r3, r3, #2 8003c38: 441a add r2, r3 8003c3a: f8b7 3068 ldrh.w r3, [r7, #104] ; 0x68 8003c3e: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003c42: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003c46: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8003c4a: f043 03c0 orr.w r3, r3, #192 ; 0xc0 8003c4e: b29b uxth r3, r3 8003c50: 8013 strh r3, [r2, #0] 8003c52: e026 b.n 8003ca2 8003c54: 463b mov r3, r7 8003c56: 681b ldr r3, [r3, #0] 8003c58: 785b ldrb r3, [r3, #1] 8003c5a: 2b01 cmp r3, #1 8003c5c: d121 bne.n 8003ca2 8003c5e: 1d3b adds r3, r7, #4 8003c60: 681a ldr r2, [r3, #0] 8003c62: 463b mov r3, r7 8003c64: 681b ldr r3, [r3, #0] 8003c66: 781b ldrb r3, [r3, #0] 8003c68: 009b lsls r3, r3, #2 8003c6a: 4413 add r3, r2 8003c6c: 881b ldrh r3, [r3, #0] 8003c6e: b29b uxth r3, r3 8003c70: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8003c74: f023 0370 bic.w r3, r3, #112 ; 0x70 8003c78: f8a7 306a strh.w r3, [r7, #106] ; 0x6a 8003c7c: 1d3b adds r3, r7, #4 8003c7e: 681a ldr r2, [r3, #0] 8003c80: 463b mov r3, r7 8003c82: 681b ldr r3, [r3, #0] 8003c84: 781b ldrb r3, [r3, #0] 8003c86: 009b lsls r3, r3, #2 8003c88: 441a add r2, r3 8003c8a: f8b7 306a ldrh.w r3, [r7, #106] ; 0x6a 8003c8e: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003c92: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003c96: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8003c9a: f043 0380 orr.w r3, r3, #128 ; 0x80 8003c9e: b29b uxth r3, r3 8003ca0: 8013 strh r3, [r2, #0] } } PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_VALID); 8003ca2: 1d3b adds r3, r7, #4 8003ca4: 681a ldr r2, [r3, #0] 8003ca6: 463b mov r3, r7 8003ca8: 681b ldr r3, [r3, #0] 8003caa: 781b ldrb r3, [r3, #0] 8003cac: 009b lsls r3, r3, #2 8003cae: 4413 add r3, r2 8003cb0: 881b ldrh r3, [r3, #0] 8003cb2: b29b uxth r3, r3 8003cb4: f107 020e add.w r2, r7, #14 8003cb8: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8003cbc: f023 0340 bic.w r3, r3, #64 ; 0x40 8003cc0: 8013 strh r3, [r2, #0] 8003cc2: f107 030e add.w r3, r7, #14 8003cc6: f107 020e add.w r2, r7, #14 8003cca: 8812 ldrh r2, [r2, #0] 8003ccc: f082 0210 eor.w r2, r2, #16 8003cd0: 801a strh r2, [r3, #0] 8003cd2: f107 030e add.w r3, r7, #14 8003cd6: f107 020e add.w r2, r7, #14 8003cda: 8812 ldrh r2, [r2, #0] 8003cdc: f082 0220 eor.w r2, r2, #32 8003ce0: 801a strh r2, [r3, #0] 8003ce2: 1d3b adds r3, r7, #4 8003ce4: 681a ldr r2, [r3, #0] 8003ce6: 463b mov r3, r7 8003ce8: 681b ldr r3, [r3, #0] 8003cea: 781b ldrb r3, [r3, #0] 8003cec: 009b lsls r3, r3, #2 8003cee: 441a add r2, r3 8003cf0: f107 030e add.w r3, r7, #14 8003cf4: 881b ldrh r3, [r3, #0] 8003cf6: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003cfa: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003cfe: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8003d02: f043 0380 orr.w r3, r3, #128 ; 0x80 8003d06: b29b uxth r3, r3 8003d08: 8013 strh r3, [r2, #0] 8003d0a: e3b5 b.n 8004478 } else /* OUT endpoint */ { if (ep->doublebuffer == 0U) 8003d0c: 463b mov r3, r7 8003d0e: 681b ldr r3, [r3, #0] 8003d10: 7b1b ldrb r3, [r3, #12] 8003d12: 2b00 cmp r3, #0 8003d14: f040 8090 bne.w 8003e38 { /* Multi packet transfer */ if (ep->xfer_len > ep->maxpacket) 8003d18: 463b mov r3, r7 8003d1a: 681b ldr r3, [r3, #0] 8003d1c: 699a ldr r2, [r3, #24] 8003d1e: 463b mov r3, r7 8003d20: 681b ldr r3, [r3, #0] 8003d22: 691b ldr r3, [r3, #16] 8003d24: 429a cmp r2, r3 8003d26: d90e bls.n 8003d46 { len = ep->maxpacket; 8003d28: 463b mov r3, r7 8003d2a: 681b ldr r3, [r3, #0] 8003d2c: 691b ldr r3, [r3, #16] 8003d2e: f8c7 310c str.w r3, [r7, #268] ; 0x10c ep->xfer_len -= len; 8003d32: 463b mov r3, r7 8003d34: 681b ldr r3, [r3, #0] 8003d36: 699a ldr r2, [r3, #24] 8003d38: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003d3c: 1ad2 subs r2, r2, r3 8003d3e: 463b mov r3, r7 8003d40: 681b ldr r3, [r3, #0] 8003d42: 619a str r2, [r3, #24] 8003d44: e008 b.n 8003d58 } else { len = ep->xfer_len; 8003d46: 463b mov r3, r7 8003d48: 681b ldr r3, [r3, #0] 8003d4a: 699b ldr r3, [r3, #24] 8003d4c: f8c7 310c str.w r3, [r7, #268] ; 0x10c ep->xfer_len = 0U; 8003d50: 463b mov r3, r7 8003d52: 681b ldr r3, [r3, #0] 8003d54: 2200 movs r2, #0 8003d56: 619a str r2, [r3, #24] } /* configure and validate Rx endpoint */ PCD_SET_EP_RX_CNT(USBx, ep->num, len); 8003d58: 1d3b adds r3, r7, #4 8003d5a: 681b ldr r3, [r3, #0] 8003d5c: f8c7 3094 str.w r3, [r7, #148] ; 0x94 8003d60: 1d3b adds r3, r7, #4 8003d62: 681b ldr r3, [r3, #0] 8003d64: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003d68: b29b uxth r3, r3 8003d6a: 461a mov r2, r3 8003d6c: f8d7 3094 ldr.w r3, [r7, #148] ; 0x94 8003d70: 4413 add r3, r2 8003d72: f8c7 3094 str.w r3, [r7, #148] ; 0x94 8003d76: 463b mov r3, r7 8003d78: 681b ldr r3, [r3, #0] 8003d7a: 781b ldrb r3, [r3, #0] 8003d7c: 011a lsls r2, r3, #4 8003d7e: f8d7 3094 ldr.w r3, [r7, #148] ; 0x94 8003d82: 4413 add r3, r2 8003d84: f203 430c addw r3, r3, #1036 ; 0x40c 8003d88: f8c7 3090 str.w r3, [r7, #144] ; 0x90 8003d8c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003d90: 2b00 cmp r3, #0 8003d92: d116 bne.n 8003dc2 8003d94: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90 8003d98: 881b ldrh r3, [r3, #0] 8003d9a: b29b uxth r3, r3 8003d9c: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8003da0: b29a uxth r2, r3 8003da2: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90 8003da6: 801a strh r2, [r3, #0] 8003da8: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90 8003dac: 881b ldrh r3, [r3, #0] 8003dae: b29b uxth r3, r3 8003db0: ea6f 4343 mvn.w r3, r3, lsl #17 8003db4: ea6f 4353 mvn.w r3, r3, lsr #17 8003db8: b29a uxth r2, r3 8003dba: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90 8003dbe: 801a strh r2, [r3, #0] 8003dc0: e32c b.n 800441c 8003dc2: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003dc6: 2b3e cmp r3, #62 ; 0x3e 8003dc8: d818 bhi.n 8003dfc 8003dca: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003dce: 085b lsrs r3, r3, #1 8003dd0: f8c7 30ec str.w r3, [r7, #236] ; 0xec 8003dd4: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003dd8: f003 0301 and.w r3, r3, #1 8003ddc: 2b00 cmp r3, #0 8003dde: d004 beq.n 8003dea 8003de0: f8d7 30ec ldr.w r3, [r7, #236] ; 0xec 8003de4: 3301 adds r3, #1 8003de6: f8c7 30ec str.w r3, [r7, #236] ; 0xec 8003dea: f8d7 30ec ldr.w r3, [r7, #236] ; 0xec 8003dee: b29b uxth r3, r3 8003df0: 029b lsls r3, r3, #10 8003df2: b29a uxth r2, r3 8003df4: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90 8003df8: 801a strh r2, [r3, #0] 8003dfa: e30f b.n 800441c 8003dfc: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003e00: 095b lsrs r3, r3, #5 8003e02: f8c7 30ec str.w r3, [r7, #236] ; 0xec 8003e06: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8003e0a: f003 031f and.w r3, r3, #31 8003e0e: 2b00 cmp r3, #0 8003e10: d104 bne.n 8003e1c 8003e12: f8d7 30ec ldr.w r3, [r7, #236] ; 0xec 8003e16: 3b01 subs r3, #1 8003e18: f8c7 30ec str.w r3, [r7, #236] ; 0xec 8003e1c: f8d7 30ec ldr.w r3, [r7, #236] ; 0xec 8003e20: b29b uxth r3, r3 8003e22: 029b lsls r3, r3, #10 8003e24: b29b uxth r3, r3 8003e26: ea6f 4343 mvn.w r3, r3, lsl #17 8003e2a: ea6f 4353 mvn.w r3, r3, lsr #17 8003e2e: b29a uxth r2, r3 8003e30: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90 8003e34: 801a strh r2, [r3, #0] 8003e36: e2f1 b.n 800441c } else { /* First Transfer Coming From HAL_PCD_EP_Receive & From ISR */ /* Set the Double buffer counter */ if (ep->type == EP_TYPE_BULK) 8003e38: 463b mov r3, r7 8003e3a: 681b ldr r3, [r3, #0] 8003e3c: 78db ldrb r3, [r3, #3] 8003e3e: 2b02 cmp r3, #2 8003e40: f040 818f bne.w 8004162 { PCD_SET_EP_DBUF_CNT(USBx, ep->num, ep->is_in, ep->maxpacket); 8003e44: 463b mov r3, r7 8003e46: 681b ldr r3, [r3, #0] 8003e48: 785b ldrb r3, [r3, #1] 8003e4a: 2b00 cmp r3, #0 8003e4c: d175 bne.n 8003f3a 8003e4e: 1d3b adds r3, r7, #4 8003e50: 681b ldr r3, [r3, #0] 8003e52: f8c7 30b0 str.w r3, [r7, #176] ; 0xb0 8003e56: 1d3b adds r3, r7, #4 8003e58: 681b ldr r3, [r3, #0] 8003e5a: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003e5e: b29b uxth r3, r3 8003e60: 461a mov r2, r3 8003e62: f8d7 30b0 ldr.w r3, [r7, #176] ; 0xb0 8003e66: 4413 add r3, r2 8003e68: f8c7 30b0 str.w r3, [r7, #176] ; 0xb0 8003e6c: 463b mov r3, r7 8003e6e: 681b ldr r3, [r3, #0] 8003e70: 781b ldrb r3, [r3, #0] 8003e72: 011a lsls r2, r3, #4 8003e74: f8d7 30b0 ldr.w r3, [r7, #176] ; 0xb0 8003e78: 4413 add r3, r2 8003e7a: f203 4304 addw r3, r3, #1028 ; 0x404 8003e7e: f8c7 30ac str.w r3, [r7, #172] ; 0xac 8003e82: 463b mov r3, r7 8003e84: 681b ldr r3, [r3, #0] 8003e86: 691b ldr r3, [r3, #16] 8003e88: 2b00 cmp r3, #0 8003e8a: d116 bne.n 8003eba 8003e8c: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac 8003e90: 881b ldrh r3, [r3, #0] 8003e92: b29b uxth r3, r3 8003e94: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8003e98: b29a uxth r2, r3 8003e9a: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac 8003e9e: 801a strh r2, [r3, #0] 8003ea0: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac 8003ea4: 881b ldrh r3, [r3, #0] 8003ea6: b29b uxth r3, r3 8003ea8: ea6f 4343 mvn.w r3, r3, lsl #17 8003eac: ea6f 4353 mvn.w r3, r3, lsr #17 8003eb0: b29a uxth r2, r3 8003eb2: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac 8003eb6: 801a strh r2, [r3, #0] 8003eb8: e065 b.n 8003f86 8003eba: 463b mov r3, r7 8003ebc: 681b ldr r3, [r3, #0] 8003ebe: 691b ldr r3, [r3, #16] 8003ec0: 2b3e cmp r3, #62 ; 0x3e 8003ec2: d81a bhi.n 8003efa 8003ec4: 463b mov r3, r7 8003ec6: 681b ldr r3, [r3, #0] 8003ec8: 691b ldr r3, [r3, #16] 8003eca: 085b lsrs r3, r3, #1 8003ecc: f8c7 30e8 str.w r3, [r7, #232] ; 0xe8 8003ed0: 463b mov r3, r7 8003ed2: 681b ldr r3, [r3, #0] 8003ed4: 691b ldr r3, [r3, #16] 8003ed6: f003 0301 and.w r3, r3, #1 8003eda: 2b00 cmp r3, #0 8003edc: d004 beq.n 8003ee8 8003ede: f8d7 30e8 ldr.w r3, [r7, #232] ; 0xe8 8003ee2: 3301 adds r3, #1 8003ee4: f8c7 30e8 str.w r3, [r7, #232] ; 0xe8 8003ee8: f8d7 30e8 ldr.w r3, [r7, #232] ; 0xe8 8003eec: b29b uxth r3, r3 8003eee: 029b lsls r3, r3, #10 8003ef0: b29a uxth r2, r3 8003ef2: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac 8003ef6: 801a strh r2, [r3, #0] 8003ef8: e045 b.n 8003f86 8003efa: 463b mov r3, r7 8003efc: 681b ldr r3, [r3, #0] 8003efe: 691b ldr r3, [r3, #16] 8003f00: 095b lsrs r3, r3, #5 8003f02: f8c7 30e8 str.w r3, [r7, #232] ; 0xe8 8003f06: 463b mov r3, r7 8003f08: 681b ldr r3, [r3, #0] 8003f0a: 691b ldr r3, [r3, #16] 8003f0c: f003 031f and.w r3, r3, #31 8003f10: 2b00 cmp r3, #0 8003f12: d104 bne.n 8003f1e 8003f14: f8d7 30e8 ldr.w r3, [r7, #232] ; 0xe8 8003f18: 3b01 subs r3, #1 8003f1a: f8c7 30e8 str.w r3, [r7, #232] ; 0xe8 8003f1e: f8d7 30e8 ldr.w r3, [r7, #232] ; 0xe8 8003f22: b29b uxth r3, r3 8003f24: 029b lsls r3, r3, #10 8003f26: b29b uxth r3, r3 8003f28: ea6f 4343 mvn.w r3, r3, lsl #17 8003f2c: ea6f 4353 mvn.w r3, r3, lsr #17 8003f30: b29a uxth r2, r3 8003f32: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac 8003f36: 801a strh r2, [r3, #0] 8003f38: e025 b.n 8003f86 8003f3a: 463b mov r3, r7 8003f3c: 681b ldr r3, [r3, #0] 8003f3e: 785b ldrb r3, [r3, #1] 8003f40: 2b01 cmp r3, #1 8003f42: d120 bne.n 8003f86 8003f44: 1d3b adds r3, r7, #4 8003f46: 681b ldr r3, [r3, #0] 8003f48: f8c7 30b8 str.w r3, [r7, #184] ; 0xb8 8003f4c: 1d3b adds r3, r7, #4 8003f4e: 681b ldr r3, [r3, #0] 8003f50: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003f54: b29b uxth r3, r3 8003f56: 461a mov r2, r3 8003f58: f8d7 30b8 ldr.w r3, [r7, #184] ; 0xb8 8003f5c: 4413 add r3, r2 8003f5e: f8c7 30b8 str.w r3, [r7, #184] ; 0xb8 8003f62: 463b mov r3, r7 8003f64: 681b ldr r3, [r3, #0] 8003f66: 781b ldrb r3, [r3, #0] 8003f68: 011a lsls r2, r3, #4 8003f6a: f8d7 30b8 ldr.w r3, [r7, #184] ; 0xb8 8003f6e: 4413 add r3, r2 8003f70: f203 4304 addw r3, r3, #1028 ; 0x404 8003f74: f8c7 30b4 str.w r3, [r7, #180] ; 0xb4 8003f78: 463b mov r3, r7 8003f7a: 681b ldr r3, [r3, #0] 8003f7c: 691b ldr r3, [r3, #16] 8003f7e: b29a uxth r2, r3 8003f80: f8d7 30b4 ldr.w r3, [r7, #180] ; 0xb4 8003f84: 801a strh r2, [r3, #0] 8003f86: 1d3b adds r3, r7, #4 8003f88: 681b ldr r3, [r3, #0] 8003f8a: f8c7 30a8 str.w r3, [r7, #168] ; 0xa8 8003f8e: 463b mov r3, r7 8003f90: 681b ldr r3, [r3, #0] 8003f92: 785b ldrb r3, [r3, #1] 8003f94: 2b00 cmp r3, #0 8003f96: d175 bne.n 8004084 8003f98: 1d3b adds r3, r7, #4 8003f9a: 681b ldr r3, [r3, #0] 8003f9c: f8c7 30a0 str.w r3, [r7, #160] ; 0xa0 8003fa0: 1d3b adds r3, r7, #4 8003fa2: 681b ldr r3, [r3, #0] 8003fa4: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003fa8: b29b uxth r3, r3 8003faa: 461a mov r2, r3 8003fac: f8d7 30a0 ldr.w r3, [r7, #160] ; 0xa0 8003fb0: 4413 add r3, r2 8003fb2: f8c7 30a0 str.w r3, [r7, #160] ; 0xa0 8003fb6: 463b mov r3, r7 8003fb8: 681b ldr r3, [r3, #0] 8003fba: 781b ldrb r3, [r3, #0] 8003fbc: 011a lsls r2, r3, #4 8003fbe: f8d7 30a0 ldr.w r3, [r7, #160] ; 0xa0 8003fc2: 4413 add r3, r2 8003fc4: f203 430c addw r3, r3, #1036 ; 0x40c 8003fc8: f8c7 309c str.w r3, [r7, #156] ; 0x9c 8003fcc: 463b mov r3, r7 8003fce: 681b ldr r3, [r3, #0] 8003fd0: 691b ldr r3, [r3, #16] 8003fd2: 2b00 cmp r3, #0 8003fd4: d116 bne.n 8004004 8003fd6: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c 8003fda: 881b ldrh r3, [r3, #0] 8003fdc: b29b uxth r3, r3 8003fde: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8003fe2: b29a uxth r2, r3 8003fe4: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c 8003fe8: 801a strh r2, [r3, #0] 8003fea: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c 8003fee: 881b ldrh r3, [r3, #0] 8003ff0: b29b uxth r3, r3 8003ff2: ea6f 4343 mvn.w r3, r3, lsl #17 8003ff6: ea6f 4353 mvn.w r3, r3, lsr #17 8003ffa: b29a uxth r2, r3 8003ffc: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c 8004000: 801a strh r2, [r3, #0] 8004002: e061 b.n 80040c8 8004004: 463b mov r3, r7 8004006: 681b ldr r3, [r3, #0] 8004008: 691b ldr r3, [r3, #16] 800400a: 2b3e cmp r3, #62 ; 0x3e 800400c: d81a bhi.n 8004044 800400e: 463b mov r3, r7 8004010: 681b ldr r3, [r3, #0] 8004012: 691b ldr r3, [r3, #16] 8004014: 085b lsrs r3, r3, #1 8004016: f8c7 30e4 str.w r3, [r7, #228] ; 0xe4 800401a: 463b mov r3, r7 800401c: 681b ldr r3, [r3, #0] 800401e: 691b ldr r3, [r3, #16] 8004020: f003 0301 and.w r3, r3, #1 8004024: 2b00 cmp r3, #0 8004026: d004 beq.n 8004032 8004028: f8d7 30e4 ldr.w r3, [r7, #228] ; 0xe4 800402c: 3301 adds r3, #1 800402e: f8c7 30e4 str.w r3, [r7, #228] ; 0xe4 8004032: f8d7 30e4 ldr.w r3, [r7, #228] ; 0xe4 8004036: b29b uxth r3, r3 8004038: 029b lsls r3, r3, #10 800403a: b29a uxth r2, r3 800403c: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c 8004040: 801a strh r2, [r3, #0] 8004042: e041 b.n 80040c8 8004044: 463b mov r3, r7 8004046: 681b ldr r3, [r3, #0] 8004048: 691b ldr r3, [r3, #16] 800404a: 095b lsrs r3, r3, #5 800404c: f8c7 30e4 str.w r3, [r7, #228] ; 0xe4 8004050: 463b mov r3, r7 8004052: 681b ldr r3, [r3, #0] 8004054: 691b ldr r3, [r3, #16] 8004056: f003 031f and.w r3, r3, #31 800405a: 2b00 cmp r3, #0 800405c: d104 bne.n 8004068 800405e: f8d7 30e4 ldr.w r3, [r7, #228] ; 0xe4 8004062: 3b01 subs r3, #1 8004064: f8c7 30e4 str.w r3, [r7, #228] ; 0xe4 8004068: f8d7 30e4 ldr.w r3, [r7, #228] ; 0xe4 800406c: b29b uxth r3, r3 800406e: 029b lsls r3, r3, #10 8004070: b29b uxth r3, r3 8004072: ea6f 4343 mvn.w r3, r3, lsl #17 8004076: ea6f 4353 mvn.w r3, r3, lsr #17 800407a: b29a uxth r2, r3 800407c: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c 8004080: 801a strh r2, [r3, #0] 8004082: e021 b.n 80040c8 8004084: 463b mov r3, r7 8004086: 681b ldr r3, [r3, #0] 8004088: 785b ldrb r3, [r3, #1] 800408a: 2b01 cmp r3, #1 800408c: d11c bne.n 80040c8 800408e: 1d3b adds r3, r7, #4 8004090: 681b ldr r3, [r3, #0] 8004092: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8004096: b29b uxth r3, r3 8004098: 461a mov r2, r3 800409a: f8d7 30a8 ldr.w r3, [r7, #168] ; 0xa8 800409e: 4413 add r3, r2 80040a0: f8c7 30a8 str.w r3, [r7, #168] ; 0xa8 80040a4: 463b mov r3, r7 80040a6: 681b ldr r3, [r3, #0] 80040a8: 781b ldrb r3, [r3, #0] 80040aa: 011a lsls r2, r3, #4 80040ac: f8d7 30a8 ldr.w r3, [r7, #168] ; 0xa8 80040b0: 4413 add r3, r2 80040b2: f203 430c addw r3, r3, #1036 ; 0x40c 80040b6: f8c7 30a4 str.w r3, [r7, #164] ; 0xa4 80040ba: 463b mov r3, r7 80040bc: 681b ldr r3, [r3, #0] 80040be: 691b ldr r3, [r3, #16] 80040c0: b29a uxth r2, r3 80040c2: f8d7 30a4 ldr.w r3, [r7, #164] ; 0xa4 80040c6: 801a strh r2, [r3, #0] /* Coming from ISR */ if (ep->xfer_count != 0U) 80040c8: 463b mov r3, r7 80040ca: 681b ldr r3, [r3, #0] 80040cc: 69db ldr r3, [r3, #28] 80040ce: 2b00 cmp r3, #0 80040d0: f000 81a4 beq.w 800441c { /* update last value to check if there is blocking state */ wEPVal = PCD_GET_ENDPOINT(USBx, ep->num); 80040d4: 1d3b adds r3, r7, #4 80040d6: 681a ldr r2, [r3, #0] 80040d8: 463b mov r3, r7 80040da: 681b ldr r3, [r3, #0] 80040dc: 781b ldrb r3, [r3, #0] 80040de: 009b lsls r3, r3, #2 80040e0: 4413 add r3, r2 80040e2: 881b ldrh r3, [r3, #0] 80040e4: f8a7 309a strh.w r3, [r7, #154] ; 0x9a /*Blocking State */ if ((((wEPVal & USB_EP_DTOG_RX) != 0U) && ((wEPVal & USB_EP_DTOG_TX) != 0U)) || 80040e8: f8b7 309a ldrh.w r3, [r7, #154] ; 0x9a 80040ec: f403 4380 and.w r3, r3, #16384 ; 0x4000 80040f0: 2b00 cmp r3, #0 80040f2: d005 beq.n 8004100 80040f4: f8b7 309a ldrh.w r3, [r7, #154] ; 0x9a 80040f8: f003 0340 and.w r3, r3, #64 ; 0x40 80040fc: 2b00 cmp r3, #0 80040fe: d10d bne.n 800411c (((wEPVal & USB_EP_DTOG_RX) == 0U) && ((wEPVal & USB_EP_DTOG_TX) == 0U))) 8004100: f8b7 309a ldrh.w r3, [r7, #154] ; 0x9a 8004104: f403 4380 and.w r3, r3, #16384 ; 0x4000 if ((((wEPVal & USB_EP_DTOG_RX) != 0U) && ((wEPVal & USB_EP_DTOG_TX) != 0U)) || 8004108: 2b00 cmp r3, #0 800410a: f040 8187 bne.w 800441c (((wEPVal & USB_EP_DTOG_RX) == 0U) && ((wEPVal & USB_EP_DTOG_TX) == 0U))) 800410e: f8b7 309a ldrh.w r3, [r7, #154] ; 0x9a 8004112: f003 0340 and.w r3, r3, #64 ; 0x40 8004116: 2b00 cmp r3, #0 8004118: f040 8180 bne.w 800441c { PCD_FreeUserBuffer(USBx, ep->num, 0U); 800411c: 1d3b adds r3, r7, #4 800411e: 681a ldr r2, [r3, #0] 8004120: 463b mov r3, r7 8004122: 681b ldr r3, [r3, #0] 8004124: 781b ldrb r3, [r3, #0] 8004126: 009b lsls r3, r3, #2 8004128: 4413 add r3, r2 800412a: 881b ldrh r3, [r3, #0] 800412c: b29b uxth r3, r3 800412e: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8004132: f023 0370 bic.w r3, r3, #112 ; 0x70 8004136: f8a7 3098 strh.w r3, [r7, #152] ; 0x98 800413a: 1d3b adds r3, r7, #4 800413c: 681a ldr r2, [r3, #0] 800413e: 463b mov r3, r7 8004140: 681b ldr r3, [r3, #0] 8004142: 781b ldrb r3, [r3, #0] 8004144: 009b lsls r3, r3, #2 8004146: 441a add r2, r3 8004148: f8b7 3098 ldrh.w r3, [r7, #152] ; 0x98 800414c: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8004150: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8004154: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8004158: f043 03c0 orr.w r3, r3, #192 ; 0xc0 800415c: b29b uxth r3, r3 800415e: 8013 strh r3, [r2, #0] 8004160: e15c b.n 800441c } } } /* iso out double */ else if (ep->type == EP_TYPE_ISOC) 8004162: 463b mov r3, r7 8004164: 681b ldr r3, [r3, #0] 8004166: 78db ldrb r3, [r3, #3] 8004168: 2b01 cmp r3, #1 800416a: f040 8155 bne.w 8004418 { /* Multi packet transfer */ if (ep->xfer_len > ep->maxpacket) 800416e: 463b mov r3, r7 8004170: 681b ldr r3, [r3, #0] 8004172: 699a ldr r2, [r3, #24] 8004174: 463b mov r3, r7 8004176: 681b ldr r3, [r3, #0] 8004178: 691b ldr r3, [r3, #16] 800417a: 429a cmp r2, r3 800417c: d90e bls.n 800419c { len = ep->maxpacket; 800417e: 463b mov r3, r7 8004180: 681b ldr r3, [r3, #0] 8004182: 691b ldr r3, [r3, #16] 8004184: f8c7 310c str.w r3, [r7, #268] ; 0x10c ep->xfer_len -= len; 8004188: 463b mov r3, r7 800418a: 681b ldr r3, [r3, #0] 800418c: 699a ldr r2, [r3, #24] 800418e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8004192: 1ad2 subs r2, r2, r3 8004194: 463b mov r3, r7 8004196: 681b ldr r3, [r3, #0] 8004198: 619a str r2, [r3, #24] 800419a: e008 b.n 80041ae } else { len = ep->xfer_len; 800419c: 463b mov r3, r7 800419e: 681b ldr r3, [r3, #0] 80041a0: 699b ldr r3, [r3, #24] 80041a2: f8c7 310c str.w r3, [r7, #268] ; 0x10c ep->xfer_len = 0U; 80041a6: 463b mov r3, r7 80041a8: 681b ldr r3, [r3, #0] 80041aa: 2200 movs r2, #0 80041ac: 619a str r2, [r3, #24] } PCD_SET_EP_DBUF_CNT(USBx, ep->num, ep->is_in, len); 80041ae: 463b mov r3, r7 80041b0: 681b ldr r3, [r3, #0] 80041b2: 785b ldrb r3, [r3, #1] 80041b4: 2b00 cmp r3, #0 80041b6: d16f bne.n 8004298 80041b8: 1d3b adds r3, r7, #4 80041ba: 681b ldr r3, [r3, #0] 80041bc: f8c7 30d0 str.w r3, [r7, #208] ; 0xd0 80041c0: 1d3b adds r3, r7, #4 80041c2: 681b ldr r3, [r3, #0] 80041c4: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80041c8: b29b uxth r3, r3 80041ca: 461a mov r2, r3 80041cc: f8d7 30d0 ldr.w r3, [r7, #208] ; 0xd0 80041d0: 4413 add r3, r2 80041d2: f8c7 30d0 str.w r3, [r7, #208] ; 0xd0 80041d6: 463b mov r3, r7 80041d8: 681b ldr r3, [r3, #0] 80041da: 781b ldrb r3, [r3, #0] 80041dc: 011a lsls r2, r3, #4 80041de: f8d7 30d0 ldr.w r3, [r7, #208] ; 0xd0 80041e2: 4413 add r3, r2 80041e4: f203 4304 addw r3, r3, #1028 ; 0x404 80041e8: f8c7 30cc str.w r3, [r7, #204] ; 0xcc 80041ec: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80041f0: 2b00 cmp r3, #0 80041f2: d116 bne.n 8004222 80041f4: f8d7 30cc ldr.w r3, [r7, #204] ; 0xcc 80041f8: 881b ldrh r3, [r3, #0] 80041fa: b29b uxth r3, r3 80041fc: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8004200: b29a uxth r2, r3 8004202: f8d7 30cc ldr.w r3, [r7, #204] ; 0xcc 8004206: 801a strh r2, [r3, #0] 8004208: f8d7 30cc ldr.w r3, [r7, #204] ; 0xcc 800420c: 881b ldrh r3, [r3, #0] 800420e: b29b uxth r3, r3 8004210: ea6f 4343 mvn.w r3, r3, lsl #17 8004214: ea6f 4353 mvn.w r3, r3, lsr #17 8004218: b29a uxth r2, r3 800421a: f8d7 30cc ldr.w r3, [r7, #204] ; 0xcc 800421e: 801a strh r2, [r3, #0] 8004220: e05f b.n 80042e2 8004222: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8004226: 2b3e cmp r3, #62 ; 0x3e 8004228: d818 bhi.n 800425c 800422a: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800422e: 085b lsrs r3, r3, #1 8004230: f8c7 30e0 str.w r3, [r7, #224] ; 0xe0 8004234: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8004238: f003 0301 and.w r3, r3, #1 800423c: 2b00 cmp r3, #0 800423e: d004 beq.n 800424a 8004240: f8d7 30e0 ldr.w r3, [r7, #224] ; 0xe0 8004244: 3301 adds r3, #1 8004246: f8c7 30e0 str.w r3, [r7, #224] ; 0xe0 800424a: f8d7 30e0 ldr.w r3, [r7, #224] ; 0xe0 800424e: b29b uxth r3, r3 8004250: 029b lsls r3, r3, #10 8004252: b29a uxth r2, r3 8004254: f8d7 30cc ldr.w r3, [r7, #204] ; 0xcc 8004258: 801a strh r2, [r3, #0] 800425a: e042 b.n 80042e2 800425c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8004260: 095b lsrs r3, r3, #5 8004262: f8c7 30e0 str.w r3, [r7, #224] ; 0xe0 8004266: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800426a: f003 031f and.w r3, r3, #31 800426e: 2b00 cmp r3, #0 8004270: d104 bne.n 800427c 8004272: f8d7 30e0 ldr.w r3, [r7, #224] ; 0xe0 8004276: 3b01 subs r3, #1 8004278: f8c7 30e0 str.w r3, [r7, #224] ; 0xe0 800427c: f8d7 30e0 ldr.w r3, [r7, #224] ; 0xe0 8004280: b29b uxth r3, r3 8004282: 029b lsls r3, r3, #10 8004284: b29b uxth r3, r3 8004286: ea6f 4343 mvn.w r3, r3, lsl #17 800428a: ea6f 4353 mvn.w r3, r3, lsr #17 800428e: b29a uxth r2, r3 8004290: f8d7 30cc ldr.w r3, [r7, #204] ; 0xcc 8004294: 801a strh r2, [r3, #0] 8004296: e024 b.n 80042e2 8004298: 463b mov r3, r7 800429a: 681b ldr r3, [r3, #0] 800429c: 785b ldrb r3, [r3, #1] 800429e: 2b01 cmp r3, #1 80042a0: d11f bne.n 80042e2 80042a2: 1d3b adds r3, r7, #4 80042a4: 681b ldr r3, [r3, #0] 80042a6: f8c7 30d8 str.w r3, [r7, #216] ; 0xd8 80042aa: 1d3b adds r3, r7, #4 80042ac: 681b ldr r3, [r3, #0] 80042ae: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80042b2: b29b uxth r3, r3 80042b4: 461a mov r2, r3 80042b6: f8d7 30d8 ldr.w r3, [r7, #216] ; 0xd8 80042ba: 4413 add r3, r2 80042bc: f8c7 30d8 str.w r3, [r7, #216] ; 0xd8 80042c0: 463b mov r3, r7 80042c2: 681b ldr r3, [r3, #0] 80042c4: 781b ldrb r3, [r3, #0] 80042c6: 011a lsls r2, r3, #4 80042c8: f8d7 30d8 ldr.w r3, [r7, #216] ; 0xd8 80042cc: 4413 add r3, r2 80042ce: f203 4304 addw r3, r3, #1028 ; 0x404 80042d2: f8c7 30d4 str.w r3, [r7, #212] ; 0xd4 80042d6: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80042da: b29a uxth r2, r3 80042dc: f8d7 30d4 ldr.w r3, [r7, #212] ; 0xd4 80042e0: 801a strh r2, [r3, #0] 80042e2: 1d3b adds r3, r7, #4 80042e4: 681b ldr r3, [r3, #0] 80042e6: f8c7 30c8 str.w r3, [r7, #200] ; 0xc8 80042ea: 463b mov r3, r7 80042ec: 681b ldr r3, [r3, #0] 80042ee: 785b ldrb r3, [r3, #1] 80042f0: 2b00 cmp r3, #0 80042f2: d16f bne.n 80043d4 80042f4: 1d3b adds r3, r7, #4 80042f6: 681b ldr r3, [r3, #0] 80042f8: f8c7 30c0 str.w r3, [r7, #192] ; 0xc0 80042fc: 1d3b adds r3, r7, #4 80042fe: 681b ldr r3, [r3, #0] 8004300: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8004304: b29b uxth r3, r3 8004306: 461a mov r2, r3 8004308: f8d7 30c0 ldr.w r3, [r7, #192] ; 0xc0 800430c: 4413 add r3, r2 800430e: f8c7 30c0 str.w r3, [r7, #192] ; 0xc0 8004312: 463b mov r3, r7 8004314: 681b ldr r3, [r3, #0] 8004316: 781b ldrb r3, [r3, #0] 8004318: 011a lsls r2, r3, #4 800431a: f8d7 30c0 ldr.w r3, [r7, #192] ; 0xc0 800431e: 4413 add r3, r2 8004320: f203 430c addw r3, r3, #1036 ; 0x40c 8004324: f8c7 30bc str.w r3, [r7, #188] ; 0xbc 8004328: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800432c: 2b00 cmp r3, #0 800432e: d116 bne.n 800435e 8004330: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc 8004334: 881b ldrh r3, [r3, #0] 8004336: b29b uxth r3, r3 8004338: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 800433c: b29a uxth r2, r3 800433e: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc 8004342: 801a strh r2, [r3, #0] 8004344: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc 8004348: 881b ldrh r3, [r3, #0] 800434a: b29b uxth r3, r3 800434c: ea6f 4343 mvn.w r3, r3, lsl #17 8004350: ea6f 4353 mvn.w r3, r3, lsr #17 8004354: b29a uxth r2, r3 8004356: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc 800435a: 801a strh r2, [r3, #0] 800435c: e05e b.n 800441c 800435e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8004362: 2b3e cmp r3, #62 ; 0x3e 8004364: d818 bhi.n 8004398 8004366: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800436a: 085b lsrs r3, r3, #1 800436c: f8c7 30dc str.w r3, [r7, #220] ; 0xdc 8004370: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8004374: f003 0301 and.w r3, r3, #1 8004378: 2b00 cmp r3, #0 800437a: d004 beq.n 8004386 800437c: f8d7 30dc ldr.w r3, [r7, #220] ; 0xdc 8004380: 3301 adds r3, #1 8004382: f8c7 30dc str.w r3, [r7, #220] ; 0xdc 8004386: f8d7 30dc ldr.w r3, [r7, #220] ; 0xdc 800438a: b29b uxth r3, r3 800438c: 029b lsls r3, r3, #10 800438e: b29a uxth r2, r3 8004390: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc 8004394: 801a strh r2, [r3, #0] 8004396: e041 b.n 800441c 8004398: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800439c: 095b lsrs r3, r3, #5 800439e: f8c7 30dc str.w r3, [r7, #220] ; 0xdc 80043a2: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 80043a6: f003 031f and.w r3, r3, #31 80043aa: 2b00 cmp r3, #0 80043ac: d104 bne.n 80043b8 80043ae: f8d7 30dc ldr.w r3, [r7, #220] ; 0xdc 80043b2: 3b01 subs r3, #1 80043b4: f8c7 30dc str.w r3, [r7, #220] ; 0xdc 80043b8: f8d7 30dc ldr.w r3, [r7, #220] ; 0xdc 80043bc: b29b uxth r3, r3 80043be: 029b lsls r3, r3, #10 80043c0: b29b uxth r3, r3 80043c2: ea6f 4343 mvn.w r3, r3, lsl #17 80043c6: ea6f 4353 mvn.w r3, r3, lsr #17 80043ca: b29a uxth r2, r3 80043cc: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc 80043d0: 801a strh r2, [r3, #0] 80043d2: e023 b.n 800441c 80043d4: 463b mov r3, r7 80043d6: 681b ldr r3, [r3, #0] 80043d8: 785b ldrb r3, [r3, #1] 80043da: 2b01 cmp r3, #1 80043dc: d11e bne.n 800441c 80043de: 1d3b adds r3, r7, #4 80043e0: 681b ldr r3, [r3, #0] 80043e2: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80043e6: b29b uxth r3, r3 80043e8: 461a mov r2, r3 80043ea: f8d7 30c8 ldr.w r3, [r7, #200] ; 0xc8 80043ee: 4413 add r3, r2 80043f0: f8c7 30c8 str.w r3, [r7, #200] ; 0xc8 80043f4: 463b mov r3, r7 80043f6: 681b ldr r3, [r3, #0] 80043f8: 781b ldrb r3, [r3, #0] 80043fa: 011a lsls r2, r3, #4 80043fc: f8d7 30c8 ldr.w r3, [r7, #200] ; 0xc8 8004400: 4413 add r3, r2 8004402: f203 430c addw r3, r3, #1036 ; 0x40c 8004406: f8c7 30c4 str.w r3, [r7, #196] ; 0xc4 800440a: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 800440e: b29a uxth r2, r3 8004410: f8d7 30c4 ldr.w r3, [r7, #196] ; 0xc4 8004414: 801a strh r2, [r3, #0] 8004416: e001 b.n 800441c } else { return HAL_ERROR; 8004418: 2301 movs r3, #1 800441a: e02e b.n 800447a } } PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID); 800441c: 1d3b adds r3, r7, #4 800441e: 681a ldr r2, [r3, #0] 8004420: 463b mov r3, r7 8004422: 681b ldr r3, [r3, #0] 8004424: 781b ldrb r3, [r3, #0] 8004426: 009b lsls r3, r3, #2 8004428: 4413 add r3, r2 800442a: 881b ldrh r3, [r3, #0] 800442c: b29b uxth r3, r3 800442e: f423 4380 bic.w r3, r3, #16384 ; 0x4000 8004432: f023 0370 bic.w r3, r3, #112 ; 0x70 8004436: f8a7 308e strh.w r3, [r7, #142] ; 0x8e 800443a: f8b7 308e ldrh.w r3, [r7, #142] ; 0x8e 800443e: f483 5380 eor.w r3, r3, #4096 ; 0x1000 8004442: f8a7 308e strh.w r3, [r7, #142] ; 0x8e 8004446: f8b7 308e ldrh.w r3, [r7, #142] ; 0x8e 800444a: f483 5300 eor.w r3, r3, #8192 ; 0x2000 800444e: f8a7 308e strh.w r3, [r7, #142] ; 0x8e 8004452: 1d3b adds r3, r7, #4 8004454: 681a ldr r2, [r3, #0] 8004456: 463b mov r3, r7 8004458: 681b ldr r3, [r3, #0] 800445a: 781b ldrb r3, [r3, #0] 800445c: 009b lsls r3, r3, #2 800445e: 441a add r2, r3 8004460: f8b7 308e ldrh.w r3, [r7, #142] ; 0x8e 8004464: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8004468: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800446c: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8004470: f043 0380 orr.w r3, r3, #128 ; 0x80 8004474: b29b uxth r3, r3 8004476: 8013 strh r3, [r2, #0] } return HAL_OK; 8004478: 2300 movs r3, #0 } 800447a: 4618 mov r0, r3 800447c: f507 7788 add.w r7, r7, #272 ; 0x110 8004480: 46bd mov sp, r7 8004482: bd80 pop {r7, pc} 08004484 : * @param USBx Selected device * @param ep pointer to endpoint structure * @retval HAL status */ HAL_StatusTypeDef USB_EPSetStall(USB_TypeDef *USBx, USB_EPTypeDef *ep) { 8004484: b480 push {r7} 8004486: b085 sub sp, #20 8004488: af00 add r7, sp, #0 800448a: 6078 str r0, [r7, #4] 800448c: 6039 str r1, [r7, #0] if (ep->is_in != 0U) 800448e: 683b ldr r3, [r7, #0] 8004490: 785b ldrb r3, [r3, #1] 8004492: 2b00 cmp r3, #0 8004494: d020 beq.n 80044d8 { PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_STALL); 8004496: 687a ldr r2, [r7, #4] 8004498: 683b ldr r3, [r7, #0] 800449a: 781b ldrb r3, [r3, #0] 800449c: 009b lsls r3, r3, #2 800449e: 4413 add r3, r2 80044a0: 881b ldrh r3, [r3, #0] 80044a2: b29b uxth r3, r3 80044a4: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80044a8: f023 0340 bic.w r3, r3, #64 ; 0x40 80044ac: 81bb strh r3, [r7, #12] 80044ae: 89bb ldrh r3, [r7, #12] 80044b0: f083 0310 eor.w r3, r3, #16 80044b4: 81bb strh r3, [r7, #12] 80044b6: 687a ldr r2, [r7, #4] 80044b8: 683b ldr r3, [r7, #0] 80044ba: 781b ldrb r3, [r3, #0] 80044bc: 009b lsls r3, r3, #2 80044be: 441a add r2, r3 80044c0: 89bb ldrh r3, [r7, #12] 80044c2: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80044c6: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80044ca: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80044ce: f043 0380 orr.w r3, r3, #128 ; 0x80 80044d2: b29b uxth r3, r3 80044d4: 8013 strh r3, [r2, #0] 80044d6: e01f b.n 8004518 } else { PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_STALL); 80044d8: 687a ldr r2, [r7, #4] 80044da: 683b ldr r3, [r7, #0] 80044dc: 781b ldrb r3, [r3, #0] 80044de: 009b lsls r3, r3, #2 80044e0: 4413 add r3, r2 80044e2: 881b ldrh r3, [r3, #0] 80044e4: b29b uxth r3, r3 80044e6: f423 4380 bic.w r3, r3, #16384 ; 0x4000 80044ea: f023 0370 bic.w r3, r3, #112 ; 0x70 80044ee: 81fb strh r3, [r7, #14] 80044f0: 89fb ldrh r3, [r7, #14] 80044f2: f483 5380 eor.w r3, r3, #4096 ; 0x1000 80044f6: 81fb strh r3, [r7, #14] 80044f8: 687a ldr r2, [r7, #4] 80044fa: 683b ldr r3, [r7, #0] 80044fc: 781b ldrb r3, [r3, #0] 80044fe: 009b lsls r3, r3, #2 8004500: 441a add r2, r3 8004502: 89fb ldrh r3, [r7, #14] 8004504: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8004508: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800450c: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8004510: f043 0380 orr.w r3, r3, #128 ; 0x80 8004514: b29b uxth r3, r3 8004516: 8013 strh r3, [r2, #0] } return HAL_OK; 8004518: 2300 movs r3, #0 } 800451a: 4618 mov r0, r3 800451c: 3714 adds r7, #20 800451e: 46bd mov sp, r7 8004520: bc80 pop {r7} 8004522: 4770 bx lr 08004524 : * @param USBx Selected device * @param ep pointer to endpoint structure * @retval HAL status */ HAL_StatusTypeDef USB_EPClearStall(USB_TypeDef *USBx, USB_EPTypeDef *ep) { 8004524: b480 push {r7} 8004526: b087 sub sp, #28 8004528: af00 add r7, sp, #0 800452a: 6078 str r0, [r7, #4] 800452c: 6039 str r1, [r7, #0] if (ep->doublebuffer == 0U) 800452e: 683b ldr r3, [r7, #0] 8004530: 7b1b ldrb r3, [r3, #12] 8004532: 2b00 cmp r3, #0 8004534: f040 809d bne.w 8004672 { if (ep->is_in != 0U) 8004538: 683b ldr r3, [r7, #0] 800453a: 785b ldrb r3, [r3, #1] 800453c: 2b00 cmp r3, #0 800453e: d04c beq.n 80045da { PCD_CLEAR_TX_DTOG(USBx, ep->num); 8004540: 687a ldr r2, [r7, #4] 8004542: 683b ldr r3, [r7, #0] 8004544: 781b ldrb r3, [r3, #0] 8004546: 009b lsls r3, r3, #2 8004548: 4413 add r3, r2 800454a: 881b ldrh r3, [r3, #0] 800454c: 823b strh r3, [r7, #16] 800454e: 8a3b ldrh r3, [r7, #16] 8004550: f003 0340 and.w r3, r3, #64 ; 0x40 8004554: 2b00 cmp r3, #0 8004556: d01b beq.n 8004590 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: 4413 add r3, r2 8004562: 881b ldrh r3, [r3, #0] 8004564: b29b uxth r3, r3 8004566: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800456a: f023 0370 bic.w r3, r3, #112 ; 0x70 800456e: 81fb strh r3, [r7, #14] 8004570: 687a ldr r2, [r7, #4] 8004572: 683b ldr r3, [r7, #0] 8004574: 781b ldrb r3, [r3, #0] 8004576: 009b lsls r3, r3, #2 8004578: 441a add r2, r3 800457a: 89fb ldrh r3, [r7, #14] 800457c: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8004580: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8004584: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8004588: f043 03c0 orr.w r3, r3, #192 ; 0xc0 800458c: b29b uxth r3, r3 800458e: 8013 strh r3, [r2, #0] if (ep->type != EP_TYPE_ISOC) 8004590: 683b ldr r3, [r7, #0] 8004592: 78db ldrb r3, [r3, #3] 8004594: 2b01 cmp r3, #1 8004596: d06c beq.n 8004672 { /* Configure NAK status for the Endpoint */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_NAK); 8004598: 687a ldr r2, [r7, #4] 800459a: 683b ldr r3, [r7, #0] 800459c: 781b ldrb r3, [r3, #0] 800459e: 009b lsls r3, r3, #2 80045a0: 4413 add r3, r2 80045a2: 881b ldrh r3, [r3, #0] 80045a4: b29b uxth r3, r3 80045a6: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80045aa: f023 0340 bic.w r3, r3, #64 ; 0x40 80045ae: 81bb strh r3, [r7, #12] 80045b0: 89bb ldrh r3, [r7, #12] 80045b2: f083 0320 eor.w r3, r3, #32 80045b6: 81bb strh r3, [r7, #12] 80045b8: 687a ldr r2, [r7, #4] 80045ba: 683b ldr r3, [r7, #0] 80045bc: 781b ldrb r3, [r3, #0] 80045be: 009b lsls r3, r3, #2 80045c0: 441a add r2, r3 80045c2: 89bb ldrh r3, [r7, #12] 80045c4: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80045c8: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80045cc: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80045d0: f043 0380 orr.w r3, r3, #128 ; 0x80 80045d4: b29b uxth r3, r3 80045d6: 8013 strh r3, [r2, #0] 80045d8: e04b b.n 8004672 } } else { PCD_CLEAR_RX_DTOG(USBx, ep->num); 80045da: 687a ldr r2, [r7, #4] 80045dc: 683b ldr r3, [r7, #0] 80045de: 781b ldrb r3, [r3, #0] 80045e0: 009b lsls r3, r3, #2 80045e2: 4413 add r3, r2 80045e4: 881b ldrh r3, [r3, #0] 80045e6: 82fb strh r3, [r7, #22] 80045e8: 8afb ldrh r3, [r7, #22] 80045ea: f403 4380 and.w r3, r3, #16384 ; 0x4000 80045ee: 2b00 cmp r3, #0 80045f0: d01b beq.n 800462a 80045f2: 687a ldr r2, [r7, #4] 80045f4: 683b ldr r3, [r7, #0] 80045f6: 781b ldrb r3, [r3, #0] 80045f8: 009b lsls r3, r3, #2 80045fa: 4413 add r3, r2 80045fc: 881b ldrh r3, [r3, #0] 80045fe: b29b uxth r3, r3 8004600: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8004604: f023 0370 bic.w r3, r3, #112 ; 0x70 8004608: 82bb strh r3, [r7, #20] 800460a: 687a ldr r2, [r7, #4] 800460c: 683b ldr r3, [r7, #0] 800460e: 781b ldrb r3, [r3, #0] 8004610: 009b lsls r3, r3, #2 8004612: 441a add r2, r3 8004614: 8abb ldrh r3, [r7, #20] 8004616: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800461a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800461e: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8004622: f043 0380 orr.w r3, r3, #128 ; 0x80 8004626: b29b uxth r3, r3 8004628: 8013 strh r3, [r2, #0] /* Configure VALID status for the Endpoint */ PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID); 800462a: 687a ldr r2, [r7, #4] 800462c: 683b ldr r3, [r7, #0] 800462e: 781b ldrb r3, [r3, #0] 8004630: 009b lsls r3, r3, #2 8004632: 4413 add r3, r2 8004634: 881b ldrh r3, [r3, #0] 8004636: b29b uxth r3, r3 8004638: f423 4380 bic.w r3, r3, #16384 ; 0x4000 800463c: f023 0370 bic.w r3, r3, #112 ; 0x70 8004640: 827b strh r3, [r7, #18] 8004642: 8a7b ldrh r3, [r7, #18] 8004644: f483 5380 eor.w r3, r3, #4096 ; 0x1000 8004648: 827b strh r3, [r7, #18] 800464a: 8a7b ldrh r3, [r7, #18] 800464c: f483 5300 eor.w r3, r3, #8192 ; 0x2000 8004650: 827b strh r3, [r7, #18] 8004652: 687a ldr r2, [r7, #4] 8004654: 683b ldr r3, [r7, #0] 8004656: 781b ldrb r3, [r3, #0] 8004658: 009b lsls r3, r3, #2 800465a: 441a add r2, r3 800465c: 8a7b ldrh r3, [r7, #18] 800465e: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8004662: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8004666: f443 4300 orr.w r3, r3, #32768 ; 0x8000 800466a: f043 0380 orr.w r3, r3, #128 ; 0x80 800466e: b29b uxth r3, r3 8004670: 8013 strh r3, [r2, #0] } } return HAL_OK; 8004672: 2300 movs r3, #0 } 8004674: 4618 mov r0, r3 8004676: 371c adds r7, #28 8004678: 46bd mov sp, r7 800467a: bc80 pop {r7} 800467c: 4770 bx lr 0800467e : * @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) { 800467e: b480 push {r7} 8004680: b083 sub sp, #12 8004682: af00 add r7, sp, #0 8004684: 6078 str r0, [r7, #4] 8004686: 460b mov r3, r1 8004688: 70fb strb r3, [r7, #3] if (address == 0U) 800468a: 78fb ldrb r3, [r7, #3] 800468c: 2b00 cmp r3, #0 800468e: d103 bne.n 8004698 { /* set device address and enable function */ USBx->DADDR = (uint16_t)USB_DADDR_EF; 8004690: 687b ldr r3, [r7, #4] 8004692: 2280 movs r2, #128 ; 0x80 8004694: f8a3 204c strh.w r2, [r3, #76] ; 0x4c } return HAL_OK; 8004698: 2300 movs r3, #0 } 800469a: 4618 mov r0, r3 800469c: 370c adds r7, #12 800469e: 46bd mov sp, r7 80046a0: bc80 pop {r7} 80046a2: 4770 bx lr 080046a4 : * @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) { 80046a4: b480 push {r7} 80046a6: b083 sub sp, #12 80046a8: af00 add r7, sp, #0 80046aa: 6078 str r0, [r7, #4] /* NOTE : - This function is not required by USB Device FS peripheral, it is used only by USB OTG FS peripheral. - This function is added to ensure compatibility across platforms. */ return HAL_OK; 80046ac: 2300 movs r3, #0 } 80046ae: 4618 mov r0, r3 80046b0: 370c adds r7, #12 80046b2: 46bd mov sp, r7 80046b4: bc80 pop {r7} 80046b6: 4770 bx lr 080046b8 : * @brief USB_DevDisconnect Disconnect the USB device by disabling the pull-up/pull-down * @param USBx Selected device * @retval HAL status */ HAL_StatusTypeDef USB_DevDisconnect(USB_TypeDef *USBx) { 80046b8: b480 push {r7} 80046ba: b083 sub sp, #12 80046bc: af00 add r7, sp, #0 80046be: 6078 str r0, [r7, #4] /* NOTE : - This function is not required by USB Device FS peripheral, it is used only by USB OTG FS peripheral. - This function is added to ensure compatibility across platforms. */ return HAL_OK; 80046c0: 2300 movs r3, #0 } 80046c2: 4618 mov r0, r3 80046c4: 370c adds r7, #12 80046c6: 46bd mov sp, r7 80046c8: bc80 pop {r7} 80046ca: 4770 bx lr 080046cc : * @brief USB_ReadInterrupts return the global USB interrupt status * @param USBx Selected device * @retval HAL status */ uint32_t USB_ReadInterrupts(USB_TypeDef *USBx) { 80046cc: b480 push {r7} 80046ce: b085 sub sp, #20 80046d0: af00 add r7, sp, #0 80046d2: 6078 str r0, [r7, #4] uint32_t tmpreg; tmpreg = USBx->ISTR; 80046d4: 687b ldr r3, [r7, #4] 80046d6: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 80046da: b29b uxth r3, r3 80046dc: 60fb str r3, [r7, #12] return tmpreg; 80046de: 68fb ldr r3, [r7, #12] } 80046e0: 4618 mov r0, r3 80046e2: 3714 adds r7, #20 80046e4: 46bd mov sp, r7 80046e6: bc80 pop {r7} 80046e8: 4770 bx lr 080046ea : * @param USBx Selected device * @param psetup pointer to setup packet * @retval HAL status */ HAL_StatusTypeDef USB_EP0_OutStart(USB_TypeDef *USBx, uint8_t *psetup) { 80046ea: b480 push {r7} 80046ec: b083 sub sp, #12 80046ee: af00 add r7, sp, #0 80046f0: 6078 str r0, [r7, #4] 80046f2: 6039 str r1, [r7, #0] UNUSED(psetup); /* NOTE : - This function is not required by USB Device FS peripheral, it is used only by USB OTG FS peripheral. - This function is added to ensure compatibility across platforms. */ return HAL_OK; 80046f4: 2300 movs r3, #0 } 80046f6: 4618 mov r0, r3 80046f8: 370c adds r7, #12 80046fa: 46bd mov sp, r7 80046fc: bc80 pop {r7} 80046fe: 4770 bx lr 08004700 : * @param wPMABufAddr address into PMA. * @param wNBytes no. of bytes to be copied. * @retval None */ void USB_WritePMA(USB_TypeDef *USBx, uint8_t *pbUsrBuf, uint16_t wPMABufAddr, uint16_t wNBytes) { 8004700: b480 push {r7} 8004702: b08d sub sp, #52 ; 0x34 8004704: af00 add r7, sp, #0 8004706: 60f8 str r0, [r7, #12] 8004708: 60b9 str r1, [r7, #8] 800470a: 4611 mov r1, r2 800470c: 461a mov r2, r3 800470e: 460b mov r3, r1 8004710: 80fb strh r3, [r7, #6] 8004712: 4613 mov r3, r2 8004714: 80bb strh r3, [r7, #4] uint32_t n = ((uint32_t)wNBytes + 1U) >> 1; 8004716: 88bb ldrh r3, [r7, #4] 8004718: 3301 adds r3, #1 800471a: 085b lsrs r3, r3, #1 800471c: 623b str r3, [r7, #32] uint32_t BaseAddr = (uint32_t)USBx; 800471e: 68fb ldr r3, [r7, #12] 8004720: 61fb str r3, [r7, #28] uint32_t i, temp1, temp2; __IO uint16_t *pdwVal; uint8_t *pBuf = pbUsrBuf; 8004722: 68bb ldr r3, [r7, #8] 8004724: 627b str r3, [r7, #36] ; 0x24 pdwVal = (__IO uint16_t *)(BaseAddr + 0x400U + ((uint32_t)wPMABufAddr * PMA_ACCESS)); 8004726: 88fb ldrh r3, [r7, #6] 8004728: 005a lsls r2, r3, #1 800472a: 69fb ldr r3, [r7, #28] 800472c: 4413 add r3, r2 800472e: f503 6380 add.w r3, r3, #1024 ; 0x400 8004732: 62bb str r3, [r7, #40] ; 0x28 for (i = n; i != 0U; i--) 8004734: 6a3b ldr r3, [r7, #32] 8004736: 62fb str r3, [r7, #44] ; 0x2c 8004738: e01e b.n 8004778 { temp1 = *pBuf; 800473a: 6a7b ldr r3, [r7, #36] ; 0x24 800473c: 781b ldrb r3, [r3, #0] 800473e: 61bb str r3, [r7, #24] pBuf++; 8004740: 6a7b ldr r3, [r7, #36] ; 0x24 8004742: 3301 adds r3, #1 8004744: 627b str r3, [r7, #36] ; 0x24 temp2 = temp1 | ((uint16_t)((uint16_t) *pBuf << 8)); 8004746: 6a7b ldr r3, [r7, #36] ; 0x24 8004748: 781b ldrb r3, [r3, #0] 800474a: b29b uxth r3, r3 800474c: 021b lsls r3, r3, #8 800474e: b29b uxth r3, r3 8004750: 461a mov r2, r3 8004752: 69bb ldr r3, [r7, #24] 8004754: 4313 orrs r3, r2 8004756: 617b str r3, [r7, #20] *pdwVal = (uint16_t)temp2; 8004758: 697b ldr r3, [r7, #20] 800475a: b29a uxth r2, r3 800475c: 6abb ldr r3, [r7, #40] ; 0x28 800475e: 801a strh r2, [r3, #0] pdwVal++; 8004760: 6abb ldr r3, [r7, #40] ; 0x28 8004762: 3302 adds r3, #2 8004764: 62bb str r3, [r7, #40] ; 0x28 #if PMA_ACCESS > 1U pdwVal++; 8004766: 6abb ldr r3, [r7, #40] ; 0x28 8004768: 3302 adds r3, #2 800476a: 62bb str r3, [r7, #40] ; 0x28 #endif pBuf++; 800476c: 6a7b ldr r3, [r7, #36] ; 0x24 800476e: 3301 adds r3, #1 8004770: 627b str r3, [r7, #36] ; 0x24 for (i = n; i != 0U; i--) 8004772: 6afb ldr r3, [r7, #44] ; 0x2c 8004774: 3b01 subs r3, #1 8004776: 62fb str r3, [r7, #44] ; 0x2c 8004778: 6afb ldr r3, [r7, #44] ; 0x2c 800477a: 2b00 cmp r3, #0 800477c: d1dd bne.n 800473a } } 800477e: bf00 nop 8004780: 3734 adds r7, #52 ; 0x34 8004782: 46bd mov sp, r7 8004784: bc80 pop {r7} 8004786: 4770 bx lr 08004788 : * @param wPMABufAddr address into PMA. * @param wNBytes no. of bytes to be copied. * @retval None */ void USB_ReadPMA(USB_TypeDef *USBx, uint8_t *pbUsrBuf, uint16_t wPMABufAddr, uint16_t wNBytes) { 8004788: b480 push {r7} 800478a: b08b sub sp, #44 ; 0x2c 800478c: af00 add r7, sp, #0 800478e: 60f8 str r0, [r7, #12] 8004790: 60b9 str r1, [r7, #8] 8004792: 4611 mov r1, r2 8004794: 461a mov r2, r3 8004796: 460b mov r3, r1 8004798: 80fb strh r3, [r7, #6] 800479a: 4613 mov r3, r2 800479c: 80bb strh r3, [r7, #4] uint32_t n = (uint32_t)wNBytes >> 1; 800479e: 88bb ldrh r3, [r7, #4] 80047a0: 085b lsrs r3, r3, #1 80047a2: b29b uxth r3, r3 80047a4: 61bb str r3, [r7, #24] uint32_t BaseAddr = (uint32_t)USBx; 80047a6: 68fb ldr r3, [r7, #12] 80047a8: 617b str r3, [r7, #20] uint32_t i, temp; __IO uint16_t *pdwVal; uint8_t *pBuf = pbUsrBuf; 80047aa: 68bb ldr r3, [r7, #8] 80047ac: 61fb str r3, [r7, #28] pdwVal = (__IO uint16_t *)(BaseAddr + 0x400U + ((uint32_t)wPMABufAddr * PMA_ACCESS)); 80047ae: 88fb ldrh r3, [r7, #6] 80047b0: 005a lsls r2, r3, #1 80047b2: 697b ldr r3, [r7, #20] 80047b4: 4413 add r3, r2 80047b6: f503 6380 add.w r3, r3, #1024 ; 0x400 80047ba: 623b str r3, [r7, #32] for (i = n; i != 0U; i--) 80047bc: 69bb ldr r3, [r7, #24] 80047be: 627b str r3, [r7, #36] ; 0x24 80047c0: e01b b.n 80047fa { temp = *(__IO uint16_t *)pdwVal; 80047c2: 6a3b ldr r3, [r7, #32] 80047c4: 881b ldrh r3, [r3, #0] 80047c6: b29b uxth r3, r3 80047c8: 613b str r3, [r7, #16] pdwVal++; 80047ca: 6a3b ldr r3, [r7, #32] 80047cc: 3302 adds r3, #2 80047ce: 623b str r3, [r7, #32] *pBuf = (uint8_t)((temp >> 0) & 0xFFU); 80047d0: 693b ldr r3, [r7, #16] 80047d2: b2da uxtb r2, r3 80047d4: 69fb ldr r3, [r7, #28] 80047d6: 701a strb r2, [r3, #0] pBuf++; 80047d8: 69fb ldr r3, [r7, #28] 80047da: 3301 adds r3, #1 80047dc: 61fb str r3, [r7, #28] *pBuf = (uint8_t)((temp >> 8) & 0xFFU); 80047de: 693b ldr r3, [r7, #16] 80047e0: 0a1b lsrs r3, r3, #8 80047e2: b2da uxtb r2, r3 80047e4: 69fb ldr r3, [r7, #28] 80047e6: 701a strb r2, [r3, #0] pBuf++; 80047e8: 69fb ldr r3, [r7, #28] 80047ea: 3301 adds r3, #1 80047ec: 61fb str r3, [r7, #28] #if PMA_ACCESS > 1U pdwVal++; 80047ee: 6a3b ldr r3, [r7, #32] 80047f0: 3302 adds r3, #2 80047f2: 623b str r3, [r7, #32] for (i = n; i != 0U; i--) 80047f4: 6a7b ldr r3, [r7, #36] ; 0x24 80047f6: 3b01 subs r3, #1 80047f8: 627b str r3, [r7, #36] ; 0x24 80047fa: 6a7b ldr r3, [r7, #36] ; 0x24 80047fc: 2b00 cmp r3, #0 80047fe: d1e0 bne.n 80047c2 #endif } if ((wNBytes % 2U) != 0U) 8004800: 88bb ldrh r3, [r7, #4] 8004802: f003 0301 and.w r3, r3, #1 8004806: b29b uxth r3, r3 8004808: 2b00 cmp r3, #0 800480a: d007 beq.n 800481c { temp = *pdwVal; 800480c: 6a3b ldr r3, [r7, #32] 800480e: 881b ldrh r3, [r3, #0] 8004810: b29b uxth r3, r3 8004812: 613b str r3, [r7, #16] *pBuf = (uint8_t)((temp >> 0) & 0xFFU); 8004814: 693b ldr r3, [r7, #16] 8004816: b2da uxtb r2, r3 8004818: 69fb ldr r3, [r7, #28] 800481a: 701a strb r2, [r3, #0] } } 800481c: bf00 nop 800481e: 372c adds r7, #44 ; 0x2c 8004820: 46bd mov sp, r7 8004822: bc80 pop {r7} 8004824: 4770 bx lr 08004826 : * @param pdev: device instance * @param cfgidx: Configuration index * @retval status */ static uint8_t USBD_CDC_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx) { 8004826: b580 push {r7, lr} 8004828: b084 sub sp, #16 800482a: af00 add r7, sp, #0 800482c: 6078 str r0, [r7, #4] 800482e: 460b mov r3, r1 8004830: 70fb strb r3, [r7, #3] uint8_t ret = 0U; 8004832: 2300 movs r3, #0 8004834: 73fb strb r3, [r7, #15] USBD_CDC_HandleTypeDef *hcdc; if (pdev->dev_speed == USBD_SPEED_HIGH) 8004836: 687b ldr r3, [r7, #4] 8004838: 7c1b ldrb r3, [r3, #16] 800483a: 2b00 cmp r3, #0 800483c: d115 bne.n 800486a { /* Open EP IN */ USBD_LL_OpenEP(pdev, CDC_IN_EP, USBD_EP_TYPE_BULK, 800483e: f44f 7300 mov.w r3, #512 ; 0x200 8004842: 2202 movs r2, #2 8004844: 2181 movs r1, #129 ; 0x81 8004846: 6878 ldr r0, [r7, #4] 8004848: f001 fe1f bl 800648a CDC_DATA_HS_IN_PACKET_SIZE); pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 1U; 800484c: 687b ldr r3, [r7, #4] 800484e: 2201 movs r2, #1 8004850: 62da str r2, [r3, #44] ; 0x2c /* Open EP OUT */ USBD_LL_OpenEP(pdev, CDC_OUT_EP, USBD_EP_TYPE_BULK, 8004852: f44f 7300 mov.w r3, #512 ; 0x200 8004856: 2202 movs r2, #2 8004858: 2101 movs r1, #1 800485a: 6878 ldr r0, [r7, #4] 800485c: f001 fe15 bl 800648a CDC_DATA_HS_OUT_PACKET_SIZE); pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 1U; 8004860: 687b ldr r3, [r7, #4] 8004862: 2201 movs r2, #1 8004864: f8c3 216c str.w r2, [r3, #364] ; 0x16c 8004868: e012 b.n 8004890 } else { /* Open EP IN */ USBD_LL_OpenEP(pdev, CDC_IN_EP, USBD_EP_TYPE_BULK, 800486a: 2340 movs r3, #64 ; 0x40 800486c: 2202 movs r2, #2 800486e: 2181 movs r1, #129 ; 0x81 8004870: 6878 ldr r0, [r7, #4] 8004872: f001 fe0a bl 800648a CDC_DATA_FS_IN_PACKET_SIZE); pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 1U; 8004876: 687b ldr r3, [r7, #4] 8004878: 2201 movs r2, #1 800487a: 62da str r2, [r3, #44] ; 0x2c /* Open EP OUT */ USBD_LL_OpenEP(pdev, CDC_OUT_EP, USBD_EP_TYPE_BULK, 800487c: 2340 movs r3, #64 ; 0x40 800487e: 2202 movs r2, #2 8004880: 2101 movs r1, #1 8004882: 6878 ldr r0, [r7, #4] 8004884: f001 fe01 bl 800648a CDC_DATA_FS_OUT_PACKET_SIZE); pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 1U; 8004888: 687b ldr r3, [r7, #4] 800488a: 2201 movs r2, #1 800488c: f8c3 216c str.w r2, [r3, #364] ; 0x16c } /* Open Command IN EP */ USBD_LL_OpenEP(pdev, CDC_CMD_EP, USBD_EP_TYPE_INTR, CDC_CMD_PACKET_SIZE); 8004890: 2308 movs r3, #8 8004892: 2203 movs r2, #3 8004894: 2182 movs r1, #130 ; 0x82 8004896: 6878 ldr r0, [r7, #4] 8004898: f001 fdf7 bl 800648a pdev->ep_in[CDC_CMD_EP & 0xFU].is_used = 1U; 800489c: 687b ldr r3, [r7, #4] 800489e: 2201 movs r2, #1 80048a0: 641a str r2, [r3, #64] ; 0x40 pdev->pClassData = USBD_malloc(sizeof(USBD_CDC_HandleTypeDef)); 80048a2: f44f 7007 mov.w r0, #540 ; 0x21c 80048a6: f001 ff17 bl 80066d8 80048aa: 4602 mov r2, r0 80048ac: 687b ldr r3, [r7, #4] 80048ae: f8c3 22b8 str.w r2, [r3, #696] ; 0x2b8 if (pdev->pClassData == NULL) 80048b2: 687b ldr r3, [r7, #4] 80048b4: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 80048b8: 2b00 cmp r3, #0 80048ba: d102 bne.n 80048c2 { ret = 1U; 80048bc: 2301 movs r3, #1 80048be: 73fb strb r3, [r7, #15] 80048c0: e026 b.n 8004910 } else { hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData; 80048c2: 687b ldr r3, [r7, #4] 80048c4: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 80048c8: 60bb str r3, [r7, #8] /* Init physical Interface components */ ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Init(); 80048ca: 687b ldr r3, [r7, #4] 80048cc: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc 80048d0: 681b ldr r3, [r3, #0] 80048d2: 4798 blx r3 /* Init Xfer states */ hcdc->TxState = 0U; 80048d4: 68bb ldr r3, [r7, #8] 80048d6: 2200 movs r2, #0 80048d8: f8c3 2214 str.w r2, [r3, #532] ; 0x214 hcdc->RxState = 0U; 80048dc: 68bb ldr r3, [r7, #8] 80048de: 2200 movs r2, #0 80048e0: f8c3 2218 str.w r2, [r3, #536] ; 0x218 if (pdev->dev_speed == USBD_SPEED_HIGH) 80048e4: 687b ldr r3, [r7, #4] 80048e6: 7c1b ldrb r3, [r3, #16] 80048e8: 2b00 cmp r3, #0 80048ea: d109 bne.n 8004900 { /* Prepare Out endpoint to receive next packet */ USBD_LL_PrepareReceive(pdev, CDC_OUT_EP, hcdc->RxBuffer, 80048ec: 68bb ldr r3, [r7, #8] 80048ee: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204 80048f2: f44f 7300 mov.w r3, #512 ; 0x200 80048f6: 2101 movs r1, #1 80048f8: 6878 ldr r0, [r7, #4] 80048fa: f001 feb7 bl 800666c 80048fe: e007 b.n 8004910 CDC_DATA_HS_OUT_PACKET_SIZE); } else { /* Prepare Out endpoint to receive next packet */ USBD_LL_PrepareReceive(pdev, CDC_OUT_EP, hcdc->RxBuffer, 8004900: 68bb ldr r3, [r7, #8] 8004902: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204 8004906: 2340 movs r3, #64 ; 0x40 8004908: 2101 movs r1, #1 800490a: 6878 ldr r0, [r7, #4] 800490c: f001 feae bl 800666c CDC_DATA_FS_OUT_PACKET_SIZE); } } return ret; 8004910: 7bfb ldrb r3, [r7, #15] } 8004912: 4618 mov r0, r3 8004914: 3710 adds r7, #16 8004916: 46bd mov sp, r7 8004918: bd80 pop {r7, pc} 0800491a : * @param pdev: device instance * @param cfgidx: Configuration index * @retval status */ static uint8_t USBD_CDC_DeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx) { 800491a: b580 push {r7, lr} 800491c: b084 sub sp, #16 800491e: af00 add r7, sp, #0 8004920: 6078 str r0, [r7, #4] 8004922: 460b mov r3, r1 8004924: 70fb strb r3, [r7, #3] uint8_t ret = 0U; 8004926: 2300 movs r3, #0 8004928: 73fb strb r3, [r7, #15] /* Close EP IN */ USBD_LL_CloseEP(pdev, CDC_IN_EP); 800492a: 2181 movs r1, #129 ; 0x81 800492c: 6878 ldr r0, [r7, #4] 800492e: f001 fdd2 bl 80064d6 pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 0U; 8004932: 687b ldr r3, [r7, #4] 8004934: 2200 movs r2, #0 8004936: 62da str r2, [r3, #44] ; 0x2c /* Close EP OUT */ USBD_LL_CloseEP(pdev, CDC_OUT_EP); 8004938: 2101 movs r1, #1 800493a: 6878 ldr r0, [r7, #4] 800493c: f001 fdcb bl 80064d6 pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 0U; 8004940: 687b ldr r3, [r7, #4] 8004942: 2200 movs r2, #0 8004944: f8c3 216c str.w r2, [r3, #364] ; 0x16c /* Close Command IN EP */ USBD_LL_CloseEP(pdev, CDC_CMD_EP); 8004948: 2182 movs r1, #130 ; 0x82 800494a: 6878 ldr r0, [r7, #4] 800494c: f001 fdc3 bl 80064d6 pdev->ep_in[CDC_CMD_EP & 0xFU].is_used = 0U; 8004950: 687b ldr r3, [r7, #4] 8004952: 2200 movs r2, #0 8004954: 641a str r2, [r3, #64] ; 0x40 /* DeInit physical Interface components */ if (pdev->pClassData != NULL) 8004956: 687b ldr r3, [r7, #4] 8004958: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 800495c: 2b00 cmp r3, #0 800495e: d00e beq.n 800497e { ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->DeInit(); 8004960: 687b ldr r3, [r7, #4] 8004962: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc 8004966: 685b ldr r3, [r3, #4] 8004968: 4798 blx r3 USBD_free(pdev->pClassData); 800496a: 687b ldr r3, [r7, #4] 800496c: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8004970: 4618 mov r0, r3 8004972: f001 febd bl 80066f0 pdev->pClassData = NULL; 8004976: 687b ldr r3, [r7, #4] 8004978: 2200 movs r2, #0 800497a: f8c3 22b8 str.w r2, [r3, #696] ; 0x2b8 } return ret; 800497e: 7bfb ldrb r3, [r7, #15] } 8004980: 4618 mov r0, r3 8004982: 3710 adds r7, #16 8004984: 46bd mov sp, r7 8004986: bd80 pop {r7, pc} 08004988 : * @param req: usb requests * @retval status */ static uint8_t USBD_CDC_Setup(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8004988: b580 push {r7, lr} 800498a: b086 sub sp, #24 800498c: af00 add r7, sp, #0 800498e: 6078 str r0, [r7, #4] 8004990: 6039 str r1, [r7, #0] USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData; 8004992: 687b ldr r3, [r7, #4] 8004994: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8004998: 613b str r3, [r7, #16] uint8_t ifalt = 0U; 800499a: 2300 movs r3, #0 800499c: 73fb strb r3, [r7, #15] uint16_t status_info = 0U; 800499e: 2300 movs r3, #0 80049a0: 81bb strh r3, [r7, #12] uint8_t ret = USBD_OK; 80049a2: 2300 movs r3, #0 80049a4: 75fb strb r3, [r7, #23] switch (req->bmRequest & USB_REQ_TYPE_MASK) 80049a6: 683b ldr r3, [r7, #0] 80049a8: 781b ldrb r3, [r3, #0] 80049aa: f003 0360 and.w r3, r3, #96 ; 0x60 80049ae: 2b00 cmp r3, #0 80049b0: d039 beq.n 8004a26 80049b2: 2b20 cmp r3, #32 80049b4: d17c bne.n 8004ab0 { case USB_REQ_TYPE_CLASS : if (req->wLength) 80049b6: 683b ldr r3, [r7, #0] 80049b8: 88db ldrh r3, [r3, #6] 80049ba: 2b00 cmp r3, #0 80049bc: d029 beq.n 8004a12 { if (req->bmRequest & 0x80U) 80049be: 683b ldr r3, [r7, #0] 80049c0: 781b ldrb r3, [r3, #0] 80049c2: b25b sxtb r3, r3 80049c4: 2b00 cmp r3, #0 80049c6: da11 bge.n 80049ec { ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest, 80049c8: 687b ldr r3, [r7, #4] 80049ca: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc 80049ce: 689b ldr r3, [r3, #8] 80049d0: 683a ldr r2, [r7, #0] 80049d2: 7850 ldrb r0, [r2, #1] (uint8_t *)(void *)hcdc->data, 80049d4: 6939 ldr r1, [r7, #16] ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest, 80049d6: 683a ldr r2, [r7, #0] 80049d8: 88d2 ldrh r2, [r2, #6] 80049da: 4798 blx r3 req->wLength); USBD_CtlSendData(pdev, (uint8_t *)(void *)hcdc->data, req->wLength); 80049dc: 6939 ldr r1, [r7, #16] 80049de: 683b ldr r3, [r7, #0] 80049e0: 88db ldrh r3, [r3, #6] 80049e2: 461a mov r2, r3 80049e4: 6878 ldr r0, [r7, #4] 80049e6: f001 f9c9 bl 8005d7c else { ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest, (uint8_t *)(void *)req, 0U); } break; 80049ea: e068 b.n 8004abe hcdc->CmdOpCode = req->bRequest; 80049ec: 683b ldr r3, [r7, #0] 80049ee: 785a ldrb r2, [r3, #1] 80049f0: 693b ldr r3, [r7, #16] 80049f2: f883 2200 strb.w r2, [r3, #512] ; 0x200 hcdc->CmdLength = (uint8_t)req->wLength; 80049f6: 683b ldr r3, [r7, #0] 80049f8: 88db ldrh r3, [r3, #6] 80049fa: b2da uxtb r2, r3 80049fc: 693b ldr r3, [r7, #16] 80049fe: f883 2201 strb.w r2, [r3, #513] ; 0x201 USBD_CtlPrepareRx(pdev, (uint8_t *)(void *)hcdc->data, req->wLength); 8004a02: 6939 ldr r1, [r7, #16] 8004a04: 683b ldr r3, [r7, #0] 8004a06: 88db ldrh r3, [r3, #6] 8004a08: 461a mov r2, r3 8004a0a: 6878 ldr r0, [r7, #4] 8004a0c: f001 f9e4 bl 8005dd8 break; 8004a10: e055 b.n 8004abe ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest, 8004a12: 687b ldr r3, [r7, #4] 8004a14: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc 8004a18: 689b ldr r3, [r3, #8] 8004a1a: 683a ldr r2, [r7, #0] 8004a1c: 7850 ldrb r0, [r2, #1] 8004a1e: 2200 movs r2, #0 8004a20: 6839 ldr r1, [r7, #0] 8004a22: 4798 blx r3 break; 8004a24: e04b b.n 8004abe case USB_REQ_TYPE_STANDARD: switch (req->bRequest) 8004a26: 683b ldr r3, [r7, #0] 8004a28: 785b ldrb r3, [r3, #1] 8004a2a: 2b0a cmp r3, #10 8004a2c: d017 beq.n 8004a5e 8004a2e: 2b0b cmp r3, #11 8004a30: d029 beq.n 8004a86 8004a32: 2b00 cmp r3, #0 8004a34: d133 bne.n 8004a9e { case USB_REQ_GET_STATUS: if (pdev->dev_state == USBD_STATE_CONFIGURED) 8004a36: 687b ldr r3, [r7, #4] 8004a38: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8004a3c: 2b03 cmp r3, #3 8004a3e: d107 bne.n 8004a50 { USBD_CtlSendData(pdev, (uint8_t *)(void *)&status_info, 2U); 8004a40: f107 030c add.w r3, r7, #12 8004a44: 2202 movs r2, #2 8004a46: 4619 mov r1, r3 8004a48: 6878 ldr r0, [r7, #4] 8004a4a: f001 f997 bl 8005d7c else { USBD_CtlError(pdev, req); ret = USBD_FAIL; } break; 8004a4e: e02e b.n 8004aae USBD_CtlError(pdev, req); 8004a50: 6839 ldr r1, [r7, #0] 8004a52: 6878 ldr r0, [r7, #4] 8004a54: f001 f928 bl 8005ca8 ret = USBD_FAIL; 8004a58: 2302 movs r3, #2 8004a5a: 75fb strb r3, [r7, #23] break; 8004a5c: e027 b.n 8004aae case USB_REQ_GET_INTERFACE: if (pdev->dev_state == USBD_STATE_CONFIGURED) 8004a5e: 687b ldr r3, [r7, #4] 8004a60: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8004a64: 2b03 cmp r3, #3 8004a66: d107 bne.n 8004a78 { USBD_CtlSendData(pdev, &ifalt, 1U); 8004a68: f107 030f add.w r3, r7, #15 8004a6c: 2201 movs r2, #1 8004a6e: 4619 mov r1, r3 8004a70: 6878 ldr r0, [r7, #4] 8004a72: f001 f983 bl 8005d7c else { USBD_CtlError(pdev, req); ret = USBD_FAIL; } break; 8004a76: e01a b.n 8004aae USBD_CtlError(pdev, req); 8004a78: 6839 ldr r1, [r7, #0] 8004a7a: 6878 ldr r0, [r7, #4] 8004a7c: f001 f914 bl 8005ca8 ret = USBD_FAIL; 8004a80: 2302 movs r3, #2 8004a82: 75fb strb r3, [r7, #23] break; 8004a84: e013 b.n 8004aae case USB_REQ_SET_INTERFACE: if (pdev->dev_state != USBD_STATE_CONFIGURED) 8004a86: 687b ldr r3, [r7, #4] 8004a88: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8004a8c: 2b03 cmp r3, #3 8004a8e: d00d beq.n 8004aac { USBD_CtlError(pdev, req); 8004a90: 6839 ldr r1, [r7, #0] 8004a92: 6878 ldr r0, [r7, #4] 8004a94: f001 f908 bl 8005ca8 ret = USBD_FAIL; 8004a98: 2302 movs r3, #2 8004a9a: 75fb strb r3, [r7, #23] } break; 8004a9c: e006 b.n 8004aac default: USBD_CtlError(pdev, req); 8004a9e: 6839 ldr r1, [r7, #0] 8004aa0: 6878 ldr r0, [r7, #4] 8004aa2: f001 f901 bl 8005ca8 ret = USBD_FAIL; 8004aa6: 2302 movs r3, #2 8004aa8: 75fb strb r3, [r7, #23] break; 8004aaa: e000 b.n 8004aae break; 8004aac: bf00 nop } break; 8004aae: e006 b.n 8004abe default: USBD_CtlError(pdev, req); 8004ab0: 6839 ldr r1, [r7, #0] 8004ab2: 6878 ldr r0, [r7, #4] 8004ab4: f001 f8f8 bl 8005ca8 ret = USBD_FAIL; 8004ab8: 2302 movs r3, #2 8004aba: 75fb strb r3, [r7, #23] break; 8004abc: bf00 nop } return ret; 8004abe: 7dfb ldrb r3, [r7, #23] } 8004ac0: 4618 mov r0, r3 8004ac2: 3718 adds r7, #24 8004ac4: 46bd mov sp, r7 8004ac6: bd80 pop {r7, pc} 08004ac8 : * @param pdev: device instance * @param epnum: endpoint number * @retval status */ static uint8_t USBD_CDC_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum) { 8004ac8: b580 push {r7, lr} 8004aca: b084 sub sp, #16 8004acc: af00 add r7, sp, #0 8004ace: 6078 str r0, [r7, #4] 8004ad0: 460b mov r3, r1 8004ad2: 70fb strb r3, [r7, #3] USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData; 8004ad4: 687b ldr r3, [r7, #4] 8004ad6: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8004ada: 60fb str r3, [r7, #12] PCD_HandleTypeDef *hpcd = pdev->pData; 8004adc: 687b ldr r3, [r7, #4] 8004ade: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 8004ae2: 60bb str r3, [r7, #8] if (pdev->pClassData != NULL) 8004ae4: 687b ldr r3, [r7, #4] 8004ae6: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8004aea: 2b00 cmp r3, #0 8004aec: d03a beq.n 8004b64 { if ((pdev->ep_in[epnum].total_length > 0U) && ((pdev->ep_in[epnum].total_length % hpcd->IN_ep[epnum].maxpacket) == 0U)) 8004aee: 78fa ldrb r2, [r7, #3] 8004af0: 6879 ldr r1, [r7, #4] 8004af2: 4613 mov r3, r2 8004af4: 009b lsls r3, r3, #2 8004af6: 4413 add r3, r2 8004af8: 009b lsls r3, r3, #2 8004afa: 440b add r3, r1 8004afc: 331c adds r3, #28 8004afe: 681b ldr r3, [r3, #0] 8004b00: 2b00 cmp r3, #0 8004b02: d029 beq.n 8004b58 8004b04: 78fa ldrb r2, [r7, #3] 8004b06: 6879 ldr r1, [r7, #4] 8004b08: 4613 mov r3, r2 8004b0a: 009b lsls r3, r3, #2 8004b0c: 4413 add r3, r2 8004b0e: 009b lsls r3, r3, #2 8004b10: 440b add r3, r1 8004b12: 331c adds r3, #28 8004b14: 681a ldr r2, [r3, #0] 8004b16: 78f9 ldrb r1, [r7, #3] 8004b18: 68b8 ldr r0, [r7, #8] 8004b1a: 460b mov r3, r1 8004b1c: 009b lsls r3, r3, #2 8004b1e: 440b add r3, r1 8004b20: 00db lsls r3, r3, #3 8004b22: 4403 add r3, r0 8004b24: 3338 adds r3, #56 ; 0x38 8004b26: 681b ldr r3, [r3, #0] 8004b28: fbb2 f1f3 udiv r1, r2, r3 8004b2c: fb03 f301 mul.w r3, r3, r1 8004b30: 1ad3 subs r3, r2, r3 8004b32: 2b00 cmp r3, #0 8004b34: d110 bne.n 8004b58 { /* Update the packet total length */ pdev->ep_in[epnum].total_length = 0U; 8004b36: 78fa ldrb r2, [r7, #3] 8004b38: 6879 ldr r1, [r7, #4] 8004b3a: 4613 mov r3, r2 8004b3c: 009b lsls r3, r3, #2 8004b3e: 4413 add r3, r2 8004b40: 009b lsls r3, r3, #2 8004b42: 440b add r3, r1 8004b44: 331c adds r3, #28 8004b46: 2200 movs r2, #0 8004b48: 601a str r2, [r3, #0] /* Send ZLP */ USBD_LL_Transmit(pdev, epnum, NULL, 0U); 8004b4a: 78f9 ldrb r1, [r7, #3] 8004b4c: 2300 movs r3, #0 8004b4e: 2200 movs r2, #0 8004b50: 6878 ldr r0, [r7, #4] 8004b52: f001 fd68 bl 8006626 8004b56: e003 b.n 8004b60 } else { hcdc->TxState = 0U; 8004b58: 68fb ldr r3, [r7, #12] 8004b5a: 2200 movs r2, #0 8004b5c: f8c3 2214 str.w r2, [r3, #532] ; 0x214 } return USBD_OK; 8004b60: 2300 movs r3, #0 8004b62: e000 b.n 8004b66 } else { return USBD_FAIL; 8004b64: 2302 movs r3, #2 } } 8004b66: 4618 mov r0, r3 8004b68: 3710 adds r7, #16 8004b6a: 46bd mov sp, r7 8004b6c: bd80 pop {r7, pc} 08004b6e : * @param pdev: device instance * @param epnum: endpoint number * @retval status */ static uint8_t USBD_CDC_DataOut(USBD_HandleTypeDef *pdev, uint8_t epnum) { 8004b6e: b580 push {r7, lr} 8004b70: b084 sub sp, #16 8004b72: af00 add r7, sp, #0 8004b74: 6078 str r0, [r7, #4] 8004b76: 460b mov r3, r1 8004b78: 70fb strb r3, [r7, #3] USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData; 8004b7a: 687b ldr r3, [r7, #4] 8004b7c: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8004b80: 60fb str r3, [r7, #12] /* Get the received data length */ hcdc->RxLength = USBD_LL_GetRxDataSize(pdev, epnum); 8004b82: 78fb ldrb r3, [r7, #3] 8004b84: 4619 mov r1, r3 8004b86: 6878 ldr r0, [r7, #4] 8004b88: f001 fd93 bl 80066b2 8004b8c: 4602 mov r2, r0 8004b8e: 68fb ldr r3, [r7, #12] 8004b90: f8c3 220c str.w r2, [r3, #524] ; 0x20c /* USB data will be immediately processed, this allow next USB traffic being NAKed till the end of the application Xfer */ if (pdev->pClassData != NULL) 8004b94: 687b ldr r3, [r7, #4] 8004b96: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8004b9a: 2b00 cmp r3, #0 8004b9c: d00d beq.n 8004bba { ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Receive(hcdc->RxBuffer, &hcdc->RxLength); 8004b9e: 687b ldr r3, [r7, #4] 8004ba0: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc 8004ba4: 68db ldr r3, [r3, #12] 8004ba6: 68fa ldr r2, [r7, #12] 8004ba8: f8d2 0204 ldr.w r0, [r2, #516] ; 0x204 8004bac: 68fa ldr r2, [r7, #12] 8004bae: f502 7203 add.w r2, r2, #524 ; 0x20c 8004bb2: 4611 mov r1, r2 8004bb4: 4798 blx r3 return USBD_OK; 8004bb6: 2300 movs r3, #0 8004bb8: e000 b.n 8004bbc } else { return USBD_FAIL; 8004bba: 2302 movs r3, #2 } } 8004bbc: 4618 mov r0, r3 8004bbe: 3710 adds r7, #16 8004bc0: 46bd mov sp, r7 8004bc2: bd80 pop {r7, pc} 08004bc4 : * Handle EP0 Rx Ready event * @param pdev: device instance * @retval status */ static uint8_t USBD_CDC_EP0_RxReady(USBD_HandleTypeDef *pdev) { 8004bc4: b580 push {r7, lr} 8004bc6: b084 sub sp, #16 8004bc8: af00 add r7, sp, #0 8004bca: 6078 str r0, [r7, #4] USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData; 8004bcc: 687b ldr r3, [r7, #4] 8004bce: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8004bd2: 60fb str r3, [r7, #12] if ((pdev->pUserData != NULL) && (hcdc->CmdOpCode != 0xFFU)) 8004bd4: 687b ldr r3, [r7, #4] 8004bd6: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc 8004bda: 2b00 cmp r3, #0 8004bdc: d015 beq.n 8004c0a 8004bde: 68fb ldr r3, [r7, #12] 8004be0: f893 3200 ldrb.w r3, [r3, #512] ; 0x200 8004be4: 2bff cmp r3, #255 ; 0xff 8004be6: d010 beq.n 8004c0a { ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(hcdc->CmdOpCode, 8004be8: 687b ldr r3, [r7, #4] 8004bea: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc 8004bee: 689b ldr r3, [r3, #8] 8004bf0: 68fa ldr r2, [r7, #12] 8004bf2: f892 0200 ldrb.w r0, [r2, #512] ; 0x200 (uint8_t *)(void *)hcdc->data, 8004bf6: 68f9 ldr r1, [r7, #12] (uint16_t)hcdc->CmdLength); 8004bf8: 68fa ldr r2, [r7, #12] 8004bfa: f892 2201 ldrb.w r2, [r2, #513] ; 0x201 ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(hcdc->CmdOpCode, 8004bfe: b292 uxth r2, r2 8004c00: 4798 blx r3 hcdc->CmdOpCode = 0xFFU; 8004c02: 68fb ldr r3, [r7, #12] 8004c04: 22ff movs r2, #255 ; 0xff 8004c06: f883 2200 strb.w r2, [r3, #512] ; 0x200 } return USBD_OK; 8004c0a: 2300 movs r3, #0 } 8004c0c: 4618 mov r0, r3 8004c0e: 3710 adds r7, #16 8004c10: 46bd mov sp, r7 8004c12: bd80 pop {r7, pc} 08004c14 : * @param speed : current device speed * @param length : pointer data length * @retval pointer to descriptor buffer */ static uint8_t *USBD_CDC_GetFSCfgDesc(uint16_t *length) { 8004c14: b480 push {r7} 8004c16: b083 sub sp, #12 8004c18: af00 add r7, sp, #0 8004c1a: 6078 str r0, [r7, #4] *length = sizeof(USBD_CDC_CfgFSDesc); 8004c1c: 687b ldr r3, [r7, #4] 8004c1e: 2243 movs r2, #67 ; 0x43 8004c20: 801a strh r2, [r3, #0] return USBD_CDC_CfgFSDesc; 8004c22: 4b03 ldr r3, [pc, #12] ; (8004c30 ) } 8004c24: 4618 mov r0, r3 8004c26: 370c adds r7, #12 8004c28: 46bd mov sp, r7 8004c2a: bc80 pop {r7} 8004c2c: 4770 bx lr 8004c2e: bf00 nop 8004c30: 20000094 .word 0x20000094 08004c34 : * @param speed : current device speed * @param length : pointer data length * @retval pointer to descriptor buffer */ static uint8_t *USBD_CDC_GetHSCfgDesc(uint16_t *length) { 8004c34: b480 push {r7} 8004c36: b083 sub sp, #12 8004c38: af00 add r7, sp, #0 8004c3a: 6078 str r0, [r7, #4] *length = sizeof(USBD_CDC_CfgHSDesc); 8004c3c: 687b ldr r3, [r7, #4] 8004c3e: 2243 movs r2, #67 ; 0x43 8004c40: 801a strh r2, [r3, #0] return USBD_CDC_CfgHSDesc; 8004c42: 4b03 ldr r3, [pc, #12] ; (8004c50 ) } 8004c44: 4618 mov r0, r3 8004c46: 370c adds r7, #12 8004c48: 46bd mov sp, r7 8004c4a: bc80 pop {r7} 8004c4c: 4770 bx lr 8004c4e: bf00 nop 8004c50: 20000050 .word 0x20000050 08004c54 : * @param speed : current device speed * @param length : pointer data length * @retval pointer to descriptor buffer */ static uint8_t *USBD_CDC_GetOtherSpeedCfgDesc(uint16_t *length) { 8004c54: b480 push {r7} 8004c56: b083 sub sp, #12 8004c58: af00 add r7, sp, #0 8004c5a: 6078 str r0, [r7, #4] *length = sizeof(USBD_CDC_OtherSpeedCfgDesc); 8004c5c: 687b ldr r3, [r7, #4] 8004c5e: 2243 movs r2, #67 ; 0x43 8004c60: 801a strh r2, [r3, #0] return USBD_CDC_OtherSpeedCfgDesc; 8004c62: 4b03 ldr r3, [pc, #12] ; (8004c70 ) } 8004c64: 4618 mov r0, r3 8004c66: 370c adds r7, #12 8004c68: 46bd mov sp, r7 8004c6a: bc80 pop {r7} 8004c6c: 4770 bx lr 8004c6e: bf00 nop 8004c70: 200000d8 .word 0x200000d8 08004c74 : * return Device Qualifier descriptor * @param length : pointer data length * @retval pointer to descriptor buffer */ uint8_t *USBD_CDC_GetDeviceQualifierDescriptor(uint16_t *length) { 8004c74: b480 push {r7} 8004c76: b083 sub sp, #12 8004c78: af00 add r7, sp, #0 8004c7a: 6078 str r0, [r7, #4] *length = sizeof(USBD_CDC_DeviceQualifierDesc); 8004c7c: 687b ldr r3, [r7, #4] 8004c7e: 220a movs r2, #10 8004c80: 801a strh r2, [r3, #0] return USBD_CDC_DeviceQualifierDesc; 8004c82: 4b03 ldr r3, [pc, #12] ; (8004c90 ) } 8004c84: 4618 mov r0, r3 8004c86: 370c adds r7, #12 8004c88: 46bd mov sp, r7 8004c8a: bc80 pop {r7} 8004c8c: 4770 bx lr 8004c8e: bf00 nop 8004c90: 2000000c .word 0x2000000c 08004c94 : * @param fops: CD Interface callback * @retval status */ uint8_t USBD_CDC_RegisterInterface(USBD_HandleTypeDef *pdev, USBD_CDC_ItfTypeDef *fops) { 8004c94: b480 push {r7} 8004c96: b085 sub sp, #20 8004c98: af00 add r7, sp, #0 8004c9a: 6078 str r0, [r7, #4] 8004c9c: 6039 str r1, [r7, #0] uint8_t ret = USBD_FAIL; 8004c9e: 2302 movs r3, #2 8004ca0: 73fb strb r3, [r7, #15] if (fops != NULL) 8004ca2: 683b ldr r3, [r7, #0] 8004ca4: 2b00 cmp r3, #0 8004ca6: d005 beq.n 8004cb4 { pdev->pUserData = fops; 8004ca8: 687b ldr r3, [r7, #4] 8004caa: 683a ldr r2, [r7, #0] 8004cac: f8c3 22bc str.w r2, [r3, #700] ; 0x2bc ret = USBD_OK; 8004cb0: 2300 movs r3, #0 8004cb2: 73fb strb r3, [r7, #15] } return ret; 8004cb4: 7bfb ldrb r3, [r7, #15] } 8004cb6: 4618 mov r0, r3 8004cb8: 3714 adds r7, #20 8004cba: 46bd mov sp, r7 8004cbc: bc80 pop {r7} 8004cbe: 4770 bx lr 08004cc0 : * @retval status */ uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff, uint16_t length) { 8004cc0: b480 push {r7} 8004cc2: b087 sub sp, #28 8004cc4: af00 add r7, sp, #0 8004cc6: 60f8 str r0, [r7, #12] 8004cc8: 60b9 str r1, [r7, #8] 8004cca: 4613 mov r3, r2 8004ccc: 80fb strh r3, [r7, #6] USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData; 8004cce: 68fb ldr r3, [r7, #12] 8004cd0: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8004cd4: 617b str r3, [r7, #20] hcdc->TxBuffer = pbuff; 8004cd6: 697b ldr r3, [r7, #20] 8004cd8: 68ba ldr r2, [r7, #8] 8004cda: f8c3 2208 str.w r2, [r3, #520] ; 0x208 hcdc->TxLength = length; 8004cde: 88fa ldrh r2, [r7, #6] 8004ce0: 697b ldr r3, [r7, #20] 8004ce2: f8c3 2210 str.w r2, [r3, #528] ; 0x210 return USBD_OK; 8004ce6: 2300 movs r3, #0 } 8004ce8: 4618 mov r0, r3 8004cea: 371c adds r7, #28 8004cec: 46bd mov sp, r7 8004cee: bc80 pop {r7} 8004cf0: 4770 bx lr 08004cf2 : * @param pbuff: Rx Buffer * @retval status */ uint8_t USBD_CDC_SetRxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff) { 8004cf2: b480 push {r7} 8004cf4: b085 sub sp, #20 8004cf6: af00 add r7, sp, #0 8004cf8: 6078 str r0, [r7, #4] 8004cfa: 6039 str r1, [r7, #0] USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData; 8004cfc: 687b ldr r3, [r7, #4] 8004cfe: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8004d02: 60fb str r3, [r7, #12] hcdc->RxBuffer = pbuff; 8004d04: 68fb ldr r3, [r7, #12] 8004d06: 683a ldr r2, [r7, #0] 8004d08: f8c3 2204 str.w r2, [r3, #516] ; 0x204 return USBD_OK; 8004d0c: 2300 movs r3, #0 } 8004d0e: 4618 mov r0, r3 8004d10: 3714 adds r7, #20 8004d12: 46bd mov sp, r7 8004d14: bc80 pop {r7} 8004d16: 4770 bx lr 08004d18 : * prepare OUT Endpoint for reception * @param pdev: device instance * @retval status */ uint8_t USBD_CDC_ReceivePacket(USBD_HandleTypeDef *pdev) { 8004d18: b580 push {r7, lr} 8004d1a: b084 sub sp, #16 8004d1c: af00 add r7, sp, #0 8004d1e: 6078 str r0, [r7, #4] USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData; 8004d20: 687b ldr r3, [r7, #4] 8004d22: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8004d26: 60fb str r3, [r7, #12] /* Suspend or Resume USB Out process */ if (pdev->pClassData != NULL) 8004d28: 687b ldr r3, [r7, #4] 8004d2a: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8004d2e: 2b00 cmp r3, #0 8004d30: d017 beq.n 8004d62 { if (pdev->dev_speed == USBD_SPEED_HIGH) 8004d32: 687b ldr r3, [r7, #4] 8004d34: 7c1b ldrb r3, [r3, #16] 8004d36: 2b00 cmp r3, #0 8004d38: d109 bne.n 8004d4e { /* Prepare Out endpoint to receive next packet */ USBD_LL_PrepareReceive(pdev, 8004d3a: 68fb ldr r3, [r7, #12] 8004d3c: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204 8004d40: f44f 7300 mov.w r3, #512 ; 0x200 8004d44: 2101 movs r1, #1 8004d46: 6878 ldr r0, [r7, #4] 8004d48: f001 fc90 bl 800666c 8004d4c: e007 b.n 8004d5e CDC_DATA_HS_OUT_PACKET_SIZE); } else { /* Prepare Out endpoint to receive next packet */ USBD_LL_PrepareReceive(pdev, 8004d4e: 68fb ldr r3, [r7, #12] 8004d50: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204 8004d54: 2340 movs r3, #64 ; 0x40 8004d56: 2101 movs r1, #1 8004d58: 6878 ldr r0, [r7, #4] 8004d5a: f001 fc87 bl 800666c CDC_OUT_EP, hcdc->RxBuffer, CDC_DATA_FS_OUT_PACKET_SIZE); } return USBD_OK; 8004d5e: 2300 movs r3, #0 8004d60: e000 b.n 8004d64 } else { return USBD_FAIL; 8004d62: 2302 movs r3, #2 } } 8004d64: 4618 mov r0, r3 8004d66: 3710 adds r7, #16 8004d68: 46bd mov sp, r7 8004d6a: bd80 pop {r7, pc} 08004d6c : * @param id: Low level core index * @retval None */ USBD_StatusTypeDef USBD_Init(USBD_HandleTypeDef *pdev, USBD_DescriptorsTypeDef *pdesc, uint8_t id) { 8004d6c: b580 push {r7, lr} 8004d6e: b084 sub sp, #16 8004d70: af00 add r7, sp, #0 8004d72: 60f8 str r0, [r7, #12] 8004d74: 60b9 str r1, [r7, #8] 8004d76: 4613 mov r3, r2 8004d78: 71fb strb r3, [r7, #7] /* Check whether the USB Host handle is valid */ if (pdev == NULL) 8004d7a: 68fb ldr r3, [r7, #12] 8004d7c: 2b00 cmp r3, #0 8004d7e: d101 bne.n 8004d84 { #if (USBD_DEBUG_LEVEL > 1U) USBD_ErrLog("Invalid Device handle"); #endif return USBD_FAIL; 8004d80: 2302 movs r3, #2 8004d82: e01a b.n 8004dba } /* Unlink previous class*/ if (pdev->pClass != NULL) 8004d84: 68fb ldr r3, [r7, #12] 8004d86: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8004d8a: 2b00 cmp r3, #0 8004d8c: d003 beq.n 8004d96 { pdev->pClass = NULL; 8004d8e: 68fb ldr r3, [r7, #12] 8004d90: 2200 movs r2, #0 8004d92: f8c3 22b4 str.w r2, [r3, #692] ; 0x2b4 } /* Assign USBD Descriptors */ if (pdesc != NULL) 8004d96: 68bb ldr r3, [r7, #8] 8004d98: 2b00 cmp r3, #0 8004d9a: d003 beq.n 8004da4 { pdev->pDesc = pdesc; 8004d9c: 68fb ldr r3, [r7, #12] 8004d9e: 68ba ldr r2, [r7, #8] 8004da0: f8c3 22b0 str.w r2, [r3, #688] ; 0x2b0 } /* Set Device initial State */ pdev->dev_state = USBD_STATE_DEFAULT; 8004da4: 68fb ldr r3, [r7, #12] 8004da6: 2201 movs r2, #1 8004da8: f883 229c strb.w r2, [r3, #668] ; 0x29c pdev->id = id; 8004dac: 68fb ldr r3, [r7, #12] 8004dae: 79fa ldrb r2, [r7, #7] 8004db0: 701a strb r2, [r3, #0] /* Initialize low level driver */ USBD_LL_Init(pdev); 8004db2: 68f8 ldr r0, [r7, #12] 8004db4: f001 faf4 bl 80063a0 return USBD_OK; 8004db8: 2300 movs r3, #0 } 8004dba: 4618 mov r0, r3 8004dbc: 3710 adds r7, #16 8004dbe: 46bd mov sp, r7 8004dc0: bd80 pop {r7, pc} 08004dc2 : * @param pDevice : Device Handle * @param pclass: Class handle * @retval USBD Status */ USBD_StatusTypeDef USBD_RegisterClass(USBD_HandleTypeDef *pdev, USBD_ClassTypeDef *pclass) { 8004dc2: b480 push {r7} 8004dc4: b085 sub sp, #20 8004dc6: af00 add r7, sp, #0 8004dc8: 6078 str r0, [r7, #4] 8004dca: 6039 str r1, [r7, #0] USBD_StatusTypeDef status = USBD_OK; 8004dcc: 2300 movs r3, #0 8004dce: 73fb strb r3, [r7, #15] if (pclass != NULL) 8004dd0: 683b ldr r3, [r7, #0] 8004dd2: 2b00 cmp r3, #0 8004dd4: d006 beq.n 8004de4 { /* link the class to the USB Device handle */ pdev->pClass = pclass; 8004dd6: 687b ldr r3, [r7, #4] 8004dd8: 683a ldr r2, [r7, #0] 8004dda: f8c3 22b4 str.w r2, [r3, #692] ; 0x2b4 status = USBD_OK; 8004dde: 2300 movs r3, #0 8004de0: 73fb strb r3, [r7, #15] 8004de2: e001 b.n 8004de8 else { #if (USBD_DEBUG_LEVEL > 1U) USBD_ErrLog("Invalid Class handle"); #endif status = USBD_FAIL; 8004de4: 2302 movs r3, #2 8004de6: 73fb strb r3, [r7, #15] } return status; 8004de8: 7bfb ldrb r3, [r7, #15] } 8004dea: 4618 mov r0, r3 8004dec: 3714 adds r7, #20 8004dee: 46bd mov sp, r7 8004df0: bc80 pop {r7} 8004df2: 4770 bx lr 08004df4 : * Start the USB Device Core. * @param pdev: Device Handle * @retval USBD Status */ USBD_StatusTypeDef USBD_Start(USBD_HandleTypeDef *pdev) { 8004df4: b580 push {r7, lr} 8004df6: b082 sub sp, #8 8004df8: af00 add r7, sp, #0 8004dfa: 6078 str r0, [r7, #4] /* Start the low level driver */ USBD_LL_Start(pdev); 8004dfc: 6878 ldr r0, [r7, #4] 8004dfe: f001 fb29 bl 8006454 return USBD_OK; 8004e02: 2300 movs r3, #0 } 8004e04: 4618 mov r0, r3 8004e06: 3708 adds r7, #8 8004e08: 46bd mov sp, r7 8004e0a: bd80 pop {r7, pc} 08004e0c : * Launch test mode process * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_RunTestMode(USBD_HandleTypeDef *pdev) { 8004e0c: b480 push {r7} 8004e0e: b083 sub sp, #12 8004e10: af00 add r7, sp, #0 8004e12: 6078 str r0, [r7, #4] /* Prevent unused argument compilation warning */ UNUSED(pdev); return USBD_OK; 8004e14: 2300 movs r3, #0 } 8004e16: 4618 mov r0, r3 8004e18: 370c adds r7, #12 8004e1a: 46bd mov sp, r7 8004e1c: bc80 pop {r7} 8004e1e: 4770 bx lr 08004e20 : * @param cfgidx: configuration index * @retval status */ USBD_StatusTypeDef USBD_SetClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx) { 8004e20: b580 push {r7, lr} 8004e22: b084 sub sp, #16 8004e24: af00 add r7, sp, #0 8004e26: 6078 str r0, [r7, #4] 8004e28: 460b mov r3, r1 8004e2a: 70fb strb r3, [r7, #3] USBD_StatusTypeDef ret = USBD_FAIL; 8004e2c: 2302 movs r3, #2 8004e2e: 73fb strb r3, [r7, #15] if (pdev->pClass != NULL) 8004e30: 687b ldr r3, [r7, #4] 8004e32: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8004e36: 2b00 cmp r3, #0 8004e38: d00c beq.n 8004e54 { /* Set configuration and Start the Class*/ if (pdev->pClass->Init(pdev, cfgidx) == 0U) 8004e3a: 687b ldr r3, [r7, #4] 8004e3c: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8004e40: 681b ldr r3, [r3, #0] 8004e42: 78fa ldrb r2, [r7, #3] 8004e44: 4611 mov r1, r2 8004e46: 6878 ldr r0, [r7, #4] 8004e48: 4798 blx r3 8004e4a: 4603 mov r3, r0 8004e4c: 2b00 cmp r3, #0 8004e4e: d101 bne.n 8004e54 { ret = USBD_OK; 8004e50: 2300 movs r3, #0 8004e52: 73fb strb r3, [r7, #15] } } return ret; 8004e54: 7bfb ldrb r3, [r7, #15] } 8004e56: 4618 mov r0, r3 8004e58: 3710 adds r7, #16 8004e5a: 46bd mov sp, r7 8004e5c: bd80 pop {r7, pc} 08004e5e : * @param pdev: device instance * @param cfgidx: configuration index * @retval status: USBD_StatusTypeDef */ USBD_StatusTypeDef USBD_ClrClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx) { 8004e5e: b580 push {r7, lr} 8004e60: b082 sub sp, #8 8004e62: af00 add r7, sp, #0 8004e64: 6078 str r0, [r7, #4] 8004e66: 460b mov r3, r1 8004e68: 70fb strb r3, [r7, #3] /* Clear configuration and De-initialize the Class process*/ pdev->pClass->DeInit(pdev, cfgidx); 8004e6a: 687b ldr r3, [r7, #4] 8004e6c: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8004e70: 685b ldr r3, [r3, #4] 8004e72: 78fa ldrb r2, [r7, #3] 8004e74: 4611 mov r1, r2 8004e76: 6878 ldr r0, [r7, #4] 8004e78: 4798 blx r3 return USBD_OK; 8004e7a: 2300 movs r3, #0 } 8004e7c: 4618 mov r0, r3 8004e7e: 3708 adds r7, #8 8004e80: 46bd mov sp, r7 8004e82: bd80 pop {r7, pc} 08004e84 : * Handle the setup stage * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_SetupStage(USBD_HandleTypeDef *pdev, uint8_t *psetup) { 8004e84: b580 push {r7, lr} 8004e86: b082 sub sp, #8 8004e88: af00 add r7, sp, #0 8004e8a: 6078 str r0, [r7, #4] 8004e8c: 6039 str r1, [r7, #0] USBD_ParseSetupRequest(&pdev->request, psetup); 8004e8e: 687b ldr r3, [r7, #4] 8004e90: f503 732a add.w r3, r3, #680 ; 0x2a8 8004e94: 6839 ldr r1, [r7, #0] 8004e96: 4618 mov r0, r3 8004e98: f000 feca bl 8005c30 pdev->ep0_state = USBD_EP0_SETUP; 8004e9c: 687b ldr r3, [r7, #4] 8004e9e: 2201 movs r2, #1 8004ea0: f8c3 2294 str.w r2, [r3, #660] ; 0x294 pdev->ep0_data_len = pdev->request.wLength; 8004ea4: 687b ldr r3, [r7, #4] 8004ea6: f8b3 32ae ldrh.w r3, [r3, #686] ; 0x2ae 8004eaa: 461a mov r2, r3 8004eac: 687b ldr r3, [r7, #4] 8004eae: f8c3 2298 str.w r2, [r3, #664] ; 0x298 switch (pdev->request.bmRequest & 0x1FU) 8004eb2: 687b ldr r3, [r7, #4] 8004eb4: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 8004eb8: f003 031f and.w r3, r3, #31 8004ebc: 2b01 cmp r3, #1 8004ebe: d00c beq.n 8004eda 8004ec0: 2b01 cmp r3, #1 8004ec2: d302 bcc.n 8004eca 8004ec4: 2b02 cmp r3, #2 8004ec6: d010 beq.n 8004eea 8004ec8: e017 b.n 8004efa { case USB_REQ_RECIPIENT_DEVICE: USBD_StdDevReq(pdev, &pdev->request); 8004eca: 687b ldr r3, [r7, #4] 8004ecc: f503 732a add.w r3, r3, #680 ; 0x2a8 8004ed0: 4619 mov r1, r3 8004ed2: 6878 ldr r0, [r7, #4] 8004ed4: f000 f9ca bl 800526c break; 8004ed8: e01a b.n 8004f10 case USB_REQ_RECIPIENT_INTERFACE: USBD_StdItfReq(pdev, &pdev->request); 8004eda: 687b ldr r3, [r7, #4] 8004edc: f503 732a add.w r3, r3, #680 ; 0x2a8 8004ee0: 4619 mov r1, r3 8004ee2: 6878 ldr r0, [r7, #4] 8004ee4: f000 fa2c bl 8005340 break; 8004ee8: e012 b.n 8004f10 case USB_REQ_RECIPIENT_ENDPOINT: USBD_StdEPReq(pdev, &pdev->request); 8004eea: 687b ldr r3, [r7, #4] 8004eec: f503 732a add.w r3, r3, #680 ; 0x2a8 8004ef0: 4619 mov r1, r3 8004ef2: 6878 ldr r0, [r7, #4] 8004ef4: f000 fa6a bl 80053cc break; 8004ef8: e00a b.n 8004f10 default: USBD_LL_StallEP(pdev, (pdev->request.bmRequest & 0x80U)); 8004efa: 687b ldr r3, [r7, #4] 8004efc: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 8004f00: f023 037f bic.w r3, r3, #127 ; 0x7f 8004f04: b2db uxtb r3, r3 8004f06: 4619 mov r1, r3 8004f08: 6878 ldr r0, [r7, #4] 8004f0a: f001 fb03 bl 8006514 break; 8004f0e: bf00 nop } return USBD_OK; 8004f10: 2300 movs r3, #0 } 8004f12: 4618 mov r0, r3 8004f14: 3708 adds r7, #8 8004f16: 46bd mov sp, r7 8004f18: bd80 pop {r7, pc} 08004f1a : * @param epnum: endpoint index * @retval status */ USBD_StatusTypeDef USBD_LL_DataOutStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata) { 8004f1a: b580 push {r7, lr} 8004f1c: b086 sub sp, #24 8004f1e: af00 add r7, sp, #0 8004f20: 60f8 str r0, [r7, #12] 8004f22: 460b mov r3, r1 8004f24: 607a str r2, [r7, #4] 8004f26: 72fb strb r3, [r7, #11] USBD_EndpointTypeDef *pep; if (epnum == 0U) 8004f28: 7afb ldrb r3, [r7, #11] 8004f2a: 2b00 cmp r3, #0 8004f2c: d14b bne.n 8004fc6 { pep = &pdev->ep_out[0]; 8004f2e: 68fb ldr r3, [r7, #12] 8004f30: f503 73aa add.w r3, r3, #340 ; 0x154 8004f34: 617b str r3, [r7, #20] if (pdev->ep0_state == USBD_EP0_DATA_OUT) 8004f36: 68fb ldr r3, [r7, #12] 8004f38: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294 8004f3c: 2b03 cmp r3, #3 8004f3e: d134 bne.n 8004faa { if (pep->rem_length > pep->maxpacket) 8004f40: 697b ldr r3, [r7, #20] 8004f42: 68da ldr r2, [r3, #12] 8004f44: 697b ldr r3, [r7, #20] 8004f46: 691b ldr r3, [r3, #16] 8004f48: 429a cmp r2, r3 8004f4a: d919 bls.n 8004f80 { pep->rem_length -= pep->maxpacket; 8004f4c: 697b ldr r3, [r7, #20] 8004f4e: 68da ldr r2, [r3, #12] 8004f50: 697b ldr r3, [r7, #20] 8004f52: 691b ldr r3, [r3, #16] 8004f54: 1ad2 subs r2, r2, r3 8004f56: 697b ldr r3, [r7, #20] 8004f58: 60da str r2, [r3, #12] USBD_CtlContinueRx(pdev, pdata, (uint16_t)MIN(pep->rem_length, pep->maxpacket)); 8004f5a: 697b ldr r3, [r7, #20] 8004f5c: 68da ldr r2, [r3, #12] 8004f5e: 697b ldr r3, [r7, #20] 8004f60: 691b ldr r3, [r3, #16] USBD_CtlContinueRx(pdev, pdata, 8004f62: 429a cmp r2, r3 8004f64: d203 bcs.n 8004f6e (uint16_t)MIN(pep->rem_length, pep->maxpacket)); 8004f66: 697b ldr r3, [r7, #20] 8004f68: 68db ldr r3, [r3, #12] USBD_CtlContinueRx(pdev, pdata, 8004f6a: b29b uxth r3, r3 8004f6c: e002 b.n 8004f74 (uint16_t)MIN(pep->rem_length, pep->maxpacket)); 8004f6e: 697b ldr r3, [r7, #20] 8004f70: 691b ldr r3, [r3, #16] USBD_CtlContinueRx(pdev, pdata, 8004f72: b29b uxth r3, r3 8004f74: 461a mov r2, r3 8004f76: 6879 ldr r1, [r7, #4] 8004f78: 68f8 ldr r0, [r7, #12] 8004f7a: f000 ff4b bl 8005e14 8004f7e: e038 b.n 8004ff2 } else { if ((pdev->pClass->EP0_RxReady != NULL) && 8004f80: 68fb ldr r3, [r7, #12] 8004f82: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8004f86: 691b ldr r3, [r3, #16] 8004f88: 2b00 cmp r3, #0 8004f8a: d00a beq.n 8004fa2 (pdev->dev_state == USBD_STATE_CONFIGURED)) 8004f8c: 68fb ldr r3, [r7, #12] 8004f8e: f893 329c ldrb.w r3, [r3, #668] ; 0x29c if ((pdev->pClass->EP0_RxReady != NULL) && 8004f92: 2b03 cmp r3, #3 8004f94: d105 bne.n 8004fa2 { pdev->pClass->EP0_RxReady(pdev); 8004f96: 68fb ldr r3, [r7, #12] 8004f98: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8004f9c: 691b ldr r3, [r3, #16] 8004f9e: 68f8 ldr r0, [r7, #12] 8004fa0: 4798 blx r3 } USBD_CtlSendStatus(pdev); 8004fa2: 68f8 ldr r0, [r7, #12] 8004fa4: f000 ff48 bl 8005e38 8004fa8: e023 b.n 8004ff2 } } else { if (pdev->ep0_state == USBD_EP0_STATUS_OUT) 8004faa: 68fb ldr r3, [r7, #12] 8004fac: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294 8004fb0: 2b05 cmp r3, #5 8004fb2: d11e bne.n 8004ff2 { /* * STATUS PHASE completed, update ep0_state to idle */ pdev->ep0_state = USBD_EP0_IDLE; 8004fb4: 68fb ldr r3, [r7, #12] 8004fb6: 2200 movs r2, #0 8004fb8: f8c3 2294 str.w r2, [r3, #660] ; 0x294 USBD_LL_StallEP(pdev, 0U); 8004fbc: 2100 movs r1, #0 8004fbe: 68f8 ldr r0, [r7, #12] 8004fc0: f001 faa8 bl 8006514 8004fc4: e015 b.n 8004ff2 } } } else if ((pdev->pClass->DataOut != NULL) && 8004fc6: 68fb ldr r3, [r7, #12] 8004fc8: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8004fcc: 699b ldr r3, [r3, #24] 8004fce: 2b00 cmp r3, #0 8004fd0: d00d beq.n 8004fee (pdev->dev_state == USBD_STATE_CONFIGURED)) 8004fd2: 68fb ldr r3, [r7, #12] 8004fd4: f893 329c ldrb.w r3, [r3, #668] ; 0x29c else if ((pdev->pClass->DataOut != NULL) && 8004fd8: 2b03 cmp r3, #3 8004fda: d108 bne.n 8004fee { pdev->pClass->DataOut(pdev, epnum); 8004fdc: 68fb ldr r3, [r7, #12] 8004fde: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8004fe2: 699b ldr r3, [r3, #24] 8004fe4: 7afa ldrb r2, [r7, #11] 8004fe6: 4611 mov r1, r2 8004fe8: 68f8 ldr r0, [r7, #12] 8004fea: 4798 blx r3 8004fec: e001 b.n 8004ff2 } else { /* should never be in this condition */ return USBD_FAIL; 8004fee: 2302 movs r3, #2 8004ff0: e000 b.n 8004ff4 } return USBD_OK; 8004ff2: 2300 movs r3, #0 } 8004ff4: 4618 mov r0, r3 8004ff6: 3718 adds r7, #24 8004ff8: 46bd mov sp, r7 8004ffa: bd80 pop {r7, pc} 08004ffc : * @param epnum: endpoint index * @retval status */ USBD_StatusTypeDef USBD_LL_DataInStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata) { 8004ffc: b580 push {r7, lr} 8004ffe: b086 sub sp, #24 8005000: af00 add r7, sp, #0 8005002: 60f8 str r0, [r7, #12] 8005004: 460b mov r3, r1 8005006: 607a str r2, [r7, #4] 8005008: 72fb strb r3, [r7, #11] USBD_EndpointTypeDef *pep; if (epnum == 0U) 800500a: 7afb ldrb r3, [r7, #11] 800500c: 2b00 cmp r3, #0 800500e: d17f bne.n 8005110 { pep = &pdev->ep_in[0]; 8005010: 68fb ldr r3, [r7, #12] 8005012: 3314 adds r3, #20 8005014: 617b str r3, [r7, #20] if (pdev->ep0_state == USBD_EP0_DATA_IN) 8005016: 68fb ldr r3, [r7, #12] 8005018: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294 800501c: 2b02 cmp r3, #2 800501e: d15c bne.n 80050da { if (pep->rem_length > pep->maxpacket) 8005020: 697b ldr r3, [r7, #20] 8005022: 68da ldr r2, [r3, #12] 8005024: 697b ldr r3, [r7, #20] 8005026: 691b ldr r3, [r3, #16] 8005028: 429a cmp r2, r3 800502a: d915 bls.n 8005058 { pep->rem_length -= pep->maxpacket; 800502c: 697b ldr r3, [r7, #20] 800502e: 68da ldr r2, [r3, #12] 8005030: 697b ldr r3, [r7, #20] 8005032: 691b ldr r3, [r3, #16] 8005034: 1ad2 subs r2, r2, r3 8005036: 697b ldr r3, [r7, #20] 8005038: 60da str r2, [r3, #12] USBD_CtlContinueSendData(pdev, pdata, (uint16_t)pep->rem_length); 800503a: 697b ldr r3, [r7, #20] 800503c: 68db ldr r3, [r3, #12] 800503e: b29b uxth r3, r3 8005040: 461a mov r2, r3 8005042: 6879 ldr r1, [r7, #4] 8005044: 68f8 ldr r0, [r7, #12] 8005046: f000 feb5 bl 8005db4 /* Prepare endpoint for premature end of transfer */ USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U); 800504a: 2300 movs r3, #0 800504c: 2200 movs r2, #0 800504e: 2100 movs r1, #0 8005050: 68f8 ldr r0, [r7, #12] 8005052: f001 fb0b bl 800666c 8005056: e04e b.n 80050f6 } else { /* last packet is MPS multiple, so send ZLP packet */ if ((pep->total_length % pep->maxpacket == 0U) && 8005058: 697b ldr r3, [r7, #20] 800505a: 689b ldr r3, [r3, #8] 800505c: 697a ldr r2, [r7, #20] 800505e: 6912 ldr r2, [r2, #16] 8005060: fbb3 f1f2 udiv r1, r3, r2 8005064: fb02 f201 mul.w r2, r2, r1 8005068: 1a9b subs r3, r3, r2 800506a: 2b00 cmp r3, #0 800506c: d11c bne.n 80050a8 (pep->total_length >= pep->maxpacket) && 800506e: 697b ldr r3, [r7, #20] 8005070: 689a ldr r2, [r3, #8] 8005072: 697b ldr r3, [r7, #20] 8005074: 691b ldr r3, [r3, #16] if ((pep->total_length % pep->maxpacket == 0U) && 8005076: 429a cmp r2, r3 8005078: d316 bcc.n 80050a8 (pep->total_length < pdev->ep0_data_len)) 800507a: 697b ldr r3, [r7, #20] 800507c: 689a ldr r2, [r3, #8] 800507e: 68fb ldr r3, [r7, #12] 8005080: f8d3 3298 ldr.w r3, [r3, #664] ; 0x298 (pep->total_length >= pep->maxpacket) && 8005084: 429a cmp r2, r3 8005086: d20f bcs.n 80050a8 { USBD_CtlContinueSendData(pdev, NULL, 0U); 8005088: 2200 movs r2, #0 800508a: 2100 movs r1, #0 800508c: 68f8 ldr r0, [r7, #12] 800508e: f000 fe91 bl 8005db4 pdev->ep0_data_len = 0U; 8005092: 68fb ldr r3, [r7, #12] 8005094: 2200 movs r2, #0 8005096: f8c3 2298 str.w r2, [r3, #664] ; 0x298 /* Prepare endpoint for premature end of transfer */ USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U); 800509a: 2300 movs r3, #0 800509c: 2200 movs r2, #0 800509e: 2100 movs r1, #0 80050a0: 68f8 ldr r0, [r7, #12] 80050a2: f001 fae3 bl 800666c 80050a6: e026 b.n 80050f6 } else { if ((pdev->pClass->EP0_TxSent != NULL) && 80050a8: 68fb ldr r3, [r7, #12] 80050aa: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 80050ae: 68db ldr r3, [r3, #12] 80050b0: 2b00 cmp r3, #0 80050b2: d00a beq.n 80050ca (pdev->dev_state == USBD_STATE_CONFIGURED)) 80050b4: 68fb ldr r3, [r7, #12] 80050b6: f893 329c ldrb.w r3, [r3, #668] ; 0x29c if ((pdev->pClass->EP0_TxSent != NULL) && 80050ba: 2b03 cmp r3, #3 80050bc: d105 bne.n 80050ca { pdev->pClass->EP0_TxSent(pdev); 80050be: 68fb ldr r3, [r7, #12] 80050c0: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 80050c4: 68db ldr r3, [r3, #12] 80050c6: 68f8 ldr r0, [r7, #12] 80050c8: 4798 blx r3 } USBD_LL_StallEP(pdev, 0x80U); 80050ca: 2180 movs r1, #128 ; 0x80 80050cc: 68f8 ldr r0, [r7, #12] 80050ce: f001 fa21 bl 8006514 USBD_CtlReceiveStatus(pdev); 80050d2: 68f8 ldr r0, [r7, #12] 80050d4: f000 fec3 bl 8005e5e 80050d8: e00d b.n 80050f6 } } } else { if ((pdev->ep0_state == USBD_EP0_STATUS_IN) || 80050da: 68fb ldr r3, [r7, #12] 80050dc: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294 80050e0: 2b04 cmp r3, #4 80050e2: d004 beq.n 80050ee (pdev->ep0_state == USBD_EP0_IDLE)) 80050e4: 68fb ldr r3, [r7, #12] 80050e6: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294 if ((pdev->ep0_state == USBD_EP0_STATUS_IN) || 80050ea: 2b00 cmp r3, #0 80050ec: d103 bne.n 80050f6 { USBD_LL_StallEP(pdev, 0x80U); 80050ee: 2180 movs r1, #128 ; 0x80 80050f0: 68f8 ldr r0, [r7, #12] 80050f2: f001 fa0f bl 8006514 } } if (pdev->dev_test_mode == 1U) 80050f6: 68fb ldr r3, [r7, #12] 80050f8: f893 32a0 ldrb.w r3, [r3, #672] ; 0x2a0 80050fc: 2b01 cmp r3, #1 80050fe: d11d bne.n 800513c { USBD_RunTestMode(pdev); 8005100: 68f8 ldr r0, [r7, #12] 8005102: f7ff fe83 bl 8004e0c pdev->dev_test_mode = 0U; 8005106: 68fb ldr r3, [r7, #12] 8005108: 2200 movs r2, #0 800510a: f883 22a0 strb.w r2, [r3, #672] ; 0x2a0 800510e: e015 b.n 800513c } } else if ((pdev->pClass->DataIn != NULL) && 8005110: 68fb ldr r3, [r7, #12] 8005112: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8005116: 695b ldr r3, [r3, #20] 8005118: 2b00 cmp r3, #0 800511a: d00d beq.n 8005138 (pdev->dev_state == USBD_STATE_CONFIGURED)) 800511c: 68fb ldr r3, [r7, #12] 800511e: f893 329c ldrb.w r3, [r3, #668] ; 0x29c else if ((pdev->pClass->DataIn != NULL) && 8005122: 2b03 cmp r3, #3 8005124: d108 bne.n 8005138 { pdev->pClass->DataIn(pdev, epnum); 8005126: 68fb ldr r3, [r7, #12] 8005128: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 800512c: 695b ldr r3, [r3, #20] 800512e: 7afa ldrb r2, [r7, #11] 8005130: 4611 mov r1, r2 8005132: 68f8 ldr r0, [r7, #12] 8005134: 4798 blx r3 8005136: e001 b.n 800513c } else { /* should never be in this condition */ return USBD_FAIL; 8005138: 2302 movs r3, #2 800513a: e000 b.n 800513e } return USBD_OK; 800513c: 2300 movs r3, #0 } 800513e: 4618 mov r0, r3 8005140: 3718 adds r7, #24 8005142: 46bd mov sp, r7 8005144: bd80 pop {r7, pc} 08005146 : * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_Reset(USBD_HandleTypeDef *pdev) { 8005146: b580 push {r7, lr} 8005148: b082 sub sp, #8 800514a: af00 add r7, sp, #0 800514c: 6078 str r0, [r7, #4] /* Open EP0 OUT */ USBD_LL_OpenEP(pdev, 0x00U, USBD_EP_TYPE_CTRL, USB_MAX_EP0_SIZE); 800514e: 2340 movs r3, #64 ; 0x40 8005150: 2200 movs r2, #0 8005152: 2100 movs r1, #0 8005154: 6878 ldr r0, [r7, #4] 8005156: f001 f998 bl 800648a pdev->ep_out[0x00U & 0xFU].is_used = 1U; 800515a: 687b ldr r3, [r7, #4] 800515c: 2201 movs r2, #1 800515e: f8c3 2158 str.w r2, [r3, #344] ; 0x158 pdev->ep_out[0].maxpacket = USB_MAX_EP0_SIZE; 8005162: 687b ldr r3, [r7, #4] 8005164: 2240 movs r2, #64 ; 0x40 8005166: f8c3 2164 str.w r2, [r3, #356] ; 0x164 /* Open EP0 IN */ USBD_LL_OpenEP(pdev, 0x80U, USBD_EP_TYPE_CTRL, USB_MAX_EP0_SIZE); 800516a: 2340 movs r3, #64 ; 0x40 800516c: 2200 movs r2, #0 800516e: 2180 movs r1, #128 ; 0x80 8005170: 6878 ldr r0, [r7, #4] 8005172: f001 f98a bl 800648a pdev->ep_in[0x80U & 0xFU].is_used = 1U; 8005176: 687b ldr r3, [r7, #4] 8005178: 2201 movs r2, #1 800517a: 619a str r2, [r3, #24] pdev->ep_in[0].maxpacket = USB_MAX_EP0_SIZE; 800517c: 687b ldr r3, [r7, #4] 800517e: 2240 movs r2, #64 ; 0x40 8005180: 625a str r2, [r3, #36] ; 0x24 /* Upon Reset call user call back */ pdev->dev_state = USBD_STATE_DEFAULT; 8005182: 687b ldr r3, [r7, #4] 8005184: 2201 movs r2, #1 8005186: f883 229c strb.w r2, [r3, #668] ; 0x29c pdev->ep0_state = USBD_EP0_IDLE; 800518a: 687b ldr r3, [r7, #4] 800518c: 2200 movs r2, #0 800518e: f8c3 2294 str.w r2, [r3, #660] ; 0x294 pdev->dev_config = 0U; 8005192: 687b ldr r3, [r7, #4] 8005194: 2200 movs r2, #0 8005196: 605a str r2, [r3, #4] pdev->dev_remote_wakeup = 0U; 8005198: 687b ldr r3, [r7, #4] 800519a: 2200 movs r2, #0 800519c: f8c3 22a4 str.w r2, [r3, #676] ; 0x2a4 if (pdev->pClassData) 80051a0: 687b ldr r3, [r7, #4] 80051a2: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 80051a6: 2b00 cmp r3, #0 80051a8: d009 beq.n 80051be { pdev->pClass->DeInit(pdev, (uint8_t)pdev->dev_config); 80051aa: 687b ldr r3, [r7, #4] 80051ac: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 80051b0: 685b ldr r3, [r3, #4] 80051b2: 687a ldr r2, [r7, #4] 80051b4: 6852 ldr r2, [r2, #4] 80051b6: b2d2 uxtb r2, r2 80051b8: 4611 mov r1, r2 80051ba: 6878 ldr r0, [r7, #4] 80051bc: 4798 blx r3 } return USBD_OK; 80051be: 2300 movs r3, #0 } 80051c0: 4618 mov r0, r3 80051c2: 3708 adds r7, #8 80051c4: 46bd mov sp, r7 80051c6: bd80 pop {r7, pc} 080051c8 : * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_SetSpeed(USBD_HandleTypeDef *pdev, USBD_SpeedTypeDef speed) { 80051c8: b480 push {r7} 80051ca: b083 sub sp, #12 80051cc: af00 add r7, sp, #0 80051ce: 6078 str r0, [r7, #4] 80051d0: 460b mov r3, r1 80051d2: 70fb strb r3, [r7, #3] pdev->dev_speed = speed; 80051d4: 687b ldr r3, [r7, #4] 80051d6: 78fa ldrb r2, [r7, #3] 80051d8: 741a strb r2, [r3, #16] return USBD_OK; 80051da: 2300 movs r3, #0 } 80051dc: 4618 mov r0, r3 80051de: 370c adds r7, #12 80051e0: 46bd mov sp, r7 80051e2: bc80 pop {r7} 80051e4: 4770 bx lr 080051e6 : * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_Suspend(USBD_HandleTypeDef *pdev) { 80051e6: b480 push {r7} 80051e8: b083 sub sp, #12 80051ea: af00 add r7, sp, #0 80051ec: 6078 str r0, [r7, #4] pdev->dev_old_state = pdev->dev_state; 80051ee: 687b ldr r3, [r7, #4] 80051f0: f893 229c ldrb.w r2, [r3, #668] ; 0x29c 80051f4: 687b ldr r3, [r7, #4] 80051f6: f883 229d strb.w r2, [r3, #669] ; 0x29d pdev->dev_state = USBD_STATE_SUSPENDED; 80051fa: 687b ldr r3, [r7, #4] 80051fc: 2204 movs r2, #4 80051fe: f883 229c strb.w r2, [r3, #668] ; 0x29c return USBD_OK; 8005202: 2300 movs r3, #0 } 8005204: 4618 mov r0, r3 8005206: 370c adds r7, #12 8005208: 46bd mov sp, r7 800520a: bc80 pop {r7} 800520c: 4770 bx lr 0800520e : * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_Resume(USBD_HandleTypeDef *pdev) { 800520e: b480 push {r7} 8005210: b083 sub sp, #12 8005212: af00 add r7, sp, #0 8005214: 6078 str r0, [r7, #4] if (pdev->dev_state == USBD_STATE_SUSPENDED) 8005216: 687b ldr r3, [r7, #4] 8005218: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 800521c: 2b04 cmp r3, #4 800521e: d105 bne.n 800522c { pdev->dev_state = pdev->dev_old_state; 8005220: 687b ldr r3, [r7, #4] 8005222: f893 229d ldrb.w r2, [r3, #669] ; 0x29d 8005226: 687b ldr r3, [r7, #4] 8005228: f883 229c strb.w r2, [r3, #668] ; 0x29c } return USBD_OK; 800522c: 2300 movs r3, #0 } 800522e: 4618 mov r0, r3 8005230: 370c adds r7, #12 8005232: 46bd mov sp, r7 8005234: bc80 pop {r7} 8005236: 4770 bx lr 08005238 : * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_SOF(USBD_HandleTypeDef *pdev) { 8005238: b580 push {r7, lr} 800523a: b082 sub sp, #8 800523c: af00 add r7, sp, #0 800523e: 6078 str r0, [r7, #4] if (pdev->dev_state == USBD_STATE_CONFIGURED) 8005240: 687b ldr r3, [r7, #4] 8005242: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8005246: 2b03 cmp r3, #3 8005248: d10b bne.n 8005262 { if (pdev->pClass->SOF != NULL) 800524a: 687b ldr r3, [r7, #4] 800524c: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8005250: 69db ldr r3, [r3, #28] 8005252: 2b00 cmp r3, #0 8005254: d005 beq.n 8005262 { pdev->pClass->SOF(pdev); 8005256: 687b ldr r3, [r7, #4] 8005258: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 800525c: 69db ldr r3, [r3, #28] 800525e: 6878 ldr r0, [r7, #4] 8005260: 4798 blx r3 } } return USBD_OK; 8005262: 2300 movs r3, #0 } 8005264: 4618 mov r0, r3 8005266: 3708 adds r7, #8 8005268: 46bd mov sp, r7 800526a: bd80 pop {r7, pc} 0800526c : * @param req: usb request * @retval status */ USBD_StatusTypeDef USBD_StdDevReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 800526c: b580 push {r7, lr} 800526e: b084 sub sp, #16 8005270: af00 add r7, sp, #0 8005272: 6078 str r0, [r7, #4] 8005274: 6039 str r1, [r7, #0] USBD_StatusTypeDef ret = USBD_OK; 8005276: 2300 movs r3, #0 8005278: 73fb strb r3, [r7, #15] switch (req->bmRequest & USB_REQ_TYPE_MASK) 800527a: 683b ldr r3, [r7, #0] 800527c: 781b ldrb r3, [r3, #0] 800527e: f003 0360 and.w r3, r3, #96 ; 0x60 8005282: 2b20 cmp r3, #32 8005284: d004 beq.n 8005290 8005286: 2b40 cmp r3, #64 ; 0x40 8005288: d002 beq.n 8005290 800528a: 2b00 cmp r3, #0 800528c: d008 beq.n 80052a0 800528e: e04c b.n 800532a { case USB_REQ_TYPE_CLASS: case USB_REQ_TYPE_VENDOR: pdev->pClass->Setup(pdev, req); 8005290: 687b ldr r3, [r7, #4] 8005292: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8005296: 689b ldr r3, [r3, #8] 8005298: 6839 ldr r1, [r7, #0] 800529a: 6878 ldr r0, [r7, #4] 800529c: 4798 blx r3 break; 800529e: e049 b.n 8005334 case USB_REQ_TYPE_STANDARD: switch (req->bRequest) 80052a0: 683b ldr r3, [r7, #0] 80052a2: 785b ldrb r3, [r3, #1] 80052a4: 2b09 cmp r3, #9 80052a6: d83a bhi.n 800531e 80052a8: a201 add r2, pc, #4 ; (adr r2, 80052b0 ) 80052aa: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80052ae: bf00 nop 80052b0: 08005301 .word 0x08005301 80052b4: 08005315 .word 0x08005315 80052b8: 0800531f .word 0x0800531f 80052bc: 0800530b .word 0x0800530b 80052c0: 0800531f .word 0x0800531f 80052c4: 080052e3 .word 0x080052e3 80052c8: 080052d9 .word 0x080052d9 80052cc: 0800531f .word 0x0800531f 80052d0: 080052f7 .word 0x080052f7 80052d4: 080052ed .word 0x080052ed { case USB_REQ_GET_DESCRIPTOR: USBD_GetDescriptor(pdev, req); 80052d8: 6839 ldr r1, [r7, #0] 80052da: 6878 ldr r0, [r7, #4] 80052dc: f000 f9d4 bl 8005688 break; 80052e0: e022 b.n 8005328 case USB_REQ_SET_ADDRESS: USBD_SetAddress(pdev, req); 80052e2: 6839 ldr r1, [r7, #0] 80052e4: 6878 ldr r0, [r7, #4] 80052e6: f000 fb37 bl 8005958 break; 80052ea: e01d b.n 8005328 case USB_REQ_SET_CONFIGURATION: USBD_SetConfig(pdev, req); 80052ec: 6839 ldr r1, [r7, #0] 80052ee: 6878 ldr r0, [r7, #4] 80052f0: f000 fb74 bl 80059dc break; 80052f4: e018 b.n 8005328 case USB_REQ_GET_CONFIGURATION: USBD_GetConfig(pdev, req); 80052f6: 6839 ldr r1, [r7, #0] 80052f8: 6878 ldr r0, [r7, #4] 80052fa: f000 fbfd bl 8005af8 break; 80052fe: e013 b.n 8005328 case USB_REQ_GET_STATUS: USBD_GetStatus(pdev, req); 8005300: 6839 ldr r1, [r7, #0] 8005302: 6878 ldr r0, [r7, #4] 8005304: f000 fc2c bl 8005b60 break; 8005308: e00e b.n 8005328 case USB_REQ_SET_FEATURE: USBD_SetFeature(pdev, req); 800530a: 6839 ldr r1, [r7, #0] 800530c: 6878 ldr r0, [r7, #4] 800530e: f000 fc5a bl 8005bc6 break; 8005312: e009 b.n 8005328 case USB_REQ_CLEAR_FEATURE: USBD_ClrFeature(pdev, req); 8005314: 6839 ldr r1, [r7, #0] 8005316: 6878 ldr r0, [r7, #4] 8005318: f000 fc69 bl 8005bee break; 800531c: e004 b.n 8005328 default: USBD_CtlError(pdev, req); 800531e: 6839 ldr r1, [r7, #0] 8005320: 6878 ldr r0, [r7, #4] 8005322: f000 fcc1 bl 8005ca8 break; 8005326: bf00 nop } break; 8005328: e004 b.n 8005334 default: USBD_CtlError(pdev, req); 800532a: 6839 ldr r1, [r7, #0] 800532c: 6878 ldr r0, [r7, #4] 800532e: f000 fcbb bl 8005ca8 break; 8005332: bf00 nop } return ret; 8005334: 7bfb ldrb r3, [r7, #15] } 8005336: 4618 mov r0, r3 8005338: 3710 adds r7, #16 800533a: 46bd mov sp, r7 800533c: bd80 pop {r7, pc} 800533e: bf00 nop 08005340 : * @param req: usb request * @retval status */ USBD_StatusTypeDef USBD_StdItfReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8005340: b580 push {r7, lr} 8005342: b084 sub sp, #16 8005344: af00 add r7, sp, #0 8005346: 6078 str r0, [r7, #4] 8005348: 6039 str r1, [r7, #0] USBD_StatusTypeDef ret = USBD_OK; 800534a: 2300 movs r3, #0 800534c: 73fb strb r3, [r7, #15] switch (req->bmRequest & USB_REQ_TYPE_MASK) 800534e: 683b ldr r3, [r7, #0] 8005350: 781b ldrb r3, [r3, #0] 8005352: f003 0360 and.w r3, r3, #96 ; 0x60 8005356: 2b20 cmp r3, #32 8005358: d003 beq.n 8005362 800535a: 2b40 cmp r3, #64 ; 0x40 800535c: d001 beq.n 8005362 800535e: 2b00 cmp r3, #0 8005360: d12a bne.n 80053b8 { case USB_REQ_TYPE_CLASS: case USB_REQ_TYPE_VENDOR: case USB_REQ_TYPE_STANDARD: switch (pdev->dev_state) 8005362: 687b ldr r3, [r7, #4] 8005364: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8005368: 3b01 subs r3, #1 800536a: 2b02 cmp r3, #2 800536c: d81d bhi.n 80053aa { case USBD_STATE_DEFAULT: case USBD_STATE_ADDRESSED: case USBD_STATE_CONFIGURED: if (LOBYTE(req->wIndex) <= USBD_MAX_NUM_INTERFACES) 800536e: 683b ldr r3, [r7, #0] 8005370: 889b ldrh r3, [r3, #4] 8005372: b2db uxtb r3, r3 8005374: 2b01 cmp r3, #1 8005376: d813 bhi.n 80053a0 { ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req); 8005378: 687b ldr r3, [r7, #4] 800537a: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 800537e: 689b ldr r3, [r3, #8] 8005380: 6839 ldr r1, [r7, #0] 8005382: 6878 ldr r0, [r7, #4] 8005384: 4798 blx r3 8005386: 4603 mov r3, r0 8005388: 73fb strb r3, [r7, #15] if ((req->wLength == 0U) && (ret == USBD_OK)) 800538a: 683b ldr r3, [r7, #0] 800538c: 88db ldrh r3, [r3, #6] 800538e: 2b00 cmp r3, #0 8005390: d110 bne.n 80053b4 8005392: 7bfb ldrb r3, [r7, #15] 8005394: 2b00 cmp r3, #0 8005396: d10d bne.n 80053b4 { USBD_CtlSendStatus(pdev); 8005398: 6878 ldr r0, [r7, #4] 800539a: f000 fd4d bl 8005e38 } else { USBD_CtlError(pdev, req); } break; 800539e: e009 b.n 80053b4 USBD_CtlError(pdev, req); 80053a0: 6839 ldr r1, [r7, #0] 80053a2: 6878 ldr r0, [r7, #4] 80053a4: f000 fc80 bl 8005ca8 break; 80053a8: e004 b.n 80053b4 default: USBD_CtlError(pdev, req); 80053aa: 6839 ldr r1, [r7, #0] 80053ac: 6878 ldr r0, [r7, #4] 80053ae: f000 fc7b bl 8005ca8 break; 80053b2: e000 b.n 80053b6 break; 80053b4: bf00 nop } break; 80053b6: e004 b.n 80053c2 default: USBD_CtlError(pdev, req); 80053b8: 6839 ldr r1, [r7, #0] 80053ba: 6878 ldr r0, [r7, #4] 80053bc: f000 fc74 bl 8005ca8 break; 80053c0: bf00 nop } return USBD_OK; 80053c2: 2300 movs r3, #0 } 80053c4: 4618 mov r0, r3 80053c6: 3710 adds r7, #16 80053c8: 46bd mov sp, r7 80053ca: bd80 pop {r7, pc} 080053cc : * @param req: usb request * @retval status */ USBD_StatusTypeDef USBD_StdEPReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 80053cc: b580 push {r7, lr} 80053ce: b084 sub sp, #16 80053d0: af00 add r7, sp, #0 80053d2: 6078 str r0, [r7, #4] 80053d4: 6039 str r1, [r7, #0] USBD_EndpointTypeDef *pep; uint8_t ep_addr; USBD_StatusTypeDef ret = USBD_OK; 80053d6: 2300 movs r3, #0 80053d8: 73fb strb r3, [r7, #15] ep_addr = LOBYTE(req->wIndex); 80053da: 683b ldr r3, [r7, #0] 80053dc: 889b ldrh r3, [r3, #4] 80053de: 73bb strb r3, [r7, #14] switch (req->bmRequest & USB_REQ_TYPE_MASK) 80053e0: 683b ldr r3, [r7, #0] 80053e2: 781b ldrb r3, [r3, #0] 80053e4: f003 0360 and.w r3, r3, #96 ; 0x60 80053e8: 2b20 cmp r3, #32 80053ea: d004 beq.n 80053f6 80053ec: 2b40 cmp r3, #64 ; 0x40 80053ee: d002 beq.n 80053f6 80053f0: 2b00 cmp r3, #0 80053f2: d008 beq.n 8005406 80053f4: e13d b.n 8005672 { case USB_REQ_TYPE_CLASS: case USB_REQ_TYPE_VENDOR: pdev->pClass->Setup(pdev, req); 80053f6: 687b ldr r3, [r7, #4] 80053f8: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 80053fc: 689b ldr r3, [r3, #8] 80053fe: 6839 ldr r1, [r7, #0] 8005400: 6878 ldr r0, [r7, #4] 8005402: 4798 blx r3 break; 8005404: e13a b.n 800567c case USB_REQ_TYPE_STANDARD: /* Check if it is a class request */ if ((req->bmRequest & 0x60U) == 0x20U) 8005406: 683b ldr r3, [r7, #0] 8005408: 781b ldrb r3, [r3, #0] 800540a: f003 0360 and.w r3, r3, #96 ; 0x60 800540e: 2b20 cmp r3, #32 8005410: d10a bne.n 8005428 { ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req); 8005412: 687b ldr r3, [r7, #4] 8005414: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8005418: 689b ldr r3, [r3, #8] 800541a: 6839 ldr r1, [r7, #0] 800541c: 6878 ldr r0, [r7, #4] 800541e: 4798 blx r3 8005420: 4603 mov r3, r0 8005422: 73fb strb r3, [r7, #15] return ret; 8005424: 7bfb ldrb r3, [r7, #15] 8005426: e12a b.n 800567e } switch (req->bRequest) 8005428: 683b ldr r3, [r7, #0] 800542a: 785b ldrb r3, [r3, #1] 800542c: 2b01 cmp r3, #1 800542e: d03e beq.n 80054ae 8005430: 2b03 cmp r3, #3 8005432: d002 beq.n 800543a 8005434: 2b00 cmp r3, #0 8005436: d070 beq.n 800551a 8005438: e115 b.n 8005666 { case USB_REQ_SET_FEATURE: switch (pdev->dev_state) 800543a: 687b ldr r3, [r7, #4] 800543c: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8005440: 2b02 cmp r3, #2 8005442: d002 beq.n 800544a 8005444: 2b03 cmp r3, #3 8005446: d015 beq.n 8005474 8005448: e02b b.n 80054a2 { case USBD_STATE_ADDRESSED: if ((ep_addr != 0x00U) && (ep_addr != 0x80U)) 800544a: 7bbb ldrb r3, [r7, #14] 800544c: 2b00 cmp r3, #0 800544e: d00c beq.n 800546a 8005450: 7bbb ldrb r3, [r7, #14] 8005452: 2b80 cmp r3, #128 ; 0x80 8005454: d009 beq.n 800546a { USBD_LL_StallEP(pdev, ep_addr); 8005456: 7bbb ldrb r3, [r7, #14] 8005458: 4619 mov r1, r3 800545a: 6878 ldr r0, [r7, #4] 800545c: f001 f85a bl 8006514 USBD_LL_StallEP(pdev, 0x80U); 8005460: 2180 movs r1, #128 ; 0x80 8005462: 6878 ldr r0, [r7, #4] 8005464: f001 f856 bl 8006514 } else { USBD_CtlError(pdev, req); } break; 8005468: e020 b.n 80054ac USBD_CtlError(pdev, req); 800546a: 6839 ldr r1, [r7, #0] 800546c: 6878 ldr r0, [r7, #4] 800546e: f000 fc1b bl 8005ca8 break; 8005472: e01b b.n 80054ac case USBD_STATE_CONFIGURED: if (req->wValue == USB_FEATURE_EP_HALT) 8005474: 683b ldr r3, [r7, #0] 8005476: 885b ldrh r3, [r3, #2] 8005478: 2b00 cmp r3, #0 800547a: d10e bne.n 800549a { if ((ep_addr != 0x00U) && 800547c: 7bbb ldrb r3, [r7, #14] 800547e: 2b00 cmp r3, #0 8005480: d00b beq.n 800549a 8005482: 7bbb ldrb r3, [r7, #14] 8005484: 2b80 cmp r3, #128 ; 0x80 8005486: d008 beq.n 800549a (ep_addr != 0x80U) && (req->wLength == 0x00U)) 8005488: 683b ldr r3, [r7, #0] 800548a: 88db ldrh r3, [r3, #6] 800548c: 2b00 cmp r3, #0 800548e: d104 bne.n 800549a { USBD_LL_StallEP(pdev, ep_addr); 8005490: 7bbb ldrb r3, [r7, #14] 8005492: 4619 mov r1, r3 8005494: 6878 ldr r0, [r7, #4] 8005496: f001 f83d bl 8006514 } } USBD_CtlSendStatus(pdev); 800549a: 6878 ldr r0, [r7, #4] 800549c: f000 fccc bl 8005e38 break; 80054a0: e004 b.n 80054ac default: USBD_CtlError(pdev, req); 80054a2: 6839 ldr r1, [r7, #0] 80054a4: 6878 ldr r0, [r7, #4] 80054a6: f000 fbff bl 8005ca8 break; 80054aa: bf00 nop } break; 80054ac: e0e0 b.n 8005670 case USB_REQ_CLEAR_FEATURE: switch (pdev->dev_state) 80054ae: 687b ldr r3, [r7, #4] 80054b0: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 80054b4: 2b02 cmp r3, #2 80054b6: d002 beq.n 80054be 80054b8: 2b03 cmp r3, #3 80054ba: d015 beq.n 80054e8 80054bc: e026 b.n 800550c { case USBD_STATE_ADDRESSED: if ((ep_addr != 0x00U) && (ep_addr != 0x80U)) 80054be: 7bbb ldrb r3, [r7, #14] 80054c0: 2b00 cmp r3, #0 80054c2: d00c beq.n 80054de 80054c4: 7bbb ldrb r3, [r7, #14] 80054c6: 2b80 cmp r3, #128 ; 0x80 80054c8: d009 beq.n 80054de { USBD_LL_StallEP(pdev, ep_addr); 80054ca: 7bbb ldrb r3, [r7, #14] 80054cc: 4619 mov r1, r3 80054ce: 6878 ldr r0, [r7, #4] 80054d0: f001 f820 bl 8006514 USBD_LL_StallEP(pdev, 0x80U); 80054d4: 2180 movs r1, #128 ; 0x80 80054d6: 6878 ldr r0, [r7, #4] 80054d8: f001 f81c bl 8006514 } else { USBD_CtlError(pdev, req); } break; 80054dc: e01c b.n 8005518 USBD_CtlError(pdev, req); 80054de: 6839 ldr r1, [r7, #0] 80054e0: 6878 ldr r0, [r7, #4] 80054e2: f000 fbe1 bl 8005ca8 break; 80054e6: e017 b.n 8005518 case USBD_STATE_CONFIGURED: if (req->wValue == USB_FEATURE_EP_HALT) 80054e8: 683b ldr r3, [r7, #0] 80054ea: 885b ldrh r3, [r3, #2] 80054ec: 2b00 cmp r3, #0 80054ee: d112 bne.n 8005516 { if ((ep_addr & 0x7FU) != 0x00U) 80054f0: 7bbb ldrb r3, [r7, #14] 80054f2: f003 037f and.w r3, r3, #127 ; 0x7f 80054f6: 2b00 cmp r3, #0 80054f8: d004 beq.n 8005504 { USBD_LL_ClearStallEP(pdev, ep_addr); 80054fa: 7bbb ldrb r3, [r7, #14] 80054fc: 4619 mov r1, r3 80054fe: 6878 ldr r0, [r7, #4] 8005500: f001 f827 bl 8006552 } USBD_CtlSendStatus(pdev); 8005504: 6878 ldr r0, [r7, #4] 8005506: f000 fc97 bl 8005e38 } break; 800550a: e004 b.n 8005516 default: USBD_CtlError(pdev, req); 800550c: 6839 ldr r1, [r7, #0] 800550e: 6878 ldr r0, [r7, #4] 8005510: f000 fbca bl 8005ca8 break; 8005514: e000 b.n 8005518 break; 8005516: bf00 nop } break; 8005518: e0aa b.n 8005670 case USB_REQ_GET_STATUS: switch (pdev->dev_state) 800551a: 687b ldr r3, [r7, #4] 800551c: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8005520: 2b02 cmp r3, #2 8005522: d002 beq.n 800552a 8005524: 2b03 cmp r3, #3 8005526: d032 beq.n 800558e 8005528: e097 b.n 800565a { case USBD_STATE_ADDRESSED: if ((ep_addr != 0x00U) && (ep_addr != 0x80U)) 800552a: 7bbb ldrb r3, [r7, #14] 800552c: 2b00 cmp r3, #0 800552e: d007 beq.n 8005540 8005530: 7bbb ldrb r3, [r7, #14] 8005532: 2b80 cmp r3, #128 ; 0x80 8005534: d004 beq.n 8005540 { USBD_CtlError(pdev, req); 8005536: 6839 ldr r1, [r7, #0] 8005538: 6878 ldr r0, [r7, #4] 800553a: f000 fbb5 bl 8005ca8 break; 800553e: e091 b.n 8005664 } pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \ 8005540: f997 300e ldrsb.w r3, [r7, #14] 8005544: 2b00 cmp r3, #0 8005546: da0b bge.n 8005560 8005548: 7bbb ldrb r3, [r7, #14] 800554a: f003 027f and.w r2, r3, #127 ; 0x7f 800554e: 4613 mov r3, r2 8005550: 009b lsls r3, r3, #2 8005552: 4413 add r3, r2 8005554: 009b lsls r3, r3, #2 8005556: 3310 adds r3, #16 8005558: 687a ldr r2, [r7, #4] 800555a: 4413 add r3, r2 800555c: 3304 adds r3, #4 800555e: e00b b.n 8005578 &pdev->ep_out[ep_addr & 0x7FU]; 8005560: 7bbb ldrb r3, [r7, #14] 8005562: f003 027f and.w r2, r3, #127 ; 0x7f pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \ 8005566: 4613 mov r3, r2 8005568: 009b lsls r3, r3, #2 800556a: 4413 add r3, r2 800556c: 009b lsls r3, r3, #2 800556e: f503 73a8 add.w r3, r3, #336 ; 0x150 8005572: 687a ldr r2, [r7, #4] 8005574: 4413 add r3, r2 8005576: 3304 adds r3, #4 8005578: 60bb str r3, [r7, #8] pep->status = 0x0000U; 800557a: 68bb ldr r3, [r7, #8] 800557c: 2200 movs r2, #0 800557e: 601a str r2, [r3, #0] USBD_CtlSendData(pdev, (uint8_t *)(void *)&pep->status, 2U); 8005580: 68bb ldr r3, [r7, #8] 8005582: 2202 movs r2, #2 8005584: 4619 mov r1, r3 8005586: 6878 ldr r0, [r7, #4] 8005588: f000 fbf8 bl 8005d7c break; 800558c: e06a b.n 8005664 case USBD_STATE_CONFIGURED: if ((ep_addr & 0x80U) == 0x80U) 800558e: f997 300e ldrsb.w r3, [r7, #14] 8005592: 2b00 cmp r3, #0 8005594: da11 bge.n 80055ba { if (pdev->ep_in[ep_addr & 0xFU].is_used == 0U) 8005596: 7bbb ldrb r3, [r7, #14] 8005598: f003 020f and.w r2, r3, #15 800559c: 6879 ldr r1, [r7, #4] 800559e: 4613 mov r3, r2 80055a0: 009b lsls r3, r3, #2 80055a2: 4413 add r3, r2 80055a4: 009b lsls r3, r3, #2 80055a6: 440b add r3, r1 80055a8: 3318 adds r3, #24 80055aa: 681b ldr r3, [r3, #0] 80055ac: 2b00 cmp r3, #0 80055ae: d117 bne.n 80055e0 { USBD_CtlError(pdev, req); 80055b0: 6839 ldr r1, [r7, #0] 80055b2: 6878 ldr r0, [r7, #4] 80055b4: f000 fb78 bl 8005ca8 break; 80055b8: e054 b.n 8005664 } } else { if (pdev->ep_out[ep_addr & 0xFU].is_used == 0U) 80055ba: 7bbb ldrb r3, [r7, #14] 80055bc: f003 020f and.w r2, r3, #15 80055c0: 6879 ldr r1, [r7, #4] 80055c2: 4613 mov r3, r2 80055c4: 009b lsls r3, r3, #2 80055c6: 4413 add r3, r2 80055c8: 009b lsls r3, r3, #2 80055ca: 440b add r3, r1 80055cc: f503 73ac add.w r3, r3, #344 ; 0x158 80055d0: 681b ldr r3, [r3, #0] 80055d2: 2b00 cmp r3, #0 80055d4: d104 bne.n 80055e0 { USBD_CtlError(pdev, req); 80055d6: 6839 ldr r1, [r7, #0] 80055d8: 6878 ldr r0, [r7, #4] 80055da: f000 fb65 bl 8005ca8 break; 80055de: e041 b.n 8005664 } } pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \ 80055e0: f997 300e ldrsb.w r3, [r7, #14] 80055e4: 2b00 cmp r3, #0 80055e6: da0b bge.n 8005600 80055e8: 7bbb ldrb r3, [r7, #14] 80055ea: f003 027f and.w r2, r3, #127 ; 0x7f 80055ee: 4613 mov r3, r2 80055f0: 009b lsls r3, r3, #2 80055f2: 4413 add r3, r2 80055f4: 009b lsls r3, r3, #2 80055f6: 3310 adds r3, #16 80055f8: 687a ldr r2, [r7, #4] 80055fa: 4413 add r3, r2 80055fc: 3304 adds r3, #4 80055fe: e00b b.n 8005618 &pdev->ep_out[ep_addr & 0x7FU]; 8005600: 7bbb ldrb r3, [r7, #14] 8005602: f003 027f and.w r2, r3, #127 ; 0x7f pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \ 8005606: 4613 mov r3, r2 8005608: 009b lsls r3, r3, #2 800560a: 4413 add r3, r2 800560c: 009b lsls r3, r3, #2 800560e: f503 73a8 add.w r3, r3, #336 ; 0x150 8005612: 687a ldr r2, [r7, #4] 8005614: 4413 add r3, r2 8005616: 3304 adds r3, #4 8005618: 60bb str r3, [r7, #8] if ((ep_addr == 0x00U) || (ep_addr == 0x80U)) 800561a: 7bbb ldrb r3, [r7, #14] 800561c: 2b00 cmp r3, #0 800561e: d002 beq.n 8005626 8005620: 7bbb ldrb r3, [r7, #14] 8005622: 2b80 cmp r3, #128 ; 0x80 8005624: d103 bne.n 800562e { pep->status = 0x0000U; 8005626: 68bb ldr r3, [r7, #8] 8005628: 2200 movs r2, #0 800562a: 601a str r2, [r3, #0] 800562c: e00e b.n 800564c } else if (USBD_LL_IsStallEP(pdev, ep_addr)) 800562e: 7bbb ldrb r3, [r7, #14] 8005630: 4619 mov r1, r3 8005632: 6878 ldr r0, [r7, #4] 8005634: f000 ffac bl 8006590 8005638: 4603 mov r3, r0 800563a: 2b00 cmp r3, #0 800563c: d003 beq.n 8005646 { pep->status = 0x0001U; 800563e: 68bb ldr r3, [r7, #8] 8005640: 2201 movs r2, #1 8005642: 601a str r2, [r3, #0] 8005644: e002 b.n 800564c } else { pep->status = 0x0000U; 8005646: 68bb ldr r3, [r7, #8] 8005648: 2200 movs r2, #0 800564a: 601a str r2, [r3, #0] } USBD_CtlSendData(pdev, (uint8_t *)(void *)&pep->status, 2U); 800564c: 68bb ldr r3, [r7, #8] 800564e: 2202 movs r2, #2 8005650: 4619 mov r1, r3 8005652: 6878 ldr r0, [r7, #4] 8005654: f000 fb92 bl 8005d7c break; 8005658: e004 b.n 8005664 default: USBD_CtlError(pdev, req); 800565a: 6839 ldr r1, [r7, #0] 800565c: 6878 ldr r0, [r7, #4] 800565e: f000 fb23 bl 8005ca8 break; 8005662: bf00 nop } break; 8005664: e004 b.n 8005670 default: USBD_CtlError(pdev, req); 8005666: 6839 ldr r1, [r7, #0] 8005668: 6878 ldr r0, [r7, #4] 800566a: f000 fb1d bl 8005ca8 break; 800566e: bf00 nop } break; 8005670: e004 b.n 800567c default: USBD_CtlError(pdev, req); 8005672: 6839 ldr r1, [r7, #0] 8005674: 6878 ldr r0, [r7, #4] 8005676: f000 fb17 bl 8005ca8 break; 800567a: bf00 nop } return ret; 800567c: 7bfb ldrb r3, [r7, #15] } 800567e: 4618 mov r0, r3 8005680: 3710 adds r7, #16 8005682: 46bd mov sp, r7 8005684: bd80 pop {r7, pc} ... 08005688 : * @param req: usb request * @retval status */ static void USBD_GetDescriptor(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8005688: b580 push {r7, lr} 800568a: b084 sub sp, #16 800568c: af00 add r7, sp, #0 800568e: 6078 str r0, [r7, #4] 8005690: 6039 str r1, [r7, #0] uint16_t len = 0U; 8005692: 2300 movs r3, #0 8005694: 813b strh r3, [r7, #8] uint8_t *pbuf = NULL; 8005696: 2300 movs r3, #0 8005698: 60fb str r3, [r7, #12] uint8_t err = 0U; 800569a: 2300 movs r3, #0 800569c: 72fb strb r3, [r7, #11] switch (req->wValue >> 8) 800569e: 683b ldr r3, [r7, #0] 80056a0: 885b ldrh r3, [r3, #2] 80056a2: 0a1b lsrs r3, r3, #8 80056a4: b29b uxth r3, r3 80056a6: 3b01 subs r3, #1 80056a8: 2b06 cmp r3, #6 80056aa: f200 8128 bhi.w 80058fe 80056ae: a201 add r2, pc, #4 ; (adr r2, 80056b4 ) 80056b0: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80056b4: 080056d1 .word 0x080056d1 80056b8: 080056e9 .word 0x080056e9 80056bc: 08005729 .word 0x08005729 80056c0: 080058ff .word 0x080058ff 80056c4: 080058ff .word 0x080058ff 80056c8: 0800589f .word 0x0800589f 80056cc: 080058cb .word 0x080058cb err++; } break; #endif case USB_DESC_TYPE_DEVICE: pbuf = pdev->pDesc->GetDeviceDescriptor(pdev->dev_speed, &len); 80056d0: 687b ldr r3, [r7, #4] 80056d2: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 80056d6: 681b ldr r3, [r3, #0] 80056d8: 687a ldr r2, [r7, #4] 80056da: 7c12 ldrb r2, [r2, #16] 80056dc: f107 0108 add.w r1, r7, #8 80056e0: 4610 mov r0, r2 80056e2: 4798 blx r3 80056e4: 60f8 str r0, [r7, #12] break; 80056e6: e112 b.n 800590e case USB_DESC_TYPE_CONFIGURATION: if (pdev->dev_speed == USBD_SPEED_HIGH) 80056e8: 687b ldr r3, [r7, #4] 80056ea: 7c1b ldrb r3, [r3, #16] 80056ec: 2b00 cmp r3, #0 80056ee: d10d bne.n 800570c { pbuf = pdev->pClass->GetHSConfigDescriptor(&len); 80056f0: 687b ldr r3, [r7, #4] 80056f2: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 80056f6: 6a9b ldr r3, [r3, #40] ; 0x28 80056f8: f107 0208 add.w r2, r7, #8 80056fc: 4610 mov r0, r2 80056fe: 4798 blx r3 8005700: 60f8 str r0, [r7, #12] pbuf[1] = USB_DESC_TYPE_CONFIGURATION; 8005702: 68fb ldr r3, [r7, #12] 8005704: 3301 adds r3, #1 8005706: 2202 movs r2, #2 8005708: 701a strb r2, [r3, #0] else { pbuf = pdev->pClass->GetFSConfigDescriptor(&len); pbuf[1] = USB_DESC_TYPE_CONFIGURATION; } break; 800570a: e100 b.n 800590e pbuf = pdev->pClass->GetFSConfigDescriptor(&len); 800570c: 687b ldr r3, [r7, #4] 800570e: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8005712: 6adb ldr r3, [r3, #44] ; 0x2c 8005714: f107 0208 add.w r2, r7, #8 8005718: 4610 mov r0, r2 800571a: 4798 blx r3 800571c: 60f8 str r0, [r7, #12] pbuf[1] = USB_DESC_TYPE_CONFIGURATION; 800571e: 68fb ldr r3, [r7, #12] 8005720: 3301 adds r3, #1 8005722: 2202 movs r2, #2 8005724: 701a strb r2, [r3, #0] break; 8005726: e0f2 b.n 800590e case USB_DESC_TYPE_STRING: switch ((uint8_t)(req->wValue)) 8005728: 683b ldr r3, [r7, #0] 800572a: 885b ldrh r3, [r3, #2] 800572c: b2db uxtb r3, r3 800572e: 2b05 cmp r3, #5 8005730: f200 80ac bhi.w 800588c 8005734: a201 add r2, pc, #4 ; (adr r2, 800573c ) 8005736: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800573a: bf00 nop 800573c: 08005755 .word 0x08005755 8005740: 08005789 .word 0x08005789 8005744: 080057bd .word 0x080057bd 8005748: 080057f1 .word 0x080057f1 800574c: 08005825 .word 0x08005825 8005750: 08005859 .word 0x08005859 { case USBD_IDX_LANGID_STR: if (pdev->pDesc->GetLangIDStrDescriptor != NULL) 8005754: 687b ldr r3, [r7, #4] 8005756: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 800575a: 685b ldr r3, [r3, #4] 800575c: 2b00 cmp r3, #0 800575e: d00b beq.n 8005778 { pbuf = pdev->pDesc->GetLangIDStrDescriptor(pdev->dev_speed, &len); 8005760: 687b ldr r3, [r7, #4] 8005762: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 8005766: 685b ldr r3, [r3, #4] 8005768: 687a ldr r2, [r7, #4] 800576a: 7c12 ldrb r2, [r2, #16] 800576c: f107 0108 add.w r1, r7, #8 8005770: 4610 mov r0, r2 8005772: 4798 blx r3 8005774: 60f8 str r0, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 8005776: e091 b.n 800589c USBD_CtlError(pdev, req); 8005778: 6839 ldr r1, [r7, #0] 800577a: 6878 ldr r0, [r7, #4] 800577c: f000 fa94 bl 8005ca8 err++; 8005780: 7afb ldrb r3, [r7, #11] 8005782: 3301 adds r3, #1 8005784: 72fb strb r3, [r7, #11] break; 8005786: e089 b.n 800589c case USBD_IDX_MFC_STR: if (pdev->pDesc->GetManufacturerStrDescriptor != NULL) 8005788: 687b ldr r3, [r7, #4] 800578a: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 800578e: 689b ldr r3, [r3, #8] 8005790: 2b00 cmp r3, #0 8005792: d00b beq.n 80057ac { pbuf = pdev->pDesc->GetManufacturerStrDescriptor(pdev->dev_speed, &len); 8005794: 687b ldr r3, [r7, #4] 8005796: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 800579a: 689b ldr r3, [r3, #8] 800579c: 687a ldr r2, [r7, #4] 800579e: 7c12 ldrb r2, [r2, #16] 80057a0: f107 0108 add.w r1, r7, #8 80057a4: 4610 mov r0, r2 80057a6: 4798 blx r3 80057a8: 60f8 str r0, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 80057aa: e077 b.n 800589c USBD_CtlError(pdev, req); 80057ac: 6839 ldr r1, [r7, #0] 80057ae: 6878 ldr r0, [r7, #4] 80057b0: f000 fa7a bl 8005ca8 err++; 80057b4: 7afb ldrb r3, [r7, #11] 80057b6: 3301 adds r3, #1 80057b8: 72fb strb r3, [r7, #11] break; 80057ba: e06f b.n 800589c case USBD_IDX_PRODUCT_STR: if (pdev->pDesc->GetProductStrDescriptor != NULL) 80057bc: 687b ldr r3, [r7, #4] 80057be: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 80057c2: 68db ldr r3, [r3, #12] 80057c4: 2b00 cmp r3, #0 80057c6: d00b beq.n 80057e0 { pbuf = pdev->pDesc->GetProductStrDescriptor(pdev->dev_speed, &len); 80057c8: 687b ldr r3, [r7, #4] 80057ca: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 80057ce: 68db ldr r3, [r3, #12] 80057d0: 687a ldr r2, [r7, #4] 80057d2: 7c12 ldrb r2, [r2, #16] 80057d4: f107 0108 add.w r1, r7, #8 80057d8: 4610 mov r0, r2 80057da: 4798 blx r3 80057dc: 60f8 str r0, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 80057de: e05d b.n 800589c USBD_CtlError(pdev, req); 80057e0: 6839 ldr r1, [r7, #0] 80057e2: 6878 ldr r0, [r7, #4] 80057e4: f000 fa60 bl 8005ca8 err++; 80057e8: 7afb ldrb r3, [r7, #11] 80057ea: 3301 adds r3, #1 80057ec: 72fb strb r3, [r7, #11] break; 80057ee: e055 b.n 800589c case USBD_IDX_SERIAL_STR: if (pdev->pDesc->GetSerialStrDescriptor != NULL) 80057f0: 687b ldr r3, [r7, #4] 80057f2: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 80057f6: 691b ldr r3, [r3, #16] 80057f8: 2b00 cmp r3, #0 80057fa: d00b beq.n 8005814 { pbuf = pdev->pDesc->GetSerialStrDescriptor(pdev->dev_speed, &len); 80057fc: 687b ldr r3, [r7, #4] 80057fe: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 8005802: 691b ldr r3, [r3, #16] 8005804: 687a ldr r2, [r7, #4] 8005806: 7c12 ldrb r2, [r2, #16] 8005808: f107 0108 add.w r1, r7, #8 800580c: 4610 mov r0, r2 800580e: 4798 blx r3 8005810: 60f8 str r0, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 8005812: e043 b.n 800589c USBD_CtlError(pdev, req); 8005814: 6839 ldr r1, [r7, #0] 8005816: 6878 ldr r0, [r7, #4] 8005818: f000 fa46 bl 8005ca8 err++; 800581c: 7afb ldrb r3, [r7, #11] 800581e: 3301 adds r3, #1 8005820: 72fb strb r3, [r7, #11] break; 8005822: e03b b.n 800589c case USBD_IDX_CONFIG_STR: if (pdev->pDesc->GetConfigurationStrDescriptor != NULL) 8005824: 687b ldr r3, [r7, #4] 8005826: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 800582a: 695b ldr r3, [r3, #20] 800582c: 2b00 cmp r3, #0 800582e: d00b beq.n 8005848 { pbuf = pdev->pDesc->GetConfigurationStrDescriptor(pdev->dev_speed, &len); 8005830: 687b ldr r3, [r7, #4] 8005832: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 8005836: 695b ldr r3, [r3, #20] 8005838: 687a ldr r2, [r7, #4] 800583a: 7c12 ldrb r2, [r2, #16] 800583c: f107 0108 add.w r1, r7, #8 8005840: 4610 mov r0, r2 8005842: 4798 blx r3 8005844: 60f8 str r0, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 8005846: e029 b.n 800589c USBD_CtlError(pdev, req); 8005848: 6839 ldr r1, [r7, #0] 800584a: 6878 ldr r0, [r7, #4] 800584c: f000 fa2c bl 8005ca8 err++; 8005850: 7afb ldrb r3, [r7, #11] 8005852: 3301 adds r3, #1 8005854: 72fb strb r3, [r7, #11] break; 8005856: e021 b.n 800589c case USBD_IDX_INTERFACE_STR: if (pdev->pDesc->GetInterfaceStrDescriptor != NULL) 8005858: 687b ldr r3, [r7, #4] 800585a: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 800585e: 699b ldr r3, [r3, #24] 8005860: 2b00 cmp r3, #0 8005862: d00b beq.n 800587c { pbuf = pdev->pDesc->GetInterfaceStrDescriptor(pdev->dev_speed, &len); 8005864: 687b ldr r3, [r7, #4] 8005866: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 800586a: 699b ldr r3, [r3, #24] 800586c: 687a ldr r2, [r7, #4] 800586e: 7c12 ldrb r2, [r2, #16] 8005870: f107 0108 add.w r1, r7, #8 8005874: 4610 mov r0, r2 8005876: 4798 blx r3 8005878: 60f8 str r0, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 800587a: e00f b.n 800589c USBD_CtlError(pdev, req); 800587c: 6839 ldr r1, [r7, #0] 800587e: 6878 ldr r0, [r7, #4] 8005880: f000 fa12 bl 8005ca8 err++; 8005884: 7afb ldrb r3, [r7, #11] 8005886: 3301 adds r3, #1 8005888: 72fb strb r3, [r7, #11] break; 800588a: e007 b.n 800589c USBD_CtlError(pdev, req); err++; } break; #else USBD_CtlError(pdev, req); 800588c: 6839 ldr r1, [r7, #0] 800588e: 6878 ldr r0, [r7, #4] 8005890: f000 fa0a bl 8005ca8 err++; 8005894: 7afb ldrb r3, [r7, #11] 8005896: 3301 adds r3, #1 8005898: 72fb strb r3, [r7, #11] #endif } break; 800589a: e038 b.n 800590e 800589c: e037 b.n 800590e case USB_DESC_TYPE_DEVICE_QUALIFIER: if (pdev->dev_speed == USBD_SPEED_HIGH) 800589e: 687b ldr r3, [r7, #4] 80058a0: 7c1b ldrb r3, [r3, #16] 80058a2: 2b00 cmp r3, #0 80058a4: d109 bne.n 80058ba { pbuf = pdev->pClass->GetDeviceQualifierDescriptor(&len); 80058a6: 687b ldr r3, [r7, #4] 80058a8: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 80058ac: 6b5b ldr r3, [r3, #52] ; 0x34 80058ae: f107 0208 add.w r2, r7, #8 80058b2: 4610 mov r0, r2 80058b4: 4798 blx r3 80058b6: 60f8 str r0, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 80058b8: e029 b.n 800590e USBD_CtlError(pdev, req); 80058ba: 6839 ldr r1, [r7, #0] 80058bc: 6878 ldr r0, [r7, #4] 80058be: f000 f9f3 bl 8005ca8 err++; 80058c2: 7afb ldrb r3, [r7, #11] 80058c4: 3301 adds r3, #1 80058c6: 72fb strb r3, [r7, #11] break; 80058c8: e021 b.n 800590e case USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION: if (pdev->dev_speed == USBD_SPEED_HIGH) 80058ca: 687b ldr r3, [r7, #4] 80058cc: 7c1b ldrb r3, [r3, #16] 80058ce: 2b00 cmp r3, #0 80058d0: d10d bne.n 80058ee { pbuf = pdev->pClass->GetOtherSpeedConfigDescriptor(&len); 80058d2: 687b ldr r3, [r7, #4] 80058d4: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 80058d8: 6b1b ldr r3, [r3, #48] ; 0x30 80058da: f107 0208 add.w r2, r7, #8 80058de: 4610 mov r0, r2 80058e0: 4798 blx r3 80058e2: 60f8 str r0, [r7, #12] pbuf[1] = USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION; 80058e4: 68fb ldr r3, [r7, #12] 80058e6: 3301 adds r3, #1 80058e8: 2207 movs r2, #7 80058ea: 701a strb r2, [r3, #0] else { USBD_CtlError(pdev, req); err++; } break; 80058ec: e00f b.n 800590e USBD_CtlError(pdev, req); 80058ee: 6839 ldr r1, [r7, #0] 80058f0: 6878 ldr r0, [r7, #4] 80058f2: f000 f9d9 bl 8005ca8 err++; 80058f6: 7afb ldrb r3, [r7, #11] 80058f8: 3301 adds r3, #1 80058fa: 72fb strb r3, [r7, #11] break; 80058fc: e007 b.n 800590e default: USBD_CtlError(pdev, req); 80058fe: 6839 ldr r1, [r7, #0] 8005900: 6878 ldr r0, [r7, #4] 8005902: f000 f9d1 bl 8005ca8 err++; 8005906: 7afb ldrb r3, [r7, #11] 8005908: 3301 adds r3, #1 800590a: 72fb strb r3, [r7, #11] break; 800590c: bf00 nop } if (err != 0U) 800590e: 7afb ldrb r3, [r7, #11] 8005910: 2b00 cmp r3, #0 8005912: d11c bne.n 800594e { return; } else { if ((len != 0U) && (req->wLength != 0U)) 8005914: 893b ldrh r3, [r7, #8] 8005916: 2b00 cmp r3, #0 8005918: d011 beq.n 800593e 800591a: 683b ldr r3, [r7, #0] 800591c: 88db ldrh r3, [r3, #6] 800591e: 2b00 cmp r3, #0 8005920: d00d beq.n 800593e { len = MIN(len, req->wLength); 8005922: 683b ldr r3, [r7, #0] 8005924: 88da ldrh r2, [r3, #6] 8005926: 893b ldrh r3, [r7, #8] 8005928: 4293 cmp r3, r2 800592a: bf28 it cs 800592c: 4613 movcs r3, r2 800592e: b29b uxth r3, r3 8005930: 813b strh r3, [r7, #8] (void)USBD_CtlSendData(pdev, pbuf, len); 8005932: 893b ldrh r3, [r7, #8] 8005934: 461a mov r2, r3 8005936: 68f9 ldr r1, [r7, #12] 8005938: 6878 ldr r0, [r7, #4] 800593a: f000 fa1f bl 8005d7c } if (req->wLength == 0U) 800593e: 683b ldr r3, [r7, #0] 8005940: 88db ldrh r3, [r3, #6] 8005942: 2b00 cmp r3, #0 8005944: d104 bne.n 8005950 { (void)USBD_CtlSendStatus(pdev); 8005946: 6878 ldr r0, [r7, #4] 8005948: f000 fa76 bl 8005e38 800594c: e000 b.n 8005950 return; 800594e: bf00 nop } } } 8005950: 3710 adds r7, #16 8005952: 46bd mov sp, r7 8005954: bd80 pop {r7, pc} 8005956: bf00 nop 08005958 : * @param req: usb request * @retval status */ static void USBD_SetAddress(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8005958: b580 push {r7, lr} 800595a: b084 sub sp, #16 800595c: af00 add r7, sp, #0 800595e: 6078 str r0, [r7, #4] 8005960: 6039 str r1, [r7, #0] uint8_t dev_addr; if ((req->wIndex == 0U) && (req->wLength == 0U) && (req->wValue < 128U)) 8005962: 683b ldr r3, [r7, #0] 8005964: 889b ldrh r3, [r3, #4] 8005966: 2b00 cmp r3, #0 8005968: d130 bne.n 80059cc 800596a: 683b ldr r3, [r7, #0] 800596c: 88db ldrh r3, [r3, #6] 800596e: 2b00 cmp r3, #0 8005970: d12c bne.n 80059cc 8005972: 683b ldr r3, [r7, #0] 8005974: 885b ldrh r3, [r3, #2] 8005976: 2b7f cmp r3, #127 ; 0x7f 8005978: d828 bhi.n 80059cc { dev_addr = (uint8_t)(req->wValue) & 0x7FU; 800597a: 683b ldr r3, [r7, #0] 800597c: 885b ldrh r3, [r3, #2] 800597e: b2db uxtb r3, r3 8005980: f003 037f and.w r3, r3, #127 ; 0x7f 8005984: 73fb strb r3, [r7, #15] if (pdev->dev_state == USBD_STATE_CONFIGURED) 8005986: 687b ldr r3, [r7, #4] 8005988: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 800598c: 2b03 cmp r3, #3 800598e: d104 bne.n 800599a { USBD_CtlError(pdev, req); 8005990: 6839 ldr r1, [r7, #0] 8005992: 6878 ldr r0, [r7, #4] 8005994: f000 f988 bl 8005ca8 if (pdev->dev_state == USBD_STATE_CONFIGURED) 8005998: e01c b.n 80059d4 } else { pdev->dev_address = dev_addr; 800599a: 687b ldr r3, [r7, #4] 800599c: 7bfa ldrb r2, [r7, #15] 800599e: f883 229e strb.w r2, [r3, #670] ; 0x29e USBD_LL_SetUSBAddress(pdev, dev_addr); 80059a2: 7bfb ldrb r3, [r7, #15] 80059a4: 4619 mov r1, r3 80059a6: 6878 ldr r0, [r7, #4] 80059a8: f000 fe1e bl 80065e8 USBD_CtlSendStatus(pdev); 80059ac: 6878 ldr r0, [r7, #4] 80059ae: f000 fa43 bl 8005e38 if (dev_addr != 0U) 80059b2: 7bfb ldrb r3, [r7, #15] 80059b4: 2b00 cmp r3, #0 80059b6: d004 beq.n 80059c2 { pdev->dev_state = USBD_STATE_ADDRESSED; 80059b8: 687b ldr r3, [r7, #4] 80059ba: 2202 movs r2, #2 80059bc: f883 229c strb.w r2, [r3, #668] ; 0x29c if (pdev->dev_state == USBD_STATE_CONFIGURED) 80059c0: e008 b.n 80059d4 } else { pdev->dev_state = USBD_STATE_DEFAULT; 80059c2: 687b ldr r3, [r7, #4] 80059c4: 2201 movs r2, #1 80059c6: f883 229c strb.w r2, [r3, #668] ; 0x29c if (pdev->dev_state == USBD_STATE_CONFIGURED) 80059ca: e003 b.n 80059d4 } } } else { USBD_CtlError(pdev, req); 80059cc: 6839 ldr r1, [r7, #0] 80059ce: 6878 ldr r0, [r7, #4] 80059d0: f000 f96a bl 8005ca8 } } 80059d4: bf00 nop 80059d6: 3710 adds r7, #16 80059d8: 46bd mov sp, r7 80059da: bd80 pop {r7, pc} 080059dc : * @param pdev: device instance * @param req: usb request * @retval status */ static void USBD_SetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 80059dc: b580 push {r7, lr} 80059de: b082 sub sp, #8 80059e0: af00 add r7, sp, #0 80059e2: 6078 str r0, [r7, #4] 80059e4: 6039 str r1, [r7, #0] static uint8_t cfgidx; cfgidx = (uint8_t)(req->wValue); 80059e6: 683b ldr r3, [r7, #0] 80059e8: 885b ldrh r3, [r3, #2] 80059ea: b2da uxtb r2, r3 80059ec: 4b41 ldr r3, [pc, #260] ; (8005af4 ) 80059ee: 701a strb r2, [r3, #0] if (cfgidx > USBD_MAX_NUM_CONFIGURATION) 80059f0: 4b40 ldr r3, [pc, #256] ; (8005af4 ) 80059f2: 781b ldrb r3, [r3, #0] 80059f4: 2b01 cmp r3, #1 80059f6: d904 bls.n 8005a02 { USBD_CtlError(pdev, req); 80059f8: 6839 ldr r1, [r7, #0] 80059fa: 6878 ldr r0, [r7, #4] 80059fc: f000 f954 bl 8005ca8 8005a00: e075 b.n 8005aee } else { switch (pdev->dev_state) 8005a02: 687b ldr r3, [r7, #4] 8005a04: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8005a08: 2b02 cmp r3, #2 8005a0a: d002 beq.n 8005a12 8005a0c: 2b03 cmp r3, #3 8005a0e: d023 beq.n 8005a58 8005a10: e062 b.n 8005ad8 { case USBD_STATE_ADDRESSED: if (cfgidx) 8005a12: 4b38 ldr r3, [pc, #224] ; (8005af4 ) 8005a14: 781b ldrb r3, [r3, #0] 8005a16: 2b00 cmp r3, #0 8005a18: d01a beq.n 8005a50 { pdev->dev_config = cfgidx; 8005a1a: 4b36 ldr r3, [pc, #216] ; (8005af4 ) 8005a1c: 781b ldrb r3, [r3, #0] 8005a1e: 461a mov r2, r3 8005a20: 687b ldr r3, [r7, #4] 8005a22: 605a str r2, [r3, #4] pdev->dev_state = USBD_STATE_CONFIGURED; 8005a24: 687b ldr r3, [r7, #4] 8005a26: 2203 movs r2, #3 8005a28: f883 229c strb.w r2, [r3, #668] ; 0x29c if (USBD_SetClassConfig(pdev, cfgidx) == USBD_FAIL) 8005a2c: 4b31 ldr r3, [pc, #196] ; (8005af4 ) 8005a2e: 781b ldrb r3, [r3, #0] 8005a30: 4619 mov r1, r3 8005a32: 6878 ldr r0, [r7, #4] 8005a34: f7ff f9f4 bl 8004e20 8005a38: 4603 mov r3, r0 8005a3a: 2b02 cmp r3, #2 8005a3c: d104 bne.n 8005a48 { USBD_CtlError(pdev, req); 8005a3e: 6839 ldr r1, [r7, #0] 8005a40: 6878 ldr r0, [r7, #4] 8005a42: f000 f931 bl 8005ca8 return; 8005a46: e052 b.n 8005aee } USBD_CtlSendStatus(pdev); 8005a48: 6878 ldr r0, [r7, #4] 8005a4a: f000 f9f5 bl 8005e38 } else { USBD_CtlSendStatus(pdev); } break; 8005a4e: e04e b.n 8005aee USBD_CtlSendStatus(pdev); 8005a50: 6878 ldr r0, [r7, #4] 8005a52: f000 f9f1 bl 8005e38 break; 8005a56: e04a b.n 8005aee case USBD_STATE_CONFIGURED: if (cfgidx == 0U) 8005a58: 4b26 ldr r3, [pc, #152] ; (8005af4 ) 8005a5a: 781b ldrb r3, [r3, #0] 8005a5c: 2b00 cmp r3, #0 8005a5e: d112 bne.n 8005a86 { pdev->dev_state = USBD_STATE_ADDRESSED; 8005a60: 687b ldr r3, [r7, #4] 8005a62: 2202 movs r2, #2 8005a64: f883 229c strb.w r2, [r3, #668] ; 0x29c pdev->dev_config = cfgidx; 8005a68: 4b22 ldr r3, [pc, #136] ; (8005af4 ) 8005a6a: 781b ldrb r3, [r3, #0] 8005a6c: 461a mov r2, r3 8005a6e: 687b ldr r3, [r7, #4] 8005a70: 605a str r2, [r3, #4] USBD_ClrClassConfig(pdev, cfgidx); 8005a72: 4b20 ldr r3, [pc, #128] ; (8005af4 ) 8005a74: 781b ldrb r3, [r3, #0] 8005a76: 4619 mov r1, r3 8005a78: 6878 ldr r0, [r7, #4] 8005a7a: f7ff f9f0 bl 8004e5e USBD_CtlSendStatus(pdev); 8005a7e: 6878 ldr r0, [r7, #4] 8005a80: f000 f9da bl 8005e38 } else { USBD_CtlSendStatus(pdev); } break; 8005a84: e033 b.n 8005aee else if (cfgidx != pdev->dev_config) 8005a86: 4b1b ldr r3, [pc, #108] ; (8005af4 ) 8005a88: 781b ldrb r3, [r3, #0] 8005a8a: 461a mov r2, r3 8005a8c: 687b ldr r3, [r7, #4] 8005a8e: 685b ldr r3, [r3, #4] 8005a90: 429a cmp r2, r3 8005a92: d01d beq.n 8005ad0 USBD_ClrClassConfig(pdev, (uint8_t)pdev->dev_config); 8005a94: 687b ldr r3, [r7, #4] 8005a96: 685b ldr r3, [r3, #4] 8005a98: b2db uxtb r3, r3 8005a9a: 4619 mov r1, r3 8005a9c: 6878 ldr r0, [r7, #4] 8005a9e: f7ff f9de bl 8004e5e pdev->dev_config = cfgidx; 8005aa2: 4b14 ldr r3, [pc, #80] ; (8005af4 ) 8005aa4: 781b ldrb r3, [r3, #0] 8005aa6: 461a mov r2, r3 8005aa8: 687b ldr r3, [r7, #4] 8005aaa: 605a str r2, [r3, #4] if (USBD_SetClassConfig(pdev, cfgidx) == USBD_FAIL) 8005aac: 4b11 ldr r3, [pc, #68] ; (8005af4 ) 8005aae: 781b ldrb r3, [r3, #0] 8005ab0: 4619 mov r1, r3 8005ab2: 6878 ldr r0, [r7, #4] 8005ab4: f7ff f9b4 bl 8004e20 8005ab8: 4603 mov r3, r0 8005aba: 2b02 cmp r3, #2 8005abc: d104 bne.n 8005ac8 USBD_CtlError(pdev, req); 8005abe: 6839 ldr r1, [r7, #0] 8005ac0: 6878 ldr r0, [r7, #4] 8005ac2: f000 f8f1 bl 8005ca8 return; 8005ac6: e012 b.n 8005aee USBD_CtlSendStatus(pdev); 8005ac8: 6878 ldr r0, [r7, #4] 8005aca: f000 f9b5 bl 8005e38 break; 8005ace: e00e b.n 8005aee USBD_CtlSendStatus(pdev); 8005ad0: 6878 ldr r0, [r7, #4] 8005ad2: f000 f9b1 bl 8005e38 break; 8005ad6: e00a b.n 8005aee default: USBD_CtlError(pdev, req); 8005ad8: 6839 ldr r1, [r7, #0] 8005ada: 6878 ldr r0, [r7, #4] 8005adc: f000 f8e4 bl 8005ca8 USBD_ClrClassConfig(pdev, cfgidx); 8005ae0: 4b04 ldr r3, [pc, #16] ; (8005af4 ) 8005ae2: 781b ldrb r3, [r3, #0] 8005ae4: 4619 mov r1, r3 8005ae6: 6878 ldr r0, [r7, #4] 8005ae8: f7ff f9b9 bl 8004e5e break; 8005aec: bf00 nop } } } 8005aee: 3708 adds r7, #8 8005af0: 46bd mov sp, r7 8005af2: bd80 pop {r7, pc} 8005af4: 20000198 .word 0x20000198 08005af8 : * @param pdev: device instance * @param req: usb request * @retval status */ static void USBD_GetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8005af8: b580 push {r7, lr} 8005afa: b082 sub sp, #8 8005afc: af00 add r7, sp, #0 8005afe: 6078 str r0, [r7, #4] 8005b00: 6039 str r1, [r7, #0] if (req->wLength != 1U) 8005b02: 683b ldr r3, [r7, #0] 8005b04: 88db ldrh r3, [r3, #6] 8005b06: 2b01 cmp r3, #1 8005b08: d004 beq.n 8005b14 { USBD_CtlError(pdev, req); 8005b0a: 6839 ldr r1, [r7, #0] 8005b0c: 6878 ldr r0, [r7, #4] 8005b0e: f000 f8cb bl 8005ca8 default: USBD_CtlError(pdev, req); break; } } } 8005b12: e021 b.n 8005b58 switch (pdev->dev_state) 8005b14: 687b ldr r3, [r7, #4] 8005b16: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8005b1a: 2b01 cmp r3, #1 8005b1c: db17 blt.n 8005b4e 8005b1e: 2b02 cmp r3, #2 8005b20: dd02 ble.n 8005b28 8005b22: 2b03 cmp r3, #3 8005b24: d00b beq.n 8005b3e 8005b26: e012 b.n 8005b4e pdev->dev_default_config = 0U; 8005b28: 687b ldr r3, [r7, #4] 8005b2a: 2200 movs r2, #0 8005b2c: 609a str r2, [r3, #8] USBD_CtlSendData(pdev, (uint8_t *)(void *)&pdev->dev_default_config, 1U); 8005b2e: 687b ldr r3, [r7, #4] 8005b30: 3308 adds r3, #8 8005b32: 2201 movs r2, #1 8005b34: 4619 mov r1, r3 8005b36: 6878 ldr r0, [r7, #4] 8005b38: f000 f920 bl 8005d7c break; 8005b3c: e00c b.n 8005b58 USBD_CtlSendData(pdev, (uint8_t *)(void *)&pdev->dev_config, 1U); 8005b3e: 687b ldr r3, [r7, #4] 8005b40: 3304 adds r3, #4 8005b42: 2201 movs r2, #1 8005b44: 4619 mov r1, r3 8005b46: 6878 ldr r0, [r7, #4] 8005b48: f000 f918 bl 8005d7c break; 8005b4c: e004 b.n 8005b58 USBD_CtlError(pdev, req); 8005b4e: 6839 ldr r1, [r7, #0] 8005b50: 6878 ldr r0, [r7, #4] 8005b52: f000 f8a9 bl 8005ca8 break; 8005b56: bf00 nop } 8005b58: bf00 nop 8005b5a: 3708 adds r7, #8 8005b5c: 46bd mov sp, r7 8005b5e: bd80 pop {r7, pc} 08005b60 : * @param pdev: device instance * @param req: usb request * @retval status */ static void USBD_GetStatus(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8005b60: b580 push {r7, lr} 8005b62: b082 sub sp, #8 8005b64: af00 add r7, sp, #0 8005b66: 6078 str r0, [r7, #4] 8005b68: 6039 str r1, [r7, #0] switch (pdev->dev_state) 8005b6a: 687b ldr r3, [r7, #4] 8005b6c: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8005b70: 3b01 subs r3, #1 8005b72: 2b02 cmp r3, #2 8005b74: d81e bhi.n 8005bb4 { case USBD_STATE_DEFAULT: case USBD_STATE_ADDRESSED: case USBD_STATE_CONFIGURED: if (req->wLength != 0x2U) 8005b76: 683b ldr r3, [r7, #0] 8005b78: 88db ldrh r3, [r3, #6] 8005b7a: 2b02 cmp r3, #2 8005b7c: d004 beq.n 8005b88 { USBD_CtlError(pdev, req); 8005b7e: 6839 ldr r1, [r7, #0] 8005b80: 6878 ldr r0, [r7, #4] 8005b82: f000 f891 bl 8005ca8 break; 8005b86: e01a b.n 8005bbe } #if (USBD_SELF_POWERED == 1U) pdev->dev_config_status = USB_CONFIG_SELF_POWERED; 8005b88: 687b ldr r3, [r7, #4] 8005b8a: 2201 movs r2, #1 8005b8c: 60da str r2, [r3, #12] #else pdev->dev_config_status = 0U; #endif if (pdev->dev_remote_wakeup) 8005b8e: 687b ldr r3, [r7, #4] 8005b90: f8d3 32a4 ldr.w r3, [r3, #676] ; 0x2a4 8005b94: 2b00 cmp r3, #0 8005b96: d005 beq.n 8005ba4 { pdev->dev_config_status |= USB_CONFIG_REMOTE_WAKEUP; 8005b98: 687b ldr r3, [r7, #4] 8005b9a: 68db ldr r3, [r3, #12] 8005b9c: f043 0202 orr.w r2, r3, #2 8005ba0: 687b ldr r3, [r7, #4] 8005ba2: 60da str r2, [r3, #12] } USBD_CtlSendData(pdev, (uint8_t *)(void *)&pdev->dev_config_status, 2U); 8005ba4: 687b ldr r3, [r7, #4] 8005ba6: 330c adds r3, #12 8005ba8: 2202 movs r2, #2 8005baa: 4619 mov r1, r3 8005bac: 6878 ldr r0, [r7, #4] 8005bae: f000 f8e5 bl 8005d7c break; 8005bb2: e004 b.n 8005bbe default: USBD_CtlError(pdev, req); 8005bb4: 6839 ldr r1, [r7, #0] 8005bb6: 6878 ldr r0, [r7, #4] 8005bb8: f000 f876 bl 8005ca8 break; 8005bbc: bf00 nop } } 8005bbe: bf00 nop 8005bc0: 3708 adds r7, #8 8005bc2: 46bd mov sp, r7 8005bc4: bd80 pop {r7, pc} 08005bc6 : * @param req: usb request * @retval status */ static void USBD_SetFeature(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8005bc6: b580 push {r7, lr} 8005bc8: b082 sub sp, #8 8005bca: af00 add r7, sp, #0 8005bcc: 6078 str r0, [r7, #4] 8005bce: 6039 str r1, [r7, #0] if (req->wValue == USB_FEATURE_REMOTE_WAKEUP) 8005bd0: 683b ldr r3, [r7, #0] 8005bd2: 885b ldrh r3, [r3, #2] 8005bd4: 2b01 cmp r3, #1 8005bd6: d106 bne.n 8005be6 { pdev->dev_remote_wakeup = 1U; 8005bd8: 687b ldr r3, [r7, #4] 8005bda: 2201 movs r2, #1 8005bdc: f8c3 22a4 str.w r2, [r3, #676] ; 0x2a4 USBD_CtlSendStatus(pdev); 8005be0: 6878 ldr r0, [r7, #4] 8005be2: f000 f929 bl 8005e38 } } 8005be6: bf00 nop 8005be8: 3708 adds r7, #8 8005bea: 46bd mov sp, r7 8005bec: bd80 pop {r7, pc} 08005bee : * @param req: usb request * @retval status */ static void USBD_ClrFeature(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8005bee: b580 push {r7, lr} 8005bf0: b082 sub sp, #8 8005bf2: af00 add r7, sp, #0 8005bf4: 6078 str r0, [r7, #4] 8005bf6: 6039 str r1, [r7, #0] switch (pdev->dev_state) 8005bf8: 687b ldr r3, [r7, #4] 8005bfa: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8005bfe: 3b01 subs r3, #1 8005c00: 2b02 cmp r3, #2 8005c02: d80b bhi.n 8005c1c { case USBD_STATE_DEFAULT: case USBD_STATE_ADDRESSED: case USBD_STATE_CONFIGURED: if (req->wValue == USB_FEATURE_REMOTE_WAKEUP) 8005c04: 683b ldr r3, [r7, #0] 8005c06: 885b ldrh r3, [r3, #2] 8005c08: 2b01 cmp r3, #1 8005c0a: d10c bne.n 8005c26 { pdev->dev_remote_wakeup = 0U; 8005c0c: 687b ldr r3, [r7, #4] 8005c0e: 2200 movs r2, #0 8005c10: f8c3 22a4 str.w r2, [r3, #676] ; 0x2a4 USBD_CtlSendStatus(pdev); 8005c14: 6878 ldr r0, [r7, #4] 8005c16: f000 f90f bl 8005e38 } break; 8005c1a: e004 b.n 8005c26 default: USBD_CtlError(pdev, req); 8005c1c: 6839 ldr r1, [r7, #0] 8005c1e: 6878 ldr r0, [r7, #4] 8005c20: f000 f842 bl 8005ca8 break; 8005c24: e000 b.n 8005c28 break; 8005c26: bf00 nop } } 8005c28: bf00 nop 8005c2a: 3708 adds r7, #8 8005c2c: 46bd mov sp, r7 8005c2e: bd80 pop {r7, pc} 08005c30 : * @param req: usb request * @retval None */ void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata) { 8005c30: b480 push {r7} 8005c32: b083 sub sp, #12 8005c34: af00 add r7, sp, #0 8005c36: 6078 str r0, [r7, #4] 8005c38: 6039 str r1, [r7, #0] req->bmRequest = *(uint8_t *)(pdata); 8005c3a: 683b ldr r3, [r7, #0] 8005c3c: 781a ldrb r2, [r3, #0] 8005c3e: 687b ldr r3, [r7, #4] 8005c40: 701a strb r2, [r3, #0] req->bRequest = *(uint8_t *)(pdata + 1U); 8005c42: 683b ldr r3, [r7, #0] 8005c44: 785a ldrb r2, [r3, #1] 8005c46: 687b ldr r3, [r7, #4] 8005c48: 705a strb r2, [r3, #1] req->wValue = SWAPBYTE(pdata + 2U); 8005c4a: 683b ldr r3, [r7, #0] 8005c4c: 3302 adds r3, #2 8005c4e: 781b ldrb r3, [r3, #0] 8005c50: b29a uxth r2, r3 8005c52: 683b ldr r3, [r7, #0] 8005c54: 3303 adds r3, #3 8005c56: 781b ldrb r3, [r3, #0] 8005c58: b29b uxth r3, r3 8005c5a: 021b lsls r3, r3, #8 8005c5c: b29b uxth r3, r3 8005c5e: 4413 add r3, r2 8005c60: b29a uxth r2, r3 8005c62: 687b ldr r3, [r7, #4] 8005c64: 805a strh r2, [r3, #2] req->wIndex = SWAPBYTE(pdata + 4U); 8005c66: 683b ldr r3, [r7, #0] 8005c68: 3304 adds r3, #4 8005c6a: 781b ldrb r3, [r3, #0] 8005c6c: b29a uxth r2, r3 8005c6e: 683b ldr r3, [r7, #0] 8005c70: 3305 adds r3, #5 8005c72: 781b ldrb r3, [r3, #0] 8005c74: b29b uxth r3, r3 8005c76: 021b lsls r3, r3, #8 8005c78: b29b uxth r3, r3 8005c7a: 4413 add r3, r2 8005c7c: b29a uxth r2, r3 8005c7e: 687b ldr r3, [r7, #4] 8005c80: 809a strh r2, [r3, #4] req->wLength = SWAPBYTE(pdata + 6U); 8005c82: 683b ldr r3, [r7, #0] 8005c84: 3306 adds r3, #6 8005c86: 781b ldrb r3, [r3, #0] 8005c88: b29a uxth r2, r3 8005c8a: 683b ldr r3, [r7, #0] 8005c8c: 3307 adds r3, #7 8005c8e: 781b ldrb r3, [r3, #0] 8005c90: b29b uxth r3, r3 8005c92: 021b lsls r3, r3, #8 8005c94: b29b uxth r3, r3 8005c96: 4413 add r3, r2 8005c98: b29a uxth r2, r3 8005c9a: 687b ldr r3, [r7, #4] 8005c9c: 80da strh r2, [r3, #6] } 8005c9e: bf00 nop 8005ca0: 370c adds r7, #12 8005ca2: 46bd mov sp, r7 8005ca4: bc80 pop {r7} 8005ca6: 4770 bx lr 08005ca8 : * @retval None */ void USBD_CtlError(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8005ca8: b580 push {r7, lr} 8005caa: b082 sub sp, #8 8005cac: af00 add r7, sp, #0 8005cae: 6078 str r0, [r7, #4] 8005cb0: 6039 str r1, [r7, #0] USBD_LL_StallEP(pdev, 0x80U); 8005cb2: 2180 movs r1, #128 ; 0x80 8005cb4: 6878 ldr r0, [r7, #4] 8005cb6: f000 fc2d bl 8006514 USBD_LL_StallEP(pdev, 0U); 8005cba: 2100 movs r1, #0 8005cbc: 6878 ldr r0, [r7, #4] 8005cbe: f000 fc29 bl 8006514 } 8005cc2: bf00 nop 8005cc4: 3708 adds r7, #8 8005cc6: 46bd mov sp, r7 8005cc8: bd80 pop {r7, pc} 08005cca : * @param unicode : Formatted string buffer (unicode) * @param len : descriptor length * @retval None */ void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len) { 8005cca: b580 push {r7, lr} 8005ccc: b086 sub sp, #24 8005cce: af00 add r7, sp, #0 8005cd0: 60f8 str r0, [r7, #12] 8005cd2: 60b9 str r1, [r7, #8] 8005cd4: 607a str r2, [r7, #4] uint8_t idx = 0U; 8005cd6: 2300 movs r3, #0 8005cd8: 75fb strb r3, [r7, #23] if (desc != NULL) 8005cda: 68fb ldr r3, [r7, #12] 8005cdc: 2b00 cmp r3, #0 8005cde: d032 beq.n 8005d46 { *len = (uint16_t)USBD_GetLen(desc) * 2U + 2U; 8005ce0: 68f8 ldr r0, [r7, #12] 8005ce2: f000 f834 bl 8005d4e 8005ce6: 4603 mov r3, r0 8005ce8: 3301 adds r3, #1 8005cea: b29b uxth r3, r3 8005cec: 005b lsls r3, r3, #1 8005cee: b29a uxth r2, r3 8005cf0: 687b ldr r3, [r7, #4] 8005cf2: 801a strh r2, [r3, #0] unicode[idx++] = *(uint8_t *)(void *)len; 8005cf4: 7dfb ldrb r3, [r7, #23] 8005cf6: 1c5a adds r2, r3, #1 8005cf8: 75fa strb r2, [r7, #23] 8005cfa: 461a mov r2, r3 8005cfc: 68bb ldr r3, [r7, #8] 8005cfe: 4413 add r3, r2 8005d00: 687a ldr r2, [r7, #4] 8005d02: 7812 ldrb r2, [r2, #0] 8005d04: 701a strb r2, [r3, #0] unicode[idx++] = USB_DESC_TYPE_STRING; 8005d06: 7dfb ldrb r3, [r7, #23] 8005d08: 1c5a adds r2, r3, #1 8005d0a: 75fa strb r2, [r7, #23] 8005d0c: 461a mov r2, r3 8005d0e: 68bb ldr r3, [r7, #8] 8005d10: 4413 add r3, r2 8005d12: 2203 movs r2, #3 8005d14: 701a strb r2, [r3, #0] while (*desc != '\0') 8005d16: e012 b.n 8005d3e { unicode[idx++] = *desc++; 8005d18: 68fb ldr r3, [r7, #12] 8005d1a: 1c5a adds r2, r3, #1 8005d1c: 60fa str r2, [r7, #12] 8005d1e: 7dfa ldrb r2, [r7, #23] 8005d20: 1c51 adds r1, r2, #1 8005d22: 75f9 strb r1, [r7, #23] 8005d24: 4611 mov r1, r2 8005d26: 68ba ldr r2, [r7, #8] 8005d28: 440a add r2, r1 8005d2a: 781b ldrb r3, [r3, #0] 8005d2c: 7013 strb r3, [r2, #0] unicode[idx++] = 0U; 8005d2e: 7dfb ldrb r3, [r7, #23] 8005d30: 1c5a adds r2, r3, #1 8005d32: 75fa strb r2, [r7, #23] 8005d34: 461a mov r2, r3 8005d36: 68bb ldr r3, [r7, #8] 8005d38: 4413 add r3, r2 8005d3a: 2200 movs r2, #0 8005d3c: 701a strb r2, [r3, #0] while (*desc != '\0') 8005d3e: 68fb ldr r3, [r7, #12] 8005d40: 781b ldrb r3, [r3, #0] 8005d42: 2b00 cmp r3, #0 8005d44: d1e8 bne.n 8005d18 } } } 8005d46: bf00 nop 8005d48: 3718 adds r7, #24 8005d4a: 46bd mov sp, r7 8005d4c: bd80 pop {r7, pc} 08005d4e : * return the string length * @param buf : pointer to the ascii string buffer * @retval string length */ static uint8_t USBD_GetLen(uint8_t *buf) { 8005d4e: b480 push {r7} 8005d50: b085 sub sp, #20 8005d52: af00 add r7, sp, #0 8005d54: 6078 str r0, [r7, #4] uint8_t len = 0U; 8005d56: 2300 movs r3, #0 8005d58: 73fb strb r3, [r7, #15] while (*buf != '\0') 8005d5a: e005 b.n 8005d68 { len++; 8005d5c: 7bfb ldrb r3, [r7, #15] 8005d5e: 3301 adds r3, #1 8005d60: 73fb strb r3, [r7, #15] buf++; 8005d62: 687b ldr r3, [r7, #4] 8005d64: 3301 adds r3, #1 8005d66: 607b str r3, [r7, #4] while (*buf != '\0') 8005d68: 687b ldr r3, [r7, #4] 8005d6a: 781b ldrb r3, [r3, #0] 8005d6c: 2b00 cmp r3, #0 8005d6e: d1f5 bne.n 8005d5c } return len; 8005d70: 7bfb ldrb r3, [r7, #15] } 8005d72: 4618 mov r0, r3 8005d74: 3714 adds r7, #20 8005d76: 46bd mov sp, r7 8005d78: bc80 pop {r7} 8005d7a: 4770 bx lr 08005d7c : * @param len: length of data to be sent * @retval status */ USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev, uint8_t *pbuf, uint16_t len) { 8005d7c: b580 push {r7, lr} 8005d7e: b084 sub sp, #16 8005d80: af00 add r7, sp, #0 8005d82: 60f8 str r0, [r7, #12] 8005d84: 60b9 str r1, [r7, #8] 8005d86: 4613 mov r3, r2 8005d88: 80fb strh r3, [r7, #6] /* Set EP0 State */ pdev->ep0_state = USBD_EP0_DATA_IN; 8005d8a: 68fb ldr r3, [r7, #12] 8005d8c: 2202 movs r2, #2 8005d8e: f8c3 2294 str.w r2, [r3, #660] ; 0x294 pdev->ep_in[0].total_length = len; 8005d92: 88fa ldrh r2, [r7, #6] 8005d94: 68fb ldr r3, [r7, #12] 8005d96: 61da str r2, [r3, #28] pdev->ep_in[0].rem_length = len; 8005d98: 88fa ldrh r2, [r7, #6] 8005d9a: 68fb ldr r3, [r7, #12] 8005d9c: 621a str r2, [r3, #32] /* Start the transfer */ USBD_LL_Transmit(pdev, 0x00U, pbuf, len); 8005d9e: 88fb ldrh r3, [r7, #6] 8005da0: 68ba ldr r2, [r7, #8] 8005da2: 2100 movs r1, #0 8005da4: 68f8 ldr r0, [r7, #12] 8005da6: f000 fc3e bl 8006626 return USBD_OK; 8005daa: 2300 movs r3, #0 } 8005dac: 4618 mov r0, r3 8005dae: 3710 adds r7, #16 8005db0: 46bd mov sp, r7 8005db2: bd80 pop {r7, pc} 08005db4 : * @param len: length of data to be sent * @retval status */ USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev, uint8_t *pbuf, uint16_t len) { 8005db4: b580 push {r7, lr} 8005db6: b084 sub sp, #16 8005db8: af00 add r7, sp, #0 8005dba: 60f8 str r0, [r7, #12] 8005dbc: 60b9 str r1, [r7, #8] 8005dbe: 4613 mov r3, r2 8005dc0: 80fb strh r3, [r7, #6] /* Start the next transfer */ USBD_LL_Transmit(pdev, 0x00U, pbuf, len); 8005dc2: 88fb ldrh r3, [r7, #6] 8005dc4: 68ba ldr r2, [r7, #8] 8005dc6: 2100 movs r1, #0 8005dc8: 68f8 ldr r0, [r7, #12] 8005dca: f000 fc2c bl 8006626 return USBD_OK; 8005dce: 2300 movs r3, #0 } 8005dd0: 4618 mov r0, r3 8005dd2: 3710 adds r7, #16 8005dd4: 46bd mov sp, r7 8005dd6: bd80 pop {r7, pc} 08005dd8 : * @param len: length of data to be received * @retval status */ USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev, uint8_t *pbuf, uint16_t len) { 8005dd8: b580 push {r7, lr} 8005dda: b084 sub sp, #16 8005ddc: af00 add r7, sp, #0 8005dde: 60f8 str r0, [r7, #12] 8005de0: 60b9 str r1, [r7, #8] 8005de2: 4613 mov r3, r2 8005de4: 80fb strh r3, [r7, #6] /* Set EP0 State */ pdev->ep0_state = USBD_EP0_DATA_OUT; 8005de6: 68fb ldr r3, [r7, #12] 8005de8: 2203 movs r2, #3 8005dea: f8c3 2294 str.w r2, [r3, #660] ; 0x294 pdev->ep_out[0].total_length = len; 8005dee: 88fa ldrh r2, [r7, #6] 8005df0: 68fb ldr r3, [r7, #12] 8005df2: f8c3 215c str.w r2, [r3, #348] ; 0x15c pdev->ep_out[0].rem_length = len; 8005df6: 88fa ldrh r2, [r7, #6] 8005df8: 68fb ldr r3, [r7, #12] 8005dfa: f8c3 2160 str.w r2, [r3, #352] ; 0x160 /* Start the transfer */ USBD_LL_PrepareReceive(pdev, 0U, pbuf, len); 8005dfe: 88fb ldrh r3, [r7, #6] 8005e00: 68ba ldr r2, [r7, #8] 8005e02: 2100 movs r1, #0 8005e04: 68f8 ldr r0, [r7, #12] 8005e06: f000 fc31 bl 800666c return USBD_OK; 8005e0a: 2300 movs r3, #0 } 8005e0c: 4618 mov r0, r3 8005e0e: 3710 adds r7, #16 8005e10: 46bd mov sp, r7 8005e12: bd80 pop {r7, pc} 08005e14 : * @param len: length of data to be received * @retval status */ USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev, uint8_t *pbuf, uint16_t len) { 8005e14: b580 push {r7, lr} 8005e16: b084 sub sp, #16 8005e18: af00 add r7, sp, #0 8005e1a: 60f8 str r0, [r7, #12] 8005e1c: 60b9 str r1, [r7, #8] 8005e1e: 4613 mov r3, r2 8005e20: 80fb strh r3, [r7, #6] USBD_LL_PrepareReceive(pdev, 0U, pbuf, len); 8005e22: 88fb ldrh r3, [r7, #6] 8005e24: 68ba ldr r2, [r7, #8] 8005e26: 2100 movs r1, #0 8005e28: 68f8 ldr r0, [r7, #12] 8005e2a: f000 fc1f bl 800666c return USBD_OK; 8005e2e: 2300 movs r3, #0 } 8005e30: 4618 mov r0, r3 8005e32: 3710 adds r7, #16 8005e34: 46bd mov sp, r7 8005e36: bd80 pop {r7, pc} 08005e38 : * send zero lzngth packet on the ctl pipe * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev) { 8005e38: b580 push {r7, lr} 8005e3a: b082 sub sp, #8 8005e3c: af00 add r7, sp, #0 8005e3e: 6078 str r0, [r7, #4] /* Set EP0 State */ pdev->ep0_state = USBD_EP0_STATUS_IN; 8005e40: 687b ldr r3, [r7, #4] 8005e42: 2204 movs r2, #4 8005e44: f8c3 2294 str.w r2, [r3, #660] ; 0x294 /* Start the transfer */ USBD_LL_Transmit(pdev, 0x00U, NULL, 0U); 8005e48: 2300 movs r3, #0 8005e4a: 2200 movs r2, #0 8005e4c: 2100 movs r1, #0 8005e4e: 6878 ldr r0, [r7, #4] 8005e50: f000 fbe9 bl 8006626 return USBD_OK; 8005e54: 2300 movs r3, #0 } 8005e56: 4618 mov r0, r3 8005e58: 3708 adds r7, #8 8005e5a: 46bd mov sp, r7 8005e5c: bd80 pop {r7, pc} 08005e5e : * receive zero lzngth packet on the ctl pipe * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev) { 8005e5e: b580 push {r7, lr} 8005e60: b082 sub sp, #8 8005e62: af00 add r7, sp, #0 8005e64: 6078 str r0, [r7, #4] /* Set EP0 State */ pdev->ep0_state = USBD_EP0_STATUS_OUT; 8005e66: 687b ldr r3, [r7, #4] 8005e68: 2205 movs r2, #5 8005e6a: f8c3 2294 str.w r2, [r3, #660] ; 0x294 /* Start the transfer */ USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U); 8005e6e: 2300 movs r3, #0 8005e70: 2200 movs r2, #0 8005e72: 2100 movs r1, #0 8005e74: 6878 ldr r0, [r7, #4] 8005e76: f000 fbf9 bl 800666c return USBD_OK; 8005e7a: 2300 movs r3, #0 } 8005e7c: 4618 mov r0, r3 8005e7e: 3708 adds r7, #8 8005e80: 46bd mov sp, r7 8005e82: bd80 pop {r7, pc} 08005e84 : /** * Init USB device Library, add supported class and start the library * @retval None */ void MX_USB_DEVICE_Init(void) { 8005e84: b580 push {r7, lr} 8005e86: 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) 8005e88: 2200 movs r2, #0 8005e8a: 4912 ldr r1, [pc, #72] ; (8005ed4 ) 8005e8c: 4812 ldr r0, [pc, #72] ; (8005ed8 ) 8005e8e: f7fe ff6d bl 8004d6c 8005e92: 4603 mov r3, r0 8005e94: 2b00 cmp r3, #0 8005e96: d001 beq.n 8005e9c { Error_Handler(); 8005e98: f7fa f9ec bl 8000274 } if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_CDC) != USBD_OK) 8005e9c: 490f ldr r1, [pc, #60] ; (8005edc ) 8005e9e: 480e ldr r0, [pc, #56] ; (8005ed8 ) 8005ea0: f7fe ff8f bl 8004dc2 8005ea4: 4603 mov r3, r0 8005ea6: 2b00 cmp r3, #0 8005ea8: d001 beq.n 8005eae { Error_Handler(); 8005eaa: f7fa f9e3 bl 8000274 } if (USBD_CDC_RegisterInterface(&hUsbDeviceFS, &USBD_Interface_fops_FS) != USBD_OK) 8005eae: 490c ldr r1, [pc, #48] ; (8005ee0 ) 8005eb0: 4809 ldr r0, [pc, #36] ; (8005ed8 ) 8005eb2: f7fe feef bl 8004c94 8005eb6: 4603 mov r3, r0 8005eb8: 2b00 cmp r3, #0 8005eba: d001 beq.n 8005ec0 { Error_Handler(); 8005ebc: f7fa f9da bl 8000274 } if (USBD_Start(&hUsbDeviceFS) != USBD_OK) 8005ec0: 4805 ldr r0, [pc, #20] ; (8005ed8 ) 8005ec2: f7fe ff97 bl 8004df4 8005ec6: 4603 mov r3, r0 8005ec8: 2b00 cmp r3, #0 8005eca: d001 beq.n 8005ed0 { Error_Handler(); 8005ecc: f7fa f9d2 bl 8000274 } /* USER CODE BEGIN USB_DEVICE_Init_PostTreatment */ /* USER CODE END USB_DEVICE_Init_PostTreatment */ } 8005ed0: bf00 nop 8005ed2: bd80 pop {r7, pc} 8005ed4: 2000012c .word 0x2000012c 8005ed8: 200003c0 .word 0x200003c0 8005edc: 20000018 .word 0x20000018 8005ee0: 2000011c .word 0x2000011c 08005ee4 : /** * @brief Initializes the CDC media low layer over the FS USB IP * @retval USBD_OK if all operations are OK else USBD_FAIL */ static int8_t CDC_Init_FS(void) { 8005ee4: b580 push {r7, lr} 8005ee6: af00 add r7, sp, #0 /* USER CODE BEGIN 3 */ /* Set Application Buffers */ USBD_CDC_SetTxBuffer(&hUsbDeviceFS, UserTxBufferFS, 0); 8005ee8: 2200 movs r2, #0 8005eea: 4905 ldr r1, [pc, #20] ; (8005f00 ) 8005eec: 4805 ldr r0, [pc, #20] ; (8005f04 ) 8005eee: f7fe fee7 bl 8004cc0 USBD_CDC_SetRxBuffer(&hUsbDeviceFS, UserRxBufferFS); 8005ef2: 4905 ldr r1, [pc, #20] ; (8005f08 ) 8005ef4: 4803 ldr r0, [pc, #12] ; (8005f04 ) 8005ef6: f7fe fefc bl 8004cf2 return (USBD_OK); 8005efa: 2300 movs r3, #0 /* USER CODE END 3 */ } 8005efc: 4618 mov r0, r3 8005efe: bd80 pop {r7, pc} 8005f00: 20000a6c .word 0x20000a6c 8005f04: 200003c0 .word 0x200003c0 8005f08: 20000684 .word 0x20000684 08005f0c : /** * @brief DeInitializes the CDC media low layer * @retval USBD_OK if all operations are OK else USBD_FAIL */ static int8_t CDC_DeInit_FS(void) { 8005f0c: b480 push {r7} 8005f0e: af00 add r7, sp, #0 /* USER CODE BEGIN 4 */ return (USBD_OK); 8005f10: 2300 movs r3, #0 /* USER CODE END 4 */ } 8005f12: 4618 mov r0, r3 8005f14: 46bd mov sp, r7 8005f16: bc80 pop {r7} 8005f18: 4770 bx lr ... 08005f1c : * @param pbuf: Buffer containing command data (request parameters) * @param length: Number of data to be sent (in bytes) * @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL */ static int8_t CDC_Control_FS(uint8_t cmd, uint8_t* pbuf, uint16_t length) { 8005f1c: b480 push {r7} 8005f1e: b083 sub sp, #12 8005f20: af00 add r7, sp, #0 8005f22: 4603 mov r3, r0 8005f24: 6039 str r1, [r7, #0] 8005f26: 71fb strb r3, [r7, #7] 8005f28: 4613 mov r3, r2 8005f2a: 80bb strh r3, [r7, #4] /* USER CODE BEGIN 5 */ switch(cmd) 8005f2c: 79fb ldrb r3, [r7, #7] 8005f2e: 2b23 cmp r3, #35 ; 0x23 8005f30: d84a bhi.n 8005fc8 8005f32: a201 add r2, pc, #4 ; (adr r2, 8005f38 ) 8005f34: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8005f38: 08005fc9 .word 0x08005fc9 8005f3c: 08005fc9 .word 0x08005fc9 8005f40: 08005fc9 .word 0x08005fc9 8005f44: 08005fc9 .word 0x08005fc9 8005f48: 08005fc9 .word 0x08005fc9 8005f4c: 08005fc9 .word 0x08005fc9 8005f50: 08005fc9 .word 0x08005fc9 8005f54: 08005fc9 .word 0x08005fc9 8005f58: 08005fc9 .word 0x08005fc9 8005f5c: 08005fc9 .word 0x08005fc9 8005f60: 08005fc9 .word 0x08005fc9 8005f64: 08005fc9 .word 0x08005fc9 8005f68: 08005fc9 .word 0x08005fc9 8005f6c: 08005fc9 .word 0x08005fc9 8005f70: 08005fc9 .word 0x08005fc9 8005f74: 08005fc9 .word 0x08005fc9 8005f78: 08005fc9 .word 0x08005fc9 8005f7c: 08005fc9 .word 0x08005fc9 8005f80: 08005fc9 .word 0x08005fc9 8005f84: 08005fc9 .word 0x08005fc9 8005f88: 08005fc9 .word 0x08005fc9 8005f8c: 08005fc9 .word 0x08005fc9 8005f90: 08005fc9 .word 0x08005fc9 8005f94: 08005fc9 .word 0x08005fc9 8005f98: 08005fc9 .word 0x08005fc9 8005f9c: 08005fc9 .word 0x08005fc9 8005fa0: 08005fc9 .word 0x08005fc9 8005fa4: 08005fc9 .word 0x08005fc9 8005fa8: 08005fc9 .word 0x08005fc9 8005fac: 08005fc9 .word 0x08005fc9 8005fb0: 08005fc9 .word 0x08005fc9 8005fb4: 08005fc9 .word 0x08005fc9 8005fb8: 08005fc9 .word 0x08005fc9 8005fbc: 08005fc9 .word 0x08005fc9 8005fc0: 08005fc9 .word 0x08005fc9 8005fc4: 08005fc9 .word 0x08005fc9 case CDC_SEND_BREAK: break; default: break; 8005fc8: bf00 nop } return (USBD_OK); 8005fca: 2300 movs r3, #0 /* USER CODE END 5 */ } 8005fcc: 4618 mov r0, r3 8005fce: 370c adds r7, #12 8005fd0: 46bd mov sp, r7 8005fd2: bc80 pop {r7} 8005fd4: 4770 bx lr 8005fd6: bf00 nop 08005fd8 : * @param Buf: Buffer of data to be received * @param Len: Number of data received (in bytes) * @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL */ static int8_t CDC_Receive_FS(uint8_t* Buf, uint32_t *Len) { 8005fd8: b580 push {r7, lr} 8005fda: b082 sub sp, #8 8005fdc: af00 add r7, sp, #0 8005fde: 6078 str r0, [r7, #4] 8005fe0: 6039 str r1, [r7, #0] /* USER CODE BEGIN 6 */ USBD_CDC_SetRxBuffer(&hUsbDeviceFS, &Buf[0]); 8005fe2: 6879 ldr r1, [r7, #4] 8005fe4: 4805 ldr r0, [pc, #20] ; (8005ffc ) 8005fe6: f7fe fe84 bl 8004cf2 USBD_CDC_ReceivePacket(&hUsbDeviceFS); 8005fea: 4804 ldr r0, [pc, #16] ; (8005ffc ) 8005fec: f7fe fe94 bl 8004d18 return (USBD_OK); 8005ff0: 2300 movs r3, #0 /* USER CODE END 6 */ } 8005ff2: 4618 mov r0, r3 8005ff4: 3708 adds r7, #8 8005ff6: 46bd mov sp, r7 8005ff8: bd80 pop {r7, pc} 8005ffa: bf00 nop 8005ffc: 200003c0 .word 0x200003c0 08006000 : * @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) { 8006000: b480 push {r7} 8006002: b083 sub sp, #12 8006004: af00 add r7, sp, #0 8006006: 4603 mov r3, r0 8006008: 6039 str r1, [r7, #0] 800600a: 71fb strb r3, [r7, #7] UNUSED(speed); *length = sizeof(USBD_FS_DeviceDesc); 800600c: 683b ldr r3, [r7, #0] 800600e: 2212 movs r2, #18 8006010: 801a strh r2, [r3, #0] return USBD_FS_DeviceDesc; 8006012: 4b03 ldr r3, [pc, #12] ; (8006020 ) } 8006014: 4618 mov r0, r3 8006016: 370c adds r7, #12 8006018: 46bd mov sp, r7 800601a: bc80 pop {r7} 800601c: 4770 bx lr 800601e: bf00 nop 8006020: 20000148 .word 0x20000148 08006024 : * @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) { 8006024: b480 push {r7} 8006026: b083 sub sp, #12 8006028: af00 add r7, sp, #0 800602a: 4603 mov r3, r0 800602c: 6039 str r1, [r7, #0] 800602e: 71fb strb r3, [r7, #7] UNUSED(speed); *length = sizeof(USBD_LangIDDesc); 8006030: 683b ldr r3, [r7, #0] 8006032: 2204 movs r2, #4 8006034: 801a strh r2, [r3, #0] return USBD_LangIDDesc; 8006036: 4b03 ldr r3, [pc, #12] ; (8006044 ) } 8006038: 4618 mov r0, r3 800603a: 370c adds r7, #12 800603c: 46bd mov sp, r7 800603e: bc80 pop {r7} 8006040: 4770 bx lr 8006042: bf00 nop 8006044: 2000015c .word 0x2000015c 08006048 : * @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) { 8006048: b580 push {r7, lr} 800604a: b082 sub sp, #8 800604c: af00 add r7, sp, #0 800604e: 4603 mov r3, r0 8006050: 6039 str r1, [r7, #0] 8006052: 71fb strb r3, [r7, #7] if(speed == 0) 8006054: 79fb ldrb r3, [r7, #7] 8006056: 2b00 cmp r3, #0 8006058: d105 bne.n 8006066 { USBD_GetString((uint8_t *)USBD_PRODUCT_STRING_FS, USBD_StrDesc, length); 800605a: 683a ldr r2, [r7, #0] 800605c: 4907 ldr r1, [pc, #28] ; (800607c ) 800605e: 4808 ldr r0, [pc, #32] ; (8006080 ) 8006060: f7ff fe33 bl 8005cca 8006064: e004 b.n 8006070 } else { USBD_GetString((uint8_t *)USBD_PRODUCT_STRING_FS, USBD_StrDesc, length); 8006066: 683a ldr r2, [r7, #0] 8006068: 4904 ldr r1, [pc, #16] ; (800607c ) 800606a: 4805 ldr r0, [pc, #20] ; (8006080 ) 800606c: f7ff fe2d bl 8005cca } return USBD_StrDesc; 8006070: 4b02 ldr r3, [pc, #8] ; (800607c ) } 8006072: 4618 mov r0, r3 8006074: 3708 adds r7, #8 8006076: 46bd mov sp, r7 8006078: bd80 pop {r7, pc} 800607a: bf00 nop 800607c: 20000e54 .word 0x20000e54 8006080: 080067f4 .word 0x080067f4 08006084 : * @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) { 8006084: b580 push {r7, lr} 8006086: b082 sub sp, #8 8006088: af00 add r7, sp, #0 800608a: 4603 mov r3, r0 800608c: 6039 str r1, [r7, #0] 800608e: 71fb strb r3, [r7, #7] UNUSED(speed); USBD_GetString((uint8_t *)USBD_MANUFACTURER_STRING, USBD_StrDesc, length); 8006090: 683a ldr r2, [r7, #0] 8006092: 4904 ldr r1, [pc, #16] ; (80060a4 ) 8006094: 4804 ldr r0, [pc, #16] ; (80060a8 ) 8006096: f7ff fe18 bl 8005cca return USBD_StrDesc; 800609a: 4b02 ldr r3, [pc, #8] ; (80060a4 ) } 800609c: 4618 mov r0, r3 800609e: 3708 adds r7, #8 80060a0: 46bd mov sp, r7 80060a2: bd80 pop {r7, pc} 80060a4: 20000e54 .word 0x20000e54 80060a8: 0800680c .word 0x0800680c 080060ac : * @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) { 80060ac: b580 push {r7, lr} 80060ae: b082 sub sp, #8 80060b0: af00 add r7, sp, #0 80060b2: 4603 mov r3, r0 80060b4: 6039 str r1, [r7, #0] 80060b6: 71fb strb r3, [r7, #7] UNUSED(speed); *length = USB_SIZ_STRING_SERIAL; 80060b8: 683b ldr r3, [r7, #0] 80060ba: 221a movs r2, #26 80060bc: 801a strh r2, [r3, #0] /* Update the serial number string descriptor with the data from the unique * ID */ Get_SerialNum(); 80060be: f000 f843 bl 8006148 /* USER CODE BEGIN USBD_FS_SerialStrDescriptor */ /* USER CODE END USBD_FS_SerialStrDescriptor */ return (uint8_t *) USBD_StringSerial; 80060c2: 4b02 ldr r3, [pc, #8] ; (80060cc ) } 80060c4: 4618 mov r0, r3 80060c6: 3708 adds r7, #8 80060c8: 46bd mov sp, r7 80060ca: bd80 pop {r7, pc} 80060cc: 20000160 .word 0x20000160 080060d0 : * @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) { 80060d0: b580 push {r7, lr} 80060d2: b082 sub sp, #8 80060d4: af00 add r7, sp, #0 80060d6: 4603 mov r3, r0 80060d8: 6039 str r1, [r7, #0] 80060da: 71fb strb r3, [r7, #7] if(speed == USBD_SPEED_HIGH) 80060dc: 79fb ldrb r3, [r7, #7] 80060de: 2b00 cmp r3, #0 80060e0: d105 bne.n 80060ee { USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length); 80060e2: 683a ldr r2, [r7, #0] 80060e4: 4907 ldr r1, [pc, #28] ; (8006104 ) 80060e6: 4808 ldr r0, [pc, #32] ; (8006108 ) 80060e8: f7ff fdef bl 8005cca 80060ec: e004 b.n 80060f8 } else { USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length); 80060ee: 683a ldr r2, [r7, #0] 80060f0: 4904 ldr r1, [pc, #16] ; (8006104 ) 80060f2: 4805 ldr r0, [pc, #20] ; (8006108 ) 80060f4: f7ff fde9 bl 8005cca } return USBD_StrDesc; 80060f8: 4b02 ldr r3, [pc, #8] ; (8006104 ) } 80060fa: 4618 mov r0, r3 80060fc: 3708 adds r7, #8 80060fe: 46bd mov sp, r7 8006100: bd80 pop {r7, pc} 8006102: bf00 nop 8006104: 20000e54 .word 0x20000e54 8006108: 08006820 .word 0x08006820 0800610c : * @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) { 800610c: b580 push {r7, lr} 800610e: b082 sub sp, #8 8006110: af00 add r7, sp, #0 8006112: 4603 mov r3, r0 8006114: 6039 str r1, [r7, #0] 8006116: 71fb strb r3, [r7, #7] if(speed == 0) 8006118: 79fb ldrb r3, [r7, #7] 800611a: 2b00 cmp r3, #0 800611c: d105 bne.n 800612a { USBD_GetString((uint8_t *)USBD_INTERFACE_STRING_FS, USBD_StrDesc, length); 800611e: 683a ldr r2, [r7, #0] 8006120: 4907 ldr r1, [pc, #28] ; (8006140 ) 8006122: 4808 ldr r0, [pc, #32] ; (8006144 ) 8006124: f7ff fdd1 bl 8005cca 8006128: e004 b.n 8006134 } else { USBD_GetString((uint8_t *)USBD_INTERFACE_STRING_FS, USBD_StrDesc, length); 800612a: 683a ldr r2, [r7, #0] 800612c: 4904 ldr r1, [pc, #16] ; (8006140 ) 800612e: 4805 ldr r0, [pc, #20] ; (8006144 ) 8006130: f7ff fdcb bl 8005cca } return USBD_StrDesc; 8006134: 4b02 ldr r3, [pc, #8] ; (8006140 ) } 8006136: 4618 mov r0, r3 8006138: 3708 adds r7, #8 800613a: 46bd mov sp, r7 800613c: bd80 pop {r7, pc} 800613e: bf00 nop 8006140: 20000e54 .word 0x20000e54 8006144: 0800682c .word 0x0800682c 08006148 : * @brief Create the serial number string descriptor * @param None * @retval None */ static void Get_SerialNum(void) { 8006148: b580 push {r7, lr} 800614a: b084 sub sp, #16 800614c: af00 add r7, sp, #0 uint32_t deviceserial0, deviceserial1, deviceserial2; deviceserial0 = *(uint32_t *) DEVICE_ID1; 800614e: 4b0f ldr r3, [pc, #60] ; (800618c ) 8006150: 681b ldr r3, [r3, #0] 8006152: 60fb str r3, [r7, #12] deviceserial1 = *(uint32_t *) DEVICE_ID2; 8006154: 4b0e ldr r3, [pc, #56] ; (8006190 ) 8006156: 681b ldr r3, [r3, #0] 8006158: 60bb str r3, [r7, #8] deviceserial2 = *(uint32_t *) DEVICE_ID3; 800615a: 4b0e ldr r3, [pc, #56] ; (8006194 ) 800615c: 681b ldr r3, [r3, #0] 800615e: 607b str r3, [r7, #4] deviceserial0 += deviceserial2; 8006160: 68fa ldr r2, [r7, #12] 8006162: 687b ldr r3, [r7, #4] 8006164: 4413 add r3, r2 8006166: 60fb str r3, [r7, #12] if (deviceserial0 != 0) 8006168: 68fb ldr r3, [r7, #12] 800616a: 2b00 cmp r3, #0 800616c: d009 beq.n 8006182 { IntToUnicode(deviceserial0, &USBD_StringSerial[2], 8); 800616e: 2208 movs r2, #8 8006170: 4909 ldr r1, [pc, #36] ; (8006198 ) 8006172: 68f8 ldr r0, [r7, #12] 8006174: f000 f814 bl 80061a0 IntToUnicode(deviceserial1, &USBD_StringSerial[18], 4); 8006178: 2204 movs r2, #4 800617a: 4908 ldr r1, [pc, #32] ; (800619c ) 800617c: 68b8 ldr r0, [r7, #8] 800617e: f000 f80f bl 80061a0 } } 8006182: bf00 nop 8006184: 3710 adds r7, #16 8006186: 46bd mov sp, r7 8006188: bd80 pop {r7, pc} 800618a: bf00 nop 800618c: 1ffff7e8 .word 0x1ffff7e8 8006190: 1ffff7ec .word 0x1ffff7ec 8006194: 1ffff7f0 .word 0x1ffff7f0 8006198: 20000162 .word 0x20000162 800619c: 20000172 .word 0x20000172 080061a0 : * @param pbuf: pointer to the buffer * @param len: buffer length * @retval None */ static void IntToUnicode(uint32_t value, uint8_t * pbuf, uint8_t len) { 80061a0: b480 push {r7} 80061a2: b087 sub sp, #28 80061a4: af00 add r7, sp, #0 80061a6: 60f8 str r0, [r7, #12] 80061a8: 60b9 str r1, [r7, #8] 80061aa: 4613 mov r3, r2 80061ac: 71fb strb r3, [r7, #7] uint8_t idx = 0; 80061ae: 2300 movs r3, #0 80061b0: 75fb strb r3, [r7, #23] for (idx = 0; idx < len; idx++) 80061b2: 2300 movs r3, #0 80061b4: 75fb strb r3, [r7, #23] 80061b6: e027 b.n 8006208 { if (((value >> 28)) < 0xA) 80061b8: 68fb ldr r3, [r7, #12] 80061ba: 0f1b lsrs r3, r3, #28 80061bc: 2b09 cmp r3, #9 80061be: d80b bhi.n 80061d8 { pbuf[2 * idx] = (value >> 28) + '0'; 80061c0: 68fb ldr r3, [r7, #12] 80061c2: 0f1b lsrs r3, r3, #28 80061c4: b2da uxtb r2, r3 80061c6: 7dfb ldrb r3, [r7, #23] 80061c8: 005b lsls r3, r3, #1 80061ca: 4619 mov r1, r3 80061cc: 68bb ldr r3, [r7, #8] 80061ce: 440b add r3, r1 80061d0: 3230 adds r2, #48 ; 0x30 80061d2: b2d2 uxtb r2, r2 80061d4: 701a strb r2, [r3, #0] 80061d6: e00a b.n 80061ee } else { pbuf[2 * idx] = (value >> 28) + 'A' - 10; 80061d8: 68fb ldr r3, [r7, #12] 80061da: 0f1b lsrs r3, r3, #28 80061dc: b2da uxtb r2, r3 80061de: 7dfb ldrb r3, [r7, #23] 80061e0: 005b lsls r3, r3, #1 80061e2: 4619 mov r1, r3 80061e4: 68bb ldr r3, [r7, #8] 80061e6: 440b add r3, r1 80061e8: 3237 adds r2, #55 ; 0x37 80061ea: b2d2 uxtb r2, r2 80061ec: 701a strb r2, [r3, #0] } value = value << 4; 80061ee: 68fb ldr r3, [r7, #12] 80061f0: 011b lsls r3, r3, #4 80061f2: 60fb str r3, [r7, #12] pbuf[2 * idx + 1] = 0; 80061f4: 7dfb ldrb r3, [r7, #23] 80061f6: 005b lsls r3, r3, #1 80061f8: 3301 adds r3, #1 80061fa: 68ba ldr r2, [r7, #8] 80061fc: 4413 add r3, r2 80061fe: 2200 movs r2, #0 8006200: 701a strb r2, [r3, #0] for (idx = 0; idx < len; idx++) 8006202: 7dfb ldrb r3, [r7, #23] 8006204: 3301 adds r3, #1 8006206: 75fb strb r3, [r7, #23] 8006208: 7dfa ldrb r2, [r7, #23] 800620a: 79fb ldrb r3, [r7, #7] 800620c: 429a cmp r2, r3 800620e: d3d3 bcc.n 80061b8 } } 8006210: bf00 nop 8006212: 371c adds r7, #28 8006214: 46bd mov sp, r7 8006216: bc80 pop {r7} 8006218: 4770 bx lr ... 0800621c : LL Driver Callbacks (PCD -> USB Device Library) *******************************************************************************/ /* MSP Init */ void HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle) { 800621c: b580 push {r7, lr} 800621e: b084 sub sp, #16 8006220: af00 add r7, sp, #0 8006222: 6078 str r0, [r7, #4] if(pcdHandle->Instance==USB) 8006224: 687b ldr r3, [r7, #4] 8006226: 681b ldr r3, [r3, #0] 8006228: 4a0d ldr r2, [pc, #52] ; (8006260 ) 800622a: 4293 cmp r3, r2 800622c: d113 bne.n 8006256 { /* USER CODE BEGIN USB_MspInit 0 */ /* USER CODE END USB_MspInit 0 */ /* Peripheral clock enable */ __HAL_RCC_USB_CLK_ENABLE(); 800622e: 4b0d ldr r3, [pc, #52] ; (8006264 ) 8006230: 69db ldr r3, [r3, #28] 8006232: 4a0c ldr r2, [pc, #48] ; (8006264 ) 8006234: f443 0300 orr.w r3, r3, #8388608 ; 0x800000 8006238: 61d3 str r3, [r2, #28] 800623a: 4b0a ldr r3, [pc, #40] ; (8006264 ) 800623c: 69db ldr r3, [r3, #28] 800623e: f403 0300 and.w r3, r3, #8388608 ; 0x800000 8006242: 60fb str r3, [r7, #12] 8006244: 68fb ldr r3, [r7, #12] /* Peripheral interrupt init */ HAL_NVIC_SetPriority(USB_LP_CAN1_RX0_IRQn, 0, 0); 8006246: 2200 movs r2, #0 8006248: 2100 movs r1, #0 800624a: 2014 movs r0, #20 800624c: f7fa f9df bl 800060e HAL_NVIC_EnableIRQ(USB_LP_CAN1_RX0_IRQn); 8006250: 2014 movs r0, #20 8006252: f7fa f9f8 bl 8000646 /* USER CODE BEGIN USB_MspInit 1 */ /* USER CODE END USB_MspInit 1 */ } } 8006256: bf00 nop 8006258: 3710 adds r7, #16 800625a: 46bd mov sp, r7 800625c: bd80 pop {r7, pc} 800625e: bf00 nop 8006260: 40005c00 .word 0x40005c00 8006264: 40021000 .word 0x40021000 08006268 : #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 */ { 8006268: b580 push {r7, lr} 800626a: b082 sub sp, #8 800626c: af00 add r7, sp, #0 800626e: 6078 str r0, [r7, #4] USBD_LL_SetupStage((USBD_HandleTypeDef*)hpcd->pData, (uint8_t *)hpcd->Setup); 8006270: 687b ldr r3, [r7, #4] 8006272: f8d3 22e8 ldr.w r2, [r3, #744] ; 0x2e8 8006276: 687b ldr r3, [r7, #4] 8006278: f503 732c add.w r3, r3, #688 ; 0x2b0 800627c: 4619 mov r1, r3 800627e: 4610 mov r0, r2 8006280: f7fe fe00 bl 8004e84 } 8006284: bf00 nop 8006286: 3708 adds r7, #8 8006288: 46bd mov sp, r7 800628a: bd80 pop {r7, pc} 0800628c : #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 */ { 800628c: b580 push {r7, lr} 800628e: b082 sub sp, #8 8006290: af00 add r7, sp, #0 8006292: 6078 str r0, [r7, #4] 8006294: 460b mov r3, r1 8006296: 70fb strb r3, [r7, #3] USBD_LL_DataOutStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->OUT_ep[epnum].xfer_buff); 8006298: 687b ldr r3, [r7, #4] 800629a: f8d3 02e8 ldr.w r0, [r3, #744] ; 0x2e8 800629e: 78fa ldrb r2, [r7, #3] 80062a0: 6879 ldr r1, [r7, #4] 80062a2: 4613 mov r3, r2 80062a4: 009b lsls r3, r3, #2 80062a6: 4413 add r3, r2 80062a8: 00db lsls r3, r3, #3 80062aa: 440b add r3, r1 80062ac: f503 73be add.w r3, r3, #380 ; 0x17c 80062b0: 681a ldr r2, [r3, #0] 80062b2: 78fb ldrb r3, [r7, #3] 80062b4: 4619 mov r1, r3 80062b6: f7fe fe30 bl 8004f1a } 80062ba: bf00 nop 80062bc: 3708 adds r7, #8 80062be: 46bd mov sp, r7 80062c0: bd80 pop {r7, pc} 080062c2 : #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 */ { 80062c2: b580 push {r7, lr} 80062c4: b082 sub sp, #8 80062c6: af00 add r7, sp, #0 80062c8: 6078 str r0, [r7, #4] 80062ca: 460b mov r3, r1 80062cc: 70fb strb r3, [r7, #3] USBD_LL_DataInStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->IN_ep[epnum].xfer_buff); 80062ce: 687b ldr r3, [r7, #4] 80062d0: f8d3 02e8 ldr.w r0, [r3, #744] ; 0x2e8 80062d4: 78fa ldrb r2, [r7, #3] 80062d6: 6879 ldr r1, [r7, #4] 80062d8: 4613 mov r3, r2 80062da: 009b lsls r3, r3, #2 80062dc: 4413 add r3, r2 80062de: 00db lsls r3, r3, #3 80062e0: 440b add r3, r1 80062e2: 333c adds r3, #60 ; 0x3c 80062e4: 681a ldr r2, [r3, #0] 80062e6: 78fb ldrb r3, [r7, #3] 80062e8: 4619 mov r1, r3 80062ea: f7fe fe87 bl 8004ffc } 80062ee: bf00 nop 80062f0: 3708 adds r7, #8 80062f2: 46bd mov sp, r7 80062f4: bd80 pop {r7, pc} 080062f6 : #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 */ { 80062f6: b580 push {r7, lr} 80062f8: b082 sub sp, #8 80062fa: af00 add r7, sp, #0 80062fc: 6078 str r0, [r7, #4] USBD_LL_SOF((USBD_HandleTypeDef*)hpcd->pData); 80062fe: 687b ldr r3, [r7, #4] 8006300: f8d3 32e8 ldr.w r3, [r3, #744] ; 0x2e8 8006304: 4618 mov r0, r3 8006306: f7fe ff97 bl 8005238 } 800630a: bf00 nop 800630c: 3708 adds r7, #8 800630e: 46bd mov sp, r7 8006310: bd80 pop {r7, pc} 08006312 : #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 */ { 8006312: b580 push {r7, lr} 8006314: b084 sub sp, #16 8006316: af00 add r7, sp, #0 8006318: 6078 str r0, [r7, #4] USBD_SpeedTypeDef speed = USBD_SPEED_FULL; 800631a: 2301 movs r3, #1 800631c: 73fb strb r3, [r7, #15] if ( hpcd->Init.speed != PCD_SPEED_FULL) 800631e: 687b ldr r3, [r7, #4] 8006320: 689b ldr r3, [r3, #8] 8006322: 2b02 cmp r3, #2 8006324: d001 beq.n 800632a { Error_Handler(); 8006326: f7f9 ffa5 bl 8000274 } /* Set Speed. */ USBD_LL_SetSpeed((USBD_HandleTypeDef*)hpcd->pData, speed); 800632a: 687b ldr r3, [r7, #4] 800632c: f8d3 32e8 ldr.w r3, [r3, #744] ; 0x2e8 8006330: 7bfa ldrb r2, [r7, #15] 8006332: 4611 mov r1, r2 8006334: 4618 mov r0, r3 8006336: f7fe ff47 bl 80051c8 /* Reset Device. */ USBD_LL_Reset((USBD_HandleTypeDef*)hpcd->pData); 800633a: 687b ldr r3, [r7, #4] 800633c: f8d3 32e8 ldr.w r3, [r3, #744] ; 0x2e8 8006340: 4618 mov r0, r3 8006342: f7fe ff00 bl 8005146 } 8006346: bf00 nop 8006348: 3710 adds r7, #16 800634a: 46bd mov sp, r7 800634c: bd80 pop {r7, pc} ... 08006350 : #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 */ { 8006350: b580 push {r7, lr} 8006352: b082 sub sp, #8 8006354: af00 add r7, sp, #0 8006356: 6078 str r0, [r7, #4] /* Inform USB library that core enters in suspend Mode. */ USBD_LL_Suspend((USBD_HandleTypeDef*)hpcd->pData); 8006358: 687b ldr r3, [r7, #4] 800635a: f8d3 32e8 ldr.w r3, [r3, #744] ; 0x2e8 800635e: 4618 mov r0, r3 8006360: f7fe ff41 bl 80051e6 /* Enter in STOP mode. */ /* USER CODE BEGIN 2 */ if (hpcd->Init.low_power_enable) 8006364: 687b ldr r3, [r7, #4] 8006366: 699b ldr r3, [r3, #24] 8006368: 2b00 cmp r3, #0 800636a: d005 beq.n 8006378 { /* Set SLEEPDEEP bit and SleepOnExit of Cortex System Control Register. */ SCB->SCR |= (uint32_t)((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk)); 800636c: 4b04 ldr r3, [pc, #16] ; (8006380 ) 800636e: 691b ldr r3, [r3, #16] 8006370: 4a03 ldr r2, [pc, #12] ; (8006380 ) 8006372: f043 0306 orr.w r3, r3, #6 8006376: 6113 str r3, [r2, #16] } /* USER CODE END 2 */ } 8006378: bf00 nop 800637a: 3708 adds r7, #8 800637c: 46bd mov sp, r7 800637e: bd80 pop {r7, pc} 8006380: e000ed00 .word 0xe000ed00 08006384 : #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 */ { 8006384: b580 push {r7, lr} 8006386: b082 sub sp, #8 8006388: af00 add r7, sp, #0 800638a: 6078 str r0, [r7, #4] /* USER CODE BEGIN 3 */ /* USER CODE END 3 */ USBD_LL_Resume((USBD_HandleTypeDef*)hpcd->pData); 800638c: 687b ldr r3, [r7, #4] 800638e: f8d3 32e8 ldr.w r3, [r3, #744] ; 0x2e8 8006392: 4618 mov r0, r3 8006394: f7fe ff3b bl 800520e } 8006398: bf00 nop 800639a: 3708 adds r7, #8 800639c: 46bd mov sp, r7 800639e: bd80 pop {r7, pc} 080063a0 : * @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) { 80063a0: b580 push {r7, lr} 80063a2: b082 sub sp, #8 80063a4: af00 add r7, sp, #0 80063a6: 6078 str r0, [r7, #4] /* Init USB Ip. */ /* Link the driver to the stack. */ hpcd_USB_FS.pData = pdev; 80063a8: 4a28 ldr r2, [pc, #160] ; (800644c ) 80063aa: 687b ldr r3, [r7, #4] 80063ac: f8c2 32e8 str.w r3, [r2, #744] ; 0x2e8 pdev->pData = &hpcd_USB_FS; 80063b0: 687b ldr r3, [r7, #4] 80063b2: 4a26 ldr r2, [pc, #152] ; (800644c ) 80063b4: f8c3 22c0 str.w r2, [r3, #704] ; 0x2c0 hpcd_USB_FS.Instance = USB; 80063b8: 4b24 ldr r3, [pc, #144] ; (800644c ) 80063ba: 4a25 ldr r2, [pc, #148] ; (8006450 ) 80063bc: 601a str r2, [r3, #0] hpcd_USB_FS.Init.dev_endpoints = 8; 80063be: 4b23 ldr r3, [pc, #140] ; (800644c ) 80063c0: 2208 movs r2, #8 80063c2: 605a str r2, [r3, #4] hpcd_USB_FS.Init.speed = PCD_SPEED_FULL; 80063c4: 4b21 ldr r3, [pc, #132] ; (800644c ) 80063c6: 2202 movs r2, #2 80063c8: 609a str r2, [r3, #8] hpcd_USB_FS.Init.low_power_enable = DISABLE; 80063ca: 4b20 ldr r3, [pc, #128] ; (800644c ) 80063cc: 2200 movs r2, #0 80063ce: 619a str r2, [r3, #24] hpcd_USB_FS.Init.lpm_enable = DISABLE; 80063d0: 4b1e ldr r3, [pc, #120] ; (800644c ) 80063d2: 2200 movs r2, #0 80063d4: 61da str r2, [r3, #28] hpcd_USB_FS.Init.battery_charging_enable = DISABLE; 80063d6: 4b1d ldr r3, [pc, #116] ; (800644c ) 80063d8: 2200 movs r2, #0 80063da: 621a str r2, [r3, #32] if (HAL_PCD_Init(&hpcd_USB_FS) != HAL_OK) 80063dc: 481b ldr r0, [pc, #108] ; (800644c ) 80063de: f7fa f94c bl 800067a 80063e2: 4603 mov r3, r0 80063e4: 2b00 cmp r3, #0 80063e6: d001 beq.n 80063ec { Error_Handler( ); 80063e8: f7f9 ff44 bl 8000274 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); 80063ec: 687b ldr r3, [r7, #4] 80063ee: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 80063f2: 2318 movs r3, #24 80063f4: 2200 movs r2, #0 80063f6: 2100 movs r1, #0 80063f8: f7fb fc80 bl 8001cfc HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x80 , PCD_SNG_BUF, 0x58); 80063fc: 687b ldr r3, [r7, #4] 80063fe: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 8006402: 2358 movs r3, #88 ; 0x58 8006404: 2200 movs r2, #0 8006406: 2180 movs r1, #128 ; 0x80 8006408: f7fb fc78 bl 8001cfc /* USER CODE END EndPoint_Configuration */ /* USER CODE BEGIN EndPoint_Configuration_CDC */ HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x81 , PCD_SNG_BUF, 0xC0); 800640c: 687b ldr r3, [r7, #4] 800640e: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 8006412: 23c0 movs r3, #192 ; 0xc0 8006414: 2200 movs r2, #0 8006416: 2181 movs r1, #129 ; 0x81 8006418: f7fb fc70 bl 8001cfc HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x01 , PCD_SNG_BUF, 0x110); 800641c: 687b ldr r3, [r7, #4] 800641e: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 8006422: f44f 7388 mov.w r3, #272 ; 0x110 8006426: 2200 movs r2, #0 8006428: 2101 movs r1, #1 800642a: f7fb fc67 bl 8001cfc HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x82 , PCD_SNG_BUF, 0x100); 800642e: 687b ldr r3, [r7, #4] 8006430: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 8006434: f44f 7380 mov.w r3, #256 ; 0x100 8006438: 2200 movs r2, #0 800643a: 2182 movs r1, #130 ; 0x82 800643c: f7fb fc5e bl 8001cfc /* USER CODE END EndPoint_Configuration_CDC */ return USBD_OK; 8006440: 2300 movs r3, #0 } 8006442: 4618 mov r0, r3 8006444: 3708 adds r7, #8 8006446: 46bd mov sp, r7 8006448: bd80 pop {r7, pc} 800644a: bf00 nop 800644c: 20001054 .word 0x20001054 8006450: 40005c00 .word 0x40005c00 08006454 : * @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) { 8006454: b580 push {r7, lr} 8006456: b084 sub sp, #16 8006458: af00 add r7, sp, #0 800645a: 6078 str r0, [r7, #4] HAL_StatusTypeDef hal_status = HAL_OK; 800645c: 2300 movs r3, #0 800645e: 73fb strb r3, [r7, #15] USBD_StatusTypeDef usb_status = USBD_OK; 8006460: 2300 movs r3, #0 8006462: 73bb strb r3, [r7, #14] hal_status = HAL_PCD_Start(pdev->pData); 8006464: 687b ldr r3, [r7, #4] 8006466: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 800646a: 4618 mov r0, r3 800646c: f7fa fa10 bl 8000890 8006470: 4603 mov r3, r0 8006472: 73fb strb r3, [r7, #15] usb_status = USBD_Get_USB_Status(hal_status); 8006474: 7bfb ldrb r3, [r7, #15] 8006476: 4618 mov r0, r3 8006478: f000 f94e bl 8006718 800647c: 4603 mov r3, r0 800647e: 73bb strb r3, [r7, #14] return usb_status; 8006480: 7bbb ldrb r3, [r7, #14] } 8006482: 4618 mov r0, r3 8006484: 3710 adds r7, #16 8006486: 46bd mov sp, r7 8006488: bd80 pop {r7, pc} 0800648a : * @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) { 800648a: b580 push {r7, lr} 800648c: b084 sub sp, #16 800648e: af00 add r7, sp, #0 8006490: 6078 str r0, [r7, #4] 8006492: 4608 mov r0, r1 8006494: 4611 mov r1, r2 8006496: 461a mov r2, r3 8006498: 4603 mov r3, r0 800649a: 70fb strb r3, [r7, #3] 800649c: 460b mov r3, r1 800649e: 70bb strb r3, [r7, #2] 80064a0: 4613 mov r3, r2 80064a2: 803b strh r3, [r7, #0] HAL_StatusTypeDef hal_status = HAL_OK; 80064a4: 2300 movs r3, #0 80064a6: 73fb strb r3, [r7, #15] USBD_StatusTypeDef usb_status = USBD_OK; 80064a8: 2300 movs r3, #0 80064aa: 73bb strb r3, [r7, #14] hal_status = HAL_PCD_EP_Open(pdev->pData, ep_addr, ep_mps, ep_type); 80064ac: 687b ldr r3, [r7, #4] 80064ae: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 80064b2: 78bb ldrb r3, [r7, #2] 80064b4: 883a ldrh r2, [r7, #0] 80064b6: 78f9 ldrb r1, [r7, #3] 80064b8: f7fa fb8a bl 8000bd0 80064bc: 4603 mov r3, r0 80064be: 73fb strb r3, [r7, #15] usb_status = USBD_Get_USB_Status(hal_status); 80064c0: 7bfb ldrb r3, [r7, #15] 80064c2: 4618 mov r0, r3 80064c4: f000 f928 bl 8006718 80064c8: 4603 mov r3, r0 80064ca: 73bb strb r3, [r7, #14] return usb_status; 80064cc: 7bbb ldrb r3, [r7, #14] } 80064ce: 4618 mov r0, r3 80064d0: 3710 adds r7, #16 80064d2: 46bd mov sp, r7 80064d4: bd80 pop {r7, pc} 080064d6 : * @param pdev: Device handle * @param ep_addr: Endpoint number * @retval USBD status */ USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { 80064d6: b580 push {r7, lr} 80064d8: b084 sub sp, #16 80064da: af00 add r7, sp, #0 80064dc: 6078 str r0, [r7, #4] 80064de: 460b mov r3, r1 80064e0: 70fb strb r3, [r7, #3] HAL_StatusTypeDef hal_status = HAL_OK; 80064e2: 2300 movs r3, #0 80064e4: 73fb strb r3, [r7, #15] USBD_StatusTypeDef usb_status = USBD_OK; 80064e6: 2300 movs r3, #0 80064e8: 73bb strb r3, [r7, #14] hal_status = HAL_PCD_EP_Close(pdev->pData, ep_addr); 80064ea: 687b ldr r3, [r7, #4] 80064ec: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 80064f0: 78fa ldrb r2, [r7, #3] 80064f2: 4611 mov r1, r2 80064f4: 4618 mov r0, r3 80064f6: f7fa fbd1 bl 8000c9c 80064fa: 4603 mov r3, r0 80064fc: 73fb strb r3, [r7, #15] usb_status = USBD_Get_USB_Status(hal_status); 80064fe: 7bfb ldrb r3, [r7, #15] 8006500: 4618 mov r0, r3 8006502: f000 f909 bl 8006718 8006506: 4603 mov r3, r0 8006508: 73bb strb r3, [r7, #14] return usb_status; 800650a: 7bbb ldrb r3, [r7, #14] } 800650c: 4618 mov r0, r3 800650e: 3710 adds r7, #16 8006510: 46bd mov sp, r7 8006512: bd80 pop {r7, pc} 08006514 : * @param pdev: Device handle * @param ep_addr: Endpoint number * @retval USBD status */ USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { 8006514: b580 push {r7, lr} 8006516: b084 sub sp, #16 8006518: af00 add r7, sp, #0 800651a: 6078 str r0, [r7, #4] 800651c: 460b mov r3, r1 800651e: 70fb strb r3, [r7, #3] HAL_StatusTypeDef hal_status = HAL_OK; 8006520: 2300 movs r3, #0 8006522: 73fb strb r3, [r7, #15] USBD_StatusTypeDef usb_status = USBD_OK; 8006524: 2300 movs r3, #0 8006526: 73bb strb r3, [r7, #14] hal_status = HAL_PCD_EP_SetStall(pdev->pData, ep_addr); 8006528: 687b ldr r3, [r7, #4] 800652a: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 800652e: 78fa ldrb r2, [r7, #3] 8006530: 4611 mov r1, r2 8006532: 4618 mov r0, r3 8006534: f7fa fc91 bl 8000e5a 8006538: 4603 mov r3, r0 800653a: 73fb strb r3, [r7, #15] usb_status = USBD_Get_USB_Status(hal_status); 800653c: 7bfb ldrb r3, [r7, #15] 800653e: 4618 mov r0, r3 8006540: f000 f8ea bl 8006718 8006544: 4603 mov r3, r0 8006546: 73bb strb r3, [r7, #14] return usb_status; 8006548: 7bbb ldrb r3, [r7, #14] } 800654a: 4618 mov r0, r3 800654c: 3710 adds r7, #16 800654e: 46bd mov sp, r7 8006550: bd80 pop {r7, pc} 08006552 : * @param pdev: Device handle * @param ep_addr: Endpoint number * @retval USBD status */ USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { 8006552: b580 push {r7, lr} 8006554: b084 sub sp, #16 8006556: af00 add r7, sp, #0 8006558: 6078 str r0, [r7, #4] 800655a: 460b mov r3, r1 800655c: 70fb strb r3, [r7, #3] HAL_StatusTypeDef hal_status = HAL_OK; 800655e: 2300 movs r3, #0 8006560: 73fb strb r3, [r7, #15] USBD_StatusTypeDef usb_status = USBD_OK; 8006562: 2300 movs r3, #0 8006564: 73bb strb r3, [r7, #14] hal_status = HAL_PCD_EP_ClrStall(pdev->pData, ep_addr); 8006566: 687b ldr r3, [r7, #4] 8006568: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 800656c: 78fa ldrb r2, [r7, #3] 800656e: 4611 mov r1, r2 8006570: 4618 mov r0, r3 8006572: f7fa fcd2 bl 8000f1a 8006576: 4603 mov r3, r0 8006578: 73fb strb r3, [r7, #15] usb_status = USBD_Get_USB_Status(hal_status); 800657a: 7bfb ldrb r3, [r7, #15] 800657c: 4618 mov r0, r3 800657e: f000 f8cb bl 8006718 8006582: 4603 mov r3, r0 8006584: 73bb strb r3, [r7, #14] return usb_status; 8006586: 7bbb ldrb r3, [r7, #14] } 8006588: 4618 mov r0, r3 800658a: 3710 adds r7, #16 800658c: 46bd mov sp, r7 800658e: bd80 pop {r7, pc} 08006590 : * @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) { 8006590: b480 push {r7} 8006592: b085 sub sp, #20 8006594: af00 add r7, sp, #0 8006596: 6078 str r0, [r7, #4] 8006598: 460b mov r3, r1 800659a: 70fb strb r3, [r7, #3] PCD_HandleTypeDef *hpcd = (PCD_HandleTypeDef*) pdev->pData; 800659c: 687b ldr r3, [r7, #4] 800659e: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 80065a2: 60fb str r3, [r7, #12] if((ep_addr & 0x80) == 0x80) 80065a4: f997 3003 ldrsb.w r3, [r7, #3] 80065a8: 2b00 cmp r3, #0 80065aa: da0c bge.n 80065c6 { return hpcd->IN_ep[ep_addr & 0x7F].is_stall; 80065ac: 78fb ldrb r3, [r7, #3] 80065ae: f003 037f and.w r3, r3, #127 ; 0x7f 80065b2: 68f9 ldr r1, [r7, #12] 80065b4: 1c5a adds r2, r3, #1 80065b6: 4613 mov r3, r2 80065b8: 009b lsls r3, r3, #2 80065ba: 4413 add r3, r2 80065bc: 00db lsls r3, r3, #3 80065be: 440b add r3, r1 80065c0: 3302 adds r3, #2 80065c2: 781b ldrb r3, [r3, #0] 80065c4: e00b b.n 80065de } else { return hpcd->OUT_ep[ep_addr & 0x7F].is_stall; 80065c6: 78fb ldrb r3, [r7, #3] 80065c8: f003 027f and.w r2, r3, #127 ; 0x7f 80065cc: 68f9 ldr r1, [r7, #12] 80065ce: 4613 mov r3, r2 80065d0: 009b lsls r3, r3, #2 80065d2: 4413 add r3, r2 80065d4: 00db lsls r3, r3, #3 80065d6: 440b add r3, r1 80065d8: f503 73b5 add.w r3, r3, #362 ; 0x16a 80065dc: 781b ldrb r3, [r3, #0] } } 80065de: 4618 mov r0, r3 80065e0: 3714 adds r7, #20 80065e2: 46bd mov sp, r7 80065e4: bc80 pop {r7} 80065e6: 4770 bx lr 080065e8 : * @param pdev: Device handle * @param dev_addr: Device address * @retval USBD status */ USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr) { 80065e8: b580 push {r7, lr} 80065ea: b084 sub sp, #16 80065ec: af00 add r7, sp, #0 80065ee: 6078 str r0, [r7, #4] 80065f0: 460b mov r3, r1 80065f2: 70fb strb r3, [r7, #3] HAL_StatusTypeDef hal_status = HAL_OK; 80065f4: 2300 movs r3, #0 80065f6: 73fb strb r3, [r7, #15] USBD_StatusTypeDef usb_status = USBD_OK; 80065f8: 2300 movs r3, #0 80065fa: 73bb strb r3, [r7, #14] hal_status = HAL_PCD_SetAddress(pdev->pData, dev_addr); 80065fc: 687b ldr r3, [r7, #4] 80065fe: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 8006602: 78fa ldrb r2, [r7, #3] 8006604: 4611 mov r1, r2 8006606: 4618 mov r0, r3 8006608: f7fa fabd bl 8000b86 800660c: 4603 mov r3, r0 800660e: 73fb strb r3, [r7, #15] usb_status = USBD_Get_USB_Status(hal_status); 8006610: 7bfb ldrb r3, [r7, #15] 8006612: 4618 mov r0, r3 8006614: f000 f880 bl 8006718 8006618: 4603 mov r3, r0 800661a: 73bb strb r3, [r7, #14] return usb_status; 800661c: 7bbb ldrb r3, [r7, #14] } 800661e: 4618 mov r0, r3 8006620: 3710 adds r7, #16 8006622: 46bd mov sp, r7 8006624: bd80 pop {r7, pc} 08006626 : * @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) { 8006626: b580 push {r7, lr} 8006628: b086 sub sp, #24 800662a: af00 add r7, sp, #0 800662c: 60f8 str r0, [r7, #12] 800662e: 607a str r2, [r7, #4] 8006630: 461a mov r2, r3 8006632: 460b mov r3, r1 8006634: 72fb strb r3, [r7, #11] 8006636: 4613 mov r3, r2 8006638: 813b strh r3, [r7, #8] HAL_StatusTypeDef hal_status = HAL_OK; 800663a: 2300 movs r3, #0 800663c: 75fb strb r3, [r7, #23] USBD_StatusTypeDef usb_status = USBD_OK; 800663e: 2300 movs r3, #0 8006640: 75bb strb r3, [r7, #22] hal_status = HAL_PCD_EP_Transmit(pdev->pData, ep_addr, pbuf, size); 8006642: 68fb ldr r3, [r7, #12] 8006644: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 8006648: 893b ldrh r3, [r7, #8] 800664a: 7af9 ldrb r1, [r7, #11] 800664c: 687a ldr r2, [r7, #4] 800664e: f7fa fbc1 bl 8000dd4 8006652: 4603 mov r3, r0 8006654: 75fb strb r3, [r7, #23] usb_status = USBD_Get_USB_Status(hal_status); 8006656: 7dfb ldrb r3, [r7, #23] 8006658: 4618 mov r0, r3 800665a: f000 f85d bl 8006718 800665e: 4603 mov r3, r0 8006660: 75bb strb r3, [r7, #22] return usb_status; 8006662: 7dbb ldrb r3, [r7, #22] } 8006664: 4618 mov r0, r3 8006666: 3718 adds r7, #24 8006668: 46bd mov sp, r7 800666a: bd80 pop {r7, pc} 0800666c : * @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) { 800666c: b580 push {r7, lr} 800666e: b086 sub sp, #24 8006670: af00 add r7, sp, #0 8006672: 60f8 str r0, [r7, #12] 8006674: 607a str r2, [r7, #4] 8006676: 461a mov r2, r3 8006678: 460b mov r3, r1 800667a: 72fb strb r3, [r7, #11] 800667c: 4613 mov r3, r2 800667e: 813b strh r3, [r7, #8] HAL_StatusTypeDef hal_status = HAL_OK; 8006680: 2300 movs r3, #0 8006682: 75fb strb r3, [r7, #23] USBD_StatusTypeDef usb_status = USBD_OK; 8006684: 2300 movs r3, #0 8006686: 75bb strb r3, [r7, #22] hal_status = HAL_PCD_EP_Receive(pdev->pData, ep_addr, pbuf, size); 8006688: 68fb ldr r3, [r7, #12] 800668a: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 800668e: 893b ldrh r3, [r7, #8] 8006690: 7af9 ldrb r1, [r7, #11] 8006692: 687a ldr r2, [r7, #4] 8006694: f7fa fb4a bl 8000d2c 8006698: 4603 mov r3, r0 800669a: 75fb strb r3, [r7, #23] usb_status = USBD_Get_USB_Status(hal_status); 800669c: 7dfb ldrb r3, [r7, #23] 800669e: 4618 mov r0, r3 80066a0: f000 f83a bl 8006718 80066a4: 4603 mov r3, r0 80066a6: 75bb strb r3, [r7, #22] return usb_status; 80066a8: 7dbb ldrb r3, [r7, #22] } 80066aa: 4618 mov r0, r3 80066ac: 3718 adds r7, #24 80066ae: 46bd mov sp, r7 80066b0: bd80 pop {r7, pc} 080066b2 : * @param pdev: Device handle * @param ep_addr: Endpoint number * @retval Recived Data Size */ uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { 80066b2: b580 push {r7, lr} 80066b4: b082 sub sp, #8 80066b6: af00 add r7, sp, #0 80066b8: 6078 str r0, [r7, #4] 80066ba: 460b mov r3, r1 80066bc: 70fb strb r3, [r7, #3] return HAL_PCD_EP_GetRxCount((PCD_HandleTypeDef*) pdev->pData, ep_addr); 80066be: 687b ldr r3, [r7, #4] 80066c0: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 80066c4: 78fa ldrb r2, [r7, #3] 80066c6: 4611 mov r1, r2 80066c8: 4618 mov r0, r3 80066ca: f7fa fb6c bl 8000da6 80066ce: 4603 mov r3, r0 } 80066d0: 4618 mov r0, r3 80066d2: 3708 adds r7, #8 80066d4: 46bd mov sp, r7 80066d6: bd80 pop {r7, pc} 080066d8 : * @brief Static single allocation. * @param size: Size of allocated memory * @retval None */ void *USBD_static_malloc(uint32_t size) { 80066d8: b480 push {r7} 80066da: b083 sub sp, #12 80066dc: af00 add r7, sp, #0 80066de: 6078 str r0, [r7, #4] static uint32_t mem[(sizeof(USBD_CDC_HandleTypeDef)/4)+1];/* On 32-bit boundary */ return mem; 80066e0: 4b02 ldr r3, [pc, #8] ; (80066ec ) } 80066e2: 4618 mov r0, r3 80066e4: 370c adds r7, #12 80066e6: 46bd mov sp, r7 80066e8: bc80 pop {r7} 80066ea: 4770 bx lr 80066ec: 2000019c .word 0x2000019c 080066f0 : * @brief Dummy memory free * @param p: Pointer to allocated memory address * @retval None */ void USBD_static_free(void *p) { 80066f0: b480 push {r7} 80066f2: b083 sub sp, #12 80066f4: af00 add r7, sp, #0 80066f6: 6078 str r0, [r7, #4] } 80066f8: bf00 nop 80066fa: 370c adds r7, #12 80066fc: 46bd mov sp, r7 80066fe: bc80 pop {r7} 8006700: 4770 bx lr 08006702 : #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) static void PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state) #else void HAL_PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state) #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ { 8006702: b480 push {r7} 8006704: b083 sub sp, #12 8006706: af00 add r7, sp, #0 8006708: 6078 str r0, [r7, #4] 800670a: 460b mov r3, r1 800670c: 70fb strb r3, [r7, #3] { /* Configure High connection state. */ } /* USER CODE END 6 */ } 800670e: bf00 nop 8006710: 370c adds r7, #12 8006712: 46bd mov sp, r7 8006714: bc80 pop {r7} 8006716: 4770 bx lr 08006718 : * @brief Retuns 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) { 8006718: b480 push {r7} 800671a: b085 sub sp, #20 800671c: af00 add r7, sp, #0 800671e: 4603 mov r3, r0 8006720: 71fb strb r3, [r7, #7] USBD_StatusTypeDef usb_status = USBD_OK; 8006722: 2300 movs r3, #0 8006724: 73fb strb r3, [r7, #15] switch (hal_status) 8006726: 79fb ldrb r3, [r7, #7] 8006728: 2b03 cmp r3, #3 800672a: d817 bhi.n 800675c 800672c: a201 add r2, pc, #4 ; (adr r2, 8006734 ) 800672e: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8006732: bf00 nop 8006734: 08006745 .word 0x08006745 8006738: 0800674b .word 0x0800674b 800673c: 08006751 .word 0x08006751 8006740: 08006757 .word 0x08006757 { case HAL_OK : usb_status = USBD_OK; 8006744: 2300 movs r3, #0 8006746: 73fb strb r3, [r7, #15] break; 8006748: e00b b.n 8006762 case HAL_ERROR : usb_status = USBD_FAIL; 800674a: 2302 movs r3, #2 800674c: 73fb strb r3, [r7, #15] break; 800674e: e008 b.n 8006762 case HAL_BUSY : usb_status = USBD_BUSY; 8006750: 2301 movs r3, #1 8006752: 73fb strb r3, [r7, #15] break; 8006754: e005 b.n 8006762 case HAL_TIMEOUT : usb_status = USBD_FAIL; 8006756: 2302 movs r3, #2 8006758: 73fb strb r3, [r7, #15] break; 800675a: e002 b.n 8006762 default : usb_status = USBD_FAIL; 800675c: 2302 movs r3, #2 800675e: 73fb strb r3, [r7, #15] break; 8006760: bf00 nop } return usb_status; 8006762: 7bfb ldrb r3, [r7, #15] } 8006764: 4618 mov r0, r3 8006766: 3714 adds r7, #20 8006768: 46bd mov sp, r7 800676a: bc80 pop {r7} 800676c: 4770 bx lr 800676e: bf00 nop 08006770 <__libc_init_array>: 8006770: b570 push {r4, r5, r6, lr} 8006772: 2500 movs r5, #0 8006774: 4e0c ldr r6, [pc, #48] ; (80067a8 <__libc_init_array+0x38>) 8006776: 4c0d ldr r4, [pc, #52] ; (80067ac <__libc_init_array+0x3c>) 8006778: 1ba4 subs r4, r4, r6 800677a: 10a4 asrs r4, r4, #2 800677c: 42a5 cmp r5, r4 800677e: d109 bne.n 8006794 <__libc_init_array+0x24> 8006780: f000 f822 bl 80067c8 <_init> 8006784: 2500 movs r5, #0 8006786: 4e0a ldr r6, [pc, #40] ; (80067b0 <__libc_init_array+0x40>) 8006788: 4c0a ldr r4, [pc, #40] ; (80067b4 <__libc_init_array+0x44>) 800678a: 1ba4 subs r4, r4, r6 800678c: 10a4 asrs r4, r4, #2 800678e: 42a5 cmp r5, r4 8006790: d105 bne.n 800679e <__libc_init_array+0x2e> 8006792: bd70 pop {r4, r5, r6, pc} 8006794: f856 3025 ldr.w r3, [r6, r5, lsl #2] 8006798: 4798 blx r3 800679a: 3501 adds r5, #1 800679c: e7ee b.n 800677c <__libc_init_array+0xc> 800679e: f856 3025 ldr.w r3, [r6, r5, lsl #2] 80067a2: 4798 blx r3 80067a4: 3501 adds r5, #1 80067a6: e7f2 b.n 800678e <__libc_init_array+0x1e> 80067a8: 0800684c .word 0x0800684c 80067ac: 0800684c .word 0x0800684c 80067b0: 0800684c .word 0x0800684c 80067b4: 08006850 .word 0x08006850 080067b8 : 80067b8: 4603 mov r3, r0 80067ba: 4402 add r2, r0 80067bc: 4293 cmp r3, r2 80067be: d100 bne.n 80067c2 80067c0: 4770 bx lr 80067c2: f803 1b01 strb.w r1, [r3], #1 80067c6: e7f9 b.n 80067bc 080067c8 <_init>: 80067c8: b5f8 push {r3, r4, r5, r6, r7, lr} 80067ca: bf00 nop 80067cc: bcf8 pop {r3, r4, r5, r6, r7} 80067ce: bc08 pop {r3} 80067d0: 469e mov lr, r3 80067d2: 4770 bx lr 080067d4 <_fini>: 80067d4: b5f8 push {r3, r4, r5, r6, r7, lr} 80067d6: bf00 nop 80067d8: bcf8 pop {r3, r4, r5, r6, r7} 80067da: bc08 pop {r3} 80067dc: 469e mov lr, r3 80067de: 4770 bx lr