stm32cubeide/Maple/Debug/Maple.list
Jochen Friedrich 66c5a26d69 Initial commit
2021-01-01 14:06:20 +01:00

17200 lines
614 KiB
Text

Maple.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 00006b84 0800010c 0800010c 0001010c 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .rodata 00000074 08006c90 08006c90 00016c90 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .ARM.extab 00000000 08006d04 08006d04 0002017c 2**0
CONTENTS
4 .ARM 00000000 08006d04 08006d04 0002017c 2**0
CONTENTS
5 .preinit_array 00000000 08006d04 08006d04 0002017c 2**0
CONTENTS, ALLOC, LOAD, DATA
6 .init_array 00000004 08006d04 08006d04 00016d04 2**2
CONTENTS, ALLOC, LOAD, DATA
7 .fini_array 00000004 08006d08 08006d08 00016d08 2**2
CONTENTS, ALLOC, LOAD, DATA
8 .data 0000017c 20000000 08006d0c 00020000 2**2
CONTENTS, ALLOC, LOAD, DATA
9 .bss 000011c4 2000017c 08006e88 0002017c 2**2
ALLOC
10 ._user_heap_stack 00000600 20001340 08006e88 00021340 2**0
ALLOC
11 .ARM.attributes 00000029 00000000 00000000 0002017c 2**0
CONTENTS, READONLY
12 .debug_info 000108d1 00000000 00000000 000201a5 2**0
CONTENTS, READONLY, DEBUGGING
13 .debug_abbrev 00002928 00000000 00000000 00030a76 2**0
CONTENTS, READONLY, DEBUGGING
14 .debug_aranges 00000a68 00000000 00000000 000333a0 2**3
CONTENTS, READONLY, DEBUGGING
15 .debug_ranges 00000920 00000000 00000000 00033e08 2**3
CONTENTS, READONLY, DEBUGGING
16 .debug_macro 00019605 00000000 00000000 00034728 2**0
CONTENTS, READONLY, DEBUGGING
17 .debug_line 0000bc20 00000000 00000000 0004dd2d 2**0
CONTENTS, READONLY, DEBUGGING
18 .debug_str 0008477d 00000000 00000000 0005994d 2**0
CONTENTS, READONLY, DEBUGGING
19 .comment 0000007b 00000000 00000000 000de0ca 2**0
CONTENTS, READONLY
20 .debug_frame 000027c0 00000000 00000000 000de148 2**2
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
0800010c <__do_global_dtors_aux>:
800010c: b510 push {r4, lr}
800010e: 4c05 ldr r4, [pc, #20] ; (8000124 <__do_global_dtors_aux+0x18>)
8000110: 7823 ldrb r3, [r4, #0]
8000112: b933 cbnz r3, 8000122 <__do_global_dtors_aux+0x16>
8000114: 4b04 ldr r3, [pc, #16] ; (8000128 <__do_global_dtors_aux+0x1c>)
8000116: b113 cbz r3, 800011e <__do_global_dtors_aux+0x12>
8000118: 4804 ldr r0, [pc, #16] ; (800012c <__do_global_dtors_aux+0x20>)
800011a: f3af 8000 nop.w
800011e: 2301 movs r3, #1
8000120: 7023 strb r3, [r4, #0]
8000122: bd10 pop {r4, pc}
8000124: 2000017c .word 0x2000017c
8000128: 00000000 .word 0x00000000
800012c: 08006c78 .word 0x08006c78
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: 08006c78 .word 0x08006c78
0800014c <strlen>:
800014c: 4603 mov r3, r0
800014e: f813 2b01 ldrb.w r2, [r3], #1
8000152: 2a00 cmp r2, #0
8000154: d1fb bne.n 800014e <strlen+0x2>
8000156: 1a18 subs r0, r3, r0
8000158: 3801 subs r0, #1
800015a: 4770 bx lr
0800015c <main>:
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
800015c: b580 push {r7, lr}
800015e: b082 sub sp, #8
8000160: af00 add r7, sp, #0
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
8000162: f000 f97f bl 8000464 <HAL_Init>
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
8000166: f000 f837 bl 80001d8 <SystemClock_Config>
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
800016a: f000 f891 bl 8000290 <MX_GPIO_Init>
MX_USB_DEVICE_Init();
800016e: f006 f8b3 bl 80062d8 <MX_USB_DEVICE_Init>
/* USER CODE BEGIN 2 */
HAL_GPIO_WritePin(USBE_GPIO_Port, USBE_Pin, GPIO_PIN_RESET);
8000172: 2200 movs r2, #0
8000174: f44f 7100 mov.w r1, #512 ; 0x200
8000178: 4815 ldr r0, [pc, #84] ; (80001d0 <main+0x74>)
800017a: f000 fc5f bl 8000a3c <HAL_GPIO_WritePin>
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_SET);
800017e: 2201 movs r2, #1
8000180: 2102 movs r1, #2
8000182: 4813 ldr r0, [pc, #76] ; (80001d0 <main+0x74>)
8000184: f000 fc5a bl 8000a3c <HAL_GPIO_WritePin>
HAL_Delay(500);
8000188: f44f 70fa mov.w r0, #500 ; 0x1f4
800018c: f000 f9cc bl 8000528 <HAL_Delay>
HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET);
8000190: 2200 movs r2, #0
8000192: 2102 movs r1, #2
8000194: 480e ldr r0, [pc, #56] ; (80001d0 <main+0x74>)
8000196: f000 fc51 bl 8000a3c <HAL_GPIO_WritePin>
HAL_Delay(500);
800019a: f44f 70fa mov.w r0, #500 ; 0x1f4
800019e: f000 f9c3 bl 8000528 <HAL_Delay>
char msg[]="Hallo\n";
80001a2: 4a0c ldr r2, [pc, #48] ; (80001d4 <main+0x78>)
80001a4: 463b mov r3, r7
80001a6: e892 0003 ldmia.w r2, {r0, r1}
80001aa: 6018 str r0, [r3, #0]
80001ac: 3304 adds r3, #4
80001ae: 8019 strh r1, [r3, #0]
80001b0: 3302 adds r3, #2
80001b2: 0c0a lsrs r2, r1, #16
80001b4: 701a strb r2, [r3, #0]
CDC_Transmit_FS((uint8_t*)msg, strlen(msg));
80001b6: 463b mov r3, r7
80001b8: 4618 mov r0, r3
80001ba: f7ff ffc7 bl 800014c <strlen>
80001be: 4603 mov r3, r0
80001c0: b29a uxth r2, r3
80001c2: 463b mov r3, r7
80001c4: 4611 mov r1, r2
80001c6: 4618 mov r0, r3
80001c8: f006 f944 bl 8006454 <CDC_Transmit_FS>
{
80001cc: e7d7 b.n 800017e <main+0x22>
80001ce: bf00 nop
80001d0: 40010c00 .word 0x40010c00
80001d4: 08006c90 .word 0x08006c90
080001d8 <SystemClock_Config>:
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
80001d8: b580 push {r7, lr}
80001da: b094 sub sp, #80 ; 0x50
80001dc: af00 add r7, sp, #0
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
80001de: f107 0328 add.w r3, r7, #40 ; 0x28
80001e2: 2228 movs r2, #40 ; 0x28
80001e4: 2100 movs r1, #0
80001e6: 4618 mov r0, r3
80001e8: f006 fd3e bl 8006c68 <memset>
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
80001ec: f107 0314 add.w r3, r7, #20
80001f0: 2200 movs r2, #0
80001f2: 601a str r2, [r3, #0]
80001f4: 605a str r2, [r3, #4]
80001f6: 609a str r2, [r3, #8]
80001f8: 60da str r2, [r3, #12]
80001fa: 611a str r2, [r3, #16]
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
80001fc: 1d3b adds r3, r7, #4
80001fe: 2200 movs r2, #0
8000200: 601a str r2, [r3, #0]
8000202: 605a str r2, [r3, #4]
8000204: 609a str r2, [r3, #8]
8000206: 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;
8000208: 2301 movs r3, #1
800020a: 62bb str r3, [r7, #40] ; 0x28
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
800020c: f44f 3380 mov.w r3, #65536 ; 0x10000
8000210: 62fb str r3, [r7, #44] ; 0x2c
RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1;
8000212: 2300 movs r3, #0
8000214: 633b str r3, [r7, #48] ; 0x30
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
8000216: 2301 movs r3, #1
8000218: 63bb str r3, [r7, #56] ; 0x38
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
800021a: 2302 movs r3, #2
800021c: 647b str r3, [r7, #68] ; 0x44
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
800021e: f44f 3380 mov.w r3, #65536 ; 0x10000
8000222: 64bb str r3, [r7, #72] ; 0x48
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6;
8000224: f44f 1380 mov.w r3, #1048576 ; 0x100000
8000228: 64fb str r3, [r7, #76] ; 0x4c
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
800022a: f107 0328 add.w r3, r7, #40 ; 0x28
800022e: 4618 mov r0, r3
8000230: f001 ffa0 bl 8002174 <HAL_RCC_OscConfig>
8000234: 4603 mov r3, r0
8000236: 2b00 cmp r3, #0
8000238: d001 beq.n 800023e <SystemClock_Config+0x66>
{
Error_Handler();
800023a: f000 f875 bl 8000328 <Error_Handler>
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
800023e: 230f movs r3, #15
8000240: 617b str r3, [r7, #20]
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
8000242: 2302 movs r3, #2
8000244: 61bb str r3, [r7, #24]
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
8000246: 2300 movs r3, #0
8000248: 61fb str r3, [r7, #28]
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
800024a: f44f 6380 mov.w r3, #1024 ; 0x400
800024e: 623b str r3, [r7, #32]
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
8000250: 2300 movs r3, #0
8000252: 627b str r3, [r7, #36] ; 0x24
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK)
8000254: f107 0314 add.w r3, r7, #20
8000258: 2101 movs r1, #1
800025a: 4618 mov r0, r3
800025c: f002 fa0a bl 8002674 <HAL_RCC_ClockConfig>
8000260: 4603 mov r3, r0
8000262: 2b00 cmp r3, #0
8000264: d001 beq.n 800026a <SystemClock_Config+0x92>
{
Error_Handler();
8000266: f000 f85f bl 8000328 <Error_Handler>
}
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB;
800026a: 2310 movs r3, #16
800026c: 607b str r3, [r7, #4]
PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLL;
800026e: f44f 0380 mov.w r3, #4194304 ; 0x400000
8000272: 613b str r3, [r7, #16]
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
8000274: 1d3b adds r3, r7, #4
8000276: 4618 mov r0, r3
8000278: f002 fb66 bl 8002948 <HAL_RCCEx_PeriphCLKConfig>
800027c: 4603 mov r3, r0
800027e: 2b00 cmp r3, #0
8000280: d001 beq.n 8000286 <SystemClock_Config+0xae>
{
Error_Handler();
8000282: f000 f851 bl 8000328 <Error_Handler>
}
}
8000286: bf00 nop
8000288: 3750 adds r7, #80 ; 0x50
800028a: 46bd mov sp, r7
800028c: bd80 pop {r7, pc}
...
08000290 <MX_GPIO_Init>:
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
8000290: b580 push {r7, lr}
8000292: b088 sub sp, #32
8000294: af00 add r7, sp, #0
GPIO_InitTypeDef GPIO_InitStruct = {0};
8000296: f107 0310 add.w r3, r7, #16
800029a: 2200 movs r2, #0
800029c: 601a str r2, [r3, #0]
800029e: 605a str r2, [r3, #4]
80002a0: 609a str r2, [r3, #8]
80002a2: 60da str r2, [r3, #12]
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOD_CLK_ENABLE();
80002a4: 4b1e ldr r3, [pc, #120] ; (8000320 <MX_GPIO_Init+0x90>)
80002a6: 699b ldr r3, [r3, #24]
80002a8: 4a1d ldr r2, [pc, #116] ; (8000320 <MX_GPIO_Init+0x90>)
80002aa: f043 0320 orr.w r3, r3, #32
80002ae: 6193 str r3, [r2, #24]
80002b0: 4b1b ldr r3, [pc, #108] ; (8000320 <MX_GPIO_Init+0x90>)
80002b2: 699b ldr r3, [r3, #24]
80002b4: f003 0320 and.w r3, r3, #32
80002b8: 60fb str r3, [r7, #12]
80002ba: 68fb ldr r3, [r7, #12]
__HAL_RCC_GPIOB_CLK_ENABLE();
80002bc: 4b18 ldr r3, [pc, #96] ; (8000320 <MX_GPIO_Init+0x90>)
80002be: 699b ldr r3, [r3, #24]
80002c0: 4a17 ldr r2, [pc, #92] ; (8000320 <MX_GPIO_Init+0x90>)
80002c2: f043 0308 orr.w r3, r3, #8
80002c6: 6193 str r3, [r2, #24]
80002c8: 4b15 ldr r3, [pc, #84] ; (8000320 <MX_GPIO_Init+0x90>)
80002ca: 699b ldr r3, [r3, #24]
80002cc: f003 0308 and.w r3, r3, #8
80002d0: 60bb str r3, [r7, #8]
80002d2: 68bb ldr r3, [r7, #8]
__HAL_RCC_GPIOA_CLK_ENABLE();
80002d4: 4b12 ldr r3, [pc, #72] ; (8000320 <MX_GPIO_Init+0x90>)
80002d6: 699b ldr r3, [r3, #24]
80002d8: 4a11 ldr r2, [pc, #68] ; (8000320 <MX_GPIO_Init+0x90>)
80002da: f043 0304 orr.w r3, r3, #4
80002de: 6193 str r3, [r2, #24]
80002e0: 4b0f ldr r3, [pc, #60] ; (8000320 <MX_GPIO_Init+0x90>)
80002e2: 699b ldr r3, [r3, #24]
80002e4: f003 0304 and.w r3, r3, #4
80002e8: 607b str r3, [r7, #4]
80002ea: 687b ldr r3, [r7, #4]
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOB, LED_Pin|USBE_Pin, GPIO_PIN_RESET);
80002ec: 2200 movs r2, #0
80002ee: f240 2102 movw r1, #514 ; 0x202
80002f2: 480c ldr r0, [pc, #48] ; (8000324 <MX_GPIO_Init+0x94>)
80002f4: f000 fba2 bl 8000a3c <HAL_GPIO_WritePin>
/*Configure GPIO pins : LED_Pin USBE_Pin */
GPIO_InitStruct.Pin = LED_Pin|USBE_Pin;
80002f8: f240 2302 movw r3, #514 ; 0x202
80002fc: 613b str r3, [r7, #16]
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
80002fe: 2301 movs r3, #1
8000300: 617b str r3, [r7, #20]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8000302: 2300 movs r3, #0
8000304: 61bb str r3, [r7, #24]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8000306: 2302 movs r3, #2
8000308: 61fb str r3, [r7, #28]
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
800030a: f107 0310 add.w r3, r7, #16
800030e: 4619 mov r1, r3
8000310: 4804 ldr r0, [pc, #16] ; (8000324 <MX_GPIO_Init+0x94>)
8000312: f000 fa39 bl 8000788 <HAL_GPIO_Init>
}
8000316: bf00 nop
8000318: 3720 adds r7, #32
800031a: 46bd mov sp, r7
800031c: bd80 pop {r7, pc}
800031e: bf00 nop
8000320: 40021000 .word 0x40021000
8000324: 40010c00 .word 0x40010c00
08000328 <Error_Handler>:
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
8000328: b480 push {r7}
800032a: 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");
800032c: b672 cpsid i
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
800032e: e7fe b.n 800032e <Error_Handler+0x6>
08000330 <HAL_MspInit>:
/* USER CODE END 0 */
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
{
8000330: b480 push {r7}
8000332: b085 sub sp, #20
8000334: af00 add r7, sp, #0
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
__HAL_RCC_AFIO_CLK_ENABLE();
8000336: 4b15 ldr r3, [pc, #84] ; (800038c <HAL_MspInit+0x5c>)
8000338: 699b ldr r3, [r3, #24]
800033a: 4a14 ldr r2, [pc, #80] ; (800038c <HAL_MspInit+0x5c>)
800033c: f043 0301 orr.w r3, r3, #1
8000340: 6193 str r3, [r2, #24]
8000342: 4b12 ldr r3, [pc, #72] ; (800038c <HAL_MspInit+0x5c>)
8000344: 699b ldr r3, [r3, #24]
8000346: f003 0301 and.w r3, r3, #1
800034a: 60bb str r3, [r7, #8]
800034c: 68bb ldr r3, [r7, #8]
__HAL_RCC_PWR_CLK_ENABLE();
800034e: 4b0f ldr r3, [pc, #60] ; (800038c <HAL_MspInit+0x5c>)
8000350: 69db ldr r3, [r3, #28]
8000352: 4a0e ldr r2, [pc, #56] ; (800038c <HAL_MspInit+0x5c>)
8000354: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8000358: 61d3 str r3, [r2, #28]
800035a: 4b0c ldr r3, [pc, #48] ; (800038c <HAL_MspInit+0x5c>)
800035c: 69db ldr r3, [r3, #28]
800035e: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8000362: 607b str r3, [r7, #4]
8000364: 687b ldr r3, [r7, #4]
/* System interrupt init*/
/** NOJTAG: JTAG-DP Disabled and SW-DP Enabled
*/
__HAL_AFIO_REMAP_SWJ_NOJTAG();
8000366: 4b0a ldr r3, [pc, #40] ; (8000390 <HAL_MspInit+0x60>)
8000368: 685b ldr r3, [r3, #4]
800036a: 60fb str r3, [r7, #12]
800036c: 68fb ldr r3, [r7, #12]
800036e: f023 63e0 bic.w r3, r3, #117440512 ; 0x7000000
8000372: 60fb str r3, [r7, #12]
8000374: 68fb ldr r3, [r7, #12]
8000376: f043 7300 orr.w r3, r3, #33554432 ; 0x2000000
800037a: 60fb str r3, [r7, #12]
800037c: 4a04 ldr r2, [pc, #16] ; (8000390 <HAL_MspInit+0x60>)
800037e: 68fb ldr r3, [r7, #12]
8000380: 6053 str r3, [r2, #4]
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
}
8000382: bf00 nop
8000384: 3714 adds r7, #20
8000386: 46bd mov sp, r7
8000388: bc80 pop {r7}
800038a: 4770 bx lr
800038c: 40021000 .word 0x40021000
8000390: 40010000 .word 0x40010000
08000394 <NMI_Handler>:
/******************************************************************************/
/**
* @brief This function handles Non maskable interrupt.
*/
void NMI_Handler(void)
{
8000394: b480 push {r7}
8000396: 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)
8000398: e7fe b.n 8000398 <NMI_Handler+0x4>
0800039a <HardFault_Handler>:
/**
* @brief This function handles Hard fault interrupt.
*/
void HardFault_Handler(void)
{
800039a: b480 push {r7}
800039c: af00 add r7, sp, #0
/* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */
while (1)
800039e: e7fe b.n 800039e <HardFault_Handler+0x4>
080003a0 <MemManage_Handler>:
/**
* @brief This function handles Memory management fault.
*/
void MemManage_Handler(void)
{
80003a0: b480 push {r7}
80003a2: af00 add r7, sp, #0
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
/* USER CODE END MemoryManagement_IRQn 0 */
while (1)
80003a4: e7fe b.n 80003a4 <MemManage_Handler+0x4>
080003a6 <BusFault_Handler>:
/**
* @brief This function handles Prefetch fault, memory access fault.
*/
void BusFault_Handler(void)
{
80003a6: b480 push {r7}
80003a8: af00 add r7, sp, #0
/* USER CODE BEGIN BusFault_IRQn 0 */
/* USER CODE END BusFault_IRQn 0 */
while (1)
80003aa: e7fe b.n 80003aa <BusFault_Handler+0x4>
080003ac <UsageFault_Handler>:
/**
* @brief This function handles Undefined instruction or illegal state.
*/
void UsageFault_Handler(void)
{
80003ac: b480 push {r7}
80003ae: af00 add r7, sp, #0
/* USER CODE BEGIN UsageFault_IRQn 0 */
/* USER CODE END UsageFault_IRQn 0 */
while (1)
80003b0: e7fe b.n 80003b0 <UsageFault_Handler+0x4>
080003b2 <SVC_Handler>:
/**
* @brief This function handles System service call via SWI instruction.
*/
void SVC_Handler(void)
{
80003b2: b480 push {r7}
80003b4: af00 add r7, sp, #0
/* USER CODE END SVCall_IRQn 0 */
/* USER CODE BEGIN SVCall_IRQn 1 */
/* USER CODE END SVCall_IRQn 1 */
}
80003b6: bf00 nop
80003b8: 46bd mov sp, r7
80003ba: bc80 pop {r7}
80003bc: 4770 bx lr
080003be <DebugMon_Handler>:
/**
* @brief This function handles Debug monitor.
*/
void DebugMon_Handler(void)
{
80003be: b480 push {r7}
80003c0: af00 add r7, sp, #0
/* USER CODE END DebugMonitor_IRQn 0 */
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
/* USER CODE END DebugMonitor_IRQn 1 */
}
80003c2: bf00 nop
80003c4: 46bd mov sp, r7
80003c6: bc80 pop {r7}
80003c8: 4770 bx lr
080003ca <PendSV_Handler>:
/**
* @brief This function handles Pendable request for system service.
*/
void PendSV_Handler(void)
{
80003ca: b480 push {r7}
80003cc: af00 add r7, sp, #0
/* USER CODE END PendSV_IRQn 0 */
/* USER CODE BEGIN PendSV_IRQn 1 */
/* USER CODE END PendSV_IRQn 1 */
}
80003ce: bf00 nop
80003d0: 46bd mov sp, r7
80003d2: bc80 pop {r7}
80003d4: 4770 bx lr
080003d6 <SysTick_Handler>:
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
80003d6: b580 push {r7, lr}
80003d8: af00 add r7, sp, #0
/* USER CODE BEGIN SysTick_IRQn 0 */
/* USER CODE END SysTick_IRQn 0 */
HAL_IncTick();
80003da: f000 f889 bl 80004f0 <HAL_IncTick>
/* USER CODE BEGIN SysTick_IRQn 1 */
/* USER CODE END SysTick_IRQn 1 */
}
80003de: bf00 nop
80003e0: bd80 pop {r7, pc}
...
080003e4 <USB_HP_CAN1_TX_IRQHandler>:
/**
* @brief This function handles USB high priority or CAN TX interrupts.
*/
void USB_HP_CAN1_TX_IRQHandler(void)
{
80003e4: b580 push {r7, lr}
80003e6: af00 add r7, sp, #0
/* USER CODE BEGIN USB_HP_CAN1_TX_IRQn 0 */
/* USER CODE END USB_HP_CAN1_TX_IRQn 0 */
HAL_PCD_IRQHandler(&hpcd_USB_FS);
80003e8: 4802 ldr r0, [pc, #8] ; (80003f4 <USB_HP_CAN1_TX_IRQHandler+0x10>)
80003ea: f000 fc70 bl 8000cce <HAL_PCD_IRQHandler>
/* USER CODE BEGIN USB_HP_CAN1_TX_IRQn 1 */
/* USER CODE END USB_HP_CAN1_TX_IRQn 1 */
}
80003ee: bf00 nop
80003f0: bd80 pop {r7, pc}
80003f2: bf00 nop
80003f4: 20001054 .word 0x20001054
080003f8 <USB_LP_CAN1_RX0_IRQHandler>:
/**
* @brief This function handles USB low priority or CAN RX0 interrupts.
*/
void USB_LP_CAN1_RX0_IRQHandler(void)
{
80003f8: b580 push {r7, lr}
80003fa: 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);
80003fc: 4802 ldr r0, [pc, #8] ; (8000408 <USB_LP_CAN1_RX0_IRQHandler+0x10>)
80003fe: f000 fc66 bl 8000cce <HAL_PCD_IRQHandler>
/* USER CODE BEGIN USB_LP_CAN1_RX0_IRQn 1 */
/* USER CODE END USB_LP_CAN1_RX0_IRQn 1 */
}
8000402: bf00 nop
8000404: bd80 pop {r7, pc}
8000406: bf00 nop
8000408: 20001054 .word 0x20001054
0800040c <SystemInit>:
* @note This function should be used only after reset.
* @param None
* @retval None
*/
void SystemInit (void)
{
800040c: b480 push {r7}
800040e: 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 */
}
8000410: bf00 nop
8000412: 46bd mov sp, r7
8000414: bc80 pop {r7}
8000416: 4770 bx lr
08000418 <Reset_Handler>:
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
/* Copy the data segment initializers from flash to SRAM */
movs r1, #0
8000418: 2100 movs r1, #0
b LoopCopyDataInit
800041a: e003 b.n 8000424 <LoopCopyDataInit>
0800041c <CopyDataInit>:
CopyDataInit:
ldr r3, =_sidata
800041c: 4b0b ldr r3, [pc, #44] ; (800044c <LoopFillZerobss+0x14>)
ldr r3, [r3, r1]
800041e: 585b ldr r3, [r3, r1]
str r3, [r0, r1]
8000420: 5043 str r3, [r0, r1]
adds r1, r1, #4
8000422: 3104 adds r1, #4
08000424 <LoopCopyDataInit>:
LoopCopyDataInit:
ldr r0, =_sdata
8000424: 480a ldr r0, [pc, #40] ; (8000450 <LoopFillZerobss+0x18>)
ldr r3, =_edata
8000426: 4b0b ldr r3, [pc, #44] ; (8000454 <LoopFillZerobss+0x1c>)
adds r2, r0, r1
8000428: 1842 adds r2, r0, r1
cmp r2, r3
800042a: 429a cmp r2, r3
bcc CopyDataInit
800042c: d3f6 bcc.n 800041c <CopyDataInit>
ldr r2, =_sbss
800042e: 4a0a ldr r2, [pc, #40] ; (8000458 <LoopFillZerobss+0x20>)
b LoopFillZerobss
8000430: e002 b.n 8000438 <LoopFillZerobss>
08000432 <FillZerobss>:
/* Zero fill the bss segment. */
FillZerobss:
movs r3, #0
8000432: 2300 movs r3, #0
str r3, [r2], #4
8000434: f842 3b04 str.w r3, [r2], #4
08000438 <LoopFillZerobss>:
LoopFillZerobss:
ldr r3, = _ebss
8000438: 4b08 ldr r3, [pc, #32] ; (800045c <LoopFillZerobss+0x24>)
cmp r2, r3
800043a: 429a cmp r2, r3
bcc FillZerobss
800043c: d3f9 bcc.n 8000432 <FillZerobss>
/* Call the clock system intitialization function.*/
bl SystemInit
800043e: f7ff ffe5 bl 800040c <SystemInit>
/* Call static constructors */
bl __libc_init_array
8000442: f006 fbed bl 8006c20 <__libc_init_array>
/* Call the application's entry point.*/
bl main
8000446: f7ff fe89 bl 800015c <main>
bx lr
800044a: 4770 bx lr
ldr r3, =_sidata
800044c: 08006d0c .word 0x08006d0c
ldr r0, =_sdata
8000450: 20000000 .word 0x20000000
ldr r3, =_edata
8000454: 2000017c .word 0x2000017c
ldr r2, =_sbss
8000458: 2000017c .word 0x2000017c
ldr r3, = _ebss
800045c: 20001340 .word 0x20001340
08000460 <ADC1_2_IRQHandler>:
* @retval : None
*/
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
8000460: e7fe b.n 8000460 <ADC1_2_IRQHandler>
...
08000464 <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)
{
8000464: b580 push {r7, lr}
8000466: 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();
8000468: 4b08 ldr r3, [pc, #32] ; (800048c <HAL_Init+0x28>)
800046a: 681b ldr r3, [r3, #0]
800046c: 4a07 ldr r2, [pc, #28] ; (800048c <HAL_Init+0x28>)
800046e: f043 0310 orr.w r3, r3, #16
8000472: 6013 str r3, [r2, #0]
#endif
#endif /* PREFETCH_ENABLE */
/* Set Interrupt Group Priority */
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
8000474: 2003 movs r0, #3
8000476: f000 f945 bl 8000704 <HAL_NVIC_SetPriorityGrouping>
/* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */
HAL_InitTick(TICK_INT_PRIORITY);
800047a: 2000 movs r0, #0
800047c: f000 f808 bl 8000490 <HAL_InitTick>
/* Init the low level hardware */
HAL_MspInit();
8000480: f7ff ff56 bl 8000330 <HAL_MspInit>
/* Return function status */
return HAL_OK;
8000484: 2300 movs r3, #0
}
8000486: 4618 mov r0, r3
8000488: bd80 pop {r7, pc}
800048a: bf00 nop
800048c: 40022000 .word 0x40022000
08000490 <HAL_InitTick>:
* implementation in user file.
* @param TickPriority Tick interrupt priority.
* @retval HAL status
*/
__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
8000490: b580 push {r7, lr}
8000492: b082 sub sp, #8
8000494: af00 add r7, sp, #0
8000496: 6078 str r0, [r7, #4]
/* Configure the SysTick to have interrupt in 1ms time basis*/
if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U)
8000498: 4b12 ldr r3, [pc, #72] ; (80004e4 <HAL_InitTick+0x54>)
800049a: 681a ldr r2, [r3, #0]
800049c: 4b12 ldr r3, [pc, #72] ; (80004e8 <HAL_InitTick+0x58>)
800049e: 781b ldrb r3, [r3, #0]
80004a0: 4619 mov r1, r3
80004a2: f44f 737a mov.w r3, #1000 ; 0x3e8
80004a6: fbb3 f3f1 udiv r3, r3, r1
80004aa: fbb2 f3f3 udiv r3, r2, r3
80004ae: 4618 mov r0, r3
80004b0: f000 f95d bl 800076e <HAL_SYSTICK_Config>
80004b4: 4603 mov r3, r0
80004b6: 2b00 cmp r3, #0
80004b8: d001 beq.n 80004be <HAL_InitTick+0x2e>
{
return HAL_ERROR;
80004ba: 2301 movs r3, #1
80004bc: e00e b.n 80004dc <HAL_InitTick+0x4c>
}
/* Configure the SysTick IRQ priority */
if (TickPriority < (1UL << __NVIC_PRIO_BITS))
80004be: 687b ldr r3, [r7, #4]
80004c0: 2b0f cmp r3, #15
80004c2: d80a bhi.n 80004da <HAL_InitTick+0x4a>
{
HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
80004c4: 2200 movs r2, #0
80004c6: 6879 ldr r1, [r7, #4]
80004c8: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff
80004cc: f000 f925 bl 800071a <HAL_NVIC_SetPriority>
uwTickPrio = TickPriority;
80004d0: 4a06 ldr r2, [pc, #24] ; (80004ec <HAL_InitTick+0x5c>)
80004d2: 687b ldr r3, [r7, #4]
80004d4: 6013 str r3, [r2, #0]
{
return HAL_ERROR;
}
/* Return function status */
return HAL_OK;
80004d6: 2300 movs r3, #0
80004d8: e000 b.n 80004dc <HAL_InitTick+0x4c>
return HAL_ERROR;
80004da: 2301 movs r3, #1
}
80004dc: 4618 mov r0, r3
80004de: 3708 adds r7, #8
80004e0: 46bd mov sp, r7
80004e2: bd80 pop {r7, pc}
80004e4: 20000000 .word 0x20000000
80004e8: 20000008 .word 0x20000008
80004ec: 20000004 .word 0x20000004
080004f0 <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)
{
80004f0: b480 push {r7}
80004f2: af00 add r7, sp, #0
uwTick += uwTickFreq;
80004f4: 4b05 ldr r3, [pc, #20] ; (800050c <HAL_IncTick+0x1c>)
80004f6: 781b ldrb r3, [r3, #0]
80004f8: 461a mov r2, r3
80004fa: 4b05 ldr r3, [pc, #20] ; (8000510 <HAL_IncTick+0x20>)
80004fc: 681b ldr r3, [r3, #0]
80004fe: 4413 add r3, r2
8000500: 4a03 ldr r2, [pc, #12] ; (8000510 <HAL_IncTick+0x20>)
8000502: 6013 str r3, [r2, #0]
}
8000504: bf00 nop
8000506: 46bd mov sp, r7
8000508: bc80 pop {r7}
800050a: 4770 bx lr
800050c: 20000008 .word 0x20000008
8000510: 200003bc .word 0x200003bc
08000514 <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)
{
8000514: b480 push {r7}
8000516: af00 add r7, sp, #0
return uwTick;
8000518: 4b02 ldr r3, [pc, #8] ; (8000524 <HAL_GetTick+0x10>)
800051a: 681b ldr r3, [r3, #0]
}
800051c: 4618 mov r0, r3
800051e: 46bd mov sp, r7
8000520: bc80 pop {r7}
8000522: 4770 bx lr
8000524: 200003bc .word 0x200003bc
08000528 <HAL_Delay>:
* implementations in user file.
* @param Delay specifies the delay time length, in milliseconds.
* @retval None
*/
__weak void HAL_Delay(uint32_t Delay)
{
8000528: b580 push {r7, lr}
800052a: b084 sub sp, #16
800052c: af00 add r7, sp, #0
800052e: 6078 str r0, [r7, #4]
uint32_t tickstart = HAL_GetTick();
8000530: f7ff fff0 bl 8000514 <HAL_GetTick>
8000534: 60b8 str r0, [r7, #8]
uint32_t wait = Delay;
8000536: 687b ldr r3, [r7, #4]
8000538: 60fb str r3, [r7, #12]
/* Add a freq to guarantee minimum wait */
if (wait < HAL_MAX_DELAY)
800053a: 68fb ldr r3, [r7, #12]
800053c: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff
8000540: d005 beq.n 800054e <HAL_Delay+0x26>
{
wait += (uint32_t)(uwTickFreq);
8000542: 4b09 ldr r3, [pc, #36] ; (8000568 <HAL_Delay+0x40>)
8000544: 781b ldrb r3, [r3, #0]
8000546: 461a mov r2, r3
8000548: 68fb ldr r3, [r7, #12]
800054a: 4413 add r3, r2
800054c: 60fb str r3, [r7, #12]
}
while ((HAL_GetTick() - tickstart) < wait)
800054e: bf00 nop
8000550: f7ff ffe0 bl 8000514 <HAL_GetTick>
8000554: 4602 mov r2, r0
8000556: 68bb ldr r3, [r7, #8]
8000558: 1ad3 subs r3, r2, r3
800055a: 68fa ldr r2, [r7, #12]
800055c: 429a cmp r2, r3
800055e: d8f7 bhi.n 8000550 <HAL_Delay+0x28>
{
}
}
8000560: bf00 nop
8000562: 3710 adds r7, #16
8000564: 46bd mov sp, r7
8000566: bd80 pop {r7, pc}
8000568: 20000008 .word 0x20000008
0800056c <__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)
{
800056c: b480 push {r7}
800056e: b085 sub sp, #20
8000570: af00 add r7, sp, #0
8000572: 6078 str r0, [r7, #4]
uint32_t reg_value;
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
8000574: 687b ldr r3, [r7, #4]
8000576: f003 0307 and.w r3, r3, #7
800057a: 60fb str r3, [r7, #12]
reg_value = SCB->AIRCR; /* read old register configuration */
800057c: 4b0c ldr r3, [pc, #48] ; (80005b0 <__NVIC_SetPriorityGrouping+0x44>)
800057e: 68db ldr r3, [r3, #12]
8000580: 60bb str r3, [r7, #8]
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
8000582: 68ba ldr r2, [r7, #8]
8000584: f64f 03ff movw r3, #63743 ; 0xf8ff
8000588: 4013 ands r3, r2
800058a: 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 */
800058c: 68fb ldr r3, [r7, #12]
800058e: 021a lsls r2, r3, #8
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
8000590: 68bb ldr r3, [r7, #8]
8000592: 4313 orrs r3, r2
reg_value = (reg_value |
8000594: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000
8000598: f443 3300 orr.w r3, r3, #131072 ; 0x20000
800059c: 60bb str r3, [r7, #8]
SCB->AIRCR = reg_value;
800059e: 4a04 ldr r2, [pc, #16] ; (80005b0 <__NVIC_SetPriorityGrouping+0x44>)
80005a0: 68bb ldr r3, [r7, #8]
80005a2: 60d3 str r3, [r2, #12]
}
80005a4: bf00 nop
80005a6: 3714 adds r7, #20
80005a8: 46bd mov sp, r7
80005aa: bc80 pop {r7}
80005ac: 4770 bx lr
80005ae: bf00 nop
80005b0: e000ed00 .word 0xe000ed00
080005b4 <__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)
{
80005b4: b480 push {r7}
80005b6: af00 add r7, sp, #0
return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
80005b8: 4b04 ldr r3, [pc, #16] ; (80005cc <__NVIC_GetPriorityGrouping+0x18>)
80005ba: 68db ldr r3, [r3, #12]
80005bc: 0a1b lsrs r3, r3, #8
80005be: f003 0307 and.w r3, r3, #7
}
80005c2: 4618 mov r0, r3
80005c4: 46bd mov sp, r7
80005c6: bc80 pop {r7}
80005c8: 4770 bx lr
80005ca: bf00 nop
80005cc: e000ed00 .word 0xe000ed00
080005d0 <__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)
{
80005d0: b480 push {r7}
80005d2: b083 sub sp, #12
80005d4: af00 add r7, sp, #0
80005d6: 4603 mov r3, r0
80005d8: 71fb strb r3, [r7, #7]
if ((int32_t)(IRQn) >= 0)
80005da: f997 3007 ldrsb.w r3, [r7, #7]
80005de: 2b00 cmp r3, #0
80005e0: db0b blt.n 80005fa <__NVIC_EnableIRQ+0x2a>
{
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
80005e2: 79fb ldrb r3, [r7, #7]
80005e4: f003 021f and.w r2, r3, #31
80005e8: 4906 ldr r1, [pc, #24] ; (8000604 <__NVIC_EnableIRQ+0x34>)
80005ea: f997 3007 ldrsb.w r3, [r7, #7]
80005ee: 095b lsrs r3, r3, #5
80005f0: 2001 movs r0, #1
80005f2: fa00 f202 lsl.w r2, r0, r2
80005f6: f841 2023 str.w r2, [r1, r3, lsl #2]
}
}
80005fa: bf00 nop
80005fc: 370c adds r7, #12
80005fe: 46bd mov sp, r7
8000600: bc80 pop {r7}
8000602: 4770 bx lr
8000604: e000e100 .word 0xe000e100
08000608 <__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)
{
8000608: b480 push {r7}
800060a: b083 sub sp, #12
800060c: af00 add r7, sp, #0
800060e: 4603 mov r3, r0
8000610: 6039 str r1, [r7, #0]
8000612: 71fb strb r3, [r7, #7]
if ((int32_t)(IRQn) >= 0)
8000614: f997 3007 ldrsb.w r3, [r7, #7]
8000618: 2b00 cmp r3, #0
800061a: db0a blt.n 8000632 <__NVIC_SetPriority+0x2a>
{
NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
800061c: 683b ldr r3, [r7, #0]
800061e: b2da uxtb r2, r3
8000620: 490c ldr r1, [pc, #48] ; (8000654 <__NVIC_SetPriority+0x4c>)
8000622: f997 3007 ldrsb.w r3, [r7, #7]
8000626: 0112 lsls r2, r2, #4
8000628: b2d2 uxtb r2, r2
800062a: 440b add r3, r1
800062c: 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);
}
}
8000630: e00a b.n 8000648 <__NVIC_SetPriority+0x40>
SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
8000632: 683b ldr r3, [r7, #0]
8000634: b2da uxtb r2, r3
8000636: 4908 ldr r1, [pc, #32] ; (8000658 <__NVIC_SetPriority+0x50>)
8000638: 79fb ldrb r3, [r7, #7]
800063a: f003 030f and.w r3, r3, #15
800063e: 3b04 subs r3, #4
8000640: 0112 lsls r2, r2, #4
8000642: b2d2 uxtb r2, r2
8000644: 440b add r3, r1
8000646: 761a strb r2, [r3, #24]
}
8000648: bf00 nop
800064a: 370c adds r7, #12
800064c: 46bd mov sp, r7
800064e: bc80 pop {r7}
8000650: 4770 bx lr
8000652: bf00 nop
8000654: e000e100 .word 0xe000e100
8000658: e000ed00 .word 0xe000ed00
0800065c <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)
{
800065c: b480 push {r7}
800065e: b089 sub sp, #36 ; 0x24
8000660: af00 add r7, sp, #0
8000662: 60f8 str r0, [r7, #12]
8000664: 60b9 str r1, [r7, #8]
8000666: 607a str r2, [r7, #4]
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
8000668: 68fb ldr r3, [r7, #12]
800066a: f003 0307 and.w r3, r3, #7
800066e: 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);
8000670: 69fb ldr r3, [r7, #28]
8000672: f1c3 0307 rsb r3, r3, #7
8000676: 2b04 cmp r3, #4
8000678: bf28 it cs
800067a: 2304 movcs r3, #4
800067c: 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));
800067e: 69fb ldr r3, [r7, #28]
8000680: 3304 adds r3, #4
8000682: 2b06 cmp r3, #6
8000684: d902 bls.n 800068c <NVIC_EncodePriority+0x30>
8000686: 69fb ldr r3, [r7, #28]
8000688: 3b03 subs r3, #3
800068a: e000 b.n 800068e <NVIC_EncodePriority+0x32>
800068c: 2300 movs r3, #0
800068e: 617b str r3, [r7, #20]
return (
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
8000690: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff
8000694: 69bb ldr r3, [r7, #24]
8000696: fa02 f303 lsl.w r3, r2, r3
800069a: 43da mvns r2, r3
800069c: 68bb ldr r3, [r7, #8]
800069e: 401a ands r2, r3
80006a0: 697b ldr r3, [r7, #20]
80006a2: 409a lsls r2, r3
((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
80006a4: f04f 31ff mov.w r1, #4294967295 ; 0xffffffff
80006a8: 697b ldr r3, [r7, #20]
80006aa: fa01 f303 lsl.w r3, r1, r3
80006ae: 43d9 mvns r1, r3
80006b0: 687b ldr r3, [r7, #4]
80006b2: 400b ands r3, r1
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
80006b4: 4313 orrs r3, r2
);
}
80006b6: 4618 mov r0, r3
80006b8: 3724 adds r7, #36 ; 0x24
80006ba: 46bd mov sp, r7
80006bc: bc80 pop {r7}
80006be: 4770 bx lr
080006c0 <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)
{
80006c0: b580 push {r7, lr}
80006c2: b082 sub sp, #8
80006c4: af00 add r7, sp, #0
80006c6: 6078 str r0, [r7, #4]
if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
80006c8: 687b ldr r3, [r7, #4]
80006ca: 3b01 subs r3, #1
80006cc: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000
80006d0: d301 bcc.n 80006d6 <SysTick_Config+0x16>
{
return (1UL); /* Reload value impossible */
80006d2: 2301 movs r3, #1
80006d4: e00f b.n 80006f6 <SysTick_Config+0x36>
}
SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
80006d6: 4a0a ldr r2, [pc, #40] ; (8000700 <SysTick_Config+0x40>)
80006d8: 687b ldr r3, [r7, #4]
80006da: 3b01 subs r3, #1
80006dc: 6053 str r3, [r2, #4]
NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
80006de: 210f movs r1, #15
80006e0: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff
80006e4: f7ff ff90 bl 8000608 <__NVIC_SetPriority>
SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
80006e8: 4b05 ldr r3, [pc, #20] ; (8000700 <SysTick_Config+0x40>)
80006ea: 2200 movs r2, #0
80006ec: 609a str r2, [r3, #8]
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
80006ee: 4b04 ldr r3, [pc, #16] ; (8000700 <SysTick_Config+0x40>)
80006f0: 2207 movs r2, #7
80006f2: 601a str r2, [r3, #0]
SysTick_CTRL_TICKINT_Msk |
SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
return (0UL); /* Function successful */
80006f4: 2300 movs r3, #0
}
80006f6: 4618 mov r0, r3
80006f8: 3708 adds r7, #8
80006fa: 46bd mov sp, r7
80006fc: bd80 pop {r7, pc}
80006fe: bf00 nop
8000700: e000e010 .word 0xe000e010
08000704 <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)
{
8000704: b580 push {r7, lr}
8000706: b082 sub sp, #8
8000708: af00 add r7, sp, #0
800070a: 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);
800070c: 6878 ldr r0, [r7, #4]
800070e: f7ff ff2d bl 800056c <__NVIC_SetPriorityGrouping>
}
8000712: bf00 nop
8000714: 3708 adds r7, #8
8000716: 46bd mov sp, r7
8000718: bd80 pop {r7, pc}
0800071a <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)
{
800071a: b580 push {r7, lr}
800071c: b086 sub sp, #24
800071e: af00 add r7, sp, #0
8000720: 4603 mov r3, r0
8000722: 60b9 str r1, [r7, #8]
8000724: 607a str r2, [r7, #4]
8000726: 73fb strb r3, [r7, #15]
uint32_t prioritygroup = 0x00U;
8000728: 2300 movs r3, #0
800072a: 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();
800072c: f7ff ff42 bl 80005b4 <__NVIC_GetPriorityGrouping>
8000730: 6178 str r0, [r7, #20]
NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
8000732: 687a ldr r2, [r7, #4]
8000734: 68b9 ldr r1, [r7, #8]
8000736: 6978 ldr r0, [r7, #20]
8000738: f7ff ff90 bl 800065c <NVIC_EncodePriority>
800073c: 4602 mov r2, r0
800073e: f997 300f ldrsb.w r3, [r7, #15]
8000742: 4611 mov r1, r2
8000744: 4618 mov r0, r3
8000746: f7ff ff5f bl 8000608 <__NVIC_SetPriority>
}
800074a: bf00 nop
800074c: 3718 adds r7, #24
800074e: 46bd mov sp, r7
8000750: bd80 pop {r7, pc}
08000752 <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)
{
8000752: b580 push {r7, lr}
8000754: b082 sub sp, #8
8000756: af00 add r7, sp, #0
8000758: 4603 mov r3, r0
800075a: 71fb strb r3, [r7, #7]
/* Check the parameters */
assert_param(IS_NVIC_DEVICE_IRQ(IRQn));
/* Enable interrupt */
NVIC_EnableIRQ(IRQn);
800075c: f997 3007 ldrsb.w r3, [r7, #7]
8000760: 4618 mov r0, r3
8000762: f7ff ff35 bl 80005d0 <__NVIC_EnableIRQ>
}
8000766: bf00 nop
8000768: 3708 adds r7, #8
800076a: 46bd mov sp, r7
800076c: bd80 pop {r7, pc}
0800076e <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)
{
800076e: b580 push {r7, lr}
8000770: b082 sub sp, #8
8000772: af00 add r7, sp, #0
8000774: 6078 str r0, [r7, #4]
return SysTick_Config(TicksNumb);
8000776: 6878 ldr r0, [r7, #4]
8000778: f7ff ffa2 bl 80006c0 <SysTick_Config>
800077c: 4603 mov r3, r0
}
800077e: 4618 mov r0, r3
8000780: 3708 adds r7, #8
8000782: 46bd mov sp, r7
8000784: bd80 pop {r7, pc}
...
08000788 <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)
{
8000788: b480 push {r7}
800078a: b08b sub sp, #44 ; 0x2c
800078c: af00 add r7, sp, #0
800078e: 6078 str r0, [r7, #4]
8000790: 6039 str r1, [r7, #0]
uint32_t position = 0x00u;
8000792: 2300 movs r3, #0
8000794: 627b str r3, [r7, #36] ; 0x24
uint32_t ioposition;
uint32_t iocurrent;
uint32_t temp;
uint32_t config = 0x00u;
8000796: 2300 movs r3, #0
8000798: 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)
800079a: e127 b.n 80009ec <HAL_GPIO_Init+0x264>
{
/* Get the IO position */
ioposition = (0x01uL << position);
800079c: 2201 movs r2, #1
800079e: 6a7b ldr r3, [r7, #36] ; 0x24
80007a0: fa02 f303 lsl.w r3, r2, r3
80007a4: 61fb str r3, [r7, #28]
/* Get the current IO position */
iocurrent = (uint32_t)(GPIO_Init->Pin) & ioposition;
80007a6: 683b ldr r3, [r7, #0]
80007a8: 681b ldr r3, [r3, #0]
80007aa: 69fa ldr r2, [r7, #28]
80007ac: 4013 ands r3, r2
80007ae: 61bb str r3, [r7, #24]
if (iocurrent == ioposition)
80007b0: 69ba ldr r2, [r7, #24]
80007b2: 69fb ldr r3, [r7, #28]
80007b4: 429a cmp r2, r3
80007b6: f040 8116 bne.w 80009e6 <HAL_GPIO_Init+0x25e>
{
/* 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)
80007ba: 683b ldr r3, [r7, #0]
80007bc: 685b ldr r3, [r3, #4]
80007be: 2b12 cmp r3, #18
80007c0: d034 beq.n 800082c <HAL_GPIO_Init+0xa4>
80007c2: 2b12 cmp r3, #18
80007c4: d80d bhi.n 80007e2 <HAL_GPIO_Init+0x5a>
80007c6: 2b02 cmp r3, #2
80007c8: d02b beq.n 8000822 <HAL_GPIO_Init+0x9a>
80007ca: 2b02 cmp r3, #2
80007cc: d804 bhi.n 80007d8 <HAL_GPIO_Init+0x50>
80007ce: 2b00 cmp r3, #0
80007d0: d031 beq.n 8000836 <HAL_GPIO_Init+0xae>
80007d2: 2b01 cmp r3, #1
80007d4: d01c beq.n 8000810 <HAL_GPIO_Init+0x88>
config = GPIO_CR_MODE_INPUT + GPIO_CR_CNF_ANALOG;
break;
/* Parameters are checked with assert_param */
default:
break;
80007d6: e048 b.n 800086a <HAL_GPIO_Init+0xe2>
switch (GPIO_Init->Mode)
80007d8: 2b03 cmp r3, #3
80007da: d043 beq.n 8000864 <HAL_GPIO_Init+0xdc>
80007dc: 2b11 cmp r3, #17
80007de: d01b beq.n 8000818 <HAL_GPIO_Init+0x90>
break;
80007e0: e043 b.n 800086a <HAL_GPIO_Init+0xe2>
switch (GPIO_Init->Mode)
80007e2: 4a89 ldr r2, [pc, #548] ; (8000a08 <HAL_GPIO_Init+0x280>)
80007e4: 4293 cmp r3, r2
80007e6: d026 beq.n 8000836 <HAL_GPIO_Init+0xae>
80007e8: 4a87 ldr r2, [pc, #540] ; (8000a08 <HAL_GPIO_Init+0x280>)
80007ea: 4293 cmp r3, r2
80007ec: d806 bhi.n 80007fc <HAL_GPIO_Init+0x74>
80007ee: 4a87 ldr r2, [pc, #540] ; (8000a0c <HAL_GPIO_Init+0x284>)
80007f0: 4293 cmp r3, r2
80007f2: d020 beq.n 8000836 <HAL_GPIO_Init+0xae>
80007f4: 4a86 ldr r2, [pc, #536] ; (8000a10 <HAL_GPIO_Init+0x288>)
80007f6: 4293 cmp r3, r2
80007f8: d01d beq.n 8000836 <HAL_GPIO_Init+0xae>
break;
80007fa: e036 b.n 800086a <HAL_GPIO_Init+0xe2>
switch (GPIO_Init->Mode)
80007fc: 4a85 ldr r2, [pc, #532] ; (8000a14 <HAL_GPIO_Init+0x28c>)
80007fe: 4293 cmp r3, r2
8000800: d019 beq.n 8000836 <HAL_GPIO_Init+0xae>
8000802: 4a85 ldr r2, [pc, #532] ; (8000a18 <HAL_GPIO_Init+0x290>)
8000804: 4293 cmp r3, r2
8000806: d016 beq.n 8000836 <HAL_GPIO_Init+0xae>
8000808: 4a84 ldr r2, [pc, #528] ; (8000a1c <HAL_GPIO_Init+0x294>)
800080a: 4293 cmp r3, r2
800080c: d013 beq.n 8000836 <HAL_GPIO_Init+0xae>
break;
800080e: e02c b.n 800086a <HAL_GPIO_Init+0xe2>
config = GPIO_Init->Speed + GPIO_CR_CNF_GP_OUTPUT_PP;
8000810: 683b ldr r3, [r7, #0]
8000812: 68db ldr r3, [r3, #12]
8000814: 623b str r3, [r7, #32]
break;
8000816: e028 b.n 800086a <HAL_GPIO_Init+0xe2>
config = GPIO_Init->Speed + GPIO_CR_CNF_GP_OUTPUT_OD;
8000818: 683b ldr r3, [r7, #0]
800081a: 68db ldr r3, [r3, #12]
800081c: 3304 adds r3, #4
800081e: 623b str r3, [r7, #32]
break;
8000820: e023 b.n 800086a <HAL_GPIO_Init+0xe2>
config = GPIO_Init->Speed + GPIO_CR_CNF_AF_OUTPUT_PP;
8000822: 683b ldr r3, [r7, #0]
8000824: 68db ldr r3, [r3, #12]
8000826: 3308 adds r3, #8
8000828: 623b str r3, [r7, #32]
break;
800082a: e01e b.n 800086a <HAL_GPIO_Init+0xe2>
config = GPIO_Init->Speed + GPIO_CR_CNF_AF_OUTPUT_OD;
800082c: 683b ldr r3, [r7, #0]
800082e: 68db ldr r3, [r3, #12]
8000830: 330c adds r3, #12
8000832: 623b str r3, [r7, #32]
break;
8000834: e019 b.n 800086a <HAL_GPIO_Init+0xe2>
if (GPIO_Init->Pull == GPIO_NOPULL)
8000836: 683b ldr r3, [r7, #0]
8000838: 689b ldr r3, [r3, #8]
800083a: 2b00 cmp r3, #0
800083c: d102 bne.n 8000844 <HAL_GPIO_Init+0xbc>
config = GPIO_CR_MODE_INPUT + GPIO_CR_CNF_INPUT_FLOATING;
800083e: 2304 movs r3, #4
8000840: 623b str r3, [r7, #32]
break;
8000842: e012 b.n 800086a <HAL_GPIO_Init+0xe2>
else if (GPIO_Init->Pull == GPIO_PULLUP)
8000844: 683b ldr r3, [r7, #0]
8000846: 689b ldr r3, [r3, #8]
8000848: 2b01 cmp r3, #1
800084a: d105 bne.n 8000858 <HAL_GPIO_Init+0xd0>
config = GPIO_CR_MODE_INPUT + GPIO_CR_CNF_INPUT_PU_PD;
800084c: 2308 movs r3, #8
800084e: 623b str r3, [r7, #32]
GPIOx->BSRR = ioposition;
8000850: 687b ldr r3, [r7, #4]
8000852: 69fa ldr r2, [r7, #28]
8000854: 611a str r2, [r3, #16]
break;
8000856: e008 b.n 800086a <HAL_GPIO_Init+0xe2>
config = GPIO_CR_MODE_INPUT + GPIO_CR_CNF_INPUT_PU_PD;
8000858: 2308 movs r3, #8
800085a: 623b str r3, [r7, #32]
GPIOx->BRR = ioposition;
800085c: 687b ldr r3, [r7, #4]
800085e: 69fa ldr r2, [r7, #28]
8000860: 615a str r2, [r3, #20]
break;
8000862: e002 b.n 800086a <HAL_GPIO_Init+0xe2>
config = GPIO_CR_MODE_INPUT + GPIO_CR_CNF_ANALOG;
8000864: 2300 movs r3, #0
8000866: 623b str r3, [r7, #32]
break;
8000868: 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;
800086a: 69bb ldr r3, [r7, #24]
800086c: 2bff cmp r3, #255 ; 0xff
800086e: d801 bhi.n 8000874 <HAL_GPIO_Init+0xec>
8000870: 687b ldr r3, [r7, #4]
8000872: e001 b.n 8000878 <HAL_GPIO_Init+0xf0>
8000874: 687b ldr r3, [r7, #4]
8000876: 3304 adds r3, #4
8000878: 617b str r3, [r7, #20]
registeroffset = (iocurrent < GPIO_PIN_8) ? (position << 2u) : ((position - 8u) << 2u);
800087a: 69bb ldr r3, [r7, #24]
800087c: 2bff cmp r3, #255 ; 0xff
800087e: d802 bhi.n 8000886 <HAL_GPIO_Init+0xfe>
8000880: 6a7b ldr r3, [r7, #36] ; 0x24
8000882: 009b lsls r3, r3, #2
8000884: e002 b.n 800088c <HAL_GPIO_Init+0x104>
8000886: 6a7b ldr r3, [r7, #36] ; 0x24
8000888: 3b08 subs r3, #8
800088a: 009b lsls r3, r3, #2
800088c: 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));
800088e: 697b ldr r3, [r7, #20]
8000890: 681a ldr r2, [r3, #0]
8000892: 210f movs r1, #15
8000894: 693b ldr r3, [r7, #16]
8000896: fa01 f303 lsl.w r3, r1, r3
800089a: 43db mvns r3, r3
800089c: 401a ands r2, r3
800089e: 6a39 ldr r1, [r7, #32]
80008a0: 693b ldr r3, [r7, #16]
80008a2: fa01 f303 lsl.w r3, r1, r3
80008a6: 431a orrs r2, r3
80008a8: 697b ldr r3, [r7, #20]
80008aa: 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)
80008ac: 683b ldr r3, [r7, #0]
80008ae: 685b ldr r3, [r3, #4]
80008b0: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
80008b4: 2b00 cmp r3, #0
80008b6: f000 8096 beq.w 80009e6 <HAL_GPIO_Init+0x25e>
{
/* Enable AFIO Clock */
__HAL_RCC_AFIO_CLK_ENABLE();
80008ba: 4b59 ldr r3, [pc, #356] ; (8000a20 <HAL_GPIO_Init+0x298>)
80008bc: 699b ldr r3, [r3, #24]
80008be: 4a58 ldr r2, [pc, #352] ; (8000a20 <HAL_GPIO_Init+0x298>)
80008c0: f043 0301 orr.w r3, r3, #1
80008c4: 6193 str r3, [r2, #24]
80008c6: 4b56 ldr r3, [pc, #344] ; (8000a20 <HAL_GPIO_Init+0x298>)
80008c8: 699b ldr r3, [r3, #24]
80008ca: f003 0301 and.w r3, r3, #1
80008ce: 60bb str r3, [r7, #8]
80008d0: 68bb ldr r3, [r7, #8]
temp = AFIO->EXTICR[position >> 2u];
80008d2: 4a54 ldr r2, [pc, #336] ; (8000a24 <HAL_GPIO_Init+0x29c>)
80008d4: 6a7b ldr r3, [r7, #36] ; 0x24
80008d6: 089b lsrs r3, r3, #2
80008d8: 3302 adds r3, #2
80008da: f852 3023 ldr.w r3, [r2, r3, lsl #2]
80008de: 60fb str r3, [r7, #12]
CLEAR_BIT(temp, (0x0Fu) << (4u * (position & 0x03u)));
80008e0: 6a7b ldr r3, [r7, #36] ; 0x24
80008e2: f003 0303 and.w r3, r3, #3
80008e6: 009b lsls r3, r3, #2
80008e8: 220f movs r2, #15
80008ea: fa02 f303 lsl.w r3, r2, r3
80008ee: 43db mvns r3, r3
80008f0: 68fa ldr r2, [r7, #12]
80008f2: 4013 ands r3, r2
80008f4: 60fb str r3, [r7, #12]
SET_BIT(temp, (GPIO_GET_INDEX(GPIOx)) << (4u * (position & 0x03u)));
80008f6: 687b ldr r3, [r7, #4]
80008f8: 4a4b ldr r2, [pc, #300] ; (8000a28 <HAL_GPIO_Init+0x2a0>)
80008fa: 4293 cmp r3, r2
80008fc: d013 beq.n 8000926 <HAL_GPIO_Init+0x19e>
80008fe: 687b ldr r3, [r7, #4]
8000900: 4a4a ldr r2, [pc, #296] ; (8000a2c <HAL_GPIO_Init+0x2a4>)
8000902: 4293 cmp r3, r2
8000904: d00d beq.n 8000922 <HAL_GPIO_Init+0x19a>
8000906: 687b ldr r3, [r7, #4]
8000908: 4a49 ldr r2, [pc, #292] ; (8000a30 <HAL_GPIO_Init+0x2a8>)
800090a: 4293 cmp r3, r2
800090c: d007 beq.n 800091e <HAL_GPIO_Init+0x196>
800090e: 687b ldr r3, [r7, #4]
8000910: 4a48 ldr r2, [pc, #288] ; (8000a34 <HAL_GPIO_Init+0x2ac>)
8000912: 4293 cmp r3, r2
8000914: d101 bne.n 800091a <HAL_GPIO_Init+0x192>
8000916: 2303 movs r3, #3
8000918: e006 b.n 8000928 <HAL_GPIO_Init+0x1a0>
800091a: 2304 movs r3, #4
800091c: e004 b.n 8000928 <HAL_GPIO_Init+0x1a0>
800091e: 2302 movs r3, #2
8000920: e002 b.n 8000928 <HAL_GPIO_Init+0x1a0>
8000922: 2301 movs r3, #1
8000924: e000 b.n 8000928 <HAL_GPIO_Init+0x1a0>
8000926: 2300 movs r3, #0
8000928: 6a7a ldr r2, [r7, #36] ; 0x24
800092a: f002 0203 and.w r2, r2, #3
800092e: 0092 lsls r2, r2, #2
8000930: 4093 lsls r3, r2
8000932: 68fa ldr r2, [r7, #12]
8000934: 4313 orrs r3, r2
8000936: 60fb str r3, [r7, #12]
AFIO->EXTICR[position >> 2u] = temp;
8000938: 493a ldr r1, [pc, #232] ; (8000a24 <HAL_GPIO_Init+0x29c>)
800093a: 6a7b ldr r3, [r7, #36] ; 0x24
800093c: 089b lsrs r3, r3, #2
800093e: 3302 adds r3, #2
8000940: 68fa ldr r2, [r7, #12]
8000942: f841 2023 str.w r2, [r1, r3, lsl #2]
/* Configure the interrupt mask */
if ((GPIO_Init->Mode & GPIO_MODE_IT) == GPIO_MODE_IT)
8000946: 683b ldr r3, [r7, #0]
8000948: 685b ldr r3, [r3, #4]
800094a: f403 3380 and.w r3, r3, #65536 ; 0x10000
800094e: 2b00 cmp r3, #0
8000950: d006 beq.n 8000960 <HAL_GPIO_Init+0x1d8>
{
SET_BIT(EXTI->IMR, iocurrent);
8000952: 4b39 ldr r3, [pc, #228] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
8000954: 681a ldr r2, [r3, #0]
8000956: 4938 ldr r1, [pc, #224] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
8000958: 69bb ldr r3, [r7, #24]
800095a: 4313 orrs r3, r2
800095c: 600b str r3, [r1, #0]
800095e: e006 b.n 800096e <HAL_GPIO_Init+0x1e6>
}
else
{
CLEAR_BIT(EXTI->IMR, iocurrent);
8000960: 4b35 ldr r3, [pc, #212] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
8000962: 681a ldr r2, [r3, #0]
8000964: 69bb ldr r3, [r7, #24]
8000966: 43db mvns r3, r3
8000968: 4933 ldr r1, [pc, #204] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
800096a: 4013 ands r3, r2
800096c: 600b str r3, [r1, #0]
}
/* Configure the event mask */
if ((GPIO_Init->Mode & GPIO_MODE_EVT) == GPIO_MODE_EVT)
800096e: 683b ldr r3, [r7, #0]
8000970: 685b ldr r3, [r3, #4]
8000972: f403 3300 and.w r3, r3, #131072 ; 0x20000
8000976: 2b00 cmp r3, #0
8000978: d006 beq.n 8000988 <HAL_GPIO_Init+0x200>
{
SET_BIT(EXTI->EMR, iocurrent);
800097a: 4b2f ldr r3, [pc, #188] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
800097c: 685a ldr r2, [r3, #4]
800097e: 492e ldr r1, [pc, #184] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
8000980: 69bb ldr r3, [r7, #24]
8000982: 4313 orrs r3, r2
8000984: 604b str r3, [r1, #4]
8000986: e006 b.n 8000996 <HAL_GPIO_Init+0x20e>
}
else
{
CLEAR_BIT(EXTI->EMR, iocurrent);
8000988: 4b2b ldr r3, [pc, #172] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
800098a: 685a ldr r2, [r3, #4]
800098c: 69bb ldr r3, [r7, #24]
800098e: 43db mvns r3, r3
8000990: 4929 ldr r1, [pc, #164] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
8000992: 4013 ands r3, r2
8000994: 604b str r3, [r1, #4]
}
/* Enable or disable the rising trigger */
if ((GPIO_Init->Mode & RISING_EDGE) == RISING_EDGE)
8000996: 683b ldr r3, [r7, #0]
8000998: 685b ldr r3, [r3, #4]
800099a: f403 1380 and.w r3, r3, #1048576 ; 0x100000
800099e: 2b00 cmp r3, #0
80009a0: d006 beq.n 80009b0 <HAL_GPIO_Init+0x228>
{
SET_BIT(EXTI->RTSR, iocurrent);
80009a2: 4b25 ldr r3, [pc, #148] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
80009a4: 689a ldr r2, [r3, #8]
80009a6: 4924 ldr r1, [pc, #144] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
80009a8: 69bb ldr r3, [r7, #24]
80009aa: 4313 orrs r3, r2
80009ac: 608b str r3, [r1, #8]
80009ae: e006 b.n 80009be <HAL_GPIO_Init+0x236>
}
else
{
CLEAR_BIT(EXTI->RTSR, iocurrent);
80009b0: 4b21 ldr r3, [pc, #132] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
80009b2: 689a ldr r2, [r3, #8]
80009b4: 69bb ldr r3, [r7, #24]
80009b6: 43db mvns r3, r3
80009b8: 491f ldr r1, [pc, #124] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
80009ba: 4013 ands r3, r2
80009bc: 608b str r3, [r1, #8]
}
/* Enable or disable the falling trigger */
if ((GPIO_Init->Mode & FALLING_EDGE) == FALLING_EDGE)
80009be: 683b ldr r3, [r7, #0]
80009c0: 685b ldr r3, [r3, #4]
80009c2: f403 1300 and.w r3, r3, #2097152 ; 0x200000
80009c6: 2b00 cmp r3, #0
80009c8: d006 beq.n 80009d8 <HAL_GPIO_Init+0x250>
{
SET_BIT(EXTI->FTSR, iocurrent);
80009ca: 4b1b ldr r3, [pc, #108] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
80009cc: 68da ldr r2, [r3, #12]
80009ce: 491a ldr r1, [pc, #104] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
80009d0: 69bb ldr r3, [r7, #24]
80009d2: 4313 orrs r3, r2
80009d4: 60cb str r3, [r1, #12]
80009d6: e006 b.n 80009e6 <HAL_GPIO_Init+0x25e>
}
else
{
CLEAR_BIT(EXTI->FTSR, iocurrent);
80009d8: 4b17 ldr r3, [pc, #92] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
80009da: 68da ldr r2, [r3, #12]
80009dc: 69bb ldr r3, [r7, #24]
80009de: 43db mvns r3, r3
80009e0: 4915 ldr r1, [pc, #84] ; (8000a38 <HAL_GPIO_Init+0x2b0>)
80009e2: 4013 ands r3, r2
80009e4: 60cb str r3, [r1, #12]
}
}
}
position++;
80009e6: 6a7b ldr r3, [r7, #36] ; 0x24
80009e8: 3301 adds r3, #1
80009ea: 627b str r3, [r7, #36] ; 0x24
while (((GPIO_Init->Pin) >> position) != 0x00u)
80009ec: 683b ldr r3, [r7, #0]
80009ee: 681a ldr r2, [r3, #0]
80009f0: 6a7b ldr r3, [r7, #36] ; 0x24
80009f2: fa22 f303 lsr.w r3, r2, r3
80009f6: 2b00 cmp r3, #0
80009f8: f47f aed0 bne.w 800079c <HAL_GPIO_Init+0x14>
}
}
80009fc: bf00 nop
80009fe: 372c adds r7, #44 ; 0x2c
8000a00: 46bd mov sp, r7
8000a02: bc80 pop {r7}
8000a04: 4770 bx lr
8000a06: bf00 nop
8000a08: 10210000 .word 0x10210000
8000a0c: 10110000 .word 0x10110000
8000a10: 10120000 .word 0x10120000
8000a14: 10310000 .word 0x10310000
8000a18: 10320000 .word 0x10320000
8000a1c: 10220000 .word 0x10220000
8000a20: 40021000 .word 0x40021000
8000a24: 40010000 .word 0x40010000
8000a28: 40010800 .word 0x40010800
8000a2c: 40010c00 .word 0x40010c00
8000a30: 40011000 .word 0x40011000
8000a34: 40011400 .word 0x40011400
8000a38: 40010400 .word 0x40010400
08000a3c <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)
{
8000a3c: b480 push {r7}
8000a3e: b083 sub sp, #12
8000a40: af00 add r7, sp, #0
8000a42: 6078 str r0, [r7, #4]
8000a44: 460b mov r3, r1
8000a46: 807b strh r3, [r7, #2]
8000a48: 4613 mov r3, r2
8000a4a: 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)
8000a4c: 787b ldrb r3, [r7, #1]
8000a4e: 2b00 cmp r3, #0
8000a50: d003 beq.n 8000a5a <HAL_GPIO_WritePin+0x1e>
{
GPIOx->BSRR = GPIO_Pin;
8000a52: 887a ldrh r2, [r7, #2]
8000a54: 687b ldr r3, [r7, #4]
8000a56: 611a str r2, [r3, #16]
}
else
{
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16u;
}
}
8000a58: e003 b.n 8000a62 <HAL_GPIO_WritePin+0x26>
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16u;
8000a5a: 887b ldrh r3, [r7, #2]
8000a5c: 041a lsls r2, r3, #16
8000a5e: 687b ldr r3, [r7, #4]
8000a60: 611a str r2, [r3, #16]
}
8000a62: bf00 nop
8000a64: 370c adds r7, #12
8000a66: 46bd mov sp, r7
8000a68: bc80 pop {r7}
8000a6a: 4770 bx lr
08000a6c <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)
{
8000a6c: b5f0 push {r4, r5, r6, r7, lr}
8000a6e: b08b sub sp, #44 ; 0x2c
8000a70: af06 add r7, sp, #24
8000a72: 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)
8000a74: 687b ldr r3, [r7, #4]
8000a76: 2b00 cmp r3, #0
8000a78: d101 bne.n 8000a7e <HAL_PCD_Init+0x12>
{
return HAL_ERROR;
8000a7a: 2301 movs r3, #1
8000a7c: e0fd b.n 8000c7a <HAL_PCD_Init+0x20e>
#if defined (USB_OTG_FS)
USBx = hpcd->Instance;
#endif /* defined (USB_OTG_FS) */
if (hpcd->State == HAL_PCD_STATE_RESET)
8000a7e: 687b ldr r3, [r7, #4]
8000a80: f893 32a9 ldrb.w r3, [r3, #681] ; 0x2a9
8000a84: b2db uxtb r3, r3
8000a86: 2b00 cmp r3, #0
8000a88: d106 bne.n 8000a98 <HAL_PCD_Init+0x2c>
{
/* Allocate lock resource and initialize it */
hpcd->Lock = HAL_UNLOCKED;
8000a8a: 687b ldr r3, [r7, #4]
8000a8c: 2200 movs r2, #0
8000a8e: 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);
8000a92: 6878 ldr r0, [r7, #4]
8000a94: f005 fe12 bl 80066bc <HAL_PCD_MspInit>
#endif /* (USE_HAL_PCD_REGISTER_CALLBACKS) */
}
hpcd->State = HAL_PCD_STATE_BUSY;
8000a98: 687b ldr r3, [r7, #4]
8000a9a: 2203 movs r2, #3
8000a9c: 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);
8000aa0: 687b ldr r3, [r7, #4]
8000aa2: 681b ldr r3, [r3, #0]
8000aa4: 4618 mov r0, r3
8000aa6: f002 f82b bl 8002b00 <USB_DisableGlobalInt>
/*Init the Core (common init.) */
if (USB_CoreInit(hpcd->Instance, hpcd->Init) != HAL_OK)
8000aaa: 687b ldr r3, [r7, #4]
8000aac: 681b ldr r3, [r3, #0]
8000aae: 603b str r3, [r7, #0]
8000ab0: 687e ldr r6, [r7, #4]
8000ab2: 466d mov r5, sp
8000ab4: f106 0410 add.w r4, r6, #16
8000ab8: cc0f ldmia r4!, {r0, r1, r2, r3}
8000aba: c50f stmia r5!, {r0, r1, r2, r3}
8000abc: 6823 ldr r3, [r4, #0]
8000abe: 602b str r3, [r5, #0]
8000ac0: 1d33 adds r3, r6, #4
8000ac2: cb0e ldmia r3, {r1, r2, r3}
8000ac4: 6838 ldr r0, [r7, #0]
8000ac6: f001 fff5 bl 8002ab4 <USB_CoreInit>
8000aca: 4603 mov r3, r0
8000acc: 2b00 cmp r3, #0
8000ace: d005 beq.n 8000adc <HAL_PCD_Init+0x70>
{
hpcd->State = HAL_PCD_STATE_ERROR;
8000ad0: 687b ldr r3, [r7, #4]
8000ad2: 2202 movs r2, #2
8000ad4: f883 22a9 strb.w r2, [r3, #681] ; 0x2a9
return HAL_ERROR;
8000ad8: 2301 movs r3, #1
8000ada: e0ce b.n 8000c7a <HAL_PCD_Init+0x20e>
}
/* Force Device Mode*/
(void)USB_SetCurrentMode(hpcd->Instance, USB_DEVICE_MODE);
8000adc: 687b ldr r3, [r7, #4]
8000ade: 681b ldr r3, [r3, #0]
8000ae0: 2100 movs r1, #0
8000ae2: 4618 mov r0, r3
8000ae4: f002 f826 bl 8002b34 <USB_SetCurrentMode>
/* Init endpoints structures */
for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
8000ae8: 2300 movs r3, #0
8000aea: 73fb strb r3, [r7, #15]
8000aec: e04c b.n 8000b88 <HAL_PCD_Init+0x11c>
{
/* Init ep structure */
hpcd->IN_ep[i].is_in = 1U;
8000aee: 7bfb ldrb r3, [r7, #15]
8000af0: 6879 ldr r1, [r7, #4]
8000af2: 1c5a adds r2, r3, #1
8000af4: 4613 mov r3, r2
8000af6: 009b lsls r3, r3, #2
8000af8: 4413 add r3, r2
8000afa: 00db lsls r3, r3, #3
8000afc: 440b add r3, r1
8000afe: 3301 adds r3, #1
8000b00: 2201 movs r2, #1
8000b02: 701a strb r2, [r3, #0]
hpcd->IN_ep[i].num = i;
8000b04: 7bfb ldrb r3, [r7, #15]
8000b06: 6879 ldr r1, [r7, #4]
8000b08: 1c5a adds r2, r3, #1
8000b0a: 4613 mov r3, r2
8000b0c: 009b lsls r3, r3, #2
8000b0e: 4413 add r3, r2
8000b10: 00db lsls r3, r3, #3
8000b12: 440b add r3, r1
8000b14: 7bfa ldrb r2, [r7, #15]
8000b16: 701a strb r2, [r3, #0]
hpcd->IN_ep[i].tx_fifo_num = i;
8000b18: 7bfa ldrb r2, [r7, #15]
8000b1a: 7bfb ldrb r3, [r7, #15]
8000b1c: b298 uxth r0, r3
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: 3336 adds r3, #54 ; 0x36
8000b2c: 4602 mov r2, r0
8000b2e: 801a strh r2, [r3, #0]
/* Control until ep is activated */
hpcd->IN_ep[i].type = EP_TYPE_CTRL;
8000b30: 7bfb ldrb r3, [r7, #15]
8000b32: 6879 ldr r1, [r7, #4]
8000b34: 1c5a adds r2, r3, #1
8000b36: 4613 mov r3, r2
8000b38: 009b lsls r3, r3, #2
8000b3a: 4413 add r3, r2
8000b3c: 00db lsls r3, r3, #3
8000b3e: 440b add r3, r1
8000b40: 3303 adds r3, #3
8000b42: 2200 movs r2, #0
8000b44: 701a strb r2, [r3, #0]
hpcd->IN_ep[i].maxpacket = 0U;
8000b46: 7bfa ldrb r2, [r7, #15]
8000b48: 6879 ldr r1, [r7, #4]
8000b4a: 4613 mov r3, r2
8000b4c: 009b lsls r3, r3, #2
8000b4e: 4413 add r3, r2
8000b50: 00db lsls r3, r3, #3
8000b52: 440b add r3, r1
8000b54: 3338 adds r3, #56 ; 0x38
8000b56: 2200 movs r2, #0
8000b58: 601a str r2, [r3, #0]
hpcd->IN_ep[i].xfer_buff = 0U;
8000b5a: 7bfa ldrb r2, [r7, #15]
8000b5c: 6879 ldr r1, [r7, #4]
8000b5e: 4613 mov r3, r2
8000b60: 009b lsls r3, r3, #2
8000b62: 4413 add r3, r2
8000b64: 00db lsls r3, r3, #3
8000b66: 440b add r3, r1
8000b68: 333c adds r3, #60 ; 0x3c
8000b6a: 2200 movs r2, #0
8000b6c: 601a str r2, [r3, #0]
hpcd->IN_ep[i].xfer_len = 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: 3340 adds r3, #64 ; 0x40
8000b7e: 2200 movs r2, #0
8000b80: 601a str r2, [r3, #0]
for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
8000b82: 7bfb ldrb r3, [r7, #15]
8000b84: 3301 adds r3, #1
8000b86: 73fb strb r3, [r7, #15]
8000b88: 7bfa ldrb r2, [r7, #15]
8000b8a: 687b ldr r3, [r7, #4]
8000b8c: 685b ldr r3, [r3, #4]
8000b8e: 429a cmp r2, r3
8000b90: d3ad bcc.n 8000aee <HAL_PCD_Init+0x82>
}
for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
8000b92: 2300 movs r3, #0
8000b94: 73fb strb r3, [r7, #15]
8000b96: e044 b.n 8000c22 <HAL_PCD_Init+0x1b6>
{
hpcd->OUT_ep[i].is_in = 0U;
8000b98: 7bfa ldrb r2, [r7, #15]
8000b9a: 6879 ldr r1, [r7, #4]
8000b9c: 4613 mov r3, r2
8000b9e: 009b lsls r3, r3, #2
8000ba0: 4413 add r3, r2
8000ba2: 00db lsls r3, r3, #3
8000ba4: 440b add r3, r1
8000ba6: f203 1369 addw r3, r3, #361 ; 0x169
8000baa: 2200 movs r2, #0
8000bac: 701a strb r2, [r3, #0]
hpcd->OUT_ep[i].num = i;
8000bae: 7bfa ldrb r2, [r7, #15]
8000bb0: 6879 ldr r1, [r7, #4]
8000bb2: 4613 mov r3, r2
8000bb4: 009b lsls r3, r3, #2
8000bb6: 4413 add r3, r2
8000bb8: 00db lsls r3, r3, #3
8000bba: 440b add r3, r1
8000bbc: f503 73b4 add.w r3, r3, #360 ; 0x168
8000bc0: 7bfa ldrb r2, [r7, #15]
8000bc2: 701a strb r2, [r3, #0]
/* Control until ep is activated */
hpcd->OUT_ep[i].type = EP_TYPE_CTRL;
8000bc4: 7bfa ldrb r2, [r7, #15]
8000bc6: 6879 ldr r1, [r7, #4]
8000bc8: 4613 mov r3, r2
8000bca: 009b lsls r3, r3, #2
8000bcc: 4413 add r3, r2
8000bce: 00db lsls r3, r3, #3
8000bd0: 440b add r3, r1
8000bd2: f203 136b addw r3, r3, #363 ; 0x16b
8000bd6: 2200 movs r2, #0
8000bd8: 701a strb r2, [r3, #0]
hpcd->OUT_ep[i].maxpacket = 0U;
8000bda: 7bfa ldrb r2, [r7, #15]
8000bdc: 6879 ldr r1, [r7, #4]
8000bde: 4613 mov r3, r2
8000be0: 009b lsls r3, r3, #2
8000be2: 4413 add r3, r2
8000be4: 00db lsls r3, r3, #3
8000be6: 440b add r3, r1
8000be8: f503 73bc add.w r3, r3, #376 ; 0x178
8000bec: 2200 movs r2, #0
8000bee: 601a str r2, [r3, #0]
hpcd->OUT_ep[i].xfer_buff = 0U;
8000bf0: 7bfa ldrb r2, [r7, #15]
8000bf2: 6879 ldr r1, [r7, #4]
8000bf4: 4613 mov r3, r2
8000bf6: 009b lsls r3, r3, #2
8000bf8: 4413 add r3, r2
8000bfa: 00db lsls r3, r3, #3
8000bfc: 440b add r3, r1
8000bfe: f503 73be add.w r3, r3, #380 ; 0x17c
8000c02: 2200 movs r2, #0
8000c04: 601a str r2, [r3, #0]
hpcd->OUT_ep[i].xfer_len = 0U;
8000c06: 7bfa ldrb r2, [r7, #15]
8000c08: 6879 ldr r1, [r7, #4]
8000c0a: 4613 mov r3, r2
8000c0c: 009b lsls r3, r3, #2
8000c0e: 4413 add r3, r2
8000c10: 00db lsls r3, r3, #3
8000c12: 440b add r3, r1
8000c14: f503 73c0 add.w r3, r3, #384 ; 0x180
8000c18: 2200 movs r2, #0
8000c1a: 601a str r2, [r3, #0]
for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
8000c1c: 7bfb ldrb r3, [r7, #15]
8000c1e: 3301 adds r3, #1
8000c20: 73fb strb r3, [r7, #15]
8000c22: 7bfa ldrb r2, [r7, #15]
8000c24: 687b ldr r3, [r7, #4]
8000c26: 685b ldr r3, [r3, #4]
8000c28: 429a cmp r2, r3
8000c2a: d3b5 bcc.n 8000b98 <HAL_PCD_Init+0x12c>
}
/* Init Device */
if (USB_DevInit(hpcd->Instance, hpcd->Init) != HAL_OK)
8000c2c: 687b ldr r3, [r7, #4]
8000c2e: 681b ldr r3, [r3, #0]
8000c30: 603b str r3, [r7, #0]
8000c32: 687e ldr r6, [r7, #4]
8000c34: 466d mov r5, sp
8000c36: f106 0410 add.w r4, r6, #16
8000c3a: cc0f ldmia r4!, {r0, r1, r2, r3}
8000c3c: c50f stmia r5!, {r0, r1, r2, r3}
8000c3e: 6823 ldr r3, [r4, #0]
8000c40: 602b str r3, [r5, #0]
8000c42: 1d33 adds r3, r6, #4
8000c44: cb0e ldmia r3, {r1, r2, r3}
8000c46: 6838 ldr r0, [r7, #0]
8000c48: f001 ff80 bl 8002b4c <USB_DevInit>
8000c4c: 4603 mov r3, r0
8000c4e: 2b00 cmp r3, #0
8000c50: d005 beq.n 8000c5e <HAL_PCD_Init+0x1f2>
{
hpcd->State = HAL_PCD_STATE_ERROR;
8000c52: 687b ldr r3, [r7, #4]
8000c54: 2202 movs r2, #2
8000c56: f883 22a9 strb.w r2, [r3, #681] ; 0x2a9
return HAL_ERROR;
8000c5a: 2301 movs r3, #1
8000c5c: e00d b.n 8000c7a <HAL_PCD_Init+0x20e>
}
hpcd->USB_Address = 0U;
8000c5e: 687b ldr r3, [r7, #4]
8000c60: 2200 movs r2, #0
8000c62: f883 2024 strb.w r2, [r3, #36] ; 0x24
hpcd->State = HAL_PCD_STATE_READY;
8000c66: 687b ldr r3, [r7, #4]
8000c68: 2201 movs r2, #1
8000c6a: f883 22a9 strb.w r2, [r3, #681] ; 0x2a9
(void)USB_DevDisconnect(hpcd->Instance);
8000c6e: 687b ldr r3, [r7, #4]
8000c70: 681b ldr r3, [r3, #0]
8000c72: 4618 mov r0, r3
8000c74: f003 ff1a bl 8004aac <USB_DevDisconnect>
return HAL_OK;
8000c78: 2300 movs r3, #0
}
8000c7a: 4618 mov r0, r3
8000c7c: 3714 adds r7, #20
8000c7e: 46bd mov sp, r7
8000c80: bdf0 pop {r4, r5, r6, r7, pc}
08000c82 <HAL_PCD_Start>:
* @brief Start the USB device
* @param hpcd PCD handle
* @retval HAL status
*/
HAL_StatusTypeDef HAL_PCD_Start(PCD_HandleTypeDef *hpcd)
{
8000c82: b580 push {r7, lr}
8000c84: b082 sub sp, #8
8000c86: af00 add r7, sp, #0
8000c88: 6078 str r0, [r7, #4]
__HAL_LOCK(hpcd);
8000c8a: 687b ldr r3, [r7, #4]
8000c8c: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8
8000c90: 2b01 cmp r3, #1
8000c92: d101 bne.n 8000c98 <HAL_PCD_Start+0x16>
8000c94: 2302 movs r3, #2
8000c96: e016 b.n 8000cc6 <HAL_PCD_Start+0x44>
8000c98: 687b ldr r3, [r7, #4]
8000c9a: 2201 movs r2, #1
8000c9c: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8
__HAL_PCD_ENABLE(hpcd);
8000ca0: 687b ldr r3, [r7, #4]
8000ca2: 681b ldr r3, [r3, #0]
8000ca4: 4618 mov r0, r3
8000ca6: f001 ff15 bl 8002ad4 <USB_EnableGlobalInt>
#if defined (USB)
HAL_PCDEx_SetConnectionState(hpcd, 1U);
8000caa: 2101 movs r1, #1
8000cac: 6878 ldr r0, [r7, #4]
8000cae: f005 ff80 bl 8006bb2 <HAL_PCDEx_SetConnectionState>
#endif /* defined (USB) */
(void)USB_DevConnect(hpcd->Instance);
8000cb2: 687b ldr r3, [r7, #4]
8000cb4: 681b ldr r3, [r3, #0]
8000cb6: 4618 mov r0, r3
8000cb8: f003 feee bl 8004a98 <USB_DevConnect>
__HAL_UNLOCK(hpcd);
8000cbc: 687b ldr r3, [r7, #4]
8000cbe: 2200 movs r2, #0
8000cc0: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8
return HAL_OK;
8000cc4: 2300 movs r3, #0
}
8000cc6: 4618 mov r0, r3
8000cc8: 3708 adds r7, #8
8000cca: 46bd mov sp, r7
8000ccc: bd80 pop {r7, pc}
08000cce <HAL_PCD_IRQHandler>:
* @brief This function handles PCD interrupt request.
* @param hpcd PCD handle
* @retval HAL status
*/
void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd)
{
8000cce: b580 push {r7, lr}
8000cd0: b088 sub sp, #32
8000cd2: af00 add r7, sp, #0
8000cd4: 6078 str r0, [r7, #4]
uint16_t store_ep[8];
uint8_t i;
if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_CTR))
8000cd6: 687b ldr r3, [r7, #4]
8000cd8: 681b ldr r3, [r3, #0]
8000cda: 4618 mov r0, r3
8000cdc: f003 fef0 bl 8004ac0 <USB_ReadInterrupts>
8000ce0: 4603 mov r3, r0
8000ce2: f403 4300 and.w r3, r3, #32768 ; 0x8000
8000ce6: f5b3 4f00 cmp.w r3, #32768 ; 0x8000
8000cea: d102 bne.n 8000cf2 <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);
8000cec: 6878 ldr r0, [r7, #4]
8000cee: f000 fb61 bl 80013b4 <PCD_EP_ISR_Handler>
}
if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_RESET))
8000cf2: 687b ldr r3, [r7, #4]
8000cf4: 681b ldr r3, [r3, #0]
8000cf6: 4618 mov r0, r3
8000cf8: f003 fee2 bl 8004ac0 <USB_ReadInterrupts>
8000cfc: 4603 mov r3, r0
8000cfe: f403 6380 and.w r3, r3, #1024 ; 0x400
8000d02: f5b3 6f80 cmp.w r3, #1024 ; 0x400
8000d06: d112 bne.n 8000d2e <HAL_PCD_IRQHandler+0x60>
{
__HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_RESET);
8000d08: 687b ldr r3, [r7, #4]
8000d0a: 681b ldr r3, [r3, #0]
8000d0c: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44
8000d10: b29a uxth r2, r3
8000d12: 687b ldr r3, [r7, #4]
8000d14: 681b ldr r3, [r3, #0]
8000d16: f422 6280 bic.w r2, r2, #1024 ; 0x400
8000d1a: b292 uxth r2, r2
8000d1c: f8a3 2044 strh.w r2, [r3, #68] ; 0x44
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
hpcd->ResetCallback(hpcd);
#else
HAL_PCD_ResetCallback(hpcd);
8000d20: 6878 ldr r0, [r7, #4]
8000d22: f005 fd4e bl 80067c2 <HAL_PCD_ResetCallback>
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
(void)HAL_PCD_SetAddress(hpcd, 0U);
8000d26: 2100 movs r1, #0
8000d28: 6878 ldr r0, [r7, #4]
8000d2a: f000 f925 bl 8000f78 <HAL_PCD_SetAddress>
}
if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_PMAOVR))
8000d2e: 687b ldr r3, [r7, #4]
8000d30: 681b ldr r3, [r3, #0]
8000d32: 4618 mov r0, r3
8000d34: f003 fec4 bl 8004ac0 <USB_ReadInterrupts>
8000d38: 4603 mov r3, r0
8000d3a: f403 4380 and.w r3, r3, #16384 ; 0x4000
8000d3e: f5b3 4f80 cmp.w r3, #16384 ; 0x4000
8000d42: d10b bne.n 8000d5c <HAL_PCD_IRQHandler+0x8e>
{
__HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_PMAOVR);
8000d44: 687b ldr r3, [r7, #4]
8000d46: 681b ldr r3, [r3, #0]
8000d48: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44
8000d4c: b29a uxth r2, r3
8000d4e: 687b ldr r3, [r7, #4]
8000d50: 681b ldr r3, [r3, #0]
8000d52: f422 4280 bic.w r2, r2, #16384 ; 0x4000
8000d56: b292 uxth r2, r2
8000d58: f8a3 2044 strh.w r2, [r3, #68] ; 0x44
}
if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_ERR))
8000d5c: 687b ldr r3, [r7, #4]
8000d5e: 681b ldr r3, [r3, #0]
8000d60: 4618 mov r0, r3
8000d62: f003 fead bl 8004ac0 <USB_ReadInterrupts>
8000d66: 4603 mov r3, r0
8000d68: f403 5300 and.w r3, r3, #8192 ; 0x2000
8000d6c: f5b3 5f00 cmp.w r3, #8192 ; 0x2000
8000d70: d10b bne.n 8000d8a <HAL_PCD_IRQHandler+0xbc>
{
__HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_ERR);
8000d72: 687b ldr r3, [r7, #4]
8000d74: 681b ldr r3, [r3, #0]
8000d76: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44
8000d7a: b29a uxth r2, r3
8000d7c: 687b ldr r3, [r7, #4]
8000d7e: 681b ldr r3, [r3, #0]
8000d80: f422 5200 bic.w r2, r2, #8192 ; 0x2000
8000d84: b292 uxth r2, r2
8000d86: f8a3 2044 strh.w r2, [r3, #68] ; 0x44
}
if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_WKUP))
8000d8a: 687b ldr r3, [r7, #4]
8000d8c: 681b ldr r3, [r3, #0]
8000d8e: 4618 mov r0, r3
8000d90: f003 fe96 bl 8004ac0 <USB_ReadInterrupts>
8000d94: 4603 mov r3, r0
8000d96: f403 5380 and.w r3, r3, #4096 ; 0x1000
8000d9a: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
8000d9e: d126 bne.n 8000dee <HAL_PCD_IRQHandler+0x120>
{
hpcd->Instance->CNTR &= (uint16_t) ~(USB_CNTR_LP_MODE);
8000da0: 687b ldr r3, [r7, #4]
8000da2: 681b ldr r3, [r3, #0]
8000da4: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40
8000da8: b29a uxth r2, r3
8000daa: 687b ldr r3, [r7, #4]
8000dac: 681b ldr r3, [r3, #0]
8000dae: f022 0204 bic.w r2, r2, #4
8000db2: b292 uxth r2, r2
8000db4: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
hpcd->Instance->CNTR &= (uint16_t) ~(USB_CNTR_FSUSP);
8000db8: 687b ldr r3, [r7, #4]
8000dba: 681b ldr r3, [r3, #0]
8000dbc: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40
8000dc0: b29a uxth r2, r3
8000dc2: 687b ldr r3, [r7, #4]
8000dc4: 681b ldr r3, [r3, #0]
8000dc6: f022 0208 bic.w r2, r2, #8
8000dca: b292 uxth r2, r2
8000dcc: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
hpcd->ResumeCallback(hpcd);
#else
HAL_PCD_ResumeCallback(hpcd);
8000dd0: 6878 ldr r0, [r7, #4]
8000dd2: f005 fd2f bl 8006834 <HAL_PCD_ResumeCallback>
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
__HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_WKUP);
8000dd6: 687b ldr r3, [r7, #4]
8000dd8: 681b ldr r3, [r3, #0]
8000dda: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44
8000dde: b29a uxth r2, r3
8000de0: 687b ldr r3, [r7, #4]
8000de2: 681b ldr r3, [r3, #0]
8000de4: f422 5280 bic.w r2, r2, #4096 ; 0x1000
8000de8: b292 uxth r2, r2
8000dea: f8a3 2044 strh.w r2, [r3, #68] ; 0x44
}
if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_SUSP))
8000dee: 687b ldr r3, [r7, #4]
8000df0: 681b ldr r3, [r3, #0]
8000df2: 4618 mov r0, r3
8000df4: f003 fe64 bl 8004ac0 <USB_ReadInterrupts>
8000df8: 4603 mov r3, r0
8000dfa: f403 6300 and.w r3, r3, #2048 ; 0x800
8000dfe: f5b3 6f00 cmp.w r3, #2048 ; 0x800
8000e02: f040 8084 bne.w 8000f0e <HAL_PCD_IRQHandler+0x240>
{
/* WA: To Clear Wakeup flag if raised with suspend signal */
/* Store Endpoint register */
for (i = 0U; i < 8U; i++)
8000e06: 2300 movs r3, #0
8000e08: 77fb strb r3, [r7, #31]
8000e0a: e011 b.n 8000e30 <HAL_PCD_IRQHandler+0x162>
{
store_ep[i] = PCD_GET_ENDPOINT(hpcd->Instance, i);
8000e0c: 687b ldr r3, [r7, #4]
8000e0e: 681b ldr r3, [r3, #0]
8000e10: 461a mov r2, r3
8000e12: 7ffb ldrb r3, [r7, #31]
8000e14: 009b lsls r3, r3, #2
8000e16: 441a add r2, r3
8000e18: 7ffb ldrb r3, [r7, #31]
8000e1a: 8812 ldrh r2, [r2, #0]
8000e1c: b292 uxth r2, r2
8000e1e: 005b lsls r3, r3, #1
8000e20: f107 0120 add.w r1, r7, #32
8000e24: 440b add r3, r1
8000e26: f823 2c14 strh.w r2, [r3, #-20]
for (i = 0U; i < 8U; i++)
8000e2a: 7ffb ldrb r3, [r7, #31]
8000e2c: 3301 adds r3, #1
8000e2e: 77fb strb r3, [r7, #31]
8000e30: 7ffb ldrb r3, [r7, #31]
8000e32: 2b07 cmp r3, #7
8000e34: d9ea bls.n 8000e0c <HAL_PCD_IRQHandler+0x13e>
}
/* FORCE RESET */
hpcd->Instance->CNTR |= (uint16_t)(USB_CNTR_FRES);
8000e36: 687b ldr r3, [r7, #4]
8000e38: 681b ldr r3, [r3, #0]
8000e3a: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40
8000e3e: b29a uxth r2, r3
8000e40: 687b ldr r3, [r7, #4]
8000e42: 681b ldr r3, [r3, #0]
8000e44: f042 0201 orr.w r2, r2, #1
8000e48: b292 uxth r2, r2
8000e4a: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
/* CLEAR RESET */
hpcd->Instance->CNTR &= (uint16_t)(~USB_CNTR_FRES);
8000e4e: 687b ldr r3, [r7, #4]
8000e50: 681b ldr r3, [r3, #0]
8000e52: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40
8000e56: b29a uxth r2, r3
8000e58: 687b ldr r3, [r7, #4]
8000e5a: 681b ldr r3, [r3, #0]
8000e5c: f022 0201 bic.w r2, r2, #1
8000e60: b292 uxth r2, r2
8000e62: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
/* wait for reset flag in ISTR */
while ((hpcd->Instance->ISTR & USB_ISTR_RESET) == 0U)
8000e66: bf00 nop
8000e68: 687b ldr r3, [r7, #4]
8000e6a: 681b ldr r3, [r3, #0]
8000e6c: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44
8000e70: b29b uxth r3, r3
8000e72: f403 6380 and.w r3, r3, #1024 ; 0x400
8000e76: 2b00 cmp r3, #0
8000e78: d0f6 beq.n 8000e68 <HAL_PCD_IRQHandler+0x19a>
{
}
/* Clear Reset Flag */
__HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_RESET);
8000e7a: 687b ldr r3, [r7, #4]
8000e7c: 681b ldr r3, [r3, #0]
8000e7e: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44
8000e82: b29a uxth r2, r3
8000e84: 687b ldr r3, [r7, #4]
8000e86: 681b ldr r3, [r3, #0]
8000e88: f422 6280 bic.w r2, r2, #1024 ; 0x400
8000e8c: b292 uxth r2, r2
8000e8e: f8a3 2044 strh.w r2, [r3, #68] ; 0x44
/* Restore Registre */
for (i = 0U; i < 8U; i++)
8000e92: 2300 movs r3, #0
8000e94: 77fb strb r3, [r7, #31]
8000e96: e010 b.n 8000eba <HAL_PCD_IRQHandler+0x1ec>
{
PCD_SET_ENDPOINT(hpcd->Instance, i, store_ep[i]);
8000e98: 7ffb ldrb r3, [r7, #31]
8000e9a: 687a ldr r2, [r7, #4]
8000e9c: 6812 ldr r2, [r2, #0]
8000e9e: 4611 mov r1, r2
8000ea0: 7ffa ldrb r2, [r7, #31]
8000ea2: 0092 lsls r2, r2, #2
8000ea4: 440a add r2, r1
8000ea6: 005b lsls r3, r3, #1
8000ea8: f107 0120 add.w r1, r7, #32
8000eac: 440b add r3, r1
8000eae: f833 3c14 ldrh.w r3, [r3, #-20]
8000eb2: 8013 strh r3, [r2, #0]
for (i = 0U; i < 8U; i++)
8000eb4: 7ffb ldrb r3, [r7, #31]
8000eb6: 3301 adds r3, #1
8000eb8: 77fb strb r3, [r7, #31]
8000eba: 7ffb ldrb r3, [r7, #31]
8000ebc: 2b07 cmp r3, #7
8000ebe: d9eb bls.n 8000e98 <HAL_PCD_IRQHandler+0x1ca>
}
/* Force low-power mode in the macrocell */
hpcd->Instance->CNTR |= (uint16_t)USB_CNTR_FSUSP;
8000ec0: 687b ldr r3, [r7, #4]
8000ec2: 681b ldr r3, [r3, #0]
8000ec4: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40
8000ec8: b29a uxth r2, r3
8000eca: 687b ldr r3, [r7, #4]
8000ecc: 681b ldr r3, [r3, #0]
8000ece: f042 0208 orr.w r2, r2, #8
8000ed2: b292 uxth r2, r2
8000ed4: 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);
8000ed8: 687b ldr r3, [r7, #4]
8000eda: 681b ldr r3, [r3, #0]
8000edc: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44
8000ee0: b29a uxth r2, r3
8000ee2: 687b ldr r3, [r7, #4]
8000ee4: 681b ldr r3, [r3, #0]
8000ee6: f422 6200 bic.w r2, r2, #2048 ; 0x800
8000eea: b292 uxth r2, r2
8000eec: f8a3 2044 strh.w r2, [r3, #68] ; 0x44
hpcd->Instance->CNTR |= (uint16_t)USB_CNTR_LP_MODE;
8000ef0: 687b ldr r3, [r7, #4]
8000ef2: 681b ldr r3, [r3, #0]
8000ef4: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40
8000ef8: b29a uxth r2, r3
8000efa: 687b ldr r3, [r7, #4]
8000efc: 681b ldr r3, [r3, #0]
8000efe: f042 0204 orr.w r2, r2, #4
8000f02: b292 uxth r2, r2
8000f04: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
hpcd->SuspendCallback(hpcd);
#else
HAL_PCD_SuspendCallback(hpcd);
8000f08: 6878 ldr r0, [r7, #4]
8000f0a: f005 fc79 bl 8006800 <HAL_PCD_SuspendCallback>
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
}
if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_SOF))
8000f0e: 687b ldr r3, [r7, #4]
8000f10: 681b ldr r3, [r3, #0]
8000f12: 4618 mov r0, r3
8000f14: f003 fdd4 bl 8004ac0 <USB_ReadInterrupts>
8000f18: 4603 mov r3, r0
8000f1a: f403 7300 and.w r3, r3, #512 ; 0x200
8000f1e: f5b3 7f00 cmp.w r3, #512 ; 0x200
8000f22: d10e bne.n 8000f42 <HAL_PCD_IRQHandler+0x274>
{
__HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_SOF);
8000f24: 687b ldr r3, [r7, #4]
8000f26: 681b ldr r3, [r3, #0]
8000f28: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44
8000f2c: b29a uxth r2, r3
8000f2e: 687b ldr r3, [r7, #4]
8000f30: 681b ldr r3, [r3, #0]
8000f32: f422 7200 bic.w r2, r2, #512 ; 0x200
8000f36: b292 uxth r2, r2
8000f38: f8a3 2044 strh.w r2, [r3, #68] ; 0x44
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
hpcd->SOFCallback(hpcd);
#else
HAL_PCD_SOFCallback(hpcd);
8000f3c: 6878 ldr r0, [r7, #4]
8000f3e: f005 fc32 bl 80067a6 <HAL_PCD_SOFCallback>
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
}
if (__HAL_PCD_GET_FLAG(hpcd, USB_ISTR_ESOF))
8000f42: 687b ldr r3, [r7, #4]
8000f44: 681b ldr r3, [r3, #0]
8000f46: 4618 mov r0, r3
8000f48: f003 fdba bl 8004ac0 <USB_ReadInterrupts>
8000f4c: 4603 mov r3, r0
8000f4e: f403 7380 and.w r3, r3, #256 ; 0x100
8000f52: f5b3 7f80 cmp.w r3, #256 ; 0x100
8000f56: d10b bne.n 8000f70 <HAL_PCD_IRQHandler+0x2a2>
{
/* clear ESOF flag in ISTR */
__HAL_PCD_CLEAR_FLAG(hpcd, USB_ISTR_ESOF);
8000f58: 687b ldr r3, [r7, #4]
8000f5a: 681b ldr r3, [r3, #0]
8000f5c: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44
8000f60: b29a uxth r2, r3
8000f62: 687b ldr r3, [r7, #4]
8000f64: 681b ldr r3, [r3, #0]
8000f66: f422 7280 bic.w r2, r2, #256 ; 0x100
8000f6a: b292 uxth r2, r2
8000f6c: f8a3 2044 strh.w r2, [r3, #68] ; 0x44
}
}
8000f70: bf00 nop
8000f72: 3720 adds r7, #32
8000f74: 46bd mov sp, r7
8000f76: bd80 pop {r7, pc}
08000f78 <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)
{
8000f78: b580 push {r7, lr}
8000f7a: b082 sub sp, #8
8000f7c: af00 add r7, sp, #0
8000f7e: 6078 str r0, [r7, #4]
8000f80: 460b mov r3, r1
8000f82: 70fb strb r3, [r7, #3]
__HAL_LOCK(hpcd);
8000f84: 687b ldr r3, [r7, #4]
8000f86: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8
8000f8a: 2b01 cmp r3, #1
8000f8c: d101 bne.n 8000f92 <HAL_PCD_SetAddress+0x1a>
8000f8e: 2302 movs r3, #2
8000f90: e013 b.n 8000fba <HAL_PCD_SetAddress+0x42>
8000f92: 687b ldr r3, [r7, #4]
8000f94: 2201 movs r2, #1
8000f96: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8
hpcd->USB_Address = address;
8000f9a: 687b ldr r3, [r7, #4]
8000f9c: 78fa ldrb r2, [r7, #3]
8000f9e: f883 2024 strb.w r2, [r3, #36] ; 0x24
(void)USB_SetDevAddress(hpcd->Instance, address);
8000fa2: 687b ldr r3, [r7, #4]
8000fa4: 681b ldr r3, [r3, #0]
8000fa6: 78fa ldrb r2, [r7, #3]
8000fa8: 4611 mov r1, r2
8000faa: 4618 mov r0, r3
8000fac: f003 fd61 bl 8004a72 <USB_SetDevAddress>
__HAL_UNLOCK(hpcd);
8000fb0: 687b ldr r3, [r7, #4]
8000fb2: 2200 movs r2, #0
8000fb4: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8
return HAL_OK;
8000fb8: 2300 movs r3, #0
}
8000fba: 4618 mov r0, r3
8000fbc: 3708 adds r7, #8
8000fbe: 46bd mov sp, r7
8000fc0: bd80 pop {r7, pc}
08000fc2 <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)
{
8000fc2: b580 push {r7, lr}
8000fc4: b084 sub sp, #16
8000fc6: af00 add r7, sp, #0
8000fc8: 6078 str r0, [r7, #4]
8000fca: 4608 mov r0, r1
8000fcc: 4611 mov r1, r2
8000fce: 461a mov r2, r3
8000fd0: 4603 mov r3, r0
8000fd2: 70fb strb r3, [r7, #3]
8000fd4: 460b mov r3, r1
8000fd6: 803b strh r3, [r7, #0]
8000fd8: 4613 mov r3, r2
8000fda: 70bb strb r3, [r7, #2]
HAL_StatusTypeDef ret = HAL_OK;
8000fdc: 2300 movs r3, #0
8000fde: 72fb strb r3, [r7, #11]
PCD_EPTypeDef *ep;
if ((ep_addr & 0x80U) == 0x80U)
8000fe0: f997 3003 ldrsb.w r3, [r7, #3]
8000fe4: 2b00 cmp r3, #0
8000fe6: da0e bge.n 8001006 <HAL_PCD_EP_Open+0x44>
{
ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK];
8000fe8: 78fb ldrb r3, [r7, #3]
8000fea: f003 0307 and.w r3, r3, #7
8000fee: 1c5a adds r2, r3, #1
8000ff0: 4613 mov r3, r2
8000ff2: 009b lsls r3, r3, #2
8000ff4: 4413 add r3, r2
8000ff6: 00db lsls r3, r3, #3
8000ff8: 687a ldr r2, [r7, #4]
8000ffa: 4413 add r3, r2
8000ffc: 60fb str r3, [r7, #12]
ep->is_in = 1U;
8000ffe: 68fb ldr r3, [r7, #12]
8001000: 2201 movs r2, #1
8001002: 705a strb r2, [r3, #1]
8001004: e00e b.n 8001024 <HAL_PCD_EP_Open+0x62>
}
else
{
ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK];
8001006: 78fb ldrb r3, [r7, #3]
8001008: f003 0207 and.w r2, r3, #7
800100c: 4613 mov r3, r2
800100e: 009b lsls r3, r3, #2
8001010: 4413 add r3, r2
8001012: 00db lsls r3, r3, #3
8001014: f503 73b4 add.w r3, r3, #360 ; 0x168
8001018: 687a ldr r2, [r7, #4]
800101a: 4413 add r3, r2
800101c: 60fb str r3, [r7, #12]
ep->is_in = 0U;
800101e: 68fb ldr r3, [r7, #12]
8001020: 2200 movs r2, #0
8001022: 705a strb r2, [r3, #1]
}
ep->num = ep_addr & EP_ADDR_MSK;
8001024: 78fb ldrb r3, [r7, #3]
8001026: f003 0307 and.w r3, r3, #7
800102a: b2da uxtb r2, r3
800102c: 68fb ldr r3, [r7, #12]
800102e: 701a strb r2, [r3, #0]
ep->maxpacket = ep_mps;
8001030: 883a ldrh r2, [r7, #0]
8001032: 68fb ldr r3, [r7, #12]
8001034: 611a str r2, [r3, #16]
ep->type = ep_type;
8001036: 68fb ldr r3, [r7, #12]
8001038: 78ba ldrb r2, [r7, #2]
800103a: 70da strb r2, [r3, #3]
if (ep->is_in != 0U)
800103c: 68fb ldr r3, [r7, #12]
800103e: 785b ldrb r3, [r3, #1]
8001040: 2b00 cmp r3, #0
8001042: d004 beq.n 800104e <HAL_PCD_EP_Open+0x8c>
{
/* Assign a Tx FIFO */
ep->tx_fifo_num = ep->num;
8001044: 68fb ldr r3, [r7, #12]
8001046: 781b ldrb r3, [r3, #0]
8001048: b29a uxth r2, r3
800104a: 68fb ldr r3, [r7, #12]
800104c: 81da strh r2, [r3, #14]
}
/* Set initial data PID. */
if (ep_type == EP_TYPE_BULK)
800104e: 78bb ldrb r3, [r7, #2]
8001050: 2b02 cmp r3, #2
8001052: d102 bne.n 800105a <HAL_PCD_EP_Open+0x98>
{
ep->data_pid_start = 0U;
8001054: 68fb ldr r3, [r7, #12]
8001056: 2200 movs r2, #0
8001058: 711a strb r2, [r3, #4]
}
__HAL_LOCK(hpcd);
800105a: 687b ldr r3, [r7, #4]
800105c: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8
8001060: 2b01 cmp r3, #1
8001062: d101 bne.n 8001068 <HAL_PCD_EP_Open+0xa6>
8001064: 2302 movs r3, #2
8001066: e00e b.n 8001086 <HAL_PCD_EP_Open+0xc4>
8001068: 687b ldr r3, [r7, #4]
800106a: 2201 movs r2, #1
800106c: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8
(void)USB_ActivateEndpoint(hpcd->Instance, ep);
8001070: 687b ldr r3, [r7, #4]
8001072: 681b ldr r3, [r3, #0]
8001074: 68f9 ldr r1, [r7, #12]
8001076: 4618 mov r0, r3
8001078: f001 fd88 bl 8002b8c <USB_ActivateEndpoint>
__HAL_UNLOCK(hpcd);
800107c: 687b ldr r3, [r7, #4]
800107e: 2200 movs r2, #0
8001080: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8
return ret;
8001084: 7afb ldrb r3, [r7, #11]
}
8001086: 4618 mov r0, r3
8001088: 3710 adds r7, #16
800108a: 46bd mov sp, r7
800108c: bd80 pop {r7, pc}
0800108e <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)
{
800108e: b580 push {r7, lr}
8001090: b084 sub sp, #16
8001092: af00 add r7, sp, #0
8001094: 6078 str r0, [r7, #4]
8001096: 460b mov r3, r1
8001098: 70fb strb r3, [r7, #3]
PCD_EPTypeDef *ep;
if ((ep_addr & 0x80U) == 0x80U)
800109a: f997 3003 ldrsb.w r3, [r7, #3]
800109e: 2b00 cmp r3, #0
80010a0: da0e bge.n 80010c0 <HAL_PCD_EP_Close+0x32>
{
ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK];
80010a2: 78fb ldrb r3, [r7, #3]
80010a4: f003 0307 and.w r3, r3, #7
80010a8: 1c5a adds r2, r3, #1
80010aa: 4613 mov r3, r2
80010ac: 009b lsls r3, r3, #2
80010ae: 4413 add r3, r2
80010b0: 00db lsls r3, r3, #3
80010b2: 687a ldr r2, [r7, #4]
80010b4: 4413 add r3, r2
80010b6: 60fb str r3, [r7, #12]
ep->is_in = 1U;
80010b8: 68fb ldr r3, [r7, #12]
80010ba: 2201 movs r2, #1
80010bc: 705a strb r2, [r3, #1]
80010be: e00e b.n 80010de <HAL_PCD_EP_Close+0x50>
}
else
{
ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK];
80010c0: 78fb ldrb r3, [r7, #3]
80010c2: f003 0207 and.w r2, r3, #7
80010c6: 4613 mov r3, r2
80010c8: 009b lsls r3, r3, #2
80010ca: 4413 add r3, r2
80010cc: 00db lsls r3, r3, #3
80010ce: f503 73b4 add.w r3, r3, #360 ; 0x168
80010d2: 687a ldr r2, [r7, #4]
80010d4: 4413 add r3, r2
80010d6: 60fb str r3, [r7, #12]
ep->is_in = 0U;
80010d8: 68fb ldr r3, [r7, #12]
80010da: 2200 movs r2, #0
80010dc: 705a strb r2, [r3, #1]
}
ep->num = ep_addr & EP_ADDR_MSK;
80010de: 78fb ldrb r3, [r7, #3]
80010e0: f003 0307 and.w r3, r3, #7
80010e4: b2da uxtb r2, r3
80010e6: 68fb ldr r3, [r7, #12]
80010e8: 701a strb r2, [r3, #0]
__HAL_LOCK(hpcd);
80010ea: 687b ldr r3, [r7, #4]
80010ec: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8
80010f0: 2b01 cmp r3, #1
80010f2: d101 bne.n 80010f8 <HAL_PCD_EP_Close+0x6a>
80010f4: 2302 movs r3, #2
80010f6: e00e b.n 8001116 <HAL_PCD_EP_Close+0x88>
80010f8: 687b ldr r3, [r7, #4]
80010fa: 2201 movs r2, #1
80010fc: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8
(void)USB_DeactivateEndpoint(hpcd->Instance, ep);
8001100: 687b ldr r3, [r7, #4]
8001102: 681b ldr r3, [r3, #0]
8001104: 68f9 ldr r1, [r7, #12]
8001106: 4618 mov r0, r3
8001108: f002 f8aa bl 8003260 <USB_DeactivateEndpoint>
__HAL_UNLOCK(hpcd);
800110c: 687b ldr r3, [r7, #4]
800110e: 2200 movs r2, #0
8001110: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8
return HAL_OK;
8001114: 2300 movs r3, #0
}
8001116: 4618 mov r0, r3
8001118: 3710 adds r7, #16
800111a: 46bd mov sp, r7
800111c: bd80 pop {r7, pc}
0800111e <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)
{
800111e: b580 push {r7, lr}
8001120: b086 sub sp, #24
8001122: af00 add r7, sp, #0
8001124: 60f8 str r0, [r7, #12]
8001126: 607a str r2, [r7, #4]
8001128: 603b str r3, [r7, #0]
800112a: 460b mov r3, r1
800112c: 72fb strb r3, [r7, #11]
PCD_EPTypeDef *ep;
ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK];
800112e: 7afb ldrb r3, [r7, #11]
8001130: f003 0207 and.w r2, r3, #7
8001134: 4613 mov r3, r2
8001136: 009b lsls r3, r3, #2
8001138: 4413 add r3, r2
800113a: 00db lsls r3, r3, #3
800113c: f503 73b4 add.w r3, r3, #360 ; 0x168
8001140: 68fa ldr r2, [r7, #12]
8001142: 4413 add r3, r2
8001144: 617b str r3, [r7, #20]
/*setup and start the Xfer */
ep->xfer_buff = pBuf;
8001146: 697b ldr r3, [r7, #20]
8001148: 687a ldr r2, [r7, #4]
800114a: 615a str r2, [r3, #20]
ep->xfer_len = len;
800114c: 697b ldr r3, [r7, #20]
800114e: 683a ldr r2, [r7, #0]
8001150: 619a str r2, [r3, #24]
ep->xfer_count = 0U;
8001152: 697b ldr r3, [r7, #20]
8001154: 2200 movs r2, #0
8001156: 61da str r2, [r3, #28]
ep->is_in = 0U;
8001158: 697b ldr r3, [r7, #20]
800115a: 2200 movs r2, #0
800115c: 705a strb r2, [r3, #1]
ep->num = ep_addr & EP_ADDR_MSK;
800115e: 7afb ldrb r3, [r7, #11]
8001160: f003 0307 and.w r3, r3, #7
8001164: b2da uxtb r2, r3
8001166: 697b ldr r3, [r7, #20]
8001168: 701a strb r2, [r3, #0]
if ((ep_addr & EP_ADDR_MSK) == 0U)
800116a: 7afb ldrb r3, [r7, #11]
800116c: f003 0307 and.w r3, r3, #7
8001170: 2b00 cmp r3, #0
8001172: d106 bne.n 8001182 <HAL_PCD_EP_Receive+0x64>
{
(void)USB_EP0StartXfer(hpcd->Instance, ep);
8001174: 68fb ldr r3, [r7, #12]
8001176: 681b ldr r3, [r3, #0]
8001178: 6979 ldr r1, [r7, #20]
800117a: 4618 mov r0, r3
800117c: f002 fa5c bl 8003638 <USB_EPStartXfer>
8001180: e005 b.n 800118e <HAL_PCD_EP_Receive+0x70>
}
else
{
(void)USB_EPStartXfer(hpcd->Instance, ep);
8001182: 68fb ldr r3, [r7, #12]
8001184: 681b ldr r3, [r3, #0]
8001186: 6979 ldr r1, [r7, #20]
8001188: 4618 mov r0, r3
800118a: f002 fa55 bl 8003638 <USB_EPStartXfer>
}
return HAL_OK;
800118e: 2300 movs r3, #0
}
8001190: 4618 mov r0, r3
8001192: 3718 adds r7, #24
8001194: 46bd mov sp, r7
8001196: bd80 pop {r7, pc}
08001198 <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)
{
8001198: b480 push {r7}
800119a: b083 sub sp, #12
800119c: af00 add r7, sp, #0
800119e: 6078 str r0, [r7, #4]
80011a0: 460b mov r3, r1
80011a2: 70fb strb r3, [r7, #3]
return hpcd->OUT_ep[ep_addr & EP_ADDR_MSK].xfer_count;
80011a4: 78fb ldrb r3, [r7, #3]
80011a6: f003 0207 and.w r2, r3, #7
80011aa: 6879 ldr r1, [r7, #4]
80011ac: 4613 mov r3, r2
80011ae: 009b lsls r3, r3, #2
80011b0: 4413 add r3, r2
80011b2: 00db lsls r3, r3, #3
80011b4: 440b add r3, r1
80011b6: f503 73c2 add.w r3, r3, #388 ; 0x184
80011ba: 681b ldr r3, [r3, #0]
}
80011bc: 4618 mov r0, r3
80011be: 370c adds r7, #12
80011c0: 46bd mov sp, r7
80011c2: bc80 pop {r7}
80011c4: 4770 bx lr
080011c6 <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)
{
80011c6: b580 push {r7, lr}
80011c8: b086 sub sp, #24
80011ca: af00 add r7, sp, #0
80011cc: 60f8 str r0, [r7, #12]
80011ce: 607a str r2, [r7, #4]
80011d0: 603b str r3, [r7, #0]
80011d2: 460b mov r3, r1
80011d4: 72fb strb r3, [r7, #11]
PCD_EPTypeDef *ep;
ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK];
80011d6: 7afb ldrb r3, [r7, #11]
80011d8: f003 0307 and.w r3, r3, #7
80011dc: 1c5a adds r2, r3, #1
80011de: 4613 mov r3, r2
80011e0: 009b lsls r3, r3, #2
80011e2: 4413 add r3, r2
80011e4: 00db lsls r3, r3, #3
80011e6: 68fa ldr r2, [r7, #12]
80011e8: 4413 add r3, r2
80011ea: 617b str r3, [r7, #20]
/*setup and start the Xfer */
ep->xfer_buff = pBuf;
80011ec: 697b ldr r3, [r7, #20]
80011ee: 687a ldr r2, [r7, #4]
80011f0: 615a str r2, [r3, #20]
ep->xfer_len = len;
80011f2: 697b ldr r3, [r7, #20]
80011f4: 683a ldr r2, [r7, #0]
80011f6: 619a str r2, [r3, #24]
#if defined (USB)
ep->xfer_fill_db = 1U;
80011f8: 697b ldr r3, [r7, #20]
80011fa: 2201 movs r2, #1
80011fc: f883 2024 strb.w r2, [r3, #36] ; 0x24
ep->xfer_len_db = len;
8001200: 697b ldr r3, [r7, #20]
8001202: 683a ldr r2, [r7, #0]
8001204: 621a str r2, [r3, #32]
#endif /* defined (USB) */
ep->xfer_count = 0U;
8001206: 697b ldr r3, [r7, #20]
8001208: 2200 movs r2, #0
800120a: 61da str r2, [r3, #28]
ep->is_in = 1U;
800120c: 697b ldr r3, [r7, #20]
800120e: 2201 movs r2, #1
8001210: 705a strb r2, [r3, #1]
ep->num = ep_addr & EP_ADDR_MSK;
8001212: 7afb ldrb r3, [r7, #11]
8001214: f003 0307 and.w r3, r3, #7
8001218: b2da uxtb r2, r3
800121a: 697b ldr r3, [r7, #20]
800121c: 701a strb r2, [r3, #0]
if ((ep_addr & EP_ADDR_MSK) == 0U)
800121e: 7afb ldrb r3, [r7, #11]
8001220: f003 0307 and.w r3, r3, #7
8001224: 2b00 cmp r3, #0
8001226: d106 bne.n 8001236 <HAL_PCD_EP_Transmit+0x70>
{
(void)USB_EP0StartXfer(hpcd->Instance, ep);
8001228: 68fb ldr r3, [r7, #12]
800122a: 681b ldr r3, [r3, #0]
800122c: 6979 ldr r1, [r7, #20]
800122e: 4618 mov r0, r3
8001230: f002 fa02 bl 8003638 <USB_EPStartXfer>
8001234: e005 b.n 8001242 <HAL_PCD_EP_Transmit+0x7c>
}
else
{
(void)USB_EPStartXfer(hpcd->Instance, ep);
8001236: 68fb ldr r3, [r7, #12]
8001238: 681b ldr r3, [r3, #0]
800123a: 6979 ldr r1, [r7, #20]
800123c: 4618 mov r0, r3
800123e: f002 f9fb bl 8003638 <USB_EPStartXfer>
}
return HAL_OK;
8001242: 2300 movs r3, #0
}
8001244: 4618 mov r0, r3
8001246: 3718 adds r7, #24
8001248: 46bd mov sp, r7
800124a: bd80 pop {r7, pc}
0800124c <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)
{
800124c: b580 push {r7, lr}
800124e: b084 sub sp, #16
8001250: af00 add r7, sp, #0
8001252: 6078 str r0, [r7, #4]
8001254: 460b mov r3, r1
8001256: 70fb strb r3, [r7, #3]
PCD_EPTypeDef *ep;
if (((uint32_t)ep_addr & EP_ADDR_MSK) > hpcd->Init.dev_endpoints)
8001258: 78fb ldrb r3, [r7, #3]
800125a: f003 0207 and.w r2, r3, #7
800125e: 687b ldr r3, [r7, #4]
8001260: 685b ldr r3, [r3, #4]
8001262: 429a cmp r2, r3
8001264: d901 bls.n 800126a <HAL_PCD_EP_SetStall+0x1e>
{
return HAL_ERROR;
8001266: 2301 movs r3, #1
8001268: e04c b.n 8001304 <HAL_PCD_EP_SetStall+0xb8>
}
if ((0x80U & ep_addr) == 0x80U)
800126a: f997 3003 ldrsb.w r3, [r7, #3]
800126e: 2b00 cmp r3, #0
8001270: da0e bge.n 8001290 <HAL_PCD_EP_SetStall+0x44>
{
ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK];
8001272: 78fb ldrb r3, [r7, #3]
8001274: f003 0307 and.w r3, r3, #7
8001278: 1c5a adds r2, r3, #1
800127a: 4613 mov r3, r2
800127c: 009b lsls r3, r3, #2
800127e: 4413 add r3, r2
8001280: 00db lsls r3, r3, #3
8001282: 687a ldr r2, [r7, #4]
8001284: 4413 add r3, r2
8001286: 60fb str r3, [r7, #12]
ep->is_in = 1U;
8001288: 68fb ldr r3, [r7, #12]
800128a: 2201 movs r2, #1
800128c: 705a strb r2, [r3, #1]
800128e: e00c b.n 80012aa <HAL_PCD_EP_SetStall+0x5e>
}
else
{
ep = &hpcd->OUT_ep[ep_addr];
8001290: 78fa ldrb r2, [r7, #3]
8001292: 4613 mov r3, r2
8001294: 009b lsls r3, r3, #2
8001296: 4413 add r3, r2
8001298: 00db lsls r3, r3, #3
800129a: f503 73b4 add.w r3, r3, #360 ; 0x168
800129e: 687a ldr r2, [r7, #4]
80012a0: 4413 add r3, r2
80012a2: 60fb str r3, [r7, #12]
ep->is_in = 0U;
80012a4: 68fb ldr r3, [r7, #12]
80012a6: 2200 movs r2, #0
80012a8: 705a strb r2, [r3, #1]
}
ep->is_stall = 1U;
80012aa: 68fb ldr r3, [r7, #12]
80012ac: 2201 movs r2, #1
80012ae: 709a strb r2, [r3, #2]
ep->num = ep_addr & EP_ADDR_MSK;
80012b0: 78fb ldrb r3, [r7, #3]
80012b2: f003 0307 and.w r3, r3, #7
80012b6: b2da uxtb r2, r3
80012b8: 68fb ldr r3, [r7, #12]
80012ba: 701a strb r2, [r3, #0]
__HAL_LOCK(hpcd);
80012bc: 687b ldr r3, [r7, #4]
80012be: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8
80012c2: 2b01 cmp r3, #1
80012c4: d101 bne.n 80012ca <HAL_PCD_EP_SetStall+0x7e>
80012c6: 2302 movs r3, #2
80012c8: e01c b.n 8001304 <HAL_PCD_EP_SetStall+0xb8>
80012ca: 687b ldr r3, [r7, #4]
80012cc: 2201 movs r2, #1
80012ce: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8
(void)USB_EPSetStall(hpcd->Instance, ep);
80012d2: 687b ldr r3, [r7, #4]
80012d4: 681b ldr r3, [r3, #0]
80012d6: 68f9 ldr r1, [r7, #12]
80012d8: 4618 mov r0, r3
80012da: f003 facd bl 8004878 <USB_EPSetStall>
if ((ep_addr & EP_ADDR_MSK) == 0U)
80012de: 78fb ldrb r3, [r7, #3]
80012e0: f003 0307 and.w r3, r3, #7
80012e4: 2b00 cmp r3, #0
80012e6: d108 bne.n 80012fa <HAL_PCD_EP_SetStall+0xae>
{
(void)USB_EP0_OutStart(hpcd->Instance, (uint8_t *)hpcd->Setup);
80012e8: 687b ldr r3, [r7, #4]
80012ea: 681a ldr r2, [r3, #0]
80012ec: 687b ldr r3, [r7, #4]
80012ee: f503 732c add.w r3, r3, #688 ; 0x2b0
80012f2: 4619 mov r1, r3
80012f4: 4610 mov r0, r2
80012f6: f003 fbf2 bl 8004ade <USB_EP0_OutStart>
}
__HAL_UNLOCK(hpcd);
80012fa: 687b ldr r3, [r7, #4]
80012fc: 2200 movs r2, #0
80012fe: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8
return HAL_OK;
8001302: 2300 movs r3, #0
}
8001304: 4618 mov r0, r3
8001306: 3710 adds r7, #16
8001308: 46bd mov sp, r7
800130a: bd80 pop {r7, pc}
0800130c <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)
{
800130c: b580 push {r7, lr}
800130e: b084 sub sp, #16
8001310: af00 add r7, sp, #0
8001312: 6078 str r0, [r7, #4]
8001314: 460b mov r3, r1
8001316: 70fb strb r3, [r7, #3]
PCD_EPTypeDef *ep;
if (((uint32_t)ep_addr & 0x0FU) > hpcd->Init.dev_endpoints)
8001318: 78fb ldrb r3, [r7, #3]
800131a: f003 020f and.w r2, r3, #15
800131e: 687b ldr r3, [r7, #4]
8001320: 685b ldr r3, [r3, #4]
8001322: 429a cmp r2, r3
8001324: d901 bls.n 800132a <HAL_PCD_EP_ClrStall+0x1e>
{
return HAL_ERROR;
8001326: 2301 movs r3, #1
8001328: e040 b.n 80013ac <HAL_PCD_EP_ClrStall+0xa0>
}
if ((0x80U & ep_addr) == 0x80U)
800132a: f997 3003 ldrsb.w r3, [r7, #3]
800132e: 2b00 cmp r3, #0
8001330: da0e bge.n 8001350 <HAL_PCD_EP_ClrStall+0x44>
{
ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK];
8001332: 78fb ldrb r3, [r7, #3]
8001334: f003 0307 and.w r3, r3, #7
8001338: 1c5a adds r2, r3, #1
800133a: 4613 mov r3, r2
800133c: 009b lsls r3, r3, #2
800133e: 4413 add r3, r2
8001340: 00db lsls r3, r3, #3
8001342: 687a ldr r2, [r7, #4]
8001344: 4413 add r3, r2
8001346: 60fb str r3, [r7, #12]
ep->is_in = 1U;
8001348: 68fb ldr r3, [r7, #12]
800134a: 2201 movs r2, #1
800134c: 705a strb r2, [r3, #1]
800134e: e00e b.n 800136e <HAL_PCD_EP_ClrStall+0x62>
}
else
{
ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK];
8001350: 78fb ldrb r3, [r7, #3]
8001352: f003 0207 and.w r2, r3, #7
8001356: 4613 mov r3, r2
8001358: 009b lsls r3, r3, #2
800135a: 4413 add r3, r2
800135c: 00db lsls r3, r3, #3
800135e: f503 73b4 add.w r3, r3, #360 ; 0x168
8001362: 687a ldr r2, [r7, #4]
8001364: 4413 add r3, r2
8001366: 60fb str r3, [r7, #12]
ep->is_in = 0U;
8001368: 68fb ldr r3, [r7, #12]
800136a: 2200 movs r2, #0
800136c: 705a strb r2, [r3, #1]
}
ep->is_stall = 0U;
800136e: 68fb ldr r3, [r7, #12]
8001370: 2200 movs r2, #0
8001372: 709a strb r2, [r3, #2]
ep->num = ep_addr & EP_ADDR_MSK;
8001374: 78fb ldrb r3, [r7, #3]
8001376: f003 0307 and.w r3, r3, #7
800137a: b2da uxtb r2, r3
800137c: 68fb ldr r3, [r7, #12]
800137e: 701a strb r2, [r3, #0]
__HAL_LOCK(hpcd);
8001380: 687b ldr r3, [r7, #4]
8001382: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8
8001386: 2b01 cmp r3, #1
8001388: d101 bne.n 800138e <HAL_PCD_EP_ClrStall+0x82>
800138a: 2302 movs r3, #2
800138c: e00e b.n 80013ac <HAL_PCD_EP_ClrStall+0xa0>
800138e: 687b ldr r3, [r7, #4]
8001390: 2201 movs r2, #1
8001392: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8
(void)USB_EPClearStall(hpcd->Instance, ep);
8001396: 687b ldr r3, [r7, #4]
8001398: 681b ldr r3, [r3, #0]
800139a: 68f9 ldr r1, [r7, #12]
800139c: 4618 mov r0, r3
800139e: f003 fabb bl 8004918 <USB_EPClearStall>
__HAL_UNLOCK(hpcd);
80013a2: 687b ldr r3, [r7, #4]
80013a4: 2200 movs r2, #0
80013a6: f883 22a8 strb.w r2, [r3, #680] ; 0x2a8
return HAL_OK;
80013aa: 2300 movs r3, #0
}
80013ac: 4618 mov r0, r3
80013ae: 3710 adds r7, #16
80013b0: 46bd mov sp, r7
80013b2: bd80 pop {r7, pc}
080013b4 <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)
{
80013b4: b580 push {r7, lr}
80013b6: b08e sub sp, #56 ; 0x38
80013b8: af00 add r7, sp, #0
80013ba: 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)
80013bc: e2df b.n 800197e <PCD_EP_ISR_Handler+0x5ca>
{
wIstr = hpcd->Instance->ISTR;
80013be: 687b ldr r3, [r7, #4]
80013c0: 681b ldr r3, [r3, #0]
80013c2: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44
80013c6: 85fb strh r3, [r7, #46] ; 0x2e
/* extract highest priority endpoint number */
epindex = (uint8_t)(wIstr & USB_ISTR_EP_ID);
80013c8: 8dfb ldrh r3, [r7, #46] ; 0x2e
80013ca: b2db uxtb r3, r3
80013cc: f003 030f and.w r3, r3, #15
80013d0: f887 302d strb.w r3, [r7, #45] ; 0x2d
if (epindex == 0U)
80013d4: f897 302d ldrb.w r3, [r7, #45] ; 0x2d
80013d8: 2b00 cmp r3, #0
80013da: f040 8158 bne.w 800168e <PCD_EP_ISR_Handler+0x2da>
{
/* Decode and service control endpoint interrupt */
/* DIR bit = origin of the interrupt */
if ((wIstr & USB_ISTR_DIR) == 0U)
80013de: 8dfb ldrh r3, [r7, #46] ; 0x2e
80013e0: f003 0310 and.w r3, r3, #16
80013e4: 2b00 cmp r3, #0
80013e6: d152 bne.n 800148e <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);
80013e8: 687b ldr r3, [r7, #4]
80013ea: 681b ldr r3, [r3, #0]
80013ec: 881b ldrh r3, [r3, #0]
80013ee: b29b uxth r3, r3
80013f0: f423 43e1 bic.w r3, r3, #28800 ; 0x7080
80013f4: f023 0370 bic.w r3, r3, #112 ; 0x70
80013f8: 81fb strh r3, [r7, #14]
80013fa: 687b ldr r3, [r7, #4]
80013fc: 681a ldr r2, [r3, #0]
80013fe: 89fb ldrh r3, [r7, #14]
8001400: ea6f 4343 mvn.w r3, r3, lsl #17
8001404: ea6f 4353 mvn.w r3, r3, lsr #17
8001408: b29b uxth r3, r3
800140a: 8013 strh r3, [r2, #0]
ep = &hpcd->IN_ep[0];
800140c: 687b ldr r3, [r7, #4]
800140e: 3328 adds r3, #40 ; 0x28
8001410: 627b str r3, [r7, #36] ; 0x24
ep->xfer_count = PCD_GET_EP_TX_CNT(hpcd->Instance, ep->num);
8001412: 687b ldr r3, [r7, #4]
8001414: 681b ldr r3, [r3, #0]
8001416: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
800141a: b29b uxth r3, r3
800141c: 461a mov r2, r3
800141e: 6a7b ldr r3, [r7, #36] ; 0x24
8001420: 781b ldrb r3, [r3, #0]
8001422: 00db lsls r3, r3, #3
8001424: 4413 add r3, r2
8001426: 3302 adds r3, #2
8001428: 005b lsls r3, r3, #1
800142a: 687a ldr r2, [r7, #4]
800142c: 6812 ldr r2, [r2, #0]
800142e: 4413 add r3, r2
8001430: f503 6380 add.w r3, r3, #1024 ; 0x400
8001434: 881b ldrh r3, [r3, #0]
8001436: f3c3 0209 ubfx r2, r3, #0, #10
800143a: 6a7b ldr r3, [r7, #36] ; 0x24
800143c: 61da str r2, [r3, #28]
ep->xfer_buff += ep->xfer_count;
800143e: 6a7b ldr r3, [r7, #36] ; 0x24
8001440: 695a ldr r2, [r3, #20]
8001442: 6a7b ldr r3, [r7, #36] ; 0x24
8001444: 69db ldr r3, [r3, #28]
8001446: 441a add r2, r3
8001448: 6a7b ldr r3, [r7, #36] ; 0x24
800144a: 615a str r2, [r3, #20]
/* TX COMPLETE */
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
hpcd->DataInStageCallback(hpcd, 0U);
#else
HAL_PCD_DataInStageCallback(hpcd, 0U);
800144c: 2100 movs r1, #0
800144e: 6878 ldr r0, [r7, #4]
8001450: f005 f98f bl 8006772 <HAL_PCD_DataInStageCallback>
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
if ((hpcd->USB_Address > 0U) && (ep->xfer_len == 0U))
8001454: 687b ldr r3, [r7, #4]
8001456: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
800145a: b2db uxtb r3, r3
800145c: 2b00 cmp r3, #0
800145e: f000 828e beq.w 800197e <PCD_EP_ISR_Handler+0x5ca>
8001462: 6a7b ldr r3, [r7, #36] ; 0x24
8001464: 699b ldr r3, [r3, #24]
8001466: 2b00 cmp r3, #0
8001468: f040 8289 bne.w 800197e <PCD_EP_ISR_Handler+0x5ca>
{
hpcd->Instance->DADDR = ((uint16_t)hpcd->USB_Address | USB_DADDR_EF);
800146c: 687b ldr r3, [r7, #4]
800146e: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
8001472: b2db uxtb r3, r3
8001474: f063 037f orn r3, r3, #127 ; 0x7f
8001478: b2da uxtb r2, r3
800147a: 687b ldr r3, [r7, #4]
800147c: 681b ldr r3, [r3, #0]
800147e: b292 uxth r2, r2
8001480: f8a3 204c strh.w r2, [r3, #76] ; 0x4c
hpcd->USB_Address = 0U;
8001484: 687b ldr r3, [r7, #4]
8001486: 2200 movs r2, #0
8001488: f883 2024 strb.w r2, [r3, #36] ; 0x24
800148c: e277 b.n 800197e <PCD_EP_ISR_Handler+0x5ca>
{
/* DIR = 1 */
/* DIR = 1 & CTR_RX => SETUP or OUT int */
/* DIR = 1 & (CTR_TX | CTR_RX) => 2 int pending */
ep = &hpcd->OUT_ep[0];
800148e: 687b ldr r3, [r7, #4]
8001490: f503 73b4 add.w r3, r3, #360 ; 0x168
8001494: 627b str r3, [r7, #36] ; 0x24
wEPVal = PCD_GET_ENDPOINT(hpcd->Instance, PCD_ENDP0);
8001496: 687b ldr r3, [r7, #4]
8001498: 681b ldr r3, [r3, #0]
800149a: 881b ldrh r3, [r3, #0]
800149c: 857b strh r3, [r7, #42] ; 0x2a
if ((wEPVal & USB_EP_SETUP) != 0U)
800149e: 8d7b ldrh r3, [r7, #42] ; 0x2a
80014a0: f403 6300 and.w r3, r3, #2048 ; 0x800
80014a4: 2b00 cmp r3, #0
80014a6: d034 beq.n 8001512 <PCD_EP_ISR_Handler+0x15e>
{
/* Get SETUP Packet */
ep->xfer_count = PCD_GET_EP_RX_CNT(hpcd->Instance, ep->num);
80014a8: 687b ldr r3, [r7, #4]
80014aa: 681b ldr r3, [r3, #0]
80014ac: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
80014b0: b29b uxth r3, r3
80014b2: 461a mov r2, r3
80014b4: 6a7b ldr r3, [r7, #36] ; 0x24
80014b6: 781b ldrb r3, [r3, #0]
80014b8: 00db lsls r3, r3, #3
80014ba: 4413 add r3, r2
80014bc: 3306 adds r3, #6
80014be: 005b lsls r3, r3, #1
80014c0: 687a ldr r2, [r7, #4]
80014c2: 6812 ldr r2, [r2, #0]
80014c4: 4413 add r3, r2
80014c6: f503 6380 add.w r3, r3, #1024 ; 0x400
80014ca: 881b ldrh r3, [r3, #0]
80014cc: f3c3 0209 ubfx r2, r3, #0, #10
80014d0: 6a7b ldr r3, [r7, #36] ; 0x24
80014d2: 61da str r2, [r3, #28]
USB_ReadPMA(hpcd->Instance, (uint8_t *)hpcd->Setup,
80014d4: 687b ldr r3, [r7, #4]
80014d6: 6818 ldr r0, [r3, #0]
80014d8: 687b ldr r3, [r7, #4]
80014da: f503 712c add.w r1, r3, #688 ; 0x2b0
80014de: 6a7b ldr r3, [r7, #36] ; 0x24
80014e0: 88da ldrh r2, [r3, #6]
ep->pmaadress, (uint16_t)ep->xfer_count);
80014e2: 6a7b ldr r3, [r7, #36] ; 0x24
80014e4: 69db ldr r3, [r3, #28]
USB_ReadPMA(hpcd->Instance, (uint8_t *)hpcd->Setup,
80014e6: b29b uxth r3, r3
80014e8: f003 fb48 bl 8004b7c <USB_ReadPMA>
/* SETUP bit kept frozen while CTR_RX = 1 */
PCD_CLEAR_RX_EP_CTR(hpcd->Instance, PCD_ENDP0);
80014ec: 687b ldr r3, [r7, #4]
80014ee: 681b ldr r3, [r3, #0]
80014f0: 881b ldrh r3, [r3, #0]
80014f2: b29a uxth r2, r3
80014f4: f640 738f movw r3, #3983 ; 0xf8f
80014f8: 4013 ands r3, r2
80014fa: 823b strh r3, [r7, #16]
80014fc: 687b ldr r3, [r7, #4]
80014fe: 681b ldr r3, [r3, #0]
8001500: 8a3a ldrh r2, [r7, #16]
8001502: f042 0280 orr.w r2, r2, #128 ; 0x80
8001506: b292 uxth r2, r2
8001508: 801a strh r2, [r3, #0]
/* Process SETUP Packet*/
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
hpcd->SetupStageCallback(hpcd);
#else
HAL_PCD_SetupStageCallback(hpcd);
800150a: 6878 ldr r0, [r7, #4]
800150c: f005 f904 bl 8006718 <HAL_PCD_SetupStageCallback>
8001510: e235 b.n 800197e <PCD_EP_ISR_Handler+0x5ca>
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
}
else if ((wEPVal & USB_EP_CTR_RX) != 0U)
8001512: f9b7 302a ldrsh.w r3, [r7, #42] ; 0x2a
8001516: 2b00 cmp r3, #0
8001518: f280 8231 bge.w 800197e <PCD_EP_ISR_Handler+0x5ca>
{
PCD_CLEAR_RX_EP_CTR(hpcd->Instance, PCD_ENDP0);
800151c: 687b ldr r3, [r7, #4]
800151e: 681b ldr r3, [r3, #0]
8001520: 881b ldrh r3, [r3, #0]
8001522: b29a uxth r2, r3
8001524: f640 738f movw r3, #3983 ; 0xf8f
8001528: 4013 ands r3, r2
800152a: 83bb strh r3, [r7, #28]
800152c: 687b ldr r3, [r7, #4]
800152e: 681b ldr r3, [r3, #0]
8001530: 8bba ldrh r2, [r7, #28]
8001532: f042 0280 orr.w r2, r2, #128 ; 0x80
8001536: b292 uxth r2, r2
8001538: 801a strh r2, [r3, #0]
/* Get Control Data OUT Packet */
ep->xfer_count = PCD_GET_EP_RX_CNT(hpcd->Instance, ep->num);
800153a: 687b ldr r3, [r7, #4]
800153c: 681b ldr r3, [r3, #0]
800153e: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8001542: b29b uxth r3, r3
8001544: 461a mov r2, r3
8001546: 6a7b ldr r3, [r7, #36] ; 0x24
8001548: 781b ldrb r3, [r3, #0]
800154a: 00db lsls r3, r3, #3
800154c: 4413 add r3, r2
800154e: 3306 adds r3, #6
8001550: 005b lsls r3, r3, #1
8001552: 687a ldr r2, [r7, #4]
8001554: 6812 ldr r2, [r2, #0]
8001556: 4413 add r3, r2
8001558: f503 6380 add.w r3, r3, #1024 ; 0x400
800155c: 881b ldrh r3, [r3, #0]
800155e: f3c3 0209 ubfx r2, r3, #0, #10
8001562: 6a7b ldr r3, [r7, #36] ; 0x24
8001564: 61da str r2, [r3, #28]
if ((ep->xfer_count != 0U) && (ep->xfer_buff != 0U))
8001566: 6a7b ldr r3, [r7, #36] ; 0x24
8001568: 69db ldr r3, [r3, #28]
800156a: 2b00 cmp r3, #0
800156c: d019 beq.n 80015a2 <PCD_EP_ISR_Handler+0x1ee>
800156e: 6a7b ldr r3, [r7, #36] ; 0x24
8001570: 695b ldr r3, [r3, #20]
8001572: 2b00 cmp r3, #0
8001574: d015 beq.n 80015a2 <PCD_EP_ISR_Handler+0x1ee>
{
USB_ReadPMA(hpcd->Instance, ep->xfer_buff,
8001576: 687b ldr r3, [r7, #4]
8001578: 6818 ldr r0, [r3, #0]
800157a: 6a7b ldr r3, [r7, #36] ; 0x24
800157c: 6959 ldr r1, [r3, #20]
800157e: 6a7b ldr r3, [r7, #36] ; 0x24
8001580: 88da ldrh r2, [r3, #6]
ep->pmaadress, (uint16_t)ep->xfer_count);
8001582: 6a7b ldr r3, [r7, #36] ; 0x24
8001584: 69db ldr r3, [r3, #28]
USB_ReadPMA(hpcd->Instance, ep->xfer_buff,
8001586: b29b uxth r3, r3
8001588: f003 faf8 bl 8004b7c <USB_ReadPMA>
ep->xfer_buff += ep->xfer_count;
800158c: 6a7b ldr r3, [r7, #36] ; 0x24
800158e: 695a ldr r2, [r3, #20]
8001590: 6a7b ldr r3, [r7, #36] ; 0x24
8001592: 69db ldr r3, [r3, #28]
8001594: 441a add r2, r3
8001596: 6a7b ldr r3, [r7, #36] ; 0x24
8001598: 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);
800159a: 2100 movs r1, #0
800159c: 6878 ldr r0, [r7, #4]
800159e: f005 f8cd bl 800673c <HAL_PCD_DataOutStageCallback>
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
}
PCD_SET_EP_RX_CNT(hpcd->Instance, PCD_ENDP0, ep->maxpacket);
80015a2: 687b ldr r3, [r7, #4]
80015a4: 681b ldr r3, [r3, #0]
80015a6: 61bb str r3, [r7, #24]
80015a8: 687b ldr r3, [r7, #4]
80015aa: 681b ldr r3, [r3, #0]
80015ac: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
80015b0: b29b uxth r3, r3
80015b2: 461a mov r2, r3
80015b4: 69bb ldr r3, [r7, #24]
80015b6: 4413 add r3, r2
80015b8: 61bb str r3, [r7, #24]
80015ba: 69bb ldr r3, [r7, #24]
80015bc: f203 430c addw r3, r3, #1036 ; 0x40c
80015c0: 617b str r3, [r7, #20]
80015c2: 6a7b ldr r3, [r7, #36] ; 0x24
80015c4: 691b ldr r3, [r3, #16]
80015c6: 2b00 cmp r3, #0
80015c8: d112 bne.n 80015f0 <PCD_EP_ISR_Handler+0x23c>
80015ca: 697b ldr r3, [r7, #20]
80015cc: 881b ldrh r3, [r3, #0]
80015ce: b29b uxth r3, r3
80015d0: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
80015d4: b29a uxth r2, r3
80015d6: 697b ldr r3, [r7, #20]
80015d8: 801a strh r2, [r3, #0]
80015da: 697b ldr r3, [r7, #20]
80015dc: 881b ldrh r3, [r3, #0]
80015de: b29b uxth r3, r3
80015e0: ea6f 4343 mvn.w r3, r3, lsl #17
80015e4: ea6f 4353 mvn.w r3, r3, lsr #17
80015e8: b29a uxth r2, r3
80015ea: 697b ldr r3, [r7, #20]
80015ec: 801a strh r2, [r3, #0]
80015ee: e02f b.n 8001650 <PCD_EP_ISR_Handler+0x29c>
80015f0: 6a7b ldr r3, [r7, #36] ; 0x24
80015f2: 691b ldr r3, [r3, #16]
80015f4: 2b3e cmp r3, #62 ; 0x3e
80015f6: d813 bhi.n 8001620 <PCD_EP_ISR_Handler+0x26c>
80015f8: 6a7b ldr r3, [r7, #36] ; 0x24
80015fa: 691b ldr r3, [r3, #16]
80015fc: 085b lsrs r3, r3, #1
80015fe: 633b str r3, [r7, #48] ; 0x30
8001600: 6a7b ldr r3, [r7, #36] ; 0x24
8001602: 691b ldr r3, [r3, #16]
8001604: f003 0301 and.w r3, r3, #1
8001608: 2b00 cmp r3, #0
800160a: d002 beq.n 8001612 <PCD_EP_ISR_Handler+0x25e>
800160c: 6b3b ldr r3, [r7, #48] ; 0x30
800160e: 3301 adds r3, #1
8001610: 633b str r3, [r7, #48] ; 0x30
8001612: 6b3b ldr r3, [r7, #48] ; 0x30
8001614: b29b uxth r3, r3
8001616: 029b lsls r3, r3, #10
8001618: b29a uxth r2, r3
800161a: 697b ldr r3, [r7, #20]
800161c: 801a strh r2, [r3, #0]
800161e: e017 b.n 8001650 <PCD_EP_ISR_Handler+0x29c>
8001620: 6a7b ldr r3, [r7, #36] ; 0x24
8001622: 691b ldr r3, [r3, #16]
8001624: 095b lsrs r3, r3, #5
8001626: 633b str r3, [r7, #48] ; 0x30
8001628: 6a7b ldr r3, [r7, #36] ; 0x24
800162a: 691b ldr r3, [r3, #16]
800162c: f003 031f and.w r3, r3, #31
8001630: 2b00 cmp r3, #0
8001632: d102 bne.n 800163a <PCD_EP_ISR_Handler+0x286>
8001634: 6b3b ldr r3, [r7, #48] ; 0x30
8001636: 3b01 subs r3, #1
8001638: 633b str r3, [r7, #48] ; 0x30
800163a: 6b3b ldr r3, [r7, #48] ; 0x30
800163c: b29b uxth r3, r3
800163e: 029b lsls r3, r3, #10
8001640: b29b uxth r3, r3
8001642: ea6f 4343 mvn.w r3, r3, lsl #17
8001646: ea6f 4353 mvn.w r3, r3, lsr #17
800164a: b29a uxth r2, r3
800164c: 697b ldr r3, [r7, #20]
800164e: 801a strh r2, [r3, #0]
PCD_SET_EP_RX_STATUS(hpcd->Instance, PCD_ENDP0, USB_EP_RX_VALID);
8001650: 687b ldr r3, [r7, #4]
8001652: 681b ldr r3, [r3, #0]
8001654: 881b ldrh r3, [r3, #0]
8001656: b29b uxth r3, r3
8001658: f423 4380 bic.w r3, r3, #16384 ; 0x4000
800165c: f023 0370 bic.w r3, r3, #112 ; 0x70
8001660: 827b strh r3, [r7, #18]
8001662: 8a7b ldrh r3, [r7, #18]
8001664: f483 5380 eor.w r3, r3, #4096 ; 0x1000
8001668: 827b strh r3, [r7, #18]
800166a: 8a7b ldrh r3, [r7, #18]
800166c: f483 5300 eor.w r3, r3, #8192 ; 0x2000
8001670: 827b strh r3, [r7, #18]
8001672: 687b ldr r3, [r7, #4]
8001674: 681a ldr r2, [r3, #0]
8001676: 8a7b ldrh r3, [r7, #18]
8001678: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
800167c: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8001680: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8001684: f043 0380 orr.w r3, r3, #128 ; 0x80
8001688: b29b uxth r3, r3
800168a: 8013 strh r3, [r2, #0]
800168c: e177 b.n 800197e <PCD_EP_ISR_Handler+0x5ca>
}
else
{
/* Decode and service non control endpoints interrupt */
/* process related endpoint register */
wEPVal = PCD_GET_ENDPOINT(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: 857b strh r3, [r7, #42] ; 0x2a
if ((wEPVal & USB_EP_CTR_RX) != 0U)
80016a0: f9b7 302a ldrsh.w r3, [r7, #42] ; 0x2a
80016a4: 2b00 cmp r3, #0
80016a6: f280 80ea bge.w 800187e <PCD_EP_ISR_Handler+0x4ca>
{
/* clear int flag */
PCD_CLEAR_RX_EP_CTR(hpcd->Instance, epindex);
80016aa: 687b ldr r3, [r7, #4]
80016ac: 681b ldr r3, [r3, #0]
80016ae: 461a mov r2, r3
80016b0: f897 302d ldrb.w r3, [r7, #45] ; 0x2d
80016b4: 009b lsls r3, r3, #2
80016b6: 4413 add r3, r2
80016b8: 881b ldrh r3, [r3, #0]
80016ba: b29a uxth r2, r3
80016bc: f640 738f movw r3, #3983 ; 0xf8f
80016c0: 4013 ands r3, r2
80016c2: 853b strh r3, [r7, #40] ; 0x28
80016c4: 687b ldr r3, [r7, #4]
80016c6: 681b ldr r3, [r3, #0]
80016c8: 461a mov r2, r3
80016ca: f897 302d ldrb.w r3, [r7, #45] ; 0x2d
80016ce: 009b lsls r3, r3, #2
80016d0: 4413 add r3, r2
80016d2: 8d3a ldrh r2, [r7, #40] ; 0x28
80016d4: f042 0280 orr.w r2, r2, #128 ; 0x80
80016d8: b292 uxth r2, r2
80016da: 801a strh r2, [r3, #0]
ep = &hpcd->OUT_ep[epindex];
80016dc: f897 202d ldrb.w r2, [r7, #45] ; 0x2d
80016e0: 4613 mov r3, r2
80016e2: 009b lsls r3, r3, #2
80016e4: 4413 add r3, r2
80016e6: 00db lsls r3, r3, #3
80016e8: f503 73b4 add.w r3, r3, #360 ; 0x168
80016ec: 687a ldr r2, [r7, #4]
80016ee: 4413 add r3, r2
80016f0: 627b str r3, [r7, #36] ; 0x24
/* OUT Single Buffering */
if (ep->doublebuffer == 0U)
80016f2: 6a7b ldr r3, [r7, #36] ; 0x24
80016f4: 7b1b ldrb r3, [r3, #12]
80016f6: 2b00 cmp r3, #0
80016f8: d122 bne.n 8001740 <PCD_EP_ISR_Handler+0x38c>
{
count = (uint16_t)PCD_GET_EP_RX_CNT(hpcd->Instance, ep->num);
80016fa: 687b ldr r3, [r7, #4]
80016fc: 681b ldr r3, [r3, #0]
80016fe: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8001702: b29b uxth r3, r3
8001704: 461a mov r2, r3
8001706: 6a7b ldr r3, [r7, #36] ; 0x24
8001708: 781b ldrb r3, [r3, #0]
800170a: 00db lsls r3, r3, #3
800170c: 4413 add r3, r2
800170e: 3306 adds r3, #6
8001710: 005b lsls r3, r3, #1
8001712: 687a ldr r2, [r7, #4]
8001714: 6812 ldr r2, [r2, #0]
8001716: 4413 add r3, r2
8001718: f503 6380 add.w r3, r3, #1024 ; 0x400
800171c: 881b ldrh r3, [r3, #0]
800171e: f3c3 0309 ubfx r3, r3, #0, #10
8001722: 86fb strh r3, [r7, #54] ; 0x36
if (count != 0U)
8001724: 8efb ldrh r3, [r7, #54] ; 0x36
8001726: 2b00 cmp r3, #0
8001728: f000 8087 beq.w 800183a <PCD_EP_ISR_Handler+0x486>
{
USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaadress, count);
800172c: 687b ldr r3, [r7, #4]
800172e: 6818 ldr r0, [r3, #0]
8001730: 6a7b ldr r3, [r7, #36] ; 0x24
8001732: 6959 ldr r1, [r3, #20]
8001734: 6a7b ldr r3, [r7, #36] ; 0x24
8001736: 88da ldrh r2, [r3, #6]
8001738: 8efb ldrh r3, [r7, #54] ; 0x36
800173a: f003 fa1f bl 8004b7c <USB_ReadPMA>
800173e: e07c b.n 800183a <PCD_EP_ISR_Handler+0x486>
}
}
else
{
/* manage double buffer bulk out */
if (ep->type == EP_TYPE_BULK)
8001740: 6a7b ldr r3, [r7, #36] ; 0x24
8001742: 78db ldrb r3, [r3, #3]
8001744: 2b02 cmp r3, #2
8001746: d108 bne.n 800175a <PCD_EP_ISR_Handler+0x3a6>
{
count = HAL_PCD_EP_DB_Receive(hpcd, ep, wEPVal);
8001748: 8d7b ldrh r3, [r7, #42] ; 0x2a
800174a: 461a mov r2, r3
800174c: 6a79 ldr r1, [r7, #36] ; 0x24
800174e: 6878 ldr r0, [r7, #4]
8001750: f000 f923 bl 800199a <HAL_PCD_EP_DB_Receive>
8001754: 4603 mov r3, r0
8001756: 86fb strh r3, [r7, #54] ; 0x36
8001758: e06f b.n 800183a <PCD_EP_ISR_Handler+0x486>
}
else /* manage double buffer iso out */
{
/* free EP OUT Buffer */
PCD_FreeUserBuffer(hpcd->Instance, ep->num, 0U);
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: 4413 add r3, r2
8001768: 881b ldrh r3, [r3, #0]
800176a: b29b uxth r3, r3
800176c: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8001770: f023 0370 bic.w r3, r3, #112 ; 0x70
8001774: 847b strh r3, [r7, #34] ; 0x22
8001776: 687b ldr r3, [r7, #4]
8001778: 681b ldr r3, [r3, #0]
800177a: 461a mov r2, r3
800177c: 6a7b ldr r3, [r7, #36] ; 0x24
800177e: 781b ldrb r3, [r3, #0]
8001780: 009b lsls r3, r3, #2
8001782: 441a add r2, r3
8001784: 8c7b ldrh r3, [r7, #34] ; 0x22
8001786: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
800178a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
800178e: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8001792: f043 03c0 orr.w r3, r3, #192 ; 0xc0
8001796: b29b uxth r3, r3
8001798: 8013 strh r3, [r2, #0]
if ((PCD_GET_ENDPOINT(hpcd->Instance, ep->num) & USB_EP_DTOG_RX) != 0U)
800179a: 687b ldr r3, [r7, #4]
800179c: 681b ldr r3, [r3, #0]
800179e: 461a mov r2, r3
80017a0: 6a7b ldr r3, [r7, #36] ; 0x24
80017a2: 781b ldrb r3, [r3, #0]
80017a4: 009b lsls r3, r3, #2
80017a6: 4413 add r3, r2
80017a8: 881b ldrh r3, [r3, #0]
80017aa: b29b uxth r3, r3
80017ac: f403 4380 and.w r3, r3, #16384 ; 0x4000
80017b0: 2b00 cmp r3, #0
80017b2: d021 beq.n 80017f8 <PCD_EP_ISR_Handler+0x444>
{
/* read from endpoint BUF0Addr buffer */
count = (uint16_t)PCD_GET_EP_DBUF0_CNT(hpcd->Instance, ep->num);
80017b4: 687b ldr r3, [r7, #4]
80017b6: 681b ldr r3, [r3, #0]
80017b8: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
80017bc: b29b uxth r3, r3
80017be: 461a mov r2, r3
80017c0: 6a7b ldr r3, [r7, #36] ; 0x24
80017c2: 781b ldrb r3, [r3, #0]
80017c4: 00db lsls r3, r3, #3
80017c6: 4413 add r3, r2
80017c8: 3302 adds r3, #2
80017ca: 005b lsls r3, r3, #1
80017cc: 687a ldr r2, [r7, #4]
80017ce: 6812 ldr r2, [r2, #0]
80017d0: 4413 add r3, r2
80017d2: f503 6380 add.w r3, r3, #1024 ; 0x400
80017d6: 881b ldrh r3, [r3, #0]
80017d8: f3c3 0309 ubfx r3, r3, #0, #10
80017dc: 86fb strh r3, [r7, #54] ; 0x36
if (count != 0U)
80017de: 8efb ldrh r3, [r7, #54] ; 0x36
80017e0: 2b00 cmp r3, #0
80017e2: d02a beq.n 800183a <PCD_EP_ISR_Handler+0x486>
{
USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr0, count);
80017e4: 687b ldr r3, [r7, #4]
80017e6: 6818 ldr r0, [r3, #0]
80017e8: 6a7b ldr r3, [r7, #36] ; 0x24
80017ea: 6959 ldr r1, [r3, #20]
80017ec: 6a7b ldr r3, [r7, #36] ; 0x24
80017ee: 891a ldrh r2, [r3, #8]
80017f0: 8efb ldrh r3, [r7, #54] ; 0x36
80017f2: f003 f9c3 bl 8004b7c <USB_ReadPMA>
80017f6: e020 b.n 800183a <PCD_EP_ISR_Handler+0x486>
}
}
else
{
/* read from endpoint BUF1Addr buffer */
count = (uint16_t)PCD_GET_EP_DBUF1_CNT(hpcd->Instance, ep->num);
80017f8: 687b ldr r3, [r7, #4]
80017fa: 681b ldr r3, [r3, #0]
80017fc: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8001800: b29b uxth r3, r3
8001802: 461a mov r2, r3
8001804: 6a7b ldr r3, [r7, #36] ; 0x24
8001806: 781b ldrb r3, [r3, #0]
8001808: 00db lsls r3, r3, #3
800180a: 4413 add r3, r2
800180c: 3306 adds r3, #6
800180e: 005b lsls r3, r3, #1
8001810: 687a ldr r2, [r7, #4]
8001812: 6812 ldr r2, [r2, #0]
8001814: 4413 add r3, r2
8001816: f503 6380 add.w r3, r3, #1024 ; 0x400
800181a: 881b ldrh r3, [r3, #0]
800181c: f3c3 0309 ubfx r3, r3, #0, #10
8001820: 86fb strh r3, [r7, #54] ; 0x36
if (count != 0U)
8001822: 8efb ldrh r3, [r7, #54] ; 0x36
8001824: 2b00 cmp r3, #0
8001826: d008 beq.n 800183a <PCD_EP_ISR_Handler+0x486>
{
USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr1, count);
8001828: 687b ldr r3, [r7, #4]
800182a: 6818 ldr r0, [r3, #0]
800182c: 6a7b ldr r3, [r7, #36] ; 0x24
800182e: 6959 ldr r1, [r3, #20]
8001830: 6a7b ldr r3, [r7, #36] ; 0x24
8001832: 895a ldrh r2, [r3, #10]
8001834: 8efb ldrh r3, [r7, #54] ; 0x36
8001836: f003 f9a1 bl 8004b7c <USB_ReadPMA>
}
}
}
}
/* multi-packet on the NON control OUT endpoint */
ep->xfer_count += count;
800183a: 6a7b ldr r3, [r7, #36] ; 0x24
800183c: 69da ldr r2, [r3, #28]
800183e: 8efb ldrh r3, [r7, #54] ; 0x36
8001840: 441a add r2, r3
8001842: 6a7b ldr r3, [r7, #36] ; 0x24
8001844: 61da str r2, [r3, #28]
ep->xfer_buff += count;
8001846: 6a7b ldr r3, [r7, #36] ; 0x24
8001848: 695a ldr r2, [r3, #20]
800184a: 8efb ldrh r3, [r7, #54] ; 0x36
800184c: 441a add r2, r3
800184e: 6a7b ldr r3, [r7, #36] ; 0x24
8001850: 615a str r2, [r3, #20]
if ((ep->xfer_len == 0U) || (count < ep->maxpacket))
8001852: 6a7b ldr r3, [r7, #36] ; 0x24
8001854: 699b ldr r3, [r3, #24]
8001856: 2b00 cmp r3, #0
8001858: d004 beq.n 8001864 <PCD_EP_ISR_Handler+0x4b0>
800185a: 8efa ldrh r2, [r7, #54] ; 0x36
800185c: 6a7b ldr r3, [r7, #36] ; 0x24
800185e: 691b ldr r3, [r3, #16]
8001860: 429a cmp r2, r3
8001862: d206 bcs.n 8001872 <PCD_EP_ISR_Handler+0x4be>
{
/* RX COMPLETE */
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
hpcd->DataOutStageCallback(hpcd, ep->num);
#else
HAL_PCD_DataOutStageCallback(hpcd, ep->num);
8001864: 6a7b ldr r3, [r7, #36] ; 0x24
8001866: 781b ldrb r3, [r3, #0]
8001868: 4619 mov r1, r3
800186a: 6878 ldr r0, [r7, #4]
800186c: f004 ff66 bl 800673c <HAL_PCD_DataOutStageCallback>
8001870: e005 b.n 800187e <PCD_EP_ISR_Handler+0x4ca>
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
}
else
{
(void) USB_EPStartXfer(hpcd->Instance, ep);
8001872: 687b ldr r3, [r7, #4]
8001874: 681b ldr r3, [r3, #0]
8001876: 6a79 ldr r1, [r7, #36] ; 0x24
8001878: 4618 mov r0, r3
800187a: f001 fedd bl 8003638 <USB_EPStartXfer>
}
}
if ((wEPVal & USB_EP_CTR_TX) != 0U)
800187e: 8d7b ldrh r3, [r7, #42] ; 0x2a
8001880: f003 0380 and.w r3, r3, #128 ; 0x80
8001884: 2b00 cmp r3, #0
8001886: d07a beq.n 800197e <PCD_EP_ISR_Handler+0x5ca>
{
ep = &hpcd->IN_ep[epindex];
8001888: f897 302d ldrb.w r3, [r7, #45] ; 0x2d
800188c: 1c5a adds r2, r3, #1
800188e: 4613 mov r3, r2
8001890: 009b lsls r3, r3, #2
8001892: 4413 add r3, r2
8001894: 00db lsls r3, r3, #3
8001896: 687a ldr r2, [r7, #4]
8001898: 4413 add r3, r2
800189a: 627b str r3, [r7, #36] ; 0x24
/* clear int flag */
PCD_CLEAR_TX_EP_CTR(hpcd->Instance, epindex);
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: 4413 add r3, r2
80018aa: 881b ldrh r3, [r3, #0]
80018ac: b29b uxth r3, r3
80018ae: f423 43e1 bic.w r3, r3, #28800 ; 0x7080
80018b2: f023 0370 bic.w r3, r3, #112 ; 0x70
80018b6: 843b strh r3, [r7, #32]
80018b8: 687b ldr r3, [r7, #4]
80018ba: 681b ldr r3, [r3, #0]
80018bc: 461a mov r2, r3
80018be: f897 302d ldrb.w r3, [r7, #45] ; 0x2d
80018c2: 009b lsls r3, r3, #2
80018c4: 441a add r2, r3
80018c6: 8c3b ldrh r3, [r7, #32]
80018c8: ea6f 4343 mvn.w r3, r3, lsl #17
80018cc: ea6f 4353 mvn.w r3, r3, lsr #17
80018d0: b29b uxth r3, r3
80018d2: 8013 strh r3, [r2, #0]
/* Manage all non bulk transaction or Bulk Single Buffer Transaction */
if ((ep->type != EP_TYPE_BULK) ||
80018d4: 6a7b ldr r3, [r7, #36] ; 0x24
80018d6: 78db ldrb r3, [r3, #3]
80018d8: 2b02 cmp r3, #2
80018da: d108 bne.n 80018ee <PCD_EP_ISR_Handler+0x53a>
((ep->type == EP_TYPE_BULK) && ((wEPVal & USB_EP_KIND) == 0U)))
80018dc: 6a7b ldr r3, [r7, #36] ; 0x24
80018de: 78db ldrb r3, [r3, #3]
if ((ep->type != EP_TYPE_BULK) ||
80018e0: 2b02 cmp r3, #2
80018e2: d146 bne.n 8001972 <PCD_EP_ISR_Handler+0x5be>
((ep->type == EP_TYPE_BULK) && ((wEPVal & USB_EP_KIND) == 0U)))
80018e4: 8d7b ldrh r3, [r7, #42] ; 0x2a
80018e6: f403 7380 and.w r3, r3, #256 ; 0x100
80018ea: 2b00 cmp r3, #0
80018ec: d141 bne.n 8001972 <PCD_EP_ISR_Handler+0x5be>
{
/* multi-packet on the NON control IN endpoint */
TxByteNbre = (uint16_t)PCD_GET_EP_TX_CNT(hpcd->Instance, ep->num);
80018ee: 687b ldr r3, [r7, #4]
80018f0: 681b ldr r3, [r3, #0]
80018f2: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
80018f6: b29b uxth r3, r3
80018f8: 461a mov r2, r3
80018fa: 6a7b ldr r3, [r7, #36] ; 0x24
80018fc: 781b ldrb r3, [r3, #0]
80018fe: 00db lsls r3, r3, #3
8001900: 4413 add r3, r2
8001902: 3302 adds r3, #2
8001904: 005b lsls r3, r3, #1
8001906: 687a ldr r2, [r7, #4]
8001908: 6812 ldr r2, [r2, #0]
800190a: 4413 add r3, r2
800190c: f503 6380 add.w r3, r3, #1024 ; 0x400
8001910: 881b ldrh r3, [r3, #0]
8001912: f3c3 0309 ubfx r3, r3, #0, #10
8001916: 83fb strh r3, [r7, #30]
if (ep->xfer_len > TxByteNbre)
8001918: 6a7b ldr r3, [r7, #36] ; 0x24
800191a: 699a ldr r2, [r3, #24]
800191c: 8bfb ldrh r3, [r7, #30]
800191e: 429a cmp r2, r3
8001920: d906 bls.n 8001930 <PCD_EP_ISR_Handler+0x57c>
{
ep->xfer_len -= TxByteNbre;
8001922: 6a7b ldr r3, [r7, #36] ; 0x24
8001924: 699a ldr r2, [r3, #24]
8001926: 8bfb ldrh r3, [r7, #30]
8001928: 1ad2 subs r2, r2, r3
800192a: 6a7b ldr r3, [r7, #36] ; 0x24
800192c: 619a str r2, [r3, #24]
800192e: e002 b.n 8001936 <PCD_EP_ISR_Handler+0x582>
}
else
{
ep->xfer_len = 0U;
8001930: 6a7b ldr r3, [r7, #36] ; 0x24
8001932: 2200 movs r2, #0
8001934: 619a str r2, [r3, #24]
}
/* Zero Length Packet? */
if (ep->xfer_len == 0U)
8001936: 6a7b ldr r3, [r7, #36] ; 0x24
8001938: 699b ldr r3, [r3, #24]
800193a: 2b00 cmp r3, #0
800193c: d106 bne.n 800194c <PCD_EP_ISR_Handler+0x598>
{
/* TX COMPLETE */
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
hpcd->DataInStageCallback(hpcd, ep->num);
#else
HAL_PCD_DataInStageCallback(hpcd, ep->num);
800193e: 6a7b ldr r3, [r7, #36] ; 0x24
8001940: 781b ldrb r3, [r3, #0]
8001942: 4619 mov r1, r3
8001944: 6878 ldr r0, [r7, #4]
8001946: f004 ff14 bl 8006772 <HAL_PCD_DataInStageCallback>
800194a: e018 b.n 800197e <PCD_EP_ISR_Handler+0x5ca>
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
}
else
{
/* Transfer is not yet Done */
ep->xfer_buff += TxByteNbre;
800194c: 6a7b ldr r3, [r7, #36] ; 0x24
800194e: 695a ldr r2, [r3, #20]
8001950: 8bfb ldrh r3, [r7, #30]
8001952: 441a add r2, r3
8001954: 6a7b ldr r3, [r7, #36] ; 0x24
8001956: 615a str r2, [r3, #20]
ep->xfer_count += TxByteNbre;
8001958: 6a7b ldr r3, [r7, #36] ; 0x24
800195a: 69da ldr r2, [r3, #28]
800195c: 8bfb ldrh r3, [r7, #30]
800195e: 441a add r2, r3
8001960: 6a7b ldr r3, [r7, #36] ; 0x24
8001962: 61da str r2, [r3, #28]
(void)USB_EPStartXfer(hpcd->Instance, ep);
8001964: 687b ldr r3, [r7, #4]
8001966: 681b ldr r3, [r3, #0]
8001968: 6a79 ldr r1, [r7, #36] ; 0x24
800196a: 4618 mov r0, r3
800196c: f001 fe64 bl 8003638 <USB_EPStartXfer>
if (ep->xfer_len == 0U)
8001970: e005 b.n 800197e <PCD_EP_ISR_Handler+0x5ca>
}
}
/* bulk in double buffer enable in case of transferLen> Ep_Mps */
else
{
(void)HAL_PCD_EP_DB_Transmit(hpcd, ep, wEPVal);
8001972: 8d7b ldrh r3, [r7, #42] ; 0x2a
8001974: 461a mov r2, r3
8001976: 6a79 ldr r1, [r7, #36] ; 0x24
8001978: 6878 ldr r0, [r7, #4]
800197a: f000 f91b bl 8001bb4 <HAL_PCD_EP_DB_Transmit>
while ((hpcd->Instance->ISTR & USB_ISTR_CTR) != 0U)
800197e: 687b ldr r3, [r7, #4]
8001980: 681b ldr r3, [r3, #0]
8001982: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44
8001986: b29b uxth r3, r3
8001988: b21b sxth r3, r3
800198a: 2b00 cmp r3, #0
800198c: f6ff ad17 blt.w 80013be <PCD_EP_ISR_Handler+0xa>
}
}
}
}
return HAL_OK;
8001990: 2300 movs r3, #0
}
8001992: 4618 mov r0, r3
8001994: 3738 adds r7, #56 ; 0x38
8001996: 46bd mov sp, r7
8001998: bd80 pop {r7, pc}
0800199a <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)
{
800199a: b580 push {r7, lr}
800199c: b088 sub sp, #32
800199e: af00 add r7, sp, #0
80019a0: 60f8 str r0, [r7, #12]
80019a2: 60b9 str r1, [r7, #8]
80019a4: 4613 mov r3, r2
80019a6: 80fb strh r3, [r7, #6]
uint16_t count;
/* Manage Buffer0 OUT */
if ((wEPVal & USB_EP_DTOG_RX) != 0U)
80019a8: 88fb ldrh r3, [r7, #6]
80019aa: f403 4380 and.w r3, r3, #16384 ; 0x4000
80019ae: 2b00 cmp r3, #0
80019b0: d07e beq.n 8001ab0 <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);
80019b2: 68fb ldr r3, [r7, #12]
80019b4: 681b ldr r3, [r3, #0]
80019b6: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
80019ba: b29b uxth r3, r3
80019bc: 461a mov r2, r3
80019be: 68bb ldr r3, [r7, #8]
80019c0: 781b ldrb r3, [r3, #0]
80019c2: 00db lsls r3, r3, #3
80019c4: 4413 add r3, r2
80019c6: 3302 adds r3, #2
80019c8: 005b lsls r3, r3, #1
80019ca: 68fa ldr r2, [r7, #12]
80019cc: 6812 ldr r2, [r2, #0]
80019ce: 4413 add r3, r2
80019d0: f503 6380 add.w r3, r3, #1024 ; 0x400
80019d4: 881b ldrh r3, [r3, #0]
80019d6: f3c3 0309 ubfx r3, r3, #0, #10
80019da: 837b strh r3, [r7, #26]
if (ep->xfer_len >= count)
80019dc: 68bb ldr r3, [r7, #8]
80019de: 699a ldr r2, [r3, #24]
80019e0: 8b7b ldrh r3, [r7, #26]
80019e2: 429a cmp r2, r3
80019e4: d306 bcc.n 80019f4 <HAL_PCD_EP_DB_Receive+0x5a>
{
ep->xfer_len -= count;
80019e6: 68bb ldr r3, [r7, #8]
80019e8: 699a ldr r2, [r3, #24]
80019ea: 8b7b ldrh r3, [r7, #26]
80019ec: 1ad2 subs r2, r2, r3
80019ee: 68bb ldr r3, [r7, #8]
80019f0: 619a str r2, [r3, #24]
80019f2: e002 b.n 80019fa <HAL_PCD_EP_DB_Receive+0x60>
}
else
{
ep->xfer_len = 0U;
80019f4: 68bb ldr r3, [r7, #8]
80019f6: 2200 movs r2, #0
80019f8: 619a str r2, [r3, #24]
}
if (ep->xfer_len == 0U)
80019fa: 68bb ldr r3, [r7, #8]
80019fc: 699b ldr r3, [r3, #24]
80019fe: 2b00 cmp r3, #0
8001a00: d123 bne.n 8001a4a <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);
8001a02: 68fb ldr r3, [r7, #12]
8001a04: 681b ldr r3, [r3, #0]
8001a06: 461a mov r2, r3
8001a08: 68bb ldr r3, [r7, #8]
8001a0a: 781b ldrb r3, [r3, #0]
8001a0c: 009b lsls r3, r3, #2
8001a0e: 4413 add r3, r2
8001a10: 881b ldrh r3, [r3, #0]
8001a12: b29b uxth r3, r3
8001a14: f423 4380 bic.w r3, r3, #16384 ; 0x4000
8001a18: f023 0370 bic.w r3, r3, #112 ; 0x70
8001a1c: 833b strh r3, [r7, #24]
8001a1e: 8b3b ldrh r3, [r7, #24]
8001a20: f483 5300 eor.w r3, r3, #8192 ; 0x2000
8001a24: 833b strh r3, [r7, #24]
8001a26: 68fb ldr r3, [r7, #12]
8001a28: 681b ldr r3, [r3, #0]
8001a2a: 461a mov r2, r3
8001a2c: 68bb ldr r3, [r7, #8]
8001a2e: 781b ldrb r3, [r3, #0]
8001a30: 009b lsls r3, r3, #2
8001a32: 441a add r2, r3
8001a34: 8b3b ldrh r3, [r7, #24]
8001a36: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8001a3a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8001a3e: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8001a42: f043 0380 orr.w r3, r3, #128 ; 0x80
8001a46: b29b uxth r3, r3
8001a48: 8013 strh r3, [r2, #0]
}
/* Check if Buffer1 is in blocked sate which requires to toggle */
if ((wEPVal & USB_EP_DTOG_TX) != 0U)
8001a4a: 88fb ldrh r3, [r7, #6]
8001a4c: f003 0340 and.w r3, r3, #64 ; 0x40
8001a50: 2b00 cmp r3, #0
8001a52: d01f beq.n 8001a94 <HAL_PCD_EP_DB_Receive+0xfa>
{
PCD_FreeUserBuffer(hpcd->Instance, ep->num, 0U);
8001a54: 68fb ldr r3, [r7, #12]
8001a56: 681b ldr r3, [r3, #0]
8001a58: 461a mov r2, r3
8001a5a: 68bb ldr r3, [r7, #8]
8001a5c: 781b ldrb r3, [r3, #0]
8001a5e: 009b lsls r3, r3, #2
8001a60: 4413 add r3, r2
8001a62: 881b ldrh r3, [r3, #0]
8001a64: b29b uxth r3, r3
8001a66: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8001a6a: f023 0370 bic.w r3, r3, #112 ; 0x70
8001a6e: 82fb strh r3, [r7, #22]
8001a70: 68fb ldr r3, [r7, #12]
8001a72: 681b ldr r3, [r3, #0]
8001a74: 461a mov r2, r3
8001a76: 68bb ldr r3, [r7, #8]
8001a78: 781b ldrb r3, [r3, #0]
8001a7a: 009b lsls r3, r3, #2
8001a7c: 441a add r2, r3
8001a7e: 8afb ldrh r3, [r7, #22]
8001a80: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8001a84: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8001a88: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8001a8c: f043 03c0 orr.w r3, r3, #192 ; 0xc0
8001a90: b29b uxth r3, r3
8001a92: 8013 strh r3, [r2, #0]
}
if (count != 0U)
8001a94: 8b7b ldrh r3, [r7, #26]
8001a96: 2b00 cmp r3, #0
8001a98: f000 8087 beq.w 8001baa <HAL_PCD_EP_DB_Receive+0x210>
{
USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr0, count);
8001a9c: 68fb ldr r3, [r7, #12]
8001a9e: 6818 ldr r0, [r3, #0]
8001aa0: 68bb ldr r3, [r7, #8]
8001aa2: 6959 ldr r1, [r3, #20]
8001aa4: 68bb ldr r3, [r7, #8]
8001aa6: 891a ldrh r2, [r3, #8]
8001aa8: 8b7b ldrh r3, [r7, #26]
8001aaa: f003 f867 bl 8004b7c <USB_ReadPMA>
8001aae: e07c b.n 8001baa <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);
8001ab0: 68fb ldr r3, [r7, #12]
8001ab2: 681b ldr r3, [r3, #0]
8001ab4: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8001ab8: b29b uxth r3, r3
8001aba: 461a mov r2, r3
8001abc: 68bb ldr r3, [r7, #8]
8001abe: 781b ldrb r3, [r3, #0]
8001ac0: 00db lsls r3, r3, #3
8001ac2: 4413 add r3, r2
8001ac4: 3306 adds r3, #6
8001ac6: 005b lsls r3, r3, #1
8001ac8: 68fa ldr r2, [r7, #12]
8001aca: 6812 ldr r2, [r2, #0]
8001acc: 4413 add r3, r2
8001ace: f503 6380 add.w r3, r3, #1024 ; 0x400
8001ad2: 881b ldrh r3, [r3, #0]
8001ad4: f3c3 0309 ubfx r3, r3, #0, #10
8001ad8: 837b strh r3, [r7, #26]
if (ep->xfer_len >= count)
8001ada: 68bb ldr r3, [r7, #8]
8001adc: 699a ldr r2, [r3, #24]
8001ade: 8b7b ldrh r3, [r7, #26]
8001ae0: 429a cmp r2, r3
8001ae2: d306 bcc.n 8001af2 <HAL_PCD_EP_DB_Receive+0x158>
{
ep->xfer_len -= count;
8001ae4: 68bb ldr r3, [r7, #8]
8001ae6: 699a ldr r2, [r3, #24]
8001ae8: 8b7b ldrh r3, [r7, #26]
8001aea: 1ad2 subs r2, r2, r3
8001aec: 68bb ldr r3, [r7, #8]
8001aee: 619a str r2, [r3, #24]
8001af0: e002 b.n 8001af8 <HAL_PCD_EP_DB_Receive+0x15e>
}
else
{
ep->xfer_len = 0U;
8001af2: 68bb ldr r3, [r7, #8]
8001af4: 2200 movs r2, #0
8001af6: 619a str r2, [r3, #24]
}
if (ep->xfer_len == 0U)
8001af8: 68bb ldr r3, [r7, #8]
8001afa: 699b ldr r3, [r3, #24]
8001afc: 2b00 cmp r3, #0
8001afe: d123 bne.n 8001b48 <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);
8001b00: 68fb ldr r3, [r7, #12]
8001b02: 681b ldr r3, [r3, #0]
8001b04: 461a mov r2, r3
8001b06: 68bb ldr r3, [r7, #8]
8001b08: 781b ldrb r3, [r3, #0]
8001b0a: 009b lsls r3, r3, #2
8001b0c: 4413 add r3, r2
8001b0e: 881b ldrh r3, [r3, #0]
8001b10: b29b uxth r3, r3
8001b12: f423 4380 bic.w r3, r3, #16384 ; 0x4000
8001b16: f023 0370 bic.w r3, r3, #112 ; 0x70
8001b1a: 83fb strh r3, [r7, #30]
8001b1c: 8bfb ldrh r3, [r7, #30]
8001b1e: f483 5300 eor.w r3, r3, #8192 ; 0x2000
8001b22: 83fb strh r3, [r7, #30]
8001b24: 68fb ldr r3, [r7, #12]
8001b26: 681b ldr r3, [r3, #0]
8001b28: 461a mov r2, r3
8001b2a: 68bb ldr r3, [r7, #8]
8001b2c: 781b ldrb r3, [r3, #0]
8001b2e: 009b lsls r3, r3, #2
8001b30: 441a add r2, r3
8001b32: 8bfb ldrh r3, [r7, #30]
8001b34: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8001b38: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8001b3c: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8001b40: f043 0380 orr.w r3, r3, #128 ; 0x80
8001b44: b29b uxth r3, r3
8001b46: 8013 strh r3, [r2, #0]
}
/*Need to FreeUser Buffer*/
if ((wEPVal & USB_EP_DTOG_TX) == 0U)
8001b48: 88fb ldrh r3, [r7, #6]
8001b4a: f003 0340 and.w r3, r3, #64 ; 0x40
8001b4e: 2b00 cmp r3, #0
8001b50: d11f bne.n 8001b92 <HAL_PCD_EP_DB_Receive+0x1f8>
{
PCD_FreeUserBuffer(hpcd->Instance, ep->num, 0U);
8001b52: 68fb ldr r3, [r7, #12]
8001b54: 681b ldr r3, [r3, #0]
8001b56: 461a mov r2, r3
8001b58: 68bb ldr r3, [r7, #8]
8001b5a: 781b ldrb r3, [r3, #0]
8001b5c: 009b lsls r3, r3, #2
8001b5e: 4413 add r3, r2
8001b60: 881b ldrh r3, [r3, #0]
8001b62: b29b uxth r3, r3
8001b64: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8001b68: f023 0370 bic.w r3, r3, #112 ; 0x70
8001b6c: 83bb strh r3, [r7, #28]
8001b6e: 68fb ldr r3, [r7, #12]
8001b70: 681b ldr r3, [r3, #0]
8001b72: 461a mov r2, r3
8001b74: 68bb ldr r3, [r7, #8]
8001b76: 781b ldrb r3, [r3, #0]
8001b78: 009b lsls r3, r3, #2
8001b7a: 441a add r2, r3
8001b7c: 8bbb ldrh r3, [r7, #28]
8001b7e: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8001b82: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8001b86: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8001b8a: f043 03c0 orr.w r3, r3, #192 ; 0xc0
8001b8e: b29b uxth r3, r3
8001b90: 8013 strh r3, [r2, #0]
}
if (count != 0U)
8001b92: 8b7b ldrh r3, [r7, #26]
8001b94: 2b00 cmp r3, #0
8001b96: d008 beq.n 8001baa <HAL_PCD_EP_DB_Receive+0x210>
{
USB_ReadPMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr1, count);
8001b98: 68fb ldr r3, [r7, #12]
8001b9a: 6818 ldr r0, [r3, #0]
8001b9c: 68bb ldr r3, [r7, #8]
8001b9e: 6959 ldr r1, [r3, #20]
8001ba0: 68bb ldr r3, [r7, #8]
8001ba2: 895a ldrh r2, [r3, #10]
8001ba4: 8b7b ldrh r3, [r7, #26]
8001ba6: f002 ffe9 bl 8004b7c <USB_ReadPMA>
}
}
return count;
8001baa: 8b7b ldrh r3, [r7, #26]
}
8001bac: 4618 mov r0, r3
8001bae: 3720 adds r7, #32
8001bb0: 46bd mov sp, r7
8001bb2: bd80 pop {r7, pc}
08001bb4 <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)
{
8001bb4: b580 push {r7, lr}
8001bb6: b092 sub sp, #72 ; 0x48
8001bb8: af00 add r7, sp, #0
8001bba: 60f8 str r0, [r7, #12]
8001bbc: 60b9 str r1, [r7, #8]
8001bbe: 4613 mov r3, r2
8001bc0: 80fb strh r3, [r7, #6]
uint32_t len;
uint16_t TxByteNbre;
/* Data Buffer0 ACK received */
if ((wEPVal & USB_EP_DTOG_TX) != 0U)
8001bc2: 88fb ldrh r3, [r7, #6]
8001bc4: f003 0340 and.w r3, r3, #64 ; 0x40
8001bc8: 2b00 cmp r3, #0
8001bca: f000 8132 beq.w 8001e32 <HAL_PCD_EP_DB_Transmit+0x27e>
{
/* multi-packet on the NON control IN endpoint */
TxByteNbre = (uint16_t)PCD_GET_EP_DBUF0_CNT(hpcd->Instance, ep->num);
8001bce: 68fb ldr r3, [r7, #12]
8001bd0: 681b ldr r3, [r3, #0]
8001bd2: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8001bd6: b29b uxth r3, r3
8001bd8: 461a mov r2, r3
8001bda: 68bb ldr r3, [r7, #8]
8001bdc: 781b ldrb r3, [r3, #0]
8001bde: 00db lsls r3, r3, #3
8001be0: 4413 add r3, r2
8001be2: 3302 adds r3, #2
8001be4: 005b lsls r3, r3, #1
8001be6: 68fa ldr r2, [r7, #12]
8001be8: 6812 ldr r2, [r2, #0]
8001bea: 4413 add r3, r2
8001bec: f503 6380 add.w r3, r3, #1024 ; 0x400
8001bf0: 881b ldrh r3, [r3, #0]
8001bf2: f3c3 0309 ubfx r3, r3, #0, #10
8001bf6: 85fb strh r3, [r7, #46] ; 0x2e
if (ep->xfer_len > TxByteNbre)
8001bf8: 68bb ldr r3, [r7, #8]
8001bfa: 699a ldr r2, [r3, #24]
8001bfc: 8dfb ldrh r3, [r7, #46] ; 0x2e
8001bfe: 429a cmp r2, r3
8001c00: d906 bls.n 8001c10 <HAL_PCD_EP_DB_Transmit+0x5c>
{
ep->xfer_len -= TxByteNbre;
8001c02: 68bb ldr r3, [r7, #8]
8001c04: 699a ldr r2, [r3, #24]
8001c06: 8dfb ldrh r3, [r7, #46] ; 0x2e
8001c08: 1ad2 subs r2, r2, r3
8001c0a: 68bb ldr r3, [r7, #8]
8001c0c: 619a str r2, [r3, #24]
8001c0e: e002 b.n 8001c16 <HAL_PCD_EP_DB_Transmit+0x62>
}
else
{
ep->xfer_len = 0U;
8001c10: 68bb ldr r3, [r7, #8]
8001c12: 2200 movs r2, #0
8001c14: 619a str r2, [r3, #24]
}
/* Transfer is completed */
if (ep->xfer_len == 0U)
8001c16: 68bb ldr r3, [r7, #8]
8001c18: 699b ldr r3, [r3, #24]
8001c1a: 2b00 cmp r3, #0
8001c1c: d12c bne.n 8001c78 <HAL_PCD_EP_DB_Transmit+0xc4>
{
/* TX COMPLETE */
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
hpcd->DataInStageCallback(hpcd, ep->num);
#else
HAL_PCD_DataInStageCallback(hpcd, ep->num);
8001c1e: 68bb ldr r3, [r7, #8]
8001c20: 781b ldrb r3, [r3, #0]
8001c22: 4619 mov r1, r3
8001c24: 68f8 ldr r0, [r7, #12]
8001c26: f004 fda4 bl 8006772 <HAL_PCD_DataInStageCallback>
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
if ((wEPVal & USB_EP_DTOG_RX) != 0U)
8001c2a: 88fb ldrh r3, [r7, #6]
8001c2c: f403 4380 and.w r3, r3, #16384 ; 0x4000
8001c30: 2b00 cmp r3, #0
8001c32: f000 822f beq.w 8002094 <HAL_PCD_EP_DB_Transmit+0x4e0>
{
PCD_FreeUserBuffer(hpcd->Instance, ep->num, 1U);
8001c36: 68fb ldr r3, [r7, #12]
8001c38: 681b ldr r3, [r3, #0]
8001c3a: 461a mov r2, r3
8001c3c: 68bb ldr r3, [r7, #8]
8001c3e: 781b ldrb r3, [r3, #0]
8001c40: 009b lsls r3, r3, #2
8001c42: 4413 add r3, r2
8001c44: 881b ldrh r3, [r3, #0]
8001c46: b29b uxth r3, r3
8001c48: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8001c4c: f023 0370 bic.w r3, r3, #112 ; 0x70
8001c50: 827b strh r3, [r7, #18]
8001c52: 68fb ldr r3, [r7, #12]
8001c54: 681b ldr r3, [r3, #0]
8001c56: 461a mov r2, r3
8001c58: 68bb ldr r3, [r7, #8]
8001c5a: 781b ldrb r3, [r3, #0]
8001c5c: 009b lsls r3, r3, #2
8001c5e: 441a add r2, r3
8001c60: 8a7b ldrh r3, [r7, #18]
8001c62: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8001c66: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8001c6a: f443 4340 orr.w r3, r3, #49152 ; 0xc000
8001c6e: f043 0380 orr.w r3, r3, #128 ; 0x80
8001c72: b29b uxth r3, r3
8001c74: 8013 strh r3, [r2, #0]
8001c76: e20d b.n 8002094 <HAL_PCD_EP_DB_Transmit+0x4e0>
}
}
else /* Transfer is not yet Done */
{
/* need to Free USB Buff */
if ((wEPVal & USB_EP_DTOG_RX) != 0U)
8001c78: 88fb ldrh r3, [r7, #6]
8001c7a: f403 4380 and.w r3, r3, #16384 ; 0x4000
8001c7e: 2b00 cmp r3, #0
8001c80: d01f beq.n 8001cc2 <HAL_PCD_EP_DB_Transmit+0x10e>
{
PCD_FreeUserBuffer(hpcd->Instance, ep->num, 1U);
8001c82: 68fb ldr r3, [r7, #12]
8001c84: 681b ldr r3, [r3, #0]
8001c86: 461a mov r2, r3
8001c88: 68bb ldr r3, [r7, #8]
8001c8a: 781b ldrb r3, [r3, #0]
8001c8c: 009b lsls r3, r3, #2
8001c8e: 4413 add r3, r2
8001c90: 881b ldrh r3, [r3, #0]
8001c92: b29b uxth r3, r3
8001c94: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8001c98: f023 0370 bic.w r3, r3, #112 ; 0x70
8001c9c: 84bb strh r3, [r7, #36] ; 0x24
8001c9e: 68fb ldr r3, [r7, #12]
8001ca0: 681b ldr r3, [r3, #0]
8001ca2: 461a mov r2, r3
8001ca4: 68bb ldr r3, [r7, #8]
8001ca6: 781b ldrb r3, [r3, #0]
8001ca8: 009b lsls r3, r3, #2
8001caa: 441a add r2, r3
8001cac: 8cbb ldrh r3, [r7, #36] ; 0x24
8001cae: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8001cb2: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8001cb6: f443 4340 orr.w r3, r3, #49152 ; 0xc000
8001cba: f043 0380 orr.w r3, r3, #128 ; 0x80
8001cbe: b29b uxth r3, r3
8001cc0: 8013 strh r3, [r2, #0]
}
/* Still there is data to Fill in the next Buffer */
if (ep->xfer_fill_db == 1U)
8001cc2: 68bb ldr r3, [r7, #8]
8001cc4: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
8001cc8: 2b01 cmp r3, #1
8001cca: f040 81e3 bne.w 8002094 <HAL_PCD_EP_DB_Transmit+0x4e0>
{
ep->xfer_buff += TxByteNbre;
8001cce: 68bb ldr r3, [r7, #8]
8001cd0: 695a ldr r2, [r3, #20]
8001cd2: 8dfb ldrh r3, [r7, #46] ; 0x2e
8001cd4: 441a add r2, r3
8001cd6: 68bb ldr r3, [r7, #8]
8001cd8: 615a str r2, [r3, #20]
ep->xfer_count += TxByteNbre;
8001cda: 68bb ldr r3, [r7, #8]
8001cdc: 69da ldr r2, [r3, #28]
8001cde: 8dfb ldrh r3, [r7, #46] ; 0x2e
8001ce0: 441a add r2, r3
8001ce2: 68bb ldr r3, [r7, #8]
8001ce4: 61da str r2, [r3, #28]
/* Calculate the len of the new buffer to fill */
if (ep->xfer_len_db >= ep->maxpacket)
8001ce6: 68bb ldr r3, [r7, #8]
8001ce8: 6a1a ldr r2, [r3, #32]
8001cea: 68bb ldr r3, [r7, #8]
8001cec: 691b ldr r3, [r3, #16]
8001cee: 429a cmp r2, r3
8001cf0: d309 bcc.n 8001d06 <HAL_PCD_EP_DB_Transmit+0x152>
{
len = ep->maxpacket;
8001cf2: 68bb ldr r3, [r7, #8]
8001cf4: 691b ldr r3, [r3, #16]
8001cf6: 63bb str r3, [r7, #56] ; 0x38
ep->xfer_len_db -= len;
8001cf8: 68bb ldr r3, [r7, #8]
8001cfa: 6a1a ldr r2, [r3, #32]
8001cfc: 6bbb ldr r3, [r7, #56] ; 0x38
8001cfe: 1ad2 subs r2, r2, r3
8001d00: 68bb ldr r3, [r7, #8]
8001d02: 621a str r2, [r3, #32]
8001d04: e014 b.n 8001d30 <HAL_PCD_EP_DB_Transmit+0x17c>
}
else if (ep->xfer_len_db == 0U)
8001d06: 68bb ldr r3, [r7, #8]
8001d08: 6a1b ldr r3, [r3, #32]
8001d0a: 2b00 cmp r3, #0
8001d0c: d106 bne.n 8001d1c <HAL_PCD_EP_DB_Transmit+0x168>
{
len = TxByteNbre;
8001d0e: 8dfb ldrh r3, [r7, #46] ; 0x2e
8001d10: 63bb str r3, [r7, #56] ; 0x38
ep->xfer_fill_db = 0U;
8001d12: 68bb ldr r3, [r7, #8]
8001d14: 2200 movs r2, #0
8001d16: f883 2024 strb.w r2, [r3, #36] ; 0x24
8001d1a: e009 b.n 8001d30 <HAL_PCD_EP_DB_Transmit+0x17c>
}
else
{
ep->xfer_fill_db = 0U;
8001d1c: 68bb ldr r3, [r7, #8]
8001d1e: 2200 movs r2, #0
8001d20: f883 2024 strb.w r2, [r3, #36] ; 0x24
len = ep->xfer_len_db;
8001d24: 68bb ldr r3, [r7, #8]
8001d26: 6a1b ldr r3, [r3, #32]
8001d28: 63bb str r3, [r7, #56] ; 0x38
ep->xfer_len_db = 0U;
8001d2a: 68bb ldr r3, [r7, #8]
8001d2c: 2200 movs r2, #0
8001d2e: 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);
8001d30: 68bb ldr r3, [r7, #8]
8001d32: 785b ldrb r3, [r3, #1]
8001d34: 2b00 cmp r3, #0
8001d36: d155 bne.n 8001de4 <HAL_PCD_EP_DB_Transmit+0x230>
8001d38: 68fb ldr r3, [r7, #12]
8001d3a: 681b ldr r3, [r3, #0]
8001d3c: 61bb str r3, [r7, #24]
8001d3e: 68fb ldr r3, [r7, #12]
8001d40: 681b ldr r3, [r3, #0]
8001d42: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8001d46: b29b uxth r3, r3
8001d48: 461a mov r2, r3
8001d4a: 69bb ldr r3, [r7, #24]
8001d4c: 4413 add r3, r2
8001d4e: 61bb str r3, [r7, #24]
8001d50: 68bb ldr r3, [r7, #8]
8001d52: 781b ldrb r3, [r3, #0]
8001d54: 011a lsls r2, r3, #4
8001d56: 69bb ldr r3, [r7, #24]
8001d58: 4413 add r3, r2
8001d5a: f203 4304 addw r3, r3, #1028 ; 0x404
8001d5e: 617b str r3, [r7, #20]
8001d60: 6bbb ldr r3, [r7, #56] ; 0x38
8001d62: 2b00 cmp r3, #0
8001d64: d112 bne.n 8001d8c <HAL_PCD_EP_DB_Transmit+0x1d8>
8001d66: 697b ldr r3, [r7, #20]
8001d68: 881b ldrh r3, [r3, #0]
8001d6a: b29b uxth r3, r3
8001d6c: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
8001d70: b29a uxth r2, r3
8001d72: 697b ldr r3, [r7, #20]
8001d74: 801a strh r2, [r3, #0]
8001d76: 697b ldr r3, [r7, #20]
8001d78: 881b ldrh r3, [r3, #0]
8001d7a: b29b uxth r3, r3
8001d7c: ea6f 4343 mvn.w r3, r3, lsl #17
8001d80: ea6f 4353 mvn.w r3, r3, lsr #17
8001d84: b29a uxth r2, r3
8001d86: 697b ldr r3, [r7, #20]
8001d88: 801a strh r2, [r3, #0]
8001d8a: e047 b.n 8001e1c <HAL_PCD_EP_DB_Transmit+0x268>
8001d8c: 6bbb ldr r3, [r7, #56] ; 0x38
8001d8e: 2b3e cmp r3, #62 ; 0x3e
8001d90: d811 bhi.n 8001db6 <HAL_PCD_EP_DB_Transmit+0x202>
8001d92: 6bbb ldr r3, [r7, #56] ; 0x38
8001d94: 085b lsrs r3, r3, #1
8001d96: 62bb str r3, [r7, #40] ; 0x28
8001d98: 6bbb ldr r3, [r7, #56] ; 0x38
8001d9a: f003 0301 and.w r3, r3, #1
8001d9e: 2b00 cmp r3, #0
8001da0: d002 beq.n 8001da8 <HAL_PCD_EP_DB_Transmit+0x1f4>
8001da2: 6abb ldr r3, [r7, #40] ; 0x28
8001da4: 3301 adds r3, #1
8001da6: 62bb str r3, [r7, #40] ; 0x28
8001da8: 6abb ldr r3, [r7, #40] ; 0x28
8001daa: b29b uxth r3, r3
8001dac: 029b lsls r3, r3, #10
8001dae: b29a uxth r2, r3
8001db0: 697b ldr r3, [r7, #20]
8001db2: 801a strh r2, [r3, #0]
8001db4: e032 b.n 8001e1c <HAL_PCD_EP_DB_Transmit+0x268>
8001db6: 6bbb ldr r3, [r7, #56] ; 0x38
8001db8: 095b lsrs r3, r3, #5
8001dba: 62bb str r3, [r7, #40] ; 0x28
8001dbc: 6bbb ldr r3, [r7, #56] ; 0x38
8001dbe: f003 031f and.w r3, r3, #31
8001dc2: 2b00 cmp r3, #0
8001dc4: d102 bne.n 8001dcc <HAL_PCD_EP_DB_Transmit+0x218>
8001dc6: 6abb ldr r3, [r7, #40] ; 0x28
8001dc8: 3b01 subs r3, #1
8001dca: 62bb str r3, [r7, #40] ; 0x28
8001dcc: 6abb ldr r3, [r7, #40] ; 0x28
8001dce: b29b uxth r3, r3
8001dd0: 029b lsls r3, r3, #10
8001dd2: b29b uxth r3, r3
8001dd4: ea6f 4343 mvn.w r3, r3, lsl #17
8001dd8: ea6f 4353 mvn.w r3, r3, lsr #17
8001ddc: b29a uxth r2, r3
8001dde: 697b ldr r3, [r7, #20]
8001de0: 801a strh r2, [r3, #0]
8001de2: e01b b.n 8001e1c <HAL_PCD_EP_DB_Transmit+0x268>
8001de4: 68bb ldr r3, [r7, #8]
8001de6: 785b ldrb r3, [r3, #1]
8001de8: 2b01 cmp r3, #1
8001dea: d117 bne.n 8001e1c <HAL_PCD_EP_DB_Transmit+0x268>
8001dec: 68fb ldr r3, [r7, #12]
8001dee: 681b ldr r3, [r3, #0]
8001df0: 623b str r3, [r7, #32]
8001df2: 68fb ldr r3, [r7, #12]
8001df4: 681b ldr r3, [r3, #0]
8001df6: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8001dfa: b29b uxth r3, r3
8001dfc: 461a mov r2, r3
8001dfe: 6a3b ldr r3, [r7, #32]
8001e00: 4413 add r3, r2
8001e02: 623b str r3, [r7, #32]
8001e04: 68bb ldr r3, [r7, #8]
8001e06: 781b ldrb r3, [r3, #0]
8001e08: 011a lsls r2, r3, #4
8001e0a: 6a3b ldr r3, [r7, #32]
8001e0c: 4413 add r3, r2
8001e0e: f203 4304 addw r3, r3, #1028 ; 0x404
8001e12: 61fb str r3, [r7, #28]
8001e14: 6bbb ldr r3, [r7, #56] ; 0x38
8001e16: b29a uxth r2, r3
8001e18: 69fb ldr r3, [r7, #28]
8001e1a: 801a strh r2, [r3, #0]
/* Copy user buffer to USB PMA */
USB_WritePMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr0, (uint16_t)len);
8001e1c: 68fb ldr r3, [r7, #12]
8001e1e: 6818 ldr r0, [r3, #0]
8001e20: 68bb ldr r3, [r7, #8]
8001e22: 6959 ldr r1, [r3, #20]
8001e24: 68bb ldr r3, [r7, #8]
8001e26: 891a ldrh r2, [r3, #8]
8001e28: 6bbb ldr r3, [r7, #56] ; 0x38
8001e2a: b29b uxth r3, r3
8001e2c: f002 fe62 bl 8004af4 <USB_WritePMA>
8001e30: e130 b.n 8002094 <HAL_PCD_EP_DB_Transmit+0x4e0>
}
}
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);
8001e32: 68fb ldr r3, [r7, #12]
8001e34: 681b ldr r3, [r3, #0]
8001e36: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8001e3a: b29b uxth r3, r3
8001e3c: 461a mov r2, r3
8001e3e: 68bb ldr r3, [r7, #8]
8001e40: 781b ldrb r3, [r3, #0]
8001e42: 00db lsls r3, r3, #3
8001e44: 4413 add r3, r2
8001e46: 3306 adds r3, #6
8001e48: 005b lsls r3, r3, #1
8001e4a: 68fa ldr r2, [r7, #12]
8001e4c: 6812 ldr r2, [r2, #0]
8001e4e: 4413 add r3, r2
8001e50: f503 6380 add.w r3, r3, #1024 ; 0x400
8001e54: 881b ldrh r3, [r3, #0]
8001e56: f3c3 0309 ubfx r3, r3, #0, #10
8001e5a: 85fb strh r3, [r7, #46] ; 0x2e
if (ep->xfer_len >= TxByteNbre)
8001e5c: 68bb ldr r3, [r7, #8]
8001e5e: 699a ldr r2, [r3, #24]
8001e60: 8dfb ldrh r3, [r7, #46] ; 0x2e
8001e62: 429a cmp r2, r3
8001e64: d306 bcc.n 8001e74 <HAL_PCD_EP_DB_Transmit+0x2c0>
{
ep->xfer_len -= TxByteNbre;
8001e66: 68bb ldr r3, [r7, #8]
8001e68: 699a ldr r2, [r3, #24]
8001e6a: 8dfb ldrh r3, [r7, #46] ; 0x2e
8001e6c: 1ad2 subs r2, r2, r3
8001e6e: 68bb ldr r3, [r7, #8]
8001e70: 619a str r2, [r3, #24]
8001e72: e002 b.n 8001e7a <HAL_PCD_EP_DB_Transmit+0x2c6>
}
else
{
ep->xfer_len = 0U;
8001e74: 68bb ldr r3, [r7, #8]
8001e76: 2200 movs r2, #0
8001e78: 619a str r2, [r3, #24]
}
/* Transfer is completed */
if (ep->xfer_len == 0U)
8001e7a: 68bb ldr r3, [r7, #8]
8001e7c: 699b ldr r3, [r3, #24]
8001e7e: 2b00 cmp r3, #0
8001e80: d12c bne.n 8001edc <HAL_PCD_EP_DB_Transmit+0x328>
{
/* TX COMPLETE */
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
hpcd->DataInStageCallback(hpcd, ep->num);
#else
HAL_PCD_DataInStageCallback(hpcd, ep->num);
8001e82: 68bb ldr r3, [r7, #8]
8001e84: 781b ldrb r3, [r3, #0]
8001e86: 4619 mov r1, r3
8001e88: 68f8 ldr r0, [r7, #12]
8001e8a: f004 fc72 bl 8006772 <HAL_PCD_DataInStageCallback>
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
/*need to Free USB Buff*/
if ((wEPVal & USB_EP_DTOG_RX) == 0U)
8001e8e: 88fb ldrh r3, [r7, #6]
8001e90: f403 4380 and.w r3, r3, #16384 ; 0x4000
8001e94: 2b00 cmp r3, #0
8001e96: f040 80fd bne.w 8002094 <HAL_PCD_EP_DB_Transmit+0x4e0>
{
PCD_FreeUserBuffer(hpcd->Instance, ep->num, 1U);
8001e9a: 68fb ldr r3, [r7, #12]
8001e9c: 681b ldr r3, [r3, #0]
8001e9e: 461a mov r2, r3
8001ea0: 68bb ldr r3, [r7, #8]
8001ea2: 781b ldrb r3, [r3, #0]
8001ea4: 009b lsls r3, r3, #2
8001ea6: 4413 add r3, r2
8001ea8: 881b ldrh r3, [r3, #0]
8001eaa: b29b uxth r3, r3
8001eac: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8001eb0: f023 0370 bic.w r3, r3, #112 ; 0x70
8001eb4: 84fb strh r3, [r7, #38] ; 0x26
8001eb6: 68fb ldr r3, [r7, #12]
8001eb8: 681b ldr r3, [r3, #0]
8001eba: 461a mov r2, r3
8001ebc: 68bb ldr r3, [r7, #8]
8001ebe: 781b ldrb r3, [r3, #0]
8001ec0: 009b lsls r3, r3, #2
8001ec2: 441a add r2, r3
8001ec4: 8cfb ldrh r3, [r7, #38] ; 0x26
8001ec6: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8001eca: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8001ece: f443 4340 orr.w r3, r3, #49152 ; 0xc000
8001ed2: f043 0380 orr.w r3, r3, #128 ; 0x80
8001ed6: b29b uxth r3, r3
8001ed8: 8013 strh r3, [r2, #0]
8001eda: e0db b.n 8002094 <HAL_PCD_EP_DB_Transmit+0x4e0>
}
}
else /* Transfer is not yet Done */
{
/* need to Free USB Buff */
if ((wEPVal & USB_EP_DTOG_RX) == 0U)
8001edc: 88fb ldrh r3, [r7, #6]
8001ede: f403 4380 and.w r3, r3, #16384 ; 0x4000
8001ee2: 2b00 cmp r3, #0
8001ee4: d11f bne.n 8001f26 <HAL_PCD_EP_DB_Transmit+0x372>
{
PCD_FreeUserBuffer(hpcd->Instance, ep->num, 1U);
8001ee6: 68fb ldr r3, [r7, #12]
8001ee8: 681b ldr r3, [r3, #0]
8001eea: 461a mov r2, r3
8001eec: 68bb ldr r3, [r7, #8]
8001eee: 781b ldrb r3, [r3, #0]
8001ef0: 009b lsls r3, r3, #2
8001ef2: 4413 add r3, r2
8001ef4: 881b ldrh r3, [r3, #0]
8001ef6: b29b uxth r3, r3
8001ef8: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8001efc: f023 0370 bic.w r3, r3, #112 ; 0x70
8001f00: 85bb strh r3, [r7, #44] ; 0x2c
8001f02: 68fb ldr r3, [r7, #12]
8001f04: 681b ldr r3, [r3, #0]
8001f06: 461a mov r2, r3
8001f08: 68bb ldr r3, [r7, #8]
8001f0a: 781b ldrb r3, [r3, #0]
8001f0c: 009b lsls r3, r3, #2
8001f0e: 441a add r2, r3
8001f10: 8dbb ldrh r3, [r7, #44] ; 0x2c
8001f12: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8001f16: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8001f1a: f443 4340 orr.w r3, r3, #49152 ; 0xc000
8001f1e: f043 0380 orr.w r3, r3, #128 ; 0x80
8001f22: b29b uxth r3, r3
8001f24: 8013 strh r3, [r2, #0]
}
/* Still there is data to Fill in the next Buffer */
if (ep->xfer_fill_db == 1U)
8001f26: 68bb ldr r3, [r7, #8]
8001f28: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
8001f2c: 2b01 cmp r3, #1
8001f2e: f040 80b1 bne.w 8002094 <HAL_PCD_EP_DB_Transmit+0x4e0>
{
ep->xfer_buff += TxByteNbre;
8001f32: 68bb ldr r3, [r7, #8]
8001f34: 695a ldr r2, [r3, #20]
8001f36: 8dfb ldrh r3, [r7, #46] ; 0x2e
8001f38: 441a add r2, r3
8001f3a: 68bb ldr r3, [r7, #8]
8001f3c: 615a str r2, [r3, #20]
ep->xfer_count += TxByteNbre;
8001f3e: 68bb ldr r3, [r7, #8]
8001f40: 69da ldr r2, [r3, #28]
8001f42: 8dfb ldrh r3, [r7, #46] ; 0x2e
8001f44: 441a add r2, r3
8001f46: 68bb ldr r3, [r7, #8]
8001f48: 61da str r2, [r3, #28]
/* Calculate the len of the new buffer to fill */
if (ep->xfer_len_db >= ep->maxpacket)
8001f4a: 68bb ldr r3, [r7, #8]
8001f4c: 6a1a ldr r2, [r3, #32]
8001f4e: 68bb ldr r3, [r7, #8]
8001f50: 691b ldr r3, [r3, #16]
8001f52: 429a cmp r2, r3
8001f54: d309 bcc.n 8001f6a <HAL_PCD_EP_DB_Transmit+0x3b6>
{
len = ep->maxpacket;
8001f56: 68bb ldr r3, [r7, #8]
8001f58: 691b ldr r3, [r3, #16]
8001f5a: 63bb str r3, [r7, #56] ; 0x38
ep->xfer_len_db -= len;
8001f5c: 68bb ldr r3, [r7, #8]
8001f5e: 6a1a ldr r2, [r3, #32]
8001f60: 6bbb ldr r3, [r7, #56] ; 0x38
8001f62: 1ad2 subs r2, r2, r3
8001f64: 68bb ldr r3, [r7, #8]
8001f66: 621a str r2, [r3, #32]
8001f68: e014 b.n 8001f94 <HAL_PCD_EP_DB_Transmit+0x3e0>
}
else if (ep->xfer_len_db == 0U)
8001f6a: 68bb ldr r3, [r7, #8]
8001f6c: 6a1b ldr r3, [r3, #32]
8001f6e: 2b00 cmp r3, #0
8001f70: d106 bne.n 8001f80 <HAL_PCD_EP_DB_Transmit+0x3cc>
{
len = TxByteNbre;
8001f72: 8dfb ldrh r3, [r7, #46] ; 0x2e
8001f74: 63bb str r3, [r7, #56] ; 0x38
ep->xfer_fill_db = 0U;
8001f76: 68bb ldr r3, [r7, #8]
8001f78: 2200 movs r2, #0
8001f7a: f883 2024 strb.w r2, [r3, #36] ; 0x24
8001f7e: e009 b.n 8001f94 <HAL_PCD_EP_DB_Transmit+0x3e0>
}
else
{
len = ep->xfer_len_db;
8001f80: 68bb ldr r3, [r7, #8]
8001f82: 6a1b ldr r3, [r3, #32]
8001f84: 63bb str r3, [r7, #56] ; 0x38
ep->xfer_len_db = 0U;
8001f86: 68bb ldr r3, [r7, #8]
8001f88: 2200 movs r2, #0
8001f8a: 621a str r2, [r3, #32]
ep->xfer_fill_db = 0;
8001f8c: 68bb ldr r3, [r7, #8]
8001f8e: 2200 movs r2, #0
8001f90: 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);
8001f94: 68fb ldr r3, [r7, #12]
8001f96: 681b ldr r3, [r3, #0]
8001f98: 637b str r3, [r7, #52] ; 0x34
8001f9a: 68bb ldr r3, [r7, #8]
8001f9c: 785b ldrb r3, [r3, #1]
8001f9e: 2b00 cmp r3, #0
8001fa0: d155 bne.n 800204e <HAL_PCD_EP_DB_Transmit+0x49a>
8001fa2: 68fb ldr r3, [r7, #12]
8001fa4: 681b ldr r3, [r3, #0]
8001fa6: 647b str r3, [r7, #68] ; 0x44
8001fa8: 68fb ldr r3, [r7, #12]
8001faa: 681b ldr r3, [r3, #0]
8001fac: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8001fb0: b29b uxth r3, r3
8001fb2: 461a mov r2, r3
8001fb4: 6c7b ldr r3, [r7, #68] ; 0x44
8001fb6: 4413 add r3, r2
8001fb8: 647b str r3, [r7, #68] ; 0x44
8001fba: 68bb ldr r3, [r7, #8]
8001fbc: 781b ldrb r3, [r3, #0]
8001fbe: 011a lsls r2, r3, #4
8001fc0: 6c7b ldr r3, [r7, #68] ; 0x44
8001fc2: 4413 add r3, r2
8001fc4: f203 430c addw r3, r3, #1036 ; 0x40c
8001fc8: 643b str r3, [r7, #64] ; 0x40
8001fca: 6bbb ldr r3, [r7, #56] ; 0x38
8001fcc: 2b00 cmp r3, #0
8001fce: d112 bne.n 8001ff6 <HAL_PCD_EP_DB_Transmit+0x442>
8001fd0: 6c3b ldr r3, [r7, #64] ; 0x40
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: 6c3b ldr r3, [r7, #64] ; 0x40
8001fde: 801a strh r2, [r3, #0]
8001fe0: 6c3b ldr r3, [r7, #64] ; 0x40
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: 6c3b ldr r3, [r7, #64] ; 0x40
8001ff2: 801a strh r2, [r3, #0]
8001ff4: e044 b.n 8002080 <HAL_PCD_EP_DB_Transmit+0x4cc>
8001ff6: 6bbb ldr r3, [r7, #56] ; 0x38
8001ff8: 2b3e cmp r3, #62 ; 0x3e
8001ffa: d811 bhi.n 8002020 <HAL_PCD_EP_DB_Transmit+0x46c>
8001ffc: 6bbb ldr r3, [r7, #56] ; 0x38
8001ffe: 085b lsrs r3, r3, #1
8002000: 63fb str r3, [r7, #60] ; 0x3c
8002002: 6bbb ldr r3, [r7, #56] ; 0x38
8002004: f003 0301 and.w r3, r3, #1
8002008: 2b00 cmp r3, #0
800200a: d002 beq.n 8002012 <HAL_PCD_EP_DB_Transmit+0x45e>
800200c: 6bfb ldr r3, [r7, #60] ; 0x3c
800200e: 3301 adds r3, #1
8002010: 63fb str r3, [r7, #60] ; 0x3c
8002012: 6bfb ldr r3, [r7, #60] ; 0x3c
8002014: b29b uxth r3, r3
8002016: 029b lsls r3, r3, #10
8002018: b29a uxth r2, r3
800201a: 6c3b ldr r3, [r7, #64] ; 0x40
800201c: 801a strh r2, [r3, #0]
800201e: e02f b.n 8002080 <HAL_PCD_EP_DB_Transmit+0x4cc>
8002020: 6bbb ldr r3, [r7, #56] ; 0x38
8002022: 095b lsrs r3, r3, #5
8002024: 63fb str r3, [r7, #60] ; 0x3c
8002026: 6bbb ldr r3, [r7, #56] ; 0x38
8002028: f003 031f and.w r3, r3, #31
800202c: 2b00 cmp r3, #0
800202e: d102 bne.n 8002036 <HAL_PCD_EP_DB_Transmit+0x482>
8002030: 6bfb ldr r3, [r7, #60] ; 0x3c
8002032: 3b01 subs r3, #1
8002034: 63fb str r3, [r7, #60] ; 0x3c
8002036: 6bfb ldr r3, [r7, #60] ; 0x3c
8002038: b29b uxth r3, r3
800203a: 029b lsls r3, r3, #10
800203c: b29b uxth r3, r3
800203e: ea6f 4343 mvn.w r3, r3, lsl #17
8002042: ea6f 4353 mvn.w r3, r3, lsr #17
8002046: b29a uxth r2, r3
8002048: 6c3b ldr r3, [r7, #64] ; 0x40
800204a: 801a strh r2, [r3, #0]
800204c: e018 b.n 8002080 <HAL_PCD_EP_DB_Transmit+0x4cc>
800204e: 68bb ldr r3, [r7, #8]
8002050: 785b ldrb r3, [r3, #1]
8002052: 2b01 cmp r3, #1
8002054: d114 bne.n 8002080 <HAL_PCD_EP_DB_Transmit+0x4cc>
8002056: 68fb ldr r3, [r7, #12]
8002058: 681b ldr r3, [r3, #0]
800205a: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
800205e: b29b uxth r3, r3
8002060: 461a mov r2, r3
8002062: 6b7b ldr r3, [r7, #52] ; 0x34
8002064: 4413 add r3, r2
8002066: 637b str r3, [r7, #52] ; 0x34
8002068: 68bb ldr r3, [r7, #8]
800206a: 781b ldrb r3, [r3, #0]
800206c: 011a lsls r2, r3, #4
800206e: 6b7b ldr r3, [r7, #52] ; 0x34
8002070: 4413 add r3, r2
8002072: f203 430c addw r3, r3, #1036 ; 0x40c
8002076: 633b str r3, [r7, #48] ; 0x30
8002078: 6bbb ldr r3, [r7, #56] ; 0x38
800207a: b29a uxth r2, r3
800207c: 6b3b ldr r3, [r7, #48] ; 0x30
800207e: 801a strh r2, [r3, #0]
/* Copy the user buffer to USB PMA */
USB_WritePMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr1, (uint16_t)len);
8002080: 68fb ldr r3, [r7, #12]
8002082: 6818 ldr r0, [r3, #0]
8002084: 68bb ldr r3, [r7, #8]
8002086: 6959 ldr r1, [r3, #20]
8002088: 68bb ldr r3, [r7, #8]
800208a: 895a ldrh r2, [r3, #10]
800208c: 6bbb ldr r3, [r7, #56] ; 0x38
800208e: b29b uxth r3, r3
8002090: f002 fd30 bl 8004af4 <USB_WritePMA>
}
}
}
/*enable endpoint IN*/
PCD_SET_EP_TX_STATUS(hpcd->Instance, ep->num, USB_EP_TX_VALID);
8002094: 68fb ldr r3, [r7, #12]
8002096: 681b ldr r3, [r3, #0]
8002098: 461a mov r2, r3
800209a: 68bb ldr r3, [r7, #8]
800209c: 781b ldrb r3, [r3, #0]
800209e: 009b lsls r3, r3, #2
80020a0: 4413 add r3, r2
80020a2: 881b ldrh r3, [r3, #0]
80020a4: b29b uxth r3, r3
80020a6: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
80020aa: f023 0340 bic.w r3, r3, #64 ; 0x40
80020ae: 823b strh r3, [r7, #16]
80020b0: 8a3b ldrh r3, [r7, #16]
80020b2: f083 0310 eor.w r3, r3, #16
80020b6: 823b strh r3, [r7, #16]
80020b8: 8a3b ldrh r3, [r7, #16]
80020ba: f083 0320 eor.w r3, r3, #32
80020be: 823b strh r3, [r7, #16]
80020c0: 68fb ldr r3, [r7, #12]
80020c2: 681b ldr r3, [r3, #0]
80020c4: 461a mov r2, r3
80020c6: 68bb ldr r3, [r7, #8]
80020c8: 781b ldrb r3, [r3, #0]
80020ca: 009b lsls r3, r3, #2
80020cc: 441a add r2, r3
80020ce: 8a3b ldrh r3, [r7, #16]
80020d0: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
80020d4: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
80020d8: f443 4300 orr.w r3, r3, #32768 ; 0x8000
80020dc: f043 0380 orr.w r3, r3, #128 ; 0x80
80020e0: b29b uxth r3, r3
80020e2: 8013 strh r3, [r2, #0]
return HAL_OK;
80020e4: 2300 movs r3, #0
}
80020e6: 4618 mov r0, r3
80020e8: 3748 adds r7, #72 ; 0x48
80020ea: 46bd mov sp, r7
80020ec: bd80 pop {r7, pc}
080020ee <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)
{
80020ee: b480 push {r7}
80020f0: b087 sub sp, #28
80020f2: af00 add r7, sp, #0
80020f4: 60f8 str r0, [r7, #12]
80020f6: 607b str r3, [r7, #4]
80020f8: 460b mov r3, r1
80020fa: 817b strh r3, [r7, #10]
80020fc: 4613 mov r3, r2
80020fe: 813b strh r3, [r7, #8]
PCD_EPTypeDef *ep;
/* initialize ep structure*/
if ((0x80U & ep_addr) == 0x80U)
8002100: 897b ldrh r3, [r7, #10]
8002102: f003 0380 and.w r3, r3, #128 ; 0x80
8002106: b29b uxth r3, r3
8002108: 2b00 cmp r3, #0
800210a: d00b beq.n 8002124 <HAL_PCDEx_PMAConfig+0x36>
{
ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK];
800210c: 897b ldrh r3, [r7, #10]
800210e: f003 0307 and.w r3, r3, #7
8002112: 1c5a adds r2, r3, #1
8002114: 4613 mov r3, r2
8002116: 009b lsls r3, r3, #2
8002118: 4413 add r3, r2
800211a: 00db lsls r3, r3, #3
800211c: 68fa ldr r2, [r7, #12]
800211e: 4413 add r3, r2
8002120: 617b str r3, [r7, #20]
8002122: e009 b.n 8002138 <HAL_PCDEx_PMAConfig+0x4a>
}
else
{
ep = &hpcd->OUT_ep[ep_addr];
8002124: 897a ldrh r2, [r7, #10]
8002126: 4613 mov r3, r2
8002128: 009b lsls r3, r3, #2
800212a: 4413 add r3, r2
800212c: 00db lsls r3, r3, #3
800212e: f503 73b4 add.w r3, r3, #360 ; 0x168
8002132: 68fa ldr r2, [r7, #12]
8002134: 4413 add r3, r2
8002136: 617b str r3, [r7, #20]
}
/* Here we check if the endpoint is single or double Buffer*/
if (ep_kind == PCD_SNG_BUF)
8002138: 893b ldrh r3, [r7, #8]
800213a: 2b00 cmp r3, #0
800213c: d107 bne.n 800214e <HAL_PCDEx_PMAConfig+0x60>
{
/* Single Buffer */
ep->doublebuffer = 0U;
800213e: 697b ldr r3, [r7, #20]
8002140: 2200 movs r2, #0
8002142: 731a strb r2, [r3, #12]
/* Configure the PMA */
ep->pmaadress = (uint16_t)pmaadress;
8002144: 687b ldr r3, [r7, #4]
8002146: b29a uxth r2, r3
8002148: 697b ldr r3, [r7, #20]
800214a: 80da strh r2, [r3, #6]
800214c: e00b b.n 8002166 <HAL_PCDEx_PMAConfig+0x78>
}
else /* USB_DBL_BUF */
{
/* Double Buffer Endpoint */
ep->doublebuffer = 1U;
800214e: 697b ldr r3, [r7, #20]
8002150: 2201 movs r2, #1
8002152: 731a strb r2, [r3, #12]
/* Configure the PMA */
ep->pmaaddr0 = (uint16_t)(pmaadress & 0xFFFFU);
8002154: 687b ldr r3, [r7, #4]
8002156: b29a uxth r2, r3
8002158: 697b ldr r3, [r7, #20]
800215a: 811a strh r2, [r3, #8]
ep->pmaaddr1 = (uint16_t)((pmaadress & 0xFFFF0000U) >> 16);
800215c: 687b ldr r3, [r7, #4]
800215e: 0c1b lsrs r3, r3, #16
8002160: b29a uxth r2, r3
8002162: 697b ldr r3, [r7, #20]
8002164: 815a strh r2, [r3, #10]
}
return HAL_OK;
8002166: 2300 movs r3, #0
}
8002168: 4618 mov r0, r3
800216a: 371c adds r7, #28
800216c: 46bd mov sp, r7
800216e: bc80 pop {r7}
8002170: 4770 bx lr
...
08002174 <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)
{
8002174: b580 push {r7, lr}
8002176: b086 sub sp, #24
8002178: af00 add r7, sp, #0
800217a: 6078 str r0, [r7, #4]
uint32_t tickstart;
uint32_t pll_config;
/* Check Null pointer */
if (RCC_OscInitStruct == NULL)
800217c: 687b ldr r3, [r7, #4]
800217e: 2b00 cmp r3, #0
8002180: d101 bne.n 8002186 <HAL_RCC_OscConfig+0x12>
{
return HAL_ERROR;
8002182: 2301 movs r3, #1
8002184: e26c b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
/* Check the parameters */
assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType));
/*------------------------------- HSE Configuration ------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE)
8002186: 687b ldr r3, [r7, #4]
8002188: 681b ldr r3, [r3, #0]
800218a: f003 0301 and.w r3, r3, #1
800218e: 2b00 cmp r3, #0
8002190: f000 8087 beq.w 80022a2 <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)
8002194: 4b92 ldr r3, [pc, #584] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
8002196: 685b ldr r3, [r3, #4]
8002198: f003 030c and.w r3, r3, #12
800219c: 2b04 cmp r3, #4
800219e: d00c beq.n 80021ba <HAL_RCC_OscConfig+0x46>
|| ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (__HAL_RCC_GET_PLL_OSCSOURCE() == RCC_PLLSOURCE_HSE)))
80021a0: 4b8f ldr r3, [pc, #572] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
80021a2: 685b ldr r3, [r3, #4]
80021a4: f003 030c and.w r3, r3, #12
80021a8: 2b08 cmp r3, #8
80021aa: d112 bne.n 80021d2 <HAL_RCC_OscConfig+0x5e>
80021ac: 4b8c ldr r3, [pc, #560] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
80021ae: 685b ldr r3, [r3, #4]
80021b0: f403 3380 and.w r3, r3, #65536 ; 0x10000
80021b4: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
80021b8: d10b bne.n 80021d2 <HAL_RCC_OscConfig+0x5e>
{
if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
80021ba: 4b89 ldr r3, [pc, #548] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
80021bc: 681b ldr r3, [r3, #0]
80021be: f403 3300 and.w r3, r3, #131072 ; 0x20000
80021c2: 2b00 cmp r3, #0
80021c4: d06c beq.n 80022a0 <HAL_RCC_OscConfig+0x12c>
80021c6: 687b ldr r3, [r7, #4]
80021c8: 685b ldr r3, [r3, #4]
80021ca: 2b00 cmp r3, #0
80021cc: d168 bne.n 80022a0 <HAL_RCC_OscConfig+0x12c>
{
return HAL_ERROR;
80021ce: 2301 movs r3, #1
80021d0: e246 b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
}
}
else
{
/* Set the new HSE configuration ---------------------------------------*/
__HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
80021d2: 687b ldr r3, [r7, #4]
80021d4: 685b ldr r3, [r3, #4]
80021d6: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
80021da: d106 bne.n 80021ea <HAL_RCC_OscConfig+0x76>
80021dc: 4b80 ldr r3, [pc, #512] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
80021de: 681b ldr r3, [r3, #0]
80021e0: 4a7f ldr r2, [pc, #508] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
80021e2: f443 3380 orr.w r3, r3, #65536 ; 0x10000
80021e6: 6013 str r3, [r2, #0]
80021e8: e02e b.n 8002248 <HAL_RCC_OscConfig+0xd4>
80021ea: 687b ldr r3, [r7, #4]
80021ec: 685b ldr r3, [r3, #4]
80021ee: 2b00 cmp r3, #0
80021f0: d10c bne.n 800220c <HAL_RCC_OscConfig+0x98>
80021f2: 4b7b ldr r3, [pc, #492] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
80021f4: 681b ldr r3, [r3, #0]
80021f6: 4a7a ldr r2, [pc, #488] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
80021f8: f423 3380 bic.w r3, r3, #65536 ; 0x10000
80021fc: 6013 str r3, [r2, #0]
80021fe: 4b78 ldr r3, [pc, #480] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
8002200: 681b ldr r3, [r3, #0]
8002202: 4a77 ldr r2, [pc, #476] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
8002204: f423 2380 bic.w r3, r3, #262144 ; 0x40000
8002208: 6013 str r3, [r2, #0]
800220a: e01d b.n 8002248 <HAL_RCC_OscConfig+0xd4>
800220c: 687b ldr r3, [r7, #4]
800220e: 685b ldr r3, [r3, #4]
8002210: f5b3 2fa0 cmp.w r3, #327680 ; 0x50000
8002214: d10c bne.n 8002230 <HAL_RCC_OscConfig+0xbc>
8002216: 4b72 ldr r3, [pc, #456] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
8002218: 681b ldr r3, [r3, #0]
800221a: 4a71 ldr r2, [pc, #452] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
800221c: f443 2380 orr.w r3, r3, #262144 ; 0x40000
8002220: 6013 str r3, [r2, #0]
8002222: 4b6f ldr r3, [pc, #444] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
8002224: 681b ldr r3, [r3, #0]
8002226: 4a6e ldr r2, [pc, #440] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
8002228: f443 3380 orr.w r3, r3, #65536 ; 0x10000
800222c: 6013 str r3, [r2, #0]
800222e: e00b b.n 8002248 <HAL_RCC_OscConfig+0xd4>
8002230: 4b6b ldr r3, [pc, #428] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
8002232: 681b ldr r3, [r3, #0]
8002234: 4a6a ldr r2, [pc, #424] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
8002236: f423 3380 bic.w r3, r3, #65536 ; 0x10000
800223a: 6013 str r3, [r2, #0]
800223c: 4b68 ldr r3, [pc, #416] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
800223e: 681b ldr r3, [r3, #0]
8002240: 4a67 ldr r2, [pc, #412] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
8002242: f423 2380 bic.w r3, r3, #262144 ; 0x40000
8002246: 6013 str r3, [r2, #0]
/* Check the HSE State */
if (RCC_OscInitStruct->HSEState != RCC_HSE_OFF)
8002248: 687b ldr r3, [r7, #4]
800224a: 685b ldr r3, [r3, #4]
800224c: 2b00 cmp r3, #0
800224e: d013 beq.n 8002278 <HAL_RCC_OscConfig+0x104>
{
/* Get Start Tick */
tickstart = HAL_GetTick();
8002250: f7fe f960 bl 8000514 <HAL_GetTick>
8002254: 6138 str r0, [r7, #16]
/* Wait till HSE is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
8002256: e008 b.n 800226a <HAL_RCC_OscConfig+0xf6>
{
if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
8002258: f7fe f95c bl 8000514 <HAL_GetTick>
800225c: 4602 mov r2, r0
800225e: 693b ldr r3, [r7, #16]
8002260: 1ad3 subs r3, r2, r3
8002262: 2b64 cmp r3, #100 ; 0x64
8002264: d901 bls.n 800226a <HAL_RCC_OscConfig+0xf6>
{
return HAL_TIMEOUT;
8002266: 2303 movs r3, #3
8002268: e1fa b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
800226a: 4b5d ldr r3, [pc, #372] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
800226c: 681b ldr r3, [r3, #0]
800226e: f403 3300 and.w r3, r3, #131072 ; 0x20000
8002272: 2b00 cmp r3, #0
8002274: d0f0 beq.n 8002258 <HAL_RCC_OscConfig+0xe4>
8002276: e014 b.n 80022a2 <HAL_RCC_OscConfig+0x12e>
}
}
else
{
/* Get Start Tick */
tickstart = HAL_GetTick();
8002278: f7fe f94c bl 8000514 <HAL_GetTick>
800227c: 6138 str r0, [r7, #16]
/* Wait till HSE is disabled */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
800227e: e008 b.n 8002292 <HAL_RCC_OscConfig+0x11e>
{
if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
8002280: f7fe f948 bl 8000514 <HAL_GetTick>
8002284: 4602 mov r2, r0
8002286: 693b ldr r3, [r7, #16]
8002288: 1ad3 subs r3, r2, r3
800228a: 2b64 cmp r3, #100 ; 0x64
800228c: d901 bls.n 8002292 <HAL_RCC_OscConfig+0x11e>
{
return HAL_TIMEOUT;
800228e: 2303 movs r3, #3
8002290: e1e6 b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
8002292: 4b53 ldr r3, [pc, #332] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
8002294: 681b ldr r3, [r3, #0]
8002296: f403 3300 and.w r3, r3, #131072 ; 0x20000
800229a: 2b00 cmp r3, #0
800229c: d1f0 bne.n 8002280 <HAL_RCC_OscConfig+0x10c>
800229e: e000 b.n 80022a2 <HAL_RCC_OscConfig+0x12e>
if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
80022a0: bf00 nop
}
}
}
}
/*----------------------------- HSI Configuration --------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
80022a2: 687b ldr r3, [r7, #4]
80022a4: 681b ldr r3, [r3, #0]
80022a6: f003 0302 and.w r3, r3, #2
80022aa: 2b00 cmp r3, #0
80022ac: d063 beq.n 8002376 <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)
80022ae: 4b4c ldr r3, [pc, #304] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
80022b0: 685b ldr r3, [r3, #4]
80022b2: f003 030c and.w r3, r3, #12
80022b6: 2b00 cmp r3, #0
80022b8: d00b beq.n 80022d2 <HAL_RCC_OscConfig+0x15e>
|| ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (__HAL_RCC_GET_PLL_OSCSOURCE() == RCC_PLLSOURCE_HSI_DIV2)))
80022ba: 4b49 ldr r3, [pc, #292] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
80022bc: 685b ldr r3, [r3, #4]
80022be: f003 030c and.w r3, r3, #12
80022c2: 2b08 cmp r3, #8
80022c4: d11c bne.n 8002300 <HAL_RCC_OscConfig+0x18c>
80022c6: 4b46 ldr r3, [pc, #280] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
80022c8: 685b ldr r3, [r3, #4]
80022ca: f403 3380 and.w r3, r3, #65536 ; 0x10000
80022ce: 2b00 cmp r3, #0
80022d0: d116 bne.n 8002300 <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))
80022d2: 4b43 ldr r3, [pc, #268] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
80022d4: 681b ldr r3, [r3, #0]
80022d6: f003 0302 and.w r3, r3, #2
80022da: 2b00 cmp r3, #0
80022dc: d005 beq.n 80022ea <HAL_RCC_OscConfig+0x176>
80022de: 687b ldr r3, [r7, #4]
80022e0: 691b ldr r3, [r3, #16]
80022e2: 2b01 cmp r3, #1
80022e4: d001 beq.n 80022ea <HAL_RCC_OscConfig+0x176>
{
return HAL_ERROR;
80022e6: 2301 movs r3, #1
80022e8: e1ba b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
}
/* Otherwise, just the calibration is allowed */
else
{
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
80022ea: 4b3d ldr r3, [pc, #244] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
80022ec: 681b ldr r3, [r3, #0]
80022ee: f023 02f8 bic.w r2, r3, #248 ; 0xf8
80022f2: 687b ldr r3, [r7, #4]
80022f4: 695b ldr r3, [r3, #20]
80022f6: 00db lsls r3, r3, #3
80022f8: 4939 ldr r1, [pc, #228] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
80022fa: 4313 orrs r3, r2
80022fc: 600b str r3, [r1, #0]
if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
80022fe: e03a b.n 8002376 <HAL_RCC_OscConfig+0x202>
}
}
else
{
/* Check the HSI State */
if (RCC_OscInitStruct->HSIState != RCC_HSI_OFF)
8002300: 687b ldr r3, [r7, #4]
8002302: 691b ldr r3, [r3, #16]
8002304: 2b00 cmp r3, #0
8002306: d020 beq.n 800234a <HAL_RCC_OscConfig+0x1d6>
{
/* Enable the Internal High Speed oscillator (HSI). */
__HAL_RCC_HSI_ENABLE();
8002308: 4b36 ldr r3, [pc, #216] ; (80023e4 <HAL_RCC_OscConfig+0x270>)
800230a: 2201 movs r2, #1
800230c: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
800230e: f7fe f901 bl 8000514 <HAL_GetTick>
8002312: 6138 str r0, [r7, #16]
/* Wait till HSI is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
8002314: e008 b.n 8002328 <HAL_RCC_OscConfig+0x1b4>
{
if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
8002316: f7fe f8fd bl 8000514 <HAL_GetTick>
800231a: 4602 mov r2, r0
800231c: 693b ldr r3, [r7, #16]
800231e: 1ad3 subs r3, r2, r3
8002320: 2b02 cmp r3, #2
8002322: d901 bls.n 8002328 <HAL_RCC_OscConfig+0x1b4>
{
return HAL_TIMEOUT;
8002324: 2303 movs r3, #3
8002326: e19b b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
8002328: 4b2d ldr r3, [pc, #180] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
800232a: 681b ldr r3, [r3, #0]
800232c: f003 0302 and.w r3, r3, #2
8002330: 2b00 cmp r3, #0
8002332: d0f0 beq.n 8002316 <HAL_RCC_OscConfig+0x1a2>
}
}
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
8002334: 4b2a ldr r3, [pc, #168] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
8002336: 681b ldr r3, [r3, #0]
8002338: f023 02f8 bic.w r2, r3, #248 ; 0xf8
800233c: 687b ldr r3, [r7, #4]
800233e: 695b ldr r3, [r3, #20]
8002340: 00db lsls r3, r3, #3
8002342: 4927 ldr r1, [pc, #156] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
8002344: 4313 orrs r3, r2
8002346: 600b str r3, [r1, #0]
8002348: e015 b.n 8002376 <HAL_RCC_OscConfig+0x202>
}
else
{
/* Disable the Internal High Speed oscillator (HSI). */
__HAL_RCC_HSI_DISABLE();
800234a: 4b26 ldr r3, [pc, #152] ; (80023e4 <HAL_RCC_OscConfig+0x270>)
800234c: 2200 movs r2, #0
800234e: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8002350: f7fe f8e0 bl 8000514 <HAL_GetTick>
8002354: 6138 str r0, [r7, #16]
/* Wait till HSI is disabled */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
8002356: e008 b.n 800236a <HAL_RCC_OscConfig+0x1f6>
{
if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
8002358: f7fe f8dc bl 8000514 <HAL_GetTick>
800235c: 4602 mov r2, r0
800235e: 693b ldr r3, [r7, #16]
8002360: 1ad3 subs r3, r2, r3
8002362: 2b02 cmp r3, #2
8002364: d901 bls.n 800236a <HAL_RCC_OscConfig+0x1f6>
{
return HAL_TIMEOUT;
8002366: 2303 movs r3, #3
8002368: e17a b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
800236a: 4b1d ldr r3, [pc, #116] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
800236c: 681b ldr r3, [r3, #0]
800236e: f003 0302 and.w r3, r3, #2
8002372: 2b00 cmp r3, #0
8002374: d1f0 bne.n 8002358 <HAL_RCC_OscConfig+0x1e4>
}
}
}
}
/*------------------------------ LSI Configuration -------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
8002376: 687b ldr r3, [r7, #4]
8002378: 681b ldr r3, [r3, #0]
800237a: f003 0308 and.w r3, r3, #8
800237e: 2b00 cmp r3, #0
8002380: d03a beq.n 80023f8 <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)
8002382: 687b ldr r3, [r7, #4]
8002384: 699b ldr r3, [r3, #24]
8002386: 2b00 cmp r3, #0
8002388: d019 beq.n 80023be <HAL_RCC_OscConfig+0x24a>
{
/* Enable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_ENABLE();
800238a: 4b17 ldr r3, [pc, #92] ; (80023e8 <HAL_RCC_OscConfig+0x274>)
800238c: 2201 movs r2, #1
800238e: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8002390: f7fe f8c0 bl 8000514 <HAL_GetTick>
8002394: 6138 str r0, [r7, #16]
/* Wait till LSI is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
8002396: e008 b.n 80023aa <HAL_RCC_OscConfig+0x236>
{
if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
8002398: f7fe f8bc bl 8000514 <HAL_GetTick>
800239c: 4602 mov r2, r0
800239e: 693b ldr r3, [r7, #16]
80023a0: 1ad3 subs r3, r2, r3
80023a2: 2b02 cmp r3, #2
80023a4: d901 bls.n 80023aa <HAL_RCC_OscConfig+0x236>
{
return HAL_TIMEOUT;
80023a6: 2303 movs r3, #3
80023a8: e15a b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
80023aa: 4b0d ldr r3, [pc, #52] ; (80023e0 <HAL_RCC_OscConfig+0x26c>)
80023ac: 6a5b ldr r3, [r3, #36] ; 0x24
80023ae: f003 0302 and.w r3, r3, #2
80023b2: 2b00 cmp r3, #0
80023b4: d0f0 beq.n 8002398 <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);
80023b6: 2001 movs r0, #1
80023b8: f000 faa8 bl 800290c <RCC_Delay>
80023bc: e01c b.n 80023f8 <HAL_RCC_OscConfig+0x284>
}
else
{
/* Disable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_DISABLE();
80023be: 4b0a ldr r3, [pc, #40] ; (80023e8 <HAL_RCC_OscConfig+0x274>)
80023c0: 2200 movs r2, #0
80023c2: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
80023c4: f7fe f8a6 bl 8000514 <HAL_GetTick>
80023c8: 6138 str r0, [r7, #16]
/* Wait till LSI is disabled */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
80023ca: e00f b.n 80023ec <HAL_RCC_OscConfig+0x278>
{
if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
80023cc: f7fe f8a2 bl 8000514 <HAL_GetTick>
80023d0: 4602 mov r2, r0
80023d2: 693b ldr r3, [r7, #16]
80023d4: 1ad3 subs r3, r2, r3
80023d6: 2b02 cmp r3, #2
80023d8: d908 bls.n 80023ec <HAL_RCC_OscConfig+0x278>
{
return HAL_TIMEOUT;
80023da: 2303 movs r3, #3
80023dc: e140 b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
80023de: bf00 nop
80023e0: 40021000 .word 0x40021000
80023e4: 42420000 .word 0x42420000
80023e8: 42420480 .word 0x42420480
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
80023ec: 4b9e ldr r3, [pc, #632] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
80023ee: 6a5b ldr r3, [r3, #36] ; 0x24
80023f0: f003 0302 and.w r3, r3, #2
80023f4: 2b00 cmp r3, #0
80023f6: d1e9 bne.n 80023cc <HAL_RCC_OscConfig+0x258>
}
}
}
}
/*------------------------------ LSE Configuration -------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
80023f8: 687b ldr r3, [r7, #4]
80023fa: 681b ldr r3, [r3, #0]
80023fc: f003 0304 and.w r3, r3, #4
8002400: 2b00 cmp r3, #0
8002402: f000 80a6 beq.w 8002552 <HAL_RCC_OscConfig+0x3de>
{
FlagStatus pwrclkchanged = RESET;
8002406: 2300 movs r3, #0
8002408: 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())
800240a: 4b97 ldr r3, [pc, #604] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
800240c: 69db ldr r3, [r3, #28]
800240e: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8002412: 2b00 cmp r3, #0
8002414: d10d bne.n 8002432 <HAL_RCC_OscConfig+0x2be>
{
__HAL_RCC_PWR_CLK_ENABLE();
8002416: 4b94 ldr r3, [pc, #592] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
8002418: 69db ldr r3, [r3, #28]
800241a: 4a93 ldr r2, [pc, #588] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
800241c: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8002420: 61d3 str r3, [r2, #28]
8002422: 4b91 ldr r3, [pc, #580] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
8002424: 69db ldr r3, [r3, #28]
8002426: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
800242a: 60bb str r3, [r7, #8]
800242c: 68bb ldr r3, [r7, #8]
pwrclkchanged = SET;
800242e: 2301 movs r3, #1
8002430: 75fb strb r3, [r7, #23]
}
if (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
8002432: 4b8e ldr r3, [pc, #568] ; (800266c <HAL_RCC_OscConfig+0x4f8>)
8002434: 681b ldr r3, [r3, #0]
8002436: f403 7380 and.w r3, r3, #256 ; 0x100
800243a: 2b00 cmp r3, #0
800243c: d118 bne.n 8002470 <HAL_RCC_OscConfig+0x2fc>
{
/* Enable write access to Backup domain */
SET_BIT(PWR->CR, PWR_CR_DBP);
800243e: 4b8b ldr r3, [pc, #556] ; (800266c <HAL_RCC_OscConfig+0x4f8>)
8002440: 681b ldr r3, [r3, #0]
8002442: 4a8a ldr r2, [pc, #552] ; (800266c <HAL_RCC_OscConfig+0x4f8>)
8002444: f443 7380 orr.w r3, r3, #256 ; 0x100
8002448: 6013 str r3, [r2, #0]
/* Wait for Backup domain Write protection disable */
tickstart = HAL_GetTick();
800244a: f7fe f863 bl 8000514 <HAL_GetTick>
800244e: 6138 str r0, [r7, #16]
while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
8002450: e008 b.n 8002464 <HAL_RCC_OscConfig+0x2f0>
{
if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
8002452: f7fe f85f bl 8000514 <HAL_GetTick>
8002456: 4602 mov r2, r0
8002458: 693b ldr r3, [r7, #16]
800245a: 1ad3 subs r3, r2, r3
800245c: 2b64 cmp r3, #100 ; 0x64
800245e: d901 bls.n 8002464 <HAL_RCC_OscConfig+0x2f0>
{
return HAL_TIMEOUT;
8002460: 2303 movs r3, #3
8002462: e0fd b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
8002464: 4b81 ldr r3, [pc, #516] ; (800266c <HAL_RCC_OscConfig+0x4f8>)
8002466: 681b ldr r3, [r3, #0]
8002468: f403 7380 and.w r3, r3, #256 ; 0x100
800246c: 2b00 cmp r3, #0
800246e: d0f0 beq.n 8002452 <HAL_RCC_OscConfig+0x2de>
}
}
}
/* Set the new LSE configuration -----------------------------------------*/
__HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
8002470: 687b ldr r3, [r7, #4]
8002472: 68db ldr r3, [r3, #12]
8002474: 2b01 cmp r3, #1
8002476: d106 bne.n 8002486 <HAL_RCC_OscConfig+0x312>
8002478: 4b7b ldr r3, [pc, #492] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
800247a: 6a1b ldr r3, [r3, #32]
800247c: 4a7a ldr r2, [pc, #488] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
800247e: f043 0301 orr.w r3, r3, #1
8002482: 6213 str r3, [r2, #32]
8002484: e02d b.n 80024e2 <HAL_RCC_OscConfig+0x36e>
8002486: 687b ldr r3, [r7, #4]
8002488: 68db ldr r3, [r3, #12]
800248a: 2b00 cmp r3, #0
800248c: d10c bne.n 80024a8 <HAL_RCC_OscConfig+0x334>
800248e: 4b76 ldr r3, [pc, #472] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
8002490: 6a1b ldr r3, [r3, #32]
8002492: 4a75 ldr r2, [pc, #468] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
8002494: f023 0301 bic.w r3, r3, #1
8002498: 6213 str r3, [r2, #32]
800249a: 4b73 ldr r3, [pc, #460] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
800249c: 6a1b ldr r3, [r3, #32]
800249e: 4a72 ldr r2, [pc, #456] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
80024a0: f023 0304 bic.w r3, r3, #4
80024a4: 6213 str r3, [r2, #32]
80024a6: e01c b.n 80024e2 <HAL_RCC_OscConfig+0x36e>
80024a8: 687b ldr r3, [r7, #4]
80024aa: 68db ldr r3, [r3, #12]
80024ac: 2b05 cmp r3, #5
80024ae: d10c bne.n 80024ca <HAL_RCC_OscConfig+0x356>
80024b0: 4b6d ldr r3, [pc, #436] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
80024b2: 6a1b ldr r3, [r3, #32]
80024b4: 4a6c ldr r2, [pc, #432] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
80024b6: f043 0304 orr.w r3, r3, #4
80024ba: 6213 str r3, [r2, #32]
80024bc: 4b6a ldr r3, [pc, #424] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
80024be: 6a1b ldr r3, [r3, #32]
80024c0: 4a69 ldr r2, [pc, #420] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
80024c2: f043 0301 orr.w r3, r3, #1
80024c6: 6213 str r3, [r2, #32]
80024c8: e00b b.n 80024e2 <HAL_RCC_OscConfig+0x36e>
80024ca: 4b67 ldr r3, [pc, #412] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
80024cc: 6a1b ldr r3, [r3, #32]
80024ce: 4a66 ldr r2, [pc, #408] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
80024d0: f023 0301 bic.w r3, r3, #1
80024d4: 6213 str r3, [r2, #32]
80024d6: 4b64 ldr r3, [pc, #400] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
80024d8: 6a1b ldr r3, [r3, #32]
80024da: 4a63 ldr r2, [pc, #396] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
80024dc: f023 0304 bic.w r3, r3, #4
80024e0: 6213 str r3, [r2, #32]
/* Check the LSE State */
if (RCC_OscInitStruct->LSEState != RCC_LSE_OFF)
80024e2: 687b ldr r3, [r7, #4]
80024e4: 68db ldr r3, [r3, #12]
80024e6: 2b00 cmp r3, #0
80024e8: d015 beq.n 8002516 <HAL_RCC_OscConfig+0x3a2>
{
/* Get Start Tick */
tickstart = HAL_GetTick();
80024ea: f7fe f813 bl 8000514 <HAL_GetTick>
80024ee: 6138 str r0, [r7, #16]
/* Wait till LSE is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
80024f0: e00a b.n 8002508 <HAL_RCC_OscConfig+0x394>
{
if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
80024f2: f7fe f80f bl 8000514 <HAL_GetTick>
80024f6: 4602 mov r2, r0
80024f8: 693b ldr r3, [r7, #16]
80024fa: 1ad3 subs r3, r2, r3
80024fc: f241 3288 movw r2, #5000 ; 0x1388
8002500: 4293 cmp r3, r2
8002502: d901 bls.n 8002508 <HAL_RCC_OscConfig+0x394>
{
return HAL_TIMEOUT;
8002504: 2303 movs r3, #3
8002506: e0ab b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
8002508: 4b57 ldr r3, [pc, #348] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
800250a: 6a1b ldr r3, [r3, #32]
800250c: f003 0302 and.w r3, r3, #2
8002510: 2b00 cmp r3, #0
8002512: d0ee beq.n 80024f2 <HAL_RCC_OscConfig+0x37e>
8002514: e014 b.n 8002540 <HAL_RCC_OscConfig+0x3cc>
}
}
else
{
/* Get Start Tick */
tickstart = HAL_GetTick();
8002516: f7fd fffd bl 8000514 <HAL_GetTick>
800251a: 6138 str r0, [r7, #16]
/* Wait till LSE is disabled */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
800251c: e00a b.n 8002534 <HAL_RCC_OscConfig+0x3c0>
{
if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
800251e: f7fd fff9 bl 8000514 <HAL_GetTick>
8002522: 4602 mov r2, r0
8002524: 693b ldr r3, [r7, #16]
8002526: 1ad3 subs r3, r2, r3
8002528: f241 3288 movw r2, #5000 ; 0x1388
800252c: 4293 cmp r3, r2
800252e: d901 bls.n 8002534 <HAL_RCC_OscConfig+0x3c0>
{
return HAL_TIMEOUT;
8002530: 2303 movs r3, #3
8002532: e095 b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
8002534: 4b4c ldr r3, [pc, #304] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
8002536: 6a1b ldr r3, [r3, #32]
8002538: f003 0302 and.w r3, r3, #2
800253c: 2b00 cmp r3, #0
800253e: d1ee bne.n 800251e <HAL_RCC_OscConfig+0x3aa>
}
}
}
/* Require to disable power clock if necessary */
if (pwrclkchanged == SET)
8002540: 7dfb ldrb r3, [r7, #23]
8002542: 2b01 cmp r3, #1
8002544: d105 bne.n 8002552 <HAL_RCC_OscConfig+0x3de>
{
__HAL_RCC_PWR_CLK_DISABLE();
8002546: 4b48 ldr r3, [pc, #288] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
8002548: 69db ldr r3, [r3, #28]
800254a: 4a47 ldr r2, [pc, #284] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
800254c: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000
8002550: 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)
8002552: 687b ldr r3, [r7, #4]
8002554: 69db ldr r3, [r3, #28]
8002556: 2b00 cmp r3, #0
8002558: f000 8081 beq.w 800265e <HAL_RCC_OscConfig+0x4ea>
{
/* Check if the PLL is used as system clock or not */
if (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_PLLCLK)
800255c: 4b42 ldr r3, [pc, #264] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
800255e: 685b ldr r3, [r3, #4]
8002560: f003 030c and.w r3, r3, #12
8002564: 2b08 cmp r3, #8
8002566: d061 beq.n 800262c <HAL_RCC_OscConfig+0x4b8>
{
if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON)
8002568: 687b ldr r3, [r7, #4]
800256a: 69db ldr r3, [r3, #28]
800256c: 2b02 cmp r3, #2
800256e: d146 bne.n 80025fe <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();
8002570: 4b3f ldr r3, [pc, #252] ; (8002670 <HAL_RCC_OscConfig+0x4fc>)
8002572: 2200 movs r2, #0
8002574: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8002576: f7fd ffcd bl 8000514 <HAL_GetTick>
800257a: 6138 str r0, [r7, #16]
/* Wait till PLL is disabled */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
800257c: e008 b.n 8002590 <HAL_RCC_OscConfig+0x41c>
{
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
800257e: f7fd ffc9 bl 8000514 <HAL_GetTick>
8002582: 4602 mov r2, r0
8002584: 693b ldr r3, [r7, #16]
8002586: 1ad3 subs r3, r2, r3
8002588: 2b02 cmp r3, #2
800258a: d901 bls.n 8002590 <HAL_RCC_OscConfig+0x41c>
{
return HAL_TIMEOUT;
800258c: 2303 movs r3, #3
800258e: e067 b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
8002590: 4b35 ldr r3, [pc, #212] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
8002592: 681b ldr r3, [r3, #0]
8002594: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
8002598: 2b00 cmp r3, #0
800259a: d1f0 bne.n 800257e <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)
800259c: 687b ldr r3, [r7, #4]
800259e: 6a1b ldr r3, [r3, #32]
80025a0: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
80025a4: d108 bne.n 80025b8 <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);
80025a6: 4b30 ldr r3, [pc, #192] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
80025a8: 685b ldr r3, [r3, #4]
80025aa: f423 3200 bic.w r2, r3, #131072 ; 0x20000
80025ae: 687b ldr r3, [r7, #4]
80025b0: 689b ldr r3, [r3, #8]
80025b2: 492d ldr r1, [pc, #180] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
80025b4: 4313 orrs r3, r2
80025b6: 604b str r3, [r1, #4]
}
/* Configure the main PLL clock source and multiplication factors. */
__HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource,
80025b8: 4b2b ldr r3, [pc, #172] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
80025ba: 685b ldr r3, [r3, #4]
80025bc: f423 1274 bic.w r2, r3, #3997696 ; 0x3d0000
80025c0: 687b ldr r3, [r7, #4]
80025c2: 6a19 ldr r1, [r3, #32]
80025c4: 687b ldr r3, [r7, #4]
80025c6: 6a5b ldr r3, [r3, #36] ; 0x24
80025c8: 430b orrs r3, r1
80025ca: 4927 ldr r1, [pc, #156] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
80025cc: 4313 orrs r3, r2
80025ce: 604b str r3, [r1, #4]
RCC_OscInitStruct->PLL.PLLMUL);
/* Enable the main PLL. */
__HAL_RCC_PLL_ENABLE();
80025d0: 4b27 ldr r3, [pc, #156] ; (8002670 <HAL_RCC_OscConfig+0x4fc>)
80025d2: 2201 movs r2, #1
80025d4: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
80025d6: f7fd ff9d bl 8000514 <HAL_GetTick>
80025da: 6138 str r0, [r7, #16]
/* Wait till PLL is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
80025dc: e008 b.n 80025f0 <HAL_RCC_OscConfig+0x47c>
{
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
80025de: f7fd ff99 bl 8000514 <HAL_GetTick>
80025e2: 4602 mov r2, r0
80025e4: 693b ldr r3, [r7, #16]
80025e6: 1ad3 subs r3, r2, r3
80025e8: 2b02 cmp r3, #2
80025ea: d901 bls.n 80025f0 <HAL_RCC_OscConfig+0x47c>
{
return HAL_TIMEOUT;
80025ec: 2303 movs r3, #3
80025ee: e037 b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
80025f0: 4b1d ldr r3, [pc, #116] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
80025f2: 681b ldr r3, [r3, #0]
80025f4: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
80025f8: 2b00 cmp r3, #0
80025fa: d0f0 beq.n 80025de <HAL_RCC_OscConfig+0x46a>
80025fc: e02f b.n 800265e <HAL_RCC_OscConfig+0x4ea>
}
}
else
{
/* Disable the main PLL. */
__HAL_RCC_PLL_DISABLE();
80025fe: 4b1c ldr r3, [pc, #112] ; (8002670 <HAL_RCC_OscConfig+0x4fc>)
8002600: 2200 movs r2, #0
8002602: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8002604: f7fd ff86 bl 8000514 <HAL_GetTick>
8002608: 6138 str r0, [r7, #16]
/* Wait till PLL is disabled */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
800260a: e008 b.n 800261e <HAL_RCC_OscConfig+0x4aa>
{
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
800260c: f7fd ff82 bl 8000514 <HAL_GetTick>
8002610: 4602 mov r2, r0
8002612: 693b ldr r3, [r7, #16]
8002614: 1ad3 subs r3, r2, r3
8002616: 2b02 cmp r3, #2
8002618: d901 bls.n 800261e <HAL_RCC_OscConfig+0x4aa>
{
return HAL_TIMEOUT;
800261a: 2303 movs r3, #3
800261c: e020 b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
800261e: 4b12 ldr r3, [pc, #72] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
8002620: 681b ldr r3, [r3, #0]
8002622: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
8002626: 2b00 cmp r3, #0
8002628: d1f0 bne.n 800260c <HAL_RCC_OscConfig+0x498>
800262a: e018 b.n 800265e <HAL_RCC_OscConfig+0x4ea>
}
}
else
{
/* Check if there is a request to disable the PLL used as System clock source */
if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF)
800262c: 687b ldr r3, [r7, #4]
800262e: 69db ldr r3, [r3, #28]
8002630: 2b01 cmp r3, #1
8002632: d101 bne.n 8002638 <HAL_RCC_OscConfig+0x4c4>
{
return HAL_ERROR;
8002634: 2301 movs r3, #1
8002636: e013 b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
}
else
{
/* Do not return HAL_ERROR if request repeats the current configuration */
pll_config = RCC->CFGR;
8002638: 4b0b ldr r3, [pc, #44] ; (8002668 <HAL_RCC_OscConfig+0x4f4>)
800263a: 685b ldr r3, [r3, #4]
800263c: 60fb str r3, [r7, #12]
if ((READ_BIT(pll_config, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
800263e: 68fb ldr r3, [r7, #12]
8002640: f403 3280 and.w r2, r3, #65536 ; 0x10000
8002644: 687b ldr r3, [r7, #4]
8002646: 6a1b ldr r3, [r3, #32]
8002648: 429a cmp r2, r3
800264a: d106 bne.n 800265a <HAL_RCC_OscConfig+0x4e6>
(READ_BIT(pll_config, RCC_CFGR_PLLMULL) != RCC_OscInitStruct->PLL.PLLMUL))
800264c: 68fb ldr r3, [r7, #12]
800264e: f403 1270 and.w r2, r3, #3932160 ; 0x3c0000
8002652: 687b ldr r3, [r7, #4]
8002654: 6a5b ldr r3, [r3, #36] ; 0x24
if ((READ_BIT(pll_config, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
8002656: 429a cmp r2, r3
8002658: d001 beq.n 800265e <HAL_RCC_OscConfig+0x4ea>
{
return HAL_ERROR;
800265a: 2301 movs r3, #1
800265c: e000 b.n 8002660 <HAL_RCC_OscConfig+0x4ec>
}
}
}
}
return HAL_OK;
800265e: 2300 movs r3, #0
}
8002660: 4618 mov r0, r3
8002662: 3718 adds r7, #24
8002664: 46bd mov sp, r7
8002666: bd80 pop {r7, pc}
8002668: 40021000 .word 0x40021000
800266c: 40007000 .word 0x40007000
8002670: 42420060 .word 0x42420060
08002674 <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)
{
8002674: b580 push {r7, lr}
8002676: b084 sub sp, #16
8002678: af00 add r7, sp, #0
800267a: 6078 str r0, [r7, #4]
800267c: 6039 str r1, [r7, #0]
uint32_t tickstart;
/* Check Null pointer */
if (RCC_ClkInitStruct == NULL)
800267e: 687b ldr r3, [r7, #4]
8002680: 2b00 cmp r3, #0
8002682: d101 bne.n 8002688 <HAL_RCC_ClockConfig+0x14>
{
return HAL_ERROR;
8002684: 2301 movs r3, #1
8002686: e0d0 b.n 800282a <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())
8002688: 4b6a ldr r3, [pc, #424] ; (8002834 <HAL_RCC_ClockConfig+0x1c0>)
800268a: 681b ldr r3, [r3, #0]
800268c: f003 0307 and.w r3, r3, #7
8002690: 683a ldr r2, [r7, #0]
8002692: 429a cmp r2, r3
8002694: d910 bls.n 80026b8 <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);
8002696: 4b67 ldr r3, [pc, #412] ; (8002834 <HAL_RCC_ClockConfig+0x1c0>)
8002698: 681b ldr r3, [r3, #0]
800269a: f023 0207 bic.w r2, r3, #7
800269e: 4965 ldr r1, [pc, #404] ; (8002834 <HAL_RCC_ClockConfig+0x1c0>)
80026a0: 683b ldr r3, [r7, #0]
80026a2: 4313 orrs r3, r2
80026a4: 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)
80026a6: 4b63 ldr r3, [pc, #396] ; (8002834 <HAL_RCC_ClockConfig+0x1c0>)
80026a8: 681b ldr r3, [r3, #0]
80026aa: f003 0307 and.w r3, r3, #7
80026ae: 683a ldr r2, [r7, #0]
80026b0: 429a cmp r2, r3
80026b2: d001 beq.n 80026b8 <HAL_RCC_ClockConfig+0x44>
{
return HAL_ERROR;
80026b4: 2301 movs r3, #1
80026b6: e0b8 b.n 800282a <HAL_RCC_ClockConfig+0x1b6>
}
}
#endif /* FLASH_ACR_LATENCY */
/*-------------------------- HCLK Configuration --------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
80026b8: 687b ldr r3, [r7, #4]
80026ba: 681b ldr r3, [r3, #0]
80026bc: f003 0302 and.w r3, r3, #2
80026c0: 2b00 cmp r3, #0
80026c2: d020 beq.n 8002706 <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)
80026c4: 687b ldr r3, [r7, #4]
80026c6: 681b ldr r3, [r3, #0]
80026c8: f003 0304 and.w r3, r3, #4
80026cc: 2b00 cmp r3, #0
80026ce: d005 beq.n 80026dc <HAL_RCC_ClockConfig+0x68>
{
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_HCLK_DIV16);
80026d0: 4b59 ldr r3, [pc, #356] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
80026d2: 685b ldr r3, [r3, #4]
80026d4: 4a58 ldr r2, [pc, #352] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
80026d6: f443 63e0 orr.w r3, r3, #1792 ; 0x700
80026da: 6053 str r3, [r2, #4]
}
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
80026dc: 687b ldr r3, [r7, #4]
80026de: 681b ldr r3, [r3, #0]
80026e0: f003 0308 and.w r3, r3, #8
80026e4: 2b00 cmp r3, #0
80026e6: d005 beq.n 80026f4 <HAL_RCC_ClockConfig+0x80>
{
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, (RCC_HCLK_DIV16 << 3));
80026e8: 4b53 ldr r3, [pc, #332] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
80026ea: 685b ldr r3, [r3, #4]
80026ec: 4a52 ldr r2, [pc, #328] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
80026ee: f443 5360 orr.w r3, r3, #14336 ; 0x3800
80026f2: 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);
80026f4: 4b50 ldr r3, [pc, #320] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
80026f6: 685b ldr r3, [r3, #4]
80026f8: f023 02f0 bic.w r2, r3, #240 ; 0xf0
80026fc: 687b ldr r3, [r7, #4]
80026fe: 689b ldr r3, [r3, #8]
8002700: 494d ldr r1, [pc, #308] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
8002702: 4313 orrs r3, r2
8002704: 604b str r3, [r1, #4]
}
/*------------------------- SYSCLK Configuration ---------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
8002706: 687b ldr r3, [r7, #4]
8002708: 681b ldr r3, [r3, #0]
800270a: f003 0301 and.w r3, r3, #1
800270e: 2b00 cmp r3, #0
8002710: d040 beq.n 8002794 <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)
8002712: 687b ldr r3, [r7, #4]
8002714: 685b ldr r3, [r3, #4]
8002716: 2b01 cmp r3, #1
8002718: d107 bne.n 800272a <HAL_RCC_ClockConfig+0xb6>
{
/* Check the HSE ready flag */
if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
800271a: 4b47 ldr r3, [pc, #284] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
800271c: 681b ldr r3, [r3, #0]
800271e: f403 3300 and.w r3, r3, #131072 ; 0x20000
8002722: 2b00 cmp r3, #0
8002724: d115 bne.n 8002752 <HAL_RCC_ClockConfig+0xde>
{
return HAL_ERROR;
8002726: 2301 movs r3, #1
8002728: e07f b.n 800282a <HAL_RCC_ClockConfig+0x1b6>
}
}
/* PLL is selected as System Clock Source */
else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK)
800272a: 687b ldr r3, [r7, #4]
800272c: 685b ldr r3, [r3, #4]
800272e: 2b02 cmp r3, #2
8002730: d107 bne.n 8002742 <HAL_RCC_ClockConfig+0xce>
{
/* Check the PLL ready flag */
if (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
8002732: 4b41 ldr r3, [pc, #260] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
8002734: 681b ldr r3, [r3, #0]
8002736: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
800273a: 2b00 cmp r3, #0
800273c: d109 bne.n 8002752 <HAL_RCC_ClockConfig+0xde>
{
return HAL_ERROR;
800273e: 2301 movs r3, #1
8002740: e073 b.n 800282a <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)
8002742: 4b3d ldr r3, [pc, #244] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
8002744: 681b ldr r3, [r3, #0]
8002746: f003 0302 and.w r3, r3, #2
800274a: 2b00 cmp r3, #0
800274c: d101 bne.n 8002752 <HAL_RCC_ClockConfig+0xde>
{
return HAL_ERROR;
800274e: 2301 movs r3, #1
8002750: e06b b.n 800282a <HAL_RCC_ClockConfig+0x1b6>
}
}
__HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource);
8002752: 4b39 ldr r3, [pc, #228] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
8002754: 685b ldr r3, [r3, #4]
8002756: f023 0203 bic.w r2, r3, #3
800275a: 687b ldr r3, [r7, #4]
800275c: 685b ldr r3, [r3, #4]
800275e: 4936 ldr r1, [pc, #216] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
8002760: 4313 orrs r3, r2
8002762: 604b str r3, [r1, #4]
/* Get Start Tick */
tickstart = HAL_GetTick();
8002764: f7fd fed6 bl 8000514 <HAL_GetTick>
8002768: 60f8 str r0, [r7, #12]
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
800276a: e00a b.n 8002782 <HAL_RCC_ClockConfig+0x10e>
{
if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
800276c: f7fd fed2 bl 8000514 <HAL_GetTick>
8002770: 4602 mov r2, r0
8002772: 68fb ldr r3, [r7, #12]
8002774: 1ad3 subs r3, r2, r3
8002776: f241 3288 movw r2, #5000 ; 0x1388
800277a: 4293 cmp r3, r2
800277c: d901 bls.n 8002782 <HAL_RCC_ClockConfig+0x10e>
{
return HAL_TIMEOUT;
800277e: 2303 movs r3, #3
8002780: e053 b.n 800282a <HAL_RCC_ClockConfig+0x1b6>
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
8002782: 4b2d ldr r3, [pc, #180] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
8002784: 685b ldr r3, [r3, #4]
8002786: f003 020c and.w r2, r3, #12
800278a: 687b ldr r3, [r7, #4]
800278c: 685b ldr r3, [r3, #4]
800278e: 009b lsls r3, r3, #2
8002790: 429a cmp r2, r3
8002792: d1eb bne.n 800276c <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())
8002794: 4b27 ldr r3, [pc, #156] ; (8002834 <HAL_RCC_ClockConfig+0x1c0>)
8002796: 681b ldr r3, [r3, #0]
8002798: f003 0307 and.w r3, r3, #7
800279c: 683a ldr r2, [r7, #0]
800279e: 429a cmp r2, r3
80027a0: d210 bcs.n 80027c4 <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);
80027a2: 4b24 ldr r3, [pc, #144] ; (8002834 <HAL_RCC_ClockConfig+0x1c0>)
80027a4: 681b ldr r3, [r3, #0]
80027a6: f023 0207 bic.w r2, r3, #7
80027aa: 4922 ldr r1, [pc, #136] ; (8002834 <HAL_RCC_ClockConfig+0x1c0>)
80027ac: 683b ldr r3, [r7, #0]
80027ae: 4313 orrs r3, r2
80027b0: 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)
80027b2: 4b20 ldr r3, [pc, #128] ; (8002834 <HAL_RCC_ClockConfig+0x1c0>)
80027b4: 681b ldr r3, [r3, #0]
80027b6: f003 0307 and.w r3, r3, #7
80027ba: 683a ldr r2, [r7, #0]
80027bc: 429a cmp r2, r3
80027be: d001 beq.n 80027c4 <HAL_RCC_ClockConfig+0x150>
{
return HAL_ERROR;
80027c0: 2301 movs r3, #1
80027c2: e032 b.n 800282a <HAL_RCC_ClockConfig+0x1b6>
}
}
#endif /* FLASH_ACR_LATENCY */
/*-------------------------- PCLK1 Configuration ---------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
80027c4: 687b ldr r3, [r7, #4]
80027c6: 681b ldr r3, [r3, #0]
80027c8: f003 0304 and.w r3, r3, #4
80027cc: 2b00 cmp r3, #0
80027ce: d008 beq.n 80027e2 <HAL_RCC_ClockConfig+0x16e>
{
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider);
80027d0: 4b19 ldr r3, [pc, #100] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
80027d2: 685b ldr r3, [r3, #4]
80027d4: f423 62e0 bic.w r2, r3, #1792 ; 0x700
80027d8: 687b ldr r3, [r7, #4]
80027da: 68db ldr r3, [r3, #12]
80027dc: 4916 ldr r1, [pc, #88] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
80027de: 4313 orrs r3, r2
80027e0: 604b str r3, [r1, #4]
}
/*-------------------------- PCLK2 Configuration ---------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
80027e2: 687b ldr r3, [r7, #4]
80027e4: 681b ldr r3, [r3, #0]
80027e6: f003 0308 and.w r3, r3, #8
80027ea: 2b00 cmp r3, #0
80027ec: d009 beq.n 8002802 <HAL_RCC_ClockConfig+0x18e>
{
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3));
80027ee: 4b12 ldr r3, [pc, #72] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
80027f0: 685b ldr r3, [r3, #4]
80027f2: f423 5260 bic.w r2, r3, #14336 ; 0x3800
80027f6: 687b ldr r3, [r7, #4]
80027f8: 691b ldr r3, [r3, #16]
80027fa: 00db lsls r3, r3, #3
80027fc: 490e ldr r1, [pc, #56] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
80027fe: 4313 orrs r3, r2
8002800: 604b str r3, [r1, #4]
}
/* Update the SystemCoreClock global variable */
SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos];
8002802: f000 f821 bl 8002848 <HAL_RCC_GetSysClockFreq>
8002806: 4601 mov r1, r0
8002808: 4b0b ldr r3, [pc, #44] ; (8002838 <HAL_RCC_ClockConfig+0x1c4>)
800280a: 685b ldr r3, [r3, #4]
800280c: 091b lsrs r3, r3, #4
800280e: f003 030f and.w r3, r3, #15
8002812: 4a0a ldr r2, [pc, #40] ; (800283c <HAL_RCC_ClockConfig+0x1c8>)
8002814: 5cd3 ldrb r3, [r2, r3]
8002816: fa21 f303 lsr.w r3, r1, r3
800281a: 4a09 ldr r2, [pc, #36] ; (8002840 <HAL_RCC_ClockConfig+0x1cc>)
800281c: 6013 str r3, [r2, #0]
/* Configure the source of time base considering new system clocks settings*/
HAL_InitTick(uwTickPrio);
800281e: 4b09 ldr r3, [pc, #36] ; (8002844 <HAL_RCC_ClockConfig+0x1d0>)
8002820: 681b ldr r3, [r3, #0]
8002822: 4618 mov r0, r3
8002824: f7fd fe34 bl 8000490 <HAL_InitTick>
return HAL_OK;
8002828: 2300 movs r3, #0
}
800282a: 4618 mov r0, r3
800282c: 3710 adds r7, #16
800282e: 46bd mov sp, r7
8002830: bd80 pop {r7, pc}
8002832: bf00 nop
8002834: 40022000 .word 0x40022000
8002838: 40021000 .word 0x40021000
800283c: 08006cf4 .word 0x08006cf4
8002840: 20000000 .word 0x20000000
8002844: 20000004 .word 0x20000004
08002848 <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)
{
8002848: b490 push {r4, r7}
800284a: b08a sub sp, #40 ; 0x28
800284c: 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};
800284e: 4b2a ldr r3, [pc, #168] ; (80028f8 <HAL_RCC_GetSysClockFreq+0xb0>)
8002850: 1d3c adds r4, r7, #4
8002852: cb0f ldmia r3, {r0, r1, r2, r3}
8002854: 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};
8002858: 4b28 ldr r3, [pc, #160] ; (80028fc <HAL_RCC_GetSysClockFreq+0xb4>)
800285a: 881b ldrh r3, [r3, #0]
800285c: 803b strh r3, [r7, #0]
#endif /*RCC_CFGR2_PREDIV1*/
#endif
uint32_t tmpreg = 0U, prediv = 0U, pllclk = 0U, pllmul = 0U;
800285e: 2300 movs r3, #0
8002860: 61fb str r3, [r7, #28]
8002862: 2300 movs r3, #0
8002864: 61bb str r3, [r7, #24]
8002866: 2300 movs r3, #0
8002868: 627b str r3, [r7, #36] ; 0x24
800286a: 2300 movs r3, #0
800286c: 617b str r3, [r7, #20]
uint32_t sysclockfreq = 0U;
800286e: 2300 movs r3, #0
8002870: 623b str r3, [r7, #32]
#if defined(RCC_CFGR2_PREDIV1SRC)
uint32_t prediv2 = 0U, pll2mul = 0U;
#endif /*RCC_CFGR2_PREDIV1SRC*/
tmpreg = RCC->CFGR;
8002872: 4b23 ldr r3, [pc, #140] ; (8002900 <HAL_RCC_GetSysClockFreq+0xb8>)
8002874: 685b ldr r3, [r3, #4]
8002876: 61fb str r3, [r7, #28]
/* Get SYSCLK source -------------------------------------------------------*/
switch (tmpreg & RCC_CFGR_SWS)
8002878: 69fb ldr r3, [r7, #28]
800287a: f003 030c and.w r3, r3, #12
800287e: 2b04 cmp r3, #4
8002880: d002 beq.n 8002888 <HAL_RCC_GetSysClockFreq+0x40>
8002882: 2b08 cmp r3, #8
8002884: d003 beq.n 800288e <HAL_RCC_GetSysClockFreq+0x46>
8002886: e02d b.n 80028e4 <HAL_RCC_GetSysClockFreq+0x9c>
{
case RCC_SYSCLKSOURCE_STATUS_HSE: /* HSE used as system clock */
{
sysclockfreq = HSE_VALUE;
8002888: 4b1e ldr r3, [pc, #120] ; (8002904 <HAL_RCC_GetSysClockFreq+0xbc>)
800288a: 623b str r3, [r7, #32]
break;
800288c: e02d b.n 80028ea <HAL_RCC_GetSysClockFreq+0xa2>
}
case RCC_SYSCLKSOURCE_STATUS_PLLCLK: /* PLL used as system clock */
{
pllmul = aPLLMULFactorTable[(uint32_t)(tmpreg & RCC_CFGR_PLLMULL) >> RCC_CFGR_PLLMULL_Pos];
800288e: 69fb ldr r3, [r7, #28]
8002890: 0c9b lsrs r3, r3, #18
8002892: f003 030f and.w r3, r3, #15
8002896: f107 0228 add.w r2, r7, #40 ; 0x28
800289a: 4413 add r3, r2
800289c: f813 3c24 ldrb.w r3, [r3, #-36]
80028a0: 617b str r3, [r7, #20]
if ((tmpreg & RCC_CFGR_PLLSRC) != RCC_PLLSOURCE_HSI_DIV2)
80028a2: 69fb ldr r3, [r7, #28]
80028a4: f403 3380 and.w r3, r3, #65536 ; 0x10000
80028a8: 2b00 cmp r3, #0
80028aa: d013 beq.n 80028d4 <HAL_RCC_GetSysClockFreq+0x8c>
{
#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];
80028ac: 4b14 ldr r3, [pc, #80] ; (8002900 <HAL_RCC_GetSysClockFreq+0xb8>)
80028ae: 685b ldr r3, [r3, #4]
80028b0: 0c5b lsrs r3, r3, #17
80028b2: f003 0301 and.w r3, r3, #1
80028b6: f107 0228 add.w r2, r7, #40 ; 0x28
80028ba: 4413 add r3, r2
80028bc: f813 3c28 ldrb.w r3, [r3, #-40]
80028c0: 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);
80028c2: 697b ldr r3, [r7, #20]
80028c4: 4a0f ldr r2, [pc, #60] ; (8002904 <HAL_RCC_GetSysClockFreq+0xbc>)
80028c6: fb02 f203 mul.w r2, r2, r3
80028ca: 69bb ldr r3, [r7, #24]
80028cc: fbb2 f3f3 udiv r3, r2, r3
80028d0: 627b str r3, [r7, #36] ; 0x24
80028d2: e004 b.n 80028de <HAL_RCC_GetSysClockFreq+0x96>
#endif /*RCC_CFGR2_PREDIV1SRC*/
}
else
{
/* HSI used as PLL clock source : PLLCLK = HSI/2 * PLLMUL */
pllclk = (uint32_t)((HSI_VALUE >> 1) * pllmul);
80028d4: 697b ldr r3, [r7, #20]
80028d6: 4a0c ldr r2, [pc, #48] ; (8002908 <HAL_RCC_GetSysClockFreq+0xc0>)
80028d8: fb02 f303 mul.w r3, r2, r3
80028dc: 627b str r3, [r7, #36] ; 0x24
}
sysclockfreq = pllclk;
80028de: 6a7b ldr r3, [r7, #36] ; 0x24
80028e0: 623b str r3, [r7, #32]
break;
80028e2: e002 b.n 80028ea <HAL_RCC_GetSysClockFreq+0xa2>
}
case RCC_SYSCLKSOURCE_STATUS_HSI: /* HSI used as system clock source */
default: /* HSI used as system clock */
{
sysclockfreq = HSI_VALUE;
80028e4: 4b07 ldr r3, [pc, #28] ; (8002904 <HAL_RCC_GetSysClockFreq+0xbc>)
80028e6: 623b str r3, [r7, #32]
break;
80028e8: bf00 nop
}
}
return sysclockfreq;
80028ea: 6a3b ldr r3, [r7, #32]
}
80028ec: 4618 mov r0, r3
80028ee: 3728 adds r7, #40 ; 0x28
80028f0: 46bd mov sp, r7
80028f2: bc90 pop {r4, r7}
80028f4: 4770 bx lr
80028f6: bf00 nop
80028f8: 08006c98 .word 0x08006c98
80028fc: 08006ca8 .word 0x08006ca8
8002900: 40021000 .word 0x40021000
8002904: 007a1200 .word 0x007a1200
8002908: 003d0900 .word 0x003d0900
0800290c <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)
{
800290c: b480 push {r7}
800290e: b085 sub sp, #20
8002910: af00 add r7, sp, #0
8002912: 6078 str r0, [r7, #4]
__IO uint32_t Delay = mdelay * (SystemCoreClock / 8U / 1000U);
8002914: 4b0a ldr r3, [pc, #40] ; (8002940 <RCC_Delay+0x34>)
8002916: 681b ldr r3, [r3, #0]
8002918: 4a0a ldr r2, [pc, #40] ; (8002944 <RCC_Delay+0x38>)
800291a: fba2 2303 umull r2, r3, r2, r3
800291e: 0a5b lsrs r3, r3, #9
8002920: 687a ldr r2, [r7, #4]
8002922: fb02 f303 mul.w r3, r2, r3
8002926: 60fb str r3, [r7, #12]
do
{
__NOP();
8002928: bf00 nop
}
while (Delay --);
800292a: 68fb ldr r3, [r7, #12]
800292c: 1e5a subs r2, r3, #1
800292e: 60fa str r2, [r7, #12]
8002930: 2b00 cmp r3, #0
8002932: d1f9 bne.n 8002928 <RCC_Delay+0x1c>
}
8002934: bf00 nop
8002936: 3714 adds r7, #20
8002938: 46bd mov sp, r7
800293a: bc80 pop {r7}
800293c: 4770 bx lr
800293e: bf00 nop
8002940: 20000000 .word 0x20000000
8002944: 10624dd3 .word 0x10624dd3
08002948 <HAL_RCCEx_PeriphCLKConfig>:
* manually disable it.
*
* @retval HAL status
*/
HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit)
{
8002948: b580 push {r7, lr}
800294a: b086 sub sp, #24
800294c: af00 add r7, sp, #0
800294e: 6078 str r0, [r7, #4]
uint32_t tickstart = 0U, temp_reg = 0U;
8002950: 2300 movs r3, #0
8002952: 613b str r3, [r7, #16]
8002954: 2300 movs r3, #0
8002956: 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))
8002958: 687b ldr r3, [r7, #4]
800295a: 681b ldr r3, [r3, #0]
800295c: f003 0301 and.w r3, r3, #1
8002960: 2b00 cmp r3, #0
8002962: d07d beq.n 8002a60 <HAL_RCCEx_PeriphCLKConfig+0x118>
{
/* check for RTC Parameters used to output RTCCLK */
assert_param(IS_RCC_RTCCLKSOURCE(PeriphClkInit->RTCClockSelection));
FlagStatus pwrclkchanged = RESET;
8002964: 2300 movs r3, #0
8002966: 75fb strb r3, [r7, #23]
/* As soon as function is called to change RTC clock source, activation of the
power domain is done. */
/* Requires to enable write access to Backup Domain of necessary */
if (__HAL_RCC_PWR_IS_CLK_DISABLED())
8002968: 4b4f ldr r3, [pc, #316] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
800296a: 69db ldr r3, [r3, #28]
800296c: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8002970: 2b00 cmp r3, #0
8002972: d10d bne.n 8002990 <HAL_RCCEx_PeriphCLKConfig+0x48>
{
__HAL_RCC_PWR_CLK_ENABLE();
8002974: 4b4c ldr r3, [pc, #304] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002976: 69db ldr r3, [r3, #28]
8002978: 4a4b ldr r2, [pc, #300] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
800297a: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
800297e: 61d3 str r3, [r2, #28]
8002980: 4b49 ldr r3, [pc, #292] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002982: 69db ldr r3, [r3, #28]
8002984: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8002988: 60bb str r3, [r7, #8]
800298a: 68bb ldr r3, [r7, #8]
pwrclkchanged = SET;
800298c: 2301 movs r3, #1
800298e: 75fb strb r3, [r7, #23]
}
if (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
8002990: 4b46 ldr r3, [pc, #280] ; (8002aac <HAL_RCCEx_PeriphCLKConfig+0x164>)
8002992: 681b ldr r3, [r3, #0]
8002994: f403 7380 and.w r3, r3, #256 ; 0x100
8002998: 2b00 cmp r3, #0
800299a: d118 bne.n 80029ce <HAL_RCCEx_PeriphCLKConfig+0x86>
{
/* Enable write access to Backup domain */
SET_BIT(PWR->CR, PWR_CR_DBP);
800299c: 4b43 ldr r3, [pc, #268] ; (8002aac <HAL_RCCEx_PeriphCLKConfig+0x164>)
800299e: 681b ldr r3, [r3, #0]
80029a0: 4a42 ldr r2, [pc, #264] ; (8002aac <HAL_RCCEx_PeriphCLKConfig+0x164>)
80029a2: f443 7380 orr.w r3, r3, #256 ; 0x100
80029a6: 6013 str r3, [r2, #0]
/* Wait for Backup domain Write protection disable */
tickstart = HAL_GetTick();
80029a8: f7fd fdb4 bl 8000514 <HAL_GetTick>
80029ac: 6138 str r0, [r7, #16]
while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
80029ae: e008 b.n 80029c2 <HAL_RCCEx_PeriphCLKConfig+0x7a>
{
if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
80029b0: f7fd fdb0 bl 8000514 <HAL_GetTick>
80029b4: 4602 mov r2, r0
80029b6: 693b ldr r3, [r7, #16]
80029b8: 1ad3 subs r3, r2, r3
80029ba: 2b64 cmp r3, #100 ; 0x64
80029bc: d901 bls.n 80029c2 <HAL_RCCEx_PeriphCLKConfig+0x7a>
{
return HAL_TIMEOUT;
80029be: 2303 movs r3, #3
80029c0: e06d b.n 8002a9e <HAL_RCCEx_PeriphCLKConfig+0x156>
while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
80029c2: 4b3a ldr r3, [pc, #232] ; (8002aac <HAL_RCCEx_PeriphCLKConfig+0x164>)
80029c4: 681b ldr r3, [r3, #0]
80029c6: f403 7380 and.w r3, r3, #256 ; 0x100
80029ca: 2b00 cmp r3, #0
80029cc: d0f0 beq.n 80029b0 <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);
80029ce: 4b36 ldr r3, [pc, #216] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
80029d0: 6a1b ldr r3, [r3, #32]
80029d2: f403 7340 and.w r3, r3, #768 ; 0x300
80029d6: 60fb str r3, [r7, #12]
if ((temp_reg != 0x00000000U) && (temp_reg != (PeriphClkInit->RTCClockSelection & RCC_BDCR_RTCSEL)))
80029d8: 68fb ldr r3, [r7, #12]
80029da: 2b00 cmp r3, #0
80029dc: d02e beq.n 8002a3c <HAL_RCCEx_PeriphCLKConfig+0xf4>
80029de: 687b ldr r3, [r7, #4]
80029e0: 685b ldr r3, [r3, #4]
80029e2: f403 7340 and.w r3, r3, #768 ; 0x300
80029e6: 68fa ldr r2, [r7, #12]
80029e8: 429a cmp r2, r3
80029ea: d027 beq.n 8002a3c <HAL_RCCEx_PeriphCLKConfig+0xf4>
{
/* Store the content of BDCR register before the reset of Backup Domain */
temp_reg = (RCC->BDCR & ~(RCC_BDCR_RTCSEL));
80029ec: 4b2e ldr r3, [pc, #184] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
80029ee: 6a1b ldr r3, [r3, #32]
80029f0: f423 7340 bic.w r3, r3, #768 ; 0x300
80029f4: 60fb str r3, [r7, #12]
/* RTC Clock selection can be changed only if the Backup Domain is reset */
__HAL_RCC_BACKUPRESET_FORCE();
80029f6: 4b2e ldr r3, [pc, #184] ; (8002ab0 <HAL_RCCEx_PeriphCLKConfig+0x168>)
80029f8: 2201 movs r2, #1
80029fa: 601a str r2, [r3, #0]
__HAL_RCC_BACKUPRESET_RELEASE();
80029fc: 4b2c ldr r3, [pc, #176] ; (8002ab0 <HAL_RCCEx_PeriphCLKConfig+0x168>)
80029fe: 2200 movs r2, #0
8002a00: 601a str r2, [r3, #0]
/* Restore the Content of BDCR register */
RCC->BDCR = temp_reg;
8002a02: 4a29 ldr r2, [pc, #164] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002a04: 68fb ldr r3, [r7, #12]
8002a06: 6213 str r3, [r2, #32]
/* Wait for LSERDY if LSE was enabled */
if (HAL_IS_BIT_SET(temp_reg, RCC_BDCR_LSEON))
8002a08: 68fb ldr r3, [r7, #12]
8002a0a: f003 0301 and.w r3, r3, #1
8002a0e: 2b00 cmp r3, #0
8002a10: d014 beq.n 8002a3c <HAL_RCCEx_PeriphCLKConfig+0xf4>
{
/* Get Start Tick */
tickstart = HAL_GetTick();
8002a12: f7fd fd7f bl 8000514 <HAL_GetTick>
8002a16: 6138 str r0, [r7, #16]
/* Wait till LSE is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
8002a18: e00a b.n 8002a30 <HAL_RCCEx_PeriphCLKConfig+0xe8>
{
if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
8002a1a: f7fd fd7b bl 8000514 <HAL_GetTick>
8002a1e: 4602 mov r2, r0
8002a20: 693b ldr r3, [r7, #16]
8002a22: 1ad3 subs r3, r2, r3
8002a24: f241 3288 movw r2, #5000 ; 0x1388
8002a28: 4293 cmp r3, r2
8002a2a: d901 bls.n 8002a30 <HAL_RCCEx_PeriphCLKConfig+0xe8>
{
return HAL_TIMEOUT;
8002a2c: 2303 movs r3, #3
8002a2e: e036 b.n 8002a9e <HAL_RCCEx_PeriphCLKConfig+0x156>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
8002a30: 4b1d ldr r3, [pc, #116] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002a32: 6a1b ldr r3, [r3, #32]
8002a34: f003 0302 and.w r3, r3, #2
8002a38: 2b00 cmp r3, #0
8002a3a: d0ee beq.n 8002a1a <HAL_RCCEx_PeriphCLKConfig+0xd2>
}
}
}
}
__HAL_RCC_RTC_CONFIG(PeriphClkInit->RTCClockSelection);
8002a3c: 4b1a ldr r3, [pc, #104] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002a3e: 6a1b ldr r3, [r3, #32]
8002a40: f423 7240 bic.w r2, r3, #768 ; 0x300
8002a44: 687b ldr r3, [r7, #4]
8002a46: 685b ldr r3, [r3, #4]
8002a48: 4917 ldr r1, [pc, #92] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002a4a: 4313 orrs r3, r2
8002a4c: 620b str r3, [r1, #32]
/* Require to disable power clock if necessary */
if (pwrclkchanged == SET)
8002a4e: 7dfb ldrb r3, [r7, #23]
8002a50: 2b01 cmp r3, #1
8002a52: d105 bne.n 8002a60 <HAL_RCCEx_PeriphCLKConfig+0x118>
{
__HAL_RCC_PWR_CLK_DISABLE();
8002a54: 4b14 ldr r3, [pc, #80] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002a56: 69db ldr r3, [r3, #28]
8002a58: 4a13 ldr r2, [pc, #76] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002a5a: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000
8002a5e: 61d3 str r3, [r2, #28]
}
}
/*------------------------------ ADC clock Configuration ------------------*/
if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_ADC) == RCC_PERIPHCLK_ADC)
8002a60: 687b ldr r3, [r7, #4]
8002a62: 681b ldr r3, [r3, #0]
8002a64: f003 0302 and.w r3, r3, #2
8002a68: 2b00 cmp r3, #0
8002a6a: d008 beq.n 8002a7e <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);
8002a6c: 4b0e ldr r3, [pc, #56] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002a6e: 685b ldr r3, [r3, #4]
8002a70: f423 4240 bic.w r2, r3, #49152 ; 0xc000
8002a74: 687b ldr r3, [r7, #4]
8002a76: 689b ldr r3, [r3, #8]
8002a78: 490b ldr r1, [pc, #44] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002a7a: 4313 orrs r3, r2
8002a7c: 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)
8002a7e: 687b ldr r3, [r7, #4]
8002a80: 681b ldr r3, [r3, #0]
8002a82: f003 0310 and.w r3, r3, #16
8002a86: 2b00 cmp r3, #0
8002a88: d008 beq.n 8002a9c <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);
8002a8a: 4b07 ldr r3, [pc, #28] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002a8c: 685b ldr r3, [r3, #4]
8002a8e: f423 0280 bic.w r2, r3, #4194304 ; 0x400000
8002a92: 687b ldr r3, [r7, #4]
8002a94: 68db ldr r3, [r3, #12]
8002a96: 4904 ldr r1, [pc, #16] ; (8002aa8 <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002a98: 4313 orrs r3, r2
8002a9a: 604b str r3, [r1, #4]
}
#endif /* STM32F102x6 || STM32F102xB || STM32F103x6 || STM32F103xB || STM32F103xE || STM32F103xG || STM32F105xC || STM32F107xC */
return HAL_OK;
8002a9c: 2300 movs r3, #0
}
8002a9e: 4618 mov r0, r3
8002aa0: 3718 adds r7, #24
8002aa2: 46bd mov sp, r7
8002aa4: bd80 pop {r7, pc}
8002aa6: bf00 nop
8002aa8: 40021000 .word 0x40021000
8002aac: 40007000 .word 0x40007000
8002ab0: 42420440 .word 0x42420440
08002ab4 <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)
{
8002ab4: b084 sub sp, #16
8002ab6: b480 push {r7}
8002ab8: b083 sub sp, #12
8002aba: af00 add r7, sp, #0
8002abc: 6078 str r0, [r7, #4]
8002abe: f107 0014 add.w r0, r7, #20
8002ac2: 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;
8002ac6: 2300 movs r3, #0
}
8002ac8: 4618 mov r0, r3
8002aca: 370c adds r7, #12
8002acc: 46bd mov sp, r7
8002ace: bc80 pop {r7}
8002ad0: b004 add sp, #16
8002ad2: 4770 bx lr
08002ad4 <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)
{
8002ad4: b480 push {r7}
8002ad6: b085 sub sp, #20
8002ad8: af00 add r7, sp, #0
8002ada: 6078 str r0, [r7, #4]
uint32_t winterruptmask;
/* Clear pending interrupts */
USBx->ISTR = 0U;
8002adc: 687b ldr r3, [r7, #4]
8002ade: 2200 movs r2, #0
8002ae0: f8a3 2044 strh.w r2, [r3, #68] ; 0x44
/* Set winterruptmask variable */
winterruptmask = USB_CNTR_CTRM | USB_CNTR_WKUPM |
8002ae4: f44f 433f mov.w r3, #48896 ; 0xbf00
8002ae8: 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;
8002aea: 68fb ldr r3, [r7, #12]
8002aec: b29a uxth r2, r3
8002aee: 687b ldr r3, [r7, #4]
8002af0: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
return HAL_OK;
8002af4: 2300 movs r3, #0
}
8002af6: 4618 mov r0, r3
8002af8: 3714 adds r7, #20
8002afa: 46bd mov sp, r7
8002afc: bc80 pop {r7}
8002afe: 4770 bx lr
08002b00 <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)
{
8002b00: b480 push {r7}
8002b02: b085 sub sp, #20
8002b04: af00 add r7, sp, #0
8002b06: 6078 str r0, [r7, #4]
uint32_t winterruptmask;
/* Set winterruptmask variable */
winterruptmask = USB_CNTR_CTRM | USB_CNTR_WKUPM |
8002b08: f44f 433f mov.w r3, #48896 ; 0xbf00
8002b0c: 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);
8002b0e: 687b ldr r3, [r7, #4]
8002b10: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40
8002b14: b29a uxth r2, r3
8002b16: 68fb ldr r3, [r7, #12]
8002b18: b29b uxth r3, r3
8002b1a: 43db mvns r3, r3
8002b1c: b29b uxth r3, r3
8002b1e: 4013 ands r3, r2
8002b20: b29a uxth r2, r3
8002b22: 687b ldr r3, [r7, #4]
8002b24: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
return HAL_OK;
8002b28: 2300 movs r3, #0
}
8002b2a: 4618 mov r0, r3
8002b2c: 3714 adds r7, #20
8002b2e: 46bd mov sp, r7
8002b30: bc80 pop {r7}
8002b32: 4770 bx lr
08002b34 <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)
{
8002b34: b480 push {r7}
8002b36: b083 sub sp, #12
8002b38: af00 add r7, sp, #0
8002b3a: 6078 str r0, [r7, #4]
8002b3c: 460b mov r3, r1
8002b3e: 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;
8002b40: 2300 movs r3, #0
}
8002b42: 4618 mov r0, r3
8002b44: 370c adds r7, #12
8002b46: 46bd mov sp, r7
8002b48: bc80 pop {r7}
8002b4a: 4770 bx lr
08002b4c <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)
{
8002b4c: b084 sub sp, #16
8002b4e: b480 push {r7}
8002b50: b083 sub sp, #12
8002b52: af00 add r7, sp, #0
8002b54: 6078 str r0, [r7, #4]
8002b56: f107 0014 add.w r0, r7, #20
8002b5a: 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;
8002b5e: 687b ldr r3, [r7, #4]
8002b60: 2201 movs r2, #1
8002b62: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
/* CNTR_FRES = 0 */
USBx->CNTR = 0U;
8002b66: 687b ldr r3, [r7, #4]
8002b68: 2200 movs r2, #0
8002b6a: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
/* Clear pending interrupts */
USBx->ISTR = 0U;
8002b6e: 687b ldr r3, [r7, #4]
8002b70: 2200 movs r2, #0
8002b72: f8a3 2044 strh.w r2, [r3, #68] ; 0x44
/*Set Btable Address*/
USBx->BTABLE = BTABLE_ADDRESS;
8002b76: 687b ldr r3, [r7, #4]
8002b78: 2200 movs r2, #0
8002b7a: f8a3 2050 strh.w r2, [r3, #80] ; 0x50
return HAL_OK;
8002b7e: 2300 movs r3, #0
}
8002b80: 4618 mov r0, r3
8002b82: 370c adds r7, #12
8002b84: 46bd mov sp, r7
8002b86: bc80 pop {r7}
8002b88: b004 add sp, #16
8002b8a: 4770 bx lr
08002b8c <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)
{
8002b8c: b480 push {r7}
8002b8e: b09b sub sp, #108 ; 0x6c
8002b90: af00 add r7, sp, #0
8002b92: 6078 str r0, [r7, #4]
8002b94: 6039 str r1, [r7, #0]
HAL_StatusTypeDef ret = HAL_OK;
8002b96: 2300 movs r3, #0
8002b98: f887 3067 strb.w r3, [r7, #103] ; 0x67
uint16_t wEpRegVal;
wEpRegVal = PCD_GET_ENDPOINT(USBx, ep->num) & USB_EP_T_MASK;
8002b9c: 687a ldr r2, [r7, #4]
8002b9e: 683b ldr r3, [r7, #0]
8002ba0: 781b ldrb r3, [r3, #0]
8002ba2: 009b lsls r3, r3, #2
8002ba4: 4413 add r3, r2
8002ba6: 881b ldrh r3, [r3, #0]
8002ba8: b29b uxth r3, r3
8002baa: f423 43ec bic.w r3, r3, #30208 ; 0x7600
8002bae: f023 0370 bic.w r3, r3, #112 ; 0x70
8002bb2: f8a7 3064 strh.w r3, [r7, #100] ; 0x64
/* initialize Endpoint */
switch (ep->type)
8002bb6: 683b ldr r3, [r7, #0]
8002bb8: 78db ldrb r3, [r3, #3]
8002bba: 2b03 cmp r3, #3
8002bbc: d81f bhi.n 8002bfe <USB_ActivateEndpoint+0x72>
8002bbe: a201 add r2, pc, #4 ; (adr r2, 8002bc4 <USB_ActivateEndpoint+0x38>)
8002bc0: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8002bc4: 08002bd5 .word 0x08002bd5
8002bc8: 08002bf1 .word 0x08002bf1
8002bcc: 08002c07 .word 0x08002c07
8002bd0: 08002be3 .word 0x08002be3
{
case EP_TYPE_CTRL:
wEpRegVal |= USB_EP_CONTROL;
8002bd4: f8b7 3064 ldrh.w r3, [r7, #100] ; 0x64
8002bd8: f443 7300 orr.w r3, r3, #512 ; 0x200
8002bdc: f8a7 3064 strh.w r3, [r7, #100] ; 0x64
break;
8002be0: e012 b.n 8002c08 <USB_ActivateEndpoint+0x7c>
case EP_TYPE_BULK:
wEpRegVal |= USB_EP_BULK;
break;
case EP_TYPE_INTR:
wEpRegVal |= USB_EP_INTERRUPT;
8002be2: f8b7 3064 ldrh.w r3, [r7, #100] ; 0x64
8002be6: f443 63c0 orr.w r3, r3, #1536 ; 0x600
8002bea: f8a7 3064 strh.w r3, [r7, #100] ; 0x64
break;
8002bee: e00b b.n 8002c08 <USB_ActivateEndpoint+0x7c>
case EP_TYPE_ISOC:
wEpRegVal |= USB_EP_ISOCHRONOUS;
8002bf0: f8b7 3064 ldrh.w r3, [r7, #100] ; 0x64
8002bf4: f443 6380 orr.w r3, r3, #1024 ; 0x400
8002bf8: f8a7 3064 strh.w r3, [r7, #100] ; 0x64
break;
8002bfc: e004 b.n 8002c08 <USB_ActivateEndpoint+0x7c>
default:
ret = HAL_ERROR;
8002bfe: 2301 movs r3, #1
8002c00: f887 3067 strb.w r3, [r7, #103] ; 0x67
break;
8002c04: e000 b.n 8002c08 <USB_ActivateEndpoint+0x7c>
break;
8002c06: bf00 nop
}
PCD_SET_ENDPOINT(USBx, ep->num, (wEpRegVal | USB_EP_CTR_RX | USB_EP_CTR_TX));
8002c08: 687a ldr r2, [r7, #4]
8002c0a: 683b ldr r3, [r7, #0]
8002c0c: 781b ldrb r3, [r3, #0]
8002c0e: 009b lsls r3, r3, #2
8002c10: 441a add r2, r3
8002c12: f8b7 3064 ldrh.w r3, [r7, #100] ; 0x64
8002c16: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8002c1a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8002c1e: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8002c22: f043 0380 orr.w r3, r3, #128 ; 0x80
8002c26: b29b uxth r3, r3
8002c28: 8013 strh r3, [r2, #0]
PCD_SET_EP_ADDRESS(USBx, ep->num, ep->num);
8002c2a: 687a ldr r2, [r7, #4]
8002c2c: 683b ldr r3, [r7, #0]
8002c2e: 781b ldrb r3, [r3, #0]
8002c30: 009b lsls r3, r3, #2
8002c32: 4413 add r3, r2
8002c34: 881b ldrh r3, [r3, #0]
8002c36: b29b uxth r3, r3
8002c38: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8002c3c: f023 0370 bic.w r3, r3, #112 ; 0x70
8002c40: b29a uxth r2, r3
8002c42: 683b ldr r3, [r7, #0]
8002c44: 781b ldrb r3, [r3, #0]
8002c46: b29b uxth r3, r3
8002c48: 4313 orrs r3, r2
8002c4a: f8a7 305e strh.w r3, [r7, #94] ; 0x5e
8002c4e: 687a ldr r2, [r7, #4]
8002c50: 683b ldr r3, [r7, #0]
8002c52: 781b ldrb r3, [r3, #0]
8002c54: 009b lsls r3, r3, #2
8002c56: 441a add r2, r3
8002c58: f8b7 305e ldrh.w r3, [r7, #94] ; 0x5e
8002c5c: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8002c60: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8002c64: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8002c68: f043 0380 orr.w r3, r3, #128 ; 0x80
8002c6c: b29b uxth r3, r3
8002c6e: 8013 strh r3, [r2, #0]
if (ep->doublebuffer == 0U)
8002c70: 683b ldr r3, [r7, #0]
8002c72: 7b1b ldrb r3, [r3, #12]
8002c74: 2b00 cmp r3, #0
8002c76: f040 8149 bne.w 8002f0c <USB_ActivateEndpoint+0x380>
{
if (ep->is_in != 0U)
8002c7a: 683b ldr r3, [r7, #0]
8002c7c: 785b ldrb r3, [r3, #1]
8002c7e: 2b00 cmp r3, #0
8002c80: f000 8084 beq.w 8002d8c <USB_ActivateEndpoint+0x200>
{
/*Set the endpoint Transmit buffer address */
PCD_SET_EP_TX_ADDRESS(USBx, ep->num, ep->pmaadress);
8002c84: 687b ldr r3, [r7, #4]
8002c86: 617b str r3, [r7, #20]
8002c88: 687b ldr r3, [r7, #4]
8002c8a: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8002c8e: b29b uxth r3, r3
8002c90: 461a mov r2, r3
8002c92: 697b ldr r3, [r7, #20]
8002c94: 4413 add r3, r2
8002c96: 617b str r3, [r7, #20]
8002c98: 683b ldr r3, [r7, #0]
8002c9a: 781b ldrb r3, [r3, #0]
8002c9c: 011a lsls r2, r3, #4
8002c9e: 697b ldr r3, [r7, #20]
8002ca0: 4413 add r3, r2
8002ca2: f503 6380 add.w r3, r3, #1024 ; 0x400
8002ca6: 613b str r3, [r7, #16]
8002ca8: 683b ldr r3, [r7, #0]
8002caa: 88db ldrh r3, [r3, #6]
8002cac: 085b lsrs r3, r3, #1
8002cae: b29b uxth r3, r3
8002cb0: 005b lsls r3, r3, #1
8002cb2: b29a uxth r2, r3
8002cb4: 693b ldr r3, [r7, #16]
8002cb6: 801a strh r2, [r3, #0]
PCD_CLEAR_TX_DTOG(USBx, ep->num);
8002cb8: 687a ldr r2, [r7, #4]
8002cba: 683b ldr r3, [r7, #0]
8002cbc: 781b ldrb r3, [r3, #0]
8002cbe: 009b lsls r3, r3, #2
8002cc0: 4413 add r3, r2
8002cc2: 881b ldrh r3, [r3, #0]
8002cc4: 81fb strh r3, [r7, #14]
8002cc6: 89fb ldrh r3, [r7, #14]
8002cc8: f003 0340 and.w r3, r3, #64 ; 0x40
8002ccc: 2b00 cmp r3, #0
8002cce: d01b beq.n 8002d08 <USB_ActivateEndpoint+0x17c>
8002cd0: 687a ldr r2, [r7, #4]
8002cd2: 683b ldr r3, [r7, #0]
8002cd4: 781b ldrb r3, [r3, #0]
8002cd6: 009b lsls r3, r3, #2
8002cd8: 4413 add r3, r2
8002cda: 881b ldrh r3, [r3, #0]
8002cdc: b29b uxth r3, r3
8002cde: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8002ce2: f023 0370 bic.w r3, r3, #112 ; 0x70
8002ce6: 81bb strh r3, [r7, #12]
8002ce8: 687a ldr r2, [r7, #4]
8002cea: 683b ldr r3, [r7, #0]
8002cec: 781b ldrb r3, [r3, #0]
8002cee: 009b lsls r3, r3, #2
8002cf0: 441a add r2, r3
8002cf2: 89bb ldrh r3, [r7, #12]
8002cf4: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8002cf8: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8002cfc: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8002d00: f043 03c0 orr.w r3, r3, #192 ; 0xc0
8002d04: b29b uxth r3, r3
8002d06: 8013 strh r3, [r2, #0]
if (ep->type != EP_TYPE_ISOC)
8002d08: 683b ldr r3, [r7, #0]
8002d0a: 78db ldrb r3, [r3, #3]
8002d0c: 2b01 cmp r3, #1
8002d0e: d020 beq.n 8002d52 <USB_ActivateEndpoint+0x1c6>
{
/* Configure NAK status for the Endpoint */
PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_NAK);
8002d10: 687a ldr r2, [r7, #4]
8002d12: 683b ldr r3, [r7, #0]
8002d14: 781b ldrb r3, [r3, #0]
8002d16: 009b lsls r3, r3, #2
8002d18: 4413 add r3, r2
8002d1a: 881b ldrh r3, [r3, #0]
8002d1c: b29b uxth r3, r3
8002d1e: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8002d22: f023 0340 bic.w r3, r3, #64 ; 0x40
8002d26: 813b strh r3, [r7, #8]
8002d28: 893b ldrh r3, [r7, #8]
8002d2a: f083 0320 eor.w r3, r3, #32
8002d2e: 813b strh r3, [r7, #8]
8002d30: 687a ldr r2, [r7, #4]
8002d32: 683b ldr r3, [r7, #0]
8002d34: 781b ldrb r3, [r3, #0]
8002d36: 009b lsls r3, r3, #2
8002d38: 441a add r2, r3
8002d3a: 893b ldrh r3, [r7, #8]
8002d3c: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8002d40: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8002d44: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8002d48: f043 0380 orr.w r3, r3, #128 ; 0x80
8002d4c: b29b uxth r3, r3
8002d4e: 8013 strh r3, [r2, #0]
8002d50: e27f b.n 8003252 <USB_ActivateEndpoint+0x6c6>
}
else
{
/* Configure TX Endpoint to disabled state */
PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS);
8002d52: 687a ldr r2, [r7, #4]
8002d54: 683b ldr r3, [r7, #0]
8002d56: 781b ldrb r3, [r3, #0]
8002d58: 009b lsls r3, r3, #2
8002d5a: 4413 add r3, r2
8002d5c: 881b ldrh r3, [r3, #0]
8002d5e: b29b uxth r3, r3
8002d60: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8002d64: f023 0340 bic.w r3, r3, #64 ; 0x40
8002d68: 817b strh r3, [r7, #10]
8002d6a: 687a ldr r2, [r7, #4]
8002d6c: 683b ldr r3, [r7, #0]
8002d6e: 781b ldrb r3, [r3, #0]
8002d70: 009b lsls r3, r3, #2
8002d72: 441a add r2, r3
8002d74: 897b ldrh r3, [r7, #10]
8002d76: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8002d7a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8002d7e: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8002d82: f043 0380 orr.w r3, r3, #128 ; 0x80
8002d86: b29b uxth r3, r3
8002d88: 8013 strh r3, [r2, #0]
8002d8a: e262 b.n 8003252 <USB_ActivateEndpoint+0x6c6>
}
}
else
{
/*Set the endpoint Receive buffer address */
PCD_SET_EP_RX_ADDRESS(USBx, ep->num, ep->pmaadress);
8002d8c: 687b ldr r3, [r7, #4]
8002d8e: 62fb str r3, [r7, #44] ; 0x2c
8002d90: 687b ldr r3, [r7, #4]
8002d92: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8002d96: b29b uxth r3, r3
8002d98: 461a mov r2, r3
8002d9a: 6afb ldr r3, [r7, #44] ; 0x2c
8002d9c: 4413 add r3, r2
8002d9e: 62fb str r3, [r7, #44] ; 0x2c
8002da0: 683b ldr r3, [r7, #0]
8002da2: 781b ldrb r3, [r3, #0]
8002da4: 011a lsls r2, r3, #4
8002da6: 6afb ldr r3, [r7, #44] ; 0x2c
8002da8: 4413 add r3, r2
8002daa: f503 6381 add.w r3, r3, #1032 ; 0x408
8002dae: 62bb str r3, [r7, #40] ; 0x28
8002db0: 683b ldr r3, [r7, #0]
8002db2: 88db ldrh r3, [r3, #6]
8002db4: 085b lsrs r3, r3, #1
8002db6: b29b uxth r3, r3
8002db8: 005b lsls r3, r3, #1
8002dba: b29a uxth r2, r3
8002dbc: 6abb ldr r3, [r7, #40] ; 0x28
8002dbe: 801a strh r2, [r3, #0]
/*Set the endpoint Receive buffer counter*/
PCD_SET_EP_RX_CNT(USBx, ep->num, ep->maxpacket);
8002dc0: 687b ldr r3, [r7, #4]
8002dc2: 627b str r3, [r7, #36] ; 0x24
8002dc4: 687b ldr r3, [r7, #4]
8002dc6: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8002dca: b29b uxth r3, r3
8002dcc: 461a mov r2, r3
8002dce: 6a7b ldr r3, [r7, #36] ; 0x24
8002dd0: 4413 add r3, r2
8002dd2: 627b str r3, [r7, #36] ; 0x24
8002dd4: 683b ldr r3, [r7, #0]
8002dd6: 781b ldrb r3, [r3, #0]
8002dd8: 011a lsls r2, r3, #4
8002dda: 6a7b ldr r3, [r7, #36] ; 0x24
8002ddc: 4413 add r3, r2
8002dde: f203 430c addw r3, r3, #1036 ; 0x40c
8002de2: 623b str r3, [r7, #32]
8002de4: 683b ldr r3, [r7, #0]
8002de6: 691b ldr r3, [r3, #16]
8002de8: 2b00 cmp r3, #0
8002dea: d112 bne.n 8002e12 <USB_ActivateEndpoint+0x286>
8002dec: 6a3b ldr r3, [r7, #32]
8002dee: 881b ldrh r3, [r3, #0]
8002df0: b29b uxth r3, r3
8002df2: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
8002df6: b29a uxth r2, r3
8002df8: 6a3b ldr r3, [r7, #32]
8002dfa: 801a strh r2, [r3, #0]
8002dfc: 6a3b ldr r3, [r7, #32]
8002dfe: 881b ldrh r3, [r3, #0]
8002e00: b29b uxth r3, r3
8002e02: ea6f 4343 mvn.w r3, r3, lsl #17
8002e06: ea6f 4353 mvn.w r3, r3, lsr #17
8002e0a: b29a uxth r2, r3
8002e0c: 6a3b ldr r3, [r7, #32]
8002e0e: 801a strh r2, [r3, #0]
8002e10: e02f b.n 8002e72 <USB_ActivateEndpoint+0x2e6>
8002e12: 683b ldr r3, [r7, #0]
8002e14: 691b ldr r3, [r3, #16]
8002e16: 2b3e cmp r3, #62 ; 0x3e
8002e18: d813 bhi.n 8002e42 <USB_ActivateEndpoint+0x2b6>
8002e1a: 683b ldr r3, [r7, #0]
8002e1c: 691b ldr r3, [r3, #16]
8002e1e: 085b lsrs r3, r3, #1
8002e20: 663b str r3, [r7, #96] ; 0x60
8002e22: 683b ldr r3, [r7, #0]
8002e24: 691b ldr r3, [r3, #16]
8002e26: f003 0301 and.w r3, r3, #1
8002e2a: 2b00 cmp r3, #0
8002e2c: d002 beq.n 8002e34 <USB_ActivateEndpoint+0x2a8>
8002e2e: 6e3b ldr r3, [r7, #96] ; 0x60
8002e30: 3301 adds r3, #1
8002e32: 663b str r3, [r7, #96] ; 0x60
8002e34: 6e3b ldr r3, [r7, #96] ; 0x60
8002e36: b29b uxth r3, r3
8002e38: 029b lsls r3, r3, #10
8002e3a: b29a uxth r2, r3
8002e3c: 6a3b ldr r3, [r7, #32]
8002e3e: 801a strh r2, [r3, #0]
8002e40: e017 b.n 8002e72 <USB_ActivateEndpoint+0x2e6>
8002e42: 683b ldr r3, [r7, #0]
8002e44: 691b ldr r3, [r3, #16]
8002e46: 095b lsrs r3, r3, #5
8002e48: 663b str r3, [r7, #96] ; 0x60
8002e4a: 683b ldr r3, [r7, #0]
8002e4c: 691b ldr r3, [r3, #16]
8002e4e: f003 031f and.w r3, r3, #31
8002e52: 2b00 cmp r3, #0
8002e54: d102 bne.n 8002e5c <USB_ActivateEndpoint+0x2d0>
8002e56: 6e3b ldr r3, [r7, #96] ; 0x60
8002e58: 3b01 subs r3, #1
8002e5a: 663b str r3, [r7, #96] ; 0x60
8002e5c: 6e3b ldr r3, [r7, #96] ; 0x60
8002e5e: b29b uxth r3, r3
8002e60: 029b lsls r3, r3, #10
8002e62: b29b uxth r3, r3
8002e64: ea6f 4343 mvn.w r3, r3, lsl #17
8002e68: ea6f 4353 mvn.w r3, r3, lsr #17
8002e6c: b29a uxth r2, r3
8002e6e: 6a3b ldr r3, [r7, #32]
8002e70: 801a strh r2, [r3, #0]
PCD_CLEAR_RX_DTOG(USBx, ep->num);
8002e72: 687a ldr r2, [r7, #4]
8002e74: 683b ldr r3, [r7, #0]
8002e76: 781b ldrb r3, [r3, #0]
8002e78: 009b lsls r3, r3, #2
8002e7a: 4413 add r3, r2
8002e7c: 881b ldrh r3, [r3, #0]
8002e7e: 83fb strh r3, [r7, #30]
8002e80: 8bfb ldrh r3, [r7, #30]
8002e82: f403 4380 and.w r3, r3, #16384 ; 0x4000
8002e86: 2b00 cmp r3, #0
8002e88: d01b beq.n 8002ec2 <USB_ActivateEndpoint+0x336>
8002e8a: 687a ldr r2, [r7, #4]
8002e8c: 683b ldr r3, [r7, #0]
8002e8e: 781b ldrb r3, [r3, #0]
8002e90: 009b lsls r3, r3, #2
8002e92: 4413 add r3, r2
8002e94: 881b ldrh r3, [r3, #0]
8002e96: b29b uxth r3, r3
8002e98: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8002e9c: f023 0370 bic.w r3, r3, #112 ; 0x70
8002ea0: 83bb strh r3, [r7, #28]
8002ea2: 687a ldr r2, [r7, #4]
8002ea4: 683b ldr r3, [r7, #0]
8002ea6: 781b ldrb r3, [r3, #0]
8002ea8: 009b lsls r3, r3, #2
8002eaa: 441a add r2, r3
8002eac: 8bbb ldrh r3, [r7, #28]
8002eae: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8002eb2: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8002eb6: f443 4340 orr.w r3, r3, #49152 ; 0xc000
8002eba: f043 0380 orr.w r3, r3, #128 ; 0x80
8002ebe: b29b uxth r3, r3
8002ec0: 8013 strh r3, [r2, #0]
/* Configure VALID status for the Endpoint*/
PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID);
8002ec2: 687a ldr r2, [r7, #4]
8002ec4: 683b ldr r3, [r7, #0]
8002ec6: 781b ldrb r3, [r3, #0]
8002ec8: 009b lsls r3, r3, #2
8002eca: 4413 add r3, r2
8002ecc: 881b ldrh r3, [r3, #0]
8002ece: b29b uxth r3, r3
8002ed0: f423 4380 bic.w r3, r3, #16384 ; 0x4000
8002ed4: f023 0370 bic.w r3, r3, #112 ; 0x70
8002ed8: 837b strh r3, [r7, #26]
8002eda: 8b7b ldrh r3, [r7, #26]
8002edc: f483 5380 eor.w r3, r3, #4096 ; 0x1000
8002ee0: 837b strh r3, [r7, #26]
8002ee2: 8b7b ldrh r3, [r7, #26]
8002ee4: f483 5300 eor.w r3, r3, #8192 ; 0x2000
8002ee8: 837b strh r3, [r7, #26]
8002eea: 687a ldr r2, [r7, #4]
8002eec: 683b ldr r3, [r7, #0]
8002eee: 781b ldrb r3, [r3, #0]
8002ef0: 009b lsls r3, r3, #2
8002ef2: 441a add r2, r3
8002ef4: 8b7b ldrh r3, [r7, #26]
8002ef6: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8002efa: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8002efe: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8002f02: f043 0380 orr.w r3, r3, #128 ; 0x80
8002f06: b29b uxth r3, r3
8002f08: 8013 strh r3, [r2, #0]
8002f0a: e1a2 b.n 8003252 <USB_ActivateEndpoint+0x6c6>
}
/*Double Buffer*/
else
{
/* Set the endpoint as double buffered */
PCD_SET_EP_DBUF(USBx, ep->num);
8002f0c: 687a ldr r2, [r7, #4]
8002f0e: 683b ldr r3, [r7, #0]
8002f10: 781b ldrb r3, [r3, #0]
8002f12: 009b lsls r3, r3, #2
8002f14: 4413 add r3, r2
8002f16: 881b ldrh r3, [r3, #0]
8002f18: b29b uxth r3, r3
8002f1a: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8002f1e: f023 0370 bic.w r3, r3, #112 ; 0x70
8002f22: f8a7 305c strh.w r3, [r7, #92] ; 0x5c
8002f26: 687a ldr r2, [r7, #4]
8002f28: 683b ldr r3, [r7, #0]
8002f2a: 781b ldrb r3, [r3, #0]
8002f2c: 009b lsls r3, r3, #2
8002f2e: 441a add r2, r3
8002f30: f8b7 305c ldrh.w r3, [r7, #92] ; 0x5c
8002f34: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8002f38: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8002f3c: f443 4301 orr.w r3, r3, #33024 ; 0x8100
8002f40: f043 0380 orr.w r3, r3, #128 ; 0x80
8002f44: b29b uxth r3, r3
8002f46: 8013 strh r3, [r2, #0]
/* Set buffer address for double buffered mode */
PCD_SET_EP_DBUF_ADDR(USBx, ep->num, ep->pmaaddr0, ep->pmaaddr1);
8002f48: 687b ldr r3, [r7, #4]
8002f4a: 65bb str r3, [r7, #88] ; 0x58
8002f4c: 687b ldr r3, [r7, #4]
8002f4e: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8002f52: b29b uxth r3, r3
8002f54: 461a mov r2, r3
8002f56: 6dbb ldr r3, [r7, #88] ; 0x58
8002f58: 4413 add r3, r2
8002f5a: 65bb str r3, [r7, #88] ; 0x58
8002f5c: 683b ldr r3, [r7, #0]
8002f5e: 781b ldrb r3, [r3, #0]
8002f60: 011a lsls r2, r3, #4
8002f62: 6dbb ldr r3, [r7, #88] ; 0x58
8002f64: 4413 add r3, r2
8002f66: f503 6380 add.w r3, r3, #1024 ; 0x400
8002f6a: 657b str r3, [r7, #84] ; 0x54
8002f6c: 683b ldr r3, [r7, #0]
8002f6e: 891b ldrh r3, [r3, #8]
8002f70: 085b lsrs r3, r3, #1
8002f72: b29b uxth r3, r3
8002f74: 005b lsls r3, r3, #1
8002f76: b29a uxth r2, r3
8002f78: 6d7b ldr r3, [r7, #84] ; 0x54
8002f7a: 801a strh r2, [r3, #0]
8002f7c: 687b ldr r3, [r7, #4]
8002f7e: 653b str r3, [r7, #80] ; 0x50
8002f80: 687b ldr r3, [r7, #4]
8002f82: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8002f86: b29b uxth r3, r3
8002f88: 461a mov r2, r3
8002f8a: 6d3b ldr r3, [r7, #80] ; 0x50
8002f8c: 4413 add r3, r2
8002f8e: 653b str r3, [r7, #80] ; 0x50
8002f90: 683b ldr r3, [r7, #0]
8002f92: 781b ldrb r3, [r3, #0]
8002f94: 011a lsls r2, r3, #4
8002f96: 6d3b ldr r3, [r7, #80] ; 0x50
8002f98: 4413 add r3, r2
8002f9a: f503 6381 add.w r3, r3, #1032 ; 0x408
8002f9e: 64fb str r3, [r7, #76] ; 0x4c
8002fa0: 683b ldr r3, [r7, #0]
8002fa2: 895b ldrh r3, [r3, #10]
8002fa4: 085b lsrs r3, r3, #1
8002fa6: b29b uxth r3, r3
8002fa8: 005b lsls r3, r3, #1
8002faa: b29a uxth r2, r3
8002fac: 6cfb ldr r3, [r7, #76] ; 0x4c
8002fae: 801a strh r2, [r3, #0]
if (ep->is_in == 0U)
8002fb0: 683b ldr r3, [r7, #0]
8002fb2: 785b ldrb r3, [r3, #1]
8002fb4: 2b00 cmp r3, #0
8002fb6: f040 8091 bne.w 80030dc <USB_ActivateEndpoint+0x550>
{
/* Clear the data toggle bits for the endpoint IN/OUT */
PCD_CLEAR_RX_DTOG(USBx, ep->num);
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: 4413 add r3, r2
8002fc4: 881b ldrh r3, [r3, #0]
8002fc6: 87bb strh r3, [r7, #60] ; 0x3c
8002fc8: 8fbb ldrh r3, [r7, #60] ; 0x3c
8002fca: f403 4380 and.w r3, r3, #16384 ; 0x4000
8002fce: 2b00 cmp r3, #0
8002fd0: d01b beq.n 800300a <USB_ActivateEndpoint+0x47e>
8002fd2: 687a ldr r2, [r7, #4]
8002fd4: 683b ldr r3, [r7, #0]
8002fd6: 781b ldrb r3, [r3, #0]
8002fd8: 009b lsls r3, r3, #2
8002fda: 4413 add r3, r2
8002fdc: 881b ldrh r3, [r3, #0]
8002fde: b29b uxth r3, r3
8002fe0: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8002fe4: f023 0370 bic.w r3, r3, #112 ; 0x70
8002fe8: 877b strh r3, [r7, #58] ; 0x3a
8002fea: 687a ldr r2, [r7, #4]
8002fec: 683b ldr r3, [r7, #0]
8002fee: 781b ldrb r3, [r3, #0]
8002ff0: 009b lsls r3, r3, #2
8002ff2: 441a add r2, r3
8002ff4: 8f7b ldrh r3, [r7, #58] ; 0x3a
8002ff6: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8002ffa: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8002ffe: f443 4340 orr.w r3, r3, #49152 ; 0xc000
8003002: f043 0380 orr.w r3, r3, #128 ; 0x80
8003006: b29b uxth r3, r3
8003008: 8013 strh r3, [r2, #0]
PCD_CLEAR_TX_DTOG(USBx, ep->num);
800300a: 687a ldr r2, [r7, #4]
800300c: 683b ldr r3, [r7, #0]
800300e: 781b ldrb r3, [r3, #0]
8003010: 009b lsls r3, r3, #2
8003012: 4413 add r3, r2
8003014: 881b ldrh r3, [r3, #0]
8003016: 873b strh r3, [r7, #56] ; 0x38
8003018: 8f3b ldrh r3, [r7, #56] ; 0x38
800301a: f003 0340 and.w r3, r3, #64 ; 0x40
800301e: 2b00 cmp r3, #0
8003020: d01b beq.n 800305a <USB_ActivateEndpoint+0x4ce>
8003022: 687a ldr r2, [r7, #4]
8003024: 683b ldr r3, [r7, #0]
8003026: 781b ldrb r3, [r3, #0]
8003028: 009b lsls r3, r3, #2
800302a: 4413 add r3, r2
800302c: 881b ldrh r3, [r3, #0]
800302e: b29b uxth r3, r3
8003030: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8003034: f023 0370 bic.w r3, r3, #112 ; 0x70
8003038: 86fb strh r3, [r7, #54] ; 0x36
800303a: 687a ldr r2, [r7, #4]
800303c: 683b ldr r3, [r7, #0]
800303e: 781b ldrb r3, [r3, #0]
8003040: 009b lsls r3, r3, #2
8003042: 441a add r2, r3
8003044: 8efb ldrh r3, [r7, #54] ; 0x36
8003046: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
800304a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
800304e: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8003052: f043 03c0 orr.w r3, r3, #192 ; 0xc0
8003056: b29b uxth r3, r3
8003058: 8013 strh r3, [r2, #0]
PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID);
800305a: 687a ldr r2, [r7, #4]
800305c: 683b ldr r3, [r7, #0]
800305e: 781b ldrb r3, [r3, #0]
8003060: 009b lsls r3, r3, #2
8003062: 4413 add r3, r2
8003064: 881b ldrh r3, [r3, #0]
8003066: b29b uxth r3, r3
8003068: f423 4380 bic.w r3, r3, #16384 ; 0x4000
800306c: f023 0370 bic.w r3, r3, #112 ; 0x70
8003070: 86bb strh r3, [r7, #52] ; 0x34
8003072: 8ebb ldrh r3, [r7, #52] ; 0x34
8003074: f483 5380 eor.w r3, r3, #4096 ; 0x1000
8003078: 86bb strh r3, [r7, #52] ; 0x34
800307a: 8ebb ldrh r3, [r7, #52] ; 0x34
800307c: f483 5300 eor.w r3, r3, #8192 ; 0x2000
8003080: 86bb strh r3, [r7, #52] ; 0x34
8003082: 687a ldr r2, [r7, #4]
8003084: 683b ldr r3, [r7, #0]
8003086: 781b ldrb r3, [r3, #0]
8003088: 009b lsls r3, r3, #2
800308a: 441a add r2, r3
800308c: 8ebb ldrh r3, [r7, #52] ; 0x34
800308e: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8003092: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8003096: f443 4300 orr.w r3, r3, #32768 ; 0x8000
800309a: f043 0380 orr.w r3, r3, #128 ; 0x80
800309e: b29b uxth r3, r3
80030a0: 8013 strh r3, [r2, #0]
PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS);
80030a2: 687a ldr r2, [r7, #4]
80030a4: 683b ldr r3, [r7, #0]
80030a6: 781b ldrb r3, [r3, #0]
80030a8: 009b lsls r3, r3, #2
80030aa: 4413 add r3, r2
80030ac: 881b ldrh r3, [r3, #0]
80030ae: b29b uxth r3, r3
80030b0: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
80030b4: f023 0340 bic.w r3, r3, #64 ; 0x40
80030b8: 867b strh r3, [r7, #50] ; 0x32
80030ba: 687a ldr r2, [r7, #4]
80030bc: 683b ldr r3, [r7, #0]
80030be: 781b ldrb r3, [r3, #0]
80030c0: 009b lsls r3, r3, #2
80030c2: 441a add r2, r3
80030c4: 8e7b ldrh r3, [r7, #50] ; 0x32
80030c6: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
80030ca: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
80030ce: f443 4300 orr.w r3, r3, #32768 ; 0x8000
80030d2: f043 0380 orr.w r3, r3, #128 ; 0x80
80030d6: b29b uxth r3, r3
80030d8: 8013 strh r3, [r2, #0]
80030da: e0ba b.n 8003252 <USB_ActivateEndpoint+0x6c6>
}
else
{
/* Clear the data toggle bits for the endpoint IN/OUT */
PCD_CLEAR_RX_DTOG(USBx, ep->num);
80030dc: 687a ldr r2, [r7, #4]
80030de: 683b ldr r3, [r7, #0]
80030e0: 781b ldrb r3, [r3, #0]
80030e2: 009b lsls r3, r3, #2
80030e4: 4413 add r3, r2
80030e6: 881b ldrh r3, [r3, #0]
80030e8: f8a7 304a strh.w r3, [r7, #74] ; 0x4a
80030ec: f8b7 304a ldrh.w r3, [r7, #74] ; 0x4a
80030f0: f403 4380 and.w r3, r3, #16384 ; 0x4000
80030f4: 2b00 cmp r3, #0
80030f6: d01d beq.n 8003134 <USB_ActivateEndpoint+0x5a8>
80030f8: 687a ldr r2, [r7, #4]
80030fa: 683b ldr r3, [r7, #0]
80030fc: 781b ldrb r3, [r3, #0]
80030fe: 009b lsls r3, r3, #2
8003100: 4413 add r3, r2
8003102: 881b ldrh r3, [r3, #0]
8003104: b29b uxth r3, r3
8003106: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
800310a: f023 0370 bic.w r3, r3, #112 ; 0x70
800310e: f8a7 3048 strh.w r3, [r7, #72] ; 0x48
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: 441a add r2, r3
800311c: f8b7 3048 ldrh.w r3, [r7, #72] ; 0x48
8003120: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8003124: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8003128: f443 4340 orr.w r3, r3, #49152 ; 0xc000
800312c: f043 0380 orr.w r3, r3, #128 ; 0x80
8003130: b29b uxth r3, r3
8003132: 8013 strh r3, [r2, #0]
PCD_CLEAR_TX_DTOG(USBx, ep->num);
8003134: 687a ldr r2, [r7, #4]
8003136: 683b ldr r3, [r7, #0]
8003138: 781b ldrb r3, [r3, #0]
800313a: 009b lsls r3, r3, #2
800313c: 4413 add r3, r2
800313e: 881b ldrh r3, [r3, #0]
8003140: f8a7 3046 strh.w r3, [r7, #70] ; 0x46
8003144: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
8003148: f003 0340 and.w r3, r3, #64 ; 0x40
800314c: 2b00 cmp r3, #0
800314e: d01d beq.n 800318c <USB_ActivateEndpoint+0x600>
8003150: 687a ldr r2, [r7, #4]
8003152: 683b ldr r3, [r7, #0]
8003154: 781b ldrb r3, [r3, #0]
8003156: 009b lsls r3, r3, #2
8003158: 4413 add r3, r2
800315a: 881b ldrh r3, [r3, #0]
800315c: b29b uxth r3, r3
800315e: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8003162: f023 0370 bic.w r3, r3, #112 ; 0x70
8003166: f8a7 3044 strh.w r3, [r7, #68] ; 0x44
800316a: 687a ldr r2, [r7, #4]
800316c: 683b ldr r3, [r7, #0]
800316e: 781b ldrb r3, [r3, #0]
8003170: 009b lsls r3, r3, #2
8003172: 441a add r2, r3
8003174: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
8003178: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
800317c: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8003180: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8003184: f043 03c0 orr.w r3, r3, #192 ; 0xc0
8003188: b29b uxth r3, r3
800318a: 8013 strh r3, [r2, #0]
if (ep->type != EP_TYPE_ISOC)
800318c: 683b ldr r3, [r7, #0]
800318e: 78db ldrb r3, [r3, #3]
8003190: 2b01 cmp r3, #1
8003192: d024 beq.n 80031de <USB_ActivateEndpoint+0x652>
{
/* Configure NAK status for the Endpoint */
PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_NAK);
8003194: 687a ldr r2, [r7, #4]
8003196: 683b ldr r3, [r7, #0]
8003198: 781b ldrb r3, [r3, #0]
800319a: 009b lsls r3, r3, #2
800319c: 4413 add r3, r2
800319e: 881b ldrh r3, [r3, #0]
80031a0: b29b uxth r3, r3
80031a2: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
80031a6: f023 0340 bic.w r3, r3, #64 ; 0x40
80031aa: f8a7 3040 strh.w r3, [r7, #64] ; 0x40
80031ae: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40
80031b2: f083 0320 eor.w r3, r3, #32
80031b6: f8a7 3040 strh.w r3, [r7, #64] ; 0x40
80031ba: 687a ldr r2, [r7, #4]
80031bc: 683b ldr r3, [r7, #0]
80031be: 781b ldrb r3, [r3, #0]
80031c0: 009b lsls r3, r3, #2
80031c2: 441a add r2, r3
80031c4: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40
80031c8: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
80031cc: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
80031d0: f443 4300 orr.w r3, r3, #32768 ; 0x8000
80031d4: f043 0380 orr.w r3, r3, #128 ; 0x80
80031d8: b29b uxth r3, r3
80031da: 8013 strh r3, [r2, #0]
80031dc: e01d b.n 800321a <USB_ActivateEndpoint+0x68e>
}
else
{
/* Configure TX Endpoint to disabled state */
PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS);
80031de: 687a ldr r2, [r7, #4]
80031e0: 683b ldr r3, [r7, #0]
80031e2: 781b ldrb r3, [r3, #0]
80031e4: 009b lsls r3, r3, #2
80031e6: 4413 add r3, r2
80031e8: 881b ldrh r3, [r3, #0]
80031ea: b29b uxth r3, r3
80031ec: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
80031f0: f023 0340 bic.w r3, r3, #64 ; 0x40
80031f4: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
80031f8: 687a ldr r2, [r7, #4]
80031fa: 683b ldr r3, [r7, #0]
80031fc: 781b ldrb r3, [r3, #0]
80031fe: 009b lsls r3, r3, #2
8003200: 441a add r2, r3
8003202: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
8003206: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
800320a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
800320e: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8003212: f043 0380 orr.w r3, r3, #128 ; 0x80
8003216: b29b uxth r3, r3
8003218: 8013 strh r3, [r2, #0]
}
PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS);
800321a: 687a ldr r2, [r7, #4]
800321c: 683b ldr r3, [r7, #0]
800321e: 781b ldrb r3, [r3, #0]
8003220: 009b lsls r3, r3, #2
8003222: 4413 add r3, r2
8003224: 881b ldrh r3, [r3, #0]
8003226: b29b uxth r3, r3
8003228: f423 4380 bic.w r3, r3, #16384 ; 0x4000
800322c: f023 0370 bic.w r3, r3, #112 ; 0x70
8003230: 87fb strh r3, [r7, #62] ; 0x3e
8003232: 687a ldr r2, [r7, #4]
8003234: 683b ldr r3, [r7, #0]
8003236: 781b ldrb r3, [r3, #0]
8003238: 009b lsls r3, r3, #2
800323a: 441a add r2, r3
800323c: 8ffb ldrh r3, [r7, #62] ; 0x3e
800323e: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8003242: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8003246: f443 4300 orr.w r3, r3, #32768 ; 0x8000
800324a: f043 0380 orr.w r3, r3, #128 ; 0x80
800324e: b29b uxth r3, r3
8003250: 8013 strh r3, [r2, #0]
}
}
return ret;
8003252: f897 3067 ldrb.w r3, [r7, #103] ; 0x67
}
8003256: 4618 mov r0, r3
8003258: 376c adds r7, #108 ; 0x6c
800325a: 46bd mov sp, r7
800325c: bc80 pop {r7}
800325e: 4770 bx lr
08003260 <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)
{
8003260: b480 push {r7}
8003262: b08d sub sp, #52 ; 0x34
8003264: af00 add r7, sp, #0
8003266: 6078 str r0, [r7, #4]
8003268: 6039 str r1, [r7, #0]
if (ep->doublebuffer == 0U)
800326a: 683b ldr r3, [r7, #0]
800326c: 7b1b ldrb r3, [r3, #12]
800326e: 2b00 cmp r3, #0
8003270: f040 808e bne.w 8003390 <USB_DeactivateEndpoint+0x130>
{
if (ep->is_in != 0U)
8003274: 683b ldr r3, [r7, #0]
8003276: 785b ldrb r3, [r3, #1]
8003278: 2b00 cmp r3, #0
800327a: d044 beq.n 8003306 <USB_DeactivateEndpoint+0xa6>
{
PCD_CLEAR_TX_DTOG(USBx, ep->num);
800327c: 687a ldr r2, [r7, #4]
800327e: 683b ldr r3, [r7, #0]
8003280: 781b ldrb r3, [r3, #0]
8003282: 009b lsls r3, r3, #2
8003284: 4413 add r3, r2
8003286: 881b ldrh r3, [r3, #0]
8003288: 81bb strh r3, [r7, #12]
800328a: 89bb ldrh r3, [r7, #12]
800328c: f003 0340 and.w r3, r3, #64 ; 0x40
8003290: 2b00 cmp r3, #0
8003292: d01b beq.n 80032cc <USB_DeactivateEndpoint+0x6c>
8003294: 687a ldr r2, [r7, #4]
8003296: 683b ldr r3, [r7, #0]
8003298: 781b ldrb r3, [r3, #0]
800329a: 009b lsls r3, r3, #2
800329c: 4413 add r3, r2
800329e: 881b ldrh r3, [r3, #0]
80032a0: b29b uxth r3, r3
80032a2: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
80032a6: f023 0370 bic.w r3, r3, #112 ; 0x70
80032aa: 817b strh r3, [r7, #10]
80032ac: 687a ldr r2, [r7, #4]
80032ae: 683b ldr r3, [r7, #0]
80032b0: 781b ldrb r3, [r3, #0]
80032b2: 009b lsls r3, r3, #2
80032b4: 441a add r2, r3
80032b6: 897b ldrh r3, [r7, #10]
80032b8: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
80032bc: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
80032c0: f443 4300 orr.w r3, r3, #32768 ; 0x8000
80032c4: f043 03c0 orr.w r3, r3, #192 ; 0xc0
80032c8: b29b uxth r3, r3
80032ca: 8013 strh r3, [r2, #0]
/* Configure DISABLE status for the Endpoint*/
PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS);
80032cc: 687a ldr r2, [r7, #4]
80032ce: 683b ldr r3, [r7, #0]
80032d0: 781b ldrb r3, [r3, #0]
80032d2: 009b lsls r3, r3, #2
80032d4: 4413 add r3, r2
80032d6: 881b ldrh r3, [r3, #0]
80032d8: b29b uxth r3, r3
80032da: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
80032de: f023 0340 bic.w r3, r3, #64 ; 0x40
80032e2: 813b strh r3, [r7, #8]
80032e4: 687a ldr r2, [r7, #4]
80032e6: 683b ldr r3, [r7, #0]
80032e8: 781b ldrb r3, [r3, #0]
80032ea: 009b lsls r3, r3, #2
80032ec: 441a add r2, r3
80032ee: 893b ldrh r3, [r7, #8]
80032f0: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
80032f4: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
80032f8: f443 4300 orr.w r3, r3, #32768 ; 0x8000
80032fc: f043 0380 orr.w r3, r3, #128 ; 0x80
8003300: b29b uxth r3, r3
8003302: 8013 strh r3, [r2, #0]
8003304: e192 b.n 800362c <USB_DeactivateEndpoint+0x3cc>
}
else
{
PCD_CLEAR_RX_DTOG(USBx, ep->num);
8003306: 687a ldr r2, [r7, #4]
8003308: 683b ldr r3, [r7, #0]
800330a: 781b ldrb r3, [r3, #0]
800330c: 009b lsls r3, r3, #2
800330e: 4413 add r3, r2
8003310: 881b ldrh r3, [r3, #0]
8003312: 827b strh r3, [r7, #18]
8003314: 8a7b ldrh r3, [r7, #18]
8003316: f403 4380 and.w r3, r3, #16384 ; 0x4000
800331a: 2b00 cmp r3, #0
800331c: d01b beq.n 8003356 <USB_DeactivateEndpoint+0xf6>
800331e: 687a ldr r2, [r7, #4]
8003320: 683b ldr r3, [r7, #0]
8003322: 781b ldrb r3, [r3, #0]
8003324: 009b lsls r3, r3, #2
8003326: 4413 add r3, r2
8003328: 881b ldrh r3, [r3, #0]
800332a: b29b uxth r3, r3
800332c: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8003330: f023 0370 bic.w r3, r3, #112 ; 0x70
8003334: 823b strh r3, [r7, #16]
8003336: 687a ldr r2, [r7, #4]
8003338: 683b ldr r3, [r7, #0]
800333a: 781b ldrb r3, [r3, #0]
800333c: 009b lsls r3, r3, #2
800333e: 441a add r2, r3
8003340: 8a3b ldrh r3, [r7, #16]
8003342: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8003346: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
800334a: f443 4340 orr.w r3, r3, #49152 ; 0xc000
800334e: f043 0380 orr.w r3, r3, #128 ; 0x80
8003352: b29b uxth r3, r3
8003354: 8013 strh r3, [r2, #0]
/* Configure DISABLE status for the Endpoint*/
PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS);
8003356: 687a ldr r2, [r7, #4]
8003358: 683b ldr r3, [r7, #0]
800335a: 781b ldrb r3, [r3, #0]
800335c: 009b lsls r3, r3, #2
800335e: 4413 add r3, r2
8003360: 881b ldrh r3, [r3, #0]
8003362: b29b uxth r3, r3
8003364: f423 4380 bic.w r3, r3, #16384 ; 0x4000
8003368: f023 0370 bic.w r3, r3, #112 ; 0x70
800336c: 81fb strh r3, [r7, #14]
800336e: 687a ldr r2, [r7, #4]
8003370: 683b ldr r3, [r7, #0]
8003372: 781b ldrb r3, [r3, #0]
8003374: 009b lsls r3, r3, #2
8003376: 441a add r2, r3
8003378: 89fb ldrh r3, [r7, #14]
800337a: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
800337e: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8003382: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8003386: f043 0380 orr.w r3, r3, #128 ; 0x80
800338a: b29b uxth r3, r3
800338c: 8013 strh r3, [r2, #0]
800338e: e14d b.n 800362c <USB_DeactivateEndpoint+0x3cc>
}
}
/*Double Buffer*/
else
{
if (ep->is_in == 0U)
8003390: 683b ldr r3, [r7, #0]
8003392: 785b ldrb r3, [r3, #1]
8003394: 2b00 cmp r3, #0
8003396: f040 80a5 bne.w 80034e4 <USB_DeactivateEndpoint+0x284>
{
/* Clear the data toggle bits for the endpoint IN/OUT*/
PCD_CLEAR_RX_DTOG(USBx, ep->num);
800339a: 687a ldr r2, [r7, #4]
800339c: 683b ldr r3, [r7, #0]
800339e: 781b ldrb r3, [r3, #0]
80033a0: 009b lsls r3, r3, #2
80033a2: 4413 add r3, r2
80033a4: 881b ldrh r3, [r3, #0]
80033a6: 843b strh r3, [r7, #32]
80033a8: 8c3b ldrh r3, [r7, #32]
80033aa: f403 4380 and.w r3, r3, #16384 ; 0x4000
80033ae: 2b00 cmp r3, #0
80033b0: d01b beq.n 80033ea <USB_DeactivateEndpoint+0x18a>
80033b2: 687a ldr r2, [r7, #4]
80033b4: 683b ldr r3, [r7, #0]
80033b6: 781b ldrb r3, [r3, #0]
80033b8: 009b lsls r3, r3, #2
80033ba: 4413 add r3, r2
80033bc: 881b ldrh r3, [r3, #0]
80033be: b29b uxth r3, r3
80033c0: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
80033c4: f023 0370 bic.w r3, r3, #112 ; 0x70
80033c8: 83fb strh r3, [r7, #30]
80033ca: 687a ldr r2, [r7, #4]
80033cc: 683b ldr r3, [r7, #0]
80033ce: 781b ldrb r3, [r3, #0]
80033d0: 009b lsls r3, r3, #2
80033d2: 441a add r2, r3
80033d4: 8bfb ldrh r3, [r7, #30]
80033d6: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
80033da: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
80033de: f443 4340 orr.w r3, r3, #49152 ; 0xc000
80033e2: f043 0380 orr.w r3, r3, #128 ; 0x80
80033e6: b29b uxth r3, r3
80033e8: 8013 strh r3, [r2, #0]
PCD_CLEAR_TX_DTOG(USBx, ep->num);
80033ea: 687a ldr r2, [r7, #4]
80033ec: 683b ldr r3, [r7, #0]
80033ee: 781b ldrb r3, [r3, #0]
80033f0: 009b lsls r3, r3, #2
80033f2: 4413 add r3, r2
80033f4: 881b ldrh r3, [r3, #0]
80033f6: 83bb strh r3, [r7, #28]
80033f8: 8bbb ldrh r3, [r7, #28]
80033fa: f003 0340 and.w r3, r3, #64 ; 0x40
80033fe: 2b00 cmp r3, #0
8003400: d01b beq.n 800343a <USB_DeactivateEndpoint+0x1da>
8003402: 687a ldr r2, [r7, #4]
8003404: 683b ldr r3, [r7, #0]
8003406: 781b ldrb r3, [r3, #0]
8003408: 009b lsls r3, r3, #2
800340a: 4413 add r3, r2
800340c: 881b ldrh r3, [r3, #0]
800340e: b29b uxth r3, r3
8003410: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8003414: f023 0370 bic.w r3, r3, #112 ; 0x70
8003418: 837b strh r3, [r7, #26]
800341a: 687a ldr r2, [r7, #4]
800341c: 683b ldr r3, [r7, #0]
800341e: 781b ldrb r3, [r3, #0]
8003420: 009b lsls r3, r3, #2
8003422: 441a add r2, r3
8003424: 8b7b ldrh r3, [r7, #26]
8003426: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
800342a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
800342e: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8003432: f043 03c0 orr.w r3, r3, #192 ; 0xc0
8003436: b29b uxth r3, r3
8003438: 8013 strh r3, [r2, #0]
/* Reset value of the data toggle bits for the endpoint out*/
PCD_TX_DTOG(USBx, ep->num);
800343a: 687a ldr r2, [r7, #4]
800343c: 683b ldr r3, [r7, #0]
800343e: 781b ldrb r3, [r3, #0]
8003440: 009b lsls r3, r3, #2
8003442: 4413 add r3, r2
8003444: 881b ldrh r3, [r3, #0]
8003446: b29b uxth r3, r3
8003448: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
800344c: f023 0370 bic.w r3, r3, #112 ; 0x70
8003450: 833b strh r3, [r7, #24]
8003452: 687a ldr r2, [r7, #4]
8003454: 683b ldr r3, [r7, #0]
8003456: 781b ldrb r3, [r3, #0]
8003458: 009b lsls r3, r3, #2
800345a: 441a add r2, r3
800345c: 8b3b ldrh r3, [r7, #24]
800345e: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8003462: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8003466: f443 4300 orr.w r3, r3, #32768 ; 0x8000
800346a: f043 03c0 orr.w r3, r3, #192 ; 0xc0
800346e: b29b uxth r3, r3
8003470: 8013 strh r3, [r2, #0]
PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS);
8003472: 687a ldr r2, [r7, #4]
8003474: 683b ldr r3, [r7, #0]
8003476: 781b ldrb r3, [r3, #0]
8003478: 009b lsls r3, r3, #2
800347a: 4413 add r3, r2
800347c: 881b ldrh r3, [r3, #0]
800347e: b29b uxth r3, r3
8003480: f423 4380 bic.w r3, r3, #16384 ; 0x4000
8003484: f023 0370 bic.w r3, r3, #112 ; 0x70
8003488: 82fb strh r3, [r7, #22]
800348a: 687a ldr r2, [r7, #4]
800348c: 683b ldr r3, [r7, #0]
800348e: 781b ldrb r3, [r3, #0]
8003490: 009b lsls r3, r3, #2
8003492: 441a add r2, r3
8003494: 8afb ldrh r3, [r7, #22]
8003496: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
800349a: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
800349e: f443 4300 orr.w r3, r3, #32768 ; 0x8000
80034a2: f043 0380 orr.w r3, r3, #128 ; 0x80
80034a6: b29b uxth r3, r3
80034a8: 8013 strh r3, [r2, #0]
PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS);
80034aa: 687a ldr r2, [r7, #4]
80034ac: 683b ldr r3, [r7, #0]
80034ae: 781b ldrb r3, [r3, #0]
80034b0: 009b lsls r3, r3, #2
80034b2: 4413 add r3, r2
80034b4: 881b ldrh r3, [r3, #0]
80034b6: b29b uxth r3, r3
80034b8: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
80034bc: f023 0340 bic.w r3, r3, #64 ; 0x40
80034c0: 82bb strh r3, [r7, #20]
80034c2: 687a ldr r2, [r7, #4]
80034c4: 683b ldr r3, [r7, #0]
80034c6: 781b ldrb r3, [r3, #0]
80034c8: 009b lsls r3, r3, #2
80034ca: 441a add r2, r3
80034cc: 8abb ldrh r3, [r7, #20]
80034ce: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
80034d2: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
80034d6: f443 4300 orr.w r3, r3, #32768 ; 0x8000
80034da: f043 0380 orr.w r3, r3, #128 ; 0x80
80034de: b29b uxth r3, r3
80034e0: 8013 strh r3, [r2, #0]
80034e2: e0a3 b.n 800362c <USB_DeactivateEndpoint+0x3cc>
}
else
{
/* Clear the data toggle bits for the endpoint IN/OUT*/
PCD_CLEAR_RX_DTOG(USBx, ep->num);
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: 85fb strh r3, [r7, #46] ; 0x2e
80034f2: 8dfb ldrh r3, [r7, #46] ; 0x2e
80034f4: f403 4380 and.w r3, r3, #16384 ; 0x4000
80034f8: 2b00 cmp r3, #0
80034fa: d01b beq.n 8003534 <USB_DeactivateEndpoint+0x2d4>
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: 4413 add r3, r2
8003506: 881b ldrh r3, [r3, #0]
8003508: b29b uxth r3, r3
800350a: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
800350e: f023 0370 bic.w r3, r3, #112 ; 0x70
8003512: 85bb strh r3, [r7, #44] ; 0x2c
8003514: 687a ldr r2, [r7, #4]
8003516: 683b ldr r3, [r7, #0]
8003518: 781b ldrb r3, [r3, #0]
800351a: 009b lsls r3, r3, #2
800351c: 441a add r2, r3
800351e: 8dbb ldrh r3, [r7, #44] ; 0x2c
8003520: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8003524: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8003528: f443 4340 orr.w r3, r3, #49152 ; 0xc000
800352c: f043 0380 orr.w r3, r3, #128 ; 0x80
8003530: b29b uxth r3, r3
8003532: 8013 strh r3, [r2, #0]
PCD_CLEAR_TX_DTOG(USBx, ep->num);
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: 4413 add r3, r2
800353e: 881b ldrh r3, [r3, #0]
8003540: 857b strh r3, [r7, #42] ; 0x2a
8003542: 8d7b ldrh r3, [r7, #42] ; 0x2a
8003544: f003 0340 and.w r3, r3, #64 ; 0x40
8003548: 2b00 cmp r3, #0
800354a: d01b beq.n 8003584 <USB_DeactivateEndpoint+0x324>
800354c: 687a ldr r2, [r7, #4]
800354e: 683b ldr r3, [r7, #0]
8003550: 781b ldrb r3, [r3, #0]
8003552: 009b lsls r3, r3, #2
8003554: 4413 add r3, r2
8003556: 881b ldrh r3, [r3, #0]
8003558: b29b uxth r3, r3
800355a: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
800355e: f023 0370 bic.w r3, r3, #112 ; 0x70
8003562: 853b strh r3, [r7, #40] ; 0x28
8003564: 687a ldr r2, [r7, #4]
8003566: 683b ldr r3, [r7, #0]
8003568: 781b ldrb r3, [r3, #0]
800356a: 009b lsls r3, r3, #2
800356c: 441a add r2, r3
800356e: 8d3b ldrh r3, [r7, #40] ; 0x28
8003570: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8003574: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8003578: f443 4300 orr.w r3, r3, #32768 ; 0x8000
800357c: f043 03c0 orr.w r3, r3, #192 ; 0xc0
8003580: b29b uxth r3, r3
8003582: 8013 strh r3, [r2, #0]
PCD_RX_DTOG(USBx, ep->num);
8003584: 687a ldr r2, [r7, #4]
8003586: 683b ldr r3, [r7, #0]
8003588: 781b ldrb r3, [r3, #0]
800358a: 009b lsls r3, r3, #2
800358c: 4413 add r3, r2
800358e: 881b ldrh r3, [r3, #0]
8003590: b29b uxth r3, r3
8003592: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8003596: f023 0370 bic.w r3, r3, #112 ; 0x70
800359a: 84fb strh r3, [r7, #38] ; 0x26
800359c: 687a ldr r2, [r7, #4]
800359e: 683b ldr r3, [r7, #0]
80035a0: 781b ldrb r3, [r3, #0]
80035a2: 009b lsls r3, r3, #2
80035a4: 441a add r2, r3
80035a6: 8cfb ldrh r3, [r7, #38] ; 0x26
80035a8: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
80035ac: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
80035b0: f443 4340 orr.w r3, r3, #49152 ; 0xc000
80035b4: f043 0380 orr.w r3, r3, #128 ; 0x80
80035b8: b29b uxth r3, r3
80035ba: 8013 strh r3, [r2, #0]
/* Configure DISABLE status for the Endpoint*/
PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_DIS);
80035bc: 687a ldr r2, [r7, #4]
80035be: 683b ldr r3, [r7, #0]
80035c0: 781b ldrb r3, [r3, #0]
80035c2: 009b lsls r3, r3, #2
80035c4: 4413 add r3, r2
80035c6: 881b ldrh r3, [r3, #0]
80035c8: b29b uxth r3, r3
80035ca: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
80035ce: f023 0340 bic.w r3, r3, #64 ; 0x40
80035d2: 84bb strh r3, [r7, #36] ; 0x24
80035d4: 687a ldr r2, [r7, #4]
80035d6: 683b ldr r3, [r7, #0]
80035d8: 781b ldrb r3, [r3, #0]
80035da: 009b lsls r3, r3, #2
80035dc: 441a add r2, r3
80035de: 8cbb ldrh r3, [r7, #36] ; 0x24
80035e0: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
80035e4: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
80035e8: f443 4300 orr.w r3, r3, #32768 ; 0x8000
80035ec: f043 0380 orr.w r3, r3, #128 ; 0x80
80035f0: b29b uxth r3, r3
80035f2: 8013 strh r3, [r2, #0]
PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_DIS);
80035f4: 687a ldr r2, [r7, #4]
80035f6: 683b ldr r3, [r7, #0]
80035f8: 781b ldrb r3, [r3, #0]
80035fa: 009b lsls r3, r3, #2
80035fc: 4413 add r3, r2
80035fe: 881b ldrh r3, [r3, #0]
8003600: b29b uxth r3, r3
8003602: f423 4380 bic.w r3, r3, #16384 ; 0x4000
8003606: f023 0370 bic.w r3, r3, #112 ; 0x70
800360a: 847b strh r3, [r7, #34] ; 0x22
800360c: 687a ldr r2, [r7, #4]
800360e: 683b ldr r3, [r7, #0]
8003610: 781b ldrb r3, [r3, #0]
8003612: 009b lsls r3, r3, #2
8003614: 441a add r2, r3
8003616: 8c7b ldrh r3, [r7, #34] ; 0x22
8003618: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
800361c: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8003620: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8003624: f043 0380 orr.w r3, r3, #128 ; 0x80
8003628: b29b uxth r3, r3
800362a: 8013 strh r3, [r2, #0]
}
}
return HAL_OK;
800362c: 2300 movs r3, #0
}
800362e: 4618 mov r0, r3
8003630: 3734 adds r7, #52 ; 0x34
8003632: 46bd mov sp, r7
8003634: bc80 pop {r7}
8003636: 4770 bx lr
08003638 <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)
{
8003638: b580 push {r7, lr}
800363a: b0c4 sub sp, #272 ; 0x110
800363c: af00 add r7, sp, #0
800363e: 1d3b adds r3, r7, #4
8003640: 6018 str r0, [r3, #0]
8003642: 463b mov r3, r7
8003644: 6019 str r1, [r3, #0]
uint32_t len;
uint16_t pmabuffer;
uint16_t wEPVal;
/* IN endpoint */
if (ep->is_in == 1U)
8003646: 463b mov r3, r7
8003648: 681b ldr r3, [r3, #0]
800364a: 785b ldrb r3, [r3, #1]
800364c: 2b01 cmp r3, #1
800364e: f040 8557 bne.w 8004100 <USB_EPStartXfer+0xac8>
{
/*Multi packet transfer*/
if (ep->xfer_len > ep->maxpacket)
8003652: 463b mov r3, r7
8003654: 681b ldr r3, [r3, #0]
8003656: 699a ldr r2, [r3, #24]
8003658: 463b mov r3, r7
800365a: 681b ldr r3, [r3, #0]
800365c: 691b ldr r3, [r3, #16]
800365e: 429a cmp r2, r3
8003660: d905 bls.n 800366e <USB_EPStartXfer+0x36>
{
len = ep->maxpacket;
8003662: 463b mov r3, r7
8003664: 681b ldr r3, [r3, #0]
8003666: 691b ldr r3, [r3, #16]
8003668: f8c7 310c str.w r3, [r7, #268] ; 0x10c
800366c: e004 b.n 8003678 <USB_EPStartXfer+0x40>
}
else
{
len = ep->xfer_len;
800366e: 463b mov r3, r7
8003670: 681b ldr r3, [r3, #0]
8003672: 699b ldr r3, [r3, #24]
8003674: f8c7 310c str.w r3, [r7, #268] ; 0x10c
}
/* configure and validate Tx endpoint */
if (ep->doublebuffer == 0U)
8003678: 463b mov r3, r7
800367a: 681b ldr r3, [r3, #0]
800367c: 7b1b ldrb r3, [r3, #12]
800367e: 2b00 cmp r3, #0
8003680: d12c bne.n 80036dc <USB_EPStartXfer+0xa4>
{
USB_WritePMA(USBx, ep->xfer_buff, ep->pmaadress, (uint16_t)len);
8003682: 463b mov r3, r7
8003684: 681b ldr r3, [r3, #0]
8003686: 6959 ldr r1, [r3, #20]
8003688: 463b mov r3, r7
800368a: 681b ldr r3, [r3, #0]
800368c: 88da ldrh r2, [r3, #6]
800368e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003692: b29b uxth r3, r3
8003694: 1d38 adds r0, r7, #4
8003696: 6800 ldr r0, [r0, #0]
8003698: f001 fa2c bl 8004af4 <USB_WritePMA>
PCD_SET_EP_TX_CNT(USBx, ep->num, len);
800369c: 1d3b adds r3, r7, #4
800369e: 681b ldr r3, [r3, #0]
80036a0: 617b str r3, [r7, #20]
80036a2: 1d3b adds r3, r7, #4
80036a4: 681b ldr r3, [r3, #0]
80036a6: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
80036aa: b29b uxth r3, r3
80036ac: 461a mov r2, r3
80036ae: 697b ldr r3, [r7, #20]
80036b0: 4413 add r3, r2
80036b2: 617b str r3, [r7, #20]
80036b4: 463b mov r3, r7
80036b6: 681b ldr r3, [r3, #0]
80036b8: 781b ldrb r3, [r3, #0]
80036ba: 011a lsls r2, r3, #4
80036bc: 697b ldr r3, [r7, #20]
80036be: 4413 add r3, r2
80036c0: f203 4204 addw r2, r3, #1028 ; 0x404
80036c4: f107 0310 add.w r3, r7, #16
80036c8: 601a str r2, [r3, #0]
80036ca: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
80036ce: b29a uxth r2, r3
80036d0: f107 0310 add.w r3, r7, #16
80036d4: 681b ldr r3, [r3, #0]
80036d6: 801a strh r2, [r3, #0]
80036d8: f000 bcdd b.w 8004096 <USB_EPStartXfer+0xa5e>
}
else
{
/* double buffer bulk management */
if (ep->type == EP_TYPE_BULK)
80036dc: 463b mov r3, r7
80036de: 681b ldr r3, [r3, #0]
80036e0: 78db ldrb r3, [r3, #3]
80036e2: 2b02 cmp r3, #2
80036e4: f040 8347 bne.w 8003d76 <USB_EPStartXfer+0x73e>
{
if (ep->xfer_len_db > ep->maxpacket)
80036e8: 463b mov r3, r7
80036ea: 681b ldr r3, [r3, #0]
80036ec: 6a1a ldr r2, [r3, #32]
80036ee: 463b mov r3, r7
80036f0: 681b ldr r3, [r3, #0]
80036f2: 691b ldr r3, [r3, #16]
80036f4: 429a cmp r2, r3
80036f6: f240 82eb bls.w 8003cd0 <USB_EPStartXfer+0x698>
{
/* enable double buffer */
PCD_SET_EP_DBUF(USBx, ep->num);
80036fa: 1d3b adds r3, r7, #4
80036fc: 681a ldr r2, [r3, #0]
80036fe: 463b mov r3, r7
8003700: 681b ldr r3, [r3, #0]
8003702: 781b ldrb r3, [r3, #0]
8003704: 009b lsls r3, r3, #2
8003706: 4413 add r3, r2
8003708: 881b ldrh r3, [r3, #0]
800370a: b29b uxth r3, r3
800370c: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8003710: f023 0370 bic.w r3, r3, #112 ; 0x70
8003714: f8a7 305a strh.w r3, [r7, #90] ; 0x5a
8003718: 1d3b adds r3, r7, #4
800371a: 681a ldr r2, [r3, #0]
800371c: 463b mov r3, r7
800371e: 681b ldr r3, [r3, #0]
8003720: 781b ldrb r3, [r3, #0]
8003722: 009b lsls r3, r3, #2
8003724: 441a add r2, r3
8003726: f8b7 305a ldrh.w r3, [r7, #90] ; 0x5a
800372a: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
800372e: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8003732: f443 4301 orr.w r3, r3, #33024 ; 0x8100
8003736: f043 0380 orr.w r3, r3, #128 ; 0x80
800373a: b29b uxth r3, r3
800373c: 8013 strh r3, [r2, #0]
/* each Time to write in PMA xfer_len_db will */
ep->xfer_len_db -= len;
800373e: 463b mov r3, r7
8003740: 681b ldr r3, [r3, #0]
8003742: 6a1a ldr r2, [r3, #32]
8003744: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003748: 1ad2 subs r2, r2, r3
800374a: 463b mov r3, r7
800374c: 681b ldr r3, [r3, #0]
800374e: 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)
8003750: 1d3b adds r3, r7, #4
8003752: 681a ldr r2, [r3, #0]
8003754: 463b mov r3, r7
8003756: 681b ldr r3, [r3, #0]
8003758: 781b ldrb r3, [r3, #0]
800375a: 009b lsls r3, r3, #2
800375c: 4413 add r3, r2
800375e: 881b ldrh r3, [r3, #0]
8003760: b29b uxth r3, r3
8003762: f003 0340 and.w r3, r3, #64 ; 0x40
8003766: 2b00 cmp r3, #0
8003768: f000 8159 beq.w 8003a1e <USB_EPStartXfer+0x3e6>
{
/* Set the Double buffer counter for pmabuffer1 */
PCD_SET_EP_DBUF1_CNT(USBx, ep->num, ep->is_in, len);
800376c: 1d3b adds r3, r7, #4
800376e: 681b ldr r3, [r3, #0]
8003770: 637b str r3, [r7, #52] ; 0x34
8003772: 463b mov r3, r7
8003774: 681b ldr r3, [r3, #0]
8003776: 785b ldrb r3, [r3, #1]
8003778: 2b00 cmp r3, #0
800377a: d164 bne.n 8003846 <USB_EPStartXfer+0x20e>
800377c: 1d3b adds r3, r7, #4
800377e: 681b ldr r3, [r3, #0]
8003780: 62fb str r3, [r7, #44] ; 0x2c
8003782: 1d3b adds r3, r7, #4
8003784: 681b ldr r3, [r3, #0]
8003786: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
800378a: b29b uxth r3, r3
800378c: 461a mov r2, r3
800378e: 6afb ldr r3, [r7, #44] ; 0x2c
8003790: 4413 add r3, r2
8003792: 62fb str r3, [r7, #44] ; 0x2c
8003794: 463b mov r3, r7
8003796: 681b ldr r3, [r3, #0]
8003798: 781b ldrb r3, [r3, #0]
800379a: 011a lsls r2, r3, #4
800379c: 6afb ldr r3, [r7, #44] ; 0x2c
800379e: 4413 add r3, r2
80037a0: f203 430c addw r3, r3, #1036 ; 0x40c
80037a4: 62bb str r3, [r7, #40] ; 0x28
80037a6: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
80037aa: 2b00 cmp r3, #0
80037ac: d112 bne.n 80037d4 <USB_EPStartXfer+0x19c>
80037ae: 6abb ldr r3, [r7, #40] ; 0x28
80037b0: 881b ldrh r3, [r3, #0]
80037b2: b29b uxth r3, r3
80037b4: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
80037b8: b29a uxth r2, r3
80037ba: 6abb ldr r3, [r7, #40] ; 0x28
80037bc: 801a strh r2, [r3, #0]
80037be: 6abb ldr r3, [r7, #40] ; 0x28
80037c0: 881b ldrh r3, [r3, #0]
80037c2: b29b uxth r3, r3
80037c4: ea6f 4343 mvn.w r3, r3, lsl #17
80037c8: ea6f 4353 mvn.w r3, r3, lsr #17
80037cc: b29a uxth r2, r3
80037ce: 6abb ldr r3, [r7, #40] ; 0x28
80037d0: 801a strh r2, [r3, #0]
80037d2: e054 b.n 800387e <USB_EPStartXfer+0x246>
80037d4: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
80037d8: 2b3e cmp r3, #62 ; 0x3e
80037da: d817 bhi.n 800380c <USB_EPStartXfer+0x1d4>
80037dc: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
80037e0: 085b lsrs r3, r3, #1
80037e2: f8c7 3104 str.w r3, [r7, #260] ; 0x104
80037e6: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
80037ea: f003 0301 and.w r3, r3, #1
80037ee: 2b00 cmp r3, #0
80037f0: d004 beq.n 80037fc <USB_EPStartXfer+0x1c4>
80037f2: f8d7 3104 ldr.w r3, [r7, #260] ; 0x104
80037f6: 3301 adds r3, #1
80037f8: f8c7 3104 str.w r3, [r7, #260] ; 0x104
80037fc: f8d7 3104 ldr.w r3, [r7, #260] ; 0x104
8003800: b29b uxth r3, r3
8003802: 029b lsls r3, r3, #10
8003804: b29a uxth r2, r3
8003806: 6abb ldr r3, [r7, #40] ; 0x28
8003808: 801a strh r2, [r3, #0]
800380a: e038 b.n 800387e <USB_EPStartXfer+0x246>
800380c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003810: 095b lsrs r3, r3, #5
8003812: f8c7 3104 str.w r3, [r7, #260] ; 0x104
8003816: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
800381a: f003 031f and.w r3, r3, #31
800381e: 2b00 cmp r3, #0
8003820: d104 bne.n 800382c <USB_EPStartXfer+0x1f4>
8003822: f8d7 3104 ldr.w r3, [r7, #260] ; 0x104
8003826: 3b01 subs r3, #1
8003828: f8c7 3104 str.w r3, [r7, #260] ; 0x104
800382c: f8d7 3104 ldr.w r3, [r7, #260] ; 0x104
8003830: b29b uxth r3, r3
8003832: 029b lsls r3, r3, #10
8003834: b29b uxth r3, r3
8003836: ea6f 4343 mvn.w r3, r3, lsl #17
800383a: ea6f 4353 mvn.w r3, r3, lsr #17
800383e: b29a uxth r2, r3
8003840: 6abb ldr r3, [r7, #40] ; 0x28
8003842: 801a strh r2, [r3, #0]
8003844: e01b b.n 800387e <USB_EPStartXfer+0x246>
8003846: 463b mov r3, r7
8003848: 681b ldr r3, [r3, #0]
800384a: 785b ldrb r3, [r3, #1]
800384c: 2b01 cmp r3, #1
800384e: d116 bne.n 800387e <USB_EPStartXfer+0x246>
8003850: 1d3b adds r3, r7, #4
8003852: 681b ldr r3, [r3, #0]
8003854: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8003858: b29b uxth r3, r3
800385a: 461a mov r2, r3
800385c: 6b7b ldr r3, [r7, #52] ; 0x34
800385e: 4413 add r3, r2
8003860: 637b str r3, [r7, #52] ; 0x34
8003862: 463b mov r3, r7
8003864: 681b ldr r3, [r3, #0]
8003866: 781b ldrb r3, [r3, #0]
8003868: 011a lsls r2, r3, #4
800386a: 6b7b ldr r3, [r7, #52] ; 0x34
800386c: 4413 add r3, r2
800386e: f203 430c addw r3, r3, #1036 ; 0x40c
8003872: 633b str r3, [r7, #48] ; 0x30
8003874: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003878: b29a uxth r2, r3
800387a: 6b3b ldr r3, [r7, #48] ; 0x30
800387c: 801a strh r2, [r3, #0]
pmabuffer = ep->pmaaddr1;
800387e: 463b mov r3, r7
8003880: 681b ldr r3, [r3, #0]
8003882: 895b ldrh r3, [r3, #10]
8003884: f8a7 310a strh.w r3, [r7, #266] ; 0x10a
/* Write the user buffer to USB PMA */
USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len);
8003888: 463b mov r3, r7
800388a: 681b ldr r3, [r3, #0]
800388c: 6959 ldr r1, [r3, #20]
800388e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003892: b29b uxth r3, r3
8003894: f8b7 210a ldrh.w r2, [r7, #266] ; 0x10a
8003898: 1d38 adds r0, r7, #4
800389a: 6800 ldr r0, [r0, #0]
800389c: f001 f92a bl 8004af4 <USB_WritePMA>
ep->xfer_buff += len;
80038a0: 463b mov r3, r7
80038a2: 681b ldr r3, [r3, #0]
80038a4: 695a ldr r2, [r3, #20]
80038a6: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
80038aa: 441a add r2, r3
80038ac: 463b mov r3, r7
80038ae: 681b ldr r3, [r3, #0]
80038b0: 615a str r2, [r3, #20]
if (ep->xfer_len_db > ep->maxpacket)
80038b2: 463b mov r3, r7
80038b4: 681b ldr r3, [r3, #0]
80038b6: 6a1a ldr r2, [r3, #32]
80038b8: 463b mov r3, r7
80038ba: 681b ldr r3, [r3, #0]
80038bc: 691b ldr r3, [r3, #16]
80038be: 429a cmp r2, r3
80038c0: d909 bls.n 80038d6 <USB_EPStartXfer+0x29e>
{
ep->xfer_len_db -= len;
80038c2: 463b mov r3, r7
80038c4: 681b ldr r3, [r3, #0]
80038c6: 6a1a ldr r2, [r3, #32]
80038c8: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
80038cc: 1ad2 subs r2, r2, r3
80038ce: 463b mov r3, r7
80038d0: 681b ldr r3, [r3, #0]
80038d2: 621a str r2, [r3, #32]
80038d4: e008 b.n 80038e8 <USB_EPStartXfer+0x2b0>
}
else
{
len = ep->xfer_len_db;
80038d6: 463b mov r3, r7
80038d8: 681b ldr r3, [r3, #0]
80038da: 6a1b ldr r3, [r3, #32]
80038dc: f8c7 310c str.w r3, [r7, #268] ; 0x10c
ep->xfer_len_db = 0U;
80038e0: 463b mov r3, r7
80038e2: 681b ldr r3, [r3, #0]
80038e4: 2200 movs r2, #0
80038e6: 621a str r2, [r3, #32]
}
/* Set the Double buffer counter for pmabuffer0 */
PCD_SET_EP_DBUF0_CNT(USBx, ep->num, ep->is_in, len);
80038e8: 463b mov r3, r7
80038ea: 681b ldr r3, [r3, #0]
80038ec: 785b ldrb r3, [r3, #1]
80038ee: 2b00 cmp r3, #0
80038f0: d164 bne.n 80039bc <USB_EPStartXfer+0x384>
80038f2: 1d3b adds r3, r7, #4
80038f4: 681b ldr r3, [r3, #0]
80038f6: 61fb str r3, [r7, #28]
80038f8: 1d3b adds r3, r7, #4
80038fa: 681b ldr r3, [r3, #0]
80038fc: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8003900: b29b uxth r3, r3
8003902: 461a mov r2, r3
8003904: 69fb ldr r3, [r7, #28]
8003906: 4413 add r3, r2
8003908: 61fb str r3, [r7, #28]
800390a: 463b mov r3, r7
800390c: 681b ldr r3, [r3, #0]
800390e: 781b ldrb r3, [r3, #0]
8003910: 011a lsls r2, r3, #4
8003912: 69fb ldr r3, [r7, #28]
8003914: 4413 add r3, r2
8003916: f203 4304 addw r3, r3, #1028 ; 0x404
800391a: 61bb str r3, [r7, #24]
800391c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003920: 2b00 cmp r3, #0
8003922: d112 bne.n 800394a <USB_EPStartXfer+0x312>
8003924: 69bb ldr r3, [r7, #24]
8003926: 881b ldrh r3, [r3, #0]
8003928: b29b uxth r3, r3
800392a: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
800392e: b29a uxth r2, r3
8003930: 69bb ldr r3, [r7, #24]
8003932: 801a strh r2, [r3, #0]
8003934: 69bb ldr r3, [r7, #24]
8003936: 881b ldrh r3, [r3, #0]
8003938: b29b uxth r3, r3
800393a: ea6f 4343 mvn.w r3, r3, lsl #17
800393e: ea6f 4353 mvn.w r3, r3, lsr #17
8003942: b29a uxth r2, r3
8003944: 69bb ldr r3, [r7, #24]
8003946: 801a strh r2, [r3, #0]
8003948: e057 b.n 80039fa <USB_EPStartXfer+0x3c2>
800394a: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
800394e: 2b3e cmp r3, #62 ; 0x3e
8003950: d817 bhi.n 8003982 <USB_EPStartXfer+0x34a>
8003952: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003956: 085b lsrs r3, r3, #1
8003958: f8c7 3100 str.w r3, [r7, #256] ; 0x100
800395c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003960: f003 0301 and.w r3, r3, #1
8003964: 2b00 cmp r3, #0
8003966: d004 beq.n 8003972 <USB_EPStartXfer+0x33a>
8003968: f8d7 3100 ldr.w r3, [r7, #256] ; 0x100
800396c: 3301 adds r3, #1
800396e: f8c7 3100 str.w r3, [r7, #256] ; 0x100
8003972: f8d7 3100 ldr.w r3, [r7, #256] ; 0x100
8003976: b29b uxth r3, r3
8003978: 029b lsls r3, r3, #10
800397a: b29a uxth r2, r3
800397c: 69bb ldr r3, [r7, #24]
800397e: 801a strh r2, [r3, #0]
8003980: e03b b.n 80039fa <USB_EPStartXfer+0x3c2>
8003982: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003986: 095b lsrs r3, r3, #5
8003988: f8c7 3100 str.w r3, [r7, #256] ; 0x100
800398c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003990: f003 031f and.w r3, r3, #31
8003994: 2b00 cmp r3, #0
8003996: d104 bne.n 80039a2 <USB_EPStartXfer+0x36a>
8003998: f8d7 3100 ldr.w r3, [r7, #256] ; 0x100
800399c: 3b01 subs r3, #1
800399e: f8c7 3100 str.w r3, [r7, #256] ; 0x100
80039a2: f8d7 3100 ldr.w r3, [r7, #256] ; 0x100
80039a6: b29b uxth r3, r3
80039a8: 029b lsls r3, r3, #10
80039aa: b29b uxth r3, r3
80039ac: ea6f 4343 mvn.w r3, r3, lsl #17
80039b0: ea6f 4353 mvn.w r3, r3, lsr #17
80039b4: b29a uxth r2, r3
80039b6: 69bb ldr r3, [r7, #24]
80039b8: 801a strh r2, [r3, #0]
80039ba: e01e b.n 80039fa <USB_EPStartXfer+0x3c2>
80039bc: 463b mov r3, r7
80039be: 681b ldr r3, [r3, #0]
80039c0: 785b ldrb r3, [r3, #1]
80039c2: 2b01 cmp r3, #1
80039c4: d119 bne.n 80039fa <USB_EPStartXfer+0x3c2>
80039c6: 1d3b adds r3, r7, #4
80039c8: 681b ldr r3, [r3, #0]
80039ca: 627b str r3, [r7, #36] ; 0x24
80039cc: 1d3b adds r3, r7, #4
80039ce: 681b ldr r3, [r3, #0]
80039d0: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
80039d4: b29b uxth r3, r3
80039d6: 461a mov r2, r3
80039d8: 6a7b ldr r3, [r7, #36] ; 0x24
80039da: 4413 add r3, r2
80039dc: 627b str r3, [r7, #36] ; 0x24
80039de: 463b mov r3, r7
80039e0: 681b ldr r3, [r3, #0]
80039e2: 781b ldrb r3, [r3, #0]
80039e4: 011a lsls r2, r3, #4
80039e6: 6a7b ldr r3, [r7, #36] ; 0x24
80039e8: 4413 add r3, r2
80039ea: f203 4304 addw r3, r3, #1028 ; 0x404
80039ee: 623b str r3, [r7, #32]
80039f0: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
80039f4: b29a uxth r2, r3
80039f6: 6a3b ldr r3, [r7, #32]
80039f8: 801a strh r2, [r3, #0]
pmabuffer = ep->pmaaddr0;
80039fa: 463b mov r3, r7
80039fc: 681b ldr r3, [r3, #0]
80039fe: 891b ldrh r3, [r3, #8]
8003a00: f8a7 310a strh.w r3, [r7, #266] ; 0x10a
/* Write the user buffer to USB PMA */
USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len);
8003a04: 463b mov r3, r7
8003a06: 681b ldr r3, [r3, #0]
8003a08: 6959 ldr r1, [r3, #20]
8003a0a: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003a0e: b29b uxth r3, r3
8003a10: f8b7 210a ldrh.w r2, [r7, #266] ; 0x10a
8003a14: 1d38 adds r0, r7, #4
8003a16: 6800 ldr r0, [r0, #0]
8003a18: f001 f86c bl 8004af4 <USB_WritePMA>
8003a1c: e33b b.n 8004096 <USB_EPStartXfer+0xa5e>
}
else
{
/* Set the Double buffer counter for pmabuffer0 */
PCD_SET_EP_DBUF0_CNT(USBx, ep->num, ep->is_in, len);
8003a1e: 463b mov r3, r7
8003a20: 681b ldr r3, [r3, #0]
8003a22: 785b ldrb r3, [r3, #1]
8003a24: 2b00 cmp r3, #0
8003a26: d164 bne.n 8003af2 <USB_EPStartXfer+0x4ba>
8003a28: 1d3b adds r3, r7, #4
8003a2a: 681b ldr r3, [r3, #0]
8003a2c: 64fb str r3, [r7, #76] ; 0x4c
8003a2e: 1d3b adds r3, r7, #4
8003a30: 681b ldr r3, [r3, #0]
8003a32: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8003a36: b29b uxth r3, r3
8003a38: 461a mov r2, r3
8003a3a: 6cfb ldr r3, [r7, #76] ; 0x4c
8003a3c: 4413 add r3, r2
8003a3e: 64fb str r3, [r7, #76] ; 0x4c
8003a40: 463b mov r3, r7
8003a42: 681b ldr r3, [r3, #0]
8003a44: 781b ldrb r3, [r3, #0]
8003a46: 011a lsls r2, r3, #4
8003a48: 6cfb ldr r3, [r7, #76] ; 0x4c
8003a4a: 4413 add r3, r2
8003a4c: f203 4304 addw r3, r3, #1028 ; 0x404
8003a50: 64bb str r3, [r7, #72] ; 0x48
8003a52: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003a56: 2b00 cmp r3, #0
8003a58: d112 bne.n 8003a80 <USB_EPStartXfer+0x448>
8003a5a: 6cbb ldr r3, [r7, #72] ; 0x48
8003a5c: 881b ldrh r3, [r3, #0]
8003a5e: b29b uxth r3, r3
8003a60: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
8003a64: b29a uxth r2, r3
8003a66: 6cbb ldr r3, [r7, #72] ; 0x48
8003a68: 801a strh r2, [r3, #0]
8003a6a: 6cbb ldr r3, [r7, #72] ; 0x48
8003a6c: 881b ldrh r3, [r3, #0]
8003a6e: b29b uxth r3, r3
8003a70: ea6f 4343 mvn.w r3, r3, lsl #17
8003a74: ea6f 4353 mvn.w r3, r3, lsr #17
8003a78: b29a uxth r2, r3
8003a7a: 6cbb ldr r3, [r7, #72] ; 0x48
8003a7c: 801a strh r2, [r3, #0]
8003a7e: e057 b.n 8003b30 <USB_EPStartXfer+0x4f8>
8003a80: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003a84: 2b3e cmp r3, #62 ; 0x3e
8003a86: d817 bhi.n 8003ab8 <USB_EPStartXfer+0x480>
8003a88: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003a8c: 085b lsrs r3, r3, #1
8003a8e: f8c7 30fc str.w r3, [r7, #252] ; 0xfc
8003a92: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003a96: f003 0301 and.w r3, r3, #1
8003a9a: 2b00 cmp r3, #0
8003a9c: d004 beq.n 8003aa8 <USB_EPStartXfer+0x470>
8003a9e: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc
8003aa2: 3301 adds r3, #1
8003aa4: f8c7 30fc str.w r3, [r7, #252] ; 0xfc
8003aa8: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc
8003aac: b29b uxth r3, r3
8003aae: 029b lsls r3, r3, #10
8003ab0: b29a uxth r2, r3
8003ab2: 6cbb ldr r3, [r7, #72] ; 0x48
8003ab4: 801a strh r2, [r3, #0]
8003ab6: e03b b.n 8003b30 <USB_EPStartXfer+0x4f8>
8003ab8: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003abc: 095b lsrs r3, r3, #5
8003abe: f8c7 30fc str.w r3, [r7, #252] ; 0xfc
8003ac2: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003ac6: f003 031f and.w r3, r3, #31
8003aca: 2b00 cmp r3, #0
8003acc: d104 bne.n 8003ad8 <USB_EPStartXfer+0x4a0>
8003ace: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc
8003ad2: 3b01 subs r3, #1
8003ad4: f8c7 30fc str.w r3, [r7, #252] ; 0xfc
8003ad8: f8d7 30fc ldr.w r3, [r7, #252] ; 0xfc
8003adc: b29b uxth r3, r3
8003ade: 029b lsls r3, r3, #10
8003ae0: b29b uxth r3, r3
8003ae2: ea6f 4343 mvn.w r3, r3, lsl #17
8003ae6: ea6f 4353 mvn.w r3, r3, lsr #17
8003aea: b29a uxth r2, r3
8003aec: 6cbb ldr r3, [r7, #72] ; 0x48
8003aee: 801a strh r2, [r3, #0]
8003af0: e01e b.n 8003b30 <USB_EPStartXfer+0x4f8>
8003af2: 463b mov r3, r7
8003af4: 681b ldr r3, [r3, #0]
8003af6: 785b ldrb r3, [r3, #1]
8003af8: 2b01 cmp r3, #1
8003afa: d119 bne.n 8003b30 <USB_EPStartXfer+0x4f8>
8003afc: 1d3b adds r3, r7, #4
8003afe: 681b ldr r3, [r3, #0]
8003b00: 657b str r3, [r7, #84] ; 0x54
8003b02: 1d3b adds r3, r7, #4
8003b04: 681b ldr r3, [r3, #0]
8003b06: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8003b0a: b29b uxth r3, r3
8003b0c: 461a mov r2, r3
8003b0e: 6d7b ldr r3, [r7, #84] ; 0x54
8003b10: 4413 add r3, r2
8003b12: 657b str r3, [r7, #84] ; 0x54
8003b14: 463b mov r3, r7
8003b16: 681b ldr r3, [r3, #0]
8003b18: 781b ldrb r3, [r3, #0]
8003b1a: 011a lsls r2, r3, #4
8003b1c: 6d7b ldr r3, [r7, #84] ; 0x54
8003b1e: 4413 add r3, r2
8003b20: f203 4304 addw r3, r3, #1028 ; 0x404
8003b24: 653b str r3, [r7, #80] ; 0x50
8003b26: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003b2a: b29a uxth r2, r3
8003b2c: 6d3b ldr r3, [r7, #80] ; 0x50
8003b2e: 801a strh r2, [r3, #0]
pmabuffer = ep->pmaaddr0;
8003b30: 463b mov r3, r7
8003b32: 681b ldr r3, [r3, #0]
8003b34: 891b ldrh r3, [r3, #8]
8003b36: f8a7 310a strh.w r3, [r7, #266] ; 0x10a
/* Write the user buffer to USB PMA */
USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len);
8003b3a: 463b mov r3, r7
8003b3c: 681b ldr r3, [r3, #0]
8003b3e: 6959 ldr r1, [r3, #20]
8003b40: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003b44: b29b uxth r3, r3
8003b46: f8b7 210a ldrh.w r2, [r7, #266] ; 0x10a
8003b4a: 1d38 adds r0, r7, #4
8003b4c: 6800 ldr r0, [r0, #0]
8003b4e: f000 ffd1 bl 8004af4 <USB_WritePMA>
ep->xfer_buff += len;
8003b52: 463b mov r3, r7
8003b54: 681b ldr r3, [r3, #0]
8003b56: 695a ldr r2, [r3, #20]
8003b58: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003b5c: 441a add r2, r3
8003b5e: 463b mov r3, r7
8003b60: 681b ldr r3, [r3, #0]
8003b62: 615a str r2, [r3, #20]
if (ep->xfer_len_db > ep->maxpacket)
8003b64: 463b mov r3, r7
8003b66: 681b ldr r3, [r3, #0]
8003b68: 6a1a ldr r2, [r3, #32]
8003b6a: 463b mov r3, r7
8003b6c: 681b ldr r3, [r3, #0]
8003b6e: 691b ldr r3, [r3, #16]
8003b70: 429a cmp r2, r3
8003b72: d909 bls.n 8003b88 <USB_EPStartXfer+0x550>
{
ep->xfer_len_db -= len;
8003b74: 463b mov r3, r7
8003b76: 681b ldr r3, [r3, #0]
8003b78: 6a1a ldr r2, [r3, #32]
8003b7a: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003b7e: 1ad2 subs r2, r2, r3
8003b80: 463b mov r3, r7
8003b82: 681b ldr r3, [r3, #0]
8003b84: 621a str r2, [r3, #32]
8003b86: e008 b.n 8003b9a <USB_EPStartXfer+0x562>
}
else
{
len = ep->xfer_len_db;
8003b88: 463b mov r3, r7
8003b8a: 681b ldr r3, [r3, #0]
8003b8c: 6a1b ldr r3, [r3, #32]
8003b8e: f8c7 310c str.w r3, [r7, #268] ; 0x10c
ep->xfer_len_db = 0U;
8003b92: 463b mov r3, r7
8003b94: 681b ldr r3, [r3, #0]
8003b96: 2200 movs r2, #0
8003b98: 621a str r2, [r3, #32]
}
/* Set the Double buffer counter for pmabuffer1 */
PCD_SET_EP_DBUF1_CNT(USBx, ep->num, ep->is_in, len);
8003b9a: 1d3b adds r3, r7, #4
8003b9c: 681b ldr r3, [r3, #0]
8003b9e: 647b str r3, [r7, #68] ; 0x44
8003ba0: 463b mov r3, r7
8003ba2: 681b ldr r3, [r3, #0]
8003ba4: 785b ldrb r3, [r3, #1]
8003ba6: 2b00 cmp r3, #0
8003ba8: d164 bne.n 8003c74 <USB_EPStartXfer+0x63c>
8003baa: 1d3b adds r3, r7, #4
8003bac: 681b ldr r3, [r3, #0]
8003bae: 63fb str r3, [r7, #60] ; 0x3c
8003bb0: 1d3b adds r3, r7, #4
8003bb2: 681b ldr r3, [r3, #0]
8003bb4: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8003bb8: b29b uxth r3, r3
8003bba: 461a mov r2, r3
8003bbc: 6bfb ldr r3, [r7, #60] ; 0x3c
8003bbe: 4413 add r3, r2
8003bc0: 63fb str r3, [r7, #60] ; 0x3c
8003bc2: 463b mov r3, r7
8003bc4: 681b ldr r3, [r3, #0]
8003bc6: 781b ldrb r3, [r3, #0]
8003bc8: 011a lsls r2, r3, #4
8003bca: 6bfb ldr r3, [r7, #60] ; 0x3c
8003bcc: 4413 add r3, r2
8003bce: f203 430c addw r3, r3, #1036 ; 0x40c
8003bd2: 63bb str r3, [r7, #56] ; 0x38
8003bd4: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003bd8: 2b00 cmp r3, #0
8003bda: d112 bne.n 8003c02 <USB_EPStartXfer+0x5ca>
8003bdc: 6bbb ldr r3, [r7, #56] ; 0x38
8003bde: 881b ldrh r3, [r3, #0]
8003be0: b29b uxth r3, r3
8003be2: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
8003be6: b29a uxth r2, r3
8003be8: 6bbb ldr r3, [r7, #56] ; 0x38
8003bea: 801a strh r2, [r3, #0]
8003bec: 6bbb ldr r3, [r7, #56] ; 0x38
8003bee: 881b ldrh r3, [r3, #0]
8003bf0: b29b uxth r3, r3
8003bf2: ea6f 4343 mvn.w r3, r3, lsl #17
8003bf6: ea6f 4353 mvn.w r3, r3, lsr #17
8003bfa: b29a uxth r2, r3
8003bfc: 6bbb ldr r3, [r7, #56] ; 0x38
8003bfe: 801a strh r2, [r3, #0]
8003c00: e054 b.n 8003cac <USB_EPStartXfer+0x674>
8003c02: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003c06: 2b3e cmp r3, #62 ; 0x3e
8003c08: d817 bhi.n 8003c3a <USB_EPStartXfer+0x602>
8003c0a: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003c0e: 085b lsrs r3, r3, #1
8003c10: f8c7 30f8 str.w r3, [r7, #248] ; 0xf8
8003c14: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003c18: f003 0301 and.w r3, r3, #1
8003c1c: 2b00 cmp r3, #0
8003c1e: d004 beq.n 8003c2a <USB_EPStartXfer+0x5f2>
8003c20: f8d7 30f8 ldr.w r3, [r7, #248] ; 0xf8
8003c24: 3301 adds r3, #1
8003c26: f8c7 30f8 str.w r3, [r7, #248] ; 0xf8
8003c2a: f8d7 30f8 ldr.w r3, [r7, #248] ; 0xf8
8003c2e: b29b uxth r3, r3
8003c30: 029b lsls r3, r3, #10
8003c32: b29a uxth r2, r3
8003c34: 6bbb ldr r3, [r7, #56] ; 0x38
8003c36: 801a strh r2, [r3, #0]
8003c38: e038 b.n 8003cac <USB_EPStartXfer+0x674>
8003c3a: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003c3e: 095b lsrs r3, r3, #5
8003c40: f8c7 30f8 str.w r3, [r7, #248] ; 0xf8
8003c44: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003c48: f003 031f and.w r3, r3, #31
8003c4c: 2b00 cmp r3, #0
8003c4e: d104 bne.n 8003c5a <USB_EPStartXfer+0x622>
8003c50: f8d7 30f8 ldr.w r3, [r7, #248] ; 0xf8
8003c54: 3b01 subs r3, #1
8003c56: f8c7 30f8 str.w r3, [r7, #248] ; 0xf8
8003c5a: f8d7 30f8 ldr.w r3, [r7, #248] ; 0xf8
8003c5e: b29b uxth r3, r3
8003c60: 029b lsls r3, r3, #10
8003c62: b29b uxth r3, r3
8003c64: ea6f 4343 mvn.w r3, r3, lsl #17
8003c68: ea6f 4353 mvn.w r3, r3, lsr #17
8003c6c: b29a uxth r2, r3
8003c6e: 6bbb ldr r3, [r7, #56] ; 0x38
8003c70: 801a strh r2, [r3, #0]
8003c72: e01b b.n 8003cac <USB_EPStartXfer+0x674>
8003c74: 463b mov r3, r7
8003c76: 681b ldr r3, [r3, #0]
8003c78: 785b ldrb r3, [r3, #1]
8003c7a: 2b01 cmp r3, #1
8003c7c: d116 bne.n 8003cac <USB_EPStartXfer+0x674>
8003c7e: 1d3b adds r3, r7, #4
8003c80: 681b ldr r3, [r3, #0]
8003c82: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8003c86: b29b uxth r3, r3
8003c88: 461a mov r2, r3
8003c8a: 6c7b ldr r3, [r7, #68] ; 0x44
8003c8c: 4413 add r3, r2
8003c8e: 647b str r3, [r7, #68] ; 0x44
8003c90: 463b mov r3, r7
8003c92: 681b ldr r3, [r3, #0]
8003c94: 781b ldrb r3, [r3, #0]
8003c96: 011a lsls r2, r3, #4
8003c98: 6c7b ldr r3, [r7, #68] ; 0x44
8003c9a: 4413 add r3, r2
8003c9c: f203 430c addw r3, r3, #1036 ; 0x40c
8003ca0: 643b str r3, [r7, #64] ; 0x40
8003ca2: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003ca6: b29a uxth r2, r3
8003ca8: 6c3b ldr r3, [r7, #64] ; 0x40
8003caa: 801a strh r2, [r3, #0]
pmabuffer = ep->pmaaddr1;
8003cac: 463b mov r3, r7
8003cae: 681b ldr r3, [r3, #0]
8003cb0: 895b ldrh r3, [r3, #10]
8003cb2: f8a7 310a strh.w r3, [r7, #266] ; 0x10a
/* Write the user buffer to USB PMA */
USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len);
8003cb6: 463b mov r3, r7
8003cb8: 681b ldr r3, [r3, #0]
8003cba: 6959 ldr r1, [r3, #20]
8003cbc: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003cc0: b29b uxth r3, r3
8003cc2: f8b7 210a ldrh.w r2, [r7, #266] ; 0x10a
8003cc6: 1d38 adds r0, r7, #4
8003cc8: 6800 ldr r0, [r0, #0]
8003cca: f000 ff13 bl 8004af4 <USB_WritePMA>
8003cce: e1e2 b.n 8004096 <USB_EPStartXfer+0xa5e>
}
}
/* auto Switch to single buffer mode when transfer <Mps no need to manage in double buffer */
else
{
len = ep->xfer_len_db;
8003cd0: 463b mov r3, r7
8003cd2: 681b ldr r3, [r3, #0]
8003cd4: 6a1b ldr r3, [r3, #32]
8003cd6: f8c7 310c str.w r3, [r7, #268] ; 0x10c
/* disable double buffer mode */
PCD_CLEAR_EP_DBUF(USBx, ep->num);
8003cda: 1d3b adds r3, r7, #4
8003cdc: 681a ldr r2, [r3, #0]
8003cde: 463b mov r3, r7
8003ce0: 681b ldr r3, [r3, #0]
8003ce2: 781b ldrb r3, [r3, #0]
8003ce4: 009b lsls r3, r3, #2
8003ce6: 4413 add r3, r2
8003ce8: 881b ldrh r3, [r3, #0]
8003cea: b29b uxth r3, r3
8003cec: f423 43e2 bic.w r3, r3, #28928 ; 0x7100
8003cf0: f023 0370 bic.w r3, r3, #112 ; 0x70
8003cf4: f8a7 3066 strh.w r3, [r7, #102] ; 0x66
8003cf8: 1d3b adds r3, r7, #4
8003cfa: 681a ldr r2, [r3, #0]
8003cfc: 463b mov r3, r7
8003cfe: 681b ldr r3, [r3, #0]
8003d00: 781b ldrb r3, [r3, #0]
8003d02: 009b lsls r3, r3, #2
8003d04: 441a add r2, r3
8003d06: f8b7 3066 ldrh.w r3, [r7, #102] ; 0x66
8003d0a: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8003d0e: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8003d12: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8003d16: f043 0380 orr.w r3, r3, #128 ; 0x80
8003d1a: b29b uxth r3, r3
8003d1c: 8013 strh r3, [r2, #0]
/* Set Tx count with nbre of byte to be transmitted */
PCD_SET_EP_TX_CNT(USBx, ep->num, len);
8003d1e: 1d3b adds r3, r7, #4
8003d20: 681b ldr r3, [r3, #0]
8003d22: 663b str r3, [r7, #96] ; 0x60
8003d24: 1d3b adds r3, r7, #4
8003d26: 681b ldr r3, [r3, #0]
8003d28: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8003d2c: b29b uxth r3, r3
8003d2e: 461a mov r2, r3
8003d30: 6e3b ldr r3, [r7, #96] ; 0x60
8003d32: 4413 add r3, r2
8003d34: 663b str r3, [r7, #96] ; 0x60
8003d36: 463b mov r3, r7
8003d38: 681b ldr r3, [r3, #0]
8003d3a: 781b ldrb r3, [r3, #0]
8003d3c: 011a lsls r2, r3, #4
8003d3e: 6e3b ldr r3, [r7, #96] ; 0x60
8003d40: 4413 add r3, r2
8003d42: f203 4304 addw r3, r3, #1028 ; 0x404
8003d46: 65fb str r3, [r7, #92] ; 0x5c
8003d48: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003d4c: b29a uxth r2, r3
8003d4e: 6dfb ldr r3, [r7, #92] ; 0x5c
8003d50: 801a strh r2, [r3, #0]
pmabuffer = ep->pmaaddr0;
8003d52: 463b mov r3, r7
8003d54: 681b ldr r3, [r3, #0]
8003d56: 891b ldrh r3, [r3, #8]
8003d58: f8a7 310a strh.w r3, [r7, #266] ; 0x10a
/* Write the user buffer to USB PMA */
USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len);
8003d5c: 463b mov r3, r7
8003d5e: 681b ldr r3, [r3, #0]
8003d60: 6959 ldr r1, [r3, #20]
8003d62: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003d66: b29b uxth r3, r3
8003d68: f8b7 210a ldrh.w r2, [r7, #266] ; 0x10a
8003d6c: 1d38 adds r0, r7, #4
8003d6e: 6800 ldr r0, [r0, #0]
8003d70: f000 fec0 bl 8004af4 <USB_WritePMA>
8003d74: e18f b.n 8004096 <USB_EPStartXfer+0xa5e>
/* manage isochronous double buffer IN mode */
else
{
/* Write the data to the USB endpoint */
if ((PCD_GET_ENDPOINT(USBx, ep->num) & USB_EP_DTOG_TX) != 0U)
8003d76: 1d3b adds r3, r7, #4
8003d78: 681a ldr r2, [r3, #0]
8003d7a: 463b mov r3, r7
8003d7c: 681b ldr r3, [r3, #0]
8003d7e: 781b ldrb r3, [r3, #0]
8003d80: 009b lsls r3, r3, #2
8003d82: 4413 add r3, r2
8003d84: 881b ldrh r3, [r3, #0]
8003d86: b29b uxth r3, r3
8003d88: f003 0340 and.w r3, r3, #64 ; 0x40
8003d8c: 2b00 cmp r3, #0
8003d8e: f000 808f beq.w 8003eb0 <USB_EPStartXfer+0x878>
{
/* Set the Double buffer counter for pmabuffer1 */
PCD_SET_EP_DBUF1_CNT(USBx, ep->num, ep->is_in, len);
8003d92: 1d3b adds r3, r7, #4
8003d94: 681b ldr r3, [r3, #0]
8003d96: 67bb str r3, [r7, #120] ; 0x78
8003d98: 463b mov r3, r7
8003d9a: 681b ldr r3, [r3, #0]
8003d9c: 785b ldrb r3, [r3, #1]
8003d9e: 2b00 cmp r3, #0
8003da0: d164 bne.n 8003e6c <USB_EPStartXfer+0x834>
8003da2: 1d3b adds r3, r7, #4
8003da4: 681b ldr r3, [r3, #0]
8003da6: 673b str r3, [r7, #112] ; 0x70
8003da8: 1d3b adds r3, r7, #4
8003daa: 681b ldr r3, [r3, #0]
8003dac: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8003db0: b29b uxth r3, r3
8003db2: 461a mov r2, r3
8003db4: 6f3b ldr r3, [r7, #112] ; 0x70
8003db6: 4413 add r3, r2
8003db8: 673b str r3, [r7, #112] ; 0x70
8003dba: 463b mov r3, r7
8003dbc: 681b ldr r3, [r3, #0]
8003dbe: 781b ldrb r3, [r3, #0]
8003dc0: 011a lsls r2, r3, #4
8003dc2: 6f3b ldr r3, [r7, #112] ; 0x70
8003dc4: 4413 add r3, r2
8003dc6: f203 430c addw r3, r3, #1036 ; 0x40c
8003dca: 66fb str r3, [r7, #108] ; 0x6c
8003dcc: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003dd0: 2b00 cmp r3, #0
8003dd2: d112 bne.n 8003dfa <USB_EPStartXfer+0x7c2>
8003dd4: 6efb ldr r3, [r7, #108] ; 0x6c
8003dd6: 881b ldrh r3, [r3, #0]
8003dd8: b29b uxth r3, r3
8003dda: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
8003dde: b29a uxth r2, r3
8003de0: 6efb ldr r3, [r7, #108] ; 0x6c
8003de2: 801a strh r2, [r3, #0]
8003de4: 6efb ldr r3, [r7, #108] ; 0x6c
8003de6: 881b ldrh r3, [r3, #0]
8003de8: b29b uxth r3, r3
8003dea: ea6f 4343 mvn.w r3, r3, lsl #17
8003dee: ea6f 4353 mvn.w r3, r3, lsr #17
8003df2: b29a uxth r2, r3
8003df4: 6efb ldr r3, [r7, #108] ; 0x6c
8003df6: 801a strh r2, [r3, #0]
8003df8: e054 b.n 8003ea4 <USB_EPStartXfer+0x86c>
8003dfa: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003dfe: 2b3e cmp r3, #62 ; 0x3e
8003e00: d817 bhi.n 8003e32 <USB_EPStartXfer+0x7fa>
8003e02: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003e06: 085b lsrs r3, r3, #1
8003e08: f8c7 30f4 str.w r3, [r7, #244] ; 0xf4
8003e0c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003e10: f003 0301 and.w r3, r3, #1
8003e14: 2b00 cmp r3, #0
8003e16: d004 beq.n 8003e22 <USB_EPStartXfer+0x7ea>
8003e18: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
8003e1c: 3301 adds r3, #1
8003e1e: f8c7 30f4 str.w r3, [r7, #244] ; 0xf4
8003e22: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
8003e26: b29b uxth r3, r3
8003e28: 029b lsls r3, r3, #10
8003e2a: b29a uxth r2, r3
8003e2c: 6efb ldr r3, [r7, #108] ; 0x6c
8003e2e: 801a strh r2, [r3, #0]
8003e30: e038 b.n 8003ea4 <USB_EPStartXfer+0x86c>
8003e32: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003e36: 095b lsrs r3, r3, #5
8003e38: f8c7 30f4 str.w r3, [r7, #244] ; 0xf4
8003e3c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003e40: f003 031f and.w r3, r3, #31
8003e44: 2b00 cmp r3, #0
8003e46: d104 bne.n 8003e52 <USB_EPStartXfer+0x81a>
8003e48: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
8003e4c: 3b01 subs r3, #1
8003e4e: f8c7 30f4 str.w r3, [r7, #244] ; 0xf4
8003e52: f8d7 30f4 ldr.w r3, [r7, #244] ; 0xf4
8003e56: b29b uxth r3, r3
8003e58: 029b lsls r3, r3, #10
8003e5a: b29b uxth r3, r3
8003e5c: ea6f 4343 mvn.w r3, r3, lsl #17
8003e60: ea6f 4353 mvn.w r3, r3, lsr #17
8003e64: b29a uxth r2, r3
8003e66: 6efb ldr r3, [r7, #108] ; 0x6c
8003e68: 801a strh r2, [r3, #0]
8003e6a: e01b b.n 8003ea4 <USB_EPStartXfer+0x86c>
8003e6c: 463b mov r3, r7
8003e6e: 681b ldr r3, [r3, #0]
8003e70: 785b ldrb r3, [r3, #1]
8003e72: 2b01 cmp r3, #1
8003e74: d116 bne.n 8003ea4 <USB_EPStartXfer+0x86c>
8003e76: 1d3b adds r3, r7, #4
8003e78: 681b ldr r3, [r3, #0]
8003e7a: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8003e7e: b29b uxth r3, r3
8003e80: 461a mov r2, r3
8003e82: 6fbb ldr r3, [r7, #120] ; 0x78
8003e84: 4413 add r3, r2
8003e86: 67bb str r3, [r7, #120] ; 0x78
8003e88: 463b mov r3, r7
8003e8a: 681b ldr r3, [r3, #0]
8003e8c: 781b ldrb r3, [r3, #0]
8003e8e: 011a lsls r2, r3, #4
8003e90: 6fbb ldr r3, [r7, #120] ; 0x78
8003e92: 4413 add r3, r2
8003e94: f203 430c addw r3, r3, #1036 ; 0x40c
8003e98: 677b str r3, [r7, #116] ; 0x74
8003e9a: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003e9e: b29a uxth r2, r3
8003ea0: 6f7b ldr r3, [r7, #116] ; 0x74
8003ea2: 801a strh r2, [r3, #0]
pmabuffer = ep->pmaaddr1;
8003ea4: 463b mov r3, r7
8003ea6: 681b ldr r3, [r3, #0]
8003ea8: 895b ldrh r3, [r3, #10]
8003eaa: f8a7 310a strh.w r3, [r7, #266] ; 0x10a
8003eae: e097 b.n 8003fe0 <USB_EPStartXfer+0x9a8>
}
else
{
/* Set the Double buffer counter for pmabuffer0 */
PCD_SET_EP_DBUF0_CNT(USBx, ep->num, ep->is_in, len);
8003eb0: 463b mov r3, r7
8003eb2: 681b ldr r3, [r3, #0]
8003eb4: 785b ldrb r3, [r3, #1]
8003eb6: 2b00 cmp r3, #0
8003eb8: d168 bne.n 8003f8c <USB_EPStartXfer+0x954>
8003eba: 1d3b adds r3, r7, #4
8003ebc: 681b ldr r3, [r3, #0]
8003ebe: f8c7 3080 str.w r3, [r7, #128] ; 0x80
8003ec2: 1d3b adds r3, r7, #4
8003ec4: 681b ldr r3, [r3, #0]
8003ec6: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8003eca: b29b uxth r3, r3
8003ecc: 461a mov r2, r3
8003ece: f8d7 3080 ldr.w r3, [r7, #128] ; 0x80
8003ed2: 4413 add r3, r2
8003ed4: f8c7 3080 str.w r3, [r7, #128] ; 0x80
8003ed8: 463b mov r3, r7
8003eda: 681b ldr r3, [r3, #0]
8003edc: 781b ldrb r3, [r3, #0]
8003ede: 011a lsls r2, r3, #4
8003ee0: f8d7 3080 ldr.w r3, [r7, #128] ; 0x80
8003ee4: 4413 add r3, r2
8003ee6: f203 4304 addw r3, r3, #1028 ; 0x404
8003eea: 67fb str r3, [r7, #124] ; 0x7c
8003eec: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003ef0: 2b00 cmp r3, #0
8003ef2: d112 bne.n 8003f1a <USB_EPStartXfer+0x8e2>
8003ef4: 6ffb ldr r3, [r7, #124] ; 0x7c
8003ef6: 881b ldrh r3, [r3, #0]
8003ef8: b29b uxth r3, r3
8003efa: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
8003efe: b29a uxth r2, r3
8003f00: 6ffb ldr r3, [r7, #124] ; 0x7c
8003f02: 801a strh r2, [r3, #0]
8003f04: 6ffb ldr r3, [r7, #124] ; 0x7c
8003f06: 881b ldrh r3, [r3, #0]
8003f08: b29b uxth r3, r3
8003f0a: ea6f 4343 mvn.w r3, r3, lsl #17
8003f0e: ea6f 4353 mvn.w r3, r3, lsr #17
8003f12: b29a uxth r2, r3
8003f14: 6ffb ldr r3, [r7, #124] ; 0x7c
8003f16: 801a strh r2, [r3, #0]
8003f18: e05d b.n 8003fd6 <USB_EPStartXfer+0x99e>
8003f1a: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003f1e: 2b3e cmp r3, #62 ; 0x3e
8003f20: d817 bhi.n 8003f52 <USB_EPStartXfer+0x91a>
8003f22: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003f26: 085b lsrs r3, r3, #1
8003f28: f8c7 30f0 str.w r3, [r7, #240] ; 0xf0
8003f2c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003f30: f003 0301 and.w r3, r3, #1
8003f34: 2b00 cmp r3, #0
8003f36: d004 beq.n 8003f42 <USB_EPStartXfer+0x90a>
8003f38: f8d7 30f0 ldr.w r3, [r7, #240] ; 0xf0
8003f3c: 3301 adds r3, #1
8003f3e: f8c7 30f0 str.w r3, [r7, #240] ; 0xf0
8003f42: f8d7 30f0 ldr.w r3, [r7, #240] ; 0xf0
8003f46: b29b uxth r3, r3
8003f48: 029b lsls r3, r3, #10
8003f4a: b29a uxth r2, r3
8003f4c: 6ffb ldr r3, [r7, #124] ; 0x7c
8003f4e: 801a strh r2, [r3, #0]
8003f50: e041 b.n 8003fd6 <USB_EPStartXfer+0x99e>
8003f52: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003f56: 095b lsrs r3, r3, #5
8003f58: f8c7 30f0 str.w r3, [r7, #240] ; 0xf0
8003f5c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003f60: f003 031f and.w r3, r3, #31
8003f64: 2b00 cmp r3, #0
8003f66: d104 bne.n 8003f72 <USB_EPStartXfer+0x93a>
8003f68: f8d7 30f0 ldr.w r3, [r7, #240] ; 0xf0
8003f6c: 3b01 subs r3, #1
8003f6e: f8c7 30f0 str.w r3, [r7, #240] ; 0xf0
8003f72: f8d7 30f0 ldr.w r3, [r7, #240] ; 0xf0
8003f76: b29b uxth r3, r3
8003f78: 029b lsls r3, r3, #10
8003f7a: b29b uxth r3, r3
8003f7c: ea6f 4343 mvn.w r3, r3, lsl #17
8003f80: ea6f 4353 mvn.w r3, r3, lsr #17
8003f84: b29a uxth r2, r3
8003f86: 6ffb ldr r3, [r7, #124] ; 0x7c
8003f88: 801a strh r2, [r3, #0]
8003f8a: e024 b.n 8003fd6 <USB_EPStartXfer+0x99e>
8003f8c: 463b mov r3, r7
8003f8e: 681b ldr r3, [r3, #0]
8003f90: 785b ldrb r3, [r3, #1]
8003f92: 2b01 cmp r3, #1
8003f94: d11f bne.n 8003fd6 <USB_EPStartXfer+0x99e>
8003f96: 1d3b adds r3, r7, #4
8003f98: 681b ldr r3, [r3, #0]
8003f9a: f8c7 3088 str.w r3, [r7, #136] ; 0x88
8003f9e: 1d3b adds r3, r7, #4
8003fa0: 681b ldr r3, [r3, #0]
8003fa2: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8003fa6: b29b uxth r3, r3
8003fa8: 461a mov r2, r3
8003faa: f8d7 3088 ldr.w r3, [r7, #136] ; 0x88
8003fae: 4413 add r3, r2
8003fb0: f8c7 3088 str.w r3, [r7, #136] ; 0x88
8003fb4: 463b mov r3, r7
8003fb6: 681b ldr r3, [r3, #0]
8003fb8: 781b ldrb r3, [r3, #0]
8003fba: 011a lsls r2, r3, #4
8003fbc: f8d7 3088 ldr.w r3, [r7, #136] ; 0x88
8003fc0: 4413 add r3, r2
8003fc2: f203 4304 addw r3, r3, #1028 ; 0x404
8003fc6: f8c7 3084 str.w r3, [r7, #132] ; 0x84
8003fca: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003fce: b29a uxth r2, r3
8003fd0: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84
8003fd4: 801a strh r2, [r3, #0]
pmabuffer = ep->pmaaddr0;
8003fd6: 463b mov r3, r7
8003fd8: 681b ldr r3, [r3, #0]
8003fda: 891b ldrh r3, [r3, #8]
8003fdc: f8a7 310a strh.w r3, [r7, #266] ; 0x10a
}
USB_WritePMA(USBx, ep->xfer_buff, pmabuffer, (uint16_t)len);
8003fe0: 463b mov r3, r7
8003fe2: 681b ldr r3, [r3, #0]
8003fe4: 6959 ldr r1, [r3, #20]
8003fe6: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8003fea: b29b uxth r3, r3
8003fec: f8b7 210a ldrh.w r2, [r7, #266] ; 0x10a
8003ff0: 1d38 adds r0, r7, #4
8003ff2: 6800 ldr r0, [r0, #0]
8003ff4: f000 fd7e bl 8004af4 <USB_WritePMA>
PCD_FreeUserBuffer(USBx, ep->num, ep->is_in);
8003ff8: 463b mov r3, r7
8003ffa: 681b ldr r3, [r3, #0]
8003ffc: 785b ldrb r3, [r3, #1]
8003ffe: 2b00 cmp r3, #0
8004000: d122 bne.n 8004048 <USB_EPStartXfer+0xa10>
8004002: 1d3b adds r3, r7, #4
8004004: 681a ldr r2, [r3, #0]
8004006: 463b mov r3, r7
8004008: 681b ldr r3, [r3, #0]
800400a: 781b ldrb r3, [r3, #0]
800400c: 009b lsls r3, r3, #2
800400e: 4413 add r3, r2
8004010: 881b ldrh r3, [r3, #0]
8004012: b29b uxth r3, r3
8004014: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8004018: f023 0370 bic.w r3, r3, #112 ; 0x70
800401c: f8a7 3068 strh.w r3, [r7, #104] ; 0x68
8004020: 1d3b adds r3, r7, #4
8004022: 681a ldr r2, [r3, #0]
8004024: 463b mov r3, r7
8004026: 681b ldr r3, [r3, #0]
8004028: 781b ldrb r3, [r3, #0]
800402a: 009b lsls r3, r3, #2
800402c: 441a add r2, r3
800402e: f8b7 3068 ldrh.w r3, [r7, #104] ; 0x68
8004032: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8004036: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
800403a: f443 4300 orr.w r3, r3, #32768 ; 0x8000
800403e: f043 03c0 orr.w r3, r3, #192 ; 0xc0
8004042: b29b uxth r3, r3
8004044: 8013 strh r3, [r2, #0]
8004046: e026 b.n 8004096 <USB_EPStartXfer+0xa5e>
8004048: 463b mov r3, r7
800404a: 681b ldr r3, [r3, #0]
800404c: 785b ldrb r3, [r3, #1]
800404e: 2b01 cmp r3, #1
8004050: d121 bne.n 8004096 <USB_EPStartXfer+0xa5e>
8004052: 1d3b adds r3, r7, #4
8004054: 681a ldr r2, [r3, #0]
8004056: 463b mov r3, r7
8004058: 681b ldr r3, [r3, #0]
800405a: 781b ldrb r3, [r3, #0]
800405c: 009b lsls r3, r3, #2
800405e: 4413 add r3, r2
8004060: 881b ldrh r3, [r3, #0]
8004062: b29b uxth r3, r3
8004064: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8004068: f023 0370 bic.w r3, r3, #112 ; 0x70
800406c: f8a7 306a strh.w r3, [r7, #106] ; 0x6a
8004070: 1d3b adds r3, r7, #4
8004072: 681a ldr r2, [r3, #0]
8004074: 463b mov r3, r7
8004076: 681b ldr r3, [r3, #0]
8004078: 781b ldrb r3, [r3, #0]
800407a: 009b lsls r3, r3, #2
800407c: 441a add r2, r3
800407e: f8b7 306a ldrh.w r3, [r7, #106] ; 0x6a
8004082: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8004086: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
800408a: f443 4340 orr.w r3, r3, #49152 ; 0xc000
800408e: f043 0380 orr.w r3, r3, #128 ; 0x80
8004092: b29b uxth r3, r3
8004094: 8013 strh r3, [r2, #0]
}
}
PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_VALID);
8004096: 1d3b adds r3, r7, #4
8004098: 681a ldr r2, [r3, #0]
800409a: 463b mov r3, r7
800409c: 681b ldr r3, [r3, #0]
800409e: 781b ldrb r3, [r3, #0]
80040a0: 009b lsls r3, r3, #2
80040a2: 4413 add r3, r2
80040a4: 881b ldrh r3, [r3, #0]
80040a6: b29b uxth r3, r3
80040a8: f107 020e add.w r2, r7, #14
80040ac: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
80040b0: f023 0340 bic.w r3, r3, #64 ; 0x40
80040b4: 8013 strh r3, [r2, #0]
80040b6: f107 030e add.w r3, r7, #14
80040ba: f107 020e add.w r2, r7, #14
80040be: 8812 ldrh r2, [r2, #0]
80040c0: f082 0210 eor.w r2, r2, #16
80040c4: 801a strh r2, [r3, #0]
80040c6: f107 030e add.w r3, r7, #14
80040ca: f107 020e add.w r2, r7, #14
80040ce: 8812 ldrh r2, [r2, #0]
80040d0: f082 0220 eor.w r2, r2, #32
80040d4: 801a strh r2, [r3, #0]
80040d6: 1d3b adds r3, r7, #4
80040d8: 681a ldr r2, [r3, #0]
80040da: 463b mov r3, r7
80040dc: 681b ldr r3, [r3, #0]
80040de: 781b ldrb r3, [r3, #0]
80040e0: 009b lsls r3, r3, #2
80040e2: 441a add r2, r3
80040e4: f107 030e add.w r3, r7, #14
80040e8: 881b ldrh r3, [r3, #0]
80040ea: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
80040ee: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
80040f2: f443 4300 orr.w r3, r3, #32768 ; 0x8000
80040f6: f043 0380 orr.w r3, r3, #128 ; 0x80
80040fa: b29b uxth r3, r3
80040fc: 8013 strh r3, [r2, #0]
80040fe: e3b5 b.n 800486c <USB_EPStartXfer+0x1234>
}
else /* OUT endpoint */
{
if (ep->doublebuffer == 0U)
8004100: 463b mov r3, r7
8004102: 681b ldr r3, [r3, #0]
8004104: 7b1b ldrb r3, [r3, #12]
8004106: 2b00 cmp r3, #0
8004108: f040 8090 bne.w 800422c <USB_EPStartXfer+0xbf4>
{
/* Multi packet transfer */
if (ep->xfer_len > ep->maxpacket)
800410c: 463b mov r3, r7
800410e: 681b ldr r3, [r3, #0]
8004110: 699a ldr r2, [r3, #24]
8004112: 463b mov r3, r7
8004114: 681b ldr r3, [r3, #0]
8004116: 691b ldr r3, [r3, #16]
8004118: 429a cmp r2, r3
800411a: d90e bls.n 800413a <USB_EPStartXfer+0xb02>
{
len = ep->maxpacket;
800411c: 463b mov r3, r7
800411e: 681b ldr r3, [r3, #0]
8004120: 691b ldr r3, [r3, #16]
8004122: f8c7 310c str.w r3, [r7, #268] ; 0x10c
ep->xfer_len -= len;
8004126: 463b mov r3, r7
8004128: 681b ldr r3, [r3, #0]
800412a: 699a ldr r2, [r3, #24]
800412c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8004130: 1ad2 subs r2, r2, r3
8004132: 463b mov r3, r7
8004134: 681b ldr r3, [r3, #0]
8004136: 619a str r2, [r3, #24]
8004138: e008 b.n 800414c <USB_EPStartXfer+0xb14>
}
else
{
len = ep->xfer_len;
800413a: 463b mov r3, r7
800413c: 681b ldr r3, [r3, #0]
800413e: 699b ldr r3, [r3, #24]
8004140: f8c7 310c str.w r3, [r7, #268] ; 0x10c
ep->xfer_len = 0U;
8004144: 463b mov r3, r7
8004146: 681b ldr r3, [r3, #0]
8004148: 2200 movs r2, #0
800414a: 619a str r2, [r3, #24]
}
/* configure and validate Rx endpoint */
PCD_SET_EP_RX_CNT(USBx, ep->num, len);
800414c: 1d3b adds r3, r7, #4
800414e: 681b ldr r3, [r3, #0]
8004150: f8c7 3094 str.w r3, [r7, #148] ; 0x94
8004154: 1d3b adds r3, r7, #4
8004156: 681b ldr r3, [r3, #0]
8004158: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
800415c: b29b uxth r3, r3
800415e: 461a mov r2, r3
8004160: f8d7 3094 ldr.w r3, [r7, #148] ; 0x94
8004164: 4413 add r3, r2
8004166: f8c7 3094 str.w r3, [r7, #148] ; 0x94
800416a: 463b mov r3, r7
800416c: 681b ldr r3, [r3, #0]
800416e: 781b ldrb r3, [r3, #0]
8004170: 011a lsls r2, r3, #4
8004172: f8d7 3094 ldr.w r3, [r7, #148] ; 0x94
8004176: 4413 add r3, r2
8004178: f203 430c addw r3, r3, #1036 ; 0x40c
800417c: f8c7 3090 str.w r3, [r7, #144] ; 0x90
8004180: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8004184: 2b00 cmp r3, #0
8004186: d116 bne.n 80041b6 <USB_EPStartXfer+0xb7e>
8004188: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90
800418c: 881b ldrh r3, [r3, #0]
800418e: b29b uxth r3, r3
8004190: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
8004194: b29a uxth r2, r3
8004196: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90
800419a: 801a strh r2, [r3, #0]
800419c: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90
80041a0: 881b ldrh r3, [r3, #0]
80041a2: b29b uxth r3, r3
80041a4: ea6f 4343 mvn.w r3, r3, lsl #17
80041a8: ea6f 4353 mvn.w r3, r3, lsr #17
80041ac: b29a uxth r2, r3
80041ae: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90
80041b2: 801a strh r2, [r3, #0]
80041b4: e32c b.n 8004810 <USB_EPStartXfer+0x11d8>
80041b6: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
80041ba: 2b3e cmp r3, #62 ; 0x3e
80041bc: d818 bhi.n 80041f0 <USB_EPStartXfer+0xbb8>
80041be: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
80041c2: 085b lsrs r3, r3, #1
80041c4: f8c7 30ec str.w r3, [r7, #236] ; 0xec
80041c8: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
80041cc: f003 0301 and.w r3, r3, #1
80041d0: 2b00 cmp r3, #0
80041d2: d004 beq.n 80041de <USB_EPStartXfer+0xba6>
80041d4: f8d7 30ec ldr.w r3, [r7, #236] ; 0xec
80041d8: 3301 adds r3, #1
80041da: f8c7 30ec str.w r3, [r7, #236] ; 0xec
80041de: f8d7 30ec ldr.w r3, [r7, #236] ; 0xec
80041e2: b29b uxth r3, r3
80041e4: 029b lsls r3, r3, #10
80041e6: b29a uxth r2, r3
80041e8: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90
80041ec: 801a strh r2, [r3, #0]
80041ee: e30f b.n 8004810 <USB_EPStartXfer+0x11d8>
80041f0: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
80041f4: 095b lsrs r3, r3, #5
80041f6: f8c7 30ec str.w r3, [r7, #236] ; 0xec
80041fa: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
80041fe: f003 031f and.w r3, r3, #31
8004202: 2b00 cmp r3, #0
8004204: d104 bne.n 8004210 <USB_EPStartXfer+0xbd8>
8004206: f8d7 30ec ldr.w r3, [r7, #236] ; 0xec
800420a: 3b01 subs r3, #1
800420c: f8c7 30ec str.w r3, [r7, #236] ; 0xec
8004210: f8d7 30ec ldr.w r3, [r7, #236] ; 0xec
8004214: b29b uxth r3, r3
8004216: 029b lsls r3, r3, #10
8004218: b29b uxth r3, r3
800421a: ea6f 4343 mvn.w r3, r3, lsl #17
800421e: ea6f 4353 mvn.w r3, r3, lsr #17
8004222: b29a uxth r2, r3
8004224: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90
8004228: 801a strh r2, [r3, #0]
800422a: e2f1 b.n 8004810 <USB_EPStartXfer+0x11d8>
}
else
{
/* First Transfer Coming From HAL_PCD_EP_Receive & From ISR */
/* Set the Double buffer counter */
if (ep->type == EP_TYPE_BULK)
800422c: 463b mov r3, r7
800422e: 681b ldr r3, [r3, #0]
8004230: 78db ldrb r3, [r3, #3]
8004232: 2b02 cmp r3, #2
8004234: f040 818f bne.w 8004556 <USB_EPStartXfer+0xf1e>
{
PCD_SET_EP_DBUF_CNT(USBx, ep->num, ep->is_in, ep->maxpacket);
8004238: 463b mov r3, r7
800423a: 681b ldr r3, [r3, #0]
800423c: 785b ldrb r3, [r3, #1]
800423e: 2b00 cmp r3, #0
8004240: d175 bne.n 800432e <USB_EPStartXfer+0xcf6>
8004242: 1d3b adds r3, r7, #4
8004244: 681b ldr r3, [r3, #0]
8004246: f8c7 30b0 str.w r3, [r7, #176] ; 0xb0
800424a: 1d3b adds r3, r7, #4
800424c: 681b ldr r3, [r3, #0]
800424e: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8004252: b29b uxth r3, r3
8004254: 461a mov r2, r3
8004256: f8d7 30b0 ldr.w r3, [r7, #176] ; 0xb0
800425a: 4413 add r3, r2
800425c: f8c7 30b0 str.w r3, [r7, #176] ; 0xb0
8004260: 463b mov r3, r7
8004262: 681b ldr r3, [r3, #0]
8004264: 781b ldrb r3, [r3, #0]
8004266: 011a lsls r2, r3, #4
8004268: f8d7 30b0 ldr.w r3, [r7, #176] ; 0xb0
800426c: 4413 add r3, r2
800426e: f203 4304 addw r3, r3, #1028 ; 0x404
8004272: f8c7 30ac str.w r3, [r7, #172] ; 0xac
8004276: 463b mov r3, r7
8004278: 681b ldr r3, [r3, #0]
800427a: 691b ldr r3, [r3, #16]
800427c: 2b00 cmp r3, #0
800427e: d116 bne.n 80042ae <USB_EPStartXfer+0xc76>
8004280: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac
8004284: 881b ldrh r3, [r3, #0]
8004286: b29b uxth r3, r3
8004288: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
800428c: b29a uxth r2, r3
800428e: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac
8004292: 801a strh r2, [r3, #0]
8004294: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac
8004298: 881b ldrh r3, [r3, #0]
800429a: b29b uxth r3, r3
800429c: ea6f 4343 mvn.w r3, r3, lsl #17
80042a0: ea6f 4353 mvn.w r3, r3, lsr #17
80042a4: b29a uxth r2, r3
80042a6: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac
80042aa: 801a strh r2, [r3, #0]
80042ac: e065 b.n 800437a <USB_EPStartXfer+0xd42>
80042ae: 463b mov r3, r7
80042b0: 681b ldr r3, [r3, #0]
80042b2: 691b ldr r3, [r3, #16]
80042b4: 2b3e cmp r3, #62 ; 0x3e
80042b6: d81a bhi.n 80042ee <USB_EPStartXfer+0xcb6>
80042b8: 463b mov r3, r7
80042ba: 681b ldr r3, [r3, #0]
80042bc: 691b ldr r3, [r3, #16]
80042be: 085b lsrs r3, r3, #1
80042c0: f8c7 30e8 str.w r3, [r7, #232] ; 0xe8
80042c4: 463b mov r3, r7
80042c6: 681b ldr r3, [r3, #0]
80042c8: 691b ldr r3, [r3, #16]
80042ca: f003 0301 and.w r3, r3, #1
80042ce: 2b00 cmp r3, #0
80042d0: d004 beq.n 80042dc <USB_EPStartXfer+0xca4>
80042d2: f8d7 30e8 ldr.w r3, [r7, #232] ; 0xe8
80042d6: 3301 adds r3, #1
80042d8: f8c7 30e8 str.w r3, [r7, #232] ; 0xe8
80042dc: f8d7 30e8 ldr.w r3, [r7, #232] ; 0xe8
80042e0: b29b uxth r3, r3
80042e2: 029b lsls r3, r3, #10
80042e4: b29a uxth r2, r3
80042e6: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac
80042ea: 801a strh r2, [r3, #0]
80042ec: e045 b.n 800437a <USB_EPStartXfer+0xd42>
80042ee: 463b mov r3, r7
80042f0: 681b ldr r3, [r3, #0]
80042f2: 691b ldr r3, [r3, #16]
80042f4: 095b lsrs r3, r3, #5
80042f6: f8c7 30e8 str.w r3, [r7, #232] ; 0xe8
80042fa: 463b mov r3, r7
80042fc: 681b ldr r3, [r3, #0]
80042fe: 691b ldr r3, [r3, #16]
8004300: f003 031f and.w r3, r3, #31
8004304: 2b00 cmp r3, #0
8004306: d104 bne.n 8004312 <USB_EPStartXfer+0xcda>
8004308: f8d7 30e8 ldr.w r3, [r7, #232] ; 0xe8
800430c: 3b01 subs r3, #1
800430e: f8c7 30e8 str.w r3, [r7, #232] ; 0xe8
8004312: f8d7 30e8 ldr.w r3, [r7, #232] ; 0xe8
8004316: b29b uxth r3, r3
8004318: 029b lsls r3, r3, #10
800431a: b29b uxth r3, r3
800431c: ea6f 4343 mvn.w r3, r3, lsl #17
8004320: ea6f 4353 mvn.w r3, r3, lsr #17
8004324: b29a uxth r2, r3
8004326: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac
800432a: 801a strh r2, [r3, #0]
800432c: e025 b.n 800437a <USB_EPStartXfer+0xd42>
800432e: 463b mov r3, r7
8004330: 681b ldr r3, [r3, #0]
8004332: 785b ldrb r3, [r3, #1]
8004334: 2b01 cmp r3, #1
8004336: d120 bne.n 800437a <USB_EPStartXfer+0xd42>
8004338: 1d3b adds r3, r7, #4
800433a: 681b ldr r3, [r3, #0]
800433c: f8c7 30b8 str.w r3, [r7, #184] ; 0xb8
8004340: 1d3b adds r3, r7, #4
8004342: 681b ldr r3, [r3, #0]
8004344: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
8004348: b29b uxth r3, r3
800434a: 461a mov r2, r3
800434c: f8d7 30b8 ldr.w r3, [r7, #184] ; 0xb8
8004350: 4413 add r3, r2
8004352: f8c7 30b8 str.w r3, [r7, #184] ; 0xb8
8004356: 463b mov r3, r7
8004358: 681b ldr r3, [r3, #0]
800435a: 781b ldrb r3, [r3, #0]
800435c: 011a lsls r2, r3, #4
800435e: f8d7 30b8 ldr.w r3, [r7, #184] ; 0xb8
8004362: 4413 add r3, r2
8004364: f203 4304 addw r3, r3, #1028 ; 0x404
8004368: f8c7 30b4 str.w r3, [r7, #180] ; 0xb4
800436c: 463b mov r3, r7
800436e: 681b ldr r3, [r3, #0]
8004370: 691b ldr r3, [r3, #16]
8004372: b29a uxth r2, r3
8004374: f8d7 30b4 ldr.w r3, [r7, #180] ; 0xb4
8004378: 801a strh r2, [r3, #0]
800437a: 1d3b adds r3, r7, #4
800437c: 681b ldr r3, [r3, #0]
800437e: f8c7 30a8 str.w r3, [r7, #168] ; 0xa8
8004382: 463b mov r3, r7
8004384: 681b ldr r3, [r3, #0]
8004386: 785b ldrb r3, [r3, #1]
8004388: 2b00 cmp r3, #0
800438a: d175 bne.n 8004478 <USB_EPStartXfer+0xe40>
800438c: 1d3b adds r3, r7, #4
800438e: 681b ldr r3, [r3, #0]
8004390: f8c7 30a0 str.w r3, [r7, #160] ; 0xa0
8004394: 1d3b adds r3, r7, #4
8004396: 681b ldr r3, [r3, #0]
8004398: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
800439c: b29b uxth r3, r3
800439e: 461a mov r2, r3
80043a0: f8d7 30a0 ldr.w r3, [r7, #160] ; 0xa0
80043a4: 4413 add r3, r2
80043a6: f8c7 30a0 str.w r3, [r7, #160] ; 0xa0
80043aa: 463b mov r3, r7
80043ac: 681b ldr r3, [r3, #0]
80043ae: 781b ldrb r3, [r3, #0]
80043b0: 011a lsls r2, r3, #4
80043b2: f8d7 30a0 ldr.w r3, [r7, #160] ; 0xa0
80043b6: 4413 add r3, r2
80043b8: f203 430c addw r3, r3, #1036 ; 0x40c
80043bc: f8c7 309c str.w r3, [r7, #156] ; 0x9c
80043c0: 463b mov r3, r7
80043c2: 681b ldr r3, [r3, #0]
80043c4: 691b ldr r3, [r3, #16]
80043c6: 2b00 cmp r3, #0
80043c8: d116 bne.n 80043f8 <USB_EPStartXfer+0xdc0>
80043ca: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c
80043ce: 881b ldrh r3, [r3, #0]
80043d0: b29b uxth r3, r3
80043d2: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
80043d6: b29a uxth r2, r3
80043d8: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c
80043dc: 801a strh r2, [r3, #0]
80043de: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c
80043e2: 881b ldrh r3, [r3, #0]
80043e4: b29b uxth r3, r3
80043e6: ea6f 4343 mvn.w r3, r3, lsl #17
80043ea: ea6f 4353 mvn.w r3, r3, lsr #17
80043ee: b29a uxth r2, r3
80043f0: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c
80043f4: 801a strh r2, [r3, #0]
80043f6: e061 b.n 80044bc <USB_EPStartXfer+0xe84>
80043f8: 463b mov r3, r7
80043fa: 681b ldr r3, [r3, #0]
80043fc: 691b ldr r3, [r3, #16]
80043fe: 2b3e cmp r3, #62 ; 0x3e
8004400: d81a bhi.n 8004438 <USB_EPStartXfer+0xe00>
8004402: 463b mov r3, r7
8004404: 681b ldr r3, [r3, #0]
8004406: 691b ldr r3, [r3, #16]
8004408: 085b lsrs r3, r3, #1
800440a: f8c7 30e4 str.w r3, [r7, #228] ; 0xe4
800440e: 463b mov r3, r7
8004410: 681b ldr r3, [r3, #0]
8004412: 691b ldr r3, [r3, #16]
8004414: f003 0301 and.w r3, r3, #1
8004418: 2b00 cmp r3, #0
800441a: d004 beq.n 8004426 <USB_EPStartXfer+0xdee>
800441c: f8d7 30e4 ldr.w r3, [r7, #228] ; 0xe4
8004420: 3301 adds r3, #1
8004422: f8c7 30e4 str.w r3, [r7, #228] ; 0xe4
8004426: f8d7 30e4 ldr.w r3, [r7, #228] ; 0xe4
800442a: b29b uxth r3, r3
800442c: 029b lsls r3, r3, #10
800442e: b29a uxth r2, r3
8004430: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c
8004434: 801a strh r2, [r3, #0]
8004436: e041 b.n 80044bc <USB_EPStartXfer+0xe84>
8004438: 463b mov r3, r7
800443a: 681b ldr r3, [r3, #0]
800443c: 691b ldr r3, [r3, #16]
800443e: 095b lsrs r3, r3, #5
8004440: f8c7 30e4 str.w r3, [r7, #228] ; 0xe4
8004444: 463b mov r3, r7
8004446: 681b ldr r3, [r3, #0]
8004448: 691b ldr r3, [r3, #16]
800444a: f003 031f and.w r3, r3, #31
800444e: 2b00 cmp r3, #0
8004450: d104 bne.n 800445c <USB_EPStartXfer+0xe24>
8004452: f8d7 30e4 ldr.w r3, [r7, #228] ; 0xe4
8004456: 3b01 subs r3, #1
8004458: f8c7 30e4 str.w r3, [r7, #228] ; 0xe4
800445c: f8d7 30e4 ldr.w r3, [r7, #228] ; 0xe4
8004460: b29b uxth r3, r3
8004462: 029b lsls r3, r3, #10
8004464: b29b uxth r3, r3
8004466: ea6f 4343 mvn.w r3, r3, lsl #17
800446a: ea6f 4353 mvn.w r3, r3, lsr #17
800446e: b29a uxth r2, r3
8004470: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c
8004474: 801a strh r2, [r3, #0]
8004476: e021 b.n 80044bc <USB_EPStartXfer+0xe84>
8004478: 463b mov r3, r7
800447a: 681b ldr r3, [r3, #0]
800447c: 785b ldrb r3, [r3, #1]
800447e: 2b01 cmp r3, #1
8004480: d11c bne.n 80044bc <USB_EPStartXfer+0xe84>
8004482: 1d3b adds r3, r7, #4
8004484: 681b ldr r3, [r3, #0]
8004486: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
800448a: b29b uxth r3, r3
800448c: 461a mov r2, r3
800448e: f8d7 30a8 ldr.w r3, [r7, #168] ; 0xa8
8004492: 4413 add r3, r2
8004494: f8c7 30a8 str.w r3, [r7, #168] ; 0xa8
8004498: 463b mov r3, r7
800449a: 681b ldr r3, [r3, #0]
800449c: 781b ldrb r3, [r3, #0]
800449e: 011a lsls r2, r3, #4
80044a0: f8d7 30a8 ldr.w r3, [r7, #168] ; 0xa8
80044a4: 4413 add r3, r2
80044a6: f203 430c addw r3, r3, #1036 ; 0x40c
80044aa: f8c7 30a4 str.w r3, [r7, #164] ; 0xa4
80044ae: 463b mov r3, r7
80044b0: 681b ldr r3, [r3, #0]
80044b2: 691b ldr r3, [r3, #16]
80044b4: b29a uxth r2, r3
80044b6: f8d7 30a4 ldr.w r3, [r7, #164] ; 0xa4
80044ba: 801a strh r2, [r3, #0]
/* Coming from ISR */
if (ep->xfer_count != 0U)
80044bc: 463b mov r3, r7
80044be: 681b ldr r3, [r3, #0]
80044c0: 69db ldr r3, [r3, #28]
80044c2: 2b00 cmp r3, #0
80044c4: f000 81a4 beq.w 8004810 <USB_EPStartXfer+0x11d8>
{
/* update last value to check if there is blocking state */
wEPVal = PCD_GET_ENDPOINT(USBx, ep->num);
80044c8: 1d3b adds r3, r7, #4
80044ca: 681a ldr r2, [r3, #0]
80044cc: 463b mov r3, r7
80044ce: 681b ldr r3, [r3, #0]
80044d0: 781b ldrb r3, [r3, #0]
80044d2: 009b lsls r3, r3, #2
80044d4: 4413 add r3, r2
80044d6: 881b ldrh r3, [r3, #0]
80044d8: f8a7 309a strh.w r3, [r7, #154] ; 0x9a
/*Blocking State */
if ((((wEPVal & USB_EP_DTOG_RX) != 0U) && ((wEPVal & USB_EP_DTOG_TX) != 0U)) ||
80044dc: f8b7 309a ldrh.w r3, [r7, #154] ; 0x9a
80044e0: f403 4380 and.w r3, r3, #16384 ; 0x4000
80044e4: 2b00 cmp r3, #0
80044e6: d005 beq.n 80044f4 <USB_EPStartXfer+0xebc>
80044e8: f8b7 309a ldrh.w r3, [r7, #154] ; 0x9a
80044ec: f003 0340 and.w r3, r3, #64 ; 0x40
80044f0: 2b00 cmp r3, #0
80044f2: d10d bne.n 8004510 <USB_EPStartXfer+0xed8>
(((wEPVal & USB_EP_DTOG_RX) == 0U) && ((wEPVal & USB_EP_DTOG_TX) == 0U)))
80044f4: f8b7 309a ldrh.w r3, [r7, #154] ; 0x9a
80044f8: f403 4380 and.w r3, r3, #16384 ; 0x4000
if ((((wEPVal & USB_EP_DTOG_RX) != 0U) && ((wEPVal & USB_EP_DTOG_TX) != 0U)) ||
80044fc: 2b00 cmp r3, #0
80044fe: f040 8187 bne.w 8004810 <USB_EPStartXfer+0x11d8>
(((wEPVal & USB_EP_DTOG_RX) == 0U) && ((wEPVal & USB_EP_DTOG_TX) == 0U)))
8004502: f8b7 309a ldrh.w r3, [r7, #154] ; 0x9a
8004506: f003 0340 and.w r3, r3, #64 ; 0x40
800450a: 2b00 cmp r3, #0
800450c: f040 8180 bne.w 8004810 <USB_EPStartXfer+0x11d8>
{
PCD_FreeUserBuffer(USBx, ep->num, 0U);
8004510: 1d3b adds r3, r7, #4
8004512: 681a ldr r2, [r3, #0]
8004514: 463b mov r3, r7
8004516: 681b ldr r3, [r3, #0]
8004518: 781b ldrb r3, [r3, #0]
800451a: 009b lsls r3, r3, #2
800451c: 4413 add r3, r2
800451e: 881b ldrh r3, [r3, #0]
8004520: b29b uxth r3, r3
8004522: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8004526: f023 0370 bic.w r3, r3, #112 ; 0x70
800452a: f8a7 3098 strh.w r3, [r7, #152] ; 0x98
800452e: 1d3b adds r3, r7, #4
8004530: 681a ldr r2, [r3, #0]
8004532: 463b mov r3, r7
8004534: 681b ldr r3, [r3, #0]
8004536: 781b ldrb r3, [r3, #0]
8004538: 009b lsls r3, r3, #2
800453a: 441a add r2, r3
800453c: f8b7 3098 ldrh.w r3, [r7, #152] ; 0x98
8004540: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8004544: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8004548: f443 4300 orr.w r3, r3, #32768 ; 0x8000
800454c: f043 03c0 orr.w r3, r3, #192 ; 0xc0
8004550: b29b uxth r3, r3
8004552: 8013 strh r3, [r2, #0]
8004554: e15c b.n 8004810 <USB_EPStartXfer+0x11d8>
}
}
}
/* iso out double */
else if (ep->type == EP_TYPE_ISOC)
8004556: 463b mov r3, r7
8004558: 681b ldr r3, [r3, #0]
800455a: 78db ldrb r3, [r3, #3]
800455c: 2b01 cmp r3, #1
800455e: f040 8155 bne.w 800480c <USB_EPStartXfer+0x11d4>
{
/* Multi packet transfer */
if (ep->xfer_len > ep->maxpacket)
8004562: 463b mov r3, r7
8004564: 681b ldr r3, [r3, #0]
8004566: 699a ldr r2, [r3, #24]
8004568: 463b mov r3, r7
800456a: 681b ldr r3, [r3, #0]
800456c: 691b ldr r3, [r3, #16]
800456e: 429a cmp r2, r3
8004570: d90e bls.n 8004590 <USB_EPStartXfer+0xf58>
{
len = ep->maxpacket;
8004572: 463b mov r3, r7
8004574: 681b ldr r3, [r3, #0]
8004576: 691b ldr r3, [r3, #16]
8004578: f8c7 310c str.w r3, [r7, #268] ; 0x10c
ep->xfer_len -= len;
800457c: 463b mov r3, r7
800457e: 681b ldr r3, [r3, #0]
8004580: 699a ldr r2, [r3, #24]
8004582: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8004586: 1ad2 subs r2, r2, r3
8004588: 463b mov r3, r7
800458a: 681b ldr r3, [r3, #0]
800458c: 619a str r2, [r3, #24]
800458e: e008 b.n 80045a2 <USB_EPStartXfer+0xf6a>
}
else
{
len = ep->xfer_len;
8004590: 463b mov r3, r7
8004592: 681b ldr r3, [r3, #0]
8004594: 699b ldr r3, [r3, #24]
8004596: f8c7 310c str.w r3, [r7, #268] ; 0x10c
ep->xfer_len = 0U;
800459a: 463b mov r3, r7
800459c: 681b ldr r3, [r3, #0]
800459e: 2200 movs r2, #0
80045a0: 619a str r2, [r3, #24]
}
PCD_SET_EP_DBUF_CNT(USBx, ep->num, ep->is_in, len);
80045a2: 463b mov r3, r7
80045a4: 681b ldr r3, [r3, #0]
80045a6: 785b ldrb r3, [r3, #1]
80045a8: 2b00 cmp r3, #0
80045aa: d16f bne.n 800468c <USB_EPStartXfer+0x1054>
80045ac: 1d3b adds r3, r7, #4
80045ae: 681b ldr r3, [r3, #0]
80045b0: f8c7 30d0 str.w r3, [r7, #208] ; 0xd0
80045b4: 1d3b adds r3, r7, #4
80045b6: 681b ldr r3, [r3, #0]
80045b8: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
80045bc: b29b uxth r3, r3
80045be: 461a mov r2, r3
80045c0: f8d7 30d0 ldr.w r3, [r7, #208] ; 0xd0
80045c4: 4413 add r3, r2
80045c6: f8c7 30d0 str.w r3, [r7, #208] ; 0xd0
80045ca: 463b mov r3, r7
80045cc: 681b ldr r3, [r3, #0]
80045ce: 781b ldrb r3, [r3, #0]
80045d0: 011a lsls r2, r3, #4
80045d2: f8d7 30d0 ldr.w r3, [r7, #208] ; 0xd0
80045d6: 4413 add r3, r2
80045d8: f203 4304 addw r3, r3, #1028 ; 0x404
80045dc: f8c7 30cc str.w r3, [r7, #204] ; 0xcc
80045e0: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
80045e4: 2b00 cmp r3, #0
80045e6: d116 bne.n 8004616 <USB_EPStartXfer+0xfde>
80045e8: f8d7 30cc ldr.w r3, [r7, #204] ; 0xcc
80045ec: 881b ldrh r3, [r3, #0]
80045ee: b29b uxth r3, r3
80045f0: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
80045f4: b29a uxth r2, r3
80045f6: f8d7 30cc ldr.w r3, [r7, #204] ; 0xcc
80045fa: 801a strh r2, [r3, #0]
80045fc: f8d7 30cc ldr.w r3, [r7, #204] ; 0xcc
8004600: 881b ldrh r3, [r3, #0]
8004602: b29b uxth r3, r3
8004604: ea6f 4343 mvn.w r3, r3, lsl #17
8004608: ea6f 4353 mvn.w r3, r3, lsr #17
800460c: b29a uxth r2, r3
800460e: f8d7 30cc ldr.w r3, [r7, #204] ; 0xcc
8004612: 801a strh r2, [r3, #0]
8004614: e05f b.n 80046d6 <USB_EPStartXfer+0x109e>
8004616: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
800461a: 2b3e cmp r3, #62 ; 0x3e
800461c: d818 bhi.n 8004650 <USB_EPStartXfer+0x1018>
800461e: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8004622: 085b lsrs r3, r3, #1
8004624: f8c7 30e0 str.w r3, [r7, #224] ; 0xe0
8004628: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
800462c: f003 0301 and.w r3, r3, #1
8004630: 2b00 cmp r3, #0
8004632: d004 beq.n 800463e <USB_EPStartXfer+0x1006>
8004634: f8d7 30e0 ldr.w r3, [r7, #224] ; 0xe0
8004638: 3301 adds r3, #1
800463a: f8c7 30e0 str.w r3, [r7, #224] ; 0xe0
800463e: f8d7 30e0 ldr.w r3, [r7, #224] ; 0xe0
8004642: b29b uxth r3, r3
8004644: 029b lsls r3, r3, #10
8004646: b29a uxth r2, r3
8004648: f8d7 30cc ldr.w r3, [r7, #204] ; 0xcc
800464c: 801a strh r2, [r3, #0]
800464e: e042 b.n 80046d6 <USB_EPStartXfer+0x109e>
8004650: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8004654: 095b lsrs r3, r3, #5
8004656: f8c7 30e0 str.w r3, [r7, #224] ; 0xe0
800465a: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
800465e: f003 031f and.w r3, r3, #31
8004662: 2b00 cmp r3, #0
8004664: d104 bne.n 8004670 <USB_EPStartXfer+0x1038>
8004666: f8d7 30e0 ldr.w r3, [r7, #224] ; 0xe0
800466a: 3b01 subs r3, #1
800466c: f8c7 30e0 str.w r3, [r7, #224] ; 0xe0
8004670: f8d7 30e0 ldr.w r3, [r7, #224] ; 0xe0
8004674: b29b uxth r3, r3
8004676: 029b lsls r3, r3, #10
8004678: b29b uxth r3, r3
800467a: ea6f 4343 mvn.w r3, r3, lsl #17
800467e: ea6f 4353 mvn.w r3, r3, lsr #17
8004682: b29a uxth r2, r3
8004684: f8d7 30cc ldr.w r3, [r7, #204] ; 0xcc
8004688: 801a strh r2, [r3, #0]
800468a: e024 b.n 80046d6 <USB_EPStartXfer+0x109e>
800468c: 463b mov r3, r7
800468e: 681b ldr r3, [r3, #0]
8004690: 785b ldrb r3, [r3, #1]
8004692: 2b01 cmp r3, #1
8004694: d11f bne.n 80046d6 <USB_EPStartXfer+0x109e>
8004696: 1d3b adds r3, r7, #4
8004698: 681b ldr r3, [r3, #0]
800469a: f8c7 30d8 str.w r3, [r7, #216] ; 0xd8
800469e: 1d3b adds r3, r7, #4
80046a0: 681b ldr r3, [r3, #0]
80046a2: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
80046a6: b29b uxth r3, r3
80046a8: 461a mov r2, r3
80046aa: f8d7 30d8 ldr.w r3, [r7, #216] ; 0xd8
80046ae: 4413 add r3, r2
80046b0: f8c7 30d8 str.w r3, [r7, #216] ; 0xd8
80046b4: 463b mov r3, r7
80046b6: 681b ldr r3, [r3, #0]
80046b8: 781b ldrb r3, [r3, #0]
80046ba: 011a lsls r2, r3, #4
80046bc: f8d7 30d8 ldr.w r3, [r7, #216] ; 0xd8
80046c0: 4413 add r3, r2
80046c2: f203 4304 addw r3, r3, #1028 ; 0x404
80046c6: f8c7 30d4 str.w r3, [r7, #212] ; 0xd4
80046ca: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
80046ce: b29a uxth r2, r3
80046d0: f8d7 30d4 ldr.w r3, [r7, #212] ; 0xd4
80046d4: 801a strh r2, [r3, #0]
80046d6: 1d3b adds r3, r7, #4
80046d8: 681b ldr r3, [r3, #0]
80046da: f8c7 30c8 str.w r3, [r7, #200] ; 0xc8
80046de: 463b mov r3, r7
80046e0: 681b ldr r3, [r3, #0]
80046e2: 785b ldrb r3, [r3, #1]
80046e4: 2b00 cmp r3, #0
80046e6: d16f bne.n 80047c8 <USB_EPStartXfer+0x1190>
80046e8: 1d3b adds r3, r7, #4
80046ea: 681b ldr r3, [r3, #0]
80046ec: f8c7 30c0 str.w r3, [r7, #192] ; 0xc0
80046f0: 1d3b adds r3, r7, #4
80046f2: 681b ldr r3, [r3, #0]
80046f4: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
80046f8: b29b uxth r3, r3
80046fa: 461a mov r2, r3
80046fc: f8d7 30c0 ldr.w r3, [r7, #192] ; 0xc0
8004700: 4413 add r3, r2
8004702: f8c7 30c0 str.w r3, [r7, #192] ; 0xc0
8004706: 463b mov r3, r7
8004708: 681b ldr r3, [r3, #0]
800470a: 781b ldrb r3, [r3, #0]
800470c: 011a lsls r2, r3, #4
800470e: f8d7 30c0 ldr.w r3, [r7, #192] ; 0xc0
8004712: 4413 add r3, r2
8004714: f203 430c addw r3, r3, #1036 ; 0x40c
8004718: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
800471c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8004720: 2b00 cmp r3, #0
8004722: d116 bne.n 8004752 <USB_EPStartXfer+0x111a>
8004724: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc
8004728: 881b ldrh r3, [r3, #0]
800472a: b29b uxth r3, r3
800472c: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
8004730: b29a uxth r2, r3
8004732: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc
8004736: 801a strh r2, [r3, #0]
8004738: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc
800473c: 881b ldrh r3, [r3, #0]
800473e: b29b uxth r3, r3
8004740: ea6f 4343 mvn.w r3, r3, lsl #17
8004744: ea6f 4353 mvn.w r3, r3, lsr #17
8004748: b29a uxth r2, r3
800474a: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc
800474e: 801a strh r2, [r3, #0]
8004750: e05e b.n 8004810 <USB_EPStartXfer+0x11d8>
8004752: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8004756: 2b3e cmp r3, #62 ; 0x3e
8004758: d818 bhi.n 800478c <USB_EPStartXfer+0x1154>
800475a: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
800475e: 085b lsrs r3, r3, #1
8004760: f8c7 30dc str.w r3, [r7, #220] ; 0xdc
8004764: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8004768: f003 0301 and.w r3, r3, #1
800476c: 2b00 cmp r3, #0
800476e: d004 beq.n 800477a <USB_EPStartXfer+0x1142>
8004770: f8d7 30dc ldr.w r3, [r7, #220] ; 0xdc
8004774: 3301 adds r3, #1
8004776: f8c7 30dc str.w r3, [r7, #220] ; 0xdc
800477a: f8d7 30dc ldr.w r3, [r7, #220] ; 0xdc
800477e: b29b uxth r3, r3
8004780: 029b lsls r3, r3, #10
8004782: b29a uxth r2, r3
8004784: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc
8004788: 801a strh r2, [r3, #0]
800478a: e041 b.n 8004810 <USB_EPStartXfer+0x11d8>
800478c: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8004790: 095b lsrs r3, r3, #5
8004792: f8c7 30dc str.w r3, [r7, #220] ; 0xdc
8004796: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
800479a: f003 031f and.w r3, r3, #31
800479e: 2b00 cmp r3, #0
80047a0: d104 bne.n 80047ac <USB_EPStartXfer+0x1174>
80047a2: f8d7 30dc ldr.w r3, [r7, #220] ; 0xdc
80047a6: 3b01 subs r3, #1
80047a8: f8c7 30dc str.w r3, [r7, #220] ; 0xdc
80047ac: f8d7 30dc ldr.w r3, [r7, #220] ; 0xdc
80047b0: b29b uxth r3, r3
80047b2: 029b lsls r3, r3, #10
80047b4: b29b uxth r3, r3
80047b6: ea6f 4343 mvn.w r3, r3, lsl #17
80047ba: ea6f 4353 mvn.w r3, r3, lsr #17
80047be: b29a uxth r2, r3
80047c0: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc
80047c4: 801a strh r2, [r3, #0]
80047c6: e023 b.n 8004810 <USB_EPStartXfer+0x11d8>
80047c8: 463b mov r3, r7
80047ca: 681b ldr r3, [r3, #0]
80047cc: 785b ldrb r3, [r3, #1]
80047ce: 2b01 cmp r3, #1
80047d0: d11e bne.n 8004810 <USB_EPStartXfer+0x11d8>
80047d2: 1d3b adds r3, r7, #4
80047d4: 681b ldr r3, [r3, #0]
80047d6: f8b3 3050 ldrh.w r3, [r3, #80] ; 0x50
80047da: b29b uxth r3, r3
80047dc: 461a mov r2, r3
80047de: f8d7 30c8 ldr.w r3, [r7, #200] ; 0xc8
80047e2: 4413 add r3, r2
80047e4: f8c7 30c8 str.w r3, [r7, #200] ; 0xc8
80047e8: 463b mov r3, r7
80047ea: 681b ldr r3, [r3, #0]
80047ec: 781b ldrb r3, [r3, #0]
80047ee: 011a lsls r2, r3, #4
80047f0: f8d7 30c8 ldr.w r3, [r7, #200] ; 0xc8
80047f4: 4413 add r3, r2
80047f6: f203 430c addw r3, r3, #1036 ; 0x40c
80047fa: f8c7 30c4 str.w r3, [r7, #196] ; 0xc4
80047fe: f8d7 310c ldr.w r3, [r7, #268] ; 0x10c
8004802: b29a uxth r2, r3
8004804: f8d7 30c4 ldr.w r3, [r7, #196] ; 0xc4
8004808: 801a strh r2, [r3, #0]
800480a: e001 b.n 8004810 <USB_EPStartXfer+0x11d8>
}
else
{
return HAL_ERROR;
800480c: 2301 movs r3, #1
800480e: e02e b.n 800486e <USB_EPStartXfer+0x1236>
}
}
PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID);
8004810: 1d3b adds r3, r7, #4
8004812: 681a ldr r2, [r3, #0]
8004814: 463b mov r3, r7
8004816: 681b ldr r3, [r3, #0]
8004818: 781b ldrb r3, [r3, #0]
800481a: 009b lsls r3, r3, #2
800481c: 4413 add r3, r2
800481e: 881b ldrh r3, [r3, #0]
8004820: b29b uxth r3, r3
8004822: f423 4380 bic.w r3, r3, #16384 ; 0x4000
8004826: f023 0370 bic.w r3, r3, #112 ; 0x70
800482a: f8a7 308e strh.w r3, [r7, #142] ; 0x8e
800482e: f8b7 308e ldrh.w r3, [r7, #142] ; 0x8e
8004832: f483 5380 eor.w r3, r3, #4096 ; 0x1000
8004836: f8a7 308e strh.w r3, [r7, #142] ; 0x8e
800483a: f8b7 308e ldrh.w r3, [r7, #142] ; 0x8e
800483e: f483 5300 eor.w r3, r3, #8192 ; 0x2000
8004842: f8a7 308e strh.w r3, [r7, #142] ; 0x8e
8004846: 1d3b adds r3, r7, #4
8004848: 681a ldr r2, [r3, #0]
800484a: 463b mov r3, r7
800484c: 681b ldr r3, [r3, #0]
800484e: 781b ldrb r3, [r3, #0]
8004850: 009b lsls r3, r3, #2
8004852: 441a add r2, r3
8004854: f8b7 308e ldrh.w r3, [r7, #142] ; 0x8e
8004858: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
800485c: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8004860: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8004864: f043 0380 orr.w r3, r3, #128 ; 0x80
8004868: b29b uxth r3, r3
800486a: 8013 strh r3, [r2, #0]
}
return HAL_OK;
800486c: 2300 movs r3, #0
}
800486e: 4618 mov r0, r3
8004870: f507 7788 add.w r7, r7, #272 ; 0x110
8004874: 46bd mov sp, r7
8004876: bd80 pop {r7, pc}
08004878 <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)
{
8004878: b480 push {r7}
800487a: b085 sub sp, #20
800487c: af00 add r7, sp, #0
800487e: 6078 str r0, [r7, #4]
8004880: 6039 str r1, [r7, #0]
if (ep->is_in != 0U)
8004882: 683b ldr r3, [r7, #0]
8004884: 785b ldrb r3, [r3, #1]
8004886: 2b00 cmp r3, #0
8004888: d020 beq.n 80048cc <USB_EPSetStall+0x54>
{
PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_STALL);
800488a: 687a ldr r2, [r7, #4]
800488c: 683b ldr r3, [r7, #0]
800488e: 781b ldrb r3, [r3, #0]
8004890: 009b lsls r3, r3, #2
8004892: 4413 add r3, r2
8004894: 881b ldrh r3, [r3, #0]
8004896: b29b uxth r3, r3
8004898: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
800489c: f023 0340 bic.w r3, r3, #64 ; 0x40
80048a0: 81bb strh r3, [r7, #12]
80048a2: 89bb ldrh r3, [r7, #12]
80048a4: f083 0310 eor.w r3, r3, #16
80048a8: 81bb strh r3, [r7, #12]
80048aa: 687a ldr r2, [r7, #4]
80048ac: 683b ldr r3, [r7, #0]
80048ae: 781b ldrb r3, [r3, #0]
80048b0: 009b lsls r3, r3, #2
80048b2: 441a add r2, r3
80048b4: 89bb ldrh r3, [r7, #12]
80048b6: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
80048ba: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
80048be: f443 4300 orr.w r3, r3, #32768 ; 0x8000
80048c2: f043 0380 orr.w r3, r3, #128 ; 0x80
80048c6: b29b uxth r3, r3
80048c8: 8013 strh r3, [r2, #0]
80048ca: e01f b.n 800490c <USB_EPSetStall+0x94>
}
else
{
PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_STALL);
80048cc: 687a ldr r2, [r7, #4]
80048ce: 683b ldr r3, [r7, #0]
80048d0: 781b ldrb r3, [r3, #0]
80048d2: 009b lsls r3, r3, #2
80048d4: 4413 add r3, r2
80048d6: 881b ldrh r3, [r3, #0]
80048d8: b29b uxth r3, r3
80048da: f423 4380 bic.w r3, r3, #16384 ; 0x4000
80048de: f023 0370 bic.w r3, r3, #112 ; 0x70
80048e2: 81fb strh r3, [r7, #14]
80048e4: 89fb ldrh r3, [r7, #14]
80048e6: f483 5380 eor.w r3, r3, #4096 ; 0x1000
80048ea: 81fb strh r3, [r7, #14]
80048ec: 687a ldr r2, [r7, #4]
80048ee: 683b ldr r3, [r7, #0]
80048f0: 781b ldrb r3, [r3, #0]
80048f2: 009b lsls r3, r3, #2
80048f4: 441a add r2, r3
80048f6: 89fb ldrh r3, [r7, #14]
80048f8: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
80048fc: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8004900: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8004904: f043 0380 orr.w r3, r3, #128 ; 0x80
8004908: b29b uxth r3, r3
800490a: 8013 strh r3, [r2, #0]
}
return HAL_OK;
800490c: 2300 movs r3, #0
}
800490e: 4618 mov r0, r3
8004910: 3714 adds r7, #20
8004912: 46bd mov sp, r7
8004914: bc80 pop {r7}
8004916: 4770 bx lr
08004918 <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)
{
8004918: b480 push {r7}
800491a: b087 sub sp, #28
800491c: af00 add r7, sp, #0
800491e: 6078 str r0, [r7, #4]
8004920: 6039 str r1, [r7, #0]
if (ep->doublebuffer == 0U)
8004922: 683b ldr r3, [r7, #0]
8004924: 7b1b ldrb r3, [r3, #12]
8004926: 2b00 cmp r3, #0
8004928: f040 809d bne.w 8004a66 <USB_EPClearStall+0x14e>
{
if (ep->is_in != 0U)
800492c: 683b ldr r3, [r7, #0]
800492e: 785b ldrb r3, [r3, #1]
8004930: 2b00 cmp r3, #0
8004932: d04c beq.n 80049ce <USB_EPClearStall+0xb6>
{
PCD_CLEAR_TX_DTOG(USBx, ep->num);
8004934: 687a ldr r2, [r7, #4]
8004936: 683b ldr r3, [r7, #0]
8004938: 781b ldrb r3, [r3, #0]
800493a: 009b lsls r3, r3, #2
800493c: 4413 add r3, r2
800493e: 881b ldrh r3, [r3, #0]
8004940: 823b strh r3, [r7, #16]
8004942: 8a3b ldrh r3, [r7, #16]
8004944: f003 0340 and.w r3, r3, #64 ; 0x40
8004948: 2b00 cmp r3, #0
800494a: d01b beq.n 8004984 <USB_EPClearStall+0x6c>
800494c: 687a ldr r2, [r7, #4]
800494e: 683b ldr r3, [r7, #0]
8004950: 781b ldrb r3, [r3, #0]
8004952: 009b lsls r3, r3, #2
8004954: 4413 add r3, r2
8004956: 881b ldrh r3, [r3, #0]
8004958: b29b uxth r3, r3
800495a: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
800495e: f023 0370 bic.w r3, r3, #112 ; 0x70
8004962: 81fb strh r3, [r7, #14]
8004964: 687a ldr r2, [r7, #4]
8004966: 683b ldr r3, [r7, #0]
8004968: 781b ldrb r3, [r3, #0]
800496a: 009b lsls r3, r3, #2
800496c: 441a add r2, r3
800496e: 89fb ldrh r3, [r7, #14]
8004970: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8004974: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8004978: f443 4300 orr.w r3, r3, #32768 ; 0x8000
800497c: f043 03c0 orr.w r3, r3, #192 ; 0xc0
8004980: b29b uxth r3, r3
8004982: 8013 strh r3, [r2, #0]
if (ep->type != EP_TYPE_ISOC)
8004984: 683b ldr r3, [r7, #0]
8004986: 78db ldrb r3, [r3, #3]
8004988: 2b01 cmp r3, #1
800498a: d06c beq.n 8004a66 <USB_EPClearStall+0x14e>
{
/* Configure NAK status for the Endpoint */
PCD_SET_EP_TX_STATUS(USBx, ep->num, USB_EP_TX_NAK);
800498c: 687a ldr r2, [r7, #4]
800498e: 683b ldr r3, [r7, #0]
8004990: 781b ldrb r3, [r3, #0]
8004992: 009b lsls r3, r3, #2
8004994: 4413 add r3, r2
8004996: 881b ldrh r3, [r3, #0]
8004998: b29b uxth r3, r3
800499a: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
800499e: f023 0340 bic.w r3, r3, #64 ; 0x40
80049a2: 81bb strh r3, [r7, #12]
80049a4: 89bb ldrh r3, [r7, #12]
80049a6: f083 0320 eor.w r3, r3, #32
80049aa: 81bb strh r3, [r7, #12]
80049ac: 687a ldr r2, [r7, #4]
80049ae: 683b ldr r3, [r7, #0]
80049b0: 781b ldrb r3, [r3, #0]
80049b2: 009b lsls r3, r3, #2
80049b4: 441a add r2, r3
80049b6: 89bb ldrh r3, [r7, #12]
80049b8: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
80049bc: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
80049c0: f443 4300 orr.w r3, r3, #32768 ; 0x8000
80049c4: f043 0380 orr.w r3, r3, #128 ; 0x80
80049c8: b29b uxth r3, r3
80049ca: 8013 strh r3, [r2, #0]
80049cc: e04b b.n 8004a66 <USB_EPClearStall+0x14e>
}
}
else
{
PCD_CLEAR_RX_DTOG(USBx, ep->num);
80049ce: 687a ldr r2, [r7, #4]
80049d0: 683b ldr r3, [r7, #0]
80049d2: 781b ldrb r3, [r3, #0]
80049d4: 009b lsls r3, r3, #2
80049d6: 4413 add r3, r2
80049d8: 881b ldrh r3, [r3, #0]
80049da: 82fb strh r3, [r7, #22]
80049dc: 8afb ldrh r3, [r7, #22]
80049de: f403 4380 and.w r3, r3, #16384 ; 0x4000
80049e2: 2b00 cmp r3, #0
80049e4: d01b beq.n 8004a1e <USB_EPClearStall+0x106>
80049e6: 687a ldr r2, [r7, #4]
80049e8: 683b ldr r3, [r7, #0]
80049ea: 781b ldrb r3, [r3, #0]
80049ec: 009b lsls r3, r3, #2
80049ee: 4413 add r3, r2
80049f0: 881b ldrh r3, [r3, #0]
80049f2: b29b uxth r3, r3
80049f4: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
80049f8: f023 0370 bic.w r3, r3, #112 ; 0x70
80049fc: 82bb strh r3, [r7, #20]
80049fe: 687a ldr r2, [r7, #4]
8004a00: 683b ldr r3, [r7, #0]
8004a02: 781b ldrb r3, [r3, #0]
8004a04: 009b lsls r3, r3, #2
8004a06: 441a add r2, r3
8004a08: 8abb ldrh r3, [r7, #20]
8004a0a: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8004a0e: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8004a12: f443 4340 orr.w r3, r3, #49152 ; 0xc000
8004a16: f043 0380 orr.w r3, r3, #128 ; 0x80
8004a1a: b29b uxth r3, r3
8004a1c: 8013 strh r3, [r2, #0]
/* Configure VALID status for the Endpoint */
PCD_SET_EP_RX_STATUS(USBx, ep->num, USB_EP_RX_VALID);
8004a1e: 687a ldr r2, [r7, #4]
8004a20: 683b ldr r3, [r7, #0]
8004a22: 781b ldrb r3, [r3, #0]
8004a24: 009b lsls r3, r3, #2
8004a26: 4413 add r3, r2
8004a28: 881b ldrh r3, [r3, #0]
8004a2a: b29b uxth r3, r3
8004a2c: f423 4380 bic.w r3, r3, #16384 ; 0x4000
8004a30: f023 0370 bic.w r3, r3, #112 ; 0x70
8004a34: 827b strh r3, [r7, #18]
8004a36: 8a7b ldrh r3, [r7, #18]
8004a38: f483 5380 eor.w r3, r3, #4096 ; 0x1000
8004a3c: 827b strh r3, [r7, #18]
8004a3e: 8a7b ldrh r3, [r7, #18]
8004a40: f483 5300 eor.w r3, r3, #8192 ; 0x2000
8004a44: 827b strh r3, [r7, #18]
8004a46: 687a ldr r2, [r7, #4]
8004a48: 683b ldr r3, [r7, #0]
8004a4a: 781b ldrb r3, [r3, #0]
8004a4c: 009b lsls r3, r3, #2
8004a4e: 441a add r2, r3
8004a50: 8a7b ldrh r3, [r7, #18]
8004a52: f043 437f orr.w r3, r3, #4278190080 ; 0xff000000
8004a56: f443 037f orr.w r3, r3, #16711680 ; 0xff0000
8004a5a: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8004a5e: f043 0380 orr.w r3, r3, #128 ; 0x80
8004a62: b29b uxth r3, r3
8004a64: 8013 strh r3, [r2, #0]
}
}
return HAL_OK;
8004a66: 2300 movs r3, #0
}
8004a68: 4618 mov r0, r3
8004a6a: 371c adds r7, #28
8004a6c: 46bd mov sp, r7
8004a6e: bc80 pop {r7}
8004a70: 4770 bx lr
08004a72 <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)
{
8004a72: b480 push {r7}
8004a74: b083 sub sp, #12
8004a76: af00 add r7, sp, #0
8004a78: 6078 str r0, [r7, #4]
8004a7a: 460b mov r3, r1
8004a7c: 70fb strb r3, [r7, #3]
if (address == 0U)
8004a7e: 78fb ldrb r3, [r7, #3]
8004a80: 2b00 cmp r3, #0
8004a82: d103 bne.n 8004a8c <USB_SetDevAddress+0x1a>
{
/* set device address and enable function */
USBx->DADDR = (uint16_t)USB_DADDR_EF;
8004a84: 687b ldr r3, [r7, #4]
8004a86: 2280 movs r2, #128 ; 0x80
8004a88: f8a3 204c strh.w r2, [r3, #76] ; 0x4c
}
return HAL_OK;
8004a8c: 2300 movs r3, #0
}
8004a8e: 4618 mov r0, r3
8004a90: 370c adds r7, #12
8004a92: 46bd mov sp, r7
8004a94: bc80 pop {r7}
8004a96: 4770 bx lr
08004a98 <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)
{
8004a98: b480 push {r7}
8004a9a: b083 sub sp, #12
8004a9c: af00 add r7, sp, #0
8004a9e: 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;
8004aa0: 2300 movs r3, #0
}
8004aa2: 4618 mov r0, r3
8004aa4: 370c adds r7, #12
8004aa6: 46bd mov sp, r7
8004aa8: bc80 pop {r7}
8004aaa: 4770 bx lr
08004aac <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)
{
8004aac: b480 push {r7}
8004aae: b083 sub sp, #12
8004ab0: af00 add r7, sp, #0
8004ab2: 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;
8004ab4: 2300 movs r3, #0
}
8004ab6: 4618 mov r0, r3
8004ab8: 370c adds r7, #12
8004aba: 46bd mov sp, r7
8004abc: bc80 pop {r7}
8004abe: 4770 bx lr
08004ac0 <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)
{
8004ac0: b480 push {r7}
8004ac2: b085 sub sp, #20
8004ac4: af00 add r7, sp, #0
8004ac6: 6078 str r0, [r7, #4]
uint32_t tmpreg;
tmpreg = USBx->ISTR;
8004ac8: 687b ldr r3, [r7, #4]
8004aca: f8b3 3044 ldrh.w r3, [r3, #68] ; 0x44
8004ace: b29b uxth r3, r3
8004ad0: 60fb str r3, [r7, #12]
return tmpreg;
8004ad2: 68fb ldr r3, [r7, #12]
}
8004ad4: 4618 mov r0, r3
8004ad6: 3714 adds r7, #20
8004ad8: 46bd mov sp, r7
8004ada: bc80 pop {r7}
8004adc: 4770 bx lr
08004ade <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)
{
8004ade: b480 push {r7}
8004ae0: b083 sub sp, #12
8004ae2: af00 add r7, sp, #0
8004ae4: 6078 str r0, [r7, #4]
8004ae6: 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;
8004ae8: 2300 movs r3, #0
}
8004aea: 4618 mov r0, r3
8004aec: 370c adds r7, #12
8004aee: 46bd mov sp, r7
8004af0: bc80 pop {r7}
8004af2: 4770 bx lr
08004af4 <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)
{
8004af4: b480 push {r7}
8004af6: b08d sub sp, #52 ; 0x34
8004af8: af00 add r7, sp, #0
8004afa: 60f8 str r0, [r7, #12]
8004afc: 60b9 str r1, [r7, #8]
8004afe: 4611 mov r1, r2
8004b00: 461a mov r2, r3
8004b02: 460b mov r3, r1
8004b04: 80fb strh r3, [r7, #6]
8004b06: 4613 mov r3, r2
8004b08: 80bb strh r3, [r7, #4]
uint32_t n = ((uint32_t)wNBytes + 1U) >> 1;
8004b0a: 88bb ldrh r3, [r7, #4]
8004b0c: 3301 adds r3, #1
8004b0e: 085b lsrs r3, r3, #1
8004b10: 623b str r3, [r7, #32]
uint32_t BaseAddr = (uint32_t)USBx;
8004b12: 68fb ldr r3, [r7, #12]
8004b14: 61fb str r3, [r7, #28]
uint32_t i, temp1, temp2;
__IO uint16_t *pdwVal;
uint8_t *pBuf = pbUsrBuf;
8004b16: 68bb ldr r3, [r7, #8]
8004b18: 627b str r3, [r7, #36] ; 0x24
pdwVal = (__IO uint16_t *)(BaseAddr + 0x400U + ((uint32_t)wPMABufAddr * PMA_ACCESS));
8004b1a: 88fb ldrh r3, [r7, #6]
8004b1c: 005a lsls r2, r3, #1
8004b1e: 69fb ldr r3, [r7, #28]
8004b20: 4413 add r3, r2
8004b22: f503 6380 add.w r3, r3, #1024 ; 0x400
8004b26: 62bb str r3, [r7, #40] ; 0x28
for (i = n; i != 0U; i--)
8004b28: 6a3b ldr r3, [r7, #32]
8004b2a: 62fb str r3, [r7, #44] ; 0x2c
8004b2c: e01e b.n 8004b6c <USB_WritePMA+0x78>
{
temp1 = *pBuf;
8004b2e: 6a7b ldr r3, [r7, #36] ; 0x24
8004b30: 781b ldrb r3, [r3, #0]
8004b32: 61bb str r3, [r7, #24]
pBuf++;
8004b34: 6a7b ldr r3, [r7, #36] ; 0x24
8004b36: 3301 adds r3, #1
8004b38: 627b str r3, [r7, #36] ; 0x24
temp2 = temp1 | ((uint16_t)((uint16_t) *pBuf << 8));
8004b3a: 6a7b ldr r3, [r7, #36] ; 0x24
8004b3c: 781b ldrb r3, [r3, #0]
8004b3e: b29b uxth r3, r3
8004b40: 021b lsls r3, r3, #8
8004b42: b29b uxth r3, r3
8004b44: 461a mov r2, r3
8004b46: 69bb ldr r3, [r7, #24]
8004b48: 4313 orrs r3, r2
8004b4a: 617b str r3, [r7, #20]
*pdwVal = (uint16_t)temp2;
8004b4c: 697b ldr r3, [r7, #20]
8004b4e: b29a uxth r2, r3
8004b50: 6abb ldr r3, [r7, #40] ; 0x28
8004b52: 801a strh r2, [r3, #0]
pdwVal++;
8004b54: 6abb ldr r3, [r7, #40] ; 0x28
8004b56: 3302 adds r3, #2
8004b58: 62bb str r3, [r7, #40] ; 0x28
#if PMA_ACCESS > 1U
pdwVal++;
8004b5a: 6abb ldr r3, [r7, #40] ; 0x28
8004b5c: 3302 adds r3, #2
8004b5e: 62bb str r3, [r7, #40] ; 0x28
#endif
pBuf++;
8004b60: 6a7b ldr r3, [r7, #36] ; 0x24
8004b62: 3301 adds r3, #1
8004b64: 627b str r3, [r7, #36] ; 0x24
for (i = n; i != 0U; i--)
8004b66: 6afb ldr r3, [r7, #44] ; 0x2c
8004b68: 3b01 subs r3, #1
8004b6a: 62fb str r3, [r7, #44] ; 0x2c
8004b6c: 6afb ldr r3, [r7, #44] ; 0x2c
8004b6e: 2b00 cmp r3, #0
8004b70: d1dd bne.n 8004b2e <USB_WritePMA+0x3a>
}
}
8004b72: bf00 nop
8004b74: 3734 adds r7, #52 ; 0x34
8004b76: 46bd mov sp, r7
8004b78: bc80 pop {r7}
8004b7a: 4770 bx lr
08004b7c <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)
{
8004b7c: b480 push {r7}
8004b7e: b08b sub sp, #44 ; 0x2c
8004b80: af00 add r7, sp, #0
8004b82: 60f8 str r0, [r7, #12]
8004b84: 60b9 str r1, [r7, #8]
8004b86: 4611 mov r1, r2
8004b88: 461a mov r2, r3
8004b8a: 460b mov r3, r1
8004b8c: 80fb strh r3, [r7, #6]
8004b8e: 4613 mov r3, r2
8004b90: 80bb strh r3, [r7, #4]
uint32_t n = (uint32_t)wNBytes >> 1;
8004b92: 88bb ldrh r3, [r7, #4]
8004b94: 085b lsrs r3, r3, #1
8004b96: b29b uxth r3, r3
8004b98: 61bb str r3, [r7, #24]
uint32_t BaseAddr = (uint32_t)USBx;
8004b9a: 68fb ldr r3, [r7, #12]
8004b9c: 617b str r3, [r7, #20]
uint32_t i, temp;
__IO uint16_t *pdwVal;
uint8_t *pBuf = pbUsrBuf;
8004b9e: 68bb ldr r3, [r7, #8]
8004ba0: 61fb str r3, [r7, #28]
pdwVal = (__IO uint16_t *)(BaseAddr + 0x400U + ((uint32_t)wPMABufAddr * PMA_ACCESS));
8004ba2: 88fb ldrh r3, [r7, #6]
8004ba4: 005a lsls r2, r3, #1
8004ba6: 697b ldr r3, [r7, #20]
8004ba8: 4413 add r3, r2
8004baa: f503 6380 add.w r3, r3, #1024 ; 0x400
8004bae: 623b str r3, [r7, #32]
for (i = n; i != 0U; i--)
8004bb0: 69bb ldr r3, [r7, #24]
8004bb2: 627b str r3, [r7, #36] ; 0x24
8004bb4: e01b b.n 8004bee <USB_ReadPMA+0x72>
{
temp = *(__IO uint16_t *)pdwVal;
8004bb6: 6a3b ldr r3, [r7, #32]
8004bb8: 881b ldrh r3, [r3, #0]
8004bba: b29b uxth r3, r3
8004bbc: 613b str r3, [r7, #16]
pdwVal++;
8004bbe: 6a3b ldr r3, [r7, #32]
8004bc0: 3302 adds r3, #2
8004bc2: 623b str r3, [r7, #32]
*pBuf = (uint8_t)((temp >> 0) & 0xFFU);
8004bc4: 693b ldr r3, [r7, #16]
8004bc6: b2da uxtb r2, r3
8004bc8: 69fb ldr r3, [r7, #28]
8004bca: 701a strb r2, [r3, #0]
pBuf++;
8004bcc: 69fb ldr r3, [r7, #28]
8004bce: 3301 adds r3, #1
8004bd0: 61fb str r3, [r7, #28]
*pBuf = (uint8_t)((temp >> 8) & 0xFFU);
8004bd2: 693b ldr r3, [r7, #16]
8004bd4: 0a1b lsrs r3, r3, #8
8004bd6: b2da uxtb r2, r3
8004bd8: 69fb ldr r3, [r7, #28]
8004bda: 701a strb r2, [r3, #0]
pBuf++;
8004bdc: 69fb ldr r3, [r7, #28]
8004bde: 3301 adds r3, #1
8004be0: 61fb str r3, [r7, #28]
#if PMA_ACCESS > 1U
pdwVal++;
8004be2: 6a3b ldr r3, [r7, #32]
8004be4: 3302 adds r3, #2
8004be6: 623b str r3, [r7, #32]
for (i = n; i != 0U; i--)
8004be8: 6a7b ldr r3, [r7, #36] ; 0x24
8004bea: 3b01 subs r3, #1
8004bec: 627b str r3, [r7, #36] ; 0x24
8004bee: 6a7b ldr r3, [r7, #36] ; 0x24
8004bf0: 2b00 cmp r3, #0
8004bf2: d1e0 bne.n 8004bb6 <USB_ReadPMA+0x3a>
#endif
}
if ((wNBytes % 2U) != 0U)
8004bf4: 88bb ldrh r3, [r7, #4]
8004bf6: f003 0301 and.w r3, r3, #1
8004bfa: b29b uxth r3, r3
8004bfc: 2b00 cmp r3, #0
8004bfe: d007 beq.n 8004c10 <USB_ReadPMA+0x94>
{
temp = *pdwVal;
8004c00: 6a3b ldr r3, [r7, #32]
8004c02: 881b ldrh r3, [r3, #0]
8004c04: b29b uxth r3, r3
8004c06: 613b str r3, [r7, #16]
*pBuf = (uint8_t)((temp >> 0) & 0xFFU);
8004c08: 693b ldr r3, [r7, #16]
8004c0a: b2da uxtb r2, r3
8004c0c: 69fb ldr r3, [r7, #28]
8004c0e: 701a strb r2, [r3, #0]
}
}
8004c10: bf00 nop
8004c12: 372c adds r7, #44 ; 0x2c
8004c14: 46bd mov sp, r7
8004c16: bc80 pop {r7}
8004c18: 4770 bx lr
08004c1a <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)
{
8004c1a: b580 push {r7, lr}
8004c1c: b084 sub sp, #16
8004c1e: af00 add r7, sp, #0
8004c20: 6078 str r0, [r7, #4]
8004c22: 460b mov r3, r1
8004c24: 70fb strb r3, [r7, #3]
uint8_t ret = 0U;
8004c26: 2300 movs r3, #0
8004c28: 73fb strb r3, [r7, #15]
USBD_CDC_HandleTypeDef *hcdc;
if (pdev->dev_speed == USBD_SPEED_HIGH)
8004c2a: 687b ldr r3, [r7, #4]
8004c2c: 7c1b ldrb r3, [r3, #16]
8004c2e: 2b00 cmp r3, #0
8004c30: d115 bne.n 8004c5e <USBD_CDC_Init+0x44>
{
/* Open EP IN */
USBD_LL_OpenEP(pdev, CDC_IN_EP, USBD_EP_TYPE_BULK,
8004c32: f44f 7300 mov.w r3, #512 ; 0x200
8004c36: 2202 movs r2, #2
8004c38: 2181 movs r1, #129 ; 0x81
8004c3a: 6878 ldr r0, [r7, #4]
8004c3c: f001 fe7d bl 800693a <USBD_LL_OpenEP>
CDC_DATA_HS_IN_PACKET_SIZE);
pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 1U;
8004c40: 687b ldr r3, [r7, #4]
8004c42: 2201 movs r2, #1
8004c44: 62da str r2, [r3, #44] ; 0x2c
/* Open EP OUT */
USBD_LL_OpenEP(pdev, CDC_OUT_EP, USBD_EP_TYPE_BULK,
8004c46: f44f 7300 mov.w r3, #512 ; 0x200
8004c4a: 2202 movs r2, #2
8004c4c: 2101 movs r1, #1
8004c4e: 6878 ldr r0, [r7, #4]
8004c50: f001 fe73 bl 800693a <USBD_LL_OpenEP>
CDC_DATA_HS_OUT_PACKET_SIZE);
pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 1U;
8004c54: 687b ldr r3, [r7, #4]
8004c56: 2201 movs r2, #1
8004c58: f8c3 216c str.w r2, [r3, #364] ; 0x16c
8004c5c: e012 b.n 8004c84 <USBD_CDC_Init+0x6a>
}
else
{
/* Open EP IN */
USBD_LL_OpenEP(pdev, CDC_IN_EP, USBD_EP_TYPE_BULK,
8004c5e: 2340 movs r3, #64 ; 0x40
8004c60: 2202 movs r2, #2
8004c62: 2181 movs r1, #129 ; 0x81
8004c64: 6878 ldr r0, [r7, #4]
8004c66: f001 fe68 bl 800693a <USBD_LL_OpenEP>
CDC_DATA_FS_IN_PACKET_SIZE);
pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 1U;
8004c6a: 687b ldr r3, [r7, #4]
8004c6c: 2201 movs r2, #1
8004c6e: 62da str r2, [r3, #44] ; 0x2c
/* Open EP OUT */
USBD_LL_OpenEP(pdev, CDC_OUT_EP, USBD_EP_TYPE_BULK,
8004c70: 2340 movs r3, #64 ; 0x40
8004c72: 2202 movs r2, #2
8004c74: 2101 movs r1, #1
8004c76: 6878 ldr r0, [r7, #4]
8004c78: f001 fe5f bl 800693a <USBD_LL_OpenEP>
CDC_DATA_FS_OUT_PACKET_SIZE);
pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 1U;
8004c7c: 687b ldr r3, [r7, #4]
8004c7e: 2201 movs r2, #1
8004c80: 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);
8004c84: 2308 movs r3, #8
8004c86: 2203 movs r2, #3
8004c88: 2182 movs r1, #130 ; 0x82
8004c8a: 6878 ldr r0, [r7, #4]
8004c8c: f001 fe55 bl 800693a <USBD_LL_OpenEP>
pdev->ep_in[CDC_CMD_EP & 0xFU].is_used = 1U;
8004c90: 687b ldr r3, [r7, #4]
8004c92: 2201 movs r2, #1
8004c94: 641a str r2, [r3, #64] ; 0x40
pdev->pClassData = USBD_malloc(sizeof(USBD_CDC_HandleTypeDef));
8004c96: f44f 7007 mov.w r0, #540 ; 0x21c
8004c9a: f001 ff75 bl 8006b88 <USBD_static_malloc>
8004c9e: 4602 mov r2, r0
8004ca0: 687b ldr r3, [r7, #4]
8004ca2: f8c3 22b8 str.w r2, [r3, #696] ; 0x2b8
if (pdev->pClassData == NULL)
8004ca6: 687b ldr r3, [r7, #4]
8004ca8: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
8004cac: 2b00 cmp r3, #0
8004cae: d102 bne.n 8004cb6 <USBD_CDC_Init+0x9c>
{
ret = 1U;
8004cb0: 2301 movs r3, #1
8004cb2: 73fb strb r3, [r7, #15]
8004cb4: e026 b.n 8004d04 <USBD_CDC_Init+0xea>
}
else
{
hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData;
8004cb6: 687b ldr r3, [r7, #4]
8004cb8: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
8004cbc: 60bb str r3, [r7, #8]
/* Init physical Interface components */
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Init();
8004cbe: 687b ldr r3, [r7, #4]
8004cc0: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
8004cc4: 681b ldr r3, [r3, #0]
8004cc6: 4798 blx r3
/* Init Xfer states */
hcdc->TxState = 0U;
8004cc8: 68bb ldr r3, [r7, #8]
8004cca: 2200 movs r2, #0
8004ccc: f8c3 2214 str.w r2, [r3, #532] ; 0x214
hcdc->RxState = 0U;
8004cd0: 68bb ldr r3, [r7, #8]
8004cd2: 2200 movs r2, #0
8004cd4: f8c3 2218 str.w r2, [r3, #536] ; 0x218
if (pdev->dev_speed == USBD_SPEED_HIGH)
8004cd8: 687b ldr r3, [r7, #4]
8004cda: 7c1b ldrb r3, [r3, #16]
8004cdc: 2b00 cmp r3, #0
8004cde: d109 bne.n 8004cf4 <USBD_CDC_Init+0xda>
{
/* Prepare Out endpoint to receive next packet */
USBD_LL_PrepareReceive(pdev, CDC_OUT_EP, hcdc->RxBuffer,
8004ce0: 68bb ldr r3, [r7, #8]
8004ce2: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204
8004ce6: f44f 7300 mov.w r3, #512 ; 0x200
8004cea: 2101 movs r1, #1
8004cec: 6878 ldr r0, [r7, #4]
8004cee: f001 ff15 bl 8006b1c <USBD_LL_PrepareReceive>
8004cf2: e007 b.n 8004d04 <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,
8004cf4: 68bb ldr r3, [r7, #8]
8004cf6: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204
8004cfa: 2340 movs r3, #64 ; 0x40
8004cfc: 2101 movs r1, #1
8004cfe: 6878 ldr r0, [r7, #4]
8004d00: f001 ff0c bl 8006b1c <USBD_LL_PrepareReceive>
CDC_DATA_FS_OUT_PACKET_SIZE);
}
}
return ret;
8004d04: 7bfb ldrb r3, [r7, #15]
}
8004d06: 4618 mov r0, r3
8004d08: 3710 adds r7, #16
8004d0a: 46bd mov sp, r7
8004d0c: bd80 pop {r7, pc}
08004d0e <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)
{
8004d0e: b580 push {r7, lr}
8004d10: b084 sub sp, #16
8004d12: af00 add r7, sp, #0
8004d14: 6078 str r0, [r7, #4]
8004d16: 460b mov r3, r1
8004d18: 70fb strb r3, [r7, #3]
uint8_t ret = 0U;
8004d1a: 2300 movs r3, #0
8004d1c: 73fb strb r3, [r7, #15]
/* Close EP IN */
USBD_LL_CloseEP(pdev, CDC_IN_EP);
8004d1e: 2181 movs r1, #129 ; 0x81
8004d20: 6878 ldr r0, [r7, #4]
8004d22: f001 fe30 bl 8006986 <USBD_LL_CloseEP>
pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 0U;
8004d26: 687b ldr r3, [r7, #4]
8004d28: 2200 movs r2, #0
8004d2a: 62da str r2, [r3, #44] ; 0x2c
/* Close EP OUT */
USBD_LL_CloseEP(pdev, CDC_OUT_EP);
8004d2c: 2101 movs r1, #1
8004d2e: 6878 ldr r0, [r7, #4]
8004d30: f001 fe29 bl 8006986 <USBD_LL_CloseEP>
pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 0U;
8004d34: 687b ldr r3, [r7, #4]
8004d36: 2200 movs r2, #0
8004d38: f8c3 216c str.w r2, [r3, #364] ; 0x16c
/* Close Command IN EP */
USBD_LL_CloseEP(pdev, CDC_CMD_EP);
8004d3c: 2182 movs r1, #130 ; 0x82
8004d3e: 6878 ldr r0, [r7, #4]
8004d40: f001 fe21 bl 8006986 <USBD_LL_CloseEP>
pdev->ep_in[CDC_CMD_EP & 0xFU].is_used = 0U;
8004d44: 687b ldr r3, [r7, #4]
8004d46: 2200 movs r2, #0
8004d48: 641a str r2, [r3, #64] ; 0x40
/* DeInit physical Interface components */
if (pdev->pClassData != NULL)
8004d4a: 687b ldr r3, [r7, #4]
8004d4c: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
8004d50: 2b00 cmp r3, #0
8004d52: d00e beq.n 8004d72 <USBD_CDC_DeInit+0x64>
{
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->DeInit();
8004d54: 687b ldr r3, [r7, #4]
8004d56: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
8004d5a: 685b ldr r3, [r3, #4]
8004d5c: 4798 blx r3
USBD_free(pdev->pClassData);
8004d5e: 687b ldr r3, [r7, #4]
8004d60: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
8004d64: 4618 mov r0, r3
8004d66: f001 ff1b bl 8006ba0 <USBD_static_free>
pdev->pClassData = NULL;
8004d6a: 687b ldr r3, [r7, #4]
8004d6c: 2200 movs r2, #0
8004d6e: f8c3 22b8 str.w r2, [r3, #696] ; 0x2b8
}
return ret;
8004d72: 7bfb ldrb r3, [r7, #15]
}
8004d74: 4618 mov r0, r3
8004d76: 3710 adds r7, #16
8004d78: 46bd mov sp, r7
8004d7a: bd80 pop {r7, pc}
08004d7c <USBD_CDC_Setup>:
* @param req: usb requests
* @retval status
*/
static uint8_t USBD_CDC_Setup(USBD_HandleTypeDef *pdev,
USBD_SetupReqTypedef *req)
{
8004d7c: b580 push {r7, lr}
8004d7e: b086 sub sp, #24
8004d80: af00 add r7, sp, #0
8004d82: 6078 str r0, [r7, #4]
8004d84: 6039 str r1, [r7, #0]
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData;
8004d86: 687b ldr r3, [r7, #4]
8004d88: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
8004d8c: 613b str r3, [r7, #16]
uint8_t ifalt = 0U;
8004d8e: 2300 movs r3, #0
8004d90: 73fb strb r3, [r7, #15]
uint16_t status_info = 0U;
8004d92: 2300 movs r3, #0
8004d94: 81bb strh r3, [r7, #12]
uint8_t ret = USBD_OK;
8004d96: 2300 movs r3, #0
8004d98: 75fb strb r3, [r7, #23]
switch (req->bmRequest & USB_REQ_TYPE_MASK)
8004d9a: 683b ldr r3, [r7, #0]
8004d9c: 781b ldrb r3, [r3, #0]
8004d9e: f003 0360 and.w r3, r3, #96 ; 0x60
8004da2: 2b00 cmp r3, #0
8004da4: d039 beq.n 8004e1a <USBD_CDC_Setup+0x9e>
8004da6: 2b20 cmp r3, #32
8004da8: d17c bne.n 8004ea4 <USBD_CDC_Setup+0x128>
{
case USB_REQ_TYPE_CLASS :
if (req->wLength)
8004daa: 683b ldr r3, [r7, #0]
8004dac: 88db ldrh r3, [r3, #6]
8004dae: 2b00 cmp r3, #0
8004db0: d029 beq.n 8004e06 <USBD_CDC_Setup+0x8a>
{
if (req->bmRequest & 0x80U)
8004db2: 683b ldr r3, [r7, #0]
8004db4: 781b ldrb r3, [r3, #0]
8004db6: b25b sxtb r3, r3
8004db8: 2b00 cmp r3, #0
8004dba: da11 bge.n 8004de0 <USBD_CDC_Setup+0x64>
{
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest,
8004dbc: 687b ldr r3, [r7, #4]
8004dbe: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
8004dc2: 689b ldr r3, [r3, #8]
8004dc4: 683a ldr r2, [r7, #0]
8004dc6: 7850 ldrb r0, [r2, #1]
(uint8_t *)(void *)hcdc->data,
8004dc8: 6939 ldr r1, [r7, #16]
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest,
8004dca: 683a ldr r2, [r7, #0]
8004dcc: 88d2 ldrh r2, [r2, #6]
8004dce: 4798 blx r3
req->wLength);
USBD_CtlSendData(pdev, (uint8_t *)(void *)hcdc->data, req->wLength);
8004dd0: 6939 ldr r1, [r7, #16]
8004dd2: 683b ldr r3, [r7, #0]
8004dd4: 88db ldrh r3, [r3, #6]
8004dd6: 461a mov r2, r3
8004dd8: 6878 ldr r0, [r7, #4]
8004dda: f001 f9f9 bl 80061d0 <USBD_CtlSendData>
else
{
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest,
(uint8_t *)(void *)req, 0U);
}
break;
8004dde: e068 b.n 8004eb2 <USBD_CDC_Setup+0x136>
hcdc->CmdOpCode = req->bRequest;
8004de0: 683b ldr r3, [r7, #0]
8004de2: 785a ldrb r2, [r3, #1]
8004de4: 693b ldr r3, [r7, #16]
8004de6: f883 2200 strb.w r2, [r3, #512] ; 0x200
hcdc->CmdLength = (uint8_t)req->wLength;
8004dea: 683b ldr r3, [r7, #0]
8004dec: 88db ldrh r3, [r3, #6]
8004dee: b2da uxtb r2, r3
8004df0: 693b ldr r3, [r7, #16]
8004df2: f883 2201 strb.w r2, [r3, #513] ; 0x201
USBD_CtlPrepareRx(pdev, (uint8_t *)(void *)hcdc->data, req->wLength);
8004df6: 6939 ldr r1, [r7, #16]
8004df8: 683b ldr r3, [r7, #0]
8004dfa: 88db ldrh r3, [r3, #6]
8004dfc: 461a mov r2, r3
8004dfe: 6878 ldr r0, [r7, #4]
8004e00: f001 fa14 bl 800622c <USBD_CtlPrepareRx>
break;
8004e04: e055 b.n 8004eb2 <USBD_CDC_Setup+0x136>
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest,
8004e06: 687b ldr r3, [r7, #4]
8004e08: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
8004e0c: 689b ldr r3, [r3, #8]
8004e0e: 683a ldr r2, [r7, #0]
8004e10: 7850 ldrb r0, [r2, #1]
8004e12: 2200 movs r2, #0
8004e14: 6839 ldr r1, [r7, #0]
8004e16: 4798 blx r3
break;
8004e18: e04b b.n 8004eb2 <USBD_CDC_Setup+0x136>
case USB_REQ_TYPE_STANDARD:
switch (req->bRequest)
8004e1a: 683b ldr r3, [r7, #0]
8004e1c: 785b ldrb r3, [r3, #1]
8004e1e: 2b0a cmp r3, #10
8004e20: d017 beq.n 8004e52 <USBD_CDC_Setup+0xd6>
8004e22: 2b0b cmp r3, #11
8004e24: d029 beq.n 8004e7a <USBD_CDC_Setup+0xfe>
8004e26: 2b00 cmp r3, #0
8004e28: d133 bne.n 8004e92 <USBD_CDC_Setup+0x116>
{
case USB_REQ_GET_STATUS:
if (pdev->dev_state == USBD_STATE_CONFIGURED)
8004e2a: 687b ldr r3, [r7, #4]
8004e2c: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
8004e30: 2b03 cmp r3, #3
8004e32: d107 bne.n 8004e44 <USBD_CDC_Setup+0xc8>
{
USBD_CtlSendData(pdev, (uint8_t *)(void *)&status_info, 2U);
8004e34: f107 030c add.w r3, r7, #12
8004e38: 2202 movs r2, #2
8004e3a: 4619 mov r1, r3
8004e3c: 6878 ldr r0, [r7, #4]
8004e3e: f001 f9c7 bl 80061d0 <USBD_CtlSendData>
else
{
USBD_CtlError(pdev, req);
ret = USBD_FAIL;
}
break;
8004e42: e02e b.n 8004ea2 <USBD_CDC_Setup+0x126>
USBD_CtlError(pdev, req);
8004e44: 6839 ldr r1, [r7, #0]
8004e46: 6878 ldr r0, [r7, #4]
8004e48: f001 f958 bl 80060fc <USBD_CtlError>
ret = USBD_FAIL;
8004e4c: 2302 movs r3, #2
8004e4e: 75fb strb r3, [r7, #23]
break;
8004e50: e027 b.n 8004ea2 <USBD_CDC_Setup+0x126>
case USB_REQ_GET_INTERFACE:
if (pdev->dev_state == USBD_STATE_CONFIGURED)
8004e52: 687b ldr r3, [r7, #4]
8004e54: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
8004e58: 2b03 cmp r3, #3
8004e5a: d107 bne.n 8004e6c <USBD_CDC_Setup+0xf0>
{
USBD_CtlSendData(pdev, &ifalt, 1U);
8004e5c: f107 030f add.w r3, r7, #15
8004e60: 2201 movs r2, #1
8004e62: 4619 mov r1, r3
8004e64: 6878 ldr r0, [r7, #4]
8004e66: f001 f9b3 bl 80061d0 <USBD_CtlSendData>
else
{
USBD_CtlError(pdev, req);
ret = USBD_FAIL;
}
break;
8004e6a: e01a b.n 8004ea2 <USBD_CDC_Setup+0x126>
USBD_CtlError(pdev, req);
8004e6c: 6839 ldr r1, [r7, #0]
8004e6e: 6878 ldr r0, [r7, #4]
8004e70: f001 f944 bl 80060fc <USBD_CtlError>
ret = USBD_FAIL;
8004e74: 2302 movs r3, #2
8004e76: 75fb strb r3, [r7, #23]
break;
8004e78: e013 b.n 8004ea2 <USBD_CDC_Setup+0x126>
case USB_REQ_SET_INTERFACE:
if (pdev->dev_state != USBD_STATE_CONFIGURED)
8004e7a: 687b ldr r3, [r7, #4]
8004e7c: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
8004e80: 2b03 cmp r3, #3
8004e82: d00d beq.n 8004ea0 <USBD_CDC_Setup+0x124>
{
USBD_CtlError(pdev, req);
8004e84: 6839 ldr r1, [r7, #0]
8004e86: 6878 ldr r0, [r7, #4]
8004e88: f001 f938 bl 80060fc <USBD_CtlError>
ret = USBD_FAIL;
8004e8c: 2302 movs r3, #2
8004e8e: 75fb strb r3, [r7, #23]
}
break;
8004e90: e006 b.n 8004ea0 <USBD_CDC_Setup+0x124>
default:
USBD_CtlError(pdev, req);
8004e92: 6839 ldr r1, [r7, #0]
8004e94: 6878 ldr r0, [r7, #4]
8004e96: f001 f931 bl 80060fc <USBD_CtlError>
ret = USBD_FAIL;
8004e9a: 2302 movs r3, #2
8004e9c: 75fb strb r3, [r7, #23]
break;
8004e9e: e000 b.n 8004ea2 <USBD_CDC_Setup+0x126>
break;
8004ea0: bf00 nop
}
break;
8004ea2: e006 b.n 8004eb2 <USBD_CDC_Setup+0x136>
default:
USBD_CtlError(pdev, req);
8004ea4: 6839 ldr r1, [r7, #0]
8004ea6: 6878 ldr r0, [r7, #4]
8004ea8: f001 f928 bl 80060fc <USBD_CtlError>
ret = USBD_FAIL;
8004eac: 2302 movs r3, #2
8004eae: 75fb strb r3, [r7, #23]
break;
8004eb0: bf00 nop
}
return ret;
8004eb2: 7dfb ldrb r3, [r7, #23]
}
8004eb4: 4618 mov r0, r3
8004eb6: 3718 adds r7, #24
8004eb8: 46bd mov sp, r7
8004eba: bd80 pop {r7, pc}
08004ebc <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)
{
8004ebc: b580 push {r7, lr}
8004ebe: b084 sub sp, #16
8004ec0: af00 add r7, sp, #0
8004ec2: 6078 str r0, [r7, #4]
8004ec4: 460b mov r3, r1
8004ec6: 70fb strb r3, [r7, #3]
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
8004ec8: 687b ldr r3, [r7, #4]
8004eca: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
8004ece: 60fb str r3, [r7, #12]
PCD_HandleTypeDef *hpcd = pdev->pData;
8004ed0: 687b ldr r3, [r7, #4]
8004ed2: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
8004ed6: 60bb str r3, [r7, #8]
if (pdev->pClassData != NULL)
8004ed8: 687b ldr r3, [r7, #4]
8004eda: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
8004ede: 2b00 cmp r3, #0
8004ee0: d03a beq.n 8004f58 <USBD_CDC_DataIn+0x9c>
{
if ((pdev->ep_in[epnum].total_length > 0U) && ((pdev->ep_in[epnum].total_length % hpcd->IN_ep[epnum].maxpacket) == 0U))
8004ee2: 78fa ldrb r2, [r7, #3]
8004ee4: 6879 ldr r1, [r7, #4]
8004ee6: 4613 mov r3, r2
8004ee8: 009b lsls r3, r3, #2
8004eea: 4413 add r3, r2
8004eec: 009b lsls r3, r3, #2
8004eee: 440b add r3, r1
8004ef0: 331c adds r3, #28
8004ef2: 681b ldr r3, [r3, #0]
8004ef4: 2b00 cmp r3, #0
8004ef6: d029 beq.n 8004f4c <USBD_CDC_DataIn+0x90>
8004ef8: 78fa ldrb r2, [r7, #3]
8004efa: 6879 ldr r1, [r7, #4]
8004efc: 4613 mov r3, r2
8004efe: 009b lsls r3, r3, #2
8004f00: 4413 add r3, r2
8004f02: 009b lsls r3, r3, #2
8004f04: 440b add r3, r1
8004f06: 331c adds r3, #28
8004f08: 681a ldr r2, [r3, #0]
8004f0a: 78f9 ldrb r1, [r7, #3]
8004f0c: 68b8 ldr r0, [r7, #8]
8004f0e: 460b mov r3, r1
8004f10: 009b lsls r3, r3, #2
8004f12: 440b add r3, r1
8004f14: 00db lsls r3, r3, #3
8004f16: 4403 add r3, r0
8004f18: 3338 adds r3, #56 ; 0x38
8004f1a: 681b ldr r3, [r3, #0]
8004f1c: fbb2 f1f3 udiv r1, r2, r3
8004f20: fb03 f301 mul.w r3, r3, r1
8004f24: 1ad3 subs r3, r2, r3
8004f26: 2b00 cmp r3, #0
8004f28: d110 bne.n 8004f4c <USBD_CDC_DataIn+0x90>
{
/* Update the packet total length */
pdev->ep_in[epnum].total_length = 0U;
8004f2a: 78fa ldrb r2, [r7, #3]
8004f2c: 6879 ldr r1, [r7, #4]
8004f2e: 4613 mov r3, r2
8004f30: 009b lsls r3, r3, #2
8004f32: 4413 add r3, r2
8004f34: 009b lsls r3, r3, #2
8004f36: 440b add r3, r1
8004f38: 331c adds r3, #28
8004f3a: 2200 movs r2, #0
8004f3c: 601a str r2, [r3, #0]
/* Send ZLP */
USBD_LL_Transmit(pdev, epnum, NULL, 0U);
8004f3e: 78f9 ldrb r1, [r7, #3]
8004f40: 2300 movs r3, #0
8004f42: 2200 movs r2, #0
8004f44: 6878 ldr r0, [r7, #4]
8004f46: f001 fdc6 bl 8006ad6 <USBD_LL_Transmit>
8004f4a: e003 b.n 8004f54 <USBD_CDC_DataIn+0x98>
}
else
{
hcdc->TxState = 0U;
8004f4c: 68fb ldr r3, [r7, #12]
8004f4e: 2200 movs r2, #0
8004f50: f8c3 2214 str.w r2, [r3, #532] ; 0x214
}
return USBD_OK;
8004f54: 2300 movs r3, #0
8004f56: e000 b.n 8004f5a <USBD_CDC_DataIn+0x9e>
}
else
{
return USBD_FAIL;
8004f58: 2302 movs r3, #2
}
}
8004f5a: 4618 mov r0, r3
8004f5c: 3710 adds r7, #16
8004f5e: 46bd mov sp, r7
8004f60: bd80 pop {r7, pc}
08004f62 <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)
{
8004f62: b580 push {r7, lr}
8004f64: b084 sub sp, #16
8004f66: af00 add r7, sp, #0
8004f68: 6078 str r0, [r7, #4]
8004f6a: 460b mov r3, r1
8004f6c: 70fb strb r3, [r7, #3]
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData;
8004f6e: 687b ldr r3, [r7, #4]
8004f70: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
8004f74: 60fb str r3, [r7, #12]
/* Get the received data length */
hcdc->RxLength = USBD_LL_GetRxDataSize(pdev, epnum);
8004f76: 78fb ldrb r3, [r7, #3]
8004f78: 4619 mov r1, r3
8004f7a: 6878 ldr r0, [r7, #4]
8004f7c: f001 fdf1 bl 8006b62 <USBD_LL_GetRxDataSize>
8004f80: 4602 mov r2, r0
8004f82: 68fb ldr r3, [r7, #12]
8004f84: 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)
8004f88: 687b ldr r3, [r7, #4]
8004f8a: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
8004f8e: 2b00 cmp r3, #0
8004f90: d00d beq.n 8004fae <USBD_CDC_DataOut+0x4c>
{
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Receive(hcdc->RxBuffer, &hcdc->RxLength);
8004f92: 687b ldr r3, [r7, #4]
8004f94: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
8004f98: 68db ldr r3, [r3, #12]
8004f9a: 68fa ldr r2, [r7, #12]
8004f9c: f8d2 0204 ldr.w r0, [r2, #516] ; 0x204
8004fa0: 68fa ldr r2, [r7, #12]
8004fa2: f502 7203 add.w r2, r2, #524 ; 0x20c
8004fa6: 4611 mov r1, r2
8004fa8: 4798 blx r3
return USBD_OK;
8004faa: 2300 movs r3, #0
8004fac: e000 b.n 8004fb0 <USBD_CDC_DataOut+0x4e>
}
else
{
return USBD_FAIL;
8004fae: 2302 movs r3, #2
}
}
8004fb0: 4618 mov r0, r3
8004fb2: 3710 adds r7, #16
8004fb4: 46bd mov sp, r7
8004fb6: bd80 pop {r7, pc}
08004fb8 <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)
{
8004fb8: b580 push {r7, lr}
8004fba: b084 sub sp, #16
8004fbc: af00 add r7, sp, #0
8004fbe: 6078 str r0, [r7, #4]
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData;
8004fc0: 687b ldr r3, [r7, #4]
8004fc2: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
8004fc6: 60fb str r3, [r7, #12]
if ((pdev->pUserData != NULL) && (hcdc->CmdOpCode != 0xFFU))
8004fc8: 687b ldr r3, [r7, #4]
8004fca: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
8004fce: 2b00 cmp r3, #0
8004fd0: d015 beq.n 8004ffe <USBD_CDC_EP0_RxReady+0x46>
8004fd2: 68fb ldr r3, [r7, #12]
8004fd4: f893 3200 ldrb.w r3, [r3, #512] ; 0x200
8004fd8: 2bff cmp r3, #255 ; 0xff
8004fda: d010 beq.n 8004ffe <USBD_CDC_EP0_RxReady+0x46>
{
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(hcdc->CmdOpCode,
8004fdc: 687b ldr r3, [r7, #4]
8004fde: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
8004fe2: 689b ldr r3, [r3, #8]
8004fe4: 68fa ldr r2, [r7, #12]
8004fe6: f892 0200 ldrb.w r0, [r2, #512] ; 0x200
(uint8_t *)(void *)hcdc->data,
8004fea: 68f9 ldr r1, [r7, #12]
(uint16_t)hcdc->CmdLength);
8004fec: 68fa ldr r2, [r7, #12]
8004fee: f892 2201 ldrb.w r2, [r2, #513] ; 0x201
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(hcdc->CmdOpCode,
8004ff2: b292 uxth r2, r2
8004ff4: 4798 blx r3
hcdc->CmdOpCode = 0xFFU;
8004ff6: 68fb ldr r3, [r7, #12]
8004ff8: 22ff movs r2, #255 ; 0xff
8004ffa: f883 2200 strb.w r2, [r3, #512] ; 0x200
}
return USBD_OK;
8004ffe: 2300 movs r3, #0
}
8005000: 4618 mov r0, r3
8005002: 3710 adds r7, #16
8005004: 46bd mov sp, r7
8005006: bd80 pop {r7, pc}
08005008 <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)
{
8005008: b480 push {r7}
800500a: b083 sub sp, #12
800500c: af00 add r7, sp, #0
800500e: 6078 str r0, [r7, #4]
*length = sizeof(USBD_CDC_CfgFSDesc);
8005010: 687b ldr r3, [r7, #4]
8005012: 2243 movs r2, #67 ; 0x43
8005014: 801a strh r2, [r3, #0]
return USBD_CDC_CfgFSDesc;
8005016: 4b03 ldr r3, [pc, #12] ; (8005024 <USBD_CDC_GetFSCfgDesc+0x1c>)
}
8005018: 4618 mov r0, r3
800501a: 370c adds r7, #12
800501c: 46bd mov sp, r7
800501e: bc80 pop {r7}
8005020: 4770 bx lr
8005022: bf00 nop
8005024: 20000094 .word 0x20000094
08005028 <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)
{
8005028: b480 push {r7}
800502a: b083 sub sp, #12
800502c: af00 add r7, sp, #0
800502e: 6078 str r0, [r7, #4]
*length = sizeof(USBD_CDC_CfgHSDesc);
8005030: 687b ldr r3, [r7, #4]
8005032: 2243 movs r2, #67 ; 0x43
8005034: 801a strh r2, [r3, #0]
return USBD_CDC_CfgHSDesc;
8005036: 4b03 ldr r3, [pc, #12] ; (8005044 <USBD_CDC_GetHSCfgDesc+0x1c>)
}
8005038: 4618 mov r0, r3
800503a: 370c adds r7, #12
800503c: 46bd mov sp, r7
800503e: bc80 pop {r7}
8005040: 4770 bx lr
8005042: bf00 nop
8005044: 20000050 .word 0x20000050
08005048 <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)
{
8005048: b480 push {r7}
800504a: b083 sub sp, #12
800504c: af00 add r7, sp, #0
800504e: 6078 str r0, [r7, #4]
*length = sizeof(USBD_CDC_OtherSpeedCfgDesc);
8005050: 687b ldr r3, [r7, #4]
8005052: 2243 movs r2, #67 ; 0x43
8005054: 801a strh r2, [r3, #0]
return USBD_CDC_OtherSpeedCfgDesc;
8005056: 4b03 ldr r3, [pc, #12] ; (8005064 <USBD_CDC_GetOtherSpeedCfgDesc+0x1c>)
}
8005058: 4618 mov r0, r3
800505a: 370c adds r7, #12
800505c: 46bd mov sp, r7
800505e: bc80 pop {r7}
8005060: 4770 bx lr
8005062: bf00 nop
8005064: 200000d8 .word 0x200000d8
08005068 <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)
{
8005068: b480 push {r7}
800506a: b083 sub sp, #12
800506c: af00 add r7, sp, #0
800506e: 6078 str r0, [r7, #4]
*length = sizeof(USBD_CDC_DeviceQualifierDesc);
8005070: 687b ldr r3, [r7, #4]
8005072: 220a movs r2, #10
8005074: 801a strh r2, [r3, #0]
return USBD_CDC_DeviceQualifierDesc;
8005076: 4b03 ldr r3, [pc, #12] ; (8005084 <USBD_CDC_GetDeviceQualifierDescriptor+0x1c>)
}
8005078: 4618 mov r0, r3
800507a: 370c adds r7, #12
800507c: 46bd mov sp, r7
800507e: bc80 pop {r7}
8005080: 4770 bx lr
8005082: bf00 nop
8005084: 2000000c .word 0x2000000c
08005088 <USBD_CDC_RegisterInterface>:
* @param fops: CD Interface callback
* @retval status
*/
uint8_t USBD_CDC_RegisterInterface(USBD_HandleTypeDef *pdev,
USBD_CDC_ItfTypeDef *fops)
{
8005088: b480 push {r7}
800508a: b085 sub sp, #20
800508c: af00 add r7, sp, #0
800508e: 6078 str r0, [r7, #4]
8005090: 6039 str r1, [r7, #0]
uint8_t ret = USBD_FAIL;
8005092: 2302 movs r3, #2
8005094: 73fb strb r3, [r7, #15]
if (fops != NULL)
8005096: 683b ldr r3, [r7, #0]
8005098: 2b00 cmp r3, #0
800509a: d005 beq.n 80050a8 <USBD_CDC_RegisterInterface+0x20>
{
pdev->pUserData = fops;
800509c: 687b ldr r3, [r7, #4]
800509e: 683a ldr r2, [r7, #0]
80050a0: f8c3 22bc str.w r2, [r3, #700] ; 0x2bc
ret = USBD_OK;
80050a4: 2300 movs r3, #0
80050a6: 73fb strb r3, [r7, #15]
}
return ret;
80050a8: 7bfb ldrb r3, [r7, #15]
}
80050aa: 4618 mov r0, r3
80050ac: 3714 adds r7, #20
80050ae: 46bd mov sp, r7
80050b0: bc80 pop {r7}
80050b2: 4770 bx lr
080050b4 <USBD_CDC_SetTxBuffer>:
* @retval status
*/
uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev,
uint8_t *pbuff,
uint16_t length)
{
80050b4: b480 push {r7}
80050b6: b087 sub sp, #28
80050b8: af00 add r7, sp, #0
80050ba: 60f8 str r0, [r7, #12]
80050bc: 60b9 str r1, [r7, #8]
80050be: 4613 mov r3, r2
80050c0: 80fb strh r3, [r7, #6]
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData;
80050c2: 68fb ldr r3, [r7, #12]
80050c4: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
80050c8: 617b str r3, [r7, #20]
hcdc->TxBuffer = pbuff;
80050ca: 697b ldr r3, [r7, #20]
80050cc: 68ba ldr r2, [r7, #8]
80050ce: f8c3 2208 str.w r2, [r3, #520] ; 0x208
hcdc->TxLength = length;
80050d2: 88fa ldrh r2, [r7, #6]
80050d4: 697b ldr r3, [r7, #20]
80050d6: f8c3 2210 str.w r2, [r3, #528] ; 0x210
return USBD_OK;
80050da: 2300 movs r3, #0
}
80050dc: 4618 mov r0, r3
80050de: 371c adds r7, #28
80050e0: 46bd mov sp, r7
80050e2: bc80 pop {r7}
80050e4: 4770 bx lr
080050e6 <USBD_CDC_SetRxBuffer>:
* @param pbuff: Rx Buffer
* @retval status
*/
uint8_t USBD_CDC_SetRxBuffer(USBD_HandleTypeDef *pdev,
uint8_t *pbuff)
{
80050e6: b480 push {r7}
80050e8: b085 sub sp, #20
80050ea: af00 add r7, sp, #0
80050ec: 6078 str r0, [r7, #4]
80050ee: 6039 str r1, [r7, #0]
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData;
80050f0: 687b ldr r3, [r7, #4]
80050f2: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
80050f6: 60fb str r3, [r7, #12]
hcdc->RxBuffer = pbuff;
80050f8: 68fb ldr r3, [r7, #12]
80050fa: 683a ldr r2, [r7, #0]
80050fc: f8c3 2204 str.w r2, [r3, #516] ; 0x204
return USBD_OK;
8005100: 2300 movs r3, #0
}
8005102: 4618 mov r0, r3
8005104: 3714 adds r7, #20
8005106: 46bd mov sp, r7
8005108: bc80 pop {r7}
800510a: 4770 bx lr
0800510c <USBD_CDC_TransmitPacket>:
* Transmit packet on IN endpoint
* @param pdev: device instance
* @retval status
*/
uint8_t USBD_CDC_TransmitPacket(USBD_HandleTypeDef *pdev)
{
800510c: b580 push {r7, lr}
800510e: b084 sub sp, #16
8005110: af00 add r7, sp, #0
8005112: 6078 str r0, [r7, #4]
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData;
8005114: 687b ldr r3, [r7, #4]
8005116: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
800511a: 60fb str r3, [r7, #12]
if (pdev->pClassData != NULL)
800511c: 687b ldr r3, [r7, #4]
800511e: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
8005122: 2b00 cmp r3, #0
8005124: d01c beq.n 8005160 <USBD_CDC_TransmitPacket+0x54>
{
if (hcdc->TxState == 0U)
8005126: 68fb ldr r3, [r7, #12]
8005128: f8d3 3214 ldr.w r3, [r3, #532] ; 0x214
800512c: 2b00 cmp r3, #0
800512e: d115 bne.n 800515c <USBD_CDC_TransmitPacket+0x50>
{
/* Tx Transfer in progress */
hcdc->TxState = 1U;
8005130: 68fb ldr r3, [r7, #12]
8005132: 2201 movs r2, #1
8005134: f8c3 2214 str.w r2, [r3, #532] ; 0x214
/* Update the packet total length */
pdev->ep_in[CDC_IN_EP & 0xFU].total_length = hcdc->TxLength;
8005138: 68fb ldr r3, [r7, #12]
800513a: f8d3 2210 ldr.w r2, [r3, #528] ; 0x210
800513e: 687b ldr r3, [r7, #4]
8005140: 631a str r2, [r3, #48] ; 0x30
/* Transmit next packet */
USBD_LL_Transmit(pdev, CDC_IN_EP, hcdc->TxBuffer,
8005142: 68fb ldr r3, [r7, #12]
8005144: f8d3 2208 ldr.w r2, [r3, #520] ; 0x208
(uint16_t)hcdc->TxLength);
8005148: 68fb ldr r3, [r7, #12]
800514a: f8d3 3210 ldr.w r3, [r3, #528] ; 0x210
USBD_LL_Transmit(pdev, CDC_IN_EP, hcdc->TxBuffer,
800514e: b29b uxth r3, r3
8005150: 2181 movs r1, #129 ; 0x81
8005152: 6878 ldr r0, [r7, #4]
8005154: f001 fcbf bl 8006ad6 <USBD_LL_Transmit>
return USBD_OK;
8005158: 2300 movs r3, #0
800515a: e002 b.n 8005162 <USBD_CDC_TransmitPacket+0x56>
}
else
{
return USBD_BUSY;
800515c: 2301 movs r3, #1
800515e: e000 b.n 8005162 <USBD_CDC_TransmitPacket+0x56>
}
}
else
{
return USBD_FAIL;
8005160: 2302 movs r3, #2
}
}
8005162: 4618 mov r0, r3
8005164: 3710 adds r7, #16
8005166: 46bd mov sp, r7
8005168: bd80 pop {r7, pc}
0800516a <USBD_CDC_ReceivePacket>:
* prepare OUT Endpoint for reception
* @param pdev: device instance
* @retval status
*/
uint8_t USBD_CDC_ReceivePacket(USBD_HandleTypeDef *pdev)
{
800516a: b580 push {r7, lr}
800516c: b084 sub sp, #16
800516e: af00 add r7, sp, #0
8005170: 6078 str r0, [r7, #4]
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) pdev->pClassData;
8005172: 687b ldr r3, [r7, #4]
8005174: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
8005178: 60fb str r3, [r7, #12]
/* Suspend or Resume USB Out process */
if (pdev->pClassData != NULL)
800517a: 687b ldr r3, [r7, #4]
800517c: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
8005180: 2b00 cmp r3, #0
8005182: d017 beq.n 80051b4 <USBD_CDC_ReceivePacket+0x4a>
{
if (pdev->dev_speed == USBD_SPEED_HIGH)
8005184: 687b ldr r3, [r7, #4]
8005186: 7c1b ldrb r3, [r3, #16]
8005188: 2b00 cmp r3, #0
800518a: d109 bne.n 80051a0 <USBD_CDC_ReceivePacket+0x36>
{
/* Prepare Out endpoint to receive next packet */
USBD_LL_PrepareReceive(pdev,
800518c: 68fb ldr r3, [r7, #12]
800518e: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204
8005192: f44f 7300 mov.w r3, #512 ; 0x200
8005196: 2101 movs r1, #1
8005198: 6878 ldr r0, [r7, #4]
800519a: f001 fcbf bl 8006b1c <USBD_LL_PrepareReceive>
800519e: e007 b.n 80051b0 <USBD_CDC_ReceivePacket+0x46>
CDC_DATA_HS_OUT_PACKET_SIZE);
}
else
{
/* Prepare Out endpoint to receive next packet */
USBD_LL_PrepareReceive(pdev,
80051a0: 68fb ldr r3, [r7, #12]
80051a2: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204
80051a6: 2340 movs r3, #64 ; 0x40
80051a8: 2101 movs r1, #1
80051aa: 6878 ldr r0, [r7, #4]
80051ac: f001 fcb6 bl 8006b1c <USBD_LL_PrepareReceive>
CDC_OUT_EP,
hcdc->RxBuffer,
CDC_DATA_FS_OUT_PACKET_SIZE);
}
return USBD_OK;
80051b0: 2300 movs r3, #0
80051b2: e000 b.n 80051b6 <USBD_CDC_ReceivePacket+0x4c>
}
else
{
return USBD_FAIL;
80051b4: 2302 movs r3, #2
}
}
80051b6: 4618 mov r0, r3
80051b8: 3710 adds r7, #16
80051ba: 46bd mov sp, r7
80051bc: bd80 pop {r7, pc}
080051be <USBD_Init>:
* @param id: Low level core index
* @retval None
*/
USBD_StatusTypeDef USBD_Init(USBD_HandleTypeDef *pdev,
USBD_DescriptorsTypeDef *pdesc, uint8_t id)
{
80051be: b580 push {r7, lr}
80051c0: b084 sub sp, #16
80051c2: af00 add r7, sp, #0
80051c4: 60f8 str r0, [r7, #12]
80051c6: 60b9 str r1, [r7, #8]
80051c8: 4613 mov r3, r2
80051ca: 71fb strb r3, [r7, #7]
/* Check whether the USB Host handle is valid */
if (pdev == NULL)
80051cc: 68fb ldr r3, [r7, #12]
80051ce: 2b00 cmp r3, #0
80051d0: d101 bne.n 80051d6 <USBD_Init+0x18>
{
#if (USBD_DEBUG_LEVEL > 1U)
USBD_ErrLog("Invalid Device handle");
#endif
return USBD_FAIL;
80051d2: 2302 movs r3, #2
80051d4: e01a b.n 800520c <USBD_Init+0x4e>
}
/* Unlink previous class*/
if (pdev->pClass != NULL)
80051d6: 68fb ldr r3, [r7, #12]
80051d8: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
80051dc: 2b00 cmp r3, #0
80051de: d003 beq.n 80051e8 <USBD_Init+0x2a>
{
pdev->pClass = NULL;
80051e0: 68fb ldr r3, [r7, #12]
80051e2: 2200 movs r2, #0
80051e4: f8c3 22b4 str.w r2, [r3, #692] ; 0x2b4
}
/* Assign USBD Descriptors */
if (pdesc != NULL)
80051e8: 68bb ldr r3, [r7, #8]
80051ea: 2b00 cmp r3, #0
80051ec: d003 beq.n 80051f6 <USBD_Init+0x38>
{
pdev->pDesc = pdesc;
80051ee: 68fb ldr r3, [r7, #12]
80051f0: 68ba ldr r2, [r7, #8]
80051f2: f8c3 22b0 str.w r2, [r3, #688] ; 0x2b0
}
/* Set Device initial State */
pdev->dev_state = USBD_STATE_DEFAULT;
80051f6: 68fb ldr r3, [r7, #12]
80051f8: 2201 movs r2, #1
80051fa: f883 229c strb.w r2, [r3, #668] ; 0x29c
pdev->id = id;
80051fe: 68fb ldr r3, [r7, #12]
8005200: 79fa ldrb r2, [r7, #7]
8005202: 701a strb r2, [r3, #0]
/* Initialize low level driver */
USBD_LL_Init(pdev);
8005204: 68f8 ldr r0, [r7, #12]
8005206: f001 fb23 bl 8006850 <USBD_LL_Init>
return USBD_OK;
800520a: 2300 movs r3, #0
}
800520c: 4618 mov r0, r3
800520e: 3710 adds r7, #16
8005210: 46bd mov sp, r7
8005212: bd80 pop {r7, pc}
08005214 <USBD_RegisterClass>:
* @param pDevice : Device Handle
* @param pclass: Class handle
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_RegisterClass(USBD_HandleTypeDef *pdev, USBD_ClassTypeDef *pclass)
{
8005214: b480 push {r7}
8005216: b085 sub sp, #20
8005218: af00 add r7, sp, #0
800521a: 6078 str r0, [r7, #4]
800521c: 6039 str r1, [r7, #0]
USBD_StatusTypeDef status = USBD_OK;
800521e: 2300 movs r3, #0
8005220: 73fb strb r3, [r7, #15]
if (pclass != NULL)
8005222: 683b ldr r3, [r7, #0]
8005224: 2b00 cmp r3, #0
8005226: d006 beq.n 8005236 <USBD_RegisterClass+0x22>
{
/* link the class to the USB Device handle */
pdev->pClass = pclass;
8005228: 687b ldr r3, [r7, #4]
800522a: 683a ldr r2, [r7, #0]
800522c: f8c3 22b4 str.w r2, [r3, #692] ; 0x2b4
status = USBD_OK;
8005230: 2300 movs r3, #0
8005232: 73fb strb r3, [r7, #15]
8005234: e001 b.n 800523a <USBD_RegisterClass+0x26>
else
{
#if (USBD_DEBUG_LEVEL > 1U)
USBD_ErrLog("Invalid Class handle");
#endif
status = USBD_FAIL;
8005236: 2302 movs r3, #2
8005238: 73fb strb r3, [r7, #15]
}
return status;
800523a: 7bfb ldrb r3, [r7, #15]
}
800523c: 4618 mov r0, r3
800523e: 3714 adds r7, #20
8005240: 46bd mov sp, r7
8005242: bc80 pop {r7}
8005244: 4770 bx lr
08005246 <USBD_Start>:
* Start the USB Device Core.
* @param pdev: Device Handle
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_Start(USBD_HandleTypeDef *pdev)
{
8005246: b580 push {r7, lr}
8005248: b082 sub sp, #8
800524a: af00 add r7, sp, #0
800524c: 6078 str r0, [r7, #4]
/* Start the low level driver */
USBD_LL_Start(pdev);
800524e: 6878 ldr r0, [r7, #4]
8005250: f001 fb58 bl 8006904 <USBD_LL_Start>
return USBD_OK;
8005254: 2300 movs r3, #0
}
8005256: 4618 mov r0, r3
8005258: 3708 adds r7, #8
800525a: 46bd mov sp, r7
800525c: bd80 pop {r7, pc}
0800525e <USBD_RunTestMode>:
* Launch test mode process
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_RunTestMode(USBD_HandleTypeDef *pdev)
{
800525e: b480 push {r7}
8005260: b083 sub sp, #12
8005262: af00 add r7, sp, #0
8005264: 6078 str r0, [r7, #4]
/* Prevent unused argument compilation warning */
UNUSED(pdev);
return USBD_OK;
8005266: 2300 movs r3, #0
}
8005268: 4618 mov r0, r3
800526a: 370c adds r7, #12
800526c: 46bd mov sp, r7
800526e: bc80 pop {r7}
8005270: 4770 bx lr
08005272 <USBD_SetClassConfig>:
* @param cfgidx: configuration index
* @retval status
*/
USBD_StatusTypeDef USBD_SetClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
{
8005272: b580 push {r7, lr}
8005274: b084 sub sp, #16
8005276: af00 add r7, sp, #0
8005278: 6078 str r0, [r7, #4]
800527a: 460b mov r3, r1
800527c: 70fb strb r3, [r7, #3]
USBD_StatusTypeDef ret = USBD_FAIL;
800527e: 2302 movs r3, #2
8005280: 73fb strb r3, [r7, #15]
if (pdev->pClass != NULL)
8005282: 687b ldr r3, [r7, #4]
8005284: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
8005288: 2b00 cmp r3, #0
800528a: d00c beq.n 80052a6 <USBD_SetClassConfig+0x34>
{
/* Set configuration and Start the Class*/
if (pdev->pClass->Init(pdev, cfgidx) == 0U)
800528c: 687b ldr r3, [r7, #4]
800528e: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
8005292: 681b ldr r3, [r3, #0]
8005294: 78fa ldrb r2, [r7, #3]
8005296: 4611 mov r1, r2
8005298: 6878 ldr r0, [r7, #4]
800529a: 4798 blx r3
800529c: 4603 mov r3, r0
800529e: 2b00 cmp r3, #0
80052a0: d101 bne.n 80052a6 <USBD_SetClassConfig+0x34>
{
ret = USBD_OK;
80052a2: 2300 movs r3, #0
80052a4: 73fb strb r3, [r7, #15]
}
}
return ret;
80052a6: 7bfb ldrb r3, [r7, #15]
}
80052a8: 4618 mov r0, r3
80052aa: 3710 adds r7, #16
80052ac: 46bd mov sp, r7
80052ae: bd80 pop {r7, pc}
080052b0 <USBD_ClrClassConfig>:
* @param pdev: device instance
* @param cfgidx: configuration index
* @retval status: USBD_StatusTypeDef
*/
USBD_StatusTypeDef USBD_ClrClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
{
80052b0: b580 push {r7, lr}
80052b2: b082 sub sp, #8
80052b4: af00 add r7, sp, #0
80052b6: 6078 str r0, [r7, #4]
80052b8: 460b mov r3, r1
80052ba: 70fb strb r3, [r7, #3]
/* Clear configuration and De-initialize the Class process*/
pdev->pClass->DeInit(pdev, cfgidx);
80052bc: 687b ldr r3, [r7, #4]
80052be: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
80052c2: 685b ldr r3, [r3, #4]
80052c4: 78fa ldrb r2, [r7, #3]
80052c6: 4611 mov r1, r2
80052c8: 6878 ldr r0, [r7, #4]
80052ca: 4798 blx r3
return USBD_OK;
80052cc: 2300 movs r3, #0
}
80052ce: 4618 mov r0, r3
80052d0: 3708 adds r7, #8
80052d2: 46bd mov sp, r7
80052d4: bd80 pop {r7, pc}
080052d6 <USBD_LL_SetupStage>:
* Handle the setup stage
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_SetupStage(USBD_HandleTypeDef *pdev, uint8_t *psetup)
{
80052d6: b580 push {r7, lr}
80052d8: b082 sub sp, #8
80052da: af00 add r7, sp, #0
80052dc: 6078 str r0, [r7, #4]
80052de: 6039 str r1, [r7, #0]
USBD_ParseSetupRequest(&pdev->request, psetup);
80052e0: 687b ldr r3, [r7, #4]
80052e2: f503 732a add.w r3, r3, #680 ; 0x2a8
80052e6: 6839 ldr r1, [r7, #0]
80052e8: 4618 mov r0, r3
80052ea: f000 fecb bl 8006084 <USBD_ParseSetupRequest>
pdev->ep0_state = USBD_EP0_SETUP;
80052ee: 687b ldr r3, [r7, #4]
80052f0: 2201 movs r2, #1
80052f2: f8c3 2294 str.w r2, [r3, #660] ; 0x294
pdev->ep0_data_len = pdev->request.wLength;
80052f6: 687b ldr r3, [r7, #4]
80052f8: f8b3 32ae ldrh.w r3, [r3, #686] ; 0x2ae
80052fc: 461a mov r2, r3
80052fe: 687b ldr r3, [r7, #4]
8005300: f8c3 2298 str.w r2, [r3, #664] ; 0x298
switch (pdev->request.bmRequest & 0x1FU)
8005304: 687b ldr r3, [r7, #4]
8005306: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8
800530a: f003 031f and.w r3, r3, #31
800530e: 2b01 cmp r3, #1
8005310: d00c beq.n 800532c <USBD_LL_SetupStage+0x56>
8005312: 2b01 cmp r3, #1
8005314: d302 bcc.n 800531c <USBD_LL_SetupStage+0x46>
8005316: 2b02 cmp r3, #2
8005318: d010 beq.n 800533c <USBD_LL_SetupStage+0x66>
800531a: e017 b.n 800534c <USBD_LL_SetupStage+0x76>
{
case USB_REQ_RECIPIENT_DEVICE:
USBD_StdDevReq(pdev, &pdev->request);
800531c: 687b ldr r3, [r7, #4]
800531e: f503 732a add.w r3, r3, #680 ; 0x2a8
8005322: 4619 mov r1, r3
8005324: 6878 ldr r0, [r7, #4]
8005326: f000 f9cb bl 80056c0 <USBD_StdDevReq>
break;
800532a: e01a b.n 8005362 <USBD_LL_SetupStage+0x8c>
case USB_REQ_RECIPIENT_INTERFACE:
USBD_StdItfReq(pdev, &pdev->request);
800532c: 687b ldr r3, [r7, #4]
800532e: f503 732a add.w r3, r3, #680 ; 0x2a8
8005332: 4619 mov r1, r3
8005334: 6878 ldr r0, [r7, #4]
8005336: f000 fa2d bl 8005794 <USBD_StdItfReq>
break;
800533a: e012 b.n 8005362 <USBD_LL_SetupStage+0x8c>
case USB_REQ_RECIPIENT_ENDPOINT:
USBD_StdEPReq(pdev, &pdev->request);
800533c: 687b ldr r3, [r7, #4]
800533e: f503 732a add.w r3, r3, #680 ; 0x2a8
8005342: 4619 mov r1, r3
8005344: 6878 ldr r0, [r7, #4]
8005346: f000 fa6b bl 8005820 <USBD_StdEPReq>
break;
800534a: e00a b.n 8005362 <USBD_LL_SetupStage+0x8c>
default:
USBD_LL_StallEP(pdev, (pdev->request.bmRequest & 0x80U));
800534c: 687b ldr r3, [r7, #4]
800534e: f893 32a8 ldrb.w r3, [r3, #680] ; 0x2a8
8005352: f023 037f bic.w r3, r3, #127 ; 0x7f
8005356: b2db uxtb r3, r3
8005358: 4619 mov r1, r3
800535a: 6878 ldr r0, [r7, #4]
800535c: f001 fb32 bl 80069c4 <USBD_LL_StallEP>
break;
8005360: bf00 nop
}
return USBD_OK;
8005362: 2300 movs r3, #0
}
8005364: 4618 mov r0, r3
8005366: 3708 adds r7, #8
8005368: 46bd mov sp, r7
800536a: bd80 pop {r7, pc}
0800536c <USBD_LL_DataOutStage>:
* @param epnum: endpoint index
* @retval status
*/
USBD_StatusTypeDef USBD_LL_DataOutStage(USBD_HandleTypeDef *pdev,
uint8_t epnum, uint8_t *pdata)
{
800536c: b580 push {r7, lr}
800536e: b086 sub sp, #24
8005370: af00 add r7, sp, #0
8005372: 60f8 str r0, [r7, #12]
8005374: 460b mov r3, r1
8005376: 607a str r2, [r7, #4]
8005378: 72fb strb r3, [r7, #11]
USBD_EndpointTypeDef *pep;
if (epnum == 0U)
800537a: 7afb ldrb r3, [r7, #11]
800537c: 2b00 cmp r3, #0
800537e: d14b bne.n 8005418 <USBD_LL_DataOutStage+0xac>
{
pep = &pdev->ep_out[0];
8005380: 68fb ldr r3, [r7, #12]
8005382: f503 73aa add.w r3, r3, #340 ; 0x154
8005386: 617b str r3, [r7, #20]
if (pdev->ep0_state == USBD_EP0_DATA_OUT)
8005388: 68fb ldr r3, [r7, #12]
800538a: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294
800538e: 2b03 cmp r3, #3
8005390: d134 bne.n 80053fc <USBD_LL_DataOutStage+0x90>
{
if (pep->rem_length > pep->maxpacket)
8005392: 697b ldr r3, [r7, #20]
8005394: 68da ldr r2, [r3, #12]
8005396: 697b ldr r3, [r7, #20]
8005398: 691b ldr r3, [r3, #16]
800539a: 429a cmp r2, r3
800539c: d919 bls.n 80053d2 <USBD_LL_DataOutStage+0x66>
{
pep->rem_length -= pep->maxpacket;
800539e: 697b ldr r3, [r7, #20]
80053a0: 68da ldr r2, [r3, #12]
80053a2: 697b ldr r3, [r7, #20]
80053a4: 691b ldr r3, [r3, #16]
80053a6: 1ad2 subs r2, r2, r3
80053a8: 697b ldr r3, [r7, #20]
80053aa: 60da str r2, [r3, #12]
USBD_CtlContinueRx(pdev, pdata,
(uint16_t)MIN(pep->rem_length, pep->maxpacket));
80053ac: 697b ldr r3, [r7, #20]
80053ae: 68da ldr r2, [r3, #12]
80053b0: 697b ldr r3, [r7, #20]
80053b2: 691b ldr r3, [r3, #16]
USBD_CtlContinueRx(pdev, pdata,
80053b4: 429a cmp r2, r3
80053b6: d203 bcs.n 80053c0 <USBD_LL_DataOutStage+0x54>
(uint16_t)MIN(pep->rem_length, pep->maxpacket));
80053b8: 697b ldr r3, [r7, #20]
80053ba: 68db ldr r3, [r3, #12]
USBD_CtlContinueRx(pdev, pdata,
80053bc: b29b uxth r3, r3
80053be: e002 b.n 80053c6 <USBD_LL_DataOutStage+0x5a>
(uint16_t)MIN(pep->rem_length, pep->maxpacket));
80053c0: 697b ldr r3, [r7, #20]
80053c2: 691b ldr r3, [r3, #16]
USBD_CtlContinueRx(pdev, pdata,
80053c4: b29b uxth r3, r3
80053c6: 461a mov r2, r3
80053c8: 6879 ldr r1, [r7, #4]
80053ca: 68f8 ldr r0, [r7, #12]
80053cc: f000 ff4c bl 8006268 <USBD_CtlContinueRx>
80053d0: e038 b.n 8005444 <USBD_LL_DataOutStage+0xd8>
}
else
{
if ((pdev->pClass->EP0_RxReady != NULL) &&
80053d2: 68fb ldr r3, [r7, #12]
80053d4: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
80053d8: 691b ldr r3, [r3, #16]
80053da: 2b00 cmp r3, #0
80053dc: d00a beq.n 80053f4 <USBD_LL_DataOutStage+0x88>
(pdev->dev_state == USBD_STATE_CONFIGURED))
80053de: 68fb ldr r3, [r7, #12]
80053e0: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
if ((pdev->pClass->EP0_RxReady != NULL) &&
80053e4: 2b03 cmp r3, #3
80053e6: d105 bne.n 80053f4 <USBD_LL_DataOutStage+0x88>
{
pdev->pClass->EP0_RxReady(pdev);
80053e8: 68fb ldr r3, [r7, #12]
80053ea: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
80053ee: 691b ldr r3, [r3, #16]
80053f0: 68f8 ldr r0, [r7, #12]
80053f2: 4798 blx r3
}
USBD_CtlSendStatus(pdev);
80053f4: 68f8 ldr r0, [r7, #12]
80053f6: f000 ff49 bl 800628c <USBD_CtlSendStatus>
80053fa: e023 b.n 8005444 <USBD_LL_DataOutStage+0xd8>
}
}
else
{
if (pdev->ep0_state == USBD_EP0_STATUS_OUT)
80053fc: 68fb ldr r3, [r7, #12]
80053fe: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294
8005402: 2b05 cmp r3, #5
8005404: d11e bne.n 8005444 <USBD_LL_DataOutStage+0xd8>
{
/*
* STATUS PHASE completed, update ep0_state to idle
*/
pdev->ep0_state = USBD_EP0_IDLE;
8005406: 68fb ldr r3, [r7, #12]
8005408: 2200 movs r2, #0
800540a: f8c3 2294 str.w r2, [r3, #660] ; 0x294
USBD_LL_StallEP(pdev, 0U);
800540e: 2100 movs r1, #0
8005410: 68f8 ldr r0, [r7, #12]
8005412: f001 fad7 bl 80069c4 <USBD_LL_StallEP>
8005416: e015 b.n 8005444 <USBD_LL_DataOutStage+0xd8>
}
}
}
else if ((pdev->pClass->DataOut != NULL) &&
8005418: 68fb ldr r3, [r7, #12]
800541a: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
800541e: 699b ldr r3, [r3, #24]
8005420: 2b00 cmp r3, #0
8005422: d00d beq.n 8005440 <USBD_LL_DataOutStage+0xd4>
(pdev->dev_state == USBD_STATE_CONFIGURED))
8005424: 68fb ldr r3, [r7, #12]
8005426: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
else if ((pdev->pClass->DataOut != NULL) &&
800542a: 2b03 cmp r3, #3
800542c: d108 bne.n 8005440 <USBD_LL_DataOutStage+0xd4>
{
pdev->pClass->DataOut(pdev, epnum);
800542e: 68fb ldr r3, [r7, #12]
8005430: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
8005434: 699b ldr r3, [r3, #24]
8005436: 7afa ldrb r2, [r7, #11]
8005438: 4611 mov r1, r2
800543a: 68f8 ldr r0, [r7, #12]
800543c: 4798 blx r3
800543e: e001 b.n 8005444 <USBD_LL_DataOutStage+0xd8>
}
else
{
/* should never be in this condition */
return USBD_FAIL;
8005440: 2302 movs r3, #2
8005442: e000 b.n 8005446 <USBD_LL_DataOutStage+0xda>
}
return USBD_OK;
8005444: 2300 movs r3, #0
}
8005446: 4618 mov r0, r3
8005448: 3718 adds r7, #24
800544a: 46bd mov sp, r7
800544c: bd80 pop {r7, pc}
0800544e <USBD_LL_DataInStage>:
* @param epnum: endpoint index
* @retval status
*/
USBD_StatusTypeDef USBD_LL_DataInStage(USBD_HandleTypeDef *pdev,
uint8_t epnum, uint8_t *pdata)
{
800544e: b580 push {r7, lr}
8005450: b086 sub sp, #24
8005452: af00 add r7, sp, #0
8005454: 60f8 str r0, [r7, #12]
8005456: 460b mov r3, r1
8005458: 607a str r2, [r7, #4]
800545a: 72fb strb r3, [r7, #11]
USBD_EndpointTypeDef *pep;
if (epnum == 0U)
800545c: 7afb ldrb r3, [r7, #11]
800545e: 2b00 cmp r3, #0
8005460: d17f bne.n 8005562 <USBD_LL_DataInStage+0x114>
{
pep = &pdev->ep_in[0];
8005462: 68fb ldr r3, [r7, #12]
8005464: 3314 adds r3, #20
8005466: 617b str r3, [r7, #20]
if (pdev->ep0_state == USBD_EP0_DATA_IN)
8005468: 68fb ldr r3, [r7, #12]
800546a: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294
800546e: 2b02 cmp r3, #2
8005470: d15c bne.n 800552c <USBD_LL_DataInStage+0xde>
{
if (pep->rem_length > pep->maxpacket)
8005472: 697b ldr r3, [r7, #20]
8005474: 68da ldr r2, [r3, #12]
8005476: 697b ldr r3, [r7, #20]
8005478: 691b ldr r3, [r3, #16]
800547a: 429a cmp r2, r3
800547c: d915 bls.n 80054aa <USBD_LL_DataInStage+0x5c>
{
pep->rem_length -= pep->maxpacket;
800547e: 697b ldr r3, [r7, #20]
8005480: 68da ldr r2, [r3, #12]
8005482: 697b ldr r3, [r7, #20]
8005484: 691b ldr r3, [r3, #16]
8005486: 1ad2 subs r2, r2, r3
8005488: 697b ldr r3, [r7, #20]
800548a: 60da str r2, [r3, #12]
USBD_CtlContinueSendData(pdev, pdata, (uint16_t)pep->rem_length);
800548c: 697b ldr r3, [r7, #20]
800548e: 68db ldr r3, [r3, #12]
8005490: b29b uxth r3, r3
8005492: 461a mov r2, r3
8005494: 6879 ldr r1, [r7, #4]
8005496: 68f8 ldr r0, [r7, #12]
8005498: f000 feb6 bl 8006208 <USBD_CtlContinueSendData>
/* Prepare endpoint for premature end of transfer */
USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U);
800549c: 2300 movs r3, #0
800549e: 2200 movs r2, #0
80054a0: 2100 movs r1, #0
80054a2: 68f8 ldr r0, [r7, #12]
80054a4: f001 fb3a bl 8006b1c <USBD_LL_PrepareReceive>
80054a8: e04e b.n 8005548 <USBD_LL_DataInStage+0xfa>
}
else
{
/* last packet is MPS multiple, so send ZLP packet */
if ((pep->total_length % pep->maxpacket == 0U) &&
80054aa: 697b ldr r3, [r7, #20]
80054ac: 689b ldr r3, [r3, #8]
80054ae: 697a ldr r2, [r7, #20]
80054b0: 6912 ldr r2, [r2, #16]
80054b2: fbb3 f1f2 udiv r1, r3, r2
80054b6: fb02 f201 mul.w r2, r2, r1
80054ba: 1a9b subs r3, r3, r2
80054bc: 2b00 cmp r3, #0
80054be: d11c bne.n 80054fa <USBD_LL_DataInStage+0xac>
(pep->total_length >= pep->maxpacket) &&
80054c0: 697b ldr r3, [r7, #20]
80054c2: 689a ldr r2, [r3, #8]
80054c4: 697b ldr r3, [r7, #20]
80054c6: 691b ldr r3, [r3, #16]
if ((pep->total_length % pep->maxpacket == 0U) &&
80054c8: 429a cmp r2, r3
80054ca: d316 bcc.n 80054fa <USBD_LL_DataInStage+0xac>
(pep->total_length < pdev->ep0_data_len))
80054cc: 697b ldr r3, [r7, #20]
80054ce: 689a ldr r2, [r3, #8]
80054d0: 68fb ldr r3, [r7, #12]
80054d2: f8d3 3298 ldr.w r3, [r3, #664] ; 0x298
(pep->total_length >= pep->maxpacket) &&
80054d6: 429a cmp r2, r3
80054d8: d20f bcs.n 80054fa <USBD_LL_DataInStage+0xac>
{
USBD_CtlContinueSendData(pdev, NULL, 0U);
80054da: 2200 movs r2, #0
80054dc: 2100 movs r1, #0
80054de: 68f8 ldr r0, [r7, #12]
80054e0: f000 fe92 bl 8006208 <USBD_CtlContinueSendData>
pdev->ep0_data_len = 0U;
80054e4: 68fb ldr r3, [r7, #12]
80054e6: 2200 movs r2, #0
80054e8: f8c3 2298 str.w r2, [r3, #664] ; 0x298
/* Prepare endpoint for premature end of transfer */
USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U);
80054ec: 2300 movs r3, #0
80054ee: 2200 movs r2, #0
80054f0: 2100 movs r1, #0
80054f2: 68f8 ldr r0, [r7, #12]
80054f4: f001 fb12 bl 8006b1c <USBD_LL_PrepareReceive>
80054f8: e026 b.n 8005548 <USBD_LL_DataInStage+0xfa>
}
else
{
if ((pdev->pClass->EP0_TxSent != NULL) &&
80054fa: 68fb ldr r3, [r7, #12]
80054fc: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
8005500: 68db ldr r3, [r3, #12]
8005502: 2b00 cmp r3, #0
8005504: d00a beq.n 800551c <USBD_LL_DataInStage+0xce>
(pdev->dev_state == USBD_STATE_CONFIGURED))
8005506: 68fb ldr r3, [r7, #12]
8005508: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
if ((pdev->pClass->EP0_TxSent != NULL) &&
800550c: 2b03 cmp r3, #3
800550e: d105 bne.n 800551c <USBD_LL_DataInStage+0xce>
{
pdev->pClass->EP0_TxSent(pdev);
8005510: 68fb ldr r3, [r7, #12]
8005512: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
8005516: 68db ldr r3, [r3, #12]
8005518: 68f8 ldr r0, [r7, #12]
800551a: 4798 blx r3
}
USBD_LL_StallEP(pdev, 0x80U);
800551c: 2180 movs r1, #128 ; 0x80
800551e: 68f8 ldr r0, [r7, #12]
8005520: f001 fa50 bl 80069c4 <USBD_LL_StallEP>
USBD_CtlReceiveStatus(pdev);
8005524: 68f8 ldr r0, [r7, #12]
8005526: f000 fec4 bl 80062b2 <USBD_CtlReceiveStatus>
800552a: e00d b.n 8005548 <USBD_LL_DataInStage+0xfa>
}
}
}
else
{
if ((pdev->ep0_state == USBD_EP0_STATUS_IN) ||
800552c: 68fb ldr r3, [r7, #12]
800552e: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294
8005532: 2b04 cmp r3, #4
8005534: d004 beq.n 8005540 <USBD_LL_DataInStage+0xf2>
(pdev->ep0_state == USBD_EP0_IDLE))
8005536: 68fb ldr r3, [r7, #12]
8005538: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294
if ((pdev->ep0_state == USBD_EP0_STATUS_IN) ||
800553c: 2b00 cmp r3, #0
800553e: d103 bne.n 8005548 <USBD_LL_DataInStage+0xfa>
{
USBD_LL_StallEP(pdev, 0x80U);
8005540: 2180 movs r1, #128 ; 0x80
8005542: 68f8 ldr r0, [r7, #12]
8005544: f001 fa3e bl 80069c4 <USBD_LL_StallEP>
}
}
if (pdev->dev_test_mode == 1U)
8005548: 68fb ldr r3, [r7, #12]
800554a: f893 32a0 ldrb.w r3, [r3, #672] ; 0x2a0
800554e: 2b01 cmp r3, #1
8005550: d11d bne.n 800558e <USBD_LL_DataInStage+0x140>
{
USBD_RunTestMode(pdev);
8005552: 68f8 ldr r0, [r7, #12]
8005554: f7ff fe83 bl 800525e <USBD_RunTestMode>
pdev->dev_test_mode = 0U;
8005558: 68fb ldr r3, [r7, #12]
800555a: 2200 movs r2, #0
800555c: f883 22a0 strb.w r2, [r3, #672] ; 0x2a0
8005560: e015 b.n 800558e <USBD_LL_DataInStage+0x140>
}
}
else if ((pdev->pClass->DataIn != NULL) &&
8005562: 68fb ldr r3, [r7, #12]
8005564: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
8005568: 695b ldr r3, [r3, #20]
800556a: 2b00 cmp r3, #0
800556c: d00d beq.n 800558a <USBD_LL_DataInStage+0x13c>
(pdev->dev_state == USBD_STATE_CONFIGURED))
800556e: 68fb ldr r3, [r7, #12]
8005570: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
else if ((pdev->pClass->DataIn != NULL) &&
8005574: 2b03 cmp r3, #3
8005576: d108 bne.n 800558a <USBD_LL_DataInStage+0x13c>
{
pdev->pClass->DataIn(pdev, epnum);
8005578: 68fb ldr r3, [r7, #12]
800557a: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
800557e: 695b ldr r3, [r3, #20]
8005580: 7afa ldrb r2, [r7, #11]
8005582: 4611 mov r1, r2
8005584: 68f8 ldr r0, [r7, #12]
8005586: 4798 blx r3
8005588: e001 b.n 800558e <USBD_LL_DataInStage+0x140>
}
else
{
/* should never be in this condition */
return USBD_FAIL;
800558a: 2302 movs r3, #2
800558c: e000 b.n 8005590 <USBD_LL_DataInStage+0x142>
}
return USBD_OK;
800558e: 2300 movs r3, #0
}
8005590: 4618 mov r0, r3
8005592: 3718 adds r7, #24
8005594: 46bd mov sp, r7
8005596: bd80 pop {r7, pc}
08005598 <USBD_LL_Reset>:
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_Reset(USBD_HandleTypeDef *pdev)
{
8005598: b580 push {r7, lr}
800559a: b082 sub sp, #8
800559c: af00 add r7, sp, #0
800559e: 6078 str r0, [r7, #4]
/* Open EP0 OUT */
USBD_LL_OpenEP(pdev, 0x00U, USBD_EP_TYPE_CTRL, USB_MAX_EP0_SIZE);
80055a0: 2340 movs r3, #64 ; 0x40
80055a2: 2200 movs r2, #0
80055a4: 2100 movs r1, #0
80055a6: 6878 ldr r0, [r7, #4]
80055a8: f001 f9c7 bl 800693a <USBD_LL_OpenEP>
pdev->ep_out[0x00U & 0xFU].is_used = 1U;
80055ac: 687b ldr r3, [r7, #4]
80055ae: 2201 movs r2, #1
80055b0: f8c3 2158 str.w r2, [r3, #344] ; 0x158
pdev->ep_out[0].maxpacket = USB_MAX_EP0_SIZE;
80055b4: 687b ldr r3, [r7, #4]
80055b6: 2240 movs r2, #64 ; 0x40
80055b8: f8c3 2164 str.w r2, [r3, #356] ; 0x164
/* Open EP0 IN */
USBD_LL_OpenEP(pdev, 0x80U, USBD_EP_TYPE_CTRL, USB_MAX_EP0_SIZE);
80055bc: 2340 movs r3, #64 ; 0x40
80055be: 2200 movs r2, #0
80055c0: 2180 movs r1, #128 ; 0x80
80055c2: 6878 ldr r0, [r7, #4]
80055c4: f001 f9b9 bl 800693a <USBD_LL_OpenEP>
pdev->ep_in[0x80U & 0xFU].is_used = 1U;
80055c8: 687b ldr r3, [r7, #4]
80055ca: 2201 movs r2, #1
80055cc: 619a str r2, [r3, #24]
pdev->ep_in[0].maxpacket = USB_MAX_EP0_SIZE;
80055ce: 687b ldr r3, [r7, #4]
80055d0: 2240 movs r2, #64 ; 0x40
80055d2: 625a str r2, [r3, #36] ; 0x24
/* Upon Reset call user call back */
pdev->dev_state = USBD_STATE_DEFAULT;
80055d4: 687b ldr r3, [r7, #4]
80055d6: 2201 movs r2, #1
80055d8: f883 229c strb.w r2, [r3, #668] ; 0x29c
pdev->ep0_state = USBD_EP0_IDLE;
80055dc: 687b ldr r3, [r7, #4]
80055de: 2200 movs r2, #0
80055e0: f8c3 2294 str.w r2, [r3, #660] ; 0x294
pdev->dev_config = 0U;
80055e4: 687b ldr r3, [r7, #4]
80055e6: 2200 movs r2, #0
80055e8: 605a str r2, [r3, #4]
pdev->dev_remote_wakeup = 0U;
80055ea: 687b ldr r3, [r7, #4]
80055ec: 2200 movs r2, #0
80055ee: f8c3 22a4 str.w r2, [r3, #676] ; 0x2a4
if (pdev->pClassData)
80055f2: 687b ldr r3, [r7, #4]
80055f4: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
80055f8: 2b00 cmp r3, #0
80055fa: d009 beq.n 8005610 <USBD_LL_Reset+0x78>
{
pdev->pClass->DeInit(pdev, (uint8_t)pdev->dev_config);
80055fc: 687b ldr r3, [r7, #4]
80055fe: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
8005602: 685b ldr r3, [r3, #4]
8005604: 687a ldr r2, [r7, #4]
8005606: 6852 ldr r2, [r2, #4]
8005608: b2d2 uxtb r2, r2
800560a: 4611 mov r1, r2
800560c: 6878 ldr r0, [r7, #4]
800560e: 4798 blx r3
}
return USBD_OK;
8005610: 2300 movs r3, #0
}
8005612: 4618 mov r0, r3
8005614: 3708 adds r7, #8
8005616: 46bd mov sp, r7
8005618: bd80 pop {r7, pc}
0800561a <USBD_LL_SetSpeed>:
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_SetSpeed(USBD_HandleTypeDef *pdev,
USBD_SpeedTypeDef speed)
{
800561a: b480 push {r7}
800561c: b083 sub sp, #12
800561e: af00 add r7, sp, #0
8005620: 6078 str r0, [r7, #4]
8005622: 460b mov r3, r1
8005624: 70fb strb r3, [r7, #3]
pdev->dev_speed = speed;
8005626: 687b ldr r3, [r7, #4]
8005628: 78fa ldrb r2, [r7, #3]
800562a: 741a strb r2, [r3, #16]
return USBD_OK;
800562c: 2300 movs r3, #0
}
800562e: 4618 mov r0, r3
8005630: 370c adds r7, #12
8005632: 46bd mov sp, r7
8005634: bc80 pop {r7}
8005636: 4770 bx lr
08005638 <USBD_LL_Suspend>:
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_Suspend(USBD_HandleTypeDef *pdev)
{
8005638: b480 push {r7}
800563a: b083 sub sp, #12
800563c: af00 add r7, sp, #0
800563e: 6078 str r0, [r7, #4]
pdev->dev_old_state = pdev->dev_state;
8005640: 687b ldr r3, [r7, #4]
8005642: f893 229c ldrb.w r2, [r3, #668] ; 0x29c
8005646: 687b ldr r3, [r7, #4]
8005648: f883 229d strb.w r2, [r3, #669] ; 0x29d
pdev->dev_state = USBD_STATE_SUSPENDED;
800564c: 687b ldr r3, [r7, #4]
800564e: 2204 movs r2, #4
8005650: f883 229c strb.w r2, [r3, #668] ; 0x29c
return USBD_OK;
8005654: 2300 movs r3, #0
}
8005656: 4618 mov r0, r3
8005658: 370c adds r7, #12
800565a: 46bd mov sp, r7
800565c: bc80 pop {r7}
800565e: 4770 bx lr
08005660 <USBD_LL_Resume>:
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_Resume(USBD_HandleTypeDef *pdev)
{
8005660: b480 push {r7}
8005662: b083 sub sp, #12
8005664: af00 add r7, sp, #0
8005666: 6078 str r0, [r7, #4]
if (pdev->dev_state == USBD_STATE_SUSPENDED)
8005668: 687b ldr r3, [r7, #4]
800566a: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
800566e: 2b04 cmp r3, #4
8005670: d105 bne.n 800567e <USBD_LL_Resume+0x1e>
{
pdev->dev_state = pdev->dev_old_state;
8005672: 687b ldr r3, [r7, #4]
8005674: f893 229d ldrb.w r2, [r3, #669] ; 0x29d
8005678: 687b ldr r3, [r7, #4]
800567a: f883 229c strb.w r2, [r3, #668] ; 0x29c
}
return USBD_OK;
800567e: 2300 movs r3, #0
}
8005680: 4618 mov r0, r3
8005682: 370c adds r7, #12
8005684: 46bd mov sp, r7
8005686: bc80 pop {r7}
8005688: 4770 bx lr
0800568a <USBD_LL_SOF>:
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_SOF(USBD_HandleTypeDef *pdev)
{
800568a: b580 push {r7, lr}
800568c: b082 sub sp, #8
800568e: af00 add r7, sp, #0
8005690: 6078 str r0, [r7, #4]
if (pdev->dev_state == USBD_STATE_CONFIGURED)
8005692: 687b ldr r3, [r7, #4]
8005694: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
8005698: 2b03 cmp r3, #3
800569a: d10b bne.n 80056b4 <USBD_LL_SOF+0x2a>
{
if (pdev->pClass->SOF != NULL)
800569c: 687b ldr r3, [r7, #4]
800569e: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
80056a2: 69db ldr r3, [r3, #28]
80056a4: 2b00 cmp r3, #0
80056a6: d005 beq.n 80056b4 <USBD_LL_SOF+0x2a>
{
pdev->pClass->SOF(pdev);
80056a8: 687b ldr r3, [r7, #4]
80056aa: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
80056ae: 69db ldr r3, [r3, #28]
80056b0: 6878 ldr r0, [r7, #4]
80056b2: 4798 blx r3
}
}
return USBD_OK;
80056b4: 2300 movs r3, #0
}
80056b6: 4618 mov r0, r3
80056b8: 3708 adds r7, #8
80056ba: 46bd mov sp, r7
80056bc: bd80 pop {r7, pc}
...
080056c0 <USBD_StdDevReq>:
* @param req: usb request
* @retval status
*/
USBD_StatusTypeDef USBD_StdDevReq(USBD_HandleTypeDef *pdev,
USBD_SetupReqTypedef *req)
{
80056c0: b580 push {r7, lr}
80056c2: b084 sub sp, #16
80056c4: af00 add r7, sp, #0
80056c6: 6078 str r0, [r7, #4]
80056c8: 6039 str r1, [r7, #0]
USBD_StatusTypeDef ret = USBD_OK;
80056ca: 2300 movs r3, #0
80056cc: 73fb strb r3, [r7, #15]
switch (req->bmRequest & USB_REQ_TYPE_MASK)
80056ce: 683b ldr r3, [r7, #0]
80056d0: 781b ldrb r3, [r3, #0]
80056d2: f003 0360 and.w r3, r3, #96 ; 0x60
80056d6: 2b20 cmp r3, #32
80056d8: d004 beq.n 80056e4 <USBD_StdDevReq+0x24>
80056da: 2b40 cmp r3, #64 ; 0x40
80056dc: d002 beq.n 80056e4 <USBD_StdDevReq+0x24>
80056de: 2b00 cmp r3, #0
80056e0: d008 beq.n 80056f4 <USBD_StdDevReq+0x34>
80056e2: e04c b.n 800577e <USBD_StdDevReq+0xbe>
{
case USB_REQ_TYPE_CLASS:
case USB_REQ_TYPE_VENDOR:
pdev->pClass->Setup(pdev, req);
80056e4: 687b ldr r3, [r7, #4]
80056e6: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
80056ea: 689b ldr r3, [r3, #8]
80056ec: 6839 ldr r1, [r7, #0]
80056ee: 6878 ldr r0, [r7, #4]
80056f0: 4798 blx r3
break;
80056f2: e049 b.n 8005788 <USBD_StdDevReq+0xc8>
case USB_REQ_TYPE_STANDARD:
switch (req->bRequest)
80056f4: 683b ldr r3, [r7, #0]
80056f6: 785b ldrb r3, [r3, #1]
80056f8: 2b09 cmp r3, #9
80056fa: d83a bhi.n 8005772 <USBD_StdDevReq+0xb2>
80056fc: a201 add r2, pc, #4 ; (adr r2, 8005704 <USBD_StdDevReq+0x44>)
80056fe: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8005702: bf00 nop
8005704: 08005755 .word 0x08005755
8005708: 08005769 .word 0x08005769
800570c: 08005773 .word 0x08005773
8005710: 0800575f .word 0x0800575f
8005714: 08005773 .word 0x08005773
8005718: 08005737 .word 0x08005737
800571c: 0800572d .word 0x0800572d
8005720: 08005773 .word 0x08005773
8005724: 0800574b .word 0x0800574b
8005728: 08005741 .word 0x08005741
{
case USB_REQ_GET_DESCRIPTOR:
USBD_GetDescriptor(pdev, req);
800572c: 6839 ldr r1, [r7, #0]
800572e: 6878 ldr r0, [r7, #4]
8005730: f000 f9d4 bl 8005adc <USBD_GetDescriptor>
break;
8005734: e022 b.n 800577c <USBD_StdDevReq+0xbc>
case USB_REQ_SET_ADDRESS:
USBD_SetAddress(pdev, req);
8005736: 6839 ldr r1, [r7, #0]
8005738: 6878 ldr r0, [r7, #4]
800573a: f000 fb37 bl 8005dac <USBD_SetAddress>
break;
800573e: e01d b.n 800577c <USBD_StdDevReq+0xbc>
case USB_REQ_SET_CONFIGURATION:
USBD_SetConfig(pdev, req);
8005740: 6839 ldr r1, [r7, #0]
8005742: 6878 ldr r0, [r7, #4]
8005744: f000 fb74 bl 8005e30 <USBD_SetConfig>
break;
8005748: e018 b.n 800577c <USBD_StdDevReq+0xbc>
case USB_REQ_GET_CONFIGURATION:
USBD_GetConfig(pdev, req);
800574a: 6839 ldr r1, [r7, #0]
800574c: 6878 ldr r0, [r7, #4]
800574e: f000 fbfd bl 8005f4c <USBD_GetConfig>
break;
8005752: e013 b.n 800577c <USBD_StdDevReq+0xbc>
case USB_REQ_GET_STATUS:
USBD_GetStatus(pdev, req);
8005754: 6839 ldr r1, [r7, #0]
8005756: 6878 ldr r0, [r7, #4]
8005758: f000 fc2c bl 8005fb4 <USBD_GetStatus>
break;
800575c: e00e b.n 800577c <USBD_StdDevReq+0xbc>
case USB_REQ_SET_FEATURE:
USBD_SetFeature(pdev, req);
800575e: 6839 ldr r1, [r7, #0]
8005760: 6878 ldr r0, [r7, #4]
8005762: f000 fc5a bl 800601a <USBD_SetFeature>
break;
8005766: e009 b.n 800577c <USBD_StdDevReq+0xbc>
case USB_REQ_CLEAR_FEATURE:
USBD_ClrFeature(pdev, req);
8005768: 6839 ldr r1, [r7, #0]
800576a: 6878 ldr r0, [r7, #4]
800576c: f000 fc69 bl 8006042 <USBD_ClrFeature>
break;
8005770: e004 b.n 800577c <USBD_StdDevReq+0xbc>
default:
USBD_CtlError(pdev, req);
8005772: 6839 ldr r1, [r7, #0]
8005774: 6878 ldr r0, [r7, #4]
8005776: f000 fcc1 bl 80060fc <USBD_CtlError>
break;
800577a: bf00 nop
}
break;
800577c: e004 b.n 8005788 <USBD_StdDevReq+0xc8>
default:
USBD_CtlError(pdev, req);
800577e: 6839 ldr r1, [r7, #0]
8005780: 6878 ldr r0, [r7, #4]
8005782: f000 fcbb bl 80060fc <USBD_CtlError>
break;
8005786: bf00 nop
}
return ret;
8005788: 7bfb ldrb r3, [r7, #15]
}
800578a: 4618 mov r0, r3
800578c: 3710 adds r7, #16
800578e: 46bd mov sp, r7
8005790: bd80 pop {r7, pc}
8005792: bf00 nop
08005794 <USBD_StdItfReq>:
* @param req: usb request
* @retval status
*/
USBD_StatusTypeDef USBD_StdItfReq(USBD_HandleTypeDef *pdev,
USBD_SetupReqTypedef *req)
{
8005794: b580 push {r7, lr}
8005796: b084 sub sp, #16
8005798: af00 add r7, sp, #0
800579a: 6078 str r0, [r7, #4]
800579c: 6039 str r1, [r7, #0]
USBD_StatusTypeDef ret = USBD_OK;
800579e: 2300 movs r3, #0
80057a0: 73fb strb r3, [r7, #15]
switch (req->bmRequest & USB_REQ_TYPE_MASK)
80057a2: 683b ldr r3, [r7, #0]
80057a4: 781b ldrb r3, [r3, #0]
80057a6: f003 0360 and.w r3, r3, #96 ; 0x60
80057aa: 2b20 cmp r3, #32
80057ac: d003 beq.n 80057b6 <USBD_StdItfReq+0x22>
80057ae: 2b40 cmp r3, #64 ; 0x40
80057b0: d001 beq.n 80057b6 <USBD_StdItfReq+0x22>
80057b2: 2b00 cmp r3, #0
80057b4: d12a bne.n 800580c <USBD_StdItfReq+0x78>
{
case USB_REQ_TYPE_CLASS:
case USB_REQ_TYPE_VENDOR:
case USB_REQ_TYPE_STANDARD:
switch (pdev->dev_state)
80057b6: 687b ldr r3, [r7, #4]
80057b8: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
80057bc: 3b01 subs r3, #1
80057be: 2b02 cmp r3, #2
80057c0: d81d bhi.n 80057fe <USBD_StdItfReq+0x6a>
{
case USBD_STATE_DEFAULT:
case USBD_STATE_ADDRESSED:
case USBD_STATE_CONFIGURED:
if (LOBYTE(req->wIndex) <= USBD_MAX_NUM_INTERFACES)
80057c2: 683b ldr r3, [r7, #0]
80057c4: 889b ldrh r3, [r3, #4]
80057c6: b2db uxtb r3, r3
80057c8: 2b01 cmp r3, #1
80057ca: d813 bhi.n 80057f4 <USBD_StdItfReq+0x60>
{
ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req);
80057cc: 687b ldr r3, [r7, #4]
80057ce: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
80057d2: 689b ldr r3, [r3, #8]
80057d4: 6839 ldr r1, [r7, #0]
80057d6: 6878 ldr r0, [r7, #4]
80057d8: 4798 blx r3
80057da: 4603 mov r3, r0
80057dc: 73fb strb r3, [r7, #15]
if ((req->wLength == 0U) && (ret == USBD_OK))
80057de: 683b ldr r3, [r7, #0]
80057e0: 88db ldrh r3, [r3, #6]
80057e2: 2b00 cmp r3, #0
80057e4: d110 bne.n 8005808 <USBD_StdItfReq+0x74>
80057e6: 7bfb ldrb r3, [r7, #15]
80057e8: 2b00 cmp r3, #0
80057ea: d10d bne.n 8005808 <USBD_StdItfReq+0x74>
{
USBD_CtlSendStatus(pdev);
80057ec: 6878 ldr r0, [r7, #4]
80057ee: f000 fd4d bl 800628c <USBD_CtlSendStatus>
}
else
{
USBD_CtlError(pdev, req);
}
break;
80057f2: e009 b.n 8005808 <USBD_StdItfReq+0x74>
USBD_CtlError(pdev, req);
80057f4: 6839 ldr r1, [r7, #0]
80057f6: 6878 ldr r0, [r7, #4]
80057f8: f000 fc80 bl 80060fc <USBD_CtlError>
break;
80057fc: e004 b.n 8005808 <USBD_StdItfReq+0x74>
default:
USBD_CtlError(pdev, req);
80057fe: 6839 ldr r1, [r7, #0]
8005800: 6878 ldr r0, [r7, #4]
8005802: f000 fc7b bl 80060fc <USBD_CtlError>
break;
8005806: e000 b.n 800580a <USBD_StdItfReq+0x76>
break;
8005808: bf00 nop
}
break;
800580a: e004 b.n 8005816 <USBD_StdItfReq+0x82>
default:
USBD_CtlError(pdev, req);
800580c: 6839 ldr r1, [r7, #0]
800580e: 6878 ldr r0, [r7, #4]
8005810: f000 fc74 bl 80060fc <USBD_CtlError>
break;
8005814: bf00 nop
}
return USBD_OK;
8005816: 2300 movs r3, #0
}
8005818: 4618 mov r0, r3
800581a: 3710 adds r7, #16
800581c: 46bd mov sp, r7
800581e: bd80 pop {r7, pc}
08005820 <USBD_StdEPReq>:
* @param req: usb request
* @retval status
*/
USBD_StatusTypeDef USBD_StdEPReq(USBD_HandleTypeDef *pdev,
USBD_SetupReqTypedef *req)
{
8005820: b580 push {r7, lr}
8005822: b084 sub sp, #16
8005824: af00 add r7, sp, #0
8005826: 6078 str r0, [r7, #4]
8005828: 6039 str r1, [r7, #0]
USBD_EndpointTypeDef *pep;
uint8_t ep_addr;
USBD_StatusTypeDef ret = USBD_OK;
800582a: 2300 movs r3, #0
800582c: 73fb strb r3, [r7, #15]
ep_addr = LOBYTE(req->wIndex);
800582e: 683b ldr r3, [r7, #0]
8005830: 889b ldrh r3, [r3, #4]
8005832: 73bb strb r3, [r7, #14]
switch (req->bmRequest & USB_REQ_TYPE_MASK)
8005834: 683b ldr r3, [r7, #0]
8005836: 781b ldrb r3, [r3, #0]
8005838: f003 0360 and.w r3, r3, #96 ; 0x60
800583c: 2b20 cmp r3, #32
800583e: d004 beq.n 800584a <USBD_StdEPReq+0x2a>
8005840: 2b40 cmp r3, #64 ; 0x40
8005842: d002 beq.n 800584a <USBD_StdEPReq+0x2a>
8005844: 2b00 cmp r3, #0
8005846: d008 beq.n 800585a <USBD_StdEPReq+0x3a>
8005848: e13d b.n 8005ac6 <USBD_StdEPReq+0x2a6>
{
case USB_REQ_TYPE_CLASS:
case USB_REQ_TYPE_VENDOR:
pdev->pClass->Setup(pdev, req);
800584a: 687b ldr r3, [r7, #4]
800584c: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
8005850: 689b ldr r3, [r3, #8]
8005852: 6839 ldr r1, [r7, #0]
8005854: 6878 ldr r0, [r7, #4]
8005856: 4798 blx r3
break;
8005858: e13a b.n 8005ad0 <USBD_StdEPReq+0x2b0>
case USB_REQ_TYPE_STANDARD:
/* Check if it is a class request */
if ((req->bmRequest & 0x60U) == 0x20U)
800585a: 683b ldr r3, [r7, #0]
800585c: 781b ldrb r3, [r3, #0]
800585e: f003 0360 and.w r3, r3, #96 ; 0x60
8005862: 2b20 cmp r3, #32
8005864: d10a bne.n 800587c <USBD_StdEPReq+0x5c>
{
ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req);
8005866: 687b ldr r3, [r7, #4]
8005868: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
800586c: 689b ldr r3, [r3, #8]
800586e: 6839 ldr r1, [r7, #0]
8005870: 6878 ldr r0, [r7, #4]
8005872: 4798 blx r3
8005874: 4603 mov r3, r0
8005876: 73fb strb r3, [r7, #15]
return ret;
8005878: 7bfb ldrb r3, [r7, #15]
800587a: e12a b.n 8005ad2 <USBD_StdEPReq+0x2b2>
}
switch (req->bRequest)
800587c: 683b ldr r3, [r7, #0]
800587e: 785b ldrb r3, [r3, #1]
8005880: 2b01 cmp r3, #1
8005882: d03e beq.n 8005902 <USBD_StdEPReq+0xe2>
8005884: 2b03 cmp r3, #3
8005886: d002 beq.n 800588e <USBD_StdEPReq+0x6e>
8005888: 2b00 cmp r3, #0
800588a: d070 beq.n 800596e <USBD_StdEPReq+0x14e>
800588c: e115 b.n 8005aba <USBD_StdEPReq+0x29a>
{
case USB_REQ_SET_FEATURE:
switch (pdev->dev_state)
800588e: 687b ldr r3, [r7, #4]
8005890: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
8005894: 2b02 cmp r3, #2
8005896: d002 beq.n 800589e <USBD_StdEPReq+0x7e>
8005898: 2b03 cmp r3, #3
800589a: d015 beq.n 80058c8 <USBD_StdEPReq+0xa8>
800589c: e02b b.n 80058f6 <USBD_StdEPReq+0xd6>
{
case USBD_STATE_ADDRESSED:
if ((ep_addr != 0x00U) && (ep_addr != 0x80U))
800589e: 7bbb ldrb r3, [r7, #14]
80058a0: 2b00 cmp r3, #0
80058a2: d00c beq.n 80058be <USBD_StdEPReq+0x9e>
80058a4: 7bbb ldrb r3, [r7, #14]
80058a6: 2b80 cmp r3, #128 ; 0x80
80058a8: d009 beq.n 80058be <USBD_StdEPReq+0x9e>
{
USBD_LL_StallEP(pdev, ep_addr);
80058aa: 7bbb ldrb r3, [r7, #14]
80058ac: 4619 mov r1, r3
80058ae: 6878 ldr r0, [r7, #4]
80058b0: f001 f888 bl 80069c4 <USBD_LL_StallEP>
USBD_LL_StallEP(pdev, 0x80U);
80058b4: 2180 movs r1, #128 ; 0x80
80058b6: 6878 ldr r0, [r7, #4]
80058b8: f001 f884 bl 80069c4 <USBD_LL_StallEP>
}
else
{
USBD_CtlError(pdev, req);
}
break;
80058bc: e020 b.n 8005900 <USBD_StdEPReq+0xe0>
USBD_CtlError(pdev, req);
80058be: 6839 ldr r1, [r7, #0]
80058c0: 6878 ldr r0, [r7, #4]
80058c2: f000 fc1b bl 80060fc <USBD_CtlError>
break;
80058c6: e01b b.n 8005900 <USBD_StdEPReq+0xe0>
case USBD_STATE_CONFIGURED:
if (req->wValue == USB_FEATURE_EP_HALT)
80058c8: 683b ldr r3, [r7, #0]
80058ca: 885b ldrh r3, [r3, #2]
80058cc: 2b00 cmp r3, #0
80058ce: d10e bne.n 80058ee <USBD_StdEPReq+0xce>
{
if ((ep_addr != 0x00U) &&
80058d0: 7bbb ldrb r3, [r7, #14]
80058d2: 2b00 cmp r3, #0
80058d4: d00b beq.n 80058ee <USBD_StdEPReq+0xce>
80058d6: 7bbb ldrb r3, [r7, #14]
80058d8: 2b80 cmp r3, #128 ; 0x80
80058da: d008 beq.n 80058ee <USBD_StdEPReq+0xce>
(ep_addr != 0x80U) && (req->wLength == 0x00U))
80058dc: 683b ldr r3, [r7, #0]
80058de: 88db ldrh r3, [r3, #6]
80058e0: 2b00 cmp r3, #0
80058e2: d104 bne.n 80058ee <USBD_StdEPReq+0xce>
{
USBD_LL_StallEP(pdev, ep_addr);
80058e4: 7bbb ldrb r3, [r7, #14]
80058e6: 4619 mov r1, r3
80058e8: 6878 ldr r0, [r7, #4]
80058ea: f001 f86b bl 80069c4 <USBD_LL_StallEP>
}
}
USBD_CtlSendStatus(pdev);
80058ee: 6878 ldr r0, [r7, #4]
80058f0: f000 fccc bl 800628c <USBD_CtlSendStatus>
break;
80058f4: e004 b.n 8005900 <USBD_StdEPReq+0xe0>
default:
USBD_CtlError(pdev, req);
80058f6: 6839 ldr r1, [r7, #0]
80058f8: 6878 ldr r0, [r7, #4]
80058fa: f000 fbff bl 80060fc <USBD_CtlError>
break;
80058fe: bf00 nop
}
break;
8005900: e0e0 b.n 8005ac4 <USBD_StdEPReq+0x2a4>
case USB_REQ_CLEAR_FEATURE:
switch (pdev->dev_state)
8005902: 687b ldr r3, [r7, #4]
8005904: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
8005908: 2b02 cmp r3, #2
800590a: d002 beq.n 8005912 <USBD_StdEPReq+0xf2>
800590c: 2b03 cmp r3, #3
800590e: d015 beq.n 800593c <USBD_StdEPReq+0x11c>
8005910: e026 b.n 8005960 <USBD_StdEPReq+0x140>
{
case USBD_STATE_ADDRESSED:
if ((ep_addr != 0x00U) && (ep_addr != 0x80U))
8005912: 7bbb ldrb r3, [r7, #14]
8005914: 2b00 cmp r3, #0
8005916: d00c beq.n 8005932 <USBD_StdEPReq+0x112>
8005918: 7bbb ldrb r3, [r7, #14]
800591a: 2b80 cmp r3, #128 ; 0x80
800591c: d009 beq.n 8005932 <USBD_StdEPReq+0x112>
{
USBD_LL_StallEP(pdev, ep_addr);
800591e: 7bbb ldrb r3, [r7, #14]
8005920: 4619 mov r1, r3
8005922: 6878 ldr r0, [r7, #4]
8005924: f001 f84e bl 80069c4 <USBD_LL_StallEP>
USBD_LL_StallEP(pdev, 0x80U);
8005928: 2180 movs r1, #128 ; 0x80
800592a: 6878 ldr r0, [r7, #4]
800592c: f001 f84a bl 80069c4 <USBD_LL_StallEP>
}
else
{
USBD_CtlError(pdev, req);
}
break;
8005930: e01c b.n 800596c <USBD_StdEPReq+0x14c>
USBD_CtlError(pdev, req);
8005932: 6839 ldr r1, [r7, #0]
8005934: 6878 ldr r0, [r7, #4]
8005936: f000 fbe1 bl 80060fc <USBD_CtlError>
break;
800593a: e017 b.n 800596c <USBD_StdEPReq+0x14c>
case USBD_STATE_CONFIGURED:
if (req->wValue == USB_FEATURE_EP_HALT)
800593c: 683b ldr r3, [r7, #0]
800593e: 885b ldrh r3, [r3, #2]
8005940: 2b00 cmp r3, #0
8005942: d112 bne.n 800596a <USBD_StdEPReq+0x14a>
{
if ((ep_addr & 0x7FU) != 0x00U)
8005944: 7bbb ldrb r3, [r7, #14]
8005946: f003 037f and.w r3, r3, #127 ; 0x7f
800594a: 2b00 cmp r3, #0
800594c: d004 beq.n 8005958 <USBD_StdEPReq+0x138>
{
USBD_LL_ClearStallEP(pdev, ep_addr);
800594e: 7bbb ldrb r3, [r7, #14]
8005950: 4619 mov r1, r3
8005952: 6878 ldr r0, [r7, #4]
8005954: f001 f855 bl 8006a02 <USBD_LL_ClearStallEP>
}
USBD_CtlSendStatus(pdev);
8005958: 6878 ldr r0, [r7, #4]
800595a: f000 fc97 bl 800628c <USBD_CtlSendStatus>
}
break;
800595e: e004 b.n 800596a <USBD_StdEPReq+0x14a>
default:
USBD_CtlError(pdev, req);
8005960: 6839 ldr r1, [r7, #0]
8005962: 6878 ldr r0, [r7, #4]
8005964: f000 fbca bl 80060fc <USBD_CtlError>
break;
8005968: e000 b.n 800596c <USBD_StdEPReq+0x14c>
break;
800596a: bf00 nop
}
break;
800596c: e0aa b.n 8005ac4 <USBD_StdEPReq+0x2a4>
case USB_REQ_GET_STATUS:
switch (pdev->dev_state)
800596e: 687b ldr r3, [r7, #4]
8005970: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
8005974: 2b02 cmp r3, #2
8005976: d002 beq.n 800597e <USBD_StdEPReq+0x15e>
8005978: 2b03 cmp r3, #3
800597a: d032 beq.n 80059e2 <USBD_StdEPReq+0x1c2>
800597c: e097 b.n 8005aae <USBD_StdEPReq+0x28e>
{
case USBD_STATE_ADDRESSED:
if ((ep_addr != 0x00U) && (ep_addr != 0x80U))
800597e: 7bbb ldrb r3, [r7, #14]
8005980: 2b00 cmp r3, #0
8005982: d007 beq.n 8005994 <USBD_StdEPReq+0x174>
8005984: 7bbb ldrb r3, [r7, #14]
8005986: 2b80 cmp r3, #128 ; 0x80
8005988: d004 beq.n 8005994 <USBD_StdEPReq+0x174>
{
USBD_CtlError(pdev, req);
800598a: 6839 ldr r1, [r7, #0]
800598c: 6878 ldr r0, [r7, #4]
800598e: f000 fbb5 bl 80060fc <USBD_CtlError>
break;
8005992: e091 b.n 8005ab8 <USBD_StdEPReq+0x298>
}
pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \
8005994: f997 300e ldrsb.w r3, [r7, #14]
8005998: 2b00 cmp r3, #0
800599a: da0b bge.n 80059b4 <USBD_StdEPReq+0x194>
800599c: 7bbb ldrb r3, [r7, #14]
800599e: f003 027f and.w r2, r3, #127 ; 0x7f
80059a2: 4613 mov r3, r2
80059a4: 009b lsls r3, r3, #2
80059a6: 4413 add r3, r2
80059a8: 009b lsls r3, r3, #2
80059aa: 3310 adds r3, #16
80059ac: 687a ldr r2, [r7, #4]
80059ae: 4413 add r3, r2
80059b0: 3304 adds r3, #4
80059b2: e00b b.n 80059cc <USBD_StdEPReq+0x1ac>
&pdev->ep_out[ep_addr & 0x7FU];
80059b4: 7bbb ldrb r3, [r7, #14]
80059b6: f003 027f and.w r2, r3, #127 ; 0x7f
pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \
80059ba: 4613 mov r3, r2
80059bc: 009b lsls r3, r3, #2
80059be: 4413 add r3, r2
80059c0: 009b lsls r3, r3, #2
80059c2: f503 73a8 add.w r3, r3, #336 ; 0x150
80059c6: 687a ldr r2, [r7, #4]
80059c8: 4413 add r3, r2
80059ca: 3304 adds r3, #4
80059cc: 60bb str r3, [r7, #8]
pep->status = 0x0000U;
80059ce: 68bb ldr r3, [r7, #8]
80059d0: 2200 movs r2, #0
80059d2: 601a str r2, [r3, #0]
USBD_CtlSendData(pdev, (uint8_t *)(void *)&pep->status, 2U);
80059d4: 68bb ldr r3, [r7, #8]
80059d6: 2202 movs r2, #2
80059d8: 4619 mov r1, r3
80059da: 6878 ldr r0, [r7, #4]
80059dc: f000 fbf8 bl 80061d0 <USBD_CtlSendData>
break;
80059e0: e06a b.n 8005ab8 <USBD_StdEPReq+0x298>
case USBD_STATE_CONFIGURED:
if ((ep_addr & 0x80U) == 0x80U)
80059e2: f997 300e ldrsb.w r3, [r7, #14]
80059e6: 2b00 cmp r3, #0
80059e8: da11 bge.n 8005a0e <USBD_StdEPReq+0x1ee>
{
if (pdev->ep_in[ep_addr & 0xFU].is_used == 0U)
80059ea: 7bbb ldrb r3, [r7, #14]
80059ec: f003 020f and.w r2, r3, #15
80059f0: 6879 ldr r1, [r7, #4]
80059f2: 4613 mov r3, r2
80059f4: 009b lsls r3, r3, #2
80059f6: 4413 add r3, r2
80059f8: 009b lsls r3, r3, #2
80059fa: 440b add r3, r1
80059fc: 3318 adds r3, #24
80059fe: 681b ldr r3, [r3, #0]
8005a00: 2b00 cmp r3, #0
8005a02: d117 bne.n 8005a34 <USBD_StdEPReq+0x214>
{
USBD_CtlError(pdev, req);
8005a04: 6839 ldr r1, [r7, #0]
8005a06: 6878 ldr r0, [r7, #4]
8005a08: f000 fb78 bl 80060fc <USBD_CtlError>
break;
8005a0c: e054 b.n 8005ab8 <USBD_StdEPReq+0x298>
}
}
else
{
if (pdev->ep_out[ep_addr & 0xFU].is_used == 0U)
8005a0e: 7bbb ldrb r3, [r7, #14]
8005a10: f003 020f and.w r2, r3, #15
8005a14: 6879 ldr r1, [r7, #4]
8005a16: 4613 mov r3, r2
8005a18: 009b lsls r3, r3, #2
8005a1a: 4413 add r3, r2
8005a1c: 009b lsls r3, r3, #2
8005a1e: 440b add r3, r1
8005a20: f503 73ac add.w r3, r3, #344 ; 0x158
8005a24: 681b ldr r3, [r3, #0]
8005a26: 2b00 cmp r3, #0
8005a28: d104 bne.n 8005a34 <USBD_StdEPReq+0x214>
{
USBD_CtlError(pdev, req);
8005a2a: 6839 ldr r1, [r7, #0]
8005a2c: 6878 ldr r0, [r7, #4]
8005a2e: f000 fb65 bl 80060fc <USBD_CtlError>
break;
8005a32: e041 b.n 8005ab8 <USBD_StdEPReq+0x298>
}
}
pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \
8005a34: f997 300e ldrsb.w r3, [r7, #14]
8005a38: 2b00 cmp r3, #0
8005a3a: da0b bge.n 8005a54 <USBD_StdEPReq+0x234>
8005a3c: 7bbb ldrb r3, [r7, #14]
8005a3e: f003 027f and.w r2, r3, #127 ; 0x7f
8005a42: 4613 mov r3, r2
8005a44: 009b lsls r3, r3, #2
8005a46: 4413 add r3, r2
8005a48: 009b lsls r3, r3, #2
8005a4a: 3310 adds r3, #16
8005a4c: 687a ldr r2, [r7, #4]
8005a4e: 4413 add r3, r2
8005a50: 3304 adds r3, #4
8005a52: e00b b.n 8005a6c <USBD_StdEPReq+0x24c>
&pdev->ep_out[ep_addr & 0x7FU];
8005a54: 7bbb ldrb r3, [r7, #14]
8005a56: f003 027f and.w r2, r3, #127 ; 0x7f
pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \
8005a5a: 4613 mov r3, r2
8005a5c: 009b lsls r3, r3, #2
8005a5e: 4413 add r3, r2
8005a60: 009b lsls r3, r3, #2
8005a62: f503 73a8 add.w r3, r3, #336 ; 0x150
8005a66: 687a ldr r2, [r7, #4]
8005a68: 4413 add r3, r2
8005a6a: 3304 adds r3, #4
8005a6c: 60bb str r3, [r7, #8]
if ((ep_addr == 0x00U) || (ep_addr == 0x80U))
8005a6e: 7bbb ldrb r3, [r7, #14]
8005a70: 2b00 cmp r3, #0
8005a72: d002 beq.n 8005a7a <USBD_StdEPReq+0x25a>
8005a74: 7bbb ldrb r3, [r7, #14]
8005a76: 2b80 cmp r3, #128 ; 0x80
8005a78: d103 bne.n 8005a82 <USBD_StdEPReq+0x262>
{
pep->status = 0x0000U;
8005a7a: 68bb ldr r3, [r7, #8]
8005a7c: 2200 movs r2, #0
8005a7e: 601a str r2, [r3, #0]
8005a80: e00e b.n 8005aa0 <USBD_StdEPReq+0x280>
}
else if (USBD_LL_IsStallEP(pdev, ep_addr))
8005a82: 7bbb ldrb r3, [r7, #14]
8005a84: 4619 mov r1, r3
8005a86: 6878 ldr r0, [r7, #4]
8005a88: f000 ffda bl 8006a40 <USBD_LL_IsStallEP>
8005a8c: 4603 mov r3, r0
8005a8e: 2b00 cmp r3, #0
8005a90: d003 beq.n 8005a9a <USBD_StdEPReq+0x27a>
{
pep->status = 0x0001U;
8005a92: 68bb ldr r3, [r7, #8]
8005a94: 2201 movs r2, #1
8005a96: 601a str r2, [r3, #0]
8005a98: e002 b.n 8005aa0 <USBD_StdEPReq+0x280>
}
else
{
pep->status = 0x0000U;
8005a9a: 68bb ldr r3, [r7, #8]
8005a9c: 2200 movs r2, #0
8005a9e: 601a str r2, [r3, #0]
}
USBD_CtlSendData(pdev, (uint8_t *)(void *)&pep->status, 2U);
8005aa0: 68bb ldr r3, [r7, #8]
8005aa2: 2202 movs r2, #2
8005aa4: 4619 mov r1, r3
8005aa6: 6878 ldr r0, [r7, #4]
8005aa8: f000 fb92 bl 80061d0 <USBD_CtlSendData>
break;
8005aac: e004 b.n 8005ab8 <USBD_StdEPReq+0x298>
default:
USBD_CtlError(pdev, req);
8005aae: 6839 ldr r1, [r7, #0]
8005ab0: 6878 ldr r0, [r7, #4]
8005ab2: f000 fb23 bl 80060fc <USBD_CtlError>
break;
8005ab6: bf00 nop
}
break;
8005ab8: e004 b.n 8005ac4 <USBD_StdEPReq+0x2a4>
default:
USBD_CtlError(pdev, req);
8005aba: 6839 ldr r1, [r7, #0]
8005abc: 6878 ldr r0, [r7, #4]
8005abe: f000 fb1d bl 80060fc <USBD_CtlError>
break;
8005ac2: bf00 nop
}
break;
8005ac4: e004 b.n 8005ad0 <USBD_StdEPReq+0x2b0>
default:
USBD_CtlError(pdev, req);
8005ac6: 6839 ldr r1, [r7, #0]
8005ac8: 6878 ldr r0, [r7, #4]
8005aca: f000 fb17 bl 80060fc <USBD_CtlError>
break;
8005ace: bf00 nop
}
return ret;
8005ad0: 7bfb ldrb r3, [r7, #15]
}
8005ad2: 4618 mov r0, r3
8005ad4: 3710 adds r7, #16
8005ad6: 46bd mov sp, r7
8005ad8: bd80 pop {r7, pc}
...
08005adc <USBD_GetDescriptor>:
* @param req: usb request
* @retval status
*/
static void USBD_GetDescriptor(USBD_HandleTypeDef *pdev,
USBD_SetupReqTypedef *req)
{
8005adc: b580 push {r7, lr}
8005ade: b084 sub sp, #16
8005ae0: af00 add r7, sp, #0
8005ae2: 6078 str r0, [r7, #4]
8005ae4: 6039 str r1, [r7, #0]
uint16_t len = 0U;
8005ae6: 2300 movs r3, #0
8005ae8: 813b strh r3, [r7, #8]
uint8_t *pbuf = NULL;
8005aea: 2300 movs r3, #0
8005aec: 60fb str r3, [r7, #12]
uint8_t err = 0U;
8005aee: 2300 movs r3, #0
8005af0: 72fb strb r3, [r7, #11]
switch (req->wValue >> 8)
8005af2: 683b ldr r3, [r7, #0]
8005af4: 885b ldrh r3, [r3, #2]
8005af6: 0a1b lsrs r3, r3, #8
8005af8: b29b uxth r3, r3
8005afa: 3b01 subs r3, #1
8005afc: 2b06 cmp r3, #6
8005afe: f200 8128 bhi.w 8005d52 <USBD_GetDescriptor+0x276>
8005b02: a201 add r2, pc, #4 ; (adr r2, 8005b08 <USBD_GetDescriptor+0x2c>)
8005b04: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8005b08: 08005b25 .word 0x08005b25
8005b0c: 08005b3d .word 0x08005b3d
8005b10: 08005b7d .word 0x08005b7d
8005b14: 08005d53 .word 0x08005d53
8005b18: 08005d53 .word 0x08005d53
8005b1c: 08005cf3 .word 0x08005cf3
8005b20: 08005d1f .word 0x08005d1f
err++;
}
break;
#endif
case USB_DESC_TYPE_DEVICE:
pbuf = pdev->pDesc->GetDeviceDescriptor(pdev->dev_speed, &len);
8005b24: 687b ldr r3, [r7, #4]
8005b26: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0
8005b2a: 681b ldr r3, [r3, #0]
8005b2c: 687a ldr r2, [r7, #4]
8005b2e: 7c12 ldrb r2, [r2, #16]
8005b30: f107 0108 add.w r1, r7, #8
8005b34: 4610 mov r0, r2
8005b36: 4798 blx r3
8005b38: 60f8 str r0, [r7, #12]
break;
8005b3a: e112 b.n 8005d62 <USBD_GetDescriptor+0x286>
case USB_DESC_TYPE_CONFIGURATION:
if (pdev->dev_speed == USBD_SPEED_HIGH)
8005b3c: 687b ldr r3, [r7, #4]
8005b3e: 7c1b ldrb r3, [r3, #16]
8005b40: 2b00 cmp r3, #0
8005b42: d10d bne.n 8005b60 <USBD_GetDescriptor+0x84>
{
pbuf = pdev->pClass->GetHSConfigDescriptor(&len);
8005b44: 687b ldr r3, [r7, #4]
8005b46: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
8005b4a: 6a9b ldr r3, [r3, #40] ; 0x28
8005b4c: f107 0208 add.w r2, r7, #8
8005b50: 4610 mov r0, r2
8005b52: 4798 blx r3
8005b54: 60f8 str r0, [r7, #12]
pbuf[1] = USB_DESC_TYPE_CONFIGURATION;
8005b56: 68fb ldr r3, [r7, #12]
8005b58: 3301 adds r3, #1
8005b5a: 2202 movs r2, #2
8005b5c: 701a strb r2, [r3, #0]
else
{
pbuf = pdev->pClass->GetFSConfigDescriptor(&len);
pbuf[1] = USB_DESC_TYPE_CONFIGURATION;
}
break;
8005b5e: e100 b.n 8005d62 <USBD_GetDescriptor+0x286>
pbuf = pdev->pClass->GetFSConfigDescriptor(&len);
8005b60: 687b ldr r3, [r7, #4]
8005b62: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
8005b66: 6adb ldr r3, [r3, #44] ; 0x2c
8005b68: f107 0208 add.w r2, r7, #8
8005b6c: 4610 mov r0, r2
8005b6e: 4798 blx r3
8005b70: 60f8 str r0, [r7, #12]
pbuf[1] = USB_DESC_TYPE_CONFIGURATION;
8005b72: 68fb ldr r3, [r7, #12]
8005b74: 3301 adds r3, #1
8005b76: 2202 movs r2, #2
8005b78: 701a strb r2, [r3, #0]
break;
8005b7a: e0f2 b.n 8005d62 <USBD_GetDescriptor+0x286>
case USB_DESC_TYPE_STRING:
switch ((uint8_t)(req->wValue))
8005b7c: 683b ldr r3, [r7, #0]
8005b7e: 885b ldrh r3, [r3, #2]
8005b80: b2db uxtb r3, r3
8005b82: 2b05 cmp r3, #5
8005b84: f200 80ac bhi.w 8005ce0 <USBD_GetDescriptor+0x204>
8005b88: a201 add r2, pc, #4 ; (adr r2, 8005b90 <USBD_GetDescriptor+0xb4>)
8005b8a: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8005b8e: bf00 nop
8005b90: 08005ba9 .word 0x08005ba9
8005b94: 08005bdd .word 0x08005bdd
8005b98: 08005c11 .word 0x08005c11
8005b9c: 08005c45 .word 0x08005c45
8005ba0: 08005c79 .word 0x08005c79
8005ba4: 08005cad .word 0x08005cad
{
case USBD_IDX_LANGID_STR:
if (pdev->pDesc->GetLangIDStrDescriptor != NULL)
8005ba8: 687b ldr r3, [r7, #4]
8005baa: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0
8005bae: 685b ldr r3, [r3, #4]
8005bb0: 2b00 cmp r3, #0
8005bb2: d00b beq.n 8005bcc <USBD_GetDescriptor+0xf0>
{
pbuf = pdev->pDesc->GetLangIDStrDescriptor(pdev->dev_speed, &len);
8005bb4: 687b ldr r3, [r7, #4]
8005bb6: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0
8005bba: 685b ldr r3, [r3, #4]
8005bbc: 687a ldr r2, [r7, #4]
8005bbe: 7c12 ldrb r2, [r2, #16]
8005bc0: f107 0108 add.w r1, r7, #8
8005bc4: 4610 mov r0, r2
8005bc6: 4798 blx r3
8005bc8: 60f8 str r0, [r7, #12]
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
8005bca: e091 b.n 8005cf0 <USBD_GetDescriptor+0x214>
USBD_CtlError(pdev, req);
8005bcc: 6839 ldr r1, [r7, #0]
8005bce: 6878 ldr r0, [r7, #4]
8005bd0: f000 fa94 bl 80060fc <USBD_CtlError>
err++;
8005bd4: 7afb ldrb r3, [r7, #11]
8005bd6: 3301 adds r3, #1
8005bd8: 72fb strb r3, [r7, #11]
break;
8005bda: e089 b.n 8005cf0 <USBD_GetDescriptor+0x214>
case USBD_IDX_MFC_STR:
if (pdev->pDesc->GetManufacturerStrDescriptor != NULL)
8005bdc: 687b ldr r3, [r7, #4]
8005bde: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0
8005be2: 689b ldr r3, [r3, #8]
8005be4: 2b00 cmp r3, #0
8005be6: d00b beq.n 8005c00 <USBD_GetDescriptor+0x124>
{
pbuf = pdev->pDesc->GetManufacturerStrDescriptor(pdev->dev_speed, &len);
8005be8: 687b ldr r3, [r7, #4]
8005bea: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0
8005bee: 689b ldr r3, [r3, #8]
8005bf0: 687a ldr r2, [r7, #4]
8005bf2: 7c12 ldrb r2, [r2, #16]
8005bf4: f107 0108 add.w r1, r7, #8
8005bf8: 4610 mov r0, r2
8005bfa: 4798 blx r3
8005bfc: 60f8 str r0, [r7, #12]
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
8005bfe: e077 b.n 8005cf0 <USBD_GetDescriptor+0x214>
USBD_CtlError(pdev, req);
8005c00: 6839 ldr r1, [r7, #0]
8005c02: 6878 ldr r0, [r7, #4]
8005c04: f000 fa7a bl 80060fc <USBD_CtlError>
err++;
8005c08: 7afb ldrb r3, [r7, #11]
8005c0a: 3301 adds r3, #1
8005c0c: 72fb strb r3, [r7, #11]
break;
8005c0e: e06f b.n 8005cf0 <USBD_GetDescriptor+0x214>
case USBD_IDX_PRODUCT_STR:
if (pdev->pDesc->GetProductStrDescriptor != NULL)
8005c10: 687b ldr r3, [r7, #4]
8005c12: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0
8005c16: 68db ldr r3, [r3, #12]
8005c18: 2b00 cmp r3, #0
8005c1a: d00b beq.n 8005c34 <USBD_GetDescriptor+0x158>
{
pbuf = pdev->pDesc->GetProductStrDescriptor(pdev->dev_speed, &len);
8005c1c: 687b ldr r3, [r7, #4]
8005c1e: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0
8005c22: 68db ldr r3, [r3, #12]
8005c24: 687a ldr r2, [r7, #4]
8005c26: 7c12 ldrb r2, [r2, #16]
8005c28: f107 0108 add.w r1, r7, #8
8005c2c: 4610 mov r0, r2
8005c2e: 4798 blx r3
8005c30: 60f8 str r0, [r7, #12]
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
8005c32: e05d b.n 8005cf0 <USBD_GetDescriptor+0x214>
USBD_CtlError(pdev, req);
8005c34: 6839 ldr r1, [r7, #0]
8005c36: 6878 ldr r0, [r7, #4]
8005c38: f000 fa60 bl 80060fc <USBD_CtlError>
err++;
8005c3c: 7afb ldrb r3, [r7, #11]
8005c3e: 3301 adds r3, #1
8005c40: 72fb strb r3, [r7, #11]
break;
8005c42: e055 b.n 8005cf0 <USBD_GetDescriptor+0x214>
case USBD_IDX_SERIAL_STR:
if (pdev->pDesc->GetSerialStrDescriptor != NULL)
8005c44: 687b ldr r3, [r7, #4]
8005c46: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0
8005c4a: 691b ldr r3, [r3, #16]
8005c4c: 2b00 cmp r3, #0
8005c4e: d00b beq.n 8005c68 <USBD_GetDescriptor+0x18c>
{
pbuf = pdev->pDesc->GetSerialStrDescriptor(pdev->dev_speed, &len);
8005c50: 687b ldr r3, [r7, #4]
8005c52: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0
8005c56: 691b ldr r3, [r3, #16]
8005c58: 687a ldr r2, [r7, #4]
8005c5a: 7c12 ldrb r2, [r2, #16]
8005c5c: f107 0108 add.w r1, r7, #8
8005c60: 4610 mov r0, r2
8005c62: 4798 blx r3
8005c64: 60f8 str r0, [r7, #12]
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
8005c66: e043 b.n 8005cf0 <USBD_GetDescriptor+0x214>
USBD_CtlError(pdev, req);
8005c68: 6839 ldr r1, [r7, #0]
8005c6a: 6878 ldr r0, [r7, #4]
8005c6c: f000 fa46 bl 80060fc <USBD_CtlError>
err++;
8005c70: 7afb ldrb r3, [r7, #11]
8005c72: 3301 adds r3, #1
8005c74: 72fb strb r3, [r7, #11]
break;
8005c76: e03b b.n 8005cf0 <USBD_GetDescriptor+0x214>
case USBD_IDX_CONFIG_STR:
if (pdev->pDesc->GetConfigurationStrDescriptor != NULL)
8005c78: 687b ldr r3, [r7, #4]
8005c7a: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0
8005c7e: 695b ldr r3, [r3, #20]
8005c80: 2b00 cmp r3, #0
8005c82: d00b beq.n 8005c9c <USBD_GetDescriptor+0x1c0>
{
pbuf = pdev->pDesc->GetConfigurationStrDescriptor(pdev->dev_speed, &len);
8005c84: 687b ldr r3, [r7, #4]
8005c86: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0
8005c8a: 695b ldr r3, [r3, #20]
8005c8c: 687a ldr r2, [r7, #4]
8005c8e: 7c12 ldrb r2, [r2, #16]
8005c90: f107 0108 add.w r1, r7, #8
8005c94: 4610 mov r0, r2
8005c96: 4798 blx r3
8005c98: 60f8 str r0, [r7, #12]
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
8005c9a: e029 b.n 8005cf0 <USBD_GetDescriptor+0x214>
USBD_CtlError(pdev, req);
8005c9c: 6839 ldr r1, [r7, #0]
8005c9e: 6878 ldr r0, [r7, #4]
8005ca0: f000 fa2c bl 80060fc <USBD_CtlError>
err++;
8005ca4: 7afb ldrb r3, [r7, #11]
8005ca6: 3301 adds r3, #1
8005ca8: 72fb strb r3, [r7, #11]
break;
8005caa: e021 b.n 8005cf0 <USBD_GetDescriptor+0x214>
case USBD_IDX_INTERFACE_STR:
if (pdev->pDesc->GetInterfaceStrDescriptor != NULL)
8005cac: 687b ldr r3, [r7, #4]
8005cae: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0
8005cb2: 699b ldr r3, [r3, #24]
8005cb4: 2b00 cmp r3, #0
8005cb6: d00b beq.n 8005cd0 <USBD_GetDescriptor+0x1f4>
{
pbuf = pdev->pDesc->GetInterfaceStrDescriptor(pdev->dev_speed, &len);
8005cb8: 687b ldr r3, [r7, #4]
8005cba: f8d3 32b0 ldr.w r3, [r3, #688] ; 0x2b0
8005cbe: 699b ldr r3, [r3, #24]
8005cc0: 687a ldr r2, [r7, #4]
8005cc2: 7c12 ldrb r2, [r2, #16]
8005cc4: f107 0108 add.w r1, r7, #8
8005cc8: 4610 mov r0, r2
8005cca: 4798 blx r3
8005ccc: 60f8 str r0, [r7, #12]
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
8005cce: e00f b.n 8005cf0 <USBD_GetDescriptor+0x214>
USBD_CtlError(pdev, req);
8005cd0: 6839 ldr r1, [r7, #0]
8005cd2: 6878 ldr r0, [r7, #4]
8005cd4: f000 fa12 bl 80060fc <USBD_CtlError>
err++;
8005cd8: 7afb ldrb r3, [r7, #11]
8005cda: 3301 adds r3, #1
8005cdc: 72fb strb r3, [r7, #11]
break;
8005cde: e007 b.n 8005cf0 <USBD_GetDescriptor+0x214>
USBD_CtlError(pdev, req);
err++;
}
break;
#else
USBD_CtlError(pdev, req);
8005ce0: 6839 ldr r1, [r7, #0]
8005ce2: 6878 ldr r0, [r7, #4]
8005ce4: f000 fa0a bl 80060fc <USBD_CtlError>
err++;
8005ce8: 7afb ldrb r3, [r7, #11]
8005cea: 3301 adds r3, #1
8005cec: 72fb strb r3, [r7, #11]
#endif
}
break;
8005cee: e038 b.n 8005d62 <USBD_GetDescriptor+0x286>
8005cf0: e037 b.n 8005d62 <USBD_GetDescriptor+0x286>
case USB_DESC_TYPE_DEVICE_QUALIFIER:
if (pdev->dev_speed == USBD_SPEED_HIGH)
8005cf2: 687b ldr r3, [r7, #4]
8005cf4: 7c1b ldrb r3, [r3, #16]
8005cf6: 2b00 cmp r3, #0
8005cf8: d109 bne.n 8005d0e <USBD_GetDescriptor+0x232>
{
pbuf = pdev->pClass->GetDeviceQualifierDescriptor(&len);
8005cfa: 687b ldr r3, [r7, #4]
8005cfc: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
8005d00: 6b5b ldr r3, [r3, #52] ; 0x34
8005d02: f107 0208 add.w r2, r7, #8
8005d06: 4610 mov r0, r2
8005d08: 4798 blx r3
8005d0a: 60f8 str r0, [r7, #12]
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
8005d0c: e029 b.n 8005d62 <USBD_GetDescriptor+0x286>
USBD_CtlError(pdev, req);
8005d0e: 6839 ldr r1, [r7, #0]
8005d10: 6878 ldr r0, [r7, #4]
8005d12: f000 f9f3 bl 80060fc <USBD_CtlError>
err++;
8005d16: 7afb ldrb r3, [r7, #11]
8005d18: 3301 adds r3, #1
8005d1a: 72fb strb r3, [r7, #11]
break;
8005d1c: e021 b.n 8005d62 <USBD_GetDescriptor+0x286>
case USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION:
if (pdev->dev_speed == USBD_SPEED_HIGH)
8005d1e: 687b ldr r3, [r7, #4]
8005d20: 7c1b ldrb r3, [r3, #16]
8005d22: 2b00 cmp r3, #0
8005d24: d10d bne.n 8005d42 <USBD_GetDescriptor+0x266>
{
pbuf = pdev->pClass->GetOtherSpeedConfigDescriptor(&len);
8005d26: 687b ldr r3, [r7, #4]
8005d28: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
8005d2c: 6b1b ldr r3, [r3, #48] ; 0x30
8005d2e: f107 0208 add.w r2, r7, #8
8005d32: 4610 mov r0, r2
8005d34: 4798 blx r3
8005d36: 60f8 str r0, [r7, #12]
pbuf[1] = USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION;
8005d38: 68fb ldr r3, [r7, #12]
8005d3a: 3301 adds r3, #1
8005d3c: 2207 movs r2, #7
8005d3e: 701a strb r2, [r3, #0]
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
8005d40: e00f b.n 8005d62 <USBD_GetDescriptor+0x286>
USBD_CtlError(pdev, req);
8005d42: 6839 ldr r1, [r7, #0]
8005d44: 6878 ldr r0, [r7, #4]
8005d46: f000 f9d9 bl 80060fc <USBD_CtlError>
err++;
8005d4a: 7afb ldrb r3, [r7, #11]
8005d4c: 3301 adds r3, #1
8005d4e: 72fb strb r3, [r7, #11]
break;
8005d50: e007 b.n 8005d62 <USBD_GetDescriptor+0x286>
default:
USBD_CtlError(pdev, req);
8005d52: 6839 ldr r1, [r7, #0]
8005d54: 6878 ldr r0, [r7, #4]
8005d56: f000 f9d1 bl 80060fc <USBD_CtlError>
err++;
8005d5a: 7afb ldrb r3, [r7, #11]
8005d5c: 3301 adds r3, #1
8005d5e: 72fb strb r3, [r7, #11]
break;
8005d60: bf00 nop
}
if (err != 0U)
8005d62: 7afb ldrb r3, [r7, #11]
8005d64: 2b00 cmp r3, #0
8005d66: d11c bne.n 8005da2 <USBD_GetDescriptor+0x2c6>
{
return;
}
else
{
if ((len != 0U) && (req->wLength != 0U))
8005d68: 893b ldrh r3, [r7, #8]
8005d6a: 2b00 cmp r3, #0
8005d6c: d011 beq.n 8005d92 <USBD_GetDescriptor+0x2b6>
8005d6e: 683b ldr r3, [r7, #0]
8005d70: 88db ldrh r3, [r3, #6]
8005d72: 2b00 cmp r3, #0
8005d74: d00d beq.n 8005d92 <USBD_GetDescriptor+0x2b6>
{
len = MIN(len, req->wLength);
8005d76: 683b ldr r3, [r7, #0]
8005d78: 88da ldrh r2, [r3, #6]
8005d7a: 893b ldrh r3, [r7, #8]
8005d7c: 4293 cmp r3, r2
8005d7e: bf28 it cs
8005d80: 4613 movcs r3, r2
8005d82: b29b uxth r3, r3
8005d84: 813b strh r3, [r7, #8]
(void)USBD_CtlSendData(pdev, pbuf, len);
8005d86: 893b ldrh r3, [r7, #8]
8005d88: 461a mov r2, r3
8005d8a: 68f9 ldr r1, [r7, #12]
8005d8c: 6878 ldr r0, [r7, #4]
8005d8e: f000 fa1f bl 80061d0 <USBD_CtlSendData>
}
if (req->wLength == 0U)
8005d92: 683b ldr r3, [r7, #0]
8005d94: 88db ldrh r3, [r3, #6]
8005d96: 2b00 cmp r3, #0
8005d98: d104 bne.n 8005da4 <USBD_GetDescriptor+0x2c8>
{
(void)USBD_CtlSendStatus(pdev);
8005d9a: 6878 ldr r0, [r7, #4]
8005d9c: f000 fa76 bl 800628c <USBD_CtlSendStatus>
8005da0: e000 b.n 8005da4 <USBD_GetDescriptor+0x2c8>
return;
8005da2: bf00 nop
}
}
}
8005da4: 3710 adds r7, #16
8005da6: 46bd mov sp, r7
8005da8: bd80 pop {r7, pc}
8005daa: bf00 nop
08005dac <USBD_SetAddress>:
* @param req: usb request
* @retval status
*/
static void USBD_SetAddress(USBD_HandleTypeDef *pdev,
USBD_SetupReqTypedef *req)
{
8005dac: b580 push {r7, lr}
8005dae: b084 sub sp, #16
8005db0: af00 add r7, sp, #0
8005db2: 6078 str r0, [r7, #4]
8005db4: 6039 str r1, [r7, #0]
uint8_t dev_addr;
if ((req->wIndex == 0U) && (req->wLength == 0U) && (req->wValue < 128U))
8005db6: 683b ldr r3, [r7, #0]
8005db8: 889b ldrh r3, [r3, #4]
8005dba: 2b00 cmp r3, #0
8005dbc: d130 bne.n 8005e20 <USBD_SetAddress+0x74>
8005dbe: 683b ldr r3, [r7, #0]
8005dc0: 88db ldrh r3, [r3, #6]
8005dc2: 2b00 cmp r3, #0
8005dc4: d12c bne.n 8005e20 <USBD_SetAddress+0x74>
8005dc6: 683b ldr r3, [r7, #0]
8005dc8: 885b ldrh r3, [r3, #2]
8005dca: 2b7f cmp r3, #127 ; 0x7f
8005dcc: d828 bhi.n 8005e20 <USBD_SetAddress+0x74>
{
dev_addr = (uint8_t)(req->wValue) & 0x7FU;
8005dce: 683b ldr r3, [r7, #0]
8005dd0: 885b ldrh r3, [r3, #2]
8005dd2: b2db uxtb r3, r3
8005dd4: f003 037f and.w r3, r3, #127 ; 0x7f
8005dd8: 73fb strb r3, [r7, #15]
if (pdev->dev_state == USBD_STATE_CONFIGURED)
8005dda: 687b ldr r3, [r7, #4]
8005ddc: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
8005de0: 2b03 cmp r3, #3
8005de2: d104 bne.n 8005dee <USBD_SetAddress+0x42>
{
USBD_CtlError(pdev, req);
8005de4: 6839 ldr r1, [r7, #0]
8005de6: 6878 ldr r0, [r7, #4]
8005de8: f000 f988 bl 80060fc <USBD_CtlError>
if (pdev->dev_state == USBD_STATE_CONFIGURED)
8005dec: e01c b.n 8005e28 <USBD_SetAddress+0x7c>
}
else
{
pdev->dev_address = dev_addr;
8005dee: 687b ldr r3, [r7, #4]
8005df0: 7bfa ldrb r2, [r7, #15]
8005df2: f883 229e strb.w r2, [r3, #670] ; 0x29e
USBD_LL_SetUSBAddress(pdev, dev_addr);
8005df6: 7bfb ldrb r3, [r7, #15]
8005df8: 4619 mov r1, r3
8005dfa: 6878 ldr r0, [r7, #4]
8005dfc: f000 fe4c bl 8006a98 <USBD_LL_SetUSBAddress>
USBD_CtlSendStatus(pdev);
8005e00: 6878 ldr r0, [r7, #4]
8005e02: f000 fa43 bl 800628c <USBD_CtlSendStatus>
if (dev_addr != 0U)
8005e06: 7bfb ldrb r3, [r7, #15]
8005e08: 2b00 cmp r3, #0
8005e0a: d004 beq.n 8005e16 <USBD_SetAddress+0x6a>
{
pdev->dev_state = USBD_STATE_ADDRESSED;
8005e0c: 687b ldr r3, [r7, #4]
8005e0e: 2202 movs r2, #2
8005e10: f883 229c strb.w r2, [r3, #668] ; 0x29c
if (pdev->dev_state == USBD_STATE_CONFIGURED)
8005e14: e008 b.n 8005e28 <USBD_SetAddress+0x7c>
}
else
{
pdev->dev_state = USBD_STATE_DEFAULT;
8005e16: 687b ldr r3, [r7, #4]
8005e18: 2201 movs r2, #1
8005e1a: f883 229c strb.w r2, [r3, #668] ; 0x29c
if (pdev->dev_state == USBD_STATE_CONFIGURED)
8005e1e: e003 b.n 8005e28 <USBD_SetAddress+0x7c>
}
}
}
else
{
USBD_CtlError(pdev, req);
8005e20: 6839 ldr r1, [r7, #0]
8005e22: 6878 ldr r0, [r7, #4]
8005e24: f000 f96a bl 80060fc <USBD_CtlError>
}
}
8005e28: bf00 nop
8005e2a: 3710 adds r7, #16
8005e2c: 46bd mov sp, r7
8005e2e: bd80 pop {r7, pc}
08005e30 <USBD_SetConfig>:
* @param pdev: device instance
* @param req: usb request
* @retval status
*/
static void USBD_SetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
{
8005e30: b580 push {r7, lr}
8005e32: b082 sub sp, #8
8005e34: af00 add r7, sp, #0
8005e36: 6078 str r0, [r7, #4]
8005e38: 6039 str r1, [r7, #0]
static uint8_t cfgidx;
cfgidx = (uint8_t)(req->wValue);
8005e3a: 683b ldr r3, [r7, #0]
8005e3c: 885b ldrh r3, [r3, #2]
8005e3e: b2da uxtb r2, r3
8005e40: 4b41 ldr r3, [pc, #260] ; (8005f48 <USBD_SetConfig+0x118>)
8005e42: 701a strb r2, [r3, #0]
if (cfgidx > USBD_MAX_NUM_CONFIGURATION)
8005e44: 4b40 ldr r3, [pc, #256] ; (8005f48 <USBD_SetConfig+0x118>)
8005e46: 781b ldrb r3, [r3, #0]
8005e48: 2b01 cmp r3, #1
8005e4a: d904 bls.n 8005e56 <USBD_SetConfig+0x26>
{
USBD_CtlError(pdev, req);
8005e4c: 6839 ldr r1, [r7, #0]
8005e4e: 6878 ldr r0, [r7, #4]
8005e50: f000 f954 bl 80060fc <USBD_CtlError>
8005e54: e075 b.n 8005f42 <USBD_SetConfig+0x112>
}
else
{
switch (pdev->dev_state)
8005e56: 687b ldr r3, [r7, #4]
8005e58: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
8005e5c: 2b02 cmp r3, #2
8005e5e: d002 beq.n 8005e66 <USBD_SetConfig+0x36>
8005e60: 2b03 cmp r3, #3
8005e62: d023 beq.n 8005eac <USBD_SetConfig+0x7c>
8005e64: e062 b.n 8005f2c <USBD_SetConfig+0xfc>
{
case USBD_STATE_ADDRESSED:
if (cfgidx)
8005e66: 4b38 ldr r3, [pc, #224] ; (8005f48 <USBD_SetConfig+0x118>)
8005e68: 781b ldrb r3, [r3, #0]
8005e6a: 2b00 cmp r3, #0
8005e6c: d01a beq.n 8005ea4 <USBD_SetConfig+0x74>
{
pdev->dev_config = cfgidx;
8005e6e: 4b36 ldr r3, [pc, #216] ; (8005f48 <USBD_SetConfig+0x118>)
8005e70: 781b ldrb r3, [r3, #0]
8005e72: 461a mov r2, r3
8005e74: 687b ldr r3, [r7, #4]
8005e76: 605a str r2, [r3, #4]
pdev->dev_state = USBD_STATE_CONFIGURED;
8005e78: 687b ldr r3, [r7, #4]
8005e7a: 2203 movs r2, #3
8005e7c: f883 229c strb.w r2, [r3, #668] ; 0x29c
if (USBD_SetClassConfig(pdev, cfgidx) == USBD_FAIL)
8005e80: 4b31 ldr r3, [pc, #196] ; (8005f48 <USBD_SetConfig+0x118>)
8005e82: 781b ldrb r3, [r3, #0]
8005e84: 4619 mov r1, r3
8005e86: 6878 ldr r0, [r7, #4]
8005e88: f7ff f9f3 bl 8005272 <USBD_SetClassConfig>
8005e8c: 4603 mov r3, r0
8005e8e: 2b02 cmp r3, #2
8005e90: d104 bne.n 8005e9c <USBD_SetConfig+0x6c>
{
USBD_CtlError(pdev, req);
8005e92: 6839 ldr r1, [r7, #0]
8005e94: 6878 ldr r0, [r7, #4]
8005e96: f000 f931 bl 80060fc <USBD_CtlError>
return;
8005e9a: e052 b.n 8005f42 <USBD_SetConfig+0x112>
}
USBD_CtlSendStatus(pdev);
8005e9c: 6878 ldr r0, [r7, #4]
8005e9e: f000 f9f5 bl 800628c <USBD_CtlSendStatus>
}
else
{
USBD_CtlSendStatus(pdev);
}
break;
8005ea2: e04e b.n 8005f42 <USBD_SetConfig+0x112>
USBD_CtlSendStatus(pdev);
8005ea4: 6878 ldr r0, [r7, #4]
8005ea6: f000 f9f1 bl 800628c <USBD_CtlSendStatus>
break;
8005eaa: e04a b.n 8005f42 <USBD_SetConfig+0x112>
case USBD_STATE_CONFIGURED:
if (cfgidx == 0U)
8005eac: 4b26 ldr r3, [pc, #152] ; (8005f48 <USBD_SetConfig+0x118>)
8005eae: 781b ldrb r3, [r3, #0]
8005eb0: 2b00 cmp r3, #0
8005eb2: d112 bne.n 8005eda <USBD_SetConfig+0xaa>
{
pdev->dev_state = USBD_STATE_ADDRESSED;
8005eb4: 687b ldr r3, [r7, #4]
8005eb6: 2202 movs r2, #2
8005eb8: f883 229c strb.w r2, [r3, #668] ; 0x29c
pdev->dev_config = cfgidx;
8005ebc: 4b22 ldr r3, [pc, #136] ; (8005f48 <USBD_SetConfig+0x118>)
8005ebe: 781b ldrb r3, [r3, #0]
8005ec0: 461a mov r2, r3
8005ec2: 687b ldr r3, [r7, #4]
8005ec4: 605a str r2, [r3, #4]
USBD_ClrClassConfig(pdev, cfgidx);
8005ec6: 4b20 ldr r3, [pc, #128] ; (8005f48 <USBD_SetConfig+0x118>)
8005ec8: 781b ldrb r3, [r3, #0]
8005eca: 4619 mov r1, r3
8005ecc: 6878 ldr r0, [r7, #4]
8005ece: f7ff f9ef bl 80052b0 <USBD_ClrClassConfig>
USBD_CtlSendStatus(pdev);
8005ed2: 6878 ldr r0, [r7, #4]
8005ed4: f000 f9da bl 800628c <USBD_CtlSendStatus>
}
else
{
USBD_CtlSendStatus(pdev);
}
break;
8005ed8: e033 b.n 8005f42 <USBD_SetConfig+0x112>
else if (cfgidx != pdev->dev_config)
8005eda: 4b1b ldr r3, [pc, #108] ; (8005f48 <USBD_SetConfig+0x118>)
8005edc: 781b ldrb r3, [r3, #0]
8005ede: 461a mov r2, r3
8005ee0: 687b ldr r3, [r7, #4]
8005ee2: 685b ldr r3, [r3, #4]
8005ee4: 429a cmp r2, r3
8005ee6: d01d beq.n 8005f24 <USBD_SetConfig+0xf4>
USBD_ClrClassConfig(pdev, (uint8_t)pdev->dev_config);
8005ee8: 687b ldr r3, [r7, #4]
8005eea: 685b ldr r3, [r3, #4]
8005eec: b2db uxtb r3, r3
8005eee: 4619 mov r1, r3
8005ef0: 6878 ldr r0, [r7, #4]
8005ef2: f7ff f9dd bl 80052b0 <USBD_ClrClassConfig>
pdev->dev_config = cfgidx;
8005ef6: 4b14 ldr r3, [pc, #80] ; (8005f48 <USBD_SetConfig+0x118>)
8005ef8: 781b ldrb r3, [r3, #0]
8005efa: 461a mov r2, r3
8005efc: 687b ldr r3, [r7, #4]
8005efe: 605a str r2, [r3, #4]
if (USBD_SetClassConfig(pdev, cfgidx) == USBD_FAIL)
8005f00: 4b11 ldr r3, [pc, #68] ; (8005f48 <USBD_SetConfig+0x118>)
8005f02: 781b ldrb r3, [r3, #0]
8005f04: 4619 mov r1, r3
8005f06: 6878 ldr r0, [r7, #4]
8005f08: f7ff f9b3 bl 8005272 <USBD_SetClassConfig>
8005f0c: 4603 mov r3, r0
8005f0e: 2b02 cmp r3, #2
8005f10: d104 bne.n 8005f1c <USBD_SetConfig+0xec>
USBD_CtlError(pdev, req);
8005f12: 6839 ldr r1, [r7, #0]
8005f14: 6878 ldr r0, [r7, #4]
8005f16: f000 f8f1 bl 80060fc <USBD_CtlError>
return;
8005f1a: e012 b.n 8005f42 <USBD_SetConfig+0x112>
USBD_CtlSendStatus(pdev);
8005f1c: 6878 ldr r0, [r7, #4]
8005f1e: f000 f9b5 bl 800628c <USBD_CtlSendStatus>
break;
8005f22: e00e b.n 8005f42 <USBD_SetConfig+0x112>
USBD_CtlSendStatus(pdev);
8005f24: 6878 ldr r0, [r7, #4]
8005f26: f000 f9b1 bl 800628c <USBD_CtlSendStatus>
break;
8005f2a: e00a b.n 8005f42 <USBD_SetConfig+0x112>
default:
USBD_CtlError(pdev, req);
8005f2c: 6839 ldr r1, [r7, #0]
8005f2e: 6878 ldr r0, [r7, #4]
8005f30: f000 f8e4 bl 80060fc <USBD_CtlError>
USBD_ClrClassConfig(pdev, cfgidx);
8005f34: 4b04 ldr r3, [pc, #16] ; (8005f48 <USBD_SetConfig+0x118>)
8005f36: 781b ldrb r3, [r3, #0]
8005f38: 4619 mov r1, r3
8005f3a: 6878 ldr r0, [r7, #4]
8005f3c: f7ff f9b8 bl 80052b0 <USBD_ClrClassConfig>
break;
8005f40: bf00 nop
}
}
}
8005f42: 3708 adds r7, #8
8005f44: 46bd mov sp, r7
8005f46: bd80 pop {r7, pc}
8005f48: 20000198 .word 0x20000198
08005f4c <USBD_GetConfig>:
* @param pdev: device instance
* @param req: usb request
* @retval status
*/
static void USBD_GetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
{
8005f4c: b580 push {r7, lr}
8005f4e: b082 sub sp, #8
8005f50: af00 add r7, sp, #0
8005f52: 6078 str r0, [r7, #4]
8005f54: 6039 str r1, [r7, #0]
if (req->wLength != 1U)
8005f56: 683b ldr r3, [r7, #0]
8005f58: 88db ldrh r3, [r3, #6]
8005f5a: 2b01 cmp r3, #1
8005f5c: d004 beq.n 8005f68 <USBD_GetConfig+0x1c>
{
USBD_CtlError(pdev, req);
8005f5e: 6839 ldr r1, [r7, #0]
8005f60: 6878 ldr r0, [r7, #4]
8005f62: f000 f8cb bl 80060fc <USBD_CtlError>
default:
USBD_CtlError(pdev, req);
break;
}
}
}
8005f66: e021 b.n 8005fac <USBD_GetConfig+0x60>
switch (pdev->dev_state)
8005f68: 687b ldr r3, [r7, #4]
8005f6a: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
8005f6e: 2b01 cmp r3, #1
8005f70: db17 blt.n 8005fa2 <USBD_GetConfig+0x56>
8005f72: 2b02 cmp r3, #2
8005f74: dd02 ble.n 8005f7c <USBD_GetConfig+0x30>
8005f76: 2b03 cmp r3, #3
8005f78: d00b beq.n 8005f92 <USBD_GetConfig+0x46>
8005f7a: e012 b.n 8005fa2 <USBD_GetConfig+0x56>
pdev->dev_default_config = 0U;
8005f7c: 687b ldr r3, [r7, #4]
8005f7e: 2200 movs r2, #0
8005f80: 609a str r2, [r3, #8]
USBD_CtlSendData(pdev, (uint8_t *)(void *)&pdev->dev_default_config, 1U);
8005f82: 687b ldr r3, [r7, #4]
8005f84: 3308 adds r3, #8
8005f86: 2201 movs r2, #1
8005f88: 4619 mov r1, r3
8005f8a: 6878 ldr r0, [r7, #4]
8005f8c: f000 f920 bl 80061d0 <USBD_CtlSendData>
break;
8005f90: e00c b.n 8005fac <USBD_GetConfig+0x60>
USBD_CtlSendData(pdev, (uint8_t *)(void *)&pdev->dev_config, 1U);
8005f92: 687b ldr r3, [r7, #4]
8005f94: 3304 adds r3, #4
8005f96: 2201 movs r2, #1
8005f98: 4619 mov r1, r3
8005f9a: 6878 ldr r0, [r7, #4]
8005f9c: f000 f918 bl 80061d0 <USBD_CtlSendData>
break;
8005fa0: e004 b.n 8005fac <USBD_GetConfig+0x60>
USBD_CtlError(pdev, req);
8005fa2: 6839 ldr r1, [r7, #0]
8005fa4: 6878 ldr r0, [r7, #4]
8005fa6: f000 f8a9 bl 80060fc <USBD_CtlError>
break;
8005faa: bf00 nop
}
8005fac: bf00 nop
8005fae: 3708 adds r7, #8
8005fb0: 46bd mov sp, r7
8005fb2: bd80 pop {r7, pc}
08005fb4 <USBD_GetStatus>:
* @param pdev: device instance
* @param req: usb request
* @retval status
*/
static void USBD_GetStatus(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
{
8005fb4: b580 push {r7, lr}
8005fb6: b082 sub sp, #8
8005fb8: af00 add r7, sp, #0
8005fba: 6078 str r0, [r7, #4]
8005fbc: 6039 str r1, [r7, #0]
switch (pdev->dev_state)
8005fbe: 687b ldr r3, [r7, #4]
8005fc0: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
8005fc4: 3b01 subs r3, #1
8005fc6: 2b02 cmp r3, #2
8005fc8: d81e bhi.n 8006008 <USBD_GetStatus+0x54>
{
case USBD_STATE_DEFAULT:
case USBD_STATE_ADDRESSED:
case USBD_STATE_CONFIGURED:
if (req->wLength != 0x2U)
8005fca: 683b ldr r3, [r7, #0]
8005fcc: 88db ldrh r3, [r3, #6]
8005fce: 2b02 cmp r3, #2
8005fd0: d004 beq.n 8005fdc <USBD_GetStatus+0x28>
{
USBD_CtlError(pdev, req);
8005fd2: 6839 ldr r1, [r7, #0]
8005fd4: 6878 ldr r0, [r7, #4]
8005fd6: f000 f891 bl 80060fc <USBD_CtlError>
break;
8005fda: e01a b.n 8006012 <USBD_GetStatus+0x5e>
}
#if (USBD_SELF_POWERED == 1U)
pdev->dev_config_status = USB_CONFIG_SELF_POWERED;
8005fdc: 687b ldr r3, [r7, #4]
8005fde: 2201 movs r2, #1
8005fe0: 60da str r2, [r3, #12]
#else
pdev->dev_config_status = 0U;
#endif
if (pdev->dev_remote_wakeup)
8005fe2: 687b ldr r3, [r7, #4]
8005fe4: f8d3 32a4 ldr.w r3, [r3, #676] ; 0x2a4
8005fe8: 2b00 cmp r3, #0
8005fea: d005 beq.n 8005ff8 <USBD_GetStatus+0x44>
{
pdev->dev_config_status |= USB_CONFIG_REMOTE_WAKEUP;
8005fec: 687b ldr r3, [r7, #4]
8005fee: 68db ldr r3, [r3, #12]
8005ff0: f043 0202 orr.w r2, r3, #2
8005ff4: 687b ldr r3, [r7, #4]
8005ff6: 60da str r2, [r3, #12]
}
USBD_CtlSendData(pdev, (uint8_t *)(void *)&pdev->dev_config_status, 2U);
8005ff8: 687b ldr r3, [r7, #4]
8005ffa: 330c adds r3, #12
8005ffc: 2202 movs r2, #2
8005ffe: 4619 mov r1, r3
8006000: 6878 ldr r0, [r7, #4]
8006002: f000 f8e5 bl 80061d0 <USBD_CtlSendData>
break;
8006006: e004 b.n 8006012 <USBD_GetStatus+0x5e>
default:
USBD_CtlError(pdev, req);
8006008: 6839 ldr r1, [r7, #0]
800600a: 6878 ldr r0, [r7, #4]
800600c: f000 f876 bl 80060fc <USBD_CtlError>
break;
8006010: bf00 nop
}
}
8006012: bf00 nop
8006014: 3708 adds r7, #8
8006016: 46bd mov sp, r7
8006018: bd80 pop {r7, pc}
0800601a <USBD_SetFeature>:
* @param req: usb request
* @retval status
*/
static void USBD_SetFeature(USBD_HandleTypeDef *pdev,
USBD_SetupReqTypedef *req)
{
800601a: b580 push {r7, lr}
800601c: b082 sub sp, #8
800601e: af00 add r7, sp, #0
8006020: 6078 str r0, [r7, #4]
8006022: 6039 str r1, [r7, #0]
if (req->wValue == USB_FEATURE_REMOTE_WAKEUP)
8006024: 683b ldr r3, [r7, #0]
8006026: 885b ldrh r3, [r3, #2]
8006028: 2b01 cmp r3, #1
800602a: d106 bne.n 800603a <USBD_SetFeature+0x20>
{
pdev->dev_remote_wakeup = 1U;
800602c: 687b ldr r3, [r7, #4]
800602e: 2201 movs r2, #1
8006030: f8c3 22a4 str.w r2, [r3, #676] ; 0x2a4
USBD_CtlSendStatus(pdev);
8006034: 6878 ldr r0, [r7, #4]
8006036: f000 f929 bl 800628c <USBD_CtlSendStatus>
}
}
800603a: bf00 nop
800603c: 3708 adds r7, #8
800603e: 46bd mov sp, r7
8006040: bd80 pop {r7, pc}
08006042 <USBD_ClrFeature>:
* @param req: usb request
* @retval status
*/
static void USBD_ClrFeature(USBD_HandleTypeDef *pdev,
USBD_SetupReqTypedef *req)
{
8006042: b580 push {r7, lr}
8006044: b082 sub sp, #8
8006046: af00 add r7, sp, #0
8006048: 6078 str r0, [r7, #4]
800604a: 6039 str r1, [r7, #0]
switch (pdev->dev_state)
800604c: 687b ldr r3, [r7, #4]
800604e: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
8006052: 3b01 subs r3, #1
8006054: 2b02 cmp r3, #2
8006056: d80b bhi.n 8006070 <USBD_ClrFeature+0x2e>
{
case USBD_STATE_DEFAULT:
case USBD_STATE_ADDRESSED:
case USBD_STATE_CONFIGURED:
if (req->wValue == USB_FEATURE_REMOTE_WAKEUP)
8006058: 683b ldr r3, [r7, #0]
800605a: 885b ldrh r3, [r3, #2]
800605c: 2b01 cmp r3, #1
800605e: d10c bne.n 800607a <USBD_ClrFeature+0x38>
{
pdev->dev_remote_wakeup = 0U;
8006060: 687b ldr r3, [r7, #4]
8006062: 2200 movs r2, #0
8006064: f8c3 22a4 str.w r2, [r3, #676] ; 0x2a4
USBD_CtlSendStatus(pdev);
8006068: 6878 ldr r0, [r7, #4]
800606a: f000 f90f bl 800628c <USBD_CtlSendStatus>
}
break;
800606e: e004 b.n 800607a <USBD_ClrFeature+0x38>
default:
USBD_CtlError(pdev, req);
8006070: 6839 ldr r1, [r7, #0]
8006072: 6878 ldr r0, [r7, #4]
8006074: f000 f842 bl 80060fc <USBD_CtlError>
break;
8006078: e000 b.n 800607c <USBD_ClrFeature+0x3a>
break;
800607a: bf00 nop
}
}
800607c: bf00 nop
800607e: 3708 adds r7, #8
8006080: 46bd mov sp, r7
8006082: bd80 pop {r7, pc}
08006084 <USBD_ParseSetupRequest>:
* @param req: usb request
* @retval None
*/
void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata)
{
8006084: b480 push {r7}
8006086: b083 sub sp, #12
8006088: af00 add r7, sp, #0
800608a: 6078 str r0, [r7, #4]
800608c: 6039 str r1, [r7, #0]
req->bmRequest = *(uint8_t *)(pdata);
800608e: 683b ldr r3, [r7, #0]
8006090: 781a ldrb r2, [r3, #0]
8006092: 687b ldr r3, [r7, #4]
8006094: 701a strb r2, [r3, #0]
req->bRequest = *(uint8_t *)(pdata + 1U);
8006096: 683b ldr r3, [r7, #0]
8006098: 785a ldrb r2, [r3, #1]
800609a: 687b ldr r3, [r7, #4]
800609c: 705a strb r2, [r3, #1]
req->wValue = SWAPBYTE(pdata + 2U);
800609e: 683b ldr r3, [r7, #0]
80060a0: 3302 adds r3, #2
80060a2: 781b ldrb r3, [r3, #0]
80060a4: b29a uxth r2, r3
80060a6: 683b ldr r3, [r7, #0]
80060a8: 3303 adds r3, #3
80060aa: 781b ldrb r3, [r3, #0]
80060ac: b29b uxth r3, r3
80060ae: 021b lsls r3, r3, #8
80060b0: b29b uxth r3, r3
80060b2: 4413 add r3, r2
80060b4: b29a uxth r2, r3
80060b6: 687b ldr r3, [r7, #4]
80060b8: 805a strh r2, [r3, #2]
req->wIndex = SWAPBYTE(pdata + 4U);
80060ba: 683b ldr r3, [r7, #0]
80060bc: 3304 adds r3, #4
80060be: 781b ldrb r3, [r3, #0]
80060c0: b29a uxth r2, r3
80060c2: 683b ldr r3, [r7, #0]
80060c4: 3305 adds r3, #5
80060c6: 781b ldrb r3, [r3, #0]
80060c8: b29b uxth r3, r3
80060ca: 021b lsls r3, r3, #8
80060cc: b29b uxth r3, r3
80060ce: 4413 add r3, r2
80060d0: b29a uxth r2, r3
80060d2: 687b ldr r3, [r7, #4]
80060d4: 809a strh r2, [r3, #4]
req->wLength = SWAPBYTE(pdata + 6U);
80060d6: 683b ldr r3, [r7, #0]
80060d8: 3306 adds r3, #6
80060da: 781b ldrb r3, [r3, #0]
80060dc: b29a uxth r2, r3
80060de: 683b ldr r3, [r7, #0]
80060e0: 3307 adds r3, #7
80060e2: 781b ldrb r3, [r3, #0]
80060e4: b29b uxth r3, r3
80060e6: 021b lsls r3, r3, #8
80060e8: b29b uxth r3, r3
80060ea: 4413 add r3, r2
80060ec: b29a uxth r2, r3
80060ee: 687b ldr r3, [r7, #4]
80060f0: 80da strh r2, [r3, #6]
}
80060f2: bf00 nop
80060f4: 370c adds r7, #12
80060f6: 46bd mov sp, r7
80060f8: bc80 pop {r7}
80060fa: 4770 bx lr
080060fc <USBD_CtlError>:
* @retval None
*/
void USBD_CtlError(USBD_HandleTypeDef *pdev,
USBD_SetupReqTypedef *req)
{
80060fc: b580 push {r7, lr}
80060fe: b082 sub sp, #8
8006100: af00 add r7, sp, #0
8006102: 6078 str r0, [r7, #4]
8006104: 6039 str r1, [r7, #0]
USBD_LL_StallEP(pdev, 0x80U);
8006106: 2180 movs r1, #128 ; 0x80
8006108: 6878 ldr r0, [r7, #4]
800610a: f000 fc5b bl 80069c4 <USBD_LL_StallEP>
USBD_LL_StallEP(pdev, 0U);
800610e: 2100 movs r1, #0
8006110: 6878 ldr r0, [r7, #4]
8006112: f000 fc57 bl 80069c4 <USBD_LL_StallEP>
}
8006116: bf00 nop
8006118: 3708 adds r7, #8
800611a: 46bd mov sp, r7
800611c: bd80 pop {r7, pc}
0800611e <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)
{
800611e: b580 push {r7, lr}
8006120: b086 sub sp, #24
8006122: af00 add r7, sp, #0
8006124: 60f8 str r0, [r7, #12]
8006126: 60b9 str r1, [r7, #8]
8006128: 607a str r2, [r7, #4]
uint8_t idx = 0U;
800612a: 2300 movs r3, #0
800612c: 75fb strb r3, [r7, #23]
if (desc != NULL)
800612e: 68fb ldr r3, [r7, #12]
8006130: 2b00 cmp r3, #0
8006132: d032 beq.n 800619a <USBD_GetString+0x7c>
{
*len = (uint16_t)USBD_GetLen(desc) * 2U + 2U;
8006134: 68f8 ldr r0, [r7, #12]
8006136: f000 f834 bl 80061a2 <USBD_GetLen>
800613a: 4603 mov r3, r0
800613c: 3301 adds r3, #1
800613e: b29b uxth r3, r3
8006140: 005b lsls r3, r3, #1
8006142: b29a uxth r2, r3
8006144: 687b ldr r3, [r7, #4]
8006146: 801a strh r2, [r3, #0]
unicode[idx++] = *(uint8_t *)(void *)len;
8006148: 7dfb ldrb r3, [r7, #23]
800614a: 1c5a adds r2, r3, #1
800614c: 75fa strb r2, [r7, #23]
800614e: 461a mov r2, r3
8006150: 68bb ldr r3, [r7, #8]
8006152: 4413 add r3, r2
8006154: 687a ldr r2, [r7, #4]
8006156: 7812 ldrb r2, [r2, #0]
8006158: 701a strb r2, [r3, #0]
unicode[idx++] = USB_DESC_TYPE_STRING;
800615a: 7dfb ldrb r3, [r7, #23]
800615c: 1c5a adds r2, r3, #1
800615e: 75fa strb r2, [r7, #23]
8006160: 461a mov r2, r3
8006162: 68bb ldr r3, [r7, #8]
8006164: 4413 add r3, r2
8006166: 2203 movs r2, #3
8006168: 701a strb r2, [r3, #0]
while (*desc != '\0')
800616a: e012 b.n 8006192 <USBD_GetString+0x74>
{
unicode[idx++] = *desc++;
800616c: 68fb ldr r3, [r7, #12]
800616e: 1c5a adds r2, r3, #1
8006170: 60fa str r2, [r7, #12]
8006172: 7dfa ldrb r2, [r7, #23]
8006174: 1c51 adds r1, r2, #1
8006176: 75f9 strb r1, [r7, #23]
8006178: 4611 mov r1, r2
800617a: 68ba ldr r2, [r7, #8]
800617c: 440a add r2, r1
800617e: 781b ldrb r3, [r3, #0]
8006180: 7013 strb r3, [r2, #0]
unicode[idx++] = 0U;
8006182: 7dfb ldrb r3, [r7, #23]
8006184: 1c5a adds r2, r3, #1
8006186: 75fa strb r2, [r7, #23]
8006188: 461a mov r2, r3
800618a: 68bb ldr r3, [r7, #8]
800618c: 4413 add r3, r2
800618e: 2200 movs r2, #0
8006190: 701a strb r2, [r3, #0]
while (*desc != '\0')
8006192: 68fb ldr r3, [r7, #12]
8006194: 781b ldrb r3, [r3, #0]
8006196: 2b00 cmp r3, #0
8006198: d1e8 bne.n 800616c <USBD_GetString+0x4e>
}
}
}
800619a: bf00 nop
800619c: 3718 adds r7, #24
800619e: 46bd mov sp, r7
80061a0: bd80 pop {r7, pc}
080061a2 <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)
{
80061a2: b480 push {r7}
80061a4: b085 sub sp, #20
80061a6: af00 add r7, sp, #0
80061a8: 6078 str r0, [r7, #4]
uint8_t len = 0U;
80061aa: 2300 movs r3, #0
80061ac: 73fb strb r3, [r7, #15]
while (*buf != '\0')
80061ae: e005 b.n 80061bc <USBD_GetLen+0x1a>
{
len++;
80061b0: 7bfb ldrb r3, [r7, #15]
80061b2: 3301 adds r3, #1
80061b4: 73fb strb r3, [r7, #15]
buf++;
80061b6: 687b ldr r3, [r7, #4]
80061b8: 3301 adds r3, #1
80061ba: 607b str r3, [r7, #4]
while (*buf != '\0')
80061bc: 687b ldr r3, [r7, #4]
80061be: 781b ldrb r3, [r3, #0]
80061c0: 2b00 cmp r3, #0
80061c2: d1f5 bne.n 80061b0 <USBD_GetLen+0xe>
}
return len;
80061c4: 7bfb ldrb r3, [r7, #15]
}
80061c6: 4618 mov r0, r3
80061c8: 3714 adds r7, #20
80061ca: 46bd mov sp, r7
80061cc: bc80 pop {r7}
80061ce: 4770 bx lr
080061d0 <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)
{
80061d0: b580 push {r7, lr}
80061d2: b084 sub sp, #16
80061d4: af00 add r7, sp, #0
80061d6: 60f8 str r0, [r7, #12]
80061d8: 60b9 str r1, [r7, #8]
80061da: 4613 mov r3, r2
80061dc: 80fb strh r3, [r7, #6]
/* Set EP0 State */
pdev->ep0_state = USBD_EP0_DATA_IN;
80061de: 68fb ldr r3, [r7, #12]
80061e0: 2202 movs r2, #2
80061e2: f8c3 2294 str.w r2, [r3, #660] ; 0x294
pdev->ep_in[0].total_length = len;
80061e6: 88fa ldrh r2, [r7, #6]
80061e8: 68fb ldr r3, [r7, #12]
80061ea: 61da str r2, [r3, #28]
pdev->ep_in[0].rem_length = len;
80061ec: 88fa ldrh r2, [r7, #6]
80061ee: 68fb ldr r3, [r7, #12]
80061f0: 621a str r2, [r3, #32]
/* Start the transfer */
USBD_LL_Transmit(pdev, 0x00U, pbuf, len);
80061f2: 88fb ldrh r3, [r7, #6]
80061f4: 68ba ldr r2, [r7, #8]
80061f6: 2100 movs r1, #0
80061f8: 68f8 ldr r0, [r7, #12]
80061fa: f000 fc6c bl 8006ad6 <USBD_LL_Transmit>
return USBD_OK;
80061fe: 2300 movs r3, #0
}
8006200: 4618 mov r0, r3
8006202: 3710 adds r7, #16
8006204: 46bd mov sp, r7
8006206: bd80 pop {r7, pc}
08006208 <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)
{
8006208: b580 push {r7, lr}
800620a: b084 sub sp, #16
800620c: af00 add r7, sp, #0
800620e: 60f8 str r0, [r7, #12]
8006210: 60b9 str r1, [r7, #8]
8006212: 4613 mov r3, r2
8006214: 80fb strh r3, [r7, #6]
/* Start the next transfer */
USBD_LL_Transmit(pdev, 0x00U, pbuf, len);
8006216: 88fb ldrh r3, [r7, #6]
8006218: 68ba ldr r2, [r7, #8]
800621a: 2100 movs r1, #0
800621c: 68f8 ldr r0, [r7, #12]
800621e: f000 fc5a bl 8006ad6 <USBD_LL_Transmit>
return USBD_OK;
8006222: 2300 movs r3, #0
}
8006224: 4618 mov r0, r3
8006226: 3710 adds r7, #16
8006228: 46bd mov sp, r7
800622a: bd80 pop {r7, pc}
0800622c <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)
{
800622c: b580 push {r7, lr}
800622e: b084 sub sp, #16
8006230: af00 add r7, sp, #0
8006232: 60f8 str r0, [r7, #12]
8006234: 60b9 str r1, [r7, #8]
8006236: 4613 mov r3, r2
8006238: 80fb strh r3, [r7, #6]
/* Set EP0 State */
pdev->ep0_state = USBD_EP0_DATA_OUT;
800623a: 68fb ldr r3, [r7, #12]
800623c: 2203 movs r2, #3
800623e: f8c3 2294 str.w r2, [r3, #660] ; 0x294
pdev->ep_out[0].total_length = len;
8006242: 88fa ldrh r2, [r7, #6]
8006244: 68fb ldr r3, [r7, #12]
8006246: f8c3 215c str.w r2, [r3, #348] ; 0x15c
pdev->ep_out[0].rem_length = len;
800624a: 88fa ldrh r2, [r7, #6]
800624c: 68fb ldr r3, [r7, #12]
800624e: f8c3 2160 str.w r2, [r3, #352] ; 0x160
/* Start the transfer */
USBD_LL_PrepareReceive(pdev, 0U, pbuf, len);
8006252: 88fb ldrh r3, [r7, #6]
8006254: 68ba ldr r2, [r7, #8]
8006256: 2100 movs r1, #0
8006258: 68f8 ldr r0, [r7, #12]
800625a: f000 fc5f bl 8006b1c <USBD_LL_PrepareReceive>
return USBD_OK;
800625e: 2300 movs r3, #0
}
8006260: 4618 mov r0, r3
8006262: 3710 adds r7, #16
8006264: 46bd mov sp, r7
8006266: bd80 pop {r7, pc}
08006268 <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)
{
8006268: b580 push {r7, lr}
800626a: b084 sub sp, #16
800626c: af00 add r7, sp, #0
800626e: 60f8 str r0, [r7, #12]
8006270: 60b9 str r1, [r7, #8]
8006272: 4613 mov r3, r2
8006274: 80fb strh r3, [r7, #6]
USBD_LL_PrepareReceive(pdev, 0U, pbuf, len);
8006276: 88fb ldrh r3, [r7, #6]
8006278: 68ba ldr r2, [r7, #8]
800627a: 2100 movs r1, #0
800627c: 68f8 ldr r0, [r7, #12]
800627e: f000 fc4d bl 8006b1c <USBD_LL_PrepareReceive>
return USBD_OK;
8006282: 2300 movs r3, #0
}
8006284: 4618 mov r0, r3
8006286: 3710 adds r7, #16
8006288: 46bd mov sp, r7
800628a: bd80 pop {r7, pc}
0800628c <USBD_CtlSendStatus>:
* send zero lzngth packet on the ctl pipe
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev)
{
800628c: b580 push {r7, lr}
800628e: b082 sub sp, #8
8006290: af00 add r7, sp, #0
8006292: 6078 str r0, [r7, #4]
/* Set EP0 State */
pdev->ep0_state = USBD_EP0_STATUS_IN;
8006294: 687b ldr r3, [r7, #4]
8006296: 2204 movs r2, #4
8006298: f8c3 2294 str.w r2, [r3, #660] ; 0x294
/* Start the transfer */
USBD_LL_Transmit(pdev, 0x00U, NULL, 0U);
800629c: 2300 movs r3, #0
800629e: 2200 movs r2, #0
80062a0: 2100 movs r1, #0
80062a2: 6878 ldr r0, [r7, #4]
80062a4: f000 fc17 bl 8006ad6 <USBD_LL_Transmit>
return USBD_OK;
80062a8: 2300 movs r3, #0
}
80062aa: 4618 mov r0, r3
80062ac: 3708 adds r7, #8
80062ae: 46bd mov sp, r7
80062b0: bd80 pop {r7, pc}
080062b2 <USBD_CtlReceiveStatus>:
* receive zero lzngth packet on the ctl pipe
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev)
{
80062b2: b580 push {r7, lr}
80062b4: b082 sub sp, #8
80062b6: af00 add r7, sp, #0
80062b8: 6078 str r0, [r7, #4]
/* Set EP0 State */
pdev->ep0_state = USBD_EP0_STATUS_OUT;
80062ba: 687b ldr r3, [r7, #4]
80062bc: 2205 movs r2, #5
80062be: f8c3 2294 str.w r2, [r3, #660] ; 0x294
/* Start the transfer */
USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U);
80062c2: 2300 movs r3, #0
80062c4: 2200 movs r2, #0
80062c6: 2100 movs r1, #0
80062c8: 6878 ldr r0, [r7, #4]
80062ca: f000 fc27 bl 8006b1c <USBD_LL_PrepareReceive>
return USBD_OK;
80062ce: 2300 movs r3, #0
}
80062d0: 4618 mov r0, r3
80062d2: 3708 adds r7, #8
80062d4: 46bd mov sp, r7
80062d6: bd80 pop {r7, pc}
080062d8 <MX_USB_DEVICE_Init>:
/**
* Init USB device Library, add supported class and start the library
* @retval None
*/
void MX_USB_DEVICE_Init(void)
{
80062d8: b580 push {r7, lr}
80062da: 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)
80062dc: 2200 movs r2, #0
80062de: 4912 ldr r1, [pc, #72] ; (8006328 <MX_USB_DEVICE_Init+0x50>)
80062e0: 4812 ldr r0, [pc, #72] ; (800632c <MX_USB_DEVICE_Init+0x54>)
80062e2: f7fe ff6c bl 80051be <USBD_Init>
80062e6: 4603 mov r3, r0
80062e8: 2b00 cmp r3, #0
80062ea: d001 beq.n 80062f0 <MX_USB_DEVICE_Init+0x18>
{
Error_Handler();
80062ec: f7fa f81c bl 8000328 <Error_Handler>
}
if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_CDC) != USBD_OK)
80062f0: 490f ldr r1, [pc, #60] ; (8006330 <MX_USB_DEVICE_Init+0x58>)
80062f2: 480e ldr r0, [pc, #56] ; (800632c <MX_USB_DEVICE_Init+0x54>)
80062f4: f7fe ff8e bl 8005214 <USBD_RegisterClass>
80062f8: 4603 mov r3, r0
80062fa: 2b00 cmp r3, #0
80062fc: d001 beq.n 8006302 <MX_USB_DEVICE_Init+0x2a>
{
Error_Handler();
80062fe: f7fa f813 bl 8000328 <Error_Handler>
}
if (USBD_CDC_RegisterInterface(&hUsbDeviceFS, &USBD_Interface_fops_FS) != USBD_OK)
8006302: 490c ldr r1, [pc, #48] ; (8006334 <MX_USB_DEVICE_Init+0x5c>)
8006304: 4809 ldr r0, [pc, #36] ; (800632c <MX_USB_DEVICE_Init+0x54>)
8006306: f7fe febf bl 8005088 <USBD_CDC_RegisterInterface>
800630a: 4603 mov r3, r0
800630c: 2b00 cmp r3, #0
800630e: d001 beq.n 8006314 <MX_USB_DEVICE_Init+0x3c>
{
Error_Handler();
8006310: f7fa f80a bl 8000328 <Error_Handler>
}
if (USBD_Start(&hUsbDeviceFS) != USBD_OK)
8006314: 4805 ldr r0, [pc, #20] ; (800632c <MX_USB_DEVICE_Init+0x54>)
8006316: f7fe ff96 bl 8005246 <USBD_Start>
800631a: 4603 mov r3, r0
800631c: 2b00 cmp r3, #0
800631e: d001 beq.n 8006324 <MX_USB_DEVICE_Init+0x4c>
{
Error_Handler();
8006320: f7fa f802 bl 8000328 <Error_Handler>
}
/* USER CODE BEGIN USB_DEVICE_Init_PostTreatment */
/* USER CODE END USB_DEVICE_Init_PostTreatment */
}
8006324: bf00 nop
8006326: bd80 pop {r7, pc}
8006328: 2000012c .word 0x2000012c
800632c: 200003c0 .word 0x200003c0
8006330: 20000018 .word 0x20000018
8006334: 2000011c .word 0x2000011c
08006338 <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)
{
8006338: b580 push {r7, lr}
800633a: af00 add r7, sp, #0
/* USER CODE BEGIN 3 */
/* Set Application Buffers */
USBD_CDC_SetTxBuffer(&hUsbDeviceFS, UserTxBufferFS, 0);
800633c: 2200 movs r2, #0
800633e: 4905 ldr r1, [pc, #20] ; (8006354 <CDC_Init_FS+0x1c>)
8006340: 4805 ldr r0, [pc, #20] ; (8006358 <CDC_Init_FS+0x20>)
8006342: f7fe feb7 bl 80050b4 <USBD_CDC_SetTxBuffer>
USBD_CDC_SetRxBuffer(&hUsbDeviceFS, UserRxBufferFS);
8006346: 4905 ldr r1, [pc, #20] ; (800635c <CDC_Init_FS+0x24>)
8006348: 4803 ldr r0, [pc, #12] ; (8006358 <CDC_Init_FS+0x20>)
800634a: f7fe fecc bl 80050e6 <USBD_CDC_SetRxBuffer>
return (USBD_OK);
800634e: 2300 movs r3, #0
/* USER CODE END 3 */
}
8006350: 4618 mov r0, r3
8006352: bd80 pop {r7, pc}
8006354: 20000a6c .word 0x20000a6c
8006358: 200003c0 .word 0x200003c0
800635c: 20000684 .word 0x20000684
08006360 <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)
{
8006360: b480 push {r7}
8006362: af00 add r7, sp, #0
/* USER CODE BEGIN 4 */
return (USBD_OK);
8006364: 2300 movs r3, #0
/* USER CODE END 4 */
}
8006366: 4618 mov r0, r3
8006368: 46bd mov sp, r7
800636a: bc80 pop {r7}
800636c: 4770 bx lr
...
08006370 <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)
{
8006370: b480 push {r7}
8006372: b083 sub sp, #12
8006374: af00 add r7, sp, #0
8006376: 4603 mov r3, r0
8006378: 6039 str r1, [r7, #0]
800637a: 71fb strb r3, [r7, #7]
800637c: 4613 mov r3, r2
800637e: 80bb strh r3, [r7, #4]
/* USER CODE BEGIN 5 */
switch(cmd)
8006380: 79fb ldrb r3, [r7, #7]
8006382: 2b23 cmp r3, #35 ; 0x23
8006384: d84a bhi.n 800641c <CDC_Control_FS+0xac>
8006386: a201 add r2, pc, #4 ; (adr r2, 800638c <CDC_Control_FS+0x1c>)
8006388: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800638c: 0800641d .word 0x0800641d
8006390: 0800641d .word 0x0800641d
8006394: 0800641d .word 0x0800641d
8006398: 0800641d .word 0x0800641d
800639c: 0800641d .word 0x0800641d
80063a0: 0800641d .word 0x0800641d
80063a4: 0800641d .word 0x0800641d
80063a8: 0800641d .word 0x0800641d
80063ac: 0800641d .word 0x0800641d
80063b0: 0800641d .word 0x0800641d
80063b4: 0800641d .word 0x0800641d
80063b8: 0800641d .word 0x0800641d
80063bc: 0800641d .word 0x0800641d
80063c0: 0800641d .word 0x0800641d
80063c4: 0800641d .word 0x0800641d
80063c8: 0800641d .word 0x0800641d
80063cc: 0800641d .word 0x0800641d
80063d0: 0800641d .word 0x0800641d
80063d4: 0800641d .word 0x0800641d
80063d8: 0800641d .word 0x0800641d
80063dc: 0800641d .word 0x0800641d
80063e0: 0800641d .word 0x0800641d
80063e4: 0800641d .word 0x0800641d
80063e8: 0800641d .word 0x0800641d
80063ec: 0800641d .word 0x0800641d
80063f0: 0800641d .word 0x0800641d
80063f4: 0800641d .word 0x0800641d
80063f8: 0800641d .word 0x0800641d
80063fc: 0800641d .word 0x0800641d
8006400: 0800641d .word 0x0800641d
8006404: 0800641d .word 0x0800641d
8006408: 0800641d .word 0x0800641d
800640c: 0800641d .word 0x0800641d
8006410: 0800641d .word 0x0800641d
8006414: 0800641d .word 0x0800641d
8006418: 0800641d .word 0x0800641d
case CDC_SEND_BREAK:
break;
default:
break;
800641c: bf00 nop
}
return (USBD_OK);
800641e: 2300 movs r3, #0
/* USER CODE END 5 */
}
8006420: 4618 mov r0, r3
8006422: 370c adds r7, #12
8006424: 46bd mov sp, r7
8006426: bc80 pop {r7}
8006428: 4770 bx lr
800642a: bf00 nop
0800642c <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)
{
800642c: b580 push {r7, lr}
800642e: b082 sub sp, #8
8006430: af00 add r7, sp, #0
8006432: 6078 str r0, [r7, #4]
8006434: 6039 str r1, [r7, #0]
/* USER CODE BEGIN 6 */
USBD_CDC_SetRxBuffer(&hUsbDeviceFS, &Buf[0]);
8006436: 6879 ldr r1, [r7, #4]
8006438: 4805 ldr r0, [pc, #20] ; (8006450 <CDC_Receive_FS+0x24>)
800643a: f7fe fe54 bl 80050e6 <USBD_CDC_SetRxBuffer>
USBD_CDC_ReceivePacket(&hUsbDeviceFS);
800643e: 4804 ldr r0, [pc, #16] ; (8006450 <CDC_Receive_FS+0x24>)
8006440: f7fe fe93 bl 800516a <USBD_CDC_ReceivePacket>
return (USBD_OK);
8006444: 2300 movs r3, #0
/* USER CODE END 6 */
}
8006446: 4618 mov r0, r3
8006448: 3708 adds r7, #8
800644a: 46bd mov sp, r7
800644c: bd80 pop {r7, pc}
800644e: bf00 nop
8006450: 200003c0 .word 0x200003c0
08006454 <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)
{
8006454: b580 push {r7, lr}
8006456: b084 sub sp, #16
8006458: af00 add r7, sp, #0
800645a: 6078 str r0, [r7, #4]
800645c: 460b mov r3, r1
800645e: 807b strh r3, [r7, #2]
uint8_t result = USBD_OK;
8006460: 2300 movs r3, #0
8006462: 73fb strb r3, [r7, #15]
/* USER CODE BEGIN 7 */
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef*)hUsbDeviceFS.pClassData;
8006464: 4b0d ldr r3, [pc, #52] ; (800649c <CDC_Transmit_FS+0x48>)
8006466: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
800646a: 60bb str r3, [r7, #8]
if (hcdc->TxState != 0){
800646c: 68bb ldr r3, [r7, #8]
800646e: f8d3 3214 ldr.w r3, [r3, #532] ; 0x214
8006472: 2b00 cmp r3, #0
8006474: d001 beq.n 800647a <CDC_Transmit_FS+0x26>
return USBD_BUSY;
8006476: 2301 movs r3, #1
8006478: e00b b.n 8006492 <CDC_Transmit_FS+0x3e>
}
USBD_CDC_SetTxBuffer(&hUsbDeviceFS, Buf, Len);
800647a: 887b ldrh r3, [r7, #2]
800647c: 461a mov r2, r3
800647e: 6879 ldr r1, [r7, #4]
8006480: 4806 ldr r0, [pc, #24] ; (800649c <CDC_Transmit_FS+0x48>)
8006482: f7fe fe17 bl 80050b4 <USBD_CDC_SetTxBuffer>
result = USBD_CDC_TransmitPacket(&hUsbDeviceFS);
8006486: 4805 ldr r0, [pc, #20] ; (800649c <CDC_Transmit_FS+0x48>)
8006488: f7fe fe40 bl 800510c <USBD_CDC_TransmitPacket>
800648c: 4603 mov r3, r0
800648e: 73fb strb r3, [r7, #15]
/* USER CODE END 7 */
return result;
8006490: 7bfb ldrb r3, [r7, #15]
}
8006492: 4618 mov r0, r3
8006494: 3710 adds r7, #16
8006496: 46bd mov sp, r7
8006498: bd80 pop {r7, pc}
800649a: bf00 nop
800649c: 200003c0 .word 0x200003c0
080064a0 <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)
{
80064a0: b480 push {r7}
80064a2: b083 sub sp, #12
80064a4: af00 add r7, sp, #0
80064a6: 4603 mov r3, r0
80064a8: 6039 str r1, [r7, #0]
80064aa: 71fb strb r3, [r7, #7]
UNUSED(speed);
*length = sizeof(USBD_FS_DeviceDesc);
80064ac: 683b ldr r3, [r7, #0]
80064ae: 2212 movs r2, #18
80064b0: 801a strh r2, [r3, #0]
return USBD_FS_DeviceDesc;
80064b2: 4b03 ldr r3, [pc, #12] ; (80064c0 <USBD_FS_DeviceDescriptor+0x20>)
}
80064b4: 4618 mov r0, r3
80064b6: 370c adds r7, #12
80064b8: 46bd mov sp, r7
80064ba: bc80 pop {r7}
80064bc: 4770 bx lr
80064be: bf00 nop
80064c0: 20000148 .word 0x20000148
080064c4 <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)
{
80064c4: b480 push {r7}
80064c6: b083 sub sp, #12
80064c8: af00 add r7, sp, #0
80064ca: 4603 mov r3, r0
80064cc: 6039 str r1, [r7, #0]
80064ce: 71fb strb r3, [r7, #7]
UNUSED(speed);
*length = sizeof(USBD_LangIDDesc);
80064d0: 683b ldr r3, [r7, #0]
80064d2: 2204 movs r2, #4
80064d4: 801a strh r2, [r3, #0]
return USBD_LangIDDesc;
80064d6: 4b03 ldr r3, [pc, #12] ; (80064e4 <USBD_FS_LangIDStrDescriptor+0x20>)
}
80064d8: 4618 mov r0, r3
80064da: 370c adds r7, #12
80064dc: 46bd mov sp, r7
80064de: bc80 pop {r7}
80064e0: 4770 bx lr
80064e2: bf00 nop
80064e4: 2000015c .word 0x2000015c
080064e8 <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)
{
80064e8: b580 push {r7, lr}
80064ea: b082 sub sp, #8
80064ec: af00 add r7, sp, #0
80064ee: 4603 mov r3, r0
80064f0: 6039 str r1, [r7, #0]
80064f2: 71fb strb r3, [r7, #7]
if(speed == 0)
80064f4: 79fb ldrb r3, [r7, #7]
80064f6: 2b00 cmp r3, #0
80064f8: d105 bne.n 8006506 <USBD_FS_ProductStrDescriptor+0x1e>
{
USBD_GetString((uint8_t *)USBD_PRODUCT_STRING_FS, USBD_StrDesc, length);
80064fa: 683a ldr r2, [r7, #0]
80064fc: 4907 ldr r1, [pc, #28] ; (800651c <USBD_FS_ProductStrDescriptor+0x34>)
80064fe: 4808 ldr r0, [pc, #32] ; (8006520 <USBD_FS_ProductStrDescriptor+0x38>)
8006500: f7ff fe0d bl 800611e <USBD_GetString>
8006504: e004 b.n 8006510 <USBD_FS_ProductStrDescriptor+0x28>
}
else
{
USBD_GetString((uint8_t *)USBD_PRODUCT_STRING_FS, USBD_StrDesc, length);
8006506: 683a ldr r2, [r7, #0]
8006508: 4904 ldr r1, [pc, #16] ; (800651c <USBD_FS_ProductStrDescriptor+0x34>)
800650a: 4805 ldr r0, [pc, #20] ; (8006520 <USBD_FS_ProductStrDescriptor+0x38>)
800650c: f7ff fe07 bl 800611e <USBD_GetString>
}
return USBD_StrDesc;
8006510: 4b02 ldr r3, [pc, #8] ; (800651c <USBD_FS_ProductStrDescriptor+0x34>)
}
8006512: 4618 mov r0, r3
8006514: 3708 adds r7, #8
8006516: 46bd mov sp, r7
8006518: bd80 pop {r7, pc}
800651a: bf00 nop
800651c: 20000e54 .word 0x20000e54
8006520: 08006cac .word 0x08006cac
08006524 <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)
{
8006524: b580 push {r7, lr}
8006526: b082 sub sp, #8
8006528: af00 add r7, sp, #0
800652a: 4603 mov r3, r0
800652c: 6039 str r1, [r7, #0]
800652e: 71fb strb r3, [r7, #7]
UNUSED(speed);
USBD_GetString((uint8_t *)USBD_MANUFACTURER_STRING, USBD_StrDesc, length);
8006530: 683a ldr r2, [r7, #0]
8006532: 4904 ldr r1, [pc, #16] ; (8006544 <USBD_FS_ManufacturerStrDescriptor+0x20>)
8006534: 4804 ldr r0, [pc, #16] ; (8006548 <USBD_FS_ManufacturerStrDescriptor+0x24>)
8006536: f7ff fdf2 bl 800611e <USBD_GetString>
return USBD_StrDesc;
800653a: 4b02 ldr r3, [pc, #8] ; (8006544 <USBD_FS_ManufacturerStrDescriptor+0x20>)
}
800653c: 4618 mov r0, r3
800653e: 3708 adds r7, #8
8006540: 46bd mov sp, r7
8006542: bd80 pop {r7, pc}
8006544: 20000e54 .word 0x20000e54
8006548: 08006cc4 .word 0x08006cc4
0800654c <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)
{
800654c: b580 push {r7, lr}
800654e: b082 sub sp, #8
8006550: af00 add r7, sp, #0
8006552: 4603 mov r3, r0
8006554: 6039 str r1, [r7, #0]
8006556: 71fb strb r3, [r7, #7]
UNUSED(speed);
*length = USB_SIZ_STRING_SERIAL;
8006558: 683b ldr r3, [r7, #0]
800655a: 221a movs r2, #26
800655c: 801a strh r2, [r3, #0]
/* Update the serial number string descriptor with the data from the unique
* ID */
Get_SerialNum();
800655e: f000 f843 bl 80065e8 <Get_SerialNum>
/* USER CODE BEGIN USBD_FS_SerialStrDescriptor */
/* USER CODE END USBD_FS_SerialStrDescriptor */
return (uint8_t *) USBD_StringSerial;
8006562: 4b02 ldr r3, [pc, #8] ; (800656c <USBD_FS_SerialStrDescriptor+0x20>)
}
8006564: 4618 mov r0, r3
8006566: 3708 adds r7, #8
8006568: 46bd mov sp, r7
800656a: bd80 pop {r7, pc}
800656c: 20000160 .word 0x20000160
08006570 <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)
{
8006570: b580 push {r7, lr}
8006572: b082 sub sp, #8
8006574: af00 add r7, sp, #0
8006576: 4603 mov r3, r0
8006578: 6039 str r1, [r7, #0]
800657a: 71fb strb r3, [r7, #7]
if(speed == USBD_SPEED_HIGH)
800657c: 79fb ldrb r3, [r7, #7]
800657e: 2b00 cmp r3, #0
8006580: d105 bne.n 800658e <USBD_FS_ConfigStrDescriptor+0x1e>
{
USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length);
8006582: 683a ldr r2, [r7, #0]
8006584: 4907 ldr r1, [pc, #28] ; (80065a4 <USBD_FS_ConfigStrDescriptor+0x34>)
8006586: 4808 ldr r0, [pc, #32] ; (80065a8 <USBD_FS_ConfigStrDescriptor+0x38>)
8006588: f7ff fdc9 bl 800611e <USBD_GetString>
800658c: e004 b.n 8006598 <USBD_FS_ConfigStrDescriptor+0x28>
}
else
{
USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length);
800658e: 683a ldr r2, [r7, #0]
8006590: 4904 ldr r1, [pc, #16] ; (80065a4 <USBD_FS_ConfigStrDescriptor+0x34>)
8006592: 4805 ldr r0, [pc, #20] ; (80065a8 <USBD_FS_ConfigStrDescriptor+0x38>)
8006594: f7ff fdc3 bl 800611e <USBD_GetString>
}
return USBD_StrDesc;
8006598: 4b02 ldr r3, [pc, #8] ; (80065a4 <USBD_FS_ConfigStrDescriptor+0x34>)
}
800659a: 4618 mov r0, r3
800659c: 3708 adds r7, #8
800659e: 46bd mov sp, r7
80065a0: bd80 pop {r7, pc}
80065a2: bf00 nop
80065a4: 20000e54 .word 0x20000e54
80065a8: 08006cd8 .word 0x08006cd8
080065ac <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)
{
80065ac: b580 push {r7, lr}
80065ae: b082 sub sp, #8
80065b0: af00 add r7, sp, #0
80065b2: 4603 mov r3, r0
80065b4: 6039 str r1, [r7, #0]
80065b6: 71fb strb r3, [r7, #7]
if(speed == 0)
80065b8: 79fb ldrb r3, [r7, #7]
80065ba: 2b00 cmp r3, #0
80065bc: d105 bne.n 80065ca <USBD_FS_InterfaceStrDescriptor+0x1e>
{
USBD_GetString((uint8_t *)USBD_INTERFACE_STRING_FS, USBD_StrDesc, length);
80065be: 683a ldr r2, [r7, #0]
80065c0: 4907 ldr r1, [pc, #28] ; (80065e0 <USBD_FS_InterfaceStrDescriptor+0x34>)
80065c2: 4808 ldr r0, [pc, #32] ; (80065e4 <USBD_FS_InterfaceStrDescriptor+0x38>)
80065c4: f7ff fdab bl 800611e <USBD_GetString>
80065c8: e004 b.n 80065d4 <USBD_FS_InterfaceStrDescriptor+0x28>
}
else
{
USBD_GetString((uint8_t *)USBD_INTERFACE_STRING_FS, USBD_StrDesc, length);
80065ca: 683a ldr r2, [r7, #0]
80065cc: 4904 ldr r1, [pc, #16] ; (80065e0 <USBD_FS_InterfaceStrDescriptor+0x34>)
80065ce: 4805 ldr r0, [pc, #20] ; (80065e4 <USBD_FS_InterfaceStrDescriptor+0x38>)
80065d0: f7ff fda5 bl 800611e <USBD_GetString>
}
return USBD_StrDesc;
80065d4: 4b02 ldr r3, [pc, #8] ; (80065e0 <USBD_FS_InterfaceStrDescriptor+0x34>)
}
80065d6: 4618 mov r0, r3
80065d8: 3708 adds r7, #8
80065da: 46bd mov sp, r7
80065dc: bd80 pop {r7, pc}
80065de: bf00 nop
80065e0: 20000e54 .word 0x20000e54
80065e4: 08006ce4 .word 0x08006ce4
080065e8 <Get_SerialNum>:
* @brief Create the serial number string descriptor
* @param None
* @retval None
*/
static void Get_SerialNum(void)
{
80065e8: b580 push {r7, lr}
80065ea: b084 sub sp, #16
80065ec: af00 add r7, sp, #0
uint32_t deviceserial0, deviceserial1, deviceserial2;
deviceserial0 = *(uint32_t *) DEVICE_ID1;
80065ee: 4b0f ldr r3, [pc, #60] ; (800662c <Get_SerialNum+0x44>)
80065f0: 681b ldr r3, [r3, #0]
80065f2: 60fb str r3, [r7, #12]
deviceserial1 = *(uint32_t *) DEVICE_ID2;
80065f4: 4b0e ldr r3, [pc, #56] ; (8006630 <Get_SerialNum+0x48>)
80065f6: 681b ldr r3, [r3, #0]
80065f8: 60bb str r3, [r7, #8]
deviceserial2 = *(uint32_t *) DEVICE_ID3;
80065fa: 4b0e ldr r3, [pc, #56] ; (8006634 <Get_SerialNum+0x4c>)
80065fc: 681b ldr r3, [r3, #0]
80065fe: 607b str r3, [r7, #4]
deviceserial0 += deviceserial2;
8006600: 68fa ldr r2, [r7, #12]
8006602: 687b ldr r3, [r7, #4]
8006604: 4413 add r3, r2
8006606: 60fb str r3, [r7, #12]
if (deviceserial0 != 0)
8006608: 68fb ldr r3, [r7, #12]
800660a: 2b00 cmp r3, #0
800660c: d009 beq.n 8006622 <Get_SerialNum+0x3a>
{
IntToUnicode(deviceserial0, &USBD_StringSerial[2], 8);
800660e: 2208 movs r2, #8
8006610: 4909 ldr r1, [pc, #36] ; (8006638 <Get_SerialNum+0x50>)
8006612: 68f8 ldr r0, [r7, #12]
8006614: f000 f814 bl 8006640 <IntToUnicode>
IntToUnicode(deviceserial1, &USBD_StringSerial[18], 4);
8006618: 2204 movs r2, #4
800661a: 4908 ldr r1, [pc, #32] ; (800663c <Get_SerialNum+0x54>)
800661c: 68b8 ldr r0, [r7, #8]
800661e: f000 f80f bl 8006640 <IntToUnicode>
}
}
8006622: bf00 nop
8006624: 3710 adds r7, #16
8006626: 46bd mov sp, r7
8006628: bd80 pop {r7, pc}
800662a: bf00 nop
800662c: 1ffff7e8 .word 0x1ffff7e8
8006630: 1ffff7ec .word 0x1ffff7ec
8006634: 1ffff7f0 .word 0x1ffff7f0
8006638: 20000162 .word 0x20000162
800663c: 20000172 .word 0x20000172
08006640 <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)
{
8006640: b480 push {r7}
8006642: b087 sub sp, #28
8006644: af00 add r7, sp, #0
8006646: 60f8 str r0, [r7, #12]
8006648: 60b9 str r1, [r7, #8]
800664a: 4613 mov r3, r2
800664c: 71fb strb r3, [r7, #7]
uint8_t idx = 0;
800664e: 2300 movs r3, #0
8006650: 75fb strb r3, [r7, #23]
for (idx = 0; idx < len; idx++)
8006652: 2300 movs r3, #0
8006654: 75fb strb r3, [r7, #23]
8006656: e027 b.n 80066a8 <IntToUnicode+0x68>
{
if (((value >> 28)) < 0xA)
8006658: 68fb ldr r3, [r7, #12]
800665a: 0f1b lsrs r3, r3, #28
800665c: 2b09 cmp r3, #9
800665e: d80b bhi.n 8006678 <IntToUnicode+0x38>
{
pbuf[2 * idx] = (value >> 28) + '0';
8006660: 68fb ldr r3, [r7, #12]
8006662: 0f1b lsrs r3, r3, #28
8006664: b2da uxtb r2, r3
8006666: 7dfb ldrb r3, [r7, #23]
8006668: 005b lsls r3, r3, #1
800666a: 4619 mov r1, r3
800666c: 68bb ldr r3, [r7, #8]
800666e: 440b add r3, r1
8006670: 3230 adds r2, #48 ; 0x30
8006672: b2d2 uxtb r2, r2
8006674: 701a strb r2, [r3, #0]
8006676: e00a b.n 800668e <IntToUnicode+0x4e>
}
else
{
pbuf[2 * idx] = (value >> 28) + 'A' - 10;
8006678: 68fb ldr r3, [r7, #12]
800667a: 0f1b lsrs r3, r3, #28
800667c: b2da uxtb r2, r3
800667e: 7dfb ldrb r3, [r7, #23]
8006680: 005b lsls r3, r3, #1
8006682: 4619 mov r1, r3
8006684: 68bb ldr r3, [r7, #8]
8006686: 440b add r3, r1
8006688: 3237 adds r2, #55 ; 0x37
800668a: b2d2 uxtb r2, r2
800668c: 701a strb r2, [r3, #0]
}
value = value << 4;
800668e: 68fb ldr r3, [r7, #12]
8006690: 011b lsls r3, r3, #4
8006692: 60fb str r3, [r7, #12]
pbuf[2 * idx + 1] = 0;
8006694: 7dfb ldrb r3, [r7, #23]
8006696: 005b lsls r3, r3, #1
8006698: 3301 adds r3, #1
800669a: 68ba ldr r2, [r7, #8]
800669c: 4413 add r3, r2
800669e: 2200 movs r2, #0
80066a0: 701a strb r2, [r3, #0]
for (idx = 0; idx < len; idx++)
80066a2: 7dfb ldrb r3, [r7, #23]
80066a4: 3301 adds r3, #1
80066a6: 75fb strb r3, [r7, #23]
80066a8: 7dfa ldrb r2, [r7, #23]
80066aa: 79fb ldrb r3, [r7, #7]
80066ac: 429a cmp r2, r3
80066ae: d3d3 bcc.n 8006658 <IntToUnicode+0x18>
}
}
80066b0: bf00 nop
80066b2: 371c adds r7, #28
80066b4: 46bd mov sp, r7
80066b6: bc80 pop {r7}
80066b8: 4770 bx lr
...
080066bc <HAL_PCD_MspInit>:
LL Driver Callbacks (PCD -> USB Device Library)
*******************************************************************************/
/* MSP Init */
void HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle)
{
80066bc: b580 push {r7, lr}
80066be: b084 sub sp, #16
80066c0: af00 add r7, sp, #0
80066c2: 6078 str r0, [r7, #4]
if(pcdHandle->Instance==USB)
80066c4: 687b ldr r3, [r7, #4]
80066c6: 681b ldr r3, [r3, #0]
80066c8: 4a11 ldr r2, [pc, #68] ; (8006710 <HAL_PCD_MspInit+0x54>)
80066ca: 4293 cmp r3, r2
80066cc: d11b bne.n 8006706 <HAL_PCD_MspInit+0x4a>
{
/* USER CODE BEGIN USB_MspInit 0 */
/* USER CODE END USB_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_USB_CLK_ENABLE();
80066ce: 4b11 ldr r3, [pc, #68] ; (8006714 <HAL_PCD_MspInit+0x58>)
80066d0: 69db ldr r3, [r3, #28]
80066d2: 4a10 ldr r2, [pc, #64] ; (8006714 <HAL_PCD_MspInit+0x58>)
80066d4: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
80066d8: 61d3 str r3, [r2, #28]
80066da: 4b0e ldr r3, [pc, #56] ; (8006714 <HAL_PCD_MspInit+0x58>)
80066dc: 69db ldr r3, [r3, #28]
80066de: f403 0300 and.w r3, r3, #8388608 ; 0x800000
80066e2: 60fb str r3, [r7, #12]
80066e4: 68fb ldr r3, [r7, #12]
/* Peripheral interrupt init */
HAL_NVIC_SetPriority(USB_HP_CAN1_TX_IRQn, 0, 0);
80066e6: 2200 movs r2, #0
80066e8: 2100 movs r1, #0
80066ea: 2013 movs r0, #19
80066ec: f7fa f815 bl 800071a <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(USB_HP_CAN1_TX_IRQn);
80066f0: 2013 movs r0, #19
80066f2: f7fa f82e bl 8000752 <HAL_NVIC_EnableIRQ>
HAL_NVIC_SetPriority(USB_LP_CAN1_RX0_IRQn, 0, 0);
80066f6: 2200 movs r2, #0
80066f8: 2100 movs r1, #0
80066fa: 2014 movs r0, #20
80066fc: f7fa f80d bl 800071a <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(USB_LP_CAN1_RX0_IRQn);
8006700: 2014 movs r0, #20
8006702: f7fa f826 bl 8000752 <HAL_NVIC_EnableIRQ>
/* USER CODE BEGIN USB_MspInit 1 */
/* USER CODE END USB_MspInit 1 */
}
}
8006706: bf00 nop
8006708: 3710 adds r7, #16
800670a: 46bd mov sp, r7
800670c: bd80 pop {r7, pc}
800670e: bf00 nop
8006710: 40005c00 .word 0x40005c00
8006714: 40021000 .word 0x40021000
08006718 <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 */
{
8006718: b580 push {r7, lr}
800671a: b082 sub sp, #8
800671c: af00 add r7, sp, #0
800671e: 6078 str r0, [r7, #4]
USBD_LL_SetupStage((USBD_HandleTypeDef*)hpcd->pData, (uint8_t *)hpcd->Setup);
8006720: 687b ldr r3, [r7, #4]
8006722: f8d3 22e8 ldr.w r2, [r3, #744] ; 0x2e8
8006726: 687b ldr r3, [r7, #4]
8006728: f503 732c add.w r3, r3, #688 ; 0x2b0
800672c: 4619 mov r1, r3
800672e: 4610 mov r0, r2
8006730: f7fe fdd1 bl 80052d6 <USBD_LL_SetupStage>
}
8006734: bf00 nop
8006736: 3708 adds r7, #8
8006738: 46bd mov sp, r7
800673a: bd80 pop {r7, pc}
0800673c <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 */
{
800673c: b580 push {r7, lr}
800673e: b082 sub sp, #8
8006740: af00 add r7, sp, #0
8006742: 6078 str r0, [r7, #4]
8006744: 460b mov r3, r1
8006746: 70fb strb r3, [r7, #3]
USBD_LL_DataOutStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->OUT_ep[epnum].xfer_buff);
8006748: 687b ldr r3, [r7, #4]
800674a: f8d3 02e8 ldr.w r0, [r3, #744] ; 0x2e8
800674e: 78fa ldrb r2, [r7, #3]
8006750: 6879 ldr r1, [r7, #4]
8006752: 4613 mov r3, r2
8006754: 009b lsls r3, r3, #2
8006756: 4413 add r3, r2
8006758: 00db lsls r3, r3, #3
800675a: 440b add r3, r1
800675c: f503 73be add.w r3, r3, #380 ; 0x17c
8006760: 681a ldr r2, [r3, #0]
8006762: 78fb ldrb r3, [r7, #3]
8006764: 4619 mov r1, r3
8006766: f7fe fe01 bl 800536c <USBD_LL_DataOutStage>
}
800676a: bf00 nop
800676c: 3708 adds r7, #8
800676e: 46bd mov sp, r7
8006770: bd80 pop {r7, pc}
08006772 <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 */
{
8006772: b580 push {r7, lr}
8006774: b082 sub sp, #8
8006776: af00 add r7, sp, #0
8006778: 6078 str r0, [r7, #4]
800677a: 460b mov r3, r1
800677c: 70fb strb r3, [r7, #3]
USBD_LL_DataInStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->IN_ep[epnum].xfer_buff);
800677e: 687b ldr r3, [r7, #4]
8006780: f8d3 02e8 ldr.w r0, [r3, #744] ; 0x2e8
8006784: 78fa ldrb r2, [r7, #3]
8006786: 6879 ldr r1, [r7, #4]
8006788: 4613 mov r3, r2
800678a: 009b lsls r3, r3, #2
800678c: 4413 add r3, r2
800678e: 00db lsls r3, r3, #3
8006790: 440b add r3, r1
8006792: 333c adds r3, #60 ; 0x3c
8006794: 681a ldr r2, [r3, #0]
8006796: 78fb ldrb r3, [r7, #3]
8006798: 4619 mov r1, r3
800679a: f7fe fe58 bl 800544e <USBD_LL_DataInStage>
}
800679e: bf00 nop
80067a0: 3708 adds r7, #8
80067a2: 46bd mov sp, r7
80067a4: bd80 pop {r7, pc}
080067a6 <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 */
{
80067a6: b580 push {r7, lr}
80067a8: b082 sub sp, #8
80067aa: af00 add r7, sp, #0
80067ac: 6078 str r0, [r7, #4]
USBD_LL_SOF((USBD_HandleTypeDef*)hpcd->pData);
80067ae: 687b ldr r3, [r7, #4]
80067b0: f8d3 32e8 ldr.w r3, [r3, #744] ; 0x2e8
80067b4: 4618 mov r0, r3
80067b6: f7fe ff68 bl 800568a <USBD_LL_SOF>
}
80067ba: bf00 nop
80067bc: 3708 adds r7, #8
80067be: 46bd mov sp, r7
80067c0: bd80 pop {r7, pc}
080067c2 <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 */
{
80067c2: b580 push {r7, lr}
80067c4: b084 sub sp, #16
80067c6: af00 add r7, sp, #0
80067c8: 6078 str r0, [r7, #4]
USBD_SpeedTypeDef speed = USBD_SPEED_FULL;
80067ca: 2301 movs r3, #1
80067cc: 73fb strb r3, [r7, #15]
if ( hpcd->Init.speed != PCD_SPEED_FULL)
80067ce: 687b ldr r3, [r7, #4]
80067d0: 689b ldr r3, [r3, #8]
80067d2: 2b02 cmp r3, #2
80067d4: d001 beq.n 80067da <HAL_PCD_ResetCallback+0x18>
{
Error_Handler();
80067d6: f7f9 fda7 bl 8000328 <Error_Handler>
}
/* Set Speed. */
USBD_LL_SetSpeed((USBD_HandleTypeDef*)hpcd->pData, speed);
80067da: 687b ldr r3, [r7, #4]
80067dc: f8d3 32e8 ldr.w r3, [r3, #744] ; 0x2e8
80067e0: 7bfa ldrb r2, [r7, #15]
80067e2: 4611 mov r1, r2
80067e4: 4618 mov r0, r3
80067e6: f7fe ff18 bl 800561a <USBD_LL_SetSpeed>
/* Reset Device. */
USBD_LL_Reset((USBD_HandleTypeDef*)hpcd->pData);
80067ea: 687b ldr r3, [r7, #4]
80067ec: f8d3 32e8 ldr.w r3, [r3, #744] ; 0x2e8
80067f0: 4618 mov r0, r3
80067f2: f7fe fed1 bl 8005598 <USBD_LL_Reset>
}
80067f6: bf00 nop
80067f8: 3710 adds r7, #16
80067fa: 46bd mov sp, r7
80067fc: bd80 pop {r7, pc}
...
08006800 <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 */
{
8006800: b580 push {r7, lr}
8006802: b082 sub sp, #8
8006804: af00 add r7, sp, #0
8006806: 6078 str r0, [r7, #4]
/* Inform USB library that core enters in suspend Mode. */
USBD_LL_Suspend((USBD_HandleTypeDef*)hpcd->pData);
8006808: 687b ldr r3, [r7, #4]
800680a: f8d3 32e8 ldr.w r3, [r3, #744] ; 0x2e8
800680e: 4618 mov r0, r3
8006810: f7fe ff12 bl 8005638 <USBD_LL_Suspend>
/* Enter in STOP mode. */
/* USER CODE BEGIN 2 */
if (hpcd->Init.low_power_enable)
8006814: 687b ldr r3, [r7, #4]
8006816: 699b ldr r3, [r3, #24]
8006818: 2b00 cmp r3, #0
800681a: d005 beq.n 8006828 <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));
800681c: 4b04 ldr r3, [pc, #16] ; (8006830 <HAL_PCD_SuspendCallback+0x30>)
800681e: 691b ldr r3, [r3, #16]
8006820: 4a03 ldr r2, [pc, #12] ; (8006830 <HAL_PCD_SuspendCallback+0x30>)
8006822: f043 0306 orr.w r3, r3, #6
8006826: 6113 str r3, [r2, #16]
}
/* USER CODE END 2 */
}
8006828: bf00 nop
800682a: 3708 adds r7, #8
800682c: 46bd mov sp, r7
800682e: bd80 pop {r7, pc}
8006830: e000ed00 .word 0xe000ed00
08006834 <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 */
{
8006834: b580 push {r7, lr}
8006836: b082 sub sp, #8
8006838: af00 add r7, sp, #0
800683a: 6078 str r0, [r7, #4]
/* USER CODE BEGIN 3 */
/* USER CODE END 3 */
USBD_LL_Resume((USBD_HandleTypeDef*)hpcd->pData);
800683c: 687b ldr r3, [r7, #4]
800683e: f8d3 32e8 ldr.w r3, [r3, #744] ; 0x2e8
8006842: 4618 mov r0, r3
8006844: f7fe ff0c bl 8005660 <USBD_LL_Resume>
}
8006848: bf00 nop
800684a: 3708 adds r7, #8
800684c: 46bd mov sp, r7
800684e: bd80 pop {r7, pc}
08006850 <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)
{
8006850: b580 push {r7, lr}
8006852: b082 sub sp, #8
8006854: af00 add r7, sp, #0
8006856: 6078 str r0, [r7, #4]
/* Init USB Ip. */
/* Link the driver to the stack. */
hpcd_USB_FS.pData = pdev;
8006858: 4a28 ldr r2, [pc, #160] ; (80068fc <USBD_LL_Init+0xac>)
800685a: 687b ldr r3, [r7, #4]
800685c: f8c2 32e8 str.w r3, [r2, #744] ; 0x2e8
pdev->pData = &hpcd_USB_FS;
8006860: 687b ldr r3, [r7, #4]
8006862: 4a26 ldr r2, [pc, #152] ; (80068fc <USBD_LL_Init+0xac>)
8006864: f8c3 22c0 str.w r2, [r3, #704] ; 0x2c0
hpcd_USB_FS.Instance = USB;
8006868: 4b24 ldr r3, [pc, #144] ; (80068fc <USBD_LL_Init+0xac>)
800686a: 4a25 ldr r2, [pc, #148] ; (8006900 <USBD_LL_Init+0xb0>)
800686c: 601a str r2, [r3, #0]
hpcd_USB_FS.Init.dev_endpoints = 8;
800686e: 4b23 ldr r3, [pc, #140] ; (80068fc <USBD_LL_Init+0xac>)
8006870: 2208 movs r2, #8
8006872: 605a str r2, [r3, #4]
hpcd_USB_FS.Init.speed = PCD_SPEED_FULL;
8006874: 4b21 ldr r3, [pc, #132] ; (80068fc <USBD_LL_Init+0xac>)
8006876: 2202 movs r2, #2
8006878: 609a str r2, [r3, #8]
hpcd_USB_FS.Init.low_power_enable = DISABLE;
800687a: 4b20 ldr r3, [pc, #128] ; (80068fc <USBD_LL_Init+0xac>)
800687c: 2200 movs r2, #0
800687e: 619a str r2, [r3, #24]
hpcd_USB_FS.Init.lpm_enable = DISABLE;
8006880: 4b1e ldr r3, [pc, #120] ; (80068fc <USBD_LL_Init+0xac>)
8006882: 2200 movs r2, #0
8006884: 61da str r2, [r3, #28]
hpcd_USB_FS.Init.battery_charging_enable = DISABLE;
8006886: 4b1d ldr r3, [pc, #116] ; (80068fc <USBD_LL_Init+0xac>)
8006888: 2200 movs r2, #0
800688a: 621a str r2, [r3, #32]
if (HAL_PCD_Init(&hpcd_USB_FS) != HAL_OK)
800688c: 481b ldr r0, [pc, #108] ; (80068fc <USBD_LL_Init+0xac>)
800688e: f7fa f8ed bl 8000a6c <HAL_PCD_Init>
8006892: 4603 mov r3, r0
8006894: 2b00 cmp r3, #0
8006896: d001 beq.n 800689c <USBD_LL_Init+0x4c>
{
Error_Handler( );
8006898: f7f9 fd46 bl 8000328 <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);
800689c: 687b ldr r3, [r7, #4]
800689e: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0
80068a2: 2318 movs r3, #24
80068a4: 2200 movs r2, #0
80068a6: 2100 movs r1, #0
80068a8: f7fb fc21 bl 80020ee <HAL_PCDEx_PMAConfig>
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x80 , PCD_SNG_BUF, 0x58);
80068ac: 687b ldr r3, [r7, #4]
80068ae: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0
80068b2: 2358 movs r3, #88 ; 0x58
80068b4: 2200 movs r2, #0
80068b6: 2180 movs r1, #128 ; 0x80
80068b8: f7fb fc19 bl 80020ee <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);
80068bc: 687b ldr r3, [r7, #4]
80068be: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0
80068c2: 23c0 movs r3, #192 ; 0xc0
80068c4: 2200 movs r2, #0
80068c6: 2181 movs r1, #129 ; 0x81
80068c8: f7fb fc11 bl 80020ee <HAL_PCDEx_PMAConfig>
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x01 , PCD_SNG_BUF, 0x110);
80068cc: 687b ldr r3, [r7, #4]
80068ce: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0
80068d2: f44f 7388 mov.w r3, #272 ; 0x110
80068d6: 2200 movs r2, #0
80068d8: 2101 movs r1, #1
80068da: f7fb fc08 bl 80020ee <HAL_PCDEx_PMAConfig>
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x82 , PCD_SNG_BUF, 0x100);
80068de: 687b ldr r3, [r7, #4]
80068e0: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0
80068e4: f44f 7380 mov.w r3, #256 ; 0x100
80068e8: 2200 movs r2, #0
80068ea: 2182 movs r1, #130 ; 0x82
80068ec: f7fb fbff bl 80020ee <HAL_PCDEx_PMAConfig>
/* USER CODE END EndPoint_Configuration_CDC */
return USBD_OK;
80068f0: 2300 movs r3, #0
}
80068f2: 4618 mov r0, r3
80068f4: 3708 adds r7, #8
80068f6: 46bd mov sp, r7
80068f8: bd80 pop {r7, pc}
80068fa: bf00 nop
80068fc: 20001054 .word 0x20001054
8006900: 40005c00 .word 0x40005c00
08006904 <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)
{
8006904: b580 push {r7, lr}
8006906: b084 sub sp, #16
8006908: af00 add r7, sp, #0
800690a: 6078 str r0, [r7, #4]
HAL_StatusTypeDef hal_status = HAL_OK;
800690c: 2300 movs r3, #0
800690e: 73fb strb r3, [r7, #15]
USBD_StatusTypeDef usb_status = USBD_OK;
8006910: 2300 movs r3, #0
8006912: 73bb strb r3, [r7, #14]
hal_status = HAL_PCD_Start(pdev->pData);
8006914: 687b ldr r3, [r7, #4]
8006916: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
800691a: 4618 mov r0, r3
800691c: f7fa f9b1 bl 8000c82 <HAL_PCD_Start>
8006920: 4603 mov r3, r0
8006922: 73fb strb r3, [r7, #15]
usb_status = USBD_Get_USB_Status(hal_status);
8006924: 7bfb ldrb r3, [r7, #15]
8006926: 4618 mov r0, r3
8006928: f000 f94e bl 8006bc8 <USBD_Get_USB_Status>
800692c: 4603 mov r3, r0
800692e: 73bb strb r3, [r7, #14]
return usb_status;
8006930: 7bbb ldrb r3, [r7, #14]
}
8006932: 4618 mov r0, r3
8006934: 3710 adds r7, #16
8006936: 46bd mov sp, r7
8006938: bd80 pop {r7, pc}
0800693a <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)
{
800693a: b580 push {r7, lr}
800693c: b084 sub sp, #16
800693e: af00 add r7, sp, #0
8006940: 6078 str r0, [r7, #4]
8006942: 4608 mov r0, r1
8006944: 4611 mov r1, r2
8006946: 461a mov r2, r3
8006948: 4603 mov r3, r0
800694a: 70fb strb r3, [r7, #3]
800694c: 460b mov r3, r1
800694e: 70bb strb r3, [r7, #2]
8006950: 4613 mov r3, r2
8006952: 803b strh r3, [r7, #0]
HAL_StatusTypeDef hal_status = HAL_OK;
8006954: 2300 movs r3, #0
8006956: 73fb strb r3, [r7, #15]
USBD_StatusTypeDef usb_status = USBD_OK;
8006958: 2300 movs r3, #0
800695a: 73bb strb r3, [r7, #14]
hal_status = HAL_PCD_EP_Open(pdev->pData, ep_addr, ep_mps, ep_type);
800695c: 687b ldr r3, [r7, #4]
800695e: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0
8006962: 78bb ldrb r3, [r7, #2]
8006964: 883a ldrh r2, [r7, #0]
8006966: 78f9 ldrb r1, [r7, #3]
8006968: f7fa fb2b bl 8000fc2 <HAL_PCD_EP_Open>
800696c: 4603 mov r3, r0
800696e: 73fb strb r3, [r7, #15]
usb_status = USBD_Get_USB_Status(hal_status);
8006970: 7bfb ldrb r3, [r7, #15]
8006972: 4618 mov r0, r3
8006974: f000 f928 bl 8006bc8 <USBD_Get_USB_Status>
8006978: 4603 mov r3, r0
800697a: 73bb strb r3, [r7, #14]
return usb_status;
800697c: 7bbb ldrb r3, [r7, #14]
}
800697e: 4618 mov r0, r3
8006980: 3710 adds r7, #16
8006982: 46bd mov sp, r7
8006984: bd80 pop {r7, pc}
08006986 <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)
{
8006986: b580 push {r7, lr}
8006988: b084 sub sp, #16
800698a: af00 add r7, sp, #0
800698c: 6078 str r0, [r7, #4]
800698e: 460b mov r3, r1
8006990: 70fb strb r3, [r7, #3]
HAL_StatusTypeDef hal_status = HAL_OK;
8006992: 2300 movs r3, #0
8006994: 73fb strb r3, [r7, #15]
USBD_StatusTypeDef usb_status = USBD_OK;
8006996: 2300 movs r3, #0
8006998: 73bb strb r3, [r7, #14]
hal_status = HAL_PCD_EP_Close(pdev->pData, ep_addr);
800699a: 687b ldr r3, [r7, #4]
800699c: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
80069a0: 78fa ldrb r2, [r7, #3]
80069a2: 4611 mov r1, r2
80069a4: 4618 mov r0, r3
80069a6: f7fa fb72 bl 800108e <HAL_PCD_EP_Close>
80069aa: 4603 mov r3, r0
80069ac: 73fb strb r3, [r7, #15]
usb_status = USBD_Get_USB_Status(hal_status);
80069ae: 7bfb ldrb r3, [r7, #15]
80069b0: 4618 mov r0, r3
80069b2: f000 f909 bl 8006bc8 <USBD_Get_USB_Status>
80069b6: 4603 mov r3, r0
80069b8: 73bb strb r3, [r7, #14]
return usb_status;
80069ba: 7bbb ldrb r3, [r7, #14]
}
80069bc: 4618 mov r0, r3
80069be: 3710 adds r7, #16
80069c0: 46bd mov sp, r7
80069c2: bd80 pop {r7, pc}
080069c4 <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)
{
80069c4: b580 push {r7, lr}
80069c6: b084 sub sp, #16
80069c8: af00 add r7, sp, #0
80069ca: 6078 str r0, [r7, #4]
80069cc: 460b mov r3, r1
80069ce: 70fb strb r3, [r7, #3]
HAL_StatusTypeDef hal_status = HAL_OK;
80069d0: 2300 movs r3, #0
80069d2: 73fb strb r3, [r7, #15]
USBD_StatusTypeDef usb_status = USBD_OK;
80069d4: 2300 movs r3, #0
80069d6: 73bb strb r3, [r7, #14]
hal_status = HAL_PCD_EP_SetStall(pdev->pData, ep_addr);
80069d8: 687b ldr r3, [r7, #4]
80069da: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
80069de: 78fa ldrb r2, [r7, #3]
80069e0: 4611 mov r1, r2
80069e2: 4618 mov r0, r3
80069e4: f7fa fc32 bl 800124c <HAL_PCD_EP_SetStall>
80069e8: 4603 mov r3, r0
80069ea: 73fb strb r3, [r7, #15]
usb_status = USBD_Get_USB_Status(hal_status);
80069ec: 7bfb ldrb r3, [r7, #15]
80069ee: 4618 mov r0, r3
80069f0: f000 f8ea bl 8006bc8 <USBD_Get_USB_Status>
80069f4: 4603 mov r3, r0
80069f6: 73bb strb r3, [r7, #14]
return usb_status;
80069f8: 7bbb ldrb r3, [r7, #14]
}
80069fa: 4618 mov r0, r3
80069fc: 3710 adds r7, #16
80069fe: 46bd mov sp, r7
8006a00: bd80 pop {r7, pc}
08006a02 <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)
{
8006a02: b580 push {r7, lr}
8006a04: b084 sub sp, #16
8006a06: af00 add r7, sp, #0
8006a08: 6078 str r0, [r7, #4]
8006a0a: 460b mov r3, r1
8006a0c: 70fb strb r3, [r7, #3]
HAL_StatusTypeDef hal_status = HAL_OK;
8006a0e: 2300 movs r3, #0
8006a10: 73fb strb r3, [r7, #15]
USBD_StatusTypeDef usb_status = USBD_OK;
8006a12: 2300 movs r3, #0
8006a14: 73bb strb r3, [r7, #14]
hal_status = HAL_PCD_EP_ClrStall(pdev->pData, ep_addr);
8006a16: 687b ldr r3, [r7, #4]
8006a18: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
8006a1c: 78fa ldrb r2, [r7, #3]
8006a1e: 4611 mov r1, r2
8006a20: 4618 mov r0, r3
8006a22: f7fa fc73 bl 800130c <HAL_PCD_EP_ClrStall>
8006a26: 4603 mov r3, r0
8006a28: 73fb strb r3, [r7, #15]
usb_status = USBD_Get_USB_Status(hal_status);
8006a2a: 7bfb ldrb r3, [r7, #15]
8006a2c: 4618 mov r0, r3
8006a2e: f000 f8cb bl 8006bc8 <USBD_Get_USB_Status>
8006a32: 4603 mov r3, r0
8006a34: 73bb strb r3, [r7, #14]
return usb_status;
8006a36: 7bbb ldrb r3, [r7, #14]
}
8006a38: 4618 mov r0, r3
8006a3a: 3710 adds r7, #16
8006a3c: 46bd mov sp, r7
8006a3e: bd80 pop {r7, pc}
08006a40 <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)
{
8006a40: b480 push {r7}
8006a42: b085 sub sp, #20
8006a44: af00 add r7, sp, #0
8006a46: 6078 str r0, [r7, #4]
8006a48: 460b mov r3, r1
8006a4a: 70fb strb r3, [r7, #3]
PCD_HandleTypeDef *hpcd = (PCD_HandleTypeDef*) pdev->pData;
8006a4c: 687b ldr r3, [r7, #4]
8006a4e: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
8006a52: 60fb str r3, [r7, #12]
if((ep_addr & 0x80) == 0x80)
8006a54: f997 3003 ldrsb.w r3, [r7, #3]
8006a58: 2b00 cmp r3, #0
8006a5a: da0c bge.n 8006a76 <USBD_LL_IsStallEP+0x36>
{
return hpcd->IN_ep[ep_addr & 0x7F].is_stall;
8006a5c: 78fb ldrb r3, [r7, #3]
8006a5e: f003 037f and.w r3, r3, #127 ; 0x7f
8006a62: 68f9 ldr r1, [r7, #12]
8006a64: 1c5a adds r2, r3, #1
8006a66: 4613 mov r3, r2
8006a68: 009b lsls r3, r3, #2
8006a6a: 4413 add r3, r2
8006a6c: 00db lsls r3, r3, #3
8006a6e: 440b add r3, r1
8006a70: 3302 adds r3, #2
8006a72: 781b ldrb r3, [r3, #0]
8006a74: e00b b.n 8006a8e <USBD_LL_IsStallEP+0x4e>
}
else
{
return hpcd->OUT_ep[ep_addr & 0x7F].is_stall;
8006a76: 78fb ldrb r3, [r7, #3]
8006a78: f003 027f and.w r2, r3, #127 ; 0x7f
8006a7c: 68f9 ldr r1, [r7, #12]
8006a7e: 4613 mov r3, r2
8006a80: 009b lsls r3, r3, #2
8006a82: 4413 add r3, r2
8006a84: 00db lsls r3, r3, #3
8006a86: 440b add r3, r1
8006a88: f503 73b5 add.w r3, r3, #362 ; 0x16a
8006a8c: 781b ldrb r3, [r3, #0]
}
}
8006a8e: 4618 mov r0, r3
8006a90: 3714 adds r7, #20
8006a92: 46bd mov sp, r7
8006a94: bc80 pop {r7}
8006a96: 4770 bx lr
08006a98 <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)
{
8006a98: b580 push {r7, lr}
8006a9a: b084 sub sp, #16
8006a9c: af00 add r7, sp, #0
8006a9e: 6078 str r0, [r7, #4]
8006aa0: 460b mov r3, r1
8006aa2: 70fb strb r3, [r7, #3]
HAL_StatusTypeDef hal_status = HAL_OK;
8006aa4: 2300 movs r3, #0
8006aa6: 73fb strb r3, [r7, #15]
USBD_StatusTypeDef usb_status = USBD_OK;
8006aa8: 2300 movs r3, #0
8006aaa: 73bb strb r3, [r7, #14]
hal_status = HAL_PCD_SetAddress(pdev->pData, dev_addr);
8006aac: 687b ldr r3, [r7, #4]
8006aae: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
8006ab2: 78fa ldrb r2, [r7, #3]
8006ab4: 4611 mov r1, r2
8006ab6: 4618 mov r0, r3
8006ab8: f7fa fa5e bl 8000f78 <HAL_PCD_SetAddress>
8006abc: 4603 mov r3, r0
8006abe: 73fb strb r3, [r7, #15]
usb_status = USBD_Get_USB_Status(hal_status);
8006ac0: 7bfb ldrb r3, [r7, #15]
8006ac2: 4618 mov r0, r3
8006ac4: f000 f880 bl 8006bc8 <USBD_Get_USB_Status>
8006ac8: 4603 mov r3, r0
8006aca: 73bb strb r3, [r7, #14]
return usb_status;
8006acc: 7bbb ldrb r3, [r7, #14]
}
8006ace: 4618 mov r0, r3
8006ad0: 3710 adds r7, #16
8006ad2: 46bd mov sp, r7
8006ad4: bd80 pop {r7, pc}
08006ad6 <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)
{
8006ad6: b580 push {r7, lr}
8006ad8: b086 sub sp, #24
8006ada: af00 add r7, sp, #0
8006adc: 60f8 str r0, [r7, #12]
8006ade: 607a str r2, [r7, #4]
8006ae0: 461a mov r2, r3
8006ae2: 460b mov r3, r1
8006ae4: 72fb strb r3, [r7, #11]
8006ae6: 4613 mov r3, r2
8006ae8: 813b strh r3, [r7, #8]
HAL_StatusTypeDef hal_status = HAL_OK;
8006aea: 2300 movs r3, #0
8006aec: 75fb strb r3, [r7, #23]
USBD_StatusTypeDef usb_status = USBD_OK;
8006aee: 2300 movs r3, #0
8006af0: 75bb strb r3, [r7, #22]
hal_status = HAL_PCD_EP_Transmit(pdev->pData, ep_addr, pbuf, size);
8006af2: 68fb ldr r3, [r7, #12]
8006af4: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0
8006af8: 893b ldrh r3, [r7, #8]
8006afa: 7af9 ldrb r1, [r7, #11]
8006afc: 687a ldr r2, [r7, #4]
8006afe: f7fa fb62 bl 80011c6 <HAL_PCD_EP_Transmit>
8006b02: 4603 mov r3, r0
8006b04: 75fb strb r3, [r7, #23]
usb_status = USBD_Get_USB_Status(hal_status);
8006b06: 7dfb ldrb r3, [r7, #23]
8006b08: 4618 mov r0, r3
8006b0a: f000 f85d bl 8006bc8 <USBD_Get_USB_Status>
8006b0e: 4603 mov r3, r0
8006b10: 75bb strb r3, [r7, #22]
return usb_status;
8006b12: 7dbb ldrb r3, [r7, #22]
}
8006b14: 4618 mov r0, r3
8006b16: 3718 adds r7, #24
8006b18: 46bd mov sp, r7
8006b1a: bd80 pop {r7, pc}
08006b1c <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)
{
8006b1c: b580 push {r7, lr}
8006b1e: b086 sub sp, #24
8006b20: af00 add r7, sp, #0
8006b22: 60f8 str r0, [r7, #12]
8006b24: 607a str r2, [r7, #4]
8006b26: 461a mov r2, r3
8006b28: 460b mov r3, r1
8006b2a: 72fb strb r3, [r7, #11]
8006b2c: 4613 mov r3, r2
8006b2e: 813b strh r3, [r7, #8]
HAL_StatusTypeDef hal_status = HAL_OK;
8006b30: 2300 movs r3, #0
8006b32: 75fb strb r3, [r7, #23]
USBD_StatusTypeDef usb_status = USBD_OK;
8006b34: 2300 movs r3, #0
8006b36: 75bb strb r3, [r7, #22]
hal_status = HAL_PCD_EP_Receive(pdev->pData, ep_addr, pbuf, size);
8006b38: 68fb ldr r3, [r7, #12]
8006b3a: f8d3 02c0 ldr.w r0, [r3, #704] ; 0x2c0
8006b3e: 893b ldrh r3, [r7, #8]
8006b40: 7af9 ldrb r1, [r7, #11]
8006b42: 687a ldr r2, [r7, #4]
8006b44: f7fa faeb bl 800111e <HAL_PCD_EP_Receive>
8006b48: 4603 mov r3, r0
8006b4a: 75fb strb r3, [r7, #23]
usb_status = USBD_Get_USB_Status(hal_status);
8006b4c: 7dfb ldrb r3, [r7, #23]
8006b4e: 4618 mov r0, r3
8006b50: f000 f83a bl 8006bc8 <USBD_Get_USB_Status>
8006b54: 4603 mov r3, r0
8006b56: 75bb strb r3, [r7, #22]
return usb_status;
8006b58: 7dbb ldrb r3, [r7, #22]
}
8006b5a: 4618 mov r0, r3
8006b5c: 3718 adds r7, #24
8006b5e: 46bd mov sp, r7
8006b60: bd80 pop {r7, pc}
08006b62 <USBD_LL_GetRxDataSize>:
* @param pdev: Device handle
* @param ep_addr: Endpoint number
* @retval Recived Data Size
*/
uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
{
8006b62: b580 push {r7, lr}
8006b64: b082 sub sp, #8
8006b66: af00 add r7, sp, #0
8006b68: 6078 str r0, [r7, #4]
8006b6a: 460b mov r3, r1
8006b6c: 70fb strb r3, [r7, #3]
return HAL_PCD_EP_GetRxCount((PCD_HandleTypeDef*) pdev->pData, ep_addr);
8006b6e: 687b ldr r3, [r7, #4]
8006b70: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
8006b74: 78fa ldrb r2, [r7, #3]
8006b76: 4611 mov r1, r2
8006b78: 4618 mov r0, r3
8006b7a: f7fa fb0d bl 8001198 <HAL_PCD_EP_GetRxCount>
8006b7e: 4603 mov r3, r0
}
8006b80: 4618 mov r0, r3
8006b82: 3708 adds r7, #8
8006b84: 46bd mov sp, r7
8006b86: bd80 pop {r7, pc}
08006b88 <USBD_static_malloc>:
* @brief Static single allocation.
* @param size: Size of allocated memory
* @retval None
*/
void *USBD_static_malloc(uint32_t size)
{
8006b88: b480 push {r7}
8006b8a: b083 sub sp, #12
8006b8c: af00 add r7, sp, #0
8006b8e: 6078 str r0, [r7, #4]
static uint32_t mem[(sizeof(USBD_CDC_HandleTypeDef)/4)+1];/* On 32-bit boundary */
return mem;
8006b90: 4b02 ldr r3, [pc, #8] ; (8006b9c <USBD_static_malloc+0x14>)
}
8006b92: 4618 mov r0, r3
8006b94: 370c adds r7, #12
8006b96: 46bd mov sp, r7
8006b98: bc80 pop {r7}
8006b9a: 4770 bx lr
8006b9c: 2000019c .word 0x2000019c
08006ba0 <USBD_static_free>:
* @brief Dummy memory free
* @param p: Pointer to allocated memory address
* @retval None
*/
void USBD_static_free(void *p)
{
8006ba0: b480 push {r7}
8006ba2: b083 sub sp, #12
8006ba4: af00 add r7, sp, #0
8006ba6: 6078 str r0, [r7, #4]
}
8006ba8: bf00 nop
8006baa: 370c adds r7, #12
8006bac: 46bd mov sp, r7
8006bae: bc80 pop {r7}
8006bb0: 4770 bx lr
08006bb2 <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 */
{
8006bb2: b480 push {r7}
8006bb4: b083 sub sp, #12
8006bb6: af00 add r7, sp, #0
8006bb8: 6078 str r0, [r7, #4]
8006bba: 460b mov r3, r1
8006bbc: 70fb strb r3, [r7, #3]
{
/* Configure High connection state. */
}
/* USER CODE END 6 */
}
8006bbe: bf00 nop
8006bc0: 370c adds r7, #12
8006bc2: 46bd mov sp, r7
8006bc4: bc80 pop {r7}
8006bc6: 4770 bx lr
08006bc8 <USBD_Get_USB_Status>:
* @brief Retuns the USB status depending on the HAL status:
* @param hal_status: HAL status
* @retval USB status
*/
USBD_StatusTypeDef USBD_Get_USB_Status(HAL_StatusTypeDef hal_status)
{
8006bc8: b480 push {r7}
8006bca: b085 sub sp, #20
8006bcc: af00 add r7, sp, #0
8006bce: 4603 mov r3, r0
8006bd0: 71fb strb r3, [r7, #7]
USBD_StatusTypeDef usb_status = USBD_OK;
8006bd2: 2300 movs r3, #0
8006bd4: 73fb strb r3, [r7, #15]
switch (hal_status)
8006bd6: 79fb ldrb r3, [r7, #7]
8006bd8: 2b03 cmp r3, #3
8006bda: d817 bhi.n 8006c0c <USBD_Get_USB_Status+0x44>
8006bdc: a201 add r2, pc, #4 ; (adr r2, 8006be4 <USBD_Get_USB_Status+0x1c>)
8006bde: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8006be2: bf00 nop
8006be4: 08006bf5 .word 0x08006bf5
8006be8: 08006bfb .word 0x08006bfb
8006bec: 08006c01 .word 0x08006c01
8006bf0: 08006c07 .word 0x08006c07
{
case HAL_OK :
usb_status = USBD_OK;
8006bf4: 2300 movs r3, #0
8006bf6: 73fb strb r3, [r7, #15]
break;
8006bf8: e00b b.n 8006c12 <USBD_Get_USB_Status+0x4a>
case HAL_ERROR :
usb_status = USBD_FAIL;
8006bfa: 2302 movs r3, #2
8006bfc: 73fb strb r3, [r7, #15]
break;
8006bfe: e008 b.n 8006c12 <USBD_Get_USB_Status+0x4a>
case HAL_BUSY :
usb_status = USBD_BUSY;
8006c00: 2301 movs r3, #1
8006c02: 73fb strb r3, [r7, #15]
break;
8006c04: e005 b.n 8006c12 <USBD_Get_USB_Status+0x4a>
case HAL_TIMEOUT :
usb_status = USBD_FAIL;
8006c06: 2302 movs r3, #2
8006c08: 73fb strb r3, [r7, #15]
break;
8006c0a: e002 b.n 8006c12 <USBD_Get_USB_Status+0x4a>
default :
usb_status = USBD_FAIL;
8006c0c: 2302 movs r3, #2
8006c0e: 73fb strb r3, [r7, #15]
break;
8006c10: bf00 nop
}
return usb_status;
8006c12: 7bfb ldrb r3, [r7, #15]
}
8006c14: 4618 mov r0, r3
8006c16: 3714 adds r7, #20
8006c18: 46bd mov sp, r7
8006c1a: bc80 pop {r7}
8006c1c: 4770 bx lr
8006c1e: bf00 nop
08006c20 <__libc_init_array>:
8006c20: b570 push {r4, r5, r6, lr}
8006c22: 2500 movs r5, #0
8006c24: 4e0c ldr r6, [pc, #48] ; (8006c58 <__libc_init_array+0x38>)
8006c26: 4c0d ldr r4, [pc, #52] ; (8006c5c <__libc_init_array+0x3c>)
8006c28: 1ba4 subs r4, r4, r6
8006c2a: 10a4 asrs r4, r4, #2
8006c2c: 42a5 cmp r5, r4
8006c2e: d109 bne.n 8006c44 <__libc_init_array+0x24>
8006c30: f000 f822 bl 8006c78 <_init>
8006c34: 2500 movs r5, #0
8006c36: 4e0a ldr r6, [pc, #40] ; (8006c60 <__libc_init_array+0x40>)
8006c38: 4c0a ldr r4, [pc, #40] ; (8006c64 <__libc_init_array+0x44>)
8006c3a: 1ba4 subs r4, r4, r6
8006c3c: 10a4 asrs r4, r4, #2
8006c3e: 42a5 cmp r5, r4
8006c40: d105 bne.n 8006c4e <__libc_init_array+0x2e>
8006c42: bd70 pop {r4, r5, r6, pc}
8006c44: f856 3025 ldr.w r3, [r6, r5, lsl #2]
8006c48: 4798 blx r3
8006c4a: 3501 adds r5, #1
8006c4c: e7ee b.n 8006c2c <__libc_init_array+0xc>
8006c4e: f856 3025 ldr.w r3, [r6, r5, lsl #2]
8006c52: 4798 blx r3
8006c54: 3501 adds r5, #1
8006c56: e7f2 b.n 8006c3e <__libc_init_array+0x1e>
8006c58: 08006d04 .word 0x08006d04
8006c5c: 08006d04 .word 0x08006d04
8006c60: 08006d04 .word 0x08006d04
8006c64: 08006d08 .word 0x08006d08
08006c68 <memset>:
8006c68: 4603 mov r3, r0
8006c6a: 4402 add r2, r0
8006c6c: 4293 cmp r3, r2
8006c6e: d100 bne.n 8006c72 <memset+0xa>
8006c70: 4770 bx lr
8006c72: f803 1b01 strb.w r1, [r3], #1
8006c76: e7f9 b.n 8006c6c <memset+0x4>
08006c78 <_init>:
8006c78: b5f8 push {r3, r4, r5, r6, r7, lr}
8006c7a: bf00 nop
8006c7c: bcf8 pop {r3, r4, r5, r6, r7}
8006c7e: bc08 pop {r3}
8006c80: 469e mov lr, r3
8006c82: 4770 bx lr
08006c84 <_fini>:
8006c84: b5f8 push {r3, r4, r5, r6, r7, lr}
8006c86: bf00 nop
8006c88: bcf8 pop {r3, r4, r5, r6, r7}
8006c8a: bc08 pop {r3}
8006c8c: 469e mov lr, r3
8006c8e: 4770 bx lr