/
v.andriano
/
STM_USB_device
Обзор
Документация
Войти
/
v.andriano
/
STM_USB_device
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Debug/USB_device.list
18 142 строки
657 KB
v.andriano
Добавлены файлы проекта
03 июн 2026, 11:44
03 июн 2026, 11:44
522a897
Код
Авторство
О чём код?
USB_device.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 00007848 0800010c 0800010c 0001010c 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .rodata 00000054 08007954 08007954 00017954 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .ARM.extab 00000000 080079a8 080079a8 0002017c 2**0 CONTENTS 4 .ARM 00000000 080079a8 080079a8 0002017c 2**0 CONTENTS 5 .preinit_array 00000000 080079a8 080079a8 0002017c 2**0 CONTENTS, ALLOC, LOAD, DATA 6 .init_array 00000004 080079a8 080079a8 000179a8 2**2 CONTENTS, ALLOC, LOAD, DATA 7 .fini_array 00000004 080079ac 080079ac 000179ac 2**2 CONTENTS, ALLOC, LOAD, DATA 8 .data 0000017c 20000000 080079b0 00020000 2**2 CONTENTS, ALLOC, LOAD, DATA 9 .bss 000011f8 2000017c 08007b2c 0002017c 2**2 ALLOC 10 ._user_heap_stack 00000604 20001374 08007b2c 00021374 2**0 ALLOC 11 .ARM.attributes 00000029 00000000 00000000 0002017c 2**0 CONTENTS, READONLY 12 .debug_info 0000c677 00000000 00000000 000201a5 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 13 .debug_abbrev 00002889 00000000 00000000 0002c81c 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 14 .debug_aranges 00000a68 00000000 00000000 0002f0a8 2**3 CONTENTS, READONLY, DEBUGGING, OCTETS 15 .debug_ranges 00000920 00000000 00000000 0002fb10 2**3 CONTENTS, READONLY, DEBUGGING, OCTETS 16 .debug_macro 000195fe 00000000 00000000 00030430 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 17 .debug_line 0000e241 00000000 00000000 00049a2e 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 18 .debug_str 000848bb 00000000 00000000 00057c6f 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 19 .comment 00000050 00000000 00000000 000dc52a 2**0 CONTENTS, READONLY 20 .debug_frame 000027c4 00000000 00000000 000dc57c 2**2 CONTENTS, READONLY, DEBUGGING, OCTETS 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: 0800793c .word 0x0800793c 08000130 <frame_dummy>: 8000130: b508 push {r3, lr} 8000132: 4b03 ldr r3, [pc, #12] ; (8000140 <frame_dummy+0x10>) 8000134: b11b cbz r3, 800013e <frame_dummy+0xe> 8000136: 4903 ldr r1, [pc, #12] ; (8000144 <frame_dummy+0x14>) 8000138: 4803 ldr r0, [pc, #12] ; (8000148 <frame_dummy+0x18>) 800013a: f3af 8000 nop.w 800013e: bd08 pop {r3, pc} 8000140: 00000000 .word 0x00000000 8000144: 20000180 .word 0x20000180 8000148: 0800793c .word 0x0800793c 0800014c <USB_CDC_RxHandler>: /* USER CODE END PFP */ /* Private user code ---------------------------------------------------------*/ /* USER CODE BEGIN 0 */ void USB_CDC_RxHandler(uint8_t* Buf, uint32_t Len) { 800014c: b580 push {r7, lr} 800014e: b082 sub sp, #8 8000150: af00 add r7, sp, #0 8000152: 6078 str r0, [r7, #4] 8000154: 6039 str r1, [r7, #0] CDC_Transmit_FS(Buf, Len); 8000156: 683b ldr r3, [r7, #0] 8000158: b29b uxth r3, r3 800015a: 4619 mov r1, r3 800015c: 6878 ldr r0, [r7, #4] 800015e: f006 ffe3 bl 8007128 <CDC_Transmit_FS> } 8000162: bf00 nop 8000164: 3708 adds r7, #8 8000166: 46bd mov sp, r7 8000168: bd80 pop {r7, pc} 0800016a <main>: /** * @brief The application entry point. * @retval int */ int main(void) { 800016a: b580 push {r7, lr} 800016c: af00 add r7, sp, #0 /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); 800016e: f000 f943 bl 80003f8 <HAL_Init> /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); 8000172: f000 f805 bl 8000180 <SystemClock_Config> /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); 8000176: f000 f85f bl 8000238 <MX_GPIO_Init> MX_USB_DEVICE_Init(); 800017a: f006 feff bl 8006f7c <MX_USB_DEVICE_Init> /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) 800017e: e7fe b.n 800017e <main+0x14> 08000180 <SystemClock_Config>: /** * @brief System Clock Configuration * @retval None */ void SystemClock_Config(void) { 8000180: b580 push {r7, lr} 8000182: b094 sub sp, #80 ; 0x50 8000184: af00 add r7, sp, #0 RCC_OscInitTypeDef RCC_OscInitStruct = {0}; 8000186: f107 0328 add.w r3, r7, #40 ; 0x28 800018a: 2228 movs r2, #40 ; 0x28 800018c: 2100 movs r1, #0 800018e: 4618 mov r0, r3 8000190: f007 fbcc bl 800792c <memset> RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; 8000194: f107 0314 add.w r3, r7, #20 8000198: 2200 movs r2, #0 800019a: 601a str r2, [r3, #0] 800019c: 605a str r2, [r3, #4] 800019e: 609a str r2, [r3, #8] 80001a0: 60da str r2, [r3, #12] 80001a2: 611a str r2, [r3, #16] RCC_PeriphCLKInitTypeDef PeriphClkInit = {0}; 80001a4: 1d3b adds r3, r7, #4 80001a6: 2200 movs r2, #0 80001a8: 601a str r2, [r3, #0] 80001aa: 605a str r2, [r3, #4] 80001ac: 609a str r2, [r3, #8] 80001ae: 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; 80001b0: 2301 movs r3, #1 80001b2: 62bb str r3, [r7, #40] ; 0x28 RCC_OscInitStruct.HSEState = RCC_HSE_ON; 80001b4: f44f 3380 mov.w r3, #65536 ; 0x10000 80001b8: 62fb str r3, [r7, #44] ; 0x2c RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1; 80001ba: 2300 movs r3, #0 80001bc: 633b str r3, [r7, #48] ; 0x30 RCC_OscInitStruct.HSIState = RCC_HSI_ON; 80001be: 2301 movs r3, #1 80001c0: 63bb str r3, [r7, #56] ; 0x38 RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; 80001c2: 2302 movs r3, #2 80001c4: 647b str r3, [r7, #68] ; 0x44 RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; 80001c6: f44f 3380 mov.w r3, #65536 ; 0x10000 80001ca: 64bb str r3, [r7, #72] ; 0x48 RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6; 80001cc: f44f 1380 mov.w r3, #1048576 ; 0x100000 80001d0: 64fb str r3, [r7, #76] ; 0x4c if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) 80001d2: f107 0328 add.w r3, r7, #40 ; 0x28 80001d6: 4618 mov r0, r3 80001d8: f002 f8f6 bl 80023c8 <HAL_RCC_OscConfig> 80001dc: 4603 mov r3, r0 80001de: 2b00 cmp r3, #0 80001e0: d001 beq.n 80001e6 <SystemClock_Config+0x66> { Error_Handler(); 80001e2: f000 f873 bl 80002cc <Error_Handler> } /** Initializes the CPU, AHB and APB buses clocks */ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK 80001e6: 230f movs r3, #15 80001e8: 617b str r3, [r7, #20] |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; 80001ea: 2302 movs r3, #2 80001ec: 61bb str r3, [r7, #24] RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; 80001ee: 2300 movs r3, #0 80001f0: 61fb str r3, [r7, #28] RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; 80001f2: f44f 6380 mov.w r3, #1024 ; 0x400 80001f6: 623b str r3, [r7, #32] RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; 80001f8: 2300 movs r3, #0 80001fa: 627b str r3, [r7, #36] ; 0x24 if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) 80001fc: f107 0314 add.w r3, r7, #20 8000200: 2101 movs r1, #1 8000202: 4618 mov r0, r3 8000204: f002 fb62 bl 80028cc <HAL_RCC_ClockConfig> 8000208: 4603 mov r3, r0 800020a: 2b00 cmp r3, #0 800020c: d001 beq.n 8000212 <SystemClock_Config+0x92> { Error_Handler(); 800020e: f000 f85d bl 80002cc <Error_Handler> } PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB; 8000212: 2310 movs r3, #16 8000214: 607b str r3, [r7, #4] PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLL; 8000216: f44f 0380 mov.w r3, #4194304 ; 0x400000 800021a: 613b str r3, [r7, #16] if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) 800021c: 1d3b adds r3, r7, #4 800021e: 4618 mov r0, r3 8000220: f002 fcba bl 8002b98 <HAL_RCCEx_PeriphCLKConfig> 8000224: 4603 mov r3, r0 8000226: 2b00 cmp r3, #0 8000228: d001 beq.n 800022e <SystemClock_Config+0xae> { Error_Handler(); 800022a: f000 f84f bl 80002cc <Error_Handler> } } 800022e: bf00 nop 8000230: 3750 adds r7, #80 ; 0x50 8000232: 46bd mov sp, r7 8000234: bd80 pop {r7, pc} ... 08000238 <MX_GPIO_Init>: * @brief GPIO Initialization Function * @param None * @retval None */ static void MX_GPIO_Init(void) { 8000238: b580 push {r7, lr} 800023a: b088 sub sp, #32 800023c: af00 add r7, sp, #0 GPIO_InitTypeDef GPIO_InitStruct = {0}; 800023e: f107 0310 add.w r3, r7, #16 8000242: 2200 movs r2, #0 8000244: 601a str r2, [r3, #0] 8000246: 605a str r2, [r3, #4] 8000248: 609a str r2, [r3, #8] 800024a: 60da str r2, [r3, #12] /* USER CODE BEGIN MX_GPIO_Init_1 */ /* USER CODE END MX_GPIO_Init_1 */ /* GPIO Ports Clock Enable */ __HAL_RCC_GPIOD_CLK_ENABLE(); 800024c: 4b1d ldr r3, [pc, #116] ; (80002c4 <MX_GPIO_Init+0x8c>) 800024e: 699b ldr r3, [r3, #24] 8000250: 4a1c ldr r2, [pc, #112] ; (80002c4 <MX_GPIO_Init+0x8c>) 8000252: f043 0320 orr.w r3, r3, #32 8000256: 6193 str r3, [r2, #24] 8000258: 4b1a ldr r3, [pc, #104] ; (80002c4 <MX_GPIO_Init+0x8c>) 800025a: 699b ldr r3, [r3, #24] 800025c: f003 0320 and.w r3, r3, #32 8000260: 60fb str r3, [r7, #12] 8000262: 68fb ldr r3, [r7, #12] __HAL_RCC_GPIOB_CLK_ENABLE(); 8000264: 4b17 ldr r3, [pc, #92] ; (80002c4 <MX_GPIO_Init+0x8c>) 8000266: 699b ldr r3, [r3, #24] 8000268: 4a16 ldr r2, [pc, #88] ; (80002c4 <MX_GPIO_Init+0x8c>) 800026a: f043 0308 orr.w r3, r3, #8 800026e: 6193 str r3, [r2, #24] 8000270: 4b14 ldr r3, [pc, #80] ; (80002c4 <MX_GPIO_Init+0x8c>) 8000272: 699b ldr r3, [r3, #24] 8000274: f003 0308 and.w r3, r3, #8 8000278: 60bb str r3, [r7, #8] 800027a: 68bb ldr r3, [r7, #8] __HAL_RCC_GPIOA_CLK_ENABLE(); 800027c: 4b11 ldr r3, [pc, #68] ; (80002c4 <MX_GPIO_Init+0x8c>) 800027e: 699b ldr r3, [r3, #24] 8000280: 4a10 ldr r2, [pc, #64] ; (80002c4 <MX_GPIO_Init+0x8c>) 8000282: f043 0304 orr.w r3, r3, #4 8000286: 6193 str r3, [r2, #24] 8000288: 4b0e ldr r3, [pc, #56] ; (80002c4 <MX_GPIO_Init+0x8c>) 800028a: 699b ldr r3, [r3, #24] 800028c: f003 0304 and.w r3, r3, #4 8000290: 607b str r3, [r7, #4] 8000292: 687b ldr r3, [r7, #4] /*Configure GPIO pin Output Level */ HAL_GPIO_WritePin(GPIOB, GPIO_PIN_2, GPIO_PIN_RESET); 8000294: 2200 movs r2, #0 8000296: 2104 movs r1, #4 8000298: 480b ldr r0, [pc, #44] ; (80002c8 <MX_GPIO_Init+0x90>) 800029a: f000 fba1 bl 80009e0 <HAL_GPIO_WritePin> /*Configure GPIO pin : PB2 */ GPIO_InitStruct.Pin = GPIO_PIN_2; 800029e: 2304 movs r3, #4 80002a0: 613b str r3, [r7, #16] GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; 80002a2: 2301 movs r3, #1 80002a4: 617b str r3, [r7, #20] GPIO_InitStruct.Pull = GPIO_NOPULL; 80002a6: 2300 movs r3, #0 80002a8: 61bb str r3, [r7, #24] GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_MEDIUM; 80002aa: 2301 movs r3, #1 80002ac: 61fb str r3, [r7, #28] HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); 80002ae: f107 0310 add.w r3, r7, #16 80002b2: 4619 mov r1, r3 80002b4: 4804 ldr r0, [pc, #16] ; (80002c8 <MX_GPIO_Init+0x90>) 80002b6: f000 fa0f bl 80006d8 <HAL_GPIO_Init> /* USER CODE BEGIN MX_GPIO_Init_2 */ /* USER CODE END MX_GPIO_Init_2 */ } 80002ba: bf00 nop 80002bc: 3720 adds r7, #32 80002be: 46bd mov sp, r7 80002c0: bd80 pop {r7, pc} 80002c2: bf00 nop 80002c4: 40021000 .word 0x40021000 80002c8: 40010c00 .word 0x40010c00 080002cc <Error_Handler>: /** * @brief This function is executed in case of error occurrence. * @retval None */ void Error_Handler(void) { 80002cc: b480 push {r7} 80002ce: 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"); 80002d0: b672 cpsid i } 80002d2: bf00 nop /* USER CODE BEGIN Error_Handler_Debug */ /* User can add his own implementation to report the HAL error return state */ __disable_irq(); while (1) 80002d4: e7fe b.n 80002d4 <Error_Handler+0x8> ... 080002d8 <HAL_MspInit>: /* USER CODE END 0 */ /** * Initializes the Global MSP. */ void HAL_MspInit(void) { 80002d8: b480 push {r7} 80002da: b085 sub sp, #20 80002dc: af00 add r7, sp, #0 /* USER CODE BEGIN MspInit 0 */ /* USER CODE END MspInit 0 */ __HAL_RCC_AFIO_CLK_ENABLE(); 80002de: 4b15 ldr r3, [pc, #84] ; (8000334 <HAL_MspInit+0x5c>) 80002e0: 699b ldr r3, [r3, #24] 80002e2: 4a14 ldr r2, [pc, #80] ; (8000334 <HAL_MspInit+0x5c>) 80002e4: f043 0301 orr.w r3, r3, #1 80002e8: 6193 str r3, [r2, #24] 80002ea: 4b12 ldr r3, [pc, #72] ; (8000334 <HAL_MspInit+0x5c>) 80002ec: 699b ldr r3, [r3, #24] 80002ee: f003 0301 and.w r3, r3, #1 80002f2: 60bb str r3, [r7, #8] 80002f4: 68bb ldr r3, [r7, #8] __HAL_RCC_PWR_CLK_ENABLE(); 80002f6: 4b0f ldr r3, [pc, #60] ; (8000334 <HAL_MspInit+0x5c>) 80002f8: 69db ldr r3, [r3, #28] 80002fa: 4a0e ldr r2, [pc, #56] ; (8000334 <HAL_MspInit+0x5c>) 80002fc: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000 8000300: 61d3 str r3, [r2, #28] 8000302: 4b0c ldr r3, [pc, #48] ; (8000334 <HAL_MspInit+0x5c>) 8000304: 69db ldr r3, [r3, #28] 8000306: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 800030a: 607b str r3, [r7, #4] 800030c: 687b ldr r3, [r7, #4] /* System interrupt init*/ /** NOJTAG: JTAG-DP Disabled and SW-DP Enabled */ __HAL_AFIO_REMAP_SWJ_NOJTAG(); 800030e: 4b0a ldr r3, [pc, #40] ; (8000338 <HAL_MspInit+0x60>) 8000310: 685b ldr r3, [r3, #4] 8000312: 60fb str r3, [r7, #12] 8000314: 68fb ldr r3, [r7, #12] 8000316: f023 63e0 bic.w r3, r3, #117440512 ; 0x7000000 800031a: 60fb str r3, [r7, #12] 800031c: 68fb ldr r3, [r7, #12] 800031e: f043 7300 orr.w r3, r3, #33554432 ; 0x2000000 8000322: 60fb str r3, [r7, #12] 8000324: 4a04 ldr r2, [pc, #16] ; (8000338 <HAL_MspInit+0x60>) 8000326: 68fb ldr r3, [r7, #12] 8000328: 6053 str r3, [r2, #4] /* USER CODE BEGIN MspInit 1 */ /* USER CODE END MspInit 1 */ } 800032a: bf00 nop 800032c: 3714 adds r7, #20 800032e: 46bd mov sp, r7 8000330: bc80 pop {r7} 8000332: 4770 bx lr 8000334: 40021000 .word 0x40021000 8000338: 40010000 .word 0x40010000 0800033c <NMI_Handler>: /******************************************************************************/ /** * @brief This function handles Non maskable interrupt. */ void NMI_Handler(void) { 800033c: b480 push {r7} 800033e: 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) 8000340: e7fe b.n 8000340 <NMI_Handler+0x4> 08000342 <HardFault_Handler>: /** * @brief This function handles Hard fault interrupt. */ void HardFault_Handler(void) { 8000342: b480 push {r7} 8000344: af00 add r7, sp, #0 /* USER CODE BEGIN HardFault_IRQn 0 */ /* USER CODE END HardFault_IRQn 0 */ while (1) 8000346: e7fe b.n 8000346 <HardFault_Handler+0x4> 08000348 <MemManage_Handler>: /** * @brief This function handles Memory management fault. */ void MemManage_Handler(void) { 8000348: b480 push {r7} 800034a: af00 add r7, sp, #0 /* USER CODE BEGIN MemoryManagement_IRQn 0 */ /* USER CODE END MemoryManagement_IRQn 0 */ while (1) 800034c: e7fe b.n 800034c <MemManage_Handler+0x4> 0800034e <BusFault_Handler>: /** * @brief This function handles Prefetch fault, memory access fault. */ void BusFault_Handler(void) { 800034e: b480 push {r7} 8000350: af00 add r7, sp, #0 /* USER CODE BEGIN BusFault_IRQn 0 */ /* USER CODE END BusFault_IRQn 0 */ while (1) 8000352: e7fe b.n 8000352 <BusFault_Handler+0x4> 08000354 <UsageFault_Handler>: /** * @brief This function handles Undefined instruction or illegal state. */ void UsageFault_Handler(void) { 8000354: b480 push {r7} 8000356: af00 add r7, sp, #0 /* USER CODE BEGIN UsageFault_IRQn 0 */ /* USER CODE END UsageFault_IRQn 0 */ while (1) 8000358: e7fe b.n 8000358 <UsageFault_Handler+0x4> 0800035a <SVC_Handler>: /** * @brief This function handles System service call via SWI instruction. */ void SVC_Handler(void) { 800035a: b480 push {r7} 800035c: af00 add r7, sp, #0 /* USER CODE END SVCall_IRQn 0 */ /* USER CODE BEGIN SVCall_IRQn 1 */ /* USER CODE END SVCall_IRQn 1 */ } 800035e: bf00 nop 8000360: 46bd mov sp, r7 8000362: bc80 pop {r7} 8000364: 4770 bx lr 08000366 <DebugMon_Handler>: /** * @brief This function handles Debug monitor. */ void DebugMon_Handler(void) { 8000366: b480 push {r7} 8000368: af00 add r7, sp, #0 /* USER CODE END DebugMonitor_IRQn 0 */ /* USER CODE BEGIN DebugMonitor_IRQn 1 */ /* USER CODE END DebugMonitor_IRQn 1 */ } 800036a: bf00 nop 800036c: 46bd mov sp, r7 800036e: bc80 pop {r7} 8000370: 4770 bx lr 08000372 <PendSV_Handler>: /** * @brief This function handles Pendable request for system service. */ void PendSV_Handler(void) { 8000372: b480 push {r7} 8000374: af00 add r7, sp, #0 /* USER CODE END PendSV_IRQn 0 */ /* USER CODE BEGIN PendSV_IRQn 1 */ /* USER CODE END PendSV_IRQn 1 */ } 8000376: bf00 nop 8000378: 46bd mov sp, r7 800037a: bc80 pop {r7} 800037c: 4770 bx lr 0800037e <SysTick_Handler>: /** * @brief This function handles System tick timer. */ void SysTick_Handler(void) { 800037e: b580 push {r7, lr} 8000380: af00 add r7, sp, #0 /* USER CODE BEGIN SysTick_IRQn 0 */ /* USER CODE END SysTick_IRQn 0 */ HAL_IncTick(); 8000382: f000 f87f bl 8000484 <HAL_IncTick> /* USER CODE BEGIN SysTick_IRQn 1 */ /* USER CODE END SysTick_IRQn 1 */ } 8000386: bf00 nop 8000388: bd80 pop {r7, pc} ... 0800038c <USB_LP_CAN1_RX0_IRQHandler>: /** * @brief This function handles USB low priority or CAN RX0 interrupts. */ void USB_LP_CAN1_RX0_IRQHandler(void) { 800038c: b580 push {r7, lr} 800038e: 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); 8000390: 4802 ldr r0, [pc, #8] ; (800039c <USB_LP_CAN1_RX0_IRQHandler+0x10>) 8000392: f000 fc87 bl 8000ca4 <HAL_PCD_IRQHandler> /* USER CODE BEGIN USB_LP_CAN1_RX0_IRQn 1 */ /* USER CODE END USB_LP_CAN1_RX0_IRQn 1 */ } 8000396: bf00 nop 8000398: bd80 pop {r7, pc} 800039a: bf00 nop 800039c: 20000e68 .word 0x20000e68 080003a0 <SystemInit>: * @note This function should be used only after reset. * @param None * @retval None */ void SystemInit (void) { 80003a0: b480 push {r7} 80003a2: 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 */ } 80003a4: bf00 nop 80003a6: 46bd mov sp, r7 80003a8: bc80 pop {r7} 80003aa: 4770 bx lr 080003ac <Reset_Handler>: .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: /* Copy the data segment initializers from flash to SRAM */ ldr r0, =_sdata 80003ac: 480c ldr r0, [pc, #48] ; (80003e0 <LoopFillZerobss+0x12>) ldr r1, =_edata 80003ae: 490d ldr r1, [pc, #52] ; (80003e4 <LoopFillZerobss+0x16>) ldr r2, =_sidata 80003b0: 4a0d ldr r2, [pc, #52] ; (80003e8 <LoopFillZerobss+0x1a>) movs r3, #0 80003b2: 2300 movs r3, #0 b LoopCopyDataInit 80003b4: e002 b.n 80003bc <LoopCopyDataInit> 080003b6 <CopyDataInit>: CopyDataInit: ldr r4, [r2, r3] 80003b6: 58d4 ldr r4, [r2, r3] str r4, [r0, r3] 80003b8: 50c4 str r4, [r0, r3] adds r3, r3, #4 80003ba: 3304 adds r3, #4 080003bc <LoopCopyDataInit>: LoopCopyDataInit: adds r4, r0, r3 80003bc: 18c4 adds r4, r0, r3 cmp r4, r1 80003be: 428c cmp r4, r1 bcc CopyDataInit 80003c0: d3f9 bcc.n 80003b6 <CopyDataInit> /* Zero fill the bss segment. */ ldr r2, =_sbss 80003c2: 4a0a ldr r2, [pc, #40] ; (80003ec <LoopFillZerobss+0x1e>) ldr r4, =_ebss 80003c4: 4c0a ldr r4, [pc, #40] ; (80003f0 <LoopFillZerobss+0x22>) movs r3, #0 80003c6: 2300 movs r3, #0 b LoopFillZerobss 80003c8: e001 b.n 80003ce <LoopFillZerobss> 080003ca <FillZerobss>: FillZerobss: str r3, [r2] 80003ca: 6013 str r3, [r2, #0] adds r2, r2, #4 80003cc: 3204 adds r2, #4 080003ce <LoopFillZerobss>: LoopFillZerobss: cmp r2, r4 80003ce: 42a2 cmp r2, r4 bcc FillZerobss 80003d0: d3fb bcc.n 80003ca <FillZerobss> /* Call the clock system intitialization function.*/ bl SystemInit 80003d2: f7ff ffe5 bl 80003a0 <SystemInit> /* Call static constructors */ bl __libc_init_array 80003d6: f007 fa85 bl 80078e4 <__libc_init_array> /* Call the application's entry point.*/ bl main 80003da: f7ff fec6 bl 800016a <main> bx lr 80003de: 4770 bx lr ldr r0, =_sdata 80003e0: 20000000 .word 0x20000000 ldr r1, =_edata 80003e4: 2000017c .word 0x2000017c ldr r2, =_sidata 80003e8: 080079b0 .word 0x080079b0 ldr r2, =_sbss 80003ec: 2000017c .word 0x2000017c ldr r4, =_ebss 80003f0: 20001374 .word 0x20001374 080003f4 <ADC1_2_IRQHandler>: * @retval : None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop 80003f4: e7fe b.n 80003f4 <ADC1_2_IRQHandler> ... 080003f8 <HAL_Init>: * 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) { 80003f8: b580 push {r7, lr} 80003fa: 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(); 80003fc: 4b08 ldr r3, [pc, #32] ; (8000420 <HAL_Init+0x28>) 80003fe: 681b ldr r3, [r3, #0] 8000400: 4a07 ldr r2, [pc, #28] ; (8000420 <HAL_Init+0x28>) 8000402: f043 0310 orr.w r3, r3, #16 8000406: 6013 str r3, [r2, #0] #endif #endif /* PREFETCH_ENABLE */ /* Set Interrupt Group Priority */ HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4); 8000408: 2003 movs r0, #3 800040a: f000 f923 bl 8000654 <HAL_NVIC_SetPriorityGrouping> /* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */ HAL_InitTick(TICK_INT_PRIORITY); 800040e: 200f movs r0, #15 8000410: f000 f808 bl 8000424 <HAL_InitTick> /* Init the low level hardware */ HAL_MspInit(); 8000414: f7ff ff60 bl 80002d8 <HAL_MspInit> /* Return function status */ return HAL_OK; 8000418: 2300 movs r3, #0 } 800041a: 4618 mov r0, r3 800041c: bd80 pop {r7, pc} 800041e: bf00 nop 8000420: 40022000 .word 0x40022000 08000424 <HAL_InitTick>: * implementation in user file. * @param TickPriority Tick interrupt priority. * @retval HAL status */ __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) { 8000424: b580 push {r7, lr} 8000426: b082 sub sp, #8 8000428: af00 add r7, sp, #0 800042a: 6078 str r0, [r7, #4] /* Configure the SysTick to have interrupt in 1ms time basis*/ if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U) 800042c: 4b12 ldr r3, [pc, #72] ; (8000478 <HAL_InitTick+0x54>) 800042e: 681a ldr r2, [r3, #0] 8000430: 4b12 ldr r3, [pc, #72] ; (800047c <HAL_InitTick+0x58>) 8000432: 781b ldrb r3, [r3, #0] 8000434: 4619 mov r1, r3 8000436: f44f 737a mov.w r3, #1000 ; 0x3e8 800043a: fbb3 f3f1 udiv r3, r3, r1 800043e: fbb2 f3f3 udiv r3, r2, r3 8000442: 4618 mov r0, r3 8000444: f000 f93b bl 80006be <HAL_SYSTICK_Config> 8000448: 4603 mov r3, r0 800044a: 2b00 cmp r3, #0 800044c: d001 beq.n 8000452 <HAL_InitTick+0x2e> { return HAL_ERROR; 800044e: 2301 movs r3, #1 8000450: e00e b.n 8000470 <HAL_InitTick+0x4c> } /* Configure the SysTick IRQ priority */ if (TickPriority < (1UL << __NVIC_PRIO_BITS)) 8000452: 687b ldr r3, [r7, #4] 8000454: 2b0f cmp r3, #15 8000456: d80a bhi.n 800046e <HAL_InitTick+0x4a> { HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U); 8000458: 2200 movs r2, #0 800045a: 6879 ldr r1, [r7, #4] 800045c: f04f 30ff mov.w r0, #4294967295 8000460: f000 f903 bl 800066a <HAL_NVIC_SetPriority> uwTickPrio = TickPriority; 8000464: 4a06 ldr r2, [pc, #24] ; (8000480 <HAL_InitTick+0x5c>) 8000466: 687b ldr r3, [r7, #4] 8000468: 6013 str r3, [r2, #0] { return HAL_ERROR; } /* Return function status */ return HAL_OK; 800046a: 2300 movs r3, #0 800046c: e000 b.n 8000470 <HAL_InitTick+0x4c> return HAL_ERROR; 800046e: 2301 movs r3, #1 } 8000470: 4618 mov r0, r3 8000472: 3708 adds r7, #8 8000474: 46bd mov sp, r7 8000476: bd80 pop {r7, pc} 8000478: 20000000 .word 0x20000000 800047c: 20000008 .word 0x20000008 8000480: 20000004 .word 0x20000004 08000484 <HAL_IncTick>: * @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) { 8000484: b480 push {r7} 8000486: af00 add r7, sp, #0 uwTick += uwTickFreq; 8000488: 4b05 ldr r3, [pc, #20] ; (80004a0 <HAL_IncTick+0x1c>) 800048a: 781b ldrb r3, [r3, #0] 800048c: 461a mov r2, r3 800048e: 4b05 ldr r3, [pc, #20] ; (80004a4 <HAL_IncTick+0x20>) 8000490: 681b ldr r3, [r3, #0] 8000492: 4413 add r3, r2 8000494: 4a03 ldr r2, [pc, #12] ; (80004a4 <HAL_IncTick+0x20>) 8000496: 6013 str r3, [r2, #0] } 8000498: bf00 nop 800049a: 46bd mov sp, r7 800049c: bc80 pop {r7} 800049e: 4770 bx lr 80004a0: 20000008 .word 0x20000008 80004a4: 20000198 .word 0x20000198 080004a8 <HAL_GetTick>: * @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) { 80004a8: b480 push {r7} 80004aa: af00 add r7, sp, #0 return uwTick; 80004ac: 4b02 ldr r3, [pc, #8] ; (80004b8 <HAL_GetTick+0x10>) 80004ae: 681b ldr r3, [r3, #0] } 80004b0: 4618 mov r0, r3 80004b2: 46bd mov sp, r7 80004b4: bc80 pop {r7} 80004b6: 4770 bx lr 80004b8: 20000198 .word 0x20000198 080004bc <__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) { 80004bc: b480 push {r7} 80004be: b085 sub sp, #20 80004c0: af00 add r7, sp, #0 80004c2: 6078 str r0, [r7, #4] uint32_t reg_value; uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ 80004c4: 687b ldr r3, [r7, #4] 80004c6: f003 0307 and.w r3, r3, #7 80004ca: 60fb str r3, [r7, #12] reg_value = SCB->AIRCR; /* read old register configuration */ 80004cc: 4b0c ldr r3, [pc, #48] ; (8000500 <__NVIC_SetPriorityGrouping+0x44>) 80004ce: 68db ldr r3, [r3, #12] 80004d0: 60bb str r3, [r7, #8] reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ 80004d2: 68ba ldr r2, [r7, #8] 80004d4: f64f 03ff movw r3, #63743 ; 0xf8ff 80004d8: 4013 ands r3, r2 80004da: 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 */ 80004dc: 68fb ldr r3, [r7, #12] 80004de: 021a lsls r2, r3, #8 ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | 80004e0: 68bb ldr r3, [r7, #8] 80004e2: 4313 orrs r3, r2 reg_value = (reg_value | 80004e4: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000 80004e8: f443 3300 orr.w r3, r3, #131072 ; 0x20000 80004ec: 60bb str r3, [r7, #8] SCB->AIRCR = reg_value; 80004ee: 4a04 ldr r2, [pc, #16] ; (8000500 <__NVIC_SetPriorityGrouping+0x44>) 80004f0: 68bb ldr r3, [r7, #8] 80004f2: 60d3 str r3, [r2, #12] } 80004f4: bf00 nop 80004f6: 3714 adds r7, #20 80004f8: 46bd mov sp, r7 80004fa: bc80 pop {r7} 80004fc: 4770 bx lr 80004fe: bf00 nop 8000500: e000ed00 .word 0xe000ed00 08000504 <__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) { 8000504: b480 push {r7} 8000506: af00 add r7, sp, #0 return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); 8000508: 4b04 ldr r3, [pc, #16] ; (800051c <__NVIC_GetPriorityGrouping+0x18>) 800050a: 68db ldr r3, [r3, #12] 800050c: 0a1b lsrs r3, r3, #8 800050e: f003 0307 and.w r3, r3, #7 } 8000512: 4618 mov r0, r3 8000514: 46bd mov sp, r7 8000516: bc80 pop {r7} 8000518: 4770 bx lr 800051a: bf00 nop 800051c: e000ed00 .word 0xe000ed00 08000520 <__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) { 8000520: b480 push {r7} 8000522: b083 sub sp, #12 8000524: af00 add r7, sp, #0 8000526: 4603 mov r3, r0 8000528: 71fb strb r3, [r7, #7] if ((int32_t)(IRQn) >= 0) 800052a: f997 3007 ldrsb.w r3, [r7, #7] 800052e: 2b00 cmp r3, #0 8000530: db0b blt.n 800054a <__NVIC_EnableIRQ+0x2a> { NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); 8000532: 79fb ldrb r3, [r7, #7] 8000534: f003 021f and.w r2, r3, #31 8000538: 4906 ldr r1, [pc, #24] ; (8000554 <__NVIC_EnableIRQ+0x34>) 800053a: f997 3007 ldrsb.w r3, [r7, #7] 800053e: 095b lsrs r3, r3, #5 8000540: 2001 movs r0, #1 8000542: fa00 f202 lsl.w r2, r0, r2 8000546: f841 2023 str.w r2, [r1, r3, lsl #2] } } 800054a: bf00 nop 800054c: 370c adds r7, #12 800054e: 46bd mov sp, r7 8000550: bc80 pop {r7} 8000552: 4770 bx lr 8000554: e000e100 .word 0xe000e100 08000558 <__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) { 8000558: b480 push {r7} 800055a: b083 sub sp, #12 800055c: af00 add r7, sp, #0 800055e: 4603 mov r3, r0 8000560: 6039 str r1, [r7, #0] 8000562: 71fb strb r3, [r7, #7] if ((int32_t)(IRQn) >= 0) 8000564: f997 3007 ldrsb.w r3, [r7, #7] 8000568: 2b00 cmp r3, #0 800056a: db0a blt.n 8000582 <__NVIC_SetPriority+0x2a> { NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 800056c: 683b ldr r3, [r7, #0] 800056e: b2da uxtb r2, r3 8000570: 490c ldr r1, [pc, #48] ; (80005a4 <__NVIC_SetPriority+0x4c>) 8000572: f997 3007 ldrsb.w r3, [r7, #7] 8000576: 0112 lsls r2, r2, #4 8000578: b2d2 uxtb r2, r2 800057a: 440b add r3, r1 800057c: 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); } } 8000580: e00a b.n 8000598 <__NVIC_SetPriority+0x40> SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 8000582: 683b ldr r3, [r7, #0] 8000584: b2da uxtb r2, r3 8000586: 4908 ldr r1, [pc, #32] ; (80005a8 <__NVIC_SetPriority+0x50>) 8000588: 79fb ldrb r3, [r7, #7] 800058a: f003 030f and.w r3, r3, #15 800058e: 3b04 subs r3, #4 8000590: 0112 lsls r2, r2, #4 8000592: b2d2 uxtb r2, r2 8000594: 440b add r3, r1 8000596: 761a strb r2, [r3, #24] } 8000598: bf00 nop 800059a: 370c adds r7, #12 800059c: 46bd mov sp, r7 800059e: bc80 pop {r7} 80005a0: 4770 bx lr 80005a2: bf00 nop 80005a4: e000e100 .word 0xe000e100 80005a8: e000ed00 .word 0xe000ed00 080005ac <NVIC_EncodePriority>: \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) { 80005ac: b480 push {r7} 80005ae: b089 sub sp, #36 ; 0x24 80005b0: af00 add r7, sp, #0 80005b2: 60f8 str r0, [r7, #12] 80005b4: 60b9 str r1, [r7, #8] 80005b6: 607a str r2, [r7, #4] uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ 80005b8: 68fb ldr r3, [r7, #12] 80005ba: f003 0307 and.w r3, r3, #7 80005be: 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); 80005c0: 69fb ldr r3, [r7, #28] 80005c2: f1c3 0307 rsb r3, r3, #7 80005c6: 2b04 cmp r3, #4 80005c8: bf28 it cs 80005ca: 2304 movcs r3, #4 80005cc: 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)); 80005ce: 69fb ldr r3, [r7, #28] 80005d0: 3304 adds r3, #4 80005d2: 2b06 cmp r3, #6 80005d4: d902 bls.n 80005dc <NVIC_EncodePriority+0x30> 80005d6: 69fb ldr r3, [r7, #28] 80005d8: 3b03 subs r3, #3 80005da: e000 b.n 80005de <NVIC_EncodePriority+0x32> 80005dc: 2300 movs r3, #0 80005de: 617b str r3, [r7, #20] return ( ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | 80005e0: f04f 32ff mov.w r2, #4294967295 80005e4: 69bb ldr r3, [r7, #24] 80005e6: fa02 f303 lsl.w r3, r2, r3 80005ea: 43da mvns r2, r3 80005ec: 68bb ldr r3, [r7, #8] 80005ee: 401a ands r2, r3 80005f0: 697b ldr r3, [r7, #20] 80005f2: 409a lsls r2, r3 ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) 80005f4: f04f 31ff mov.w r1, #4294967295 80005f8: 697b ldr r3, [r7, #20] 80005fa: fa01 f303 lsl.w r3, r1, r3 80005fe: 43d9 mvns r1, r3 8000600: 687b ldr r3, [r7, #4] 8000602: 400b ands r3, r1 ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | 8000604: 4313 orrs r3, r2 ); } 8000606: 4618 mov r0, r3 8000608: 3724 adds r7, #36 ; 0x24 800060a: 46bd mov sp, r7 800060c: bc80 pop {r7} 800060e: 4770 bx lr 08000610 <SysTick_Config>: \note When the variable <b>__Vendor_SysTickConfig</b> is set to 1, then the function <b>SysTick_Config</b> is not included. In this case, the file <b><i>device</i>.h</b> must contain a vendor-specific implementation of this function. */ __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) { 8000610: b580 push {r7, lr} 8000612: b082 sub sp, #8 8000614: af00 add r7, sp, #0 8000616: 6078 str r0, [r7, #4] if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) 8000618: 687b ldr r3, [r7, #4] 800061a: 3b01 subs r3, #1 800061c: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000 8000620: d301 bcc.n 8000626 <SysTick_Config+0x16> { return (1UL); /* Reload value impossible */ 8000622: 2301 movs r3, #1 8000624: e00f b.n 8000646 <SysTick_Config+0x36> } SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ 8000626: 4a0a ldr r2, [pc, #40] ; (8000650 <SysTick_Config+0x40>) 8000628: 687b ldr r3, [r7, #4] 800062a: 3b01 subs r3, #1 800062c: 6053 str r3, [r2, #4] NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ 800062e: 210f movs r1, #15 8000630: f04f 30ff mov.w r0, #4294967295 8000634: f7ff ff90 bl 8000558 <__NVIC_SetPriority> SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ 8000638: 4b05 ldr r3, [pc, #20] ; (8000650 <SysTick_Config+0x40>) 800063a: 2200 movs r2, #0 800063c: 609a str r2, [r3, #8] SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | 800063e: 4b04 ldr r3, [pc, #16] ; (8000650 <SysTick_Config+0x40>) 8000640: 2207 movs r2, #7 8000642: 601a str r2, [r3, #0] SysTick_CTRL_TICKINT_Msk | SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ return (0UL); /* Function successful */ 8000644: 2300 movs r3, #0 } 8000646: 4618 mov r0, r3 8000648: 3708 adds r7, #8 800064a: 46bd mov sp, r7 800064c: bd80 pop {r7, pc} 800064e: bf00 nop 8000650: e000e010 .word 0xe000e010 08000654 <HAL_NVIC_SetPriorityGrouping>: * @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) { 8000654: b580 push {r7, lr} 8000656: b082 sub sp, #8 8000658: af00 add r7, sp, #0 800065a: 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); 800065c: 6878 ldr r0, [r7, #4] 800065e: f7ff ff2d bl 80004bc <__NVIC_SetPriorityGrouping> } 8000662: bf00 nop 8000664: 3708 adds r7, #8 8000666: 46bd mov sp, r7 8000668: bd80 pop {r7, pc} 0800066a <HAL_NVIC_SetPriority>: * 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) { 800066a: b580 push {r7, lr} 800066c: b086 sub sp, #24 800066e: af00 add r7, sp, #0 8000670: 4603 mov r3, r0 8000672: 60b9 str r1, [r7, #8] 8000674: 607a str r2, [r7, #4] 8000676: 73fb strb r3, [r7, #15] uint32_t prioritygroup = 0x00U; 8000678: 2300 movs r3, #0 800067a: 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(); 800067c: f7ff ff42 bl 8000504 <__NVIC_GetPriorityGrouping> 8000680: 6178 str r0, [r7, #20] NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority)); 8000682: 687a ldr r2, [r7, #4] 8000684: 68b9 ldr r1, [r7, #8] 8000686: 6978 ldr r0, [r7, #20] 8000688: f7ff ff90 bl 80005ac <NVIC_EncodePriority> 800068c: 4602 mov r2, r0 800068e: f997 300f ldrsb.w r3, [r7, #15] 8000692: 4611 mov r1, r2 8000694: 4618 mov r0, r3 8000696: f7ff ff5f bl 8000558 <__NVIC_SetPriority> } 800069a: bf00 nop 800069c: 3718 adds r7, #24 800069e: 46bd mov sp, r7 80006a0: bd80 pop {r7, pc} 080006a2 <HAL_NVIC_EnableIRQ>: * 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) { 80006a2: b580 push {r7, lr} 80006a4: b082 sub sp, #8 80006a6: af00 add r7, sp, #0 80006a8: 4603 mov r3, r0 80006aa: 71fb strb r3, [r7, #7] /* Check the parameters */ assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); /* Enable interrupt */ NVIC_EnableIRQ(IRQn); 80006ac: f997 3007 ldrsb.w r3, [r7, #7] 80006b0: 4618 mov r0, r3 80006b2: f7ff ff35 bl 8000520 <__NVIC_EnableIRQ> } 80006b6: bf00 nop 80006b8: 3708 adds r7, #8 80006ba: 46bd mov sp, r7 80006bc: bd80 pop {r7, pc} 080006be <HAL_SYSTICK_Config>: * @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) { 80006be: b580 push {r7, lr} 80006c0: b082 sub sp, #8 80006c2: af00 add r7, sp, #0 80006c4: 6078 str r0, [r7, #4] return SysTick_Config(TicksNumb); 80006c6: 6878 ldr r0, [r7, #4] 80006c8: f7ff ffa2 bl 8000610 <SysTick_Config> 80006cc: 4603 mov r3, r0 } 80006ce: 4618 mov r0, r3 80006d0: 3708 adds r7, #8 80006d2: 46bd mov sp, r7 80006d4: bd80 pop {r7, pc} ... 080006d8 <HAL_GPIO_Init>: * @param GPIO_Init: pointer to a GPIO_InitTypeDef structure that contains * the configuration information for the specified GPIO peripheral. * @retval None */ void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init) { 80006d8: b480 push {r7} 80006da: b08b sub sp, #44 ; 0x2c 80006dc: af00 add r7, sp, #0 80006de: 6078 str r0, [r7, #4] 80006e0: 6039 str r1, [r7, #0] uint32_t position = 0x00u; 80006e2: 2300 movs r3, #0 80006e4: 627b str r3, [r7, #36] ; 0x24 uint32_t ioposition; uint32_t iocurrent; uint32_t temp; uint32_t config = 0x00u; 80006e6: 2300 movs r3, #0 80006e8: 623b str r3, [r7, #32] assert_param(IS_GPIO_ALL_INSTANCE(GPIOx)); assert_param(IS_GPIO_PIN(GPIO_Init->Pin)); assert_param(IS_GPIO_MODE(GPIO_Init->Mode)); /* Configure the port pins */ while (((GPIO_Init->Pin) >> position) != 0x00u) 80006ea: e169 b.n 80009c0 <HAL_GPIO_Init+0x2e8> { /* Get the IO position */ ioposition = (0x01uL << position); 80006ec: 2201 movs r2, #1 80006ee: 6a7b ldr r3, [r7, #36] ; 0x24 80006f0: fa02 f303 lsl.w r3, r2, r3 80006f4: 61fb str r3, [r7, #28] /* Get the current IO position */ iocurrent = (uint32_t)(GPIO_Init->Pin) & ioposition; 80006f6: 683b ldr r3, [r7, #0] 80006f8: 681b ldr r3, [r3, #0] 80006fa: 69fa ldr r2, [r7, #28] 80006fc: 4013 ands r3, r2 80006fe: 61bb str r3, [r7, #24] if (iocurrent == ioposition) 8000700: 69ba ldr r2, [r7, #24] 8000702: 69fb ldr r3, [r7, #28] 8000704: 429a cmp r2, r3 8000706: f040 8158 bne.w 80009ba <HAL_GPIO_Init+0x2e2> { /* Check the Alternate function parameters */ assert_param(IS_GPIO_AF_INSTANCE(GPIOx)); /* Based on the required mode, filling config variable with MODEy[1:0] and CNFy[3:2] corresponding bits */ switch (GPIO_Init->Mode) 800070a: 683b ldr r3, [r7, #0] 800070c: 685b ldr r3, [r3, #4] 800070e: 4a9a ldr r2, [pc, #616] ; (8000978 <HAL_GPIO_Init+0x2a0>) 8000710: 4293 cmp r3, r2 8000712: d05e beq.n 80007d2 <HAL_GPIO_Init+0xfa> 8000714: 4a98 ldr r2, [pc, #608] ; (8000978 <HAL_GPIO_Init+0x2a0>) 8000716: 4293 cmp r3, r2 8000718: d875 bhi.n 8000806 <HAL_GPIO_Init+0x12e> 800071a: 4a98 ldr r2, [pc, #608] ; (800097c <HAL_GPIO_Init+0x2a4>) 800071c: 4293 cmp r3, r2 800071e: d058 beq.n 80007d2 <HAL_GPIO_Init+0xfa> 8000720: 4a96 ldr r2, [pc, #600] ; (800097c <HAL_GPIO_Init+0x2a4>) 8000722: 4293 cmp r3, r2 8000724: d86f bhi.n 8000806 <HAL_GPIO_Init+0x12e> 8000726: 4a96 ldr r2, [pc, #600] ; (8000980 <HAL_GPIO_Init+0x2a8>) 8000728: 4293 cmp r3, r2 800072a: d052 beq.n 80007d2 <HAL_GPIO_Init+0xfa> 800072c: 4a94 ldr r2, [pc, #592] ; (8000980 <HAL_GPIO_Init+0x2a8>) 800072e: 4293 cmp r3, r2 8000730: d869 bhi.n 8000806 <HAL_GPIO_Init+0x12e> 8000732: 4a94 ldr r2, [pc, #592] ; (8000984 <HAL_GPIO_Init+0x2ac>) 8000734: 4293 cmp r3, r2 8000736: d04c beq.n 80007d2 <HAL_GPIO_Init+0xfa> 8000738: 4a92 ldr r2, [pc, #584] ; (8000984 <HAL_GPIO_Init+0x2ac>) 800073a: 4293 cmp r3, r2 800073c: d863 bhi.n 8000806 <HAL_GPIO_Init+0x12e> 800073e: 4a92 ldr r2, [pc, #584] ; (8000988 <HAL_GPIO_Init+0x2b0>) 8000740: 4293 cmp r3, r2 8000742: d046 beq.n 80007d2 <HAL_GPIO_Init+0xfa> 8000744: 4a90 ldr r2, [pc, #576] ; (8000988 <HAL_GPIO_Init+0x2b0>) 8000746: 4293 cmp r3, r2 8000748: d85d bhi.n 8000806 <HAL_GPIO_Init+0x12e> 800074a: 2b12 cmp r3, #18 800074c: d82a bhi.n 80007a4 <HAL_GPIO_Init+0xcc> 800074e: 2b12 cmp r3, #18 8000750: d859 bhi.n 8000806 <HAL_GPIO_Init+0x12e> 8000752: a201 add r2, pc, #4 ; (adr r2, 8000758 <HAL_GPIO_Init+0x80>) 8000754: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8000758: 080007d3 .word 0x080007d3 800075c: 080007ad .word 0x080007ad 8000760: 080007bf .word 0x080007bf 8000764: 08000801 .word 0x08000801 8000768: 08000807 .word 0x08000807 800076c: 08000807 .word 0x08000807 8000770: 08000807 .word 0x08000807 8000774: 08000807 .word 0x08000807 8000778: 08000807 .word 0x08000807 800077c: 08000807 .word 0x08000807 8000780: 08000807 .word 0x08000807 8000784: 08000807 .word 0x08000807 8000788: 08000807 .word 0x08000807 800078c: 08000807 .word 0x08000807 8000790: 08000807 .word 0x08000807 8000794: 08000807 .word 0x08000807 8000798: 08000807 .word 0x08000807 800079c: 080007b5 .word 0x080007b5 80007a0: 080007c9 .word 0x080007c9 80007a4: 4a79 ldr r2, [pc, #484] ; (800098c <HAL_GPIO_Init+0x2b4>) 80007a6: 4293 cmp r3, r2 80007a8: d013 beq.n 80007d2 <HAL_GPIO_Init+0xfa> config = GPIO_CR_MODE_INPUT + GPIO_CR_CNF_ANALOG; break; /* Parameters are checked with assert_param */ default: break; 80007aa: e02c b.n 8000806 <HAL_GPIO_Init+0x12e> config = GPIO_Init->Speed + GPIO_CR_CNF_GP_OUTPUT_PP; 80007ac: 683b ldr r3, [r7, #0] 80007ae: 68db ldr r3, [r3, #12] 80007b0: 623b str r3, [r7, #32] break; 80007b2: e029 b.n 8000808 <HAL_GPIO_Init+0x130> config = GPIO_Init->Speed + GPIO_CR_CNF_GP_OUTPUT_OD; 80007b4: 683b ldr r3, [r7, #0] 80007b6: 68db ldr r3, [r3, #12] 80007b8: 3304 adds r3, #4 80007ba: 623b str r3, [r7, #32] break; 80007bc: e024 b.n 8000808 <HAL_GPIO_Init+0x130> config = GPIO_Init->Speed + GPIO_CR_CNF_AF_OUTPUT_PP; 80007be: 683b ldr r3, [r7, #0] 80007c0: 68db ldr r3, [r3, #12] 80007c2: 3308 adds r3, #8 80007c4: 623b str r3, [r7, #32] break; 80007c6: e01f b.n 8000808 <HAL_GPIO_Init+0x130> config = GPIO_Init->Speed + GPIO_CR_CNF_AF_OUTPUT_OD; 80007c8: 683b ldr r3, [r7, #0] 80007ca: 68db ldr r3, [r3, #12] 80007cc: 330c adds r3, #12 80007ce: 623b str r3, [r7, #32] break; 80007d0: e01a b.n 8000808 <HAL_GPIO_Init+0x130> if (GPIO_Init->Pull == GPIO_NOPULL) 80007d2: 683b ldr r3, [r7, #0] 80007d4: 689b ldr r3, [r3, #8] 80007d6: 2b00 cmp r3, #0 80007d8: d102 bne.n 80007e0 <HAL_GPIO_Init+0x108> config = GPIO_CR_MODE_INPUT + GPIO_CR_CNF_INPUT_FLOATING; 80007da: 2304 movs r3, #4 80007dc: 623b str r3, [r7, #32] break; 80007de: e013 b.n 8000808 <HAL_GPIO_Init+0x130> else if (GPIO_Init->Pull == GPIO_PULLUP) 80007e0: 683b ldr r3, [r7, #0] 80007e2: 689b ldr r3, [r3, #8] 80007e4: 2b01 cmp r3, #1 80007e6: d105 bne.n 80007f4 <HAL_GPIO_Init+0x11c> config = GPIO_CR_MODE_INPUT + GPIO_CR_CNF_INPUT_PU_PD; 80007e8: 2308 movs r3, #8 80007ea: 623b str r3, [r7, #32] GPIOx->BSRR = ioposition; 80007ec: 687b ldr r3, [r7, #4] 80007ee: 69fa ldr r2, [r7, #28] 80007f0: 611a str r2, [r3, #16] break; 80007f2: e009 b.n 8000808 <HAL_GPIO_Init+0x130> config = GPIO_CR_MODE_INPUT + GPIO_CR_CNF_INPUT_PU_PD; 80007f4: 2308 movs r3, #8 80007f6: 623b str r3, [r7, #32] GPIOx->BRR = ioposition; 80007f8: 687b ldr r3, [r7, #4] 80007fa: 69fa ldr r2, [r7, #28] 80007fc: 615a str r2, [r3, #20] break; 80007fe: e003 b.n 8000808 <HAL_GPIO_Init+0x130> config = GPIO_CR_MODE_INPUT + GPIO_CR_CNF_ANALOG; 8000800: 2300 movs r3, #0 8000802: 623b str r3, [r7, #32] break; 8000804: e000 b.n 8000808 <HAL_GPIO_Init+0x130> break; 8000806: bf00 nop } /* Check if the current bit belongs to first half or last half of the pin count number in order to address CRH or CRL register*/ configregister = (iocurrent < GPIO_PIN_8) ? &GPIOx->CRL : &GPIOx->CRH; 8000808: 69bb ldr r3, [r7, #24] 800080a: 2bff cmp r3, #255 ; 0xff 800080c: d801 bhi.n 8000812 <HAL_GPIO_Init+0x13a> 800080e: 687b ldr r3, [r7, #4] 8000810: e001 b.n 8000816 <HAL_GPIO_Init+0x13e> 8000812: 687b ldr r3, [r7, #4] 8000814: 3304 adds r3, #4 8000816: 617b str r3, [r7, #20] registeroffset = (iocurrent < GPIO_PIN_8) ? (position << 2u) : ((position - 8u) << 2u); 8000818: 69bb ldr r3, [r7, #24] 800081a: 2bff cmp r3, #255 ; 0xff 800081c: d802 bhi.n 8000824 <HAL_GPIO_Init+0x14c> 800081e: 6a7b ldr r3, [r7, #36] ; 0x24 8000820: 009b lsls r3, r3, #2 8000822: e002 b.n 800082a <HAL_GPIO_Init+0x152> 8000824: 6a7b ldr r3, [r7, #36] ; 0x24 8000826: 3b08 subs r3, #8 8000828: 009b lsls r3, r3, #2 800082a: 613b str r3, [r7, #16] /* Apply the new configuration of the pin to the register */ MODIFY_REG((*configregister), ((GPIO_CRL_MODE0 | GPIO_CRL_CNF0) << registeroffset), (config << registeroffset)); 800082c: 697b ldr r3, [r7, #20] 800082e: 681a ldr r2, [r3, #0] 8000830: 210f movs r1, #15 8000832: 693b ldr r3, [r7, #16] 8000834: fa01 f303 lsl.w r3, r1, r3 8000838: 43db mvns r3, r3 800083a: 401a ands r2, r3 800083c: 6a39 ldr r1, [r7, #32] 800083e: 693b ldr r3, [r7, #16] 8000840: fa01 f303 lsl.w r3, r1, r3 8000844: 431a orrs r2, r3 8000846: 697b ldr r3, [r7, #20] 8000848: 601a str r2, [r3, #0] /*--------------------- EXTI Mode Configuration ------------------------*/ /* Configure the External Interrupt or event for the current IO */ if ((GPIO_Init->Mode & EXTI_MODE) == EXTI_MODE) 800084a: 683b ldr r3, [r7, #0] 800084c: 685b ldr r3, [r3, #4] 800084e: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 8000852: 2b00 cmp r3, #0 8000854: f000 80b1 beq.w 80009ba <HAL_GPIO_Init+0x2e2> { /* Enable AFIO Clock */ __HAL_RCC_AFIO_CLK_ENABLE(); 8000858: 4b4d ldr r3, [pc, #308] ; (8000990 <HAL_GPIO_Init+0x2b8>) 800085a: 699b ldr r3, [r3, #24] 800085c: 4a4c ldr r2, [pc, #304] ; (8000990 <HAL_GPIO_Init+0x2b8>) 800085e: f043 0301 orr.w r3, r3, #1 8000862: 6193 str r3, [r2, #24] 8000864: 4b4a ldr r3, [pc, #296] ; (8000990 <HAL_GPIO_Init+0x2b8>) 8000866: 699b ldr r3, [r3, #24] 8000868: f003 0301 and.w r3, r3, #1 800086c: 60bb str r3, [r7, #8] 800086e: 68bb ldr r3, [r7, #8] temp = AFIO->EXTICR[position >> 2u]; 8000870: 4a48 ldr r2, [pc, #288] ; (8000994 <HAL_GPIO_Init+0x2bc>) 8000872: 6a7b ldr r3, [r7, #36] ; 0x24 8000874: 089b lsrs r3, r3, #2 8000876: 3302 adds r3, #2 8000878: f852 3023 ldr.w r3, [r2, r3, lsl #2] 800087c: 60fb str r3, [r7, #12] CLEAR_BIT(temp, (0x0Fu) << (4u * (position & 0x03u))); 800087e: 6a7b ldr r3, [r7, #36] ; 0x24 8000880: f003 0303 and.w r3, r3, #3 8000884: 009b lsls r3, r3, #2 8000886: 220f movs r2, #15 8000888: fa02 f303 lsl.w r3, r2, r3 800088c: 43db mvns r3, r3 800088e: 68fa ldr r2, [r7, #12] 8000890: 4013 ands r3, r2 8000892: 60fb str r3, [r7, #12] SET_BIT(temp, (GPIO_GET_INDEX(GPIOx)) << (4u * (position & 0x03u))); 8000894: 687b ldr r3, [r7, #4] 8000896: 4a40 ldr r2, [pc, #256] ; (8000998 <HAL_GPIO_Init+0x2c0>) 8000898: 4293 cmp r3, r2 800089a: d013 beq.n 80008c4 <HAL_GPIO_Init+0x1ec> 800089c: 687b ldr r3, [r7, #4] 800089e: 4a3f ldr r2, [pc, #252] ; (800099c <HAL_GPIO_Init+0x2c4>) 80008a0: 4293 cmp r3, r2 80008a2: d00d beq.n 80008c0 <HAL_GPIO_Init+0x1e8> 80008a4: 687b ldr r3, [r7, #4] 80008a6: 4a3e ldr r2, [pc, #248] ; (80009a0 <HAL_GPIO_Init+0x2c8>) 80008a8: 4293 cmp r3, r2 80008aa: d007 beq.n 80008bc <HAL_GPIO_Init+0x1e4> 80008ac: 687b ldr r3, [r7, #4] 80008ae: 4a3d ldr r2, [pc, #244] ; (80009a4 <HAL_GPIO_Init+0x2cc>) 80008b0: 4293 cmp r3, r2 80008b2: d101 bne.n 80008b8 <HAL_GPIO_Init+0x1e0> 80008b4: 2303 movs r3, #3 80008b6: e006 b.n 80008c6 <HAL_GPIO_Init+0x1ee> 80008b8: 2304 movs r3, #4 80008ba: e004 b.n 80008c6 <HAL_GPIO_Init+0x1ee> 80008bc: 2302 movs r3, #2 80008be: e002 b.n 80008c6 <HAL_GPIO_Init+0x1ee> 80008c0: 2301 movs r3, #1 80008c2: e000 b.n 80008c6 <HAL_GPIO_Init+0x1ee> 80008c4: 2300 movs r3, #0 80008c6: 6a7a ldr r2, [r7, #36] ; 0x24 80008c8: f002 0203 and.w r2, r2, #3 80008cc: 0092 lsls r2, r2, #2 80008ce: 4093 lsls r3, r2 80008d0: 68fa ldr r2, [r7, #12] 80008d2: 4313 orrs r3, r2 80008d4: 60fb str r3, [r7, #12] AFIO->EXTICR[position >> 2u] = temp; 80008d6: 492f ldr r1, [pc, #188] ; (8000994 <HAL_GPIO_Init+0x2bc>) 80008d8: 6a7b ldr r3, [r7, #36] ; 0x24 80008da: 089b lsrs r3, r3, #2 80008dc: 3302 adds r3, #2 80008de: 68fa ldr r2, [r7, #12] 80008e0: f841 2023 str.w r2, [r1, r3, lsl #2] /* Configure the interrupt mask */ if ((GPIO_Init->Mode & GPIO_MODE_IT) == GPIO_MODE_IT) 80008e4: 683b ldr r3, [r7, #0] 80008e6: 685b ldr r3, [r3, #4] 80008e8: f403 3380 and.w r3, r3, #65536 ; 0x10000 80008ec: 2b00 cmp r3, #0 80008ee: d006 beq.n 80008fe <HAL_GPIO_Init+0x226> { SET_BIT(EXTI->IMR, iocurrent); 80008f0: 4b2d ldr r3, [pc, #180] ; (80009a8 <HAL_GPIO_Init+0x2d0>) 80008f2: 681a ldr r2, [r3, #0] 80008f4: 492c ldr r1, [pc, #176] ; (80009a8 <HAL_GPIO_Init+0x2d0>) 80008f6: 69bb ldr r3, [r7, #24] 80008f8: 4313 orrs r3, r2 80008fa: 600b str r3, [r1, #0] 80008fc: e006 b.n 800090c <HAL_GPIO_Init+0x234> } else { CLEAR_BIT(EXTI->IMR, iocurrent); 80008fe: 4b2a ldr r3, [pc, #168] ; (80009a8 <HAL_GPIO_Init+0x2d0>) 8000900: 681a ldr r2, [r3, #0] 8000902: 69bb ldr r3, [r7, #24] 8000904: 43db mvns r3, r3 8000906: 4928 ldr r1, [pc, #160] ; (80009a8 <HAL_GPIO_Init+0x2d0>) 8000908: 4013 ands r3, r2 800090a: 600b str r3, [r1, #0] } /* Configure the event mask */ if ((GPIO_Init->Mode & GPIO_MODE_EVT) == GPIO_MODE_EVT) 800090c: 683b ldr r3, [r7, #0] 800090e: 685b ldr r3, [r3, #4] 8000910: f403 3300 and.w r3, r3, #131072 ; 0x20000 8000914: 2b00 cmp r3, #0 8000916: d006 beq.n 8000926 <HAL_GPIO_Init+0x24e> { SET_BIT(EXTI->EMR, iocurrent); 8000918: 4b23 ldr r3, [pc, #140] ; (80009a8 <HAL_GPIO_Init+0x2d0>) 800091a: 685a ldr r2, [r3, #4] 800091c: 4922 ldr r1, [pc, #136] ; (80009a8 <HAL_GPIO_Init+0x2d0>) 800091e: 69bb ldr r3, [r7, #24] 8000920: 4313 orrs r3, r2 8000922: 604b str r3, [r1, #4] 8000924: e006 b.n 8000934 <HAL_GPIO_Init+0x25c> } else { CLEAR_BIT(EXTI->EMR, iocurrent); 8000926: 4b20 ldr r3, [pc, #128] ; (80009a8 <HAL_GPIO_Init+0x2d0>) 8000928: 685a ldr r2, [r3, #4] 800092a: 69bb ldr r3, [r7, #24] 800092c: 43db mvns r3, r3 800092e: 491e ldr r1, [pc, #120] ; (80009a8 <HAL_GPIO_Init+0x2d0>) 8000930: 4013 ands r3, r2 8000932: 604b str r3, [r1, #4] } /* Enable or disable the rising trigger */ if ((GPIO_Init->Mode & RISING_EDGE) == RISING_EDGE) 8000934: 683b ldr r3, [r7, #0] 8000936: 685b ldr r3, [r3, #4] 8000938: f403 1380 and.w r3, r3, #1048576 ; 0x100000 800093c: 2b00 cmp r3, #0 800093e: d006 beq.n 800094e <HAL_GPIO_Init+0x276> { SET_BIT(EXTI->RTSR, iocurrent); 8000940: 4b19 ldr r3, [pc, #100] ; (80009a8 <HAL_GPIO_Init+0x2d0>) 8000942: 689a ldr r2, [r3, #8] 8000944: 4918 ldr r1, [pc, #96] ; (80009a8 <HAL_GPIO_Init+0x2d0>) 8000946: 69bb ldr r3, [r7, #24] 8000948: 4313 orrs r3, r2 800094a: 608b str r3, [r1, #8] 800094c: e006 b.n 800095c <HAL_GPIO_Init+0x284> } else { CLEAR_BIT(EXTI->RTSR, iocurrent); 800094e: 4b16 ldr r3, [pc, #88] ; (80009a8 <HAL_GPIO_Init+0x2d0>) 8000950: 689a ldr r2, [r3, #8] 8000952: 69bb ldr r3, [r7, #24] 8000954: 43db mvns r3, r3 8000956: 4914 ldr r1, [pc, #80] ; (80009a8 <HAL_GPIO_Init+0x2d0>) 8000958: 4013 ands r3, r2 800095a: 608b str r3, [r1, #8] } /* Enable or disable the falling trigger */ if ((GPIO_Init->Mode & FALLING_EDGE) == FALLING_EDGE) 800095c: 683b ldr r3, [r7, #0] 800095e: 685b ldr r3, [r3, #4] 8000960: f403 1300 and.w r3, r3, #2097152 ; 0x200000 8000964: 2b00 cmp r3, #0 8000966: d021 beq.n 80009ac <HAL_GPIO_Init+0x2d4> { SET_BIT(EXTI->FTSR, iocurrent); 8000968: 4b0f ldr r3, [pc, #60] ; (80009a8 <HAL_GPIO_Init+0x2d0>) 800096a: 68da ldr r2, [r3, #12] 800096c: 490e ldr r1, [pc, #56] ; (80009a8 <HAL_GPIO_Init+0x2d0>) 800096e: 69bb ldr r3, [r7, #24] 8000970: 4313 orrs r3, r2 8000972: 60cb str r3, [r1, #12] 8000974: e021 b.n 80009ba <HAL_GPIO_Init+0x2e2> 8000976: bf00 nop 8000978: 10320000 .word 0x10320000 800097c: 10310000 .word 0x10310000 8000980: 10220000 .word 0x10220000 8000984: 10210000 .word 0x10210000 8000988: 10120000 .word 0x10120000 800098c: 10110000 .word 0x10110000 8000990: 40021000 .word 0x40021000 8000994: 40010000 .word 0x40010000 8000998: 40010800 .word 0x40010800 800099c: 40010c00 .word 0x40010c00 80009a0: 40011000 .word 0x40011000 80009a4: 40011400 .word 0x40011400 80009a8: 40010400 .word 0x40010400 } else { CLEAR_BIT(EXTI->FTSR, iocurrent); 80009ac: 4b0b ldr r3, [pc, #44] ; (80009dc <HAL_GPIO_Init+0x304>) 80009ae: 68da ldr r2, [r3, #12] 80009b0: 69bb ldr r3, [r7, #24] 80009b2: 43db mvns r3, r3 80009b4: 4909 ldr r1, [pc, #36] ; (80009dc <HAL_GPIO_Init+0x304>) 80009b6: 4013 ands r3, r2 80009b8: 60cb str r3, [r1, #12] } } } position++; 80009ba: 6a7b ldr r3, [r7, #36] ; 0x24 80009bc: 3301 adds r3, #1 80009be: 627b str r3, [r7, #36] ; 0x24 while (((GPIO_Init->Pin) >> position) != 0x00u) 80009c0: 683b ldr r3, [r7, #0] 80009c2: 681a ldr r2, [r3, #0] 80009c4: 6a7b ldr r3, [r7, #36] ; 0x24 80009c6: fa22 f303 lsr.w r3, r2, r3 80009ca: 2b00 cmp r3, #0 80009cc: f47f ae8e bne.w 80006ec <HAL_GPIO_Init+0x14> } } 80009d0: bf00 nop 80009d2: bf00 nop 80009d4: 372c adds r7, #44 ; 0x2c 80009d6: 46bd mov sp, r7 80009d8: bc80 pop {r7} 80009da: 4770 bx lr 80009dc: 40010400 .word 0x40010400 080009e0 <HAL_GPIO_WritePin>: * @arg GPIO_PIN_RESET: to clear the port pin * @arg GPIO_PIN_SET: to set the port pin * @retval None */ void HAL_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState) { 80009e0: b480 push {r7} 80009e2: b083 sub sp, #12 80009e4: af00 add r7, sp, #0 80009e6: 6078 str r0, [r7, #4] 80009e8: 460b mov r3, r1 80009ea: 807b strh r3, [r7, #2] 80009ec: 4613 mov r3, r2 80009ee: 707b strb r3, [r7, #1] /* Check the parameters */ assert_param(IS_GPIO_PIN(GPIO_Pin)); assert_param(IS_GPIO_PIN_ACTION(PinState)); if (PinState != GPIO_PIN_RESET) 80009f0: 787b ldrb r3, [r7, #1] 80009f2: 2b00 cmp r3, #0 80009f4: d003 beq.n 80009fe <HAL_GPIO_WritePin+0x1e> { GPIOx->BSRR = GPIO_Pin; 80009f6: 887a ldrh r2, [r7, #2] 80009f8: 687b ldr r3, [r7, #4] 80009fa: 611a str r2, [r3, #16] } else { GPIOx->BSRR = (uint32_t)GPIO_Pin << 16u; } } 80009fc: e003 b.n 8000a06 <HAL_GPIO_WritePin+0x26> GPIOx->BSRR = (uint32_t)GPIO_Pin << 16u; 80009fe: 887b ldrh r3, [r7, #2] 8000a00: 041a lsls r2, r3, #16 8000a02: 687b ldr r3, [r7, #4] 8000a04: 611a str r2, [r3, #16] } 8000a06: bf00 nop 8000a08: 370c adds r7, #12 8000a0a: 46bd mov sp, r7 8000a0c: bc80 pop {r7} 8000a0e: 4770 bx lr 08000a10 <HAL_GPIO_TogglePin>: * @param GPIOx: where x can be (A..G depending on device used) to select the GPIO peripheral * @param GPIO_Pin: Specifies the pins to be toggled. * @retval None */ void HAL_GPIO_TogglePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) { 8000a10: b480 push {r7} 8000a12: b085 sub sp, #20 8000a14: af00 add r7, sp, #0 8000a16: 6078 str r0, [r7, #4] 8000a18: 460b mov r3, r1 8000a1a: 807b strh r3, [r7, #2] /* Check the parameters */ assert_param(IS_GPIO_PIN(GPIO_Pin)); /* get current Ouput Data Register value */ odr = GPIOx->ODR; 8000a1c: 687b ldr r3, [r7, #4] 8000a1e: 68db ldr r3, [r3, #12] 8000a20: 60fb str r3, [r7, #12] /* Set selected pins that were at low level, and reset ones that were high */ GPIOx->BSRR = ((odr & GPIO_Pin) << GPIO_NUMBER) | (~odr & GPIO_Pin); 8000a22: 887a ldrh r2, [r7, #2] 8000a24: 68fb ldr r3, [r7, #12] 8000a26: 4013 ands r3, r2 8000a28: 041a lsls r2, r3, #16 8000a2a: 68fb ldr r3, [r7, #12] 8000a2c: 43d9 mvns r1, r3 8000a2e: 887b ldrh r3, [r7, #2] 8000a30: 400b ands r3, r1 8000a32: 431a orrs r2, r3 8000a34: 687b ldr r3, [r7, #4] 8000a36: 611a str r2, [r3, #16] } 8000a38: bf00 nop 8000a3a: 3714 adds r7, #20 8000a3c: 46bd mov sp, r7 8000a3e: bc80 pop {r7} 8000a40: 4770 bx lr 08000a42 <HAL_PCD_Init>: * 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) { 8000a42: b5f0 push {r4, r5, r6, r7, lr} 8000a44: b08b sub sp, #44 ; 0x2c 8000a46: af06 add r7, sp, #24 8000a48: 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) 8000a4a: 687b ldr r3, [r7, #4] 8000a4c: 2b00 cmp r3, #0 8000a4e: d101 bne.n 8000a54 <HAL_PCD_Init+0x12> { return HAL_ERROR; 8000a50: 2301 movs r3, #1 8000a52: e0fd b.n 8000c50 <HAL_PCD_Init+0x20e> #if defined (USB_OTG_FS) USBx = hpcd->Instance; #endif /* defined (USB_OTG_FS) */ if (hpcd->State == HAL_PCD_STATE_RESET) 8000a54: 687b ldr r3, [r7, #4] 8000a56: f893 32a9 ldrb.w r3, [r3, #681] ; 0x2a9 8000a5a: b2db uxtb r3, r3 8000a5c: 2b00 cmp r3, #0 8000a5e: d106 bne.n 8000a6e <HAL_PCD_Init+0x2c> { /* Allocate lock resource and initialize it */ hpcd->Lock = HAL_UNLOCKED; 8000a60: 687b ldr r3, [r7, #4] 8000a62: 2200 movs r2, #0 8000a64: 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); 8000a68: 6878 ldr r0, [r7, #4] 8000a6a: f006 fc91 bl 8007390 <HAL_PCD_MspInit> #endif /* (USE_HAL_PCD_REGISTER_CALLBACKS) */ } hpcd->State = HAL_PCD_STATE_BUSY; 8000a6e: 687b ldr r3, [r7, #4] 8000a70: 2203 movs r2, #3 8000a72: 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); 8000a76: 687b ldr r3, [r7, #4] 8000a78: 681b ldr r3, [r3, #0] 8000a7a: 4618 mov r0, r3 8000a7c: f002 f968 bl 8002d50 <USB_DisableGlobalInt> /*Init the Core (common init.) */ if (USB_CoreInit(hpcd->Instance, hpcd->Init) != HAL_OK) 8000a80: 687b ldr r3, [r7, #4] 8000a82: 681b ldr r3, [r3, #0] 8000a84: 603b str r3, [r7, #0] 8000a86: 687e ldr r6, [r7, #4] 8000a88: 466d mov r5, sp 8000a8a: f106 0410 add.w r4, r6, #16 8000a8e: cc0f ldmia r4!, {r0, r1, r2, r3} 8000a90: c50f stmia r5!, {r0, r1, r2, r3} 8000a92: 6823 ldr r3, [r4, #0] 8000a94: 602b str r3, [r5, #0] 8000a96: 1d33 adds r3, r6, #4 8000a98: cb0e ldmia r3, {r1, r2, r3} 8000a9a: 6838 ldr r0, [r7, #0] 8000a9c: f002 f932 bl 8002d04 <USB_CoreInit> 8000aa0: 4603 mov r3, r0 8000aa2: 2b00 cmp r3, #0 8000aa4: d005 beq.n 8000ab2 <HAL_PCD_Init+0x70> { hpcd->State = HAL_PCD_STATE_ERROR; 8000aa6: 687b ldr r3, [r7, #4] 8000aa8: 2202 movs r2, #2 8000aaa: f883 22a9 strb.w r2, [r3, #681] ; 0x2a9 return HAL_ERROR; 8000aae: 2301 movs r3, #1 8000ab0: e0ce b.n 8000c50 <HAL_PCD_Init+0x20e> } /* Force Device Mode*/ (void)USB_SetCurrentMode(hpcd->Instance, USB_DEVICE_MODE); 8000ab2: 687b ldr r3, [r7, #4] 8000ab4: 681b ldr r3, [r3, #0] 8000ab6: 2100 movs r1, #0 8000ab8: 4618 mov r0, r3 8000aba: f002 f963 bl 8002d84 <USB_SetCurrentMode> /* Init endpoints structures */ for (i = 0U; i < hpcd->Init.dev_endpoints; i++) 8000abe: 2300 movs r3, #0 8000ac0: 73fb strb r3, [r7, #15] 8000ac2: e04c b.n 8000b5e <HAL_PCD_Init+0x11c> { /* Init ep structure */ hpcd->IN_ep[i].is_in = 1U; 8000ac4: 7bfb ldrb r3, [r7, #15] 8000ac6: 6879 ldr r1, [r7, #4] 8000ac8: 1c5a adds r2, r3, #1 8000aca: 4613 mov r3, r2 8000acc: 009b lsls r3, r3, #2 8000ace: 4413 add r3, r2 8000ad0: 00db lsls r3, r3, #3 8000ad2: 440b add r3, r1 8000ad4: 3301 adds r3, #1 8000ad6: 2201 movs r2, #1 8000ad8: 701a strb r2, [r3, #0] hpcd->IN_ep[i].num = i; 8000ada: 7bfb ldrb r3, [r7, #15] 8000adc: 6879 ldr r1, [r7, #4] 8000ade: 1c5a adds r2, r3, #1 8000ae0: 4613 mov r3, r2 8000ae2: 009b lsls r3, r3, #2 8000ae4: 4413 add r3, r2 8000ae6: 00db lsls r3, r3, #3 8000ae8: 440b add r3, r1 8000aea: 7bfa ldrb r2, [r7, #15] 8000aec: 701a strb r2, [r3, #0] hpcd->IN_ep[i].tx_fifo_num = i; 8000aee: 7bfa ldrb r2, [r7, #15] 8000af0: 7bfb ldrb r3, [r7, #15] 8000af2: b298 uxth r0, r3 8000af4: 6879 ldr r1, [r7, #4] 8000af6: 4613 mov r3, r2 8000af8: 009b lsls r3, r3, #2 8000afa: 4413 add r3, r2 8000afc: 00db lsls r3, r3, #3 8000afe: 440b add r3, r1 8000b00: 3336 adds r3, #54 ; 0x36 8000b02: 4602 mov r2, r0 8000b04: 801a strh r2, [r3, #0] /* Control until ep is activated */ hpcd->IN_ep[i].type = EP_TYPE_CTRL; 8000b06: 7bfb ldrb r3, [r7, #15] 8000b08: 6879 ldr r1, [r7, #4] 8000b0a: 1c5a adds r2, r3, #1 8000b0c: 4613 mov r3, r2 8000b0e: 009b lsls r3, r3, #2 8000b10: 4413 add r3, r2 8000b12: 00db lsls r3, r3, #3 8000b14: 440b add r3, r1 8000b16: 3303 adds r3, #3 8000b18: 2200 movs r2, #0 8000b1a: 701a strb r2, [r3, #0] hpcd->IN_ep[i].maxpacket = 0U; 8000b1c: 7bfa ldrb r2, [r7, #15] 8000b1e: 6879 ldr r1, [r7, #4] 8000b20: 4613 mov r3, r2 8000b22: 009b lsls r3, r3, #2 8000b24: 4413 add r3, r2 8000b26: 00db lsls r3, r3, #3 8000b28: 440b add r3, r1 8000b2a: 3338 adds r3, #56 ; 0x38 8000b2c: 2200 movs r2, #0 8000b2e: 601a str r2, [r3, #0] hpcd->IN_ep[i].xfer_buff = 0U; 8000b30: 7bfa ldrb r2, [r7, #15] 8000b32: 6879 ldr r1, [r7, #4] 8000b34: 4613 mov r3, r2 8000b36: 009b lsls r3, r3, #2 8000b38: 4413 add r3, r2 8000b3a: 00db lsls r3, r3, #3 8000b3c: 440b add r3, r1 8000b3e: 333c adds r3, #60 ; 0x3c 8000b40: 2200 movs r2, #0 8000b42: 601a str r2, [r3, #0] hpcd->IN_ep[i].xfer_len = 0U; 8000b44: 7bfa ldrb r2, [r7, #15] 8000b46: 6879 ldr r1, [r7, #4] 8000b48: 4613 mov r3, r2 8000b4a: 009b lsls r3, r3, #2 8000b4c: 4413 add r3, r2 8000b4e: 00db lsls r3, r3, #3 8000b50: 440b add r3, r1 8000b52: 3340 adds r3, #64 ; 0x40 8000b54: 2200 movs r2, #0 8000b56: 601a str r2, [r3, #0] for (i = 0U; i < hpcd->Init.dev_endpoints; i++) 8000b58: 7bfb ldrb r3, [r7, #15] 8000b5a: 3301 adds r3, #1 8000b5c: 73fb strb r3, [r7, #15] 8000b5e: 7bfa ldrb r2, [r7, #15] 8000b60: 687b ldr r3, [r7, #4] 8000b62: 685b ldr r3, [r3, #4] 8000b64: 429a cmp r2, r3 8000b66: d3ad bcc.n 8000ac4 <HAL_PCD_Init+0x82> } for (i = 0U; i < hpcd->Init.dev_endpoints; i++) 8000b68: 2300 movs r3, #0 8000b6a: 73fb strb r3, [r7, #15] 8000b6c: e044 b.n 8000bf8 <HAL_PCD_Init+0x1b6> { hpcd->OUT_ep[i].is_in = 0U; 8000b6e: 7bfa ldrb r2, [r7, #15] 8000b70: 6879 ldr r1, [r7, #4] 8000b72: 4613 mov r3, r2 8000b74: 009b lsls r3, r3, #2 8000b76: 4413 add r3, r2 8000b78: 00db lsls r3, r3, #3 8000b7a: 440b add r3, r1 8000b7c: f203 1369 addw r3, r3, #361 ; 0x169 8000b80: 2200 movs r2, #0 8000b82: 701a strb r2, [r3, #0] hpcd->OUT_ep[i].num = i; 8000b84: 7bfa ldrb r2, [r7, #15] 8000b86: 6879 ldr r1, [r7, #4] 8000b88: 4613 mov r3, r2 8000b8a: 009b lsls r3, r3, #2 8000b8c: 4413 add r3, r2 8000b8e: 00db lsls r3, r3, #3 8000b90: 440b add r3, r1 8000b92: f503 73b4 add.w r3, r3, #360 ; 0x168 8000b96: 7bfa ldrb r2, [r7, #15] 8000b98: 701a strb r2, [r3, #0] /* Control until ep is activated */ hpcd->OUT_ep[i].type = EP_TYPE_CTRL; 8000b9a: 7bfa ldrb r2, [r7, #15] 8000b9c: 6879 ldr r1, [r7, #4] 8000b9e: 4613 mov r3, r2 8000ba0: 009b lsls r3, r3, #2 8000ba2: 4413 add r3, r2 8000ba4: 00db lsls r3, r3, #3 8000ba6: 440b add r3, r1 8000ba8: f203 136b addw r3, r3, #363 ; 0x16b 8000bac: 2200 movs r2, #0 8000bae: 701a strb r2, [r3, #0] hpcd->OUT_ep[i].maxpacket = 0U; 8000bb0: 7bfa ldrb r2, [r7, #15] 8000bb2: 6879 ldr r1, [r7, #4] 8000bb4: 4613 mov r3, r2 8000bb6: 009b lsls r3, r3, #2 8000bb8: 4413 add r3, r2 8000bba: 00db lsls r3, r3, #3 8000bbc: 440b add r3, r1 8000bbe: f503 73bc add.w r3, r3, #376 ; 0x178 8000bc2: 2200 movs r2, #0 8000bc4: 601a str r2, [r3, #0] hpcd->OUT_ep[i].xfer_buff = 0U; 8000bc6: 7bfa ldrb r2, [r7, #15] 8000bc8: 6879 ldr r1, [r7, #4] 8000bca: 4613 mov r3, r2 8000bcc: 009b lsls r3, r3, #2 8000bce: 4413 add r3, r2 8000bd0: 00db lsls r3, r3, #3 8000bd2: 440b add r3, r1 8000bd4: f503 73be add.w r3, r3, #380 ; 0x17c 8000bd8: 2200 movs r2, #0 8000bda: 601a str r2, [r3, #0] hpcd->OUT_ep[i].xfer_len = 0U; 8000bdc: 7bfa ldrb r2, [r7, #15] 8000bde: 6879 ldr r1, [r7, #4] 8000be0: 4613 mov r3, r2 8000be2: 009b lsls r3, r3, #2 8000be4: 4413 add r3, r2 8000be6: 00db lsls r3, r3, #3 8000be8: 440b add r3, r1 8000bea: f503 73c0 add.w r3, r3, #384 ; 0x180 8000bee: 2200 movs r2, #0 8000bf0: 601a str r2, [r3, #0] for (i = 0U; i < hpcd->Init.dev_endpoints; i++) 8000bf2: 7bfb ldrb r3, [r7, #15] 8000bf4: 3301 adds r3, #1 8000bf6: 73fb strb r3, [r7, #15] 8000bf8: 7bfa ldrb r2, [r7, #15] 8000bfa: 687b ldr r3, [r7, #4] 8000bfc: 685b ldr r3, [r3, #4] 8000bfe: 429a cmp r2, r3 8000c00: d3b5 bcc.n 8000b6e <HAL_PCD_Init+0x12c> } /* Init Device */ if (USB_DevInit(hpcd->Instance, hpcd->Init) != HAL_OK) 8000c02: 687b ldr r3, [r7, #4] 8000c04: 681b ldr r3, [r3, #0] 8000c06: 603b str r3, [r7, #0] 8000c08: 687e ldr r6, [r7, #4] 8000c0a: 466d mov r5, sp 8000c0c: f106 0410 add.w r4, r6, #16 8000c10: cc0f ldmia r4!, {r0, r1, r2, r3} 8000c12: c50f stmia r5!, {r0, r1, r2, r3} 8000c14: 6823 ldr r3, [r4, #0] 8000c16: 602b str r3, [r5, #0] 8000c18: 1d33 adds r3, r6, #4 8000c1a: cb0e ldmia r3, {r1, r2, r3} 8000c1c: 6838 ldr r0, [r7, #0] 8000c1e: f002 f8bd bl 8002d9c <USB_DevInit> 8000c22: 4603 mov r3, r0 8000c24: 2b00 cmp r3, #0 8000c26: d005 beq.n 8000c34 <HAL_PCD_Init+0x1f2> { hpcd->State = HAL_PCD_STATE_ERROR; 8000c28: 687b ldr r3, [r7, #4] 8000c2a: 2202 movs r2, #2 8000c2c: f883 22a9 strb.w r2, [r3, #681] ; 0x2a9 return HAL_ERROR; 8000c30: 2301 movs r3, #1 8000c32: e00d b.n 8000c50 <HAL_PCD_Init+0x20e> } hpcd->USB_Address = 0U; 8000c34: 687b ldr r3, [r7, #4] 8000c36: 2200 movs r2, #0 8000c38: f883 2024 strb.w r2, [r3, #36] ; 0x24 hpcd->State = HAL_PCD_STATE_READY; 8000c3c: 687b ldr r3, [r7, #4] 8000c3e: 2201 movs r2, #1 8000c40: f883 22a9 strb.w r2, [r3, #681] ; 0x2a9 (void)USB_DevDisconnect(hpcd->Instance); 8000c44: 687b ldr r3, [r7, #4] 8000c46: 681b ldr r3, [r3, #0] 8000c48: 4618 mov r0, r3 8000c4a: f004 fd6f bl 800572c <USB_DevDisconnect> return HAL_OK; 8000c4e: 2300 movs r3, #0 } 8000c50: 4618 mov r0, r3 8000c52: 3714 adds r7, #20 8000c54: 46bd mov sp, r7 8000c56: bdf0 pop {r4, r5, r6, r7, pc} 08000c58 <HAL_PCD_Start>: * @brief Start the USB device * @param hpcd PCD handle * @retval HAL status */ HAL_StatusTypeDef HAL_PCD_Start(PCD_HandleTypeDef *hpcd) { 8000c58: b580 push {r7, lr} 8000c5a: b082 sub sp, #8 8000c5c: af00 add r7, sp, #0 8000c5e: 6078 str r0, [r7, #4] __HAL_LOCK(hpcd); 8000c60: 687b ldr r3, [r7, #4] 8000c62: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 8000c66: 2b01 cmp r3, #1 8000c68: d101 bne.n 8000c6e <HAL_PCD_Start+0x16> 8000c6a: 2302 movs r3, #2 8000c6c: e016 b.n 8000c9c <HAL_PCD_Start+0x44> 8000c6e: 687b ldr r3, [r7, #4] 8000c70: 2201 movs r2, #1 8000c72: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 __HAL_PCD_ENABLE(hpcd); 8000c76: 687b ldr r3, [r7, #4] 8000c78: 681b ldr r3, [r3, #0] 8000c7a: 4618 mov r0, r3 8000c7c: f002 f852 bl 8002d24 <USB_EnableGlobalInt> #if defined (USB) HAL_PCDEx_SetConnectionState(hpcd, 1U); 8000c80: 2101 movs r1, #1 8000c82: 6878 ldr r0, [r7, #4] 8000c84: f006 fdf7 bl 8007876 <HAL_PCDEx_SetConnectionState> #endif /* defined (USB) */ (void)USB_DevConnect(hpcd->Instance); 8000c88: 687b ldr r3, [r7, #4] 8000c8a: 681b ldr r3, [r3, #0] 8000c8c: 4618 mov r0, r3 8000c8e: f004 fd43 bl 8005718 <USB_DevConnect> __HAL_UNLOCK(hpcd); 8000c92: 687b ldr r3, [r7, #4] 8000c94: 2200 movs r2, #0 8000c96: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 return HAL_OK; 8000c9a: 2300 movs r3, #0 } 8000c9c: 4618 mov r0, r3 8000c9e: 3708 adds r7, #8 8000ca0: 46bd mov sp, r7 8000ca2: bd80 pop {r7, pc} 08000ca4 <HAL_PCD_IRQHandler>: * @brief This function handles PCD interrupt request. * @param hpcd PCD handle * @retval HAL status */ void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd) { 8000ca4: b580 push {r7, lr} 8000ca6: b088 sub sp, #32 8000ca8: af00 add r7, sp, #0 8000caa: 6078 str r0, [r7, #4] uint16_t store_ep[8]; uint8_t i; if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_CTR)) 8000cac: 687b ldr r3, [r7, #4] 8000cae: 681b ldr r3, [r3, #0] 8000cb0: 4618 mov r0, r3 8000cb2: f004 fd45 bl 8005740 <USB_ReadInterrupts> 8000cb6: 4603 mov r3, r0 8000cb8: f403 4300 and.w r3, r3, #32768 ; 0x8000 8000cbc: f5b3 4f00 cmp.w r3, #32768 ; 0x8000 8000cc0: d102 bne.n 8000cc8 <HAL_PCD_IRQHandler+0x24> { /* servicing of the endpoint correct transfer interrupt */ /* clear of the CTR flag into the sub */ (void)PCD_EP_ISR_Handler(hpcd); 8000cc2: 6878 ldr r0, [r7, #4] 8000cc4: f000 fb5f bl 8001386 <PCD_EP_ISR_Handler> } if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_RESET)) 8000cc8: 687b ldr r3, [r7, #4] 8000cca: 681b ldr r3, [r3, #0] 8000ccc: 4618 mov r0, r3 8000cce: f004 fd37 bl 8005740 <USB_ReadInterrupts> 8000cd2: 4603 mov r3, r0 8000cd4: f403 6380 and.w r3, r3, #1024 ; 0x400 8000cd8: f5b3 6f80 cmp.w r3, #1024 ; 0x400 8000cdc: d112 bne.n 8000d04 <HAL_PCD_IRQHandler+0x60> { __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_RESET); 8000cde: 687b ldr r3, [r7, #4] 8000ce0: 681b ldr r3, [r3, #0] 8000ce2: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000ce6: b29a uxth r2, r3 8000ce8: 687b ldr r3, [r7, #4] 8000cea: 681b ldr r3, [r3, #0] 8000cec: f422 6280 bic.w r2, r2, #1024 ; 0x400 8000cf0: b292 uxth r2, r2 8000cf2: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->ResetCallback(hpcd); #else HAL_PCD_ResetCallback(hpcd); 8000cf6: 6878 ldr r0, [r7, #4] 8000cf8: f006 fbc5 bl 8007486 <HAL_PCD_ResetCallback> #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ (void)HAL_PCD_SetAddress(hpcd, 0U); 8000cfc: 2100 movs r1, #0 8000cfe: 6878 ldr r0, [r7, #4] 8000d00: f000 f923 bl 8000f4a <HAL_PCD_SetAddress> } if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_PMAOVR)) 8000d04: 687b ldr r3, [r7, #4] 8000d06: 681b ldr r3, [r3, #0] 8000d08: 4618 mov r0, r3 8000d0a: f004 fd19 bl 8005740 <USB_ReadInterrupts> 8000d0e: 4603 mov r3, r0 8000d10: f403 4380 and.w r3, r3, #16384 ; 0x4000 8000d14: f5b3 4f80 cmp.w r3, #16384 ; 0x4000 8000d18: d10b bne.n 8000d32 <HAL_PCD_IRQHandler+0x8e> { __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_PMAOVR); 8000d1a: 687b ldr r3, [r7, #4] 8000d1c: 681b ldr r3, [r3, #0] 8000d1e: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000d22: b29a uxth r2, r3 8000d24: 687b ldr r3, [r7, #4] 8000d26: 681b ldr r3, [r3, #0] 8000d28: f422 4280 bic.w r2, r2, #16384 ; 0x4000 8000d2c: b292 uxth r2, r2 8000d2e: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 } if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_ERR)) 8000d32: 687b ldr r3, [r7, #4] 8000d34: 681b ldr r3, [r3, #0] 8000d36: 4618 mov r0, r3 8000d38: f004 fd02 bl 8005740 <USB_ReadInterrupts> 8000d3c: 4603 mov r3, r0 8000d3e: f403 5300 and.w r3, r3, #8192 ; 0x2000 8000d42: f5b3 5f00 cmp.w r3, #8192 ; 0x2000 8000d46: d10b bne.n 8000d60 <HAL_PCD_IRQHandler+0xbc> { __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_ERR); 8000d48: 687b ldr r3, [r7, #4] 8000d4a: 681b ldr r3, [r3, #0] 8000d4c: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000d50: b29a uxth r2, r3 8000d52: 687b ldr r3, [r7, #4] 8000d54: 681b ldr r3, [r3, #0] 8000d56: f422 5200 bic.w r2, r2, #8192 ; 0x2000 8000d5a: b292 uxth r2, r2 8000d5c: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 } if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_WKUP)) 8000d60: 687b ldr r3, [r7, #4] 8000d62: 681b ldr r3, [r3, #0] 8000d64: 4618 mov r0, r3 8000d66: f004 fceb bl 8005740 <USB_ReadInterrupts> 8000d6a: 4603 mov r3, r0 8000d6c: f403 5380 and.w r3, r3, #4096 ; 0x1000 8000d70: f5b3 5f80 cmp.w r3, #4096 ; 0x1000 8000d74: d126 bne.n 8000dc4 <HAL_PCD_IRQHandler+0x120> { hpcd->Instance->CNTR &= (uint16_t) ~(USB_CNTR_LP_MODE); 8000d76: 687b ldr r3, [r7, #4] 8000d78: 681b ldr r3, [r3, #0] 8000d7a: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40 8000d7e: b29a uxth r2, r3 8000d80: 687b ldr r3, [r7, #4] 8000d82: 681b ldr r3, [r3, #0] 8000d84: f022 0204 bic.w r2, r2, #4 8000d88: b292 uxth r2, r2 8000d8a: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 hpcd->Instance->CNTR &= (uint16_t) ~(USB_CNTR_FSUSP); 8000d8e: 687b ldr r3, [r7, #4] 8000d90: 681b ldr r3, [r3, #0] 8000d92: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40 8000d96: b29a uxth r2, r3 8000d98: 687b ldr r3, [r7, #4] 8000d9a: 681b ldr r3, [r3, #0] 8000d9c: f022 0208 bic.w r2, r2, #8 8000da0: b292 uxth r2, r2 8000da2: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->ResumeCallback(hpcd); #else HAL_PCD_ResumeCallback(hpcd); 8000da6: 6878 ldr r0, [r7, #4] 8000da8: f006 fba6 bl 80074f8 <HAL_PCD_ResumeCallback> #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_WKUP); 8000dac: 687b ldr r3, [r7, #4] 8000dae: 681b ldr r3, [r3, #0] 8000db0: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000db4: b29a uxth r2, r3 8000db6: 687b ldr r3, [r7, #4] 8000db8: 681b ldr r3, [r3, #0] 8000dba: f422 5280 bic.w r2, r2, #4096 ; 0x1000 8000dbe: b292 uxth r2, r2 8000dc0: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 } if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_SUSP)) 8000dc4: 687b ldr r3, [r7, #4] 8000dc6: 681b ldr r3, [r3, #0] 8000dc8: 4618 mov r0, r3 8000dca: f004 fcb9 bl 8005740 <USB_ReadInterrupts> 8000dce: 4603 mov r3, r0 8000dd0: f403 6300 and.w r3, r3, #2048 ; 0x800 8000dd4: f5b3 6f00 cmp.w r3, #2048 ; 0x800 8000dd8: f040 8082 bne.w 8000ee0 <HAL_PCD_IRQHandler+0x23c> { /* WA: To Clear Wakeup flag if raised with suspend signal */ /* Store Endpoint register */ for (i = 0U; i < 8U; i++) 8000ddc: 2300 movs r3, #0 8000dde: 77fb strb r3, [r7, #31] 8000de0: e010 b.n 8000e04 <HAL_PCD_IRQHandler+0x160> { store_ep[i] = PCD_GET_ENDPOINT(hpcd->Instance, i); 8000de2: 687b ldr r3, [r7, #4] 8000de4: 681b ldr r3, [r3, #0] 8000de6: 461a mov r2, r3 8000de8: 7ffb ldrb r3, [r7, #31] 8000dea: 009b lsls r3, r3, #2 8000dec: 441a add r2, r3 8000dee: 7ffb ldrb r3, [r7, #31] 8000df0: 8812 ldrh r2, [r2, #0] 8000df2: b292 uxth r2, r2 8000df4: 005b lsls r3, r3, #1 8000df6: 3320 adds r3, #32 8000df8: 443b add r3, r7 8000dfa: f823 2c14 strh.w r2, [r3, #-20] for (i = 0U; i < 8U; i++) 8000dfe: 7ffb ldrb r3, [r7, #31] 8000e00: 3301 adds r3, #1 8000e02: 77fb strb r3, [r7, #31] 8000e04: 7ffb ldrb r3, [r7, #31] 8000e06: 2b07 cmp r3, #7 8000e08: d9eb bls.n 8000de2 <HAL_PCD_IRQHandler+0x13e> } /* FORCE RESET */ hpcd->Instance->CNTR |= (uint16_t)(USB_CNTR_FRES); 8000e0a: 687b ldr r3, [r7, #4] 8000e0c: 681b ldr r3, [r3, #0] 8000e0e: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40 8000e12: b29a uxth r2, r3 8000e14: 687b ldr r3, [r7, #4] 8000e16: 681b ldr r3, [r3, #0] 8000e18: f042 0201 orr.w r2, r2, #1 8000e1c: b292 uxth r2, r2 8000e1e: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 /* CLEAR RESET */ hpcd->Instance->CNTR &= (uint16_t)(~USB_CNTR_FRES); 8000e22: 687b ldr r3, [r7, #4] 8000e24: 681b ldr r3, [r3, #0] 8000e26: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40 8000e2a: b29a uxth r2, r3 8000e2c: 687b ldr r3, [r7, #4] 8000e2e: 681b ldr r3, [r3, #0] 8000e30: f022 0201 bic.w r2, r2, #1 8000e34: b292 uxth r2, r2 8000e36: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 /* wait for reset flag in ISTR */ while ((hpcd->Instance->ISTR & USB_ISTR_RESET) == 0U) 8000e3a: bf00 nop 8000e3c: 687b ldr r3, [r7, #4] 8000e3e: 681b ldr r3, [r3, #0] 8000e40: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000e44: b29b uxth r3, r3 8000e46: f403 6380 and.w r3, r3, #1024 ; 0x400 8000e4a: 2b00 cmp r3, #0 8000e4c: d0f6 beq.n 8000e3c <HAL_PCD_IRQHandler+0x198> { } /* Clear Reset Flag */ __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_RESET); 8000e4e: 687b ldr r3, [r7, #4] 8000e50: 681b ldr r3, [r3, #0] 8000e52: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000e56: b29a uxth r2, r3 8000e58: 687b ldr r3, [r7, #4] 8000e5a: 681b ldr r3, [r3, #0] 8000e5c: f422 6280 bic.w r2, r2, #1024 ; 0x400 8000e60: b292 uxth r2, r2 8000e62: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 /* Restore Registre */ for (i = 0U; i < 8U; i++) 8000e66: 2300 movs r3, #0 8000e68: 77fb strb r3, [r7, #31] 8000e6a: e00f b.n 8000e8c <HAL_PCD_IRQHandler+0x1e8> { PCD_SET_ENDPOINT(hpcd->Instance, i, store_ep[i]); 8000e6c: 7ffb ldrb r3, [r7, #31] 8000e6e: 687a ldr r2, [r7, #4] 8000e70: 6812 ldr r2, [r2, #0] 8000e72: 4611 mov r1, r2 8000e74: 7ffa ldrb r2, [r7, #31] 8000e76: 0092 lsls r2, r2, #2 8000e78: 440a add r2, r1 8000e7a: 005b lsls r3, r3, #1 8000e7c: 3320 adds r3, #32 8000e7e: 443b add r3, r7 8000e80: f833 3c14 ldrh.w r3, [r3, #-20] 8000e84: 8013 strh r3, [r2, #0] for (i = 0U; i < 8U; i++) 8000e86: 7ffb ldrb r3, [r7, #31] 8000e88: 3301 adds r3, #1 8000e8a: 77fb strb r3, [r7, #31] 8000e8c: 7ffb ldrb r3, [r7, #31] 8000e8e: 2b07 cmp r3, #7 8000e90: d9ec bls.n 8000e6c <HAL_PCD_IRQHandler+0x1c8> } /* Force low-power mode in the macrocell */ hpcd->Instance->CNTR |= (uint16_t)USB_CNTR_FSUSP; 8000e92: 687b ldr r3, [r7, #4] 8000e94: 681b ldr r3, [r3, #0] 8000e96: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40 8000e9a: b29a uxth r2, r3 8000e9c: 687b ldr r3, [r7, #4] 8000e9e: 681b ldr r3, [r3, #0] 8000ea0: f042 0208 orr.w r2, r2, #8 8000ea4: b292 uxth r2, r2 8000ea6: 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); 8000eaa: 687b ldr r3, [r7, #4] 8000eac: 681b ldr r3, [r3, #0] 8000eae: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000eb2: b29a uxth r2, r3 8000eb4: 687b ldr r3, [r7, #4] 8000eb6: 681b ldr r3, [r3, #0] 8000eb8: f422 6200 bic.w r2, r2, #2048 ; 0x800 8000ebc: b292 uxth r2, r2 8000ebe: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 hpcd->Instance->CNTR |= (uint16_t)USB_CNTR_LP_MODE; 8000ec2: 687b ldr r3, [r7, #4] 8000ec4: 681b ldr r3, [r3, #0] 8000ec6: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40 8000eca: b29a uxth r2, r3 8000ecc: 687b ldr r3, [r7, #4] 8000ece: 681b ldr r3, [r3, #0] 8000ed0: f042 0204 orr.w r2, r2, #4 8000ed4: b292 uxth r2, r2 8000ed6: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->SuspendCallback(hpcd); #else HAL_PCD_SuspendCallback(hpcd); 8000eda: 6878 ldr r0, [r7, #4] 8000edc: f006 faf2 bl 80074c4 <HAL_PCD_SuspendCallback> #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_SOF)) 8000ee0: 687b ldr r3, [r7, #4] 8000ee2: 681b ldr r3, [r3, #0] 8000ee4: 4618 mov r0, r3 8000ee6: f004 fc2b bl 8005740 <USB_ReadInterrupts> 8000eea: 4603 mov r3, r0 8000eec: f403 7300 and.w r3, r3, #512 ; 0x200 8000ef0: f5b3 7f00 cmp.w r3, #512 ; 0x200 8000ef4: d10e bne.n 8000f14 <HAL_PCD_IRQHandler+0x270> { __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_SOF); 8000ef6: 687b ldr r3, [r7, #4] 8000ef8: 681b ldr r3, [r3, #0] 8000efa: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000efe: b29a uxth r2, r3 8000f00: 687b ldr r3, [r7, #4] 8000f02: 681b ldr r3, [r3, #0] 8000f04: f422 7200 bic.w r2, r2, #512 ; 0x200 8000f08: b292 uxth r2, r2 8000f0a: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->SOFCallback(hpcd); #else HAL_PCD_SOFCallback(hpcd); 8000f0e: 6878 ldr r0, [r7, #4] 8000f10: f006 faab bl 800746a <HAL_PCD_SOFCallback> #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_ESOF)) 8000f14: 687b ldr r3, [r7, #4] 8000f16: 681b ldr r3, [r3, #0] 8000f18: 4618 mov r0, r3 8000f1a: f004 fc11 bl 8005740 <USB_ReadInterrupts> 8000f1e: 4603 mov r3, r0 8000f20: f403 7380 and.w r3, r3, #256 ; 0x100 8000f24: f5b3 7f80 cmp.w r3, #256 ; 0x100 8000f28: d10b bne.n 8000f42 <HAL_PCD_IRQHandler+0x29e> { /* clear ESOF flag in ISTR */ __HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_ESOF); 8000f2a: 687b ldr r3, [r7, #4] 8000f2c: 681b ldr r3, [r3, #0] 8000f2e: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8000f32: b29a uxth r2, r3 8000f34: 687b ldr r3, [r7, #4] 8000f36: 681b ldr r3, [r3, #0] 8000f38: f422 7280 bic.w r2, r2, #256 ; 0x100 8000f3c: b292 uxth r2, r2 8000f3e: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 } } 8000f42: bf00 nop 8000f44: 3720 adds r7, #32 8000f46: 46bd mov sp, r7 8000f48: bd80 pop {r7, pc} 08000f4a <HAL_PCD_SetAddress>: * @param hpcd PCD handle * @param address new device address * @retval HAL status */ HAL_StatusTypeDef HAL_PCD_SetAddress(PCD_HandleTypeDef *hpcd, uint8_t address) { 8000f4a: b580 push {r7, lr} 8000f4c: b082 sub sp, #8 8000f4e: af00 add r7, sp, #0 8000f50: 6078 str r0, [r7, #4] 8000f52: 460b mov r3, r1 8000f54: 70fb strb r3, [r7, #3] __HAL_LOCK(hpcd); 8000f56: 687b ldr r3, [r7, #4] 8000f58: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 8000f5c: 2b01 cmp r3, #1 8000f5e: d101 bne.n 8000f64 <HAL_PCD_SetAddress+0x1a> 8000f60: 2302 movs r3, #2 8000f62: e013 b.n 8000f8c <HAL_PCD_SetAddress+0x42> 8000f64: 687b ldr r3, [r7, #4] 8000f66: 2201 movs r2, #1 8000f68: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 hpcd->USB_Address = address; 8000f6c: 687b ldr r3, [r7, #4] 8000f6e: 78fa ldrb r2, [r7, #3] 8000f70: f883 2024 strb.w r2, [r3, #36] ; 0x24 (void)USB_SetDevAddress(hpcd->Instance, address); 8000f74: 687b ldr r3, [r7, #4] 8000f76: 681b ldr r3, [r3, #0] 8000f78: 78fa ldrb r2, [r7, #3] 8000f7a: 4611 mov r1, r2 8000f7c: 4618 mov r0, r3 8000f7e: f004 fbb8 bl 80056f2 <USB_SetDevAddress> __HAL_UNLOCK(hpcd); 8000f82: 687b ldr r3, [r7, #4] 8000f84: 2200 movs r2, #0 8000f86: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 return HAL_OK; 8000f8a: 2300 movs r3, #0 } 8000f8c: 4618 mov r0, r3 8000f8e: 3708 adds r7, #8 8000f90: 46bd mov sp, r7 8000f92: bd80 pop {r7, pc} 08000f94 <HAL_PCD_EP_Open>: * @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) { 8000f94: b580 push {r7, lr} 8000f96: b084 sub sp, #16 8000f98: af00 add r7, sp, #0 8000f9a: 6078 str r0, [r7, #4] 8000f9c: 4608 mov r0, r1 8000f9e: 4611 mov r1, r2 8000fa0: 461a mov r2, r3 8000fa2: 4603 mov r3, r0 8000fa4: 70fb strb r3, [r7, #3] 8000fa6: 460b mov r3, r1 8000fa8: 803b strh r3, [r7, #0] 8000faa: 4613 mov r3, r2 8000fac: 70bb strb r3, [r7, #2] HAL_StatusTypeDef ret = HAL_OK; 8000fae: 2300 movs r3, #0 8000fb0: 72fb strb r3, [r7, #11] PCD_EPTypeDef *ep; if ((ep_addr & 0x80U) == 0x80U) 8000fb2: f997 3003 ldrsb.w r3, [r7, #3] 8000fb6: 2b00 cmp r3, #0 8000fb8: da0e bge.n 8000fd8 <HAL_PCD_EP_Open+0x44> { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 8000fba: 78fb ldrb r3, [r7, #3] 8000fbc: f003 0307 and.w r3, r3, #7 8000fc0: 1c5a adds r2, r3, #1 8000fc2: 4613 mov r3, r2 8000fc4: 009b lsls r3, r3, #2 8000fc6: 4413 add r3, r2 8000fc8: 00db lsls r3, r3, #3 8000fca: 687a ldr r2, [r7, #4] 8000fcc: 4413 add r3, r2 8000fce: 60fb str r3, [r7, #12] ep->is_in = 1U; 8000fd0: 68fb ldr r3, [r7, #12] 8000fd2: 2201 movs r2, #1 8000fd4: 705a strb r2, [r3, #1] 8000fd6: e00e b.n 8000ff6 <HAL_PCD_EP_Open+0x62> } else { ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK]; 8000fd8: 78fb ldrb r3, [r7, #3] 8000fda: f003 0207 and.w r2, r3, #7 8000fde: 4613 mov r3, r2 8000fe0: 009b lsls r3, r3, #2 8000fe2: 4413 add r3, r2 8000fe4: 00db lsls r3, r3, #3 8000fe6: f503 73b4 add.w r3, r3, #360 ; 0x168 8000fea: 687a ldr r2, [r7, #4] 8000fec: 4413 add r3, r2 8000fee: 60fb str r3, [r7, #12] ep->is_in = 0U; 8000ff0: 68fb ldr r3, [r7, #12] 8000ff2: 2200 movs r2, #0 8000ff4: 705a strb r2, [r3, #1] } ep->num = ep_addr & EP_ADDR_MSK; 8000ff6: 78fb ldrb r3, [r7, #3] 8000ff8: f003 0307 and.w r3, r3, #7 8000ffc: b2da uxtb r2, r3 8000ffe: 68fb ldr r3, [r7, #12] 8001000: 701a strb r2, [r3, #0] ep->maxpacket = ep_mps; 8001002: 883a ldrh r2, [r7, #0] 8001004: 68fb ldr r3, [r7, #12] 8001006: 611a str r2, [r3, #16] ep->type = ep_type; 8001008: 68fb ldr r3, [r7, #12] 800100a: 78ba ldrb r2, [r7, #2] 800100c: 70da strb r2, [r3, #3] if (ep->is_in != 0U) 800100e: 68fb ldr r3, [r7, #12] 8001010: 785b ldrb r3, [r3, #1] 8001012: 2b00 cmp r3, #0 8001014: d004 beq.n 8001020 <HAL_PCD_EP_Open+0x8c> { /* Assign a Tx FIFO */ ep->tx_fifo_num = ep->num; 8001016: 68fb ldr r3, [r7, #12] 8001018: 781b ldrb r3, [r3, #0] 800101a: b29a uxth r2, r3 800101c: 68fb ldr r3, [r7, #12] 800101e: 81da strh r2, [r3, #14] } /* Set initial data PID. */ if (ep_type == EP_TYPE_BULK) 8001020: 78bb ldrb r3, [r7, #2] 8001022: 2b02 cmp r3, #2 8001024: d102 bne.n 800102c <HAL_PCD_EP_Open+0x98> { ep->data_pid_start = 0U; 8001026: 68fb ldr r3, [r7, #12] 8001028: 2200 movs r2, #0 800102a: 711a strb r2, [r3, #4] } __HAL_LOCK(hpcd); 800102c: 687b ldr r3, [r7, #4] 800102e: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 8001032: 2b01 cmp r3, #1 8001034: d101 bne.n 800103a <HAL_PCD_EP_Open+0xa6> 8001036: 2302 movs r3, #2 8001038: e00e b.n 8001058 <HAL_PCD_EP_Open+0xc4> 800103a: 687b ldr r3, [r7, #4] 800103c: 2201 movs r2, #1 800103e: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 (void)USB_ActivateEndpoint(hpcd->Instance, ep); 8001042: 687b ldr r3, [r7, #4] 8001044: 681b ldr r3, [r3, #0] 8001046: 68f9 ldr r1, [r7, #12] 8001048: 4618 mov r0, r3 800104a: f001 fec7 bl 8002ddc <USB_ActivateEndpoint> __HAL_UNLOCK(hpcd); 800104e: 687b ldr r3, [r7, #4] 8001050: 2200 movs r2, #0 8001052: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 return ret; 8001056: 7afb ldrb r3, [r7, #11] } 8001058: 4618 mov r0, r3 800105a: 3710 adds r7, #16 800105c: 46bd mov sp, r7 800105e: bd80 pop {r7, pc} 08001060 <HAL_PCD_EP_Close>: * @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) { 8001060: b580 push {r7, lr} 8001062: b084 sub sp, #16 8001064: af00 add r7, sp, #0 8001066: 6078 str r0, [r7, #4] 8001068: 460b mov r3, r1 800106a: 70fb strb r3, [r7, #3] PCD_EPTypeDef *ep; if ((ep_addr & 0x80U) == 0x80U) 800106c: f997 3003 ldrsb.w r3, [r7, #3] 8001070: 2b00 cmp r3, #0 8001072: da0e bge.n 8001092 <HAL_PCD_EP_Close+0x32> { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 8001074: 78fb ldrb r3, [r7, #3] 8001076: f003 0307 and.w r3, r3, #7 800107a: 1c5a adds r2, r3, #1 800107c: 4613 mov r3, r2 800107e: 009b lsls r3, r3, #2 8001080: 4413 add r3, r2 8001082: 00db lsls r3, r3, #3 8001084: 687a ldr r2, [r7, #4] 8001086: 4413 add r3, r2 8001088: 60fb str r3, [r7, #12] ep->is_in = 1U; 800108a: 68fb ldr r3, [r7, #12] 800108c: 2201 movs r2, #1 800108e: 705a strb r2, [r3, #1] 8001090: e00e b.n 80010b0 <HAL_PCD_EP_Close+0x50> } else { ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK]; 8001092: 78fb ldrb r3, [r7, #3] 8001094: f003 0207 and.w r2, r3, #7 8001098: 4613 mov r3, r2 800109a: 009b lsls r3, r3, #2 800109c: 4413 add r3, r2 800109e: 00db lsls r3, r3, #3 80010a0: f503 73b4 add.w r3, r3, #360 ; 0x168 80010a4: 687a ldr r2, [r7, #4] 80010a6: 4413 add r3, r2 80010a8: 60fb str r3, [r7, #12] ep->is_in = 0U; 80010aa: 68fb ldr r3, [r7, #12] 80010ac: 2200 movs r2, #0 80010ae: 705a strb r2, [r3, #1] } ep->num = ep_addr & EP_ADDR_MSK; 80010b0: 78fb ldrb r3, [r7, #3] 80010b2: f003 0307 and.w r3, r3, #7 80010b6: b2da uxtb r2, r3 80010b8: 68fb ldr r3, [r7, #12] 80010ba: 701a strb r2, [r3, #0] __HAL_LOCK(hpcd); 80010bc: 687b ldr r3, [r7, #4] 80010be: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 80010c2: 2b01 cmp r3, #1 80010c4: d101 bne.n 80010ca <HAL_PCD_EP_Close+0x6a> 80010c6: 2302 movs r3, #2 80010c8: e00e b.n 80010e8 <HAL_PCD_EP_Close+0x88> 80010ca: 687b ldr r3, [r7, #4] 80010cc: 2201 movs r2, #1 80010ce: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 (void)USB_DeactivateEndpoint(hpcd->Instance, ep); 80010d2: 687b ldr r3, [r7, #4] 80010d4: 681b ldr r3, [r3, #0] 80010d6: 68f9 ldr r1, [r7, #12] 80010d8: 4618 mov r0, r3 80010da: f002 f9e9 bl 80034b0 <USB_DeactivateEndpoint> __HAL_UNLOCK(hpcd); 80010de: 687b ldr r3, [r7, #4] 80010e0: 2200 movs r2, #0 80010e2: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 return HAL_OK; 80010e6: 2300 movs r3, #0 } 80010e8: 4618 mov r0, r3 80010ea: 3710 adds r7, #16 80010ec: 46bd mov sp, r7 80010ee: bd80 pop {r7, pc} 080010f0 <HAL_PCD_EP_Receive>: * @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) { 80010f0: b580 push {r7, lr} 80010f2: b086 sub sp, #24 80010f4: af00 add r7, sp, #0 80010f6: 60f8 str r0, [r7, #12] 80010f8: 607a str r2, [r7, #4] 80010fa: 603b str r3, [r7, #0] 80010fc: 460b mov r3, r1 80010fe: 72fb strb r3, [r7, #11] PCD_EPTypeDef *ep; ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK]; 8001100: 7afb ldrb r3, [r7, #11] 8001102: f003 0207 and.w r2, r3, #7 8001106: 4613 mov r3, r2 8001108: 009b lsls r3, r3, #2 800110a: 4413 add r3, r2 800110c: 00db lsls r3, r3, #3 800110e: f503 73b4 add.w r3, r3, #360 ; 0x168 8001112: 68fa ldr r2, [r7, #12] 8001114: 4413 add r3, r2 8001116: 617b str r3, [r7, #20] /*setup and start the Xfer */ ep->xfer_buff = pBuf; 8001118: 697b ldr r3, [r7, #20] 800111a: 687a ldr r2, [r7, #4] 800111c: 615a str r2, [r3, #20] ep->xfer_len = len; 800111e: 697b ldr r3, [r7, #20] 8001120: 683a ldr r2, [r7, #0] 8001122: 619a str r2, [r3, #24] ep->xfer_count = 0U; 8001124: 697b ldr r3, [r7, #20] 8001126: 2200 movs r2, #0 8001128: 61da str r2, [r3, #28] ep->is_in = 0U; 800112a: 697b ldr r3, [r7, #20] 800112c: 2200 movs r2, #0 800112e: 705a strb r2, [r3, #1] ep->num = ep_addr & EP_ADDR_MSK; 8001130: 7afb ldrb r3, [r7, #11] 8001132: f003 0307 and.w r3, r3, #7 8001136: b2da uxtb r2, r3 8001138: 697b ldr r3, [r7, #20] 800113a: 701a strb r2, [r3, #0] if ((ep_addr & EP_ADDR_MSK) == 0U) 800113c: 7afb ldrb r3, [r7, #11] 800113e: f003 0307 and.w r3, r3, #7 8001142: 2b00 cmp r3, #0 8001144: d106 bne.n 8001154 <HAL_PCD_EP_Receive+0x64> { (void)USB_EP0StartXfer(hpcd->Instance, ep); 8001146: 68fb ldr r3, [r7, #12] 8001148: 681b ldr r3, [r3, #0] 800114a: 6979 ldr r1, [r7, #20] 800114c: 4618 mov r0, r3 800114e: f002 fb9b bl 8003888 <USB_EPStartXfer> 8001152: e005 b.n 8001160 <HAL_PCD_EP_Receive+0x70> } else { (void)USB_EPStartXfer(hpcd->Instance, ep); 8001154: 68fb ldr r3, [r7, #12] 8001156: 681b ldr r3, [r3, #0] 8001158: 6979 ldr r1, [r7, #20] 800115a: 4618 mov r0, r3 800115c: f002 fb94 bl 8003888 <USB_EPStartXfer> } return HAL_OK; 8001160: 2300 movs r3, #0 } 8001162: 4618 mov r0, r3 8001164: 3718 adds r7, #24 8001166: 46bd mov sp, r7 8001168: bd80 pop {r7, pc} 0800116a <HAL_PCD_EP_GetRxCount>: * @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) { 800116a: b480 push {r7} 800116c: b083 sub sp, #12 800116e: af00 add r7, sp, #0 8001170: 6078 str r0, [r7, #4] 8001172: 460b mov r3, r1 8001174: 70fb strb r3, [r7, #3] return hpcd->OUT_ep[ep_addr & EP_ADDR_MSK].xfer_count; 8001176: 78fb ldrb r3, [r7, #3] 8001178: f003 0207 and.w r2, r3, #7 800117c: 6879 ldr r1, [r7, #4] 800117e: 4613 mov r3, r2 8001180: 009b lsls r3, r3, #2 8001182: 4413 add r3, r2 8001184: 00db lsls r3, r3, #3 8001186: 440b add r3, r1 8001188: f503 73c2 add.w r3, r3, #388 ; 0x184 800118c: 681b ldr r3, [r3, #0] } 800118e: 4618 mov r0, r3 8001190: 370c adds r7, #12 8001192: 46bd mov sp, r7 8001194: bc80 pop {r7} 8001196: 4770 bx lr 08001198 <HAL_PCD_EP_Transmit>: * @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) { 8001198: b580 push {r7, lr} 800119a: b086 sub sp, #24 800119c: af00 add r7, sp, #0 800119e: 60f8 str r0, [r7, #12] 80011a0: 607a str r2, [r7, #4] 80011a2: 603b str r3, [r7, #0] 80011a4: 460b mov r3, r1 80011a6: 72fb strb r3, [r7, #11] PCD_EPTypeDef *ep; ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 80011a8: 7afb ldrb r3, [r7, #11] 80011aa: f003 0307 and.w r3, r3, #7 80011ae: 1c5a adds r2, r3, #1 80011b0: 4613 mov r3, r2 80011b2: 009b lsls r3, r3, #2 80011b4: 4413 add r3, r2 80011b6: 00db lsls r3, r3, #3 80011b8: 68fa ldr r2, [r7, #12] 80011ba: 4413 add r3, r2 80011bc: 617b str r3, [r7, #20] /*setup and start the Xfer */ ep->xfer_buff = pBuf; 80011be: 697b ldr r3, [r7, #20] 80011c0: 687a ldr r2, [r7, #4] 80011c2: 615a str r2, [r3, #20] ep->xfer_len = len; 80011c4: 697b ldr r3, [r7, #20] 80011c6: 683a ldr r2, [r7, #0] 80011c8: 619a str r2, [r3, #24] #if defined (USB) ep->xfer_fill_db = 1U; 80011ca: 697b ldr r3, [r7, #20] 80011cc: 2201 movs r2, #1 80011ce: f883 2024 strb.w r2, [r3, #36] ; 0x24 ep->xfer_len_db = len; 80011d2: 697b ldr r3, [r7, #20] 80011d4: 683a ldr r2, [r7, #0] 80011d6: 621a str r2, [r3, #32] #endif /* defined (USB) */ ep->xfer_count = 0U; 80011d8: 697b ldr r3, [r7, #20] 80011da: 2200 movs r2, #0 80011dc: 61da str r2, [r3, #28] ep->is_in = 1U; 80011de: 697b ldr r3, [r7, #20] 80011e0: 2201 movs r2, #1 80011e2: 705a strb r2, [r3, #1] ep->num = ep_addr & EP_ADDR_MSK; 80011e4: 7afb ldrb r3, [r7, #11] 80011e6: f003 0307 and.w r3, r3, #7 80011ea: b2da uxtb r2, r3 80011ec: 697b ldr r3, [r7, #20] 80011ee: 701a strb r2, [r3, #0] if ((ep_addr & EP_ADDR_MSK) == 0U) 80011f0: 7afb ldrb r3, [r7, #11] 80011f2: f003 0307 and.w r3, r3, #7 80011f6: 2b00 cmp r3, #0 80011f8: d106 bne.n 8001208 <HAL_PCD_EP_Transmit+0x70> { (void)USB_EP0StartXfer(hpcd->Instance, ep); 80011fa: 68fb ldr r3, [r7, #12] 80011fc: 681b ldr r3, [r3, #0] 80011fe: 6979 ldr r1, [r7, #20] 8001200: 4618 mov r0, r3 8001202: f002 fb41 bl 8003888 <USB_EPStartXfer> 8001206: e005 b.n 8001214 <HAL_PCD_EP_Transmit+0x7c> } else { (void)USB_EPStartXfer(hpcd->Instance, ep); 8001208: 68fb ldr r3, [r7, #12] 800120a: 681b ldr r3, [r3, #0] 800120c: 6979 ldr r1, [r7, #20] 800120e: 4618 mov r0, r3 8001210: f002 fb3a bl 8003888 <USB_EPStartXfer> } return HAL_OK; 8001214: 2300 movs r3, #0 } 8001216: 4618 mov r0, r3 8001218: 3718 adds r7, #24 800121a: 46bd mov sp, r7 800121c: bd80 pop {r7, pc} 0800121e <HAL_PCD_EP_SetStall>: * @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) { 800121e: b580 push {r7, lr} 8001220: b084 sub sp, #16 8001222: af00 add r7, sp, #0 8001224: 6078 str r0, [r7, #4] 8001226: 460b mov r3, r1 8001228: 70fb strb r3, [r7, #3] PCD_EPTypeDef *ep; if (((uint32_t)ep_addr & EP_ADDR_MSK) > hpcd->Init.dev_endpoints) 800122a: 78fb ldrb r3, [r7, #3] 800122c: f003 0207 and.w r2, r3, #7 8001230: 687b ldr r3, [r7, #4] 8001232: 685b ldr r3, [r3, #4] 8001234: 429a cmp r2, r3 8001236: d901 bls.n 800123c <HAL_PCD_EP_SetStall+0x1e> { return HAL_ERROR; 8001238: 2301 movs r3, #1 800123a: e04c b.n 80012d6 <HAL_PCD_EP_SetStall+0xb8> } if ((0x80U & ep_addr) == 0x80U) 800123c: f997 3003 ldrsb.w r3, [r7, #3] 8001240: 2b00 cmp r3, #0 8001242: da0e bge.n 8001262 <HAL_PCD_EP_SetStall+0x44> { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 8001244: 78fb ldrb r3, [r7, #3] 8001246: f003 0307 and.w r3, r3, #7 800124a: 1c5a adds r2, r3, #1 800124c: 4613 mov r3, r2 800124e: 009b lsls r3, r3, #2 8001250: 4413 add r3, r2 8001252: 00db lsls r3, r3, #3 8001254: 687a ldr r2, [r7, #4] 8001256: 4413 add r3, r2 8001258: 60fb str r3, [r7, #12] ep->is_in = 1U; 800125a: 68fb ldr r3, [r7, #12] 800125c: 2201 movs r2, #1 800125e: 705a strb r2, [r3, #1] 8001260: e00c b.n 800127c <HAL_PCD_EP_SetStall+0x5e> } else { ep = &hpcd->OUT_ep[ep_addr]; 8001262: 78fa ldrb r2, [r7, #3] 8001264: 4613 mov r3, r2 8001266: 009b lsls r3, r3, #2 8001268: 4413 add r3, r2 800126a: 00db lsls r3, r3, #3 800126c: f503 73b4 add.w r3, r3, #360 ; 0x168 8001270: 687a ldr r2, [r7, #4] 8001272: 4413 add r3, r2 8001274: 60fb str r3, [r7, #12] ep->is_in = 0U; 8001276: 68fb ldr r3, [r7, #12] 8001278: 2200 movs r2, #0 800127a: 705a strb r2, [r3, #1] } ep->is_stall = 1U; 800127c: 68fb ldr r3, [r7, #12] 800127e: 2201 movs r2, #1 8001280: 709a strb r2, [r3, #2] ep->num = ep_addr & EP_ADDR_MSK; 8001282: 78fb ldrb r3, [r7, #3] 8001284: f003 0307 and.w r3, r3, #7 8001288: b2da uxtb r2, r3 800128a: 68fb ldr r3, [r7, #12] 800128c: 701a strb r2, [r3, #0] __HAL_LOCK(hpcd); 800128e: 687b ldr r3, [r7, #4] 8001290: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 8001294: 2b01 cmp r3, #1 8001296: d101 bne.n 800129c <HAL_PCD_EP_SetStall+0x7e> 8001298: 2302 movs r3, #2 800129a: e01c b.n 80012d6 <HAL_PCD_EP_SetStall+0xb8> 800129c: 687b ldr r3, [r7, #4] 800129e: 2201 movs r2, #1 80012a0: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 (void)USB_EPSetStall(hpcd->Instance, ep); 80012a4: 687b ldr r3, [r7, #4] 80012a6: 681b ldr r3, [r3, #0] 80012a8: 68f9 ldr r1, [r7, #12] 80012aa: 4618 mov r0, r3 80012ac: f004 f924 bl 80054f8 <USB_EPSetStall> if ((ep_addr & EP_ADDR_MSK) == 0U) 80012b0: 78fb ldrb r3, [r7, #3] 80012b2: f003 0307 and.w r3, r3, #7 80012b6: 2b00 cmp r3, #0 80012b8: d108 bne.n 80012cc <HAL_PCD_EP_SetStall+0xae> { (void)USB_EP0_OutStart(hpcd->Instance, (uint8_t *)hpcd->Setup); 80012ba: 687b ldr r3, [r7, #4] 80012bc: 681a ldr r2, [r3, #0] 80012be: 687b ldr r3, [r7, #4] 80012c0: f503 732c add.w r3, r3, #688 ; 0x2b0 80012c4: 4619 mov r1, r3 80012c6: 4610 mov r0, r2 80012c8: f004 fa49 bl 800575e <USB_EP0_OutStart> } __HAL_UNLOCK(hpcd); 80012cc: 687b ldr r3, [r7, #4] 80012ce: 2200 movs r2, #0 80012d0: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 return HAL_OK; 80012d4: 2300 movs r3, #0 } 80012d6: 4618 mov r0, r3 80012d8: 3710 adds r7, #16 80012da: 46bd mov sp, r7 80012dc: bd80 pop {r7, pc} 080012de <HAL_PCD_EP_ClrStall>: * @param hpcd PCD handle * @param ep_addr endpoint address * @retval HAL status */ HAL_StatusTypeDef HAL_PCD_EP_ClrStall(PCD_HandleTypeDef *hpcd, uint8_t ep_addr) { 80012de: b580 push {r7, lr} 80012e0: b084 sub sp, #16 80012e2: af00 add r7, sp, #0 80012e4: 6078 str r0, [r7, #4] 80012e6: 460b mov r3, r1 80012e8: 70fb strb r3, [r7, #3] PCD_EPTypeDef *ep; if (((uint32_t)ep_addr & 0x0FU) > hpcd->Init.dev_endpoints) 80012ea: 78fb ldrb r3, [r7, #3] 80012ec: f003 020f and.w r2, r3, #15 80012f0: 687b ldr r3, [r7, #4] 80012f2: 685b ldr r3, [r3, #4] 80012f4: 429a cmp r2, r3 80012f6: d901 bls.n 80012fc <HAL_PCD_EP_ClrStall+0x1e> { return HAL_ERROR; 80012f8: 2301 movs r3, #1 80012fa: e040 b.n 800137e <HAL_PCD_EP_ClrStall+0xa0> } if ((0x80U & ep_addr) == 0x80U) 80012fc: f997 3003 ldrsb.w r3, [r7, #3] 8001300: 2b00 cmp r3, #0 8001302: da0e bge.n 8001322 <HAL_PCD_EP_ClrStall+0x44> { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 8001304: 78fb ldrb r3, [r7, #3] 8001306: f003 0307 and.w r3, r3, #7 800130a: 1c5a adds r2, r3, #1 800130c: 4613 mov r3, r2 800130e: 009b lsls r3, r3, #2 8001310: 4413 add r3, r2 8001312: 00db lsls r3, r3, #3 8001314: 687a ldr r2, [r7, #4] 8001316: 4413 add r3, r2 8001318: 60fb str r3, [r7, #12] ep->is_in = 1U; 800131a: 68fb ldr r3, [r7, #12] 800131c: 2201 movs r2, #1 800131e: 705a strb r2, [r3, #1] 8001320: e00e b.n 8001340 <HAL_PCD_EP_ClrStall+0x62> } else { ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK]; 8001322: 78fb ldrb r3, [r7, #3] 8001324: f003 0207 and.w r2, r3, #7 8001328: 4613 mov r3, r2 800132a: 009b lsls r3, r3, #2 800132c: 4413 add r3, r2 800132e: 00db lsls r3, r3, #3 8001330: f503 73b4 add.w r3, r3, #360 ; 0x168 8001334: 687a ldr r2, [r7, #4] 8001336: 4413 add r3, r2 8001338: 60fb str r3, [r7, #12] ep->is_in = 0U; 800133a: 68fb ldr r3, [r7, #12] 800133c: 2200 movs r2, #0 800133e: 705a strb r2, [r3, #1] } ep->is_stall = 0U; 8001340: 68fb ldr r3, [r7, #12] 8001342: 2200 movs r2, #0 8001344: 709a strb r2, [r3, #2] ep->num = ep_addr & EP_ADDR_MSK; 8001346: 78fb ldrb r3, [r7, #3] 8001348: f003 0307 and.w r3, r3, #7 800134c: b2da uxtb r2, r3 800134e: 68fb ldr r3, [r7, #12] 8001350: 701a strb r2, [r3, #0] __HAL_LOCK(hpcd); 8001352: 687b ldr r3, [r7, #4] 8001354: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 8001358: 2b01 cmp r3, #1 800135a: d101 bne.n 8001360 <HAL_PCD_EP_ClrStall+0x82> 800135c: 2302 movs r3, #2 800135e: e00e b.n 800137e <HAL_PCD_EP_ClrStall+0xa0> 8001360: 687b ldr r3, [r7, #4] 8001362: 2201 movs r2, #1 8001364: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 (void)USB_EPClearStall(hpcd->Instance, ep); 8001368: 687b ldr r3, [r7, #4] 800136a: 681b ldr r3, [r3, #0] 800136c: 68f9 ldr r1, [r7, #12] 800136e: 4618 mov r0, r3 8001370: f004 f912 bl 8005598 <USB_EPClearStall> __HAL_UNLOCK(hpcd); 8001374: 687b ldr r3, [r7, #4] 8001376: 2200 movs r2, #0 8001378: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8 return HAL_OK; 800137c: 2300 movs r3, #0 } 800137e: 4618 mov r0, r3 8001380: 3710 adds r7, #16 8001382: 46bd mov sp, r7 8001384: bd80 pop {r7, pc} 08001386 <PCD_EP_ISR_Handler>: * @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) { 8001386: b580 push {r7, lr} 8001388: b08e sub sp, #56 ; 0x38 800138a: af00 add r7, sp, #0 800138c: 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) 800138e: e2ec b.n 800196a <PCD_EP_ISR_Handler+0x5e4> { wIstr = hpcd->Instance->ISTR; 8001390: 687b ldr r3, [r7, #4] 8001392: 681b ldr r3, [r3, #0] 8001394: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8001398: 85fb strh r3, [r7, #46] ; 0x2e /* extract highest priority endpoint number */ epindex = (uint8_t)(wIstr & USB_ISTR_EP_ID); 800139a: 8dfb ldrh r3, [r7, #46] ; 0x2e 800139c: b2db uxtb r3, r3 800139e: f003 030f and.w r3, r3, #15 80013a2: f887 302d strb.w r3, [r7, #45] ; 0x2d if (epindex == 0U) 80013a6: f897 302d ldrb.w r3, [r7, #45] ; 0x2d 80013aa: 2b00 cmp r3, #0 80013ac: f040 8161 bne.w 8001672 <PCD_EP_ISR_Handler+0x2ec> { /* Decode and service control endpoint interrupt */ /* DIR bit = origin of the interrupt */ if ((wIstr & USB_ISTR_DIR) == 0U) 80013b0: 8dfb ldrh r3, [r7, #46] ; 0x2e 80013b2: f003 0310 and.w r3, r3, #16 80013b6: 2b00 cmp r3, #0 80013b8: d152 bne.n 8001460 <PCD_EP_ISR_Handler+0xda> { /* DIR = 0 */ /* DIR = 0 => IN int */ /* DIR = 0 implies that (EP_CTR_TX = 1) always */ PCD_CLEAR_TX_EP_CTR(hpcd->Instance, PCD_ENDP0); 80013ba: 687b ldr r3, [r7, #4] 80013bc: 681b ldr r3, [r3, #0] 80013be: 881b ldrh r3, [r3, #0] 80013c0: b29b uxth r3, r3 80013c2: f423 43e1 bic.w r3, r3, #28800 ; 0x7080 80013c6: f023 0370 bic.w r3, r3, #112 ; 0x70 80013ca: 81fb strh r3, [r7, #14] 80013cc: 687b ldr r3, [r7, #4] 80013ce: 681a ldr r2, [r3, #0] 80013d0: 89fb ldrh r3, [r7, #14] 80013d2: ea6f 4343 mvn.w r3, r3, lsl #17 80013d6: ea6f 4353 mvn.w r3, r3, lsr #17 80013da: b29b uxth r3, r3 80013dc: 8013 strh r3, [r2, #0] ep = &hpcd->IN_ep[0]; 80013de: 687b ldr r3, [r7, #4] 80013e0: 3328 adds r3, #40 ; 0x28 80013e2: 627b str r3, [r7, #36] ; 0x24 ep->xfer_count = PCD_GET_EP_TX_CNT(hpcd->Instance, ep->num); 80013e4: 687b ldr r3, [r7, #4] 80013e6: 681b ldr r3, [r3, #0] 80013e8: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80013ec: b29b uxth r3, r3 80013ee: 461a mov r2, r3 80013f0: 6a7b ldr r3, [r7, #36] ; 0x24 80013f2: 781b ldrb r3, [r3, #0] 80013f4: 00db lsls r3, r3, #3 80013f6: 4413 add r3, r2 80013f8: 3302 adds r3, #2 80013fa: 005b lsls r3, r3, #1 80013fc: 687a ldr r2, [r7, #4] 80013fe: 6812 ldr r2, [r2, #0] 8001400: 4413 add r3, r2 8001402: f503 6380 add.w r3, r3, #1024 ; 0x400 8001406: 881b ldrh r3, [r3, #0] 8001408: f3c3 0209 ubfx r2, r3, #0, #10 800140c: 6a7b ldr r3, [r7, #36] ; 0x24 800140e: 61da str r2, [r3, #28] ep->xfer_buff += ep->xfer_count; 8001410: 6a7b ldr r3, [r7, #36] ; 0x24 8001412: 695a ldr r2, [r3, #20] 8001414: 6a7b ldr r3, [r7, #36] ; 0x24 8001416: 69db ldr r3, [r3, #28] 8001418: 441a add r2, r3 800141a: 6a7b ldr r3, [r7, #36] ; 0x24 800141c: 615a str r2, [r3, #20] /* TX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataInStageCallback(hpcd, 0U); #else HAL_PCD_DataInStageCallback(hpcd, 0U); 800141e: 2100 movs r1, #0 8001420: 6878 ldr r0, [r7, #4] 8001422: f006 f808 bl 8007436 <HAL_PCD_DataInStageCallback> #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ if ((hpcd->USB_Address > 0U) && (ep->xfer_len == 0U)) 8001426: 687b ldr r3, [r7, #4] 8001428: f893 3024 ldrb.w r3, [r3, #36] ; 0x24 800142c: b2db uxtb r3, r3 800142e: 2b00 cmp r3, #0 8001430: f000 829b beq.w 800196a <PCD_EP_ISR_Handler+0x5e4> 8001434: 6a7b ldr r3, [r7, #36] ; 0x24 8001436: 699b ldr r3, [r3, #24] 8001438: 2b00 cmp r3, #0 800143a: f040 8296 bne.w 800196a <PCD_EP_ISR_Handler+0x5e4> { hpcd->Instance->DADDR = ((uint16_t)hpcd->USB_Address | USB_DADDR_EF); 800143e: 687b ldr r3, [r7, #4] 8001440: f893 3024 ldrb.w r3, [r3, #36] ; 0x24 8001444: b2db uxtb r3, r3 8001446: f063 037f orn r3, r3, #127 ; 0x7f 800144a: b2da uxtb r2, r3 800144c: 687b ldr r3, [r7, #4] 800144e: 681b ldr r3, [r3, #0] 8001450: b292 uxth r2, r2 8001452: f8a3 204c strh.w r2, [r3, #76] ; 0x4c hpcd->USB_Address = 0U; 8001456: 687b ldr r3, [r7, #4] 8001458: 2200 movs r2, #0 800145a: f883 2024 strb.w r2, [r3, #36] ; 0x24 800145e: e284 b.n 800196a <PCD_EP_ISR_Handler+0x5e4> { /* DIR = 1 */ /* DIR = 1 & CTR_RX => SETUP or OUT int */ /* DIR = 1 & (CTR_TX | CTR_RX) => 2 int pending */ ep = &hpcd->OUT_ep[0]; 8001460: 687b ldr r3, [r7, #4] 8001462: f503 73b4 add.w r3, r3, #360 ; 0x168 8001466: 627b str r3, [r7, #36] ; 0x24 wEPVal = PCD_GET_ENDPOINT(hpcd->Instance, PCD_ENDP0); 8001468: 687b ldr r3, [r7, #4] 800146a: 681b ldr r3, [r3, #0] 800146c: 881b ldrh r3, [r3, #0] 800146e: 857b strh r3, [r7, #42] ; 0x2a if ((wEPVal & USB_EP_SETUP) != 0U) 8001470: 8d7b ldrh r3, [r7, #42] ; 0x2a 8001472: f403 6300 and.w r3, r3, #2048 ; 0x800 8001476: 2b00 cmp r3, #0 8001478: d034 beq.n 80014e4 <PCD_EP_ISR_Handler+0x15e> { /* Get SETUP Packet */ ep->xfer_count = PCD_GET_EP_RX_CNT(hpcd->Instance, ep->num); 800147a: 687b ldr r3, [r7, #4] 800147c: 681b ldr r3, [r3, #0] 800147e: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001482: b29b uxth r3, r3 8001484: 461a mov r2, r3 8001486: 6a7b ldr r3, [r7, #36] ; 0x24 8001488: 781b ldrb r3, [r3, #0] 800148a: 00db lsls r3, r3, #3 800148c: 4413 add r3, r2 800148e: 3306 adds r3, #6 8001490: 005b lsls r3, r3, #1 8001492: 687a ldr r2, [r7, #4] 8001494: 6812 ldr r2, [r2, #0] 8001496: 4413 add r3, r2 8001498: f503 6380 add.w r3, r3, #1024 ; 0x400 800149c: 881b ldrh r3, [r3, #0] 800149e: f3c3 0209 ubfx r2, r3, #0, #10 80014a2: 6a7b ldr r3, [r7, #36] ; 0x24 80014a4: 61da str r2, [r3, #28] USB_ReadPMA(hpcd->Instance, (uint8_t *)hpcd->Setup, 80014a6: 687b ldr r3, [r7, #4] 80014a8: 6818 ldr r0, [r3, #0] 80014aa: 687b ldr r3, [r7, #4] 80014ac: f503 712c add.w r1, r3, #688 ; 0x2b0 80014b0: 6a7b ldr r3, [r7, #36] ; 0x24 80014b2: 88da ldrh r2, [r3, #6] ep->pmaadress, (uint16_t)ep->xfer_count); 80014b4: 6a7b ldr r3, [r7, #36] ; 0x24 80014b6: 69db ldr r3, [r3, #28] USB_ReadPMA(hpcd->Instance, (uint8_t *)hpcd->Setup, 80014b8: b29b uxth r3, r3 80014ba: f004 f9a0 bl 80057fe <USB_ReadPMA> /* SETUP bit kept frozen while CTR_RX = 1 */ PCD_CLEAR_RX_EP_CTR(hpcd->Instance, PCD_ENDP0); 80014be: 687b ldr r3, [r7, #4] 80014c0: 681b ldr r3, [r3, #0] 80014c2: 881b ldrh r3, [r3, #0] 80014c4: b29a uxth r2, r3 80014c6: f640 738f movw r3, #3983 ; 0xf8f 80014ca: 4013 ands r3, r2 80014cc: 823b strh r3, [r7, #16] 80014ce: 687b ldr r3, [r7, #4] 80014d0: 681b ldr r3, [r3, #0] 80014d2: 8a3a ldrh r2, [r7, #16] 80014d4: f042 0280 orr.w r2, r2, #128 ; 0x80 80014d8: b292 uxth r2, r2 80014da: 801a strh r2, [r3, #0] /* Process SETUP Packet*/ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->SetupStageCallback(hpcd); #else HAL_PCD_SetupStageCallback(hpcd); 80014dc: 6878 ldr r0, [r7, #4] 80014de: f005 ff7d bl 80073dc <HAL_PCD_SetupStageCallback> 80014e2: e242 b.n 800196a <PCD_EP_ISR_Handler+0x5e4> #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } else if ((wEPVal & USB_EP_CTR_RX) != 0U) 80014e4: f9b7 302a ldrsh.w r3, [r7, #42] ; 0x2a 80014e8: 2b00 cmp r3, #0 80014ea: f280 823e bge.w 800196a <PCD_EP_ISR_Handler+0x5e4> { PCD_CLEAR_RX_EP_CTR(hpcd->Instance, PCD_ENDP0); 80014ee: 687b ldr r3, [r7, #4] 80014f0: 681b ldr r3, [r3, #0] 80014f2: 881b ldrh r3, [r3, #0] 80014f4: b29a uxth r2, r3 80014f6: f640 738f movw r3, #3983 ; 0xf8f 80014fa: 4013 ands r3, r2 80014fc: 83bb strh r3, [r7, #28] 80014fe: 687b ldr r3, [r7, #4] 8001500: 681b ldr r3, [r3, #0] 8001502: 8bba ldrh r2, [r7, #28] 8001504: f042 0280 orr.w r2, r2, #128 ; 0x80 8001508: b292 uxth r2, r2 800150a: 801a strh r2, [r3, #0] /* Get Control Data OUT Packet */ ep->xfer_count = PCD_GET_EP_RX_CNT(hpcd->Instance, ep->num); 800150c: 687b ldr r3, [r7, #4] 800150e: 681b ldr r3, [r3, #0] 8001510: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001514: b29b uxth r3, r3 8001516: 461a mov r2, r3 8001518: 6a7b ldr r3, [r7, #36] ; 0x24 800151a: 781b ldrb r3, [r3, #0] 800151c: 00db lsls r3, r3, #3 800151e: 4413 add r3, r2 8001520: 3306 adds r3, #6 8001522: 005b lsls r3, r3, #1 8001524: 687a ldr r2, [r7, #4] 8001526: 6812 ldr r2, [r2, #0] 8001528: 4413 add r3, r2 800152a: f503 6380 add.w r3, r3, #1024 ; 0x400 800152e: 881b ldrh r3, [r3, #0] 8001530: f3c3 0209 ubfx r2, r3, #0, #10 8001534: 6a7b ldr r3, [r7, #36] ; 0x24 8001536: 61da str r2, [r3, #28] if ((ep->xfer_count != 0U) && (ep->xfer_buff != 0U)) 8001538: 6a7b ldr r3, [r7, #36] ; 0x24 800153a: 69db ldr r3, [r3, #28] 800153c: 2b00 cmp r3, #0 800153e: d019 beq.n 8001574 <PCD_EP_ISR_Handler+0x1ee> 8001540: 6a7b ldr r3, [r7, #36] ; 0x24 8001542: 695b ldr r3, [r3, #20] 8001544: 2b00 cmp r3, #0 8001546: d015 beq.n 8001574 <PCD_EP_ISR_Handler+0x1ee> { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, 8001548: 687b ldr r3, [r7, #4] 800154a: 6818 ldr r0, [r3, #0] 800154c: 6a7b ldr r3, [r7, #36] ; 0x24 800154e: 6959 ldr r1, [r3, #20] 8001550: 6a7b ldr r3, [r7, #36] ; 0x24 8001552: 88da ldrh r2, [r3, #6] ep->pmaadress, (uint16_t)ep->xfer_count); 8001554: 6a7b ldr r3, [r7, #36] ; 0x24 8001556: 69db ldr r3, [r3, #28] USB_ReadPMA(hpcd->Instance, ep->xfer_buff, 8001558: b29b uxth r3, r3 800155a: f004 f950 bl 80057fe <USB_ReadPMA> ep->xfer_buff += ep->xfer_count; 800155e: 6a7b ldr r3, [r7, #36] ; 0x24 8001560: 695a ldr r2, [r3, #20] 8001562: 6a7b ldr r3, [r7, #36] ; 0x24 8001564: 69db ldr r3, [r3, #28] 8001566: 441a add r2, r3 8001568: 6a7b ldr r3, [r7, #36] ; 0x24 800156a: 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); 800156c: 2100 movs r1, #0 800156e: 6878 ldr r0, [r7, #4] 8001570: f005 ff46 bl 8007400 <HAL_PCD_DataOutStageCallback> #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } if ((PCD_GET_ENDPOINT(hpcd->Instance, PCD_ENDP0) & USB_EP_SETUP) == 0U) 8001574: 687b ldr r3, [r7, #4] 8001576: 681b ldr r3, [r3, #0] 8001578: 881b ldrh r3, [r3, #0] 800157a: b29b uxth r3, r3 800157c: f403 6300 and.w r3, r3, #2048 ; 0x800 8001580: 2b00 cmp r3, #0 8001582: f040 81f2 bne.w 800196a <PCD_EP_ISR_Handler+0x5e4> { PCD_SET_EP_RX_CNT(hpcd->Instance, PCD_ENDP0, ep->maxpacket); 8001586: 687b ldr r3, [r7, #4] 8001588: 681b ldr r3, [r3, #0] 800158a: 61bb str r3, [r7, #24] 800158c: 687b ldr r3, [r7, #4] 800158e: 681b ldr r3, [r3, #0] 8001590: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001594: b29b uxth r3, r3 8001596: 461a mov r2, r3 8001598: 69bb ldr r3, [r7, #24] 800159a: 4413 add r3, r2 800159c: 61bb str r3, [r7, #24] 800159e: 69bb ldr r3, [r7, #24] 80015a0: f203 430c addw r3, r3, #1036 ; 0x40c 80015a4: 617b str r3, [r7, #20] 80015a6: 6a7b ldr r3, [r7, #36] ; 0x24 80015a8: 691b ldr r3, [r3, #16] 80015aa: 2b00 cmp r3, #0 80015ac: d112 bne.n 80015d4 <PCD_EP_ISR_Handler+0x24e> 80015ae: 697b ldr r3, [r7, #20] 80015b0: 881b ldrh r3, [r3, #0] 80015b2: b29b uxth r3, r3 80015b4: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 80015b8: b29a uxth r2, r3 80015ba: 697b ldr r3, [r7, #20] 80015bc: 801a strh r2, [r3, #0] 80015be: 697b ldr r3, [r7, #20] 80015c0: 881b ldrh r3, [r3, #0] 80015c2: b29b uxth r3, r3 80015c4: ea6f 4343 mvn.w r3, r3, lsl #17 80015c8: ea6f 4353 mvn.w r3, r3, lsr #17 80015cc: b29a uxth r2, r3 80015ce: 697b ldr r3, [r7, #20] 80015d0: 801a strh r2, [r3, #0] 80015d2: e02f b.n 8001634 <PCD_EP_ISR_Handler+0x2ae> 80015d4: 6a7b ldr r3, [r7, #36] ; 0x24 80015d6: 691b ldr r3, [r3, #16] 80015d8: 2b3e cmp r3, #62 ; 0x3e 80015da: d813 bhi.n 8001604 <PCD_EP_ISR_Handler+0x27e> 80015dc: 6a7b ldr r3, [r7, #36] ; 0x24 80015de: 691b ldr r3, [r3, #16] 80015e0: 085b lsrs r3, r3, #1 80015e2: 633b str r3, [r7, #48] ; 0x30 80015e4: 6a7b ldr r3, [r7, #36] ; 0x24 80015e6: 691b ldr r3, [r3, #16] 80015e8: f003 0301 and.w r3, r3, #1 80015ec: 2b00 cmp r3, #0 80015ee: d002 beq.n 80015f6 <PCD_EP_ISR_Handler+0x270> 80015f0: 6b3b ldr r3, [r7, #48] ; 0x30 80015f2: 3301 adds r3, #1 80015f4: 633b str r3, [r7, #48] ; 0x30 80015f6: 6b3b ldr r3, [r7, #48] ; 0x30 80015f8: b29b uxth r3, r3 80015fa: 029b lsls r3, r3, #10 80015fc: b29a uxth r2, r3 80015fe: 697b ldr r3, [r7, #20] 8001600: 801a strh r2, [r3, #0] 8001602: e017 b.n 8001634 <PCD_EP_ISR_Handler+0x2ae> 8001604: 6a7b ldr r3, [r7, #36] ; 0x24 8001606: 691b ldr r3, [r3, #16] 8001608: 095b lsrs r3, r3, #5 800160a: 633b str r3, [r7, #48] ; 0x30 800160c: 6a7b ldr r3, [r7, #36] ; 0x24 800160e: 691b ldr r3, [r3, #16] 8001610: f003 031f and.w r3, r3, #31 8001614: 2b00 cmp r3, #0 8001616: d102 bne.n 800161e <PCD_EP_ISR_Handler+0x298> 8001618: 6b3b ldr r3, [r7, #48] ; 0x30 800161a: 3b01 subs r3, #1 800161c: 633b str r3, [r7, #48] ; 0x30 800161e: 6b3b ldr r3, [r7, #48] ; 0x30 8001620: b29b uxth r3, r3 8001622: 029b lsls r3, r3, #10 8001624: b29b uxth r3, r3 8001626: ea6f 4343 mvn.w r3, r3, lsl #17 800162a: ea6f 4353 mvn.w r3, r3, lsr #17 800162e: b29a uxth r2, r3 8001630: 697b ldr r3, [r7, #20] 8001632: 801a strh r2, [r3, #0] PCD_SET_EP_RX_STATUS(hpcd->Instance, PCD_ENDP0, USB_EP_RX_VALID); 8001634: 687b ldr r3, [r7, #4] 8001636: 681b ldr r3, [r3, #0] 8001638: 881b ldrh r3, [r3, #0] 800163a: b29b uxth r3, r3 800163c: f423 4380 bic.w r3, r3, #16384 ; 0x4000 8001640: f023 0370 bic.w r3, r3, #112 ; 0x70 8001644: 827b strh r3, [r7, #18] 8001646: 8a7b ldrh r3, [r7, #18] 8001648: f483 5380 eor.w r3, r3, #4096 ; 0x1000 800164c: 827b strh r3, [r7, #18] 800164e: 8a7b ldrh r3, [r7, #18] 8001650: f483 5300 eor.w r3, r3, #8192 ; 0x2000 8001654: 827b strh r3, [r7, #18] 8001656: 687b ldr r3, [r7, #4] 8001658: 681a ldr r2, [r3, #0] 800165a: 8a7b ldrh r3, [r7, #18] 800165c: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001660: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8001664: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8001668: f043 0380 orr.w r3, r3, #128 ; 0x80 800166c: b29b uxth r3, r3 800166e: 8013 strh r3, [r2, #0] 8001670: e17b b.n 800196a <PCD_EP_ISR_Handler+0x5e4> } else { /* Decode and service non control endpoints interrupt */ /* process related endpoint register */ wEPVal = PCD_GET_ENDPOINT(hpcd->Instance, epindex); 8001672: 687b ldr r3, [r7, #4] 8001674: 681b ldr r3, [r3, #0] 8001676: 461a mov r2, r3 8001678: f897 302d ldrb.w r3, [r7, #45] ; 0x2d 800167c: 009b lsls r3, r3, #2 800167e: 4413 add r3, r2 8001680: 881b ldrh r3, [r3, #0] 8001682: 857b strh r3, [r7, #42] ; 0x2a if ((wEPVal & USB_EP_CTR_RX) != 0U) 8001684: f9b7 302a ldrsh.w r3, [r7, #42] ; 0x2a 8001688: 2b00 cmp r3, #0 800168a: f280 80ea bge.w 8001862 <PCD_EP_ISR_Handler+0x4dc> { /* clear int flag */ PCD_CLEAR_RX_EP_CTR(hpcd->Instance, epindex); 800168e: 687b ldr r3, [r7, #4] 8001690: 681b ldr r3, [r3, #0] 8001692: 461a mov r2, r3 8001694: f897 302d ldrb.w r3, [r7, #45] ; 0x2d 8001698: 009b lsls r3, r3, #2 800169a: 4413 add r3, r2 800169c: 881b ldrh r3, [r3, #0] 800169e: b29a uxth r2, r3 80016a0: f640 738f movw r3, #3983 ; 0xf8f 80016a4: 4013 ands r3, r2 80016a6: 853b strh r3, [r7, #40] ; 0x28 80016a8: 687b ldr r3, [r7, #4] 80016aa: 681b ldr r3, [r3, #0] 80016ac: 461a mov r2, r3 80016ae: f897 302d ldrb.w r3, [r7, #45] ; 0x2d 80016b2: 009b lsls r3, r3, #2 80016b4: 4413 add r3, r2 80016b6: 8d3a ldrh r2, [r7, #40] ; 0x28 80016b8: f042 0280 orr.w r2, r2, #128 ; 0x80 80016bc: b292 uxth r2, r2 80016be: 801a strh r2, [r3, #0] ep = &hpcd->OUT_ep[epindex]; 80016c0: f897 202d ldrb.w r2, [r7, #45] ; 0x2d 80016c4: 4613 mov r3, r2 80016c6: 009b lsls r3, r3, #2 80016c8: 4413 add r3, r2 80016ca: 00db lsls r3, r3, #3 80016cc: f503 73b4 add.w r3, r3, #360 ; 0x168 80016d0: 687a ldr r2, [r7, #4] 80016d2: 4413 add r3, r2 80016d4: 627b str r3, [r7, #36] ; 0x24 /* OUT Single Buffering */ if (ep->doublebuffer == 0U) 80016d6: 6a7b ldr r3, [r7, #36] ; 0x24 80016d8: 7b1b ldrb r3, [r3, #12] 80016da: 2b00 cmp r3, #0 80016dc: d122 bne.n 8001724 <PCD_EP_ISR_Handler+0x39e> { count = (uint16_t)PCD_GET_EP_RX_CNT(hpcd->Instance, ep->num); 80016de: 687b ldr r3, [r7, #4] 80016e0: 681b ldr r3, [r3, #0] 80016e2: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80016e6: b29b uxth r3, r3 80016e8: 461a mov r2, r3 80016ea: 6a7b ldr r3, [r7, #36] ; 0x24 80016ec: 781b ldrb r3, [r3, #0] 80016ee: 00db lsls r3, r3, #3 80016f0: 4413 add r3, r2 80016f2: 3306 adds r3, #6 80016f4: 005b lsls r3, r3, #1 80016f6: 687a ldr r2, [r7, #4] 80016f8: 6812 ldr r2, [r2, #0] 80016fa: 4413 add r3, r2 80016fc: f503 6380 add.w r3, r3, #1024 ; 0x400 8001700: 881b ldrh r3, [r3, #0] 8001702: f3c3 0309 ubfx r3, r3, #0, #10 8001706: 86fb strh r3, [r7, #54] ; 0x36 if (count != 0U) 8001708: 8efb ldrh r3, [r7, #54] ; 0x36 800170a: 2b00 cmp r3, #0 800170c: f000 8087 beq.w 800181e <PCD_EP_ISR_Handler+0x498> { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaadress, count); 8001710: 687b ldr r3, [r7, #4] 8001712: 6818 ldr r0, [r3, #0] 8001714: 6a7b ldr r3, [r7, #36] ; 0x24 8001716: 6959 ldr r1, [r3, #20] 8001718: 6a7b ldr r3, [r7, #36] ; 0x24 800171a: 88da ldrh r2, [r3, #6] 800171c: 8efb ldrh r3, [r7, #54] ; 0x36 800171e: f004 f86e bl 80057fe <USB_ReadPMA> 8001722: e07c b.n 800181e <PCD_EP_ISR_Handler+0x498> } } else { /* manage double buffer bulk out */ if (ep->type == EP_TYPE_BULK) 8001724: 6a7b ldr r3, [r7, #36] ; 0x24 8001726: 78db ldrb r3, [r3, #3] 8001728: 2b02 cmp r3, #2 800172a: d108 bne.n 800173e <PCD_EP_ISR_Handler+0x3b8> { count = HAL_PCD_EP_DB_Receive(hpcd, ep, wEPVal); 800172c: 8d7b ldrh r3, [r7, #42] ; 0x2a 800172e: 461a mov r2, r3 8001730: 6a79 ldr r1, [r7, #36] ; 0x24 8001732: 6878 ldr r0, [r7, #4] 8001734: f000 f927 bl 8001986 <HAL_PCD_EP_DB_Receive> 8001738: 4603 mov r3, r0 800173a: 86fb strh r3, [r7, #54] ; 0x36 800173c: e06f b.n 800181e <PCD_EP_ISR_Handler+0x498> } else /* manage double buffer iso out */ { /* free EP OUT Buffer */ PCD_FreeUserBuffer(hpcd->Instance, ep->num, 0U); 800173e: 687b ldr r3, [r7, #4] 8001740: 681b ldr r3, [r3, #0] 8001742: 461a mov r2, r3 8001744: 6a7b ldr r3, [r7, #36] ; 0x24 8001746: 781b ldrb r3, [r3, #0] 8001748: 009b lsls r3, r3, #2 800174a: 4413 add r3, r2 800174c: 881b ldrh r3, [r3, #0] 800174e: b29b uxth r3, r3 8001750: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8001754: f023 0370 bic.w r3, r3, #112 ; 0x70 8001758: 847b strh r3, [r7, #34] ; 0x22 800175a: 687b ldr r3, [r7, #4] 800175c: 681b ldr r3, [r3, #0] 800175e: 461a mov r2, r3 8001760: 6a7b ldr r3, [r7, #36] ; 0x24 8001762: 781b ldrb r3, [r3, #0] 8001764: 009b lsls r3, r3, #2 8001766: 441a add r2, r3 8001768: 8c7b ldrh r3, [r7, #34] ; 0x22 800176a: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800176e: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8001772: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8001776: f043 03c0 orr.w r3, r3, #192 ; 0xc0 800177a: b29b uxth r3, r3 800177c: 8013 strh r3, [r2, #0] if ((PCD_GET_ENDPOINT(hpcd->Instance, ep->num) & USB_EP_DTOG_RX) != 0U) 800177e: 687b ldr r3, [r7, #4] 8001780: 681b ldr r3, [r3, #0] 8001782: 461a mov r2, r3 8001784: 6a7b ldr r3, [r7, #36] ; 0x24 8001786: 781b ldrb r3, [r3, #0] 8001788: 009b lsls r3, r3, #2 800178a: 4413 add r3, r2 800178c: 881b ldrh r3, [r3, #0] 800178e: b29b uxth r3, r3 8001790: f403 4380 and.w r3, r3, #16384 ; 0x4000 8001794: 2b00 cmp r3, #0 8001796: d021 beq.n 80017dc <PCD_EP_ISR_Handler+0x456> { /* read from endpoint BUF0Addr buffer */ count = (uint16_t)PCD_GET_EP_DBUF0_CNT(hpcd->Instance, ep->num); 8001798: 687b ldr r3, [r7, #4] 800179a: 681b ldr r3, [r3, #0] 800179c: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80017a0: b29b uxth r3, r3 80017a2: 461a mov r2, r3 80017a4: 6a7b ldr r3, [r7, #36] ; 0x24 80017a6: 781b ldrb r3, [r3, #0] 80017a8: 00db lsls r3, r3, #3 80017aa: 4413 add r3, r2 80017ac: 3302 adds r3, #2 80017ae: 005b lsls r3, r3, #1 80017b0: 687a ldr r2, [r7, #4] 80017b2: 6812 ldr r2, [r2, #0] 80017b4: 4413 add r3, r2 80017b6: f503 6380 add.w r3, r3, #1024 ; 0x400 80017ba: 881b ldrh r3, [r3, #0] 80017bc: f3c3 0309 ubfx r3, r3, #0, #10 80017c0: 86fb strh r3, [r7, #54] ; 0x36 if (count != 0U) 80017c2: 8efb ldrh r3, [r7, #54] ; 0x36 80017c4: 2b00 cmp r3, #0 80017c6: d02a beq.n 800181e <PCD_EP_ISR_Handler+0x498> { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr0, count); 80017c8: 687b ldr r3, [r7, #4] 80017ca: 6818 ldr r0, [r3, #0] 80017cc: 6a7b ldr r3, [r7, #36] ; 0x24 80017ce: 6959 ldr r1, [r3, #20] 80017d0: 6a7b ldr r3, [r7, #36] ; 0x24 80017d2: 891a ldrh r2, [r3, #8] 80017d4: 8efb ldrh r3, [r7, #54] ; 0x36 80017d6: f004 f812 bl 80057fe <USB_ReadPMA> 80017da: e020 b.n 800181e <PCD_EP_ISR_Handler+0x498> } } else { /* read from endpoint BUF1Addr buffer */ count = (uint16_t)PCD_GET_EP_DBUF1_CNT(hpcd->Instance, ep->num); 80017dc: 687b ldr r3, [r7, #4] 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: 6a7b ldr r3, [r7, #36] ; 0x24 80017ea: 781b ldrb r3, [r3, #0] 80017ec: 00db lsls r3, r3, #3 80017ee: 4413 add r3, r2 80017f0: 3306 adds r3, #6 80017f2: 005b lsls r3, r3, #1 80017f4: 687a ldr r2, [r7, #4] 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: 86fb strh r3, [r7, #54] ; 0x36 if (count != 0U) 8001806: 8efb ldrh r3, [r7, #54] ; 0x36 8001808: 2b00 cmp r3, #0 800180a: d008 beq.n 800181e <PCD_EP_ISR_Handler+0x498> { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr1, count); 800180c: 687b ldr r3, [r7, #4] 800180e: 6818 ldr r0, [r3, #0] 8001810: 6a7b ldr r3, [r7, #36] ; 0x24 8001812: 6959 ldr r1, [r3, #20] 8001814: 6a7b ldr r3, [r7, #36] ; 0x24 8001816: 895a ldrh r2, [r3, #10] 8001818: 8efb ldrh r3, [r7, #54] ; 0x36 800181a: f003 fff0 bl 80057fe <USB_ReadPMA> } } } } /* multi-packet on the NON control OUT endpoint */ ep->xfer_count += count; 800181e: 6a7b ldr r3, [r7, #36] ; 0x24 8001820: 69da ldr r2, [r3, #28] 8001822: 8efb ldrh r3, [r7, #54] ; 0x36 8001824: 441a add r2, r3 8001826: 6a7b ldr r3, [r7, #36] ; 0x24 8001828: 61da str r2, [r3, #28] ep->xfer_buff += count; 800182a: 6a7b ldr r3, [r7, #36] ; 0x24 800182c: 695a ldr r2, [r3, #20] 800182e: 8efb ldrh r3, [r7, #54] ; 0x36 8001830: 441a add r2, r3 8001832: 6a7b ldr r3, [r7, #36] ; 0x24 8001834: 615a str r2, [r3, #20] if ((ep->xfer_len == 0U) || (count < ep->maxpacket)) 8001836: 6a7b ldr r3, [r7, #36] ; 0x24 8001838: 699b ldr r3, [r3, #24] 800183a: 2b00 cmp r3, #0 800183c: d004 beq.n 8001848 <PCD_EP_ISR_Handler+0x4c2> 800183e: 8efa ldrh r2, [r7, #54] ; 0x36 8001840: 6a7b ldr r3, [r7, #36] ; 0x24 8001842: 691b ldr r3, [r3, #16] 8001844: 429a cmp r2, r3 8001846: d206 bcs.n 8001856 <PCD_EP_ISR_Handler+0x4d0> { /* RX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataOutStageCallback(hpcd, ep->num); #else HAL_PCD_DataOutStageCallback(hpcd, ep->num); 8001848: 6a7b ldr r3, [r7, #36] ; 0x24 800184a: 781b ldrb r3, [r3, #0] 800184c: 4619 mov r1, r3 800184e: 6878 ldr r0, [r7, #4] 8001850: f005 fdd6 bl 8007400 <HAL_PCD_DataOutStageCallback> 8001854: e005 b.n 8001862 <PCD_EP_ISR_Handler+0x4dc> #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } else { (void) USB_EPStartXfer(hpcd->Instance, ep); 8001856: 687b ldr r3, [r7, #4] 8001858: 681b ldr r3, [r3, #0] 800185a: 6a79 ldr r1, [r7, #36] ; 0x24 800185c: 4618 mov r0, r3 800185e: f002 f813 bl 8003888 <USB_EPStartXfer> } } if ((wEPVal & USB_EP_CTR_TX) != 0U) 8001862: 8d7b ldrh r3, [r7, #42] ; 0x2a 8001864: f003 0380 and.w r3, r3, #128 ; 0x80 8001868: 2b00 cmp r3, #0 800186a: d07e beq.n 800196a <PCD_EP_ISR_Handler+0x5e4> { ep = &hpcd->IN_ep[epindex]; 800186c: f897 302d ldrb.w r3, [r7, #45] ; 0x2d 8001870: 1c5a adds r2, r3, #1 8001872: 4613 mov r3, r2 8001874: 009b lsls r3, r3, #2 8001876: 4413 add r3, r2 8001878: 00db lsls r3, r3, #3 800187a: 687a ldr r2, [r7, #4] 800187c: 4413 add r3, r2 800187e: 627b str r3, [r7, #36] ; 0x24 /* clear int flag */ PCD_CLEAR_TX_EP_CTR(hpcd->Instance, epindex); 8001880: 687b ldr r3, [r7, #4] 8001882: 681b ldr r3, [r3, #0] 8001884: 461a mov r2, r3 8001886: f897 302d ldrb.w r3, [r7, #45] ; 0x2d 800188a: 009b lsls r3, r3, #2 800188c: 4413 add r3, r2 800188e: 881b ldrh r3, [r3, #0] 8001890: b29b uxth r3, r3 8001892: f423 43e1 bic.w r3, r3, #28800 ; 0x7080 8001896: f023 0370 bic.w r3, r3, #112 ; 0x70 800189a: 843b strh r3, [r7, #32] 800189c: 687b ldr r3, [r7, #4] 800189e: 681b ldr r3, [r3, #0] 80018a0: 461a mov r2, r3 80018a2: f897 302d ldrb.w r3, [r7, #45] ; 0x2d 80018a6: 009b lsls r3, r3, #2 80018a8: 441a add r2, r3 80018aa: 8c3b ldrh r3, [r7, #32] 80018ac: ea6f 4343 mvn.w r3, r3, lsl #17 80018b0: ea6f 4353 mvn.w r3, r3, lsr #17 80018b4: b29b uxth r3, r3 80018b6: 8013 strh r3, [r2, #0] /* Manage all non bulk/isoc transaction Bulk Single Buffer Transaction */ if ((ep->type == EP_TYPE_INTR) || (ep->type == EP_TYPE_CTRL) || 80018b8: 6a7b ldr r3, [r7, #36] ; 0x24 80018ba: 78db ldrb r3, [r3, #3] 80018bc: 2b03 cmp r3, #3 80018be: d00c beq.n 80018da <PCD_EP_ISR_Handler+0x554> 80018c0: 6a7b ldr r3, [r7, #36] ; 0x24 80018c2: 78db ldrb r3, [r3, #3] 80018c4: 2b00 cmp r3, #0 80018c6: d008 beq.n 80018da <PCD_EP_ISR_Handler+0x554> ((ep->type == EP_TYPE_BULK) && ((wEPVal & USB_EP_KIND) == 0U))) 80018c8: 6a7b ldr r3, [r7, #36] ; 0x24 80018ca: 78db ldrb r3, [r3, #3] if ((ep->type == EP_TYPE_INTR) || (ep->type == EP_TYPE_CTRL) || 80018cc: 2b02 cmp r3, #2 80018ce: d146 bne.n 800195e <PCD_EP_ISR_Handler+0x5d8> ((ep->type == EP_TYPE_BULK) && ((wEPVal & USB_EP_KIND) == 0U))) 80018d0: 8d7b ldrh r3, [r7, #42] ; 0x2a 80018d2: f403 7380 and.w r3, r3, #256 ; 0x100 80018d6: 2b00 cmp r3, #0 80018d8: d141 bne.n 800195e <PCD_EP_ISR_Handler+0x5d8> { /* multi-packet on the NON control IN endpoint */ TxByteNbre = (uint16_t)PCD_GET_EP_TX_CNT(hpcd->Instance, ep->num); 80018da: 687b ldr r3, [r7, #4] 80018dc: 681b ldr r3, [r3, #0] 80018de: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80018e2: b29b uxth r3, r3 80018e4: 461a mov r2, r3 80018e6: 6a7b ldr r3, [r7, #36] ; 0x24 80018e8: 781b ldrb r3, [r3, #0] 80018ea: 00db lsls r3, r3, #3 80018ec: 4413 add r3, r2 80018ee: 3302 adds r3, #2 80018f0: 005b lsls r3, r3, #1 80018f2: 687a ldr r2, [r7, #4] 80018f4: 6812 ldr r2, [r2, #0] 80018f6: 4413 add r3, r2 80018f8: f503 6380 add.w r3, r3, #1024 ; 0x400 80018fc: 881b ldrh r3, [r3, #0] 80018fe: f3c3 0309 ubfx r3, r3, #0, #10 8001902: 83fb strh r3, [r7, #30] if (ep->xfer_len > TxByteNbre) 8001904: 6a7b ldr r3, [r7, #36] ; 0x24 8001906: 699a ldr r2, [r3, #24] 8001908: 8bfb ldrh r3, [r7, #30] 800190a: 429a cmp r2, r3 800190c: d906 bls.n 800191c <PCD_EP_ISR_Handler+0x596> { ep->xfer_len -= TxByteNbre; 800190e: 6a7b ldr r3, [r7, #36] ; 0x24 8001910: 699a ldr r2, [r3, #24] 8001912: 8bfb ldrh r3, [r7, #30] 8001914: 1ad2 subs r2, r2, r3 8001916: 6a7b ldr r3, [r7, #36] ; 0x24 8001918: 619a str r2, [r3, #24] 800191a: e002 b.n 8001922 <PCD_EP_ISR_Handler+0x59c> } else { ep->xfer_len = 0U; 800191c: 6a7b ldr r3, [r7, #36] ; 0x24 800191e: 2200 movs r2, #0 8001920: 619a str r2, [r3, #24] } /* Zero Length Packet? */ if (ep->xfer_len == 0U) 8001922: 6a7b ldr r3, [r7, #36] ; 0x24 8001924: 699b ldr r3, [r3, #24] 8001926: 2b00 cmp r3, #0 8001928: d106 bne.n 8001938 <PCD_EP_ISR_Handler+0x5b2> { /* TX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataInStageCallback(hpcd, ep->num); #else HAL_PCD_DataInStageCallback(hpcd, ep->num); 800192a: 6a7b ldr r3, [r7, #36] ; 0x24 800192c: 781b ldrb r3, [r3, #0] 800192e: 4619 mov r1, r3 8001930: 6878 ldr r0, [r7, #4] 8001932: f005 fd80 bl 8007436 <HAL_PCD_DataInStageCallback> 8001936: e018 b.n 800196a <PCD_EP_ISR_Handler+0x5e4> #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } else { /* Transfer is not yet Done */ ep->xfer_buff += TxByteNbre; 8001938: 6a7b ldr r3, [r7, #36] ; 0x24 800193a: 695a ldr r2, [r3, #20] 800193c: 8bfb ldrh r3, [r7, #30] 800193e: 441a add r2, r3 8001940: 6a7b ldr r3, [r7, #36] ; 0x24 8001942: 615a str r2, [r3, #20] ep->xfer_count += TxByteNbre; 8001944: 6a7b ldr r3, [r7, #36] ; 0x24 8001946: 69da ldr r2, [r3, #28] 8001948: 8bfb ldrh r3, [r7, #30] 800194a: 441a add r2, r3 800194c: 6a7b ldr r3, [r7, #36] ; 0x24 800194e: 61da str r2, [r3, #28] (void)USB_EPStartXfer(hpcd->Instance, ep); 8001950: 687b ldr r3, [r7, #4] 8001952: 681b ldr r3, [r3, #0] 8001954: 6a79 ldr r1, [r7, #36] ; 0x24 8001956: 4618 mov r0, r3 8001958: f001 ff96 bl 8003888 <USB_EPStartXfer> if (ep->xfer_len == 0U) 800195c: e005 b.n 800196a <PCD_EP_ISR_Handler+0x5e4> } } /* Double Buffer Iso/bulk IN (bulk transfer Len > Ep_Mps) */ else { (void)HAL_PCD_EP_DB_Transmit(hpcd, ep, wEPVal); 800195e: 8d7b ldrh r3, [r7, #42] ; 0x2a 8001960: 461a mov r2, r3 8001962: 6a79 ldr r1, [r7, #36] ; 0x24 8001964: 6878 ldr r0, [r7, #4] 8001966: f000 f91b bl 8001ba0 <HAL_PCD_EP_DB_Transmit> while ((hpcd->Instance->ISTR & USB_ISTR_CTR) != 0U) 800196a: 687b ldr r3, [r7, #4] 800196c: 681b ldr r3, [r3, #0] 800196e: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 8001972: b29b uxth r3, r3 8001974: b21b sxth r3, r3 8001976: 2b00 cmp r3, #0 8001978: f6ff ad0a blt.w 8001390 <PCD_EP_ISR_Handler+0xa> } } } } return HAL_OK; 800197c: 2300 movs r3, #0 } 800197e: 4618 mov r0, r3 8001980: 3738 adds r7, #56 ; 0x38 8001982: 46bd mov sp, r7 8001984: bd80 pop {r7, pc} 08001986 <HAL_PCD_EP_DB_Receive>: * @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) { 8001986: b580 push {r7, lr} 8001988: b088 sub sp, #32 800198a: af00 add r7, sp, #0 800198c: 60f8 str r0, [r7, #12] 800198e: 60b9 str r1, [r7, #8] 8001990: 4613 mov r3, r2 8001992: 80fb strh r3, [r7, #6] uint16_t count; /* Manage Buffer0 OUT */ if ((wEPVal & USB_EP_DTOG_RX) != 0U) 8001994: 88fb ldrh r3, [r7, #6] 8001996: f403 4380 and.w r3, r3, #16384 ; 0x4000 800199a: 2b00 cmp r3, #0 800199c: d07e beq.n 8001a9c <HAL_PCD_EP_DB_Receive+0x116> { /* Get count of received Data on buffer0 */ count = (uint16_t)PCD_GET_EP_DBUF0_CNT(hpcd->Instance, ep->num); 800199e: 68fb ldr r3, [r7, #12] 80019a0: 681b ldr r3, [r3, #0] 80019a2: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80019a6: b29b uxth r3, r3 80019a8: 461a mov r2, r3 80019aa: 68bb ldr r3, [r7, #8] 80019ac: 781b ldrb r3, [r3, #0] 80019ae: 00db lsls r3, r3, #3 80019b0: 4413 add r3, r2 80019b2: 3302 adds r3, #2 80019b4: 005b lsls r3, r3, #1 80019b6: 68fa ldr r2, [r7, #12] 80019b8: 6812 ldr r2, [r2, #0] 80019ba: 4413 add r3, r2 80019bc: f503 6380 add.w r3, r3, #1024 ; 0x400 80019c0: 881b ldrh r3, [r3, #0] 80019c2: f3c3 0309 ubfx r3, r3, #0, #10 80019c6: 837b strh r3, [r7, #26] if (ep->xfer_len >= count) 80019c8: 68bb ldr r3, [r7, #8] 80019ca: 699a ldr r2, [r3, #24] 80019cc: 8b7b ldrh r3, [r7, #26] 80019ce: 429a cmp r2, r3 80019d0: d306 bcc.n 80019e0 <HAL_PCD_EP_DB_Receive+0x5a> { ep->xfer_len -= count; 80019d2: 68bb ldr r3, [r7, #8] 80019d4: 699a ldr r2, [r3, #24] 80019d6: 8b7b ldrh r3, [r7, #26] 80019d8: 1ad2 subs r2, r2, r3 80019da: 68bb ldr r3, [r7, #8] 80019dc: 619a str r2, [r3, #24] 80019de: e002 b.n 80019e6 <HAL_PCD_EP_DB_Receive+0x60> } else { ep->xfer_len = 0U; 80019e0: 68bb ldr r3, [r7, #8] 80019e2: 2200 movs r2, #0 80019e4: 619a str r2, [r3, #24] } if (ep->xfer_len == 0U) 80019e6: 68bb ldr r3, [r7, #8] 80019e8: 699b ldr r3, [r3, #24] 80019ea: 2b00 cmp r3, #0 80019ec: d123 bne.n 8001a36 <HAL_PCD_EP_DB_Receive+0xb0> { /* set NAK to OUT endpoint since double buffer is enabled */ PCD_SET_EP_RX_STATUS(hpcd->Instance, ep->num, USB_EP_RX_NAK); 80019ee: 68fb ldr r3, [r7, #12] 80019f0: 681b ldr r3, [r3, #0] 80019f2: 461a mov r2, r3 80019f4: 68bb ldr r3, [r7, #8] 80019f6: 781b ldrb r3, [r3, #0] 80019f8: 009b lsls r3, r3, #2 80019fa: 4413 add r3, r2 80019fc: 881b ldrh r3, [r3, #0] 80019fe: b29b uxth r3, r3 8001a00: f423 4380 bic.w r3, r3, #16384 ; 0x4000 8001a04: f023 0370 bic.w r3, r3, #112 ; 0x70 8001a08: 833b strh r3, [r7, #24] 8001a0a: 8b3b ldrh r3, [r7, #24] 8001a0c: f483 5300 eor.w r3, r3, #8192 ; 0x2000 8001a10: 833b strh r3, [r7, #24] 8001a12: 68fb ldr r3, [r7, #12] 8001a14: 681b ldr r3, [r3, #0] 8001a16: 461a mov r2, r3 8001a18: 68bb ldr r3, [r7, #8] 8001a1a: 781b ldrb r3, [r3, #0] 8001a1c: 009b lsls r3, r3, #2 8001a1e: 441a add r2, r3 8001a20: 8b3b ldrh r3, [r7, #24] 8001a22: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001a26: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8001a2a: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8001a2e: f043 0380 orr.w r3, r3, #128 ; 0x80 8001a32: b29b uxth r3, r3 8001a34: 8013 strh r3, [r2, #0] } /* Check if Buffer1 is in blocked sate which requires to toggle */ if ((wEPVal & USB_EP_DTOG_TX) != 0U) 8001a36: 88fb ldrh r3, [r7, #6] 8001a38: f003 0340 and.w r3, r3, #64 ; 0x40 8001a3c: 2b00 cmp r3, #0 8001a3e: d01f beq.n 8001a80 <HAL_PCD_EP_DB_Receive+0xfa> { PCD_FreeUserBuffer(hpcd->Instance, ep->num, 0U); 8001a40: 68fb ldr r3, [r7, #12] 8001a42: 681b ldr r3, [r3, #0] 8001a44: 461a mov r2, r3 8001a46: 68bb ldr r3, [r7, #8] 8001a48: 781b ldrb r3, [r3, #0] 8001a4a: 009b lsls r3, r3, #2 8001a4c: 4413 add r3, r2 8001a4e: 881b ldrh r3, [r3, #0] 8001a50: b29b uxth r3, r3 8001a52: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8001a56: f023 0370 bic.w r3, r3, #112 ; 0x70 8001a5a: 82fb strh r3, [r7, #22] 8001a5c: 68fb ldr r3, [r7, #12] 8001a5e: 681b ldr r3, [r3, #0] 8001a60: 461a mov r2, r3 8001a62: 68bb ldr r3, [r7, #8] 8001a64: 781b ldrb r3, [r3, #0] 8001a66: 009b lsls r3, r3, #2 8001a68: 441a add r2, r3 8001a6a: 8afb ldrh r3, [r7, #22] 8001a6c: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001a70: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8001a74: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8001a78: f043 03c0 orr.w r3, r3, #192 ; 0xc0 8001a7c: b29b uxth r3, r3 8001a7e: 8013 strh r3, [r2, #0] } if (count != 0U) 8001a80: 8b7b ldrh r3, [r7, #26] 8001a82: 2b00 cmp r3, #0 8001a84: f000 8087 beq.w 8001b96 <HAL_PCD_EP_DB_Receive+0x210> { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr0, count); 8001a88: 68fb ldr r3, [r7, #12] 8001a8a: 6818 ldr r0, [r3, #0] 8001a8c: 68bb ldr r3, [r7, #8] 8001a8e: 6959 ldr r1, [r3, #20] 8001a90: 68bb ldr r3, [r7, #8] 8001a92: 891a ldrh r2, [r3, #8] 8001a94: 8b7b ldrh r3, [r7, #26] 8001a96: f003 feb2 bl 80057fe <USB_ReadPMA> 8001a9a: e07c b.n 8001b96 <HAL_PCD_EP_DB_Receive+0x210> } /* Manage Buffer 1 DTOG_RX=0 */ else { /* Get count of received data */ count = (uint16_t)PCD_GET_EP_DBUF1_CNT(hpcd->Instance, ep->num); 8001a9c: 68fb ldr r3, [r7, #12] 8001a9e: 681b ldr r3, [r3, #0] 8001aa0: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001aa4: b29b uxth r3, r3 8001aa6: 461a mov r2, r3 8001aa8: 68bb ldr r3, [r7, #8] 8001aaa: 781b ldrb r3, [r3, #0] 8001aac: 00db lsls r3, r3, #3 8001aae: 4413 add r3, r2 8001ab0: 3306 adds r3, #6 8001ab2: 005b lsls r3, r3, #1 8001ab4: 68fa ldr r2, [r7, #12] 8001ab6: 6812 ldr r2, [r2, #0] 8001ab8: 4413 add r3, r2 8001aba: f503 6380 add.w r3, r3, #1024 ; 0x400 8001abe: 881b ldrh r3, [r3, #0] 8001ac0: f3c3 0309 ubfx r3, r3, #0, #10 8001ac4: 837b strh r3, [r7, #26] if (ep->xfer_len >= count) 8001ac6: 68bb ldr r3, [r7, #8] 8001ac8: 699a ldr r2, [r3, #24] 8001aca: 8b7b ldrh r3, [r7, #26] 8001acc: 429a cmp r2, r3 8001ace: d306 bcc.n 8001ade <HAL_PCD_EP_DB_Receive+0x158> { ep->xfer_len -= count; 8001ad0: 68bb ldr r3, [r7, #8] 8001ad2: 699a ldr r2, [r3, #24] 8001ad4: 8b7b ldrh r3, [r7, #26] 8001ad6: 1ad2 subs r2, r2, r3 8001ad8: 68bb ldr r3, [r7, #8] 8001ada: 619a str r2, [r3, #24] 8001adc: e002 b.n 8001ae4 <HAL_PCD_EP_DB_Receive+0x15e> } else { ep->xfer_len = 0U; 8001ade: 68bb ldr r3, [r7, #8] 8001ae0: 2200 movs r2, #0 8001ae2: 619a str r2, [r3, #24] } if (ep->xfer_len == 0U) 8001ae4: 68bb ldr r3, [r7, #8] 8001ae6: 699b ldr r3, [r3, #24] 8001ae8: 2b00 cmp r3, #0 8001aea: d123 bne.n 8001b34 <HAL_PCD_EP_DB_Receive+0x1ae> { /* set NAK on the current endpoint */ PCD_SET_EP_RX_STATUS(hpcd->Instance, ep->num, USB_EP_RX_NAK); 8001aec: 68fb ldr r3, [r7, #12] 8001aee: 681b ldr r3, [r3, #0] 8001af0: 461a mov r2, r3 8001af2: 68bb ldr r3, [r7, #8] 8001af4: 781b ldrb r3, [r3, #0] 8001af6: 009b lsls r3, r3, #2 8001af8: 4413 add r3, r2 8001afa: 881b ldrh r3, [r3, #0] 8001afc: b29b uxth r3, r3 8001afe: f423 4380 bic.w r3, r3, #16384 ; 0x4000 8001b02: f023 0370 bic.w r3, r3, #112 ; 0x70 8001b06: 83fb strh r3, [r7, #30] 8001b08: 8bfb ldrh r3, [r7, #30] 8001b0a: f483 5300 eor.w r3, r3, #8192 ; 0x2000 8001b0e: 83fb strh r3, [r7, #30] 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: 8bfb ldrh r3, [r7, #30] 8001b20: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001b24: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8001b28: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8001b2c: f043 0380 orr.w r3, r3, #128 ; 0x80 8001b30: b29b uxth r3, r3 8001b32: 8013 strh r3, [r2, #0] } /*Need to FreeUser Buffer*/ if ((wEPVal & USB_EP_DTOG_TX) == 0U) 8001b34: 88fb ldrh r3, [r7, #6] 8001b36: f003 0340 and.w r3, r3, #64 ; 0x40 8001b3a: 2b00 cmp r3, #0 8001b3c: d11f bne.n 8001b7e <HAL_PCD_EP_DB_Receive+0x1f8> { PCD_FreeUserBuffer(hpcd->Instance, ep->num, 0U); 8001b3e: 68fb ldr r3, [r7, #12] 8001b40: 681b ldr r3, [r3, #0] 8001b42: 461a mov r2, r3 8001b44: 68bb ldr r3, [r7, #8] 8001b46: 781b ldrb r3, [r3, #0] 8001b48: 009b lsls r3, r3, #2 8001b4a: 4413 add r3, r2 8001b4c: 881b ldrh r3, [r3, #0] 8001b4e: b29b uxth r3, r3 8001b50: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8001b54: f023 0370 bic.w r3, r3, #112 ; 0x70 8001b58: 83bb strh r3, [r7, #28] 8001b5a: 68fb ldr r3, [r7, #12] 8001b5c: 681b ldr r3, [r3, #0] 8001b5e: 461a mov r2, r3 8001b60: 68bb ldr r3, [r7, #8] 8001b62: 781b ldrb r3, [r3, #0] 8001b64: 009b lsls r3, r3, #2 8001b66: 441a add r2, r3 8001b68: 8bbb ldrh r3, [r7, #28] 8001b6a: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001b6e: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8001b72: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8001b76: f043 03c0 orr.w r3, r3, #192 ; 0xc0 8001b7a: b29b uxth r3, r3 8001b7c: 8013 strh r3, [r2, #0] } if (count != 0U) 8001b7e: 8b7b ldrh r3, [r7, #26] 8001b80: 2b00 cmp r3, #0 8001b82: d008 beq.n 8001b96 <HAL_PCD_EP_DB_Receive+0x210> { USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr1, count); 8001b84: 68fb ldr r3, [r7, #12] 8001b86: 6818 ldr r0, [r3, #0] 8001b88: 68bb ldr r3, [r7, #8] 8001b8a: 6959 ldr r1, [r3, #20] 8001b8c: 68bb ldr r3, [r7, #8] 8001b8e: 895a ldrh r2, [r3, #10] 8001b90: 8b7b ldrh r3, [r7, #26] 8001b92: f003 fe34 bl 80057fe <USB_ReadPMA> } } return count; 8001b96: 8b7b ldrh r3, [r7, #26] } 8001b98: 4618 mov r0, r3 8001b9a: 3720 adds r7, #32 8001b9c: 46bd mov sp, r7 8001b9e: bd80 pop {r7, pc} 08001ba0 <HAL_PCD_EP_DB_Transmit>: * @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) { 8001ba0: b580 push {r7, lr} 8001ba2: b0a2 sub sp, #136 ; 0x88 8001ba4: af00 add r7, sp, #0 8001ba6: 60f8 str r0, [r7, #12] 8001ba8: 60b9 str r1, [r7, #8] 8001baa: 4613 mov r3, r2 8001bac: 80fb strh r3, [r7, #6] uint32_t len; uint16_t TxByteNbre; /* Data Buffer0 ACK received */ if ((wEPVal & USB_EP_DTOG_TX) != 0U) 8001bae: 88fb ldrh r3, [r7, #6] 8001bb0: f003 0340 and.w r3, r3, #64 ; 0x40 8001bb4: 2b00 cmp r3, #0 8001bb6: f000 81c7 beq.w 8001f48 <HAL_PCD_EP_DB_Transmit+0x3a8> { /* multi-packet on the NON control IN endpoint */ TxByteNbre = (uint16_t)PCD_GET_EP_DBUF0_CNT(hpcd->Instance, ep->num); 8001bba: 68fb ldr r3, [r7, #12] 8001bbc: 681b ldr r3, [r3, #0] 8001bbe: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001bc2: b29b uxth r3, r3 8001bc4: 461a mov r2, r3 8001bc6: 68bb ldr r3, [r7, #8] 8001bc8: 781b ldrb r3, [r3, #0] 8001bca: 00db lsls r3, r3, #3 8001bcc: 4413 add r3, r2 8001bce: 3302 adds r3, #2 8001bd0: 005b lsls r3, r3, #1 8001bd2: 68fa ldr r2, [r7, #12] 8001bd4: 6812 ldr r2, [r2, #0] 8001bd6: 4413 add r3, r2 8001bd8: f503 6380 add.w r3, r3, #1024 ; 0x400 8001bdc: 881b ldrh r3, [r3, #0] 8001bde: f3c3 0309 ubfx r3, r3, #0, #10 8001be2: f8a7 304e strh.w r3, [r7, #78] ; 0x4e if (ep->xfer_len > TxByteNbre) 8001be6: 68bb ldr r3, [r7, #8] 8001be8: 699a ldr r2, [r3, #24] 8001bea: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e 8001bee: 429a cmp r2, r3 8001bf0: d907 bls.n 8001c02 <HAL_PCD_EP_DB_Transmit+0x62> { ep->xfer_len -= TxByteNbre; 8001bf2: 68bb ldr r3, [r7, #8] 8001bf4: 699a ldr r2, [r3, #24] 8001bf6: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e 8001bfa: 1ad2 subs r2, r2, r3 8001bfc: 68bb ldr r3, [r7, #8] 8001bfe: 619a str r2, [r3, #24] 8001c00: e002 b.n 8001c08 <HAL_PCD_EP_DB_Transmit+0x68> } else { ep->xfer_len = 0U; 8001c02: 68bb ldr r3, [r7, #8] 8001c04: 2200 movs r2, #0 8001c06: 619a str r2, [r3, #24] } /* Transfer is completed */ if (ep->xfer_len == 0U) 8001c08: 68bb ldr r3, [r7, #8] 8001c0a: 699b ldr r3, [r3, #24] 8001c0c: 2b00 cmp r3, #0 8001c0e: f040 80b9 bne.w 8001d84 <HAL_PCD_EP_DB_Transmit+0x1e4> { PCD_SET_EP_DBUF0_CNT(hpcd->Instance, ep->num, ep->is_in, 0U); 8001c12: 68bb ldr r3, [r7, #8] 8001c14: 785b ldrb r3, [r3, #1] 8001c16: 2b00 cmp r3, #0 8001c18: d126 bne.n 8001c68 <HAL_PCD_EP_DB_Transmit+0xc8> 8001c1a: 68fb ldr r3, [r7, #12] 8001c1c: 681b ldr r3, [r3, #0] 8001c1e: 62bb str r3, [r7, #40] ; 0x28 8001c20: 68fb ldr r3, [r7, #12] 8001c22: 681b ldr r3, [r3, #0] 8001c24: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001c28: b29b uxth r3, r3 8001c2a: 461a mov r2, r3 8001c2c: 6abb ldr r3, [r7, #40] ; 0x28 8001c2e: 4413 add r3, r2 8001c30: 62bb str r3, [r7, #40] ; 0x28 8001c32: 68bb ldr r3, [r7, #8] 8001c34: 781b ldrb r3, [r3, #0] 8001c36: 011a lsls r2, r3, #4 8001c38: 6abb ldr r3, [r7, #40] ; 0x28 8001c3a: 4413 add r3, r2 8001c3c: f203 4304 addw r3, r3, #1028 ; 0x404 8001c40: 627b str r3, [r7, #36] ; 0x24 8001c42: 6a7b ldr r3, [r7, #36] ; 0x24 8001c44: 881b ldrh r3, [r3, #0] 8001c46: b29b uxth r3, r3 8001c48: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8001c4c: b29a uxth r2, r3 8001c4e: 6a7b ldr r3, [r7, #36] ; 0x24 8001c50: 801a strh r2, [r3, #0] 8001c52: 6a7b ldr r3, [r7, #36] ; 0x24 8001c54: 881b ldrh r3, [r3, #0] 8001c56: b29b uxth r3, r3 8001c58: ea6f 4343 mvn.w r3, r3, lsl #17 8001c5c: ea6f 4353 mvn.w r3, r3, lsr #17 8001c60: b29a uxth r2, r3 8001c62: 6a7b ldr r3, [r7, #36] ; 0x24 8001c64: 801a strh r2, [r3, #0] 8001c66: e01a b.n 8001c9e <HAL_PCD_EP_DB_Transmit+0xfe> 8001c68: 68bb ldr r3, [r7, #8] 8001c6a: 785b ldrb r3, [r3, #1] 8001c6c: 2b01 cmp r3, #1 8001c6e: d116 bne.n 8001c9e <HAL_PCD_EP_DB_Transmit+0xfe> 8001c70: 68fb ldr r3, [r7, #12] 8001c72: 681b ldr r3, [r3, #0] 8001c74: 633b str r3, [r7, #48] ; 0x30 8001c76: 68fb ldr r3, [r7, #12] 8001c78: 681b ldr r3, [r3, #0] 8001c7a: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001c7e: b29b uxth r3, r3 8001c80: 461a mov r2, r3 8001c82: 6b3b ldr r3, [r7, #48] ; 0x30 8001c84: 4413 add r3, r2 8001c86: 633b str r3, [r7, #48] ; 0x30 8001c88: 68bb ldr r3, [r7, #8] 8001c8a: 781b ldrb r3, [r3, #0] 8001c8c: 011a lsls r2, r3, #4 8001c8e: 6b3b ldr r3, [r7, #48] ; 0x30 8001c90: 4413 add r3, r2 8001c92: f203 4304 addw r3, r3, #1028 ; 0x404 8001c96: 62fb str r3, [r7, #44] ; 0x2c 8001c98: 6afb ldr r3, [r7, #44] ; 0x2c 8001c9a: 2200 movs r2, #0 8001c9c: 801a strh r2, [r3, #0] PCD_SET_EP_DBUF1_CNT(hpcd->Instance, ep->num, ep->is_in, 0U); 8001c9e: 68fb ldr r3, [r7, #12] 8001ca0: 681b ldr r3, [r3, #0] 8001ca2: 623b str r3, [r7, #32] 8001ca4: 68bb ldr r3, [r7, #8] 8001ca6: 785b ldrb r3, [r3, #1] 8001ca8: 2b00 cmp r3, #0 8001caa: d126 bne.n 8001cfa <HAL_PCD_EP_DB_Transmit+0x15a> 8001cac: 68fb ldr r3, [r7, #12] 8001cae: 681b ldr r3, [r3, #0] 8001cb0: 61bb str r3, [r7, #24] 8001cb2: 68fb ldr r3, [r7, #12] 8001cb4: 681b ldr r3, [r3, #0] 8001cb6: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001cba: b29b uxth r3, r3 8001cbc: 461a mov r2, r3 8001cbe: 69bb ldr r3, [r7, #24] 8001cc0: 4413 add r3, r2 8001cc2: 61bb str r3, [r7, #24] 8001cc4: 68bb ldr r3, [r7, #8] 8001cc6: 781b ldrb r3, [r3, #0] 8001cc8: 011a lsls r2, r3, #4 8001cca: 69bb ldr r3, [r7, #24] 8001ccc: 4413 add r3, r2 8001cce: f203 430c addw r3, r3, #1036 ; 0x40c 8001cd2: 617b str r3, [r7, #20] 8001cd4: 697b ldr r3, [r7, #20] 8001cd6: 881b ldrh r3, [r3, #0] 8001cd8: b29b uxth r3, r3 8001cda: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8001cde: b29a uxth r2, r3 8001ce0: 697b ldr r3, [r7, #20] 8001ce2: 801a strh r2, [r3, #0] 8001ce4: 697b ldr r3, [r7, #20] 8001ce6: 881b ldrh r3, [r3, #0] 8001ce8: b29b uxth r3, r3 8001cea: ea6f 4343 mvn.w r3, r3, lsl #17 8001cee: ea6f 4353 mvn.w r3, r3, lsr #17 8001cf2: b29a uxth r2, r3 8001cf4: 697b ldr r3, [r7, #20] 8001cf6: 801a strh r2, [r3, #0] 8001cf8: e017 b.n 8001d2a <HAL_PCD_EP_DB_Transmit+0x18a> 8001cfa: 68bb ldr r3, [r7, #8] 8001cfc: 785b ldrb r3, [r3, #1] 8001cfe: 2b01 cmp r3, #1 8001d00: d113 bne.n 8001d2a <HAL_PCD_EP_DB_Transmit+0x18a> 8001d02: 68fb ldr r3, [r7, #12] 8001d04: 681b ldr r3, [r3, #0] 8001d06: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001d0a: b29b uxth r3, r3 8001d0c: 461a mov r2, r3 8001d0e: 6a3b ldr r3, [r7, #32] 8001d10: 4413 add r3, r2 8001d12: 623b str r3, [r7, #32] 8001d14: 68bb ldr r3, [r7, #8] 8001d16: 781b ldrb r3, [r3, #0] 8001d18: 011a lsls r2, r3, #4 8001d1a: 6a3b ldr r3, [r7, #32] 8001d1c: 4413 add r3, r2 8001d1e: f203 430c addw r3, r3, #1036 ; 0x40c 8001d22: 61fb str r3, [r7, #28] 8001d24: 69fb ldr r3, [r7, #28] 8001d26: 2200 movs r2, #0 8001d28: 801a strh r2, [r3, #0] /* TX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataInStageCallback(hpcd, ep->num); #else HAL_PCD_DataInStageCallback(hpcd, ep->num); 8001d2a: 68bb ldr r3, [r7, #8] 8001d2c: 781b ldrb r3, [r3, #0] 8001d2e: 4619 mov r1, r3 8001d30: 68f8 ldr r0, [r7, #12] 8001d32: f005 fb80 bl 8007436 <HAL_PCD_DataInStageCallback> #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ if ((wEPVal & USB_EP_DTOG_RX) != 0U) 8001d36: 88fb ldrh r3, [r7, #6] 8001d38: f403 4380 and.w r3, r3, #16384 ; 0x4000 8001d3c: 2b00 cmp r3, #0 8001d3e: f000 82d4 beq.w 80022ea <HAL_PCD_EP_DB_Transmit+0x74a> { PCD_FreeUserBuffer(hpcd->Instance, ep->num, 1U); 8001d42: 68fb ldr r3, [r7, #12] 8001d44: 681b ldr r3, [r3, #0] 8001d46: 461a mov r2, r3 8001d48: 68bb ldr r3, [r7, #8] 8001d4a: 781b ldrb r3, [r3, #0] 8001d4c: 009b lsls r3, r3, #2 8001d4e: 4413 add r3, r2 8001d50: 881b ldrh r3, [r3, #0] 8001d52: b29b uxth r3, r3 8001d54: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8001d58: f023 0370 bic.w r3, r3, #112 ; 0x70 8001d5c: 827b strh r3, [r7, #18] 8001d5e: 68fb ldr r3, [r7, #12] 8001d60: 681b ldr r3, [r3, #0] 8001d62: 461a mov r2, r3 8001d64: 68bb ldr r3, [r7, #8] 8001d66: 781b ldrb r3, [r3, #0] 8001d68: 009b lsls r3, r3, #2 8001d6a: 441a add r2, r3 8001d6c: 8a7b ldrh r3, [r7, #18] 8001d6e: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001d72: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8001d76: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8001d7a: f043 0380 orr.w r3, r3, #128 ; 0x80 8001d7e: b29b uxth r3, r3 8001d80: 8013 strh r3, [r2, #0] 8001d82: e2b2 b.n 80022ea <HAL_PCD_EP_DB_Transmit+0x74a> } } else /* Transfer is not yet Done */ { /* need to Free USB Buff */ if ((wEPVal & USB_EP_DTOG_RX) != 0U) 8001d84: 88fb ldrh r3, [r7, #6] 8001d86: f403 4380 and.w r3, r3, #16384 ; 0x4000 8001d8a: 2b00 cmp r3, #0 8001d8c: d021 beq.n 8001dd2 <HAL_PCD_EP_DB_Transmit+0x232> { PCD_FreeUserBuffer(hpcd->Instance, ep->num, 1U); 8001d8e: 68fb ldr r3, [r7, #12] 8001d90: 681b ldr r3, [r3, #0] 8001d92: 461a mov r2, r3 8001d94: 68bb ldr r3, [r7, #8] 8001d96: 781b ldrb r3, [r3, #0] 8001d98: 009b lsls r3, r3, #2 8001d9a: 4413 add r3, r2 8001d9c: 881b ldrh r3, [r3, #0] 8001d9e: b29b uxth r3, r3 8001da0: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8001da4: f023 0370 bic.w r3, r3, #112 ; 0x70 8001da8: f8a7 3044 strh.w r3, [r7, #68] ; 0x44 8001dac: 68fb ldr r3, [r7, #12] 8001dae: 681b ldr r3, [r3, #0] 8001db0: 461a mov r2, r3 8001db2: 68bb ldr r3, [r7, #8] 8001db4: 781b ldrb r3, [r3, #0] 8001db6: 009b lsls r3, r3, #2 8001db8: 441a add r2, r3 8001dba: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44 8001dbe: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8001dc2: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8001dc6: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8001dca: f043 0380 orr.w r3, r3, #128 ; 0x80 8001dce: b29b uxth r3, r3 8001dd0: 8013 strh r3, [r2, #0] } /* Still there is data to Fill in the next Buffer */ if (ep->xfer_fill_db == 1U) 8001dd2: 68bb ldr r3, [r7, #8] 8001dd4: f893 3024 ldrb.w r3, [r3, #36] ; 0x24 8001dd8: 2b01 cmp r3, #1 8001dda: f040 8286 bne.w 80022ea <HAL_PCD_EP_DB_Transmit+0x74a> { ep->xfer_buff += TxByteNbre; 8001dde: 68bb ldr r3, [r7, #8] 8001de0: 695a ldr r2, [r3, #20] 8001de2: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e 8001de6: 441a add r2, r3 8001de8: 68bb ldr r3, [r7, #8] 8001dea: 615a str r2, [r3, #20] ep->xfer_count += TxByteNbre; 8001dec: 68bb ldr r3, [r7, #8] 8001dee: 69da ldr r2, [r3, #28] 8001df0: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e 8001df4: 441a add r2, r3 8001df6: 68bb ldr r3, [r7, #8] 8001df8: 61da str r2, [r3, #28] /* Calculate the len of the new buffer to fill */ if (ep->xfer_len_db >= ep->maxpacket) 8001dfa: 68bb ldr r3, [r7, #8] 8001dfc: 6a1a ldr r2, [r3, #32] 8001dfe: 68bb ldr r3, [r7, #8] 8001e00: 691b ldr r3, [r3, #16] 8001e02: 429a cmp r2, r3 8001e04: d309 bcc.n 8001e1a <HAL_PCD_EP_DB_Transmit+0x27a> { len = ep->maxpacket; 8001e06: 68bb ldr r3, [r7, #8] 8001e08: 691b ldr r3, [r3, #16] 8001e0a: 653b str r3, [r7, #80] ; 0x50 ep->xfer_len_db -= len; 8001e0c: 68bb ldr r3, [r7, #8] 8001e0e: 6a1a ldr r2, [r3, #32] 8001e10: 6d3b ldr r3, [r7, #80] ; 0x50 8001e12: 1ad2 subs r2, r2, r3 8001e14: 68bb ldr r3, [r7, #8] 8001e16: 621a str r2, [r3, #32] 8001e18: e015 b.n 8001e46 <HAL_PCD_EP_DB_Transmit+0x2a6> } else if (ep->xfer_len_db == 0U) 8001e1a: 68bb ldr r3, [r7, #8] 8001e1c: 6a1b ldr r3, [r3, #32] 8001e1e: 2b00 cmp r3, #0 8001e20: d107 bne.n 8001e32 <HAL_PCD_EP_DB_Transmit+0x292> { len = TxByteNbre; 8001e22: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e 8001e26: 653b str r3, [r7, #80] ; 0x50 ep->xfer_fill_db = 0U; 8001e28: 68bb ldr r3, [r7, #8] 8001e2a: 2200 movs r2, #0 8001e2c: f883 2024 strb.w r2, [r3, #36] ; 0x24 8001e30: e009 b.n 8001e46 <HAL_PCD_EP_DB_Transmit+0x2a6> } else { ep->xfer_fill_db = 0U; 8001e32: 68bb ldr r3, [r7, #8] 8001e34: 2200 movs r2, #0 8001e36: f883 2024 strb.w r2, [r3, #36] ; 0x24 len = ep->xfer_len_db; 8001e3a: 68bb ldr r3, [r7, #8] 8001e3c: 6a1b ldr r3, [r3, #32] 8001e3e: 653b str r3, [r7, #80] ; 0x50 ep->xfer_len_db = 0U; 8001e40: 68bb ldr r3, [r7, #8] 8001e42: 2200 movs r2, #0 8001e44: 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); 8001e46: 68bb ldr r3, [r7, #8] 8001e48: 785b ldrb r3, [r3, #1] 8001e4a: 2b00 cmp r3, #0 8001e4c: d155 bne.n 8001efa <HAL_PCD_EP_DB_Transmit+0x35a> 8001e4e: 68fb ldr r3, [r7, #12] 8001e50: 681b ldr r3, [r3, #0] 8001e52: 63bb str r3, [r7, #56] ; 0x38 8001e54: 68fb ldr r3, [r7, #12] 8001e56: 681b ldr r3, [r3, #0] 8001e58: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001e5c: b29b uxth r3, r3 8001e5e: 461a mov r2, r3 8001e60: 6bbb ldr r3, [r7, #56] ; 0x38 8001e62: 4413 add r3, r2 8001e64: 63bb str r3, [r7, #56] ; 0x38 8001e66: 68bb ldr r3, [r7, #8] 8001e68: 781b ldrb r3, [r3, #0] 8001e6a: 011a lsls r2, r3, #4 8001e6c: 6bbb ldr r3, [r7, #56] ; 0x38 8001e6e: 4413 add r3, r2 8001e70: f203 4304 addw r3, r3, #1028 ; 0x404 8001e74: 637b str r3, [r7, #52] ; 0x34 8001e76: 6d3b ldr r3, [r7, #80] ; 0x50 8001e78: 2b00 cmp r3, #0 8001e7a: d112 bne.n 8001ea2 <HAL_PCD_EP_DB_Transmit+0x302> 8001e7c: 6b7b ldr r3, [r7, #52] ; 0x34 8001e7e: 881b ldrh r3, [r3, #0] 8001e80: b29b uxth r3, r3 8001e82: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8001e86: b29a uxth r2, r3 8001e88: 6b7b ldr r3, [r7, #52] ; 0x34 8001e8a: 801a strh r2, [r3, #0] 8001e8c: 6b7b ldr r3, [r7, #52] ; 0x34 8001e8e: 881b ldrh r3, [r3, #0] 8001e90: b29b uxth r3, r3 8001e92: ea6f 4343 mvn.w r3, r3, lsl #17 8001e96: ea6f 4353 mvn.w r3, r3, lsr #17 8001e9a: b29a uxth r2, r3 8001e9c: 6b7b ldr r3, [r7, #52] ; 0x34 8001e9e: 801a strh r2, [r3, #0] 8001ea0: e047 b.n 8001f32 <HAL_PCD_EP_DB_Transmit+0x392> 8001ea2: 6d3b ldr r3, [r7, #80] ; 0x50 8001ea4: 2b3e cmp r3, #62 ; 0x3e 8001ea6: d811 bhi.n 8001ecc <HAL_PCD_EP_DB_Transmit+0x32c> 8001ea8: 6d3b ldr r3, [r7, #80] ; 0x50 8001eaa: 085b lsrs r3, r3, #1 8001eac: 64bb str r3, [r7, #72] ; 0x48 8001eae: 6d3b ldr r3, [r7, #80] ; 0x50 8001eb0: f003 0301 and.w r3, r3, #1 8001eb4: 2b00 cmp r3, #0 8001eb6: d002 beq.n 8001ebe <HAL_PCD_EP_DB_Transmit+0x31e> 8001eb8: 6cbb ldr r3, [r7, #72] ; 0x48 8001eba: 3301 adds r3, #1 8001ebc: 64bb str r3, [r7, #72] ; 0x48 8001ebe: 6cbb ldr r3, [r7, #72] ; 0x48 8001ec0: b29b uxth r3, r3 8001ec2: 029b lsls r3, r3, #10 8001ec4: b29a uxth r2, r3 8001ec6: 6b7b ldr r3, [r7, #52] ; 0x34 8001ec8: 801a strh r2, [r3, #0] 8001eca: e032 b.n 8001f32 <HAL_PCD_EP_DB_Transmit+0x392> 8001ecc: 6d3b ldr r3, [r7, #80] ; 0x50 8001ece: 095b lsrs r3, r3, #5 8001ed0: 64bb str r3, [r7, #72] ; 0x48 8001ed2: 6d3b ldr r3, [r7, #80] ; 0x50 8001ed4: f003 031f and.w r3, r3, #31 8001ed8: 2b00 cmp r3, #0 8001eda: d102 bne.n 8001ee2 <HAL_PCD_EP_DB_Transmit+0x342> 8001edc: 6cbb ldr r3, [r7, #72] ; 0x48 8001ede: 3b01 subs r3, #1 8001ee0: 64bb str r3, [r7, #72] ; 0x48 8001ee2: 6cbb ldr r3, [r7, #72] ; 0x48 8001ee4: b29b uxth r3, r3 8001ee6: 029b lsls r3, r3, #10 8001ee8: b29b uxth r3, r3 8001eea: ea6f 4343 mvn.w r3, r3, lsl #17 8001eee: ea6f 4353 mvn.w r3, r3, lsr #17 8001ef2: b29a uxth r2, r3 8001ef4: 6b7b ldr r3, [r7, #52] ; 0x34 8001ef6: 801a strh r2, [r3, #0] 8001ef8: e01b b.n 8001f32 <HAL_PCD_EP_DB_Transmit+0x392> 8001efa: 68bb ldr r3, [r7, #8] 8001efc: 785b ldrb r3, [r3, #1] 8001efe: 2b01 cmp r3, #1 8001f00: d117 bne.n 8001f32 <HAL_PCD_EP_DB_Transmit+0x392> 8001f02: 68fb ldr r3, [r7, #12] 8001f04: 681b ldr r3, [r3, #0] 8001f06: 643b str r3, [r7, #64] ; 0x40 8001f08: 68fb ldr r3, [r7, #12] 8001f0a: 681b ldr r3, [r3, #0] 8001f0c: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001f10: b29b uxth r3, r3 8001f12: 461a mov r2, r3 8001f14: 6c3b ldr r3, [r7, #64] ; 0x40 8001f16: 4413 add r3, r2 8001f18: 643b str r3, [r7, #64] ; 0x40 8001f1a: 68bb ldr r3, [r7, #8] 8001f1c: 781b ldrb r3, [r3, #0] 8001f1e: 011a lsls r2, r3, #4 8001f20: 6c3b ldr r3, [r7, #64] ; 0x40 8001f22: 4413 add r3, r2 8001f24: f203 4304 addw r3, r3, #1028 ; 0x404 8001f28: 63fb str r3, [r7, #60] ; 0x3c 8001f2a: 6d3b ldr r3, [r7, #80] ; 0x50 8001f2c: b29a uxth r2, r3 8001f2e: 6bfb ldr r3, [r7, #60] ; 0x3c 8001f30: 801a strh r2, [r3, #0] /* Copy user buffer to USB PMA */ USB_WritePMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr0, (uint16_t)len); 8001f32: 68fb ldr r3, [r7, #12] 8001f34: 6818 ldr r0, [r3, #0] 8001f36: 68bb ldr r3, [r7, #8] 8001f38: 6959 ldr r1, [r3, #20] 8001f3a: 68bb ldr r3, [r7, #8] 8001f3c: 891a ldrh r2, [r3, #8] 8001f3e: 6d3b ldr r3, [r7, #80] ; 0x50 8001f40: b29b uxth r3, r3 8001f42: f003 fc17 bl 8005774 <USB_WritePMA> 8001f46: e1d0 b.n 80022ea <HAL_PCD_EP_DB_Transmit+0x74a> } } 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); 8001f48: 68fb ldr r3, [r7, #12] 8001f4a: 681b ldr r3, [r3, #0] 8001f4c: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001f50: b29b uxth r3, r3 8001f52: 461a mov r2, r3 8001f54: 68bb ldr r3, [r7, #8] 8001f56: 781b ldrb r3, [r3, #0] 8001f58: 00db lsls r3, r3, #3 8001f5a: 4413 add r3, r2 8001f5c: 3306 adds r3, #6 8001f5e: 005b lsls r3, r3, #1 8001f60: 68fa ldr r2, [r7, #12] 8001f62: 6812 ldr r2, [r2, #0] 8001f64: 4413 add r3, r2 8001f66: f503 6380 add.w r3, r3, #1024 ; 0x400 8001f6a: 881b ldrh r3, [r3, #0] 8001f6c: f3c3 0309 ubfx r3, r3, #0, #10 8001f70: f8a7 304e strh.w r3, [r7, #78] ; 0x4e if (ep->xfer_len >= TxByteNbre) 8001f74: 68bb ldr r3, [r7, #8] 8001f76: 699a ldr r2, [r3, #24] 8001f78: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e 8001f7c: 429a cmp r2, r3 8001f7e: d307 bcc.n 8001f90 <HAL_PCD_EP_DB_Transmit+0x3f0> { ep->xfer_len -= TxByteNbre; 8001f80: 68bb ldr r3, [r7, #8] 8001f82: 699a ldr r2, [r3, #24] 8001f84: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e 8001f88: 1ad2 subs r2, r2, r3 8001f8a: 68bb ldr r3, [r7, #8] 8001f8c: 619a str r2, [r3, #24] 8001f8e: e002 b.n 8001f96 <HAL_PCD_EP_DB_Transmit+0x3f6> } else { ep->xfer_len = 0U; 8001f90: 68bb ldr r3, [r7, #8] 8001f92: 2200 movs r2, #0 8001f94: 619a str r2, [r3, #24] } /* Transfer is completed */ if (ep->xfer_len == 0U) 8001f96: 68bb ldr r3, [r7, #8] 8001f98: 699b ldr r3, [r3, #24] 8001f9a: 2b00 cmp r3, #0 8001f9c: f040 80c4 bne.w 8002128 <HAL_PCD_EP_DB_Transmit+0x588> { PCD_SET_EP_DBUF0_CNT(hpcd->Instance, ep->num, ep->is_in, 0U); 8001fa0: 68bb ldr r3, [r7, #8] 8001fa2: 785b ldrb r3, [r3, #1] 8001fa4: 2b00 cmp r3, #0 8001fa6: d126 bne.n 8001ff6 <HAL_PCD_EP_DB_Transmit+0x456> 8001fa8: 68fb ldr r3, [r7, #12] 8001faa: 681b ldr r3, [r3, #0] 8001fac: 66fb str r3, [r7, #108] ; 0x6c 8001fae: 68fb ldr r3, [r7, #12] 8001fb0: 681b ldr r3, [r3, #0] 8001fb2: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8001fb6: b29b uxth r3, r3 8001fb8: 461a mov r2, r3 8001fba: 6efb ldr r3, [r7, #108] ; 0x6c 8001fbc: 4413 add r3, r2 8001fbe: 66fb str r3, [r7, #108] ; 0x6c 8001fc0: 68bb ldr r3, [r7, #8] 8001fc2: 781b ldrb r3, [r3, #0] 8001fc4: 011a lsls r2, r3, #4 8001fc6: 6efb ldr r3, [r7, #108] ; 0x6c 8001fc8: 4413 add r3, r2 8001fca: f203 4304 addw r3, r3, #1028 ; 0x404 8001fce: 66bb str r3, [r7, #104] ; 0x68 8001fd0: 6ebb ldr r3, [r7, #104] ; 0x68 8001fd2: 881b ldrh r3, [r3, #0] 8001fd4: b29b uxth r3, r3 8001fd6: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8001fda: b29a uxth r2, r3 8001fdc: 6ebb ldr r3, [r7, #104] ; 0x68 8001fde: 801a strh r2, [r3, #0] 8001fe0: 6ebb ldr r3, [r7, #104] ; 0x68 8001fe2: 881b ldrh r3, [r3, #0] 8001fe4: b29b uxth r3, r3 8001fe6: ea6f 4343 mvn.w r3, r3, lsl #17 8001fea: ea6f 4353 mvn.w r3, r3, lsr #17 8001fee: b29a uxth r2, r3 8001ff0: 6ebb ldr r3, [r7, #104] ; 0x68 8001ff2: 801a strh r2, [r3, #0] 8001ff4: e01a b.n 800202c <HAL_PCD_EP_DB_Transmit+0x48c> 8001ff6: 68bb ldr r3, [r7, #8] 8001ff8: 785b ldrb r3, [r3, #1] 8001ffa: 2b01 cmp r3, #1 8001ffc: d116 bne.n 800202c <HAL_PCD_EP_DB_Transmit+0x48c> 8001ffe: 68fb ldr r3, [r7, #12] 8002000: 681b ldr r3, [r3, #0] 8002002: 677b str r3, [r7, #116] ; 0x74 8002004: 68fb ldr r3, [r7, #12] 8002006: 681b ldr r3, [r3, #0] 8002008: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 800200c: b29b uxth r3, r3 800200e: 461a mov r2, r3 8002010: 6f7b ldr r3, [r7, #116] ; 0x74 8002012: 4413 add r3, r2 8002014: 677b str r3, [r7, #116] ; 0x74 8002016: 68bb ldr r3, [r7, #8] 8002018: 781b ldrb r3, [r3, #0] 800201a: 011a lsls r2, r3, #4 800201c: 6f7b ldr r3, [r7, #116] ; 0x74 800201e: 4413 add r3, r2 8002020: f203 4304 addw r3, r3, #1028 ; 0x404 8002024: 673b str r3, [r7, #112] ; 0x70 8002026: 6f3b ldr r3, [r7, #112] ; 0x70 8002028: 2200 movs r2, #0 800202a: 801a strh r2, [r3, #0] PCD_SET_EP_DBUF1_CNT(hpcd->Instance, ep->num, ep->is_in, 0U); 800202c: 68fb ldr r3, [r7, #12] 800202e: 681b ldr r3, [r3, #0] 8002030: 67bb str r3, [r7, #120] ; 0x78 8002032: 68bb ldr r3, [r7, #8] 8002034: 785b ldrb r3, [r3, #1] 8002036: 2b00 cmp r3, #0 8002038: d12f bne.n 800209a <HAL_PCD_EP_DB_Transmit+0x4fa> 800203a: 68fb ldr r3, [r7, #12] 800203c: 681b ldr r3, [r3, #0] 800203e: f8c7 3080 str.w r3, [r7, #128] ; 0x80 8002042: 68fb ldr r3, [r7, #12] 8002044: 681b ldr r3, [r3, #0] 8002046: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 800204a: b29b uxth r3, r3 800204c: 461a mov r2, r3 800204e: f8d7 3080 ldr.w r3, [r7, #128] ; 0x80 8002052: 4413 add r3, r2 8002054: f8c7 3080 str.w r3, [r7, #128] ; 0x80 8002058: 68bb ldr r3, [r7, #8] 800205a: 781b ldrb r3, [r3, #0] 800205c: 011a lsls r2, r3, #4 800205e: f8d7 3080 ldr.w r3, [r7, #128] ; 0x80 8002062: 4413 add r3, r2 8002064: f203 430c addw r3, r3, #1036 ; 0x40c 8002068: f8c7 3084 str.w r3, [r7, #132] ; 0x84 800206c: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84 8002070: 881b ldrh r3, [r3, #0] 8002072: b29b uxth r3, r3 8002074: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8002078: b29a uxth r2, r3 800207a: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84 800207e: 801a strh r2, [r3, #0] 8002080: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84 8002084: 881b ldrh r3, [r3, #0] 8002086: b29b uxth r3, r3 8002088: ea6f 4343 mvn.w r3, r3, lsl #17 800208c: ea6f 4353 mvn.w r3, r3, lsr #17 8002090: b29a uxth r2, r3 8002092: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84 8002096: 801a strh r2, [r3, #0] 8002098: e017 b.n 80020ca <HAL_PCD_EP_DB_Transmit+0x52a> 800209a: 68bb ldr r3, [r7, #8] 800209c: 785b ldrb r3, [r3, #1] 800209e: 2b01 cmp r3, #1 80020a0: d113 bne.n 80020ca <HAL_PCD_EP_DB_Transmit+0x52a> 80020a2: 68fb ldr r3, [r7, #12] 80020a4: 681b ldr r3, [r3, #0] 80020a6: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80020aa: b29b uxth r3, r3 80020ac: 461a mov r2, r3 80020ae: 6fbb ldr r3, [r7, #120] ; 0x78 80020b0: 4413 add r3, r2 80020b2: 67bb str r3, [r7, #120] ; 0x78 80020b4: 68bb ldr r3, [r7, #8] 80020b6: 781b ldrb r3, [r3, #0] 80020b8: 011a lsls r2, r3, #4 80020ba: 6fbb ldr r3, [r7, #120] ; 0x78 80020bc: 4413 add r3, r2 80020be: f203 430c addw r3, r3, #1036 ; 0x40c 80020c2: 67fb str r3, [r7, #124] ; 0x7c 80020c4: 6ffb ldr r3, [r7, #124] ; 0x7c 80020c6: 2200 movs r2, #0 80020c8: 801a strh r2, [r3, #0] /* TX COMPLETE */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->DataInStageCallback(hpcd, ep->num); #else HAL_PCD_DataInStageCallback(hpcd, ep->num); 80020ca: 68bb ldr r3, [r7, #8] 80020cc: 781b ldrb r3, [r3, #0] 80020ce: 4619 mov r1, r3 80020d0: 68f8 ldr r0, [r7, #12] 80020d2: f005 f9b0 bl 8007436 <HAL_PCD_DataInStageCallback> #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ /* need to Free USB Buff */ if ((wEPVal & USB_EP_DTOG_RX) == 0U) 80020d6: 88fb ldrh r3, [r7, #6] 80020d8: f403 4380 and.w r3, r3, #16384 ; 0x4000 80020dc: 2b00 cmp r3, #0 80020de: f040 8104 bne.w 80022ea <HAL_PCD_EP_DB_Transmit+0x74a> { PCD_FreeUserBuffer(hpcd->Instance, ep->num, 1U); 80020e2: 68fb ldr r3, [r7, #12] 80020e4: 681b ldr r3, [r3, #0] 80020e6: 461a mov r2, r3 80020e8: 68bb ldr r3, [r7, #8] 80020ea: 781b ldrb r3, [r3, #0] 80020ec: 009b lsls r3, r3, #2 80020ee: 4413 add r3, r2 80020f0: 881b ldrh r3, [r3, #0] 80020f2: b29b uxth r3, r3 80020f4: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80020f8: f023 0370 bic.w r3, r3, #112 ; 0x70 80020fc: f8a7 3046 strh.w r3, [r7, #70] ; 0x46 8002100: 68fb ldr r3, [r7, #12] 8002102: 681b ldr r3, [r3, #0] 8002104: 461a mov r2, r3 8002106: 68bb ldr r3, [r7, #8] 8002108: 781b ldrb r3, [r3, #0] 800210a: 009b lsls r3, r3, #2 800210c: 441a add r2, r3 800210e: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46 8002112: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002116: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800211a: f443 4340 orr.w r3, r3, #49152 ; 0xc000 800211e: f043 0380 orr.w r3, r3, #128 ; 0x80 8002122: b29b uxth r3, r3 8002124: 8013 strh r3, [r2, #0] 8002126: e0e0 b.n 80022ea <HAL_PCD_EP_DB_Transmit+0x74a> } } else /* Transfer is not yet Done */ { /* need to Free USB Buff */ if ((wEPVal & USB_EP_DTOG_RX) == 0U) 8002128: 88fb ldrh r3, [r7, #6] 800212a: f403 4380 and.w r3, r3, #16384 ; 0x4000 800212e: 2b00 cmp r3, #0 8002130: d121 bne.n 8002176 <HAL_PCD_EP_DB_Transmit+0x5d6> { PCD_FreeUserBuffer(hpcd->Instance, ep->num, 1U); 8002132: 68fb ldr r3, [r7, #12] 8002134: 681b ldr r3, [r3, #0] 8002136: 461a mov r2, r3 8002138: 68bb ldr r3, [r7, #8] 800213a: 781b ldrb r3, [r3, #0] 800213c: 009b lsls r3, r3, #2 800213e: 4413 add r3, r2 8002140: 881b ldrh r3, [r3, #0] 8002142: b29b uxth r3, r3 8002144: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002148: f023 0370 bic.w r3, r3, #112 ; 0x70 800214c: f8a7 304c strh.w r3, [r7, #76] ; 0x4c 8002150: 68fb ldr r3, [r7, #12] 8002152: 681b ldr r3, [r3, #0] 8002154: 461a mov r2, r3 8002156: 68bb ldr r3, [r7, #8] 8002158: 781b ldrb r3, [r3, #0] 800215a: 009b lsls r3, r3, #2 800215c: 441a add r2, r3 800215e: f8b7 304c ldrh.w r3, [r7, #76] ; 0x4c 8002162: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002166: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800216a: f443 4340 orr.w r3, r3, #49152 ; 0xc000 800216e: f043 0380 orr.w r3, r3, #128 ; 0x80 8002172: b29b uxth r3, r3 8002174: 8013 strh r3, [r2, #0] } /* Still there is data to Fill in the next Buffer */ if (ep->xfer_fill_db == 1U) 8002176: 68bb ldr r3, [r7, #8] 8002178: f893 3024 ldrb.w r3, [r3, #36] ; 0x24 800217c: 2b01 cmp r3, #1 800217e: f040 80b4 bne.w 80022ea <HAL_PCD_EP_DB_Transmit+0x74a> { ep->xfer_buff += TxByteNbre; 8002182: 68bb ldr r3, [r7, #8] 8002184: 695a ldr r2, [r3, #20] 8002186: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e 800218a: 441a add r2, r3 800218c: 68bb ldr r3, [r7, #8] 800218e: 615a str r2, [r3, #20] ep->xfer_count += TxByteNbre; 8002190: 68bb ldr r3, [r7, #8] 8002192: 69da ldr r2, [r3, #28] 8002194: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e 8002198: 441a add r2, r3 800219a: 68bb ldr r3, [r7, #8] 800219c: 61da str r2, [r3, #28] /* Calculate the len of the new buffer to fill */ if (ep->xfer_len_db >= ep->maxpacket) 800219e: 68bb ldr r3, [r7, #8] 80021a0: 6a1a ldr r2, [r3, #32] 80021a2: 68bb ldr r3, [r7, #8] 80021a4: 691b ldr r3, [r3, #16] 80021a6: 429a cmp r2, r3 80021a8: d309 bcc.n 80021be <HAL_PCD_EP_DB_Transmit+0x61e> { len = ep->maxpacket; 80021aa: 68bb ldr r3, [r7, #8] 80021ac: 691b ldr r3, [r3, #16] 80021ae: 653b str r3, [r7, #80] ; 0x50 ep->xfer_len_db -= len; 80021b0: 68bb ldr r3, [r7, #8] 80021b2: 6a1a ldr r2, [r3, #32] 80021b4: 6d3b ldr r3, [r7, #80] ; 0x50 80021b6: 1ad2 subs r2, r2, r3 80021b8: 68bb ldr r3, [r7, #8] 80021ba: 621a str r2, [r3, #32] 80021bc: e015 b.n 80021ea <HAL_PCD_EP_DB_Transmit+0x64a> } else if (ep->xfer_len_db == 0U) 80021be: 68bb ldr r3, [r7, #8] 80021c0: 6a1b ldr r3, [r3, #32] 80021c2: 2b00 cmp r3, #0 80021c4: d107 bne.n 80021d6 <HAL_PCD_EP_DB_Transmit+0x636> { len = TxByteNbre; 80021c6: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e 80021ca: 653b str r3, [r7, #80] ; 0x50 ep->xfer_fill_db = 0U; 80021cc: 68bb ldr r3, [r7, #8] 80021ce: 2200 movs r2, #0 80021d0: f883 2024 strb.w r2, [r3, #36] ; 0x24 80021d4: e009 b.n 80021ea <HAL_PCD_EP_DB_Transmit+0x64a> } else { len = ep->xfer_len_db; 80021d6: 68bb ldr r3, [r7, #8] 80021d8: 6a1b ldr r3, [r3, #32] 80021da: 653b str r3, [r7, #80] ; 0x50 ep->xfer_len_db = 0U; 80021dc: 68bb ldr r3, [r7, #8] 80021de: 2200 movs r2, #0 80021e0: 621a str r2, [r3, #32] ep->xfer_fill_db = 0; 80021e2: 68bb ldr r3, [r7, #8] 80021e4: 2200 movs r2, #0 80021e6: 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); 80021ea: 68fb ldr r3, [r7, #12] 80021ec: 681b ldr r3, [r3, #0] 80021ee: 667b str r3, [r7, #100] ; 0x64 80021f0: 68bb ldr r3, [r7, #8] 80021f2: 785b ldrb r3, [r3, #1] 80021f4: 2b00 cmp r3, #0 80021f6: d155 bne.n 80022a4 <HAL_PCD_EP_DB_Transmit+0x704> 80021f8: 68fb ldr r3, [r7, #12] 80021fa: 681b ldr r3, [r3, #0] 80021fc: 65fb str r3, [r7, #92] ; 0x5c 80021fe: 68fb ldr r3, [r7, #12] 8002200: 681b ldr r3, [r3, #0] 8002202: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8002206: b29b uxth r3, r3 8002208: 461a mov r2, r3 800220a: 6dfb ldr r3, [r7, #92] ; 0x5c 800220c: 4413 add r3, r2 800220e: 65fb str r3, [r7, #92] ; 0x5c 8002210: 68bb ldr r3, [r7, #8] 8002212: 781b ldrb r3, [r3, #0] 8002214: 011a lsls r2, r3, #4 8002216: 6dfb ldr r3, [r7, #92] ; 0x5c 8002218: 4413 add r3, r2 800221a: f203 430c addw r3, r3, #1036 ; 0x40c 800221e: 65bb str r3, [r7, #88] ; 0x58 8002220: 6d3b ldr r3, [r7, #80] ; 0x50 8002222: 2b00 cmp r3, #0 8002224: d112 bne.n 800224c <HAL_PCD_EP_DB_Transmit+0x6ac> 8002226: 6dbb ldr r3, [r7, #88] ; 0x58 8002228: 881b ldrh r3, [r3, #0] 800222a: b29b uxth r3, r3 800222c: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8002230: b29a uxth r2, r3 8002232: 6dbb ldr r3, [r7, #88] ; 0x58 8002234: 801a strh r2, [r3, #0] 8002236: 6dbb ldr r3, [r7, #88] ; 0x58 8002238: 881b ldrh r3, [r3, #0] 800223a: b29b uxth r3, r3 800223c: ea6f 4343 mvn.w r3, r3, lsl #17 8002240: ea6f 4353 mvn.w r3, r3, lsr #17 8002244: b29a uxth r2, r3 8002246: 6dbb ldr r3, [r7, #88] ; 0x58 8002248: 801a strh r2, [r3, #0] 800224a: e044 b.n 80022d6 <HAL_PCD_EP_DB_Transmit+0x736> 800224c: 6d3b ldr r3, [r7, #80] ; 0x50 800224e: 2b3e cmp r3, #62 ; 0x3e 8002250: d811 bhi.n 8002276 <HAL_PCD_EP_DB_Transmit+0x6d6> 8002252: 6d3b ldr r3, [r7, #80] ; 0x50 8002254: 085b lsrs r3, r3, #1 8002256: 657b str r3, [r7, #84] ; 0x54 8002258: 6d3b ldr r3, [r7, #80] ; 0x50 800225a: f003 0301 and.w r3, r3, #1 800225e: 2b00 cmp r3, #0 8002260: d002 beq.n 8002268 <HAL_PCD_EP_DB_Transmit+0x6c8> 8002262: 6d7b ldr r3, [r7, #84] ; 0x54 8002264: 3301 adds r3, #1 8002266: 657b str r3, [r7, #84] ; 0x54 8002268: 6d7b ldr r3, [r7, #84] ; 0x54 800226a: b29b uxth r3, r3 800226c: 029b lsls r3, r3, #10 800226e: b29a uxth r2, r3 8002270: 6dbb ldr r3, [r7, #88] ; 0x58 8002272: 801a strh r2, [r3, #0] 8002274: e02f b.n 80022d6 <HAL_PCD_EP_DB_Transmit+0x736> 8002276: 6d3b ldr r3, [r7, #80] ; 0x50 8002278: 095b lsrs r3, r3, #5 800227a: 657b str r3, [r7, #84] ; 0x54 800227c: 6d3b ldr r3, [r7, #80] ; 0x50 800227e: f003 031f and.w r3, r3, #31 8002282: 2b00 cmp r3, #0 8002284: d102 bne.n 800228c <HAL_PCD_EP_DB_Transmit+0x6ec> 8002286: 6d7b ldr r3, [r7, #84] ; 0x54 8002288: 3b01 subs r3, #1 800228a: 657b str r3, [r7, #84] ; 0x54 800228c: 6d7b ldr r3, [r7, #84] ; 0x54 800228e: b29b uxth r3, r3 8002290: 029b lsls r3, r3, #10 8002292: b29b uxth r3, r3 8002294: ea6f 4343 mvn.w r3, r3, lsl #17 8002298: ea6f 4353 mvn.w r3, r3, lsr #17 800229c: b29a uxth r2, r3 800229e: 6dbb ldr r3, [r7, #88] ; 0x58 80022a0: 801a strh r2, [r3, #0] 80022a2: e018 b.n 80022d6 <HAL_PCD_EP_DB_Transmit+0x736> 80022a4: 68bb ldr r3, [r7, #8] 80022a6: 785b ldrb r3, [r3, #1] 80022a8: 2b01 cmp r3, #1 80022aa: d114 bne.n 80022d6 <HAL_PCD_EP_DB_Transmit+0x736> 80022ac: 68fb ldr r3, [r7, #12] 80022ae: 681b ldr r3, [r3, #0] 80022b0: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80022b4: b29b uxth r3, r3 80022b6: 461a mov r2, r3 80022b8: 6e7b ldr r3, [r7, #100] ; 0x64 80022ba: 4413 add r3, r2 80022bc: 667b str r3, [r7, #100] ; 0x64 80022be: 68bb ldr r3, [r7, #8] 80022c0: 781b ldrb r3, [r3, #0] 80022c2: 011a lsls r2, r3, #4 80022c4: 6e7b ldr r3, [r7, #100] ; 0x64 80022c6: 4413 add r3, r2 80022c8: f203 430c addw r3, r3, #1036 ; 0x40c 80022cc: 663b str r3, [r7, #96] ; 0x60 80022ce: 6d3b ldr r3, [r7, #80] ; 0x50 80022d0: b29a uxth r2, r3 80022d2: 6e3b ldr r3, [r7, #96] ; 0x60 80022d4: 801a strh r2, [r3, #0] /* Copy the user buffer to USB PMA */ USB_WritePMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr1, (uint16_t)len); 80022d6: 68fb ldr r3, [r7, #12] 80022d8: 6818 ldr r0, [r3, #0] 80022da: 68bb ldr r3, [r7, #8] 80022dc: 6959 ldr r1, [r3, #20] 80022de: 68bb ldr r3, [r7, #8] 80022e0: 895a ldrh r2, [r3, #10] 80022e2: 6d3b ldr r3, [r7, #80] ; 0x50 80022e4: b29b uxth r3, r3 80022e6: f003 fa45 bl 8005774 <USB_WritePMA> } } } /*enable endpoint IN*/ PCD_SET_EP_TX_STATUS(hpcd->Instance, ep->num, USB_EP_TX_VALID); 80022ea: 68fb ldr r3, [r7, #12] 80022ec: 681b ldr r3, [r3, #0] 80022ee: 461a mov r2, r3 80022f0: 68bb ldr r3, [r7, #8] 80022f2: 781b ldrb r3, [r3, #0] 80022f4: 009b lsls r3, r3, #2 80022f6: 4413 add r3, r2 80022f8: 881b ldrh r3, [r3, #0] 80022fa: b29b uxth r3, r3 80022fc: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002300: f023 0340 bic.w r3, r3, #64 ; 0x40 8002304: 823b strh r3, [r7, #16] 8002306: 8a3b ldrh r3, [r7, #16] 8002308: f083 0310 eor.w r3, r3, #16 800230c: 823b strh r3, [r7, #16] 800230e: 8a3b ldrh r3, [r7, #16] 8002310: f083 0320 eor.w r3, r3, #32 8002314: 823b strh r3, [r7, #16] 8002316: 68fb ldr r3, [r7, #12] 8002318: 681b ldr r3, [r3, #0] 800231a: 461a mov r2, r3 800231c: 68bb ldr r3, [r7, #8] 800231e: 781b ldrb r3, [r3, #0] 8002320: 009b lsls r3, r3, #2 8002322: 441a add r2, r3 8002324: 8a3b ldrh r3, [r7, #16] 8002326: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800232a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800232e: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002332: f043 0380 orr.w r3, r3, #128 ; 0x80 8002336: b29b uxth r3, r3 8002338: 8013 strh r3, [r2, #0] return HAL_OK; 800233a: 2300 movs r3, #0 } 800233c: 4618 mov r0, r3 800233e: 3788 adds r7, #136 ; 0x88 8002340: 46bd mov sp, r7 8002342: bd80 pop {r7, pc} 08002344 <HAL_PCDEx_PMAConfig>: * @retval HAL status */ HAL_StatusTypeDef HAL_PCDEx_PMAConfig(PCD_HandleTypeDef *hpcd, uint16_t ep_addr, uint16_t ep_kind, uint32_t pmaadress) { 8002344: b480 push {r7} 8002346: b087 sub sp, #28 8002348: af00 add r7, sp, #0 800234a: 60f8 str r0, [r7, #12] 800234c: 607b str r3, [r7, #4] 800234e: 460b mov r3, r1 8002350: 817b strh r3, [r7, #10] 8002352: 4613 mov r3, r2 8002354: 813b strh r3, [r7, #8] PCD_EPTypeDef *ep; /* initialize ep structure*/ if ((0x80U & ep_addr) == 0x80U) 8002356: 897b ldrh r3, [r7, #10] 8002358: f003 0380 and.w r3, r3, #128 ; 0x80 800235c: b29b uxth r3, r3 800235e: 2b00 cmp r3, #0 8002360: d00b beq.n 800237a <HAL_PCDEx_PMAConfig+0x36> { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; 8002362: 897b ldrh r3, [r7, #10] 8002364: f003 0307 and.w r3, r3, #7 8002368: 1c5a adds r2, r3, #1 800236a: 4613 mov r3, r2 800236c: 009b lsls r3, r3, #2 800236e: 4413 add r3, r2 8002370: 00db lsls r3, r3, #3 8002372: 68fa ldr r2, [r7, #12] 8002374: 4413 add r3, r2 8002376: 617b str r3, [r7, #20] 8002378: e009 b.n 800238e <HAL_PCDEx_PMAConfig+0x4a> } else { ep = &hpcd->OUT_ep[ep_addr]; 800237a: 897a ldrh r2, [r7, #10] 800237c: 4613 mov r3, r2 800237e: 009b lsls r3, r3, #2 8002380: 4413 add r3, r2 8002382: 00db lsls r3, r3, #3 8002384: f503 73b4 add.w r3, r3, #360 ; 0x168 8002388: 68fa ldr r2, [r7, #12] 800238a: 4413 add r3, r2 800238c: 617b str r3, [r7, #20] } /* Here we check if the endpoint is single or double Buffer*/ if (ep_kind == PCD_SNG_BUF) 800238e: 893b ldrh r3, [r7, #8] 8002390: 2b00 cmp r3, #0 8002392: d107 bne.n 80023a4 <HAL_PCDEx_PMAConfig+0x60> { /* Single Buffer */ ep->doublebuffer = 0U; 8002394: 697b ldr r3, [r7, #20] 8002396: 2200 movs r2, #0 8002398: 731a strb r2, [r3, #12] /* Configure the PMA */ ep->pmaadress = (uint16_t)pmaadress; 800239a: 687b ldr r3, [r7, #4] 800239c: b29a uxth r2, r3 800239e: 697b ldr r3, [r7, #20] 80023a0: 80da strh r2, [r3, #6] 80023a2: e00b b.n 80023bc <HAL_PCDEx_PMAConfig+0x78> } else /* USB_DBL_BUF */ { /* Double Buffer Endpoint */ ep->doublebuffer = 1U; 80023a4: 697b ldr r3, [r7, #20] 80023a6: 2201 movs r2, #1 80023a8: 731a strb r2, [r3, #12] /* Configure the PMA */ ep->pmaaddr0 = (uint16_t)(pmaadress & 0xFFFFU); 80023aa: 687b ldr r3, [r7, #4] 80023ac: b29a uxth r2, r3 80023ae: 697b ldr r3, [r7, #20] 80023b0: 811a strh r2, [r3, #8] ep->pmaaddr1 = (uint16_t)((pmaadress & 0xFFFF0000U) >> 16); 80023b2: 687b ldr r3, [r7, #4] 80023b4: 0c1b lsrs r3, r3, #16 80023b6: b29a uxth r2, r3 80023b8: 697b ldr r3, [r7, #20] 80023ba: 815a strh r2, [r3, #10] } return HAL_OK; 80023bc: 2300 movs r3, #0 } 80023be: 4618 mov r0, r3 80023c0: 371c adds r7, #28 80023c2: 46bd mov sp, r7 80023c4: bc80 pop {r7} 80023c6: 4770 bx lr 080023c8 <HAL_RCC_OscConfig>: * 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) { 80023c8: b580 push {r7, lr} 80023ca: b086 sub sp, #24 80023cc: af00 add r7, sp, #0 80023ce: 6078 str r0, [r7, #4] uint32_t tickstart; uint32_t pll_config; /* Check Null pointer */ if (RCC_OscInitStruct == NULL) 80023d0: 687b ldr r3, [r7, #4] 80023d2: 2b00 cmp r3, #0 80023d4: d101 bne.n 80023da <HAL_RCC_OscConfig+0x12> { return HAL_ERROR; 80023d6: 2301 movs r3, #1 80023d8: e272 b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> /* Check the parameters */ assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType)); /*------------------------------- HSE Configuration ------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE) 80023da: 687b ldr r3, [r7, #4] 80023dc: 681b ldr r3, [r3, #0] 80023de: f003 0301 and.w r3, r3, #1 80023e2: 2b00 cmp r3, #0 80023e4: f000 8087 beq.w 80024f6 <HAL_RCC_OscConfig+0x12e> { /* 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) 80023e8: 4b92 ldr r3, [pc, #584] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 80023ea: 685b ldr r3, [r3, #4] 80023ec: f003 030c and.w r3, r3, #12 80023f0: 2b04 cmp r3, #4 80023f2: d00c beq.n 800240e <HAL_RCC_OscConfig+0x46> || ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (__HAL_RCC_GET_PLL_OSCSOURCE() == RCC_PLLSOURCE_HSE))) 80023f4: 4b8f ldr r3, [pc, #572] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 80023f6: 685b ldr r3, [r3, #4] 80023f8: f003 030c and.w r3, r3, #12 80023fc: 2b08 cmp r3, #8 80023fe: d112 bne.n 8002426 <HAL_RCC_OscConfig+0x5e> 8002400: 4b8c ldr r3, [pc, #560] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002402: 685b ldr r3, [r3, #4] 8002404: f403 3380 and.w r3, r3, #65536 ; 0x10000 8002408: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 800240c: d10b bne.n 8002426 <HAL_RCC_OscConfig+0x5e> { if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) 800240e: 4b89 ldr r3, [pc, #548] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002410: 681b ldr r3, [r3, #0] 8002412: f403 3300 and.w r3, r3, #131072 ; 0x20000 8002416: 2b00 cmp r3, #0 8002418: d06c beq.n 80024f4 <HAL_RCC_OscConfig+0x12c> 800241a: 687b ldr r3, [r7, #4] 800241c: 685b ldr r3, [r3, #4] 800241e: 2b00 cmp r3, #0 8002420: d168 bne.n 80024f4 <HAL_RCC_OscConfig+0x12c> { return HAL_ERROR; 8002422: 2301 movs r3, #1 8002424: e24c b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> } } else { /* Set the new HSE configuration ---------------------------------------*/ __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState); 8002426: 687b ldr r3, [r7, #4] 8002428: 685b ldr r3, [r3, #4] 800242a: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 800242e: d106 bne.n 800243e <HAL_RCC_OscConfig+0x76> 8002430: 4b80 ldr r3, [pc, #512] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002432: 681b ldr r3, [r3, #0] 8002434: 4a7f ldr r2, [pc, #508] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002436: f443 3380 orr.w r3, r3, #65536 ; 0x10000 800243a: 6013 str r3, [r2, #0] 800243c: e02e b.n 800249c <HAL_RCC_OscConfig+0xd4> 800243e: 687b ldr r3, [r7, #4] 8002440: 685b ldr r3, [r3, #4] 8002442: 2b00 cmp r3, #0 8002444: d10c bne.n 8002460 <HAL_RCC_OscConfig+0x98> 8002446: 4b7b ldr r3, [pc, #492] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002448: 681b ldr r3, [r3, #0] 800244a: 4a7a ldr r2, [pc, #488] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 800244c: f423 3380 bic.w r3, r3, #65536 ; 0x10000 8002450: 6013 str r3, [r2, #0] 8002452: 4b78 ldr r3, [pc, #480] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002454: 681b ldr r3, [r3, #0] 8002456: 4a77 ldr r2, [pc, #476] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002458: f423 2380 bic.w r3, r3, #262144 ; 0x40000 800245c: 6013 str r3, [r2, #0] 800245e: e01d b.n 800249c <HAL_RCC_OscConfig+0xd4> 8002460: 687b ldr r3, [r7, #4] 8002462: 685b ldr r3, [r3, #4] 8002464: f5b3 2fa0 cmp.w r3, #327680 ; 0x50000 8002468: d10c bne.n 8002484 <HAL_RCC_OscConfig+0xbc> 800246a: 4b72 ldr r3, [pc, #456] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 800246c: 681b ldr r3, [r3, #0] 800246e: 4a71 ldr r2, [pc, #452] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002470: f443 2380 orr.w r3, r3, #262144 ; 0x40000 8002474: 6013 str r3, [r2, #0] 8002476: 4b6f ldr r3, [pc, #444] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002478: 681b ldr r3, [r3, #0] 800247a: 4a6e ldr r2, [pc, #440] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 800247c: f443 3380 orr.w r3, r3, #65536 ; 0x10000 8002480: 6013 str r3, [r2, #0] 8002482: e00b b.n 800249c <HAL_RCC_OscConfig+0xd4> 8002484: 4b6b ldr r3, [pc, #428] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002486: 681b ldr r3, [r3, #0] 8002488: 4a6a ldr r2, [pc, #424] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 800248a: f423 3380 bic.w r3, r3, #65536 ; 0x10000 800248e: 6013 str r3, [r2, #0] 8002490: 4b68 ldr r3, [pc, #416] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002492: 681b ldr r3, [r3, #0] 8002494: 4a67 ldr r2, [pc, #412] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002496: f423 2380 bic.w r3, r3, #262144 ; 0x40000 800249a: 6013 str r3, [r2, #0] /* Check the HSE State */ if (RCC_OscInitStruct->HSEState != RCC_HSE_OFF) 800249c: 687b ldr r3, [r7, #4] 800249e: 685b ldr r3, [r3, #4] 80024a0: 2b00 cmp r3, #0 80024a2: d013 beq.n 80024cc <HAL_RCC_OscConfig+0x104> { /* Get Start Tick */ tickstart = HAL_GetTick(); 80024a4: f7fe f800 bl 80004a8 <HAL_GetTick> 80024a8: 6138 str r0, [r7, #16] /* Wait till HSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET) 80024aa: e008 b.n 80024be <HAL_RCC_OscConfig+0xf6> { if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) 80024ac: f7fd fffc bl 80004a8 <HAL_GetTick> 80024b0: 4602 mov r2, r0 80024b2: 693b ldr r3, [r7, #16] 80024b4: 1ad3 subs r3, r2, r3 80024b6: 2b64 cmp r3, #100 ; 0x64 80024b8: d901 bls.n 80024be <HAL_RCC_OscConfig+0xf6> { return HAL_TIMEOUT; 80024ba: 2303 movs r3, #3 80024bc: e200 b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET) 80024be: 4b5d ldr r3, [pc, #372] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 80024c0: 681b ldr r3, [r3, #0] 80024c2: f403 3300 and.w r3, r3, #131072 ; 0x20000 80024c6: 2b00 cmp r3, #0 80024c8: d0f0 beq.n 80024ac <HAL_RCC_OscConfig+0xe4> 80024ca: e014 b.n 80024f6 <HAL_RCC_OscConfig+0x12e> } } else { /* Get Start Tick */ tickstart = HAL_GetTick(); 80024cc: f7fd ffec bl 80004a8 <HAL_GetTick> 80024d0: 6138 str r0, [r7, #16] /* Wait till HSE is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) 80024d2: e008 b.n 80024e6 <HAL_RCC_OscConfig+0x11e> { if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) 80024d4: f7fd ffe8 bl 80004a8 <HAL_GetTick> 80024d8: 4602 mov r2, r0 80024da: 693b ldr r3, [r7, #16] 80024dc: 1ad3 subs r3, r2, r3 80024de: 2b64 cmp r3, #100 ; 0x64 80024e0: d901 bls.n 80024e6 <HAL_RCC_OscConfig+0x11e> { return HAL_TIMEOUT; 80024e2: 2303 movs r3, #3 80024e4: e1ec b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) 80024e6: 4b53 ldr r3, [pc, #332] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 80024e8: 681b ldr r3, [r3, #0] 80024ea: f403 3300 and.w r3, r3, #131072 ; 0x20000 80024ee: 2b00 cmp r3, #0 80024f0: d1f0 bne.n 80024d4 <HAL_RCC_OscConfig+0x10c> 80024f2: e000 b.n 80024f6 <HAL_RCC_OscConfig+0x12e> if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) 80024f4: bf00 nop } } } } /*----------------------------- HSI Configuration --------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI) 80024f6: 687b ldr r3, [r7, #4] 80024f8: 681b ldr r3, [r3, #0] 80024fa: f003 0302 and.w r3, r3, #2 80024fe: 2b00 cmp r3, #0 8002500: d063 beq.n 80025ca <HAL_RCC_OscConfig+0x202> /* 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) 8002502: 4b4c ldr r3, [pc, #304] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002504: 685b ldr r3, [r3, #4] 8002506: f003 030c and.w r3, r3, #12 800250a: 2b00 cmp r3, #0 800250c: d00b beq.n 8002526 <HAL_RCC_OscConfig+0x15e> || ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (__HAL_RCC_GET_PLL_OSCSOURCE() == RCC_PLLSOURCE_HSI_DIV2))) 800250e: 4b49 ldr r3, [pc, #292] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002510: 685b ldr r3, [r3, #4] 8002512: f003 030c and.w r3, r3, #12 8002516: 2b08 cmp r3, #8 8002518: d11c bne.n 8002554 <HAL_RCC_OscConfig+0x18c> 800251a: 4b46 ldr r3, [pc, #280] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 800251c: 685b ldr r3, [r3, #4] 800251e: f403 3380 and.w r3, r3, #65536 ; 0x10000 8002522: 2b00 cmp r3, #0 8002524: d116 bne.n 8002554 <HAL_RCC_OscConfig+0x18c> { /* 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)) 8002526: 4b43 ldr r3, [pc, #268] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002528: 681b ldr r3, [r3, #0] 800252a: f003 0302 and.w r3, r3, #2 800252e: 2b00 cmp r3, #0 8002530: d005 beq.n 800253e <HAL_RCC_OscConfig+0x176> 8002532: 687b ldr r3, [r7, #4] 8002534: 691b ldr r3, [r3, #16] 8002536: 2b01 cmp r3, #1 8002538: d001 beq.n 800253e <HAL_RCC_OscConfig+0x176> { return HAL_ERROR; 800253a: 2301 movs r3, #1 800253c: e1c0 b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> } /* Otherwise, just the calibration is allowed */ else { /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 800253e: 4b3d ldr r3, [pc, #244] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002540: 681b ldr r3, [r3, #0] 8002542: f023 02f8 bic.w r2, r3, #248 ; 0xf8 8002546: 687b ldr r3, [r7, #4] 8002548: 695b ldr r3, [r3, #20] 800254a: 00db lsls r3, r3, #3 800254c: 4939 ldr r1, [pc, #228] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 800254e: 4313 orrs r3, r2 8002550: 600b str r3, [r1, #0] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON)) 8002552: e03a b.n 80025ca <HAL_RCC_OscConfig+0x202> } } else { /* Check the HSI State */ if (RCC_OscInitStruct->HSIState != RCC_HSI_OFF) 8002554: 687b ldr r3, [r7, #4] 8002556: 691b ldr r3, [r3, #16] 8002558: 2b00 cmp r3, #0 800255a: d020 beq.n 800259e <HAL_RCC_OscConfig+0x1d6> { /* Enable the Internal High Speed oscillator (HSI). */ __HAL_RCC_HSI_ENABLE(); 800255c: 4b36 ldr r3, [pc, #216] ; (8002638 <HAL_RCC_OscConfig+0x270>) 800255e: 2201 movs r2, #1 8002560: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 8002562: f7fd ffa1 bl 80004a8 <HAL_GetTick> 8002566: 6138 str r0, [r7, #16] /* Wait till HSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) 8002568: e008 b.n 800257c <HAL_RCC_OscConfig+0x1b4> { if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 800256a: f7fd ff9d bl 80004a8 <HAL_GetTick> 800256e: 4602 mov r2, r0 8002570: 693b ldr r3, [r7, #16] 8002572: 1ad3 subs r3, r2, r3 8002574: 2b02 cmp r3, #2 8002576: d901 bls.n 800257c <HAL_RCC_OscConfig+0x1b4> { return HAL_TIMEOUT; 8002578: 2303 movs r3, #3 800257a: e1a1 b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) 800257c: 4b2d ldr r3, [pc, #180] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 800257e: 681b ldr r3, [r3, #0] 8002580: f003 0302 and.w r3, r3, #2 8002584: 2b00 cmp r3, #0 8002586: d0f0 beq.n 800256a <HAL_RCC_OscConfig+0x1a2> } } /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 8002588: 4b2a ldr r3, [pc, #168] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 800258a: 681b ldr r3, [r3, #0] 800258c: f023 02f8 bic.w r2, r3, #248 ; 0xf8 8002590: 687b ldr r3, [r7, #4] 8002592: 695b ldr r3, [r3, #20] 8002594: 00db lsls r3, r3, #3 8002596: 4927 ldr r1, [pc, #156] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002598: 4313 orrs r3, r2 800259a: 600b str r3, [r1, #0] 800259c: e015 b.n 80025ca <HAL_RCC_OscConfig+0x202> } else { /* Disable the Internal High Speed oscillator (HSI). */ __HAL_RCC_HSI_DISABLE(); 800259e: 4b26 ldr r3, [pc, #152] ; (8002638 <HAL_RCC_OscConfig+0x270>) 80025a0: 2200 movs r2, #0 80025a2: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 80025a4: f7fd ff80 bl 80004a8 <HAL_GetTick> 80025a8: 6138 str r0, [r7, #16] /* Wait till HSI is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) 80025aa: e008 b.n 80025be <HAL_RCC_OscConfig+0x1f6> { if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 80025ac: f7fd ff7c bl 80004a8 <HAL_GetTick> 80025b0: 4602 mov r2, r0 80025b2: 693b ldr r3, [r7, #16] 80025b4: 1ad3 subs r3, r2, r3 80025b6: 2b02 cmp r3, #2 80025b8: d901 bls.n 80025be <HAL_RCC_OscConfig+0x1f6> { return HAL_TIMEOUT; 80025ba: 2303 movs r3, #3 80025bc: e180 b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) 80025be: 4b1d ldr r3, [pc, #116] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 80025c0: 681b ldr r3, [r3, #0] 80025c2: f003 0302 and.w r3, r3, #2 80025c6: 2b00 cmp r3, #0 80025c8: d1f0 bne.n 80025ac <HAL_RCC_OscConfig+0x1e4> } } } } /*------------------------------ LSI Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI) 80025ca: 687b ldr r3, [r7, #4] 80025cc: 681b ldr r3, [r3, #0] 80025ce: f003 0308 and.w r3, r3, #8 80025d2: 2b00 cmp r3, #0 80025d4: d03a beq.n 800264c <HAL_RCC_OscConfig+0x284> { /* Check the parameters */ assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState)); /* Check the LSI State */ if (RCC_OscInitStruct->LSIState != RCC_LSI_OFF) 80025d6: 687b ldr r3, [r7, #4] 80025d8: 699b ldr r3, [r3, #24] 80025da: 2b00 cmp r3, #0 80025dc: d019 beq.n 8002612 <HAL_RCC_OscConfig+0x24a> { /* Enable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_ENABLE(); 80025de: 4b17 ldr r3, [pc, #92] ; (800263c <HAL_RCC_OscConfig+0x274>) 80025e0: 2201 movs r2, #1 80025e2: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 80025e4: f7fd ff60 bl 80004a8 <HAL_GetTick> 80025e8: 6138 str r0, [r7, #16] /* Wait till LSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET) 80025ea: e008 b.n 80025fe <HAL_RCC_OscConfig+0x236> { if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE) 80025ec: f7fd ff5c bl 80004a8 <HAL_GetTick> 80025f0: 4602 mov r2, r0 80025f2: 693b ldr r3, [r7, #16] 80025f4: 1ad3 subs r3, r2, r3 80025f6: 2b02 cmp r3, #2 80025f8: d901 bls.n 80025fe <HAL_RCC_OscConfig+0x236> { return HAL_TIMEOUT; 80025fa: 2303 movs r3, #3 80025fc: e160 b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET) 80025fe: 4b0d ldr r3, [pc, #52] ; (8002634 <HAL_RCC_OscConfig+0x26c>) 8002600: 6a5b ldr r3, [r3, #36] ; 0x24 8002602: f003 0302 and.w r3, r3, #2 8002606: 2b00 cmp r3, #0 8002608: d0f0 beq.n 80025ec <HAL_RCC_OscConfig+0x224> } } /* To have a fully stabilized clock in the specified range, a software delay of 1ms should be added.*/ RCC_Delay(1); 800260a: 2001 movs r0, #1 800260c: f000 faa6 bl 8002b5c <RCC_Delay> 8002610: e01c b.n 800264c <HAL_RCC_OscConfig+0x284> } else { /* Disable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_DISABLE(); 8002612: 4b0a ldr r3, [pc, #40] ; (800263c <HAL_RCC_OscConfig+0x274>) 8002614: 2200 movs r2, #0 8002616: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 8002618: f7fd ff46 bl 80004a8 <HAL_GetTick> 800261c: 6138 str r0, [r7, #16] /* Wait till LSI is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET) 800261e: e00f b.n 8002640 <HAL_RCC_OscConfig+0x278> { if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE) 8002620: f7fd ff42 bl 80004a8 <HAL_GetTick> 8002624: 4602 mov r2, r0 8002626: 693b ldr r3, [r7, #16] 8002628: 1ad3 subs r3, r2, r3 800262a: 2b02 cmp r3, #2 800262c: d908 bls.n 8002640 <HAL_RCC_OscConfig+0x278> { return HAL_TIMEOUT; 800262e: 2303 movs r3, #3 8002630: e146 b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> 8002632: bf00 nop 8002634: 40021000 .word 0x40021000 8002638: 42420000 .word 0x42420000 800263c: 42420480 .word 0x42420480 while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET) 8002640: 4b92 ldr r3, [pc, #584] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 8002642: 6a5b ldr r3, [r3, #36] ; 0x24 8002644: f003 0302 and.w r3, r3, #2 8002648: 2b00 cmp r3, #0 800264a: d1e9 bne.n 8002620 <HAL_RCC_OscConfig+0x258> } } } } /*------------------------------ LSE Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE) 800264c: 687b ldr r3, [r7, #4] 800264e: 681b ldr r3, [r3, #0] 8002650: f003 0304 and.w r3, r3, #4 8002654: 2b00 cmp r3, #0 8002656: f000 80a6 beq.w 80027a6 <HAL_RCC_OscConfig+0x3de> { FlagStatus pwrclkchanged = RESET; 800265a: 2300 movs r3, #0 800265c: 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()) 800265e: 4b8b ldr r3, [pc, #556] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 8002660: 69db ldr r3, [r3, #28] 8002662: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 8002666: 2b00 cmp r3, #0 8002668: d10d bne.n 8002686 <HAL_RCC_OscConfig+0x2be> { __HAL_RCC_PWR_CLK_ENABLE(); 800266a: 4b88 ldr r3, [pc, #544] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 800266c: 69db ldr r3, [r3, #28] 800266e: 4a87 ldr r2, [pc, #540] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 8002670: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000 8002674: 61d3 str r3, [r2, #28] 8002676: 4b85 ldr r3, [pc, #532] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 8002678: 69db ldr r3, [r3, #28] 800267a: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 800267e: 60bb str r3, [r7, #8] 8002680: 68bb ldr r3, [r7, #8] pwrclkchanged = SET; 8002682: 2301 movs r3, #1 8002684: 75fb strb r3, [r7, #23] } if (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 8002686: 4b82 ldr r3, [pc, #520] ; (8002890 <HAL_RCC_OscConfig+0x4c8>) 8002688: 681b ldr r3, [r3, #0] 800268a: f403 7380 and.w r3, r3, #256 ; 0x100 800268e: 2b00 cmp r3, #0 8002690: d118 bne.n 80026c4 <HAL_RCC_OscConfig+0x2fc> { /* Enable write access to Backup domain */ SET_BIT(PWR->CR, PWR_CR_DBP); 8002692: 4b7f ldr r3, [pc, #508] ; (8002890 <HAL_RCC_OscConfig+0x4c8>) 8002694: 681b ldr r3, [r3, #0] 8002696: 4a7e ldr r2, [pc, #504] ; (8002890 <HAL_RCC_OscConfig+0x4c8>) 8002698: f443 7380 orr.w r3, r3, #256 ; 0x100 800269c: 6013 str r3, [r2, #0] /* Wait for Backup domain Write protection disable */ tickstart = HAL_GetTick(); 800269e: f7fd ff03 bl 80004a8 <HAL_GetTick> 80026a2: 6138 str r0, [r7, #16] while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 80026a4: e008 b.n 80026b8 <HAL_RCC_OscConfig+0x2f0> { if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) 80026a6: f7fd feff bl 80004a8 <HAL_GetTick> 80026aa: 4602 mov r2, r0 80026ac: 693b ldr r3, [r7, #16] 80026ae: 1ad3 subs r3, r2, r3 80026b0: 2b64 cmp r3, #100 ; 0x64 80026b2: d901 bls.n 80026b8 <HAL_RCC_OscConfig+0x2f0> { return HAL_TIMEOUT; 80026b4: 2303 movs r3, #3 80026b6: e103 b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 80026b8: 4b75 ldr r3, [pc, #468] ; (8002890 <HAL_RCC_OscConfig+0x4c8>) 80026ba: 681b ldr r3, [r3, #0] 80026bc: f403 7380 and.w r3, r3, #256 ; 0x100 80026c0: 2b00 cmp r3, #0 80026c2: d0f0 beq.n 80026a6 <HAL_RCC_OscConfig+0x2de> } } } /* Set the new LSE configuration -----------------------------------------*/ __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState); 80026c4: 687b ldr r3, [r7, #4] 80026c6: 68db ldr r3, [r3, #12] 80026c8: 2b01 cmp r3, #1 80026ca: d106 bne.n 80026da <HAL_RCC_OscConfig+0x312> 80026cc: 4b6f ldr r3, [pc, #444] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 80026ce: 6a1b ldr r3, [r3, #32] 80026d0: 4a6e ldr r2, [pc, #440] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 80026d2: f043 0301 orr.w r3, r3, #1 80026d6: 6213 str r3, [r2, #32] 80026d8: e02d b.n 8002736 <HAL_RCC_OscConfig+0x36e> 80026da: 687b ldr r3, [r7, #4] 80026dc: 68db ldr r3, [r3, #12] 80026de: 2b00 cmp r3, #0 80026e0: d10c bne.n 80026fc <HAL_RCC_OscConfig+0x334> 80026e2: 4b6a ldr r3, [pc, #424] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 80026e4: 6a1b ldr r3, [r3, #32] 80026e6: 4a69 ldr r2, [pc, #420] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 80026e8: f023 0301 bic.w r3, r3, #1 80026ec: 6213 str r3, [r2, #32] 80026ee: 4b67 ldr r3, [pc, #412] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 80026f0: 6a1b ldr r3, [r3, #32] 80026f2: 4a66 ldr r2, [pc, #408] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 80026f4: f023 0304 bic.w r3, r3, #4 80026f8: 6213 str r3, [r2, #32] 80026fa: e01c b.n 8002736 <HAL_RCC_OscConfig+0x36e> 80026fc: 687b ldr r3, [r7, #4] 80026fe: 68db ldr r3, [r3, #12] 8002700: 2b05 cmp r3, #5 8002702: d10c bne.n 800271e <HAL_RCC_OscConfig+0x356> 8002704: 4b61 ldr r3, [pc, #388] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 8002706: 6a1b ldr r3, [r3, #32] 8002708: 4a60 ldr r2, [pc, #384] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 800270a: f043 0304 orr.w r3, r3, #4 800270e: 6213 str r3, [r2, #32] 8002710: 4b5e ldr r3, [pc, #376] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 8002712: 6a1b ldr r3, [r3, #32] 8002714: 4a5d ldr r2, [pc, #372] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 8002716: f043 0301 orr.w r3, r3, #1 800271a: 6213 str r3, [r2, #32] 800271c: e00b b.n 8002736 <HAL_RCC_OscConfig+0x36e> 800271e: 4b5b ldr r3, [pc, #364] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 8002720: 6a1b ldr r3, [r3, #32] 8002722: 4a5a ldr r2, [pc, #360] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 8002724: f023 0301 bic.w r3, r3, #1 8002728: 6213 str r3, [r2, #32] 800272a: 4b58 ldr r3, [pc, #352] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 800272c: 6a1b ldr r3, [r3, #32] 800272e: 4a57 ldr r2, [pc, #348] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 8002730: f023 0304 bic.w r3, r3, #4 8002734: 6213 str r3, [r2, #32] /* Check the LSE State */ if (RCC_OscInitStruct->LSEState != RCC_LSE_OFF) 8002736: 687b ldr r3, [r7, #4] 8002738: 68db ldr r3, [r3, #12] 800273a: 2b00 cmp r3, #0 800273c: d015 beq.n 800276a <HAL_RCC_OscConfig+0x3a2> { /* Get Start Tick */ tickstart = HAL_GetTick(); 800273e: f7fd feb3 bl 80004a8 <HAL_GetTick> 8002742: 6138 str r0, [r7, #16] /* Wait till LSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) 8002744: e00a b.n 800275c <HAL_RCC_OscConfig+0x394> { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 8002746: f7fd feaf bl 80004a8 <HAL_GetTick> 800274a: 4602 mov r2, r0 800274c: 693b ldr r3, [r7, #16] 800274e: 1ad3 subs r3, r2, r3 8002750: f241 3288 movw r2, #5000 ; 0x1388 8002754: 4293 cmp r3, r2 8002756: d901 bls.n 800275c <HAL_RCC_OscConfig+0x394> { return HAL_TIMEOUT; 8002758: 2303 movs r3, #3 800275a: e0b1 b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) 800275c: 4b4b ldr r3, [pc, #300] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 800275e: 6a1b ldr r3, [r3, #32] 8002760: f003 0302 and.w r3, r3, #2 8002764: 2b00 cmp r3, #0 8002766: d0ee beq.n 8002746 <HAL_RCC_OscConfig+0x37e> 8002768: e014 b.n 8002794 <HAL_RCC_OscConfig+0x3cc> } } else { /* Get Start Tick */ tickstart = HAL_GetTick(); 800276a: f7fd fe9d bl 80004a8 <HAL_GetTick> 800276e: 6138 str r0, [r7, #16] /* Wait till LSE is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET) 8002770: e00a b.n 8002788 <HAL_RCC_OscConfig+0x3c0> { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 8002772: f7fd fe99 bl 80004a8 <HAL_GetTick> 8002776: 4602 mov r2, r0 8002778: 693b ldr r3, [r7, #16] 800277a: 1ad3 subs r3, r2, r3 800277c: f241 3288 movw r2, #5000 ; 0x1388 8002780: 4293 cmp r3, r2 8002782: d901 bls.n 8002788 <HAL_RCC_OscConfig+0x3c0> { return HAL_TIMEOUT; 8002784: 2303 movs r3, #3 8002786: e09b b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET) 8002788: 4b40 ldr r3, [pc, #256] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 800278a: 6a1b ldr r3, [r3, #32] 800278c: f003 0302 and.w r3, r3, #2 8002790: 2b00 cmp r3, #0 8002792: d1ee bne.n 8002772 <HAL_RCC_OscConfig+0x3aa> } } } /* Require to disable power clock if necessary */ if (pwrclkchanged == SET) 8002794: 7dfb ldrb r3, [r7, #23] 8002796: 2b01 cmp r3, #1 8002798: d105 bne.n 80027a6 <HAL_RCC_OscConfig+0x3de> { __HAL_RCC_PWR_CLK_DISABLE(); 800279a: 4b3c ldr r3, [pc, #240] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 800279c: 69db ldr r3, [r3, #28] 800279e: 4a3b ldr r2, [pc, #236] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 80027a0: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000 80027a4: 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) 80027a6: 687b ldr r3, [r7, #4] 80027a8: 69db ldr r3, [r3, #28] 80027aa: 2b00 cmp r3, #0 80027ac: f000 8087 beq.w 80028be <HAL_RCC_OscConfig+0x4f6> { /* Check if the PLL is used as system clock or not */ if (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_PLLCLK) 80027b0: 4b36 ldr r3, [pc, #216] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 80027b2: 685b ldr r3, [r3, #4] 80027b4: f003 030c and.w r3, r3, #12 80027b8: 2b08 cmp r3, #8 80027ba: d061 beq.n 8002880 <HAL_RCC_OscConfig+0x4b8> { if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON) 80027bc: 687b ldr r3, [r7, #4] 80027be: 69db ldr r3, [r3, #28] 80027c0: 2b02 cmp r3, #2 80027c2: d146 bne.n 8002852 <HAL_RCC_OscConfig+0x48a> /* 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(); 80027c4: 4b33 ldr r3, [pc, #204] ; (8002894 <HAL_RCC_OscConfig+0x4cc>) 80027c6: 2200 movs r2, #0 80027c8: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 80027ca: f7fd fe6d bl 80004a8 <HAL_GetTick> 80027ce: 6138 str r0, [r7, #16] /* Wait till PLL is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) 80027d0: e008 b.n 80027e4 <HAL_RCC_OscConfig+0x41c> { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 80027d2: f7fd fe69 bl 80004a8 <HAL_GetTick> 80027d6: 4602 mov r2, r0 80027d8: 693b ldr r3, [r7, #16] 80027da: 1ad3 subs r3, r2, r3 80027dc: 2b02 cmp r3, #2 80027de: d901 bls.n 80027e4 <HAL_RCC_OscConfig+0x41c> { return HAL_TIMEOUT; 80027e0: 2303 movs r3, #3 80027e2: e06d b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) 80027e4: 4b29 ldr r3, [pc, #164] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 80027e6: 681b ldr r3, [r3, #0] 80027e8: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 80027ec: 2b00 cmp r3, #0 80027ee: d1f0 bne.n 80027d2 <HAL_RCC_OscConfig+0x40a> } } /* 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) 80027f0: 687b ldr r3, [r7, #4] 80027f2: 6a1b ldr r3, [r3, #32] 80027f4: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 80027f8: d108 bne.n 800280c <HAL_RCC_OscConfig+0x444> /* 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); 80027fa: 4b24 ldr r3, [pc, #144] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 80027fc: 685b ldr r3, [r3, #4] 80027fe: f423 3200 bic.w r2, r3, #131072 ; 0x20000 8002802: 687b ldr r3, [r7, #4] 8002804: 689b ldr r3, [r3, #8] 8002806: 4921 ldr r1, [pc, #132] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 8002808: 4313 orrs r3, r2 800280a: 604b str r3, [r1, #4] } /* Configure the main PLL clock source and multiplication factors. */ __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource, 800280c: 4b1f ldr r3, [pc, #124] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 800280e: 685b ldr r3, [r3, #4] 8002810: f423 1274 bic.w r2, r3, #3997696 ; 0x3d0000 8002814: 687b ldr r3, [r7, #4] 8002816: 6a19 ldr r1, [r3, #32] 8002818: 687b ldr r3, [r7, #4] 800281a: 6a5b ldr r3, [r3, #36] ; 0x24 800281c: 430b orrs r3, r1 800281e: 491b ldr r1, [pc, #108] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 8002820: 4313 orrs r3, r2 8002822: 604b str r3, [r1, #4] RCC_OscInitStruct->PLL.PLLMUL); /* Enable the main PLL. */ __HAL_RCC_PLL_ENABLE(); 8002824: 4b1b ldr r3, [pc, #108] ; (8002894 <HAL_RCC_OscConfig+0x4cc>) 8002826: 2201 movs r2, #1 8002828: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 800282a: f7fd fe3d bl 80004a8 <HAL_GetTick> 800282e: 6138 str r0, [r7, #16] /* Wait till PLL is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET) 8002830: e008 b.n 8002844 <HAL_RCC_OscConfig+0x47c> { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 8002832: f7fd fe39 bl 80004a8 <HAL_GetTick> 8002836: 4602 mov r2, r0 8002838: 693b ldr r3, [r7, #16] 800283a: 1ad3 subs r3, r2, r3 800283c: 2b02 cmp r3, #2 800283e: d901 bls.n 8002844 <HAL_RCC_OscConfig+0x47c> { return HAL_TIMEOUT; 8002840: 2303 movs r3, #3 8002842: e03d b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET) 8002844: 4b11 ldr r3, [pc, #68] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 8002846: 681b ldr r3, [r3, #0] 8002848: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 800284c: 2b00 cmp r3, #0 800284e: d0f0 beq.n 8002832 <HAL_RCC_OscConfig+0x46a> 8002850: e035 b.n 80028be <HAL_RCC_OscConfig+0x4f6> } } else { /* Disable the main PLL. */ __HAL_RCC_PLL_DISABLE(); 8002852: 4b10 ldr r3, [pc, #64] ; (8002894 <HAL_RCC_OscConfig+0x4cc>) 8002854: 2200 movs r2, #0 8002856: 601a str r2, [r3, #0] /* Get Start Tick */ tickstart = HAL_GetTick(); 8002858: f7fd fe26 bl 80004a8 <HAL_GetTick> 800285c: 6138 str r0, [r7, #16] /* Wait till PLL is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) 800285e: e008 b.n 8002872 <HAL_RCC_OscConfig+0x4aa> { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 8002860: f7fd fe22 bl 80004a8 <HAL_GetTick> 8002864: 4602 mov r2, r0 8002866: 693b ldr r3, [r7, #16] 8002868: 1ad3 subs r3, r2, r3 800286a: 2b02 cmp r3, #2 800286c: d901 bls.n 8002872 <HAL_RCC_OscConfig+0x4aa> { return HAL_TIMEOUT; 800286e: 2303 movs r3, #3 8002870: e026 b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) 8002872: 4b06 ldr r3, [pc, #24] ; (800288c <HAL_RCC_OscConfig+0x4c4>) 8002874: 681b ldr r3, [r3, #0] 8002876: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 800287a: 2b00 cmp r3, #0 800287c: d1f0 bne.n 8002860 <HAL_RCC_OscConfig+0x498> 800287e: e01e b.n 80028be <HAL_RCC_OscConfig+0x4f6> } } else { /* Check if there is a request to disable the PLL used as System clock source */ if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) 8002880: 687b ldr r3, [r7, #4] 8002882: 69db ldr r3, [r3, #28] 8002884: 2b01 cmp r3, #1 8002886: d107 bne.n 8002898 <HAL_RCC_OscConfig+0x4d0> { return HAL_ERROR; 8002888: 2301 movs r3, #1 800288a: e019 b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> 800288c: 40021000 .word 0x40021000 8002890: 40007000 .word 0x40007000 8002894: 42420060 .word 0x42420060 } else { /* Do not return HAL_ERROR if request repeats the current configuration */ pll_config = RCC->CFGR; 8002898: 4b0b ldr r3, [pc, #44] ; (80028c8 <HAL_RCC_OscConfig+0x500>) 800289a: 685b ldr r3, [r3, #4] 800289c: 60fb str r3, [r7, #12] if ((READ_BIT(pll_config, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 800289e: 68fb ldr r3, [r7, #12] 80028a0: f403 3280 and.w r2, r3, #65536 ; 0x10000 80028a4: 687b ldr r3, [r7, #4] 80028a6: 6a1b ldr r3, [r3, #32] 80028a8: 429a cmp r2, r3 80028aa: d106 bne.n 80028ba <HAL_RCC_OscConfig+0x4f2> (READ_BIT(pll_config, RCC_CFGR_PLLMULL) != RCC_OscInitStruct->PLL.PLLMUL)) 80028ac: 68fb ldr r3, [r7, #12] 80028ae: f403 1270 and.w r2, r3, #3932160 ; 0x3c0000 80028b2: 687b ldr r3, [r7, #4] 80028b4: 6a5b ldr r3, [r3, #36] ; 0x24 if ((READ_BIT(pll_config, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 80028b6: 429a cmp r2, r3 80028b8: d001 beq.n 80028be <HAL_RCC_OscConfig+0x4f6> { return HAL_ERROR; 80028ba: 2301 movs r3, #1 80028bc: e000 b.n 80028c0 <HAL_RCC_OscConfig+0x4f8> } } } } return HAL_OK; 80028be: 2300 movs r3, #0 } 80028c0: 4618 mov r0, r3 80028c2: 3718 adds r7, #24 80028c4: 46bd mov sp, r7 80028c6: bd80 pop {r7, pc} 80028c8: 40021000 .word 0x40021000 080028cc <HAL_RCC_ClockConfig>: * 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) { 80028cc: b580 push {r7, lr} 80028ce: b084 sub sp, #16 80028d0: af00 add r7, sp, #0 80028d2: 6078 str r0, [r7, #4] 80028d4: 6039 str r1, [r7, #0] uint32_t tickstart; /* Check Null pointer */ if (RCC_ClkInitStruct == NULL) 80028d6: 687b ldr r3, [r7, #4] 80028d8: 2b00 cmp r3, #0 80028da: d101 bne.n 80028e0 <HAL_RCC_ClockConfig+0x14> { return HAL_ERROR; 80028dc: 2301 movs r3, #1 80028de: e0d0 b.n 8002a82 <HAL_RCC_ClockConfig+0x1b6> 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()) 80028e0: 4b6a ldr r3, [pc, #424] ; (8002a8c <HAL_RCC_ClockConfig+0x1c0>) 80028e2: 681b ldr r3, [r3, #0] 80028e4: f003 0307 and.w r3, r3, #7 80028e8: 683a ldr r2, [r7, #0] 80028ea: 429a cmp r2, r3 80028ec: d910 bls.n 8002910 <HAL_RCC_ClockConfig+0x44> { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ __HAL_FLASH_SET_LATENCY(FLatency); 80028ee: 4b67 ldr r3, [pc, #412] ; (8002a8c <HAL_RCC_ClockConfig+0x1c0>) 80028f0: 681b ldr r3, [r3, #0] 80028f2: f023 0207 bic.w r2, r3, #7 80028f6: 4965 ldr r1, [pc, #404] ; (8002a8c <HAL_RCC_ClockConfig+0x1c0>) 80028f8: 683b ldr r3, [r7, #0] 80028fa: 4313 orrs r3, r2 80028fc: 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) 80028fe: 4b63 ldr r3, [pc, #396] ; (8002a8c <HAL_RCC_ClockConfig+0x1c0>) 8002900: 681b ldr r3, [r3, #0] 8002902: f003 0307 and.w r3, r3, #7 8002906: 683a ldr r2, [r7, #0] 8002908: 429a cmp r2, r3 800290a: d001 beq.n 8002910 <HAL_RCC_ClockConfig+0x44> { return HAL_ERROR; 800290c: 2301 movs r3, #1 800290e: e0b8 b.n 8002a82 <HAL_RCC_ClockConfig+0x1b6> } } #endif /* FLASH_ACR_LATENCY */ /*-------------------------- HCLK Configuration --------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) 8002910: 687b ldr r3, [r7, #4] 8002912: 681b ldr r3, [r3, #0] 8002914: f003 0302 and.w r3, r3, #2 8002918: 2b00 cmp r3, #0 800291a: d020 beq.n 800295e <HAL_RCC_ClockConfig+0x92> { /* 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) 800291c: 687b ldr r3, [r7, #4] 800291e: 681b ldr r3, [r3, #0] 8002920: f003 0304 and.w r3, r3, #4 8002924: 2b00 cmp r3, #0 8002926: d005 beq.n 8002934 <HAL_RCC_ClockConfig+0x68> { MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_HCLK_DIV16); 8002928: 4b59 ldr r3, [pc, #356] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 800292a: 685b ldr r3, [r3, #4] 800292c: 4a58 ldr r2, [pc, #352] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 800292e: f443 63e0 orr.w r3, r3, #1792 ; 0x700 8002932: 6053 str r3, [r2, #4] } if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) 8002934: 687b ldr r3, [r7, #4] 8002936: 681b ldr r3, [r3, #0] 8002938: f003 0308 and.w r3, r3, #8 800293c: 2b00 cmp r3, #0 800293e: d005 beq.n 800294c <HAL_RCC_ClockConfig+0x80> { MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, (RCC_HCLK_DIV16 << 3)); 8002940: 4b53 ldr r3, [pc, #332] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 8002942: 685b ldr r3, [r3, #4] 8002944: 4a52 ldr r2, [pc, #328] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 8002946: f443 5360 orr.w r3, r3, #14336 ; 0x3800 800294a: 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); 800294c: 4b50 ldr r3, [pc, #320] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 800294e: 685b ldr r3, [r3, #4] 8002950: f023 02f0 bic.w r2, r3, #240 ; 0xf0 8002954: 687b ldr r3, [r7, #4] 8002956: 689b ldr r3, [r3, #8] 8002958: 494d ldr r1, [pc, #308] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 800295a: 4313 orrs r3, r2 800295c: 604b str r3, [r1, #4] } /*------------------------- SYSCLK Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK) 800295e: 687b ldr r3, [r7, #4] 8002960: 681b ldr r3, [r3, #0] 8002962: f003 0301 and.w r3, r3, #1 8002966: 2b00 cmp r3, #0 8002968: d040 beq.n 80029ec <HAL_RCC_ClockConfig+0x120> { assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource)); /* HSE is selected as System Clock Source */ if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE) 800296a: 687b ldr r3, [r7, #4] 800296c: 685b ldr r3, [r3, #4] 800296e: 2b01 cmp r3, #1 8002970: d107 bne.n 8002982 <HAL_RCC_ClockConfig+0xb6> { /* Check the HSE ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET) 8002972: 4b47 ldr r3, [pc, #284] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 8002974: 681b ldr r3, [r3, #0] 8002976: f403 3300 and.w r3, r3, #131072 ; 0x20000 800297a: 2b00 cmp r3, #0 800297c: d115 bne.n 80029aa <HAL_RCC_ClockConfig+0xde> { return HAL_ERROR; 800297e: 2301 movs r3, #1 8002980: e07f b.n 8002a82 <HAL_RCC_ClockConfig+0x1b6> } } /* PLL is selected as System Clock Source */ else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) 8002982: 687b ldr r3, [r7, #4] 8002984: 685b ldr r3, [r3, #4] 8002986: 2b02 cmp r3, #2 8002988: d107 bne.n 800299a <HAL_RCC_ClockConfig+0xce> { /* Check the PLL ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET) 800298a: 4b41 ldr r3, [pc, #260] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 800298c: 681b ldr r3, [r3, #0] 800298e: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 8002992: 2b00 cmp r3, #0 8002994: d109 bne.n 80029aa <HAL_RCC_ClockConfig+0xde> { return HAL_ERROR; 8002996: 2301 movs r3, #1 8002998: e073 b.n 8002a82 <HAL_RCC_ClockConfig+0x1b6> } /* HSI is selected as System Clock Source */ else { /* Check the HSI ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) 800299a: 4b3d ldr r3, [pc, #244] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 800299c: 681b ldr r3, [r3, #0] 800299e: f003 0302 and.w r3, r3, #2 80029a2: 2b00 cmp r3, #0 80029a4: d101 bne.n 80029aa <HAL_RCC_ClockConfig+0xde> { return HAL_ERROR; 80029a6: 2301 movs r3, #1 80029a8: e06b b.n 8002a82 <HAL_RCC_ClockConfig+0x1b6> } } __HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource); 80029aa: 4b39 ldr r3, [pc, #228] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 80029ac: 685b ldr r3, [r3, #4] 80029ae: f023 0203 bic.w r2, r3, #3 80029b2: 687b ldr r3, [r7, #4] 80029b4: 685b ldr r3, [r3, #4] 80029b6: 4936 ldr r1, [pc, #216] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 80029b8: 4313 orrs r3, r2 80029ba: 604b str r3, [r1, #4] /* Get Start Tick */ tickstart = HAL_GetTick(); 80029bc: f7fd fd74 bl 80004a8 <HAL_GetTick> 80029c0: 60f8 str r0, [r7, #12] while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) 80029c2: e00a b.n 80029da <HAL_RCC_ClockConfig+0x10e> { if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE) 80029c4: f7fd fd70 bl 80004a8 <HAL_GetTick> 80029c8: 4602 mov r2, r0 80029ca: 68fb ldr r3, [r7, #12] 80029cc: 1ad3 subs r3, r2, r3 80029ce: f241 3288 movw r2, #5000 ; 0x1388 80029d2: 4293 cmp r3, r2 80029d4: d901 bls.n 80029da <HAL_RCC_ClockConfig+0x10e> { return HAL_TIMEOUT; 80029d6: 2303 movs r3, #3 80029d8: e053 b.n 8002a82 <HAL_RCC_ClockConfig+0x1b6> while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) 80029da: 4b2d ldr r3, [pc, #180] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 80029dc: 685b ldr r3, [r3, #4] 80029de: f003 020c and.w r2, r3, #12 80029e2: 687b ldr r3, [r7, #4] 80029e4: 685b ldr r3, [r3, #4] 80029e6: 009b lsls r3, r3, #2 80029e8: 429a cmp r2, r3 80029ea: d1eb bne.n 80029c4 <HAL_RCC_ClockConfig+0xf8> } } #if defined(FLASH_ACR_LATENCY) /* Decreasing the number of wait states because of lower CPU frequency */ if (FLatency < __HAL_FLASH_GET_LATENCY()) 80029ec: 4b27 ldr r3, [pc, #156] ; (8002a8c <HAL_RCC_ClockConfig+0x1c0>) 80029ee: 681b ldr r3, [r3, #0] 80029f0: f003 0307 and.w r3, r3, #7 80029f4: 683a ldr r2, [r7, #0] 80029f6: 429a cmp r2, r3 80029f8: d210 bcs.n 8002a1c <HAL_RCC_ClockConfig+0x150> { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ __HAL_FLASH_SET_LATENCY(FLatency); 80029fa: 4b24 ldr r3, [pc, #144] ; (8002a8c <HAL_RCC_ClockConfig+0x1c0>) 80029fc: 681b ldr r3, [r3, #0] 80029fe: f023 0207 bic.w r2, r3, #7 8002a02: 4922 ldr r1, [pc, #136] ; (8002a8c <HAL_RCC_ClockConfig+0x1c0>) 8002a04: 683b ldr r3, [r7, #0] 8002a06: 4313 orrs r3, r2 8002a08: 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) 8002a0a: 4b20 ldr r3, [pc, #128] ; (8002a8c <HAL_RCC_ClockConfig+0x1c0>) 8002a0c: 681b ldr r3, [r3, #0] 8002a0e: f003 0307 and.w r3, r3, #7 8002a12: 683a ldr r2, [r7, #0] 8002a14: 429a cmp r2, r3 8002a16: d001 beq.n 8002a1c <HAL_RCC_ClockConfig+0x150> { return HAL_ERROR; 8002a18: 2301 movs r3, #1 8002a1a: e032 b.n 8002a82 <HAL_RCC_ClockConfig+0x1b6> } } #endif /* FLASH_ACR_LATENCY */ /*-------------------------- PCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) 8002a1c: 687b ldr r3, [r7, #4] 8002a1e: 681b ldr r3, [r3, #0] 8002a20: f003 0304 and.w r3, r3, #4 8002a24: 2b00 cmp r3, #0 8002a26: d008 beq.n 8002a3a <HAL_RCC_ClockConfig+0x16e> { assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider)); MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider); 8002a28: 4b19 ldr r3, [pc, #100] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 8002a2a: 685b ldr r3, [r3, #4] 8002a2c: f423 62e0 bic.w r2, r3, #1792 ; 0x700 8002a30: 687b ldr r3, [r7, #4] 8002a32: 68db ldr r3, [r3, #12] 8002a34: 4916 ldr r1, [pc, #88] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 8002a36: 4313 orrs r3, r2 8002a38: 604b str r3, [r1, #4] } /*-------------------------- PCLK2 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) 8002a3a: 687b ldr r3, [r7, #4] 8002a3c: 681b ldr r3, [r3, #0] 8002a3e: f003 0308 and.w r3, r3, #8 8002a42: 2b00 cmp r3, #0 8002a44: d009 beq.n 8002a5a <HAL_RCC_ClockConfig+0x18e> { assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider)); MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3)); 8002a46: 4b12 ldr r3, [pc, #72] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 8002a48: 685b ldr r3, [r3, #4] 8002a4a: f423 5260 bic.w r2, r3, #14336 ; 0x3800 8002a4e: 687b ldr r3, [r7, #4] 8002a50: 691b ldr r3, [r3, #16] 8002a52: 00db lsls r3, r3, #3 8002a54: 490e ldr r1, [pc, #56] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 8002a56: 4313 orrs r3, r2 8002a58: 604b str r3, [r1, #4] } /* Update the SystemCoreClock global variable */ SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos]; 8002a5a: f000 f821 bl 8002aa0 <HAL_RCC_GetSysClockFreq> 8002a5e: 4602 mov r2, r0 8002a60: 4b0b ldr r3, [pc, #44] ; (8002a90 <HAL_RCC_ClockConfig+0x1c4>) 8002a62: 685b ldr r3, [r3, #4] 8002a64: 091b lsrs r3, r3, #4 8002a66: f003 030f and.w r3, r3, #15 8002a6a: 490a ldr r1, [pc, #40] ; (8002a94 <HAL_RCC_ClockConfig+0x1c8>) 8002a6c: 5ccb ldrb r3, [r1, r3] 8002a6e: fa22 f303 lsr.w r3, r2, r3 8002a72: 4a09 ldr r2, [pc, #36] ; (8002a98 <HAL_RCC_ClockConfig+0x1cc>) 8002a74: 6013 str r3, [r2, #0] /* Configure the source of time base considering new system clocks settings*/ HAL_InitTick(uwTickPrio); 8002a76: 4b09 ldr r3, [pc, #36] ; (8002a9c <HAL_RCC_ClockConfig+0x1d0>) 8002a78: 681b ldr r3, [r3, #0] 8002a7a: 4618 mov r0, r3 8002a7c: f7fd fcd2 bl 8000424 <HAL_InitTick> return HAL_OK; 8002a80: 2300 movs r3, #0 } 8002a82: 4618 mov r0, r3 8002a84: 3710 adds r7, #16 8002a86: 46bd mov sp, r7 8002a88: bd80 pop {r7, pc} 8002a8a: bf00 nop 8002a8c: 40022000 .word 0x40022000 8002a90: 40021000 .word 0x40021000 8002a94: 08007998 .word 0x08007998 8002a98: 20000000 .word 0x20000000 8002a9c: 20000004 .word 0x20000004 08002aa0 <HAL_RCC_GetSysClockFreq>: * right SYSCLK value. Otherwise, any configuration based on this function will be incorrect. * * @retval SYSCLK frequency */ uint32_t HAL_RCC_GetSysClockFreq(void) { 8002aa0: b490 push {r4, r7} 8002aa2: b08a sub sp, #40 ; 0x28 8002aa4: 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}; 8002aa6: 4b29 ldr r3, [pc, #164] ; (8002b4c <HAL_RCC_GetSysClockFreq+0xac>) 8002aa8: 1d3c adds r4, r7, #4 8002aaa: cb0f ldmia r3, {r0, r1, r2, r3} 8002aac: 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}; 8002ab0: f240 2301 movw r3, #513 ; 0x201 8002ab4: 803b strh r3, [r7, #0] #endif /*RCC_CFGR2_PREDIV1*/ #endif uint32_t tmpreg = 0U, prediv = 0U, pllclk = 0U, pllmul = 0U; 8002ab6: 2300 movs r3, #0 8002ab8: 61fb str r3, [r7, #28] 8002aba: 2300 movs r3, #0 8002abc: 61bb str r3, [r7, #24] 8002abe: 2300 movs r3, #0 8002ac0: 627b str r3, [r7, #36] ; 0x24 8002ac2: 2300 movs r3, #0 8002ac4: 617b str r3, [r7, #20] uint32_t sysclockfreq = 0U; 8002ac6: 2300 movs r3, #0 8002ac8: 623b str r3, [r7, #32] #if defined(RCC_CFGR2_PREDIV1SRC) uint32_t prediv2 = 0U, pll2mul = 0U; #endif /*RCC_CFGR2_PREDIV1SRC*/ tmpreg = RCC->CFGR; 8002aca: 4b21 ldr r3, [pc, #132] ; (8002b50 <HAL_RCC_GetSysClockFreq+0xb0>) 8002acc: 685b ldr r3, [r3, #4] 8002ace: 61fb str r3, [r7, #28] /* Get SYSCLK source -------------------------------------------------------*/ switch (tmpreg & RCC_CFGR_SWS) 8002ad0: 69fb ldr r3, [r7, #28] 8002ad2: f003 030c and.w r3, r3, #12 8002ad6: 2b04 cmp r3, #4 8002ad8: d002 beq.n 8002ae0 <HAL_RCC_GetSysClockFreq+0x40> 8002ada: 2b08 cmp r3, #8 8002adc: d003 beq.n 8002ae6 <HAL_RCC_GetSysClockFreq+0x46> 8002ade: e02b b.n 8002b38 <HAL_RCC_GetSysClockFreq+0x98> { case RCC_SYSCLKSOURCE_STATUS_HSE: /* HSE used as system clock */ { sysclockfreq = HSE_VALUE; 8002ae0: 4b1c ldr r3, [pc, #112] ; (8002b54 <HAL_RCC_GetSysClockFreq+0xb4>) 8002ae2: 623b str r3, [r7, #32] break; 8002ae4: e02b b.n 8002b3e <HAL_RCC_GetSysClockFreq+0x9e> } case RCC_SYSCLKSOURCE_STATUS_PLLCLK: /* PLL used as system clock */ { pllmul = aPLLMULFactorTable[(uint32_t)(tmpreg & RCC_CFGR_PLLMULL) >> RCC_CFGR_PLLMULL_Pos]; 8002ae6: 69fb ldr r3, [r7, #28] 8002ae8: 0c9b lsrs r3, r3, #18 8002aea: f003 030f and.w r3, r3, #15 8002aee: 3328 adds r3, #40 ; 0x28 8002af0: 443b add r3, r7 8002af2: f813 3c24 ldrb.w r3, [r3, #-36] 8002af6: 617b str r3, [r7, #20] if ((tmpreg & RCC_CFGR_PLLSRC) != RCC_PLLSOURCE_HSI_DIV2) 8002af8: 69fb ldr r3, [r7, #28] 8002afa: f403 3380 and.w r3, r3, #65536 ; 0x10000 8002afe: 2b00 cmp r3, #0 8002b00: d012 beq.n 8002b28 <HAL_RCC_GetSysClockFreq+0x88> { #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]; 8002b02: 4b13 ldr r3, [pc, #76] ; (8002b50 <HAL_RCC_GetSysClockFreq+0xb0>) 8002b04: 685b ldr r3, [r3, #4] 8002b06: 0c5b lsrs r3, r3, #17 8002b08: f003 0301 and.w r3, r3, #1 8002b0c: 3328 adds r3, #40 ; 0x28 8002b0e: 443b add r3, r7 8002b10: f813 3c28 ldrb.w r3, [r3, #-40] 8002b14: 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); 8002b16: 697b ldr r3, [r7, #20] 8002b18: 4a0e ldr r2, [pc, #56] ; (8002b54 <HAL_RCC_GetSysClockFreq+0xb4>) 8002b1a: fb03 f202 mul.w r2, r3, r2 8002b1e: 69bb ldr r3, [r7, #24] 8002b20: fbb2 f3f3 udiv r3, r2, r3 8002b24: 627b str r3, [r7, #36] ; 0x24 8002b26: e004 b.n 8002b32 <HAL_RCC_GetSysClockFreq+0x92> #endif /*RCC_CFGR2_PREDIV1SRC*/ } else { /* HSI used as PLL clock source : PLLCLK = HSI/2 * PLLMUL */ pllclk = (uint32_t)((HSI_VALUE >> 1) * pllmul); 8002b28: 697b ldr r3, [r7, #20] 8002b2a: 4a0b ldr r2, [pc, #44] ; (8002b58 <HAL_RCC_GetSysClockFreq+0xb8>) 8002b2c: fb02 f303 mul.w r3, r2, r3 8002b30: 627b str r3, [r7, #36] ; 0x24 } sysclockfreq = pllclk; 8002b32: 6a7b ldr r3, [r7, #36] ; 0x24 8002b34: 623b str r3, [r7, #32] break; 8002b36: e002 b.n 8002b3e <HAL_RCC_GetSysClockFreq+0x9e> } case RCC_SYSCLKSOURCE_STATUS_HSI: /* HSI used as system clock source */ default: /* HSI used as system clock */ { sysclockfreq = HSI_VALUE; 8002b38: 4b06 ldr r3, [pc, #24] ; (8002b54 <HAL_RCC_GetSysClockFreq+0xb4>) 8002b3a: 623b str r3, [r7, #32] break; 8002b3c: bf00 nop } } return sysclockfreq; 8002b3e: 6a3b ldr r3, [r7, #32] } 8002b40: 4618 mov r0, r3 8002b42: 3728 adds r7, #40 ; 0x28 8002b44: 46bd mov sp, r7 8002b46: bc90 pop {r4, r7} 8002b48: 4770 bx lr 8002b4a: bf00 nop 8002b4c: 08007954 .word 0x08007954 8002b50: 40021000 .word 0x40021000 8002b54: 007a1200 .word 0x007a1200 8002b58: 003d0900 .word 0x003d0900 08002b5c <RCC_Delay>: * @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) { 8002b5c: b480 push {r7} 8002b5e: b085 sub sp, #20 8002b60: af00 add r7, sp, #0 8002b62: 6078 str r0, [r7, #4] __IO uint32_t Delay = mdelay * (SystemCoreClock / 8U / 1000U); 8002b64: 4b0a ldr r3, [pc, #40] ; (8002b90 <RCC_Delay+0x34>) 8002b66: 681b ldr r3, [r3, #0] 8002b68: 4a0a ldr r2, [pc, #40] ; (8002b94 <RCC_Delay+0x38>) 8002b6a: fba2 2303 umull r2, r3, r2, r3 8002b6e: 0a5b lsrs r3, r3, #9 8002b70: 687a ldr r2, [r7, #4] 8002b72: fb02 f303 mul.w r3, r2, r3 8002b76: 60fb str r3, [r7, #12] do { __NOP(); 8002b78: bf00 nop } while (Delay --); 8002b7a: 68fb ldr r3, [r7, #12] 8002b7c: 1e5a subs r2, r3, #1 8002b7e: 60fa str r2, [r7, #12] 8002b80: 2b00 cmp r3, #0 8002b82: d1f9 bne.n 8002b78 <RCC_Delay+0x1c> } 8002b84: bf00 nop 8002b86: bf00 nop 8002b88: 3714 adds r7, #20 8002b8a: 46bd mov sp, r7 8002b8c: bc80 pop {r7} 8002b8e: 4770 bx lr 8002b90: 20000000 .word 0x20000000 8002b94: 10624dd3 .word 0x10624dd3 08002b98 <HAL_RCCEx_PeriphCLKConfig>: * manually disable it. * * @retval HAL status */ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit) { 8002b98: b580 push {r7, lr} 8002b9a: b086 sub sp, #24 8002b9c: af00 add r7, sp, #0 8002b9e: 6078 str r0, [r7, #4] uint32_t tickstart = 0U, temp_reg = 0U; 8002ba0: 2300 movs r3, #0 8002ba2: 613b str r3, [r7, #16] 8002ba4: 2300 movs r3, #0 8002ba6: 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)) 8002ba8: 687b ldr r3, [r7, #4] 8002baa: 681b ldr r3, [r3, #0] 8002bac: f003 0301 and.w r3, r3, #1 8002bb0: 2b00 cmp r3, #0 8002bb2: d07d beq.n 8002cb0 <HAL_RCCEx_PeriphCLKConfig+0x118> { FlagStatus pwrclkchanged = RESET; 8002bb4: 2300 movs r3, #0 8002bb6: 75fb strb r3, [r7, #23] assert_param(IS_RCC_RTCCLKSOURCE(PeriphClkInit->RTCClockSelection)); /* 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()) 8002bb8: 4b4f ldr r3, [pc, #316] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002bba: 69db ldr r3, [r3, #28] 8002bbc: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 8002bc0: 2b00 cmp r3, #0 8002bc2: d10d bne.n 8002be0 <HAL_RCCEx_PeriphCLKConfig+0x48> { __HAL_RCC_PWR_CLK_ENABLE(); 8002bc4: 4b4c ldr r3, [pc, #304] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002bc6: 69db ldr r3, [r3, #28] 8002bc8: 4a4b ldr r2, [pc, #300] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002bca: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000 8002bce: 61d3 str r3, [r2, #28] 8002bd0: 4b49 ldr r3, [pc, #292] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002bd2: 69db ldr r3, [r3, #28] 8002bd4: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 8002bd8: 60bb str r3, [r7, #8] 8002bda: 68bb ldr r3, [r7, #8] pwrclkchanged = SET; 8002bdc: 2301 movs r3, #1 8002bde: 75fb strb r3, [r7, #23] } if (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 8002be0: 4b46 ldr r3, [pc, #280] ; (8002cfc <HAL_RCCEx_PeriphCLKConfig+0x164>) 8002be2: 681b ldr r3, [r3, #0] 8002be4: f403 7380 and.w r3, r3, #256 ; 0x100 8002be8: 2b00 cmp r3, #0 8002bea: d118 bne.n 8002c1e <HAL_RCCEx_PeriphCLKConfig+0x86> { /* Enable write access to Backup domain */ SET_BIT(PWR->CR, PWR_CR_DBP); 8002bec: 4b43 ldr r3, [pc, #268] ; (8002cfc <HAL_RCCEx_PeriphCLKConfig+0x164>) 8002bee: 681b ldr r3, [r3, #0] 8002bf0: 4a42 ldr r2, [pc, #264] ; (8002cfc <HAL_RCCEx_PeriphCLKConfig+0x164>) 8002bf2: f443 7380 orr.w r3, r3, #256 ; 0x100 8002bf6: 6013 str r3, [r2, #0] /* Wait for Backup domain Write protection disable */ tickstart = HAL_GetTick(); 8002bf8: f7fd fc56 bl 80004a8 <HAL_GetTick> 8002bfc: 6138 str r0, [r7, #16] while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 8002bfe: e008 b.n 8002c12 <HAL_RCCEx_PeriphCLKConfig+0x7a> { if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) 8002c00: f7fd fc52 bl 80004a8 <HAL_GetTick> 8002c04: 4602 mov r2, r0 8002c06: 693b ldr r3, [r7, #16] 8002c08: 1ad3 subs r3, r2, r3 8002c0a: 2b64 cmp r3, #100 ; 0x64 8002c0c: d901 bls.n 8002c12 <HAL_RCCEx_PeriphCLKConfig+0x7a> { return HAL_TIMEOUT; 8002c0e: 2303 movs r3, #3 8002c10: e06d b.n 8002cee <HAL_RCCEx_PeriphCLKConfig+0x156> while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) 8002c12: 4b3a ldr r3, [pc, #232] ; (8002cfc <HAL_RCCEx_PeriphCLKConfig+0x164>) 8002c14: 681b ldr r3, [r3, #0] 8002c16: f403 7380 and.w r3, r3, #256 ; 0x100 8002c1a: 2b00 cmp r3, #0 8002c1c: d0f0 beq.n 8002c00 <HAL_RCCEx_PeriphCLKConfig+0x68> } } } /* Reset the Backup domain only if the RTC Clock source selection is modified from reset value */ temp_reg = (RCC->BDCR & RCC_BDCR_RTCSEL); 8002c1e: 4b36 ldr r3, [pc, #216] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002c20: 6a1b ldr r3, [r3, #32] 8002c22: f403 7340 and.w r3, r3, #768 ; 0x300 8002c26: 60fb str r3, [r7, #12] if ((temp_reg != 0x00000000U) && (temp_reg != (PeriphClkInit->RTCClockSelection & RCC_BDCR_RTCSEL))) 8002c28: 68fb ldr r3, [r7, #12] 8002c2a: 2b00 cmp r3, #0 8002c2c: d02e beq.n 8002c8c <HAL_RCCEx_PeriphCLKConfig+0xf4> 8002c2e: 687b ldr r3, [r7, #4] 8002c30: 685b ldr r3, [r3, #4] 8002c32: f403 7340 and.w r3, r3, #768 ; 0x300 8002c36: 68fa ldr r2, [r7, #12] 8002c38: 429a cmp r2, r3 8002c3a: d027 beq.n 8002c8c <HAL_RCCEx_PeriphCLKConfig+0xf4> { /* Store the content of BDCR register before the reset of Backup Domain */ temp_reg = (RCC->BDCR & ~(RCC_BDCR_RTCSEL)); 8002c3c: 4b2e ldr r3, [pc, #184] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002c3e: 6a1b ldr r3, [r3, #32] 8002c40: f423 7340 bic.w r3, r3, #768 ; 0x300 8002c44: 60fb str r3, [r7, #12] /* RTC Clock selection can be changed only if the Backup Domain is reset */ __HAL_RCC_BACKUPRESET_FORCE(); 8002c46: 4b2e ldr r3, [pc, #184] ; (8002d00 <HAL_RCCEx_PeriphCLKConfig+0x168>) 8002c48: 2201 movs r2, #1 8002c4a: 601a str r2, [r3, #0] __HAL_RCC_BACKUPRESET_RELEASE(); 8002c4c: 4b2c ldr r3, [pc, #176] ; (8002d00 <HAL_RCCEx_PeriphCLKConfig+0x168>) 8002c4e: 2200 movs r2, #0 8002c50: 601a str r2, [r3, #0] /* Restore the Content of BDCR register */ RCC->BDCR = temp_reg; 8002c52: 4a29 ldr r2, [pc, #164] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002c54: 68fb ldr r3, [r7, #12] 8002c56: 6213 str r3, [r2, #32] /* Wait for LSERDY if LSE was enabled */ if (HAL_IS_BIT_SET(temp_reg, RCC_BDCR_LSEON)) 8002c58: 68fb ldr r3, [r7, #12] 8002c5a: f003 0301 and.w r3, r3, #1 8002c5e: 2b00 cmp r3, #0 8002c60: d014 beq.n 8002c8c <HAL_RCCEx_PeriphCLKConfig+0xf4> { /* Get Start Tick */ tickstart = HAL_GetTick(); 8002c62: f7fd fc21 bl 80004a8 <HAL_GetTick> 8002c66: 6138 str r0, [r7, #16] /* Wait till LSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) 8002c68: e00a b.n 8002c80 <HAL_RCCEx_PeriphCLKConfig+0xe8> { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 8002c6a: f7fd fc1d bl 80004a8 <HAL_GetTick> 8002c6e: 4602 mov r2, r0 8002c70: 693b ldr r3, [r7, #16] 8002c72: 1ad3 subs r3, r2, r3 8002c74: f241 3288 movw r2, #5000 ; 0x1388 8002c78: 4293 cmp r3, r2 8002c7a: d901 bls.n 8002c80 <HAL_RCCEx_PeriphCLKConfig+0xe8> { return HAL_TIMEOUT; 8002c7c: 2303 movs r3, #3 8002c7e: e036 b.n 8002cee <HAL_RCCEx_PeriphCLKConfig+0x156> while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) 8002c80: 4b1d ldr r3, [pc, #116] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002c82: 6a1b ldr r3, [r3, #32] 8002c84: f003 0302 and.w r3, r3, #2 8002c88: 2b00 cmp r3, #0 8002c8a: d0ee beq.n 8002c6a <HAL_RCCEx_PeriphCLKConfig+0xd2> } } } } __HAL_RCC_RTC_CONFIG(PeriphClkInit->RTCClockSelection); 8002c8c: 4b1a ldr r3, [pc, #104] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002c8e: 6a1b ldr r3, [r3, #32] 8002c90: f423 7240 bic.w r2, r3, #768 ; 0x300 8002c94: 687b ldr r3, [r7, #4] 8002c96: 685b ldr r3, [r3, #4] 8002c98: 4917 ldr r1, [pc, #92] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002c9a: 4313 orrs r3, r2 8002c9c: 620b str r3, [r1, #32] /* Require to disable power clock if necessary */ if (pwrclkchanged == SET) 8002c9e: 7dfb ldrb r3, [r7, #23] 8002ca0: 2b01 cmp r3, #1 8002ca2: d105 bne.n 8002cb0 <HAL_RCCEx_PeriphCLKConfig+0x118> { __HAL_RCC_PWR_CLK_DISABLE(); 8002ca4: 4b14 ldr r3, [pc, #80] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002ca6: 69db ldr r3, [r3, #28] 8002ca8: 4a13 ldr r2, [pc, #76] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002caa: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000 8002cae: 61d3 str r3, [r2, #28] } } /*------------------------------ ADC clock Configuration ------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_ADC) == RCC_PERIPHCLK_ADC) 8002cb0: 687b ldr r3, [r7, #4] 8002cb2: 681b ldr r3, [r3, #0] 8002cb4: f003 0302 and.w r3, r3, #2 8002cb8: 2b00 cmp r3, #0 8002cba: d008 beq.n 8002cce <HAL_RCCEx_PeriphCLKConfig+0x136> { /* Check the parameters */ assert_param(IS_RCC_ADCPLLCLK_DIV(PeriphClkInit->AdcClockSelection)); /* Configure the ADC clock source */ __HAL_RCC_ADC_CONFIG(PeriphClkInit->AdcClockSelection); 8002cbc: 4b0e ldr r3, [pc, #56] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002cbe: 685b ldr r3, [r3, #4] 8002cc0: f423 4240 bic.w r2, r3, #49152 ; 0xc000 8002cc4: 687b ldr r3, [r7, #4] 8002cc6: 689b ldr r3, [r3, #8] 8002cc8: 490b ldr r1, [pc, #44] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002cca: 4313 orrs r3, r2 8002ccc: 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) 8002cce: 687b ldr r3, [r7, #4] 8002cd0: 681b ldr r3, [r3, #0] 8002cd2: f003 0310 and.w r3, r3, #16 8002cd6: 2b00 cmp r3, #0 8002cd8: d008 beq.n 8002cec <HAL_RCCEx_PeriphCLKConfig+0x154> { /* Check the parameters */ assert_param(IS_RCC_USBPLLCLK_DIV(PeriphClkInit->UsbClockSelection)); /* Configure the USB clock source */ __HAL_RCC_USB_CONFIG(PeriphClkInit->UsbClockSelection); 8002cda: 4b07 ldr r3, [pc, #28] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002cdc: 685b ldr r3, [r3, #4] 8002cde: f423 0280 bic.w r2, r3, #4194304 ; 0x400000 8002ce2: 687b ldr r3, [r7, #4] 8002ce4: 68db ldr r3, [r3, #12] 8002ce6: 4904 ldr r1, [pc, #16] ; (8002cf8 <HAL_RCCEx_PeriphCLKConfig+0x160>) 8002ce8: 4313 orrs r3, r2 8002cea: 604b str r3, [r1, #4] } #endif /* STM32F102x6 || STM32F102xB || STM32F103x6 || STM32F103xB || STM32F103xE || STM32F103xG || STM32F105xC || STM32F107xC */ return HAL_OK; 8002cec: 2300 movs r3, #0 } 8002cee: 4618 mov r0, r3 8002cf0: 3718 adds r7, #24 8002cf2: 46bd mov sp, r7 8002cf4: bd80 pop {r7, pc} 8002cf6: bf00 nop 8002cf8: 40021000 .word 0x40021000 8002cfc: 40007000 .word 0x40007000 8002d00: 42420440 .word 0x42420440 08002d04 <USB_CoreInit>: * @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) { 8002d04: b084 sub sp, #16 8002d06: b480 push {r7} 8002d08: b083 sub sp, #12 8002d0a: af00 add r7, sp, #0 8002d0c: 6078 str r0, [r7, #4] 8002d0e: f107 0014 add.w r0, r7, #20 8002d12: 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; 8002d16: 2300 movs r3, #0 } 8002d18: 4618 mov r0, r3 8002d1a: 370c adds r7, #12 8002d1c: 46bd mov sp, r7 8002d1e: bc80 pop {r7} 8002d20: b004 add sp, #16 8002d22: 4770 bx lr 08002d24 <USB_EnableGlobalInt>: * 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) { 8002d24: b480 push {r7} 8002d26: b085 sub sp, #20 8002d28: af00 add r7, sp, #0 8002d2a: 6078 str r0, [r7, #4] uint32_t winterruptmask; /* Clear pending interrupts */ USBx->ISTR = 0U; 8002d2c: 687b ldr r3, [r7, #4] 8002d2e: 2200 movs r2, #0 8002d30: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 /* Set winterruptmask variable */ winterruptmask = USB_CNTR_CTRM | USB_CNTR_WKUPM | 8002d34: f44f 433f mov.w r3, #48896 ; 0xbf00 8002d38: 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; 8002d3a: 68fb ldr r3, [r7, #12] 8002d3c: b29a uxth r2, r3 8002d3e: 687b ldr r3, [r7, #4] 8002d40: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 return HAL_OK; 8002d44: 2300 movs r3, #0 } 8002d46: 4618 mov r0, r3 8002d48: 3714 adds r7, #20 8002d4a: 46bd mov sp, r7 8002d4c: bc80 pop {r7} 8002d4e: 4770 bx lr 08002d50 <USB_DisableGlobalInt>: * 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) { 8002d50: b480 push {r7} 8002d52: b085 sub sp, #20 8002d54: af00 add r7, sp, #0 8002d56: 6078 str r0, [r7, #4] uint32_t winterruptmask; /* Set winterruptmask variable */ winterruptmask = USB_CNTR_CTRM | USB_CNTR_WKUPM | 8002d58: f44f 433f mov.w r3, #48896 ; 0xbf00 8002d5c: 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); 8002d5e: 687b ldr r3, [r7, #4] 8002d60: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40 8002d64: b29a uxth r2, r3 8002d66: 68fb ldr r3, [r7, #12] 8002d68: b29b uxth r3, r3 8002d6a: 43db mvns r3, r3 8002d6c: b29b uxth r3, r3 8002d6e: 4013 ands r3, r2 8002d70: b29a uxth r2, r3 8002d72: 687b ldr r3, [r7, #4] 8002d74: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 return HAL_OK; 8002d78: 2300 movs r3, #0 } 8002d7a: 4618 mov r0, r3 8002d7c: 3714 adds r7, #20 8002d7e: 46bd mov sp, r7 8002d80: bc80 pop {r7} 8002d82: 4770 bx lr 08002d84 <USB_SetCurrentMode>: * 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) { 8002d84: b480 push {r7} 8002d86: b083 sub sp, #12 8002d88: af00 add r7, sp, #0 8002d8a: 6078 str r0, [r7, #4] 8002d8c: 460b mov r3, r1 8002d8e: 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; 8002d90: 2300 movs r3, #0 } 8002d92: 4618 mov r0, r3 8002d94: 370c adds r7, #12 8002d96: 46bd mov sp, r7 8002d98: bc80 pop {r7} 8002d9a: 4770 bx lr 08002d9c <USB_DevInit>: * @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) { 8002d9c: b084 sub sp, #16 8002d9e: b480 push {r7} 8002da0: b083 sub sp, #12 8002da2: af00 add r7, sp, #0 8002da4: 6078 str r0, [r7, #4] 8002da6: f107 0014 add.w r0, r7, #20 8002daa: 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; 8002dae: 687b ldr r3, [r7, #4] 8002db0: 2201 movs r2, #1 8002db2: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 /* CNTR_FRES = 0 */ USBx->CNTR = 0U; 8002db6: 687b ldr r3, [r7, #4] 8002db8: 2200 movs r2, #0 8002dba: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 /* Clear pending interrupts */ USBx->ISTR = 0U; 8002dbe: 687b ldr r3, [r7, #4] 8002dc0: 2200 movs r2, #0 8002dc2: f8a3 2044 strh.w r2, [r3, #68] ; 0x44 /*Set Btable Address*/ USBx->BTABLE = BTABLE_ADDRESS; 8002dc6: 687b ldr r3, [r7, #4] 8002dc8: 2200 movs r2, #0 8002dca: f8a3 2050 strh.w r2, [r3, #80] ; 0x50 return HAL_OK; 8002dce: 2300 movs r3, #0 } 8002dd0: 4618 mov r0, r3 8002dd2: 370c adds r7, #12 8002dd4: 46bd mov sp, r7 8002dd6: bc80 pop {r7} 8002dd8: b004 add sp, #16 8002dda: 4770 bx lr 08002ddc <USB_ActivateEndpoint>: * @param USBx Selected device * @param ep pointer to endpoint structure * @retval HAL status */ HAL_StatusTypeDef USB_ActivateEndpoint(USB_TypeDef *USBx, USB_EPTypeDef *ep) { 8002ddc: b480 push {r7} 8002dde: b09b sub sp, #108 ; 0x6c 8002de0: af00 add r7, sp, #0 8002de2: 6078 str r0, [r7, #4] 8002de4: 6039 str r1, [r7, #0] HAL_StatusTypeDef ret = HAL_OK; 8002de6: 2300 movs r3, #0 8002de8: f887 3067 strb.w r3, [r7, #103] ; 0x67 uint16_t wEpRegVal; wEpRegVal = PCD_GET_ENDPOINT(USBx, ep->num) & USB_EP_T_MASK; 8002dec: 687a ldr r2, [r7, #4] 8002dee: 683b ldr r3, [r7, #0] 8002df0: 781b ldrb r3, [r3, #0] 8002df2: 009b lsls r3, r3, #2 8002df4: 4413 add r3, r2 8002df6: 881b ldrh r3, [r3, #0] 8002df8: b29b uxth r3, r3 8002dfa: f423 43ec bic.w r3, r3, #30208 ; 0x7600 8002dfe: f023 0370 bic.w r3, r3, #112 ; 0x70 8002e02: f8a7 3064 strh.w r3, [r7, #100] ; 0x64 /* initialize Endpoint */ switch (ep->type) 8002e06: 683b ldr r3, [r7, #0] 8002e08: 78db ldrb r3, [r3, #3] 8002e0a: 2b03 cmp r3, #3 8002e0c: d81f bhi.n 8002e4e <USB_ActivateEndpoint+0x72> 8002e0e: a201 add r2, pc, #4 ; (adr r2, 8002e14 <USB_ActivateEndpoint+0x38>) 8002e10: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8002e14: 08002e25 .word 0x08002e25 8002e18: 08002e41 .word 0x08002e41 8002e1c: 08002e57 .word 0x08002e57 8002e20: 08002e33 .word 0x08002e33 { case EP_TYPE_CTRL: wEpRegVal |= USB_EP_CONTROL; 8002e24: f8b7 3064 ldrh.w r3, [r7, #100] ; 0x64 8002e28: f443 7300 orr.w r3, r3, #512 ; 0x200 8002e2c: f8a7 3064 strh.w r3, [r7, #100] ; 0x64 break; 8002e30: e012 b.n 8002e58 <USB_ActivateEndpoint+0x7c> case EP_TYPE_BULK: wEpRegVal |= USB_EP_BULK; break; case EP_TYPE_INTR: wEpRegVal |= USB_EP_INTERRUPT; 8002e32: f8b7 3064 ldrh.w r3, [r7, #100] ; 0x64 8002e36: f443 63c0 orr.w r3, r3, #1536 ; 0x600 8002e3a: f8a7 3064 strh.w r3, [r7, #100] ; 0x64 break; 8002e3e: e00b b.n 8002e58 <USB_ActivateEndpoint+0x7c> case EP_TYPE_ISOC: wEpRegVal |= USB_EP_ISOCHRONOUS; 8002e40: f8b7 3064 ldrh.w r3, [r7, #100] ; 0x64 8002e44: f443 6380 orr.w r3, r3, #1024 ; 0x400 8002e48: f8a7 3064 strh.w r3, [r7, #100] ; 0x64 break; 8002e4c: e004 b.n 8002e58 <USB_ActivateEndpoint+0x7c> default: ret = HAL_ERROR; 8002e4e: 2301 movs r3, #1 8002e50: f887 3067 strb.w r3, [r7, #103] ; 0x67 break; 8002e54: e000 b.n 8002e58 <USB_ActivateEndpoint+0x7c> break; 8002e56: bf00 nop } PCD_SET_ENDPOINT(USBx, ep->num, (wEpRegVal | USB_EP_CTR_RX | USB_EP_CTR_TX)); 8002e58: 687a ldr r2, [r7, #4] 8002e5a: 683b ldr r3, [r7, #0] 8002e5c: 781b ldrb r3, [r3, #0] 8002e5e: 009b lsls r3, r3, #2 8002e60: 441a add r2, r3 8002e62: f8b7 3064 ldrh.w r3, [r7, #100] ; 0x64 8002e66: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002e6a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002e6e: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002e72: f043 0380 orr.w r3, r3, #128 ; 0x80 8002e76: b29b uxth r3, r3 8002e78: 8013 strh r3, [r2, #0] PCD_SET_EP_ADDRESS(USBx, ep->num, ep->num); 8002e7a: 687a ldr r2, [r7, #4] 8002e7c: 683b ldr r3, [r7, #0] 8002e7e: 781b ldrb r3, [r3, #0] 8002e80: 009b lsls r3, r3, #2 8002e82: 4413 add r3, r2 8002e84: 881b ldrh r3, [r3, #0] 8002e86: b29b uxth r3, r3 8002e88: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002e8c: f023 0370 bic.w r3, r3, #112 ; 0x70 8002e90: b29a uxth r2, r3 8002e92: 683b ldr r3, [r7, #0] 8002e94: 781b ldrb r3, [r3, #0] 8002e96: b29b uxth r3, r3 8002e98: 4313 orrs r3, r2 8002e9a: f8a7 305e strh.w r3, [r7, #94] ; 0x5e 8002e9e: 687a ldr r2, [r7, #4] 8002ea0: 683b ldr r3, [r7, #0] 8002ea2: 781b ldrb r3, [r3, #0] 8002ea4: 009b lsls r3, r3, #2 8002ea6: 441a add r2, r3 8002ea8: f8b7 305e ldrh.w r3, [r7, #94] ; 0x5e 8002eac: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002eb0: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002eb4: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002eb8: f043 0380 orr.w r3, r3, #128 ; 0x80 8002ebc: b29b uxth r3, r3 8002ebe: 8013 strh r3, [r2, #0] if (ep->doublebuffer == 0U) 8002ec0: 683b ldr r3, [r7, #0] 8002ec2: 7b1b ldrb r3, [r3, #12] 8002ec4: 2b00 cmp r3, #0 8002ec6: f040 8149 bne.w 800315c <USB_ActivateEndpoint+0x380> { if (ep->is_in != 0U) 8002eca: 683b ldr r3, [r7, #0] 8002ecc: 785b ldrb r3, [r3, #1] 8002ece: 2b00 cmp r3, #0 8002ed0: f000 8084 beq.w 8002fdc <USB_ActivateEndpoint+0x200> { /*Set the endpoint Transmit buffer address */ PCD_SET_EP_TX_ADDRESS(USBx, ep->num, ep->pmaadress); 8002ed4: 687b ldr r3, [r7, #4] 8002ed6: 617b str r3, [r7, #20] 8002ed8: 687b ldr r3, [r7, #4] 8002eda: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8002ede: b29b uxth r3, r3 8002ee0: 461a mov r2, r3 8002ee2: 697b ldr r3, [r7, #20] 8002ee4: 4413 add r3, r2 8002ee6: 617b str r3, [r7, #20] 8002ee8: 683b ldr r3, [r7, #0] 8002eea: 781b ldrb r3, [r3, #0] 8002eec: 011a lsls r2, r3, #4 8002eee: 697b ldr r3, [r7, #20] 8002ef0: 4413 add r3, r2 8002ef2: f503 6380 add.w r3, r3, #1024 ; 0x400 8002ef6: 613b str r3, [r7, #16] 8002ef8: 683b ldr r3, [r7, #0] 8002efa: 88db ldrh r3, [r3, #6] 8002efc: 085b lsrs r3, r3, #1 8002efe: b29b uxth r3, r3 8002f00: 005b lsls r3, r3, #1 8002f02: b29a uxth r2, r3 8002f04: 693b ldr r3, [r7, #16] 8002f06: 801a strh r2, [r3, #0] PCD_CLEAR_TX_DTOG(USBx, ep->num); 8002f08: 687a ldr r2, [r7, #4] 8002f0a: 683b ldr r3, [r7, #0] 8002f0c: 781b ldrb r3, [r3, #0] 8002f0e: 009b lsls r3, r3, #2 8002f10: 4413 add r3, r2 8002f12: 881b ldrh r3, [r3, #0] 8002f14: 81fb strh r3, [r7, #14] 8002f16: 89fb ldrh r3, [r7, #14] 8002f18: f003 0340 and.w r3, r3, #64 ; 0x40 8002f1c: 2b00 cmp r3, #0 8002f1e: d01b beq.n 8002f58 <USB_ActivateEndpoint+0x17c> 8002f20: 687a ldr r2, [r7, #4] 8002f22: 683b ldr r3, [r7, #0] 8002f24: 781b ldrb r3, [r3, #0] 8002f26: 009b lsls r3, r3, #2 8002f28: 4413 add r3, r2 8002f2a: 881b ldrh r3, [r3, #0] 8002f2c: b29b uxth r3, r3 8002f2e: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002f32: f023 0370 bic.w r3, r3, #112 ; 0x70 8002f36: 81bb strh r3, [r7, #12] 8002f38: 687a ldr r2, [r7, #4] 8002f3a: 683b ldr r3, [r7, #0] 8002f3c: 781b ldrb r3, [r3, #0] 8002f3e: 009b lsls r3, r3, #2 8002f40: 441a add r2, r3 8002f42: 89bb ldrh r3, [r7, #12] 8002f44: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002f48: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002f4c: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002f50: f043 03c0 orr.w r3, r3, #192 ; 0xc0 8002f54: b29b uxth r3, r3 8002f56: 8013 strh r3, [r2, #0] if (ep->type != EP_TYPE_ISOC) 8002f58: 683b ldr r3, [r7, #0] 8002f5a: 78db ldrb r3, [r3, #3] 8002f5c: 2b01 cmp r3, #1 8002f5e: d020 beq.n 8002fa2 <USB_ActivateEndpoint+0x1c6> { /* Configure NAK status for the Endpoint */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_NAK); 8002f60: 687a ldr r2, [r7, #4] 8002f62: 683b ldr r3, [r7, #0] 8002f64: 781b ldrb r3, [r3, #0] 8002f66: 009b lsls r3, r3, #2 8002f68: 4413 add r3, r2 8002f6a: 881b ldrh r3, [r3, #0] 8002f6c: b29b uxth r3, r3 8002f6e: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002f72: f023 0340 bic.w r3, r3, #64 ; 0x40 8002f76: 813b strh r3, [r7, #8] 8002f78: 893b ldrh r3, [r7, #8] 8002f7a: f083 0320 eor.w r3, r3, #32 8002f7e: 813b strh r3, [r7, #8] 8002f80: 687a ldr r2, [r7, #4] 8002f82: 683b ldr r3, [r7, #0] 8002f84: 781b ldrb r3, [r3, #0] 8002f86: 009b lsls r3, r3, #2 8002f88: 441a add r2, r3 8002f8a: 893b ldrh r3, [r7, #8] 8002f8c: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002f90: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002f94: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002f98: f043 0380 orr.w r3, r3, #128 ; 0x80 8002f9c: b29b uxth r3, r3 8002f9e: 8013 strh r3, [r2, #0] 8002fa0: e27f b.n 80034a2 <USB_ActivateEndpoint+0x6c6> } else { /* Configure TX Endpoint to disabled state */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 8002fa2: 687a ldr r2, [r7, #4] 8002fa4: 683b ldr r3, [r7, #0] 8002fa6: 781b ldrb r3, [r3, #0] 8002fa8: 009b lsls r3, r3, #2 8002faa: 4413 add r3, r2 8002fac: 881b ldrh r3, [r3, #0] 8002fae: b29b uxth r3, r3 8002fb0: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8002fb4: f023 0340 bic.w r3, r3, #64 ; 0x40 8002fb8: 817b strh r3, [r7, #10] 8002fba: 687a ldr r2, [r7, #4] 8002fbc: 683b ldr r3, [r7, #0] 8002fbe: 781b ldrb r3, [r3, #0] 8002fc0: 009b lsls r3, r3, #2 8002fc2: 441a add r2, r3 8002fc4: 897b ldrh r3, [r7, #10] 8002fc6: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8002fca: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8002fce: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8002fd2: f043 0380 orr.w r3, r3, #128 ; 0x80 8002fd6: b29b uxth r3, r3 8002fd8: 8013 strh r3, [r2, #0] 8002fda: e262 b.n 80034a2 <USB_ActivateEndpoint+0x6c6> } } else { /*Set the endpoint Receive buffer address */ PCD_SET_EP_RX_ADDRESS(USBx, ep->num, ep->pmaadress); 8002fdc: 687b ldr r3, [r7, #4] 8002fde: 62fb str r3, [r7, #44] ; 0x2c 8002fe0: 687b ldr r3, [r7, #4] 8002fe2: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8002fe6: b29b uxth r3, r3 8002fe8: 461a mov r2, r3 8002fea: 6afb ldr r3, [r7, #44] ; 0x2c 8002fec: 4413 add r3, r2 8002fee: 62fb str r3, [r7, #44] ; 0x2c 8002ff0: 683b ldr r3, [r7, #0] 8002ff2: 781b ldrb r3, [r3, #0] 8002ff4: 011a lsls r2, r3, #4 8002ff6: 6afb ldr r3, [r7, #44] ; 0x2c 8002ff8: 4413 add r3, r2 8002ffa: f503 6381 add.w r3, r3, #1032 ; 0x408 8002ffe: 62bb str r3, [r7, #40] ; 0x28 8003000: 683b ldr r3, [r7, #0] 8003002: 88db ldrh r3, [r3, #6] 8003004: 085b lsrs r3, r3, #1 8003006: b29b uxth r3, r3 8003008: 005b lsls r3, r3, #1 800300a: b29a uxth r2, r3 800300c: 6abb ldr r3, [r7, #40] ; 0x28 800300e: 801a strh r2, [r3, #0] /*Set the endpoint Receive buffer counter*/ PCD_SET_EP_RX_CNT(USBx, ep->num, ep->maxpacket); 8003010: 687b ldr r3, [r7, #4] 8003012: 627b str r3, [r7, #36] ; 0x24 8003014: 687b ldr r3, [r7, #4] 8003016: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 800301a: b29b uxth r3, r3 800301c: 461a mov r2, r3 800301e: 6a7b ldr r3, [r7, #36] ; 0x24 8003020: 4413 add r3, r2 8003022: 627b str r3, [r7, #36] ; 0x24 8003024: 683b ldr r3, [r7, #0] 8003026: 781b ldrb r3, [r3, #0] 8003028: 011a lsls r2, r3, #4 800302a: 6a7b ldr r3, [r7, #36] ; 0x24 800302c: 4413 add r3, r2 800302e: f203 430c addw r3, r3, #1036 ; 0x40c 8003032: 623b str r3, [r7, #32] 8003034: 683b ldr r3, [r7, #0] 8003036: 691b ldr r3, [r3, #16] 8003038: 2b00 cmp r3, #0 800303a: d112 bne.n 8003062 <USB_ActivateEndpoint+0x286> 800303c: 6a3b ldr r3, [r7, #32] 800303e: 881b ldrh r3, [r3, #0] 8003040: b29b uxth r3, r3 8003042: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8003046: b29a uxth r2, r3 8003048: 6a3b ldr r3, [r7, #32] 800304a: 801a strh r2, [r3, #0] 800304c: 6a3b ldr r3, [r7, #32] 800304e: 881b ldrh r3, [r3, #0] 8003050: b29b uxth r3, r3 8003052: ea6f 4343 mvn.w r3, r3, lsl #17 8003056: ea6f 4353 mvn.w r3, r3, lsr #17 800305a: b29a uxth r2, r3 800305c: 6a3b ldr r3, [r7, #32] 800305e: 801a strh r2, [r3, #0] 8003060: e02f b.n 80030c2 <USB_ActivateEndpoint+0x2e6> 8003062: 683b ldr r3, [r7, #0] 8003064: 691b ldr r3, [r3, #16] 8003066: 2b3e cmp r3, #62 ; 0x3e 8003068: d813 bhi.n 8003092 <USB_ActivateEndpoint+0x2b6> 800306a: 683b ldr r3, [r7, #0] 800306c: 691b ldr r3, [r3, #16] 800306e: 085b lsrs r3, r3, #1 8003070: 663b str r3, [r7, #96] ; 0x60 8003072: 683b ldr r3, [r7, #0] 8003074: 691b ldr r3, [r3, #16] 8003076: f003 0301 and.w r3, r3, #1 800307a: 2b00 cmp r3, #0 800307c: d002 beq.n 8003084 <USB_ActivateEndpoint+0x2a8> 800307e: 6e3b ldr r3, [r7, #96] ; 0x60 8003080: 3301 adds r3, #1 8003082: 663b str r3, [r7, #96] ; 0x60 8003084: 6e3b ldr r3, [r7, #96] ; 0x60 8003086: b29b uxth r3, r3 8003088: 029b lsls r3, r3, #10 800308a: b29a uxth r2, r3 800308c: 6a3b ldr r3, [r7, #32] 800308e: 801a strh r2, [r3, #0] 8003090: e017 b.n 80030c2 <USB_ActivateEndpoint+0x2e6> 8003092: 683b ldr r3, [r7, #0] 8003094: 691b ldr r3, [r3, #16] 8003096: 095b lsrs r3, r3, #5 8003098: 663b str r3, [r7, #96] ; 0x60 800309a: 683b ldr r3, [r7, #0] 800309c: 691b ldr r3, [r3, #16] 800309e: f003 031f and.w r3, r3, #31 80030a2: 2b00 cmp r3, #0 80030a4: d102 bne.n 80030ac <USB_ActivateEndpoint+0x2d0> 80030a6: 6e3b ldr r3, [r7, #96] ; 0x60 80030a8: 3b01 subs r3, #1 80030aa: 663b str r3, [r7, #96] ; 0x60 80030ac: 6e3b ldr r3, [r7, #96] ; 0x60 80030ae: b29b uxth r3, r3 80030b0: 029b lsls r3, r3, #10 80030b2: b29b uxth r3, r3 80030b4: ea6f 4343 mvn.w r3, r3, lsl #17 80030b8: ea6f 4353 mvn.w r3, r3, lsr #17 80030bc: b29a uxth r2, r3 80030be: 6a3b ldr r3, [r7, #32] 80030c0: 801a strh r2, [r3, #0] PCD_CLEAR_RX_DTOG(USBx, ep->num); 80030c2: 687a ldr r2, [r7, #4] 80030c4: 683b ldr r3, [r7, #0] 80030c6: 781b ldrb r3, [r3, #0] 80030c8: 009b lsls r3, r3, #2 80030ca: 4413 add r3, r2 80030cc: 881b ldrh r3, [r3, #0] 80030ce: 83fb strh r3, [r7, #30] 80030d0: 8bfb ldrh r3, [r7, #30] 80030d2: f403 4380 and.w r3, r3, #16384 ; 0x4000 80030d6: 2b00 cmp r3, #0 80030d8: d01b beq.n 8003112 <USB_ActivateEndpoint+0x336> 80030da: 687a ldr r2, [r7, #4] 80030dc: 683b ldr r3, [r7, #0] 80030de: 781b ldrb r3, [r3, #0] 80030e0: 009b lsls r3, r3, #2 80030e2: 4413 add r3, r2 80030e4: 881b ldrh r3, [r3, #0] 80030e6: b29b uxth r3, r3 80030e8: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80030ec: f023 0370 bic.w r3, r3, #112 ; 0x70 80030f0: 83bb strh r3, [r7, #28] 80030f2: 687a ldr r2, [r7, #4] 80030f4: 683b ldr r3, [r7, #0] 80030f6: 781b ldrb r3, [r3, #0] 80030f8: 009b lsls r3, r3, #2 80030fa: 441a add r2, r3 80030fc: 8bbb ldrh r3, [r7, #28] 80030fe: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003102: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003106: f443 4340 orr.w r3, r3, #49152 ; 0xc000 800310a: f043 0380 orr.w r3, r3, #128 ; 0x80 800310e: b29b uxth r3, r3 8003110: 8013 strh r3, [r2, #0] /* Configure VALID status for the Endpoint*/ PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID); 8003112: 687a ldr r2, [r7, #4] 8003114: 683b ldr r3, [r7, #0] 8003116: 781b ldrb r3, [r3, #0] 8003118: 009b lsls r3, r3, #2 800311a: 4413 add r3, r2 800311c: 881b ldrh r3, [r3, #0] 800311e: b29b uxth r3, r3 8003120: f423 4380 bic.w r3, r3, #16384 ; 0x4000 8003124: f023 0370 bic.w r3, r3, #112 ; 0x70 8003128: 837b strh r3, [r7, #26] 800312a: 8b7b ldrh r3, [r7, #26] 800312c: f483 5380 eor.w r3, r3, #4096 ; 0x1000 8003130: 837b strh r3, [r7, #26] 8003132: 8b7b ldrh r3, [r7, #26] 8003134: f483 5300 eor.w r3, r3, #8192 ; 0x2000 8003138: 837b strh r3, [r7, #26] 800313a: 687a ldr r2, [r7, #4] 800313c: 683b ldr r3, [r7, #0] 800313e: 781b ldrb r3, [r3, #0] 8003140: 009b lsls r3, r3, #2 8003142: 441a add r2, r3 8003144: 8b7b ldrh r3, [r7, #26] 8003146: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800314a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800314e: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8003152: f043 0380 orr.w r3, r3, #128 ; 0x80 8003156: b29b uxth r3, r3 8003158: 8013 strh r3, [r2, #0] 800315a: e1a2 b.n 80034a2 <USB_ActivateEndpoint+0x6c6> } /*Double Buffer*/ else { /* Set the endpoint as double buffered */ PCD_SET_EP_DBUF(USBx, ep->num); 800315c: 687a ldr r2, [r7, #4] 800315e: 683b ldr r3, [r7, #0] 8003160: 781b ldrb r3, [r3, #0] 8003162: 009b lsls r3, r3, #2 8003164: 4413 add r3, r2 8003166: 881b ldrh r3, [r3, #0] 8003168: b29b uxth r3, r3 800316a: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800316e: f023 0370 bic.w r3, r3, #112 ; 0x70 8003172: f8a7 305c strh.w r3, [r7, #92] ; 0x5c 8003176: 687a ldr r2, [r7, #4] 8003178: 683b ldr r3, [r7, #0] 800317a: 781b ldrb r3, [r3, #0] 800317c: 009b lsls r3, r3, #2 800317e: 441a add r2, r3 8003180: f8b7 305c ldrh.w r3, [r7, #92] ; 0x5c 8003184: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003188: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800318c: f443 4301 orr.w r3, r3, #33024 ; 0x8100 8003190: f043 0380 orr.w r3, r3, #128 ; 0x80 8003194: b29b uxth r3, r3 8003196: 8013 strh r3, [r2, #0] /* Set buffer address for double buffered mode */ PCD_SET_EP_DBUF_ADDR(USBx, ep->num, ep->pmaaddr0, ep->pmaaddr1); 8003198: 687b ldr r3, [r7, #4] 800319a: 65bb str r3, [r7, #88] ; 0x58 800319c: 687b ldr r3, [r7, #4] 800319e: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80031a2: b29b uxth r3, r3 80031a4: 461a mov r2, r3 80031a6: 6dbb ldr r3, [r7, #88] ; 0x58 80031a8: 4413 add r3, r2 80031aa: 65bb str r3, [r7, #88] ; 0x58 80031ac: 683b ldr r3, [r7, #0] 80031ae: 781b ldrb r3, [r3, #0] 80031b0: 011a lsls r2, r3, #4 80031b2: 6dbb ldr r3, [r7, #88] ; 0x58 80031b4: 4413 add r3, r2 80031b6: f503 6380 add.w r3, r3, #1024 ; 0x400 80031ba: 657b str r3, [r7, #84] ; 0x54 80031bc: 683b ldr r3, [r7, #0] 80031be: 891b ldrh r3, [r3, #8] 80031c0: 085b lsrs r3, r3, #1 80031c2: b29b uxth r3, r3 80031c4: 005b lsls r3, r3, #1 80031c6: b29a uxth r2, r3 80031c8: 6d7b ldr r3, [r7, #84] ; 0x54 80031ca: 801a strh r2, [r3, #0] 80031cc: 687b ldr r3, [r7, #4] 80031ce: 653b str r3, [r7, #80] ; 0x50 80031d0: 687b ldr r3, [r7, #4] 80031d2: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80031d6: b29b uxth r3, r3 80031d8: 461a mov r2, r3 80031da: 6d3b ldr r3, [r7, #80] ; 0x50 80031dc: 4413 add r3, r2 80031de: 653b str r3, [r7, #80] ; 0x50 80031e0: 683b ldr r3, [r7, #0] 80031e2: 781b ldrb r3, [r3, #0] 80031e4: 011a lsls r2, r3, #4 80031e6: 6d3b ldr r3, [r7, #80] ; 0x50 80031e8: 4413 add r3, r2 80031ea: f503 6381 add.w r3, r3, #1032 ; 0x408 80031ee: 64fb str r3, [r7, #76] ; 0x4c 80031f0: 683b ldr r3, [r7, #0] 80031f2: 895b ldrh r3, [r3, #10] 80031f4: 085b lsrs r3, r3, #1 80031f6: b29b uxth r3, r3 80031f8: 005b lsls r3, r3, #1 80031fa: b29a uxth r2, r3 80031fc: 6cfb ldr r3, [r7, #76] ; 0x4c 80031fe: 801a strh r2, [r3, #0] if (ep->is_in == 0U) 8003200: 683b ldr r3, [r7, #0] 8003202: 785b ldrb r3, [r3, #1] 8003204: 2b00 cmp r3, #0 8003206: f040 8091 bne.w 800332c <USB_ActivateEndpoint+0x550> { /* Clear the data toggle bits for the endpoint IN/OUT */ PCD_CLEAR_RX_DTOG(USBx, ep->num); 800320a: 687a ldr r2, [r7, #4] 800320c: 683b ldr r3, [r7, #0] 800320e: 781b ldrb r3, [r3, #0] 8003210: 009b lsls r3, r3, #2 8003212: 4413 add r3, r2 8003214: 881b ldrh r3, [r3, #0] 8003216: 87bb strh r3, [r7, #60] ; 0x3c 8003218: 8fbb ldrh r3, [r7, #60] ; 0x3c 800321a: f403 4380 and.w r3, r3, #16384 ; 0x4000 800321e: 2b00 cmp r3, #0 8003220: d01b beq.n 800325a <USB_ActivateEndpoint+0x47e> 8003222: 687a ldr r2, [r7, #4] 8003224: 683b ldr r3, [r7, #0] 8003226: 781b ldrb r3, [r3, #0] 8003228: 009b lsls r3, r3, #2 800322a: 4413 add r3, r2 800322c: 881b ldrh r3, [r3, #0] 800322e: b29b uxth r3, r3 8003230: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8003234: f023 0370 bic.w r3, r3, #112 ; 0x70 8003238: 877b strh r3, [r7, #58] ; 0x3a 800323a: 687a ldr r2, [r7, #4] 800323c: 683b ldr r3, [r7, #0] 800323e: 781b ldrb r3, [r3, #0] 8003240: 009b lsls r3, r3, #2 8003242: 441a add r2, r3 8003244: 8f7b ldrh r3, [r7, #58] ; 0x3a 8003246: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800324a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800324e: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8003252: f043 0380 orr.w r3, r3, #128 ; 0x80 8003256: b29b uxth r3, r3 8003258: 8013 strh r3, [r2, #0] PCD_CLEAR_TX_DTOG(USBx, ep->num); 800325a: 687a ldr r2, [r7, #4] 800325c: 683b ldr r3, [r7, #0] 800325e: 781b ldrb r3, [r3, #0] 8003260: 009b lsls r3, r3, #2 8003262: 4413 add r3, r2 8003264: 881b ldrh r3, [r3, #0] 8003266: 873b strh r3, [r7, #56] ; 0x38 8003268: 8f3b ldrh r3, [r7, #56] ; 0x38 800326a: f003 0340 and.w r3, r3, #64 ; 0x40 800326e: 2b00 cmp r3, #0 8003270: d01b beq.n 80032aa <USB_ActivateEndpoint+0x4ce> 8003272: 687a ldr r2, [r7, #4] 8003274: 683b ldr r3, [r7, #0] 8003276: 781b ldrb r3, [r3, #0] 8003278: 009b lsls r3, r3, #2 800327a: 4413 add r3, r2 800327c: 881b ldrh r3, [r3, #0] 800327e: b29b uxth r3, r3 8003280: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8003284: f023 0370 bic.w r3, r3, #112 ; 0x70 8003288: 86fb strh r3, [r7, #54] ; 0x36 800328a: 687a ldr r2, [r7, #4] 800328c: 683b ldr r3, [r7, #0] 800328e: 781b ldrb r3, [r3, #0] 8003290: 009b lsls r3, r3, #2 8003292: 441a add r2, r3 8003294: 8efb ldrh r3, [r7, #54] ; 0x36 8003296: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800329a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800329e: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80032a2: f043 03c0 orr.w r3, r3, #192 ; 0xc0 80032a6: b29b uxth r3, r3 80032a8: 8013 strh r3, [r2, #0] PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID); 80032aa: 687a ldr r2, [r7, #4] 80032ac: 683b ldr r3, [r7, #0] 80032ae: 781b ldrb r3, [r3, #0] 80032b0: 009b lsls r3, r3, #2 80032b2: 4413 add r3, r2 80032b4: 881b ldrh r3, [r3, #0] 80032b6: b29b uxth r3, r3 80032b8: f423 4380 bic.w r3, r3, #16384 ; 0x4000 80032bc: f023 0370 bic.w r3, r3, #112 ; 0x70 80032c0: 86bb strh r3, [r7, #52] ; 0x34 80032c2: 8ebb ldrh r3, [r7, #52] ; 0x34 80032c4: f483 5380 eor.w r3, r3, #4096 ; 0x1000 80032c8: 86bb strh r3, [r7, #52] ; 0x34 80032ca: 8ebb ldrh r3, [r7, #52] ; 0x34 80032cc: f483 5300 eor.w r3, r3, #8192 ; 0x2000 80032d0: 86bb strh r3, [r7, #52] ; 0x34 80032d2: 687a ldr r2, [r7, #4] 80032d4: 683b ldr r3, [r7, #0] 80032d6: 781b ldrb r3, [r3, #0] 80032d8: 009b lsls r3, r3, #2 80032da: 441a add r2, r3 80032dc: 8ebb ldrh r3, [r7, #52] ; 0x34 80032de: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80032e2: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80032e6: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80032ea: f043 0380 orr.w r3, r3, #128 ; 0x80 80032ee: b29b uxth r3, r3 80032f0: 8013 strh r3, [r2, #0] PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 80032f2: 687a ldr r2, [r7, #4] 80032f4: 683b ldr r3, [r7, #0] 80032f6: 781b ldrb r3, [r3, #0] 80032f8: 009b lsls r3, r3, #2 80032fa: 4413 add r3, r2 80032fc: 881b ldrh r3, [r3, #0] 80032fe: b29b uxth r3, r3 8003300: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8003304: f023 0340 bic.w r3, r3, #64 ; 0x40 8003308: 867b strh r3, [r7, #50] ; 0x32 800330a: 687a ldr r2, [r7, #4] 800330c: 683b ldr r3, [r7, #0] 800330e: 781b ldrb r3, [r3, #0] 8003310: 009b lsls r3, r3, #2 8003312: 441a add r2, r3 8003314: 8e7b ldrh r3, [r7, #50] ; 0x32 8003316: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800331a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800331e: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8003322: f043 0380 orr.w r3, r3, #128 ; 0x80 8003326: b29b uxth r3, r3 8003328: 8013 strh r3, [r2, #0] 800332a: e0ba b.n 80034a2 <USB_ActivateEndpoint+0x6c6> } else { /* Clear the data toggle bits for the endpoint IN/OUT */ PCD_CLEAR_RX_DTOG(USBx, ep->num); 800332c: 687a ldr r2, [r7, #4] 800332e: 683b ldr r3, [r7, #0] 8003330: 781b ldrb r3, [r3, #0] 8003332: 009b lsls r3, r3, #2 8003334: 4413 add r3, r2 8003336: 881b ldrh r3, [r3, #0] 8003338: f8a7 304a strh.w r3, [r7, #74] ; 0x4a 800333c: f8b7 304a ldrh.w r3, [r7, #74] ; 0x4a 8003340: f403 4380 and.w r3, r3, #16384 ; 0x4000 8003344: 2b00 cmp r3, #0 8003346: d01d beq.n 8003384 <USB_ActivateEndpoint+0x5a8> 8003348: 687a ldr r2, [r7, #4] 800334a: 683b ldr r3, [r7, #0] 800334c: 781b ldrb r3, [r3, #0] 800334e: 009b lsls r3, r3, #2 8003350: 4413 add r3, r2 8003352: 881b ldrh r3, [r3, #0] 8003354: b29b uxth r3, r3 8003356: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800335a: f023 0370 bic.w r3, r3, #112 ; 0x70 800335e: f8a7 3048 strh.w r3, [r7, #72] ; 0x48 8003362: 687a ldr r2, [r7, #4] 8003364: 683b ldr r3, [r7, #0] 8003366: 781b ldrb r3, [r3, #0] 8003368: 009b lsls r3, r3, #2 800336a: 441a add r2, r3 800336c: f8b7 3048 ldrh.w r3, [r7, #72] ; 0x48 8003370: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003374: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003378: f443 4340 orr.w r3, r3, #49152 ; 0xc000 800337c: f043 0380 orr.w r3, r3, #128 ; 0x80 8003380: b29b uxth r3, r3 8003382: 8013 strh r3, [r2, #0] PCD_CLEAR_TX_DTOG(USBx, ep->num); 8003384: 687a ldr r2, [r7, #4] 8003386: 683b ldr r3, [r7, #0] 8003388: 781b ldrb r3, [r3, #0] 800338a: 009b lsls r3, r3, #2 800338c: 4413 add r3, r2 800338e: 881b ldrh r3, [r3, #0] 8003390: f8a7 3046 strh.w r3, [r7, #70] ; 0x46 8003394: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46 8003398: f003 0340 and.w r3, r3, #64 ; 0x40 800339c: 2b00 cmp r3, #0 800339e: d01d beq.n 80033dc <USB_ActivateEndpoint+0x600> 80033a0: 687a ldr r2, [r7, #4] 80033a2: 683b ldr r3, [r7, #0] 80033a4: 781b ldrb r3, [r3, #0] 80033a6: 009b lsls r3, r3, #2 80033a8: 4413 add r3, r2 80033aa: 881b ldrh r3, [r3, #0] 80033ac: b29b uxth r3, r3 80033ae: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80033b2: f023 0370 bic.w r3, r3, #112 ; 0x70 80033b6: f8a7 3044 strh.w r3, [r7, #68] ; 0x44 80033ba: 687a ldr r2, [r7, #4] 80033bc: 683b ldr r3, [r7, #0] 80033be: 781b ldrb r3, [r3, #0] 80033c0: 009b lsls r3, r3, #2 80033c2: 441a add r2, r3 80033c4: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44 80033c8: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80033cc: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80033d0: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80033d4: f043 03c0 orr.w r3, r3, #192 ; 0xc0 80033d8: b29b uxth r3, r3 80033da: 8013 strh r3, [r2, #0] if (ep->type != EP_TYPE_ISOC) 80033dc: 683b ldr r3, [r7, #0] 80033de: 78db ldrb r3, [r3, #3] 80033e0: 2b01 cmp r3, #1 80033e2: d024 beq.n 800342e <USB_ActivateEndpoint+0x652> { /* Configure NAK status for the Endpoint */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_NAK); 80033e4: 687a ldr r2, [r7, #4] 80033e6: 683b ldr r3, [r7, #0] 80033e8: 781b ldrb r3, [r3, #0] 80033ea: 009b lsls r3, r3, #2 80033ec: 4413 add r3, r2 80033ee: 881b ldrh r3, [r3, #0] 80033f0: b29b uxth r3, r3 80033f2: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80033f6: f023 0340 bic.w r3, r3, #64 ; 0x40 80033fa: f8a7 3040 strh.w r3, [r7, #64] ; 0x40 80033fe: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40 8003402: f083 0320 eor.w r3, r3, #32 8003406: f8a7 3040 strh.w r3, [r7, #64] ; 0x40 800340a: 687a ldr r2, [r7, #4] 800340c: 683b ldr r3, [r7, #0] 800340e: 781b ldrb r3, [r3, #0] 8003410: 009b lsls r3, r3, #2 8003412: 441a add r2, r3 8003414: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40 8003418: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800341c: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003420: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8003424: f043 0380 orr.w r3, r3, #128 ; 0x80 8003428: b29b uxth r3, r3 800342a: 8013 strh r3, [r2, #0] 800342c: e01d b.n 800346a <USB_ActivateEndpoint+0x68e> } else { /* Configure TX Endpoint to disabled state */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 800342e: 687a ldr r2, [r7, #4] 8003430: 683b ldr r3, [r7, #0] 8003432: 781b ldrb r3, [r3, #0] 8003434: 009b lsls r3, r3, #2 8003436: 4413 add r3, r2 8003438: 881b ldrh r3, [r3, #0] 800343a: b29b uxth r3, r3 800343c: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8003440: f023 0340 bic.w r3, r3, #64 ; 0x40 8003444: f8a7 3042 strh.w r3, [r7, #66] ; 0x42 8003448: 687a ldr r2, [r7, #4] 800344a: 683b ldr r3, [r7, #0] 800344c: 781b ldrb r3, [r3, #0] 800344e: 009b lsls r3, r3, #2 8003450: 441a add r2, r3 8003452: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42 8003456: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800345a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800345e: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8003462: f043 0380 orr.w r3, r3, #128 ; 0x80 8003466: b29b uxth r3, r3 8003468: 8013 strh r3, [r2, #0] } PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS); 800346a: 687a ldr r2, [r7, #4] 800346c: 683b ldr r3, [r7, #0] 800346e: 781b ldrb r3, [r3, #0] 8003470: 009b lsls r3, r3, #2 8003472: 4413 add r3, r2 8003474: 881b ldrh r3, [r3, #0] 8003476: b29b uxth r3, r3 8003478: f423 4380 bic.w r3, r3, #16384 ; 0x4000 800347c: f023 0370 bic.w r3, r3, #112 ; 0x70 8003480: 87fb strh r3, [r7, #62] ; 0x3e 8003482: 687a ldr r2, [r7, #4] 8003484: 683b ldr r3, [r7, #0] 8003486: 781b ldrb r3, [r3, #0] 8003488: 009b lsls r3, r3, #2 800348a: 441a add r2, r3 800348c: 8ffb ldrh r3, [r7, #62] ; 0x3e 800348e: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003492: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003496: f443 4300 orr.w r3, r3, #32768 ; 0x8000 800349a: f043 0380 orr.w r3, r3, #128 ; 0x80 800349e: b29b uxth r3, r3 80034a0: 8013 strh r3, [r2, #0] } } return ret; 80034a2: f897 3067 ldrb.w r3, [r7, #103] ; 0x67 } 80034a6: 4618 mov r0, r3 80034a8: 376c adds r7, #108 ; 0x6c 80034aa: 46bd mov sp, r7 80034ac: bc80 pop {r7} 80034ae: 4770 bx lr 080034b0 <USB_DeactivateEndpoint>: * @param USBx Selected device * @param ep pointer to endpoint structure * @retval HAL status */ HAL_StatusTypeDef USB_DeactivateEndpoint(USB_TypeDef *USBx, USB_EPTypeDef *ep) { 80034b0: b480 push {r7} 80034b2: b08d sub sp, #52 ; 0x34 80034b4: af00 add r7, sp, #0 80034b6: 6078 str r0, [r7, #4] 80034b8: 6039 str r1, [r7, #0] if (ep->doublebuffer == 0U) 80034ba: 683b ldr r3, [r7, #0] 80034bc: 7b1b ldrb r3, [r3, #12] 80034be: 2b00 cmp r3, #0 80034c0: f040 808e bne.w 80035e0 <USB_DeactivateEndpoint+0x130> { if (ep->is_in != 0U) 80034c4: 683b ldr r3, [r7, #0] 80034c6: 785b ldrb r3, [r3, #1] 80034c8: 2b00 cmp r3, #0 80034ca: d044 beq.n 8003556 <USB_DeactivateEndpoint+0xa6> { PCD_CLEAR_TX_DTOG(USBx, ep->num); 80034cc: 687a ldr r2, [r7, #4] 80034ce: 683b ldr r3, [r7, #0] 80034d0: 781b ldrb r3, [r3, #0] 80034d2: 009b lsls r3, r3, #2 80034d4: 4413 add r3, r2 80034d6: 881b ldrh r3, [r3, #0] 80034d8: 81bb strh r3, [r7, #12] 80034da: 89bb ldrh r3, [r7, #12] 80034dc: f003 0340 and.w r3, r3, #64 ; 0x40 80034e0: 2b00 cmp r3, #0 80034e2: d01b beq.n 800351c <USB_DeactivateEndpoint+0x6c> 80034e4: 687a ldr r2, [r7, #4] 80034e6: 683b ldr r3, [r7, #0] 80034e8: 781b ldrb r3, [r3, #0] 80034ea: 009b lsls r3, r3, #2 80034ec: 4413 add r3, r2 80034ee: 881b ldrh r3, [r3, #0] 80034f0: b29b uxth r3, r3 80034f2: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80034f6: f023 0370 bic.w r3, r3, #112 ; 0x70 80034fa: 817b strh r3, [r7, #10] 80034fc: 687a ldr r2, [r7, #4] 80034fe: 683b ldr r3, [r7, #0] 8003500: 781b ldrb r3, [r3, #0] 8003502: 009b lsls r3, r3, #2 8003504: 441a add r2, r3 8003506: 897b ldrh r3, [r7, #10] 8003508: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800350c: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003510: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8003514: f043 03c0 orr.w r3, r3, #192 ; 0xc0 8003518: b29b uxth r3, r3 800351a: 8013 strh r3, [r2, #0] /* Configure DISABLE status for the Endpoint*/ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 800351c: 687a ldr r2, [r7, #4] 800351e: 683b ldr r3, [r7, #0] 8003520: 781b ldrb r3, [r3, #0] 8003522: 009b lsls r3, r3, #2 8003524: 4413 add r3, r2 8003526: 881b ldrh r3, [r3, #0] 8003528: b29b uxth r3, r3 800352a: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800352e: f023 0340 bic.w r3, r3, #64 ; 0x40 8003532: 813b strh r3, [r7, #8] 8003534: 687a ldr r2, [r7, #4] 8003536: 683b ldr r3, [r7, #0] 8003538: 781b ldrb r3, [r3, #0] 800353a: 009b lsls r3, r3, #2 800353c: 441a add r2, r3 800353e: 893b ldrh r3, [r7, #8] 8003540: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003544: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003548: f443 4300 orr.w r3, r3, #32768 ; 0x8000 800354c: f043 0380 orr.w r3, r3, #128 ; 0x80 8003550: b29b uxth r3, r3 8003552: 8013 strh r3, [r2, #0] 8003554: e192 b.n 800387c <USB_DeactivateEndpoint+0x3cc> } else { PCD_CLEAR_RX_DTOG(USBx, ep->num); 8003556: 687a ldr r2, [r7, #4] 8003558: 683b ldr r3, [r7, #0] 800355a: 781b ldrb r3, [r3, #0] 800355c: 009b lsls r3, r3, #2 800355e: 4413 add r3, r2 8003560: 881b ldrh r3, [r3, #0] 8003562: 827b strh r3, [r7, #18] 8003564: 8a7b ldrh r3, [r7, #18] 8003566: f403 4380 and.w r3, r3, #16384 ; 0x4000 800356a: 2b00 cmp r3, #0 800356c: d01b beq.n 80035a6 <USB_DeactivateEndpoint+0xf6> 800356e: 687a ldr r2, [r7, #4] 8003570: 683b ldr r3, [r7, #0] 8003572: 781b ldrb r3, [r3, #0] 8003574: 009b lsls r3, r3, #2 8003576: 4413 add r3, r2 8003578: 881b ldrh r3, [r3, #0] 800357a: b29b uxth r3, r3 800357c: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8003580: f023 0370 bic.w r3, r3, #112 ; 0x70 8003584: 823b strh r3, [r7, #16] 8003586: 687a ldr r2, [r7, #4] 8003588: 683b ldr r3, [r7, #0] 800358a: 781b ldrb r3, [r3, #0] 800358c: 009b lsls r3, r3, #2 800358e: 441a add r2, r3 8003590: 8a3b ldrh r3, [r7, #16] 8003592: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003596: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800359a: f443 4340 orr.w r3, r3, #49152 ; 0xc000 800359e: f043 0380 orr.w r3, r3, #128 ; 0x80 80035a2: b29b uxth r3, r3 80035a4: 8013 strh r3, [r2, #0] /* Configure DISABLE status for the Endpoint*/ PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS); 80035a6: 687a ldr r2, [r7, #4] 80035a8: 683b ldr r3, [r7, #0] 80035aa: 781b ldrb r3, [r3, #0] 80035ac: 009b lsls r3, r3, #2 80035ae: 4413 add r3, r2 80035b0: 881b ldrh r3, [r3, #0] 80035b2: b29b uxth r3, r3 80035b4: f423 4380 bic.w r3, r3, #16384 ; 0x4000 80035b8: f023 0370 bic.w r3, r3, #112 ; 0x70 80035bc: 81fb strh r3, [r7, #14] 80035be: 687a ldr r2, [r7, #4] 80035c0: 683b ldr r3, [r7, #0] 80035c2: 781b ldrb r3, [r3, #0] 80035c4: 009b lsls r3, r3, #2 80035c6: 441a add r2, r3 80035c8: 89fb ldrh r3, [r7, #14] 80035ca: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80035ce: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80035d2: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80035d6: f043 0380 orr.w r3, r3, #128 ; 0x80 80035da: b29b uxth r3, r3 80035dc: 8013 strh r3, [r2, #0] 80035de: e14d b.n 800387c <USB_DeactivateEndpoint+0x3cc> } } /*Double Buffer*/ else { if (ep->is_in == 0U) 80035e0: 683b ldr r3, [r7, #0] 80035e2: 785b ldrb r3, [r3, #1] 80035e4: 2b00 cmp r3, #0 80035e6: f040 80a5 bne.w 8003734 <USB_DeactivateEndpoint+0x284> { /* Clear the data toggle bits for the endpoint IN/OUT*/ PCD_CLEAR_RX_DTOG(USBx, ep->num); 80035ea: 687a ldr r2, [r7, #4] 80035ec: 683b ldr r3, [r7, #0] 80035ee: 781b ldrb r3, [r3, #0] 80035f0: 009b lsls r3, r3, #2 80035f2: 4413 add r3, r2 80035f4: 881b ldrh r3, [r3, #0] 80035f6: 843b strh r3, [r7, #32] 80035f8: 8c3b ldrh r3, [r7, #32] 80035fa: f403 4380 and.w r3, r3, #16384 ; 0x4000 80035fe: 2b00 cmp r3, #0 8003600: d01b beq.n 800363a <USB_DeactivateEndpoint+0x18a> 8003602: 687a ldr r2, [r7, #4] 8003604: 683b ldr r3, [r7, #0] 8003606: 781b ldrb r3, [r3, #0] 8003608: 009b lsls r3, r3, #2 800360a: 4413 add r3, r2 800360c: 881b ldrh r3, [r3, #0] 800360e: b29b uxth r3, r3 8003610: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8003614: f023 0370 bic.w r3, r3, #112 ; 0x70 8003618: 83fb strh r3, [r7, #30] 800361a: 687a ldr r2, [r7, #4] 800361c: 683b ldr r3, [r7, #0] 800361e: 781b ldrb r3, [r3, #0] 8003620: 009b lsls r3, r3, #2 8003622: 441a add r2, r3 8003624: 8bfb ldrh r3, [r7, #30] 8003626: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800362a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800362e: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8003632: f043 0380 orr.w r3, r3, #128 ; 0x80 8003636: b29b uxth r3, r3 8003638: 8013 strh r3, [r2, #0] PCD_CLEAR_TX_DTOG(USBx, ep->num); 800363a: 687a ldr r2, [r7, #4] 800363c: 683b ldr r3, [r7, #0] 800363e: 781b ldrb r3, [r3, #0] 8003640: 009b lsls r3, r3, #2 8003642: 4413 add r3, r2 8003644: 881b ldrh r3, [r3, #0] 8003646: 83bb strh r3, [r7, #28] 8003648: 8bbb ldrh r3, [r7, #28] 800364a: f003 0340 and.w r3, r3, #64 ; 0x40 800364e: 2b00 cmp r3, #0 8003650: d01b beq.n 800368a <USB_DeactivateEndpoint+0x1da> 8003652: 687a ldr r2, [r7, #4] 8003654: 683b ldr r3, [r7, #0] 8003656: 781b ldrb r3, [r3, #0] 8003658: 009b lsls r3, r3, #2 800365a: 4413 add r3, r2 800365c: 881b ldrh r3, [r3, #0] 800365e: b29b uxth r3, r3 8003660: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8003664: f023 0370 bic.w r3, r3, #112 ; 0x70 8003668: 837b strh r3, [r7, #26] 800366a: 687a ldr r2, [r7, #4] 800366c: 683b ldr r3, [r7, #0] 800366e: 781b ldrb r3, [r3, #0] 8003670: 009b lsls r3, r3, #2 8003672: 441a add r2, r3 8003674: 8b7b ldrh r3, [r7, #26] 8003676: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800367a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800367e: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8003682: f043 03c0 orr.w r3, r3, #192 ; 0xc0 8003686: b29b uxth r3, r3 8003688: 8013 strh r3, [r2, #0] /* Reset value of the data toggle bits for the endpoint out*/ PCD_TX_DTOG(USBx, ep->num); 800368a: 687a ldr r2, [r7, #4] 800368c: 683b ldr r3, [r7, #0] 800368e: 781b ldrb r3, [r3, #0] 8003690: 009b lsls r3, r3, #2 8003692: 4413 add r3, r2 8003694: 881b ldrh r3, [r3, #0] 8003696: b29b uxth r3, r3 8003698: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800369c: f023 0370 bic.w r3, r3, #112 ; 0x70 80036a0: 833b strh r3, [r7, #24] 80036a2: 687a ldr r2, [r7, #4] 80036a4: 683b ldr r3, [r7, #0] 80036a6: 781b ldrb r3, [r3, #0] 80036a8: 009b lsls r3, r3, #2 80036aa: 441a add r2, r3 80036ac: 8b3b ldrh r3, [r7, #24] 80036ae: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80036b2: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80036b6: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80036ba: f043 03c0 orr.w r3, r3, #192 ; 0xc0 80036be: b29b uxth r3, r3 80036c0: 8013 strh r3, [r2, #0] PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS); 80036c2: 687a ldr r2, [r7, #4] 80036c4: 683b ldr r3, [r7, #0] 80036c6: 781b ldrb r3, [r3, #0] 80036c8: 009b lsls r3, r3, #2 80036ca: 4413 add r3, r2 80036cc: 881b ldrh r3, [r3, #0] 80036ce: b29b uxth r3, r3 80036d0: f423 4380 bic.w r3, r3, #16384 ; 0x4000 80036d4: f023 0370 bic.w r3, r3, #112 ; 0x70 80036d8: 82fb strh r3, [r7, #22] 80036da: 687a ldr r2, [r7, #4] 80036dc: 683b ldr r3, [r7, #0] 80036de: 781b ldrb r3, [r3, #0] 80036e0: 009b lsls r3, r3, #2 80036e2: 441a add r2, r3 80036e4: 8afb ldrh r3, [r7, #22] 80036e6: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80036ea: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80036ee: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80036f2: f043 0380 orr.w r3, r3, #128 ; 0x80 80036f6: b29b uxth r3, r3 80036f8: 8013 strh r3, [r2, #0] PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 80036fa: 687a ldr r2, [r7, #4] 80036fc: 683b ldr r3, [r7, #0] 80036fe: 781b ldrb r3, [r3, #0] 8003700: 009b lsls r3, r3, #2 8003702: 4413 add r3, r2 8003704: 881b ldrh r3, [r3, #0] 8003706: b29b uxth r3, r3 8003708: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800370c: f023 0340 bic.w r3, r3, #64 ; 0x40 8003710: 82bb strh r3, [r7, #20] 8003712: 687a ldr r2, [r7, #4] 8003714: 683b ldr r3, [r7, #0] 8003716: 781b ldrb r3, [r3, #0] 8003718: 009b lsls r3, r3, #2 800371a: 441a add r2, r3 800371c: 8abb ldrh r3, [r7, #20] 800371e: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003722: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003726: f443 4300 orr.w r3, r3, #32768 ; 0x8000 800372a: f043 0380 orr.w r3, r3, #128 ; 0x80 800372e: b29b uxth r3, r3 8003730: 8013 strh r3, [r2, #0] 8003732: e0a3 b.n 800387c <USB_DeactivateEndpoint+0x3cc> } else { /* Clear the data toggle bits for the endpoint IN/OUT*/ PCD_CLEAR_RX_DTOG(USBx, ep->num); 8003734: 687a ldr r2, [r7, #4] 8003736: 683b ldr r3, [r7, #0] 8003738: 781b ldrb r3, [r3, #0] 800373a: 009b lsls r3, r3, #2 800373c: 4413 add r3, r2 800373e: 881b ldrh r3, [r3, #0] 8003740: 85fb strh r3, [r7, #46] ; 0x2e 8003742: 8dfb ldrh r3, [r7, #46] ; 0x2e 8003744: f403 4380 and.w r3, r3, #16384 ; 0x4000 8003748: 2b00 cmp r3, #0 800374a: d01b beq.n 8003784 <USB_DeactivateEndpoint+0x2d4> 800374c: 687a ldr r2, [r7, #4] 800374e: 683b ldr r3, [r7, #0] 8003750: 781b ldrb r3, [r3, #0] 8003752: 009b lsls r3, r3, #2 8003754: 4413 add r3, r2 8003756: 881b ldrh r3, [r3, #0] 8003758: b29b uxth r3, r3 800375a: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800375e: f023 0370 bic.w r3, r3, #112 ; 0x70 8003762: 85bb strh r3, [r7, #44] ; 0x2c 8003764: 687a ldr r2, [r7, #4] 8003766: 683b ldr r3, [r7, #0] 8003768: 781b ldrb r3, [r3, #0] 800376a: 009b lsls r3, r3, #2 800376c: 441a add r2, r3 800376e: 8dbb ldrh r3, [r7, #44] ; 0x2c 8003770: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003774: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003778: f443 4340 orr.w r3, r3, #49152 ; 0xc000 800377c: f043 0380 orr.w r3, r3, #128 ; 0x80 8003780: b29b uxth r3, r3 8003782: 8013 strh r3, [r2, #0] PCD_CLEAR_TX_DTOG(USBx, ep->num); 8003784: 687a ldr r2, [r7, #4] 8003786: 683b ldr r3, [r7, #0] 8003788: 781b ldrb r3, [r3, #0] 800378a: 009b lsls r3, r3, #2 800378c: 4413 add r3, r2 800378e: 881b ldrh r3, [r3, #0] 8003790: 857b strh r3, [r7, #42] ; 0x2a 8003792: 8d7b ldrh r3, [r7, #42] ; 0x2a 8003794: f003 0340 and.w r3, r3, #64 ; 0x40 8003798: 2b00 cmp r3, #0 800379a: d01b beq.n 80037d4 <USB_DeactivateEndpoint+0x324> 800379c: 687a ldr r2, [r7, #4] 800379e: 683b ldr r3, [r7, #0] 80037a0: 781b ldrb r3, [r3, #0] 80037a2: 009b lsls r3, r3, #2 80037a4: 4413 add r3, r2 80037a6: 881b ldrh r3, [r3, #0] 80037a8: b29b uxth r3, r3 80037aa: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80037ae: f023 0370 bic.w r3, r3, #112 ; 0x70 80037b2: 853b strh r3, [r7, #40] ; 0x28 80037b4: 687a ldr r2, [r7, #4] 80037b6: 683b ldr r3, [r7, #0] 80037b8: 781b ldrb r3, [r3, #0] 80037ba: 009b lsls r3, r3, #2 80037bc: 441a add r2, r3 80037be: 8d3b ldrh r3, [r7, #40] ; 0x28 80037c0: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80037c4: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80037c8: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80037cc: f043 03c0 orr.w r3, r3, #192 ; 0xc0 80037d0: b29b uxth r3, r3 80037d2: 8013 strh r3, [r2, #0] PCD_RX_DTOG(USBx, ep->num); 80037d4: 687a ldr r2, [r7, #4] 80037d6: 683b ldr r3, [r7, #0] 80037d8: 781b ldrb r3, [r3, #0] 80037da: 009b lsls r3, r3, #2 80037dc: 4413 add r3, r2 80037de: 881b ldrh r3, [r3, #0] 80037e0: b29b uxth r3, r3 80037e2: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80037e6: f023 0370 bic.w r3, r3, #112 ; 0x70 80037ea: 84fb strh r3, [r7, #38] ; 0x26 80037ec: 687a ldr r2, [r7, #4] 80037ee: 683b ldr r3, [r7, #0] 80037f0: 781b ldrb r3, [r3, #0] 80037f2: 009b lsls r3, r3, #2 80037f4: 441a add r2, r3 80037f6: 8cfb ldrh r3, [r7, #38] ; 0x26 80037f8: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80037fc: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003800: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8003804: f043 0380 orr.w r3, r3, #128 ; 0x80 8003808: b29b uxth r3, r3 800380a: 8013 strh r3, [r2, #0] /* Configure DISABLE status for the Endpoint*/ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS); 800380c: 687a ldr r2, [r7, #4] 800380e: 683b ldr r3, [r7, #0] 8003810: 781b ldrb r3, [r3, #0] 8003812: 009b lsls r3, r3, #2 8003814: 4413 add r3, r2 8003816: 881b ldrh r3, [r3, #0] 8003818: b29b uxth r3, r3 800381a: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800381e: f023 0340 bic.w r3, r3, #64 ; 0x40 8003822: 84bb strh r3, [r7, #36] ; 0x24 8003824: 687a ldr r2, [r7, #4] 8003826: 683b ldr r3, [r7, #0] 8003828: 781b ldrb r3, [r3, #0] 800382a: 009b lsls r3, r3, #2 800382c: 441a add r2, r3 800382e: 8cbb ldrh r3, [r7, #36] ; 0x24 8003830: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003834: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003838: f443 4300 orr.w r3, r3, #32768 ; 0x8000 800383c: f043 0380 orr.w r3, r3, #128 ; 0x80 8003840: b29b uxth r3, r3 8003842: 8013 strh r3, [r2, #0] PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS); 8003844: 687a ldr r2, [r7, #4] 8003846: 683b ldr r3, [r7, #0] 8003848: 781b ldrb r3, [r3, #0] 800384a: 009b lsls r3, r3, #2 800384c: 4413 add r3, r2 800384e: 881b ldrh r3, [r3, #0] 8003850: b29b uxth r3, r3 8003852: f423 4380 bic.w r3, r3, #16384 ; 0x4000 8003856: f023 0370 bic.w r3, r3, #112 ; 0x70 800385a: 847b strh r3, [r7, #34] ; 0x22 800385c: 687a ldr r2, [r7, #4] 800385e: 683b ldr r3, [r7, #0] 8003860: 781b ldrb r3, [r3, #0] 8003862: 009b lsls r3, r3, #2 8003864: 441a add r2, r3 8003866: 8c7b ldrh r3, [r7, #34] ; 0x22 8003868: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800386c: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003870: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8003874: f043 0380 orr.w r3, r3, #128 ; 0x80 8003878: b29b uxth r3, r3 800387a: 8013 strh r3, [r2, #0] } } return HAL_OK; 800387c: 2300 movs r3, #0 } 800387e: 4618 mov r0, r3 8003880: 3734 adds r7, #52 ; 0x34 8003882: 46bd mov sp, r7 8003884: bc80 pop {r7} 8003886: 4770 bx lr 08003888 <USB_EPStartXfer>: * @param USBx Selected device * @param ep pointer to endpoint structure * @retval HAL status */ HAL_StatusTypeDef USB_EPStartXfer(USB_TypeDef *USBx, USB_EPTypeDef *ep) { 8003888: b580 push {r7, lr} 800388a: b0cc sub sp, #304 ; 0x130 800388c: af00 add r7, sp, #0 800388e: f507 7398 add.w r3, r7, #304 ; 0x130 8003892: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8003896: 6018 str r0, [r3, #0] 8003898: f507 7398 add.w r3, r7, #304 ; 0x130 800389c: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80038a0: 6019 str r1, [r3, #0] uint32_t len; uint16_t pmabuffer; uint16_t wEPVal; /* IN endpoint */ if (ep->is_in == 1U) 80038a2: f507 7398 add.w r3, r7, #304 ; 0x130 80038a6: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80038aa: 681b ldr r3, [r3, #0] 80038ac: 785b ldrb r3, [r3, #1] 80038ae: 2b01 cmp r3, #1 80038b0: f041 817d bne.w 8004bae <USB_EPStartXfer+0x1326> { /*Multi packet transfer*/ if (ep->xfer_len > ep->maxpacket) 80038b4: f507 7398 add.w r3, r7, #304 ; 0x130 80038b8: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80038bc: 681b ldr r3, [r3, #0] 80038be: 699a ldr r2, [r3, #24] 80038c0: f507 7398 add.w r3, r7, #304 ; 0x130 80038c4: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80038c8: 681b ldr r3, [r3, #0] 80038ca: 691b ldr r3, [r3, #16] 80038cc: 429a cmp r2, r3 80038ce: d908 bls.n 80038e2 <USB_EPStartXfer+0x5a> { len = ep->maxpacket; 80038d0: f507 7398 add.w r3, r7, #304 ; 0x130 80038d4: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80038d8: 681b ldr r3, [r3, #0] 80038da: 691b ldr r3, [r3, #16] 80038dc: f8c7 312c str.w r3, [r7, #300] ; 0x12c 80038e0: e007 b.n 80038f2 <USB_EPStartXfer+0x6a> } else { len = ep->xfer_len; 80038e2: f507 7398 add.w r3, r7, #304 ; 0x130 80038e6: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80038ea: 681b ldr r3, [r3, #0] 80038ec: 699b ldr r3, [r3, #24] 80038ee: f8c7 312c str.w r3, [r7, #300] ; 0x12c } /* configure and validate Tx endpoint */ if (ep->doublebuffer == 0U) 80038f2: f507 7398 add.w r3, r7, #304 ; 0x130 80038f6: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80038fa: 681b ldr r3, [r3, #0] 80038fc: 7b1b ldrb r3, [r3, #12] 80038fe: 2b00 cmp r3, #0 8003900: d152 bne.n 80039a8 <USB_EPStartXfer+0x120> { USB_WritePMA(USBx, ep->xfer_buff, ep->pmaadress, (uint16_t)len); 8003902: f507 7398 add.w r3, r7, #304 ; 0x130 8003906: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800390a: 681b ldr r3, [r3, #0] 800390c: 6959 ldr r1, [r3, #20] 800390e: f507 7398 add.w r3, r7, #304 ; 0x130 8003912: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003916: 681b ldr r3, [r3, #0] 8003918: 88da ldrh r2, [r3, #6] 800391a: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 800391e: b29b uxth r3, r3 8003920: f507 7098 add.w r0, r7, #304 ; 0x130 8003924: f5a0 7096 sub.w r0, r0, #300 ; 0x12c 8003928: 6800 ldr r0, [r0, #0] 800392a: f001 ff23 bl 8005774 <USB_WritePMA> PCD_SET_EP_TX_CNT(USBx, ep->num, len); 800392e: f507 7398 add.w r3, r7, #304 ; 0x130 8003932: f5a3 7390 sub.w r3, r3, #288 ; 0x120 8003936: f507 7298 add.w r2, r7, #304 ; 0x130 800393a: f5a2 7296 sub.w r2, r2, #300 ; 0x12c 800393e: 6812 ldr r2, [r2, #0] 8003940: 601a str r2, [r3, #0] 8003942: f507 7398 add.w r3, r7, #304 ; 0x130 8003946: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 800394a: 681b ldr r3, [r3, #0] 800394c: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003950: b29b uxth r3, r3 8003952: 4619 mov r1, r3 8003954: f507 7398 add.w r3, r7, #304 ; 0x130 8003958: f5a3 7390 sub.w r3, r3, #288 ; 0x120 800395c: f507 7298 add.w r2, r7, #304 ; 0x130 8003960: f5a2 7290 sub.w r2, r2, #288 ; 0x120 8003964: 6812 ldr r2, [r2, #0] 8003966: 440a add r2, r1 8003968: 601a str r2, [r3, #0] 800396a: f507 7398 add.w r3, r7, #304 ; 0x130 800396e: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003972: 681b ldr r3, [r3, #0] 8003974: 781b ldrb r3, [r3, #0] 8003976: 011a lsls r2, r3, #4 8003978: f507 7398 add.w r3, r7, #304 ; 0x130 800397c: f5a3 7390 sub.w r3, r3, #288 ; 0x120 8003980: 681b ldr r3, [r3, #0] 8003982: 4413 add r3, r2 8003984: f203 4204 addw r2, r3, #1028 ; 0x404 8003988: f507 7398 add.w r3, r7, #304 ; 0x130 800398c: f5a3 7392 sub.w r3, r3, #292 ; 0x124 8003990: 601a str r2, [r3, #0] 8003992: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003996: b29a uxth r2, r3 8003998: f507 7398 add.w r3, r7, #304 ; 0x130 800399c: f5a3 7392 sub.w r3, r3, #292 ; 0x124 80039a0: 681b ldr r3, [r3, #0] 80039a2: 801a strh r2, [r3, #0] 80039a4: f001 b8b5 b.w 8004b12 <USB_EPStartXfer+0x128a> } else { /* double buffer bulk management */ if (ep->type == EP_TYPE_BULK) 80039a8: f507 7398 add.w r3, r7, #304 ; 0x130 80039ac: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80039b0: 681b ldr r3, [r3, #0] 80039b2: 78db ldrb r3, [r3, #3] 80039b4: 2b02 cmp r3, #2 80039b6: f040 84c6 bne.w 8004346 <USB_EPStartXfer+0xabe> { if (ep->xfer_len_db > ep->maxpacket) 80039ba: f507 7398 add.w r3, r7, #304 ; 0x130 80039be: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80039c2: 681b ldr r3, [r3, #0] 80039c4: 6a1a ldr r2, [r3, #32] 80039c6: f507 7398 add.w r3, r7, #304 ; 0x130 80039ca: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80039ce: 681b ldr r3, [r3, #0] 80039d0: 691b ldr r3, [r3, #16] 80039d2: 429a cmp r2, r3 80039d4: f240 8443 bls.w 800425e <USB_EPStartXfer+0x9d6> { /* enable double buffer */ PCD_SET_EP_DBUF(USBx, ep->num); 80039d8: f507 7398 add.w r3, r7, #304 ; 0x130 80039dc: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80039e0: 681a ldr r2, [r3, #0] 80039e2: f507 7398 add.w r3, r7, #304 ; 0x130 80039e6: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80039ea: 681b ldr r3, [r3, #0] 80039ec: 781b ldrb r3, [r3, #0] 80039ee: 009b lsls r3, r3, #2 80039f0: 4413 add r3, r2 80039f2: 881b ldrh r3, [r3, #0] 80039f4: b29b uxth r3, r3 80039f6: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80039fa: f023 0370 bic.w r3, r3, #112 ; 0x70 80039fe: f8a7 3056 strh.w r3, [r7, #86] ; 0x56 8003a02: f507 7398 add.w r3, r7, #304 ; 0x130 8003a06: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8003a0a: 681a ldr r2, [r3, #0] 8003a0c: f507 7398 add.w r3, r7, #304 ; 0x130 8003a10: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003a14: 681b ldr r3, [r3, #0] 8003a16: 781b ldrb r3, [r3, #0] 8003a18: 009b lsls r3, r3, #2 8003a1a: 441a add r2, r3 8003a1c: f8b7 3056 ldrh.w r3, [r7, #86] ; 0x56 8003a20: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8003a24: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8003a28: f443 4301 orr.w r3, r3, #33024 ; 0x8100 8003a2c: f043 0380 orr.w r3, r3, #128 ; 0x80 8003a30: b29b uxth r3, r3 8003a32: 8013 strh r3, [r2, #0] /* each Time to write in PMA xfer_len_db will */ ep->xfer_len_db -= len; 8003a34: f507 7398 add.w r3, r7, #304 ; 0x130 8003a38: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003a3c: 681b ldr r3, [r3, #0] 8003a3e: 6a1a ldr r2, [r3, #32] 8003a40: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003a44: 1ad2 subs r2, r2, r3 8003a46: f507 7398 add.w r3, r7, #304 ; 0x130 8003a4a: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003a4e: 681b ldr r3, [r3, #0] 8003a50: 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) 8003a52: f507 7398 add.w r3, r7, #304 ; 0x130 8003a56: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8003a5a: 681a ldr r2, [r3, #0] 8003a5c: f507 7398 add.w r3, r7, #304 ; 0x130 8003a60: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003a64: 681b ldr r3, [r3, #0] 8003a66: 781b ldrb r3, [r3, #0] 8003a68: 009b lsls r3, r3, #2 8003a6a: 4413 add r3, r2 8003a6c: 881b ldrh r3, [r3, #0] 8003a6e: b29b uxth r3, r3 8003a70: f003 0340 and.w r3, r3, #64 ; 0x40 8003a74: 2b00 cmp r3, #0 8003a76: f000 823e beq.w 8003ef6 <USB_EPStartXfer+0x66e> { /* Set the Double buffer counter for pmabuffer1 */ PCD_SET_EP_DBUF1_CNT(USBx, ep->num, ep->is_in, len); 8003a7a: f507 7398 add.w r3, r7, #304 ; 0x130 8003a7e: f5a3 7380 sub.w r3, r3, #256 ; 0x100 8003a82: f507 7298 add.w r2, r7, #304 ; 0x130 8003a86: f5a2 7296 sub.w r2, r2, #300 ; 0x12c 8003a8a: 6812 ldr r2, [r2, #0] 8003a8c: 601a str r2, [r3, #0] 8003a8e: f507 7398 add.w r3, r7, #304 ; 0x130 8003a92: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003a96: 681b ldr r3, [r3, #0] 8003a98: 785b ldrb r3, [r3, #1] 8003a9a: 2b00 cmp r3, #0 8003a9c: f040 809a bne.w 8003bd4 <USB_EPStartXfer+0x34c> 8003aa0: f507 7398 add.w r3, r7, #304 ; 0x130 8003aa4: f5a3 7384 sub.w r3, r3, #264 ; 0x108 8003aa8: f507 7298 add.w r2, r7, #304 ; 0x130 8003aac: f5a2 7296 sub.w r2, r2, #300 ; 0x12c 8003ab0: 6812 ldr r2, [r2, #0] 8003ab2: 601a str r2, [r3, #0] 8003ab4: f507 7398 add.w r3, r7, #304 ; 0x130 8003ab8: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8003abc: 681b ldr r3, [r3, #0] 8003abe: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003ac2: b29b uxth r3, r3 8003ac4: 4619 mov r1, r3 8003ac6: f507 7398 add.w r3, r7, #304 ; 0x130 8003aca: f5a3 7384 sub.w r3, r3, #264 ; 0x108 8003ace: f507 7298 add.w r2, r7, #304 ; 0x130 8003ad2: f5a2 7284 sub.w r2, r2, #264 ; 0x108 8003ad6: 6812 ldr r2, [r2, #0] 8003ad8: 440a add r2, r1 8003ada: 601a str r2, [r3, #0] 8003adc: f507 7398 add.w r3, r7, #304 ; 0x130 8003ae0: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003ae4: 681b ldr r3, [r3, #0] 8003ae6: 781b ldrb r3, [r3, #0] 8003ae8: 011a lsls r2, r3, #4 8003aea: f507 7398 add.w r3, r7, #304 ; 0x130 8003aee: f5a3 7384 sub.w r3, r3, #264 ; 0x108 8003af2: 681b ldr r3, [r3, #0] 8003af4: 4413 add r3, r2 8003af6: f203 420c addw r2, r3, #1036 ; 0x40c 8003afa: f507 7398 add.w r3, r7, #304 ; 0x130 8003afe: f5a3 7386 sub.w r3, r3, #268 ; 0x10c 8003b02: 601a str r2, [r3, #0] 8003b04: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003b08: 2b00 cmp r3, #0 8003b0a: d122 bne.n 8003b52 <USB_EPStartXfer+0x2ca> 8003b0c: f507 7398 add.w r3, r7, #304 ; 0x130 8003b10: f5a3 7386 sub.w r3, r3, #268 ; 0x10c 8003b14: 681b ldr r3, [r3, #0] 8003b16: 881b ldrh r3, [r3, #0] 8003b18: b29b uxth r3, r3 8003b1a: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8003b1e: b29a uxth r2, r3 8003b20: f507 7398 add.w r3, r7, #304 ; 0x130 8003b24: f5a3 7386 sub.w r3, r3, #268 ; 0x10c 8003b28: 681b ldr r3, [r3, #0] 8003b2a: 801a strh r2, [r3, #0] 8003b2c: f507 7398 add.w r3, r7, #304 ; 0x130 8003b30: f5a3 7386 sub.w r3, r3, #268 ; 0x10c 8003b34: 681b ldr r3, [r3, #0] 8003b36: 881b ldrh r3, [r3, #0] 8003b38: b29b uxth r3, r3 8003b3a: ea6f 4343 mvn.w r3, r3, lsl #17 8003b3e: ea6f 4353 mvn.w r3, r3, lsr #17 8003b42: b29a uxth r2, r3 8003b44: f507 7398 add.w r3, r7, #304 ; 0x130 8003b48: f5a3 7386 sub.w r3, r3, #268 ; 0x10c 8003b4c: 681b ldr r3, [r3, #0] 8003b4e: 801a strh r2, [r3, #0] 8003b50: e079 b.n 8003c46 <USB_EPStartXfer+0x3be> 8003b52: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003b56: 2b3e cmp r3, #62 ; 0x3e 8003b58: d81b bhi.n 8003b92 <USB_EPStartXfer+0x30a> 8003b5a: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003b5e: 085b lsrs r3, r3, #1 8003b60: f8c7 3128 str.w r3, [r7, #296] ; 0x128 8003b64: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003b68: f003 0301 and.w r3, r3, #1 8003b6c: 2b00 cmp r3, #0 8003b6e: d004 beq.n 8003b7a <USB_EPStartXfer+0x2f2> 8003b70: f8d7 3128 ldr.w r3, [r7, #296] ; 0x128 8003b74: 3301 adds r3, #1 8003b76: f8c7 3128 str.w r3, [r7, #296] ; 0x128 8003b7a: f8d7 3128 ldr.w r3, [r7, #296] ; 0x128 8003b7e: b29b uxth r3, r3 8003b80: 029b lsls r3, r3, #10 8003b82: b29a uxth r2, r3 8003b84: f507 7398 add.w r3, r7, #304 ; 0x130 8003b88: f5a3 7386 sub.w r3, r3, #268 ; 0x10c 8003b8c: 681b ldr r3, [r3, #0] 8003b8e: 801a strh r2, [r3, #0] 8003b90: e059 b.n 8003c46 <USB_EPStartXfer+0x3be> 8003b92: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003b96: 095b lsrs r3, r3, #5 8003b98: f8c7 3128 str.w r3, [r7, #296] ; 0x128 8003b9c: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003ba0: f003 031f and.w r3, r3, #31 8003ba4: 2b00 cmp r3, #0 8003ba6: d104 bne.n 8003bb2 <USB_EPStartXfer+0x32a> 8003ba8: f8d7 3128 ldr.w r3, [r7, #296] ; 0x128 8003bac: 3b01 subs r3, #1 8003bae: f8c7 3128 str.w r3, [r7, #296] ; 0x128 8003bb2: f8d7 3128 ldr.w r3, [r7, #296] ; 0x128 8003bb6: b29b uxth r3, r3 8003bb8: 029b lsls r3, r3, #10 8003bba: b29b uxth r3, r3 8003bbc: ea6f 4343 mvn.w r3, r3, lsl #17 8003bc0: ea6f 4353 mvn.w r3, r3, lsr #17 8003bc4: b29a uxth r2, r3 8003bc6: f507 7398 add.w r3, r7, #304 ; 0x130 8003bca: f5a3 7386 sub.w r3, r3, #268 ; 0x10c 8003bce: 681b ldr r3, [r3, #0] 8003bd0: 801a strh r2, [r3, #0] 8003bd2: e038 b.n 8003c46 <USB_EPStartXfer+0x3be> 8003bd4: f507 7398 add.w r3, r7, #304 ; 0x130 8003bd8: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003bdc: 681b ldr r3, [r3, #0] 8003bde: 785b ldrb r3, [r3, #1] 8003be0: 2b01 cmp r3, #1 8003be2: d130 bne.n 8003c46 <USB_EPStartXfer+0x3be> 8003be4: f507 7398 add.w r3, r7, #304 ; 0x130 8003be8: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8003bec: 681b ldr r3, [r3, #0] 8003bee: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003bf2: b29b uxth r3, r3 8003bf4: 4619 mov r1, r3 8003bf6: f507 7398 add.w r3, r7, #304 ; 0x130 8003bfa: f5a3 7380 sub.w r3, r3, #256 ; 0x100 8003bfe: f507 7298 add.w r2, r7, #304 ; 0x130 8003c02: f5a2 7280 sub.w r2, r2, #256 ; 0x100 8003c06: 6812 ldr r2, [r2, #0] 8003c08: 440a add r2, r1 8003c0a: 601a str r2, [r3, #0] 8003c0c: f507 7398 add.w r3, r7, #304 ; 0x130 8003c10: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003c14: 681b ldr r3, [r3, #0] 8003c16: 781b ldrb r3, [r3, #0] 8003c18: 011a lsls r2, r3, #4 8003c1a: f507 7398 add.w r3, r7, #304 ; 0x130 8003c1e: f5a3 7380 sub.w r3, r3, #256 ; 0x100 8003c22: 681b ldr r3, [r3, #0] 8003c24: 4413 add r3, r2 8003c26: f203 420c addw r2, r3, #1036 ; 0x40c 8003c2a: f507 7398 add.w r3, r7, #304 ; 0x130 8003c2e: f5a3 7382 sub.w r3, r3, #260 ; 0x104 8003c32: 601a str r2, [r3, #0] 8003c34: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003c38: b29a uxth r2, r3 8003c3a: f507 7398 add.w r3, r7, #304 ; 0x130 8003c3e: f5a3 7382 sub.w r3, r3, #260 ; 0x104 8003c42: 681b ldr r3, [r3, #0] 8003c44: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr1; 8003c46: f507 7398 add.w r3, r7, #304 ; 0x130 8003c4a: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003c4e: 681b ldr r3, [r3, #0] 8003c50: 895b ldrh r3, [r3, #10] 8003c52: f8a7 3096 strh.w r3, [r7, #150] ; 0x96 /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 8003c56: f507 7398 add.w r3, r7, #304 ; 0x130 8003c5a: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003c5e: 681b ldr r3, [r3, #0] 8003c60: 6959 ldr r1, [r3, #20] 8003c62: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003c66: b29b uxth r3, r3 8003c68: f8b7 2096 ldrh.w r2, [r7, #150] ; 0x96 8003c6c: f507 7098 add.w r0, r7, #304 ; 0x130 8003c70: f5a0 7096 sub.w r0, r0, #300 ; 0x12c 8003c74: 6800 ldr r0, [r0, #0] 8003c76: f001 fd7d bl 8005774 <USB_WritePMA> ep->xfer_buff += len; 8003c7a: f507 7398 add.w r3, r7, #304 ; 0x130 8003c7e: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003c82: 681b ldr r3, [r3, #0] 8003c84: 695a ldr r2, [r3, #20] 8003c86: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003c8a: 441a add r2, r3 8003c8c: f507 7398 add.w r3, r7, #304 ; 0x130 8003c90: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003c94: 681b ldr r3, [r3, #0] 8003c96: 615a str r2, [r3, #20] if (ep->xfer_len_db > ep->maxpacket) 8003c98: f507 7398 add.w r3, r7, #304 ; 0x130 8003c9c: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003ca0: 681b ldr r3, [r3, #0] 8003ca2: 6a1a ldr r2, [r3, #32] 8003ca4: f507 7398 add.w r3, r7, #304 ; 0x130 8003ca8: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003cac: 681b ldr r3, [r3, #0] 8003cae: 691b ldr r3, [r3, #16] 8003cb0: 429a cmp r2, r3 8003cb2: d90f bls.n 8003cd4 <USB_EPStartXfer+0x44c> { ep->xfer_len_db -= len; 8003cb4: f507 7398 add.w r3, r7, #304 ; 0x130 8003cb8: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003cbc: 681b ldr r3, [r3, #0] 8003cbe: 6a1a ldr r2, [r3, #32] 8003cc0: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003cc4: 1ad2 subs r2, r2, r3 8003cc6: f507 7398 add.w r3, r7, #304 ; 0x130 8003cca: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003cce: 681b ldr r3, [r3, #0] 8003cd0: 621a str r2, [r3, #32] 8003cd2: e00e b.n 8003cf2 <USB_EPStartXfer+0x46a> } else { len = ep->xfer_len_db; 8003cd4: f507 7398 add.w r3, r7, #304 ; 0x130 8003cd8: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003cdc: 681b ldr r3, [r3, #0] 8003cde: 6a1b ldr r3, [r3, #32] 8003ce0: f8c7 312c str.w r3, [r7, #300] ; 0x12c ep->xfer_len_db = 0U; 8003ce4: f507 7398 add.w r3, r7, #304 ; 0x130 8003ce8: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003cec: 681b ldr r3, [r3, #0] 8003cee: 2200 movs r2, #0 8003cf0: 621a str r2, [r3, #32] } /* Set the Double buffer counter for pmabuffer0 */ PCD_SET_EP_DBUF0_CNT(USBx, ep->num, ep->is_in, len); 8003cf2: f507 7398 add.w r3, r7, #304 ; 0x130 8003cf6: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003cfa: 681b ldr r3, [r3, #0] 8003cfc: 785b ldrb r3, [r3, #1] 8003cfe: 2b00 cmp r3, #0 8003d00: f040 809a bne.w 8003e38 <USB_EPStartXfer+0x5b0> 8003d04: f507 7398 add.w r3, r7, #304 ; 0x130 8003d08: f5a3 738c sub.w r3, r3, #280 ; 0x118 8003d0c: f507 7298 add.w r2, r7, #304 ; 0x130 8003d10: f5a2 7296 sub.w r2, r2, #300 ; 0x12c 8003d14: 6812 ldr r2, [r2, #0] 8003d16: 601a str r2, [r3, #0] 8003d18: f507 7398 add.w r3, r7, #304 ; 0x130 8003d1c: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8003d20: 681b ldr r3, [r3, #0] 8003d22: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003d26: b29b uxth r3, r3 8003d28: 4619 mov r1, r3 8003d2a: f507 7398 add.w r3, r7, #304 ; 0x130 8003d2e: f5a3 738c sub.w r3, r3, #280 ; 0x118 8003d32: f507 7298 add.w r2, r7, #304 ; 0x130 8003d36: f5a2 728c sub.w r2, r2, #280 ; 0x118 8003d3a: 6812 ldr r2, [r2, #0] 8003d3c: 440a add r2, r1 8003d3e: 601a str r2, [r3, #0] 8003d40: f507 7398 add.w r3, r7, #304 ; 0x130 8003d44: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003d48: 681b ldr r3, [r3, #0] 8003d4a: 781b ldrb r3, [r3, #0] 8003d4c: 011a lsls r2, r3, #4 8003d4e: f507 7398 add.w r3, r7, #304 ; 0x130 8003d52: f5a3 738c sub.w r3, r3, #280 ; 0x118 8003d56: 681b ldr r3, [r3, #0] 8003d58: 4413 add r3, r2 8003d5a: f203 4204 addw r2, r3, #1028 ; 0x404 8003d5e: f507 7398 add.w r3, r7, #304 ; 0x130 8003d62: f5a3 738e sub.w r3, r3, #284 ; 0x11c 8003d66: 601a str r2, [r3, #0] 8003d68: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003d6c: 2b00 cmp r3, #0 8003d6e: d122 bne.n 8003db6 <USB_EPStartXfer+0x52e> 8003d70: f507 7398 add.w r3, r7, #304 ; 0x130 8003d74: f5a3 738e sub.w r3, r3, #284 ; 0x11c 8003d78: 681b ldr r3, [r3, #0] 8003d7a: 881b ldrh r3, [r3, #0] 8003d7c: b29b uxth r3, r3 8003d7e: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8003d82: b29a uxth r2, r3 8003d84: f507 7398 add.w r3, r7, #304 ; 0x130 8003d88: f5a3 738e sub.w r3, r3, #284 ; 0x11c 8003d8c: 681b ldr r3, [r3, #0] 8003d8e: 801a strh r2, [r3, #0] 8003d90: f507 7398 add.w r3, r7, #304 ; 0x130 8003d94: f5a3 738e sub.w r3, r3, #284 ; 0x11c 8003d98: 681b ldr r3, [r3, #0] 8003d9a: 881b ldrh r3, [r3, #0] 8003d9c: b29b uxth r3, r3 8003d9e: ea6f 4343 mvn.w r3, r3, lsl #17 8003da2: ea6f 4353 mvn.w r3, r3, lsr #17 8003da6: b29a uxth r2, r3 8003da8: f507 7398 add.w r3, r7, #304 ; 0x130 8003dac: f5a3 738e sub.w r3, r3, #284 ; 0x11c 8003db0: 681b ldr r3, [r3, #0] 8003db2: 801a strh r2, [r3, #0] 8003db4: e083 b.n 8003ebe <USB_EPStartXfer+0x636> 8003db6: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003dba: 2b3e cmp r3, #62 ; 0x3e 8003dbc: d81b bhi.n 8003df6 <USB_EPStartXfer+0x56e> 8003dbe: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003dc2: 085b lsrs r3, r3, #1 8003dc4: f8c7 3124 str.w r3, [r7, #292] ; 0x124 8003dc8: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003dcc: f003 0301 and.w r3, r3, #1 8003dd0: 2b00 cmp r3, #0 8003dd2: d004 beq.n 8003dde <USB_EPStartXfer+0x556> 8003dd4: f8d7 3124 ldr.w r3, [r7, #292] ; 0x124 8003dd8: 3301 adds r3, #1 8003dda: f8c7 3124 str.w r3, [r7, #292] ; 0x124 8003dde: f8d7 3124 ldr.w r3, [r7, #292] ; 0x124 8003de2: b29b uxth r3, r3 8003de4: 029b lsls r3, r3, #10 8003de6: b29a uxth r2, r3 8003de8: f507 7398 add.w r3, r7, #304 ; 0x130 8003dec: f5a3 738e sub.w r3, r3, #284 ; 0x11c 8003df0: 681b ldr r3, [r3, #0] 8003df2: 801a strh r2, [r3, #0] 8003df4: e063 b.n 8003ebe <USB_EPStartXfer+0x636> 8003df6: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003dfa: 095b lsrs r3, r3, #5 8003dfc: f8c7 3124 str.w r3, [r7, #292] ; 0x124 8003e00: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003e04: f003 031f and.w r3, r3, #31 8003e08: 2b00 cmp r3, #0 8003e0a: d104 bne.n 8003e16 <USB_EPStartXfer+0x58e> 8003e0c: f8d7 3124 ldr.w r3, [r7, #292] ; 0x124 8003e10: 3b01 subs r3, #1 8003e12: f8c7 3124 str.w r3, [r7, #292] ; 0x124 8003e16: f8d7 3124 ldr.w r3, [r7, #292] ; 0x124 8003e1a: b29b uxth r3, r3 8003e1c: 029b lsls r3, r3, #10 8003e1e: b29b uxth r3, r3 8003e20: ea6f 4343 mvn.w r3, r3, lsl #17 8003e24: ea6f 4353 mvn.w r3, r3, lsr #17 8003e28: b29a uxth r2, r3 8003e2a: f507 7398 add.w r3, r7, #304 ; 0x130 8003e2e: f5a3 738e sub.w r3, r3, #284 ; 0x11c 8003e32: 681b ldr r3, [r3, #0] 8003e34: 801a strh r2, [r3, #0] 8003e36: e042 b.n 8003ebe <USB_EPStartXfer+0x636> 8003e38: f507 7398 add.w r3, r7, #304 ; 0x130 8003e3c: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003e40: 681b ldr r3, [r3, #0] 8003e42: 785b ldrb r3, [r3, #1] 8003e44: 2b01 cmp r3, #1 8003e46: d13a bne.n 8003ebe <USB_EPStartXfer+0x636> 8003e48: f507 7398 add.w r3, r7, #304 ; 0x130 8003e4c: f5a3 7388 sub.w r3, r3, #272 ; 0x110 8003e50: f507 7298 add.w r2, r7, #304 ; 0x130 8003e54: f5a2 7296 sub.w r2, r2, #300 ; 0x12c 8003e58: 6812 ldr r2, [r2, #0] 8003e5a: 601a str r2, [r3, #0] 8003e5c: f507 7398 add.w r3, r7, #304 ; 0x130 8003e60: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8003e64: 681b ldr r3, [r3, #0] 8003e66: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003e6a: b29b uxth r3, r3 8003e6c: 4619 mov r1, r3 8003e6e: f507 7398 add.w r3, r7, #304 ; 0x130 8003e72: f5a3 7388 sub.w r3, r3, #272 ; 0x110 8003e76: f507 7298 add.w r2, r7, #304 ; 0x130 8003e7a: f5a2 7288 sub.w r2, r2, #272 ; 0x110 8003e7e: 6812 ldr r2, [r2, #0] 8003e80: 440a add r2, r1 8003e82: 601a str r2, [r3, #0] 8003e84: f507 7398 add.w r3, r7, #304 ; 0x130 8003e88: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003e8c: 681b ldr r3, [r3, #0] 8003e8e: 781b ldrb r3, [r3, #0] 8003e90: 011a lsls r2, r3, #4 8003e92: f507 7398 add.w r3, r7, #304 ; 0x130 8003e96: f5a3 7388 sub.w r3, r3, #272 ; 0x110 8003e9a: 681b ldr r3, [r3, #0] 8003e9c: 4413 add r3, r2 8003e9e: f203 4204 addw r2, r3, #1028 ; 0x404 8003ea2: f507 7398 add.w r3, r7, #304 ; 0x130 8003ea6: f5a3 738a sub.w r3, r3, #276 ; 0x114 8003eaa: 601a str r2, [r3, #0] 8003eac: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003eb0: b29a uxth r2, r3 8003eb2: f507 7398 add.w r3, r7, #304 ; 0x130 8003eb6: f5a3 738a sub.w r3, r3, #276 ; 0x114 8003eba: 681b ldr r3, [r3, #0] 8003ebc: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr0; 8003ebe: f507 7398 add.w r3, r7, #304 ; 0x130 8003ec2: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003ec6: 681b ldr r3, [r3, #0] 8003ec8: 891b ldrh r3, [r3, #8] 8003eca: f8a7 3096 strh.w r3, [r7, #150] ; 0x96 /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 8003ece: f507 7398 add.w r3, r7, #304 ; 0x130 8003ed2: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003ed6: 681b ldr r3, [r3, #0] 8003ed8: 6959 ldr r1, [r3, #20] 8003eda: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003ede: b29b uxth r3, r3 8003ee0: f8b7 2096 ldrh.w r2, [r7, #150] ; 0x96 8003ee4: f507 7098 add.w r0, r7, #304 ; 0x130 8003ee8: f5a0 7096 sub.w r0, r0, #300 ; 0x12c 8003eec: 6800 ldr r0, [r0, #0] 8003eee: f001 fc41 bl 8005774 <USB_WritePMA> 8003ef2: f000 be0e b.w 8004b12 <USB_EPStartXfer+0x128a> } else { /* Set the Double buffer counter for pmabuffer0 */ PCD_SET_EP_DBUF0_CNT(USBx, ep->num, ep->is_in, len); 8003ef6: f507 7398 add.w r3, r7, #304 ; 0x130 8003efa: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003efe: 681b ldr r3, [r3, #0] 8003f00: 785b ldrb r3, [r3, #1] 8003f02: 2b00 cmp r3, #0 8003f04: d16d bne.n 8003fe2 <USB_EPStartXfer+0x75a> 8003f06: f507 7398 add.w r3, r7, #304 ; 0x130 8003f0a: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8003f0e: 681b ldr r3, [r3, #0] 8003f10: 64bb str r3, [r7, #72] ; 0x48 8003f12: f507 7398 add.w r3, r7, #304 ; 0x130 8003f16: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8003f1a: 681b ldr r3, [r3, #0] 8003f1c: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8003f20: b29b uxth r3, r3 8003f22: 461a mov r2, r3 8003f24: 6cbb ldr r3, [r7, #72] ; 0x48 8003f26: 4413 add r3, r2 8003f28: 64bb str r3, [r7, #72] ; 0x48 8003f2a: f507 7398 add.w r3, r7, #304 ; 0x130 8003f2e: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003f32: 681b ldr r3, [r3, #0] 8003f34: 781b ldrb r3, [r3, #0] 8003f36: 011a lsls r2, r3, #4 8003f38: 6cbb ldr r3, [r7, #72] ; 0x48 8003f3a: 4413 add r3, r2 8003f3c: f203 4304 addw r3, r3, #1028 ; 0x404 8003f40: 647b str r3, [r7, #68] ; 0x44 8003f42: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003f46: 2b00 cmp r3, #0 8003f48: d112 bne.n 8003f70 <USB_EPStartXfer+0x6e8> 8003f4a: 6c7b ldr r3, [r7, #68] ; 0x44 8003f4c: 881b ldrh r3, [r3, #0] 8003f4e: b29b uxth r3, r3 8003f50: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8003f54: b29a uxth r2, r3 8003f56: 6c7b ldr r3, [r7, #68] ; 0x44 8003f58: 801a strh r2, [r3, #0] 8003f5a: 6c7b ldr r3, [r7, #68] ; 0x44 8003f5c: 881b ldrh r3, [r3, #0] 8003f5e: b29b uxth r3, r3 8003f60: ea6f 4343 mvn.w r3, r3, lsl #17 8003f64: ea6f 4353 mvn.w r3, r3, lsr #17 8003f68: b29a uxth r2, r3 8003f6a: 6c7b ldr r3, [r7, #68] ; 0x44 8003f6c: 801a strh r2, [r3, #0] 8003f6e: e063 b.n 8004038 <USB_EPStartXfer+0x7b0> 8003f70: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003f74: 2b3e cmp r3, #62 ; 0x3e 8003f76: d817 bhi.n 8003fa8 <USB_EPStartXfer+0x720> 8003f78: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003f7c: 085b lsrs r3, r3, #1 8003f7e: f8c7 3120 str.w r3, [r7, #288] ; 0x120 8003f82: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003f86: f003 0301 and.w r3, r3, #1 8003f8a: 2b00 cmp r3, #0 8003f8c: d004 beq.n 8003f98 <USB_EPStartXfer+0x710> 8003f8e: f8d7 3120 ldr.w r3, [r7, #288] ; 0x120 8003f92: 3301 adds r3, #1 8003f94: f8c7 3120 str.w r3, [r7, #288] ; 0x120 8003f98: f8d7 3120 ldr.w r3, [r7, #288] ; 0x120 8003f9c: b29b uxth r3, r3 8003f9e: 029b lsls r3, r3, #10 8003fa0: b29a uxth r2, r3 8003fa2: 6c7b ldr r3, [r7, #68] ; 0x44 8003fa4: 801a strh r2, [r3, #0] 8003fa6: e047 b.n 8004038 <USB_EPStartXfer+0x7b0> 8003fa8: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003fac: 095b lsrs r3, r3, #5 8003fae: f8c7 3120 str.w r3, [r7, #288] ; 0x120 8003fb2: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8003fb6: f003 031f and.w r3, r3, #31 8003fba: 2b00 cmp r3, #0 8003fbc: d104 bne.n 8003fc8 <USB_EPStartXfer+0x740> 8003fbe: f8d7 3120 ldr.w r3, [r7, #288] ; 0x120 8003fc2: 3b01 subs r3, #1 8003fc4: f8c7 3120 str.w r3, [r7, #288] ; 0x120 8003fc8: f8d7 3120 ldr.w r3, [r7, #288] ; 0x120 8003fcc: b29b uxth r3, r3 8003fce: 029b lsls r3, r3, #10 8003fd0: b29b uxth r3, r3 8003fd2: ea6f 4343 mvn.w r3, r3, lsl #17 8003fd6: ea6f 4353 mvn.w r3, r3, lsr #17 8003fda: b29a uxth r2, r3 8003fdc: 6c7b ldr r3, [r7, #68] ; 0x44 8003fde: 801a strh r2, [r3, #0] 8003fe0: e02a b.n 8004038 <USB_EPStartXfer+0x7b0> 8003fe2: f507 7398 add.w r3, r7, #304 ; 0x130 8003fe6: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8003fea: 681b ldr r3, [r3, #0] 8003fec: 785b ldrb r3, [r3, #1] 8003fee: 2b01 cmp r3, #1 8003ff0: d122 bne.n 8004038 <USB_EPStartXfer+0x7b0> 8003ff2: f507 7398 add.w r3, r7, #304 ; 0x130 8003ff6: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8003ffa: 681b ldr r3, [r3, #0] 8003ffc: 653b str r3, [r7, #80] ; 0x50 8003ffe: f507 7398 add.w r3, r7, #304 ; 0x130 8004002: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004006: 681b ldr r3, [r3, #0] 8004008: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 800400c: b29b uxth r3, r3 800400e: 461a mov r2, r3 8004010: 6d3b ldr r3, [r7, #80] ; 0x50 8004012: 4413 add r3, r2 8004014: 653b str r3, [r7, #80] ; 0x50 8004016: f507 7398 add.w r3, r7, #304 ; 0x130 800401a: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800401e: 681b ldr r3, [r3, #0] 8004020: 781b ldrb r3, [r3, #0] 8004022: 011a lsls r2, r3, #4 8004024: 6d3b ldr r3, [r7, #80] ; 0x50 8004026: 4413 add r3, r2 8004028: f203 4304 addw r3, r3, #1028 ; 0x404 800402c: 64fb str r3, [r7, #76] ; 0x4c 800402e: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004032: b29a uxth r2, r3 8004034: 6cfb ldr r3, [r7, #76] ; 0x4c 8004036: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr0; 8004038: f507 7398 add.w r3, r7, #304 ; 0x130 800403c: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004040: 681b ldr r3, [r3, #0] 8004042: 891b ldrh r3, [r3, #8] 8004044: f8a7 3096 strh.w r3, [r7, #150] ; 0x96 /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 8004048: f507 7398 add.w r3, r7, #304 ; 0x130 800404c: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004050: 681b ldr r3, [r3, #0] 8004052: 6959 ldr r1, [r3, #20] 8004054: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004058: b29b uxth r3, r3 800405a: f8b7 2096 ldrh.w r2, [r7, #150] ; 0x96 800405e: f507 7098 add.w r0, r7, #304 ; 0x130 8004062: f5a0 7096 sub.w r0, r0, #300 ; 0x12c 8004066: 6800 ldr r0, [r0, #0] 8004068: f001 fb84 bl 8005774 <USB_WritePMA> ep->xfer_buff += len; 800406c: f507 7398 add.w r3, r7, #304 ; 0x130 8004070: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004074: 681b ldr r3, [r3, #0] 8004076: 695a ldr r2, [r3, #20] 8004078: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 800407c: 441a add r2, r3 800407e: f507 7398 add.w r3, r7, #304 ; 0x130 8004082: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004086: 681b ldr r3, [r3, #0] 8004088: 615a str r2, [r3, #20] if (ep->xfer_len_db > ep->maxpacket) 800408a: f507 7398 add.w r3, r7, #304 ; 0x130 800408e: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004092: 681b ldr r3, [r3, #0] 8004094: 6a1a ldr r2, [r3, #32] 8004096: f507 7398 add.w r3, r7, #304 ; 0x130 800409a: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800409e: 681b ldr r3, [r3, #0] 80040a0: 691b ldr r3, [r3, #16] 80040a2: 429a cmp r2, r3 80040a4: d90f bls.n 80040c6 <USB_EPStartXfer+0x83e> { ep->xfer_len_db -= len; 80040a6: f507 7398 add.w r3, r7, #304 ; 0x130 80040aa: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80040ae: 681b ldr r3, [r3, #0] 80040b0: 6a1a ldr r2, [r3, #32] 80040b2: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80040b6: 1ad2 subs r2, r2, r3 80040b8: f507 7398 add.w r3, r7, #304 ; 0x130 80040bc: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80040c0: 681b ldr r3, [r3, #0] 80040c2: 621a str r2, [r3, #32] 80040c4: e00e b.n 80040e4 <USB_EPStartXfer+0x85c> } else { len = ep->xfer_len_db; 80040c6: f507 7398 add.w r3, r7, #304 ; 0x130 80040ca: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80040ce: 681b ldr r3, [r3, #0] 80040d0: 6a1b ldr r3, [r3, #32] 80040d2: f8c7 312c str.w r3, [r7, #300] ; 0x12c ep->xfer_len_db = 0U; 80040d6: f507 7398 add.w r3, r7, #304 ; 0x130 80040da: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80040de: 681b ldr r3, [r3, #0] 80040e0: 2200 movs r2, #0 80040e2: 621a str r2, [r3, #32] } /* Set the Double buffer counter for pmabuffer1 */ PCD_SET_EP_DBUF1_CNT(USBx, ep->num, ep->is_in, len); 80040e4: f507 7398 add.w r3, r7, #304 ; 0x130 80040e8: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80040ec: 681b ldr r3, [r3, #0] 80040ee: 643b str r3, [r7, #64] ; 0x40 80040f0: f507 7398 add.w r3, r7, #304 ; 0x130 80040f4: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80040f8: 681b ldr r3, [r3, #0] 80040fa: 785b ldrb r3, [r3, #1] 80040fc: 2b00 cmp r3, #0 80040fe: d16d bne.n 80041dc <USB_EPStartXfer+0x954> 8004100: f507 7398 add.w r3, r7, #304 ; 0x130 8004104: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004108: 681b ldr r3, [r3, #0] 800410a: 63bb str r3, [r7, #56] ; 0x38 800410c: f507 7398 add.w r3, r7, #304 ; 0x130 8004110: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004114: 681b ldr r3, [r3, #0] 8004116: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 800411a: b29b uxth r3, r3 800411c: 461a mov r2, r3 800411e: 6bbb ldr r3, [r7, #56] ; 0x38 8004120: 4413 add r3, r2 8004122: 63bb str r3, [r7, #56] ; 0x38 8004124: f507 7398 add.w r3, r7, #304 ; 0x130 8004128: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800412c: 681b ldr r3, [r3, #0] 800412e: 781b ldrb r3, [r3, #0] 8004130: 011a lsls r2, r3, #4 8004132: 6bbb ldr r3, [r7, #56] ; 0x38 8004134: 4413 add r3, r2 8004136: f203 430c addw r3, r3, #1036 ; 0x40c 800413a: 637b str r3, [r7, #52] ; 0x34 800413c: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004140: 2b00 cmp r3, #0 8004142: d112 bne.n 800416a <USB_EPStartXfer+0x8e2> 8004144: 6b7b ldr r3, [r7, #52] ; 0x34 8004146: 881b ldrh r3, [r3, #0] 8004148: b29b uxth r3, r3 800414a: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 800414e: b29a uxth r2, r3 8004150: 6b7b ldr r3, [r7, #52] ; 0x34 8004152: 801a strh r2, [r3, #0] 8004154: 6b7b ldr r3, [r7, #52] ; 0x34 8004156: 881b ldrh r3, [r3, #0] 8004158: b29b uxth r3, r3 800415a: ea6f 4343 mvn.w r3, r3, lsl #17 800415e: ea6f 4353 mvn.w r3, r3, lsr #17 8004162: b29a uxth r2, r3 8004164: 6b7b ldr r3, [r7, #52] ; 0x34 8004166: 801a strh r2, [r3, #0] 8004168: e05d b.n 8004226 <USB_EPStartXfer+0x99e> 800416a: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 800416e: 2b3e cmp r3, #62 ; 0x3e 8004170: d817 bhi.n 80041a2 <USB_EPStartXfer+0x91a> 8004172: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004176: 085b lsrs r3, r3, #1 8004178: f8c7 311c str.w r3, [r7, #284] ; 0x11c 800417c: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004180: f003 0301 and.w r3, r3, #1 8004184: 2b00 cmp r3, #0 8004186: d004 beq.n 8004192 <USB_EPStartXfer+0x90a> 8004188: f8d7 311c ldr.w r3, [r7, #284] ; 0x11c 800418c: 3301 adds r3, #1 800418e: f8c7 311c str.w r3, [r7, #284] ; 0x11c 8004192: f8d7 311c ldr.w r3, [r7, #284] ; 0x11c 8004196: b29b uxth r3, r3 8004198: 029b lsls r3, r3, #10 800419a: b29a uxth r2, r3 800419c: 6b7b ldr r3, [r7, #52] ; 0x34 800419e: 801a strh r2, [r3, #0] 80041a0: e041 b.n 8004226 <USB_EPStartXfer+0x99e> 80041a2: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80041a6: 095b lsrs r3, r3, #5 80041a8: f8c7 311c str.w r3, [r7, #284] ; 0x11c 80041ac: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80041b0: f003 031f and.w r3, r3, #31 80041b4: 2b00 cmp r3, #0 80041b6: d104 bne.n 80041c2 <USB_EPStartXfer+0x93a> 80041b8: f8d7 311c ldr.w r3, [r7, #284] ; 0x11c 80041bc: 3b01 subs r3, #1 80041be: f8c7 311c str.w r3, [r7, #284] ; 0x11c 80041c2: f8d7 311c ldr.w r3, [r7, #284] ; 0x11c 80041c6: b29b uxth r3, r3 80041c8: 029b lsls r3, r3, #10 80041ca: b29b uxth r3, r3 80041cc: ea6f 4343 mvn.w r3, r3, lsl #17 80041d0: ea6f 4353 mvn.w r3, r3, lsr #17 80041d4: b29a uxth r2, r3 80041d6: 6b7b ldr r3, [r7, #52] ; 0x34 80041d8: 801a strh r2, [r3, #0] 80041da: e024 b.n 8004226 <USB_EPStartXfer+0x99e> 80041dc: f507 7398 add.w r3, r7, #304 ; 0x130 80041e0: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80041e4: 681b ldr r3, [r3, #0] 80041e6: 785b ldrb r3, [r3, #1] 80041e8: 2b01 cmp r3, #1 80041ea: d11c bne.n 8004226 <USB_EPStartXfer+0x99e> 80041ec: f507 7398 add.w r3, r7, #304 ; 0x130 80041f0: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80041f4: 681b ldr r3, [r3, #0] 80041f6: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80041fa: b29b uxth r3, r3 80041fc: 461a mov r2, r3 80041fe: 6c3b ldr r3, [r7, #64] ; 0x40 8004200: 4413 add r3, r2 8004202: 643b str r3, [r7, #64] ; 0x40 8004204: f507 7398 add.w r3, r7, #304 ; 0x130 8004208: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800420c: 681b ldr r3, [r3, #0] 800420e: 781b ldrb r3, [r3, #0] 8004210: 011a lsls r2, r3, #4 8004212: 6c3b ldr r3, [r7, #64] ; 0x40 8004214: 4413 add r3, r2 8004216: f203 430c addw r3, r3, #1036 ; 0x40c 800421a: 63fb str r3, [r7, #60] ; 0x3c 800421c: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004220: b29a uxth r2, r3 8004222: 6bfb ldr r3, [r7, #60] ; 0x3c 8004224: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr1; 8004226: f507 7398 add.w r3, r7, #304 ; 0x130 800422a: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800422e: 681b ldr r3, [r3, #0] 8004230: 895b ldrh r3, [r3, #10] 8004232: f8a7 3096 strh.w r3, [r7, #150] ; 0x96 /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 8004236: f507 7398 add.w r3, r7, #304 ; 0x130 800423a: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800423e: 681b ldr r3, [r3, #0] 8004240: 6959 ldr r1, [r3, #20] 8004242: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004246: b29b uxth r3, r3 8004248: f8b7 2096 ldrh.w r2, [r7, #150] ; 0x96 800424c: f507 7098 add.w r0, r7, #304 ; 0x130 8004250: f5a0 7096 sub.w r0, r0, #300 ; 0x12c 8004254: 6800 ldr r0, [r0, #0] 8004256: f001 fa8d bl 8005774 <USB_WritePMA> 800425a: f000 bc5a b.w 8004b12 <USB_EPStartXfer+0x128a> } } /* auto Switch to single buffer mode when transfer <Mps no need to manage in double buffer */ else { len = ep->xfer_len_db; 800425e: f507 7398 add.w r3, r7, #304 ; 0x130 8004262: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004266: 681b ldr r3, [r3, #0] 8004268: 6a1b ldr r3, [r3, #32] 800426a: f8c7 312c str.w r3, [r7, #300] ; 0x12c /* disable double buffer mode */ PCD_CLEAR_EP_DBUF(USBx, ep->num); 800426e: f507 7398 add.w r3, r7, #304 ; 0x130 8004272: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004276: 681a ldr r2, [r3, #0] 8004278: f507 7398 add.w r3, r7, #304 ; 0x130 800427c: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004280: 681b ldr r3, [r3, #0] 8004282: 781b ldrb r3, [r3, #0] 8004284: 009b lsls r3, r3, #2 8004286: 4413 add r3, r2 8004288: 881b ldrh r3, [r3, #0] 800428a: b29b uxth r3, r3 800428c: f423 43e2 bic.w r3, r3, #28928 ; 0x7100 8004290: f023 0370 bic.w r3, r3, #112 ; 0x70 8004294: f8a7 3062 strh.w r3, [r7, #98] ; 0x62 8004298: f507 7398 add.w r3, r7, #304 ; 0x130 800429c: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80042a0: 681a ldr r2, [r3, #0] 80042a2: f507 7398 add.w r3, r7, #304 ; 0x130 80042a6: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80042aa: 681b ldr r3, [r3, #0] 80042ac: 781b ldrb r3, [r3, #0] 80042ae: 009b lsls r3, r3, #2 80042b0: 441a add r2, r3 80042b2: f8b7 3062 ldrh.w r3, [r7, #98] ; 0x62 80042b6: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80042ba: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80042be: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80042c2: f043 0380 orr.w r3, r3, #128 ; 0x80 80042c6: b29b uxth r3, r3 80042c8: 8013 strh r3, [r2, #0] /* Set Tx count with nbre of byte to be transmitted */ PCD_SET_EP_TX_CNT(USBx, ep->num, len); 80042ca: f507 7398 add.w r3, r7, #304 ; 0x130 80042ce: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80042d2: 681b ldr r3, [r3, #0] 80042d4: 65fb str r3, [r7, #92] ; 0x5c 80042d6: f507 7398 add.w r3, r7, #304 ; 0x130 80042da: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80042de: 681b ldr r3, [r3, #0] 80042e0: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80042e4: b29b uxth r3, r3 80042e6: 461a mov r2, r3 80042e8: 6dfb ldr r3, [r7, #92] ; 0x5c 80042ea: 4413 add r3, r2 80042ec: 65fb str r3, [r7, #92] ; 0x5c 80042ee: f507 7398 add.w r3, r7, #304 ; 0x130 80042f2: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80042f6: 681b ldr r3, [r3, #0] 80042f8: 781b ldrb r3, [r3, #0] 80042fa: 011a lsls r2, r3, #4 80042fc: 6dfb ldr r3, [r7, #92] ; 0x5c 80042fe: 4413 add r3, r2 8004300: f203 4304 addw r3, r3, #1028 ; 0x404 8004304: 65bb str r3, [r7, #88] ; 0x58 8004306: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 800430a: b29a uxth r2, r3 800430c: 6dbb ldr r3, [r7, #88] ; 0x58 800430e: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr0; 8004310: f507 7398 add.w r3, r7, #304 ; 0x130 8004314: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004318: 681b ldr r3, [r3, #0] 800431a: 891b ldrh r3, [r3, #8] 800431c: f8a7 3096 strh.w r3, [r7, #150] ; 0x96 /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 8004320: f507 7398 add.w r3, r7, #304 ; 0x130 8004324: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004328: 681b ldr r3, [r3, #0] 800432a: 6959 ldr r1, [r3, #20] 800432c: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004330: b29b uxth r3, r3 8004332: f8b7 2096 ldrh.w r2, [r7, #150] ; 0x96 8004336: f507 7098 add.w r0, r7, #304 ; 0x130 800433a: f5a0 7096 sub.w r0, r0, #300 ; 0x12c 800433e: 6800 ldr r0, [r0, #0] 8004340: f001 fa18 bl 8005774 <USB_WritePMA> 8004344: e3e5 b.n 8004b12 <USB_EPStartXfer+0x128a> /* manage isochronous double buffer IN mode */ else { /* enable double buffer */ PCD_SET_EP_DBUF(USBx, ep->num); 8004346: f507 7398 add.w r3, r7, #304 ; 0x130 800434a: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 800434e: 681a ldr r2, [r3, #0] 8004350: f507 7398 add.w r3, r7, #304 ; 0x130 8004354: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004358: 681b ldr r3, [r3, #0] 800435a: 781b ldrb r3, [r3, #0] 800435c: 009b lsls r3, r3, #2 800435e: 4413 add r3, r2 8004360: 881b ldrh r3, [r3, #0] 8004362: b29b uxth r3, r3 8004364: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8004368: f023 0370 bic.w r3, r3, #112 ; 0x70 800436c: f8a7 30a8 strh.w r3, [r7, #168] ; 0xa8 8004370: f507 7398 add.w r3, r7, #304 ; 0x130 8004374: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004378: 681a ldr r2, [r3, #0] 800437a: f507 7398 add.w r3, r7, #304 ; 0x130 800437e: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004382: 681b ldr r3, [r3, #0] 8004384: 781b ldrb r3, [r3, #0] 8004386: 009b lsls r3, r3, #2 8004388: 441a add r2, r3 800438a: f8b7 30a8 ldrh.w r3, [r7, #168] ; 0xa8 800438e: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8004392: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8004396: f443 4301 orr.w r3, r3, #33024 ; 0x8100 800439a: f043 0380 orr.w r3, r3, #128 ; 0x80 800439e: b29b uxth r3, r3 80043a0: 8013 strh r3, [r2, #0] /* each Time to write in PMA xfer_len_db will */ ep->xfer_len_db -= len; 80043a2: f507 7398 add.w r3, r7, #304 ; 0x130 80043a6: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80043aa: 681b ldr r3, [r3, #0] 80043ac: 6a1a ldr r2, [r3, #32] 80043ae: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80043b2: 1ad2 subs r2, r2, r3 80043b4: f507 7398 add.w r3, r7, #304 ; 0x130 80043b8: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80043bc: 681b ldr r3, [r3, #0] 80043be: 621a str r2, [r3, #32] /* Fill the data buffer */ if ((PCD_GET_ENDPOINT(USBx, ep->num) & USB_EP_DTOG_TX) != 0U) 80043c0: f507 7398 add.w r3, r7, #304 ; 0x130 80043c4: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80043c8: 681a ldr r2, [r3, #0] 80043ca: f507 7398 add.w r3, r7, #304 ; 0x130 80043ce: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80043d2: 681b ldr r3, [r3, #0] 80043d4: 781b ldrb r3, [r3, #0] 80043d6: 009b lsls r3, r3, #2 80043d8: 4413 add r3, r2 80043da: 881b ldrh r3, [r3, #0] 80043dc: b29b uxth r3, r3 80043de: f003 0340 and.w r3, r3, #64 ; 0x40 80043e2: 2b00 cmp r3, #0 80043e4: f000 81bc beq.w 8004760 <USB_EPStartXfer+0xed8> { /* Set the Double buffer counter for pmabuffer1 */ PCD_SET_EP_DBUF1_CNT(USBx, ep->num, ep->is_in, len); 80043e8: f507 7398 add.w r3, r7, #304 ; 0x130 80043ec: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80043f0: 681b ldr r3, [r3, #0] 80043f2: f8c7 3080 str.w r3, [r7, #128] ; 0x80 80043f6: f507 7398 add.w r3, r7, #304 ; 0x130 80043fa: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80043fe: 681b ldr r3, [r3, #0] 8004400: 785b ldrb r3, [r3, #1] 8004402: 2b00 cmp r3, #0 8004404: d16d bne.n 80044e2 <USB_EPStartXfer+0xc5a> 8004406: f507 7398 add.w r3, r7, #304 ; 0x130 800440a: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 800440e: 681b ldr r3, [r3, #0] 8004410: 67bb str r3, [r7, #120] ; 0x78 8004412: f507 7398 add.w r3, r7, #304 ; 0x130 8004416: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 800441a: 681b ldr r3, [r3, #0] 800441c: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8004420: b29b uxth r3, r3 8004422: 461a mov r2, r3 8004424: 6fbb ldr r3, [r7, #120] ; 0x78 8004426: 4413 add r3, r2 8004428: 67bb str r3, [r7, #120] ; 0x78 800442a: f507 7398 add.w r3, r7, #304 ; 0x130 800442e: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004432: 681b ldr r3, [r3, #0] 8004434: 781b ldrb r3, [r3, #0] 8004436: 011a lsls r2, r3, #4 8004438: 6fbb ldr r3, [r7, #120] ; 0x78 800443a: 4413 add r3, r2 800443c: f203 430c addw r3, r3, #1036 ; 0x40c 8004440: 677b str r3, [r7, #116] ; 0x74 8004442: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004446: 2b00 cmp r3, #0 8004448: d112 bne.n 8004470 <USB_EPStartXfer+0xbe8> 800444a: 6f7b ldr r3, [r7, #116] ; 0x74 800444c: 881b ldrh r3, [r3, #0] 800444e: b29b uxth r3, r3 8004450: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8004454: b29a uxth r2, r3 8004456: 6f7b ldr r3, [r7, #116] ; 0x74 8004458: 801a strh r2, [r3, #0] 800445a: 6f7b ldr r3, [r7, #116] ; 0x74 800445c: 881b ldrh r3, [r3, #0] 800445e: b29b uxth r3, r3 8004460: ea6f 4343 mvn.w r3, r3, lsl #17 8004464: ea6f 4353 mvn.w r3, r3, lsr #17 8004468: b29a uxth r2, r3 800446a: 6f7b ldr r3, [r7, #116] ; 0x74 800446c: 801a strh r2, [r3, #0] 800446e: e060 b.n 8004532 <USB_EPStartXfer+0xcaa> 8004470: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004474: 2b3e cmp r3, #62 ; 0x3e 8004476: d817 bhi.n 80044a8 <USB_EPStartXfer+0xc20> 8004478: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 800447c: 085b lsrs r3, r3, #1 800447e: f8c7 3118 str.w r3, [r7, #280] ; 0x118 8004482: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004486: f003 0301 and.w r3, r3, #1 800448a: 2b00 cmp r3, #0 800448c: d004 beq.n 8004498 <USB_EPStartXfer+0xc10> 800448e: f8d7 3118 ldr.w r3, [r7, #280] ; 0x118 8004492: 3301 adds r3, #1 8004494: f8c7 3118 str.w r3, [r7, #280] ; 0x118 8004498: f8d7 3118 ldr.w r3, [r7, #280] ; 0x118 800449c: b29b uxth r3, r3 800449e: 029b lsls r3, r3, #10 80044a0: b29a uxth r2, r3 80044a2: 6f7b ldr r3, [r7, #116] ; 0x74 80044a4: 801a strh r2, [r3, #0] 80044a6: e044 b.n 8004532 <USB_EPStartXfer+0xcaa> 80044a8: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80044ac: 095b lsrs r3, r3, #5 80044ae: f8c7 3118 str.w r3, [r7, #280] ; 0x118 80044b2: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80044b6: f003 031f and.w r3, r3, #31 80044ba: 2b00 cmp r3, #0 80044bc: d104 bne.n 80044c8 <USB_EPStartXfer+0xc40> 80044be: f8d7 3118 ldr.w r3, [r7, #280] ; 0x118 80044c2: 3b01 subs r3, #1 80044c4: f8c7 3118 str.w r3, [r7, #280] ; 0x118 80044c8: f8d7 3118 ldr.w r3, [r7, #280] ; 0x118 80044cc: b29b uxth r3, r3 80044ce: 029b lsls r3, r3, #10 80044d0: b29b uxth r3, r3 80044d2: ea6f 4343 mvn.w r3, r3, lsl #17 80044d6: ea6f 4353 mvn.w r3, r3, lsr #17 80044da: b29a uxth r2, r3 80044dc: 6f7b ldr r3, [r7, #116] ; 0x74 80044de: 801a strh r2, [r3, #0] 80044e0: e027 b.n 8004532 <USB_EPStartXfer+0xcaa> 80044e2: f507 7398 add.w r3, r7, #304 ; 0x130 80044e6: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80044ea: 681b ldr r3, [r3, #0] 80044ec: 785b ldrb r3, [r3, #1] 80044ee: 2b01 cmp r3, #1 80044f0: d11f bne.n 8004532 <USB_EPStartXfer+0xcaa> 80044f2: f507 7398 add.w r3, r7, #304 ; 0x130 80044f6: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80044fa: 681b ldr r3, [r3, #0] 80044fc: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8004500: b29b uxth r3, r3 8004502: 461a mov r2, r3 8004504: f8d7 3080 ldr.w r3, [r7, #128] ; 0x80 8004508: 4413 add r3, r2 800450a: f8c7 3080 str.w r3, [r7, #128] ; 0x80 800450e: f507 7398 add.w r3, r7, #304 ; 0x130 8004512: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004516: 681b ldr r3, [r3, #0] 8004518: 781b ldrb r3, [r3, #0] 800451a: 011a lsls r2, r3, #4 800451c: f8d7 3080 ldr.w r3, [r7, #128] ; 0x80 8004520: 4413 add r3, r2 8004522: f203 430c addw r3, r3, #1036 ; 0x40c 8004526: 67fb str r3, [r7, #124] ; 0x7c 8004528: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 800452c: b29a uxth r2, r3 800452e: 6ffb ldr r3, [r7, #124] ; 0x7c 8004530: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr1; 8004532: f507 7398 add.w r3, r7, #304 ; 0x130 8004536: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800453a: 681b ldr r3, [r3, #0] 800453c: 895b ldrh r3, [r3, #10] 800453e: f8a7 3096 strh.w r3, [r7, #150] ; 0x96 /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 8004542: f507 7398 add.w r3, r7, #304 ; 0x130 8004546: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800454a: 681b ldr r3, [r3, #0] 800454c: 6959 ldr r1, [r3, #20] 800454e: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004552: b29b uxth r3, r3 8004554: f8b7 2096 ldrh.w r2, [r7, #150] ; 0x96 8004558: f507 7098 add.w r0, r7, #304 ; 0x130 800455c: f5a0 7096 sub.w r0, r0, #300 ; 0x12c 8004560: 6800 ldr r0, [r0, #0] 8004562: f001 f907 bl 8005774 <USB_WritePMA> ep->xfer_buff += len; 8004566: f507 7398 add.w r3, r7, #304 ; 0x130 800456a: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800456e: 681b ldr r3, [r3, #0] 8004570: 695a ldr r2, [r3, #20] 8004572: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004576: 441a add r2, r3 8004578: f507 7398 add.w r3, r7, #304 ; 0x130 800457c: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004580: 681b ldr r3, [r3, #0] 8004582: 615a str r2, [r3, #20] if (ep->xfer_len_db > ep->maxpacket) 8004584: f507 7398 add.w r3, r7, #304 ; 0x130 8004588: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800458c: 681b ldr r3, [r3, #0] 800458e: 6a1a ldr r2, [r3, #32] 8004590: f507 7398 add.w r3, r7, #304 ; 0x130 8004594: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004598: 681b ldr r3, [r3, #0] 800459a: 691b ldr r3, [r3, #16] 800459c: 429a cmp r2, r3 800459e: d90f bls.n 80045c0 <USB_EPStartXfer+0xd38> { ep->xfer_len_db -= len; 80045a0: f507 7398 add.w r3, r7, #304 ; 0x130 80045a4: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80045a8: 681b ldr r3, [r3, #0] 80045aa: 6a1a ldr r2, [r3, #32] 80045ac: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80045b0: 1ad2 subs r2, r2, r3 80045b2: f507 7398 add.w r3, r7, #304 ; 0x130 80045b6: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80045ba: 681b ldr r3, [r3, #0] 80045bc: 621a str r2, [r3, #32] 80045be: e00e b.n 80045de <USB_EPStartXfer+0xd56> } else { len = ep->xfer_len_db; 80045c0: f507 7398 add.w r3, r7, #304 ; 0x130 80045c4: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80045c8: 681b ldr r3, [r3, #0] 80045ca: 6a1b ldr r3, [r3, #32] 80045cc: f8c7 312c str.w r3, [r7, #300] ; 0x12c ep->xfer_len_db = 0U; 80045d0: f507 7398 add.w r3, r7, #304 ; 0x130 80045d4: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80045d8: 681b ldr r3, [r3, #0] 80045da: 2200 movs r2, #0 80045dc: 621a str r2, [r3, #32] } if (len > 0U) 80045de: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80045e2: 2b00 cmp r3, #0 80045e4: f000 8295 beq.w 8004b12 <USB_EPStartXfer+0x128a> { /* Set the Double buffer counter for pmabuffer0 */ PCD_SET_EP_DBUF0_CNT(USBx, ep->num, ep->is_in, len); 80045e8: f507 7398 add.w r3, r7, #304 ; 0x130 80045ec: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80045f0: 681b ldr r3, [r3, #0] 80045f2: 785b ldrb r3, [r3, #1] 80045f4: 2b00 cmp r3, #0 80045f6: d16d bne.n 80046d4 <USB_EPStartXfer+0xe4c> 80045f8: f507 7398 add.w r3, r7, #304 ; 0x130 80045fc: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004600: 681b ldr r3, [r3, #0] 8004602: 66bb str r3, [r7, #104] ; 0x68 8004604: f507 7398 add.w r3, r7, #304 ; 0x130 8004608: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 800460c: 681b ldr r3, [r3, #0] 800460e: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8004612: b29b uxth r3, r3 8004614: 461a mov r2, r3 8004616: 6ebb ldr r3, [r7, #104] ; 0x68 8004618: 4413 add r3, r2 800461a: 66bb str r3, [r7, #104] ; 0x68 800461c: f507 7398 add.w r3, r7, #304 ; 0x130 8004620: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004624: 681b ldr r3, [r3, #0] 8004626: 781b ldrb r3, [r3, #0] 8004628: 011a lsls r2, r3, #4 800462a: 6ebb ldr r3, [r7, #104] ; 0x68 800462c: 4413 add r3, r2 800462e: f203 4304 addw r3, r3, #1028 ; 0x404 8004632: 667b str r3, [r7, #100] ; 0x64 8004634: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004638: 2b00 cmp r3, #0 800463a: d112 bne.n 8004662 <USB_EPStartXfer+0xdda> 800463c: 6e7b ldr r3, [r7, #100] ; 0x64 800463e: 881b ldrh r3, [r3, #0] 8004640: b29b uxth r3, r3 8004642: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8004646: b29a uxth r2, r3 8004648: 6e7b ldr r3, [r7, #100] ; 0x64 800464a: 801a strh r2, [r3, #0] 800464c: 6e7b ldr r3, [r7, #100] ; 0x64 800464e: 881b ldrh r3, [r3, #0] 8004650: b29b uxth r3, r3 8004652: ea6f 4343 mvn.w r3, r3, lsl #17 8004656: ea6f 4353 mvn.w r3, r3, lsr #17 800465a: b29a uxth r2, r3 800465c: 6e7b ldr r3, [r7, #100] ; 0x64 800465e: 801a strh r2, [r3, #0] 8004660: e063 b.n 800472a <USB_EPStartXfer+0xea2> 8004662: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004666: 2b3e cmp r3, #62 ; 0x3e 8004668: d817 bhi.n 800469a <USB_EPStartXfer+0xe12> 800466a: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 800466e: 085b lsrs r3, r3, #1 8004670: f8c7 3114 str.w r3, [r7, #276] ; 0x114 8004674: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004678: f003 0301 and.w r3, r3, #1 800467c: 2b00 cmp r3, #0 800467e: d004 beq.n 800468a <USB_EPStartXfer+0xe02> 8004680: f8d7 3114 ldr.w r3, [r7, #276] ; 0x114 8004684: 3301 adds r3, #1 8004686: f8c7 3114 str.w r3, [r7, #276] ; 0x114 800468a: f8d7 3114 ldr.w r3, [r7, #276] ; 0x114 800468e: b29b uxth r3, r3 8004690: 029b lsls r3, r3, #10 8004692: b29a uxth r2, r3 8004694: 6e7b ldr r3, [r7, #100] ; 0x64 8004696: 801a strh r2, [r3, #0] 8004698: e047 b.n 800472a <USB_EPStartXfer+0xea2> 800469a: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 800469e: 095b lsrs r3, r3, #5 80046a0: f8c7 3114 str.w r3, [r7, #276] ; 0x114 80046a4: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80046a8: f003 031f and.w r3, r3, #31 80046ac: 2b00 cmp r3, #0 80046ae: d104 bne.n 80046ba <USB_EPStartXfer+0xe32> 80046b0: f8d7 3114 ldr.w r3, [r7, #276] ; 0x114 80046b4: 3b01 subs r3, #1 80046b6: f8c7 3114 str.w r3, [r7, #276] ; 0x114 80046ba: f8d7 3114 ldr.w r3, [r7, #276] ; 0x114 80046be: b29b uxth r3, r3 80046c0: 029b lsls r3, r3, #10 80046c2: b29b uxth r3, r3 80046c4: ea6f 4343 mvn.w r3, r3, lsl #17 80046c8: ea6f 4353 mvn.w r3, r3, lsr #17 80046cc: b29a uxth r2, r3 80046ce: 6e7b ldr r3, [r7, #100] ; 0x64 80046d0: 801a strh r2, [r3, #0] 80046d2: e02a b.n 800472a <USB_EPStartXfer+0xea2> 80046d4: f507 7398 add.w r3, r7, #304 ; 0x130 80046d8: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80046dc: 681b ldr r3, [r3, #0] 80046de: 785b ldrb r3, [r3, #1] 80046e0: 2b01 cmp r3, #1 80046e2: d122 bne.n 800472a <USB_EPStartXfer+0xea2> 80046e4: f507 7398 add.w r3, r7, #304 ; 0x130 80046e8: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80046ec: 681b ldr r3, [r3, #0] 80046ee: 673b str r3, [r7, #112] ; 0x70 80046f0: f507 7398 add.w r3, r7, #304 ; 0x130 80046f4: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80046f8: 681b ldr r3, [r3, #0] 80046fa: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80046fe: b29b uxth r3, r3 8004700: 461a mov r2, r3 8004702: 6f3b ldr r3, [r7, #112] ; 0x70 8004704: 4413 add r3, r2 8004706: 673b str r3, [r7, #112] ; 0x70 8004708: f507 7398 add.w r3, r7, #304 ; 0x130 800470c: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004710: 681b ldr r3, [r3, #0] 8004712: 781b ldrb r3, [r3, #0] 8004714: 011a lsls r2, r3, #4 8004716: 6f3b ldr r3, [r7, #112] ; 0x70 8004718: 4413 add r3, r2 800471a: f203 4304 addw r3, r3, #1028 ; 0x404 800471e: 66fb str r3, [r7, #108] ; 0x6c 8004720: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004724: b29a uxth r2, r3 8004726: 6efb ldr r3, [r7, #108] ; 0x6c 8004728: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr0; 800472a: f507 7398 add.w r3, r7, #304 ; 0x130 800472e: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004732: 681b ldr r3, [r3, #0] 8004734: 891b ldrh r3, [r3, #8] 8004736: f8a7 3096 strh.w r3, [r7, #150] ; 0x96 /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 800473a: f507 7398 add.w r3, r7, #304 ; 0x130 800473e: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004742: 681b ldr r3, [r3, #0] 8004744: 6959 ldr r1, [r3, #20] 8004746: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 800474a: b29b uxth r3, r3 800474c: f8b7 2096 ldrh.w r2, [r7, #150] ; 0x96 8004750: f507 7098 add.w r0, r7, #304 ; 0x130 8004754: f5a0 7096 sub.w r0, r0, #300 ; 0x12c 8004758: 6800 ldr r0, [r0, #0] 800475a: f001 f80b bl 8005774 <USB_WritePMA> 800475e: e1d8 b.n 8004b12 <USB_EPStartXfer+0x128a> } } else { /* Set the Double buffer counter for pmabuffer0 */ PCD_SET_EP_DBUF0_CNT(USBx, ep->num, ep->is_in, len); 8004760: f507 7398 add.w r3, r7, #304 ; 0x130 8004764: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004768: 681b ldr r3, [r3, #0] 800476a: 785b ldrb r3, [r3, #1] 800476c: 2b00 cmp r3, #0 800476e: d178 bne.n 8004862 <USB_EPStartXfer+0xfda> 8004770: f507 7398 add.w r3, r7, #304 ; 0x130 8004774: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004778: 681b ldr r3, [r3, #0] 800477a: f8c7 309c str.w r3, [r7, #156] ; 0x9c 800477e: f507 7398 add.w r3, r7, #304 ; 0x130 8004782: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004786: 681b ldr r3, [r3, #0] 8004788: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 800478c: b29b uxth r3, r3 800478e: 461a mov r2, r3 8004790: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c 8004794: 4413 add r3, r2 8004796: f8c7 309c str.w r3, [r7, #156] ; 0x9c 800479a: f507 7398 add.w r3, r7, #304 ; 0x130 800479e: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80047a2: 681b ldr r3, [r3, #0] 80047a4: 781b ldrb r3, [r3, #0] 80047a6: 011a lsls r2, r3, #4 80047a8: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c 80047ac: 4413 add r3, r2 80047ae: f203 4304 addw r3, r3, #1028 ; 0x404 80047b2: f8c7 3098 str.w r3, [r7, #152] ; 0x98 80047b6: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80047ba: 2b00 cmp r3, #0 80047bc: d116 bne.n 80047ec <USB_EPStartXfer+0xf64> 80047be: f8d7 3098 ldr.w r3, [r7, #152] ; 0x98 80047c2: 881b ldrh r3, [r3, #0] 80047c4: b29b uxth r3, r3 80047c6: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 80047ca: b29a uxth r2, r3 80047cc: f8d7 3098 ldr.w r3, [r7, #152] ; 0x98 80047d0: 801a strh r2, [r3, #0] 80047d2: f8d7 3098 ldr.w r3, [r7, #152] ; 0x98 80047d6: 881b ldrh r3, [r3, #0] 80047d8: b29b uxth r3, r3 80047da: ea6f 4343 mvn.w r3, r3, lsl #17 80047de: ea6f 4353 mvn.w r3, r3, lsr #17 80047e2: b29a uxth r2, r3 80047e4: f8d7 3098 ldr.w r3, [r7, #152] ; 0x98 80047e8: 801a strh r2, [r3, #0] 80047ea: e06b b.n 80048c4 <USB_EPStartXfer+0x103c> 80047ec: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80047f0: 2b3e cmp r3, #62 ; 0x3e 80047f2: d818 bhi.n 8004826 <USB_EPStartXfer+0xf9e> 80047f4: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80047f8: 085b lsrs r3, r3, #1 80047fa: f8c7 3110 str.w r3, [r7, #272] ; 0x110 80047fe: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004802: f003 0301 and.w r3, r3, #1 8004806: 2b00 cmp r3, #0 8004808: d004 beq.n 8004814 <USB_EPStartXfer+0xf8c> 800480a: f8d7 3110 ldr.w r3, [r7, #272] ; 0x110 800480e: 3301 adds r3, #1 8004810: f8c7 3110 str.w r3, [r7, #272] ; 0x110 8004814: f8d7 3110 ldr.w r3, [r7, #272] ; 0x110 8004818: b29b uxth r3, r3 800481a: 029b lsls r3, r3, #10 800481c: b29a uxth r2, r3 800481e: f8d7 3098 ldr.w r3, [r7, #152] ; 0x98 8004822: 801a strh r2, [r3, #0] 8004824: e04e b.n 80048c4 <USB_EPStartXfer+0x103c> 8004826: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 800482a: 095b lsrs r3, r3, #5 800482c: f8c7 3110 str.w r3, [r7, #272] ; 0x110 8004830: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004834: f003 031f and.w r3, r3, #31 8004838: 2b00 cmp r3, #0 800483a: d104 bne.n 8004846 <USB_EPStartXfer+0xfbe> 800483c: f8d7 3110 ldr.w r3, [r7, #272] ; 0x110 8004840: 3b01 subs r3, #1 8004842: f8c7 3110 str.w r3, [r7, #272] ; 0x110 8004846: f8d7 3110 ldr.w r3, [r7, #272] ; 0x110 800484a: b29b uxth r3, r3 800484c: 029b lsls r3, r3, #10 800484e: b29b uxth r3, r3 8004850: ea6f 4343 mvn.w r3, r3, lsl #17 8004854: ea6f 4353 mvn.w r3, r3, lsr #17 8004858: b29a uxth r2, r3 800485a: f8d7 3098 ldr.w r3, [r7, #152] ; 0x98 800485e: 801a strh r2, [r3, #0] 8004860: e030 b.n 80048c4 <USB_EPStartXfer+0x103c> 8004862: f507 7398 add.w r3, r7, #304 ; 0x130 8004866: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800486a: 681b ldr r3, [r3, #0] 800486c: 785b ldrb r3, [r3, #1] 800486e: 2b01 cmp r3, #1 8004870: d128 bne.n 80048c4 <USB_EPStartXfer+0x103c> 8004872: f507 7398 add.w r3, r7, #304 ; 0x130 8004876: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 800487a: 681b ldr r3, [r3, #0] 800487c: f8c7 30a4 str.w r3, [r7, #164] ; 0xa4 8004880: f507 7398 add.w r3, r7, #304 ; 0x130 8004884: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004888: 681b ldr r3, [r3, #0] 800488a: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 800488e: b29b uxth r3, r3 8004890: 461a mov r2, r3 8004892: f8d7 30a4 ldr.w r3, [r7, #164] ; 0xa4 8004896: 4413 add r3, r2 8004898: f8c7 30a4 str.w r3, [r7, #164] ; 0xa4 800489c: f507 7398 add.w r3, r7, #304 ; 0x130 80048a0: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80048a4: 681b ldr r3, [r3, #0] 80048a6: 781b ldrb r3, [r3, #0] 80048a8: 011a lsls r2, r3, #4 80048aa: f8d7 30a4 ldr.w r3, [r7, #164] ; 0xa4 80048ae: 4413 add r3, r2 80048b0: f203 4304 addw r3, r3, #1028 ; 0x404 80048b4: f8c7 30a0 str.w r3, [r7, #160] ; 0xa0 80048b8: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80048bc: b29a uxth r2, r3 80048be: f8d7 30a0 ldr.w r3, [r7, #160] ; 0xa0 80048c2: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr0; 80048c4: f507 7398 add.w r3, r7, #304 ; 0x130 80048c8: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80048cc: 681b ldr r3, [r3, #0] 80048ce: 891b ldrh r3, [r3, #8] 80048d0: f8a7 3096 strh.w r3, [r7, #150] ; 0x96 /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 80048d4: f507 7398 add.w r3, r7, #304 ; 0x130 80048d8: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80048dc: 681b ldr r3, [r3, #0] 80048de: 6959 ldr r1, [r3, #20] 80048e0: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80048e4: b29b uxth r3, r3 80048e6: f8b7 2096 ldrh.w r2, [r7, #150] ; 0x96 80048ea: f507 7098 add.w r0, r7, #304 ; 0x130 80048ee: f5a0 7096 sub.w r0, r0, #300 ; 0x12c 80048f2: 6800 ldr r0, [r0, #0] 80048f4: f000 ff3e bl 8005774 <USB_WritePMA> ep->xfer_buff += len; 80048f8: f507 7398 add.w r3, r7, #304 ; 0x130 80048fc: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004900: 681b ldr r3, [r3, #0] 8004902: 695a ldr r2, [r3, #20] 8004904: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004908: 441a add r2, r3 800490a: f507 7398 add.w r3, r7, #304 ; 0x130 800490e: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004912: 681b ldr r3, [r3, #0] 8004914: 615a str r2, [r3, #20] if (ep->xfer_len_db > ep->maxpacket) 8004916: f507 7398 add.w r3, r7, #304 ; 0x130 800491a: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800491e: 681b ldr r3, [r3, #0] 8004920: 6a1a ldr r2, [r3, #32] 8004922: f507 7398 add.w r3, r7, #304 ; 0x130 8004926: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800492a: 681b ldr r3, [r3, #0] 800492c: 691b ldr r3, [r3, #16] 800492e: 429a cmp r2, r3 8004930: d90f bls.n 8004952 <USB_EPStartXfer+0x10ca> { ep->xfer_len_db -= len; 8004932: f507 7398 add.w r3, r7, #304 ; 0x130 8004936: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800493a: 681b ldr r3, [r3, #0] 800493c: 6a1a ldr r2, [r3, #32] 800493e: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004942: 1ad2 subs r2, r2, r3 8004944: f507 7398 add.w r3, r7, #304 ; 0x130 8004948: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800494c: 681b ldr r3, [r3, #0] 800494e: 621a str r2, [r3, #32] 8004950: e00e b.n 8004970 <USB_EPStartXfer+0x10e8> } else { len = ep->xfer_len_db; 8004952: f507 7398 add.w r3, r7, #304 ; 0x130 8004956: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800495a: 681b ldr r3, [r3, #0] 800495c: 6a1b ldr r3, [r3, #32] 800495e: f8c7 312c str.w r3, [r7, #300] ; 0x12c ep->xfer_len_db = 0U; 8004962: f507 7398 add.w r3, r7, #304 ; 0x130 8004966: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800496a: 681b ldr r3, [r3, #0] 800496c: 2200 movs r2, #0 800496e: 621a str r2, [r3, #32] } if (len > 0U) 8004970: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004974: 2b00 cmp r3, #0 8004976: f000 80cc beq.w 8004b12 <USB_EPStartXfer+0x128a> { /* Set the Double buffer counter for pmabuffer1 */ PCD_SET_EP_DBUF1_CNT(USBx, ep->num, ep->is_in, len); 800497a: f507 7398 add.w r3, r7, #304 ; 0x130 800497e: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004982: 681b ldr r3, [r3, #0] 8004984: f8c7 3090 str.w r3, [r7, #144] ; 0x90 8004988: f507 7398 add.w r3, r7, #304 ; 0x130 800498c: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004990: 681b ldr r3, [r3, #0] 8004992: 785b ldrb r3, [r3, #1] 8004994: 2b00 cmp r3, #0 8004996: d178 bne.n 8004a8a <USB_EPStartXfer+0x1202> 8004998: f507 7398 add.w r3, r7, #304 ; 0x130 800499c: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80049a0: 681b ldr r3, [r3, #0] 80049a2: f8c7 3088 str.w r3, [r7, #136] ; 0x88 80049a6: f507 7398 add.w r3, r7, #304 ; 0x130 80049aa: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80049ae: 681b ldr r3, [r3, #0] 80049b0: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80049b4: b29b uxth r3, r3 80049b6: 461a mov r2, r3 80049b8: f8d7 3088 ldr.w r3, [r7, #136] ; 0x88 80049bc: 4413 add r3, r2 80049be: f8c7 3088 str.w r3, [r7, #136] ; 0x88 80049c2: f507 7398 add.w r3, r7, #304 ; 0x130 80049c6: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80049ca: 681b ldr r3, [r3, #0] 80049cc: 781b ldrb r3, [r3, #0] 80049ce: 011a lsls r2, r3, #4 80049d0: f8d7 3088 ldr.w r3, [r7, #136] ; 0x88 80049d4: 4413 add r3, r2 80049d6: f203 430c addw r3, r3, #1036 ; 0x40c 80049da: f8c7 3084 str.w r3, [r7, #132] ; 0x84 80049de: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80049e2: 2b00 cmp r3, #0 80049e4: d116 bne.n 8004a14 <USB_EPStartXfer+0x118c> 80049e6: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84 80049ea: 881b ldrh r3, [r3, #0] 80049ec: b29b uxth r3, r3 80049ee: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 80049f2: b29a uxth r2, r3 80049f4: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84 80049f8: 801a strh r2, [r3, #0] 80049fa: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84 80049fe: 881b ldrh r3, [r3, #0] 8004a00: b29b uxth r3, r3 8004a02: ea6f 4343 mvn.w r3, r3, lsl #17 8004a06: ea6f 4353 mvn.w r3, r3, lsr #17 8004a0a: b29a uxth r2, r3 8004a0c: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84 8004a10: 801a strh r2, [r3, #0] 8004a12: e064 b.n 8004ade <USB_EPStartXfer+0x1256> 8004a14: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004a18: 2b3e cmp r3, #62 ; 0x3e 8004a1a: d818 bhi.n 8004a4e <USB_EPStartXfer+0x11c6> 8004a1c: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004a20: 085b lsrs r3, r3, #1 8004a22: f8c7 310c str.w r3, [r7, #268] ; 0x10c 8004a26: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004a2a: f003 0301 and.w r3, r3, #1 8004a2e: 2b00 cmp r3, #0 8004a30: d004 beq.n 8004a3c <USB_EPStartXfer+0x11b4> 8004a32: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8004a36: 3301 adds r3, #1 8004a38: f8c7 310c str.w r3, [r7, #268] ; 0x10c 8004a3c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8004a40: b29b uxth r3, r3 8004a42: 029b lsls r3, r3, #10 8004a44: b29a uxth r2, r3 8004a46: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84 8004a4a: 801a strh r2, [r3, #0] 8004a4c: e047 b.n 8004ade <USB_EPStartXfer+0x1256> 8004a4e: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004a52: 095b lsrs r3, r3, #5 8004a54: f8c7 310c str.w r3, [r7, #268] ; 0x10c 8004a58: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004a5c: f003 031f and.w r3, r3, #31 8004a60: 2b00 cmp r3, #0 8004a62: d104 bne.n 8004a6e <USB_EPStartXfer+0x11e6> 8004a64: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8004a68: 3b01 subs r3, #1 8004a6a: f8c7 310c str.w r3, [r7, #268] ; 0x10c 8004a6e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c 8004a72: b29b uxth r3, r3 8004a74: 029b lsls r3, r3, #10 8004a76: b29b uxth r3, r3 8004a78: ea6f 4343 mvn.w r3, r3, lsl #17 8004a7c: ea6f 4353 mvn.w r3, r3, lsr #17 8004a80: b29a uxth r2, r3 8004a82: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84 8004a86: 801a strh r2, [r3, #0] 8004a88: e029 b.n 8004ade <USB_EPStartXfer+0x1256> 8004a8a: f507 7398 add.w r3, r7, #304 ; 0x130 8004a8e: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004a92: 681b ldr r3, [r3, #0] 8004a94: 785b ldrb r3, [r3, #1] 8004a96: 2b01 cmp r3, #1 8004a98: d121 bne.n 8004ade <USB_EPStartXfer+0x1256> 8004a9a: f507 7398 add.w r3, r7, #304 ; 0x130 8004a9e: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004aa2: 681b ldr r3, [r3, #0] 8004aa4: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8004aa8: b29b uxth r3, r3 8004aaa: 461a mov r2, r3 8004aac: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90 8004ab0: 4413 add r3, r2 8004ab2: f8c7 3090 str.w r3, [r7, #144] ; 0x90 8004ab6: f507 7398 add.w r3, r7, #304 ; 0x130 8004aba: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004abe: 681b ldr r3, [r3, #0] 8004ac0: 781b ldrb r3, [r3, #0] 8004ac2: 011a lsls r2, r3, #4 8004ac4: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90 8004ac8: 4413 add r3, r2 8004aca: f203 430c addw r3, r3, #1036 ; 0x40c 8004ace: f8c7 308c str.w r3, [r7, #140] ; 0x8c 8004ad2: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004ad6: b29a uxth r2, r3 8004ad8: f8d7 308c ldr.w r3, [r7, #140] ; 0x8c 8004adc: 801a strh r2, [r3, #0] pmabuffer = ep->pmaaddr1; 8004ade: f507 7398 add.w r3, r7, #304 ; 0x130 8004ae2: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004ae6: 681b ldr r3, [r3, #0] 8004ae8: 895b ldrh r3, [r3, #10] 8004aea: f8a7 3096 strh.w r3, [r7, #150] ; 0x96 /* Write the user buffer to USB PMA */ USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len); 8004aee: f507 7398 add.w r3, r7, #304 ; 0x130 8004af2: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004af6: 681b ldr r3, [r3, #0] 8004af8: 6959 ldr r1, [r3, #20] 8004afa: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004afe: b29b uxth r3, r3 8004b00: f8b7 2096 ldrh.w r2, [r7, #150] ; 0x96 8004b04: f507 7098 add.w r0, r7, #304 ; 0x130 8004b08: f5a0 7096 sub.w r0, r0, #300 ; 0x12c 8004b0c: 6800 ldr r0, [r0, #0] 8004b0e: f000 fe31 bl 8005774 <USB_WritePMA> } } } } PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_VALID); 8004b12: f507 7398 add.w r3, r7, #304 ; 0x130 8004b16: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004b1a: 681a ldr r2, [r3, #0] 8004b1c: f507 7398 add.w r3, r7, #304 ; 0x130 8004b20: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004b24: 681b ldr r3, [r3, #0] 8004b26: 781b ldrb r3, [r3, #0] 8004b28: 009b lsls r3, r3, #2 8004b2a: 4413 add r3, r2 8004b2c: 881b ldrh r3, [r3, #0] 8004b2e: b29b uxth r3, r3 8004b30: f507 7298 add.w r2, r7, #304 ; 0x130 8004b34: f5a2 7293 sub.w r2, r2, #294 ; 0x126 8004b38: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8004b3c: f023 0340 bic.w r3, r3, #64 ; 0x40 8004b40: 8013 strh r3, [r2, #0] 8004b42: f507 7398 add.w r3, r7, #304 ; 0x130 8004b46: f5a3 7393 sub.w r3, r3, #294 ; 0x126 8004b4a: f507 7298 add.w r2, r7, #304 ; 0x130 8004b4e: f5a2 7293 sub.w r2, r2, #294 ; 0x126 8004b52: 8812 ldrh r2, [r2, #0] 8004b54: f082 0210 eor.w r2, r2, #16 8004b58: 801a strh r2, [r3, #0] 8004b5a: f507 7398 add.w r3, r7, #304 ; 0x130 8004b5e: f5a3 7393 sub.w r3, r3, #294 ; 0x126 8004b62: f507 7298 add.w r2, r7, #304 ; 0x130 8004b66: f5a2 7293 sub.w r2, r2, #294 ; 0x126 8004b6a: 8812 ldrh r2, [r2, #0] 8004b6c: f082 0220 eor.w r2, r2, #32 8004b70: 801a strh r2, [r3, #0] 8004b72: f507 7398 add.w r3, r7, #304 ; 0x130 8004b76: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004b7a: 681a ldr r2, [r3, #0] 8004b7c: f507 7398 add.w r3, r7, #304 ; 0x130 8004b80: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004b84: 681b ldr r3, [r3, #0] 8004b86: 781b ldrb r3, [r3, #0] 8004b88: 009b lsls r3, r3, #2 8004b8a: 441a add r2, r3 8004b8c: f507 7398 add.w r3, r7, #304 ; 0x130 8004b90: f5a3 7393 sub.w r3, r3, #294 ; 0x126 8004b94: 881b ldrh r3, [r3, #0] 8004b96: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 8004b9a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8004b9e: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8004ba2: f043 0380 orr.w r3, r3, #128 ; 0x80 8004ba6: b29b uxth r3, r3 8004ba8: 8013 strh r3, [r2, #0] 8004baa: f000 bc9f b.w 80054ec <USB_EPStartXfer+0x1c64> } else /* OUT endpoint */ { if (ep->doublebuffer == 0U) 8004bae: f507 7398 add.w r3, r7, #304 ; 0x130 8004bb2: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004bb6: 681b ldr r3, [r3, #0] 8004bb8: 7b1b ldrb r3, [r3, #12] 8004bba: 2b00 cmp r3, #0 8004bbc: f040 80ae bne.w 8004d1c <USB_EPStartXfer+0x1494> { /* Multi packet transfer */ if (ep->xfer_len > ep->maxpacket) 8004bc0: f507 7398 add.w r3, r7, #304 ; 0x130 8004bc4: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004bc8: 681b ldr r3, [r3, #0] 8004bca: 699a ldr r2, [r3, #24] 8004bcc: f507 7398 add.w r3, r7, #304 ; 0x130 8004bd0: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004bd4: 681b ldr r3, [r3, #0] 8004bd6: 691b ldr r3, [r3, #16] 8004bd8: 429a cmp r2, r3 8004bda: d917 bls.n 8004c0c <USB_EPStartXfer+0x1384> { len = ep->maxpacket; 8004bdc: f507 7398 add.w r3, r7, #304 ; 0x130 8004be0: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004be4: 681b ldr r3, [r3, #0] 8004be6: 691b ldr r3, [r3, #16] 8004be8: f8c7 312c str.w r3, [r7, #300] ; 0x12c ep->xfer_len -= len; 8004bec: f507 7398 add.w r3, r7, #304 ; 0x130 8004bf0: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004bf4: 681b ldr r3, [r3, #0] 8004bf6: 699a ldr r2, [r3, #24] 8004bf8: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004bfc: 1ad2 subs r2, r2, r3 8004bfe: f507 7398 add.w r3, r7, #304 ; 0x130 8004c02: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004c06: 681b ldr r3, [r3, #0] 8004c08: 619a str r2, [r3, #24] 8004c0a: e00e b.n 8004c2a <USB_EPStartXfer+0x13a2> } else { len = ep->xfer_len; 8004c0c: f507 7398 add.w r3, r7, #304 ; 0x130 8004c10: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004c14: 681b ldr r3, [r3, #0] 8004c16: 699b ldr r3, [r3, #24] 8004c18: f8c7 312c str.w r3, [r7, #300] ; 0x12c ep->xfer_len = 0U; 8004c1c: f507 7398 add.w r3, r7, #304 ; 0x130 8004c20: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004c24: 681b ldr r3, [r3, #0] 8004c26: 2200 movs r2, #0 8004c28: 619a str r2, [r3, #24] } /* configure and validate Rx endpoint */ PCD_SET_EP_RX_CNT(USBx, ep->num, len); 8004c2a: f507 7398 add.w r3, r7, #304 ; 0x130 8004c2e: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004c32: 681b ldr r3, [r3, #0] 8004c34: f8c7 30b0 str.w r3, [r7, #176] ; 0xb0 8004c38: f507 7398 add.w r3, r7, #304 ; 0x130 8004c3c: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004c40: 681b ldr r3, [r3, #0] 8004c42: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8004c46: b29b uxth r3, r3 8004c48: 461a mov r2, r3 8004c4a: f8d7 30b0 ldr.w r3, [r7, #176] ; 0xb0 8004c4e: 4413 add r3, r2 8004c50: f8c7 30b0 str.w r3, [r7, #176] ; 0xb0 8004c54: f507 7398 add.w r3, r7, #304 ; 0x130 8004c58: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004c5c: 681b ldr r3, [r3, #0] 8004c5e: 781b ldrb r3, [r3, #0] 8004c60: 011a lsls r2, r3, #4 8004c62: f8d7 30b0 ldr.w r3, [r7, #176] ; 0xb0 8004c66: 4413 add r3, r2 8004c68: f203 430c addw r3, r3, #1036 ; 0x40c 8004c6c: f8c7 30ac str.w r3, [r7, #172] ; 0xac 8004c70: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004c74: 2b00 cmp r3, #0 8004c76: d116 bne.n 8004ca6 <USB_EPStartXfer+0x141e> 8004c78: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac 8004c7c: 881b ldrh r3, [r3, #0] 8004c7e: b29b uxth r3, r3 8004c80: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8004c84: b29a uxth r2, r3 8004c86: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac 8004c8a: 801a strh r2, [r3, #0] 8004c8c: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac 8004c90: 881b ldrh r3, [r3, #0] 8004c92: b29b uxth r3, r3 8004c94: ea6f 4343 mvn.w r3, r3, lsl #17 8004c98: ea6f 4353 mvn.w r3, r3, lsr #17 8004c9c: b29a uxth r2, r3 8004c9e: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac 8004ca2: 801a strh r2, [r3, #0] 8004ca4: e3e8 b.n 8005478 <USB_EPStartXfer+0x1bf0> 8004ca6: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004caa: 2b3e cmp r3, #62 ; 0x3e 8004cac: d818 bhi.n 8004ce0 <USB_EPStartXfer+0x1458> 8004cae: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004cb2: 085b lsrs r3, r3, #1 8004cb4: f8c7 3108 str.w r3, [r7, #264] ; 0x108 8004cb8: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004cbc: f003 0301 and.w r3, r3, #1 8004cc0: 2b00 cmp r3, #0 8004cc2: d004 beq.n 8004cce <USB_EPStartXfer+0x1446> 8004cc4: f8d7 3108 ldr.w r3, [r7, #264] ; 0x108 8004cc8: 3301 adds r3, #1 8004cca: f8c7 3108 str.w r3, [r7, #264] ; 0x108 8004cce: f8d7 3108 ldr.w r3, [r7, #264] ; 0x108 8004cd2: b29b uxth r3, r3 8004cd4: 029b lsls r3, r3, #10 8004cd6: b29a uxth r2, r3 8004cd8: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac 8004cdc: 801a strh r2, [r3, #0] 8004cde: e3cb b.n 8005478 <USB_EPStartXfer+0x1bf0> 8004ce0: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004ce4: 095b lsrs r3, r3, #5 8004ce6: f8c7 3108 str.w r3, [r7, #264] ; 0x108 8004cea: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8004cee: f003 031f and.w r3, r3, #31 8004cf2: 2b00 cmp r3, #0 8004cf4: d104 bne.n 8004d00 <USB_EPStartXfer+0x1478> 8004cf6: f8d7 3108 ldr.w r3, [r7, #264] ; 0x108 8004cfa: 3b01 subs r3, #1 8004cfc: f8c7 3108 str.w r3, [r7, #264] ; 0x108 8004d00: f8d7 3108 ldr.w r3, [r7, #264] ; 0x108 8004d04: b29b uxth r3, r3 8004d06: 029b lsls r3, r3, #10 8004d08: b29b uxth r3, r3 8004d0a: ea6f 4343 mvn.w r3, r3, lsl #17 8004d0e: ea6f 4353 mvn.w r3, r3, lsr #17 8004d12: b29a uxth r2, r3 8004d14: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac 8004d18: 801a strh r2, [r3, #0] 8004d1a: e3ad b.n 8005478 <USB_EPStartXfer+0x1bf0> } else { /* First Transfer Coming From HAL_PCD_EP_Receive & From ISR */ /* Set the Double buffer counter */ if (ep->type == EP_TYPE_BULK) 8004d1c: f507 7398 add.w r3, r7, #304 ; 0x130 8004d20: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004d24: 681b ldr r3, [r3, #0] 8004d26: 78db ldrb r3, [r3, #3] 8004d28: 2b02 cmp r3, #2 8004d2a: f040 8200 bne.w 800512e <USB_EPStartXfer+0x18a6> { PCD_SET_EP_DBUF_CNT(USBx, ep->num, ep->is_in, ep->maxpacket); 8004d2e: f507 7398 add.w r3, r7, #304 ; 0x130 8004d32: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004d36: 681b ldr r3, [r3, #0] 8004d38: 785b ldrb r3, [r3, #1] 8004d3a: 2b00 cmp r3, #0 8004d3c: f040 8091 bne.w 8004e62 <USB_EPStartXfer+0x15da> 8004d40: f507 7398 add.w r3, r7, #304 ; 0x130 8004d44: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004d48: 681b ldr r3, [r3, #0] 8004d4a: f8c7 30cc str.w r3, [r7, #204] ; 0xcc 8004d4e: f507 7398 add.w r3, r7, #304 ; 0x130 8004d52: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004d56: 681b ldr r3, [r3, #0] 8004d58: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8004d5c: b29b uxth r3, r3 8004d5e: 461a mov r2, r3 8004d60: f8d7 30cc ldr.w r3, [r7, #204] ; 0xcc 8004d64: 4413 add r3, r2 8004d66: f8c7 30cc str.w r3, [r7, #204] ; 0xcc 8004d6a: f507 7398 add.w r3, r7, #304 ; 0x130 8004d6e: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004d72: 681b ldr r3, [r3, #0] 8004d74: 781b ldrb r3, [r3, #0] 8004d76: 011a lsls r2, r3, #4 8004d78: f8d7 30cc ldr.w r3, [r7, #204] ; 0xcc 8004d7c: 4413 add r3, r2 8004d7e: f203 4304 addw r3, r3, #1028 ; 0x404 8004d82: f8c7 30c8 str.w r3, [r7, #200] ; 0xc8 8004d86: f507 7398 add.w r3, r7, #304 ; 0x130 8004d8a: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004d8e: 681b ldr r3, [r3, #0] 8004d90: 691b ldr r3, [r3, #16] 8004d92: 2b00 cmp r3, #0 8004d94: d116 bne.n 8004dc4 <USB_EPStartXfer+0x153c> 8004d96: f8d7 30c8 ldr.w r3, [r7, #200] ; 0xc8 8004d9a: 881b ldrh r3, [r3, #0] 8004d9c: b29b uxth r3, r3 8004d9e: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8004da2: b29a uxth r2, r3 8004da4: f8d7 30c8 ldr.w r3, [r7, #200] ; 0xc8 8004da8: 801a strh r2, [r3, #0] 8004daa: f8d7 30c8 ldr.w r3, [r7, #200] ; 0xc8 8004dae: 881b ldrh r3, [r3, #0] 8004db0: b29b uxth r3, r3 8004db2: ea6f 4343 mvn.w r3, r3, lsl #17 8004db6: ea6f 4353 mvn.w r3, r3, lsr #17 8004dba: b29a uxth r2, r3 8004dbc: f8d7 30c8 ldr.w r3, [r7, #200] ; 0xc8 8004dc0: 801a strh r2, [r3, #0] 8004dc2: e083 b.n 8004ecc <USB_EPStartXfer+0x1644> 8004dc4: f507 7398 add.w r3, r7, #304 ; 0x130 8004dc8: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004dcc: 681b ldr r3, [r3, #0] 8004dce: 691b ldr r3, [r3, #16] 8004dd0: 2b3e cmp r3, #62 ; 0x3e 8004dd2: d820 bhi.n 8004e16 <USB_EPStartXfer+0x158e> 8004dd4: f507 7398 add.w r3, r7, #304 ; 0x130 8004dd8: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004ddc: 681b ldr r3, [r3, #0] 8004dde: 691b ldr r3, [r3, #16] 8004de0: 085b lsrs r3, r3, #1 8004de2: f8c7 3104 str.w r3, [r7, #260] ; 0x104 8004de6: f507 7398 add.w r3, r7, #304 ; 0x130 8004dea: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004dee: 681b ldr r3, [r3, #0] 8004df0: 691b ldr r3, [r3, #16] 8004df2: f003 0301 and.w r3, r3, #1 8004df6: 2b00 cmp r3, #0 8004df8: d004 beq.n 8004e04 <USB_EPStartXfer+0x157c> 8004dfa: f8d7 3104 ldr.w r3, [r7, #260] ; 0x104 8004dfe: 3301 adds r3, #1 8004e00: f8c7 3104 str.w r3, [r7, #260] ; 0x104 8004e04: f8d7 3104 ldr.w r3, [r7, #260] ; 0x104 8004e08: b29b uxth r3, r3 8004e0a: 029b lsls r3, r3, #10 8004e0c: b29a uxth r2, r3 8004e0e: f8d7 30c8 ldr.w r3, [r7, #200] ; 0xc8 8004e12: 801a strh r2, [r3, #0] 8004e14: e05a b.n 8004ecc <USB_EPStartXfer+0x1644> 8004e16: f507 7398 add.w r3, r7, #304 ; 0x130 8004e1a: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004e1e: 681b ldr r3, [r3, #0] 8004e20: 691b ldr r3, [r3, #16] 8004e22: 095b lsrs r3, r3, #5 8004e24: f8c7 3104 str.w r3, [r7, #260] ; 0x104 8004e28: f507 7398 add.w r3, r7, #304 ; 0x130 8004e2c: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004e30: 681b ldr r3, [r3, #0] 8004e32: 691b ldr r3, [r3, #16] 8004e34: f003 031f and.w r3, r3, #31 8004e38: 2b00 cmp r3, #0 8004e3a: d104 bne.n 8004e46 <USB_EPStartXfer+0x15be> 8004e3c: f8d7 3104 ldr.w r3, [r7, #260] ; 0x104 8004e40: 3b01 subs r3, #1 8004e42: f8c7 3104 str.w r3, [r7, #260] ; 0x104 8004e46: f8d7 3104 ldr.w r3, [r7, #260] ; 0x104 8004e4a: b29b uxth r3, r3 8004e4c: 029b lsls r3, r3, #10 8004e4e: b29b uxth r3, r3 8004e50: ea6f 4343 mvn.w r3, r3, lsl #17 8004e54: ea6f 4353 mvn.w r3, r3, lsr #17 8004e58: b29a uxth r2, r3 8004e5a: f8d7 30c8 ldr.w r3, [r7, #200] ; 0xc8 8004e5e: 801a strh r2, [r3, #0] 8004e60: e034 b.n 8004ecc <USB_EPStartXfer+0x1644> 8004e62: f507 7398 add.w r3, r7, #304 ; 0x130 8004e66: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004e6a: 681b ldr r3, [r3, #0] 8004e6c: 785b ldrb r3, [r3, #1] 8004e6e: 2b01 cmp r3, #1 8004e70: d12c bne.n 8004ecc <USB_EPStartXfer+0x1644> 8004e72: f507 7398 add.w r3, r7, #304 ; 0x130 8004e76: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004e7a: 681b ldr r3, [r3, #0] 8004e7c: f8c7 30d4 str.w r3, [r7, #212] ; 0xd4 8004e80: f507 7398 add.w r3, r7, #304 ; 0x130 8004e84: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004e88: 681b ldr r3, [r3, #0] 8004e8a: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8004e8e: b29b uxth r3, r3 8004e90: 461a mov r2, r3 8004e92: f8d7 30d4 ldr.w r3, [r7, #212] ; 0xd4 8004e96: 4413 add r3, r2 8004e98: f8c7 30d4 str.w r3, [r7, #212] ; 0xd4 8004e9c: f507 7398 add.w r3, r7, #304 ; 0x130 8004ea0: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004ea4: 681b ldr r3, [r3, #0] 8004ea6: 781b ldrb r3, [r3, #0] 8004ea8: 011a lsls r2, r3, #4 8004eaa: f8d7 30d4 ldr.w r3, [r7, #212] ; 0xd4 8004eae: 4413 add r3, r2 8004eb0: f203 4304 addw r3, r3, #1028 ; 0x404 8004eb4: f8c7 30d0 str.w r3, [r7, #208] ; 0xd0 8004eb8: f507 7398 add.w r3, r7, #304 ; 0x130 8004ebc: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004ec0: 681b ldr r3, [r3, #0] 8004ec2: 691b ldr r3, [r3, #16] 8004ec4: b29a uxth r2, r3 8004ec6: f8d7 30d0 ldr.w r3, [r7, #208] ; 0xd0 8004eca: 801a strh r2, [r3, #0] 8004ecc: f507 7398 add.w r3, r7, #304 ; 0x130 8004ed0: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004ed4: 681b ldr r3, [r3, #0] 8004ed6: f8c7 30c4 str.w r3, [r7, #196] ; 0xc4 8004eda: f507 7398 add.w r3, r7, #304 ; 0x130 8004ede: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004ee2: 681b ldr r3, [r3, #0] 8004ee4: 785b ldrb r3, [r3, #1] 8004ee6: 2b00 cmp r3, #0 8004ee8: f040 8091 bne.w 800500e <USB_EPStartXfer+0x1786> 8004eec: f507 7398 add.w r3, r7, #304 ; 0x130 8004ef0: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004ef4: 681b ldr r3, [r3, #0] 8004ef6: f8c7 30bc str.w r3, [r7, #188] ; 0xbc 8004efa: f507 7398 add.w r3, r7, #304 ; 0x130 8004efe: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8004f02: 681b ldr r3, [r3, #0] 8004f04: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8004f08: b29b uxth r3, r3 8004f0a: 461a mov r2, r3 8004f0c: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc 8004f10: 4413 add r3, r2 8004f12: f8c7 30bc str.w r3, [r7, #188] ; 0xbc 8004f16: f507 7398 add.w r3, r7, #304 ; 0x130 8004f1a: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004f1e: 681b ldr r3, [r3, #0] 8004f20: 781b ldrb r3, [r3, #0] 8004f22: 011a lsls r2, r3, #4 8004f24: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc 8004f28: 4413 add r3, r2 8004f2a: f203 430c addw r3, r3, #1036 ; 0x40c 8004f2e: f8c7 30b8 str.w r3, [r7, #184] ; 0xb8 8004f32: f507 7398 add.w r3, r7, #304 ; 0x130 8004f36: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004f3a: 681b ldr r3, [r3, #0] 8004f3c: 691b ldr r3, [r3, #16] 8004f3e: 2b00 cmp r3, #0 8004f40: d116 bne.n 8004f70 <USB_EPStartXfer+0x16e8> 8004f42: f8d7 30b8 ldr.w r3, [r7, #184] ; 0xb8 8004f46: 881b ldrh r3, [r3, #0] 8004f48: b29b uxth r3, r3 8004f4a: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8004f4e: b29a uxth r2, r3 8004f50: f8d7 30b8 ldr.w r3, [r7, #184] ; 0xb8 8004f54: 801a strh r2, [r3, #0] 8004f56: f8d7 30b8 ldr.w r3, [r7, #184] ; 0xb8 8004f5a: 881b ldrh r3, [r3, #0] 8004f5c: b29b uxth r3, r3 8004f5e: ea6f 4343 mvn.w r3, r3, lsl #17 8004f62: ea6f 4353 mvn.w r3, r3, lsr #17 8004f66: b29a uxth r2, r3 8004f68: f8d7 30b8 ldr.w r3, [r7, #184] ; 0xb8 8004f6c: 801a strh r2, [r3, #0] 8004f6e: e07c b.n 800506a <USB_EPStartXfer+0x17e2> 8004f70: f507 7398 add.w r3, r7, #304 ; 0x130 8004f74: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004f78: 681b ldr r3, [r3, #0] 8004f7a: 691b ldr r3, [r3, #16] 8004f7c: 2b3e cmp r3, #62 ; 0x3e 8004f7e: d820 bhi.n 8004fc2 <USB_EPStartXfer+0x173a> 8004f80: f507 7398 add.w r3, r7, #304 ; 0x130 8004f84: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004f88: 681b ldr r3, [r3, #0] 8004f8a: 691b ldr r3, [r3, #16] 8004f8c: 085b lsrs r3, r3, #1 8004f8e: f8c7 3100 str.w r3, [r7, #256] ; 0x100 8004f92: f507 7398 add.w r3, r7, #304 ; 0x130 8004f96: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004f9a: 681b ldr r3, [r3, #0] 8004f9c: 691b ldr r3, [r3, #16] 8004f9e: f003 0301 and.w r3, r3, #1 8004fa2: 2b00 cmp r3, #0 8004fa4: d004 beq.n 8004fb0 <USB_EPStartXfer+0x1728> 8004fa6: f8d7 3100 ldr.w r3, [r7, #256] ; 0x100 8004faa: 3301 adds r3, #1 8004fac: f8c7 3100 str.w r3, [r7, #256] ; 0x100 8004fb0: f8d7 3100 ldr.w r3, [r7, #256] ; 0x100 8004fb4: b29b uxth r3, r3 8004fb6: 029b lsls r3, r3, #10 8004fb8: b29a uxth r2, r3 8004fba: f8d7 30b8 ldr.w r3, [r7, #184] ; 0xb8 8004fbe: 801a strh r2, [r3, #0] 8004fc0: e053 b.n 800506a <USB_EPStartXfer+0x17e2> 8004fc2: f507 7398 add.w r3, r7, #304 ; 0x130 8004fc6: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004fca: 681b ldr r3, [r3, #0] 8004fcc: 691b ldr r3, [r3, #16] 8004fce: 095b lsrs r3, r3, #5 8004fd0: f8c7 3100 str.w r3, [r7, #256] ; 0x100 8004fd4: f507 7398 add.w r3, r7, #304 ; 0x130 8004fd8: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8004fdc: 681b ldr r3, [r3, #0] 8004fde: 691b ldr r3, [r3, #16] 8004fe0: f003 031f and.w r3, r3, #31 8004fe4: 2b00 cmp r3, #0 8004fe6: d104 bne.n 8004ff2 <USB_EPStartXfer+0x176a> 8004fe8: f8d7 3100 ldr.w r3, [r7, #256] ; 0x100 8004fec: 3b01 subs r3, #1 8004fee: f8c7 3100 str.w r3, [r7, #256] ; 0x100 8004ff2: f8d7 3100 ldr.w r3, [r7, #256] ; 0x100 8004ff6: b29b uxth r3, r3 8004ff8: 029b lsls r3, r3, #10 8004ffa: b29b uxth r3, r3 8004ffc: ea6f 4343 mvn.w r3, r3, lsl #17 8005000: ea6f 4353 mvn.w r3, r3, lsr #17 8005004: b29a uxth r2, r3 8005006: f8d7 30b8 ldr.w r3, [r7, #184] ; 0xb8 800500a: 801a strh r2, [r3, #0] 800500c: e02d b.n 800506a <USB_EPStartXfer+0x17e2> 800500e: f507 7398 add.w r3, r7, #304 ; 0x130 8005012: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8005016: 681b ldr r3, [r3, #0] 8005018: 785b ldrb r3, [r3, #1] 800501a: 2b01 cmp r3, #1 800501c: d125 bne.n 800506a <USB_EPStartXfer+0x17e2> 800501e: f507 7398 add.w r3, r7, #304 ; 0x130 8005022: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8005026: 681b ldr r3, [r3, #0] 8005028: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 800502c: b29b uxth r3, r3 800502e: 461a mov r2, r3 8005030: f8d7 30c4 ldr.w r3, [r7, #196] ; 0xc4 8005034: 4413 add r3, r2 8005036: f8c7 30c4 str.w r3, [r7, #196] ; 0xc4 800503a: f507 7398 add.w r3, r7, #304 ; 0x130 800503e: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8005042: 681b ldr r3, [r3, #0] 8005044: 781b ldrb r3, [r3, #0] 8005046: 011a lsls r2, r3, #4 8005048: f8d7 30c4 ldr.w r3, [r7, #196] ; 0xc4 800504c: 4413 add r3, r2 800504e: f203 430c addw r3, r3, #1036 ; 0x40c 8005052: f8c7 30c0 str.w r3, [r7, #192] ; 0xc0 8005056: f507 7398 add.w r3, r7, #304 ; 0x130 800505a: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800505e: 681b ldr r3, [r3, #0] 8005060: 691b ldr r3, [r3, #16] 8005062: b29a uxth r2, r3 8005064: f8d7 30c0 ldr.w r3, [r7, #192] ; 0xc0 8005068: 801a strh r2, [r3, #0] /* Coming from ISR */ if (ep->xfer_count != 0U) 800506a: f507 7398 add.w r3, r7, #304 ; 0x130 800506e: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8005072: 681b ldr r3, [r3, #0] 8005074: 69db ldr r3, [r3, #28] 8005076: 2b00 cmp r3, #0 8005078: f000 81fe beq.w 8005478 <USB_EPStartXfer+0x1bf0> { /* update last value to check if there is blocking state */ wEPVal = PCD_GET_ENDPOINT(USBx, ep->num); 800507c: f507 7398 add.w r3, r7, #304 ; 0x130 8005080: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8005084: 681a ldr r2, [r3, #0] 8005086: f507 7398 add.w r3, r7, #304 ; 0x130 800508a: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800508e: 681b ldr r3, [r3, #0] 8005090: 781b ldrb r3, [r3, #0] 8005092: 009b lsls r3, r3, #2 8005094: 4413 add r3, r2 8005096: 881b ldrh r3, [r3, #0] 8005098: f8a7 30b6 strh.w r3, [r7, #182] ; 0xb6 /*Blocking State */ if ((((wEPVal & USB_EP_DTOG_RX) != 0U) && ((wEPVal & USB_EP_DTOG_TX) != 0U)) || 800509c: f8b7 30b6 ldrh.w r3, [r7, #182] ; 0xb6 80050a0: f403 4380 and.w r3, r3, #16384 ; 0x4000 80050a4: 2b00 cmp r3, #0 80050a6: d005 beq.n 80050b4 <USB_EPStartXfer+0x182c> 80050a8: f8b7 30b6 ldrh.w r3, [r7, #182] ; 0xb6 80050ac: f003 0340 and.w r3, r3, #64 ; 0x40 80050b0: 2b00 cmp r3, #0 80050b2: d10d bne.n 80050d0 <USB_EPStartXfer+0x1848> (((wEPVal & USB_EP_DTOG_RX) == 0U) && ((wEPVal & USB_EP_DTOG_TX) == 0U))) 80050b4: f8b7 30b6 ldrh.w r3, [r7, #182] ; 0xb6 80050b8: f403 4380 and.w r3, r3, #16384 ; 0x4000 if ((((wEPVal & USB_EP_DTOG_RX) != 0U) && ((wEPVal & USB_EP_DTOG_TX) != 0U)) || 80050bc: 2b00 cmp r3, #0 80050be: f040 81db bne.w 8005478 <USB_EPStartXfer+0x1bf0> (((wEPVal & USB_EP_DTOG_RX) == 0U) && ((wEPVal & USB_EP_DTOG_TX) == 0U))) 80050c2: f8b7 30b6 ldrh.w r3, [r7, #182] ; 0xb6 80050c6: f003 0340 and.w r3, r3, #64 ; 0x40 80050ca: 2b00 cmp r3, #0 80050cc: f040 81d4 bne.w 8005478 <USB_EPStartXfer+0x1bf0> { PCD_FreeUserBuffer(USBx, ep->num, 0U); 80050d0: f507 7398 add.w r3, r7, #304 ; 0x130 80050d4: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80050d8: 681a ldr r2, [r3, #0] 80050da: f507 7398 add.w r3, r7, #304 ; 0x130 80050de: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80050e2: 681b ldr r3, [r3, #0] 80050e4: 781b ldrb r3, [r3, #0] 80050e6: 009b lsls r3, r3, #2 80050e8: 4413 add r3, r2 80050ea: 881b ldrh r3, [r3, #0] 80050ec: b29b uxth r3, r3 80050ee: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80050f2: f023 0370 bic.w r3, r3, #112 ; 0x70 80050f6: f8a7 30b4 strh.w r3, [r7, #180] ; 0xb4 80050fa: f507 7398 add.w r3, r7, #304 ; 0x130 80050fe: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8005102: 681a ldr r2, [r3, #0] 8005104: f507 7398 add.w r3, r7, #304 ; 0x130 8005108: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800510c: 681b ldr r3, [r3, #0] 800510e: 781b ldrb r3, [r3, #0] 8005110: 009b lsls r3, r3, #2 8005112: 441a add r2, r3 8005114: f8b7 30b4 ldrh.w r3, [r7, #180] ; 0xb4 8005118: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800511c: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8005120: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8005124: f043 03c0 orr.w r3, r3, #192 ; 0xc0 8005128: b29b uxth r3, r3 800512a: 8013 strh r3, [r2, #0] 800512c: e1a4 b.n 8005478 <USB_EPStartXfer+0x1bf0> } } } /* iso out double */ else if (ep->type == EP_TYPE_ISOC) 800512e: f507 7398 add.w r3, r7, #304 ; 0x130 8005132: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8005136: 681b ldr r3, [r3, #0] 8005138: 78db ldrb r3, [r3, #3] 800513a: 2b01 cmp r3, #1 800513c: f040 819a bne.w 8005474 <USB_EPStartXfer+0x1bec> { /* Multi packet transfer */ if (ep->xfer_len > ep->maxpacket) 8005140: f507 7398 add.w r3, r7, #304 ; 0x130 8005144: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8005148: 681b ldr r3, [r3, #0] 800514a: 699a ldr r2, [r3, #24] 800514c: f507 7398 add.w r3, r7, #304 ; 0x130 8005150: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8005154: 681b ldr r3, [r3, #0] 8005156: 691b ldr r3, [r3, #16] 8005158: 429a cmp r2, r3 800515a: d917 bls.n 800518c <USB_EPStartXfer+0x1904> { len = ep->maxpacket; 800515c: f507 7398 add.w r3, r7, #304 ; 0x130 8005160: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8005164: 681b ldr r3, [r3, #0] 8005166: 691b ldr r3, [r3, #16] 8005168: f8c7 312c str.w r3, [r7, #300] ; 0x12c ep->xfer_len -= len; 800516c: f507 7398 add.w r3, r7, #304 ; 0x130 8005170: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8005174: 681b ldr r3, [r3, #0] 8005176: 699a ldr r2, [r3, #24] 8005178: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 800517c: 1ad2 subs r2, r2, r3 800517e: f507 7398 add.w r3, r7, #304 ; 0x130 8005182: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8005186: 681b ldr r3, [r3, #0] 8005188: 619a str r2, [r3, #24] 800518a: e00e b.n 80051aa <USB_EPStartXfer+0x1922> } else { len = ep->xfer_len; 800518c: f507 7398 add.w r3, r7, #304 ; 0x130 8005190: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8005194: 681b ldr r3, [r3, #0] 8005196: 699b ldr r3, [r3, #24] 8005198: f8c7 312c str.w r3, [r7, #300] ; 0x12c ep->xfer_len = 0U; 800519c: f507 7398 add.w r3, r7, #304 ; 0x130 80051a0: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80051a4: 681b ldr r3, [r3, #0] 80051a6: 2200 movs r2, #0 80051a8: 619a str r2, [r3, #24] } PCD_SET_EP_DBUF_CNT(USBx, ep->num, ep->is_in, len); 80051aa: f507 7398 add.w r3, r7, #304 ; 0x130 80051ae: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80051b2: 681b ldr r3, [r3, #0] 80051b4: 785b ldrb r3, [r3, #1] 80051b6: 2b00 cmp r3, #0 80051b8: d178 bne.n 80052ac <USB_EPStartXfer+0x1a24> 80051ba: f507 7398 add.w r3, r7, #304 ; 0x130 80051be: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80051c2: 681b ldr r3, [r3, #0] 80051c4: f8c7 30ec str.w r3, [r7, #236] ; 0xec 80051c8: f507 7398 add.w r3, r7, #304 ; 0x130 80051cc: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80051d0: 681b ldr r3, [r3, #0] 80051d2: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80051d6: b29b uxth r3, r3 80051d8: 461a mov r2, r3 80051da: f8d7 30ec ldr.w r3, [r7, #236] ; 0xec 80051de: 4413 add r3, r2 80051e0: f8c7 30ec str.w r3, [r7, #236] ; 0xec 80051e4: f507 7398 add.w r3, r7, #304 ; 0x130 80051e8: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80051ec: 681b ldr r3, [r3, #0] 80051ee: 781b ldrb r3, [r3, #0] 80051f0: 011a lsls r2, r3, #4 80051f2: f8d7 30ec ldr.w r3, [r7, #236] ; 0xec 80051f6: 4413 add r3, r2 80051f8: f203 4304 addw r3, r3, #1028 ; 0x404 80051fc: f8c7 30e8 str.w r3, [r7, #232] ; 0xe8 8005200: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8005204: 2b00 cmp r3, #0 8005206: d116 bne.n 8005236 <USB_EPStartXfer+0x19ae> 8005208: f8d7 30e8 ldr.w r3, [r7, #232] ; 0xe8 800520c: 881b ldrh r3, [r3, #0] 800520e: b29b uxth r3, r3 8005210: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8005214: b29a uxth r2, r3 8005216: f8d7 30e8 ldr.w r3, [r7, #232] ; 0xe8 800521a: 801a strh r2, [r3, #0] 800521c: f8d7 30e8 ldr.w r3, [r7, #232] ; 0xe8 8005220: 881b ldrh r3, [r3, #0] 8005222: b29b uxth r3, r3 8005224: ea6f 4343 mvn.w r3, r3, lsl #17 8005228: ea6f 4353 mvn.w r3, r3, lsr #17 800522c: b29a uxth r2, r3 800522e: f8d7 30e8 ldr.w r3, [r7, #232] ; 0xe8 8005232: 801a strh r2, [r3, #0] 8005234: e06b b.n 800530e <USB_EPStartXfer+0x1a86> 8005236: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 800523a: 2b3e cmp r3, #62 ; 0x3e 800523c: d818 bhi.n 8005270 <USB_EPStartXfer+0x19e8> 800523e: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8005242: 085b lsrs r3, r3, #1 8005244: f8c7 30fc str.w r3, [r7, #252] ; 0xfc 8005248: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 800524c: f003 0301 and.w r3, r3, #1 8005250: 2b00 cmp r3, #0 8005252: d004 beq.n 800525e <USB_EPStartXfer+0x19d6> 8005254: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc 8005258: 3301 adds r3, #1 800525a: f8c7 30fc str.w r3, [r7, #252] ; 0xfc 800525e: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc 8005262: b29b uxth r3, r3 8005264: 029b lsls r3, r3, #10 8005266: b29a uxth r2, r3 8005268: f8d7 30e8 ldr.w r3, [r7, #232] ; 0xe8 800526c: 801a strh r2, [r3, #0] 800526e: e04e b.n 800530e <USB_EPStartXfer+0x1a86> 8005270: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8005274: 095b lsrs r3, r3, #5 8005276: f8c7 30fc str.w r3, [r7, #252] ; 0xfc 800527a: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 800527e: f003 031f and.w r3, r3, #31 8005282: 2b00 cmp r3, #0 8005284: d104 bne.n 8005290 <USB_EPStartXfer+0x1a08> 8005286: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc 800528a: 3b01 subs r3, #1 800528c: f8c7 30fc str.w r3, [r7, #252] ; 0xfc 8005290: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc 8005294: b29b uxth r3, r3 8005296: 029b lsls r3, r3, #10 8005298: b29b uxth r3, r3 800529a: ea6f 4343 mvn.w r3, r3, lsl #17 800529e: ea6f 4353 mvn.w r3, r3, lsr #17 80052a2: b29a uxth r2, r3 80052a4: f8d7 30e8 ldr.w r3, [r7, #232] ; 0xe8 80052a8: 801a strh r2, [r3, #0] 80052aa: e030 b.n 800530e <USB_EPStartXfer+0x1a86> 80052ac: f507 7398 add.w r3, r7, #304 ; 0x130 80052b0: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80052b4: 681b ldr r3, [r3, #0] 80052b6: 785b ldrb r3, [r3, #1] 80052b8: 2b01 cmp r3, #1 80052ba: d128 bne.n 800530e <USB_EPStartXfer+0x1a86> 80052bc: f507 7398 add.w r3, r7, #304 ; 0x130 80052c0: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80052c4: 681b ldr r3, [r3, #0] 80052c6: f8c7 30f4 str.w r3, [r7, #244] ; 0xf4 80052ca: f507 7398 add.w r3, r7, #304 ; 0x130 80052ce: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80052d2: 681b ldr r3, [r3, #0] 80052d4: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 80052d8: b29b uxth r3, r3 80052da: 461a mov r2, r3 80052dc: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4 80052e0: 4413 add r3, r2 80052e2: f8c7 30f4 str.w r3, [r7, #244] ; 0xf4 80052e6: f507 7398 add.w r3, r7, #304 ; 0x130 80052ea: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80052ee: 681b ldr r3, [r3, #0] 80052f0: 781b ldrb r3, [r3, #0] 80052f2: 011a lsls r2, r3, #4 80052f4: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4 80052f8: 4413 add r3, r2 80052fa: f203 4304 addw r3, r3, #1028 ; 0x404 80052fe: f8c7 30f0 str.w r3, [r7, #240] ; 0xf0 8005302: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8005306: b29a uxth r2, r3 8005308: f8d7 30f0 ldr.w r3, [r7, #240] ; 0xf0 800530c: 801a strh r2, [r3, #0] 800530e: f507 7398 add.w r3, r7, #304 ; 0x130 8005312: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8005316: 681b ldr r3, [r3, #0] 8005318: f8c7 30e4 str.w r3, [r7, #228] ; 0xe4 800531c: f507 7398 add.w r3, r7, #304 ; 0x130 8005320: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8005324: 681b ldr r3, [r3, #0] 8005326: 785b ldrb r3, [r3, #1] 8005328: 2b00 cmp r3, #0 800532a: d178 bne.n 800541e <USB_EPStartXfer+0x1b96> 800532c: f507 7398 add.w r3, r7, #304 ; 0x130 8005330: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8005334: 681b ldr r3, [r3, #0] 8005336: f8c7 30dc str.w r3, [r7, #220] ; 0xdc 800533a: f507 7398 add.w r3, r7, #304 ; 0x130 800533e: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8005342: 681b ldr r3, [r3, #0] 8005344: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 8005348: b29b uxth r3, r3 800534a: 461a mov r2, r3 800534c: f8d7 30dc ldr.w r3, [r7, #220] ; 0xdc 8005350: 4413 add r3, r2 8005352: f8c7 30dc str.w r3, [r7, #220] ; 0xdc 8005356: f507 7398 add.w r3, r7, #304 ; 0x130 800535a: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800535e: 681b ldr r3, [r3, #0] 8005360: 781b ldrb r3, [r3, #0] 8005362: 011a lsls r2, r3, #4 8005364: f8d7 30dc ldr.w r3, [r7, #220] ; 0xdc 8005368: 4413 add r3, r2 800536a: f203 430c addw r3, r3, #1036 ; 0x40c 800536e: f8c7 30d8 str.w r3, [r7, #216] ; 0xd8 8005372: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 8005376: 2b00 cmp r3, #0 8005378: d116 bne.n 80053a8 <USB_EPStartXfer+0x1b20> 800537a: f8d7 30d8 ldr.w r3, [r7, #216] ; 0xd8 800537e: 881b ldrh r3, [r3, #0] 8005380: b29b uxth r3, r3 8005382: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00 8005386: b29a uxth r2, r3 8005388: f8d7 30d8 ldr.w r3, [r7, #216] ; 0xd8 800538c: 801a strh r2, [r3, #0] 800538e: f8d7 30d8 ldr.w r3, [r7, #216] ; 0xd8 8005392: 881b ldrh r3, [r3, #0] 8005394: b29b uxth r3, r3 8005396: ea6f 4343 mvn.w r3, r3, lsl #17 800539a: ea6f 4353 mvn.w r3, r3, lsr #17 800539e: b29a uxth r2, r3 80053a0: f8d7 30d8 ldr.w r3, [r7, #216] ; 0xd8 80053a4: 801a strh r2, [r3, #0] 80053a6: e067 b.n 8005478 <USB_EPStartXfer+0x1bf0> 80053a8: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80053ac: 2b3e cmp r3, #62 ; 0x3e 80053ae: d818 bhi.n 80053e2 <USB_EPStartXfer+0x1b5a> 80053b0: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80053b4: 085b lsrs r3, r3, #1 80053b6: f8c7 30f8 str.w r3, [r7, #248] ; 0xf8 80053ba: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80053be: f003 0301 and.w r3, r3, #1 80053c2: 2b00 cmp r3, #0 80053c4: d004 beq.n 80053d0 <USB_EPStartXfer+0x1b48> 80053c6: f8d7 30f8 ldr.w r3, [r7, #248] ; 0xf8 80053ca: 3301 adds r3, #1 80053cc: f8c7 30f8 str.w r3, [r7, #248] ; 0xf8 80053d0: f8d7 30f8 ldr.w r3, [r7, #248] ; 0xf8 80053d4: b29b uxth r3, r3 80053d6: 029b lsls r3, r3, #10 80053d8: b29a uxth r2, r3 80053da: f8d7 30d8 ldr.w r3, [r7, #216] ; 0xd8 80053de: 801a strh r2, [r3, #0] 80053e0: e04a b.n 8005478 <USB_EPStartXfer+0x1bf0> 80053e2: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80053e6: 095b lsrs r3, r3, #5 80053e8: f8c7 30f8 str.w r3, [r7, #248] ; 0xf8 80053ec: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 80053f0: f003 031f and.w r3, r3, #31 80053f4: 2b00 cmp r3, #0 80053f6: d104 bne.n 8005402 <USB_EPStartXfer+0x1b7a> 80053f8: f8d7 30f8 ldr.w r3, [r7, #248] ; 0xf8 80053fc: 3b01 subs r3, #1 80053fe: f8c7 30f8 str.w r3, [r7, #248] ; 0xf8 8005402: f8d7 30f8 ldr.w r3, [r7, #248] ; 0xf8 8005406: b29b uxth r3, r3 8005408: 029b lsls r3, r3, #10 800540a: b29b uxth r3, r3 800540c: ea6f 4343 mvn.w r3, r3, lsl #17 8005410: ea6f 4353 mvn.w r3, r3, lsr #17 8005414: b29a uxth r2, r3 8005416: f8d7 30d8 ldr.w r3, [r7, #216] ; 0xd8 800541a: 801a strh r2, [r3, #0] 800541c: e02c b.n 8005478 <USB_EPStartXfer+0x1bf0> 800541e: f507 7398 add.w r3, r7, #304 ; 0x130 8005422: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8005426: 681b ldr r3, [r3, #0] 8005428: 785b ldrb r3, [r3, #1] 800542a: 2b01 cmp r3, #1 800542c: d124 bne.n 8005478 <USB_EPStartXfer+0x1bf0> 800542e: f507 7398 add.w r3, r7, #304 ; 0x130 8005432: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8005436: 681b ldr r3, [r3, #0] 8005438: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50 800543c: b29b uxth r3, r3 800543e: 461a mov r2, r3 8005440: f8d7 30e4 ldr.w r3, [r7, #228] ; 0xe4 8005444: 4413 add r3, r2 8005446: f8c7 30e4 str.w r3, [r7, #228] ; 0xe4 800544a: f507 7398 add.w r3, r7, #304 ; 0x130 800544e: f5a3 7398 sub.w r3, r3, #304 ; 0x130 8005452: 681b ldr r3, [r3, #0] 8005454: 781b ldrb r3, [r3, #0] 8005456: 011a lsls r2, r3, #4 8005458: f8d7 30e4 ldr.w r3, [r7, #228] ; 0xe4 800545c: 4413 add r3, r2 800545e: f203 430c addw r3, r3, #1036 ; 0x40c 8005462: f8c7 30e0 str.w r3, [r7, #224] ; 0xe0 8005466: f8d7 312c ldr.w r3, [r7, #300] ; 0x12c 800546a: b29a uxth r2, r3 800546c: f8d7 30e0 ldr.w r3, [r7, #224] ; 0xe0 8005470: 801a strh r2, [r3, #0] 8005472: e001 b.n 8005478 <USB_EPStartXfer+0x1bf0> } else { return HAL_ERROR; 8005474: 2301 movs r3, #1 8005476: e03a b.n 80054ee <USB_EPStartXfer+0x1c66> } } PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID); 8005478: f507 7398 add.w r3, r7, #304 ; 0x130 800547c: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 8005480: 681a ldr r2, [r3, #0] 8005482: f507 7398 add.w r3, r7, #304 ; 0x130 8005486: f5a3 7398 sub.w r3, r3, #304 ; 0x130 800548a: 681b ldr r3, [r3, #0] 800548c: 781b ldrb r3, [r3, #0] 800548e: 009b lsls r3, r3, #2 8005490: 4413 add r3, r2 8005492: 881b ldrh r3, [r3, #0] 8005494: b29b uxth r3, r3 8005496: f423 4380 bic.w r3, r3, #16384 ; 0x4000 800549a: f023 0370 bic.w r3, r3, #112 ; 0x70 800549e: f8a7 30aa strh.w r3, [r7, #170] ; 0xaa 80054a2: f8b7 30aa ldrh.w r3, [r7, #170] ; 0xaa 80054a6: f483 5380 eor.w r3, r3, #4096 ; 0x1000 80054aa: f8a7 30aa strh.w r3, [r7, #170] ; 0xaa 80054ae: f8b7 30aa ldrh.w r3, [r7, #170] ; 0xaa 80054b2: f483 5300 eor.w r3, r3, #8192 ; 0x2000 80054b6: f8a7 30aa strh.w r3, [r7, #170] ; 0xaa 80054ba: f507 7398 add.w r3, r7, #304 ; 0x130 80054be: f5a3 7396 sub.w r3, r3, #300 ; 0x12c 80054c2: 681a ldr r2, [r3, #0] 80054c4: f507 7398 add.w r3, r7, #304 ; 0x130 80054c8: f5a3 7398 sub.w r3, r3, #304 ; 0x130 80054cc: 681b ldr r3, [r3, #0] 80054ce: 781b ldrb r3, [r3, #0] 80054d0: 009b lsls r3, r3, #2 80054d2: 441a add r2, r3 80054d4: f8b7 30aa ldrh.w r3, [r7, #170] ; 0xaa 80054d8: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80054dc: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80054e0: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80054e4: f043 0380 orr.w r3, r3, #128 ; 0x80 80054e8: b29b uxth r3, r3 80054ea: 8013 strh r3, [r2, #0] } return HAL_OK; 80054ec: 2300 movs r3, #0 } 80054ee: 4618 mov r0, r3 80054f0: f507 7798 add.w r7, r7, #304 ; 0x130 80054f4: 46bd mov sp, r7 80054f6: bd80 pop {r7, pc} 080054f8 <USB_EPSetStall>: * @param USBx Selected device * @param ep pointer to endpoint structure * @retval HAL status */ HAL_StatusTypeDef USB_EPSetStall(USB_TypeDef *USBx, USB_EPTypeDef *ep) { 80054f8: b480 push {r7} 80054fa: b085 sub sp, #20 80054fc: af00 add r7, sp, #0 80054fe: 6078 str r0, [r7, #4] 8005500: 6039 str r1, [r7, #0] if (ep->is_in != 0U) 8005502: 683b ldr r3, [r7, #0] 8005504: 785b ldrb r3, [r3, #1] 8005506: 2b00 cmp r3, #0 8005508: d020 beq.n 800554c <USB_EPSetStall+0x54> { PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_STALL); 800550a: 687a ldr r2, [r7, #4] 800550c: 683b ldr r3, [r7, #0] 800550e: 781b ldrb r3, [r3, #0] 8005510: 009b lsls r3, r3, #2 8005512: 4413 add r3, r2 8005514: 881b ldrh r3, [r3, #0] 8005516: b29b uxth r3, r3 8005518: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800551c: f023 0340 bic.w r3, r3, #64 ; 0x40 8005520: 81bb strh r3, [r7, #12] 8005522: 89bb ldrh r3, [r7, #12] 8005524: f083 0310 eor.w r3, r3, #16 8005528: 81bb strh r3, [r7, #12] 800552a: 687a ldr r2, [r7, #4] 800552c: 683b ldr r3, [r7, #0] 800552e: 781b ldrb r3, [r3, #0] 8005530: 009b lsls r3, r3, #2 8005532: 441a add r2, r3 8005534: 89bb ldrh r3, [r7, #12] 8005536: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800553a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 800553e: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8005542: f043 0380 orr.w r3, r3, #128 ; 0x80 8005546: b29b uxth r3, r3 8005548: 8013 strh r3, [r2, #0] 800554a: e01f b.n 800558c <USB_EPSetStall+0x94> } else { PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_STALL); 800554c: 687a ldr r2, [r7, #4] 800554e: 683b ldr r3, [r7, #0] 8005550: 781b ldrb r3, [r3, #0] 8005552: 009b lsls r3, r3, #2 8005554: 4413 add r3, r2 8005556: 881b ldrh r3, [r3, #0] 8005558: b29b uxth r3, r3 800555a: f423 4380 bic.w r3, r3, #16384 ; 0x4000 800555e: f023 0370 bic.w r3, r3, #112 ; 0x70 8005562: 81fb strh r3, [r7, #14] 8005564: 89fb ldrh r3, [r7, #14] 8005566: f483 5380 eor.w r3, r3, #4096 ; 0x1000 800556a: 81fb strh r3, [r7, #14] 800556c: 687a ldr r2, [r7, #4] 800556e: 683b ldr r3, [r7, #0] 8005570: 781b ldrb r3, [r3, #0] 8005572: 009b lsls r3, r3, #2 8005574: 441a add r2, r3 8005576: 89fb ldrh r3, [r7, #14] 8005578: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800557c: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8005580: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8005584: f043 0380 orr.w r3, r3, #128 ; 0x80 8005588: b29b uxth r3, r3 800558a: 8013 strh r3, [r2, #0] } return HAL_OK; 800558c: 2300 movs r3, #0 } 800558e: 4618 mov r0, r3 8005590: 3714 adds r7, #20 8005592: 46bd mov sp, r7 8005594: bc80 pop {r7} 8005596: 4770 bx lr 08005598 <USB_EPClearStall>: * @param USBx Selected device * @param ep pointer to endpoint structure * @retval HAL status */ HAL_StatusTypeDef USB_EPClearStall(USB_TypeDef *USBx, USB_EPTypeDef *ep) { 8005598: b480 push {r7} 800559a: b087 sub sp, #28 800559c: af00 add r7, sp, #0 800559e: 6078 str r0, [r7, #4] 80055a0: 6039 str r1, [r7, #0] if (ep->doublebuffer == 0U) 80055a2: 683b ldr r3, [r7, #0] 80055a4: 7b1b ldrb r3, [r3, #12] 80055a6: 2b00 cmp r3, #0 80055a8: f040 809d bne.w 80056e6 <USB_EPClearStall+0x14e> { if (ep->is_in != 0U) 80055ac: 683b ldr r3, [r7, #0] 80055ae: 785b ldrb r3, [r3, #1] 80055b0: 2b00 cmp r3, #0 80055b2: d04c beq.n 800564e <USB_EPClearStall+0xb6> { PCD_CLEAR_TX_DTOG(USBx, ep->num); 80055b4: 687a ldr r2, [r7, #4] 80055b6: 683b ldr r3, [r7, #0] 80055b8: 781b ldrb r3, [r3, #0] 80055ba: 009b lsls r3, r3, #2 80055bc: 4413 add r3, r2 80055be: 881b ldrh r3, [r3, #0] 80055c0: 823b strh r3, [r7, #16] 80055c2: 8a3b ldrh r3, [r7, #16] 80055c4: f003 0340 and.w r3, r3, #64 ; 0x40 80055c8: 2b00 cmp r3, #0 80055ca: d01b beq.n 8005604 <USB_EPClearStall+0x6c> 80055cc: 687a ldr r2, [r7, #4] 80055ce: 683b ldr r3, [r7, #0] 80055d0: 781b ldrb r3, [r3, #0] 80055d2: 009b lsls r3, r3, #2 80055d4: 4413 add r3, r2 80055d6: 881b ldrh r3, [r3, #0] 80055d8: b29b uxth r3, r3 80055da: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 80055de: f023 0370 bic.w r3, r3, #112 ; 0x70 80055e2: 81fb strh r3, [r7, #14] 80055e4: 687a ldr r2, [r7, #4] 80055e6: 683b ldr r3, [r7, #0] 80055e8: 781b ldrb r3, [r3, #0] 80055ea: 009b lsls r3, r3, #2 80055ec: 441a add r2, r3 80055ee: 89fb ldrh r3, [r7, #14] 80055f0: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80055f4: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80055f8: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80055fc: f043 03c0 orr.w r3, r3, #192 ; 0xc0 8005600: b29b uxth r3, r3 8005602: 8013 strh r3, [r2, #0] if (ep->type != EP_TYPE_ISOC) 8005604: 683b ldr r3, [r7, #0] 8005606: 78db ldrb r3, [r3, #3] 8005608: 2b01 cmp r3, #1 800560a: d06c beq.n 80056e6 <USB_EPClearStall+0x14e> { /* Configure NAK status for the Endpoint */ PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_NAK); 800560c: 687a ldr r2, [r7, #4] 800560e: 683b ldr r3, [r7, #0] 8005610: 781b ldrb r3, [r3, #0] 8005612: 009b lsls r3, r3, #2 8005614: 4413 add r3, r2 8005616: 881b ldrh r3, [r3, #0] 8005618: b29b uxth r3, r3 800561a: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 800561e: f023 0340 bic.w r3, r3, #64 ; 0x40 8005622: 81bb strh r3, [r7, #12] 8005624: 89bb ldrh r3, [r7, #12] 8005626: f083 0320 eor.w r3, r3, #32 800562a: 81bb strh r3, [r7, #12] 800562c: 687a ldr r2, [r7, #4] 800562e: 683b ldr r3, [r7, #0] 8005630: 781b ldrb r3, [r3, #0] 8005632: 009b lsls r3, r3, #2 8005634: 441a add r2, r3 8005636: 89bb ldrh r3, [r7, #12] 8005638: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800563c: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8005640: f443 4300 orr.w r3, r3, #32768 ; 0x8000 8005644: f043 0380 orr.w r3, r3, #128 ; 0x80 8005648: b29b uxth r3, r3 800564a: 8013 strh r3, [r2, #0] 800564c: e04b b.n 80056e6 <USB_EPClearStall+0x14e> } } else { PCD_CLEAR_RX_DTOG(USBx, ep->num); 800564e: 687a ldr r2, [r7, #4] 8005650: 683b ldr r3, [r7, #0] 8005652: 781b ldrb r3, [r3, #0] 8005654: 009b lsls r3, r3, #2 8005656: 4413 add r3, r2 8005658: 881b ldrh r3, [r3, #0] 800565a: 82fb strh r3, [r7, #22] 800565c: 8afb ldrh r3, [r7, #22] 800565e: f403 4380 and.w r3, r3, #16384 ; 0x4000 8005662: 2b00 cmp r3, #0 8005664: d01b beq.n 800569e <USB_EPClearStall+0x106> 8005666: 687a ldr r2, [r7, #4] 8005668: 683b ldr r3, [r7, #0] 800566a: 781b ldrb r3, [r3, #0] 800566c: 009b lsls r3, r3, #2 800566e: 4413 add r3, r2 8005670: 881b ldrh r3, [r3, #0] 8005672: b29b uxth r3, r3 8005674: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 8005678: f023 0370 bic.w r3, r3, #112 ; 0x70 800567c: 82bb strh r3, [r7, #20] 800567e: 687a ldr r2, [r7, #4] 8005680: 683b ldr r3, [r7, #0] 8005682: 781b ldrb r3, [r3, #0] 8005684: 009b lsls r3, r3, #2 8005686: 441a add r2, r3 8005688: 8abb ldrh r3, [r7, #20] 800568a: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 800568e: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 8005692: f443 4340 orr.w r3, r3, #49152 ; 0xc000 8005696: f043 0380 orr.w r3, r3, #128 ; 0x80 800569a: b29b uxth r3, r3 800569c: 8013 strh r3, [r2, #0] /* Configure VALID status for the Endpoint */ PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID); 800569e: 687a ldr r2, [r7, #4] 80056a0: 683b ldr r3, [r7, #0] 80056a2: 781b ldrb r3, [r3, #0] 80056a4: 009b lsls r3, r3, #2 80056a6: 4413 add r3, r2 80056a8: 881b ldrh r3, [r3, #0] 80056aa: b29b uxth r3, r3 80056ac: f423 4380 bic.w r3, r3, #16384 ; 0x4000 80056b0: f023 0370 bic.w r3, r3, #112 ; 0x70 80056b4: 827b strh r3, [r7, #18] 80056b6: 8a7b ldrh r3, [r7, #18] 80056b8: f483 5380 eor.w r3, r3, #4096 ; 0x1000 80056bc: 827b strh r3, [r7, #18] 80056be: 8a7b ldrh r3, [r7, #18] 80056c0: f483 5300 eor.w r3, r3, #8192 ; 0x2000 80056c4: 827b strh r3, [r7, #18] 80056c6: 687a ldr r2, [r7, #4] 80056c8: 683b ldr r3, [r7, #0] 80056ca: 781b ldrb r3, [r3, #0] 80056cc: 009b lsls r3, r3, #2 80056ce: 441a add r2, r3 80056d0: 8a7b ldrh r3, [r7, #18] 80056d2: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000 80056d6: f443 037f orr.w r3, r3, #16711680 ; 0xff0000 80056da: f443 4300 orr.w r3, r3, #32768 ; 0x8000 80056de: f043 0380 orr.w r3, r3, #128 ; 0x80 80056e2: b29b uxth r3, r3 80056e4: 8013 strh r3, [r2, #0] } } return HAL_OK; 80056e6: 2300 movs r3, #0 } 80056e8: 4618 mov r0, r3 80056ea: 371c adds r7, #28 80056ec: 46bd mov sp, r7 80056ee: bc80 pop {r7} 80056f0: 4770 bx lr 080056f2 <USB_SetDevAddress>: * @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) { 80056f2: b480 push {r7} 80056f4: b083 sub sp, #12 80056f6: af00 add r7, sp, #0 80056f8: 6078 str r0, [r7, #4] 80056fa: 460b mov r3, r1 80056fc: 70fb strb r3, [r7, #3] if (address == 0U) 80056fe: 78fb ldrb r3, [r7, #3] 8005700: 2b00 cmp r3, #0 8005702: d103 bne.n 800570c <USB_SetDevAddress+0x1a> { /* set device address and enable function */ USBx->DADDR = (uint16_t)USB_DADDR_EF; 8005704: 687b ldr r3, [r7, #4] 8005706: 2280 movs r2, #128 ; 0x80 8005708: f8a3 204c strh.w r2, [r3, #76] ; 0x4c } return HAL_OK; 800570c: 2300 movs r3, #0 } 800570e: 4618 mov r0, r3 8005710: 370c adds r7, #12 8005712: 46bd mov sp, r7 8005714: bc80 pop {r7} 8005716: 4770 bx lr 08005718 <USB_DevConnect>: * @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) { 8005718: b480 push {r7} 800571a: b083 sub sp, #12 800571c: af00 add r7, sp, #0 800571e: 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; 8005720: 2300 movs r3, #0 } 8005722: 4618 mov r0, r3 8005724: 370c adds r7, #12 8005726: 46bd mov sp, r7 8005728: bc80 pop {r7} 800572a: 4770 bx lr 0800572c <USB_DevDisconnect>: * @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) { 800572c: b480 push {r7} 800572e: b083 sub sp, #12 8005730: af00 add r7, sp, #0 8005732: 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; 8005734: 2300 movs r3, #0 } 8005736: 4618 mov r0, r3 8005738: 370c adds r7, #12 800573a: 46bd mov sp, r7 800573c: bc80 pop {r7} 800573e: 4770 bx lr 08005740 <USB_ReadInterrupts>: * @brief USB_ReadInterrupts return the global USB interrupt status * @param USBx Selected device * @retval HAL status */ uint32_t USB_ReadInterrupts(USB_TypeDef *USBx) { 8005740: b480 push {r7} 8005742: b085 sub sp, #20 8005744: af00 add r7, sp, #0 8005746: 6078 str r0, [r7, #4] uint32_t tmpreg; tmpreg = USBx->ISTR; 8005748: 687b ldr r3, [r7, #4] 800574a: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44 800574e: b29b uxth r3, r3 8005750: 60fb str r3, [r7, #12] return tmpreg; 8005752: 68fb ldr r3, [r7, #12] } 8005754: 4618 mov r0, r3 8005756: 3714 adds r7, #20 8005758: 46bd mov sp, r7 800575a: bc80 pop {r7} 800575c: 4770 bx lr 0800575e <USB_EP0_OutStart>: * @param USBx Selected device * @param psetup pointer to setup packet * @retval HAL status */ HAL_StatusTypeDef USB_EP0_OutStart(USB_TypeDef *USBx, uint8_t *psetup) { 800575e: b480 push {r7} 8005760: b083 sub sp, #12 8005762: af00 add r7, sp, #0 8005764: 6078 str r0, [r7, #4] 8005766: 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; 8005768: 2300 movs r3, #0 } 800576a: 4618 mov r0, r3 800576c: 370c adds r7, #12 800576e: 46bd mov sp, r7 8005770: bc80 pop {r7} 8005772: 4770 bx lr 08005774 <USB_WritePMA>: * @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) { 8005774: b480 push {r7} 8005776: b08d sub sp, #52 ; 0x34 8005778: af00 add r7, sp, #0 800577a: 60f8 str r0, [r7, #12] 800577c: 60b9 str r1, [r7, #8] 800577e: 4611 mov r1, r2 8005780: 461a mov r2, r3 8005782: 460b mov r3, r1 8005784: 80fb strh r3, [r7, #6] 8005786: 4613 mov r3, r2 8005788: 80bb strh r3, [r7, #4] uint32_t n = ((uint32_t)wNBytes + 1U) >> 1; 800578a: 88bb ldrh r3, [r7, #4] 800578c: 3301 adds r3, #1 800578e: 085b lsrs r3, r3, #1 8005790: 623b str r3, [r7, #32] uint32_t BaseAddr = (uint32_t)USBx; 8005792: 68fb ldr r3, [r7, #12] 8005794: 61fb str r3, [r7, #28] uint32_t i, temp1, temp2; __IO uint16_t *pdwVal; uint8_t *pBuf = pbUsrBuf; 8005796: 68bb ldr r3, [r7, #8] 8005798: 627b str r3, [r7, #36] ; 0x24 pdwVal = (__IO uint16_t *)(BaseAddr + 0x400U + ((uint32_t)wPMABufAddr * PMA_ACCESS)); 800579a: 88fb ldrh r3, [r7, #6] 800579c: 005a lsls r2, r3, #1 800579e: 69fb ldr r3, [r7, #28] 80057a0: 4413 add r3, r2 80057a2: f503 6380 add.w r3, r3, #1024 ; 0x400 80057a6: 62bb str r3, [r7, #40] ; 0x28 for (i = n; i != 0U; i--) 80057a8: 6a3b ldr r3, [r7, #32] 80057aa: 62fb str r3, [r7, #44] ; 0x2c 80057ac: e01e b.n 80057ec <USB_WritePMA+0x78> { temp1 = *pBuf; 80057ae: 6a7b ldr r3, [r7, #36] ; 0x24 80057b0: 781b ldrb r3, [r3, #0] 80057b2: 61bb str r3, [r7, #24] pBuf++; 80057b4: 6a7b ldr r3, [r7, #36] ; 0x24 80057b6: 3301 adds r3, #1 80057b8: 627b str r3, [r7, #36] ; 0x24 temp2 = temp1 | ((uint16_t)((uint16_t) *pBuf << 8)); 80057ba: 6a7b ldr r3, [r7, #36] ; 0x24 80057bc: 781b ldrb r3, [r3, #0] 80057be: b29b uxth r3, r3 80057c0: 021b lsls r3, r3, #8 80057c2: b29b uxth r3, r3 80057c4: 461a mov r2, r3 80057c6: 69bb ldr r3, [r7, #24] 80057c8: 4313 orrs r3, r2 80057ca: 617b str r3, [r7, #20] *pdwVal = (uint16_t)temp2; 80057cc: 697b ldr r3, [r7, #20] 80057ce: b29a uxth r2, r3 80057d0: 6abb ldr r3, [r7, #40] ; 0x28 80057d2: 801a strh r2, [r3, #0] pdwVal++; 80057d4: 6abb ldr r3, [r7, #40] ; 0x28 80057d6: 3302 adds r3, #2 80057d8: 62bb str r3, [r7, #40] ; 0x28 #if PMA_ACCESS > 1U pdwVal++; 80057da: 6abb ldr r3, [r7, #40] ; 0x28 80057dc: 3302 adds r3, #2 80057de: 62bb str r3, [r7, #40] ; 0x28 #endif pBuf++; 80057e0: 6a7b ldr r3, [r7, #36] ; 0x24 80057e2: 3301 adds r3, #1 80057e4: 627b str r3, [r7, #36] ; 0x24 for (i = n; i != 0U; i--) 80057e6: 6afb ldr r3, [r7, #44] ; 0x2c 80057e8: 3b01 subs r3, #1 80057ea: 62fb str r3, [r7, #44] ; 0x2c 80057ec: 6afb ldr r3, [r7, #44] ; 0x2c 80057ee: 2b00 cmp r3, #0 80057f0: d1dd bne.n 80057ae <USB_WritePMA+0x3a> } } 80057f2: bf00 nop 80057f4: bf00 nop 80057f6: 3734 adds r7, #52 ; 0x34 80057f8: 46bd mov sp, r7 80057fa: bc80 pop {r7} 80057fc: 4770 bx lr 080057fe <USB_ReadPMA>: * @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) { 80057fe: b480 push {r7} 8005800: b08b sub sp, #44 ; 0x2c 8005802: af00 add r7, sp, #0 8005804: 60f8 str r0, [r7, #12] 8005806: 60b9 str r1, [r7, #8] 8005808: 4611 mov r1, r2 800580a: 461a mov r2, r3 800580c: 460b mov r3, r1 800580e: 80fb strh r3, [r7, #6] 8005810: 4613 mov r3, r2 8005812: 80bb strh r3, [r7, #4] uint32_t n = (uint32_t)wNBytes >> 1; 8005814: 88bb ldrh r3, [r7, #4] 8005816: 085b lsrs r3, r3, #1 8005818: b29b uxth r3, r3 800581a: 61bb str r3, [r7, #24] uint32_t BaseAddr = (uint32_t)USBx; 800581c: 68fb ldr r3, [r7, #12] 800581e: 617b str r3, [r7, #20] uint32_t i, temp; __IO uint16_t *pdwVal; uint8_t *pBuf = pbUsrBuf; 8005820: 68bb ldr r3, [r7, #8] 8005822: 61fb str r3, [r7, #28] pdwVal = (__IO uint16_t *)(BaseAddr + 0x400U + ((uint32_t)wPMABufAddr * PMA_ACCESS)); 8005824: 88fb ldrh r3, [r7, #6] 8005826: 005a lsls r2, r3, #1 8005828: 697b ldr r3, [r7, #20] 800582a: 4413 add r3, r2 800582c: f503 6380 add.w r3, r3, #1024 ; 0x400 8005830: 623b str r3, [r7, #32] for (i = n; i != 0U; i--) 8005832: 69bb ldr r3, [r7, #24] 8005834: 627b str r3, [r7, #36] ; 0x24 8005836: e01b b.n 8005870 <USB_ReadPMA+0x72> { temp = *(__IO uint16_t *)pdwVal; 8005838: 6a3b ldr r3, [r7, #32] 800583a: 881b ldrh r3, [r3, #0] 800583c: b29b uxth r3, r3 800583e: 613b str r3, [r7, #16] pdwVal++; 8005840: 6a3b ldr r3, [r7, #32] 8005842: 3302 adds r3, #2 8005844: 623b str r3, [r7, #32] *pBuf = (uint8_t)((temp >> 0) & 0xFFU); 8005846: 693b ldr r3, [r7, #16] 8005848: b2da uxtb r2, r3 800584a: 69fb ldr r3, [r7, #28] 800584c: 701a strb r2, [r3, #0] pBuf++; 800584e: 69fb ldr r3, [r7, #28] 8005850: 3301 adds r3, #1 8005852: 61fb str r3, [r7, #28] *pBuf = (uint8_t)((temp >> 8) & 0xFFU); 8005854: 693b ldr r3, [r7, #16] 8005856: 0a1b lsrs r3, r3, #8 8005858: b2da uxtb r2, r3 800585a: 69fb ldr r3, [r7, #28] 800585c: 701a strb r2, [r3, #0] pBuf++; 800585e: 69fb ldr r3, [r7, #28] 8005860: 3301 adds r3, #1 8005862: 61fb str r3, [r7, #28] #if PMA_ACCESS > 1U pdwVal++; 8005864: 6a3b ldr r3, [r7, #32] 8005866: 3302 adds r3, #2 8005868: 623b str r3, [r7, #32] for (i = n; i != 0U; i--) 800586a: 6a7b ldr r3, [r7, #36] ; 0x24 800586c: 3b01 subs r3, #1 800586e: 627b str r3, [r7, #36] ; 0x24 8005870: 6a7b ldr r3, [r7, #36] ; 0x24 8005872: 2b00 cmp r3, #0 8005874: d1e0 bne.n 8005838 <USB_ReadPMA+0x3a> #endif } if ((wNBytes % 2U) != 0U) 8005876: 88bb ldrh r3, [r7, #4] 8005878: f003 0301 and.w r3, r3, #1 800587c: b29b uxth r3, r3 800587e: 2b00 cmp r3, #0 8005880: d007 beq.n 8005892 <USB_ReadPMA+0x94> { temp = *pdwVal; 8005882: 6a3b ldr r3, [r7, #32] 8005884: 881b ldrh r3, [r3, #0] 8005886: b29b uxth r3, r3 8005888: 613b str r3, [r7, #16] *pBuf = (uint8_t)((temp >> 0) & 0xFFU); 800588a: 693b ldr r3, [r7, #16] 800588c: b2da uxtb r2, r3 800588e: 69fb ldr r3, [r7, #28] 8005890: 701a strb r2, [r3, #0] } } 8005892: bf00 nop 8005894: 372c adds r7, #44 ; 0x2c 8005896: 46bd mov sp, r7 8005898: bc80 pop {r7} 800589a: 4770 bx lr 0800589c <USBD_CDC_Init>: * @param pdev: device instance * @param cfgidx: Configuration index * @retval status */ static uint8_t USBD_CDC_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx) { 800589c: b580 push {r7, lr} 800589e: b084 sub sp, #16 80058a0: af00 add r7, sp, #0 80058a2: 6078 str r0, [r7, #4] 80058a4: 460b mov r3, r1 80058a6: 70fb strb r3, [r7, #3] uint8_t ret = 0U; 80058a8: 2300 movs r3, #0 80058aa: 73fb strb r3, [r7, #15] USBD_CDC_HandleTypeDef *hcdc; if (pdev->dev_speed == USBD_SPEED_HIGH) 80058ac: 687b ldr r3, [r7, #4] 80058ae: 7c1b ldrb r3, [r3, #16] 80058b0: 2b00 cmp r3, #0 80058b2: d115 bne.n 80058e0 <USBD_CDC_Init+0x44> { /* Open EP IN */ USBD_LL_OpenEP(pdev, CDC_IN_EP, USBD_EP_TYPE_BULK, 80058b4: f44f 7300 mov.w r3, #512 ; 0x200 80058b8: 2202 movs r2, #2 80058ba: 2181 movs r1, #129 ; 0x81 80058bc: 6878 ldr r0, [r7, #4] 80058be: f001 fe9e bl 80075fe <USBD_LL_OpenEP> CDC_DATA_HS_IN_PACKET_SIZE); pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 1U; 80058c2: 687b ldr r3, [r7, #4] 80058c4: 2201 movs r2, #1 80058c6: 62da str r2, [r3, #44] ; 0x2c /* Open EP OUT */ USBD_LL_OpenEP(pdev, CDC_OUT_EP, USBD_EP_TYPE_BULK, 80058c8: f44f 7300 mov.w r3, #512 ; 0x200 80058cc: 2202 movs r2, #2 80058ce: 2101 movs r1, #1 80058d0: 6878 ldr r0, [r7, #4] 80058d2: f001 fe94 bl 80075fe <USBD_LL_OpenEP> CDC_DATA_HS_OUT_PACKET_SIZE); pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 1U; 80058d6: 687b ldr r3, [r7, #4] 80058d8: 2201 movs r2, #1 80058da: f8c3 216c str.w r2, [r3, #364] ; 0x16c 80058de: e012 b.n 8005906 <USBD_CDC_Init+0x6a> } else { /* Open EP IN */ USBD_LL_OpenEP(pdev, CDC_IN_EP, USBD_EP_TYPE_BULK, 80058e0: 2340 movs r3, #64 ; 0x40 80058e2: 2202 movs r2, #2 80058e4: 2181 movs r1, #129 ; 0x81 80058e6: 6878 ldr r0, [r7, #4] 80058e8: f001 fe89 bl 80075fe <USBD_LL_OpenEP> CDC_DATA_FS_IN_PACKET_SIZE); pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 1U; 80058ec: 687b ldr r3, [r7, #4] 80058ee: 2201 movs r2, #1 80058f0: 62da str r2, [r3, #44] ; 0x2c /* Open EP OUT */ USBD_LL_OpenEP(pdev, CDC_OUT_EP, USBD_EP_TYPE_BULK, 80058f2: 2340 movs r3, #64 ; 0x40 80058f4: 2202 movs r2, #2 80058f6: 2101 movs r1, #1 80058f8: 6878 ldr r0, [r7, #4] 80058fa: f001 fe80 bl 80075fe <USBD_LL_OpenEP> CDC_DATA_FS_OUT_PACKET_SIZE); pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 1U; 80058fe: 687b ldr r3, [r7, #4] 8005900: 2201 movs r2, #1 8005902: 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); 8005906: 2308 movs r3, #8 8005908: 2203 movs r2, #3 800590a: 2182 movs r1, #130 ; 0x82 800590c: 6878 ldr r0, [r7, #4] 800590e: f001 fe76 bl 80075fe <USBD_LL_OpenEP> pdev->ep_in[CDC_CMD_EP & 0xFU].is_used = 1U; 8005912: 687b ldr r3, [r7, #4] 8005914: 2201 movs r2, #1 8005916: 641a str r2, [r3, #64] ; 0x40 pdev->pClassData = USBD_malloc(sizeof(USBD_CDC_HandleTypeDef)); 8005918: f44f 7007 mov.w r0, #540 ; 0x21c 800591c: f001 ff96 bl 800784c <USBD_static_malloc> 8005920: 4602 mov r2, r0 8005922: 687b ldr r3, [r7, #4] 8005924: f8c3 22b8 str.w r2, [r3, #696] ; 0x2b8 if (pdev->pClassData == NULL) 8005928: 687b ldr r3, [r7, #4] 800592a: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 800592e: 2b00 cmp r3, #0 8005930: d102 bne.n 8005938 <USBD_CDC_Init+0x9c> { ret = 1U; 8005932: 2301 movs r3, #1 8005934: 73fb strb r3, [r7, #15] 8005936: e026 b.n 8005986 <USBD_CDC_Init+0xea> } else { hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData; 8005938: 687b ldr r3, [r7, #4] 800593a: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 800593e: 60bb str r3, [r7, #8] /* Init physical Interface components */ ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Init(); 8005940: 687b ldr r3, [r7, #4] 8005942: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc 8005946: 681b ldr r3, [r3, #0] 8005948: 4798 blx r3 /* Init Xfer states */ hcdc->TxState = 0U; 800594a: 68bb ldr r3, [r7, #8] 800594c: 2200 movs r2, #0 800594e: f8c3 2214 str.w r2, [r3, #532] ; 0x214 hcdc->RxState = 0U; 8005952: 68bb ldr r3, [r7, #8] 8005954: 2200 movs r2, #0 8005956: f8c3 2218 str.w r2, [r3, #536] ; 0x218 if (pdev->dev_speed == USBD_SPEED_HIGH) 800595a: 687b ldr r3, [r7, #4] 800595c: 7c1b ldrb r3, [r3, #16] 800595e: 2b00 cmp r3, #0 8005960: d109 bne.n 8005976 <USBD_CDC_Init+0xda> { /* Prepare Out endpoint to receive next packet */ USBD_LL_PrepareReceive(pdev, CDC_OUT_EP, hcdc->RxBuffer, 8005962: 68bb ldr r3, [r7, #8] 8005964: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204 8005968: f44f 7300 mov.w r3, #512 ; 0x200 800596c: 2101 movs r1, #1 800596e: 6878 ldr r0, [r7, #4] 8005970: f001 ff36 bl 80077e0 <USBD_LL_PrepareReceive> 8005974: e007 b.n 8005986 <USBD_CDC_Init+0xea> CDC_DATA_HS_OUT_PACKET_SIZE); } else { /* Prepare Out endpoint to receive next packet */ USBD_LL_PrepareReceive(pdev, CDC_OUT_EP, hcdc->RxBuffer, 8005976: 68bb ldr r3, [r7, #8] 8005978: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204 800597c: 2340 movs r3, #64 ; 0x40 800597e: 2101 movs r1, #1 8005980: 6878 ldr r0, [r7, #4] 8005982: f001 ff2d bl 80077e0 <USBD_LL_PrepareReceive> CDC_DATA_FS_OUT_PACKET_SIZE); } } return ret; 8005986: 7bfb ldrb r3, [r7, #15] } 8005988: 4618 mov r0, r3 800598a: 3710 adds r7, #16 800598c: 46bd mov sp, r7 800598e: bd80 pop {r7, pc} 08005990 <USBD_CDC_DeInit>: * @param pdev: device instance * @param cfgidx: Configuration index * @retval status */ static uint8_t USBD_CDC_DeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx) { 8005990: b580 push {r7, lr} 8005992: b084 sub sp, #16 8005994: af00 add r7, sp, #0 8005996: 6078 str r0, [r7, #4] 8005998: 460b mov r3, r1 800599a: 70fb strb r3, [r7, #3] uint8_t ret = 0U; 800599c: 2300 movs r3, #0 800599e: 73fb strb r3, [r7, #15] /* Close EP IN */ USBD_LL_CloseEP(pdev, CDC_IN_EP); 80059a0: 2181 movs r1, #129 ; 0x81 80059a2: 6878 ldr r0, [r7, #4] 80059a4: f001 fe51 bl 800764a <USBD_LL_CloseEP> pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 0U; 80059a8: 687b ldr r3, [r7, #4] 80059aa: 2200 movs r2, #0 80059ac: 62da str r2, [r3, #44] ; 0x2c /* Close EP OUT */ USBD_LL_CloseEP(pdev, CDC_OUT_EP); 80059ae: 2101 movs r1, #1 80059b0: 6878 ldr r0, [r7, #4] 80059b2: f001 fe4a bl 800764a <USBD_LL_CloseEP> pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 0U; 80059b6: 687b ldr r3, [r7, #4] 80059b8: 2200 movs r2, #0 80059ba: f8c3 216c str.w r2, [r3, #364] ; 0x16c /* Close Command IN EP */ USBD_LL_CloseEP(pdev, CDC_CMD_EP); 80059be: 2182 movs r1, #130 ; 0x82 80059c0: 6878 ldr r0, [r7, #4] 80059c2: f001 fe42 bl 800764a <USBD_LL_CloseEP> pdev->ep_in[CDC_CMD_EP & 0xFU].is_used = 0U; 80059c6: 687b ldr r3, [r7, #4] 80059c8: 2200 movs r2, #0 80059ca: 641a str r2, [r3, #64] ; 0x40 /* DeInit physical Interface components */ if (pdev->pClassData != NULL) 80059cc: 687b ldr r3, [r7, #4] 80059ce: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 80059d2: 2b00 cmp r3, #0 80059d4: d00e beq.n 80059f4 <USBD_CDC_DeInit+0x64> { ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->DeInit(); 80059d6: 687b ldr r3, [r7, #4] 80059d8: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc 80059dc: 685b ldr r3, [r3, #4] 80059de: 4798 blx r3 USBD_free(pdev->pClassData); 80059e0: 687b ldr r3, [r7, #4] 80059e2: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 80059e6: 4618 mov r0, r3 80059e8: f001 ff3c bl 8007864 <USBD_static_free> pdev->pClassData = NULL; 80059ec: 687b ldr r3, [r7, #4] 80059ee: 2200 movs r2, #0 80059f0: f8c3 22b8 str.w r2, [r3, #696] ; 0x2b8 } return ret; 80059f4: 7bfb ldrb r3, [r7, #15] } 80059f6: 4618 mov r0, r3 80059f8: 3710 adds r7, #16 80059fa: 46bd mov sp, r7 80059fc: bd80 pop {r7, pc} 080059fe <USBD_CDC_Setup>: * @param req: usb requests * @retval status */ static uint8_t USBD_CDC_Setup(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 80059fe: b580 push {r7, lr} 8005a00: b086 sub sp, #24 8005a02: af00 add r7, sp, #0 8005a04: 6078 str r0, [r7, #4] 8005a06: 6039 str r1, [r7, #0] USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData; 8005a08: 687b ldr r3, [r7, #4] 8005a0a: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8005a0e: 613b str r3, [r7, #16] uint8_t ifalt = 0U; 8005a10: 2300 movs r3, #0 8005a12: 73fb strb r3, [r7, #15] uint16_t status_info = 0U; 8005a14: 2300 movs r3, #0 8005a16: 81bb strh r3, [r7, #12] uint8_t ret = USBD_OK; 8005a18: 2300 movs r3, #0 8005a1a: 75fb strb r3, [r7, #23] switch (req->bmRequest & USB_REQ_TYPE_MASK) 8005a1c: 683b ldr r3, [r7, #0] 8005a1e: 781b ldrb r3, [r3, #0] 8005a20: f003 0360 and.w r3, r3, #96 ; 0x60 8005a24: 2b00 cmp r3, #0 8005a26: d039 beq.n 8005a9c <USBD_CDC_Setup+0x9e> 8005a28: 2b20 cmp r3, #32 8005a2a: d17f bne.n 8005b2c <USBD_CDC_Setup+0x12e> { case USB_REQ_TYPE_CLASS : if (req->wLength) 8005a2c: 683b ldr r3, [r7, #0] 8005a2e: 88db ldrh r3, [r3, #6] 8005a30: 2b00 cmp r3, #0 8005a32: d029 beq.n 8005a88 <USBD_CDC_Setup+0x8a> { if (req->bmRequest & 0x80U) 8005a34: 683b ldr r3, [r7, #0] 8005a36: 781b ldrb r3, [r3, #0] 8005a38: b25b sxtb r3, r3 8005a3a: 2b00 cmp r3, #0 8005a3c: da11 bge.n 8005a62 <USBD_CDC_Setup+0x64> { ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest, 8005a3e: 687b ldr r3, [r7, #4] 8005a40: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc 8005a44: 689b ldr r3, [r3, #8] 8005a46: 683a ldr r2, [r7, #0] 8005a48: 7850 ldrb r0, [r2, #1] (uint8_t *)(void *)hcdc->data, 8005a4a: 6939 ldr r1, [r7, #16] ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest, 8005a4c: 683a ldr r2, [r7, #0] 8005a4e: 88d2 ldrh r2, [r2, #6] 8005a50: 4798 blx r3 req->wLength); USBD_CtlSendData(pdev, (uint8_t *)(void *)hcdc->data, req->wLength); 8005a52: 6939 ldr r1, [r7, #16] 8005a54: 683b ldr r3, [r7, #0] 8005a56: 88db ldrh r3, [r3, #6] 8005a58: 461a mov r2, r3 8005a5a: 6878 ldr r0, [r7, #4] 8005a5c: f001 fa09 bl 8006e72 <USBD_CtlSendData> else { ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest, (uint8_t *)(void *)req, 0U); } break; 8005a60: e06b b.n 8005b3a <USBD_CDC_Setup+0x13c> hcdc->CmdOpCode = req->bRequest; 8005a62: 683b ldr r3, [r7, #0] 8005a64: 785a ldrb r2, [r3, #1] 8005a66: 693b ldr r3, [r7, #16] 8005a68: f883 2200 strb.w r2, [r3, #512] ; 0x200 hcdc->CmdLength = (uint8_t)req->wLength; 8005a6c: 683b ldr r3, [r7, #0] 8005a6e: 88db ldrh r3, [r3, #6] 8005a70: b2da uxtb r2, r3 8005a72: 693b ldr r3, [r7, #16] 8005a74: f883 2201 strb.w r2, [r3, #513] ; 0x201 USBD_CtlPrepareRx(pdev, (uint8_t *)(void *)hcdc->data, req->wLength); 8005a78: 6939 ldr r1, [r7, #16] 8005a7a: 683b ldr r3, [r7, #0] 8005a7c: 88db ldrh r3, [r3, #6] 8005a7e: 461a mov r2, r3 8005a80: 6878 ldr r0, [r7, #4] 8005a82: f001 fa24 bl 8006ece <USBD_CtlPrepareRx> break; 8005a86: e058 b.n 8005b3a <USBD_CDC_Setup+0x13c> ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest, 8005a88: 687b ldr r3, [r7, #4] 8005a8a: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc 8005a8e: 689b ldr r3, [r3, #8] 8005a90: 683a ldr r2, [r7, #0] 8005a92: 7850 ldrb r0, [r2, #1] 8005a94: 2200 movs r2, #0 8005a96: 6839 ldr r1, [r7, #0] 8005a98: 4798 blx r3 break; 8005a9a: e04e b.n 8005b3a <USBD_CDC_Setup+0x13c> case USB_REQ_TYPE_STANDARD: switch (req->bRequest) 8005a9c: 683b ldr r3, [r7, #0] 8005a9e: 785b ldrb r3, [r3, #1] 8005aa0: 2b0b cmp r3, #11 8005aa2: d02e beq.n 8005b02 <USBD_CDC_Setup+0x104> 8005aa4: 2b0b cmp r3, #11 8005aa6: dc38 bgt.n 8005b1a <USBD_CDC_Setup+0x11c> 8005aa8: 2b00 cmp r3, #0 8005aaa: d002 beq.n 8005ab2 <USBD_CDC_Setup+0xb4> 8005aac: 2b0a cmp r3, #10 8005aae: d014 beq.n 8005ada <USBD_CDC_Setup+0xdc> 8005ab0: e033 b.n 8005b1a <USBD_CDC_Setup+0x11c> { case USB_REQ_GET_STATUS: if (pdev->dev_state == USBD_STATE_CONFIGURED) 8005ab2: 687b ldr r3, [r7, #4] 8005ab4: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8005ab8: 2b03 cmp r3, #3 8005aba: d107 bne.n 8005acc <USBD_CDC_Setup+0xce> { USBD_CtlSendData(pdev, (uint8_t *)(void *)&status_info, 2U); 8005abc: f107 030c add.w r3, r7, #12 8005ac0: 2202 movs r2, #2 8005ac2: 4619 mov r1, r3 8005ac4: 6878 ldr r0, [r7, #4] 8005ac6: f001 f9d4 bl 8006e72 <USBD_CtlSendData> else { USBD_CtlError(pdev, req); ret = USBD_FAIL; } break; 8005aca: e02e b.n 8005b2a <USBD_CDC_Setup+0x12c> USBD_CtlError(pdev, req); 8005acc: 6839 ldr r1, [r7, #0] 8005ace: 6878 ldr r0, [r7, #4] 8005ad0: f001 f965 bl 8006d9e <USBD_CtlError> ret = USBD_FAIL; 8005ad4: 2302 movs r3, #2 8005ad6: 75fb strb r3, [r7, #23] break; 8005ad8: e027 b.n 8005b2a <USBD_CDC_Setup+0x12c> case USB_REQ_GET_INTERFACE: if (pdev->dev_state == USBD_STATE_CONFIGURED) 8005ada: 687b ldr r3, [r7, #4] 8005adc: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8005ae0: 2b03 cmp r3, #3 8005ae2: d107 bne.n 8005af4 <USBD_CDC_Setup+0xf6> { USBD_CtlSendData(pdev, &ifalt, 1U); 8005ae4: f107 030f add.w r3, r7, #15 8005ae8: 2201 movs r2, #1 8005aea: 4619 mov r1, r3 8005aec: 6878 ldr r0, [r7, #4] 8005aee: f001 f9c0 bl 8006e72 <USBD_CtlSendData> else { USBD_CtlError(pdev, req); ret = USBD_FAIL; } break; 8005af2: e01a b.n 8005b2a <USBD_CDC_Setup+0x12c> USBD_CtlError(pdev, req); 8005af4: 6839 ldr r1, [r7, #0] 8005af6: 6878 ldr r0, [r7, #4] 8005af8: f001 f951 bl 8006d9e <USBD_CtlError> ret = USBD_FAIL; 8005afc: 2302 movs r3, #2 8005afe: 75fb strb r3, [r7, #23] break; 8005b00: e013 b.n 8005b2a <USBD_CDC_Setup+0x12c> case USB_REQ_SET_INTERFACE: if (pdev->dev_state != USBD_STATE_CONFIGURED) 8005b02: 687b ldr r3, [r7, #4] 8005b04: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8005b08: 2b03 cmp r3, #3 8005b0a: d00d beq.n 8005b28 <USBD_CDC_Setup+0x12a> { USBD_CtlError(pdev, req); 8005b0c: 6839 ldr r1, [r7, #0] 8005b0e: 6878 ldr r0, [r7, #4] 8005b10: f001 f945 bl 8006d9e <USBD_CtlError> ret = USBD_FAIL; 8005b14: 2302 movs r3, #2 8005b16: 75fb strb r3, [r7, #23] } break; 8005b18: e006 b.n 8005b28 <USBD_CDC_Setup+0x12a> default: USBD_CtlError(pdev, req); 8005b1a: 6839 ldr r1, [r7, #0] 8005b1c: 6878 ldr r0, [r7, #4] 8005b1e: f001 f93e bl 8006d9e <USBD_CtlError> ret = USBD_FAIL; 8005b22: 2302 movs r3, #2 8005b24: 75fb strb r3, [r7, #23] break; 8005b26: e000 b.n 8005b2a <USBD_CDC_Setup+0x12c> break; 8005b28: bf00 nop } break; 8005b2a: e006 b.n 8005b3a <USBD_CDC_Setup+0x13c> default: USBD_CtlError(pdev, req); 8005b2c: 6839 ldr r1, [r7, #0] 8005b2e: 6878 ldr r0, [r7, #4] 8005b30: f001 f935 bl 8006d9e <USBD_CtlError> ret = USBD_FAIL; 8005b34: 2302 movs r3, #2 8005b36: 75fb strb r3, [r7, #23] break; 8005b38: bf00 nop } return ret; 8005b3a: 7dfb ldrb r3, [r7, #23] } 8005b3c: 4618 mov r0, r3 8005b3e: 3718 adds r7, #24 8005b40: 46bd mov sp, r7 8005b42: bd80 pop {r7, pc} 08005b44 <USBD_CDC_DataIn>: * @param pdev: device instance * @param epnum: endpoint number * @retval status */ static uint8_t USBD_CDC_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum) { 8005b44: b580 push {r7, lr} 8005b46: b084 sub sp, #16 8005b48: af00 add r7, sp, #0 8005b4a: 6078 str r0, [r7, #4] 8005b4c: 460b mov r3, r1 8005b4e: 70fb strb r3, [r7, #3] USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData; 8005b50: 687b ldr r3, [r7, #4] 8005b52: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8005b56: 60fb str r3, [r7, #12] PCD_HandleTypeDef *hpcd = pdev->pData; 8005b58: 687b ldr r3, [r7, #4] 8005b5a: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 8005b5e: 60bb str r3, [r7, #8] if (pdev->pClassData != NULL) 8005b60: 687b ldr r3, [r7, #4] 8005b62: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8005b66: 2b00 cmp r3, #0 8005b68: d03a beq.n 8005be0 <USBD_CDC_DataIn+0x9c> { if ((pdev->ep_in[epnum].total_length > 0U) && ((pdev->ep_in[epnum].total_length % hpcd->IN_ep[epnum].maxpacket) == 0U)) 8005b6a: 78fa ldrb r2, [r7, #3] 8005b6c: 6879 ldr r1, [r7, #4] 8005b6e: 4613 mov r3, r2 8005b70: 009b lsls r3, r3, #2 8005b72: 4413 add r3, r2 8005b74: 009b lsls r3, r3, #2 8005b76: 440b add r3, r1 8005b78: 331c adds r3, #28 8005b7a: 681b ldr r3, [r3, #0] 8005b7c: 2b00 cmp r3, #0 8005b7e: d029 beq.n 8005bd4 <USBD_CDC_DataIn+0x90> 8005b80: 78fa ldrb r2, [r7, #3] 8005b82: 6879 ldr r1, [r7, #4] 8005b84: 4613 mov r3, r2 8005b86: 009b lsls r3, r3, #2 8005b88: 4413 add r3, r2 8005b8a: 009b lsls r3, r3, #2 8005b8c: 440b add r3, r1 8005b8e: 331c adds r3, #28 8005b90: 681a ldr r2, [r3, #0] 8005b92: 78f9 ldrb r1, [r7, #3] 8005b94: 68b8 ldr r0, [r7, #8] 8005b96: 460b mov r3, r1 8005b98: 009b lsls r3, r3, #2 8005b9a: 440b add r3, r1 8005b9c: 00db lsls r3, r3, #3 8005b9e: 4403 add r3, r0 8005ba0: 3338 adds r3, #56 ; 0x38 8005ba2: 681b ldr r3, [r3, #0] 8005ba4: fbb2 f1f3 udiv r1, r2, r3 8005ba8: fb01 f303 mul.w r3, r1, r3 8005bac: 1ad3 subs r3, r2, r3 8005bae: 2b00 cmp r3, #0 8005bb0: d110 bne.n 8005bd4 <USBD_CDC_DataIn+0x90> { /* Update the packet total length */ pdev->ep_in[epnum].total_length = 0U; 8005bb2: 78fa ldrb r2, [r7, #3] 8005bb4: 6879 ldr r1, [r7, #4] 8005bb6: 4613 mov r3, r2 8005bb8: 009b lsls r3, r3, #2 8005bba: 4413 add r3, r2 8005bbc: 009b lsls r3, r3, #2 8005bbe: 440b add r3, r1 8005bc0: 331c adds r3, #28 8005bc2: 2200 movs r2, #0 8005bc4: 601a str r2, [r3, #0] /* Send ZLP */ USBD_LL_Transmit(pdev, epnum, NULL, 0U); 8005bc6: 78f9 ldrb r1, [r7, #3] 8005bc8: 2300 movs r3, #0 8005bca: 2200 movs r2, #0 8005bcc: 6878 ldr r0, [r7, #4] 8005bce: f001 fde4 bl 800779a <USBD_LL_Transmit> 8005bd2: e003 b.n 8005bdc <USBD_CDC_DataIn+0x98> } else { hcdc->TxState = 0U; 8005bd4: 68fb ldr r3, [r7, #12] 8005bd6: 2200 movs r2, #0 8005bd8: f8c3 2214 str.w r2, [r3, #532] ; 0x214 } return USBD_OK; 8005bdc: 2300 movs r3, #0 8005bde: e000 b.n 8005be2 <USBD_CDC_DataIn+0x9e> } else { return USBD_FAIL; 8005be0: 2302 movs r3, #2 } } 8005be2: 4618 mov r0, r3 8005be4: 3710 adds r7, #16 8005be6: 46bd mov sp, r7 8005be8: bd80 pop {r7, pc} 08005bea <USBD_CDC_DataOut>: * @param pdev: device instance * @param epnum: endpoint number * @retval status */ static uint8_t USBD_CDC_DataOut(USBD_HandleTypeDef *pdev, uint8_t epnum) { 8005bea: b580 push {r7, lr} 8005bec: b084 sub sp, #16 8005bee: af00 add r7, sp, #0 8005bf0: 6078 str r0, [r7, #4] 8005bf2: 460b mov r3, r1 8005bf4: 70fb strb r3, [r7, #3] USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData; 8005bf6: 687b ldr r3, [r7, #4] 8005bf8: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8005bfc: 60fb str r3, [r7, #12] /* Get the received data length */ hcdc->RxLength = USBD_LL_GetRxDataSize(pdev, epnum); 8005bfe: 78fb ldrb r3, [r7, #3] 8005c00: 4619 mov r1, r3 8005c02: 6878 ldr r0, [r7, #4] 8005c04: f001 fe0f bl 8007826 <USBD_LL_GetRxDataSize> 8005c08: 4602 mov r2, r0 8005c0a: 68fb ldr r3, [r7, #12] 8005c0c: 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) 8005c10: 687b ldr r3, [r7, #4] 8005c12: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8005c16: 2b00 cmp r3, #0 8005c18: d00d beq.n 8005c36 <USBD_CDC_DataOut+0x4c> { ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Receive(hcdc->RxBuffer, &hcdc->RxLength); 8005c1a: 687b ldr r3, [r7, #4] 8005c1c: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc 8005c20: 68db ldr r3, [r3, #12] 8005c22: 68fa ldr r2, [r7, #12] 8005c24: f8d2 0204 ldr.w r0, [r2, #516] ; 0x204 8005c28: 68fa ldr r2, [r7, #12] 8005c2a: f502 7203 add.w r2, r2, #524 ; 0x20c 8005c2e: 4611 mov r1, r2 8005c30: 4798 blx r3 return USBD_OK; 8005c32: 2300 movs r3, #0 8005c34: e000 b.n 8005c38 <USBD_CDC_DataOut+0x4e> } else { return USBD_FAIL; 8005c36: 2302 movs r3, #2 } } 8005c38: 4618 mov r0, r3 8005c3a: 3710 adds r7, #16 8005c3c: 46bd mov sp, r7 8005c3e: bd80 pop {r7, pc} 08005c40 <USBD_CDC_EP0_RxReady>: * Handle EP0 Rx Ready event * @param pdev: device instance * @retval status */ static uint8_t USBD_CDC_EP0_RxReady(USBD_HandleTypeDef *pdev) { 8005c40: b580 push {r7, lr} 8005c42: b084 sub sp, #16 8005c44: af00 add r7, sp, #0 8005c46: 6078 str r0, [r7, #4] USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData; 8005c48: 687b ldr r3, [r7, #4] 8005c4a: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8005c4e: 60fb str r3, [r7, #12] if ((pdev->pUserData != NULL) && (hcdc->CmdOpCode != 0xFFU)) 8005c50: 687b ldr r3, [r7, #4] 8005c52: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc 8005c56: 2b00 cmp r3, #0 8005c58: d015 beq.n 8005c86 <USBD_CDC_EP0_RxReady+0x46> 8005c5a: 68fb ldr r3, [r7, #12] 8005c5c: f893 3200 ldrb.w r3, [r3, #512] ; 0x200 8005c60: 2bff cmp r3, #255 ; 0xff 8005c62: d010 beq.n 8005c86 <USBD_CDC_EP0_RxReady+0x46> { ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(hcdc->CmdOpCode, 8005c64: 687b ldr r3, [r7, #4] 8005c66: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc 8005c6a: 689b ldr r3, [r3, #8] 8005c6c: 68fa ldr r2, [r7, #12] 8005c6e: f892 0200 ldrb.w r0, [r2, #512] ; 0x200 (uint8_t *)(void *)hcdc->data, 8005c72: 68f9 ldr r1, [r7, #12] (uint16_t)hcdc->CmdLength); 8005c74: 68fa ldr r2, [r7, #12] 8005c76: f892 2201 ldrb.w r2, [r2, #513] ; 0x201 ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(hcdc->CmdOpCode, 8005c7a: b292 uxth r2, r2 8005c7c: 4798 blx r3 hcdc->CmdOpCode = 0xFFU; 8005c7e: 68fb ldr r3, [r7, #12] 8005c80: 22ff movs r2, #255 ; 0xff 8005c82: f883 2200 strb.w r2, [r3, #512] ; 0x200 } return USBD_OK; 8005c86: 2300 movs r3, #0 } 8005c88: 4618 mov r0, r3 8005c8a: 3710 adds r7, #16 8005c8c: 46bd mov sp, r7 8005c8e: bd80 pop {r7, pc} 08005c90 <USBD_CDC_GetFSCfgDesc>: * @param speed : current device speed * @param length : pointer data length * @retval pointer to descriptor buffer */ static uint8_t *USBD_CDC_GetFSCfgDesc(uint16_t *length) { 8005c90: b480 push {r7} 8005c92: b083 sub sp, #12 8005c94: af00 add r7, sp, #0 8005c96: 6078 str r0, [r7, #4] *length = sizeof(USBD_CDC_CfgFSDesc); 8005c98: 687b ldr r3, [r7, #4] 8005c9a: 2243 movs r2, #67 ; 0x43 8005c9c: 801a strh r2, [r3, #0] return USBD_CDC_CfgFSDesc; 8005c9e: 4b03 ldr r3, [pc, #12] ; (8005cac <USBD_CDC_GetFSCfgDesc+0x1c>) } 8005ca0: 4618 mov r0, r3 8005ca2: 370c adds r7, #12 8005ca4: 46bd mov sp, r7 8005ca6: bc80 pop {r7} 8005ca8: 4770 bx lr 8005caa: bf00 nop 8005cac: 20000094 .word 0x20000094 08005cb0 <USBD_CDC_GetHSCfgDesc>: * @param speed : current device speed * @param length : pointer data length * @retval pointer to descriptor buffer */ static uint8_t *USBD_CDC_GetHSCfgDesc(uint16_t *length) { 8005cb0: b480 push {r7} 8005cb2: b083 sub sp, #12 8005cb4: af00 add r7, sp, #0 8005cb6: 6078 str r0, [r7, #4] *length = sizeof(USBD_CDC_CfgHSDesc); 8005cb8: 687b ldr r3, [r7, #4] 8005cba: 2243 movs r2, #67 ; 0x43 8005cbc: 801a strh r2, [r3, #0] return USBD_CDC_CfgHSDesc; 8005cbe: 4b03 ldr r3, [pc, #12] ; (8005ccc <USBD_CDC_GetHSCfgDesc+0x1c>) } 8005cc0: 4618 mov r0, r3 8005cc2: 370c adds r7, #12 8005cc4: 46bd mov sp, r7 8005cc6: bc80 pop {r7} 8005cc8: 4770 bx lr 8005cca: bf00 nop 8005ccc: 20000050 .word 0x20000050 08005cd0 <USBD_CDC_GetOtherSpeedCfgDesc>: * @param speed : current device speed * @param length : pointer data length * @retval pointer to descriptor buffer */ static uint8_t *USBD_CDC_GetOtherSpeedCfgDesc(uint16_t *length) { 8005cd0: b480 push {r7} 8005cd2: b083 sub sp, #12 8005cd4: af00 add r7, sp, #0 8005cd6: 6078 str r0, [r7, #4] *length = sizeof(USBD_CDC_OtherSpeedCfgDesc); 8005cd8: 687b ldr r3, [r7, #4] 8005cda: 2243 movs r2, #67 ; 0x43 8005cdc: 801a strh r2, [r3, #0] return USBD_CDC_OtherSpeedCfgDesc; 8005cde: 4b03 ldr r3, [pc, #12] ; (8005cec <USBD_CDC_GetOtherSpeedCfgDesc+0x1c>) } 8005ce0: 4618 mov r0, r3 8005ce2: 370c adds r7, #12 8005ce4: 46bd mov sp, r7 8005ce6: bc80 pop {r7} 8005ce8: 4770 bx lr 8005cea: bf00 nop 8005cec: 200000d8 .word 0x200000d8 08005cf0 <USBD_CDC_GetDeviceQualifierDescriptor>: * return Device Qualifier descriptor * @param length : pointer data length * @retval pointer to descriptor buffer */ uint8_t *USBD_CDC_GetDeviceQualifierDescriptor(uint16_t *length) { 8005cf0: b480 push {r7} 8005cf2: b083 sub sp, #12 8005cf4: af00 add r7, sp, #0 8005cf6: 6078 str r0, [r7, #4] *length = sizeof(USBD_CDC_DeviceQualifierDesc); 8005cf8: 687b ldr r3, [r7, #4] 8005cfa: 220a movs r2, #10 8005cfc: 801a strh r2, [r3, #0] return USBD_CDC_DeviceQualifierDesc; 8005cfe: 4b03 ldr r3, [pc, #12] ; (8005d0c <USBD_CDC_GetDeviceQualifierDescriptor+0x1c>) } 8005d00: 4618 mov r0, r3 8005d02: 370c adds r7, #12 8005d04: 46bd mov sp, r7 8005d06: bc80 pop {r7} 8005d08: 4770 bx lr 8005d0a: bf00 nop 8005d0c: 2000000c .word 0x2000000c 08005d10 <USBD_CDC_RegisterInterface>: * @param fops: CD Interface callback * @retval status */ uint8_t USBD_CDC_RegisterInterface(USBD_HandleTypeDef *pdev, USBD_CDC_ItfTypeDef *fops) { 8005d10: b480 push {r7} 8005d12: b085 sub sp, #20 8005d14: af00 add r7, sp, #0 8005d16: 6078 str r0, [r7, #4] 8005d18: 6039 str r1, [r7, #0] uint8_t ret = USBD_FAIL; 8005d1a: 2302 movs r3, #2 8005d1c: 73fb strb r3, [r7, #15] if (fops != NULL) 8005d1e: 683b ldr r3, [r7, #0] 8005d20: 2b00 cmp r3, #0 8005d22: d005 beq.n 8005d30 <USBD_CDC_RegisterInterface+0x20> { pdev->pUserData = fops; 8005d24: 687b ldr r3, [r7, #4] 8005d26: 683a ldr r2, [r7, #0] 8005d28: f8c3 22bc str.w r2, [r3, #700] ; 0x2bc ret = USBD_OK; 8005d2c: 2300 movs r3, #0 8005d2e: 73fb strb r3, [r7, #15] } return ret; 8005d30: 7bfb ldrb r3, [r7, #15] } 8005d32: 4618 mov r0, r3 8005d34: 3714 adds r7, #20 8005d36: 46bd mov sp, r7 8005d38: bc80 pop {r7} 8005d3a: 4770 bx lr 08005d3c <USBD_CDC_SetTxBuffer>: * @retval status */ uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff, uint16_t length) { 8005d3c: b480 push {r7} 8005d3e: b087 sub sp, #28 8005d40: af00 add r7, sp, #0 8005d42: 60f8 str r0, [r7, #12] 8005d44: 60b9 str r1, [r7, #8] 8005d46: 4613 mov r3, r2 8005d48: 80fb strh r3, [r7, #6] USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData; 8005d4a: 68fb ldr r3, [r7, #12] 8005d4c: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8005d50: 617b str r3, [r7, #20] hcdc->TxBuffer = pbuff; 8005d52: 697b ldr r3, [r7, #20] 8005d54: 68ba ldr r2, [r7, #8] 8005d56: f8c3 2208 str.w r2, [r3, #520] ; 0x208 hcdc->TxLength = length; 8005d5a: 88fa ldrh r2, [r7, #6] 8005d5c: 697b ldr r3, [r7, #20] 8005d5e: f8c3 2210 str.w r2, [r3, #528] ; 0x210 return USBD_OK; 8005d62: 2300 movs r3, #0 } 8005d64: 4618 mov r0, r3 8005d66: 371c adds r7, #28 8005d68: 46bd mov sp, r7 8005d6a: bc80 pop {r7} 8005d6c: 4770 bx lr 08005d6e <USBD_CDC_SetRxBuffer>: * @param pbuff: Rx Buffer * @retval status */ uint8_t USBD_CDC_SetRxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff) { 8005d6e: b480 push {r7} 8005d70: b085 sub sp, #20 8005d72: af00 add r7, sp, #0 8005d74: 6078 str r0, [r7, #4] 8005d76: 6039 str r1, [r7, #0] USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData; 8005d78: 687b ldr r3, [r7, #4] 8005d7a: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8005d7e: 60fb str r3, [r7, #12] hcdc->RxBuffer = pbuff; 8005d80: 68fb ldr r3, [r7, #12] 8005d82: 683a ldr r2, [r7, #0] 8005d84: f8c3 2204 str.w r2, [r3, #516] ; 0x204 return USBD_OK; 8005d88: 2300 movs r3, #0 } 8005d8a: 4618 mov r0, r3 8005d8c: 3714 adds r7, #20 8005d8e: 46bd mov sp, r7 8005d90: bc80 pop {r7} 8005d92: 4770 bx lr 08005d94 <USBD_CDC_TransmitPacket>: * Transmit packet on IN endpoint * @param pdev: device instance * @retval status */ uint8_t USBD_CDC_TransmitPacket(USBD_HandleTypeDef *pdev) { 8005d94: b580 push {r7, lr} 8005d96: b084 sub sp, #16 8005d98: af00 add r7, sp, #0 8005d9a: 6078 str r0, [r7, #4] USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData; 8005d9c: 687b ldr r3, [r7, #4] 8005d9e: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8005da2: 60fb str r3, [r7, #12] if (pdev->pClassData != NULL) 8005da4: 687b ldr r3, [r7, #4] 8005da6: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8005daa: 2b00 cmp r3, #0 8005dac: d01c beq.n 8005de8 <USBD_CDC_TransmitPacket+0x54> { if (hcdc->TxState == 0U) 8005dae: 68fb ldr r3, [r7, #12] 8005db0: f8d3 3214 ldr.w r3, [r3, #532] ; 0x214 8005db4: 2b00 cmp r3, #0 8005db6: d115 bne.n 8005de4 <USBD_CDC_TransmitPacket+0x50> { /* Tx Transfer in progress */ hcdc->TxState = 1U; 8005db8: 68fb ldr r3, [r7, #12] 8005dba: 2201 movs r2, #1 8005dbc: f8c3 2214 str.w r2, [r3, #532] ; 0x214 /* Update the packet total length */ pdev->ep_in[CDC_IN_EP & 0xFU].total_length = hcdc->TxLength; 8005dc0: 68fb ldr r3, [r7, #12] 8005dc2: f8d3 2210 ldr.w r2, [r3, #528] ; 0x210 8005dc6: 687b ldr r3, [r7, #4] 8005dc8: 631a str r2, [r3, #48] ; 0x30 /* Transmit next packet */ USBD_LL_Transmit(pdev, CDC_IN_EP, hcdc->TxBuffer, 8005dca: 68fb ldr r3, [r7, #12] 8005dcc: f8d3 2208 ldr.w r2, [r3, #520] ; 0x208 (uint16_t)hcdc->TxLength); 8005dd0: 68fb ldr r3, [r7, #12] 8005dd2: f8d3 3210 ldr.w r3, [r3, #528] ; 0x210 USBD_LL_Transmit(pdev, CDC_IN_EP, hcdc->TxBuffer, 8005dd6: b29b uxth r3, r3 8005dd8: 2181 movs r1, #129 ; 0x81 8005dda: 6878 ldr r0, [r7, #4] 8005ddc: f001 fcdd bl 800779a <USBD_LL_Transmit> return USBD_OK; 8005de0: 2300 movs r3, #0 8005de2: e002 b.n 8005dea <USBD_CDC_TransmitPacket+0x56> } else { return USBD_BUSY; 8005de4: 2301 movs r3, #1 8005de6: e000 b.n 8005dea <USBD_CDC_TransmitPacket+0x56> } } else { return USBD_FAIL; 8005de8: 2302 movs r3, #2 } } 8005dea: 4618 mov r0, r3 8005dec: 3710 adds r7, #16 8005dee: 46bd mov sp, r7 8005df0: bd80 pop {r7, pc} 08005df2 <USBD_CDC_ReceivePacket>: * prepare OUT Endpoint for reception * @param pdev: device instance * @retval status */ uint8_t USBD_CDC_ReceivePacket(USBD_HandleTypeDef *pdev) { 8005df2: b580 push {r7, lr} 8005df4: b084 sub sp, #16 8005df6: af00 add r7, sp, #0 8005df8: 6078 str r0, [r7, #4] USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData; 8005dfa: 687b ldr r3, [r7, #4] 8005dfc: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8005e00: 60fb str r3, [r7, #12] /* Suspend or Resume USB Out process */ if (pdev->pClassData != NULL) 8005e02: 687b ldr r3, [r7, #4] 8005e04: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8005e08: 2b00 cmp r3, #0 8005e0a: d017 beq.n 8005e3c <USBD_CDC_ReceivePacket+0x4a> { if (pdev->dev_speed == USBD_SPEED_HIGH) 8005e0c: 687b ldr r3, [r7, #4] 8005e0e: 7c1b ldrb r3, [r3, #16] 8005e10: 2b00 cmp r3, #0 8005e12: d109 bne.n 8005e28 <USBD_CDC_ReceivePacket+0x36> { /* Prepare Out endpoint to receive next packet */ USBD_LL_PrepareReceive(pdev, 8005e14: 68fb ldr r3, [r7, #12] 8005e16: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204 8005e1a: f44f 7300 mov.w r3, #512 ; 0x200 8005e1e: 2101 movs r1, #1 8005e20: 6878 ldr r0, [r7, #4] 8005e22: f001 fcdd bl 80077e0 <USBD_LL_PrepareReceive> 8005e26: e007 b.n 8005e38 <USBD_CDC_ReceivePacket+0x46> CDC_DATA_HS_OUT_PACKET_SIZE); } else { /* Prepare Out endpoint to receive next packet */ USBD_LL_PrepareReceive(pdev, 8005e28: 68fb ldr r3, [r7, #12] 8005e2a: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204 8005e2e: 2340 movs r3, #64 ; 0x40 8005e30: 2101 movs r1, #1 8005e32: 6878 ldr r0, [r7, #4] 8005e34: f001 fcd4 bl 80077e0 <USBD_LL_PrepareReceive> CDC_OUT_EP, hcdc->RxBuffer, CDC_DATA_FS_OUT_PACKET_SIZE); } return USBD_OK; 8005e38: 2300 movs r3, #0 8005e3a: e000 b.n 8005e3e <USBD_CDC_ReceivePacket+0x4c> } else { return USBD_FAIL; 8005e3c: 2302 movs r3, #2 } } 8005e3e: 4618 mov r0, r3 8005e40: 3710 adds r7, #16 8005e42: 46bd mov sp, r7 8005e44: bd80 pop {r7, pc} 08005e46 <USBD_Init>: * @param id: Low level core index * @retval None */ USBD_StatusTypeDef USBD_Init(USBD_HandleTypeDef *pdev, USBD_DescriptorsTypeDef *pdesc, uint8_t id) { 8005e46: b580 push {r7, lr} 8005e48: b084 sub sp, #16 8005e4a: af00 add r7, sp, #0 8005e4c: 60f8 str r0, [r7, #12] 8005e4e: 60b9 str r1, [r7, #8] 8005e50: 4613 mov r3, r2 8005e52: 71fb strb r3, [r7, #7] /* Check whether the USB Host handle is valid */ if (pdev == NULL) 8005e54: 68fb ldr r3, [r7, #12] 8005e56: 2b00 cmp r3, #0 8005e58: d101 bne.n 8005e5e <USBD_Init+0x18> { #if (USBD_DEBUG_LEVEL > 1U) USBD_ErrLog("Invalid Device handle"); #endif return USBD_FAIL; 8005e5a: 2302 movs r3, #2 8005e5c: e01a b.n 8005e94 <USBD_Init+0x4e> } /* Unlink previous class*/ if (pdev->pClass != NULL) 8005e5e: 68fb ldr r3, [r7, #12] 8005e60: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8005e64: 2b00 cmp r3, #0 8005e66: d003 beq.n 8005e70 <USBD_Init+0x2a> { pdev->pClass = NULL; 8005e68: 68fb ldr r3, [r7, #12] 8005e6a: 2200 movs r2, #0 8005e6c: f8c3 22b4 str.w r2, [r3, #692] ; 0x2b4 } /* Assign USBD Descriptors */ if (pdesc != NULL) 8005e70: 68bb ldr r3, [r7, #8] 8005e72: 2b00 cmp r3, #0 8005e74: d003 beq.n 8005e7e <USBD_Init+0x38> { pdev->pDesc = pdesc; 8005e76: 68fb ldr r3, [r7, #12] 8005e78: 68ba ldr r2, [r7, #8] 8005e7a: f8c3 22b0 str.w r2, [r3, #688] ; 0x2b0 } /* Set Device initial State */ pdev->dev_state = USBD_STATE_DEFAULT; 8005e7e: 68fb ldr r3, [r7, #12] 8005e80: 2201 movs r2, #1 8005e82: f883 229c strb.w r2, [r3, #668] ; 0x29c pdev->id = id; 8005e86: 68fb ldr r3, [r7, #12] 8005e88: 79fa ldrb r2, [r7, #7] 8005e8a: 701a strb r2, [r3, #0] /* Initialize low level driver */ USBD_LL_Init(pdev); 8005e8c: 68f8 ldr r0, [r7, #12] 8005e8e: f001 fb41 bl 8007514 <USBD_LL_Init> return USBD_OK; 8005e92: 2300 movs r3, #0 } 8005e94: 4618 mov r0, r3 8005e96: 3710 adds r7, #16 8005e98: 46bd mov sp, r7 8005e9a: bd80 pop {r7, pc} 08005e9c <USBD_RegisterClass>: * @param pDevice : Device Handle * @param pclass: Class handle * @retval USBD Status */ USBD_StatusTypeDef USBD_RegisterClass(USBD_HandleTypeDef *pdev, USBD_ClassTypeDef *pclass) { 8005e9c: b480 push {r7} 8005e9e: b085 sub sp, #20 8005ea0: af00 add r7, sp, #0 8005ea2: 6078 str r0, [r7, #4] 8005ea4: 6039 str r1, [r7, #0] USBD_StatusTypeDef status = USBD_OK; 8005ea6: 2300 movs r3, #0 8005ea8: 73fb strb r3, [r7, #15] if (pclass != NULL) 8005eaa: 683b ldr r3, [r7, #0] 8005eac: 2b00 cmp r3, #0 8005eae: d006 beq.n 8005ebe <USBD_RegisterClass+0x22> { /* link the class to the USB Device handle */ pdev->pClass = pclass; 8005eb0: 687b ldr r3, [r7, #4] 8005eb2: 683a ldr r2, [r7, #0] 8005eb4: f8c3 22b4 str.w r2, [r3, #692] ; 0x2b4 status = USBD_OK; 8005eb8: 2300 movs r3, #0 8005eba: 73fb strb r3, [r7, #15] 8005ebc: e001 b.n 8005ec2 <USBD_RegisterClass+0x26> else { #if (USBD_DEBUG_LEVEL > 1U) USBD_ErrLog("Invalid Class handle"); #endif status = USBD_FAIL; 8005ebe: 2302 movs r3, #2 8005ec0: 73fb strb r3, [r7, #15] } return status; 8005ec2: 7bfb ldrb r3, [r7, #15] } 8005ec4: 4618 mov r0, r3 8005ec6: 3714 adds r7, #20 8005ec8: 46bd mov sp, r7 8005eca: bc80 pop {r7} 8005ecc: 4770 bx lr 08005ece <USBD_Start>: * Start the USB Device Core. * @param pdev: Device Handle * @retval USBD Status */ USBD_StatusTypeDef USBD_Start(USBD_HandleTypeDef *pdev) { 8005ece: b580 push {r7, lr} 8005ed0: b082 sub sp, #8 8005ed2: af00 add r7, sp, #0 8005ed4: 6078 str r0, [r7, #4] /* Start the low level driver */ USBD_LL_Start(pdev); 8005ed6: 6878 ldr r0, [r7, #4] 8005ed8: f001 fb76 bl 80075c8 <USBD_LL_Start> return USBD_OK; 8005edc: 2300 movs r3, #0 } 8005ede: 4618 mov r0, r3 8005ee0: 3708 adds r7, #8 8005ee2: 46bd mov sp, r7 8005ee4: bd80 pop {r7, pc} 08005ee6 <USBD_RunTestMode>: * Launch test mode process * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_RunTestMode(USBD_HandleTypeDef *pdev) { 8005ee6: b480 push {r7} 8005ee8: b083 sub sp, #12 8005eea: af00 add r7, sp, #0 8005eec: 6078 str r0, [r7, #4] /* Prevent unused argument compilation warning */ UNUSED(pdev); return USBD_OK; 8005eee: 2300 movs r3, #0 } 8005ef0: 4618 mov r0, r3 8005ef2: 370c adds r7, #12 8005ef4: 46bd mov sp, r7 8005ef6: bc80 pop {r7} 8005ef8: 4770 bx lr 08005efa <USBD_SetClassConfig>: * @param cfgidx: configuration index * @retval status */ USBD_StatusTypeDef USBD_SetClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx) { 8005efa: b580 push {r7, lr} 8005efc: b084 sub sp, #16 8005efe: af00 add r7, sp, #0 8005f00: 6078 str r0, [r7, #4] 8005f02: 460b mov r3, r1 8005f04: 70fb strb r3, [r7, #3] USBD_StatusTypeDef ret = USBD_FAIL; 8005f06: 2302 movs r3, #2 8005f08: 73fb strb r3, [r7, #15] if (pdev->pClass != NULL) 8005f0a: 687b ldr r3, [r7, #4] 8005f0c: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8005f10: 2b00 cmp r3, #0 8005f12: d00c beq.n 8005f2e <USBD_SetClassConfig+0x34> { /* Set configuration and Start the Class*/ if (pdev->pClass->Init(pdev, cfgidx) == 0U) 8005f14: 687b ldr r3, [r7, #4] 8005f16: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8005f1a: 681b ldr r3, [r3, #0] 8005f1c: 78fa ldrb r2, [r7, #3] 8005f1e: 4611 mov r1, r2 8005f20: 6878 ldr r0, [r7, #4] 8005f22: 4798 blx r3 8005f24: 4603 mov r3, r0 8005f26: 2b00 cmp r3, #0 8005f28: d101 bne.n 8005f2e <USBD_SetClassConfig+0x34> { ret = USBD_OK; 8005f2a: 2300 movs r3, #0 8005f2c: 73fb strb r3, [r7, #15] } } return ret; 8005f2e: 7bfb ldrb r3, [r7, #15] } 8005f30: 4618 mov r0, r3 8005f32: 3710 adds r7, #16 8005f34: 46bd mov sp, r7 8005f36: bd80 pop {r7, pc} 08005f38 <USBD_ClrClassConfig>: * @param pdev: device instance * @param cfgidx: configuration index * @retval status: USBD_StatusTypeDef */ USBD_StatusTypeDef USBD_ClrClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx) { 8005f38: b580 push {r7, lr} 8005f3a: b082 sub sp, #8 8005f3c: af00 add r7, sp, #0 8005f3e: 6078 str r0, [r7, #4] 8005f40: 460b mov r3, r1 8005f42: 70fb strb r3, [r7, #3] /* Clear configuration and De-initialize the Class process*/ pdev->pClass->DeInit(pdev, cfgidx); 8005f44: 687b ldr r3, [r7, #4] 8005f46: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8005f4a: 685b ldr r3, [r3, #4] 8005f4c: 78fa ldrb r2, [r7, #3] 8005f4e: 4611 mov r1, r2 8005f50: 6878 ldr r0, [r7, #4] 8005f52: 4798 blx r3 return USBD_OK; 8005f54: 2300 movs r3, #0 } 8005f56: 4618 mov r0, r3 8005f58: 3708 adds r7, #8 8005f5a: 46bd mov sp, r7 8005f5c: bd80 pop {r7, pc} 08005f5e <USBD_LL_SetupStage>: * Handle the setup stage * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_SetupStage(USBD_HandleTypeDef *pdev, uint8_t *psetup) { 8005f5e: b580 push {r7, lr} 8005f60: b082 sub sp, #8 8005f62: af00 add r7, sp, #0 8005f64: 6078 str r0, [r7, #4] 8005f66: 6039 str r1, [r7, #0] USBD_ParseSetupRequest(&pdev->request, psetup); 8005f68: 687b ldr r3, [r7, #4] 8005f6a: f503 732a add.w r3, r3, #680 ; 0x2a8 8005f6e: 6839 ldr r1, [r7, #0] 8005f70: 4618 mov r0, r3 8005f72: f000 fed8 bl 8006d26 <USBD_ParseSetupRequest> pdev->ep0_state = USBD_EP0_SETUP; 8005f76: 687b ldr r3, [r7, #4] 8005f78: 2201 movs r2, #1 8005f7a: f8c3 2294 str.w r2, [r3, #660] ; 0x294 pdev->ep0_data_len = pdev->request.wLength; 8005f7e: 687b ldr r3, [r7, #4] 8005f80: f8b3 32ae ldrh.w r3, [r3, #686] ; 0x2ae 8005f84: 461a mov r2, r3 8005f86: 687b ldr r3, [r7, #4] 8005f88: f8c3 2298 str.w r2, [r3, #664] ; 0x298 switch (pdev->request.bmRequest & 0x1FU) 8005f8c: 687b ldr r3, [r7, #4] 8005f8e: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 8005f92: f003 031f and.w r3, r3, #31 8005f96: 2b02 cmp r3, #2 8005f98: d016 beq.n 8005fc8 <USBD_LL_SetupStage+0x6a> 8005f9a: 2b02 cmp r3, #2 8005f9c: d81c bhi.n 8005fd8 <USBD_LL_SetupStage+0x7a> 8005f9e: 2b00 cmp r3, #0 8005fa0: d002 beq.n 8005fa8 <USBD_LL_SetupStage+0x4a> 8005fa2: 2b01 cmp r3, #1 8005fa4: d008 beq.n 8005fb8 <USBD_LL_SetupStage+0x5a> 8005fa6: e017 b.n 8005fd8 <USBD_LL_SetupStage+0x7a> { case USB_REQ_RECIPIENT_DEVICE: USBD_StdDevReq(pdev, &pdev->request); 8005fa8: 687b ldr r3, [r7, #4] 8005faa: f503 732a add.w r3, r3, #680 ; 0x2a8 8005fae: 4619 mov r1, r3 8005fb0: 6878 ldr r0, [r7, #4] 8005fb2: f000 f9cb bl 800634c <USBD_StdDevReq> break; 8005fb6: e01a b.n 8005fee <USBD_LL_SetupStage+0x90> case USB_REQ_RECIPIENT_INTERFACE: USBD_StdItfReq(pdev, &pdev->request); 8005fb8: 687b ldr r3, [r7, #4] 8005fba: f503 732a add.w r3, r3, #680 ; 0x2a8 8005fbe: 4619 mov r1, r3 8005fc0: 6878 ldr r0, [r7, #4] 8005fc2: f000 fa2d bl 8006420 <USBD_StdItfReq> break; 8005fc6: e012 b.n 8005fee <USBD_LL_SetupStage+0x90> case USB_REQ_RECIPIENT_ENDPOINT: USBD_StdEPReq(pdev, &pdev->request); 8005fc8: 687b ldr r3, [r7, #4] 8005fca: f503 732a add.w r3, r3, #680 ; 0x2a8 8005fce: 4619 mov r1, r3 8005fd0: 6878 ldr r0, [r7, #4] 8005fd2: f000 fa6d bl 80064b0 <USBD_StdEPReq> break; 8005fd6: e00a b.n 8005fee <USBD_LL_SetupStage+0x90> default: USBD_LL_StallEP(pdev, (pdev->request.bmRequest & 0x80U)); 8005fd8: 687b ldr r3, [r7, #4] 8005fda: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8 8005fde: f023 037f bic.w r3, r3, #127 ; 0x7f 8005fe2: b2db uxtb r3, r3 8005fe4: 4619 mov r1, r3 8005fe6: 6878 ldr r0, [r7, #4] 8005fe8: f001 fb4e bl 8007688 <USBD_LL_StallEP> break; 8005fec: bf00 nop } return USBD_OK; 8005fee: 2300 movs r3, #0 } 8005ff0: 4618 mov r0, r3 8005ff2: 3708 adds r7, #8 8005ff4: 46bd mov sp, r7 8005ff6: bd80 pop {r7, pc} 08005ff8 <USBD_LL_DataOutStage>: * @param epnum: endpoint index * @retval status */ USBD_StatusTypeDef USBD_LL_DataOutStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata) { 8005ff8: b580 push {r7, lr} 8005ffa: b086 sub sp, #24 8005ffc: af00 add r7, sp, #0 8005ffe: 60f8 str r0, [r7, #12] 8006000: 460b mov r3, r1 8006002: 607a str r2, [r7, #4] 8006004: 72fb strb r3, [r7, #11] USBD_EndpointTypeDef *pep; if (epnum == 0U) 8006006: 7afb ldrb r3, [r7, #11] 8006008: 2b00 cmp r3, #0 800600a: d14b bne.n 80060a4 <USBD_LL_DataOutStage+0xac> { pep = &pdev->ep_out[0]; 800600c: 68fb ldr r3, [r7, #12] 800600e: f503 73aa add.w r3, r3, #340 ; 0x154 8006012: 617b str r3, [r7, #20] if (pdev->ep0_state == USBD_EP0_DATA_OUT) 8006014: 68fb ldr r3, [r7, #12] 8006016: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294 800601a: 2b03 cmp r3, #3 800601c: d134 bne.n 8006088 <USBD_LL_DataOutStage+0x90> { if (pep->rem_length > pep->maxpacket) 800601e: 697b ldr r3, [r7, #20] 8006020: 68da ldr r2, [r3, #12] 8006022: 697b ldr r3, [r7, #20] 8006024: 691b ldr r3, [r3, #16] 8006026: 429a cmp r2, r3 8006028: d919 bls.n 800605e <USBD_LL_DataOutStage+0x66> { pep->rem_length -= pep->maxpacket; 800602a: 697b ldr r3, [r7, #20] 800602c: 68da ldr r2, [r3, #12] 800602e: 697b ldr r3, [r7, #20] 8006030: 691b ldr r3, [r3, #16] 8006032: 1ad2 subs r2, r2, r3 8006034: 697b ldr r3, [r7, #20] 8006036: 60da str r2, [r3, #12] USBD_CtlContinueRx(pdev, pdata, (uint16_t)MIN(pep->rem_length, pep->maxpacket)); 8006038: 697b ldr r3, [r7, #20] 800603a: 68da ldr r2, [r3, #12] 800603c: 697b ldr r3, [r7, #20] 800603e: 691b ldr r3, [r3, #16] USBD_CtlContinueRx(pdev, pdata, 8006040: 429a cmp r2, r3 8006042: d203 bcs.n 800604c <USBD_LL_DataOutStage+0x54> (uint16_t)MIN(pep->rem_length, pep->maxpacket)); 8006044: 697b ldr r3, [r7, #20] 8006046: 68db ldr r3, [r3, #12] USBD_CtlContinueRx(pdev, pdata, 8006048: b29b uxth r3, r3 800604a: e002 b.n 8006052 <USBD_LL_DataOutStage+0x5a> (uint16_t)MIN(pep->rem_length, pep->maxpacket)); 800604c: 697b ldr r3, [r7, #20] 800604e: 691b ldr r3, [r3, #16] USBD_CtlContinueRx(pdev, pdata, 8006050: b29b uxth r3, r3 8006052: 461a mov r2, r3 8006054: 6879 ldr r1, [r7, #4] 8006056: 68f8 ldr r0, [r7, #12] 8006058: f000 ff57 bl 8006f0a <USBD_CtlContinueRx> 800605c: e038 b.n 80060d0 <USBD_LL_DataOutStage+0xd8> } else { if ((pdev->pClass->EP0_RxReady != NULL) && 800605e: 68fb ldr r3, [r7, #12] 8006060: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8006064: 691b ldr r3, [r3, #16] 8006066: 2b00 cmp r3, #0 8006068: d00a beq.n 8006080 <USBD_LL_DataOutStage+0x88> (pdev->dev_state == USBD_STATE_CONFIGURED)) 800606a: 68fb ldr r3, [r7, #12] 800606c: f893 329c ldrb.w r3, [r3, #668] ; 0x29c if ((pdev->pClass->EP0_RxReady != NULL) && 8006070: 2b03 cmp r3, #3 8006072: d105 bne.n 8006080 <USBD_LL_DataOutStage+0x88> { pdev->pClass->EP0_RxReady(pdev); 8006074: 68fb ldr r3, [r7, #12] 8006076: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 800607a: 691b ldr r3, [r3, #16] 800607c: 68f8 ldr r0, [r7, #12] 800607e: 4798 blx r3 } USBD_CtlSendStatus(pdev); 8006080: 68f8 ldr r0, [r7, #12] 8006082: f000 ff54 bl 8006f2e <USBD_CtlSendStatus> 8006086: e023 b.n 80060d0 <USBD_LL_DataOutStage+0xd8> } } else { if (pdev->ep0_state == USBD_EP0_STATUS_OUT) 8006088: 68fb ldr r3, [r7, #12] 800608a: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294 800608e: 2b05 cmp r3, #5 8006090: d11e bne.n 80060d0 <USBD_LL_DataOutStage+0xd8> { /* * STATUS PHASE completed, update ep0_state to idle */ pdev->ep0_state = USBD_EP0_IDLE; 8006092: 68fb ldr r3, [r7, #12] 8006094: 2200 movs r2, #0 8006096: f8c3 2294 str.w r2, [r3, #660] ; 0x294 USBD_LL_StallEP(pdev, 0U); 800609a: 2100 movs r1, #0 800609c: 68f8 ldr r0, [r7, #12] 800609e: f001 faf3 bl 8007688 <USBD_LL_StallEP> 80060a2: e015 b.n 80060d0 <USBD_LL_DataOutStage+0xd8> } } } else if ((pdev->pClass->DataOut != NULL) && 80060a4: 68fb ldr r3, [r7, #12] 80060a6: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 80060aa: 699b ldr r3, [r3, #24] 80060ac: 2b00 cmp r3, #0 80060ae: d00d beq.n 80060cc <USBD_LL_DataOutStage+0xd4> (pdev->dev_state == USBD_STATE_CONFIGURED)) 80060b0: 68fb ldr r3, [r7, #12] 80060b2: f893 329c ldrb.w r3, [r3, #668] ; 0x29c else if ((pdev->pClass->DataOut != NULL) && 80060b6: 2b03 cmp r3, #3 80060b8: d108 bne.n 80060cc <USBD_LL_DataOutStage+0xd4> { pdev->pClass->DataOut(pdev, epnum); 80060ba: 68fb ldr r3, [r7, #12] 80060bc: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 80060c0: 699b ldr r3, [r3, #24] 80060c2: 7afa ldrb r2, [r7, #11] 80060c4: 4611 mov r1, r2 80060c6: 68f8 ldr r0, [r7, #12] 80060c8: 4798 blx r3 80060ca: e001 b.n 80060d0 <USBD_LL_DataOutStage+0xd8> } else { /* should never be in this condition */ return USBD_FAIL; 80060cc: 2302 movs r3, #2 80060ce: e000 b.n 80060d2 <USBD_LL_DataOutStage+0xda> } return USBD_OK; 80060d0: 2300 movs r3, #0 } 80060d2: 4618 mov r0, r3 80060d4: 3718 adds r7, #24 80060d6: 46bd mov sp, r7 80060d8: bd80 pop {r7, pc} 080060da <USBD_LL_DataInStage>: * @param epnum: endpoint index * @retval status */ USBD_StatusTypeDef USBD_LL_DataInStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata) { 80060da: b580 push {r7, lr} 80060dc: b086 sub sp, #24 80060de: af00 add r7, sp, #0 80060e0: 60f8 str r0, [r7, #12] 80060e2: 460b mov r3, r1 80060e4: 607a str r2, [r7, #4] 80060e6: 72fb strb r3, [r7, #11] USBD_EndpointTypeDef *pep; if (epnum == 0U) 80060e8: 7afb ldrb r3, [r7, #11] 80060ea: 2b00 cmp r3, #0 80060ec: d17f bne.n 80061ee <USBD_LL_DataInStage+0x114> { pep = &pdev->ep_in[0]; 80060ee: 68fb ldr r3, [r7, #12] 80060f0: 3314 adds r3, #20 80060f2: 617b str r3, [r7, #20] if (pdev->ep0_state == USBD_EP0_DATA_IN) 80060f4: 68fb ldr r3, [r7, #12] 80060f6: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294 80060fa: 2b02 cmp r3, #2 80060fc: d15c bne.n 80061b8 <USBD_LL_DataInStage+0xde> { if (pep->rem_length > pep->maxpacket) 80060fe: 697b ldr r3, [r7, #20] 8006100: 68da ldr r2, [r3, #12] 8006102: 697b ldr r3, [r7, #20] 8006104: 691b ldr r3, [r3, #16] 8006106: 429a cmp r2, r3 8006108: d915 bls.n 8006136 <USBD_LL_DataInStage+0x5c> { pep->rem_length -= pep->maxpacket; 800610a: 697b ldr r3, [r7, #20] 800610c: 68da ldr r2, [r3, #12] 800610e: 697b ldr r3, [r7, #20] 8006110: 691b ldr r3, [r3, #16] 8006112: 1ad2 subs r2, r2, r3 8006114: 697b ldr r3, [r7, #20] 8006116: 60da str r2, [r3, #12] USBD_CtlContinueSendData(pdev, pdata, (uint16_t)pep->rem_length); 8006118: 697b ldr r3, [r7, #20] 800611a: 68db ldr r3, [r3, #12] 800611c: b29b uxth r3, r3 800611e: 461a mov r2, r3 8006120: 6879 ldr r1, [r7, #4] 8006122: 68f8 ldr r0, [r7, #12] 8006124: f000 fec1 bl 8006eaa <USBD_CtlContinueSendData> /* Prepare endpoint for premature end of transfer */ USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U); 8006128: 2300 movs r3, #0 800612a: 2200 movs r2, #0 800612c: 2100 movs r1, #0 800612e: 68f8 ldr r0, [r7, #12] 8006130: f001 fb56 bl 80077e0 <USBD_LL_PrepareReceive> 8006134: e04e b.n 80061d4 <USBD_LL_DataInStage+0xfa> } else { /* last packet is MPS multiple, so send ZLP packet */ if ((pep->total_length % pep->maxpacket == 0U) && 8006136: 697b ldr r3, [r7, #20] 8006138: 689b ldr r3, [r3, #8] 800613a: 697a ldr r2, [r7, #20] 800613c: 6912 ldr r2, [r2, #16] 800613e: fbb3 f1f2 udiv r1, r3, r2 8006142: fb01 f202 mul.w r2, r1, r2 8006146: 1a9b subs r3, r3, r2 8006148: 2b00 cmp r3, #0 800614a: d11c bne.n 8006186 <USBD_LL_DataInStage+0xac> (pep->total_length >= pep->maxpacket) && 800614c: 697b ldr r3, [r7, #20] 800614e: 689a ldr r2, [r3, #8] 8006150: 697b ldr r3, [r7, #20] 8006152: 691b ldr r3, [r3, #16] if ((pep->total_length % pep->maxpacket == 0U) && 8006154: 429a cmp r2, r3 8006156: d316 bcc.n 8006186 <USBD_LL_DataInStage+0xac> (pep->total_length < pdev->ep0_data_len)) 8006158: 697b ldr r3, [r7, #20] 800615a: 689a ldr r2, [r3, #8] 800615c: 68fb ldr r3, [r7, #12] 800615e: f8d3 3298 ldr.w r3, [r3, #664] ; 0x298 (pep->total_length >= pep->maxpacket) && 8006162: 429a cmp r2, r3 8006164: d20f bcs.n 8006186 <USBD_LL_DataInStage+0xac> { USBD_CtlContinueSendData(pdev, NULL, 0U); 8006166: 2200 movs r2, #0 8006168: 2100 movs r1, #0 800616a: 68f8 ldr r0, [r7, #12] 800616c: f000 fe9d bl 8006eaa <USBD_CtlContinueSendData> pdev->ep0_data_len = 0U; 8006170: 68fb ldr r3, [r7, #12] 8006172: 2200 movs r2, #0 8006174: f8c3 2298 str.w r2, [r3, #664] ; 0x298 /* Prepare endpoint for premature end of transfer */ USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U); 8006178: 2300 movs r3, #0 800617a: 2200 movs r2, #0 800617c: 2100 movs r1, #0 800617e: 68f8 ldr r0, [r7, #12] 8006180: f001 fb2e bl 80077e0 <USBD_LL_PrepareReceive> 8006184: e026 b.n 80061d4 <USBD_LL_DataInStage+0xfa> } else { if ((pdev->pClass->EP0_TxSent != NULL) && 8006186: 68fb ldr r3, [r7, #12] 8006188: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 800618c: 68db ldr r3, [r3, #12] 800618e: 2b00 cmp r3, #0 8006190: d00a beq.n 80061a8 <USBD_LL_DataInStage+0xce> (pdev->dev_state == USBD_STATE_CONFIGURED)) 8006192: 68fb ldr r3, [r7, #12] 8006194: f893 329c ldrb.w r3, [r3, #668] ; 0x29c if ((pdev->pClass->EP0_TxSent != NULL) && 8006198: 2b03 cmp r3, #3 800619a: d105 bne.n 80061a8 <USBD_LL_DataInStage+0xce> { pdev->pClass->EP0_TxSent(pdev); 800619c: 68fb ldr r3, [r7, #12] 800619e: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 80061a2: 68db ldr r3, [r3, #12] 80061a4: 68f8 ldr r0, [r7, #12] 80061a6: 4798 blx r3 } USBD_LL_StallEP(pdev, 0x80U); 80061a8: 2180 movs r1, #128 ; 0x80 80061aa: 68f8 ldr r0, [r7, #12] 80061ac: f001 fa6c bl 8007688 <USBD_LL_StallEP> USBD_CtlReceiveStatus(pdev); 80061b0: 68f8 ldr r0, [r7, #12] 80061b2: f000 fecf bl 8006f54 <USBD_CtlReceiveStatus> 80061b6: e00d b.n 80061d4 <USBD_LL_DataInStage+0xfa> } } } else { if ((pdev->ep0_state == USBD_EP0_STATUS_IN) || 80061b8: 68fb ldr r3, [r7, #12] 80061ba: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294 80061be: 2b04 cmp r3, #4 80061c0: d004 beq.n 80061cc <USBD_LL_DataInStage+0xf2> (pdev->ep0_state == USBD_EP0_IDLE)) 80061c2: 68fb ldr r3, [r7, #12] 80061c4: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294 if ((pdev->ep0_state == USBD_EP0_STATUS_IN) || 80061c8: 2b00 cmp r3, #0 80061ca: d103 bne.n 80061d4 <USBD_LL_DataInStage+0xfa> { USBD_LL_StallEP(pdev, 0x80U); 80061cc: 2180 movs r1, #128 ; 0x80 80061ce: 68f8 ldr r0, [r7, #12] 80061d0: f001 fa5a bl 8007688 <USBD_LL_StallEP> } } if (pdev->dev_test_mode == 1U) 80061d4: 68fb ldr r3, [r7, #12] 80061d6: f893 32a0 ldrb.w r3, [r3, #672] ; 0x2a0 80061da: 2b01 cmp r3, #1 80061dc: d11d bne.n 800621a <USBD_LL_DataInStage+0x140> { USBD_RunTestMode(pdev); 80061de: 68f8 ldr r0, [r7, #12] 80061e0: f7ff fe81 bl 8005ee6 <USBD_RunTestMode> pdev->dev_test_mode = 0U; 80061e4: 68fb ldr r3, [r7, #12] 80061e6: 2200 movs r2, #0 80061e8: f883 22a0 strb.w r2, [r3, #672] ; 0x2a0 80061ec: e015 b.n 800621a <USBD_LL_DataInStage+0x140> } } else if ((pdev->pClass->DataIn != NULL) && 80061ee: 68fb ldr r3, [r7, #12] 80061f0: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 80061f4: 695b ldr r3, [r3, #20] 80061f6: 2b00 cmp r3, #0 80061f8: d00d beq.n 8006216 <USBD_LL_DataInStage+0x13c> (pdev->dev_state == USBD_STATE_CONFIGURED)) 80061fa: 68fb ldr r3, [r7, #12] 80061fc: f893 329c ldrb.w r3, [r3, #668] ; 0x29c else if ((pdev->pClass->DataIn != NULL) && 8006200: 2b03 cmp r3, #3 8006202: d108 bne.n 8006216 <USBD_LL_DataInStage+0x13c> { pdev->pClass->DataIn(pdev, epnum); 8006204: 68fb ldr r3, [r7, #12] 8006206: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 800620a: 695b ldr r3, [r3, #20] 800620c: 7afa ldrb r2, [r7, #11] 800620e: 4611 mov r1, r2 8006210: 68f8 ldr r0, [r7, #12] 8006212: 4798 blx r3 8006214: e001 b.n 800621a <USBD_LL_DataInStage+0x140> } else { /* should never be in this condition */ return USBD_FAIL; 8006216: 2302 movs r3, #2 8006218: e000 b.n 800621c <USBD_LL_DataInStage+0x142> } return USBD_OK; 800621a: 2300 movs r3, #0 } 800621c: 4618 mov r0, r3 800621e: 3718 adds r7, #24 8006220: 46bd mov sp, r7 8006222: bd80 pop {r7, pc} 08006224 <USBD_LL_Reset>: * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_Reset(USBD_HandleTypeDef *pdev) { 8006224: b580 push {r7, lr} 8006226: b082 sub sp, #8 8006228: af00 add r7, sp, #0 800622a: 6078 str r0, [r7, #4] /* Open EP0 OUT */ USBD_LL_OpenEP(pdev, 0x00U, USBD_EP_TYPE_CTRL, USB_MAX_EP0_SIZE); 800622c: 2340 movs r3, #64 ; 0x40 800622e: 2200 movs r2, #0 8006230: 2100 movs r1, #0 8006232: 6878 ldr r0, [r7, #4] 8006234: f001 f9e3 bl 80075fe <USBD_LL_OpenEP> pdev->ep_out[0x00U & 0xFU].is_used = 1U; 8006238: 687b ldr r3, [r7, #4] 800623a: 2201 movs r2, #1 800623c: f8c3 2158 str.w r2, [r3, #344] ; 0x158 pdev->ep_out[0].maxpacket = USB_MAX_EP0_SIZE; 8006240: 687b ldr r3, [r7, #4] 8006242: 2240 movs r2, #64 ; 0x40 8006244: f8c3 2164 str.w r2, [r3, #356] ; 0x164 /* Open EP0 IN */ USBD_LL_OpenEP(pdev, 0x80U, USBD_EP_TYPE_CTRL, USB_MAX_EP0_SIZE); 8006248: 2340 movs r3, #64 ; 0x40 800624a: 2200 movs r2, #0 800624c: 2180 movs r1, #128 ; 0x80 800624e: 6878 ldr r0, [r7, #4] 8006250: f001 f9d5 bl 80075fe <USBD_LL_OpenEP> pdev->ep_in[0x80U & 0xFU].is_used = 1U; 8006254: 687b ldr r3, [r7, #4] 8006256: 2201 movs r2, #1 8006258: 619a str r2, [r3, #24] pdev->ep_in[0].maxpacket = USB_MAX_EP0_SIZE; 800625a: 687b ldr r3, [r7, #4] 800625c: 2240 movs r2, #64 ; 0x40 800625e: 625a str r2, [r3, #36] ; 0x24 /* Upon Reset call user call back */ pdev->dev_state = USBD_STATE_DEFAULT; 8006260: 687b ldr r3, [r7, #4] 8006262: 2201 movs r2, #1 8006264: f883 229c strb.w r2, [r3, #668] ; 0x29c pdev->ep0_state = USBD_EP0_IDLE; 8006268: 687b ldr r3, [r7, #4] 800626a: 2200 movs r2, #0 800626c: f8c3 2294 str.w r2, [r3, #660] ; 0x294 pdev->dev_config = 0U; 8006270: 687b ldr r3, [r7, #4] 8006272: 2200 movs r2, #0 8006274: 605a str r2, [r3, #4] pdev->dev_remote_wakeup = 0U; 8006276: 687b ldr r3, [r7, #4] 8006278: 2200 movs r2, #0 800627a: f8c3 22a4 str.w r2, [r3, #676] ; 0x2a4 if (pdev->pClassData) 800627e: 687b ldr r3, [r7, #4] 8006280: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 8006284: 2b00 cmp r3, #0 8006286: d009 beq.n 800629c <USBD_LL_Reset+0x78> { pdev->pClass->DeInit(pdev, (uint8_t)pdev->dev_config); 8006288: 687b ldr r3, [r7, #4] 800628a: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 800628e: 685b ldr r3, [r3, #4] 8006290: 687a ldr r2, [r7, #4] 8006292: 6852 ldr r2, [r2, #4] 8006294: b2d2 uxtb r2, r2 8006296: 4611 mov r1, r2 8006298: 6878 ldr r0, [r7, #4] 800629a: 4798 blx r3 } return USBD_OK; 800629c: 2300 movs r3, #0 } 800629e: 4618 mov r0, r3 80062a0: 3708 adds r7, #8 80062a2: 46bd mov sp, r7 80062a4: bd80 pop {r7, pc} 080062a6 <USBD_LL_SetSpeed>: * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_SetSpeed(USBD_HandleTypeDef *pdev, USBD_SpeedTypeDef speed) { 80062a6: b480 push {r7} 80062a8: b083 sub sp, #12 80062aa: af00 add r7, sp, #0 80062ac: 6078 str r0, [r7, #4] 80062ae: 460b mov r3, r1 80062b0: 70fb strb r3, [r7, #3] pdev->dev_speed = speed; 80062b2: 687b ldr r3, [r7, #4] 80062b4: 78fa ldrb r2, [r7, #3] 80062b6: 741a strb r2, [r3, #16] return USBD_OK; 80062b8: 2300 movs r3, #0 } 80062ba: 4618 mov r0, r3 80062bc: 370c adds r7, #12 80062be: 46bd mov sp, r7 80062c0: bc80 pop {r7} 80062c2: 4770 bx lr 080062c4 <USBD_LL_Suspend>: * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_Suspend(USBD_HandleTypeDef *pdev) { 80062c4: b480 push {r7} 80062c6: b083 sub sp, #12 80062c8: af00 add r7, sp, #0 80062ca: 6078 str r0, [r7, #4] pdev->dev_old_state = pdev->dev_state; 80062cc: 687b ldr r3, [r7, #4] 80062ce: f893 229c ldrb.w r2, [r3, #668] ; 0x29c 80062d2: 687b ldr r3, [r7, #4] 80062d4: f883 229d strb.w r2, [r3, #669] ; 0x29d pdev->dev_state = USBD_STATE_SUSPENDED; 80062d8: 687b ldr r3, [r7, #4] 80062da: 2204 movs r2, #4 80062dc: f883 229c strb.w r2, [r3, #668] ; 0x29c return USBD_OK; 80062e0: 2300 movs r3, #0 } 80062e2: 4618 mov r0, r3 80062e4: 370c adds r7, #12 80062e6: 46bd mov sp, r7 80062e8: bc80 pop {r7} 80062ea: 4770 bx lr 080062ec <USBD_LL_Resume>: * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_Resume(USBD_HandleTypeDef *pdev) { 80062ec: b480 push {r7} 80062ee: b083 sub sp, #12 80062f0: af00 add r7, sp, #0 80062f2: 6078 str r0, [r7, #4] if (pdev->dev_state == USBD_STATE_SUSPENDED) 80062f4: 687b ldr r3, [r7, #4] 80062f6: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 80062fa: 2b04 cmp r3, #4 80062fc: d105 bne.n 800630a <USBD_LL_Resume+0x1e> { pdev->dev_state = pdev->dev_old_state; 80062fe: 687b ldr r3, [r7, #4] 8006300: f893 229d ldrb.w r2, [r3, #669] ; 0x29d 8006304: 687b ldr r3, [r7, #4] 8006306: f883 229c strb.w r2, [r3, #668] ; 0x29c } return USBD_OK; 800630a: 2300 movs r3, #0 } 800630c: 4618 mov r0, r3 800630e: 370c adds r7, #12 8006310: 46bd mov sp, r7 8006312: bc80 pop {r7} 8006314: 4770 bx lr 08006316 <USBD_LL_SOF>: * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_LL_SOF(USBD_HandleTypeDef *pdev) { 8006316: b580 push {r7, lr} 8006318: b082 sub sp, #8 800631a: af00 add r7, sp, #0 800631c: 6078 str r0, [r7, #4] if (pdev->dev_state == USBD_STATE_CONFIGURED) 800631e: 687b ldr r3, [r7, #4] 8006320: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8006324: 2b03 cmp r3, #3 8006326: d10b bne.n 8006340 <USBD_LL_SOF+0x2a> { if (pdev->pClass->SOF != NULL) 8006328: 687b ldr r3, [r7, #4] 800632a: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 800632e: 69db ldr r3, [r3, #28] 8006330: 2b00 cmp r3, #0 8006332: d005 beq.n 8006340 <USBD_LL_SOF+0x2a> { pdev->pClass->SOF(pdev); 8006334: 687b ldr r3, [r7, #4] 8006336: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 800633a: 69db ldr r3, [r3, #28] 800633c: 6878 ldr r0, [r7, #4] 800633e: 4798 blx r3 } } return USBD_OK; 8006340: 2300 movs r3, #0 } 8006342: 4618 mov r0, r3 8006344: 3708 adds r7, #8 8006346: 46bd mov sp, r7 8006348: bd80 pop {r7, pc} ... 0800634c <USBD_StdDevReq>: * @param req: usb request * @retval status */ USBD_StatusTypeDef USBD_StdDevReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 800634c: b580 push {r7, lr} 800634e: b084 sub sp, #16 8006350: af00 add r7, sp, #0 8006352: 6078 str r0, [r7, #4] 8006354: 6039 str r1, [r7, #0] USBD_StatusTypeDef ret = USBD_OK; 8006356: 2300 movs r3, #0 8006358: 73fb strb r3, [r7, #15] switch (req->bmRequest & USB_REQ_TYPE_MASK) 800635a: 683b ldr r3, [r7, #0] 800635c: 781b ldrb r3, [r3, #0] 800635e: f003 0360 and.w r3, r3, #96 ; 0x60 8006362: 2b40 cmp r3, #64 ; 0x40 8006364: d005 beq.n 8006372 <USBD_StdDevReq+0x26> 8006366: 2b40 cmp r3, #64 ; 0x40 8006368: d84f bhi.n 800640a <USBD_StdDevReq+0xbe> 800636a: 2b00 cmp r3, #0 800636c: d009 beq.n 8006382 <USBD_StdDevReq+0x36> 800636e: 2b20 cmp r3, #32 8006370: d14b bne.n 800640a <USBD_StdDevReq+0xbe> { case USB_REQ_TYPE_CLASS: case USB_REQ_TYPE_VENDOR: pdev->pClass->Setup(pdev, req); 8006372: 687b ldr r3, [r7, #4] 8006374: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8006378: 689b ldr r3, [r3, #8] 800637a: 6839 ldr r1, [r7, #0] 800637c: 6878 ldr r0, [r7, #4] 800637e: 4798 blx r3 break; 8006380: e048 b.n 8006414 <USBD_StdDevReq+0xc8> case USB_REQ_TYPE_STANDARD: switch (req->bRequest) 8006382: 683b ldr r3, [r7, #0] 8006384: 785b ldrb r3, [r3, #1] 8006386: 2b09 cmp r3, #9 8006388: d839 bhi.n 80063fe <USBD_StdDevReq+0xb2> 800638a: a201 add r2, pc, #4 ; (adr r2, 8006390 <USBD_StdDevReq+0x44>) 800638c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8006390: 080063e1 .word 0x080063e1 8006394: 080063f5 .word 0x080063f5 8006398: 080063ff .word 0x080063ff 800639c: 080063eb .word 0x080063eb 80063a0: 080063ff .word 0x080063ff 80063a4: 080063c3 .word 0x080063c3 80063a8: 080063b9 .word 0x080063b9 80063ac: 080063ff .word 0x080063ff 80063b0: 080063d7 .word 0x080063d7 80063b4: 080063cd .word 0x080063cd { case USB_REQ_GET_DESCRIPTOR: USBD_GetDescriptor(pdev, req); 80063b8: 6839 ldr r1, [r7, #0] 80063ba: 6878 ldr r0, [r7, #4] 80063bc: f000 f9dc bl 8006778 <USBD_GetDescriptor> break; 80063c0: e022 b.n 8006408 <USBD_StdDevReq+0xbc> case USB_REQ_SET_ADDRESS: USBD_SetAddress(pdev, req); 80063c2: 6839 ldr r1, [r7, #0] 80063c4: 6878 ldr r0, [r7, #4] 80063c6: f000 fb3f bl 8006a48 <USBD_SetAddress> break; 80063ca: e01d b.n 8006408 <USBD_StdDevReq+0xbc> case USB_REQ_SET_CONFIGURATION: USBD_SetConfig(pdev, req); 80063cc: 6839 ldr r1, [r7, #0] 80063ce: 6878 ldr r0, [r7, #4] 80063d0: f000 fb7e bl 8006ad0 <USBD_SetConfig> break; 80063d4: e018 b.n 8006408 <USBD_StdDevReq+0xbc> case USB_REQ_GET_CONFIGURATION: USBD_GetConfig(pdev, req); 80063d6: 6839 ldr r1, [r7, #0] 80063d8: 6878 ldr r0, [r7, #4] 80063da: f000 fc07 bl 8006bec <USBD_GetConfig> break; 80063de: e013 b.n 8006408 <USBD_StdDevReq+0xbc> case USB_REQ_GET_STATUS: USBD_GetStatus(pdev, req); 80063e0: 6839 ldr r1, [r7, #0] 80063e2: 6878 ldr r0, [r7, #4] 80063e4: f000 fc37 bl 8006c56 <USBD_GetStatus> break; 80063e8: e00e b.n 8006408 <USBD_StdDevReq+0xbc> case USB_REQ_SET_FEATURE: USBD_SetFeature(pdev, req); 80063ea: 6839 ldr r1, [r7, #0] 80063ec: 6878 ldr r0, [r7, #4] 80063ee: f000 fc65 bl 8006cbc <USBD_SetFeature> break; 80063f2: e009 b.n 8006408 <USBD_StdDevReq+0xbc> case USB_REQ_CLEAR_FEATURE: USBD_ClrFeature(pdev, req); 80063f4: 6839 ldr r1, [r7, #0] 80063f6: 6878 ldr r0, [r7, #4] 80063f8: f000 fc74 bl 8006ce4 <USBD_ClrFeature> break; 80063fc: e004 b.n 8006408 <USBD_StdDevReq+0xbc> default: USBD_CtlError(pdev, req); 80063fe: 6839 ldr r1, [r7, #0] 8006400: 6878 ldr r0, [r7, #4] 8006402: f000 fccc bl 8006d9e <USBD_CtlError> break; 8006406: bf00 nop } break; 8006408: e004 b.n 8006414 <USBD_StdDevReq+0xc8> default: USBD_CtlError(pdev, req); 800640a: 6839 ldr r1, [r7, #0] 800640c: 6878 ldr r0, [r7, #4] 800640e: f000 fcc6 bl 8006d9e <USBD_CtlError> break; 8006412: bf00 nop } return ret; 8006414: 7bfb ldrb r3, [r7, #15] } 8006416: 4618 mov r0, r3 8006418: 3710 adds r7, #16 800641a: 46bd mov sp, r7 800641c: bd80 pop {r7, pc} 800641e: bf00 nop 08006420 <USBD_StdItfReq>: * @param req: usb request * @retval status */ USBD_StatusTypeDef USBD_StdItfReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8006420: b580 push {r7, lr} 8006422: b084 sub sp, #16 8006424: af00 add r7, sp, #0 8006426: 6078 str r0, [r7, #4] 8006428: 6039 str r1, [r7, #0] USBD_StatusTypeDef ret = USBD_OK; 800642a: 2300 movs r3, #0 800642c: 73fb strb r3, [r7, #15] switch (req->bmRequest & USB_REQ_TYPE_MASK) 800642e: 683b ldr r3, [r7, #0] 8006430: 781b ldrb r3, [r3, #0] 8006432: f003 0360 and.w r3, r3, #96 ; 0x60 8006436: 2b40 cmp r3, #64 ; 0x40 8006438: d005 beq.n 8006446 <USBD_StdItfReq+0x26> 800643a: 2b40 cmp r3, #64 ; 0x40 800643c: d82e bhi.n 800649c <USBD_StdItfReq+0x7c> 800643e: 2b00 cmp r3, #0 8006440: d001 beq.n 8006446 <USBD_StdItfReq+0x26> 8006442: 2b20 cmp r3, #32 8006444: d12a bne.n 800649c <USBD_StdItfReq+0x7c> { case USB_REQ_TYPE_CLASS: case USB_REQ_TYPE_VENDOR: case USB_REQ_TYPE_STANDARD: switch (pdev->dev_state) 8006446: 687b ldr r3, [r7, #4] 8006448: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 800644c: 3b01 subs r3, #1 800644e: 2b02 cmp r3, #2 8006450: d81d bhi.n 800648e <USBD_StdItfReq+0x6e> { case USBD_STATE_DEFAULT: case USBD_STATE_ADDRESSED: case USBD_STATE_CONFIGURED: if (LOBYTE(req->wIndex) <= USBD_MAX_NUM_INTERFACES) 8006452: 683b ldr r3, [r7, #0] 8006454: 889b ldrh r3, [r3, #4] 8006456: b2db uxtb r3, r3 8006458: 2b01 cmp r3, #1 800645a: d813 bhi.n 8006484 <USBD_StdItfReq+0x64> { ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req); 800645c: 687b ldr r3, [r7, #4] 800645e: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8006462: 689b ldr r3, [r3, #8] 8006464: 6839 ldr r1, [r7, #0] 8006466: 6878 ldr r0, [r7, #4] 8006468: 4798 blx r3 800646a: 4603 mov r3, r0 800646c: 73fb strb r3, [r7, #15] if ((req->wLength == 0U) && (ret == USBD_OK)) 800646e: 683b ldr r3, [r7, #0] 8006470: 88db ldrh r3, [r3, #6] 8006472: 2b00 cmp r3, #0 8006474: d110 bne.n 8006498 <USBD_StdItfReq+0x78> 8006476: 7bfb ldrb r3, [r7, #15] 8006478: 2b00 cmp r3, #0 800647a: d10d bne.n 8006498 <USBD_StdItfReq+0x78> { USBD_CtlSendStatus(pdev); 800647c: 6878 ldr r0, [r7, #4] 800647e: f000 fd56 bl 8006f2e <USBD_CtlSendStatus> } else { USBD_CtlError(pdev, req); } break; 8006482: e009 b.n 8006498 <USBD_StdItfReq+0x78> USBD_CtlError(pdev, req); 8006484: 6839 ldr r1, [r7, #0] 8006486: 6878 ldr r0, [r7, #4] 8006488: f000 fc89 bl 8006d9e <USBD_CtlError> break; 800648c: e004 b.n 8006498 <USBD_StdItfReq+0x78> default: USBD_CtlError(pdev, req); 800648e: 6839 ldr r1, [r7, #0] 8006490: 6878 ldr r0, [r7, #4] 8006492: f000 fc84 bl 8006d9e <USBD_CtlError> break; 8006496: e000 b.n 800649a <USBD_StdItfReq+0x7a> break; 8006498: bf00 nop } break; 800649a: e004 b.n 80064a6 <USBD_StdItfReq+0x86> default: USBD_CtlError(pdev, req); 800649c: 6839 ldr r1, [r7, #0] 800649e: 6878 ldr r0, [r7, #4] 80064a0: f000 fc7d bl 8006d9e <USBD_CtlError> break; 80064a4: bf00 nop } return USBD_OK; 80064a6: 2300 movs r3, #0 } 80064a8: 4618 mov r0, r3 80064aa: 3710 adds r7, #16 80064ac: 46bd mov sp, r7 80064ae: bd80 pop {r7, pc} 080064b0 <USBD_StdEPReq>: * @param req: usb request * @retval status */ USBD_StatusTypeDef USBD_StdEPReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 80064b0: b580 push {r7, lr} 80064b2: b084 sub sp, #16 80064b4: af00 add r7, sp, #0 80064b6: 6078 str r0, [r7, #4] 80064b8: 6039 str r1, [r7, #0] USBD_EndpointTypeDef *pep; uint8_t ep_addr; USBD_StatusTypeDef ret = USBD_OK; 80064ba: 2300 movs r3, #0 80064bc: 73fb strb r3, [r7, #15] ep_addr = LOBYTE(req->wIndex); 80064be: 683b ldr r3, [r7, #0] 80064c0: 889b ldrh r3, [r3, #4] 80064c2: 73bb strb r3, [r7, #14] switch (req->bmRequest & USB_REQ_TYPE_MASK) 80064c4: 683b ldr r3, [r7, #0] 80064c6: 781b ldrb r3, [r3, #0] 80064c8: f003 0360 and.w r3, r3, #96 ; 0x60 80064cc: 2b40 cmp r3, #64 ; 0x40 80064ce: d007 beq.n 80064e0 <USBD_StdEPReq+0x30> 80064d0: 2b40 cmp r3, #64 ; 0x40 80064d2: f200 8146 bhi.w 8006762 <USBD_StdEPReq+0x2b2> 80064d6: 2b00 cmp r3, #0 80064d8: d00a beq.n 80064f0 <USBD_StdEPReq+0x40> 80064da: 2b20 cmp r3, #32 80064dc: f040 8141 bne.w 8006762 <USBD_StdEPReq+0x2b2> { case USB_REQ_TYPE_CLASS: case USB_REQ_TYPE_VENDOR: pdev->pClass->Setup(pdev, req); 80064e0: 687b ldr r3, [r7, #4] 80064e2: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 80064e6: 689b ldr r3, [r3, #8] 80064e8: 6839 ldr r1, [r7, #0] 80064ea: 6878 ldr r0, [r7, #4] 80064ec: 4798 blx r3 break; 80064ee: e13d b.n 800676c <USBD_StdEPReq+0x2bc> case USB_REQ_TYPE_STANDARD: /* Check if it is a class request */ if ((req->bmRequest & 0x60U) == 0x20U) 80064f0: 683b ldr r3, [r7, #0] 80064f2: 781b ldrb r3, [r3, #0] 80064f4: f003 0360 and.w r3, r3, #96 ; 0x60 80064f8: 2b20 cmp r3, #32 80064fa: d10a bne.n 8006512 <USBD_StdEPReq+0x62> { ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req); 80064fc: 687b ldr r3, [r7, #4] 80064fe: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8006502: 689b ldr r3, [r3, #8] 8006504: 6839 ldr r1, [r7, #0] 8006506: 6878 ldr r0, [r7, #4] 8006508: 4798 blx r3 800650a: 4603 mov r3, r0 800650c: 73fb strb r3, [r7, #15] return ret; 800650e: 7bfb ldrb r3, [r7, #15] 8006510: e12d b.n 800676e <USBD_StdEPReq+0x2be> } switch (req->bRequest) 8006512: 683b ldr r3, [r7, #0] 8006514: 785b ldrb r3, [r3, #1] 8006516: 2b03 cmp r3, #3 8006518: d007 beq.n 800652a <USBD_StdEPReq+0x7a> 800651a: 2b03 cmp r3, #3 800651c: f300 811b bgt.w 8006756 <USBD_StdEPReq+0x2a6> 8006520: 2b00 cmp r3, #0 8006522: d072 beq.n 800660a <USBD_StdEPReq+0x15a> 8006524: 2b01 cmp r3, #1 8006526: d03a beq.n 800659e <USBD_StdEPReq+0xee> 8006528: e115 b.n 8006756 <USBD_StdEPReq+0x2a6> { case USB_REQ_SET_FEATURE: switch (pdev->dev_state) 800652a: 687b ldr r3, [r7, #4] 800652c: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8006530: 2b02 cmp r3, #2 8006532: d002 beq.n 800653a <USBD_StdEPReq+0x8a> 8006534: 2b03 cmp r3, #3 8006536: d015 beq.n 8006564 <USBD_StdEPReq+0xb4> 8006538: e02b b.n 8006592 <USBD_StdEPReq+0xe2> { case USBD_STATE_ADDRESSED: if ((ep_addr != 0x00U) && (ep_addr != 0x80U)) 800653a: 7bbb ldrb r3, [r7, #14] 800653c: 2b00 cmp r3, #0 800653e: d00c beq.n 800655a <USBD_StdEPReq+0xaa> 8006540: 7bbb ldrb r3, [r7, #14] 8006542: 2b80 cmp r3, #128 ; 0x80 8006544: d009 beq.n 800655a <USBD_StdEPReq+0xaa> { USBD_LL_StallEP(pdev, ep_addr); 8006546: 7bbb ldrb r3, [r7, #14] 8006548: 4619 mov r1, r3 800654a: 6878 ldr r0, [r7, #4] 800654c: f001 f89c bl 8007688 <USBD_LL_StallEP> USBD_LL_StallEP(pdev, 0x80U); 8006550: 2180 movs r1, #128 ; 0x80 8006552: 6878 ldr r0, [r7, #4] 8006554: f001 f898 bl 8007688 <USBD_LL_StallEP> } else { USBD_CtlError(pdev, req); } break; 8006558: e020 b.n 800659c <USBD_StdEPReq+0xec> USBD_CtlError(pdev, req); 800655a: 6839 ldr r1, [r7, #0] 800655c: 6878 ldr r0, [r7, #4] 800655e: f000 fc1e bl 8006d9e <USBD_CtlError> break; 8006562: e01b b.n 800659c <USBD_StdEPReq+0xec> case USBD_STATE_CONFIGURED: if (req->wValue == USB_FEATURE_EP_HALT) 8006564: 683b ldr r3, [r7, #0] 8006566: 885b ldrh r3, [r3, #2] 8006568: 2b00 cmp r3, #0 800656a: d10e bne.n 800658a <USBD_StdEPReq+0xda> { if ((ep_addr != 0x00U) && 800656c: 7bbb ldrb r3, [r7, #14] 800656e: 2b00 cmp r3, #0 8006570: d00b beq.n 800658a <USBD_StdEPReq+0xda> 8006572: 7bbb ldrb r3, [r7, #14] 8006574: 2b80 cmp r3, #128 ; 0x80 8006576: d008 beq.n 800658a <USBD_StdEPReq+0xda> (ep_addr != 0x80U) && (req->wLength == 0x00U)) 8006578: 683b ldr r3, [r7, #0] 800657a: 88db ldrh r3, [r3, #6] 800657c: 2b00 cmp r3, #0 800657e: d104 bne.n 800658a <USBD_StdEPReq+0xda> { USBD_LL_StallEP(pdev, ep_addr); 8006580: 7bbb ldrb r3, [r7, #14] 8006582: 4619 mov r1, r3 8006584: 6878 ldr r0, [r7, #4] 8006586: f001 f87f bl 8007688 <USBD_LL_StallEP> } } USBD_CtlSendStatus(pdev); 800658a: 6878 ldr r0, [r7, #4] 800658c: f000 fccf bl 8006f2e <USBD_CtlSendStatus> break; 8006590: e004 b.n 800659c <USBD_StdEPReq+0xec> default: USBD_CtlError(pdev, req); 8006592: 6839 ldr r1, [r7, #0] 8006594: 6878 ldr r0, [r7, #4] 8006596: f000 fc02 bl 8006d9e <USBD_CtlError> break; 800659a: bf00 nop } break; 800659c: e0e0 b.n 8006760 <USBD_StdEPReq+0x2b0> case USB_REQ_CLEAR_FEATURE: switch (pdev->dev_state) 800659e: 687b ldr r3, [r7, #4] 80065a0: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 80065a4: 2b02 cmp r3, #2 80065a6: d002 beq.n 80065ae <USBD_StdEPReq+0xfe> 80065a8: 2b03 cmp r3, #3 80065aa: d015 beq.n 80065d8 <USBD_StdEPReq+0x128> 80065ac: e026 b.n 80065fc <USBD_StdEPReq+0x14c> { case USBD_STATE_ADDRESSED: if ((ep_addr != 0x00U) && (ep_addr != 0x80U)) 80065ae: 7bbb ldrb r3, [r7, #14] 80065b0: 2b00 cmp r3, #0 80065b2: d00c beq.n 80065ce <USBD_StdEPReq+0x11e> 80065b4: 7bbb ldrb r3, [r7, #14] 80065b6: 2b80 cmp r3, #128 ; 0x80 80065b8: d009 beq.n 80065ce <USBD_StdEPReq+0x11e> { USBD_LL_StallEP(pdev, ep_addr); 80065ba: 7bbb ldrb r3, [r7, #14] 80065bc: 4619 mov r1, r3 80065be: 6878 ldr r0, [r7, #4] 80065c0: f001 f862 bl 8007688 <USBD_LL_StallEP> USBD_LL_StallEP(pdev, 0x80U); 80065c4: 2180 movs r1, #128 ; 0x80 80065c6: 6878 ldr r0, [r7, #4] 80065c8: f001 f85e bl 8007688 <USBD_LL_StallEP> } else { USBD_CtlError(pdev, req); } break; 80065cc: e01c b.n 8006608 <USBD_StdEPReq+0x158> USBD_CtlError(pdev, req); 80065ce: 6839 ldr r1, [r7, #0] 80065d0: 6878 ldr r0, [r7, #4] 80065d2: f000 fbe4 bl 8006d9e <USBD_CtlError> break; 80065d6: e017 b.n 8006608 <USBD_StdEPReq+0x158> case USBD_STATE_CONFIGURED: if (req->wValue == USB_FEATURE_EP_HALT) 80065d8: 683b ldr r3, [r7, #0] 80065da: 885b ldrh r3, [r3, #2] 80065dc: 2b00 cmp r3, #0 80065de: d112 bne.n 8006606 <USBD_StdEPReq+0x156> { if ((ep_addr & 0x7FU) != 0x00U) 80065e0: 7bbb ldrb r3, [r7, #14] 80065e2: f003 037f and.w r3, r3, #127 ; 0x7f 80065e6: 2b00 cmp r3, #0 80065e8: d004 beq.n 80065f4 <USBD_StdEPReq+0x144> { USBD_LL_ClearStallEP(pdev, ep_addr); 80065ea: 7bbb ldrb r3, [r7, #14] 80065ec: 4619 mov r1, r3 80065ee: 6878 ldr r0, [r7, #4] 80065f0: f001 f869 bl 80076c6 <USBD_LL_ClearStallEP> } USBD_CtlSendStatus(pdev); 80065f4: 6878 ldr r0, [r7, #4] 80065f6: f000 fc9a bl 8006f2e <USBD_CtlSendStatus> } break; 80065fa: e004 b.n 8006606 <USBD_StdEPReq+0x156> default: USBD_CtlError(pdev, req); 80065fc: 6839 ldr r1, [r7, #0] 80065fe: 6878 ldr r0, [r7, #4] 8006600: f000 fbcd bl 8006d9e <USBD_CtlError> break; 8006604: e000 b.n 8006608 <USBD_StdEPReq+0x158> break; 8006606: bf00 nop } break; 8006608: e0aa b.n 8006760 <USBD_StdEPReq+0x2b0> case USB_REQ_GET_STATUS: switch (pdev->dev_state) 800660a: 687b ldr r3, [r7, #4] 800660c: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8006610: 2b02 cmp r3, #2 8006612: d002 beq.n 800661a <USBD_StdEPReq+0x16a> 8006614: 2b03 cmp r3, #3 8006616: d032 beq.n 800667e <USBD_StdEPReq+0x1ce> 8006618: e097 b.n 800674a <USBD_StdEPReq+0x29a> { case USBD_STATE_ADDRESSED: if ((ep_addr != 0x00U) && (ep_addr != 0x80U)) 800661a: 7bbb ldrb r3, [r7, #14] 800661c: 2b00 cmp r3, #0 800661e: d007 beq.n 8006630 <USBD_StdEPReq+0x180> 8006620: 7bbb ldrb r3, [r7, #14] 8006622: 2b80 cmp r3, #128 ; 0x80 8006624: d004 beq.n 8006630 <USBD_StdEPReq+0x180> { USBD_CtlError(pdev, req); 8006626: 6839 ldr r1, [r7, #0] 8006628: 6878 ldr r0, [r7, #4] 800662a: f000 fbb8 bl 8006d9e <USBD_CtlError> break; 800662e: e091 b.n 8006754 <USBD_StdEPReq+0x2a4> } pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \ 8006630: f997 300e ldrsb.w r3, [r7, #14] 8006634: 2b00 cmp r3, #0 8006636: da0b bge.n 8006650 <USBD_StdEPReq+0x1a0> 8006638: 7bbb ldrb r3, [r7, #14] 800663a: f003 027f and.w r2, r3, #127 ; 0x7f 800663e: 4613 mov r3, r2 8006640: 009b lsls r3, r3, #2 8006642: 4413 add r3, r2 8006644: 009b lsls r3, r3, #2 8006646: 3310 adds r3, #16 8006648: 687a ldr r2, [r7, #4] 800664a: 4413 add r3, r2 800664c: 3304 adds r3, #4 800664e: e00b b.n 8006668 <USBD_StdEPReq+0x1b8> &pdev->ep_out[ep_addr & 0x7FU]; 8006650: 7bbb ldrb r3, [r7, #14] 8006652: f003 027f and.w r2, r3, #127 ; 0x7f pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \ 8006656: 4613 mov r3, r2 8006658: 009b lsls r3, r3, #2 800665a: 4413 add r3, r2 800665c: 009b lsls r3, r3, #2 800665e: f503 73a8 add.w r3, r3, #336 ; 0x150 8006662: 687a ldr r2, [r7, #4] 8006664: 4413 add r3, r2 8006666: 3304 adds r3, #4 8006668: 60bb str r3, [r7, #8] pep->status = 0x0000U; 800666a: 68bb ldr r3, [r7, #8] 800666c: 2200 movs r2, #0 800666e: 601a str r2, [r3, #0] USBD_CtlSendData(pdev, (uint8_t *)(void *)&pep->status, 2U); 8006670: 68bb ldr r3, [r7, #8] 8006672: 2202 movs r2, #2 8006674: 4619 mov r1, r3 8006676: 6878 ldr r0, [r7, #4] 8006678: f000 fbfb bl 8006e72 <USBD_CtlSendData> break; 800667c: e06a b.n 8006754 <USBD_StdEPReq+0x2a4> case USBD_STATE_CONFIGURED: if ((ep_addr & 0x80U) == 0x80U) 800667e: f997 300e ldrsb.w r3, [r7, #14] 8006682: 2b00 cmp r3, #0 8006684: da11 bge.n 80066aa <USBD_StdEPReq+0x1fa> { if (pdev->ep_in[ep_addr & 0xFU].is_used == 0U) 8006686: 7bbb ldrb r3, [r7, #14] 8006688: f003 020f and.w r2, r3, #15 800668c: 6879 ldr r1, [r7, #4] 800668e: 4613 mov r3, r2 8006690: 009b lsls r3, r3, #2 8006692: 4413 add r3, r2 8006694: 009b lsls r3, r3, #2 8006696: 440b add r3, r1 8006698: 3318 adds r3, #24 800669a: 681b ldr r3, [r3, #0] 800669c: 2b00 cmp r3, #0 800669e: d117 bne.n 80066d0 <USBD_StdEPReq+0x220> { USBD_CtlError(pdev, req); 80066a0: 6839 ldr r1, [r7, #0] 80066a2: 6878 ldr r0, [r7, #4] 80066a4: f000 fb7b bl 8006d9e <USBD_CtlError> break; 80066a8: e054 b.n 8006754 <USBD_StdEPReq+0x2a4> } } else { if (pdev->ep_out[ep_addr & 0xFU].is_used == 0U) 80066aa: 7bbb ldrb r3, [r7, #14] 80066ac: f003 020f and.w r2, r3, #15 80066b0: 6879 ldr r1, [r7, #4] 80066b2: 4613 mov r3, r2 80066b4: 009b lsls r3, r3, #2 80066b6: 4413 add r3, r2 80066b8: 009b lsls r3, r3, #2 80066ba: 440b add r3, r1 80066bc: f503 73ac add.w r3, r3, #344 ; 0x158 80066c0: 681b ldr r3, [r3, #0] 80066c2: 2b00 cmp r3, #0 80066c4: d104 bne.n 80066d0 <USBD_StdEPReq+0x220> { USBD_CtlError(pdev, req); 80066c6: 6839 ldr r1, [r7, #0] 80066c8: 6878 ldr r0, [r7, #4] 80066ca: f000 fb68 bl 8006d9e <USBD_CtlError> break; 80066ce: e041 b.n 8006754 <USBD_StdEPReq+0x2a4> } } pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \ 80066d0: f997 300e ldrsb.w r3, [r7, #14] 80066d4: 2b00 cmp r3, #0 80066d6: da0b bge.n 80066f0 <USBD_StdEPReq+0x240> 80066d8: 7bbb ldrb r3, [r7, #14] 80066da: f003 027f and.w r2, r3, #127 ; 0x7f 80066de: 4613 mov r3, r2 80066e0: 009b lsls r3, r3, #2 80066e2: 4413 add r3, r2 80066e4: 009b lsls r3, r3, #2 80066e6: 3310 adds r3, #16 80066e8: 687a ldr r2, [r7, #4] 80066ea: 4413 add r3, r2 80066ec: 3304 adds r3, #4 80066ee: e00b b.n 8006708 <USBD_StdEPReq+0x258> &pdev->ep_out[ep_addr & 0x7FU]; 80066f0: 7bbb ldrb r3, [r7, #14] 80066f2: f003 027f and.w r2, r3, #127 ; 0x7f pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \ 80066f6: 4613 mov r3, r2 80066f8: 009b lsls r3, r3, #2 80066fa: 4413 add r3, r2 80066fc: 009b lsls r3, r3, #2 80066fe: f503 73a8 add.w r3, r3, #336 ; 0x150 8006702: 687a ldr r2, [r7, #4] 8006704: 4413 add r3, r2 8006706: 3304 adds r3, #4 8006708: 60bb str r3, [r7, #8] if ((ep_addr == 0x00U) || (ep_addr == 0x80U)) 800670a: 7bbb ldrb r3, [r7, #14] 800670c: 2b00 cmp r3, #0 800670e: d002 beq.n 8006716 <USBD_StdEPReq+0x266> 8006710: 7bbb ldrb r3, [r7, #14] 8006712: 2b80 cmp r3, #128 ; 0x80 8006714: d103 bne.n 800671e <USBD_StdEPReq+0x26e> { pep->status = 0x0000U; 8006716: 68bb ldr r3, [r7, #8] 8006718: 2200 movs r2, #0 800671a: 601a str r2, [r3, #0] 800671c: e00e b.n 800673c <USBD_StdEPReq+0x28c> } else if (USBD_LL_IsStallEP(pdev, ep_addr)) 800671e: 7bbb ldrb r3, [r7, #14] 8006720: 4619 mov r1, r3 8006722: 6878 ldr r0, [r7, #4] 8006724: f000 ffee bl 8007704 <USBD_LL_IsStallEP> 8006728: 4603 mov r3, r0 800672a: 2b00 cmp r3, #0 800672c: d003 beq.n 8006736 <USBD_StdEPReq+0x286> { pep->status = 0x0001U; 800672e: 68bb ldr r3, [r7, #8] 8006730: 2201 movs r2, #1 8006732: 601a str r2, [r3, #0] 8006734: e002 b.n 800673c <USBD_StdEPReq+0x28c> } else { pep->status = 0x0000U; 8006736: 68bb ldr r3, [r7, #8] 8006738: 2200 movs r2, #0 800673a: 601a str r2, [r3, #0] } USBD_CtlSendData(pdev, (uint8_t *)(void *)&pep->status, 2U); 800673c: 68bb ldr r3, [r7, #8] 800673e: 2202 movs r2, #2 8006740: 4619 mov r1, r3 8006742: 6878 ldr r0, [r7, #4] 8006744: f000 fb95 bl 8006e72 <USBD_CtlSendData> break; 8006748: e004 b.n 8006754 <USBD_StdEPReq+0x2a4> default: USBD_CtlError(pdev, req); 800674a: 6839 ldr r1, [r7, #0] 800674c: 6878 ldr r0, [r7, #4] 800674e: f000 fb26 bl 8006d9e <USBD_CtlError> break; 8006752: bf00 nop } break; 8006754: e004 b.n 8006760 <USBD_StdEPReq+0x2b0> default: USBD_CtlError(pdev, req); 8006756: 6839 ldr r1, [r7, #0] 8006758: 6878 ldr r0, [r7, #4] 800675a: f000 fb20 bl 8006d9e <USBD_CtlError> break; 800675e: bf00 nop } break; 8006760: e004 b.n 800676c <USBD_StdEPReq+0x2bc> default: USBD_CtlError(pdev, req); 8006762: 6839 ldr r1, [r7, #0] 8006764: 6878 ldr r0, [r7, #4] 8006766: f000 fb1a bl 8006d9e <USBD_CtlError> break; 800676a: bf00 nop } return ret; 800676c: 7bfb ldrb r3, [r7, #15] } 800676e: 4618 mov r0, r3 8006770: 3710 adds r7, #16 8006772: 46bd mov sp, r7 8006774: bd80 pop {r7, pc} ... 08006778 <USBD_GetDescriptor>: * @param req: usb request * @retval status */ static void USBD_GetDescriptor(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8006778: b580 push {r7, lr} 800677a: b084 sub sp, #16 800677c: af00 add r7, sp, #0 800677e: 6078 str r0, [r7, #4] 8006780: 6039 str r1, [r7, #0] uint16_t len = 0U; 8006782: 2300 movs r3, #0 8006784: 813b strh r3, [r7, #8] uint8_t *pbuf = NULL; 8006786: 2300 movs r3, #0 8006788: 60fb str r3, [r7, #12] uint8_t err = 0U; 800678a: 2300 movs r3, #0 800678c: 72fb strb r3, [r7, #11] switch (req->wValue >> 8) 800678e: 683b ldr r3, [r7, #0] 8006790: 885b ldrh r3, [r3, #2] 8006792: 0a1b lsrs r3, r3, #8 8006794: b29b uxth r3, r3 8006796: 3b01 subs r3, #1 8006798: 2b06 cmp r3, #6 800679a: f200 8128 bhi.w 80069ee <USBD_GetDescriptor+0x276> 800679e: a201 add r2, pc, #4 ; (adr r2, 80067a4 <USBD_GetDescriptor+0x2c>) 80067a0: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80067a4: 080067c1 .word 0x080067c1 80067a8: 080067d9 .word 0x080067d9 80067ac: 08006819 .word 0x08006819 80067b0: 080069ef .word 0x080069ef 80067b4: 080069ef .word 0x080069ef 80067b8: 0800698f .word 0x0800698f 80067bc: 080069bb .word 0x080069bb err++; } break; #endif case USB_DESC_TYPE_DEVICE: pbuf = pdev->pDesc->GetDeviceDescriptor(pdev->dev_speed, &len); 80067c0: 687b ldr r3, [r7, #4] 80067c2: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 80067c6: 681b ldr r3, [r3, #0] 80067c8: 687a ldr r2, [r7, #4] 80067ca: 7c12 ldrb r2, [r2, #16] 80067cc: f107 0108 add.w r1, r7, #8 80067d0: 4610 mov r0, r2 80067d2: 4798 blx r3 80067d4: 60f8 str r0, [r7, #12] break; 80067d6: e112 b.n 80069fe <USBD_GetDescriptor+0x286> case USB_DESC_TYPE_CONFIGURATION: if (pdev->dev_speed == USBD_SPEED_HIGH) 80067d8: 687b ldr r3, [r7, #4] 80067da: 7c1b ldrb r3, [r3, #16] 80067dc: 2b00 cmp r3, #0 80067de: d10d bne.n 80067fc <USBD_GetDescriptor+0x84> { pbuf = pdev->pClass->GetHSConfigDescriptor(&len); 80067e0: 687b ldr r3, [r7, #4] 80067e2: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 80067e6: 6a9b ldr r3, [r3, #40] ; 0x28 80067e8: f107 0208 add.w r2, r7, #8 80067ec: 4610 mov r0, r2 80067ee: 4798 blx r3 80067f0: 60f8 str r0, [r7, #12] pbuf[1] = USB_DESC_TYPE_CONFIGURATION; 80067f2: 68fb ldr r3, [r7, #12] 80067f4: 3301 adds r3, #1 80067f6: 2202 movs r2, #2 80067f8: 701a strb r2, [r3, #0] else { pbuf = pdev->pClass->GetFSConfigDescriptor(&len); pbuf[1] = USB_DESC_TYPE_CONFIGURATION; } break; 80067fa: e100 b.n 80069fe <USBD_GetDescriptor+0x286> pbuf = pdev->pClass->GetFSConfigDescriptor(&len); 80067fc: 687b ldr r3, [r7, #4] 80067fe: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 8006802: 6adb ldr r3, [r3, #44] ; 0x2c 8006804: f107 0208 add.w r2, r7, #8 8006808: 4610 mov r0, r2 800680a: 4798 blx r3 800680c: 60f8 str r0, [r7, #12] pbuf[1] = USB_DESC_TYPE_CONFIGURATION; 800680e: 68fb ldr r3, [r7, #12] 8006810: 3301 adds r3, #1 8006812: 2202 movs r2, #2 8006814: 701a strb r2, [r3, #0] break; 8006816: e0f2 b.n 80069fe <USBD_GetDescriptor+0x286> case USB_DESC_TYPE_STRING: switch ((uint8_t)(req->wValue)) 8006818: 683b ldr r3, [r7, #0] 800681a: 885b ldrh r3, [r3, #2] 800681c: b2db uxtb r3, r3 800681e: 2b05 cmp r3, #5 8006820: f200 80ac bhi.w 800697c <USBD_GetDescriptor+0x204> 8006824: a201 add r2, pc, #4 ; (adr r2, 800682c <USBD_GetDescriptor+0xb4>) 8006826: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800682a: bf00 nop 800682c: 08006845 .word 0x08006845 8006830: 08006879 .word 0x08006879 8006834: 080068ad .word 0x080068ad 8006838: 080068e1 .word 0x080068e1 800683c: 08006915 .word 0x08006915 8006840: 08006949 .word 0x08006949 { case USBD_IDX_LANGID_STR: if (pdev->pDesc->GetLangIDStrDescriptor != NULL) 8006844: 687b ldr r3, [r7, #4] 8006846: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 800684a: 685b ldr r3, [r3, #4] 800684c: 2b00 cmp r3, #0 800684e: d00b beq.n 8006868 <USBD_GetDescriptor+0xf0> { pbuf = pdev->pDesc->GetLangIDStrDescriptor(pdev->dev_speed, &len); 8006850: 687b ldr r3, [r7, #4] 8006852: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 8006856: 685b ldr r3, [r3, #4] 8006858: 687a ldr r2, [r7, #4] 800685a: 7c12 ldrb r2, [r2, #16] 800685c: f107 0108 add.w r1, r7, #8 8006860: 4610 mov r0, r2 8006862: 4798 blx r3 8006864: 60f8 str r0, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 8006866: e091 b.n 800698c <USBD_GetDescriptor+0x214> USBD_CtlError(pdev, req); 8006868: 6839 ldr r1, [r7, #0] 800686a: 6878 ldr r0, [r7, #4] 800686c: f000 fa97 bl 8006d9e <USBD_CtlError> err++; 8006870: 7afb ldrb r3, [r7, #11] 8006872: 3301 adds r3, #1 8006874: 72fb strb r3, [r7, #11] break; 8006876: e089 b.n 800698c <USBD_GetDescriptor+0x214> case USBD_IDX_MFC_STR: if (pdev->pDesc->GetManufacturerStrDescriptor != NULL) 8006878: 687b ldr r3, [r7, #4] 800687a: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 800687e: 689b ldr r3, [r3, #8] 8006880: 2b00 cmp r3, #0 8006882: d00b beq.n 800689c <USBD_GetDescriptor+0x124> { pbuf = pdev->pDesc->GetManufacturerStrDescriptor(pdev->dev_speed, &len); 8006884: 687b ldr r3, [r7, #4] 8006886: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 800688a: 689b ldr r3, [r3, #8] 800688c: 687a ldr r2, [r7, #4] 800688e: 7c12 ldrb r2, [r2, #16] 8006890: f107 0108 add.w r1, r7, #8 8006894: 4610 mov r0, r2 8006896: 4798 blx r3 8006898: 60f8 str r0, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 800689a: e077 b.n 800698c <USBD_GetDescriptor+0x214> USBD_CtlError(pdev, req); 800689c: 6839 ldr r1, [r7, #0] 800689e: 6878 ldr r0, [r7, #4] 80068a0: f000 fa7d bl 8006d9e <USBD_CtlError> err++; 80068a4: 7afb ldrb r3, [r7, #11] 80068a6: 3301 adds r3, #1 80068a8: 72fb strb r3, [r7, #11] break; 80068aa: e06f b.n 800698c <USBD_GetDescriptor+0x214> case USBD_IDX_PRODUCT_STR: if (pdev->pDesc->GetProductStrDescriptor != NULL) 80068ac: 687b ldr r3, [r7, #4] 80068ae: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 80068b2: 68db ldr r3, [r3, #12] 80068b4: 2b00 cmp r3, #0 80068b6: d00b beq.n 80068d0 <USBD_GetDescriptor+0x158> { pbuf = pdev->pDesc->GetProductStrDescriptor(pdev->dev_speed, &len); 80068b8: 687b ldr r3, [r7, #4] 80068ba: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 80068be: 68db ldr r3, [r3, #12] 80068c0: 687a ldr r2, [r7, #4] 80068c2: 7c12 ldrb r2, [r2, #16] 80068c4: f107 0108 add.w r1, r7, #8 80068c8: 4610 mov r0, r2 80068ca: 4798 blx r3 80068cc: 60f8 str r0, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 80068ce: e05d b.n 800698c <USBD_GetDescriptor+0x214> USBD_CtlError(pdev, req); 80068d0: 6839 ldr r1, [r7, #0] 80068d2: 6878 ldr r0, [r7, #4] 80068d4: f000 fa63 bl 8006d9e <USBD_CtlError> err++; 80068d8: 7afb ldrb r3, [r7, #11] 80068da: 3301 adds r3, #1 80068dc: 72fb strb r3, [r7, #11] break; 80068de: e055 b.n 800698c <USBD_GetDescriptor+0x214> case USBD_IDX_SERIAL_STR: if (pdev->pDesc->GetSerialStrDescriptor != NULL) 80068e0: 687b ldr r3, [r7, #4] 80068e2: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 80068e6: 691b ldr r3, [r3, #16] 80068e8: 2b00 cmp r3, #0 80068ea: d00b beq.n 8006904 <USBD_GetDescriptor+0x18c> { pbuf = pdev->pDesc->GetSerialStrDescriptor(pdev->dev_speed, &len); 80068ec: 687b ldr r3, [r7, #4] 80068ee: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 80068f2: 691b ldr r3, [r3, #16] 80068f4: 687a ldr r2, [r7, #4] 80068f6: 7c12 ldrb r2, [r2, #16] 80068f8: f107 0108 add.w r1, r7, #8 80068fc: 4610 mov r0, r2 80068fe: 4798 blx r3 8006900: 60f8 str r0, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 8006902: e043 b.n 800698c <USBD_GetDescriptor+0x214> USBD_CtlError(pdev, req); 8006904: 6839 ldr r1, [r7, #0] 8006906: 6878 ldr r0, [r7, #4] 8006908: f000 fa49 bl 8006d9e <USBD_CtlError> err++; 800690c: 7afb ldrb r3, [r7, #11] 800690e: 3301 adds r3, #1 8006910: 72fb strb r3, [r7, #11] break; 8006912: e03b b.n 800698c <USBD_GetDescriptor+0x214> case USBD_IDX_CONFIG_STR: if (pdev->pDesc->GetConfigurationStrDescriptor != NULL) 8006914: 687b ldr r3, [r7, #4] 8006916: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 800691a: 695b ldr r3, [r3, #20] 800691c: 2b00 cmp r3, #0 800691e: d00b beq.n 8006938 <USBD_GetDescriptor+0x1c0> { pbuf = pdev->pDesc->GetConfigurationStrDescriptor(pdev->dev_speed, &len); 8006920: 687b ldr r3, [r7, #4] 8006922: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 8006926: 695b ldr r3, [r3, #20] 8006928: 687a ldr r2, [r7, #4] 800692a: 7c12 ldrb r2, [r2, #16] 800692c: f107 0108 add.w r1, r7, #8 8006930: 4610 mov r0, r2 8006932: 4798 blx r3 8006934: 60f8 str r0, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 8006936: e029 b.n 800698c <USBD_GetDescriptor+0x214> USBD_CtlError(pdev, req); 8006938: 6839 ldr r1, [r7, #0] 800693a: 6878 ldr r0, [r7, #4] 800693c: f000 fa2f bl 8006d9e <USBD_CtlError> err++; 8006940: 7afb ldrb r3, [r7, #11] 8006942: 3301 adds r3, #1 8006944: 72fb strb r3, [r7, #11] break; 8006946: e021 b.n 800698c <USBD_GetDescriptor+0x214> case USBD_IDX_INTERFACE_STR: if (pdev->pDesc->GetInterfaceStrDescriptor != NULL) 8006948: 687b ldr r3, [r7, #4] 800694a: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 800694e: 699b ldr r3, [r3, #24] 8006950: 2b00 cmp r3, #0 8006952: d00b beq.n 800696c <USBD_GetDescriptor+0x1f4> { pbuf = pdev->pDesc->GetInterfaceStrDescriptor(pdev->dev_speed, &len); 8006954: 687b ldr r3, [r7, #4] 8006956: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0 800695a: 699b ldr r3, [r3, #24] 800695c: 687a ldr r2, [r7, #4] 800695e: 7c12 ldrb r2, [r2, #16] 8006960: f107 0108 add.w r1, r7, #8 8006964: 4610 mov r0, r2 8006966: 4798 blx r3 8006968: 60f8 str r0, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 800696a: e00f b.n 800698c <USBD_GetDescriptor+0x214> USBD_CtlError(pdev, req); 800696c: 6839 ldr r1, [r7, #0] 800696e: 6878 ldr r0, [r7, #4] 8006970: f000 fa15 bl 8006d9e <USBD_CtlError> err++; 8006974: 7afb ldrb r3, [r7, #11] 8006976: 3301 adds r3, #1 8006978: 72fb strb r3, [r7, #11] break; 800697a: e007 b.n 800698c <USBD_GetDescriptor+0x214> USBD_CtlError(pdev, req); err++; } break; #else USBD_CtlError(pdev, req); 800697c: 6839 ldr r1, [r7, #0] 800697e: 6878 ldr r0, [r7, #4] 8006980: f000 fa0d bl 8006d9e <USBD_CtlError> err++; 8006984: 7afb ldrb r3, [r7, #11] 8006986: 3301 adds r3, #1 8006988: 72fb strb r3, [r7, #11] #endif } break; 800698a: e038 b.n 80069fe <USBD_GetDescriptor+0x286> 800698c: e037 b.n 80069fe <USBD_GetDescriptor+0x286> case USB_DESC_TYPE_DEVICE_QUALIFIER: if (pdev->dev_speed == USBD_SPEED_HIGH) 800698e: 687b ldr r3, [r7, #4] 8006990: 7c1b ldrb r3, [r3, #16] 8006992: 2b00 cmp r3, #0 8006994: d109 bne.n 80069aa <USBD_GetDescriptor+0x232> { pbuf = pdev->pClass->GetDeviceQualifierDescriptor(&len); 8006996: 687b ldr r3, [r7, #4] 8006998: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 800699c: 6b5b ldr r3, [r3, #52] ; 0x34 800699e: f107 0208 add.w r2, r7, #8 80069a2: 4610 mov r0, r2 80069a4: 4798 blx r3 80069a6: 60f8 str r0, [r7, #12] else { USBD_CtlError(pdev, req); err++; } break; 80069a8: e029 b.n 80069fe <USBD_GetDescriptor+0x286> USBD_CtlError(pdev, req); 80069aa: 6839 ldr r1, [r7, #0] 80069ac: 6878 ldr r0, [r7, #4] 80069ae: f000 f9f6 bl 8006d9e <USBD_CtlError> err++; 80069b2: 7afb ldrb r3, [r7, #11] 80069b4: 3301 adds r3, #1 80069b6: 72fb strb r3, [r7, #11] break; 80069b8: e021 b.n 80069fe <USBD_GetDescriptor+0x286> case USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION: if (pdev->dev_speed == USBD_SPEED_HIGH) 80069ba: 687b ldr r3, [r7, #4] 80069bc: 7c1b ldrb r3, [r3, #16] 80069be: 2b00 cmp r3, #0 80069c0: d10d bne.n 80069de <USBD_GetDescriptor+0x266> { pbuf = pdev->pClass->GetOtherSpeedConfigDescriptor(&len); 80069c2: 687b ldr r3, [r7, #4] 80069c4: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4 80069c8: 6b1b ldr r3, [r3, #48] ; 0x30 80069ca: f107 0208 add.w r2, r7, #8 80069ce: 4610 mov r0, r2 80069d0: 4798 blx r3 80069d2: 60f8 str r0, [r7, #12] pbuf[1] = USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION; 80069d4: 68fb ldr r3, [r7, #12] 80069d6: 3301 adds r3, #1 80069d8: 2207 movs r2, #7 80069da: 701a strb r2, [r3, #0] else { USBD_CtlError(pdev, req); err++; } break; 80069dc: e00f b.n 80069fe <USBD_GetDescriptor+0x286> USBD_CtlError(pdev, req); 80069de: 6839 ldr r1, [r7, #0] 80069e0: 6878 ldr r0, [r7, #4] 80069e2: f000 f9dc bl 8006d9e <USBD_CtlError> err++; 80069e6: 7afb ldrb r3, [r7, #11] 80069e8: 3301 adds r3, #1 80069ea: 72fb strb r3, [r7, #11] break; 80069ec: e007 b.n 80069fe <USBD_GetDescriptor+0x286> default: USBD_CtlError(pdev, req); 80069ee: 6839 ldr r1, [r7, #0] 80069f0: 6878 ldr r0, [r7, #4] 80069f2: f000 f9d4 bl 8006d9e <USBD_CtlError> err++; 80069f6: 7afb ldrb r3, [r7, #11] 80069f8: 3301 adds r3, #1 80069fa: 72fb strb r3, [r7, #11] break; 80069fc: bf00 nop } if (err != 0U) 80069fe: 7afb ldrb r3, [r7, #11] 8006a00: 2b00 cmp r3, #0 8006a02: d11c bne.n 8006a3e <USBD_GetDescriptor+0x2c6> { return; } else { if ((len != 0U) && (req->wLength != 0U)) 8006a04: 893b ldrh r3, [r7, #8] 8006a06: 2b00 cmp r3, #0 8006a08: d011 beq.n 8006a2e <USBD_GetDescriptor+0x2b6> 8006a0a: 683b ldr r3, [r7, #0] 8006a0c: 88db ldrh r3, [r3, #6] 8006a0e: 2b00 cmp r3, #0 8006a10: d00d beq.n 8006a2e <USBD_GetDescriptor+0x2b6> { len = MIN(len, req->wLength); 8006a12: 683b ldr r3, [r7, #0] 8006a14: 88da ldrh r2, [r3, #6] 8006a16: 893b ldrh r3, [r7, #8] 8006a18: 4293 cmp r3, r2 8006a1a: bf28 it cs 8006a1c: 4613 movcs r3, r2 8006a1e: b29b uxth r3, r3 8006a20: 813b strh r3, [r7, #8] (void)USBD_CtlSendData(pdev, pbuf, len); 8006a22: 893b ldrh r3, [r7, #8] 8006a24: 461a mov r2, r3 8006a26: 68f9 ldr r1, [r7, #12] 8006a28: 6878 ldr r0, [r7, #4] 8006a2a: f000 fa22 bl 8006e72 <USBD_CtlSendData> } if (req->wLength == 0U) 8006a2e: 683b ldr r3, [r7, #0] 8006a30: 88db ldrh r3, [r3, #6] 8006a32: 2b00 cmp r3, #0 8006a34: d104 bne.n 8006a40 <USBD_GetDescriptor+0x2c8> { (void)USBD_CtlSendStatus(pdev); 8006a36: 6878 ldr r0, [r7, #4] 8006a38: f000 fa79 bl 8006f2e <USBD_CtlSendStatus> 8006a3c: e000 b.n 8006a40 <USBD_GetDescriptor+0x2c8> return; 8006a3e: bf00 nop } } } 8006a40: 3710 adds r7, #16 8006a42: 46bd mov sp, r7 8006a44: bd80 pop {r7, pc} 8006a46: bf00 nop 08006a48 <USBD_SetAddress>: * @param req: usb request * @retval status */ static void USBD_SetAddress(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8006a48: b580 push {r7, lr} 8006a4a: b084 sub sp, #16 8006a4c: af00 add r7, sp, #0 8006a4e: 6078 str r0, [r7, #4] 8006a50: 6039 str r1, [r7, #0] uint8_t dev_addr; if ((req->wIndex == 0U) && (req->wLength == 0U) && (req->wValue < 128U)) 8006a52: 683b ldr r3, [r7, #0] 8006a54: 889b ldrh r3, [r3, #4] 8006a56: 2b00 cmp r3, #0 8006a58: d130 bne.n 8006abc <USBD_SetAddress+0x74> 8006a5a: 683b ldr r3, [r7, #0] 8006a5c: 88db ldrh r3, [r3, #6] 8006a5e: 2b00 cmp r3, #0 8006a60: d12c bne.n 8006abc <USBD_SetAddress+0x74> 8006a62: 683b ldr r3, [r7, #0] 8006a64: 885b ldrh r3, [r3, #2] 8006a66: 2b7f cmp r3, #127 ; 0x7f 8006a68: d828 bhi.n 8006abc <USBD_SetAddress+0x74> { dev_addr = (uint8_t)(req->wValue) & 0x7FU; 8006a6a: 683b ldr r3, [r7, #0] 8006a6c: 885b ldrh r3, [r3, #2] 8006a6e: b2db uxtb r3, r3 8006a70: f003 037f and.w r3, r3, #127 ; 0x7f 8006a74: 73fb strb r3, [r7, #15] if (pdev->dev_state == USBD_STATE_CONFIGURED) 8006a76: 687b ldr r3, [r7, #4] 8006a78: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8006a7c: 2b03 cmp r3, #3 8006a7e: d104 bne.n 8006a8a <USBD_SetAddress+0x42> { USBD_CtlError(pdev, req); 8006a80: 6839 ldr r1, [r7, #0] 8006a82: 6878 ldr r0, [r7, #4] 8006a84: f000 f98b bl 8006d9e <USBD_CtlError> if (pdev->dev_state == USBD_STATE_CONFIGURED) 8006a88: e01d b.n 8006ac6 <USBD_SetAddress+0x7e> } else { pdev->dev_address = dev_addr; 8006a8a: 687b ldr r3, [r7, #4] 8006a8c: 7bfa ldrb r2, [r7, #15] 8006a8e: f883 229e strb.w r2, [r3, #670] ; 0x29e USBD_LL_SetUSBAddress(pdev, dev_addr); 8006a92: 7bfb ldrb r3, [r7, #15] 8006a94: 4619 mov r1, r3 8006a96: 6878 ldr r0, [r7, #4] 8006a98: f000 fe60 bl 800775c <USBD_LL_SetUSBAddress> USBD_CtlSendStatus(pdev); 8006a9c: 6878 ldr r0, [r7, #4] 8006a9e: f000 fa46 bl 8006f2e <USBD_CtlSendStatus> if (dev_addr != 0U) 8006aa2: 7bfb ldrb r3, [r7, #15] 8006aa4: 2b00 cmp r3, #0 8006aa6: d004 beq.n 8006ab2 <USBD_SetAddress+0x6a> { pdev->dev_state = USBD_STATE_ADDRESSED; 8006aa8: 687b ldr r3, [r7, #4] 8006aaa: 2202 movs r2, #2 8006aac: f883 229c strb.w r2, [r3, #668] ; 0x29c if (pdev->dev_state == USBD_STATE_CONFIGURED) 8006ab0: e009 b.n 8006ac6 <USBD_SetAddress+0x7e> } else { pdev->dev_state = USBD_STATE_DEFAULT; 8006ab2: 687b ldr r3, [r7, #4] 8006ab4: 2201 movs r2, #1 8006ab6: f883 229c strb.w r2, [r3, #668] ; 0x29c if (pdev->dev_state == USBD_STATE_CONFIGURED) 8006aba: e004 b.n 8006ac6 <USBD_SetAddress+0x7e> } } } else { USBD_CtlError(pdev, req); 8006abc: 6839 ldr r1, [r7, #0] 8006abe: 6878 ldr r0, [r7, #4] 8006ac0: f000 f96d bl 8006d9e <USBD_CtlError> } } 8006ac4: bf00 nop 8006ac6: bf00 nop 8006ac8: 3710 adds r7, #16 8006aca: 46bd mov sp, r7 8006acc: bd80 pop {r7, pc} ... 08006ad0 <USBD_SetConfig>: * @param pdev: device instance * @param req: usb request * @retval status */ static void USBD_SetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8006ad0: b580 push {r7, lr} 8006ad2: b082 sub sp, #8 8006ad4: af00 add r7, sp, #0 8006ad6: 6078 str r0, [r7, #4] 8006ad8: 6039 str r1, [r7, #0] static uint8_t cfgidx; cfgidx = (uint8_t)(req->wValue); 8006ada: 683b ldr r3, [r7, #0] 8006adc: 885b ldrh r3, [r3, #2] 8006ade: b2da uxtb r2, r3 8006ae0: 4b41 ldr r3, [pc, #260] ; (8006be8 <USBD_SetConfig+0x118>) 8006ae2: 701a strb r2, [r3, #0] if (cfgidx > USBD_MAX_NUM_CONFIGURATION) 8006ae4: 4b40 ldr r3, [pc, #256] ; (8006be8 <USBD_SetConfig+0x118>) 8006ae6: 781b ldrb r3, [r3, #0] 8006ae8: 2b01 cmp r3, #1 8006aea: d904 bls.n 8006af6 <USBD_SetConfig+0x26> { USBD_CtlError(pdev, req); 8006aec: 6839 ldr r1, [r7, #0] 8006aee: 6878 ldr r0, [r7, #4] 8006af0: f000 f955 bl 8006d9e <USBD_CtlError> 8006af4: e075 b.n 8006be2 <USBD_SetConfig+0x112> } else { switch (pdev->dev_state) 8006af6: 687b ldr r3, [r7, #4] 8006af8: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8006afc: 2b02 cmp r3, #2 8006afe: d002 beq.n 8006b06 <USBD_SetConfig+0x36> 8006b00: 2b03 cmp r3, #3 8006b02: d023 beq.n 8006b4c <USBD_SetConfig+0x7c> 8006b04: e062 b.n 8006bcc <USBD_SetConfig+0xfc> { case USBD_STATE_ADDRESSED: if (cfgidx) 8006b06: 4b38 ldr r3, [pc, #224] ; (8006be8 <USBD_SetConfig+0x118>) 8006b08: 781b ldrb r3, [r3, #0] 8006b0a: 2b00 cmp r3, #0 8006b0c: d01a beq.n 8006b44 <USBD_SetConfig+0x74> { pdev->dev_config = cfgidx; 8006b0e: 4b36 ldr r3, [pc, #216] ; (8006be8 <USBD_SetConfig+0x118>) 8006b10: 781b ldrb r3, [r3, #0] 8006b12: 461a mov r2, r3 8006b14: 687b ldr r3, [r7, #4] 8006b16: 605a str r2, [r3, #4] pdev->dev_state = USBD_STATE_CONFIGURED; 8006b18: 687b ldr r3, [r7, #4] 8006b1a: 2203 movs r2, #3 8006b1c: f883 229c strb.w r2, [r3, #668] ; 0x29c if (USBD_SetClassConfig(pdev, cfgidx) == USBD_FAIL) 8006b20: 4b31 ldr r3, [pc, #196] ; (8006be8 <USBD_SetConfig+0x118>) 8006b22: 781b ldrb r3, [r3, #0] 8006b24: 4619 mov r1, r3 8006b26: 6878 ldr r0, [r7, #4] 8006b28: f7ff f9e7 bl 8005efa <USBD_SetClassConfig> 8006b2c: 4603 mov r3, r0 8006b2e: 2b02 cmp r3, #2 8006b30: d104 bne.n 8006b3c <USBD_SetConfig+0x6c> { USBD_CtlError(pdev, req); 8006b32: 6839 ldr r1, [r7, #0] 8006b34: 6878 ldr r0, [r7, #4] 8006b36: f000 f932 bl 8006d9e <USBD_CtlError> return; 8006b3a: e052 b.n 8006be2 <USBD_SetConfig+0x112> } USBD_CtlSendStatus(pdev); 8006b3c: 6878 ldr r0, [r7, #4] 8006b3e: f000 f9f6 bl 8006f2e <USBD_CtlSendStatus> } else { USBD_CtlSendStatus(pdev); } break; 8006b42: e04e b.n 8006be2 <USBD_SetConfig+0x112> USBD_CtlSendStatus(pdev); 8006b44: 6878 ldr r0, [r7, #4] 8006b46: f000 f9f2 bl 8006f2e <USBD_CtlSendStatus> break; 8006b4a: e04a b.n 8006be2 <USBD_SetConfig+0x112> case USBD_STATE_CONFIGURED: if (cfgidx == 0U) 8006b4c: 4b26 ldr r3, [pc, #152] ; (8006be8 <USBD_SetConfig+0x118>) 8006b4e: 781b ldrb r3, [r3, #0] 8006b50: 2b00 cmp r3, #0 8006b52: d112 bne.n 8006b7a <USBD_SetConfig+0xaa> { pdev->dev_state = USBD_STATE_ADDRESSED; 8006b54: 687b ldr r3, [r7, #4] 8006b56: 2202 movs r2, #2 8006b58: f883 229c strb.w r2, [r3, #668] ; 0x29c pdev->dev_config = cfgidx; 8006b5c: 4b22 ldr r3, [pc, #136] ; (8006be8 <USBD_SetConfig+0x118>) 8006b5e: 781b ldrb r3, [r3, #0] 8006b60: 461a mov r2, r3 8006b62: 687b ldr r3, [r7, #4] 8006b64: 605a str r2, [r3, #4] USBD_ClrClassConfig(pdev, cfgidx); 8006b66: 4b20 ldr r3, [pc, #128] ; (8006be8 <USBD_SetConfig+0x118>) 8006b68: 781b ldrb r3, [r3, #0] 8006b6a: 4619 mov r1, r3 8006b6c: 6878 ldr r0, [r7, #4] 8006b6e: f7ff f9e3 bl 8005f38 <USBD_ClrClassConfig> USBD_CtlSendStatus(pdev); 8006b72: 6878 ldr r0, [r7, #4] 8006b74: f000 f9db bl 8006f2e <USBD_CtlSendStatus> } else { USBD_CtlSendStatus(pdev); } break; 8006b78: e033 b.n 8006be2 <USBD_SetConfig+0x112> else if (cfgidx != pdev->dev_config) 8006b7a: 4b1b ldr r3, [pc, #108] ; (8006be8 <USBD_SetConfig+0x118>) 8006b7c: 781b ldrb r3, [r3, #0] 8006b7e: 461a mov r2, r3 8006b80: 687b ldr r3, [r7, #4] 8006b82: 685b ldr r3, [r3, #4] 8006b84: 429a cmp r2, r3 8006b86: d01d beq.n 8006bc4 <USBD_SetConfig+0xf4> USBD_ClrClassConfig(pdev, (uint8_t)pdev->dev_config); 8006b88: 687b ldr r3, [r7, #4] 8006b8a: 685b ldr r3, [r3, #4] 8006b8c: b2db uxtb r3, r3 8006b8e: 4619 mov r1, r3 8006b90: 6878 ldr r0, [r7, #4] 8006b92: f7ff f9d1 bl 8005f38 <USBD_ClrClassConfig> pdev->dev_config = cfgidx; 8006b96: 4b14 ldr r3, [pc, #80] ; (8006be8 <USBD_SetConfig+0x118>) 8006b98: 781b ldrb r3, [r3, #0] 8006b9a: 461a mov r2, r3 8006b9c: 687b ldr r3, [r7, #4] 8006b9e: 605a str r2, [r3, #4] if (USBD_SetClassConfig(pdev, cfgidx) == USBD_FAIL) 8006ba0: 4b11 ldr r3, [pc, #68] ; (8006be8 <USBD_SetConfig+0x118>) 8006ba2: 781b ldrb r3, [r3, #0] 8006ba4: 4619 mov r1, r3 8006ba6: 6878 ldr r0, [r7, #4] 8006ba8: f7ff f9a7 bl 8005efa <USBD_SetClassConfig> 8006bac: 4603 mov r3, r0 8006bae: 2b02 cmp r3, #2 8006bb0: d104 bne.n 8006bbc <USBD_SetConfig+0xec> USBD_CtlError(pdev, req); 8006bb2: 6839 ldr r1, [r7, #0] 8006bb4: 6878 ldr r0, [r7, #4] 8006bb6: f000 f8f2 bl 8006d9e <USBD_CtlError> return; 8006bba: e012 b.n 8006be2 <USBD_SetConfig+0x112> USBD_CtlSendStatus(pdev); 8006bbc: 6878 ldr r0, [r7, #4] 8006bbe: f000 f9b6 bl 8006f2e <USBD_CtlSendStatus> break; 8006bc2: e00e b.n 8006be2 <USBD_SetConfig+0x112> USBD_CtlSendStatus(pdev); 8006bc4: 6878 ldr r0, [r7, #4] 8006bc6: f000 f9b2 bl 8006f2e <USBD_CtlSendStatus> break; 8006bca: e00a b.n 8006be2 <USBD_SetConfig+0x112> default: USBD_CtlError(pdev, req); 8006bcc: 6839 ldr r1, [r7, #0] 8006bce: 6878 ldr r0, [r7, #4] 8006bd0: f000 f8e5 bl 8006d9e <USBD_CtlError> USBD_ClrClassConfig(pdev, cfgidx); 8006bd4: 4b04 ldr r3, [pc, #16] ; (8006be8 <USBD_SetConfig+0x118>) 8006bd6: 781b ldrb r3, [r3, #0] 8006bd8: 4619 mov r1, r3 8006bda: 6878 ldr r0, [r7, #4] 8006bdc: f7ff f9ac bl 8005f38 <USBD_ClrClassConfig> break; 8006be0: bf00 nop } } } 8006be2: 3708 adds r7, #8 8006be4: 46bd mov sp, r7 8006be6: bd80 pop {r7, pc} 8006be8: 2000019c .word 0x2000019c 08006bec <USBD_GetConfig>: * @param pdev: device instance * @param req: usb request * @retval status */ static void USBD_GetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8006bec: b580 push {r7, lr} 8006bee: b082 sub sp, #8 8006bf0: af00 add r7, sp, #0 8006bf2: 6078 str r0, [r7, #4] 8006bf4: 6039 str r1, [r7, #0] if (req->wLength != 1U) 8006bf6: 683b ldr r3, [r7, #0] 8006bf8: 88db ldrh r3, [r3, #6] 8006bfa: 2b01 cmp r3, #1 8006bfc: d004 beq.n 8006c08 <USBD_GetConfig+0x1c> { USBD_CtlError(pdev, req); 8006bfe: 6839 ldr r1, [r7, #0] 8006c00: 6878 ldr r0, [r7, #4] 8006c02: f000 f8cc bl 8006d9e <USBD_CtlError> default: USBD_CtlError(pdev, req); break; } } } 8006c06: e022 b.n 8006c4e <USBD_GetConfig+0x62> switch (pdev->dev_state) 8006c08: 687b ldr r3, [r7, #4] 8006c0a: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8006c0e: 2b02 cmp r3, #2 8006c10: dc02 bgt.n 8006c18 <USBD_GetConfig+0x2c> 8006c12: 2b00 cmp r3, #0 8006c14: dc03 bgt.n 8006c1e <USBD_GetConfig+0x32> 8006c16: e015 b.n 8006c44 <USBD_GetConfig+0x58> 8006c18: 2b03 cmp r3, #3 8006c1a: d00b beq.n 8006c34 <USBD_GetConfig+0x48> 8006c1c: e012 b.n 8006c44 <USBD_GetConfig+0x58> pdev->dev_default_config = 0U; 8006c1e: 687b ldr r3, [r7, #4] 8006c20: 2200 movs r2, #0 8006c22: 609a str r2, [r3, #8] USBD_CtlSendData(pdev, (uint8_t *)(void *)&pdev->dev_default_config, 1U); 8006c24: 687b ldr r3, [r7, #4] 8006c26: 3308 adds r3, #8 8006c28: 2201 movs r2, #1 8006c2a: 4619 mov r1, r3 8006c2c: 6878 ldr r0, [r7, #4] 8006c2e: f000 f920 bl 8006e72 <USBD_CtlSendData> break; 8006c32: e00c b.n 8006c4e <USBD_GetConfig+0x62> USBD_CtlSendData(pdev, (uint8_t *)(void *)&pdev->dev_config, 1U); 8006c34: 687b ldr r3, [r7, #4] 8006c36: 3304 adds r3, #4 8006c38: 2201 movs r2, #1 8006c3a: 4619 mov r1, r3 8006c3c: 6878 ldr r0, [r7, #4] 8006c3e: f000 f918 bl 8006e72 <USBD_CtlSendData> break; 8006c42: e004 b.n 8006c4e <USBD_GetConfig+0x62> USBD_CtlError(pdev, req); 8006c44: 6839 ldr r1, [r7, #0] 8006c46: 6878 ldr r0, [r7, #4] 8006c48: f000 f8a9 bl 8006d9e <USBD_CtlError> break; 8006c4c: bf00 nop } 8006c4e: bf00 nop 8006c50: 3708 adds r7, #8 8006c52: 46bd mov sp, r7 8006c54: bd80 pop {r7, pc} 08006c56 <USBD_GetStatus>: * @param pdev: device instance * @param req: usb request * @retval status */ static void USBD_GetStatus(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8006c56: b580 push {r7, lr} 8006c58: b082 sub sp, #8 8006c5a: af00 add r7, sp, #0 8006c5c: 6078 str r0, [r7, #4] 8006c5e: 6039 str r1, [r7, #0] switch (pdev->dev_state) 8006c60: 687b ldr r3, [r7, #4] 8006c62: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8006c66: 3b01 subs r3, #1 8006c68: 2b02 cmp r3, #2 8006c6a: d81e bhi.n 8006caa <USBD_GetStatus+0x54> { case USBD_STATE_DEFAULT: case USBD_STATE_ADDRESSED: case USBD_STATE_CONFIGURED: if (req->wLength != 0x2U) 8006c6c: 683b ldr r3, [r7, #0] 8006c6e: 88db ldrh r3, [r3, #6] 8006c70: 2b02 cmp r3, #2 8006c72: d004 beq.n 8006c7e <USBD_GetStatus+0x28> { USBD_CtlError(pdev, req); 8006c74: 6839 ldr r1, [r7, #0] 8006c76: 6878 ldr r0, [r7, #4] 8006c78: f000 f891 bl 8006d9e <USBD_CtlError> break; 8006c7c: e01a b.n 8006cb4 <USBD_GetStatus+0x5e> } #if (USBD_SELF_POWERED == 1U) pdev->dev_config_status = USB_CONFIG_SELF_POWERED; #else pdev->dev_config_status = 0U; 8006c7e: 687b ldr r3, [r7, #4] 8006c80: 2200 movs r2, #0 8006c82: 60da str r2, [r3, #12] #endif if (pdev->dev_remote_wakeup) 8006c84: 687b ldr r3, [r7, #4] 8006c86: f8d3 32a4 ldr.w r3, [r3, #676] ; 0x2a4 8006c8a: 2b00 cmp r3, #0 8006c8c: d005 beq.n 8006c9a <USBD_GetStatus+0x44> { pdev->dev_config_status |= USB_CONFIG_REMOTE_WAKEUP; 8006c8e: 687b ldr r3, [r7, #4] 8006c90: 68db ldr r3, [r3, #12] 8006c92: f043 0202 orr.w r2, r3, #2 8006c96: 687b ldr r3, [r7, #4] 8006c98: 60da str r2, [r3, #12] } USBD_CtlSendData(pdev, (uint8_t *)(void *)&pdev->dev_config_status, 2U); 8006c9a: 687b ldr r3, [r7, #4] 8006c9c: 330c adds r3, #12 8006c9e: 2202 movs r2, #2 8006ca0: 4619 mov r1, r3 8006ca2: 6878 ldr r0, [r7, #4] 8006ca4: f000 f8e5 bl 8006e72 <USBD_CtlSendData> break; 8006ca8: e004 b.n 8006cb4 <USBD_GetStatus+0x5e> default: USBD_CtlError(pdev, req); 8006caa: 6839 ldr r1, [r7, #0] 8006cac: 6878 ldr r0, [r7, #4] 8006cae: f000 f876 bl 8006d9e <USBD_CtlError> break; 8006cb2: bf00 nop } } 8006cb4: bf00 nop 8006cb6: 3708 adds r7, #8 8006cb8: 46bd mov sp, r7 8006cba: bd80 pop {r7, pc} 08006cbc <USBD_SetFeature>: * @param req: usb request * @retval status */ static void USBD_SetFeature(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8006cbc: b580 push {r7, lr} 8006cbe: b082 sub sp, #8 8006cc0: af00 add r7, sp, #0 8006cc2: 6078 str r0, [r7, #4] 8006cc4: 6039 str r1, [r7, #0] if (req->wValue == USB_FEATURE_REMOTE_WAKEUP) 8006cc6: 683b ldr r3, [r7, #0] 8006cc8: 885b ldrh r3, [r3, #2] 8006cca: 2b01 cmp r3, #1 8006ccc: d106 bne.n 8006cdc <USBD_SetFeature+0x20> { pdev->dev_remote_wakeup = 1U; 8006cce: 687b ldr r3, [r7, #4] 8006cd0: 2201 movs r2, #1 8006cd2: f8c3 22a4 str.w r2, [r3, #676] ; 0x2a4 USBD_CtlSendStatus(pdev); 8006cd6: 6878 ldr r0, [r7, #4] 8006cd8: f000 f929 bl 8006f2e <USBD_CtlSendStatus> } } 8006cdc: bf00 nop 8006cde: 3708 adds r7, #8 8006ce0: 46bd mov sp, r7 8006ce2: bd80 pop {r7, pc} 08006ce4 <USBD_ClrFeature>: * @param req: usb request * @retval status */ static void USBD_ClrFeature(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8006ce4: b580 push {r7, lr} 8006ce6: b082 sub sp, #8 8006ce8: af00 add r7, sp, #0 8006cea: 6078 str r0, [r7, #4] 8006cec: 6039 str r1, [r7, #0] switch (pdev->dev_state) 8006cee: 687b ldr r3, [r7, #4] 8006cf0: f893 329c ldrb.w r3, [r3, #668] ; 0x29c 8006cf4: 3b01 subs r3, #1 8006cf6: 2b02 cmp r3, #2 8006cf8: d80b bhi.n 8006d12 <USBD_ClrFeature+0x2e> { case USBD_STATE_DEFAULT: case USBD_STATE_ADDRESSED: case USBD_STATE_CONFIGURED: if (req->wValue == USB_FEATURE_REMOTE_WAKEUP) 8006cfa: 683b ldr r3, [r7, #0] 8006cfc: 885b ldrh r3, [r3, #2] 8006cfe: 2b01 cmp r3, #1 8006d00: d10c bne.n 8006d1c <USBD_ClrFeature+0x38> { pdev->dev_remote_wakeup = 0U; 8006d02: 687b ldr r3, [r7, #4] 8006d04: 2200 movs r2, #0 8006d06: f8c3 22a4 str.w r2, [r3, #676] ; 0x2a4 USBD_CtlSendStatus(pdev); 8006d0a: 6878 ldr r0, [r7, #4] 8006d0c: f000 f90f bl 8006f2e <USBD_CtlSendStatus> } break; 8006d10: e004 b.n 8006d1c <USBD_ClrFeature+0x38> default: USBD_CtlError(pdev, req); 8006d12: 6839 ldr r1, [r7, #0] 8006d14: 6878 ldr r0, [r7, #4] 8006d16: f000 f842 bl 8006d9e <USBD_CtlError> break; 8006d1a: e000 b.n 8006d1e <USBD_ClrFeature+0x3a> break; 8006d1c: bf00 nop } } 8006d1e: bf00 nop 8006d20: 3708 adds r7, #8 8006d22: 46bd mov sp, r7 8006d24: bd80 pop {r7, pc} 08006d26 <USBD_ParseSetupRequest>: * @param req: usb request * @retval None */ void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata) { 8006d26: b480 push {r7} 8006d28: b083 sub sp, #12 8006d2a: af00 add r7, sp, #0 8006d2c: 6078 str r0, [r7, #4] 8006d2e: 6039 str r1, [r7, #0] req->bmRequest = *(uint8_t *)(pdata); 8006d30: 683b ldr r3, [r7, #0] 8006d32: 781a ldrb r2, [r3, #0] 8006d34: 687b ldr r3, [r7, #4] 8006d36: 701a strb r2, [r3, #0] req->bRequest = *(uint8_t *)(pdata + 1U); 8006d38: 683b ldr r3, [r7, #0] 8006d3a: 785a ldrb r2, [r3, #1] 8006d3c: 687b ldr r3, [r7, #4] 8006d3e: 705a strb r2, [r3, #1] req->wValue = SWAPBYTE(pdata + 2U); 8006d40: 683b ldr r3, [r7, #0] 8006d42: 3302 adds r3, #2 8006d44: 781b ldrb r3, [r3, #0] 8006d46: b29a uxth r2, r3 8006d48: 683b ldr r3, [r7, #0] 8006d4a: 3303 adds r3, #3 8006d4c: 781b ldrb r3, [r3, #0] 8006d4e: b29b uxth r3, r3 8006d50: 021b lsls r3, r3, #8 8006d52: b29b uxth r3, r3 8006d54: 4413 add r3, r2 8006d56: b29a uxth r2, r3 8006d58: 687b ldr r3, [r7, #4] 8006d5a: 805a strh r2, [r3, #2] req->wIndex = SWAPBYTE(pdata + 4U); 8006d5c: 683b ldr r3, [r7, #0] 8006d5e: 3304 adds r3, #4 8006d60: 781b ldrb r3, [r3, #0] 8006d62: b29a uxth r2, r3 8006d64: 683b ldr r3, [r7, #0] 8006d66: 3305 adds r3, #5 8006d68: 781b ldrb r3, [r3, #0] 8006d6a: b29b uxth r3, r3 8006d6c: 021b lsls r3, r3, #8 8006d6e: b29b uxth r3, r3 8006d70: 4413 add r3, r2 8006d72: b29a uxth r2, r3 8006d74: 687b ldr r3, [r7, #4] 8006d76: 809a strh r2, [r3, #4] req->wLength = SWAPBYTE(pdata + 6U); 8006d78: 683b ldr r3, [r7, #0] 8006d7a: 3306 adds r3, #6 8006d7c: 781b ldrb r3, [r3, #0] 8006d7e: b29a uxth r2, r3 8006d80: 683b ldr r3, [r7, #0] 8006d82: 3307 adds r3, #7 8006d84: 781b ldrb r3, [r3, #0] 8006d86: b29b uxth r3, r3 8006d88: 021b lsls r3, r3, #8 8006d8a: b29b uxth r3, r3 8006d8c: 4413 add r3, r2 8006d8e: b29a uxth r2, r3 8006d90: 687b ldr r3, [r7, #4] 8006d92: 80da strh r2, [r3, #6] } 8006d94: bf00 nop 8006d96: 370c adds r7, #12 8006d98: 46bd mov sp, r7 8006d9a: bc80 pop {r7} 8006d9c: 4770 bx lr 08006d9e <USBD_CtlError>: * @retval None */ void USBD_CtlError(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) { 8006d9e: b580 push {r7, lr} 8006da0: b082 sub sp, #8 8006da2: af00 add r7, sp, #0 8006da4: 6078 str r0, [r7, #4] 8006da6: 6039 str r1, [r7, #0] USBD_LL_StallEP(pdev, 0x80U); 8006da8: 2180 movs r1, #128 ; 0x80 8006daa: 6878 ldr r0, [r7, #4] 8006dac: f000 fc6c bl 8007688 <USBD_LL_StallEP> USBD_LL_StallEP(pdev, 0U); 8006db0: 2100 movs r1, #0 8006db2: 6878 ldr r0, [r7, #4] 8006db4: f000 fc68 bl 8007688 <USBD_LL_StallEP> } 8006db8: bf00 nop 8006dba: 3708 adds r7, #8 8006dbc: 46bd mov sp, r7 8006dbe: bd80 pop {r7, pc} 08006dc0 <USBD_GetString>: * @param unicode : Formatted string buffer (unicode) * @param len : descriptor length * @retval None */ void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len) { 8006dc0: b580 push {r7, lr} 8006dc2: b086 sub sp, #24 8006dc4: af00 add r7, sp, #0 8006dc6: 60f8 str r0, [r7, #12] 8006dc8: 60b9 str r1, [r7, #8] 8006dca: 607a str r2, [r7, #4] uint8_t idx = 0U; 8006dcc: 2300 movs r3, #0 8006dce: 75fb strb r3, [r7, #23] if (desc != NULL) 8006dd0: 68fb ldr r3, [r7, #12] 8006dd2: 2b00 cmp r3, #0 8006dd4: d032 beq.n 8006e3c <USBD_GetString+0x7c> { *len = (uint16_t)USBD_GetLen(desc) * 2U + 2U; 8006dd6: 68f8 ldr r0, [r7, #12] 8006dd8: f000 f834 bl 8006e44 <USBD_GetLen> 8006ddc: 4603 mov r3, r0 8006dde: 3301 adds r3, #1 8006de0: b29b uxth r3, r3 8006de2: 005b lsls r3, r3, #1 8006de4: b29a uxth r2, r3 8006de6: 687b ldr r3, [r7, #4] 8006de8: 801a strh r2, [r3, #0] unicode[idx++] = *(uint8_t *)(void *)len; 8006dea: 7dfb ldrb r3, [r7, #23] 8006dec: 1c5a adds r2, r3, #1 8006dee: 75fa strb r2, [r7, #23] 8006df0: 461a mov r2, r3 8006df2: 68bb ldr r3, [r7, #8] 8006df4: 4413 add r3, r2 8006df6: 687a ldr r2, [r7, #4] 8006df8: 7812 ldrb r2, [r2, #0] 8006dfa: 701a strb r2, [r3, #0] unicode[idx++] = USB_DESC_TYPE_STRING; 8006dfc: 7dfb ldrb r3, [r7, #23] 8006dfe: 1c5a adds r2, r3, #1 8006e00: 75fa strb r2, [r7, #23] 8006e02: 461a mov r2, r3 8006e04: 68bb ldr r3, [r7, #8] 8006e06: 4413 add r3, r2 8006e08: 2203 movs r2, #3 8006e0a: 701a strb r2, [r3, #0] while (*desc != '\0') 8006e0c: e012 b.n 8006e34 <USBD_GetString+0x74> { unicode[idx++] = *desc++; 8006e0e: 68fb ldr r3, [r7, #12] 8006e10: 1c5a adds r2, r3, #1 8006e12: 60fa str r2, [r7, #12] 8006e14: 7dfa ldrb r2, [r7, #23] 8006e16: 1c51 adds r1, r2, #1 8006e18: 75f9 strb r1, [r7, #23] 8006e1a: 4611 mov r1, r2 8006e1c: 68ba ldr r2, [r7, #8] 8006e1e: 440a add r2, r1 8006e20: 781b ldrb r3, [r3, #0] 8006e22: 7013 strb r3, [r2, #0] unicode[idx++] = 0U; 8006e24: 7dfb ldrb r3, [r7, #23] 8006e26: 1c5a adds r2, r3, #1 8006e28: 75fa strb r2, [r7, #23] 8006e2a: 461a mov r2, r3 8006e2c: 68bb ldr r3, [r7, #8] 8006e2e: 4413 add r3, r2 8006e30: 2200 movs r2, #0 8006e32: 701a strb r2, [r3, #0] while (*desc != '\0') 8006e34: 68fb ldr r3, [r7, #12] 8006e36: 781b ldrb r3, [r3, #0] 8006e38: 2b00 cmp r3, #0 8006e3a: d1e8 bne.n 8006e0e <USBD_GetString+0x4e> } } } 8006e3c: bf00 nop 8006e3e: 3718 adds r7, #24 8006e40: 46bd mov sp, r7 8006e42: bd80 pop {r7, pc} 08006e44 <USBD_GetLen>: * return the string length * @param buf : pointer to the ascii string buffer * @retval string length */ static uint8_t USBD_GetLen(uint8_t *buf) { 8006e44: b480 push {r7} 8006e46: b085 sub sp, #20 8006e48: af00 add r7, sp, #0 8006e4a: 6078 str r0, [r7, #4] uint8_t len = 0U; 8006e4c: 2300 movs r3, #0 8006e4e: 73fb strb r3, [r7, #15] while (*buf != '\0') 8006e50: e005 b.n 8006e5e <USBD_GetLen+0x1a> { len++; 8006e52: 7bfb ldrb r3, [r7, #15] 8006e54: 3301 adds r3, #1 8006e56: 73fb strb r3, [r7, #15] buf++; 8006e58: 687b ldr r3, [r7, #4] 8006e5a: 3301 adds r3, #1 8006e5c: 607b str r3, [r7, #4] while (*buf != '\0') 8006e5e: 687b ldr r3, [r7, #4] 8006e60: 781b ldrb r3, [r3, #0] 8006e62: 2b00 cmp r3, #0 8006e64: d1f5 bne.n 8006e52 <USBD_GetLen+0xe> } return len; 8006e66: 7bfb ldrb r3, [r7, #15] } 8006e68: 4618 mov r0, r3 8006e6a: 3714 adds r7, #20 8006e6c: 46bd mov sp, r7 8006e6e: bc80 pop {r7} 8006e70: 4770 bx lr 08006e72 <USBD_CtlSendData>: * @param len: length of data to be sent * @retval status */ USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev, uint8_t *pbuf, uint16_t len) { 8006e72: b580 push {r7, lr} 8006e74: b084 sub sp, #16 8006e76: af00 add r7, sp, #0 8006e78: 60f8 str r0, [r7, #12] 8006e7a: 60b9 str r1, [r7, #8] 8006e7c: 4613 mov r3, r2 8006e7e: 80fb strh r3, [r7, #6] /* Set EP0 State */ pdev->ep0_state = USBD_EP0_DATA_IN; 8006e80: 68fb ldr r3, [r7, #12] 8006e82: 2202 movs r2, #2 8006e84: f8c3 2294 str.w r2, [r3, #660] ; 0x294 pdev->ep_in[0].total_length = len; 8006e88: 88fa ldrh r2, [r7, #6] 8006e8a: 68fb ldr r3, [r7, #12] 8006e8c: 61da str r2, [r3, #28] pdev->ep_in[0].rem_length = len; 8006e8e: 88fa ldrh r2, [r7, #6] 8006e90: 68fb ldr r3, [r7, #12] 8006e92: 621a str r2, [r3, #32] /* Start the transfer */ USBD_LL_Transmit(pdev, 0x00U, pbuf, len); 8006e94: 88fb ldrh r3, [r7, #6] 8006e96: 68ba ldr r2, [r7, #8] 8006e98: 2100 movs r1, #0 8006e9a: 68f8 ldr r0, [r7, #12] 8006e9c: f000 fc7d bl 800779a <USBD_LL_Transmit> return USBD_OK; 8006ea0: 2300 movs r3, #0 } 8006ea2: 4618 mov r0, r3 8006ea4: 3710 adds r7, #16 8006ea6: 46bd mov sp, r7 8006ea8: bd80 pop {r7, pc} 08006eaa <USBD_CtlContinueSendData>: * @param len: length of data to be sent * @retval status */ USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev, uint8_t *pbuf, uint16_t len) { 8006eaa: b580 push {r7, lr} 8006eac: b084 sub sp, #16 8006eae: af00 add r7, sp, #0 8006eb0: 60f8 str r0, [r7, #12] 8006eb2: 60b9 str r1, [r7, #8] 8006eb4: 4613 mov r3, r2 8006eb6: 80fb strh r3, [r7, #6] /* Start the next transfer */ USBD_LL_Transmit(pdev, 0x00U, pbuf, len); 8006eb8: 88fb ldrh r3, [r7, #6] 8006eba: 68ba ldr r2, [r7, #8] 8006ebc: 2100 movs r1, #0 8006ebe: 68f8 ldr r0, [r7, #12] 8006ec0: f000 fc6b bl 800779a <USBD_LL_Transmit> return USBD_OK; 8006ec4: 2300 movs r3, #0 } 8006ec6: 4618 mov r0, r3 8006ec8: 3710 adds r7, #16 8006eca: 46bd mov sp, r7 8006ecc: bd80 pop {r7, pc} 08006ece <USBD_CtlPrepareRx>: * @param len: length of data to be received * @retval status */ USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev, uint8_t *pbuf, uint16_t len) { 8006ece: b580 push {r7, lr} 8006ed0: b084 sub sp, #16 8006ed2: af00 add r7, sp, #0 8006ed4: 60f8 str r0, [r7, #12] 8006ed6: 60b9 str r1, [r7, #8] 8006ed8: 4613 mov r3, r2 8006eda: 80fb strh r3, [r7, #6] /* Set EP0 State */ pdev->ep0_state = USBD_EP0_DATA_OUT; 8006edc: 68fb ldr r3, [r7, #12] 8006ede: 2203 movs r2, #3 8006ee0: f8c3 2294 str.w r2, [r3, #660] ; 0x294 pdev->ep_out[0].total_length = len; 8006ee4: 88fa ldrh r2, [r7, #6] 8006ee6: 68fb ldr r3, [r7, #12] 8006ee8: f8c3 215c str.w r2, [r3, #348] ; 0x15c pdev->ep_out[0].rem_length = len; 8006eec: 88fa ldrh r2, [r7, #6] 8006eee: 68fb ldr r3, [r7, #12] 8006ef0: f8c3 2160 str.w r2, [r3, #352] ; 0x160 /* Start the transfer */ USBD_LL_PrepareReceive(pdev, 0U, pbuf, len); 8006ef4: 88fb ldrh r3, [r7, #6] 8006ef6: 68ba ldr r2, [r7, #8] 8006ef8: 2100 movs r1, #0 8006efa: 68f8 ldr r0, [r7, #12] 8006efc: f000 fc70 bl 80077e0 <USBD_LL_PrepareReceive> return USBD_OK; 8006f00: 2300 movs r3, #0 } 8006f02: 4618 mov r0, r3 8006f04: 3710 adds r7, #16 8006f06: 46bd mov sp, r7 8006f08: bd80 pop {r7, pc} 08006f0a <USBD_CtlContinueRx>: * @param len: length of data to be received * @retval status */ USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev, uint8_t *pbuf, uint16_t len) { 8006f0a: b580 push {r7, lr} 8006f0c: b084 sub sp, #16 8006f0e: af00 add r7, sp, #0 8006f10: 60f8 str r0, [r7, #12] 8006f12: 60b9 str r1, [r7, #8] 8006f14: 4613 mov r3, r2 8006f16: 80fb strh r3, [r7, #6] USBD_LL_PrepareReceive(pdev, 0U, pbuf, len); 8006f18: 88fb ldrh r3, [r7, #6] 8006f1a: 68ba ldr r2, [r7, #8] 8006f1c: 2100 movs r1, #0 8006f1e: 68f8 ldr r0, [r7, #12] 8006f20: f000 fc5e bl 80077e0 <USBD_LL_PrepareReceive> return USBD_OK; 8006f24: 2300 movs r3, #0 } 8006f26: 4618 mov r0, r3 8006f28: 3710 adds r7, #16 8006f2a: 46bd mov sp, r7 8006f2c: bd80 pop {r7, pc} 08006f2e <USBD_CtlSendStatus>: * send zero lzngth packet on the ctl pipe * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev) { 8006f2e: b580 push {r7, lr} 8006f30: b082 sub sp, #8 8006f32: af00 add r7, sp, #0 8006f34: 6078 str r0, [r7, #4] /* Set EP0 State */ pdev->ep0_state = USBD_EP0_STATUS_IN; 8006f36: 687b ldr r3, [r7, #4] 8006f38: 2204 movs r2, #4 8006f3a: f8c3 2294 str.w r2, [r3, #660] ; 0x294 /* Start the transfer */ USBD_LL_Transmit(pdev, 0x00U, NULL, 0U); 8006f3e: 2300 movs r3, #0 8006f40: 2200 movs r2, #0 8006f42: 2100 movs r1, #0 8006f44: 6878 ldr r0, [r7, #4] 8006f46: f000 fc28 bl 800779a <USBD_LL_Transmit> return USBD_OK; 8006f4a: 2300 movs r3, #0 } 8006f4c: 4618 mov r0, r3 8006f4e: 3708 adds r7, #8 8006f50: 46bd mov sp, r7 8006f52: bd80 pop {r7, pc} 08006f54 <USBD_CtlReceiveStatus>: * receive zero lzngth packet on the ctl pipe * @param pdev: device instance * @retval status */ USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev) { 8006f54: b580 push {r7, lr} 8006f56: b082 sub sp, #8 8006f58: af00 add r7, sp, #0 8006f5a: 6078 str r0, [r7, #4] /* Set EP0 State */ pdev->ep0_state = USBD_EP0_STATUS_OUT; 8006f5c: 687b ldr r3, [r7, #4] 8006f5e: 2205 movs r2, #5 8006f60: f8c3 2294 str.w r2, [r3, #660] ; 0x294 /* Start the transfer */ USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U); 8006f64: 2300 movs r3, #0 8006f66: 2200 movs r2, #0 8006f68: 2100 movs r1, #0 8006f6a: 6878 ldr r0, [r7, #4] 8006f6c: f000 fc38 bl 80077e0 <USBD_LL_PrepareReceive> return USBD_OK; 8006f70: 2300 movs r3, #0 } 8006f72: 4618 mov r0, r3 8006f74: 3708 adds r7, #8 8006f76: 46bd mov sp, r7 8006f78: bd80 pop {r7, pc} ... 08006f7c <MX_USB_DEVICE_Init>: /** * Init USB device Library, add supported class and start the library * @retval None */ void MX_USB_DEVICE_Init(void) { 8006f7c: b580 push {r7, lr} 8006f7e: 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) 8006f80: 2200 movs r2, #0 8006f82: 4912 ldr r1, [pc, #72] ; (8006fcc <MX_USB_DEVICE_Init+0x50>) 8006f84: 4812 ldr r0, [pc, #72] ; (8006fd0 <MX_USB_DEVICE_Init+0x54>) 8006f86: f7fe ff5e bl 8005e46 <USBD_Init> 8006f8a: 4603 mov r3, r0 8006f8c: 2b00 cmp r3, #0 8006f8e: d001 beq.n 8006f94 <MX_USB_DEVICE_Init+0x18> { Error_Handler(); 8006f90: f7f9 f99c bl 80002cc <Error_Handler> } if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_CDC) != USBD_OK) 8006f94: 490f ldr r1, [pc, #60] ; (8006fd4 <MX_USB_DEVICE_Init+0x58>) 8006f96: 480e ldr r0, [pc, #56] ; (8006fd0 <MX_USB_DEVICE_Init+0x54>) 8006f98: f7fe ff80 bl 8005e9c <USBD_RegisterClass> 8006f9c: 4603 mov r3, r0 8006f9e: 2b00 cmp r3, #0 8006fa0: d001 beq.n 8006fa6 <MX_USB_DEVICE_Init+0x2a> { Error_Handler(); 8006fa2: f7f9 f993 bl 80002cc <Error_Handler> } if (USBD_CDC_RegisterInterface(&hUsbDeviceFS, &USBD_Interface_fops_FS) != USBD_OK) 8006fa6: 490c ldr r1, [pc, #48] ; (8006fd8 <MX_USB_DEVICE_Init+0x5c>) 8006fa8: 4809 ldr r0, [pc, #36] ; (8006fd0 <MX_USB_DEVICE_Init+0x54>) 8006faa: f7fe feb1 bl 8005d10 <USBD_CDC_RegisterInterface> 8006fae: 4603 mov r3, r0 8006fb0: 2b00 cmp r3, #0 8006fb2: d001 beq.n 8006fb8 <MX_USB_DEVICE_Init+0x3c> { Error_Handler(); 8006fb4: f7f9 f98a bl 80002cc <Error_Handler> } if (USBD_Start(&hUsbDeviceFS) != USBD_OK) 8006fb8: 4805 ldr r0, [pc, #20] ; (8006fd0 <MX_USB_DEVICE_Init+0x54>) 8006fba: f7fe ff88 bl 8005ece <USBD_Start> 8006fbe: 4603 mov r3, r0 8006fc0: 2b00 cmp r3, #0 8006fc2: d001 beq.n 8006fc8 <MX_USB_DEVICE_Init+0x4c> { Error_Handler(); 8006fc4: f7f9 f982 bl 80002cc <Error_Handler> } /* USER CODE BEGIN USB_DEVICE_Init_PostTreatment */ /* USER CODE END USB_DEVICE_Init_PostTreatment */ } 8006fc8: bf00 nop 8006fca: bd80 pop {r7, pc} 8006fcc: 2000012c .word 0x2000012c 8006fd0: 200001a0 .word 0x200001a0 8006fd4: 20000018 .word 0x20000018 8006fd8: 2000011c .word 0x2000011c 08006fdc <CDC_Init_FS>: /** * @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) { 8006fdc: b580 push {r7, lr} 8006fde: af00 add r7, sp, #0 /* USER CODE BEGIN 3 */ /* Set Application Buffers */ USBD_CDC_SetTxBuffer(&hUsbDeviceFS, UserTxBufferFS, 0); 8006fe0: 2200 movs r2, #0 8006fe2: 4905 ldr r1, [pc, #20] ; (8006ff8 <CDC_Init_FS+0x1c>) 8006fe4: 4805 ldr r0, [pc, #20] ; (8006ffc <CDC_Init_FS+0x20>) 8006fe6: f7fe fea9 bl 8005d3c <USBD_CDC_SetTxBuffer> USBD_CDC_SetRxBuffer(&hUsbDeviceFS, UserRxBufferFS); 8006fea: 4905 ldr r1, [pc, #20] ; (8007000 <CDC_Init_FS+0x24>) 8006fec: 4803 ldr r0, [pc, #12] ; (8006ffc <CDC_Init_FS+0x20>) 8006fee: f7fe febe bl 8005d6e <USBD_CDC_SetRxBuffer> return (USBD_OK); 8006ff2: 2300 movs r3, #0 /* USER CODE END 3 */ } 8006ff4: 4618 mov r0, r3 8006ff6: bd80 pop {r7, pc} 8006ff8: 20000868 .word 0x20000868 8006ffc: 200001a0 .word 0x200001a0 8007000: 20000468 .word 0x20000468 08007004 <CDC_DeInit_FS>: /** * @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) { 8007004: b480 push {r7} 8007006: af00 add r7, sp, #0 /* USER CODE BEGIN 4 */ return (USBD_OK); 8007008: 2300 movs r3, #0 /* USER CODE END 4 */ } 800700a: 4618 mov r0, r3 800700c: 46bd mov sp, r7 800700e: bc80 pop {r7} 8007010: 4770 bx lr ... 08007014 <CDC_Control_FS>: * @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) { 8007014: b480 push {r7} 8007016: b083 sub sp, #12 8007018: af00 add r7, sp, #0 800701a: 4603 mov r3, r0 800701c: 6039 str r1, [r7, #0] 800701e: 71fb strb r3, [r7, #7] 8007020: 4613 mov r3, r2 8007022: 80bb strh r3, [r7, #4] /* USER CODE BEGIN 5 */ switch(cmd) 8007024: 79fb ldrb r3, [r7, #7] 8007026: 2b23 cmp r3, #35 ; 0x23 8007028: d84a bhi.n 80070c0 <CDC_Control_FS+0xac> 800702a: a201 add r2, pc, #4 ; (adr r2, 8007030 <CDC_Control_FS+0x1c>) 800702c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8007030: 080070c1 .word 0x080070c1 8007034: 080070c1 .word 0x080070c1 8007038: 080070c1 .word 0x080070c1 800703c: 080070c1 .word 0x080070c1 8007040: 080070c1 .word 0x080070c1 8007044: 080070c1 .word 0x080070c1 8007048: 080070c1 .word 0x080070c1 800704c: 080070c1 .word 0x080070c1 8007050: 080070c1 .word 0x080070c1 8007054: 080070c1 .word 0x080070c1 8007058: 080070c1 .word 0x080070c1 800705c: 080070c1 .word 0x080070c1 8007060: 080070c1 .word 0x080070c1 8007064: 080070c1 .word 0x080070c1 8007068: 080070c1 .word 0x080070c1 800706c: 080070c1 .word 0x080070c1 8007070: 080070c1 .word 0x080070c1 8007074: 080070c1 .word 0x080070c1 8007078: 080070c1 .word 0x080070c1 800707c: 080070c1 .word 0x080070c1 8007080: 080070c1 .word 0x080070c1 8007084: 080070c1 .word 0x080070c1 8007088: 080070c1 .word 0x080070c1 800708c: 080070c1 .word 0x080070c1 8007090: 080070c1 .word 0x080070c1 8007094: 080070c1 .word 0x080070c1 8007098: 080070c1 .word 0x080070c1 800709c: 080070c1 .word 0x080070c1 80070a0: 080070c1 .word 0x080070c1 80070a4: 080070c1 .word 0x080070c1 80070a8: 080070c1 .word 0x080070c1 80070ac: 080070c1 .word 0x080070c1 80070b0: 080070c1 .word 0x080070c1 80070b4: 080070c1 .word 0x080070c1 80070b8: 080070c1 .word 0x080070c1 80070bc: 080070c1 .word 0x080070c1 case CDC_SEND_BREAK: break; default: break; 80070c0: bf00 nop } return (USBD_OK); 80070c2: 2300 movs r3, #0 /* USER CODE END 5 */ } 80070c4: 4618 mov r0, r3 80070c6: 370c adds r7, #12 80070c8: 46bd mov sp, r7 80070ca: bc80 pop {r7} 80070cc: 4770 bx lr 80070ce: bf00 nop 080070d0 <CDC_Receive_FS>: * @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) { 80070d0: b580 push {r7, lr} 80070d2: b082 sub sp, #8 80070d4: af00 add r7, sp, #0 80070d6: 6078 str r0, [r7, #4] 80070d8: 6039 str r1, [r7, #0] /* USER CODE BEGIN 6 */ HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_2); 80070da: 2104 movs r1, #4 80070dc: 480f ldr r0, [pc, #60] ; (800711c <CDC_Receive_FS+0x4c>) 80070de: f7f9 fc97 bl 8000a10 <HAL_GPIO_TogglePin> usb_rx_complete = 1; 80070e2: 4b0f ldr r3, [pc, #60] ; (8007120 <CDC_Receive_FS+0x50>) 80070e4: 2201 movs r2, #1 80070e6: 701a strb r2, [r3, #0] USBD_CDC_SetRxBuffer(&hUsbDeviceFS, &Buf[0]); 80070e8: 6879 ldr r1, [r7, #4] 80070ea: 480e ldr r0, [pc, #56] ; (8007124 <CDC_Receive_FS+0x54>) 80070ec: f7fe fe3f bl 8005d6e <USBD_CDC_SetRxBuffer> USBD_CDC_ReceivePacket(&hUsbDeviceFS); 80070f0: 480c ldr r0, [pc, #48] ; (8007124 <CDC_Receive_FS+0x54>) 80070f2: f7fe fe7e bl 8005df2 <USBD_CDC_ReceivePacket> USB_CDC_RxHandler(Buf, *Len); 80070f6: 683b ldr r3, [r7, #0] 80070f8: 681b ldr r3, [r3, #0] 80070fa: 4619 mov r1, r3 80070fc: 6878 ldr r0, [r7, #4] 80070fe: f7f9 f825 bl 800014c <USB_CDC_RxHandler> memset(Buf, '\0', *Len); 8007102: 683b ldr r3, [r7, #0] 8007104: 681b ldr r3, [r3, #0] 8007106: 461a mov r2, r3 8007108: 2100 movs r1, #0 800710a: 6878 ldr r0, [r7, #4] 800710c: f000 fc0e bl 800792c <memset> return (USBD_OK); 8007110: 2300 movs r3, #0 /* USER CODE END 6 */ } 8007112: 4618 mov r0, r3 8007114: 3708 adds r7, #8 8007116: 46bd mov sp, r7 8007118: bd80 pop {r7, pc} 800711a: bf00 nop 800711c: 40010c00 .word 0x40010c00 8007120: 20000464 .word 0x20000464 8007124: 200001a0 .word 0x200001a0 08007128 <CDC_Transmit_FS>: * @param Buf: Buffer of data to be sent * @param Len: Number of data to be sent (in bytes) * @retval USBD_OK if all operations are OK else USBD_FAIL or USBD_BUSY */ uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len) { 8007128: b580 push {r7, lr} 800712a: b084 sub sp, #16 800712c: af00 add r7, sp, #0 800712e: 6078 str r0, [r7, #4] 8007130: 460b mov r3, r1 8007132: 807b strh r3, [r7, #2] uint8_t result = USBD_OK; 8007134: 2300 movs r3, #0 8007136: 73fb strb r3, [r7, #15] /* USER CODE BEGIN 7 */ USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef*)hUsbDeviceFS.pClassData; 8007138: 4b0d ldr r3, [pc, #52] ; (8007170 <CDC_Transmit_FS+0x48>) 800713a: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8 800713e: 60bb str r3, [r7, #8] if (hcdc->TxState != 0){ 8007140: 68bb ldr r3, [r7, #8] 8007142: f8d3 3214 ldr.w r3, [r3, #532] ; 0x214 8007146: 2b00 cmp r3, #0 8007148: d001 beq.n 800714e <CDC_Transmit_FS+0x26> return USBD_BUSY; 800714a: 2301 movs r3, #1 800714c: e00b b.n 8007166 <CDC_Transmit_FS+0x3e> } USBD_CDC_SetTxBuffer(&hUsbDeviceFS, Buf, Len); 800714e: 887b ldrh r3, [r7, #2] 8007150: 461a mov r2, r3 8007152: 6879 ldr r1, [r7, #4] 8007154: 4806 ldr r0, [pc, #24] ; (8007170 <CDC_Transmit_FS+0x48>) 8007156: f7fe fdf1 bl 8005d3c <USBD_CDC_SetTxBuffer> result = USBD_CDC_TransmitPacket(&hUsbDeviceFS); 800715a: 4805 ldr r0, [pc, #20] ; (8007170 <CDC_Transmit_FS+0x48>) 800715c: f7fe fe1a bl 8005d94 <USBD_CDC_TransmitPacket> 8007160: 4603 mov r3, r0 8007162: 73fb strb r3, [r7, #15] /* USER CODE END 7 */ return result; 8007164: 7bfb ldrb r3, [r7, #15] } 8007166: 4618 mov r0, r3 8007168: 3710 adds r7, #16 800716a: 46bd mov sp, r7 800716c: bd80 pop {r7, pc} 800716e: bf00 nop 8007170: 200001a0 .word 0x200001a0 08007174 <USBD_FS_DeviceDescriptor>: * @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) { 8007174: b480 push {r7} 8007176: b083 sub sp, #12 8007178: af00 add r7, sp, #0 800717a: 4603 mov r3, r0 800717c: 6039 str r1, [r7, #0] 800717e: 71fb strb r3, [r7, #7] UNUSED(speed); *length = sizeof(USBD_FS_DeviceDesc); 8007180: 683b ldr r3, [r7, #0] 8007182: 2212 movs r2, #18 8007184: 801a strh r2, [r3, #0] return USBD_FS_DeviceDesc; 8007186: 4b03 ldr r3, [pc, #12] ; (8007194 <USBD_FS_DeviceDescriptor+0x20>) } 8007188: 4618 mov r0, r3 800718a: 370c adds r7, #12 800718c: 46bd mov sp, r7 800718e: bc80 pop {r7} 8007190: 4770 bx lr 8007192: bf00 nop 8007194: 20000148 .word 0x20000148 08007198 <USBD_FS_LangIDStrDescriptor>: * @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) { 8007198: b480 push {r7} 800719a: b083 sub sp, #12 800719c: af00 add r7, sp, #0 800719e: 4603 mov r3, r0 80071a0: 6039 str r1, [r7, #0] 80071a2: 71fb strb r3, [r7, #7] UNUSED(speed); *length = sizeof(USBD_LangIDDesc); 80071a4: 683b ldr r3, [r7, #0] 80071a6: 2204 movs r2, #4 80071a8: 801a strh r2, [r3, #0] return USBD_LangIDDesc; 80071aa: 4b03 ldr r3, [pc, #12] ; (80071b8 <USBD_FS_LangIDStrDescriptor+0x20>) } 80071ac: 4618 mov r0, r3 80071ae: 370c adds r7, #12 80071b0: 46bd mov sp, r7 80071b2: bc80 pop {r7} 80071b4: 4770 bx lr 80071b6: bf00 nop 80071b8: 2000015c .word 0x2000015c 080071bc <USBD_FS_ProductStrDescriptor>: * @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) { 80071bc: b580 push {r7, lr} 80071be: b082 sub sp, #8 80071c0: af00 add r7, sp, #0 80071c2: 4603 mov r3, r0 80071c4: 6039 str r1, [r7, #0] 80071c6: 71fb strb r3, [r7, #7] if(speed == 0) 80071c8: 79fb ldrb r3, [r7, #7] 80071ca: 2b00 cmp r3, #0 80071cc: d105 bne.n 80071da <USBD_FS_ProductStrDescriptor+0x1e> { USBD_GetString((uint8_t *)USBD_PRODUCT_STRING_FS, USBD_StrDesc, length); 80071ce: 683a ldr r2, [r7, #0] 80071d0: 4907 ldr r1, [pc, #28] ; (80071f0 <USBD_FS_ProductStrDescriptor+0x34>) 80071d2: 4808 ldr r0, [pc, #32] ; (80071f4 <USBD_FS_ProductStrDescriptor+0x38>) 80071d4: f7ff fdf4 bl 8006dc0 <USBD_GetString> 80071d8: e004 b.n 80071e4 <USBD_FS_ProductStrDescriptor+0x28> } else { USBD_GetString((uint8_t *)USBD_PRODUCT_STRING_FS, USBD_StrDesc, length); 80071da: 683a ldr r2, [r7, #0] 80071dc: 4904 ldr r1, [pc, #16] ; (80071f0 <USBD_FS_ProductStrDescriptor+0x34>) 80071de: 4805 ldr r0, [pc, #20] ; (80071f4 <USBD_FS_ProductStrDescriptor+0x38>) 80071e0: f7ff fdee bl 8006dc0 <USBD_GetString> } return USBD_StrDesc; 80071e4: 4b02 ldr r3, [pc, #8] ; (80071f0 <USBD_FS_ProductStrDescriptor+0x34>) } 80071e6: 4618 mov r0, r3 80071e8: 3708 adds r7, #8 80071ea: 46bd mov sp, r7 80071ec: bd80 pop {r7, pc} 80071ee: bf00 nop 80071f0: 20000c68 .word 0x20000c68 80071f4: 08007964 .word 0x08007964 080071f8 <USBD_FS_ManufacturerStrDescriptor>: * @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) { 80071f8: b580 push {r7, lr} 80071fa: b082 sub sp, #8 80071fc: af00 add r7, sp, #0 80071fe: 4603 mov r3, r0 8007200: 6039 str r1, [r7, #0] 8007202: 71fb strb r3, [r7, #7] UNUSED(speed); USBD_GetString((uint8_t *)USBD_MANUFACTURER_STRING, USBD_StrDesc, length); 8007204: 683a ldr r2, [r7, #0] 8007206: 4904 ldr r1, [pc, #16] ; (8007218 <USBD_FS_ManufacturerStrDescriptor+0x20>) 8007208: 4804 ldr r0, [pc, #16] ; (800721c <USBD_FS_ManufacturerStrDescriptor+0x24>) 800720a: f7ff fdd9 bl 8006dc0 <USBD_GetString> return USBD_StrDesc; 800720e: 4b02 ldr r3, [pc, #8] ; (8007218 <USBD_FS_ManufacturerStrDescriptor+0x20>) } 8007210: 4618 mov r0, r3 8007212: 3708 adds r7, #8 8007214: 46bd mov sp, r7 8007216: bd80 pop {r7, pc} 8007218: 20000c68 .word 0x20000c68 800721c: 08007968 .word 0x08007968 08007220 <USBD_FS_SerialStrDescriptor>: * @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) { 8007220: b580 push {r7, lr} 8007222: b082 sub sp, #8 8007224: af00 add r7, sp, #0 8007226: 4603 mov r3, r0 8007228: 6039 str r1, [r7, #0] 800722a: 71fb strb r3, [r7, #7] UNUSED(speed); *length = USB_SIZ_STRING_SERIAL; 800722c: 683b ldr r3, [r7, #0] 800722e: 221a movs r2, #26 8007230: 801a strh r2, [r3, #0] /* Update the serial number string descriptor with the data from the unique * ID */ Get_SerialNum(); 8007232: f000 f843 bl 80072bc <Get_SerialNum> /* USER CODE BEGIN USBD_FS_SerialStrDescriptor */ /* USER CODE END USBD_FS_SerialStrDescriptor */ return (uint8_t *) USBD_StringSerial; 8007236: 4b02 ldr r3, [pc, #8] ; (8007240 <USBD_FS_SerialStrDescriptor+0x20>) } 8007238: 4618 mov r0, r3 800723a: 3708 adds r7, #8 800723c: 46bd mov sp, r7 800723e: bd80 pop {r7, pc} 8007240: 20000160 .word 0x20000160 08007244 <USBD_FS_ConfigStrDescriptor>: * @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) { 8007244: b580 push {r7, lr} 8007246: b082 sub sp, #8 8007248: af00 add r7, sp, #0 800724a: 4603 mov r3, r0 800724c: 6039 str r1, [r7, #0] 800724e: 71fb strb r3, [r7, #7] if(speed == USBD_SPEED_HIGH) 8007250: 79fb ldrb r3, [r7, #7] 8007252: 2b00 cmp r3, #0 8007254: d105 bne.n 8007262 <USBD_FS_ConfigStrDescriptor+0x1e> { USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length); 8007256: 683a ldr r2, [r7, #0] 8007258: 4907 ldr r1, [pc, #28] ; (8007278 <USBD_FS_ConfigStrDescriptor+0x34>) 800725a: 4808 ldr r0, [pc, #32] ; (800727c <USBD_FS_ConfigStrDescriptor+0x38>) 800725c: f7ff fdb0 bl 8006dc0 <USBD_GetString> 8007260: e004 b.n 800726c <USBD_FS_ConfigStrDescriptor+0x28> } else { USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length); 8007262: 683a ldr r2, [r7, #0] 8007264: 4904 ldr r1, [pc, #16] ; (8007278 <USBD_FS_ConfigStrDescriptor+0x34>) 8007266: 4805 ldr r0, [pc, #20] ; (800727c <USBD_FS_ConfigStrDescriptor+0x38>) 8007268: f7ff fdaa bl 8006dc0 <USBD_GetString> } return USBD_StrDesc; 800726c: 4b02 ldr r3, [pc, #8] ; (8007278 <USBD_FS_ConfigStrDescriptor+0x34>) } 800726e: 4618 mov r0, r3 8007270: 3708 adds r7, #8 8007272: 46bd mov sp, r7 8007274: bd80 pop {r7, pc} 8007276: bf00 nop 8007278: 20000c68 .word 0x20000c68 800727c: 0800797c .word 0x0800797c 08007280 <USBD_FS_InterfaceStrDescriptor>: * @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) { 8007280: b580 push {r7, lr} 8007282: b082 sub sp, #8 8007284: af00 add r7, sp, #0 8007286: 4603 mov r3, r0 8007288: 6039 str r1, [r7, #0] 800728a: 71fb strb r3, [r7, #7] if(speed == 0) 800728c: 79fb ldrb r3, [r7, #7] 800728e: 2b00 cmp r3, #0 8007290: d105 bne.n 800729e <USBD_FS_InterfaceStrDescriptor+0x1e> { USBD_GetString((uint8_t *)USBD_INTERFACE_STRING_FS, USBD_StrDesc, length); 8007292: 683a ldr r2, [r7, #0] 8007294: 4907 ldr r1, [pc, #28] ; (80072b4 <USBD_FS_InterfaceStrDescriptor+0x34>) 8007296: 4808 ldr r0, [pc, #32] ; (80072b8 <USBD_FS_InterfaceStrDescriptor+0x38>) 8007298: f7ff fd92 bl 8006dc0 <USBD_GetString> 800729c: e004 b.n 80072a8 <USBD_FS_InterfaceStrDescriptor+0x28> } else { USBD_GetString((uint8_t *)USBD_INTERFACE_STRING_FS, USBD_StrDesc, length); 800729e: 683a ldr r2, [r7, #0] 80072a0: 4904 ldr r1, [pc, #16] ; (80072b4 <USBD_FS_InterfaceStrDescriptor+0x34>) 80072a2: 4805 ldr r0, [pc, #20] ; (80072b8 <USBD_FS_InterfaceStrDescriptor+0x38>) 80072a4: f7ff fd8c bl 8006dc0 <USBD_GetString> } return USBD_StrDesc; 80072a8: 4b02 ldr r3, [pc, #8] ; (80072b4 <USBD_FS_InterfaceStrDescriptor+0x34>) } 80072aa: 4618 mov r0, r3 80072ac: 3708 adds r7, #8 80072ae: 46bd mov sp, r7 80072b0: bd80 pop {r7, pc} 80072b2: bf00 nop 80072b4: 20000c68 .word 0x20000c68 80072b8: 08007988 .word 0x08007988 080072bc <Get_SerialNum>: * @brief Create the serial number string descriptor * @param None * @retval None */ static void Get_SerialNum(void) { 80072bc: b580 push {r7, lr} 80072be: b084 sub sp, #16 80072c0: af00 add r7, sp, #0 uint32_t deviceserial0; uint32_t deviceserial1; uint32_t deviceserial2; deviceserial0 = *(uint32_t *) DEVICE_ID1; 80072c2: 4b0f ldr r3, [pc, #60] ; (8007300 <Get_SerialNum+0x44>) 80072c4: 681b ldr r3, [r3, #0] 80072c6: 60fb str r3, [r7, #12] deviceserial1 = *(uint32_t *) DEVICE_ID2; 80072c8: 4b0e ldr r3, [pc, #56] ; (8007304 <Get_SerialNum+0x48>) 80072ca: 681b ldr r3, [r3, #0] 80072cc: 60bb str r3, [r7, #8] deviceserial2 = *(uint32_t *) DEVICE_ID3; 80072ce: 4b0e ldr r3, [pc, #56] ; (8007308 <Get_SerialNum+0x4c>) 80072d0: 681b ldr r3, [r3, #0] 80072d2: 607b str r3, [r7, #4] deviceserial0 += deviceserial2; 80072d4: 68fa ldr r2, [r7, #12] 80072d6: 687b ldr r3, [r7, #4] 80072d8: 4413 add r3, r2 80072da: 60fb str r3, [r7, #12] if (deviceserial0 != 0) 80072dc: 68fb ldr r3, [r7, #12] 80072de: 2b00 cmp r3, #0 80072e0: d009 beq.n 80072f6 <Get_SerialNum+0x3a> { IntToUnicode(deviceserial0, &USBD_StringSerial[2], 8); 80072e2: 2208 movs r2, #8 80072e4: 4909 ldr r1, [pc, #36] ; (800730c <Get_SerialNum+0x50>) 80072e6: 68f8 ldr r0, [r7, #12] 80072e8: f000 f814 bl 8007314 <IntToUnicode> IntToUnicode(deviceserial1, &USBD_StringSerial[18], 4); 80072ec: 2204 movs r2, #4 80072ee: 4908 ldr r1, [pc, #32] ; (8007310 <Get_SerialNum+0x54>) 80072f0: 68b8 ldr r0, [r7, #8] 80072f2: f000 f80f bl 8007314 <IntToUnicode> } } 80072f6: bf00 nop 80072f8: 3710 adds r7, #16 80072fa: 46bd mov sp, r7 80072fc: bd80 pop {r7, pc} 80072fe: bf00 nop 8007300: 1ffff7e8 .word 0x1ffff7e8 8007304: 1ffff7ec .word 0x1ffff7ec 8007308: 1ffff7f0 .word 0x1ffff7f0 800730c: 20000162 .word 0x20000162 8007310: 20000172 .word 0x20000172 08007314 <IntToUnicode>: * @param pbuf: pointer to the buffer * @param len: buffer length * @retval None */ static void IntToUnicode(uint32_t value, uint8_t * pbuf, uint8_t len) { 8007314: b480 push {r7} 8007316: b087 sub sp, #28 8007318: af00 add r7, sp, #0 800731a: 60f8 str r0, [r7, #12] 800731c: 60b9 str r1, [r7, #8] 800731e: 4613 mov r3, r2 8007320: 71fb strb r3, [r7, #7] uint8_t idx = 0; 8007322: 2300 movs r3, #0 8007324: 75fb strb r3, [r7, #23] for (idx = 0; idx < len; idx++) 8007326: 2300 movs r3, #0 8007328: 75fb strb r3, [r7, #23] 800732a: e027 b.n 800737c <IntToUnicode+0x68> { if (((value >> 28)) < 0xA) 800732c: 68fb ldr r3, [r7, #12] 800732e: 0f1b lsrs r3, r3, #28 8007330: 2b09 cmp r3, #9 8007332: d80b bhi.n 800734c <IntToUnicode+0x38> { pbuf[2 * idx] = (value >> 28) + '0'; 8007334: 68fb ldr r3, [r7, #12] 8007336: 0f1b lsrs r3, r3, #28 8007338: b2da uxtb r2, r3 800733a: 7dfb ldrb r3, [r7, #23] 800733c: 005b lsls r3, r3, #1 800733e: 4619 mov r1, r3 8007340: 68bb ldr r3, [r7, #8] 8007342: 440b add r3, r1 8007344: 3230 adds r2, #48 ; 0x30 8007346: b2d2 uxtb r2, r2 8007348: 701a strb r2, [r3, #0] 800734a: e00a b.n 8007362 <IntToUnicode+0x4e> } else { pbuf[2 * idx] = (value >> 28) + 'A' - 10; 800734c: 68fb ldr r3, [r7, #12] 800734e: 0f1b lsrs r3, r3, #28 8007350: b2da uxtb r2, r3 8007352: 7dfb ldrb r3, [r7, #23] 8007354: 005b lsls r3, r3, #1 8007356: 4619 mov r1, r3 8007358: 68bb ldr r3, [r7, #8] 800735a: 440b add r3, r1 800735c: 3237 adds r2, #55 ; 0x37 800735e: b2d2 uxtb r2, r2 8007360: 701a strb r2, [r3, #0] } value = value << 4; 8007362: 68fb ldr r3, [r7, #12] 8007364: 011b lsls r3, r3, #4 8007366: 60fb str r3, [r7, #12] pbuf[2 * idx + 1] = 0; 8007368: 7dfb ldrb r3, [r7, #23] 800736a: 005b lsls r3, r3, #1 800736c: 3301 adds r3, #1 800736e: 68ba ldr r2, [r7, #8] 8007370: 4413 add r3, r2 8007372: 2200 movs r2, #0 8007374: 701a strb r2, [r3, #0] for (idx = 0; idx < len; idx++) 8007376: 7dfb ldrb r3, [r7, #23] 8007378: 3301 adds r3, #1 800737a: 75fb strb r3, [r7, #23] 800737c: 7dfa ldrb r2, [r7, #23] 800737e: 79fb ldrb r3, [r7, #7] 8007380: 429a cmp r2, r3 8007382: d3d3 bcc.n 800732c <IntToUnicode+0x18> } } 8007384: bf00 nop 8007386: bf00 nop 8007388: 371c adds r7, #28 800738a: 46bd mov sp, r7 800738c: bc80 pop {r7} 800738e: 4770 bx lr 08007390 <HAL_PCD_MspInit>: LL Driver Callbacks (PCD -> USB Device Library) *******************************************************************************/ /* MSP Init */ void HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle) { 8007390: b580 push {r7, lr} 8007392: b084 sub sp, #16 8007394: af00 add r7, sp, #0 8007396: 6078 str r0, [r7, #4] if(pcdHandle->Instance==USB) 8007398: 687b ldr r3, [r7, #4] 800739a: 681b ldr r3, [r3, #0] 800739c: 4a0d ldr r2, [pc, #52] ; (80073d4 <HAL_PCD_MspInit+0x44>) 800739e: 4293 cmp r3, r2 80073a0: d113 bne.n 80073ca <HAL_PCD_MspInit+0x3a> { /* USER CODE BEGIN USB_MspInit 0 */ /* USER CODE END USB_MspInit 0 */ /* Peripheral clock enable */ __HAL_RCC_USB_CLK_ENABLE(); 80073a2: 4b0d ldr r3, [pc, #52] ; (80073d8 <HAL_PCD_MspInit+0x48>) 80073a4: 69db ldr r3, [r3, #28] 80073a6: 4a0c ldr r2, [pc, #48] ; (80073d8 <HAL_PCD_MspInit+0x48>) 80073a8: f443 0300 orr.w r3, r3, #8388608 ; 0x800000 80073ac: 61d3 str r3, [r2, #28] 80073ae: 4b0a ldr r3, [pc, #40] ; (80073d8 <HAL_PCD_MspInit+0x48>) 80073b0: 69db ldr r3, [r3, #28] 80073b2: f403 0300 and.w r3, r3, #8388608 ; 0x800000 80073b6: 60fb str r3, [r7, #12] 80073b8: 68fb ldr r3, [r7, #12] /* Peripheral interrupt init */ HAL_NVIC_SetPriority(USB_LP_CAN1_RX0_IRQn, 0, 0); 80073ba: 2200 movs r2, #0 80073bc: 2100 movs r1, #0 80073be: 2014 movs r0, #20 80073c0: f7f9 f953 bl 800066a <HAL_NVIC_SetPriority> HAL_NVIC_EnableIRQ(USB_LP_CAN1_RX0_IRQn); 80073c4: 2014 movs r0, #20 80073c6: f7f9 f96c bl 80006a2 <HAL_NVIC_EnableIRQ> /* USER CODE BEGIN USB_MspInit 1 */ /* USER CODE END USB_MspInit 1 */ } } 80073ca: bf00 nop 80073cc: 3710 adds r7, #16 80073ce: 46bd mov sp, r7 80073d0: bd80 pop {r7, pc} 80073d2: bf00 nop 80073d4: 40005c00 .word 0x40005c00 80073d8: 40021000 .word 0x40021000 080073dc <HAL_PCD_SetupStageCallback>: #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 */ { 80073dc: b580 push {r7, lr} 80073de: b082 sub sp, #8 80073e0: af00 add r7, sp, #0 80073e2: 6078 str r0, [r7, #4] USBD_LL_SetupStage((USBD_HandleTypeDef*)hpcd->pData, (uint8_t *)hpcd->Setup); 80073e4: 687b ldr r3, [r7, #4] 80073e6: f8d3 22e8 ldr.w r2, [r3, #744] ; 0x2e8 80073ea: 687b ldr r3, [r7, #4] 80073ec: f503 732c add.w r3, r3, #688 ; 0x2b0 80073f0: 4619 mov r1, r3 80073f2: 4610 mov r0, r2 80073f4: f7fe fdb3 bl 8005f5e <USBD_LL_SetupStage> } 80073f8: bf00 nop 80073fa: 3708 adds r7, #8 80073fc: 46bd mov sp, r7 80073fe: bd80 pop {r7, pc} 08007400 <HAL_PCD_DataOutStageCallback>: #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 */ { 8007400: b580 push {r7, lr} 8007402: b082 sub sp, #8 8007404: af00 add r7, sp, #0 8007406: 6078 str r0, [r7, #4] 8007408: 460b mov r3, r1 800740a: 70fb strb r3, [r7, #3] USBD_LL_DataOutStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->OUT_ep[epnum].xfer_buff); 800740c: 687b ldr r3, [r7, #4] 800740e: f8d3 02e8 ldr.w r0, [r3, #744] ; 0x2e8 8007412: 78fa ldrb r2, [r7, #3] 8007414: 6879 ldr r1, [r7, #4] 8007416: 4613 mov r3, r2 8007418: 009b lsls r3, r3, #2 800741a: 4413 add r3, r2 800741c: 00db lsls r3, r3, #3 800741e: 440b add r3, r1 8007420: f503 73be add.w r3, r3, #380 ; 0x17c 8007424: 681a ldr r2, [r3, #0] 8007426: 78fb ldrb r3, [r7, #3] 8007428: 4619 mov r1, r3 800742a: f7fe fde5 bl 8005ff8 <USBD_LL_DataOutStage> } 800742e: bf00 nop 8007430: 3708 adds r7, #8 8007432: 46bd mov sp, r7 8007434: bd80 pop {r7, pc} 08007436 <HAL_PCD_DataInStageCallback>: #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 */ { 8007436: b580 push {r7, lr} 8007438: b082 sub sp, #8 800743a: af00 add r7, sp, #0 800743c: 6078 str r0, [r7, #4] 800743e: 460b mov r3, r1 8007440: 70fb strb r3, [r7, #3] USBD_LL_DataInStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->IN_ep[epnum].xfer_buff); 8007442: 687b ldr r3, [r7, #4] 8007444: f8d3 02e8 ldr.w r0, [r3, #744] ; 0x2e8 8007448: 78fa ldrb r2, [r7, #3] 800744a: 6879 ldr r1, [r7, #4] 800744c: 4613 mov r3, r2 800744e: 009b lsls r3, r3, #2 8007450: 4413 add r3, r2 8007452: 00db lsls r3, r3, #3 8007454: 440b add r3, r1 8007456: 333c adds r3, #60 ; 0x3c 8007458: 681a ldr r2, [r3, #0] 800745a: 78fb ldrb r3, [r7, #3] 800745c: 4619 mov r1, r3 800745e: f7fe fe3c bl 80060da <USBD_LL_DataInStage> } 8007462: bf00 nop 8007464: 3708 adds r7, #8 8007466: 46bd mov sp, r7 8007468: bd80 pop {r7, pc} 0800746a <HAL_PCD_SOFCallback>: #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 */ { 800746a: b580 push {r7, lr} 800746c: b082 sub sp, #8 800746e: af00 add r7, sp, #0 8007470: 6078 str r0, [r7, #4] USBD_LL_SOF((USBD_HandleTypeDef*)hpcd->pData); 8007472: 687b ldr r3, [r7, #4] 8007474: f8d3 32e8 ldr.w r3, [r3, #744] ; 0x2e8 8007478: 4618 mov r0, r3 800747a: f7fe ff4c bl 8006316 <USBD_LL_SOF> } 800747e: bf00 nop 8007480: 3708 adds r7, #8 8007482: 46bd mov sp, r7 8007484: bd80 pop {r7, pc} 08007486 <HAL_PCD_ResetCallback>: #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 */ { 8007486: b580 push {r7, lr} 8007488: b084 sub sp, #16 800748a: af00 add r7, sp, #0 800748c: 6078 str r0, [r7, #4] USBD_SpeedTypeDef speed = USBD_SPEED_FULL; 800748e: 2301 movs r3, #1 8007490: 73fb strb r3, [r7, #15] if ( hpcd->Init.speed != PCD_SPEED_FULL) 8007492: 687b ldr r3, [r7, #4] 8007494: 689b ldr r3, [r3, #8] 8007496: 2b02 cmp r3, #2 8007498: d001 beq.n 800749e <HAL_PCD_ResetCallback+0x18> { Error_Handler(); 800749a: f7f8 ff17 bl 80002cc <Error_Handler> } /* Set Speed. */ USBD_LL_SetSpeed((USBD_HandleTypeDef*)hpcd->pData, speed); 800749e: 687b ldr r3, [r7, #4] 80074a0: f8d3 32e8 ldr.w r3, [r3, #744] ; 0x2e8 80074a4: 7bfa ldrb r2, [r7, #15] 80074a6: 4611 mov r1, r2 80074a8: 4618 mov r0, r3 80074aa: f7fe fefc bl 80062a6 <USBD_LL_SetSpeed> /* Reset Device. */ USBD_LL_Reset((USBD_HandleTypeDef*)hpcd->pData); 80074ae: 687b ldr r3, [r7, #4] 80074b0: f8d3 32e8 ldr.w r3, [r3, #744] ; 0x2e8 80074b4: 4618 mov r0, r3 80074b6: f7fe feb5 bl 8006224 <USBD_LL_Reset> } 80074ba: bf00 nop 80074bc: 3710 adds r7, #16 80074be: 46bd mov sp, r7 80074c0: bd80 pop {r7, pc} ... 080074c4 <HAL_PCD_SuspendCallback>: #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 */ { 80074c4: b580 push {r7, lr} 80074c6: b082 sub sp, #8 80074c8: af00 add r7, sp, #0 80074ca: 6078 str r0, [r7, #4] /* Inform USB library that core enters in suspend Mode. */ USBD_LL_Suspend((USBD_HandleTypeDef*)hpcd->pData); 80074cc: 687b ldr r3, [r7, #4] 80074ce: f8d3 32e8 ldr.w r3, [r3, #744] ; 0x2e8 80074d2: 4618 mov r0, r3 80074d4: f7fe fef6 bl 80062c4 <USBD_LL_Suspend> /* Enter in STOP mode. */ /* USER CODE BEGIN 2 */ if (hpcd->Init.low_power_enable) 80074d8: 687b ldr r3, [r7, #4] 80074da: 699b ldr r3, [r3, #24] 80074dc: 2b00 cmp r3, #0 80074de: d005 beq.n 80074ec <HAL_PCD_SuspendCallback+0x28> { /* Set SLEEPDEEP bit and SleepOnExit of Cortex System Control Register. */ SCB->SCR |= (uint32_t)((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk)); 80074e0: 4b04 ldr r3, [pc, #16] ; (80074f4 <HAL_PCD_SuspendCallback+0x30>) 80074e2: 691b ldr r3, [r3, #16] 80074e4: 4a03 ldr r2, [pc, #12] ; (80074f4 <HAL_PCD_SuspendCallback+0x30>) 80074e6: f043 0306 orr.w r3, r3, #6 80074ea: 6113 str r3, [r2, #16] } /* USER CODE END 2 */ } 80074ec: bf00 nop 80074ee: 3708 adds r7, #8 80074f0: 46bd mov sp, r7 80074f2: bd80 pop {r7, pc} 80074f4: e000ed00 .word 0xe000ed00 080074f8 <HAL_PCD_ResumeCallback>: #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 */ { 80074f8: b580 push {r7, lr} 80074fa: b082 sub sp, #8 80074fc: af00 add r7, sp, #0 80074fe: 6078 str r0, [r7, #4] /* USER CODE BEGIN 3 */ /* USER CODE END 3 */ USBD_LL_Resume((USBD_HandleTypeDef*)hpcd->pData); 8007500: 687b ldr r3, [r7, #4] 8007502: f8d3 32e8 ldr.w r3, [r3, #744] ; 0x2e8 8007506: 4618 mov r0, r3 8007508: f7fe fef0 bl 80062ec <USBD_LL_Resume> } 800750c: bf00 nop 800750e: 3708 adds r7, #8 8007510: 46bd mov sp, r7 8007512: bd80 pop {r7, pc} 08007514 <USBD_LL_Init>: * @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) { 8007514: b580 push {r7, lr} 8007516: b082 sub sp, #8 8007518: af00 add r7, sp, #0 800751a: 6078 str r0, [r7, #4] /* Init USB Ip. */ /* Link the driver to the stack. */ hpcd_USB_FS.pData = pdev; 800751c: 4a28 ldr r2, [pc, #160] ; (80075c0 <USBD_LL_Init+0xac>) 800751e: 687b ldr r3, [r7, #4] 8007520: f8c2 32e8 str.w r3, [r2, #744] ; 0x2e8 pdev->pData = &hpcd_USB_FS; 8007524: 687b ldr r3, [r7, #4] 8007526: 4a26 ldr r2, [pc, #152] ; (80075c0 <USBD_LL_Init+0xac>) 8007528: f8c3 22c0 str.w r2, [r3, #704] ; 0x2c0 hpcd_USB_FS.Instance = USB; 800752c: 4b24 ldr r3, [pc, #144] ; (80075c0 <USBD_LL_Init+0xac>) 800752e: 4a25 ldr r2, [pc, #148] ; (80075c4 <USBD_LL_Init+0xb0>) 8007530: 601a str r2, [r3, #0] hpcd_USB_FS.Init.dev_endpoints = 8; 8007532: 4b23 ldr r3, [pc, #140] ; (80075c0 <USBD_LL_Init+0xac>) 8007534: 2208 movs r2, #8 8007536: 605a str r2, [r3, #4] hpcd_USB_FS.Init.speed = PCD_SPEED_FULL; 8007538: 4b21 ldr r3, [pc, #132] ; (80075c0 <USBD_LL_Init+0xac>) 800753a: 2202 movs r2, #2 800753c: 609a str r2, [r3, #8] hpcd_USB_FS.Init.low_power_enable = DISABLE; 800753e: 4b20 ldr r3, [pc, #128] ; (80075c0 <USBD_LL_Init+0xac>) 8007540: 2200 movs r2, #0 8007542: 619a str r2, [r3, #24] hpcd_USB_FS.Init.lpm_enable = DISABLE; 8007544: 4b1e ldr r3, [pc, #120] ; (80075c0 <USBD_LL_Init+0xac>) 8007546: 2200 movs r2, #0 8007548: 61da str r2, [r3, #28] hpcd_USB_FS.Init.battery_charging_enable = DISABLE; 800754a: 4b1d ldr r3, [pc, #116] ; (80075c0 <USBD_LL_Init+0xac>) 800754c: 2200 movs r2, #0 800754e: 621a str r2, [r3, #32] if (HAL_PCD_Init(&hpcd_USB_FS) != HAL_OK) 8007550: 481b ldr r0, [pc, #108] ; (80075c0 <USBD_LL_Init+0xac>) 8007552: f7f9 fa76 bl 8000a42 <HAL_PCD_Init> 8007556: 4603 mov r3, r0 8007558: 2b00 cmp r3, #0 800755a: d001 beq.n 8007560 <USBD_LL_Init+0x4c> { Error_Handler( ); 800755c: f7f8 feb6 bl 80002cc <Error_Handler> 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); 8007560: 687b ldr r3, [r7, #4] 8007562: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 8007566: 2318 movs r3, #24 8007568: 2200 movs r2, #0 800756a: 2100 movs r1, #0 800756c: f7fa feea bl 8002344 <HAL_PCDEx_PMAConfig> HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x80 , PCD_SNG_BUF, 0x58); 8007570: 687b ldr r3, [r7, #4] 8007572: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 8007576: 2358 movs r3, #88 ; 0x58 8007578: 2200 movs r2, #0 800757a: 2180 movs r1, #128 ; 0x80 800757c: f7fa fee2 bl 8002344 <HAL_PCDEx_PMAConfig> /* USER CODE END EndPoint_Configuration */ /* USER CODE BEGIN EndPoint_Configuration_CDC */ HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x81 , PCD_SNG_BUF, 0xC0); 8007580: 687b ldr r3, [r7, #4] 8007582: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 8007586: 23c0 movs r3, #192 ; 0xc0 8007588: 2200 movs r2, #0 800758a: 2181 movs r1, #129 ; 0x81 800758c: f7fa feda bl 8002344 <HAL_PCDEx_PMAConfig> HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x01 , PCD_SNG_BUF, 0x110); 8007590: 687b ldr r3, [r7, #4] 8007592: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 8007596: f44f 7388 mov.w r3, #272 ; 0x110 800759a: 2200 movs r2, #0 800759c: 2101 movs r1, #1 800759e: f7fa fed1 bl 8002344 <HAL_PCDEx_PMAConfig> HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x82 , PCD_SNG_BUF, 0x100); 80075a2: 687b ldr r3, [r7, #4] 80075a4: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 80075a8: f44f 7380 mov.w r3, #256 ; 0x100 80075ac: 2200 movs r2, #0 80075ae: 2182 movs r1, #130 ; 0x82 80075b0: f7fa fec8 bl 8002344 <HAL_PCDEx_PMAConfig> /* USER CODE END EndPoint_Configuration_CDC */ return USBD_OK; 80075b4: 2300 movs r3, #0 } 80075b6: 4618 mov r0, r3 80075b8: 3708 adds r7, #8 80075ba: 46bd mov sp, r7 80075bc: bd80 pop {r7, pc} 80075be: bf00 nop 80075c0: 20000e68 .word 0x20000e68 80075c4: 40005c00 .word 0x40005c00 080075c8 <USBD_LL_Start>: * @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) { 80075c8: b580 push {r7, lr} 80075ca: b084 sub sp, #16 80075cc: af00 add r7, sp, #0 80075ce: 6078 str r0, [r7, #4] HAL_StatusTypeDef hal_status = HAL_OK; 80075d0: 2300 movs r3, #0 80075d2: 73fb strb r3, [r7, #15] USBD_StatusTypeDef usb_status = USBD_OK; 80075d4: 2300 movs r3, #0 80075d6: 73bb strb r3, [r7, #14] hal_status = HAL_PCD_Start(pdev->pData); 80075d8: 687b ldr r3, [r7, #4] 80075da: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 80075de: 4618 mov r0, r3 80075e0: f7f9 fb3a bl 8000c58 <HAL_PCD_Start> 80075e4: 4603 mov r3, r0 80075e6: 73fb strb r3, [r7, #15] usb_status = USBD_Get_USB_Status(hal_status); 80075e8: 7bfb ldrb r3, [r7, #15] 80075ea: 4618 mov r0, r3 80075ec: f000 f94e bl 800788c <USBD_Get_USB_Status> 80075f0: 4603 mov r3, r0 80075f2: 73bb strb r3, [r7, #14] return usb_status; 80075f4: 7bbb ldrb r3, [r7, #14] } 80075f6: 4618 mov r0, r3 80075f8: 3710 adds r7, #16 80075fa: 46bd mov sp, r7 80075fc: bd80 pop {r7, pc} 080075fe <USBD_LL_OpenEP>: * @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) { 80075fe: b580 push {r7, lr} 8007600: b084 sub sp, #16 8007602: af00 add r7, sp, #0 8007604: 6078 str r0, [r7, #4] 8007606: 4608 mov r0, r1 8007608: 4611 mov r1, r2 800760a: 461a mov r2, r3 800760c: 4603 mov r3, r0 800760e: 70fb strb r3, [r7, #3] 8007610: 460b mov r3, r1 8007612: 70bb strb r3, [r7, #2] 8007614: 4613 mov r3, r2 8007616: 803b strh r3, [r7, #0] HAL_StatusTypeDef hal_status = HAL_OK; 8007618: 2300 movs r3, #0 800761a: 73fb strb r3, [r7, #15] USBD_StatusTypeDef usb_status = USBD_OK; 800761c: 2300 movs r3, #0 800761e: 73bb strb r3, [r7, #14] hal_status = HAL_PCD_EP_Open(pdev->pData, ep_addr, ep_mps, ep_type); 8007620: 687b ldr r3, [r7, #4] 8007622: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 8007626: 78bb ldrb r3, [r7, #2] 8007628: 883a ldrh r2, [r7, #0] 800762a: 78f9 ldrb r1, [r7, #3] 800762c: f7f9 fcb2 bl 8000f94 <HAL_PCD_EP_Open> 8007630: 4603 mov r3, r0 8007632: 73fb strb r3, [r7, #15] usb_status = USBD_Get_USB_Status(hal_status); 8007634: 7bfb ldrb r3, [r7, #15] 8007636: 4618 mov r0, r3 8007638: f000 f928 bl 800788c <USBD_Get_USB_Status> 800763c: 4603 mov r3, r0 800763e: 73bb strb r3, [r7, #14] return usb_status; 8007640: 7bbb ldrb r3, [r7, #14] } 8007642: 4618 mov r0, r3 8007644: 3710 adds r7, #16 8007646: 46bd mov sp, r7 8007648: bd80 pop {r7, pc} 0800764a <USBD_LL_CloseEP>: * @param pdev: Device handle * @param ep_addr: Endpoint number * @retval USBD status */ USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { 800764a: b580 push {r7, lr} 800764c: b084 sub sp, #16 800764e: af00 add r7, sp, #0 8007650: 6078 str r0, [r7, #4] 8007652: 460b mov r3, r1 8007654: 70fb strb r3, [r7, #3] HAL_StatusTypeDef hal_status = HAL_OK; 8007656: 2300 movs r3, #0 8007658: 73fb strb r3, [r7, #15] USBD_StatusTypeDef usb_status = USBD_OK; 800765a: 2300 movs r3, #0 800765c: 73bb strb r3, [r7, #14] hal_status = HAL_PCD_EP_Close(pdev->pData, ep_addr); 800765e: 687b ldr r3, [r7, #4] 8007660: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 8007664: 78fa ldrb r2, [r7, #3] 8007666: 4611 mov r1, r2 8007668: 4618 mov r0, r3 800766a: f7f9 fcf9 bl 8001060 <HAL_PCD_EP_Close> 800766e: 4603 mov r3, r0 8007670: 73fb strb r3, [r7, #15] usb_status = USBD_Get_USB_Status(hal_status); 8007672: 7bfb ldrb r3, [r7, #15] 8007674: 4618 mov r0, r3 8007676: f000 f909 bl 800788c <USBD_Get_USB_Status> 800767a: 4603 mov r3, r0 800767c: 73bb strb r3, [r7, #14] return usb_status; 800767e: 7bbb ldrb r3, [r7, #14] } 8007680: 4618 mov r0, r3 8007682: 3710 adds r7, #16 8007684: 46bd mov sp, r7 8007686: bd80 pop {r7, pc} 08007688 <USBD_LL_StallEP>: * @param pdev: Device handle * @param ep_addr: Endpoint number * @retval USBD status */ USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { 8007688: b580 push {r7, lr} 800768a: b084 sub sp, #16 800768c: af00 add r7, sp, #0 800768e: 6078 str r0, [r7, #4] 8007690: 460b mov r3, r1 8007692: 70fb strb r3, [r7, #3] HAL_StatusTypeDef hal_status = HAL_OK; 8007694: 2300 movs r3, #0 8007696: 73fb strb r3, [r7, #15] USBD_StatusTypeDef usb_status = USBD_OK; 8007698: 2300 movs r3, #0 800769a: 73bb strb r3, [r7, #14] hal_status = HAL_PCD_EP_SetStall(pdev->pData, ep_addr); 800769c: 687b ldr r3, [r7, #4] 800769e: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 80076a2: 78fa ldrb r2, [r7, #3] 80076a4: 4611 mov r1, r2 80076a6: 4618 mov r0, r3 80076a8: f7f9 fdb9 bl 800121e <HAL_PCD_EP_SetStall> 80076ac: 4603 mov r3, r0 80076ae: 73fb strb r3, [r7, #15] usb_status = USBD_Get_USB_Status(hal_status); 80076b0: 7bfb ldrb r3, [r7, #15] 80076b2: 4618 mov r0, r3 80076b4: f000 f8ea bl 800788c <USBD_Get_USB_Status> 80076b8: 4603 mov r3, r0 80076ba: 73bb strb r3, [r7, #14] return usb_status; 80076bc: 7bbb ldrb r3, [r7, #14] } 80076be: 4618 mov r0, r3 80076c0: 3710 adds r7, #16 80076c2: 46bd mov sp, r7 80076c4: bd80 pop {r7, pc} 080076c6 <USBD_LL_ClearStallEP>: * @param pdev: Device handle * @param ep_addr: Endpoint number * @retval USBD status */ USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { 80076c6: b580 push {r7, lr} 80076c8: b084 sub sp, #16 80076ca: af00 add r7, sp, #0 80076cc: 6078 str r0, [r7, #4] 80076ce: 460b mov r3, r1 80076d0: 70fb strb r3, [r7, #3] HAL_StatusTypeDef hal_status = HAL_OK; 80076d2: 2300 movs r3, #0 80076d4: 73fb strb r3, [r7, #15] USBD_StatusTypeDef usb_status = USBD_OK; 80076d6: 2300 movs r3, #0 80076d8: 73bb strb r3, [r7, #14] hal_status = HAL_PCD_EP_ClrStall(pdev->pData, ep_addr); 80076da: 687b ldr r3, [r7, #4] 80076dc: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 80076e0: 78fa ldrb r2, [r7, #3] 80076e2: 4611 mov r1, r2 80076e4: 4618 mov r0, r3 80076e6: f7f9 fdfa bl 80012de <HAL_PCD_EP_ClrStall> 80076ea: 4603 mov r3, r0 80076ec: 73fb strb r3, [r7, #15] usb_status = USBD_Get_USB_Status(hal_status); 80076ee: 7bfb ldrb r3, [r7, #15] 80076f0: 4618 mov r0, r3 80076f2: f000 f8cb bl 800788c <USBD_Get_USB_Status> 80076f6: 4603 mov r3, r0 80076f8: 73bb strb r3, [r7, #14] return usb_status; 80076fa: 7bbb ldrb r3, [r7, #14] } 80076fc: 4618 mov r0, r3 80076fe: 3710 adds r7, #16 8007700: 46bd mov sp, r7 8007702: bd80 pop {r7, pc} 08007704 <USBD_LL_IsStallEP>: * @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) { 8007704: b480 push {r7} 8007706: b085 sub sp, #20 8007708: af00 add r7, sp, #0 800770a: 6078 str r0, [r7, #4] 800770c: 460b mov r3, r1 800770e: 70fb strb r3, [r7, #3] PCD_HandleTypeDef *hpcd = (PCD_HandleTypeDef*) pdev->pData; 8007710: 687b ldr r3, [r7, #4] 8007712: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 8007716: 60fb str r3, [r7, #12] if((ep_addr & 0x80) == 0x80) 8007718: f997 3003 ldrsb.w r3, [r7, #3] 800771c: 2b00 cmp r3, #0 800771e: da0c bge.n 800773a <USBD_LL_IsStallEP+0x36> { return hpcd->IN_ep[ep_addr & 0x7F].is_stall; 8007720: 78fb ldrb r3, [r7, #3] 8007722: f003 037f and.w r3, r3, #127 ; 0x7f 8007726: 68f9 ldr r1, [r7, #12] 8007728: 1c5a adds r2, r3, #1 800772a: 4613 mov r3, r2 800772c: 009b lsls r3, r3, #2 800772e: 4413 add r3, r2 8007730: 00db lsls r3, r3, #3 8007732: 440b add r3, r1 8007734: 3302 adds r3, #2 8007736: 781b ldrb r3, [r3, #0] 8007738: e00b b.n 8007752 <USBD_LL_IsStallEP+0x4e> } else { return hpcd->OUT_ep[ep_addr & 0x7F].is_stall; 800773a: 78fb ldrb r3, [r7, #3] 800773c: f003 027f and.w r2, r3, #127 ; 0x7f 8007740: 68f9 ldr r1, [r7, #12] 8007742: 4613 mov r3, r2 8007744: 009b lsls r3, r3, #2 8007746: 4413 add r3, r2 8007748: 00db lsls r3, r3, #3 800774a: 440b add r3, r1 800774c: f503 73b5 add.w r3, r3, #362 ; 0x16a 8007750: 781b ldrb r3, [r3, #0] } } 8007752: 4618 mov r0, r3 8007754: 3714 adds r7, #20 8007756: 46bd mov sp, r7 8007758: bc80 pop {r7} 800775a: 4770 bx lr 0800775c <USBD_LL_SetUSBAddress>: * @param pdev: Device handle * @param dev_addr: Device address * @retval USBD status */ USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr) { 800775c: b580 push {r7, lr} 800775e: b084 sub sp, #16 8007760: af00 add r7, sp, #0 8007762: 6078 str r0, [r7, #4] 8007764: 460b mov r3, r1 8007766: 70fb strb r3, [r7, #3] HAL_StatusTypeDef hal_status = HAL_OK; 8007768: 2300 movs r3, #0 800776a: 73fb strb r3, [r7, #15] USBD_StatusTypeDef usb_status = USBD_OK; 800776c: 2300 movs r3, #0 800776e: 73bb strb r3, [r7, #14] hal_status = HAL_PCD_SetAddress(pdev->pData, dev_addr); 8007770: 687b ldr r3, [r7, #4] 8007772: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 8007776: 78fa ldrb r2, [r7, #3] 8007778: 4611 mov r1, r2 800777a: 4618 mov r0, r3 800777c: f7f9 fbe5 bl 8000f4a <HAL_PCD_SetAddress> 8007780: 4603 mov r3, r0 8007782: 73fb strb r3, [r7, #15] usb_status = USBD_Get_USB_Status(hal_status); 8007784: 7bfb ldrb r3, [r7, #15] 8007786: 4618 mov r0, r3 8007788: f000 f880 bl 800788c <USBD_Get_USB_Status> 800778c: 4603 mov r3, r0 800778e: 73bb strb r3, [r7, #14] return usb_status; 8007790: 7bbb ldrb r3, [r7, #14] } 8007792: 4618 mov r0, r3 8007794: 3710 adds r7, #16 8007796: 46bd mov sp, r7 8007798: bd80 pop {r7, pc} 0800779a <USBD_LL_Transmit>: * @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) { 800779a: b580 push {r7, lr} 800779c: b086 sub sp, #24 800779e: af00 add r7, sp, #0 80077a0: 60f8 str r0, [r7, #12] 80077a2: 607a str r2, [r7, #4] 80077a4: 461a mov r2, r3 80077a6: 460b mov r3, r1 80077a8: 72fb strb r3, [r7, #11] 80077aa: 4613 mov r3, r2 80077ac: 813b strh r3, [r7, #8] HAL_StatusTypeDef hal_status = HAL_OK; 80077ae: 2300 movs r3, #0 80077b0: 75fb strb r3, [r7, #23] USBD_StatusTypeDef usb_status = USBD_OK; 80077b2: 2300 movs r3, #0 80077b4: 75bb strb r3, [r7, #22] hal_status = HAL_PCD_EP_Transmit(pdev->pData, ep_addr, pbuf, size); 80077b6: 68fb ldr r3, [r7, #12] 80077b8: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 80077bc: 893b ldrh r3, [r7, #8] 80077be: 7af9 ldrb r1, [r7, #11] 80077c0: 687a ldr r2, [r7, #4] 80077c2: f7f9 fce9 bl 8001198 <HAL_PCD_EP_Transmit> 80077c6: 4603 mov r3, r0 80077c8: 75fb strb r3, [r7, #23] usb_status = USBD_Get_USB_Status(hal_status); 80077ca: 7dfb ldrb r3, [r7, #23] 80077cc: 4618 mov r0, r3 80077ce: f000 f85d bl 800788c <USBD_Get_USB_Status> 80077d2: 4603 mov r3, r0 80077d4: 75bb strb r3, [r7, #22] return usb_status; 80077d6: 7dbb ldrb r3, [r7, #22] } 80077d8: 4618 mov r0, r3 80077da: 3718 adds r7, #24 80077dc: 46bd mov sp, r7 80077de: bd80 pop {r7, pc} 080077e0 <USBD_LL_PrepareReceive>: * @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) { 80077e0: b580 push {r7, lr} 80077e2: b086 sub sp, #24 80077e4: af00 add r7, sp, #0 80077e6: 60f8 str r0, [r7, #12] 80077e8: 607a str r2, [r7, #4] 80077ea: 461a mov r2, r3 80077ec: 460b mov r3, r1 80077ee: 72fb strb r3, [r7, #11] 80077f0: 4613 mov r3, r2 80077f2: 813b strh r3, [r7, #8] HAL_StatusTypeDef hal_status = HAL_OK; 80077f4: 2300 movs r3, #0 80077f6: 75fb strb r3, [r7, #23] USBD_StatusTypeDef usb_status = USBD_OK; 80077f8: 2300 movs r3, #0 80077fa: 75bb strb r3, [r7, #22] hal_status = HAL_PCD_EP_Receive(pdev->pData, ep_addr, pbuf, size); 80077fc: 68fb ldr r3, [r7, #12] 80077fe: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0 8007802: 893b ldrh r3, [r7, #8] 8007804: 7af9 ldrb r1, [r7, #11] 8007806: 687a ldr r2, [r7, #4] 8007808: f7f9 fc72 bl 80010f0 <HAL_PCD_EP_Receive> 800780c: 4603 mov r3, r0 800780e: 75fb strb r3, [r7, #23] usb_status = USBD_Get_USB_Status(hal_status); 8007810: 7dfb ldrb r3, [r7, #23] 8007812: 4618 mov r0, r3 8007814: f000 f83a bl 800788c <USBD_Get_USB_Status> 8007818: 4603 mov r3, r0 800781a: 75bb strb r3, [r7, #22] return usb_status; 800781c: 7dbb ldrb r3, [r7, #22] } 800781e: 4618 mov r0, r3 8007820: 3718 adds r7, #24 8007822: 46bd mov sp, r7 8007824: bd80 pop {r7, pc} 08007826 <USBD_LL_GetRxDataSize>: * @param pdev: Device handle * @param ep_addr: Endpoint number * @retval Received Data Size */ uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { 8007826: b580 push {r7, lr} 8007828: b082 sub sp, #8 800782a: af00 add r7, sp, #0 800782c: 6078 str r0, [r7, #4] 800782e: 460b mov r3, r1 8007830: 70fb strb r3, [r7, #3] return HAL_PCD_EP_GetRxCount((PCD_HandleTypeDef*) pdev->pData, ep_addr); 8007832: 687b ldr r3, [r7, #4] 8007834: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0 8007838: 78fa ldrb r2, [r7, #3] 800783a: 4611 mov r1, r2 800783c: 4618 mov r0, r3 800783e: f7f9 fc94 bl 800116a <HAL_PCD_EP_GetRxCount> 8007842: 4603 mov r3, r0 } 8007844: 4618 mov r0, r3 8007846: 3708 adds r7, #8 8007848: 46bd mov sp, r7 800784a: bd80 pop {r7, pc} 0800784c <USBD_static_malloc>: * @brief Static single allocation. * @param size: Size of allocated memory * @retval None */ void *USBD_static_malloc(uint32_t size) { 800784c: b480 push {r7} 800784e: b083 sub sp, #12 8007850: af00 add r7, sp, #0 8007852: 6078 str r0, [r7, #4] static uint32_t mem[(sizeof(USBD_CDC_HandleTypeDef)/4)+1];/* On 32-bit boundary */ return mem; 8007854: 4b02 ldr r3, [pc, #8] ; (8007860 <USBD_static_malloc+0x14>) } 8007856: 4618 mov r0, r3 8007858: 370c adds r7, #12 800785a: 46bd mov sp, r7 800785c: bc80 pop {r7} 800785e: 4770 bx lr 8007860: 20001154 .word 0x20001154 08007864 <USBD_static_free>: * @brief Dummy memory free * @param p: Pointer to allocated memory address * @retval None */ void USBD_static_free(void *p) { 8007864: b480 push {r7} 8007866: b083 sub sp, #12 8007868: af00 add r7, sp, #0 800786a: 6078 str r0, [r7, #4] } 800786c: bf00 nop 800786e: 370c adds r7, #12 8007870: 46bd mov sp, r7 8007872: bc80 pop {r7} 8007874: 4770 bx lr 08007876 <HAL_PCDEx_SetConnectionState>: #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 */ { 8007876: b480 push {r7} 8007878: b083 sub sp, #12 800787a: af00 add r7, sp, #0 800787c: 6078 str r0, [r7, #4] 800787e: 460b mov r3, r1 8007880: 70fb strb r3, [r7, #3] { /* Configure High connection state. */ } /* USER CODE END 6 */ } 8007882: bf00 nop 8007884: 370c adds r7, #12 8007886: 46bd mov sp, r7 8007888: bc80 pop {r7} 800788a: 4770 bx lr 0800788c <USBD_Get_USB_Status>: * @brief Returns the USB status depending on the HAL status: * @param hal_status: HAL status * @retval USB status */ USBD_StatusTypeDef USBD_Get_USB_Status(HAL_StatusTypeDef hal_status) { 800788c: b480 push {r7} 800788e: b085 sub sp, #20 8007890: af00 add r7, sp, #0 8007892: 4603 mov r3, r0 8007894: 71fb strb r3, [r7, #7] USBD_StatusTypeDef usb_status = USBD_OK; 8007896: 2300 movs r3, #0 8007898: 73fb strb r3, [r7, #15] switch (hal_status) 800789a: 79fb ldrb r3, [r7, #7] 800789c: 2b03 cmp r3, #3 800789e: d817 bhi.n 80078d0 <USBD_Get_USB_Status+0x44> 80078a0: a201 add r2, pc, #4 ; (adr r2, 80078a8 <USBD_Get_USB_Status+0x1c>) 80078a2: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80078a6: bf00 nop 80078a8: 080078b9 .word 0x080078b9 80078ac: 080078bf .word 0x080078bf 80078b0: 080078c5 .word 0x080078c5 80078b4: 080078cb .word 0x080078cb { case HAL_OK : usb_status = USBD_OK; 80078b8: 2300 movs r3, #0 80078ba: 73fb strb r3, [r7, #15] break; 80078bc: e00b b.n 80078d6 <USBD_Get_USB_Status+0x4a> case HAL_ERROR : usb_status = USBD_FAIL; 80078be: 2302 movs r3, #2 80078c0: 73fb strb r3, [r7, #15] break; 80078c2: e008 b.n 80078d6 <USBD_Get_USB_Status+0x4a> case HAL_BUSY : usb_status = USBD_BUSY; 80078c4: 2301 movs r3, #1 80078c6: 73fb strb r3, [r7, #15] break; 80078c8: e005 b.n 80078d6 <USBD_Get_USB_Status+0x4a> case HAL_TIMEOUT : usb_status = USBD_FAIL; 80078ca: 2302 movs r3, #2 80078cc: 73fb strb r3, [r7, #15] break; 80078ce: e002 b.n 80078d6 <USBD_Get_USB_Status+0x4a> default : usb_status = USBD_FAIL; 80078d0: 2302 movs r3, #2 80078d2: 73fb strb r3, [r7, #15] break; 80078d4: bf00 nop } return usb_status; 80078d6: 7bfb ldrb r3, [r7, #15] } 80078d8: 4618 mov r0, r3 80078da: 3714 adds r7, #20 80078dc: 46bd mov sp, r7 80078de: bc80 pop {r7} 80078e0: 4770 bx lr 80078e2: bf00 nop 080078e4 <__libc_init_array>: 80078e4: b570 push {r4, r5, r6, lr} 80078e6: 2600 movs r6, #0 80078e8: 4d0c ldr r5, [pc, #48] ; (800791c <__libc_init_array+0x38>) 80078ea: 4c0d ldr r4, [pc, #52] ; (8007920 <__libc_init_array+0x3c>) 80078ec: 1b64 subs r4, r4, r5 80078ee: 10a4 asrs r4, r4, #2 80078f0: 42a6 cmp r6, r4 80078f2: d109 bne.n 8007908 <__libc_init_array+0x24> 80078f4: f000 f822 bl 800793c <_init> 80078f8: 2600 movs r6, #0 80078fa: 4d0a ldr r5, [pc, #40] ; (8007924 <__libc_init_array+0x40>) 80078fc: 4c0a ldr r4, [pc, #40] ; (8007928 <__libc_init_array+0x44>) 80078fe: 1b64 subs r4, r4, r5 8007900: 10a4 asrs r4, r4, #2 8007902: 42a6 cmp r6, r4 8007904: d105 bne.n 8007912 <__libc_init_array+0x2e> 8007906: bd70 pop {r4, r5, r6, pc} 8007908: f855 3b04 ldr.w r3, [r5], #4 800790c: 4798 blx r3 800790e: 3601 adds r6, #1 8007910: e7ee b.n 80078f0 <__libc_init_array+0xc> 8007912: f855 3b04 ldr.w r3, [r5], #4 8007916: 4798 blx r3 8007918: 3601 adds r6, #1 800791a: e7f2 b.n 8007902 <__libc_init_array+0x1e> 800791c: 080079a8 .word 0x080079a8 8007920: 080079a8 .word 0x080079a8 8007924: 080079a8 .word 0x080079a8 8007928: 080079ac .word 0x080079ac 0800792c <memset>: 800792c: 4603 mov r3, r0 800792e: 4402 add r2, r0 8007930: 4293 cmp r3, r2 8007932: d100 bne.n 8007936 <memset+0xa> 8007934: 4770 bx lr 8007936: f803 1b01 strb.w r1, [r3], #1 800793a: e7f9 b.n 8007930 <memset+0x4> 0800793c <_init>: 800793c: b5f8 push {r3, r4, r5, r6, r7, lr} 800793e: bf00 nop 8007940: bcf8 pop {r3, r4, r5, r6, r7} 8007942: bc08 pop {r3} 8007944: 469e mov lr, r3 8007946: 4770 bx lr 08007948 <_fini>: 8007948: b5f8 push {r3, r4, r5, r6, r7, lr} 800794a: bf00 nop 800794c: bcf8 pop {r3, r4, r5, r6, r7} 800794e: bc08 pop {r3} 8007950: 469e mov lr, r3 8007952: 4770 bx lr