Files
PFC/Code/STM32/Debug/F103C8-PFC.list

15087 lines
550 KiB
Plaintext

F103C8-PFC.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 000057fc 0800010c 0800010c 0001010c 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .rodata 00000234 08005908 08005908 00015908 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .ARM.extab 00000000 08005b3c 08005b3c 00020070 2**0
CONTENTS
4 .ARM 00000000 08005b3c 08005b3c 00020070 2**0
CONTENTS
5 .preinit_array 00000000 08005b3c 08005b3c 00020070 2**0
CONTENTS, ALLOC, LOAD, DATA
6 .init_array 00000008 08005b3c 08005b3c 00015b3c 2**2
CONTENTS, ALLOC, LOAD, DATA
7 .fini_array 00000008 08005b44 08005b44 00015b44 2**2
CONTENTS, ALLOC, LOAD, DATA
8 .data 00000070 20000000 08005b4c 00020000 2**2
CONTENTS, ALLOC, LOAD, DATA
9 .bss 00000834 20000070 08005bbc 00020070 2**2
ALLOC
10 ._user_heap_stack 00000604 200008a4 08005bbc 000208a4 2**0
ALLOC
11 .ARM.attributes 00000029 00000000 00000000 00020070 2**0
CONTENTS, READONLY
12 .debug_info 00013e34 00000000 00000000 00020099 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
13 .debug_abbrev 000031e2 00000000 00000000 00033ecd 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
14 .debug_aranges 000010d0 00000000 00000000 000370b0 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
15 .debug_ranges 00001008 00000000 00000000 00038180 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
16 .debug_macro 0001c271 00000000 00000000 00039188 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
17 .debug_line 00012efc 00000000 00000000 000553f9 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
18 .debug_str 0009194e 00000000 00000000 000682f5 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
19 .comment 00000050 00000000 00000000 000f9c43 2**0
CONTENTS, READONLY
20 .debug_frame 00004c30 00000000 00000000 000f9c94 2**2
CONTENTS, READONLY, DEBUGGING, OCTETS
Disassembly of section .text:
0800010c <__do_global_dtors_aux>:
800010c: b510 push {r4, lr}
800010e: 4c05 ldr r4, [pc, #20] ; (8000124 <__do_global_dtors_aux+0x18>)
8000110: 7823 ldrb r3, [r4, #0]
8000112: b933 cbnz r3, 8000122 <__do_global_dtors_aux+0x16>
8000114: 4b04 ldr r3, [pc, #16] ; (8000128 <__do_global_dtors_aux+0x1c>)
8000116: b113 cbz r3, 800011e <__do_global_dtors_aux+0x12>
8000118: 4804 ldr r0, [pc, #16] ; (800012c <__do_global_dtors_aux+0x20>)
800011a: f3af 8000 nop.w
800011e: 2301 movs r3, #1
8000120: 7023 strb r3, [r4, #0]
8000122: bd10 pop {r4, pc}
8000124: 20000070 .word 0x20000070
8000128: 00000000 .word 0x00000000
800012c: 080058f0 .word 0x080058f0
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: 20000074 .word 0x20000074
8000148: 080058f0 .word 0x080058f0
0800014c <strcmp>:
800014c: f810 2b01 ldrb.w r2, [r0], #1
8000150: f811 3b01 ldrb.w r3, [r1], #1
8000154: 2a01 cmp r2, #1
8000156: bf28 it cs
8000158: 429a cmpcs r2, r3
800015a: d0f7 beq.n 800014c <strcmp>
800015c: 1ad0 subs r0, r2, r3
800015e: 4770 bx lr
08000160 <strlen>:
8000160: 4603 mov r3, r0
8000162: f813 2b01 ldrb.w r2, [r3], #1
8000166: 2a00 cmp r2, #0
8000168: d1fb bne.n 8000162 <strlen+0x2>
800016a: 1a18 subs r0, r3, r0
800016c: 3801 subs r0, #1
800016e: 4770 bx lr
08000170 <_ZN7ESP8266C1EP20__UART_HandleTypeDef>:
*/
#include "ESP8266.hpp"
#include <cstdio>
ESP8266::ESP8266(UART_HandleTypeDef* huart) : huart(huart){
8000170: b480 push {r7}
8000172: b083 sub sp, #12
8000174: af00 add r7, sp, #0
8000176: 6078 str r0, [r7, #4]
8000178: 6039 str r1, [r7, #0]
800017a: 4a06 ldr r2, [pc, #24] ; (8000194 <_ZN7ESP8266C1EP20__UART_HandleTypeDef+0x24>)
800017c: 687b ldr r3, [r7, #4]
800017e: 601a str r2, [r3, #0]
8000180: 687b ldr r3, [r7, #4]
8000182: 683a ldr r2, [r7, #0]
8000184: f8c3 2110 str.w r2, [r3, #272] ; 0x110
// TODO Auto-generated constructor stub
}
8000188: 687b ldr r3, [r7, #4]
800018a: 4618 mov r0, r3
800018c: 370c adds r7, #12
800018e: 46bd mov sp, r7
8000190: bc80 pop {r7}
8000192: 4770 bx lr
8000194: 08005ad8 .word 0x08005ad8
08000198 <_ZN7ESP8266D1Ev>:
ESP8266::~ESP8266() {
8000198: b480 push {r7}
800019a: b083 sub sp, #12
800019c: af00 add r7, sp, #0
800019e: 6078 str r0, [r7, #4]
80001a0: 4a04 ldr r2, [pc, #16] ; (80001b4 <_ZN7ESP8266D1Ev+0x1c>)
80001a2: 687b ldr r3, [r7, #4]
80001a4: 601a str r2, [r3, #0]
// TODO Auto-generated destructor stub
}
80001a6: 687b ldr r3, [r7, #4]
80001a8: 4618 mov r0, r3
80001aa: 370c adds r7, #12
80001ac: 46bd mov sp, r7
80001ae: bc80 pop {r7}
80001b0: 4770 bx lr
80001b2: bf00 nop
80001b4: 08005ad8 .word 0x08005ad8
080001b8 <_ZN7ESP8266D0Ev>:
ESP8266::~ESP8266() {
80001b8: b580 push {r7, lr}
80001ba: b082 sub sp, #8
80001bc: af00 add r7, sp, #0
80001be: 6078 str r0, [r7, #4]
}
80001c0: 6878 ldr r0, [r7, #4]
80001c2: f7ff ffe9 bl 8000198 <_ZN7ESP8266D1Ev>
80001c6: f44f 7105 mov.w r1, #532 ; 0x214
80001ca: 6878 ldr r0, [r7, #4]
80001cc: f004 fe68 bl 8004ea0 <_ZdlPvj>
80001d0: 687b ldr r3, [r7, #4]
80001d2: 4618 mov r0, r3
80001d4: 3708 adds r7, #8
80001d6: 46bd mov sp, r7
80001d8: bd80 pop {r7, pc}
080001da <_ZN7ESP826613uart_callbackEv>:
void ESP8266::uart_callback(){
80001da: b580 push {r7, lr}
80001dc: b084 sub sp, #16
80001de: af02 add r7, sp, #8
80001e0: 6078 str r0, [r7, #4]
uart_receive_until_termination_byte(interruptPayload, MAX_BUFFER_SIZE, '\n', 2);
80001e2: 687b ldr r3, [r7, #4]
80001e4: f103 010d add.w r1, r3, #13
80001e8: 2302 movs r3, #2
80001ea: 9300 str r3, [sp, #0]
80001ec: 230a movs r3, #10
80001ee: f44f 7280 mov.w r2, #256 ; 0x100
80001f2: 6878 ldr r0, [r7, #4]
80001f4: f000 f906 bl 8000404 <_ZN7ESP826635uart_receive_until_termination_byteEPhthm>
}
80001f8: bf00 nop
80001fa: 3708 adds r7, #8
80001fc: 46bd mov sp, r7
80001fe: bd80 pop {r7, pc}
08000200 <_ZN7ESP82664initEv>:
void ESP8266::init(){
8000200: b580 push {r7, lr}
8000202: b082 sub sp, #8
8000204: af00 add r7, sp, #0
8000206: 6078 str r0, [r7, #4]
command("AT+CWMODE=1,1\r\n");
8000208: 4909 ldr r1, [pc, #36] ; (8000230 <_ZN7ESP82664initEv+0x30>)
800020a: 6878 ldr r0, [r7, #4]
800020c: f000 f818 bl 8000240 <_ZN7ESP82667commandEPKc>
command("AT+CWJAP=\"Gabriel_2G\",\"gabrielwifi\"\r\n");
8000210: 4908 ldr r1, [pc, #32] ; (8000234 <_ZN7ESP82664initEv+0x34>)
8000212: 6878 ldr r0, [r7, #4]
8000214: f000 f814 bl 8000240 <_ZN7ESP82667commandEPKc>
//command("AT+CWLAP\r\n");
command("AT+CIPMUX=1\r\n");
8000218: 4907 ldr r1, [pc, #28] ; (8000238 <_ZN7ESP82664initEv+0x38>)
800021a: 6878 ldr r0, [r7, #4]
800021c: f000 f810 bl 8000240 <_ZN7ESP82667commandEPKc>
command("AT+CIPSTART=0,\"UDP\",\"239.0.0.1\",10001,11001,0\r\n");
8000220: 4906 ldr r1, [pc, #24] ; (800023c <_ZN7ESP82664initEv+0x3c>)
8000222: 6878 ldr r0, [r7, #4]
8000224: f000 f80c bl 8000240 <_ZN7ESP82667commandEPKc>
}
8000228: bf00 nop
800022a: 3708 adds r7, #8
800022c: 46bd mov sp, r7
800022e: bd80 pop {r7, pc}
8000230: 08005908 .word 0x08005908
8000234: 08005918 .word 0x08005918
8000238: 08005940 .word 0x08005940
800023c: 08005950 .word 0x08005950
08000240 <_ZN7ESP82667commandEPKc>:
ESP8266::statusTypeDef ESP8266::command(const char* command) {
8000240: b590 push {r4, r7, lr}
8000242: b083 sub sp, #12
8000244: af00 add r7, sp, #0
8000246: 6078 str r0, [r7, #4]
8000248: 6039 str r1, [r7, #0]
HAL_UART_Transmit(huart, (uint8_t*)command, strlen(command), 100);
800024a: 687b ldr r3, [r7, #4]
800024c: f8d3 4110 ldr.w r4, [r3, #272] ; 0x110
8000250: 6838 ldr r0, [r7, #0]
8000252: f7ff ff85 bl 8000160 <strlen>
8000256: 4603 mov r3, r0
8000258: b29a uxth r2, r3
800025a: 2364 movs r3, #100 ; 0x64
800025c: 6839 ldr r1, [r7, #0]
800025e: 4620 mov r0, r4
8000260: f003 ff45 bl 80040ee <HAL_UART_Transmit>
return wait_until_ok();
8000264: 6878 ldr r0, [r7, #4]
8000266: f000 f963 bl 8000530 <_ZN7ESP826613wait_until_okEv>
800026a: 4603 mov r3, r0
}
800026c: 4618 mov r0, r3
800026e: 370c adds r7, #12
8000270: 46bd mov sp, r7
8000272: bd90 pop {r4, r7, pc}
08000274 <_ZN7ESP82664sendEPKc>:
ESP8266::statusTypeDef ESP8266::send(const char* data) {
8000274: b590 push {r4, r7, lr}
8000276: b083 sub sp, #12
8000278: af00 add r7, sp, #0
800027a: 6078 str r0, [r7, #4]
800027c: 6039 str r1, [r7, #0]
HAL_UART_Transmit(huart, (uint8_t*)data, strlen(data), 100);
800027e: 687b ldr r3, [r7, #4]
8000280: f8d3 4110 ldr.w r4, [r3, #272] ; 0x110
8000284: 6838 ldr r0, [r7, #0]
8000286: f7ff ff6b bl 8000160 <strlen>
800028a: 4603 mov r3, r0
800028c: b29a uxth r2, r3
800028e: 2364 movs r3, #100 ; 0x64
8000290: 6839 ldr r1, [r7, #0]
8000292: 4620 mov r0, r4
8000294: f003 ff2b bl 80040ee <HAL_UART_Transmit>
return wait_until_send_ok();
8000298: 6878 ldr r0, [r7, #4]
800029a: f000 f99b bl 80005d4 <_ZN7ESP826618wait_until_send_okEv>
800029e: 4603 mov r3, r0
}
80002a0: 4618 mov r0, r3
80002a2: 370c adds r7, #12
80002a4: 46bd mov sp, r7
80002a6: bd90 pop {r4, r7, pc}
080002a8 <_ZN7ESP826611send_uint32EPKcm>:
void ESP8266::send_uint32(const char* name, uint32_t value){
80002a8: b580 push {r7, lr}
80002aa: f5ad 7d04 sub.w sp, sp, #528 ; 0x210
80002ae: af00 add r7, sp, #0
80002b0: f507 7304 add.w r3, r7, #528 ; 0x210
80002b4: f5a3 7301 sub.w r3, r3, #516 ; 0x204
80002b8: 6018 str r0, [r3, #0]
80002ba: f507 7304 add.w r3, r7, #528 ; 0x210
80002be: f5a3 7302 sub.w r3, r3, #520 ; 0x208
80002c2: 6019 str r1, [r3, #0]
80002c4: f507 7304 add.w r3, r7, #528 ; 0x210
80002c8: f5a3 7303 sub.w r3, r3, #524 ; 0x20c
80002cc: 601a str r2, [r3, #0]
char commandBuffer[256];
char payloadBuffer[256];
sprintf(payloadBuffer, ">%s:%lu\r\n", name, value);
80002ce: f507 7304 add.w r3, r7, #528 ; 0x210
80002d2: f5a3 7303 sub.w r3, r3, #524 ; 0x20c
80002d6: f507 7204 add.w r2, r7, #528 ; 0x210
80002da: f5a2 7202 sub.w r2, r2, #520 ; 0x208
80002de: f107 0010 add.w r0, r7, #16
80002e2: 681b ldr r3, [r3, #0]
80002e4: 6812 ldr r2, [r2, #0]
80002e6: 4914 ldr r1, [pc, #80] ; (8000338 <_ZN7ESP826611send_uint32EPKcm+0x90>)
80002e8: f004 ff82 bl 80051f0 <siprintf>
sprintf(commandBuffer, "AT+CIPSEND=0,%u\r\n", strlen(payloadBuffer));
80002ec: f107 0310 add.w r3, r7, #16
80002f0: 4618 mov r0, r3
80002f2: f7ff ff35 bl 8000160 <strlen>
80002f6: 4602 mov r2, r0
80002f8: f507 7388 add.w r3, r7, #272 ; 0x110
80002fc: 490f ldr r1, [pc, #60] ; (800033c <_ZN7ESP826611send_uint32EPKcm+0x94>)
80002fe: 4618 mov r0, r3
8000300: f004 ff76 bl 80051f0 <siprintf>
command(commandBuffer);
8000304: f507 7288 add.w r2, r7, #272 ; 0x110
8000308: f507 7304 add.w r3, r7, #528 ; 0x210
800030c: f5a3 7301 sub.w r3, r3, #516 ; 0x204
8000310: 4611 mov r1, r2
8000312: 6818 ldr r0, [r3, #0]
8000314: f7ff ff94 bl 8000240 <_ZN7ESP82667commandEPKc>
send(payloadBuffer);
8000318: f107 0210 add.w r2, r7, #16
800031c: f507 7304 add.w r3, r7, #528 ; 0x210
8000320: f5a3 7301 sub.w r3, r3, #516 ; 0x204
8000324: 4611 mov r1, r2
8000326: 6818 ldr r0, [r3, #0]
8000328: f7ff ffa4 bl 8000274 <_ZN7ESP82664sendEPKc>
}
800032c: bf00 nop
800032e: f507 7704 add.w r7, r7, #528 ; 0x210
8000332: 46bd mov sp, r7
8000334: bd80 pop {r7, pc}
8000336: bf00 nop
8000338: 08005980 .word 0x08005980
800033c: 0800598c .word 0x0800598c
08000340 <_ZN7ESP826626wait_on_flag_until_timeoutEm10FlagStatusmm>:
HAL_StatusTypeDef ESP8266::wait_on_flag_until_timeout(uint32_t Flag, FlagStatus Status, uint32_t Tickstart, uint32_t Timeout) {
8000340: b580 push {r7, lr}
8000342: b084 sub sp, #16
8000344: af00 add r7, sp, #0
8000346: 60f8 str r0, [r7, #12]
8000348: 60b9 str r1, [r7, #8]
800034a: 603b str r3, [r7, #0]
800034c: 4613 mov r3, r2
800034e: 71fb strb r3, [r7, #7]
/* Wait until flag is set */
while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status) {
8000350: 68fb ldr r3, [r7, #12]
8000352: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
8000356: 681b ldr r3, [r3, #0]
8000358: 681a ldr r2, [r3, #0]
800035a: 68bb ldr r3, [r7, #8]
800035c: 4013 ands r3, r2
800035e: 68ba ldr r2, [r7, #8]
8000360: 429a cmp r2, r3
8000362: d101 bne.n 8000368 <_ZN7ESP826626wait_on_flag_until_timeoutEm10FlagStatusmm+0x28>
8000364: 2201 movs r2, #1
8000366: e000 b.n 800036a <_ZN7ESP826626wait_on_flag_until_timeoutEm10FlagStatusmm+0x2a>
8000368: 2200 movs r2, #0
800036a: 79fb ldrb r3, [r7, #7]
800036c: 429a cmp r2, r3
800036e: bf0c ite eq
8000370: 2301 moveq r3, #1
8000372: 2300 movne r3, #0
8000374: b2db uxtb r3, r3
8000376: 2b00 cmp r3, #0
8000378: d03f beq.n 80003fa <_ZN7ESP826626wait_on_flag_until_timeoutEm10FlagStatusmm+0xba>
/* Check for the Timeout */
if (Timeout != HAL_MAX_DELAY) {
800037a: 69bb ldr r3, [r7, #24]
800037c: f1b3 3fff cmp.w r3, #4294967295
8000380: d0e6 beq.n 8000350 <_ZN7ESP826626wait_on_flag_until_timeoutEm10FlagStatusmm+0x10>
if ((Timeout == 0U) || ((HAL_GetTick() - Tickstart) > Timeout)) {
8000382: 69bb ldr r3, [r7, #24]
8000384: 2b00 cmp r3, #0
8000386: d007 beq.n 8000398 <_ZN7ESP826626wait_on_flag_until_timeoutEm10FlagStatusmm+0x58>
8000388: f001 fa94 bl 80018b4 <HAL_GetTick>
800038c: 4602 mov r2, r0
800038e: 683b ldr r3, [r7, #0]
8000390: 1ad3 subs r3, r2, r3
8000392: 69ba ldr r2, [r7, #24]
8000394: 429a cmp r2, r3
8000396: d201 bcs.n 800039c <_ZN7ESP826626wait_on_flag_until_timeoutEm10FlagStatusmm+0x5c>
8000398: 2301 movs r3, #1
800039a: e000 b.n 800039e <_ZN7ESP826626wait_on_flag_until_timeoutEm10FlagStatusmm+0x5e>
800039c: 2300 movs r3, #0
800039e: 2b00 cmp r3, #0
80003a0: d0d6 beq.n 8000350 <_ZN7ESP826626wait_on_flag_until_timeoutEm10FlagStatusmm+0x10>
/* Disable TXE, RXNE, PE and ERR (Frame error, noise error, overrun error) interrupts for the interrupt process */
CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE | USART_CR1_TXEIE));
80003a2: 68fb ldr r3, [r7, #12]
80003a4: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
80003a8: 681b ldr r3, [r3, #0]
80003aa: 68da ldr r2, [r3, #12]
80003ac: 68fb ldr r3, [r7, #12]
80003ae: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
80003b2: 681b ldr r3, [r3, #0]
80003b4: f422 72d0 bic.w r2, r2, #416 ; 0x1a0
80003b8: 60da str r2, [r3, #12]
CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
80003ba: 68fb ldr r3, [r7, #12]
80003bc: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
80003c0: 681b ldr r3, [r3, #0]
80003c2: 695a ldr r2, [r3, #20]
80003c4: 68fb ldr r3, [r7, #12]
80003c6: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
80003ca: 681b ldr r3, [r3, #0]
80003cc: f022 0201 bic.w r2, r2, #1
80003d0: 615a str r2, [r3, #20]
huart->gState = HAL_UART_STATE_READY;
80003d2: 68fb ldr r3, [r7, #12]
80003d4: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
80003d8: 2220 movs r2, #32
80003da: f883 203d strb.w r2, [r3, #61] ; 0x3d
huart->RxState = HAL_UART_STATE_READY;
80003de: 68fb ldr r3, [r7, #12]
80003e0: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
80003e4: 2220 movs r2, #32
80003e6: f883 203e strb.w r2, [r3, #62] ; 0x3e
/* Process Unlocked */
__HAL_UNLOCK(huart);
80003ea: 68fb ldr r3, [r7, #12]
80003ec: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
80003f0: 2200 movs r2, #0
80003f2: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_TIMEOUT;
80003f6: 2303 movs r3, #3
80003f8: e000 b.n 80003fc <_ZN7ESP826626wait_on_flag_until_timeoutEm10FlagStatusmm+0xbc>
}
}
}
return HAL_OK;
80003fa: 2300 movs r3, #0
}
80003fc: 4618 mov r0, r3
80003fe: 3710 adds r7, #16
8000400: 46bd mov sp, r7
8000402: bd80 pop {r7, pc}
08000404 <_ZN7ESP826635uart_receive_until_termination_byteEPhthm>:
HAL_StatusTypeDef ESP8266::uart_receive_until_termination_byte(uint8_t *pData, uint16_t Size, uint8_t terminationByte, uint32_t Timeout) {
8000404: b580 push {r7, lr}
8000406: b088 sub sp, #32
8000408: af02 add r7, sp, #8
800040a: 60f8 str r0, [r7, #12]
800040c: 60b9 str r1, [r7, #8]
800040e: 4611 mov r1, r2
8000410: 461a mov r2, r3
8000412: 460b mov r3, r1
8000414: 80fb strh r3, [r7, #6]
8000416: 4613 mov r3, r2
8000418: 717b strb r3, [r7, #5]
uint32_t tickstart = 0U;
800041a: 2300 movs r3, #0
800041c: 617b str r3, [r7, #20]
/* Check that a Rx process is not already ongoing */
if (huart->RxState == HAL_UART_STATE_READY) {
800041e: 68fb ldr r3, [r7, #12]
8000420: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
8000424: f893 303e ldrb.w r3, [r3, #62] ; 0x3e
8000428: b2db uxtb r3, r3
800042a: 2b20 cmp r3, #32
800042c: bf0c ite eq
800042e: 2301 moveq r3, #1
8000430: 2300 movne r3, #0
8000432: b2db uxtb r3, r3
8000434: 2b00 cmp r3, #0
8000436: d075 beq.n 8000524 <_ZN7ESP826635uart_receive_until_termination_byteEPhthm+0x120>
/* Process Locked */
__HAL_LOCK(huart);
8000438: 68fb ldr r3, [r7, #12]
800043a: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
800043e: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
8000442: 2b01 cmp r3, #1
8000444: d101 bne.n 800044a <_ZN7ESP826635uart_receive_until_termination_byteEPhthm+0x46>
8000446: 2302 movs r3, #2
8000448: e06d b.n 8000526 <_ZN7ESP826635uart_receive_until_termination_byteEPhthm+0x122>
800044a: 68fb ldr r3, [r7, #12]
800044c: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
8000450: 2201 movs r2, #1
8000452: f883 203c strb.w r2, [r3, #60] ; 0x3c
huart->ErrorCode = HAL_UART_ERROR_NONE;
8000456: 68fb ldr r3, [r7, #12]
8000458: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
800045c: 2200 movs r2, #0
800045e: 641a str r2, [r3, #64] ; 0x40
huart->RxState = HAL_UART_STATE_BUSY_RX;
8000460: 68fb ldr r3, [r7, #12]
8000462: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
8000466: 2222 movs r2, #34 ; 0x22
8000468: f883 203e strb.w r2, [r3, #62] ; 0x3e
huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
800046c: 68fb ldr r3, [r7, #12]
800046e: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
8000472: 2200 movs r2, #0
8000474: 631a str r2, [r3, #48] ; 0x30
/* Init tickstart for timeout management */
tickstart = HAL_GetTick();
8000476: f001 fa1d bl 80018b4 <HAL_GetTick>
800047a: 6178 str r0, [r7, #20]
huart->RxXferSize = Size;
800047c: 68fb ldr r3, [r7, #12]
800047e: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
8000482: 88fa ldrh r2, [r7, #6]
8000484: 859a strh r2, [r3, #44] ; 0x2c
huart->RxXferCount = Size;
8000486: 68fb ldr r3, [r7, #12]
8000488: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
800048c: 88fa ldrh r2, [r7, #6]
800048e: 85da strh r2, [r3, #46] ; 0x2e
/* Process Unlocked */
__HAL_UNLOCK(huart);
8000490: 68fb ldr r3, [r7, #12]
8000492: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
8000496: 2200 movs r2, #0
8000498: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* Check the remain data to be received */
while (huart->RxXferCount > 0U) {
800049c: 68fb ldr r3, [r7, #12]
800049e: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
80004a2: 8ddb ldrh r3, [r3, #46] ; 0x2e
80004a4: b29b uxth r3, r3
80004a6: 2b00 cmp r3, #0
80004a8: bf14 ite ne
80004aa: 2301 movne r3, #1
80004ac: 2300 moveq r3, #0
80004ae: b2db uxtb r3, r3
80004b0: 2b00 cmp r3, #0
80004b2: d02f beq.n 8000514 <_ZN7ESP826635uart_receive_until_termination_byteEPhthm+0x110>
if (wait_on_flag_until_timeout(UART_FLAG_RXNE, RESET, tickstart, Timeout) != HAL_OK) {
80004b4: 6a3b ldr r3, [r7, #32]
80004b6: 9300 str r3, [sp, #0]
80004b8: 697b ldr r3, [r7, #20]
80004ba: 2200 movs r2, #0
80004bc: 2120 movs r1, #32
80004be: 68f8 ldr r0, [r7, #12]
80004c0: f7ff ff3e bl 8000340 <_ZN7ESP826626wait_on_flag_until_timeoutEm10FlagStatusmm>
80004c4: 4603 mov r3, r0
80004c6: 2b00 cmp r3, #0
80004c8: bf14 ite ne
80004ca: 2301 movne r3, #1
80004cc: 2300 moveq r3, #0
80004ce: b2db uxtb r3, r3
80004d0: 2b00 cmp r3, #0
80004d2: d001 beq.n 80004d8 <_ZN7ESP826635uart_receive_until_termination_byteEPhthm+0xd4>
return HAL_TIMEOUT;
80004d4: 2303 movs r3, #3
80004d6: e026 b.n 8000526 <_ZN7ESP826635uart_receive_until_termination_byteEPhthm+0x122>
}
*pData = (uint8_t) (huart->Instance->DR & (uint8_t) 0x00FF);
80004d8: 68fb ldr r3, [r7, #12]
80004da: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
80004de: 681b ldr r3, [r3, #0]
80004e0: 685b ldr r3, [r3, #4]
80004e2: b2da uxtb r2, r3
80004e4: 68bb ldr r3, [r7, #8]
80004e6: 701a strb r2, [r3, #0]
huart->RxXferCount--;
80004e8: 68fb ldr r3, [r7, #12]
80004ea: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
80004ee: 8dda ldrh r2, [r3, #46] ; 0x2e
80004f0: b292 uxth r2, r2
80004f2: 3a01 subs r2, #1
80004f4: b292 uxth r2, r2
80004f6: 85da strh r2, [r3, #46] ; 0x2e
if (*pData == terminationByte) {
80004f8: 68bb ldr r3, [r7, #8]
80004fa: 781b ldrb r3, [r3, #0]
80004fc: 797a ldrb r2, [r7, #5]
80004fe: 429a cmp r2, r3
8000500: d104 bne.n 800050c <_ZN7ESP826635uart_receive_until_termination_byteEPhthm+0x108>
pData[1] = 0; //Coloca o zero no final da string
8000502: 68bb ldr r3, [r7, #8]
8000504: 3301 adds r3, #1
8000506: 2200 movs r2, #0
8000508: 701a strb r2, [r3, #0]
break;
800050a: e003 b.n 8000514 <_ZN7ESP826635uart_receive_until_termination_byteEPhthm+0x110>
}
pData++;
800050c: 68bb ldr r3, [r7, #8]
800050e: 3301 adds r3, #1
8000510: 60bb str r3, [r7, #8]
while (huart->RxXferCount > 0U) {
8000512: e7c3 b.n 800049c <_ZN7ESP826635uart_receive_until_termination_byteEPhthm+0x98>
}
/* At end of Rx process, restore huart->RxState to Ready */
huart->RxState = HAL_UART_STATE_READY;
8000514: 68fb ldr r3, [r7, #12]
8000516: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
800051a: 2220 movs r2, #32
800051c: f883 203e strb.w r2, [r3, #62] ; 0x3e
return HAL_OK;
8000520: 2300 movs r3, #0
8000522: e000 b.n 8000526 <_ZN7ESP826635uart_receive_until_termination_byteEPhthm+0x122>
} else {
return HAL_BUSY;
8000524: 2302 movs r3, #2
}
}
8000526: 4618 mov r0, r3
8000528: 3718 adds r7, #24
800052a: 46bd mov sp, r7
800052c: bd80 pop {r7, pc}
...
08000530 <_ZN7ESP826613wait_until_okEv>:
ESP8266::statusTypeDef ESP8266::wait_until_ok() {
8000530: b580 push {r7, lr}
8000532: b084 sub sp, #16
8000534: af02 add r7, sp, #8
8000536: 6078 str r0, [r7, #4]
HAL_UART_AbortReceive_IT(huart);
8000538: 687b ldr r3, [r7, #4]
800053a: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
800053e: 4618 mov r0, r3
8000540: f003 ff04 bl 800434c <HAL_UART_AbortReceive_IT>
while(uart_receive_until_termination_byte(buffer, MAX_BUFFER_SIZE, '\n', OK_TIMEOUT) != HAL_TIMEOUT){
8000544: 687b ldr r3, [r7, #4]
8000546: f503 718a add.w r1, r3, #276 ; 0x114
800054a: f241 3388 movw r3, #5000 ; 0x1388
800054e: 9300 str r3, [sp, #0]
8000550: 230a movs r3, #10
8000552: f44f 7280 mov.w r2, #256 ; 0x100
8000556: 6878 ldr r0, [r7, #4]
8000558: f7ff ff54 bl 8000404 <_ZN7ESP826635uart_receive_until_termination_byteEPhthm>
800055c: 4603 mov r3, r0
800055e: 2b03 cmp r3, #3
8000560: bf14 ite ne
8000562: 2301 movne r3, #1
8000564: 2300 moveq r3, #0
8000566: b2db uxtb r3, r3
8000568: 2b00 cmp r3, #0
800056a: d029 beq.n 80005c0 <_ZN7ESP826613wait_until_okEv+0x90>
if(!strcmp((char*) buffer, "OK\r\n")){
800056c: 687b ldr r3, [r7, #4]
800056e: f503 738a add.w r3, r3, #276 ; 0x114
8000572: 4916 ldr r1, [pc, #88] ; (80005cc <_ZN7ESP826613wait_until_okEv+0x9c>)
8000574: 4618 mov r0, r3
8000576: f7ff fde9 bl 800014c <strcmp>
800057a: 4603 mov r3, r0
800057c: 2b00 cmp r3, #0
800057e: d10a bne.n 8000596 <_ZN7ESP826613wait_until_okEv+0x66>
HAL_UART_Receive_IT(huart, interruptHeader, 9);
8000580: 687b ldr r3, [r7, #4]
8000582: f8d3 0110 ldr.w r0, [r3, #272] ; 0x110
8000586: 687b ldr r3, [r7, #4]
8000588: 3304 adds r3, #4
800058a: 2209 movs r2, #9
800058c: 4619 mov r1, r3
800058e: f003 fe40 bl 8004212 <HAL_UART_Receive_IT>
return STATUS_OK;
8000592: 2300 movs r3, #0
8000594: e015 b.n 80005c2 <_ZN7ESP826613wait_until_okEv+0x92>
}
if(!strcmp((char*) buffer, "ERROR\r\n")){
8000596: 687b ldr r3, [r7, #4]
8000598: f503 738a add.w r3, r3, #276 ; 0x114
800059c: 490c ldr r1, [pc, #48] ; (80005d0 <_ZN7ESP826613wait_until_okEv+0xa0>)
800059e: 4618 mov r0, r3
80005a0: f7ff fdd4 bl 800014c <strcmp>
80005a4: 4603 mov r3, r0
80005a6: 2b00 cmp r3, #0
80005a8: d1cc bne.n 8000544 <_ZN7ESP826613wait_until_okEv+0x14>
HAL_UART_Receive_IT(huart, interruptHeader, 9);
80005aa: 687b ldr r3, [r7, #4]
80005ac: f8d3 0110 ldr.w r0, [r3, #272] ; 0x110
80005b0: 687b ldr r3, [r7, #4]
80005b2: 3304 adds r3, #4
80005b4: 2209 movs r2, #9
80005b6: 4619 mov r1, r3
80005b8: f003 fe2b bl 8004212 <HAL_UART_Receive_IT>
return STATUS_ERROR;
80005bc: 2301 movs r3, #1
80005be: e000 b.n 80005c2 <_ZN7ESP826613wait_until_okEv+0x92>
}
if(buffer[0] == '+'){
}
}
return STATUS_TIMEOUT;
80005c0: 2302 movs r3, #2
}
80005c2: 4618 mov r0, r3
80005c4: 3708 adds r7, #8
80005c6: 46bd mov sp, r7
80005c8: bd80 pop {r7, pc}
80005ca: bf00 nop
80005cc: 080059a0 .word 0x080059a0
80005d0: 080059a8 .word 0x080059a8
080005d4 <_ZN7ESP826618wait_until_send_okEv>:
ESP8266::statusTypeDef ESP8266::wait_until_send_ok() {
80005d4: b580 push {r7, lr}
80005d6: b084 sub sp, #16
80005d8: af02 add r7, sp, #8
80005da: 6078 str r0, [r7, #4]
HAL_UART_AbortReceive_IT(huart);
80005dc: 687b ldr r3, [r7, #4]
80005de: f8d3 3110 ldr.w r3, [r3, #272] ; 0x110
80005e2: 4618 mov r0, r3
80005e4: f003 feb2 bl 800434c <HAL_UART_AbortReceive_IT>
while(uart_receive_until_termination_byte(buffer, MAX_BUFFER_SIZE, '\n', OK_TIMEOUT) != HAL_TIMEOUT){
80005e8: 687b ldr r3, [r7, #4]
80005ea: f503 718a add.w r1, r3, #276 ; 0x114
80005ee: f241 3388 movw r3, #5000 ; 0x1388
80005f2: 9300 str r3, [sp, #0]
80005f4: 230a movs r3, #10
80005f6: f44f 7280 mov.w r2, #256 ; 0x100
80005fa: 6878 ldr r0, [r7, #4]
80005fc: f7ff ff02 bl 8000404 <_ZN7ESP826635uart_receive_until_termination_byteEPhthm>
8000600: 4603 mov r3, r0
8000602: 2b03 cmp r3, #3
8000604: bf14 ite ne
8000606: 2301 movne r3, #1
8000608: 2300 moveq r3, #0
800060a: b2db uxtb r3, r3
800060c: 2b00 cmp r3, #0
800060e: d029 beq.n 8000664 <_ZN7ESP826618wait_until_send_okEv+0x90>
if(!strcmp((char*) buffer, "SEND OK\r\n")){
8000610: 687b ldr r3, [r7, #4]
8000612: f503 738a add.w r3, r3, #276 ; 0x114
8000616: 4916 ldr r1, [pc, #88] ; (8000670 <_ZN7ESP826618wait_until_send_okEv+0x9c>)
8000618: 4618 mov r0, r3
800061a: f7ff fd97 bl 800014c <strcmp>
800061e: 4603 mov r3, r0
8000620: 2b00 cmp r3, #0
8000622: d10a bne.n 800063a <_ZN7ESP826618wait_until_send_okEv+0x66>
HAL_UART_Receive_IT(huart, interruptHeader, 9);
8000624: 687b ldr r3, [r7, #4]
8000626: f8d3 0110 ldr.w r0, [r3, #272] ; 0x110
800062a: 687b ldr r3, [r7, #4]
800062c: 3304 adds r3, #4
800062e: 2209 movs r2, #9
8000630: 4619 mov r1, r3
8000632: f003 fdee bl 8004212 <HAL_UART_Receive_IT>
return STATUS_OK;
8000636: 2300 movs r3, #0
8000638: e015 b.n 8000666 <_ZN7ESP826618wait_until_send_okEv+0x92>
}
if(!strcmp((char*) buffer, "SEND ERROR\r\n")){
800063a: 687b ldr r3, [r7, #4]
800063c: f503 738a add.w r3, r3, #276 ; 0x114
8000640: 490c ldr r1, [pc, #48] ; (8000674 <_ZN7ESP826618wait_until_send_okEv+0xa0>)
8000642: 4618 mov r0, r3
8000644: f7ff fd82 bl 800014c <strcmp>
8000648: 4603 mov r3, r0
800064a: 2b00 cmp r3, #0
800064c: d1cc bne.n 80005e8 <_ZN7ESP826618wait_until_send_okEv+0x14>
HAL_UART_Receive_IT(huart, interruptHeader, 9);
800064e: 687b ldr r3, [r7, #4]
8000650: f8d3 0110 ldr.w r0, [r3, #272] ; 0x110
8000654: 687b ldr r3, [r7, #4]
8000656: 3304 adds r3, #4
8000658: 2209 movs r2, #9
800065a: 4619 mov r1, r3
800065c: f003 fdd9 bl 8004212 <HAL_UART_Receive_IT>
return STATUS_ERROR;
8000660: 2301 movs r3, #1
8000662: e000 b.n 8000666 <_ZN7ESP826618wait_until_send_okEv+0x92>
}
if(buffer[0] == '+'){
}
}
return STATUS_TIMEOUT;
8000664: 2302 movs r3, #2
}
8000666: 4618 mov r0, r3
8000668: 3708 adds r7, #8
800066a: 46bd mov sp, r7
800066c: bd80 pop {r7, pc}
800066e: bf00 nop
8000670: 080059b0 .word 0x080059b0
8000674: 080059bc .word 0x080059bc
08000678 <_ZN11SerialDebugC1EP20__UART_HandleTypeDefm>:
*/
#include "SerialDebug.hpp"
#include <string.h>
SerialDebug::SerialDebug(UART_HandleTypeDef* huartptr, uint32_t fifoSize)
8000678: b590 push {r4, r7, lr}
800067a: b085 sub sp, #20
800067c: af00 add r7, sp, #0
800067e: 60f8 str r0, [r7, #12]
8000680: 60b9 str r1, [r7, #8]
8000682: 607a str r2, [r7, #4]
: huartptr(huartptr)
8000684: 68fb ldr r3, [r7, #12]
8000686: 2200 movs r2, #0
8000688: 711a strb r2, [r3, #4]
800068a: 68fb ldr r3, [r7, #12]
800068c: 68ba ldr r2, [r7, #8]
800068e: 609a str r2, [r3, #8]
8000690: 68fb ldr r3, [r7, #12]
8000692: 2203 movs r2, #3
8000694: f883 210c strb.w r2, [r3, #268] ; 0x10c
{
fifo = new StaticFIFO(fifoSize);
8000698: 2014 movs r0, #20
800069a: f004 fc03 bl 8004ea4 <_Znwj>
800069e: 4603 mov r3, r0
80006a0: 461c mov r4, r3
80006a2: 6879 ldr r1, [r7, #4]
80006a4: 4620 mov r0, r4
80006a6: f000 f9ad bl 8000a04 <_ZN10StaticFIFOC1Em>
80006aa: 68fb ldr r3, [r7, #12]
80006ac: 601c str r4, [r3, #0]
}
80006ae: 68fb ldr r3, [r7, #12]
80006b0: 4618 mov r0, r3
80006b2: 3714 adds r7, #20
80006b4: 46bd mov sp, r7
80006b6: bd90 pop {r4, r7, pc}
080006b8 <_ZN11SerialDebug8setLevelENS_10DebugLevelE>:
void SerialDebug::setLevel(DebugLevel level)
{
80006b8: b480 push {r7}
80006ba: b083 sub sp, #12
80006bc: af00 add r7, sp, #0
80006be: 6078 str r0, [r7, #4]
80006c0: 460b mov r3, r1
80006c2: 70fb strb r3, [r7, #3]
debugLevel = level;
80006c4: 687b ldr r3, [r7, #4]
80006c6: 78fa ldrb r2, [r7, #3]
80006c8: f883 210c strb.w r2, [r3, #268] ; 0x10c
}
80006cc: bf00 nop
80006ce: 370c adds r7, #12
80006d0: 46bd mov sp, r7
80006d2: bc80 pop {r7}
80006d4: 4770 bx lr
080006d6 <_ZN11SerialDebug20serialTxCpltCallbackEv>:
void SerialDebug::serialTxCpltCallback(){
80006d6: b580 push {r7, lr}
80006d8: b084 sub sp, #16
80006da: af00 add r7, sp, #0
80006dc: 6078 str r0, [r7, #4]
uint32_t numChars;
uint8_t* pointer;
if (fifo->pop(&pointer, &numChars, bufSize) >= 0){
80006de: 687b ldr r3, [r7, #4]
80006e0: 6818 ldr r0, [r3, #0]
80006e2: f107 020c add.w r2, r7, #12
80006e6: f107 0108 add.w r1, r7, #8
80006ea: 2380 movs r3, #128 ; 0x80
80006ec: f000 fa47 bl 8000b7e <_ZN10StaticFIFO3popEPPhPmm>
80006f0: 4603 mov r3, r0
80006f2: 43db mvns r3, r3
80006f4: 0fdb lsrs r3, r3, #31
80006f6: b2db uxtb r3, r3
80006f8: 2b00 cmp r3, #0
80006fa: d00f beq.n 800071c <_ZN11SerialDebug20serialTxCpltCallbackEv+0x46>
memcpy(uartBuf, pointer, numChars);
80006fc: 687b ldr r3, [r7, #4]
80006fe: 338c adds r3, #140 ; 0x8c
8000700: 68b9 ldr r1, [r7, #8]
8000702: 68fa ldr r2, [r7, #12]
8000704: 4618 mov r0, r3
8000706: f004 fc2d bl 8004f64 <memcpy>
HAL_UART_Transmit_DMA(huartptr, pointer, (uint16_t)numChars);
800070a: 687b ldr r3, [r7, #4]
800070c: 689b ldr r3, [r3, #8]
800070e: 68b9 ldr r1, [r7, #8]
8000710: 68fa ldr r2, [r7, #12]
8000712: b292 uxth r2, r2
8000714: 4618 mov r0, r3
8000716: f003 fdad bl 8004274 <HAL_UART_Transmit_DMA>
}else{
transmitting = false;
}
}
800071a: e002 b.n 8000722 <_ZN11SerialDebug20serialTxCpltCallbackEv+0x4c>
transmitting = false;
800071c: 687b ldr r3, [r7, #4]
800071e: 2200 movs r2, #0
8000720: 711a strb r2, [r3, #4]
}
8000722: bf00 nop
8000724: 3710 adds r7, #16
8000726: 46bd mov sp, r7
8000728: bd80 pop {r7, pc}
...
0800072c <_ZN11SerialDebug5debugEPKc>:
void SerialDebug::debug(const char* data){
800072c: b590 push {r4, r7, lr}
800072e: b085 sub sp, #20
8000730: af00 add r7, sp, #0
8000732: 6078 str r0, [r7, #4]
8000734: 6039 str r1, [r7, #0]
if (debugLevel <= DEBUG_LEVEL_DEBUG){
8000736: 687b ldr r3, [r7, #4]
8000738: f893 310c ldrb.w r3, [r3, #268] ; 0x10c
800073c: 2b00 cmp r3, #0
800073e: d130 bne.n 80007a2 <_ZN11SerialDebug5debugEPKc+0x76>
int numChars = sprintf(charBuf, "[%13lu] DBG: %.105s\r\n", HAL_GetTick(), data);
8000740: 687b ldr r3, [r7, #4]
8000742: f103 040c add.w r4, r3, #12
8000746: f001 f8b5 bl 80018b4 <HAL_GetTick>
800074a: 4602 mov r2, r0
800074c: 683b ldr r3, [r7, #0]
800074e: 4917 ldr r1, [pc, #92] ; (80007ac <_ZN11SerialDebug5debugEPKc+0x80>)
8000750: 4620 mov r0, r4
8000752: f004 fd4d bl 80051f0 <siprintf>
8000756: 60f8 str r0, [r7, #12]
if(numChars > 0){
8000758: 68fb ldr r3, [r7, #12]
800075a: 2b00 cmp r3, #0
800075c: dd21 ble.n 80007a2 <_ZN11SerialDebug5debugEPKc+0x76>
if(transmitting){
800075e: 687b ldr r3, [r7, #4]
8000760: 791b ldrb r3, [r3, #4]
8000762: 2b00 cmp r3, #0
8000764: d008 beq.n 8000778 <_ZN11SerialDebug5debugEPKc+0x4c>
fifo->push(charBuf, numChars);
8000766: 687b ldr r3, [r7, #4]
8000768: 6818 ldr r0, [r3, #0]
800076a: 687b ldr r3, [r7, #4]
800076c: 330c adds r3, #12
800076e: 68fa ldr r2, [r7, #12]
8000770: 4619 mov r1, r3
8000772: f000 f999 bl 8000aa8 <_ZN10StaticFIFO4pushEPcm>
memcpy(uartBuf, (uint8_t*)charBuf, numChars);
HAL_UART_Transmit_DMA(huartptr, uartBuf, (uint16_t)numChars);
}
}
}
}
8000776: e014 b.n 80007a2 <_ZN11SerialDebug5debugEPKc+0x76>
transmitting = true;
8000778: 687b ldr r3, [r7, #4]
800077a: 2201 movs r2, #1
800077c: 711a strb r2, [r3, #4]
memcpy(uartBuf, (uint8_t*)charBuf, numChars);
800077e: 687b ldr r3, [r7, #4]
8000780: f103 008c add.w r0, r3, #140 ; 0x8c
8000784: 687b ldr r3, [r7, #4]
8000786: 330c adds r3, #12
8000788: 68fa ldr r2, [r7, #12]
800078a: 4619 mov r1, r3
800078c: f004 fbea bl 8004f64 <memcpy>
HAL_UART_Transmit_DMA(huartptr, uartBuf, (uint16_t)numChars);
8000790: 687b ldr r3, [r7, #4]
8000792: 6898 ldr r0, [r3, #8]
8000794: 687b ldr r3, [r7, #4]
8000796: 338c adds r3, #140 ; 0x8c
8000798: 68fa ldr r2, [r7, #12]
800079a: b292 uxth r2, r2
800079c: 4619 mov r1, r3
800079e: f003 fd69 bl 8004274 <HAL_UART_Transmit_DMA>
}
80007a2: bf00 nop
80007a4: 3714 adds r7, #20
80007a6: 46bd mov sp, r7
80007a8: bd90 pop {r4, r7, pc}
80007aa: bf00 nop
80007ac: 080059cc .word 0x080059cc
080007b0 <_ZN11SerialDebug4infoEPKc>:
void SerialDebug::info(const char* data){
80007b0: b590 push {r4, r7, lr}
80007b2: b085 sub sp, #20
80007b4: af00 add r7, sp, #0
80007b6: 6078 str r0, [r7, #4]
80007b8: 6039 str r1, [r7, #0]
if (debugLevel <= DEBUG_LEVEL_INFO){
80007ba: 687b ldr r3, [r7, #4]
80007bc: f893 310c ldrb.w r3, [r3, #268] ; 0x10c
80007c0: 2b01 cmp r3, #1
80007c2: d830 bhi.n 8000826 <_ZN11SerialDebug4infoEPKc+0x76>
int numChars = sprintf(charBuf, "[%13lu] INF: %.105s\r\n", HAL_GetTick(), data);
80007c4: 687b ldr r3, [r7, #4]
80007c6: f103 040c add.w r4, r3, #12
80007ca: f001 f873 bl 80018b4 <HAL_GetTick>
80007ce: 4602 mov r2, r0
80007d0: 683b ldr r3, [r7, #0]
80007d2: 4917 ldr r1, [pc, #92] ; (8000830 <_ZN11SerialDebug4infoEPKc+0x80>)
80007d4: 4620 mov r0, r4
80007d6: f004 fd0b bl 80051f0 <siprintf>
80007da: 60f8 str r0, [r7, #12]
if(numChars > 0){
80007dc: 68fb ldr r3, [r7, #12]
80007de: 2b00 cmp r3, #0
80007e0: dd21 ble.n 8000826 <_ZN11SerialDebug4infoEPKc+0x76>
if(transmitting){
80007e2: 687b ldr r3, [r7, #4]
80007e4: 791b ldrb r3, [r3, #4]
80007e6: 2b00 cmp r3, #0
80007e8: d008 beq.n 80007fc <_ZN11SerialDebug4infoEPKc+0x4c>
fifo->push(charBuf, numChars);
80007ea: 687b ldr r3, [r7, #4]
80007ec: 6818 ldr r0, [r3, #0]
80007ee: 687b ldr r3, [r7, #4]
80007f0: 330c adds r3, #12
80007f2: 68fa ldr r2, [r7, #12]
80007f4: 4619 mov r1, r3
80007f6: f000 f957 bl 8000aa8 <_ZN10StaticFIFO4pushEPcm>
memcpy(uartBuf, (uint8_t*)charBuf, numChars);
HAL_UART_Transmit_DMA(huartptr, uartBuf, (uint16_t)numChars);
}
}
}
}
80007fa: e014 b.n 8000826 <_ZN11SerialDebug4infoEPKc+0x76>
transmitting = true;
80007fc: 687b ldr r3, [r7, #4]
80007fe: 2201 movs r2, #1
8000800: 711a strb r2, [r3, #4]
memcpy(uartBuf, (uint8_t*)charBuf, numChars);
8000802: 687b ldr r3, [r7, #4]
8000804: f103 008c add.w r0, r3, #140 ; 0x8c
8000808: 687b ldr r3, [r7, #4]
800080a: 330c adds r3, #12
800080c: 68fa ldr r2, [r7, #12]
800080e: 4619 mov r1, r3
8000810: f004 fba8 bl 8004f64 <memcpy>
HAL_UART_Transmit_DMA(huartptr, uartBuf, (uint16_t)numChars);
8000814: 687b ldr r3, [r7, #4]
8000816: 6898 ldr r0, [r3, #8]
8000818: 687b ldr r3, [r7, #4]
800081a: 338c adds r3, #140 ; 0x8c
800081c: 68fa ldr r2, [r7, #12]
800081e: b292 uxth r2, r2
8000820: 4619 mov r1, r3
8000822: f003 fd27 bl 8004274 <HAL_UART_Transmit_DMA>
}
8000826: bf00 nop
8000828: 3714 adds r7, #20
800082a: 46bd mov sp, r7
800082c: bd90 pop {r4, r7, pc}
800082e: bf00 nop
8000830: 080059e4 .word 0x080059e4
08000834 <HAL_TIM_PeriodElapsedCallback>:
//Temporary variables begin
char buf[64];
//Temporary Variables end
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim){
8000834: b480 push {r7}
8000836: b083 sub sp, #12
8000838: af00 add r7, sp, #0
800083a: 6078 str r0, [r7, #4]
if(htim==&htim4){
}
}
800083c: bf00 nop
800083e: 370c adds r7, #12
8000840: 46bd mov sp, r7
8000842: bc80 pop {r7}
8000844: 4770 bx lr
...
08000848 <HAL_UART_RxCpltCallback>:
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) {
8000848: b580 push {r7, lr}
800084a: b082 sub sp, #8
800084c: af00 add r7, sp, #0
800084e: 6078 str r0, [r7, #4]
if(huart == &huart1){
8000850: 687b ldr r3, [r7, #4]
8000852: 4a05 ldr r2, [pc, #20] ; (8000868 <HAL_UART_RxCpltCallback+0x20>)
8000854: 4293 cmp r3, r2
8000856: d102 bne.n 800085e <HAL_UART_RxCpltCallback+0x16>
esp0.uart_callback();
8000858: 4804 ldr r0, [pc, #16] ; (800086c <HAL_UART_RxCpltCallback+0x24>)
800085a: f7ff fcbe bl 80001da <_ZN7ESP826613uart_callbackEv>
}
}
800085e: bf00 nop
8000860: 3708 adds r7, #8
8000862: 46bd mov sp, r7
8000864: bd80 pop {r7, pc}
8000866: bf00 nop
8000868: 200004d0 .word 0x200004d0
800086c: 2000019c .word 0x2000019c
08000870 <HAL_UART_TxCpltCallback>:
void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart) {
8000870: b580 push {r7, lr}
8000872: b082 sub sp, #8
8000874: af00 add r7, sp, #0
8000876: 6078 str r0, [r7, #4]
if(huart == &huart2){
8000878: 687b ldr r3, [r7, #4]
800087a: 4a05 ldr r2, [pc, #20] ; (8000890 <HAL_UART_TxCpltCallback+0x20>)
800087c: 4293 cmp r3, r2
800087e: d102 bne.n 8000886 <HAL_UART_TxCpltCallback+0x16>
debug.serialTxCpltCallback();
8000880: 4804 ldr r0, [pc, #16] ; (8000894 <HAL_UART_TxCpltCallback+0x24>)
8000882: f7ff ff28 bl 80006d6 <_ZN11SerialDebug20serialTxCpltCallbackEv>
}
}
8000886: bf00 nop
8000888: 3708 adds r7, #8
800088a: 46bd mov sp, r7
800088c: bd80 pop {r7, pc}
800088e: bf00 nop
8000890: 20000514 .word 0x20000514
8000894: 2000008c .word 0x2000008c
08000898 <start>:
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
}
void start(){
8000898: b580 push {r7, lr}
800089a: af00 add r7, sp, #0
debug.setLevel(SerialDebug::DEBUG_LEVEL_DEBUG);
800089c: 2100 movs r1, #0
800089e: 4829 ldr r0, [pc, #164] ; (8000944 <start+0xac>)
80008a0: f7ff ff0a bl 80006b8 <_ZN11SerialDebug8setLevelENS_10DebugLevelE>
debug.info("-----Init-----");
80008a4: 4928 ldr r1, [pc, #160] ; (8000948 <start+0xb0>)
80008a6: 4827 ldr r0, [pc, #156] ; (8000944 <start+0xac>)
80008a8: f7ff ff82 bl 80007b0 <_ZN11SerialDebug4infoEPKc>
debug.info("Init timers begin");
80008ac: 4927 ldr r1, [pc, #156] ; (800094c <start+0xb4>)
80008ae: 4825 ldr r0, [pc, #148] ; (8000944 <start+0xac>)
80008b0: f7ff ff7e bl 80007b0 <_ZN11SerialDebug4infoEPKc>
//HAL_TIM_Encoder_Start(&htim1, TIM_CHANNEL_1);
HAL_TIM_Encoder_Start(&htim1, TIM_CHANNEL_ALL);
80008b4: 213c movs r1, #60 ; 0x3c
80008b6: 4826 ldr r0, [pc, #152] ; (8000950 <start+0xb8>)
80008b8: f002 fd7c bl 80033b4 <HAL_TIM_Encoder_Start>
//HAL_TIM_Encoder_Start(&htim3, TIM_CHANNEL_1);
HAL_TIM_Encoder_Start(&htim3, TIM_CHANNEL_ALL);
80008bc: 213c movs r1, #60 ; 0x3c
80008be: 4825 ldr r0, [pc, #148] ; (8000954 <start+0xbc>)
80008c0: f002 fd78 bl 80033b4 <HAL_TIM_Encoder_Start>
HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_ALL);
80008c4: 213c movs r1, #60 ; 0x3c
80008c6: 4824 ldr r0, [pc, #144] ; (8000958 <start+0xc0>)
80008c8: f002 fc30 bl 800312c <HAL_TIM_PWM_Start>
HAL_TIM_Base_Start(&htim4);
80008cc: 4823 ldr r0, [pc, #140] ; (800095c <start+0xc4>)
80008ce: f002 fb93 bl 8002ff8 <HAL_TIM_Base_Start>
debug.info("Init timers end");
80008d2: 4923 ldr r1, [pc, #140] ; (8000960 <start+0xc8>)
80008d4: 481b ldr r0, [pc, #108] ; (8000944 <start+0xac>)
80008d6: f7ff ff6b bl 80007b0 <_ZN11SerialDebug4infoEPKc>
debug.info("Init ESP8266 begin");
80008da: 4922 ldr r1, [pc, #136] ; (8000964 <start+0xcc>)
80008dc: 4819 ldr r0, [pc, #100] ; (8000944 <start+0xac>)
80008de: f7ff ff67 bl 80007b0 <_ZN11SerialDebug4infoEPKc>
HAL_Delay(1000);
80008e2: f44f 707a mov.w r0, #1000 ; 0x3e8
80008e6: f000 ffef bl 80018c8 <HAL_Delay>
switch(esp0.command("ATE1\r\n")){
80008ea: 491f ldr r1, [pc, #124] ; (8000968 <start+0xd0>)
80008ec: 481f ldr r0, [pc, #124] ; (800096c <start+0xd4>)
80008ee: f7ff fca7 bl 8000240 <_ZN7ESP82667commandEPKc>
80008f2: 4603 mov r3, r0
80008f4: 2b02 cmp r3, #2
80008f6: d010 beq.n 800091a <start+0x82>
80008f8: 2b02 cmp r3, #2
80008fa: dc13 bgt.n 8000924 <start+0x8c>
80008fc: 2b00 cmp r3, #0
80008fe: d002 beq.n 8000906 <start+0x6e>
8000900: 2b01 cmp r3, #1
8000902: d005 beq.n 8000910 <start+0x78>
8000904: e00e b.n 8000924 <start+0x8c>
case ESP8266::STATUS_OK:
debug.debug("ATE0 OK");
8000906: 491a ldr r1, [pc, #104] ; (8000970 <start+0xd8>)
8000908: 480e ldr r0, [pc, #56] ; (8000944 <start+0xac>)
800090a: f7ff ff0f bl 800072c <_ZN11SerialDebug5debugEPKc>
break;
800090e: e009 b.n 8000924 <start+0x8c>
case ESP8266::STATUS_ERROR:
debug.debug("ATE0 ERROR");
8000910: 4918 ldr r1, [pc, #96] ; (8000974 <start+0xdc>)
8000912: 480c ldr r0, [pc, #48] ; (8000944 <start+0xac>)
8000914: f7ff ff0a bl 800072c <_ZN11SerialDebug5debugEPKc>
break;
8000918: e004 b.n 8000924 <start+0x8c>
case ESP8266::STATUS_TIMEOUT:
debug.debug("ATE0 TIMEOUT");
800091a: 4917 ldr r1, [pc, #92] ; (8000978 <start+0xe0>)
800091c: 4809 ldr r0, [pc, #36] ; (8000944 <start+0xac>)
800091e: f7ff ff05 bl 800072c <_ZN11SerialDebug5debugEPKc>
break;
8000922: bf00 nop
}
esp0.init();
8000924: 4811 ldr r0, [pc, #68] ; (800096c <start+0xd4>)
8000926: f7ff fc6b bl 8000200 <_ZN7ESP82664initEv>
//+IPD,0,14:Hello World 01\r\n
debug.info("Init ESP8266 end");
800092a: 4914 ldr r1, [pc, #80] ; (800097c <start+0xe4>)
800092c: 4805 ldr r0, [pc, #20] ; (8000944 <start+0xac>)
800092e: f7ff ff3f bl 80007b0 <_ZN11SerialDebug4infoEPKc>
while(true){
esp0.send_uint32("TIM1->CNT", TIM1->CNT);
8000932: 4b13 ldr r3, [pc, #76] ; (8000980 <start+0xe8>)
8000934: 6a5b ldr r3, [r3, #36] ; 0x24
8000936: 461a mov r2, r3
8000938: 4912 ldr r1, [pc, #72] ; (8000984 <start+0xec>)
800093a: 480c ldr r0, [pc, #48] ; (800096c <start+0xd4>)
800093c: f7ff fcb4 bl 80002a8 <_ZN7ESP826611send_uint32EPKcm>
8000940: e7f7 b.n 8000932 <start+0x9a>
8000942: bf00 nop
8000944: 2000008c .word 0x2000008c
8000948: 08005a2c .word 0x08005a2c
800094c: 08005a3c .word 0x08005a3c
8000950: 200003b0 .word 0x200003b0
8000954: 20000440 .word 0x20000440
8000958: 200003f8 .word 0x200003f8
800095c: 20000488 .word 0x20000488
8000960: 08005a50 .word 0x08005a50
8000964: 08005a60 .word 0x08005a60
8000968: 08005a74 .word 0x08005a74
800096c: 2000019c .word 0x2000019c
8000970: 08005a7c .word 0x08005a7c
8000974: 08005a84 .word 0x08005a84
8000978: 08005a90 .word 0x08005a90
800097c: 08005aa0 .word 0x08005aa0
8000980: 40012c00 .word 0x40012c00
8000984: 08005ab4 .word 0x08005ab4
08000988 <_Z41__static_initialization_and_destruction_0ii>:
/*sprintf(buf, "TIM1->CNT: %lu", TIM1->CNT);
debug.debug(buf);*/
//HAL_Delay(10);
}
}
8000988: b580 push {r7, lr}
800098a: b082 sub sp, #8
800098c: af00 add r7, sp, #0
800098e: 6078 str r0, [r7, #4]
8000990: 6039 str r1, [r7, #0]
8000992: 687b ldr r3, [r7, #4]
8000994: 2b01 cmp r3, #1
8000996: d10d bne.n 80009b4 <_Z41__static_initialization_and_destruction_0ii+0x2c>
8000998: 683b ldr r3, [r7, #0]
800099a: f64f 72ff movw r2, #65535 ; 0xffff
800099e: 4293 cmp r3, r2
80009a0: d108 bne.n 80009b4 <_Z41__static_initialization_and_destruction_0ii+0x2c>
SerialDebug debug(&huart2, 32);
80009a2: 2220 movs r2, #32
80009a4: 490b ldr r1, [pc, #44] ; (80009d4 <_Z41__static_initialization_and_destruction_0ii+0x4c>)
80009a6: 480c ldr r0, [pc, #48] ; (80009d8 <_Z41__static_initialization_and_destruction_0ii+0x50>)
80009a8: f7ff fe66 bl 8000678 <_ZN11SerialDebugC1EP20__UART_HandleTypeDefm>
ESP8266 esp0(&huart1);
80009ac: 490b ldr r1, [pc, #44] ; (80009dc <_Z41__static_initialization_and_destruction_0ii+0x54>)
80009ae: 480c ldr r0, [pc, #48] ; (80009e0 <_Z41__static_initialization_and_destruction_0ii+0x58>)
80009b0: f7ff fbde bl 8000170 <_ZN7ESP8266C1EP20__UART_HandleTypeDef>
80009b4: 687b ldr r3, [r7, #4]
80009b6: 2b00 cmp r3, #0
80009b8: d107 bne.n 80009ca <_Z41__static_initialization_and_destruction_0ii+0x42>
80009ba: 683b ldr r3, [r7, #0]
80009bc: f64f 72ff movw r2, #65535 ; 0xffff
80009c0: 4293 cmp r3, r2
80009c2: d102 bne.n 80009ca <_Z41__static_initialization_and_destruction_0ii+0x42>
80009c4: 4806 ldr r0, [pc, #24] ; (80009e0 <_Z41__static_initialization_and_destruction_0ii+0x58>)
80009c6: f7ff fbe7 bl 8000198 <_ZN7ESP8266D1Ev>
}
80009ca: bf00 nop
80009cc: 3708 adds r7, #8
80009ce: 46bd mov sp, r7
80009d0: bd80 pop {r7, pc}
80009d2: bf00 nop
80009d4: 20000514 .word 0x20000514
80009d8: 2000008c .word 0x2000008c
80009dc: 200004d0 .word 0x200004d0
80009e0: 2000019c .word 0x2000019c
080009e4 <_GLOBAL__sub_I_debug>:
80009e4: b580 push {r7, lr}
80009e6: af00 add r7, sp, #0
80009e8: f64f 71ff movw r1, #65535 ; 0xffff
80009ec: 2001 movs r0, #1
80009ee: f7ff ffcb bl 8000988 <_Z41__static_initialization_and_destruction_0ii>
80009f2: bd80 pop {r7, pc}
080009f4 <_GLOBAL__sub_D_debug>:
80009f4: b580 push {r7, lr}
80009f6: af00 add r7, sp, #0
80009f8: f64f 71ff movw r1, #65535 ; 0xffff
80009fc: 2000 movs r0, #0
80009fe: f7ff ffc3 bl 8000988 <_Z41__static_initialization_and_destruction_0ii>
8000a02: bd80 pop {r7, pc}
08000a04 <_ZN10StaticFIFOC1Em>:
#include "StaticFIFO.hpp"
#include <cstring>
StaticFIFO::StaticFIFO(uint32_t fifoSize) : fifoSize(fifoSize){
8000a04: b580 push {r7, lr}
8000a06: b082 sub sp, #8
8000a08: af00 add r7, sp, #0
8000a0a: 6078 str r0, [r7, #4]
8000a0c: 6039 str r1, [r7, #0]
8000a0e: 4a11 ldr r2, [pc, #68] ; (8000a54 <_ZN10StaticFIFOC1Em+0x50>)
8000a10: 687b ldr r3, [r7, #4]
8000a12: 601a str r2, [r3, #0]
8000a14: 687b ldr r3, [r7, #4]
8000a16: 683a ldr r2, [r7, #0]
8000a18: 605a str r2, [r3, #4]
8000a1a: 687b ldr r3, [r7, #4]
8000a1c: 2200 movs r2, #0
8000a1e: 60da str r2, [r3, #12]
8000a20: 687b ldr r3, [r7, #4]
8000a22: 2200 movs r2, #0
8000a24: 611a str r2, [r3, #16]
fifo = new StringContainer[fifoSize];
8000a26: 683a ldr r2, [r7, #0]
8000a28: 4b0b ldr r3, [pc, #44] ; (8000a58 <_ZN10StaticFIFOC1Em+0x54>)
8000a2a: 429a cmp r2, r3
8000a2c: d804 bhi.n 8000a38 <_ZN10StaticFIFOC1Em+0x34>
8000a2e: 4613 mov r3, r2
8000a30: 015b lsls r3, r3, #5
8000a32: 4413 add r3, r2
8000a34: 009b lsls r3, r3, #2
8000a36: e001 b.n 8000a3c <_ZN10StaticFIFOC1Em+0x38>
8000a38: f04f 33ff mov.w r3, #4294967295
8000a3c: 4618 mov r0, r3
8000a3e: f004 fa42 bl 8004ec6 <_Znaj>
8000a42: 4603 mov r3, r0
8000a44: 461a mov r2, r3
8000a46: 687b ldr r3, [r7, #4]
8000a48: 609a str r2, [r3, #8]
}
8000a4a: 687b ldr r3, [r7, #4]
8000a4c: 4618 mov r0, r3
8000a4e: 3708 adds r7, #8
8000a50: 46bd mov sp, r7
8000a52: bd80 pop {r7, pc}
8000a54: 08005ae8 .word 0x08005ae8
8000a58: 00f83e0f .word 0x00f83e0f
08000a5c <_ZN10StaticFIFOD1Ev>:
StaticFIFO::~StaticFIFO() {
8000a5c: b580 push {r7, lr}
8000a5e: b082 sub sp, #8
8000a60: af00 add r7, sp, #0
8000a62: 6078 str r0, [r7, #4]
8000a64: 4a07 ldr r2, [pc, #28] ; (8000a84 <_ZN10StaticFIFOD1Ev+0x28>)
8000a66: 687b ldr r3, [r7, #4]
8000a68: 601a str r2, [r3, #0]
delete fifo;
8000a6a: 687b ldr r3, [r7, #4]
8000a6c: 689b ldr r3, [r3, #8]
8000a6e: 2b00 cmp r3, #0
8000a70: d003 beq.n 8000a7a <_ZN10StaticFIFOD1Ev+0x1e>
8000a72: 2184 movs r1, #132 ; 0x84
8000a74: 4618 mov r0, r3
8000a76: f004 fa13 bl 8004ea0 <_ZdlPvj>
}
8000a7a: 687b ldr r3, [r7, #4]
8000a7c: 4618 mov r0, r3
8000a7e: 3708 adds r7, #8
8000a80: 46bd mov sp, r7
8000a82: bd80 pop {r7, pc}
8000a84: 08005ae8 .word 0x08005ae8
08000a88 <_ZN10StaticFIFOD0Ev>:
StaticFIFO::~StaticFIFO() {
8000a88: b580 push {r7, lr}
8000a8a: b082 sub sp, #8
8000a8c: af00 add r7, sp, #0
8000a8e: 6078 str r0, [r7, #4]
}
8000a90: 6878 ldr r0, [r7, #4]
8000a92: f7ff ffe3 bl 8000a5c <_ZN10StaticFIFOD1Ev>
8000a96: 2114 movs r1, #20
8000a98: 6878 ldr r0, [r7, #4]
8000a9a: f004 fa01 bl 8004ea0 <_ZdlPvj>
8000a9e: 687b ldr r3, [r7, #4]
8000aa0: 4618 mov r0, r3
8000aa2: 3708 adds r7, #8
8000aa4: 46bd mov sp, r7
8000aa6: bd80 pop {r7, pc}
08000aa8 <_ZN10StaticFIFO4pushEPcm>:
fifo[lastIdx] = stringContainer;
lastIdx = (lastIdx + 1) % fifoSize;
return (((fifoSize + lastIdx) - firstIdx) % fifoSize);
}
int32_t StaticFIFO::push(char* stringPointer, uint32_t stringLength){
8000aa8: b580 push {r7, lr}
8000aaa: b0a6 sub sp, #152 ; 0x98
8000aac: af00 add r7, sp, #0
8000aae: 60f8 str r0, [r7, #12]
8000ab0: 60b9 str r1, [r7, #8]
8000ab2: 607a str r2, [r7, #4]
if (((fifoSize + firstIdx) - lastIdx) % fifoSize == 1) {
8000ab4: 68fb ldr r3, [r7, #12]
8000ab6: 685a ldr r2, [r3, #4]
8000ab8: 68fb ldr r3, [r7, #12]
8000aba: 68db ldr r3, [r3, #12]
8000abc: 441a add r2, r3
8000abe: 68fb ldr r3, [r7, #12]
8000ac0: 691b ldr r3, [r3, #16]
8000ac2: 1ad3 subs r3, r2, r3
8000ac4: 68fa ldr r2, [r7, #12]
8000ac6: 6852 ldr r2, [r2, #4]
8000ac8: fbb3 f1f2 udiv r1, r3, r2
8000acc: fb01 f202 mul.w r2, r1, r2
8000ad0: 1a9b subs r3, r3, r2
8000ad2: 2b01 cmp r3, #1
8000ad4: d101 bne.n 8000ada <_ZN10StaticFIFO4pushEPcm+0x32>
return 0; //overflow
8000ad6: 2300 movs r3, #0
8000ad8: e04d b.n 8000b76 <_ZN10StaticFIFO4pushEPcm+0xce>
}else if(stringLength > bufSize){
8000ada: 687b ldr r3, [r7, #4]
8000adc: 2b80 cmp r3, #128 ; 0x80
8000ade: d902 bls.n 8000ae6 <_ZN10StaticFIFO4pushEPcm+0x3e>
return -2; //length limit
8000ae0: f06f 0301 mvn.w r3, #1
8000ae4: e047 b.n 8000b76 <_ZN10StaticFIFO4pushEPcm+0xce>
}
StringContainer stringContainer;
for(uint32_t i=0; i < (stringLength); i++){
8000ae6: 2300 movs r3, #0
8000ae8: f8c7 3094 str.w r3, [r7, #148] ; 0x94
8000aec: f8d7 2094 ldr.w r2, [r7, #148] ; 0x94
8000af0: 687b ldr r3, [r7, #4]
8000af2: 429a cmp r2, r3
8000af4: d211 bcs.n 8000b1a <_ZN10StaticFIFO4pushEPcm+0x72>
stringContainer.buffer[i] = stringPointer[i];
8000af6: 68ba ldr r2, [r7, #8]
8000af8: f8d7 3094 ldr.w r3, [r7, #148] ; 0x94
8000afc: 4413 add r3, r2
8000afe: 7819 ldrb r1, [r3, #0]
8000b00: f107 0210 add.w r2, r7, #16
8000b04: f8d7 3094 ldr.w r3, [r7, #148] ; 0x94
8000b08: 4413 add r3, r2
8000b0a: 460a mov r2, r1
8000b0c: 701a strb r2, [r3, #0]
for(uint32_t i=0; i < (stringLength); i++){
8000b0e: f8d7 3094 ldr.w r3, [r7, #148] ; 0x94
8000b12: 3301 adds r3, #1
8000b14: f8c7 3094 str.w r3, [r7, #148] ; 0x94
8000b18: e7e8 b.n 8000aec <_ZN10StaticFIFO4pushEPcm+0x44>
}
stringContainer.length = stringLength;
8000b1a: 687b ldr r3, [r7, #4]
8000b1c: f8c7 3090 str.w r3, [r7, #144] ; 0x90
fifo[lastIdx] = stringContainer;
8000b20: 68fb ldr r3, [r7, #12]
8000b22: 6899 ldr r1, [r3, #8]
8000b24: 68fb ldr r3, [r7, #12]
8000b26: 691a ldr r2, [r3, #16]
8000b28: 4613 mov r3, r2
8000b2a: 015b lsls r3, r3, #5
8000b2c: 4413 add r3, r2
8000b2e: 009b lsls r3, r3, #2
8000b30: 440b add r3, r1
8000b32: 4618 mov r0, r3
8000b34: f107 0310 add.w r3, r7, #16
8000b38: 2284 movs r2, #132 ; 0x84
8000b3a: 4619 mov r1, r3
8000b3c: f004 fa12 bl 8004f64 <memcpy>
lastIdx = (lastIdx + 1) % fifoSize;
8000b40: 68fb ldr r3, [r7, #12]
8000b42: 691b ldr r3, [r3, #16]
8000b44: 3301 adds r3, #1
8000b46: 68fa ldr r2, [r7, #12]
8000b48: 6852 ldr r2, [r2, #4]
8000b4a: fbb3 f1f2 udiv r1, r3, r2
8000b4e: fb01 f202 mul.w r2, r1, r2
8000b52: 1a9a subs r2, r3, r2
8000b54: 68fb ldr r3, [r7, #12]
8000b56: 611a str r2, [r3, #16]
return (((fifoSize + lastIdx) - firstIdx) % fifoSize);
8000b58: 68fb ldr r3, [r7, #12]
8000b5a: 685a ldr r2, [r3, #4]
8000b5c: 68fb ldr r3, [r7, #12]
8000b5e: 691b ldr r3, [r3, #16]
8000b60: 441a add r2, r3
8000b62: 68fb ldr r3, [r7, #12]
8000b64: 68db ldr r3, [r3, #12]
8000b66: 1ad3 subs r3, r2, r3
8000b68: 68fa ldr r2, [r7, #12]
8000b6a: 6852 ldr r2, [r2, #4]
8000b6c: fbb3 f1f2 udiv r1, r3, r2
8000b70: fb01 f202 mul.w r2, r1, r2
8000b74: 1a9b subs r3, r3, r2
}
8000b76: 4618 mov r0, r3
8000b78: 3798 adds r7, #152 ; 0x98
8000b7a: 46bd mov sp, r7
8000b7c: bd80 pop {r7, pc}
08000b7e <_ZN10StaticFIFO3popEPPhPmm>:
int32_t StaticFIFO::pop(uint8_t** pointer, uint32_t* length, uint32_t max_length){
8000b7e: b480 push {r7}
8000b80: b085 sub sp, #20
8000b82: af00 add r7, sp, #0
8000b84: 60f8 str r0, [r7, #12]
8000b86: 60b9 str r1, [r7, #8]
8000b88: 607a str r2, [r7, #4]
8000b8a: 603b str r3, [r7, #0]
if (lastIdx == firstIdx){
8000b8c: 68fb ldr r3, [r7, #12]
8000b8e: 691a ldr r2, [r3, #16]
8000b90: 68fb ldr r3, [r7, #12]
8000b92: 68db ldr r3, [r3, #12]
8000b94: 429a cmp r2, r3
8000b96: d102 bne.n 8000b9e <_ZN10StaticFIFO3popEPPhPmm+0x20>
return -1; //underrun
8000b98: f04f 33ff mov.w r3, #4294967295
8000b9c: e044 b.n 8000c28 <_ZN10StaticFIFO3popEPPhPmm+0xaa>
}else if(fifo[firstIdx].length > max_length){
8000b9e: 68fb ldr r3, [r7, #12]
8000ba0: 6899 ldr r1, [r3, #8]
8000ba2: 68fb ldr r3, [r7, #12]
8000ba4: 68da ldr r2, [r3, #12]
8000ba6: 4613 mov r3, r2
8000ba8: 015b lsls r3, r3, #5
8000baa: 4413 add r3, r2
8000bac: 009b lsls r3, r3, #2
8000bae: 440b add r3, r1
8000bb0: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80
8000bb4: 683a ldr r2, [r7, #0]
8000bb6: 429a cmp r2, r3
8000bb8: d202 bcs.n 8000bc0 <_ZN10StaticFIFO3popEPPhPmm+0x42>
return -2; //length limit
8000bba: f06f 0301 mvn.w r3, #1
8000bbe: e033 b.n 8000c28 <_ZN10StaticFIFO3popEPPhPmm+0xaa>
}
*pointer = fifo[firstIdx].buffer;
8000bc0: 68fb ldr r3, [r7, #12]
8000bc2: 6899 ldr r1, [r3, #8]
8000bc4: 68fb ldr r3, [r7, #12]
8000bc6: 68da ldr r2, [r3, #12]
8000bc8: 4613 mov r3, r2
8000bca: 015b lsls r3, r3, #5
8000bcc: 4413 add r3, r2
8000bce: 009b lsls r3, r3, #2
8000bd0: 440b add r3, r1
8000bd2: 461a mov r2, r3
8000bd4: 68bb ldr r3, [r7, #8]
8000bd6: 601a str r2, [r3, #0]
*length = fifo[firstIdx].length;
8000bd8: 68fb ldr r3, [r7, #12]
8000bda: 6899 ldr r1, [r3, #8]
8000bdc: 68fb ldr r3, [r7, #12]
8000bde: 68da ldr r2, [r3, #12]
8000be0: 4613 mov r3, r2
8000be2: 015b lsls r3, r3, #5
8000be4: 4413 add r3, r2
8000be6: 009b lsls r3, r3, #2
8000be8: 440b add r3, r1
8000bea: f8d3 2080 ldr.w r2, [r3, #128] ; 0x80
8000bee: 687b ldr r3, [r7, #4]
8000bf0: 601a str r2, [r3, #0]
firstIdx = (firstIdx + 1) % fifoSize;
8000bf2: 68fb ldr r3, [r7, #12]
8000bf4: 68db ldr r3, [r3, #12]
8000bf6: 3301 adds r3, #1
8000bf8: 68fa ldr r2, [r7, #12]
8000bfa: 6852 ldr r2, [r2, #4]
8000bfc: fbb3 f1f2 udiv r1, r3, r2
8000c00: fb01 f202 mul.w r2, r1, r2
8000c04: 1a9a subs r2, r3, r2
8000c06: 68fb ldr r3, [r7, #12]
8000c08: 60da str r2, [r3, #12]
return (((fifoSize + lastIdx) - firstIdx) % fifoSize);
8000c0a: 68fb ldr r3, [r7, #12]
8000c0c: 685a ldr r2, [r3, #4]
8000c0e: 68fb ldr r3, [r7, #12]
8000c10: 691b ldr r3, [r3, #16]
8000c12: 441a add r2, r3
8000c14: 68fb ldr r3, [r7, #12]
8000c16: 68db ldr r3, [r3, #12]
8000c18: 1ad3 subs r3, r2, r3
8000c1a: 68fa ldr r2, [r7, #12]
8000c1c: 6852 ldr r2, [r2, #4]
8000c1e: fbb3 f1f2 udiv r1, r3, r2
8000c22: fb01 f202 mul.w r2, r1, r2
8000c26: 1a9b subs r3, r3, r2
}
8000c28: 4618 mov r0, r3
8000c2a: 3714 adds r7, #20
8000c2c: 46bd mov sp, r7
8000c2e: bc80 pop {r7}
8000c30: 4770 bx lr
08000c32 <main>:
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
8000c32: b580 push {r7, lr}
8000c34: af00 add r7, sp, #0
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
8000c36: f000 fde5 bl 8001804 <HAL_Init>
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
8000c3a: f000 f815 bl 8000c68 <SystemClock_Config>
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
8000c3e: f000 fa75 bl 800112c <MX_GPIO_Init>
MX_DMA_Init();
8000c42: f000 fa55 bl 80010f0 <MX_DMA_Init>
MX_USART1_UART_Init();
8000c46: f000 f9dd bl 8001004 <MX_USART1_UART_Init>
MX_TIM4_Init();
8000c4a: f000 f98d bl 8000f68 <MX_TIM4_Init>
MX_TIM2_Init();
8000c4e: f000 f8bd bl 8000dcc <MX_TIM2_Init>
MX_USB_PCD_Init();
8000c52: f000 fa2b bl 80010ac <MX_USB_PCD_Init>
MX_TIM1_Init();
8000c56: f000 f861 bl 8000d1c <MX_TIM1_Init>
MX_TIM3_Init();
8000c5a: f000 f931 bl 8000ec0 <MX_TIM3_Init>
MX_USART2_UART_Init();
8000c5e: f000 f9fb bl 8001058 <MX_USART2_UART_Init>
/* USER CODE BEGIN 2 */
start();
8000c62: f7ff fe19 bl 8000898 <start>
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
8000c66: e7fe b.n 8000c66 <main+0x34>
08000c68 <SystemClock_Config>:
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
8000c68: b580 push {r7, lr}
8000c6a: b094 sub sp, #80 ; 0x50
8000c6c: af00 add r7, sp, #0
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
8000c6e: f107 0328 add.w r3, r7, #40 ; 0x28
8000c72: 2228 movs r2, #40 ; 0x28
8000c74: 2100 movs r1, #0
8000c76: 4618 mov r0, r3
8000c78: f004 f982 bl 8004f80 <memset>
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
8000c7c: f107 0314 add.w r3, r7, #20
8000c80: 2200 movs r2, #0
8000c82: 601a str r2, [r3, #0]
8000c84: 605a str r2, [r3, #4]
8000c86: 609a str r2, [r3, #8]
8000c88: 60da str r2, [r3, #12]
8000c8a: 611a str r2, [r3, #16]
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
8000c8c: 1d3b adds r3, r7, #4
8000c8e: 2200 movs r2, #0
8000c90: 601a str r2, [r3, #0]
8000c92: 605a str r2, [r3, #4]
8000c94: 609a str r2, [r3, #8]
8000c96: 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;
8000c98: 2301 movs r3, #1
8000c9a: 62bb str r3, [r7, #40] ; 0x28
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
8000c9c: f44f 3380 mov.w r3, #65536 ; 0x10000
8000ca0: 62fb str r3, [r7, #44] ; 0x2c
RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1;
8000ca2: 2300 movs r3, #0
8000ca4: 633b str r3, [r7, #48] ; 0x30
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
8000ca6: 2301 movs r3, #1
8000ca8: 63bb str r3, [r7, #56] ; 0x38
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
8000caa: 2302 movs r3, #2
8000cac: 647b str r3, [r7, #68] ; 0x44
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
8000cae: f44f 3380 mov.w r3, #65536 ; 0x10000
8000cb2: 64bb str r3, [r7, #72] ; 0x48
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9;
8000cb4: f44f 13e0 mov.w r3, #1835008 ; 0x1c0000
8000cb8: 64fb str r3, [r7, #76] ; 0x4c
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
8000cba: f107 0328 add.w r3, r7, #40 ; 0x28
8000cbe: 4618 mov r0, r3
8000cc0: f001 fc7a bl 80025b8 <HAL_RCC_OscConfig>
8000cc4: 4603 mov r3, r0
8000cc6: 2b00 cmp r3, #0
8000cc8: d001 beq.n 8000cce <SystemClock_Config+0x66>
{
Error_Handler();
8000cca: f000 fa95 bl 80011f8 <Error_Handler>
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
8000cce: 230f movs r3, #15
8000cd0: 617b str r3, [r7, #20]
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
8000cd2: 2302 movs r3, #2
8000cd4: 61bb str r3, [r7, #24]
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
8000cd6: 2300 movs r3, #0
8000cd8: 61fb str r3, [r7, #28]
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
8000cda: f44f 6380 mov.w r3, #1024 ; 0x400
8000cde: 623b str r3, [r7, #32]
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
8000ce0: 2300 movs r3, #0
8000ce2: 627b str r3, [r7, #36] ; 0x24
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
8000ce4: f107 0314 add.w r3, r7, #20
8000ce8: 2102 movs r1, #2
8000cea: 4618 mov r0, r3
8000cec: f001 fee6 bl 8002abc <HAL_RCC_ClockConfig>
8000cf0: 4603 mov r3, r0
8000cf2: 2b00 cmp r3, #0
8000cf4: d001 beq.n 8000cfa <SystemClock_Config+0x92>
{
Error_Handler();
8000cf6: f000 fa7f bl 80011f8 <Error_Handler>
}
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB;
8000cfa: 2310 movs r3, #16
8000cfc: 607b str r3, [r7, #4]
PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLL_DIV1_5;
8000cfe: 2300 movs r3, #0
8000d00: 613b str r3, [r7, #16]
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
8000d02: 1d3b adds r3, r7, #4
8000d04: 4618 mov r0, r3
8000d06: f002 f871 bl 8002dec <HAL_RCCEx_PeriphCLKConfig>
8000d0a: 4603 mov r3, r0
8000d0c: 2b00 cmp r3, #0
8000d0e: d001 beq.n 8000d14 <SystemClock_Config+0xac>
{
Error_Handler();
8000d10: f000 fa72 bl 80011f8 <Error_Handler>
}
}
8000d14: bf00 nop
8000d16: 3750 adds r7, #80 ; 0x50
8000d18: 46bd mov sp, r7
8000d1a: bd80 pop {r7, pc}
08000d1c <MX_TIM1_Init>:
* @brief TIM1 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM1_Init(void)
{
8000d1c: b580 push {r7, lr}
8000d1e: b08c sub sp, #48 ; 0x30
8000d20: af00 add r7, sp, #0
/* USER CODE BEGIN TIM1_Init 0 */
/* USER CODE END TIM1_Init 0 */
TIM_Encoder_InitTypeDef sConfig = {0};
8000d22: f107 030c add.w r3, r7, #12
8000d26: 2224 movs r2, #36 ; 0x24
8000d28: 2100 movs r1, #0
8000d2a: 4618 mov r0, r3
8000d2c: f004 f928 bl 8004f80 <memset>
TIM_MasterConfigTypeDef sMasterConfig = {0};
8000d30: 1d3b adds r3, r7, #4
8000d32: 2200 movs r2, #0
8000d34: 601a str r2, [r3, #0]
8000d36: 605a str r2, [r3, #4]
/* USER CODE BEGIN TIM1_Init 1 */
/* USER CODE END TIM1_Init 1 */
htim1.Instance = TIM1;
8000d38: 4b22 ldr r3, [pc, #136] ; (8000dc4 <MX_TIM1_Init+0xa8>)
8000d3a: 4a23 ldr r2, [pc, #140] ; (8000dc8 <MX_TIM1_Init+0xac>)
8000d3c: 601a str r2, [r3, #0]
htim1.Init.Prescaler = 0;
8000d3e: 4b21 ldr r3, [pc, #132] ; (8000dc4 <MX_TIM1_Init+0xa8>)
8000d40: 2200 movs r2, #0
8000d42: 605a str r2, [r3, #4]
htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
8000d44: 4b1f ldr r3, [pc, #124] ; (8000dc4 <MX_TIM1_Init+0xa8>)
8000d46: 2200 movs r2, #0
8000d48: 609a str r2, [r3, #8]
htim1.Init.Period = 65535;
8000d4a: 4b1e ldr r3, [pc, #120] ; (8000dc4 <MX_TIM1_Init+0xa8>)
8000d4c: f64f 72ff movw r2, #65535 ; 0xffff
8000d50: 60da str r2, [r3, #12]
htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
8000d52: 4b1c ldr r3, [pc, #112] ; (8000dc4 <MX_TIM1_Init+0xa8>)
8000d54: 2200 movs r2, #0
8000d56: 611a str r2, [r3, #16]
htim1.Init.RepetitionCounter = 0;
8000d58: 4b1a ldr r3, [pc, #104] ; (8000dc4 <MX_TIM1_Init+0xa8>)
8000d5a: 2200 movs r2, #0
8000d5c: 615a str r2, [r3, #20]
htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
8000d5e: 4b19 ldr r3, [pc, #100] ; (8000dc4 <MX_TIM1_Init+0xa8>)
8000d60: 2200 movs r2, #0
8000d62: 619a str r2, [r3, #24]
sConfig.EncoderMode = TIM_ENCODERMODE_TI1;
8000d64: 2301 movs r3, #1
8000d66: 60fb str r3, [r7, #12]
sConfig.IC1Polarity = TIM_ICPOLARITY_RISING;
8000d68: 2300 movs r3, #0
8000d6a: 613b str r3, [r7, #16]
sConfig.IC1Selection = TIM_ICSELECTION_DIRECTTI;
8000d6c: 2301 movs r3, #1
8000d6e: 617b str r3, [r7, #20]
sConfig.IC1Prescaler = TIM_ICPSC_DIV1;
8000d70: 2300 movs r3, #0
8000d72: 61bb str r3, [r7, #24]
sConfig.IC1Filter = 0;
8000d74: 2300 movs r3, #0
8000d76: 61fb str r3, [r7, #28]
sConfig.IC2Polarity = TIM_ICPOLARITY_RISING;
8000d78: 2300 movs r3, #0
8000d7a: 623b str r3, [r7, #32]
sConfig.IC2Selection = TIM_ICSELECTION_DIRECTTI;
8000d7c: 2301 movs r3, #1
8000d7e: 627b str r3, [r7, #36] ; 0x24
sConfig.IC2Prescaler = TIM_ICPSC_DIV1;
8000d80: 2300 movs r3, #0
8000d82: 62bb str r3, [r7, #40] ; 0x28
sConfig.IC2Filter = 0;
8000d84: 2300 movs r3, #0
8000d86: 62fb str r3, [r7, #44] ; 0x2c
if (HAL_TIM_Encoder_Init(&htim1, &sConfig) != HAL_OK)
8000d88: f107 030c add.w r3, r7, #12
8000d8c: 4619 mov r1, r3
8000d8e: 480d ldr r0, [pc, #52] ; (8000dc4 <MX_TIM1_Init+0xa8>)
8000d90: f002 fa6e bl 8003270 <HAL_TIM_Encoder_Init>
8000d94: 4603 mov r3, r0
8000d96: 2b00 cmp r3, #0
8000d98: d001 beq.n 8000d9e <MX_TIM1_Init+0x82>
{
Error_Handler();
8000d9a: f000 fa2d bl 80011f8 <Error_Handler>
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
8000d9e: 2300 movs r3, #0
8000da0: 607b str r3, [r7, #4]
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
8000da2: 2300 movs r3, #0
8000da4: 60bb str r3, [r7, #8]
if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK)
8000da6: 1d3b adds r3, r7, #4
8000da8: 4619 mov r1, r3
8000daa: 4806 ldr r0, [pc, #24] ; (8000dc4 <MX_TIM1_Init+0xa8>)
8000dac: f003 f8e2 bl 8003f74 <HAL_TIMEx_MasterConfigSynchronization>
8000db0: 4603 mov r3, r0
8000db2: 2b00 cmp r3, #0
8000db4: d001 beq.n 8000dba <MX_TIM1_Init+0x9e>
{
Error_Handler();
8000db6: f000 fa1f bl 80011f8 <Error_Handler>
}
/* USER CODE BEGIN TIM1_Init 2 */
/* USER CODE END TIM1_Init 2 */
}
8000dba: bf00 nop
8000dbc: 3730 adds r7, #48 ; 0x30
8000dbe: 46bd mov sp, r7
8000dc0: bd80 pop {r7, pc}
8000dc2: bf00 nop
8000dc4: 200003b0 .word 0x200003b0
8000dc8: 40012c00 .word 0x40012c00
08000dcc <MX_TIM2_Init>:
* @brief TIM2 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM2_Init(void)
{
8000dcc: b580 push {r7, lr}
8000dce: b08a sub sp, #40 ; 0x28
8000dd0: af00 add r7, sp, #0
/* USER CODE BEGIN TIM2_Init 0 */
/* USER CODE END TIM2_Init 0 */
TIM_MasterConfigTypeDef sMasterConfig = {0};
8000dd2: f107 0320 add.w r3, r7, #32
8000dd6: 2200 movs r2, #0
8000dd8: 601a str r2, [r3, #0]
8000dda: 605a str r2, [r3, #4]
TIM_OC_InitTypeDef sConfigOC = {0};
8000ddc: 1d3b adds r3, r7, #4
8000dde: 2200 movs r2, #0
8000de0: 601a str r2, [r3, #0]
8000de2: 605a str r2, [r3, #4]
8000de4: 609a str r2, [r3, #8]
8000de6: 60da str r2, [r3, #12]
8000de8: 611a str r2, [r3, #16]
8000dea: 615a str r2, [r3, #20]
8000dec: 619a str r2, [r3, #24]
/* USER CODE BEGIN TIM2_Init 1 */
/* USER CODE END TIM2_Init 1 */
htim2.Instance = TIM2;
8000dee: 4b33 ldr r3, [pc, #204] ; (8000ebc <MX_TIM2_Init+0xf0>)
8000df0: f04f 4280 mov.w r2, #1073741824 ; 0x40000000
8000df4: 601a str r2, [r3, #0]
htim2.Init.Prescaler = 0;
8000df6: 4b31 ldr r3, [pc, #196] ; (8000ebc <MX_TIM2_Init+0xf0>)
8000df8: 2200 movs r2, #0
8000dfa: 605a str r2, [r3, #4]
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
8000dfc: 4b2f ldr r3, [pc, #188] ; (8000ebc <MX_TIM2_Init+0xf0>)
8000dfe: 2200 movs r2, #0
8000e00: 609a str r2, [r3, #8]
htim2.Init.Period = 65535;
8000e02: 4b2e ldr r3, [pc, #184] ; (8000ebc <MX_TIM2_Init+0xf0>)
8000e04: f64f 72ff movw r2, #65535 ; 0xffff
8000e08: 60da str r2, [r3, #12]
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
8000e0a: 4b2c ldr r3, [pc, #176] ; (8000ebc <MX_TIM2_Init+0xf0>)
8000e0c: 2200 movs r2, #0
8000e0e: 611a str r2, [r3, #16]
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
8000e10: 4b2a ldr r3, [pc, #168] ; (8000ebc <MX_TIM2_Init+0xf0>)
8000e12: 2200 movs r2, #0
8000e14: 619a str r2, [r3, #24]
if (HAL_TIM_PWM_Init(&htim2) != HAL_OK)
8000e16: 4829 ldr r0, [pc, #164] ; (8000ebc <MX_TIM2_Init+0xf0>)
8000e18: f002 f938 bl 800308c <HAL_TIM_PWM_Init>
8000e1c: 4603 mov r3, r0
8000e1e: 2b00 cmp r3, #0
8000e20: d001 beq.n 8000e26 <MX_TIM2_Init+0x5a>
{
Error_Handler();
8000e22: f000 f9e9 bl 80011f8 <Error_Handler>
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
8000e26: 2300 movs r3, #0
8000e28: 623b str r3, [r7, #32]
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
8000e2a: 2300 movs r3, #0
8000e2c: 627b str r3, [r7, #36] ; 0x24
if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK)
8000e2e: f107 0320 add.w r3, r7, #32
8000e32: 4619 mov r1, r3
8000e34: 4821 ldr r0, [pc, #132] ; (8000ebc <MX_TIM2_Init+0xf0>)
8000e36: f003 f89d bl 8003f74 <HAL_TIMEx_MasterConfigSynchronization>
8000e3a: 4603 mov r3, r0
8000e3c: 2b00 cmp r3, #0
8000e3e: d001 beq.n 8000e44 <MX_TIM2_Init+0x78>
{
Error_Handler();
8000e40: f000 f9da bl 80011f8 <Error_Handler>
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
8000e44: 2360 movs r3, #96 ; 0x60
8000e46: 607b str r3, [r7, #4]
sConfigOC.Pulse = 0;
8000e48: 2300 movs r3, #0
8000e4a: 60bb str r3, [r7, #8]
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
8000e4c: 2300 movs r3, #0
8000e4e: 60fb str r3, [r7, #12]
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
8000e50: 2300 movs r3, #0
8000e52: 617b str r3, [r7, #20]
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
8000e54: 1d3b adds r3, r7, #4
8000e56: 2200 movs r2, #0
8000e58: 4619 mov r1, r3
8000e5a: 4818 ldr r0, [pc, #96] ; (8000ebc <MX_TIM2_Init+0xf0>)
8000e5c: f002 fc40 bl 80036e0 <HAL_TIM_PWM_ConfigChannel>
8000e60: 4603 mov r3, r0
8000e62: 2b00 cmp r3, #0
8000e64: d001 beq.n 8000e6a <MX_TIM2_Init+0x9e>
{
Error_Handler();
8000e66: f000 f9c7 bl 80011f8 <Error_Handler>
}
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_2) != HAL_OK)
8000e6a: 1d3b adds r3, r7, #4
8000e6c: 2204 movs r2, #4
8000e6e: 4619 mov r1, r3
8000e70: 4812 ldr r0, [pc, #72] ; (8000ebc <MX_TIM2_Init+0xf0>)
8000e72: f002 fc35 bl 80036e0 <HAL_TIM_PWM_ConfigChannel>
8000e76: 4603 mov r3, r0
8000e78: 2b00 cmp r3, #0
8000e7a: d001 beq.n 8000e80 <MX_TIM2_Init+0xb4>
{
Error_Handler();
8000e7c: f000 f9bc bl 80011f8 <Error_Handler>
}
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_3) != HAL_OK)
8000e80: 1d3b adds r3, r7, #4
8000e82: 2208 movs r2, #8
8000e84: 4619 mov r1, r3
8000e86: 480d ldr r0, [pc, #52] ; (8000ebc <MX_TIM2_Init+0xf0>)
8000e88: f002 fc2a bl 80036e0 <HAL_TIM_PWM_ConfigChannel>
8000e8c: 4603 mov r3, r0
8000e8e: 2b00 cmp r3, #0
8000e90: d001 beq.n 8000e96 <MX_TIM2_Init+0xca>
{
Error_Handler();
8000e92: f000 f9b1 bl 80011f8 <Error_Handler>
}
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_4) != HAL_OK)
8000e96: 1d3b adds r3, r7, #4
8000e98: 220c movs r2, #12
8000e9a: 4619 mov r1, r3
8000e9c: 4807 ldr r0, [pc, #28] ; (8000ebc <MX_TIM2_Init+0xf0>)
8000e9e: f002 fc1f bl 80036e0 <HAL_TIM_PWM_ConfigChannel>
8000ea2: 4603 mov r3, r0
8000ea4: 2b00 cmp r3, #0
8000ea6: d001 beq.n 8000eac <MX_TIM2_Init+0xe0>
{
Error_Handler();
8000ea8: f000 f9a6 bl 80011f8 <Error_Handler>
}
/* USER CODE BEGIN TIM2_Init 2 */
/* USER CODE END TIM2_Init 2 */
HAL_TIM_MspPostInit(&htim2);
8000eac: 4803 ldr r0, [pc, #12] ; (8000ebc <MX_TIM2_Init+0xf0>)
8000eae: f000 fa89 bl 80013c4 <HAL_TIM_MspPostInit>
}
8000eb2: bf00 nop
8000eb4: 3728 adds r7, #40 ; 0x28
8000eb6: 46bd mov sp, r7
8000eb8: bd80 pop {r7, pc}
8000eba: bf00 nop
8000ebc: 200003f8 .word 0x200003f8
08000ec0 <MX_TIM3_Init>:
* @brief TIM3 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM3_Init(void)
{
8000ec0: b580 push {r7, lr}
8000ec2: b08c sub sp, #48 ; 0x30
8000ec4: af00 add r7, sp, #0
/* USER CODE BEGIN TIM3_Init 0 */
/* USER CODE END TIM3_Init 0 */
TIM_Encoder_InitTypeDef sConfig = {0};
8000ec6: f107 030c add.w r3, r7, #12
8000eca: 2224 movs r2, #36 ; 0x24
8000ecc: 2100 movs r1, #0
8000ece: 4618 mov r0, r3
8000ed0: f004 f856 bl 8004f80 <memset>
TIM_MasterConfigTypeDef sMasterConfig = {0};
8000ed4: 1d3b adds r3, r7, #4
8000ed6: 2200 movs r2, #0
8000ed8: 601a str r2, [r3, #0]
8000eda: 605a str r2, [r3, #4]
/* USER CODE BEGIN TIM3_Init 1 */
/* USER CODE END TIM3_Init 1 */
htim3.Instance = TIM3;
8000edc: 4b20 ldr r3, [pc, #128] ; (8000f60 <MX_TIM3_Init+0xa0>)
8000ede: 4a21 ldr r2, [pc, #132] ; (8000f64 <MX_TIM3_Init+0xa4>)
8000ee0: 601a str r2, [r3, #0]
htim3.Init.Prescaler = 0;
8000ee2: 4b1f ldr r3, [pc, #124] ; (8000f60 <MX_TIM3_Init+0xa0>)
8000ee4: 2200 movs r2, #0
8000ee6: 605a str r2, [r3, #4]
htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
8000ee8: 4b1d ldr r3, [pc, #116] ; (8000f60 <MX_TIM3_Init+0xa0>)
8000eea: 2200 movs r2, #0
8000eec: 609a str r2, [r3, #8]
htim3.Init.Period = 65535;
8000eee: 4b1c ldr r3, [pc, #112] ; (8000f60 <MX_TIM3_Init+0xa0>)
8000ef0: f64f 72ff movw r2, #65535 ; 0xffff
8000ef4: 60da str r2, [r3, #12]
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
8000ef6: 4b1a ldr r3, [pc, #104] ; (8000f60 <MX_TIM3_Init+0xa0>)
8000ef8: 2200 movs r2, #0
8000efa: 611a str r2, [r3, #16]
htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
8000efc: 4b18 ldr r3, [pc, #96] ; (8000f60 <MX_TIM3_Init+0xa0>)
8000efe: 2200 movs r2, #0
8000f00: 619a str r2, [r3, #24]
sConfig.EncoderMode = TIM_ENCODERMODE_TI1;
8000f02: 2301 movs r3, #1
8000f04: 60fb str r3, [r7, #12]
sConfig.IC1Polarity = TIM_ICPOLARITY_RISING;
8000f06: 2300 movs r3, #0
8000f08: 613b str r3, [r7, #16]
sConfig.IC1Selection = TIM_ICSELECTION_DIRECTTI;
8000f0a: 2301 movs r3, #1
8000f0c: 617b str r3, [r7, #20]
sConfig.IC1Prescaler = TIM_ICPSC_DIV1;
8000f0e: 2300 movs r3, #0
8000f10: 61bb str r3, [r7, #24]
sConfig.IC1Filter = 0;
8000f12: 2300 movs r3, #0
8000f14: 61fb str r3, [r7, #28]
sConfig.IC2Polarity = TIM_ICPOLARITY_RISING;
8000f16: 2300 movs r3, #0
8000f18: 623b str r3, [r7, #32]
sConfig.IC2Selection = TIM_ICSELECTION_DIRECTTI;
8000f1a: 2301 movs r3, #1
8000f1c: 627b str r3, [r7, #36] ; 0x24
sConfig.IC2Prescaler = TIM_ICPSC_DIV1;
8000f1e: 2300 movs r3, #0
8000f20: 62bb str r3, [r7, #40] ; 0x28
sConfig.IC2Filter = 0;
8000f22: 2300 movs r3, #0
8000f24: 62fb str r3, [r7, #44] ; 0x2c
if (HAL_TIM_Encoder_Init(&htim3, &sConfig) != HAL_OK)
8000f26: f107 030c add.w r3, r7, #12
8000f2a: 4619 mov r1, r3
8000f2c: 480c ldr r0, [pc, #48] ; (8000f60 <MX_TIM3_Init+0xa0>)
8000f2e: f002 f99f bl 8003270 <HAL_TIM_Encoder_Init>
8000f32: 4603 mov r3, r0
8000f34: 2b00 cmp r3, #0
8000f36: d001 beq.n 8000f3c <MX_TIM3_Init+0x7c>
{
Error_Handler();
8000f38: f000 f95e bl 80011f8 <Error_Handler>
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
8000f3c: 2300 movs r3, #0
8000f3e: 607b str r3, [r7, #4]
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
8000f40: 2300 movs r3, #0
8000f42: 60bb str r3, [r7, #8]
if (HAL_TIMEx_MasterConfigSynchronization(&htim3, &sMasterConfig) != HAL_OK)
8000f44: 1d3b adds r3, r7, #4
8000f46: 4619 mov r1, r3
8000f48: 4805 ldr r0, [pc, #20] ; (8000f60 <MX_TIM3_Init+0xa0>)
8000f4a: f003 f813 bl 8003f74 <HAL_TIMEx_MasterConfigSynchronization>
8000f4e: 4603 mov r3, r0
8000f50: 2b00 cmp r3, #0
8000f52: d001 beq.n 8000f58 <MX_TIM3_Init+0x98>
{
Error_Handler();
8000f54: f000 f950 bl 80011f8 <Error_Handler>
}
/* USER CODE BEGIN TIM3_Init 2 */
/* USER CODE END TIM3_Init 2 */
}
8000f58: bf00 nop
8000f5a: 3730 adds r7, #48 ; 0x30
8000f5c: 46bd mov sp, r7
8000f5e: bd80 pop {r7, pc}
8000f60: 20000440 .word 0x20000440
8000f64: 40000400 .word 0x40000400
08000f68 <MX_TIM4_Init>:
* @brief TIM4 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM4_Init(void)
{
8000f68: b580 push {r7, lr}
8000f6a: b086 sub sp, #24
8000f6c: af00 add r7, sp, #0
/* USER CODE BEGIN TIM4_Init 0 */
/* USER CODE END TIM4_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
8000f6e: f107 0308 add.w r3, r7, #8
8000f72: 2200 movs r2, #0
8000f74: 601a str r2, [r3, #0]
8000f76: 605a str r2, [r3, #4]
8000f78: 609a str r2, [r3, #8]
8000f7a: 60da str r2, [r3, #12]
TIM_MasterConfigTypeDef sMasterConfig = {0};
8000f7c: 463b mov r3, r7
8000f7e: 2200 movs r2, #0
8000f80: 601a str r2, [r3, #0]
8000f82: 605a str r2, [r3, #4]
/* USER CODE BEGIN TIM4_Init 1 */
/* USER CODE END TIM4_Init 1 */
htim4.Instance = TIM4;
8000f84: 4b1d ldr r3, [pc, #116] ; (8000ffc <MX_TIM4_Init+0x94>)
8000f86: 4a1e ldr r2, [pc, #120] ; (8001000 <MX_TIM4_Init+0x98>)
8000f88: 601a str r2, [r3, #0]
htim4.Init.Prescaler = 71;
8000f8a: 4b1c ldr r3, [pc, #112] ; (8000ffc <MX_TIM4_Init+0x94>)
8000f8c: 2247 movs r2, #71 ; 0x47
8000f8e: 605a str r2, [r3, #4]
htim4.Init.CounterMode = TIM_COUNTERMODE_UP;
8000f90: 4b1a ldr r3, [pc, #104] ; (8000ffc <MX_TIM4_Init+0x94>)
8000f92: 2200 movs r2, #0
8000f94: 609a str r2, [r3, #8]
htim4.Init.Period = 9999;
8000f96: 4b19 ldr r3, [pc, #100] ; (8000ffc <MX_TIM4_Init+0x94>)
8000f98: f242 720f movw r2, #9999 ; 0x270f
8000f9c: 60da str r2, [r3, #12]
htim4.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
8000f9e: 4b17 ldr r3, [pc, #92] ; (8000ffc <MX_TIM4_Init+0x94>)
8000fa0: 2200 movs r2, #0
8000fa2: 611a str r2, [r3, #16]
htim4.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
8000fa4: 4b15 ldr r3, [pc, #84] ; (8000ffc <MX_TIM4_Init+0x94>)
8000fa6: 2200 movs r2, #0
8000fa8: 619a str r2, [r3, #24]
if (HAL_TIM_Base_Init(&htim4) != HAL_OK)
8000faa: 4814 ldr r0, [pc, #80] ; (8000ffc <MX_TIM4_Init+0x94>)
8000fac: f001 ffd4 bl 8002f58 <HAL_TIM_Base_Init>
8000fb0: 4603 mov r3, r0
8000fb2: 2b00 cmp r3, #0
8000fb4: d001 beq.n 8000fba <MX_TIM4_Init+0x52>
{
Error_Handler();
8000fb6: f000 f91f bl 80011f8 <Error_Handler>
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
8000fba: f44f 5380 mov.w r3, #4096 ; 0x1000
8000fbe: 60bb str r3, [r7, #8]
if (HAL_TIM_ConfigClockSource(&htim4, &sClockSourceConfig) != HAL_OK)
8000fc0: f107 0308 add.w r3, r7, #8
8000fc4: 4619 mov r1, r3
8000fc6: 480d ldr r0, [pc, #52] ; (8000ffc <MX_TIM4_Init+0x94>)
8000fc8: f002 fc48 bl 800385c <HAL_TIM_ConfigClockSource>
8000fcc: 4603 mov r3, r0
8000fce: 2b00 cmp r3, #0
8000fd0: d001 beq.n 8000fd6 <MX_TIM4_Init+0x6e>
{
Error_Handler();
8000fd2: f000 f911 bl 80011f8 <Error_Handler>
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
8000fd6: 2300 movs r3, #0
8000fd8: 603b str r3, [r7, #0]
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
8000fda: 2300 movs r3, #0
8000fdc: 607b str r3, [r7, #4]
if (HAL_TIMEx_MasterConfigSynchronization(&htim4, &sMasterConfig) != HAL_OK)
8000fde: 463b mov r3, r7
8000fe0: 4619 mov r1, r3
8000fe2: 4806 ldr r0, [pc, #24] ; (8000ffc <MX_TIM4_Init+0x94>)
8000fe4: f002 ffc6 bl 8003f74 <HAL_TIMEx_MasterConfigSynchronization>
8000fe8: 4603 mov r3, r0
8000fea: 2b00 cmp r3, #0
8000fec: d001 beq.n 8000ff2 <MX_TIM4_Init+0x8a>
{
Error_Handler();
8000fee: f000 f903 bl 80011f8 <Error_Handler>
}
/* USER CODE BEGIN TIM4_Init 2 */
/* USER CODE END TIM4_Init 2 */
}
8000ff2: bf00 nop
8000ff4: 3718 adds r7, #24
8000ff6: 46bd mov sp, r7
8000ff8: bd80 pop {r7, pc}
8000ffa: bf00 nop
8000ffc: 20000488 .word 0x20000488
8001000: 40000800 .word 0x40000800
08001004 <MX_USART1_UART_Init>:
* @brief USART1 Initialization Function
* @param None
* @retval None
*/
static void MX_USART1_UART_Init(void)
{
8001004: b580 push {r7, lr}
8001006: af00 add r7, sp, #0
/* USER CODE END USART1_Init 0 */
/* USER CODE BEGIN USART1_Init 1 */
/* USER CODE END USART1_Init 1 */
huart1.Instance = USART1;
8001008: 4b10 ldr r3, [pc, #64] ; (800104c <MX_USART1_UART_Init+0x48>)
800100a: 4a11 ldr r2, [pc, #68] ; (8001050 <MX_USART1_UART_Init+0x4c>)
800100c: 601a str r2, [r3, #0]
huart1.Init.BaudRate = 2250000;
800100e: 4b0f ldr r3, [pc, #60] ; (800104c <MX_USART1_UART_Init+0x48>)
8001010: 4a10 ldr r2, [pc, #64] ; (8001054 <MX_USART1_UART_Init+0x50>)
8001012: 605a str r2, [r3, #4]
huart1.Init.WordLength = UART_WORDLENGTH_8B;
8001014: 4b0d ldr r3, [pc, #52] ; (800104c <MX_USART1_UART_Init+0x48>)
8001016: 2200 movs r2, #0
8001018: 609a str r2, [r3, #8]
huart1.Init.StopBits = UART_STOPBITS_1;
800101a: 4b0c ldr r3, [pc, #48] ; (800104c <MX_USART1_UART_Init+0x48>)
800101c: 2200 movs r2, #0
800101e: 60da str r2, [r3, #12]
huart1.Init.Parity = UART_PARITY_NONE;
8001020: 4b0a ldr r3, [pc, #40] ; (800104c <MX_USART1_UART_Init+0x48>)
8001022: 2200 movs r2, #0
8001024: 611a str r2, [r3, #16]
huart1.Init.Mode = UART_MODE_TX_RX;
8001026: 4b09 ldr r3, [pc, #36] ; (800104c <MX_USART1_UART_Init+0x48>)
8001028: 220c movs r2, #12
800102a: 615a str r2, [r3, #20]
huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
800102c: 4b07 ldr r3, [pc, #28] ; (800104c <MX_USART1_UART_Init+0x48>)
800102e: 2200 movs r2, #0
8001030: 619a str r2, [r3, #24]
huart1.Init.OverSampling = UART_OVERSAMPLING_16;
8001032: 4b06 ldr r3, [pc, #24] ; (800104c <MX_USART1_UART_Init+0x48>)
8001034: 2200 movs r2, #0
8001036: 61da str r2, [r3, #28]
if (HAL_UART_Init(&huart1) != HAL_OK)
8001038: 4804 ldr r0, [pc, #16] ; (800104c <MX_USART1_UART_Init+0x48>)
800103a: f003 f80b bl 8004054 <HAL_UART_Init>
800103e: 4603 mov r3, r0
8001040: 2b00 cmp r3, #0
8001042: d001 beq.n 8001048 <MX_USART1_UART_Init+0x44>
{
Error_Handler();
8001044: f000 f8d8 bl 80011f8 <Error_Handler>
}
/* USER CODE BEGIN USART1_Init 2 */
/* USER CODE END USART1_Init 2 */
}
8001048: bf00 nop
800104a: bd80 pop {r7, pc}
800104c: 200004d0 .word 0x200004d0
8001050: 40013800 .word 0x40013800
8001054: 00225510 .word 0x00225510
08001058 <MX_USART2_UART_Init>:
* @brief USART2 Initialization Function
* @param None
* @retval None
*/
static void MX_USART2_UART_Init(void)
{
8001058: b580 push {r7, lr}
800105a: af00 add r7, sp, #0
/* USER CODE END USART2_Init 0 */
/* USER CODE BEGIN USART2_Init 1 */
/* USER CODE END USART2_Init 1 */
huart2.Instance = USART2;
800105c: 4b10 ldr r3, [pc, #64] ; (80010a0 <MX_USART2_UART_Init+0x48>)
800105e: 4a11 ldr r2, [pc, #68] ; (80010a4 <MX_USART2_UART_Init+0x4c>)
8001060: 601a str r2, [r3, #0]
huart2.Init.BaudRate = 2250000;
8001062: 4b0f ldr r3, [pc, #60] ; (80010a0 <MX_USART2_UART_Init+0x48>)
8001064: 4a10 ldr r2, [pc, #64] ; (80010a8 <MX_USART2_UART_Init+0x50>)
8001066: 605a str r2, [r3, #4]
huart2.Init.WordLength = UART_WORDLENGTH_8B;
8001068: 4b0d ldr r3, [pc, #52] ; (80010a0 <MX_USART2_UART_Init+0x48>)
800106a: 2200 movs r2, #0
800106c: 609a str r2, [r3, #8]
huart2.Init.StopBits = UART_STOPBITS_1;
800106e: 4b0c ldr r3, [pc, #48] ; (80010a0 <MX_USART2_UART_Init+0x48>)
8001070: 2200 movs r2, #0
8001072: 60da str r2, [r3, #12]
huart2.Init.Parity = UART_PARITY_NONE;
8001074: 4b0a ldr r3, [pc, #40] ; (80010a0 <MX_USART2_UART_Init+0x48>)
8001076: 2200 movs r2, #0
8001078: 611a str r2, [r3, #16]
huart2.Init.Mode = UART_MODE_TX_RX;
800107a: 4b09 ldr r3, [pc, #36] ; (80010a0 <MX_USART2_UART_Init+0x48>)
800107c: 220c movs r2, #12
800107e: 615a str r2, [r3, #20]
huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
8001080: 4b07 ldr r3, [pc, #28] ; (80010a0 <MX_USART2_UART_Init+0x48>)
8001082: 2200 movs r2, #0
8001084: 619a str r2, [r3, #24]
huart2.Init.OverSampling = UART_OVERSAMPLING_16;
8001086: 4b06 ldr r3, [pc, #24] ; (80010a0 <MX_USART2_UART_Init+0x48>)
8001088: 2200 movs r2, #0
800108a: 61da str r2, [r3, #28]
if (HAL_UART_Init(&huart2) != HAL_OK)
800108c: 4804 ldr r0, [pc, #16] ; (80010a0 <MX_USART2_UART_Init+0x48>)
800108e: f002 ffe1 bl 8004054 <HAL_UART_Init>
8001092: 4603 mov r3, r0
8001094: 2b00 cmp r3, #0
8001096: d001 beq.n 800109c <MX_USART2_UART_Init+0x44>
{
Error_Handler();
8001098: f000 f8ae bl 80011f8 <Error_Handler>
}
/* USER CODE BEGIN USART2_Init 2 */
/* USER CODE END USART2_Init 2 */
}
800109c: bf00 nop
800109e: bd80 pop {r7, pc}
80010a0: 20000514 .word 0x20000514
80010a4: 40004400 .word 0x40004400
80010a8: 00225510 .word 0x00225510
080010ac <MX_USB_PCD_Init>:
* @brief USB Initialization Function
* @param None
* @retval None
*/
static void MX_USB_PCD_Init(void)
{
80010ac: b580 push {r7, lr}
80010ae: af00 add r7, sp, #0
/* USER CODE END USB_Init 0 */
/* USER CODE BEGIN USB_Init 1 */
/* USER CODE END USB_Init 1 */
hpcd_USB_FS.Instance = USB;
80010b0: 4b0d ldr r3, [pc, #52] ; (80010e8 <MX_USB_PCD_Init+0x3c>)
80010b2: 4a0e ldr r2, [pc, #56] ; (80010ec <MX_USB_PCD_Init+0x40>)
80010b4: 601a str r2, [r3, #0]
hpcd_USB_FS.Init.dev_endpoints = 8;
80010b6: 4b0c ldr r3, [pc, #48] ; (80010e8 <MX_USB_PCD_Init+0x3c>)
80010b8: 2208 movs r2, #8
80010ba: 605a str r2, [r3, #4]
hpcd_USB_FS.Init.speed = PCD_SPEED_FULL;
80010bc: 4b0a ldr r3, [pc, #40] ; (80010e8 <MX_USB_PCD_Init+0x3c>)
80010be: 2202 movs r2, #2
80010c0: 609a str r2, [r3, #8]
hpcd_USB_FS.Init.low_power_enable = DISABLE;
80010c2: 4b09 ldr r3, [pc, #36] ; (80010e8 <MX_USB_PCD_Init+0x3c>)
80010c4: 2200 movs r2, #0
80010c6: 619a str r2, [r3, #24]
hpcd_USB_FS.Init.lpm_enable = DISABLE;
80010c8: 4b07 ldr r3, [pc, #28] ; (80010e8 <MX_USB_PCD_Init+0x3c>)
80010ca: 2200 movs r2, #0
80010cc: 61da str r2, [r3, #28]
hpcd_USB_FS.Init.battery_charging_enable = DISABLE;
80010ce: 4b06 ldr r3, [pc, #24] ; (80010e8 <MX_USB_PCD_Init+0x3c>)
80010d0: 2200 movs r2, #0
80010d2: 621a str r2, [r3, #32]
if (HAL_PCD_Init(&hpcd_USB_FS) != HAL_OK)
80010d4: 4804 ldr r0, [pc, #16] ; (80010e8 <MX_USB_PCD_Init+0x3c>)
80010d6: f001 f963 bl 80023a0 <HAL_PCD_Init>
80010da: 4603 mov r3, r0
80010dc: 2b00 cmp r3, #0
80010de: d001 beq.n 80010e4 <MX_USB_PCD_Init+0x38>
{
Error_Handler();
80010e0: f000 f88a bl 80011f8 <Error_Handler>
}
/* USER CODE BEGIN USB_Init 2 */
/* USER CODE END USB_Init 2 */
}
80010e4: bf00 nop
80010e6: bd80 pop {r7, pc}
80010e8: 2000059c .word 0x2000059c
80010ec: 40005c00 .word 0x40005c00
080010f0 <MX_DMA_Init>:
/**
* Enable DMA controller clock
*/
static void MX_DMA_Init(void)
{
80010f0: b580 push {r7, lr}
80010f2: b082 sub sp, #8
80010f4: af00 add r7, sp, #0
/* DMA controller clock enable */
__HAL_RCC_DMA1_CLK_ENABLE();
80010f6: 4b0c ldr r3, [pc, #48] ; (8001128 <MX_DMA_Init+0x38>)
80010f8: 695b ldr r3, [r3, #20]
80010fa: 4a0b ldr r2, [pc, #44] ; (8001128 <MX_DMA_Init+0x38>)
80010fc: f043 0301 orr.w r3, r3, #1
8001100: 6153 str r3, [r2, #20]
8001102: 4b09 ldr r3, [pc, #36] ; (8001128 <MX_DMA_Init+0x38>)
8001104: 695b ldr r3, [r3, #20]
8001106: f003 0301 and.w r3, r3, #1
800110a: 607b str r3, [r7, #4]
800110c: 687b ldr r3, [r7, #4]
/* DMA interrupt init */
/* DMA1_Channel7_IRQn interrupt configuration */
HAL_NVIC_SetPriority(DMA1_Channel7_IRQn, 0, 0);
800110e: 2200 movs r2, #0
8001110: 2100 movs r1, #0
8001112: 2011 movs r0, #17
8001114: f000 fcd3 bl 8001abe <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(DMA1_Channel7_IRQn);
8001118: 2011 movs r0, #17
800111a: f000 fcec bl 8001af6 <HAL_NVIC_EnableIRQ>
}
800111e: bf00 nop
8001120: 3708 adds r7, #8
8001122: 46bd mov sp, r7
8001124: bd80 pop {r7, pc}
8001126: bf00 nop
8001128: 40021000 .word 0x40021000
0800112c <MX_GPIO_Init>:
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
800112c: b580 push {r7, lr}
800112e: b088 sub sp, #32
8001130: af00 add r7, sp, #0
GPIO_InitTypeDef GPIO_InitStruct = {0};
8001132: f107 0310 add.w r3, r7, #16
8001136: 2200 movs r2, #0
8001138: 601a str r2, [r3, #0]
800113a: 605a str r2, [r3, #4]
800113c: 609a str r2, [r3, #8]
800113e: 60da str r2, [r3, #12]
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOC_CLK_ENABLE();
8001140: 4b2a ldr r3, [pc, #168] ; (80011ec <MX_GPIO_Init+0xc0>)
8001142: 699b ldr r3, [r3, #24]
8001144: 4a29 ldr r2, [pc, #164] ; (80011ec <MX_GPIO_Init+0xc0>)
8001146: f043 0310 orr.w r3, r3, #16
800114a: 6193 str r3, [r2, #24]
800114c: 4b27 ldr r3, [pc, #156] ; (80011ec <MX_GPIO_Init+0xc0>)
800114e: 699b ldr r3, [r3, #24]
8001150: f003 0310 and.w r3, r3, #16
8001154: 60fb str r3, [r7, #12]
8001156: 68fb ldr r3, [r7, #12]
__HAL_RCC_GPIOD_CLK_ENABLE();
8001158: 4b24 ldr r3, [pc, #144] ; (80011ec <MX_GPIO_Init+0xc0>)
800115a: 699b ldr r3, [r3, #24]
800115c: 4a23 ldr r2, [pc, #140] ; (80011ec <MX_GPIO_Init+0xc0>)
800115e: f043 0320 orr.w r3, r3, #32
8001162: 6193 str r3, [r2, #24]
8001164: 4b21 ldr r3, [pc, #132] ; (80011ec <MX_GPIO_Init+0xc0>)
8001166: 699b ldr r3, [r3, #24]
8001168: f003 0320 and.w r3, r3, #32
800116c: 60bb str r3, [r7, #8]
800116e: 68bb ldr r3, [r7, #8]
__HAL_RCC_GPIOA_CLK_ENABLE();
8001170: 4b1e ldr r3, [pc, #120] ; (80011ec <MX_GPIO_Init+0xc0>)
8001172: 699b ldr r3, [r3, #24]
8001174: 4a1d ldr r2, [pc, #116] ; (80011ec <MX_GPIO_Init+0xc0>)
8001176: f043 0304 orr.w r3, r3, #4
800117a: 6193 str r3, [r2, #24]
800117c: 4b1b ldr r3, [pc, #108] ; (80011ec <MX_GPIO_Init+0xc0>)
800117e: 699b ldr r3, [r3, #24]
8001180: f003 0304 and.w r3, r3, #4
8001184: 607b str r3, [r7, #4]
8001186: 687b ldr r3, [r7, #4]
__HAL_RCC_GPIOB_CLK_ENABLE();
8001188: 4b18 ldr r3, [pc, #96] ; (80011ec <MX_GPIO_Init+0xc0>)
800118a: 699b ldr r3, [r3, #24]
800118c: 4a17 ldr r2, [pc, #92] ; (80011ec <MX_GPIO_Init+0xc0>)
800118e: f043 0308 orr.w r3, r3, #8
8001192: 6193 str r3, [r2, #24]
8001194: 4b15 ldr r3, [pc, #84] ; (80011ec <MX_GPIO_Init+0xc0>)
8001196: 699b ldr r3, [r3, #24]
8001198: f003 0308 and.w r3, r3, #8
800119c: 603b str r3, [r7, #0]
800119e: 683b ldr r3, [r7, #0]
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(LED_BUILTIN_GPIO_Port, LED_BUILTIN_Pin, GPIO_PIN_SET);
80011a0: 2201 movs r2, #1
80011a2: f44f 5100 mov.w r1, #8192 ; 0x2000
80011a6: 4812 ldr r0, [pc, #72] ; (80011f0 <MX_GPIO_Init+0xc4>)
80011a8: f001 f8e2 bl 8002370 <HAL_GPIO_WritePin>
/*Configure GPIO pin : LED_BUILTIN_Pin */
GPIO_InitStruct.Pin = LED_BUILTIN_Pin;
80011ac: f44f 5300 mov.w r3, #8192 ; 0x2000
80011b0: 613b str r3, [r7, #16]
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
80011b2: 2301 movs r3, #1
80011b4: 617b str r3, [r7, #20]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80011b6: 2300 movs r3, #0
80011b8: 61bb str r3, [r7, #24]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
80011ba: 2302 movs r3, #2
80011bc: 61fb str r3, [r7, #28]
HAL_GPIO_Init(LED_BUILTIN_GPIO_Port, &GPIO_InitStruct);
80011be: f107 0310 add.w r3, r7, #16
80011c2: 4619 mov r1, r3
80011c4: 480a ldr r0, [pc, #40] ; (80011f0 <MX_GPIO_Init+0xc4>)
80011c6: f000 ff4f bl 8002068 <HAL_GPIO_Init>
/*Configure GPIO pin : BOOT1_Pin */
GPIO_InitStruct.Pin = BOOT1_Pin;
80011ca: 2304 movs r3, #4
80011cc: 613b str r3, [r7, #16]
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
80011ce: 2300 movs r3, #0
80011d0: 617b str r3, [r7, #20]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80011d2: 2300 movs r3, #0
80011d4: 61bb str r3, [r7, #24]
HAL_GPIO_Init(BOOT1_GPIO_Port, &GPIO_InitStruct);
80011d6: f107 0310 add.w r3, r7, #16
80011da: 4619 mov r1, r3
80011dc: 4805 ldr r0, [pc, #20] ; (80011f4 <MX_GPIO_Init+0xc8>)
80011de: f000 ff43 bl 8002068 <HAL_GPIO_Init>
}
80011e2: bf00 nop
80011e4: 3720 adds r7, #32
80011e6: 46bd mov sp, r7
80011e8: bd80 pop {r7, pc}
80011ea: bf00 nop
80011ec: 40021000 .word 0x40021000
80011f0: 40011000 .word 0x40011000
80011f4: 40010c00 .word 0x40010c00
080011f8 <Error_Handler>:
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
80011f8: b480 push {r7}
80011fa: 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");
80011fc: b672 cpsid i
}
80011fe: bf00 nop
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
8001200: e7fe b.n 8001200 <Error_Handler+0x8>
...
08001204 <HAL_MspInit>:
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
{
8001204: b480 push {r7}
8001206: b085 sub sp, #20
8001208: af00 add r7, sp, #0
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
__HAL_RCC_AFIO_CLK_ENABLE();
800120a: 4b15 ldr r3, [pc, #84] ; (8001260 <HAL_MspInit+0x5c>)
800120c: 699b ldr r3, [r3, #24]
800120e: 4a14 ldr r2, [pc, #80] ; (8001260 <HAL_MspInit+0x5c>)
8001210: f043 0301 orr.w r3, r3, #1
8001214: 6193 str r3, [r2, #24]
8001216: 4b12 ldr r3, [pc, #72] ; (8001260 <HAL_MspInit+0x5c>)
8001218: 699b ldr r3, [r3, #24]
800121a: f003 0301 and.w r3, r3, #1
800121e: 60bb str r3, [r7, #8]
8001220: 68bb ldr r3, [r7, #8]
__HAL_RCC_PWR_CLK_ENABLE();
8001222: 4b0f ldr r3, [pc, #60] ; (8001260 <HAL_MspInit+0x5c>)
8001224: 69db ldr r3, [r3, #28]
8001226: 4a0e ldr r2, [pc, #56] ; (8001260 <HAL_MspInit+0x5c>)
8001228: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
800122c: 61d3 str r3, [r2, #28]
800122e: 4b0c ldr r3, [pc, #48] ; (8001260 <HAL_MspInit+0x5c>)
8001230: 69db ldr r3, [r3, #28]
8001232: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8001236: 607b str r3, [r7, #4]
8001238: 687b ldr r3, [r7, #4]
/* System interrupt init*/
/** NOJTAG: JTAG-DP Disabled and SW-DP Enabled
*/
__HAL_AFIO_REMAP_SWJ_NOJTAG();
800123a: 4b0a ldr r3, [pc, #40] ; (8001264 <HAL_MspInit+0x60>)
800123c: 685b ldr r3, [r3, #4]
800123e: 60fb str r3, [r7, #12]
8001240: 68fb ldr r3, [r7, #12]
8001242: f023 63e0 bic.w r3, r3, #117440512 ; 0x7000000
8001246: 60fb str r3, [r7, #12]
8001248: 68fb ldr r3, [r7, #12]
800124a: f043 7300 orr.w r3, r3, #33554432 ; 0x2000000
800124e: 60fb str r3, [r7, #12]
8001250: 4a04 ldr r2, [pc, #16] ; (8001264 <HAL_MspInit+0x60>)
8001252: 68fb ldr r3, [r7, #12]
8001254: 6053 str r3, [r2, #4]
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
}
8001256: bf00 nop
8001258: 3714 adds r7, #20
800125a: 46bd mov sp, r7
800125c: bc80 pop {r7}
800125e: 4770 bx lr
8001260: 40021000 .word 0x40021000
8001264: 40010000 .word 0x40010000
08001268 <HAL_TIM_Encoder_MspInit>:
* This function configures the hardware resources used in this example
* @param htim_encoder: TIM_Encoder handle pointer
* @retval None
*/
void HAL_TIM_Encoder_MspInit(TIM_HandleTypeDef* htim_encoder)
{
8001268: b580 push {r7, lr}
800126a: b08a sub sp, #40 ; 0x28
800126c: af00 add r7, sp, #0
800126e: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
8001270: f107 0318 add.w r3, r7, #24
8001274: 2200 movs r2, #0
8001276: 601a str r2, [r3, #0]
8001278: 605a str r2, [r3, #4]
800127a: 609a str r2, [r3, #8]
800127c: 60da str r2, [r3, #12]
if(htim_encoder->Instance==TIM1)
800127e: 687b ldr r3, [r7, #4]
8001280: 681b ldr r3, [r3, #0]
8001282: 4a2b ldr r2, [pc, #172] ; (8001330 <HAL_TIM_Encoder_MspInit+0xc8>)
8001284: 4293 cmp r3, r2
8001286: d125 bne.n 80012d4 <HAL_TIM_Encoder_MspInit+0x6c>
{
/* USER CODE BEGIN TIM1_MspInit 0 */
/* USER CODE END TIM1_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_TIM1_CLK_ENABLE();
8001288: 4b2a ldr r3, [pc, #168] ; (8001334 <HAL_TIM_Encoder_MspInit+0xcc>)
800128a: 699b ldr r3, [r3, #24]
800128c: 4a29 ldr r2, [pc, #164] ; (8001334 <HAL_TIM_Encoder_MspInit+0xcc>)
800128e: f443 6300 orr.w r3, r3, #2048 ; 0x800
8001292: 6193 str r3, [r2, #24]
8001294: 4b27 ldr r3, [pc, #156] ; (8001334 <HAL_TIM_Encoder_MspInit+0xcc>)
8001296: 699b ldr r3, [r3, #24]
8001298: f403 6300 and.w r3, r3, #2048 ; 0x800
800129c: 617b str r3, [r7, #20]
800129e: 697b ldr r3, [r7, #20]
__HAL_RCC_GPIOA_CLK_ENABLE();
80012a0: 4b24 ldr r3, [pc, #144] ; (8001334 <HAL_TIM_Encoder_MspInit+0xcc>)
80012a2: 699b ldr r3, [r3, #24]
80012a4: 4a23 ldr r2, [pc, #140] ; (8001334 <HAL_TIM_Encoder_MspInit+0xcc>)
80012a6: f043 0304 orr.w r3, r3, #4
80012aa: 6193 str r3, [r2, #24]
80012ac: 4b21 ldr r3, [pc, #132] ; (8001334 <HAL_TIM_Encoder_MspInit+0xcc>)
80012ae: 699b ldr r3, [r3, #24]
80012b0: f003 0304 and.w r3, r3, #4
80012b4: 613b str r3, [r7, #16]
80012b6: 693b ldr r3, [r7, #16]
/**TIM1 GPIO Configuration
PA8 ------> TIM1_CH1
PA9 ------> TIM1_CH2
*/
GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
80012b8: f44f 7340 mov.w r3, #768 ; 0x300
80012bc: 61bb str r3, [r7, #24]
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
80012be: 2300 movs r3, #0
80012c0: 61fb str r3, [r7, #28]
GPIO_InitStruct.Pull = GPIO_PULLUP;
80012c2: 2301 movs r3, #1
80012c4: 623b str r3, [r7, #32]
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
80012c6: f107 0318 add.w r3, r7, #24
80012ca: 4619 mov r1, r3
80012cc: 481a ldr r0, [pc, #104] ; (8001338 <HAL_TIM_Encoder_MspInit+0xd0>)
80012ce: f000 fecb bl 8002068 <HAL_GPIO_Init>
/* USER CODE BEGIN TIM3_MspInit 1 */
/* USER CODE END TIM3_MspInit 1 */
}
}
80012d2: e028 b.n 8001326 <HAL_TIM_Encoder_MspInit+0xbe>
else if(htim_encoder->Instance==TIM3)
80012d4: 687b ldr r3, [r7, #4]
80012d6: 681b ldr r3, [r3, #0]
80012d8: 4a18 ldr r2, [pc, #96] ; (800133c <HAL_TIM_Encoder_MspInit+0xd4>)
80012da: 4293 cmp r3, r2
80012dc: d123 bne.n 8001326 <HAL_TIM_Encoder_MspInit+0xbe>
__HAL_RCC_TIM3_CLK_ENABLE();
80012de: 4b15 ldr r3, [pc, #84] ; (8001334 <HAL_TIM_Encoder_MspInit+0xcc>)
80012e0: 69db ldr r3, [r3, #28]
80012e2: 4a14 ldr r2, [pc, #80] ; (8001334 <HAL_TIM_Encoder_MspInit+0xcc>)
80012e4: f043 0302 orr.w r3, r3, #2
80012e8: 61d3 str r3, [r2, #28]
80012ea: 4b12 ldr r3, [pc, #72] ; (8001334 <HAL_TIM_Encoder_MspInit+0xcc>)
80012ec: 69db ldr r3, [r3, #28]
80012ee: f003 0302 and.w r3, r3, #2
80012f2: 60fb str r3, [r7, #12]
80012f4: 68fb ldr r3, [r7, #12]
__HAL_RCC_GPIOA_CLK_ENABLE();
80012f6: 4b0f ldr r3, [pc, #60] ; (8001334 <HAL_TIM_Encoder_MspInit+0xcc>)
80012f8: 699b ldr r3, [r3, #24]
80012fa: 4a0e ldr r2, [pc, #56] ; (8001334 <HAL_TIM_Encoder_MspInit+0xcc>)
80012fc: f043 0304 orr.w r3, r3, #4
8001300: 6193 str r3, [r2, #24]
8001302: 4b0c ldr r3, [pc, #48] ; (8001334 <HAL_TIM_Encoder_MspInit+0xcc>)
8001304: 699b ldr r3, [r3, #24]
8001306: f003 0304 and.w r3, r3, #4
800130a: 60bb str r3, [r7, #8]
800130c: 68bb ldr r3, [r7, #8]
GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
800130e: 23c0 movs r3, #192 ; 0xc0
8001310: 61bb str r3, [r7, #24]
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
8001312: 2300 movs r3, #0
8001314: 61fb str r3, [r7, #28]
GPIO_InitStruct.Pull = GPIO_PULLUP;
8001316: 2301 movs r3, #1
8001318: 623b str r3, [r7, #32]
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
800131a: f107 0318 add.w r3, r7, #24
800131e: 4619 mov r1, r3
8001320: 4805 ldr r0, [pc, #20] ; (8001338 <HAL_TIM_Encoder_MspInit+0xd0>)
8001322: f000 fea1 bl 8002068 <HAL_GPIO_Init>
}
8001326: bf00 nop
8001328: 3728 adds r7, #40 ; 0x28
800132a: 46bd mov sp, r7
800132c: bd80 pop {r7, pc}
800132e: bf00 nop
8001330: 40012c00 .word 0x40012c00
8001334: 40021000 .word 0x40021000
8001338: 40010800 .word 0x40010800
800133c: 40000400 .word 0x40000400
08001340 <HAL_TIM_PWM_MspInit>:
* This function configures the hardware resources used in this example
* @param htim_pwm: TIM_PWM handle pointer
* @retval None
*/
void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* htim_pwm)
{
8001340: b480 push {r7}
8001342: b085 sub sp, #20
8001344: af00 add r7, sp, #0
8001346: 6078 str r0, [r7, #4]
if(htim_pwm->Instance==TIM2)
8001348: 687b ldr r3, [r7, #4]
800134a: 681b ldr r3, [r3, #0]
800134c: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
8001350: d10b bne.n 800136a <HAL_TIM_PWM_MspInit+0x2a>
{
/* USER CODE BEGIN TIM2_MspInit 0 */
/* USER CODE END TIM2_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_TIM2_CLK_ENABLE();
8001352: 4b08 ldr r3, [pc, #32] ; (8001374 <HAL_TIM_PWM_MspInit+0x34>)
8001354: 69db ldr r3, [r3, #28]
8001356: 4a07 ldr r2, [pc, #28] ; (8001374 <HAL_TIM_PWM_MspInit+0x34>)
8001358: f043 0301 orr.w r3, r3, #1
800135c: 61d3 str r3, [r2, #28]
800135e: 4b05 ldr r3, [pc, #20] ; (8001374 <HAL_TIM_PWM_MspInit+0x34>)
8001360: 69db ldr r3, [r3, #28]
8001362: f003 0301 and.w r3, r3, #1
8001366: 60fb str r3, [r7, #12]
8001368: 68fb ldr r3, [r7, #12]
/* USER CODE BEGIN TIM2_MspInit 1 */
/* USER CODE END TIM2_MspInit 1 */
}
}
800136a: bf00 nop
800136c: 3714 adds r7, #20
800136e: 46bd mov sp, r7
8001370: bc80 pop {r7}
8001372: 4770 bx lr
8001374: 40021000 .word 0x40021000
08001378 <HAL_TIM_Base_MspInit>:
* This function configures the hardware resources used in this example
* @param htim_base: TIM_Base handle pointer
* @retval None
*/
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
{
8001378: b580 push {r7, lr}
800137a: b084 sub sp, #16
800137c: af00 add r7, sp, #0
800137e: 6078 str r0, [r7, #4]
if(htim_base->Instance==TIM4)
8001380: 687b ldr r3, [r7, #4]
8001382: 681b ldr r3, [r3, #0]
8001384: 4a0d ldr r2, [pc, #52] ; (80013bc <HAL_TIM_Base_MspInit+0x44>)
8001386: 4293 cmp r3, r2
8001388: d113 bne.n 80013b2 <HAL_TIM_Base_MspInit+0x3a>
{
/* USER CODE BEGIN TIM4_MspInit 0 */
/* USER CODE END TIM4_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_TIM4_CLK_ENABLE();
800138a: 4b0d ldr r3, [pc, #52] ; (80013c0 <HAL_TIM_Base_MspInit+0x48>)
800138c: 69db ldr r3, [r3, #28]
800138e: 4a0c ldr r2, [pc, #48] ; (80013c0 <HAL_TIM_Base_MspInit+0x48>)
8001390: f043 0304 orr.w r3, r3, #4
8001394: 61d3 str r3, [r2, #28]
8001396: 4b0a ldr r3, [pc, #40] ; (80013c0 <HAL_TIM_Base_MspInit+0x48>)
8001398: 69db ldr r3, [r3, #28]
800139a: f003 0304 and.w r3, r3, #4
800139e: 60fb str r3, [r7, #12]
80013a0: 68fb ldr r3, [r7, #12]
/* TIM4 interrupt Init */
HAL_NVIC_SetPriority(TIM4_IRQn, 15, 0);
80013a2: 2200 movs r2, #0
80013a4: 210f movs r1, #15
80013a6: 201e movs r0, #30
80013a8: f000 fb89 bl 8001abe <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(TIM4_IRQn);
80013ac: 201e movs r0, #30
80013ae: f000 fba2 bl 8001af6 <HAL_NVIC_EnableIRQ>
/* USER CODE BEGIN TIM4_MspInit 1 */
/* USER CODE END TIM4_MspInit 1 */
}
}
80013b2: bf00 nop
80013b4: 3710 adds r7, #16
80013b6: 46bd mov sp, r7
80013b8: bd80 pop {r7, pc}
80013ba: bf00 nop
80013bc: 40000800 .word 0x40000800
80013c0: 40021000 .word 0x40021000
080013c4 <HAL_TIM_MspPostInit>:
void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
{
80013c4: b580 push {r7, lr}
80013c6: b08a sub sp, #40 ; 0x28
80013c8: af00 add r7, sp, #0
80013ca: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
80013cc: f107 0314 add.w r3, r7, #20
80013d0: 2200 movs r2, #0
80013d2: 601a str r2, [r3, #0]
80013d4: 605a str r2, [r3, #4]
80013d6: 609a str r2, [r3, #8]
80013d8: 60da str r2, [r3, #12]
if(htim->Instance==TIM2)
80013da: 687b ldr r3, [r7, #4]
80013dc: 681b ldr r3, [r3, #0]
80013de: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
80013e2: d143 bne.n 800146c <HAL_TIM_MspPostInit+0xa8>
{
/* USER CODE BEGIN TIM2_MspPostInit 0 */
/* USER CODE END TIM2_MspPostInit 0 */
__HAL_RCC_GPIOB_CLK_ENABLE();
80013e4: 4b23 ldr r3, [pc, #140] ; (8001474 <HAL_TIM_MspPostInit+0xb0>)
80013e6: 699b ldr r3, [r3, #24]
80013e8: 4a22 ldr r2, [pc, #136] ; (8001474 <HAL_TIM_MspPostInit+0xb0>)
80013ea: f043 0308 orr.w r3, r3, #8
80013ee: 6193 str r3, [r2, #24]
80013f0: 4b20 ldr r3, [pc, #128] ; (8001474 <HAL_TIM_MspPostInit+0xb0>)
80013f2: 699b ldr r3, [r3, #24]
80013f4: f003 0308 and.w r3, r3, #8
80013f8: 613b str r3, [r7, #16]
80013fa: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOA_CLK_ENABLE();
80013fc: 4b1d ldr r3, [pc, #116] ; (8001474 <HAL_TIM_MspPostInit+0xb0>)
80013fe: 699b ldr r3, [r3, #24]
8001400: 4a1c ldr r2, [pc, #112] ; (8001474 <HAL_TIM_MspPostInit+0xb0>)
8001402: f043 0304 orr.w r3, r3, #4
8001406: 6193 str r3, [r2, #24]
8001408: 4b1a ldr r3, [pc, #104] ; (8001474 <HAL_TIM_MspPostInit+0xb0>)
800140a: 699b ldr r3, [r3, #24]
800140c: f003 0304 and.w r3, r3, #4
8001410: 60fb str r3, [r7, #12]
8001412: 68fb ldr r3, [r7, #12]
PB10 ------> TIM2_CH3
PB11 ------> TIM2_CH4
PA15 ------> TIM2_CH1
PB3 ------> TIM2_CH2
*/
GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_3;
8001414: f640 4308 movw r3, #3080 ; 0xc08
8001418: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
800141a: 2302 movs r3, #2
800141c: 61bb str r3, [r7, #24]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
800141e: 2302 movs r3, #2
8001420: 623b str r3, [r7, #32]
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
8001422: f107 0314 add.w r3, r7, #20
8001426: 4619 mov r1, r3
8001428: 4813 ldr r0, [pc, #76] ; (8001478 <HAL_TIM_MspPostInit+0xb4>)
800142a: f000 fe1d bl 8002068 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_15;
800142e: f44f 4300 mov.w r3, #32768 ; 0x8000
8001432: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8001434: 2302 movs r3, #2
8001436: 61bb str r3, [r7, #24]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8001438: 2302 movs r3, #2
800143a: 623b str r3, [r7, #32]
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
800143c: f107 0314 add.w r3, r7, #20
8001440: 4619 mov r1, r3
8001442: 480e ldr r0, [pc, #56] ; (800147c <HAL_TIM_MspPostInit+0xb8>)
8001444: f000 fe10 bl 8002068 <HAL_GPIO_Init>
__HAL_AFIO_REMAP_TIM2_ENABLE();
8001448: 4b0d ldr r3, [pc, #52] ; (8001480 <HAL_TIM_MspPostInit+0xbc>)
800144a: 685b ldr r3, [r3, #4]
800144c: 627b str r3, [r7, #36] ; 0x24
800144e: 6a7b ldr r3, [r7, #36] ; 0x24
8001450: f423 7340 bic.w r3, r3, #768 ; 0x300
8001454: 627b str r3, [r7, #36] ; 0x24
8001456: 6a7b ldr r3, [r7, #36] ; 0x24
8001458: f043 63e0 orr.w r3, r3, #117440512 ; 0x7000000
800145c: 627b str r3, [r7, #36] ; 0x24
800145e: 6a7b ldr r3, [r7, #36] ; 0x24
8001460: f443 7340 orr.w r3, r3, #768 ; 0x300
8001464: 627b str r3, [r7, #36] ; 0x24
8001466: 4a06 ldr r2, [pc, #24] ; (8001480 <HAL_TIM_MspPostInit+0xbc>)
8001468: 6a7b ldr r3, [r7, #36] ; 0x24
800146a: 6053 str r3, [r2, #4]
/* USER CODE BEGIN TIM2_MspPostInit 1 */
/* USER CODE END TIM2_MspPostInit 1 */
}
}
800146c: bf00 nop
800146e: 3728 adds r7, #40 ; 0x28
8001470: 46bd mov sp, r7
8001472: bd80 pop {r7, pc}
8001474: 40021000 .word 0x40021000
8001478: 40010c00 .word 0x40010c00
800147c: 40010800 .word 0x40010800
8001480: 40010000 .word 0x40010000
08001484 <HAL_UART_MspInit>:
* This function configures the hardware resources used in this example
* @param huart: UART handle pointer
* @retval None
*/
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
{
8001484: b580 push {r7, lr}
8001486: b08c sub sp, #48 ; 0x30
8001488: af00 add r7, sp, #0
800148a: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
800148c: f107 031c add.w r3, r7, #28
8001490: 2200 movs r2, #0
8001492: 601a str r2, [r3, #0]
8001494: 605a str r2, [r3, #4]
8001496: 609a str r2, [r3, #8]
8001498: 60da str r2, [r3, #12]
if(huart->Instance==USART1)
800149a: 687b ldr r3, [r7, #4]
800149c: 681b ldr r3, [r3, #0]
800149e: 4a58 ldr r2, [pc, #352] ; (8001600 <HAL_UART_MspInit+0x17c>)
80014a0: 4293 cmp r3, r2
80014a2: d146 bne.n 8001532 <HAL_UART_MspInit+0xae>
{
/* USER CODE BEGIN USART1_MspInit 0 */
/* USER CODE END USART1_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_USART1_CLK_ENABLE();
80014a4: 4b57 ldr r3, [pc, #348] ; (8001604 <HAL_UART_MspInit+0x180>)
80014a6: 699b ldr r3, [r3, #24]
80014a8: 4a56 ldr r2, [pc, #344] ; (8001604 <HAL_UART_MspInit+0x180>)
80014aa: f443 4380 orr.w r3, r3, #16384 ; 0x4000
80014ae: 6193 str r3, [r2, #24]
80014b0: 4b54 ldr r3, [pc, #336] ; (8001604 <HAL_UART_MspInit+0x180>)
80014b2: 699b ldr r3, [r3, #24]
80014b4: f403 4380 and.w r3, r3, #16384 ; 0x4000
80014b8: 61bb str r3, [r7, #24]
80014ba: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOB_CLK_ENABLE();
80014bc: 4b51 ldr r3, [pc, #324] ; (8001604 <HAL_UART_MspInit+0x180>)
80014be: 699b ldr r3, [r3, #24]
80014c0: 4a50 ldr r2, [pc, #320] ; (8001604 <HAL_UART_MspInit+0x180>)
80014c2: f043 0308 orr.w r3, r3, #8
80014c6: 6193 str r3, [r2, #24]
80014c8: 4b4e ldr r3, [pc, #312] ; (8001604 <HAL_UART_MspInit+0x180>)
80014ca: 699b ldr r3, [r3, #24]
80014cc: f003 0308 and.w r3, r3, #8
80014d0: 617b str r3, [r7, #20]
80014d2: 697b ldr r3, [r7, #20]
/**USART1 GPIO Configuration
PB6 ------> USART1_TX
PB7 ------> USART1_RX
*/
GPIO_InitStruct.Pin = GPIO_PIN_6;
80014d4: 2340 movs r3, #64 ; 0x40
80014d6: 61fb str r3, [r7, #28]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
80014d8: 2302 movs r3, #2
80014da: 623b str r3, [r7, #32]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
80014dc: 2303 movs r3, #3
80014de: 62bb str r3, [r7, #40] ; 0x28
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
80014e0: f107 031c add.w r3, r7, #28
80014e4: 4619 mov r1, r3
80014e6: 4848 ldr r0, [pc, #288] ; (8001608 <HAL_UART_MspInit+0x184>)
80014e8: f000 fdbe bl 8002068 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_7;
80014ec: 2380 movs r3, #128 ; 0x80
80014ee: 61fb str r3, [r7, #28]
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
80014f0: 2300 movs r3, #0
80014f2: 623b str r3, [r7, #32]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80014f4: 2300 movs r3, #0
80014f6: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
80014f8: f107 031c add.w r3, r7, #28
80014fc: 4619 mov r1, r3
80014fe: 4842 ldr r0, [pc, #264] ; (8001608 <HAL_UART_MspInit+0x184>)
8001500: f000 fdb2 bl 8002068 <HAL_GPIO_Init>
__HAL_AFIO_REMAP_USART1_ENABLE();
8001504: 4b41 ldr r3, [pc, #260] ; (800160c <HAL_UART_MspInit+0x188>)
8001506: 685b ldr r3, [r3, #4]
8001508: 62fb str r3, [r7, #44] ; 0x2c
800150a: 6afb ldr r3, [r7, #44] ; 0x2c
800150c: f043 63e0 orr.w r3, r3, #117440512 ; 0x7000000
8001510: 62fb str r3, [r7, #44] ; 0x2c
8001512: 6afb ldr r3, [r7, #44] ; 0x2c
8001514: f043 0304 orr.w r3, r3, #4
8001518: 62fb str r3, [r7, #44] ; 0x2c
800151a: 4a3c ldr r2, [pc, #240] ; (800160c <HAL_UART_MspInit+0x188>)
800151c: 6afb ldr r3, [r7, #44] ; 0x2c
800151e: 6053 str r3, [r2, #4]
/* USART1 interrupt Init */
HAL_NVIC_SetPriority(USART1_IRQn, 7, 0);
8001520: 2200 movs r2, #0
8001522: 2107 movs r1, #7
8001524: 2025 movs r0, #37 ; 0x25
8001526: f000 faca bl 8001abe <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(USART1_IRQn);
800152a: 2025 movs r0, #37 ; 0x25
800152c: f000 fae3 bl 8001af6 <HAL_NVIC_EnableIRQ>
/* USER CODE BEGIN USART2_MspInit 1 */
/* USER CODE END USART2_MspInit 1 */
}
}
8001530: e062 b.n 80015f8 <HAL_UART_MspInit+0x174>
else if(huart->Instance==USART2)
8001532: 687b ldr r3, [r7, #4]
8001534: 681b ldr r3, [r3, #0]
8001536: 4a36 ldr r2, [pc, #216] ; (8001610 <HAL_UART_MspInit+0x18c>)
8001538: 4293 cmp r3, r2
800153a: d15d bne.n 80015f8 <HAL_UART_MspInit+0x174>
__HAL_RCC_USART2_CLK_ENABLE();
800153c: 4b31 ldr r3, [pc, #196] ; (8001604 <HAL_UART_MspInit+0x180>)
800153e: 69db ldr r3, [r3, #28]
8001540: 4a30 ldr r2, [pc, #192] ; (8001604 <HAL_UART_MspInit+0x180>)
8001542: f443 3300 orr.w r3, r3, #131072 ; 0x20000
8001546: 61d3 str r3, [r2, #28]
8001548: 4b2e ldr r3, [pc, #184] ; (8001604 <HAL_UART_MspInit+0x180>)
800154a: 69db ldr r3, [r3, #28]
800154c: f403 3300 and.w r3, r3, #131072 ; 0x20000
8001550: 613b str r3, [r7, #16]
8001552: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOA_CLK_ENABLE();
8001554: 4b2b ldr r3, [pc, #172] ; (8001604 <HAL_UART_MspInit+0x180>)
8001556: 699b ldr r3, [r3, #24]
8001558: 4a2a ldr r2, [pc, #168] ; (8001604 <HAL_UART_MspInit+0x180>)
800155a: f043 0304 orr.w r3, r3, #4
800155e: 6193 str r3, [r2, #24]
8001560: 4b28 ldr r3, [pc, #160] ; (8001604 <HAL_UART_MspInit+0x180>)
8001562: 699b ldr r3, [r3, #24]
8001564: f003 0304 and.w r3, r3, #4
8001568: 60fb str r3, [r7, #12]
800156a: 68fb ldr r3, [r7, #12]
GPIO_InitStruct.Pin = GPIO_PIN_2;
800156c: 2304 movs r3, #4
800156e: 61fb str r3, [r7, #28]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8001570: 2302 movs r3, #2
8001572: 623b str r3, [r7, #32]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
8001574: 2303 movs r3, #3
8001576: 62bb str r3, [r7, #40] ; 0x28
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
8001578: f107 031c add.w r3, r7, #28
800157c: 4619 mov r1, r3
800157e: 4825 ldr r0, [pc, #148] ; (8001614 <HAL_UART_MspInit+0x190>)
8001580: f000 fd72 bl 8002068 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_3;
8001584: 2308 movs r3, #8
8001586: 61fb str r3, [r7, #28]
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
8001588: 2300 movs r3, #0
800158a: 623b str r3, [r7, #32]
GPIO_InitStruct.Pull = GPIO_NOPULL;
800158c: 2300 movs r3, #0
800158e: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
8001590: f107 031c add.w r3, r7, #28
8001594: 4619 mov r1, r3
8001596: 481f ldr r0, [pc, #124] ; (8001614 <HAL_UART_MspInit+0x190>)
8001598: f000 fd66 bl 8002068 <HAL_GPIO_Init>
hdma_usart2_tx.Instance = DMA1_Channel7;
800159c: 4b1e ldr r3, [pc, #120] ; (8001618 <HAL_UART_MspInit+0x194>)
800159e: 4a1f ldr r2, [pc, #124] ; (800161c <HAL_UART_MspInit+0x198>)
80015a0: 601a str r2, [r3, #0]
hdma_usart2_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
80015a2: 4b1d ldr r3, [pc, #116] ; (8001618 <HAL_UART_MspInit+0x194>)
80015a4: 2210 movs r2, #16
80015a6: 605a str r2, [r3, #4]
hdma_usart2_tx.Init.PeriphInc = DMA_PINC_DISABLE;
80015a8: 4b1b ldr r3, [pc, #108] ; (8001618 <HAL_UART_MspInit+0x194>)
80015aa: 2200 movs r2, #0
80015ac: 609a str r2, [r3, #8]
hdma_usart2_tx.Init.MemInc = DMA_MINC_ENABLE;
80015ae: 4b1a ldr r3, [pc, #104] ; (8001618 <HAL_UART_MspInit+0x194>)
80015b0: 2280 movs r2, #128 ; 0x80
80015b2: 60da str r2, [r3, #12]
hdma_usart2_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
80015b4: 4b18 ldr r3, [pc, #96] ; (8001618 <HAL_UART_MspInit+0x194>)
80015b6: 2200 movs r2, #0
80015b8: 611a str r2, [r3, #16]
hdma_usart2_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
80015ba: 4b17 ldr r3, [pc, #92] ; (8001618 <HAL_UART_MspInit+0x194>)
80015bc: 2200 movs r2, #0
80015be: 615a str r2, [r3, #20]
hdma_usart2_tx.Init.Mode = DMA_NORMAL;
80015c0: 4b15 ldr r3, [pc, #84] ; (8001618 <HAL_UART_MspInit+0x194>)
80015c2: 2200 movs r2, #0
80015c4: 619a str r2, [r3, #24]
hdma_usart2_tx.Init.Priority = DMA_PRIORITY_LOW;
80015c6: 4b14 ldr r3, [pc, #80] ; (8001618 <HAL_UART_MspInit+0x194>)
80015c8: 2200 movs r2, #0
80015ca: 61da str r2, [r3, #28]
if (HAL_DMA_Init(&hdma_usart2_tx) != HAL_OK)
80015cc: 4812 ldr r0, [pc, #72] ; (8001618 <HAL_UART_MspInit+0x194>)
80015ce: f000 faad bl 8001b2c <HAL_DMA_Init>
80015d2: 4603 mov r3, r0
80015d4: 2b00 cmp r3, #0
80015d6: d001 beq.n 80015dc <HAL_UART_MspInit+0x158>
Error_Handler();
80015d8: f7ff fe0e bl 80011f8 <Error_Handler>
__HAL_LINKDMA(huart,hdmatx,hdma_usart2_tx);
80015dc: 687b ldr r3, [r7, #4]
80015de: 4a0e ldr r2, [pc, #56] ; (8001618 <HAL_UART_MspInit+0x194>)
80015e0: 635a str r2, [r3, #52] ; 0x34
80015e2: 4a0d ldr r2, [pc, #52] ; (8001618 <HAL_UART_MspInit+0x194>)
80015e4: 687b ldr r3, [r7, #4]
80015e6: 6253 str r3, [r2, #36] ; 0x24
HAL_NVIC_SetPriority(USART2_IRQn, 0, 0);
80015e8: 2200 movs r2, #0
80015ea: 2100 movs r1, #0
80015ec: 2026 movs r0, #38 ; 0x26
80015ee: f000 fa66 bl 8001abe <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(USART2_IRQn);
80015f2: 2026 movs r0, #38 ; 0x26
80015f4: f000 fa7f bl 8001af6 <HAL_NVIC_EnableIRQ>
}
80015f8: bf00 nop
80015fa: 3730 adds r7, #48 ; 0x30
80015fc: 46bd mov sp, r7
80015fe: bd80 pop {r7, pc}
8001600: 40013800 .word 0x40013800
8001604: 40021000 .word 0x40021000
8001608: 40010c00 .word 0x40010c00
800160c: 40010000 .word 0x40010000
8001610: 40004400 .word 0x40004400
8001614: 40010800 .word 0x40010800
8001618: 20000558 .word 0x20000558
800161c: 40020080 .word 0x40020080
08001620 <HAL_PCD_MspInit>:
* This function configures the hardware resources used in this example
* @param hpcd: PCD handle pointer
* @retval None
*/
void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd)
{
8001620: b480 push {r7}
8001622: b085 sub sp, #20
8001624: af00 add r7, sp, #0
8001626: 6078 str r0, [r7, #4]
if(hpcd->Instance==USB)
8001628: 687b ldr r3, [r7, #4]
800162a: 681b ldr r3, [r3, #0]
800162c: 4a09 ldr r2, [pc, #36] ; (8001654 <HAL_PCD_MspInit+0x34>)
800162e: 4293 cmp r3, r2
8001630: d10b bne.n 800164a <HAL_PCD_MspInit+0x2a>
{
/* USER CODE BEGIN USB_MspInit 0 */
/* USER CODE END USB_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_USB_CLK_ENABLE();
8001632: 4b09 ldr r3, [pc, #36] ; (8001658 <HAL_PCD_MspInit+0x38>)
8001634: 69db ldr r3, [r3, #28]
8001636: 4a08 ldr r2, [pc, #32] ; (8001658 <HAL_PCD_MspInit+0x38>)
8001638: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
800163c: 61d3 str r3, [r2, #28]
800163e: 4b06 ldr r3, [pc, #24] ; (8001658 <HAL_PCD_MspInit+0x38>)
8001640: 69db ldr r3, [r3, #28]
8001642: f403 0300 and.w r3, r3, #8388608 ; 0x800000
8001646: 60fb str r3, [r7, #12]
8001648: 68fb ldr r3, [r7, #12]
/* USER CODE BEGIN USB_MspInit 1 */
/* USER CODE END USB_MspInit 1 */
}
}
800164a: bf00 nop
800164c: 3714 adds r7, #20
800164e: 46bd mov sp, r7
8001650: bc80 pop {r7}
8001652: 4770 bx lr
8001654: 40005c00 .word 0x40005c00
8001658: 40021000 .word 0x40021000
0800165c <NMI_Handler>:
/******************************************************************************/
/**
* @brief This function handles Non maskable interrupt.
*/
void NMI_Handler(void)
{
800165c: b480 push {r7}
800165e: 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)
8001660: e7fe b.n 8001660 <NMI_Handler+0x4>
08001662 <HardFault_Handler>:
/**
* @brief This function handles Hard fault interrupt.
*/
void HardFault_Handler(void)
{
8001662: b480 push {r7}
8001664: af00 add r7, sp, #0
/* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */
while (1)
8001666: e7fe b.n 8001666 <HardFault_Handler+0x4>
08001668 <MemManage_Handler>:
/**
* @brief This function handles Memory management fault.
*/
void MemManage_Handler(void)
{
8001668: b480 push {r7}
800166a: af00 add r7, sp, #0
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
/* USER CODE END MemoryManagement_IRQn 0 */
while (1)
800166c: e7fe b.n 800166c <MemManage_Handler+0x4>
0800166e <BusFault_Handler>:
/**
* @brief This function handles Prefetch fault, memory access fault.
*/
void BusFault_Handler(void)
{
800166e: b480 push {r7}
8001670: af00 add r7, sp, #0
/* USER CODE BEGIN BusFault_IRQn 0 */
/* USER CODE END BusFault_IRQn 0 */
while (1)
8001672: e7fe b.n 8001672 <BusFault_Handler+0x4>
08001674 <UsageFault_Handler>:
/**
* @brief This function handles Undefined instruction or illegal state.
*/
void UsageFault_Handler(void)
{
8001674: b480 push {r7}
8001676: af00 add r7, sp, #0
/* USER CODE BEGIN UsageFault_IRQn 0 */
/* USER CODE END UsageFault_IRQn 0 */
while (1)
8001678: e7fe b.n 8001678 <UsageFault_Handler+0x4>
0800167a <SVC_Handler>:
/**
* @brief This function handles System service call via SWI instruction.
*/
void SVC_Handler(void)
{
800167a: b480 push {r7}
800167c: af00 add r7, sp, #0
/* USER CODE END SVCall_IRQn 0 */
/* USER CODE BEGIN SVCall_IRQn 1 */
/* USER CODE END SVCall_IRQn 1 */
}
800167e: bf00 nop
8001680: 46bd mov sp, r7
8001682: bc80 pop {r7}
8001684: 4770 bx lr
08001686 <DebugMon_Handler>:
/**
* @brief This function handles Debug monitor.
*/
void DebugMon_Handler(void)
{
8001686: b480 push {r7}
8001688: af00 add r7, sp, #0
/* USER CODE END DebugMonitor_IRQn 0 */
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
/* USER CODE END DebugMonitor_IRQn 1 */
}
800168a: bf00 nop
800168c: 46bd mov sp, r7
800168e: bc80 pop {r7}
8001690: 4770 bx lr
08001692 <PendSV_Handler>:
/**
* @brief This function handles Pendable request for system service.
*/
void PendSV_Handler(void)
{
8001692: b480 push {r7}
8001694: af00 add r7, sp, #0
/* USER CODE END PendSV_IRQn 0 */
/* USER CODE BEGIN PendSV_IRQn 1 */
/* USER CODE END PendSV_IRQn 1 */
}
8001696: bf00 nop
8001698: 46bd mov sp, r7
800169a: bc80 pop {r7}
800169c: 4770 bx lr
0800169e <SysTick_Handler>:
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
800169e: b580 push {r7, lr}
80016a0: af00 add r7, sp, #0
/* USER CODE BEGIN SysTick_IRQn 0 */
/* USER CODE END SysTick_IRQn 0 */
HAL_IncTick();
80016a2: f000 f8f5 bl 8001890 <HAL_IncTick>
/* USER CODE BEGIN SysTick_IRQn 1 */
/* USER CODE END SysTick_IRQn 1 */
}
80016a6: bf00 nop
80016a8: bd80 pop {r7, pc}
...
080016ac <DMA1_Channel7_IRQHandler>:
/**
* @brief This function handles DMA1 channel7 global interrupt.
*/
void DMA1_Channel7_IRQHandler(void)
{
80016ac: b580 push {r7, lr}
80016ae: af00 add r7, sp, #0
/* USER CODE BEGIN DMA1_Channel7_IRQn 0 */
/* USER CODE END DMA1_Channel7_IRQn 0 */
HAL_DMA_IRQHandler(&hdma_usart2_tx);
80016b0: 4802 ldr r0, [pc, #8] ; (80016bc <DMA1_Channel7_IRQHandler+0x10>)
80016b2: f000 fba5 bl 8001e00 <HAL_DMA_IRQHandler>
/* USER CODE BEGIN DMA1_Channel7_IRQn 1 */
/* USER CODE END DMA1_Channel7_IRQn 1 */
}
80016b6: bf00 nop
80016b8: bd80 pop {r7, pc}
80016ba: bf00 nop
80016bc: 20000558 .word 0x20000558
080016c0 <TIM4_IRQHandler>:
/**
* @brief This function handles TIM4 global interrupt.
*/
void TIM4_IRQHandler(void)
{
80016c0: b580 push {r7, lr}
80016c2: af00 add r7, sp, #0
/* USER CODE BEGIN TIM4_IRQn 0 */
/* USER CODE END TIM4_IRQn 0 */
HAL_TIM_IRQHandler(&htim4);
80016c4: 4802 ldr r0, [pc, #8] ; (80016d0 <TIM4_IRQHandler+0x10>)
80016c6: f001 ff03 bl 80034d0 <HAL_TIM_IRQHandler>
/* USER CODE BEGIN TIM4_IRQn 1 */
/* USER CODE END TIM4_IRQn 1 */
}
80016ca: bf00 nop
80016cc: bd80 pop {r7, pc}
80016ce: bf00 nop
80016d0: 20000488 .word 0x20000488
080016d4 <USART1_IRQHandler>:
/**
* @brief This function handles USART1 global interrupt.
*/
void USART1_IRQHandler(void)
{
80016d4: b580 push {r7, lr}
80016d6: af00 add r7, sp, #0
/* USER CODE BEGIN USART1_IRQn 0 */
/* USER CODE END USART1_IRQn 0 */
HAL_UART_IRQHandler(&huart1);
80016d8: 4802 ldr r0, [pc, #8] ; (80016e4 <USART1_IRQHandler+0x10>)
80016da: f002 fea1 bl 8004420 <HAL_UART_IRQHandler>
/* USER CODE BEGIN USART1_IRQn 1 */
/* USER CODE END USART1_IRQn 1 */
}
80016de: bf00 nop
80016e0: bd80 pop {r7, pc}
80016e2: bf00 nop
80016e4: 200004d0 .word 0x200004d0
080016e8 <USART2_IRQHandler>:
/**
* @brief This function handles USART2 global interrupt.
*/
void USART2_IRQHandler(void)
{
80016e8: b580 push {r7, lr}
80016ea: af00 add r7, sp, #0
/* USER CODE BEGIN USART2_IRQn 0 */
/* USER CODE END USART2_IRQn 0 */
HAL_UART_IRQHandler(&huart2);
80016ec: 4802 ldr r0, [pc, #8] ; (80016f8 <USART2_IRQHandler+0x10>)
80016ee: f002 fe97 bl 8004420 <HAL_UART_IRQHandler>
/* USER CODE BEGIN USART2_IRQn 1 */
/* USER CODE END USART2_IRQn 1 */
}
80016f2: bf00 nop
80016f4: bd80 pop {r7, pc}
80016f6: bf00 nop
80016f8: 20000514 .word 0x20000514
080016fc <_getpid>:
void initialise_monitor_handles()
{
}
int _getpid(void)
{
80016fc: b480 push {r7}
80016fe: af00 add r7, sp, #0
return 1;
8001700: 2301 movs r3, #1
}
8001702: 4618 mov r0, r3
8001704: 46bd mov sp, r7
8001706: bc80 pop {r7}
8001708: 4770 bx lr
0800170a <_kill>:
int _kill(int pid, int sig)
{
800170a: b580 push {r7, lr}
800170c: b082 sub sp, #8
800170e: af00 add r7, sp, #0
8001710: 6078 str r0, [r7, #4]
8001712: 6039 str r1, [r7, #0]
(void)pid;
(void)sig;
errno = EINVAL;
8001714: f003 fbec bl 8004ef0 <__errno>
8001718: 4603 mov r3, r0
800171a: 2216 movs r2, #22
800171c: 601a str r2, [r3, #0]
return -1;
800171e: f04f 33ff mov.w r3, #4294967295
}
8001722: 4618 mov r0, r3
8001724: 3708 adds r7, #8
8001726: 46bd mov sp, r7
8001728: bd80 pop {r7, pc}
0800172a <_exit>:
void _exit (int status)
{
800172a: b580 push {r7, lr}
800172c: b082 sub sp, #8
800172e: af00 add r7, sp, #0
8001730: 6078 str r0, [r7, #4]
_kill(status, -1);
8001732: f04f 31ff mov.w r1, #4294967295
8001736: 6878 ldr r0, [r7, #4]
8001738: f7ff ffe7 bl 800170a <_kill>
while (1) {} /* Make sure we hang here */
800173c: e7fe b.n 800173c <_exit+0x12>
...
08001740 <_sbrk>:
*
* @param incr Memory size
* @return Pointer to allocated memory
*/
void *_sbrk(ptrdiff_t incr)
{
8001740: b580 push {r7, lr}
8001742: b086 sub sp, #24
8001744: af00 add r7, sp, #0
8001746: 6078 str r0, [r7, #4]
extern uint8_t _end; /* Symbol defined in the linker script */
extern uint8_t _estack; /* Symbol defined in the linker script */
extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */
const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
8001748: 4a14 ldr r2, [pc, #80] ; (800179c <_sbrk+0x5c>)
800174a: 4b15 ldr r3, [pc, #84] ; (80017a0 <_sbrk+0x60>)
800174c: 1ad3 subs r3, r2, r3
800174e: 617b str r3, [r7, #20]
const uint8_t *max_heap = (uint8_t *)stack_limit;
8001750: 697b ldr r3, [r7, #20]
8001752: 613b str r3, [r7, #16]
uint8_t *prev_heap_end;
/* Initialize heap end at first call */
if (NULL == __sbrk_heap_end)
8001754: 4b13 ldr r3, [pc, #76] ; (80017a4 <_sbrk+0x64>)
8001756: 681b ldr r3, [r3, #0]
8001758: 2b00 cmp r3, #0
800175a: d102 bne.n 8001762 <_sbrk+0x22>
{
__sbrk_heap_end = &_end;
800175c: 4b11 ldr r3, [pc, #68] ; (80017a4 <_sbrk+0x64>)
800175e: 4a12 ldr r2, [pc, #72] ; (80017a8 <_sbrk+0x68>)
8001760: 601a str r2, [r3, #0]
}
/* Protect heap from growing into the reserved MSP stack */
if (__sbrk_heap_end + incr > max_heap)
8001762: 4b10 ldr r3, [pc, #64] ; (80017a4 <_sbrk+0x64>)
8001764: 681a ldr r2, [r3, #0]
8001766: 687b ldr r3, [r7, #4]
8001768: 4413 add r3, r2
800176a: 693a ldr r2, [r7, #16]
800176c: 429a cmp r2, r3
800176e: d207 bcs.n 8001780 <_sbrk+0x40>
{
errno = ENOMEM;
8001770: f003 fbbe bl 8004ef0 <__errno>
8001774: 4603 mov r3, r0
8001776: 220c movs r2, #12
8001778: 601a str r2, [r3, #0]
return (void *)-1;
800177a: f04f 33ff mov.w r3, #4294967295
800177e: e009 b.n 8001794 <_sbrk+0x54>
}
prev_heap_end = __sbrk_heap_end;
8001780: 4b08 ldr r3, [pc, #32] ; (80017a4 <_sbrk+0x64>)
8001782: 681b ldr r3, [r3, #0]
8001784: 60fb str r3, [r7, #12]
__sbrk_heap_end += incr;
8001786: 4b07 ldr r3, [pc, #28] ; (80017a4 <_sbrk+0x64>)
8001788: 681a ldr r2, [r3, #0]
800178a: 687b ldr r3, [r7, #4]
800178c: 4413 add r3, r2
800178e: 4a05 ldr r2, [pc, #20] ; (80017a4 <_sbrk+0x64>)
8001790: 6013 str r3, [r2, #0]
return (void *)prev_heap_end;
8001792: 68fb ldr r3, [r7, #12]
}
8001794: 4618 mov r0, r3
8001796: 3718 adds r7, #24
8001798: 46bd mov sp, r7
800179a: bd80 pop {r7, pc}
800179c: 20005000 .word 0x20005000
80017a0: 00000400 .word 0x00000400
80017a4: 20000888 .word 0x20000888
80017a8: 200008a8 .word 0x200008a8
080017ac <SystemInit>:
* @note This function should be used only after reset.
* @param None
* @retval None
*/
void SystemInit (void)
{
80017ac: b480 push {r7}
80017ae: 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 */
}
80017b0: bf00 nop
80017b2: 46bd mov sp, r7
80017b4: bc80 pop {r7}
80017b6: 4770 bx lr
080017b8 <Reset_Handler>:
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
80017b8: 480c ldr r0, [pc, #48] ; (80017ec <LoopFillZerobss+0x12>)
ldr r1, =_edata
80017ba: 490d ldr r1, [pc, #52] ; (80017f0 <LoopFillZerobss+0x16>)
ldr r2, =_sidata
80017bc: 4a0d ldr r2, [pc, #52] ; (80017f4 <LoopFillZerobss+0x1a>)
movs r3, #0
80017be: 2300 movs r3, #0
b LoopCopyDataInit
80017c0: e002 b.n 80017c8 <LoopCopyDataInit>
080017c2 <CopyDataInit>:
CopyDataInit:
ldr r4, [r2, r3]
80017c2: 58d4 ldr r4, [r2, r3]
str r4, [r0, r3]
80017c4: 50c4 str r4, [r0, r3]
adds r3, r3, #4
80017c6: 3304 adds r3, #4
080017c8 <LoopCopyDataInit>:
LoopCopyDataInit:
adds r4, r0, r3
80017c8: 18c4 adds r4, r0, r3
cmp r4, r1
80017ca: 428c cmp r4, r1
bcc CopyDataInit
80017cc: d3f9 bcc.n 80017c2 <CopyDataInit>
/* Zero fill the bss segment. */
ldr r2, =_sbss
80017ce: 4a0a ldr r2, [pc, #40] ; (80017f8 <LoopFillZerobss+0x1e>)
ldr r4, =_ebss
80017d0: 4c0a ldr r4, [pc, #40] ; (80017fc <LoopFillZerobss+0x22>)
movs r3, #0
80017d2: 2300 movs r3, #0
b LoopFillZerobss
80017d4: e001 b.n 80017da <LoopFillZerobss>
080017d6 <FillZerobss>:
FillZerobss:
str r3, [r2]
80017d6: 6013 str r3, [r2, #0]
adds r2, r2, #4
80017d8: 3204 adds r2, #4
080017da <LoopFillZerobss>:
LoopFillZerobss:
cmp r2, r4
80017da: 42a2 cmp r2, r4
bcc FillZerobss
80017dc: d3fb bcc.n 80017d6 <FillZerobss>
/* Call the clock system intitialization function.*/
bl SystemInit
80017de: f7ff ffe5 bl 80017ac <SystemInit>
/* Call static constructors */
bl __libc_init_array
80017e2: f003 fb8b bl 8004efc <__libc_init_array>
/* Call the application's entry point.*/
bl main
80017e6: f7ff fa24 bl 8000c32 <main>
bx lr
80017ea: 4770 bx lr
ldr r0, =_sdata
80017ec: 20000000 .word 0x20000000
ldr r1, =_edata
80017f0: 20000070 .word 0x20000070
ldr r2, =_sidata
80017f4: 08005b4c .word 0x08005b4c
ldr r2, =_sbss
80017f8: 20000070 .word 0x20000070
ldr r4, =_ebss
80017fc: 200008a4 .word 0x200008a4
08001800 <ADC1_2_IRQHandler>:
* @retval : None
*/
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
8001800: e7fe b.n 8001800 <ADC1_2_IRQHandler>
...
08001804 <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)
{
8001804: b580 push {r7, lr}
8001806: 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();
8001808: 4b08 ldr r3, [pc, #32] ; (800182c <HAL_Init+0x28>)
800180a: 681b ldr r3, [r3, #0]
800180c: 4a07 ldr r2, [pc, #28] ; (800182c <HAL_Init+0x28>)
800180e: f043 0310 orr.w r3, r3, #16
8001812: 6013 str r3, [r2, #0]
#endif
#endif /* PREFETCH_ENABLE */
/* Set Interrupt Group Priority */
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
8001814: 2003 movs r0, #3
8001816: f000 f947 bl 8001aa8 <HAL_NVIC_SetPriorityGrouping>
/* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */
HAL_InitTick(TICK_INT_PRIORITY);
800181a: 2000 movs r0, #0
800181c: f000 f808 bl 8001830 <HAL_InitTick>
/* Init the low level hardware */
HAL_MspInit();
8001820: f7ff fcf0 bl 8001204 <HAL_MspInit>
/* Return function status */
return HAL_OK;
8001824: 2300 movs r3, #0
}
8001826: 4618 mov r0, r3
8001828: bd80 pop {r7, pc}
800182a: bf00 nop
800182c: 40022000 .word 0x40022000
08001830 <HAL_InitTick>:
* implementation in user file.
* @param TickPriority Tick interrupt priority.
* @retval HAL status
*/
__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
8001830: b580 push {r7, lr}
8001832: b082 sub sp, #8
8001834: af00 add r7, sp, #0
8001836: 6078 str r0, [r7, #4]
/* Configure the SysTick to have interrupt in 1ms time basis*/
if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U)
8001838: 4b12 ldr r3, [pc, #72] ; (8001884 <HAL_InitTick+0x54>)
800183a: 681a ldr r2, [r3, #0]
800183c: 4b12 ldr r3, [pc, #72] ; (8001888 <HAL_InitTick+0x58>)
800183e: 781b ldrb r3, [r3, #0]
8001840: 4619 mov r1, r3
8001842: f44f 737a mov.w r3, #1000 ; 0x3e8
8001846: fbb3 f3f1 udiv r3, r3, r1
800184a: fbb2 f3f3 udiv r3, r2, r3
800184e: 4618 mov r0, r3
8001850: f000 f95f bl 8001b12 <HAL_SYSTICK_Config>
8001854: 4603 mov r3, r0
8001856: 2b00 cmp r3, #0
8001858: d001 beq.n 800185e <HAL_InitTick+0x2e>
{
return HAL_ERROR;
800185a: 2301 movs r3, #1
800185c: e00e b.n 800187c <HAL_InitTick+0x4c>
}
/* Configure the SysTick IRQ priority */
if (TickPriority < (1UL << __NVIC_PRIO_BITS))
800185e: 687b ldr r3, [r7, #4]
8001860: 2b0f cmp r3, #15
8001862: d80a bhi.n 800187a <HAL_InitTick+0x4a>
{
HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
8001864: 2200 movs r2, #0
8001866: 6879 ldr r1, [r7, #4]
8001868: f04f 30ff mov.w r0, #4294967295
800186c: f000 f927 bl 8001abe <HAL_NVIC_SetPriority>
uwTickPrio = TickPriority;
8001870: 4a06 ldr r2, [pc, #24] ; (800188c <HAL_InitTick+0x5c>)
8001872: 687b ldr r3, [r7, #4]
8001874: 6013 str r3, [r2, #0]
{
return HAL_ERROR;
}
/* Return function status */
return HAL_OK;
8001876: 2300 movs r3, #0
8001878: e000 b.n 800187c <HAL_InitTick+0x4c>
return HAL_ERROR;
800187a: 2301 movs r3, #1
}
800187c: 4618 mov r0, r3
800187e: 3708 adds r7, #8
8001880: 46bd mov sp, r7
8001882: bd80 pop {r7, pc}
8001884: 20000000 .word 0x20000000
8001888: 20000008 .word 0x20000008
800188c: 20000004 .word 0x20000004
08001890 <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)
{
8001890: b480 push {r7}
8001892: af00 add r7, sp, #0
uwTick += uwTickFreq;
8001894: 4b05 ldr r3, [pc, #20] ; (80018ac <HAL_IncTick+0x1c>)
8001896: 781b ldrb r3, [r3, #0]
8001898: 461a mov r2, r3
800189a: 4b05 ldr r3, [pc, #20] ; (80018b0 <HAL_IncTick+0x20>)
800189c: 681b ldr r3, [r3, #0]
800189e: 4413 add r3, r2
80018a0: 4a03 ldr r2, [pc, #12] ; (80018b0 <HAL_IncTick+0x20>)
80018a2: 6013 str r3, [r2, #0]
}
80018a4: bf00 nop
80018a6: 46bd mov sp, r7
80018a8: bc80 pop {r7}
80018aa: 4770 bx lr
80018ac: 20000008 .word 0x20000008
80018b0: 2000088c .word 0x2000088c
080018b4 <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)
{
80018b4: b480 push {r7}
80018b6: af00 add r7, sp, #0
return uwTick;
80018b8: 4b02 ldr r3, [pc, #8] ; (80018c4 <HAL_GetTick+0x10>)
80018ba: 681b ldr r3, [r3, #0]
}
80018bc: 4618 mov r0, r3
80018be: 46bd mov sp, r7
80018c0: bc80 pop {r7}
80018c2: 4770 bx lr
80018c4: 2000088c .word 0x2000088c
080018c8 <HAL_Delay>:
* implementations in user file.
* @param Delay specifies the delay time length, in milliseconds.
* @retval None
*/
__weak void HAL_Delay(uint32_t Delay)
{
80018c8: b580 push {r7, lr}
80018ca: b084 sub sp, #16
80018cc: af00 add r7, sp, #0
80018ce: 6078 str r0, [r7, #4]
uint32_t tickstart = HAL_GetTick();
80018d0: f7ff fff0 bl 80018b4 <HAL_GetTick>
80018d4: 60b8 str r0, [r7, #8]
uint32_t wait = Delay;
80018d6: 687b ldr r3, [r7, #4]
80018d8: 60fb str r3, [r7, #12]
/* Add a freq to guarantee minimum wait */
if (wait < HAL_MAX_DELAY)
80018da: 68fb ldr r3, [r7, #12]
80018dc: f1b3 3fff cmp.w r3, #4294967295
80018e0: d005 beq.n 80018ee <HAL_Delay+0x26>
{
wait += (uint32_t)(uwTickFreq);
80018e2: 4b0a ldr r3, [pc, #40] ; (800190c <HAL_Delay+0x44>)
80018e4: 781b ldrb r3, [r3, #0]
80018e6: 461a mov r2, r3
80018e8: 68fb ldr r3, [r7, #12]
80018ea: 4413 add r3, r2
80018ec: 60fb str r3, [r7, #12]
}
while ((HAL_GetTick() - tickstart) < wait)
80018ee: bf00 nop
80018f0: f7ff ffe0 bl 80018b4 <HAL_GetTick>
80018f4: 4602 mov r2, r0
80018f6: 68bb ldr r3, [r7, #8]
80018f8: 1ad3 subs r3, r2, r3
80018fa: 68fa ldr r2, [r7, #12]
80018fc: 429a cmp r2, r3
80018fe: d8f7 bhi.n 80018f0 <HAL_Delay+0x28>
{
}
}
8001900: bf00 nop
8001902: bf00 nop
8001904: 3710 adds r7, #16
8001906: 46bd mov sp, r7
8001908: bd80 pop {r7, pc}
800190a: bf00 nop
800190c: 20000008 .word 0x20000008
08001910 <__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)
{
8001910: b480 push {r7}
8001912: b085 sub sp, #20
8001914: af00 add r7, sp, #0
8001916: 6078 str r0, [r7, #4]
uint32_t reg_value;
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
8001918: 687b ldr r3, [r7, #4]
800191a: f003 0307 and.w r3, r3, #7
800191e: 60fb str r3, [r7, #12]
reg_value = SCB->AIRCR; /* read old register configuration */
8001920: 4b0c ldr r3, [pc, #48] ; (8001954 <__NVIC_SetPriorityGrouping+0x44>)
8001922: 68db ldr r3, [r3, #12]
8001924: 60bb str r3, [r7, #8]
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
8001926: 68ba ldr r2, [r7, #8]
8001928: f64f 03ff movw r3, #63743 ; 0xf8ff
800192c: 4013 ands r3, r2
800192e: 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 */
8001930: 68fb ldr r3, [r7, #12]
8001932: 021a lsls r2, r3, #8
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
8001934: 68bb ldr r3, [r7, #8]
8001936: 4313 orrs r3, r2
reg_value = (reg_value |
8001938: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000
800193c: f443 3300 orr.w r3, r3, #131072 ; 0x20000
8001940: 60bb str r3, [r7, #8]
SCB->AIRCR = reg_value;
8001942: 4a04 ldr r2, [pc, #16] ; (8001954 <__NVIC_SetPriorityGrouping+0x44>)
8001944: 68bb ldr r3, [r7, #8]
8001946: 60d3 str r3, [r2, #12]
}
8001948: bf00 nop
800194a: 3714 adds r7, #20
800194c: 46bd mov sp, r7
800194e: bc80 pop {r7}
8001950: 4770 bx lr
8001952: bf00 nop
8001954: e000ed00 .word 0xe000ed00
08001958 <__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)
{
8001958: b480 push {r7}
800195a: af00 add r7, sp, #0
return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
800195c: 4b04 ldr r3, [pc, #16] ; (8001970 <__NVIC_GetPriorityGrouping+0x18>)
800195e: 68db ldr r3, [r3, #12]
8001960: 0a1b lsrs r3, r3, #8
8001962: f003 0307 and.w r3, r3, #7
}
8001966: 4618 mov r0, r3
8001968: 46bd mov sp, r7
800196a: bc80 pop {r7}
800196c: 4770 bx lr
800196e: bf00 nop
8001970: e000ed00 .word 0xe000ed00
08001974 <__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)
{
8001974: b480 push {r7}
8001976: b083 sub sp, #12
8001978: af00 add r7, sp, #0
800197a: 4603 mov r3, r0
800197c: 71fb strb r3, [r7, #7]
if ((int32_t)(IRQn) >= 0)
800197e: f997 3007 ldrsb.w r3, [r7, #7]
8001982: 2b00 cmp r3, #0
8001984: db0b blt.n 800199e <__NVIC_EnableIRQ+0x2a>
{
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
8001986: 79fb ldrb r3, [r7, #7]
8001988: f003 021f and.w r2, r3, #31
800198c: 4906 ldr r1, [pc, #24] ; (80019a8 <__NVIC_EnableIRQ+0x34>)
800198e: f997 3007 ldrsb.w r3, [r7, #7]
8001992: 095b lsrs r3, r3, #5
8001994: 2001 movs r0, #1
8001996: fa00 f202 lsl.w r2, r0, r2
800199a: f841 2023 str.w r2, [r1, r3, lsl #2]
}
}
800199e: bf00 nop
80019a0: 370c adds r7, #12
80019a2: 46bd mov sp, r7
80019a4: bc80 pop {r7}
80019a6: 4770 bx lr
80019a8: e000e100 .word 0xe000e100
080019ac <__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)
{
80019ac: b480 push {r7}
80019ae: b083 sub sp, #12
80019b0: af00 add r7, sp, #0
80019b2: 4603 mov r3, r0
80019b4: 6039 str r1, [r7, #0]
80019b6: 71fb strb r3, [r7, #7]
if ((int32_t)(IRQn) >= 0)
80019b8: f997 3007 ldrsb.w r3, [r7, #7]
80019bc: 2b00 cmp r3, #0
80019be: db0a blt.n 80019d6 <__NVIC_SetPriority+0x2a>
{
NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
80019c0: 683b ldr r3, [r7, #0]
80019c2: b2da uxtb r2, r3
80019c4: 490c ldr r1, [pc, #48] ; (80019f8 <__NVIC_SetPriority+0x4c>)
80019c6: f997 3007 ldrsb.w r3, [r7, #7]
80019ca: 0112 lsls r2, r2, #4
80019cc: b2d2 uxtb r2, r2
80019ce: 440b add r3, r1
80019d0: 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);
}
}
80019d4: e00a b.n 80019ec <__NVIC_SetPriority+0x40>
SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
80019d6: 683b ldr r3, [r7, #0]
80019d8: b2da uxtb r2, r3
80019da: 4908 ldr r1, [pc, #32] ; (80019fc <__NVIC_SetPriority+0x50>)
80019dc: 79fb ldrb r3, [r7, #7]
80019de: f003 030f and.w r3, r3, #15
80019e2: 3b04 subs r3, #4
80019e4: 0112 lsls r2, r2, #4
80019e6: b2d2 uxtb r2, r2
80019e8: 440b add r3, r1
80019ea: 761a strb r2, [r3, #24]
}
80019ec: bf00 nop
80019ee: 370c adds r7, #12
80019f0: 46bd mov sp, r7
80019f2: bc80 pop {r7}
80019f4: 4770 bx lr
80019f6: bf00 nop
80019f8: e000e100 .word 0xe000e100
80019fc: e000ed00 .word 0xe000ed00
08001a00 <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)
{
8001a00: b480 push {r7}
8001a02: b089 sub sp, #36 ; 0x24
8001a04: af00 add r7, sp, #0
8001a06: 60f8 str r0, [r7, #12]
8001a08: 60b9 str r1, [r7, #8]
8001a0a: 607a str r2, [r7, #4]
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
8001a0c: 68fb ldr r3, [r7, #12]
8001a0e: f003 0307 and.w r3, r3, #7
8001a12: 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);
8001a14: 69fb ldr r3, [r7, #28]
8001a16: f1c3 0307 rsb r3, r3, #7
8001a1a: 2b04 cmp r3, #4
8001a1c: bf28 it cs
8001a1e: 2304 movcs r3, #4
8001a20: 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));
8001a22: 69fb ldr r3, [r7, #28]
8001a24: 3304 adds r3, #4
8001a26: 2b06 cmp r3, #6
8001a28: d902 bls.n 8001a30 <NVIC_EncodePriority+0x30>
8001a2a: 69fb ldr r3, [r7, #28]
8001a2c: 3b03 subs r3, #3
8001a2e: e000 b.n 8001a32 <NVIC_EncodePriority+0x32>
8001a30: 2300 movs r3, #0
8001a32: 617b str r3, [r7, #20]
return (
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
8001a34: f04f 32ff mov.w r2, #4294967295
8001a38: 69bb ldr r3, [r7, #24]
8001a3a: fa02 f303 lsl.w r3, r2, r3
8001a3e: 43da mvns r2, r3
8001a40: 68bb ldr r3, [r7, #8]
8001a42: 401a ands r2, r3
8001a44: 697b ldr r3, [r7, #20]
8001a46: 409a lsls r2, r3
((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
8001a48: f04f 31ff mov.w r1, #4294967295
8001a4c: 697b ldr r3, [r7, #20]
8001a4e: fa01 f303 lsl.w r3, r1, r3
8001a52: 43d9 mvns r1, r3
8001a54: 687b ldr r3, [r7, #4]
8001a56: 400b ands r3, r1
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
8001a58: 4313 orrs r3, r2
);
}
8001a5a: 4618 mov r0, r3
8001a5c: 3724 adds r7, #36 ; 0x24
8001a5e: 46bd mov sp, r7
8001a60: bc80 pop {r7}
8001a62: 4770 bx lr
08001a64 <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)
{
8001a64: b580 push {r7, lr}
8001a66: b082 sub sp, #8
8001a68: af00 add r7, sp, #0
8001a6a: 6078 str r0, [r7, #4]
if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
8001a6c: 687b ldr r3, [r7, #4]
8001a6e: 3b01 subs r3, #1
8001a70: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000
8001a74: d301 bcc.n 8001a7a <SysTick_Config+0x16>
{
return (1UL); /* Reload value impossible */
8001a76: 2301 movs r3, #1
8001a78: e00f b.n 8001a9a <SysTick_Config+0x36>
}
SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
8001a7a: 4a0a ldr r2, [pc, #40] ; (8001aa4 <SysTick_Config+0x40>)
8001a7c: 687b ldr r3, [r7, #4]
8001a7e: 3b01 subs r3, #1
8001a80: 6053 str r3, [r2, #4]
NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
8001a82: 210f movs r1, #15
8001a84: f04f 30ff mov.w r0, #4294967295
8001a88: f7ff ff90 bl 80019ac <__NVIC_SetPriority>
SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
8001a8c: 4b05 ldr r3, [pc, #20] ; (8001aa4 <SysTick_Config+0x40>)
8001a8e: 2200 movs r2, #0
8001a90: 609a str r2, [r3, #8]
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
8001a92: 4b04 ldr r3, [pc, #16] ; (8001aa4 <SysTick_Config+0x40>)
8001a94: 2207 movs r2, #7
8001a96: 601a str r2, [r3, #0]
SysTick_CTRL_TICKINT_Msk |
SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
return (0UL); /* Function successful */
8001a98: 2300 movs r3, #0
}
8001a9a: 4618 mov r0, r3
8001a9c: 3708 adds r7, #8
8001a9e: 46bd mov sp, r7
8001aa0: bd80 pop {r7, pc}
8001aa2: bf00 nop
8001aa4: e000e010 .word 0xe000e010
08001aa8 <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)
{
8001aa8: b580 push {r7, lr}
8001aaa: b082 sub sp, #8
8001aac: af00 add r7, sp, #0
8001aae: 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);
8001ab0: 6878 ldr r0, [r7, #4]
8001ab2: f7ff ff2d bl 8001910 <__NVIC_SetPriorityGrouping>
}
8001ab6: bf00 nop
8001ab8: 3708 adds r7, #8
8001aba: 46bd mov sp, r7
8001abc: bd80 pop {r7, pc}
08001abe <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)
{
8001abe: b580 push {r7, lr}
8001ac0: b086 sub sp, #24
8001ac2: af00 add r7, sp, #0
8001ac4: 4603 mov r3, r0
8001ac6: 60b9 str r1, [r7, #8]
8001ac8: 607a str r2, [r7, #4]
8001aca: 73fb strb r3, [r7, #15]
uint32_t prioritygroup = 0x00U;
8001acc: 2300 movs r3, #0
8001ace: 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();
8001ad0: f7ff ff42 bl 8001958 <__NVIC_GetPriorityGrouping>
8001ad4: 6178 str r0, [r7, #20]
NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
8001ad6: 687a ldr r2, [r7, #4]
8001ad8: 68b9 ldr r1, [r7, #8]
8001ada: 6978 ldr r0, [r7, #20]
8001adc: f7ff ff90 bl 8001a00 <NVIC_EncodePriority>
8001ae0: 4602 mov r2, r0
8001ae2: f997 300f ldrsb.w r3, [r7, #15]
8001ae6: 4611 mov r1, r2
8001ae8: 4618 mov r0, r3
8001aea: f7ff ff5f bl 80019ac <__NVIC_SetPriority>
}
8001aee: bf00 nop
8001af0: 3718 adds r7, #24
8001af2: 46bd mov sp, r7
8001af4: bd80 pop {r7, pc}
08001af6 <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)
{
8001af6: b580 push {r7, lr}
8001af8: b082 sub sp, #8
8001afa: af00 add r7, sp, #0
8001afc: 4603 mov r3, r0
8001afe: 71fb strb r3, [r7, #7]
/* Check the parameters */
assert_param(IS_NVIC_DEVICE_IRQ(IRQn));
/* Enable interrupt */
NVIC_EnableIRQ(IRQn);
8001b00: f997 3007 ldrsb.w r3, [r7, #7]
8001b04: 4618 mov r0, r3
8001b06: f7ff ff35 bl 8001974 <__NVIC_EnableIRQ>
}
8001b0a: bf00 nop
8001b0c: 3708 adds r7, #8
8001b0e: 46bd mov sp, r7
8001b10: bd80 pop {r7, pc}
08001b12 <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)
{
8001b12: b580 push {r7, lr}
8001b14: b082 sub sp, #8
8001b16: af00 add r7, sp, #0
8001b18: 6078 str r0, [r7, #4]
return SysTick_Config(TicksNumb);
8001b1a: 6878 ldr r0, [r7, #4]
8001b1c: f7ff ffa2 bl 8001a64 <SysTick_Config>
8001b20: 4603 mov r3, r0
}
8001b22: 4618 mov r0, r3
8001b24: 3708 adds r7, #8
8001b26: 46bd mov sp, r7
8001b28: bd80 pop {r7, pc}
...
08001b2c <HAL_DMA_Init>:
* @param hdma: Pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA Channel.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *hdma)
{
8001b2c: b480 push {r7}
8001b2e: b085 sub sp, #20
8001b30: af00 add r7, sp, #0
8001b32: 6078 str r0, [r7, #4]
uint32_t tmp = 0U;
8001b34: 2300 movs r3, #0
8001b36: 60fb str r3, [r7, #12]
/* Check the DMA handle allocation */
if(hdma == NULL)
8001b38: 687b ldr r3, [r7, #4]
8001b3a: 2b00 cmp r3, #0
8001b3c: d101 bne.n 8001b42 <HAL_DMA_Init+0x16>
{
return HAL_ERROR;
8001b3e: 2301 movs r3, #1
8001b40: e043 b.n 8001bca <HAL_DMA_Init+0x9e>
hdma->ChannelIndex = (((uint32_t)hdma->Instance - (uint32_t)DMA2_Channel1) / ((uint32_t)DMA2_Channel2 - (uint32_t)DMA2_Channel1)) << 2;
hdma->DmaBaseAddress = DMA2;
}
#else
/* DMA1 */
hdma->ChannelIndex = (((uint32_t)hdma->Instance - (uint32_t)DMA1_Channel1) / ((uint32_t)DMA1_Channel2 - (uint32_t)DMA1_Channel1)) << 2;
8001b42: 687b ldr r3, [r7, #4]
8001b44: 681b ldr r3, [r3, #0]
8001b46: 461a mov r2, r3
8001b48: 4b22 ldr r3, [pc, #136] ; (8001bd4 <HAL_DMA_Init+0xa8>)
8001b4a: 4413 add r3, r2
8001b4c: 4a22 ldr r2, [pc, #136] ; (8001bd8 <HAL_DMA_Init+0xac>)
8001b4e: fba2 2303 umull r2, r3, r2, r3
8001b52: 091b lsrs r3, r3, #4
8001b54: 009a lsls r2, r3, #2
8001b56: 687b ldr r3, [r7, #4]
8001b58: 641a str r2, [r3, #64] ; 0x40
hdma->DmaBaseAddress = DMA1;
8001b5a: 687b ldr r3, [r7, #4]
8001b5c: 4a1f ldr r2, [pc, #124] ; (8001bdc <HAL_DMA_Init+0xb0>)
8001b5e: 63da str r2, [r3, #60] ; 0x3c
#endif /* DMA2 */
/* Change DMA peripheral state */
hdma->State = HAL_DMA_STATE_BUSY;
8001b60: 687b ldr r3, [r7, #4]
8001b62: 2202 movs r2, #2
8001b64: f883 2021 strb.w r2, [r3, #33] ; 0x21
/* Get the CR register value */
tmp = hdma->Instance->CCR;
8001b68: 687b ldr r3, [r7, #4]
8001b6a: 681b ldr r3, [r3, #0]
8001b6c: 681b ldr r3, [r3, #0]
8001b6e: 60fb str r3, [r7, #12]
/* Clear PL, MSIZE, PSIZE, MINC, PINC, CIRC and DIR bits */
tmp &= ((uint32_t)~(DMA_CCR_PL | DMA_CCR_MSIZE | DMA_CCR_PSIZE | \
8001b70: 68fb ldr r3, [r7, #12]
8001b72: f423 537f bic.w r3, r3, #16320 ; 0x3fc0
8001b76: f023 0330 bic.w r3, r3, #48 ; 0x30
8001b7a: 60fb str r3, [r7, #12]
DMA_CCR_MINC | DMA_CCR_PINC | DMA_CCR_CIRC | \
DMA_CCR_DIR));
/* Prepare the DMA Channel configuration */
tmp |= hdma->Init.Direction |
8001b7c: 687b ldr r3, [r7, #4]
8001b7e: 685a ldr r2, [r3, #4]
hdma->Init.PeriphInc | hdma->Init.MemInc |
8001b80: 687b ldr r3, [r7, #4]
8001b82: 689b ldr r3, [r3, #8]
tmp |= hdma->Init.Direction |
8001b84: 431a orrs r2, r3
hdma->Init.PeriphInc | hdma->Init.MemInc |
8001b86: 687b ldr r3, [r7, #4]
8001b88: 68db ldr r3, [r3, #12]
8001b8a: 431a orrs r2, r3
hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment |
8001b8c: 687b ldr r3, [r7, #4]
8001b8e: 691b ldr r3, [r3, #16]
hdma->Init.PeriphInc | hdma->Init.MemInc |
8001b90: 431a orrs r2, r3
hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment |
8001b92: 687b ldr r3, [r7, #4]
8001b94: 695b ldr r3, [r3, #20]
8001b96: 431a orrs r2, r3
hdma->Init.Mode | hdma->Init.Priority;
8001b98: 687b ldr r3, [r7, #4]
8001b9a: 699b ldr r3, [r3, #24]
hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment |
8001b9c: 431a orrs r2, r3
hdma->Init.Mode | hdma->Init.Priority;
8001b9e: 687b ldr r3, [r7, #4]
8001ba0: 69db ldr r3, [r3, #28]
8001ba2: 4313 orrs r3, r2
tmp |= hdma->Init.Direction |
8001ba4: 68fa ldr r2, [r7, #12]
8001ba6: 4313 orrs r3, r2
8001ba8: 60fb str r3, [r7, #12]
/* Write to DMA Channel CR register */
hdma->Instance->CCR = tmp;
8001baa: 687b ldr r3, [r7, #4]
8001bac: 681b ldr r3, [r3, #0]
8001bae: 68fa ldr r2, [r7, #12]
8001bb0: 601a str r2, [r3, #0]
/* Initialise the error code */
hdma->ErrorCode = HAL_DMA_ERROR_NONE;
8001bb2: 687b ldr r3, [r7, #4]
8001bb4: 2200 movs r2, #0
8001bb6: 639a str r2, [r3, #56] ; 0x38
/* Initialize the DMA state*/
hdma->State = HAL_DMA_STATE_READY;
8001bb8: 687b ldr r3, [r7, #4]
8001bba: 2201 movs r2, #1
8001bbc: f883 2021 strb.w r2, [r3, #33] ; 0x21
/* Allocate lock resource and initialize it */
hdma->Lock = HAL_UNLOCKED;
8001bc0: 687b ldr r3, [r7, #4]
8001bc2: 2200 movs r2, #0
8001bc4: f883 2020 strb.w r2, [r3, #32]
return HAL_OK;
8001bc8: 2300 movs r3, #0
}
8001bca: 4618 mov r0, r3
8001bcc: 3714 adds r7, #20
8001bce: 46bd mov sp, r7
8001bd0: bc80 pop {r7}
8001bd2: 4770 bx lr
8001bd4: bffdfff8 .word 0xbffdfff8
8001bd8: cccccccd .word 0xcccccccd
8001bdc: 40020000 .word 0x40020000
08001be0 <HAL_DMA_Start_IT>:
* @param DstAddress: The destination memory Buffer address
* @param DataLength: The length of data to be transferred from source to destination
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
{
8001be0: b580 push {r7, lr}
8001be2: b086 sub sp, #24
8001be4: af00 add r7, sp, #0
8001be6: 60f8 str r0, [r7, #12]
8001be8: 60b9 str r1, [r7, #8]
8001bea: 607a str r2, [r7, #4]
8001bec: 603b str r3, [r7, #0]
HAL_StatusTypeDef status = HAL_OK;
8001bee: 2300 movs r3, #0
8001bf0: 75fb strb r3, [r7, #23]
/* Check the parameters */
assert_param(IS_DMA_BUFFER_SIZE(DataLength));
/* Process locked */
__HAL_LOCK(hdma);
8001bf2: 68fb ldr r3, [r7, #12]
8001bf4: f893 3020 ldrb.w r3, [r3, #32]
8001bf8: 2b01 cmp r3, #1
8001bfa: d101 bne.n 8001c00 <HAL_DMA_Start_IT+0x20>
8001bfc: 2302 movs r3, #2
8001bfe: e04a b.n 8001c96 <HAL_DMA_Start_IT+0xb6>
8001c00: 68fb ldr r3, [r7, #12]
8001c02: 2201 movs r2, #1
8001c04: f883 2020 strb.w r2, [r3, #32]
if(HAL_DMA_STATE_READY == hdma->State)
8001c08: 68fb ldr r3, [r7, #12]
8001c0a: f893 3021 ldrb.w r3, [r3, #33] ; 0x21
8001c0e: 2b01 cmp r3, #1
8001c10: d13a bne.n 8001c88 <HAL_DMA_Start_IT+0xa8>
{
/* Change DMA peripheral state */
hdma->State = HAL_DMA_STATE_BUSY;
8001c12: 68fb ldr r3, [r7, #12]
8001c14: 2202 movs r2, #2
8001c16: f883 2021 strb.w r2, [r3, #33] ; 0x21
hdma->ErrorCode = HAL_DMA_ERROR_NONE;
8001c1a: 68fb ldr r3, [r7, #12]
8001c1c: 2200 movs r2, #0
8001c1e: 639a str r2, [r3, #56] ; 0x38
/* Disable the peripheral */
__HAL_DMA_DISABLE(hdma);
8001c20: 68fb ldr r3, [r7, #12]
8001c22: 681b ldr r3, [r3, #0]
8001c24: 681a ldr r2, [r3, #0]
8001c26: 68fb ldr r3, [r7, #12]
8001c28: 681b ldr r3, [r3, #0]
8001c2a: f022 0201 bic.w r2, r2, #1
8001c2e: 601a str r2, [r3, #0]
/* Configure the source, destination address and the data length & clear flags*/
DMA_SetConfig(hdma, SrcAddress, DstAddress, DataLength);
8001c30: 683b ldr r3, [r7, #0]
8001c32: 687a ldr r2, [r7, #4]
8001c34: 68b9 ldr r1, [r7, #8]
8001c36: 68f8 ldr r0, [r7, #12]
8001c38: f000 f9e8 bl 800200c <DMA_SetConfig>
/* Enable the transfer complete interrupt */
/* Enable the transfer Error interrupt */
if(NULL != hdma->XferHalfCpltCallback)
8001c3c: 68fb ldr r3, [r7, #12]
8001c3e: 6adb ldr r3, [r3, #44] ; 0x2c
8001c40: 2b00 cmp r3, #0
8001c42: d008 beq.n 8001c56 <HAL_DMA_Start_IT+0x76>
{
/* Enable the Half transfer complete interrupt as well */
__HAL_DMA_ENABLE_IT(hdma, (DMA_IT_TC | DMA_IT_HT | DMA_IT_TE));
8001c44: 68fb ldr r3, [r7, #12]
8001c46: 681b ldr r3, [r3, #0]
8001c48: 681a ldr r2, [r3, #0]
8001c4a: 68fb ldr r3, [r7, #12]
8001c4c: 681b ldr r3, [r3, #0]
8001c4e: f042 020e orr.w r2, r2, #14
8001c52: 601a str r2, [r3, #0]
8001c54: e00f b.n 8001c76 <HAL_DMA_Start_IT+0x96>
}
else
{
__HAL_DMA_DISABLE_IT(hdma, DMA_IT_HT);
8001c56: 68fb ldr r3, [r7, #12]
8001c58: 681b ldr r3, [r3, #0]
8001c5a: 681a ldr r2, [r3, #0]
8001c5c: 68fb ldr r3, [r7, #12]
8001c5e: 681b ldr r3, [r3, #0]
8001c60: f022 0204 bic.w r2, r2, #4
8001c64: 601a str r2, [r3, #0]
__HAL_DMA_ENABLE_IT(hdma, (DMA_IT_TC | DMA_IT_TE));
8001c66: 68fb ldr r3, [r7, #12]
8001c68: 681b ldr r3, [r3, #0]
8001c6a: 681a ldr r2, [r3, #0]
8001c6c: 68fb ldr r3, [r7, #12]
8001c6e: 681b ldr r3, [r3, #0]
8001c70: f042 020a orr.w r2, r2, #10
8001c74: 601a str r2, [r3, #0]
}
/* Enable the Peripheral */
__HAL_DMA_ENABLE(hdma);
8001c76: 68fb ldr r3, [r7, #12]
8001c78: 681b ldr r3, [r3, #0]
8001c7a: 681a ldr r2, [r3, #0]
8001c7c: 68fb ldr r3, [r7, #12]
8001c7e: 681b ldr r3, [r3, #0]
8001c80: f042 0201 orr.w r2, r2, #1
8001c84: 601a str r2, [r3, #0]
8001c86: e005 b.n 8001c94 <HAL_DMA_Start_IT+0xb4>
}
else
{
/* Process Unlocked */
__HAL_UNLOCK(hdma);
8001c88: 68fb ldr r3, [r7, #12]
8001c8a: 2200 movs r2, #0
8001c8c: f883 2020 strb.w r2, [r3, #32]
/* Remain BUSY */
status = HAL_BUSY;
8001c90: 2302 movs r3, #2
8001c92: 75fb strb r3, [r7, #23]
}
return status;
8001c94: 7dfb ldrb r3, [r7, #23]
}
8001c96: 4618 mov r0, r3
8001c98: 3718 adds r7, #24
8001c9a: 46bd mov sp, r7
8001c9c: bd80 pop {r7, pc}
08001c9e <HAL_DMA_Abort>:
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA Channel.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DMA_Abort(DMA_HandleTypeDef *hdma)
{
8001c9e: b480 push {r7}
8001ca0: b085 sub sp, #20
8001ca2: af00 add r7, sp, #0
8001ca4: 6078 str r0, [r7, #4]
HAL_StatusTypeDef status = HAL_OK;
8001ca6: 2300 movs r3, #0
8001ca8: 73fb strb r3, [r7, #15]
if(hdma->State != HAL_DMA_STATE_BUSY)
8001caa: 687b ldr r3, [r7, #4]
8001cac: f893 3021 ldrb.w r3, [r3, #33] ; 0x21
8001cb0: 2b02 cmp r3, #2
8001cb2: d008 beq.n 8001cc6 <HAL_DMA_Abort+0x28>
{
/* no transfer ongoing */
hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER;
8001cb4: 687b ldr r3, [r7, #4]
8001cb6: 2204 movs r2, #4
8001cb8: 639a str r2, [r3, #56] ; 0x38
/* Process Unlocked */
__HAL_UNLOCK(hdma);
8001cba: 687b ldr r3, [r7, #4]
8001cbc: 2200 movs r2, #0
8001cbe: f883 2020 strb.w r2, [r3, #32]
return HAL_ERROR;
8001cc2: 2301 movs r3, #1
8001cc4: e020 b.n 8001d08 <HAL_DMA_Abort+0x6a>
}
else
{
/* Disable DMA IT */
__HAL_DMA_DISABLE_IT(hdma, (DMA_IT_TC | DMA_IT_HT | DMA_IT_TE));
8001cc6: 687b ldr r3, [r7, #4]
8001cc8: 681b ldr r3, [r3, #0]
8001cca: 681a ldr r2, [r3, #0]
8001ccc: 687b ldr r3, [r7, #4]
8001cce: 681b ldr r3, [r3, #0]
8001cd0: f022 020e bic.w r2, r2, #14
8001cd4: 601a str r2, [r3, #0]
/* Disable the channel */
__HAL_DMA_DISABLE(hdma);
8001cd6: 687b ldr r3, [r7, #4]
8001cd8: 681b ldr r3, [r3, #0]
8001cda: 681a ldr r2, [r3, #0]
8001cdc: 687b ldr r3, [r7, #4]
8001cde: 681b ldr r3, [r3, #0]
8001ce0: f022 0201 bic.w r2, r2, #1
8001ce4: 601a str r2, [r3, #0]
/* Clear all flags */
hdma->DmaBaseAddress->IFCR = (DMA_ISR_GIF1 << hdma->ChannelIndex);
8001ce6: 687b ldr r3, [r7, #4]
8001ce8: 6c1a ldr r2, [r3, #64] ; 0x40
8001cea: 687b ldr r3, [r7, #4]
8001cec: 6bdb ldr r3, [r3, #60] ; 0x3c
8001cee: 2101 movs r1, #1
8001cf0: fa01 f202 lsl.w r2, r1, r2
8001cf4: 605a str r2, [r3, #4]
}
/* Change the DMA state */
hdma->State = HAL_DMA_STATE_READY;
8001cf6: 687b ldr r3, [r7, #4]
8001cf8: 2201 movs r2, #1
8001cfa: f883 2021 strb.w r2, [r3, #33] ; 0x21
/* Process Unlocked */
__HAL_UNLOCK(hdma);
8001cfe: 687b ldr r3, [r7, #4]
8001d00: 2200 movs r2, #0
8001d02: f883 2020 strb.w r2, [r3, #32]
return status;
8001d06: 7bfb ldrb r3, [r7, #15]
}
8001d08: 4618 mov r0, r3
8001d0a: 3714 adds r7, #20
8001d0c: 46bd mov sp, r7
8001d0e: bc80 pop {r7}
8001d10: 4770 bx lr
...
08001d14 <HAL_DMA_Abort_IT>:
* @param hdma : pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA Channel.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DMA_Abort_IT(DMA_HandleTypeDef *hdma)
{
8001d14: b580 push {r7, lr}
8001d16: b084 sub sp, #16
8001d18: af00 add r7, sp, #0
8001d1a: 6078 str r0, [r7, #4]
HAL_StatusTypeDef status = HAL_OK;
8001d1c: 2300 movs r3, #0
8001d1e: 73fb strb r3, [r7, #15]
if(HAL_DMA_STATE_BUSY != hdma->State)
8001d20: 687b ldr r3, [r7, #4]
8001d22: f893 3021 ldrb.w r3, [r3, #33] ; 0x21
8001d26: 2b02 cmp r3, #2
8001d28: d005 beq.n 8001d36 <HAL_DMA_Abort_IT+0x22>
{
/* no transfer ongoing */
hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER;
8001d2a: 687b ldr r3, [r7, #4]
8001d2c: 2204 movs r2, #4
8001d2e: 639a str r2, [r3, #56] ; 0x38
status = HAL_ERROR;
8001d30: 2301 movs r3, #1
8001d32: 73fb strb r3, [r7, #15]
8001d34: e051 b.n 8001dda <HAL_DMA_Abort_IT+0xc6>
}
else
{
/* Disable DMA IT */
__HAL_DMA_DISABLE_IT(hdma, (DMA_IT_TC | DMA_IT_HT | DMA_IT_TE));
8001d36: 687b ldr r3, [r7, #4]
8001d38: 681b ldr r3, [r3, #0]
8001d3a: 681a ldr r2, [r3, #0]
8001d3c: 687b ldr r3, [r7, #4]
8001d3e: 681b ldr r3, [r3, #0]
8001d40: f022 020e bic.w r2, r2, #14
8001d44: 601a str r2, [r3, #0]
/* Disable the channel */
__HAL_DMA_DISABLE(hdma);
8001d46: 687b ldr r3, [r7, #4]
8001d48: 681b ldr r3, [r3, #0]
8001d4a: 681a ldr r2, [r3, #0]
8001d4c: 687b ldr r3, [r7, #4]
8001d4e: 681b ldr r3, [r3, #0]
8001d50: f022 0201 bic.w r2, r2, #1
8001d54: 601a str r2, [r3, #0]
/* Clear all flags */
__HAL_DMA_CLEAR_FLAG(hdma, __HAL_DMA_GET_GI_FLAG_INDEX(hdma));
8001d56: 687b ldr r3, [r7, #4]
8001d58: 681b ldr r3, [r3, #0]
8001d5a: 4a22 ldr r2, [pc, #136] ; (8001de4 <HAL_DMA_Abort_IT+0xd0>)
8001d5c: 4293 cmp r3, r2
8001d5e: d029 beq.n 8001db4 <HAL_DMA_Abort_IT+0xa0>
8001d60: 687b ldr r3, [r7, #4]
8001d62: 681b ldr r3, [r3, #0]
8001d64: 4a20 ldr r2, [pc, #128] ; (8001de8 <HAL_DMA_Abort_IT+0xd4>)
8001d66: 4293 cmp r3, r2
8001d68: d022 beq.n 8001db0 <HAL_DMA_Abort_IT+0x9c>
8001d6a: 687b ldr r3, [r7, #4]
8001d6c: 681b ldr r3, [r3, #0]
8001d6e: 4a1f ldr r2, [pc, #124] ; (8001dec <HAL_DMA_Abort_IT+0xd8>)
8001d70: 4293 cmp r3, r2
8001d72: d01a beq.n 8001daa <HAL_DMA_Abort_IT+0x96>
8001d74: 687b ldr r3, [r7, #4]
8001d76: 681b ldr r3, [r3, #0]
8001d78: 4a1d ldr r2, [pc, #116] ; (8001df0 <HAL_DMA_Abort_IT+0xdc>)
8001d7a: 4293 cmp r3, r2
8001d7c: d012 beq.n 8001da4 <HAL_DMA_Abort_IT+0x90>
8001d7e: 687b ldr r3, [r7, #4]
8001d80: 681b ldr r3, [r3, #0]
8001d82: 4a1c ldr r2, [pc, #112] ; (8001df4 <HAL_DMA_Abort_IT+0xe0>)
8001d84: 4293 cmp r3, r2
8001d86: d00a beq.n 8001d9e <HAL_DMA_Abort_IT+0x8a>
8001d88: 687b ldr r3, [r7, #4]
8001d8a: 681b ldr r3, [r3, #0]
8001d8c: 4a1a ldr r2, [pc, #104] ; (8001df8 <HAL_DMA_Abort_IT+0xe4>)
8001d8e: 4293 cmp r3, r2
8001d90: d102 bne.n 8001d98 <HAL_DMA_Abort_IT+0x84>
8001d92: f44f 1380 mov.w r3, #1048576 ; 0x100000
8001d96: e00e b.n 8001db6 <HAL_DMA_Abort_IT+0xa2>
8001d98: f04f 7380 mov.w r3, #16777216 ; 0x1000000
8001d9c: e00b b.n 8001db6 <HAL_DMA_Abort_IT+0xa2>
8001d9e: f44f 3380 mov.w r3, #65536 ; 0x10000
8001da2: e008 b.n 8001db6 <HAL_DMA_Abort_IT+0xa2>
8001da4: f44f 5380 mov.w r3, #4096 ; 0x1000
8001da8: e005 b.n 8001db6 <HAL_DMA_Abort_IT+0xa2>
8001daa: f44f 7380 mov.w r3, #256 ; 0x100
8001dae: e002 b.n 8001db6 <HAL_DMA_Abort_IT+0xa2>
8001db0: 2310 movs r3, #16
8001db2: e000 b.n 8001db6 <HAL_DMA_Abort_IT+0xa2>
8001db4: 2301 movs r3, #1
8001db6: 4a11 ldr r2, [pc, #68] ; (8001dfc <HAL_DMA_Abort_IT+0xe8>)
8001db8: 6053 str r3, [r2, #4]
/* Change the DMA state */
hdma->State = HAL_DMA_STATE_READY;
8001dba: 687b ldr r3, [r7, #4]
8001dbc: 2201 movs r2, #1
8001dbe: f883 2021 strb.w r2, [r3, #33] ; 0x21
/* Process Unlocked */
__HAL_UNLOCK(hdma);
8001dc2: 687b ldr r3, [r7, #4]
8001dc4: 2200 movs r2, #0
8001dc6: f883 2020 strb.w r2, [r3, #32]
/* Call User Abort callback */
if(hdma->XferAbortCallback != NULL)
8001dca: 687b ldr r3, [r7, #4]
8001dcc: 6b5b ldr r3, [r3, #52] ; 0x34
8001dce: 2b00 cmp r3, #0
8001dd0: d003 beq.n 8001dda <HAL_DMA_Abort_IT+0xc6>
{
hdma->XferAbortCallback(hdma);
8001dd2: 687b ldr r3, [r7, #4]
8001dd4: 6b5b ldr r3, [r3, #52] ; 0x34
8001dd6: 6878 ldr r0, [r7, #4]
8001dd8: 4798 blx r3
}
}
return status;
8001dda: 7bfb ldrb r3, [r7, #15]
}
8001ddc: 4618 mov r0, r3
8001dde: 3710 adds r7, #16
8001de0: 46bd mov sp, r7
8001de2: bd80 pop {r7, pc}
8001de4: 40020008 .word 0x40020008
8001de8: 4002001c .word 0x4002001c
8001dec: 40020030 .word 0x40020030
8001df0: 40020044 .word 0x40020044
8001df4: 40020058 .word 0x40020058
8001df8: 4002006c .word 0x4002006c
8001dfc: 40020000 .word 0x40020000
08001e00 <HAL_DMA_IRQHandler>:
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA Channel.
* @retval None
*/
void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma)
{
8001e00: b580 push {r7, lr}
8001e02: b084 sub sp, #16
8001e04: af00 add r7, sp, #0
8001e06: 6078 str r0, [r7, #4]
uint32_t flag_it = hdma->DmaBaseAddress->ISR;
8001e08: 687b ldr r3, [r7, #4]
8001e0a: 6bdb ldr r3, [r3, #60] ; 0x3c
8001e0c: 681b ldr r3, [r3, #0]
8001e0e: 60fb str r3, [r7, #12]
uint32_t source_it = hdma->Instance->CCR;
8001e10: 687b ldr r3, [r7, #4]
8001e12: 681b ldr r3, [r3, #0]
8001e14: 681b ldr r3, [r3, #0]
8001e16: 60bb str r3, [r7, #8]
/* Half Transfer Complete Interrupt management ******************************/
if (((flag_it & (DMA_FLAG_HT1 << hdma->ChannelIndex)) != RESET) && ((source_it & DMA_IT_HT) != RESET))
8001e18: 687b ldr r3, [r7, #4]
8001e1a: 6c1b ldr r3, [r3, #64] ; 0x40
8001e1c: 2204 movs r2, #4
8001e1e: 409a lsls r2, r3
8001e20: 68fb ldr r3, [r7, #12]
8001e22: 4013 ands r3, r2
8001e24: 2b00 cmp r3, #0
8001e26: d04f beq.n 8001ec8 <HAL_DMA_IRQHandler+0xc8>
8001e28: 68bb ldr r3, [r7, #8]
8001e2a: f003 0304 and.w r3, r3, #4
8001e2e: 2b00 cmp r3, #0
8001e30: d04a beq.n 8001ec8 <HAL_DMA_IRQHandler+0xc8>
{
/* Disable the half transfer interrupt if the DMA mode is not CIRCULAR */
if((hdma->Instance->CCR & DMA_CCR_CIRC) == 0U)
8001e32: 687b ldr r3, [r7, #4]
8001e34: 681b ldr r3, [r3, #0]
8001e36: 681b ldr r3, [r3, #0]
8001e38: f003 0320 and.w r3, r3, #32
8001e3c: 2b00 cmp r3, #0
8001e3e: d107 bne.n 8001e50 <HAL_DMA_IRQHandler+0x50>
{
/* Disable the half transfer interrupt */
__HAL_DMA_DISABLE_IT(hdma, DMA_IT_HT);
8001e40: 687b ldr r3, [r7, #4]
8001e42: 681b ldr r3, [r3, #0]
8001e44: 681a ldr r2, [r3, #0]
8001e46: 687b ldr r3, [r7, #4]
8001e48: 681b ldr r3, [r3, #0]
8001e4a: f022 0204 bic.w r2, r2, #4
8001e4e: 601a str r2, [r3, #0]
}
/* Clear the half transfer complete flag */
__HAL_DMA_CLEAR_FLAG(hdma, __HAL_DMA_GET_HT_FLAG_INDEX(hdma));
8001e50: 687b ldr r3, [r7, #4]
8001e52: 681b ldr r3, [r3, #0]
8001e54: 4a66 ldr r2, [pc, #408] ; (8001ff0 <HAL_DMA_IRQHandler+0x1f0>)
8001e56: 4293 cmp r3, r2
8001e58: d029 beq.n 8001eae <HAL_DMA_IRQHandler+0xae>
8001e5a: 687b ldr r3, [r7, #4]
8001e5c: 681b ldr r3, [r3, #0]
8001e5e: 4a65 ldr r2, [pc, #404] ; (8001ff4 <HAL_DMA_IRQHandler+0x1f4>)
8001e60: 4293 cmp r3, r2
8001e62: d022 beq.n 8001eaa <HAL_DMA_IRQHandler+0xaa>
8001e64: 687b ldr r3, [r7, #4]
8001e66: 681b ldr r3, [r3, #0]
8001e68: 4a63 ldr r2, [pc, #396] ; (8001ff8 <HAL_DMA_IRQHandler+0x1f8>)
8001e6a: 4293 cmp r3, r2
8001e6c: d01a beq.n 8001ea4 <HAL_DMA_IRQHandler+0xa4>
8001e6e: 687b ldr r3, [r7, #4]
8001e70: 681b ldr r3, [r3, #0]
8001e72: 4a62 ldr r2, [pc, #392] ; (8001ffc <HAL_DMA_IRQHandler+0x1fc>)
8001e74: 4293 cmp r3, r2
8001e76: d012 beq.n 8001e9e <HAL_DMA_IRQHandler+0x9e>
8001e78: 687b ldr r3, [r7, #4]
8001e7a: 681b ldr r3, [r3, #0]
8001e7c: 4a60 ldr r2, [pc, #384] ; (8002000 <HAL_DMA_IRQHandler+0x200>)
8001e7e: 4293 cmp r3, r2
8001e80: d00a beq.n 8001e98 <HAL_DMA_IRQHandler+0x98>
8001e82: 687b ldr r3, [r7, #4]
8001e84: 681b ldr r3, [r3, #0]
8001e86: 4a5f ldr r2, [pc, #380] ; (8002004 <HAL_DMA_IRQHandler+0x204>)
8001e88: 4293 cmp r3, r2
8001e8a: d102 bne.n 8001e92 <HAL_DMA_IRQHandler+0x92>
8001e8c: f44f 0380 mov.w r3, #4194304 ; 0x400000
8001e90: e00e b.n 8001eb0 <HAL_DMA_IRQHandler+0xb0>
8001e92: f04f 6380 mov.w r3, #67108864 ; 0x4000000
8001e96: e00b b.n 8001eb0 <HAL_DMA_IRQHandler+0xb0>
8001e98: f44f 2380 mov.w r3, #262144 ; 0x40000
8001e9c: e008 b.n 8001eb0 <HAL_DMA_IRQHandler+0xb0>
8001e9e: f44f 4380 mov.w r3, #16384 ; 0x4000
8001ea2: e005 b.n 8001eb0 <HAL_DMA_IRQHandler+0xb0>
8001ea4: f44f 6380 mov.w r3, #1024 ; 0x400
8001ea8: e002 b.n 8001eb0 <HAL_DMA_IRQHandler+0xb0>
8001eaa: 2340 movs r3, #64 ; 0x40
8001eac: e000 b.n 8001eb0 <HAL_DMA_IRQHandler+0xb0>
8001eae: 2304 movs r3, #4
8001eb0: 4a55 ldr r2, [pc, #340] ; (8002008 <HAL_DMA_IRQHandler+0x208>)
8001eb2: 6053 str r3, [r2, #4]
/* DMA peripheral state is not updated in Half Transfer */
/* but in Transfer Complete case */
if(hdma->XferHalfCpltCallback != NULL)
8001eb4: 687b ldr r3, [r7, #4]
8001eb6: 6adb ldr r3, [r3, #44] ; 0x2c
8001eb8: 2b00 cmp r3, #0
8001eba: f000 8094 beq.w 8001fe6 <HAL_DMA_IRQHandler+0x1e6>
{
/* Half transfer callback */
hdma->XferHalfCpltCallback(hdma);
8001ebe: 687b ldr r3, [r7, #4]
8001ec0: 6adb ldr r3, [r3, #44] ; 0x2c
8001ec2: 6878 ldr r0, [r7, #4]
8001ec4: 4798 blx r3
if(hdma->XferHalfCpltCallback != NULL)
8001ec6: e08e b.n 8001fe6 <HAL_DMA_IRQHandler+0x1e6>
}
}
/* Transfer Complete Interrupt management ***********************************/
else if (((flag_it & (DMA_FLAG_TC1 << hdma->ChannelIndex)) != RESET) && ((source_it & DMA_IT_TC) != RESET))
8001ec8: 687b ldr r3, [r7, #4]
8001eca: 6c1b ldr r3, [r3, #64] ; 0x40
8001ecc: 2202 movs r2, #2
8001ece: 409a lsls r2, r3
8001ed0: 68fb ldr r3, [r7, #12]
8001ed2: 4013 ands r3, r2
8001ed4: 2b00 cmp r3, #0
8001ed6: d056 beq.n 8001f86 <HAL_DMA_IRQHandler+0x186>
8001ed8: 68bb ldr r3, [r7, #8]
8001eda: f003 0302 and.w r3, r3, #2
8001ede: 2b00 cmp r3, #0
8001ee0: d051 beq.n 8001f86 <HAL_DMA_IRQHandler+0x186>
{
if((hdma->Instance->CCR & DMA_CCR_CIRC) == 0U)
8001ee2: 687b ldr r3, [r7, #4]
8001ee4: 681b ldr r3, [r3, #0]
8001ee6: 681b ldr r3, [r3, #0]
8001ee8: f003 0320 and.w r3, r3, #32
8001eec: 2b00 cmp r3, #0
8001eee: d10b bne.n 8001f08 <HAL_DMA_IRQHandler+0x108>
{
/* Disable the transfer complete and error interrupt */
__HAL_DMA_DISABLE_IT(hdma, DMA_IT_TE | DMA_IT_TC);
8001ef0: 687b ldr r3, [r7, #4]
8001ef2: 681b ldr r3, [r3, #0]
8001ef4: 681a ldr r2, [r3, #0]
8001ef6: 687b ldr r3, [r7, #4]
8001ef8: 681b ldr r3, [r3, #0]
8001efa: f022 020a bic.w r2, r2, #10
8001efe: 601a str r2, [r3, #0]
/* Change the DMA state */
hdma->State = HAL_DMA_STATE_READY;
8001f00: 687b ldr r3, [r7, #4]
8001f02: 2201 movs r2, #1
8001f04: f883 2021 strb.w r2, [r3, #33] ; 0x21
}
/* Clear the transfer complete flag */
__HAL_DMA_CLEAR_FLAG(hdma, __HAL_DMA_GET_TC_FLAG_INDEX(hdma));
8001f08: 687b ldr r3, [r7, #4]
8001f0a: 681b ldr r3, [r3, #0]
8001f0c: 4a38 ldr r2, [pc, #224] ; (8001ff0 <HAL_DMA_IRQHandler+0x1f0>)
8001f0e: 4293 cmp r3, r2
8001f10: d029 beq.n 8001f66 <HAL_DMA_IRQHandler+0x166>
8001f12: 687b ldr r3, [r7, #4]
8001f14: 681b ldr r3, [r3, #0]
8001f16: 4a37 ldr r2, [pc, #220] ; (8001ff4 <HAL_DMA_IRQHandler+0x1f4>)
8001f18: 4293 cmp r3, r2
8001f1a: d022 beq.n 8001f62 <HAL_DMA_IRQHandler+0x162>
8001f1c: 687b ldr r3, [r7, #4]
8001f1e: 681b ldr r3, [r3, #0]
8001f20: 4a35 ldr r2, [pc, #212] ; (8001ff8 <HAL_DMA_IRQHandler+0x1f8>)
8001f22: 4293 cmp r3, r2
8001f24: d01a beq.n 8001f5c <HAL_DMA_IRQHandler+0x15c>
8001f26: 687b ldr r3, [r7, #4]
8001f28: 681b ldr r3, [r3, #0]
8001f2a: 4a34 ldr r2, [pc, #208] ; (8001ffc <HAL_DMA_IRQHandler+0x1fc>)
8001f2c: 4293 cmp r3, r2
8001f2e: d012 beq.n 8001f56 <HAL_DMA_IRQHandler+0x156>
8001f30: 687b ldr r3, [r7, #4]
8001f32: 681b ldr r3, [r3, #0]
8001f34: 4a32 ldr r2, [pc, #200] ; (8002000 <HAL_DMA_IRQHandler+0x200>)
8001f36: 4293 cmp r3, r2
8001f38: d00a beq.n 8001f50 <HAL_DMA_IRQHandler+0x150>
8001f3a: 687b ldr r3, [r7, #4]
8001f3c: 681b ldr r3, [r3, #0]
8001f3e: 4a31 ldr r2, [pc, #196] ; (8002004 <HAL_DMA_IRQHandler+0x204>)
8001f40: 4293 cmp r3, r2
8001f42: d102 bne.n 8001f4a <HAL_DMA_IRQHandler+0x14a>
8001f44: f44f 1300 mov.w r3, #2097152 ; 0x200000
8001f48: e00e b.n 8001f68 <HAL_DMA_IRQHandler+0x168>
8001f4a: f04f 7300 mov.w r3, #33554432 ; 0x2000000
8001f4e: e00b b.n 8001f68 <HAL_DMA_IRQHandler+0x168>
8001f50: f44f 3300 mov.w r3, #131072 ; 0x20000
8001f54: e008 b.n 8001f68 <HAL_DMA_IRQHandler+0x168>
8001f56: f44f 5300 mov.w r3, #8192 ; 0x2000
8001f5a: e005 b.n 8001f68 <HAL_DMA_IRQHandler+0x168>
8001f5c: f44f 7300 mov.w r3, #512 ; 0x200
8001f60: e002 b.n 8001f68 <HAL_DMA_IRQHandler+0x168>
8001f62: 2320 movs r3, #32
8001f64: e000 b.n 8001f68 <HAL_DMA_IRQHandler+0x168>
8001f66: 2302 movs r3, #2
8001f68: 4a27 ldr r2, [pc, #156] ; (8002008 <HAL_DMA_IRQHandler+0x208>)
8001f6a: 6053 str r3, [r2, #4]
/* Process Unlocked */
__HAL_UNLOCK(hdma);
8001f6c: 687b ldr r3, [r7, #4]
8001f6e: 2200 movs r2, #0
8001f70: f883 2020 strb.w r2, [r3, #32]
if(hdma->XferCpltCallback != NULL)
8001f74: 687b ldr r3, [r7, #4]
8001f76: 6a9b ldr r3, [r3, #40] ; 0x28
8001f78: 2b00 cmp r3, #0
8001f7a: d034 beq.n 8001fe6 <HAL_DMA_IRQHandler+0x1e6>
{
/* Transfer complete callback */
hdma->XferCpltCallback(hdma);
8001f7c: 687b ldr r3, [r7, #4]
8001f7e: 6a9b ldr r3, [r3, #40] ; 0x28
8001f80: 6878 ldr r0, [r7, #4]
8001f82: 4798 blx r3
if(hdma->XferCpltCallback != NULL)
8001f84: e02f b.n 8001fe6 <HAL_DMA_IRQHandler+0x1e6>
}
}
/* Transfer Error Interrupt management **************************************/
else if (( RESET != (flag_it & (DMA_FLAG_TE1 << hdma->ChannelIndex))) && (RESET != (source_it & DMA_IT_TE)))
8001f86: 687b ldr r3, [r7, #4]
8001f88: 6c1b ldr r3, [r3, #64] ; 0x40
8001f8a: 2208 movs r2, #8
8001f8c: 409a lsls r2, r3
8001f8e: 68fb ldr r3, [r7, #12]
8001f90: 4013 ands r3, r2
8001f92: 2b00 cmp r3, #0
8001f94: d028 beq.n 8001fe8 <HAL_DMA_IRQHandler+0x1e8>
8001f96: 68bb ldr r3, [r7, #8]
8001f98: f003 0308 and.w r3, r3, #8
8001f9c: 2b00 cmp r3, #0
8001f9e: d023 beq.n 8001fe8 <HAL_DMA_IRQHandler+0x1e8>
{
/* When a DMA transfer error occurs */
/* A hardware clear of its EN bits is performed */
/* Disable ALL DMA IT */
__HAL_DMA_DISABLE_IT(hdma, (DMA_IT_TC | DMA_IT_HT | DMA_IT_TE));
8001fa0: 687b ldr r3, [r7, #4]
8001fa2: 681b ldr r3, [r3, #0]
8001fa4: 681a ldr r2, [r3, #0]
8001fa6: 687b ldr r3, [r7, #4]
8001fa8: 681b ldr r3, [r3, #0]
8001faa: f022 020e bic.w r2, r2, #14
8001fae: 601a str r2, [r3, #0]
/* Clear all flags */
hdma->DmaBaseAddress->IFCR = (DMA_ISR_GIF1 << hdma->ChannelIndex);
8001fb0: 687b ldr r3, [r7, #4]
8001fb2: 6c1a ldr r2, [r3, #64] ; 0x40
8001fb4: 687b ldr r3, [r7, #4]
8001fb6: 6bdb ldr r3, [r3, #60] ; 0x3c
8001fb8: 2101 movs r1, #1
8001fba: fa01 f202 lsl.w r2, r1, r2
8001fbe: 605a str r2, [r3, #4]
/* Update error code */
hdma->ErrorCode = HAL_DMA_ERROR_TE;
8001fc0: 687b ldr r3, [r7, #4]
8001fc2: 2201 movs r2, #1
8001fc4: 639a str r2, [r3, #56] ; 0x38
/* Change the DMA state */
hdma->State = HAL_DMA_STATE_READY;
8001fc6: 687b ldr r3, [r7, #4]
8001fc8: 2201 movs r2, #1
8001fca: f883 2021 strb.w r2, [r3, #33] ; 0x21
/* Process Unlocked */
__HAL_UNLOCK(hdma);
8001fce: 687b ldr r3, [r7, #4]
8001fd0: 2200 movs r2, #0
8001fd2: f883 2020 strb.w r2, [r3, #32]
if (hdma->XferErrorCallback != NULL)
8001fd6: 687b ldr r3, [r7, #4]
8001fd8: 6b1b ldr r3, [r3, #48] ; 0x30
8001fda: 2b00 cmp r3, #0
8001fdc: d004 beq.n 8001fe8 <HAL_DMA_IRQHandler+0x1e8>
{
/* Transfer error callback */
hdma->XferErrorCallback(hdma);
8001fde: 687b ldr r3, [r7, #4]
8001fe0: 6b1b ldr r3, [r3, #48] ; 0x30
8001fe2: 6878 ldr r0, [r7, #4]
8001fe4: 4798 blx r3
}
}
return;
8001fe6: bf00 nop
8001fe8: bf00 nop
}
8001fea: 3710 adds r7, #16
8001fec: 46bd mov sp, r7
8001fee: bd80 pop {r7, pc}
8001ff0: 40020008 .word 0x40020008
8001ff4: 4002001c .word 0x4002001c
8001ff8: 40020030 .word 0x40020030
8001ffc: 40020044 .word 0x40020044
8002000: 40020058 .word 0x40020058
8002004: 4002006c .word 0x4002006c
8002008: 40020000 .word 0x40020000
0800200c <DMA_SetConfig>:
* @param DstAddress: The destination memory Buffer address
* @param DataLength: The length of data to be transferred from source to destination
* @retval HAL status
*/
static void DMA_SetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
{
800200c: b480 push {r7}
800200e: b085 sub sp, #20
8002010: af00 add r7, sp, #0
8002012: 60f8 str r0, [r7, #12]
8002014: 60b9 str r1, [r7, #8]
8002016: 607a str r2, [r7, #4]
8002018: 603b str r3, [r7, #0]
/* Clear all flags */
hdma->DmaBaseAddress->IFCR = (DMA_ISR_GIF1 << hdma->ChannelIndex);
800201a: 68fb ldr r3, [r7, #12]
800201c: 6c1a ldr r2, [r3, #64] ; 0x40
800201e: 68fb ldr r3, [r7, #12]
8002020: 6bdb ldr r3, [r3, #60] ; 0x3c
8002022: 2101 movs r1, #1
8002024: fa01 f202 lsl.w r2, r1, r2
8002028: 605a str r2, [r3, #4]
/* Configure DMA Channel data length */
hdma->Instance->CNDTR = DataLength;
800202a: 68fb ldr r3, [r7, #12]
800202c: 681b ldr r3, [r3, #0]
800202e: 683a ldr r2, [r7, #0]
8002030: 605a str r2, [r3, #4]
/* Memory to Peripheral */
if((hdma->Init.Direction) == DMA_MEMORY_TO_PERIPH)
8002032: 68fb ldr r3, [r7, #12]
8002034: 685b ldr r3, [r3, #4]
8002036: 2b10 cmp r3, #16
8002038: d108 bne.n 800204c <DMA_SetConfig+0x40>
{
/* Configure DMA Channel destination address */
hdma->Instance->CPAR = DstAddress;
800203a: 68fb ldr r3, [r7, #12]
800203c: 681b ldr r3, [r3, #0]
800203e: 687a ldr r2, [r7, #4]
8002040: 609a str r2, [r3, #8]
/* Configure DMA Channel source address */
hdma->Instance->CMAR = SrcAddress;
8002042: 68fb ldr r3, [r7, #12]
8002044: 681b ldr r3, [r3, #0]
8002046: 68ba ldr r2, [r7, #8]
8002048: 60da str r2, [r3, #12]
hdma->Instance->CPAR = SrcAddress;
/* Configure DMA Channel destination address */
hdma->Instance->CMAR = DstAddress;
}
}
800204a: e007 b.n 800205c <DMA_SetConfig+0x50>
hdma->Instance->CPAR = SrcAddress;
800204c: 68fb ldr r3, [r7, #12]
800204e: 681b ldr r3, [r3, #0]
8002050: 68ba ldr r2, [r7, #8]
8002052: 609a str r2, [r3, #8]
hdma->Instance->CMAR = DstAddress;
8002054: 68fb ldr r3, [r7, #12]
8002056: 681b ldr r3, [r3, #0]
8002058: 687a ldr r2, [r7, #4]
800205a: 60da str r2, [r3, #12]
}
800205c: bf00 nop
800205e: 3714 adds r7, #20
8002060: 46bd mov sp, r7
8002062: bc80 pop {r7}
8002064: 4770 bx lr
...
08002068 <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)
{
8002068: b480 push {r7}
800206a: b08b sub sp, #44 ; 0x2c
800206c: af00 add r7, sp, #0
800206e: 6078 str r0, [r7, #4]
8002070: 6039 str r1, [r7, #0]
uint32_t position = 0x00u;
8002072: 2300 movs r3, #0
8002074: 627b str r3, [r7, #36] ; 0x24
uint32_t ioposition;
uint32_t iocurrent;
uint32_t temp;
uint32_t config = 0x00u;
8002076: 2300 movs r3, #0
8002078: 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)
800207a: e169 b.n 8002350 <HAL_GPIO_Init+0x2e8>
{
/* Get the IO position */
ioposition = (0x01uL << position);
800207c: 2201 movs r2, #1
800207e: 6a7b ldr r3, [r7, #36] ; 0x24
8002080: fa02 f303 lsl.w r3, r2, r3
8002084: 61fb str r3, [r7, #28]
/* Get the current IO position */
iocurrent = (uint32_t)(GPIO_Init->Pin) & ioposition;
8002086: 683b ldr r3, [r7, #0]
8002088: 681b ldr r3, [r3, #0]
800208a: 69fa ldr r2, [r7, #28]
800208c: 4013 ands r3, r2
800208e: 61bb str r3, [r7, #24]
if (iocurrent == ioposition)
8002090: 69ba ldr r2, [r7, #24]
8002092: 69fb ldr r3, [r7, #28]
8002094: 429a cmp r2, r3
8002096: f040 8158 bne.w 800234a <HAL_GPIO_Init+0x2e2>
{
/* Check the Alternate function parameters */
assert_param(IS_GPIO_AF_INSTANCE(GPIOx));
/* Based on the required mode, filling config variable with MODEy[1:0] and CNFy[3:2] corresponding bits */
switch (GPIO_Init->Mode)
800209a: 683b ldr r3, [r7, #0]
800209c: 685b ldr r3, [r3, #4]
800209e: 4a9a ldr r2, [pc, #616] ; (8002308 <HAL_GPIO_Init+0x2a0>)
80020a0: 4293 cmp r3, r2
80020a2: d05e beq.n 8002162 <HAL_GPIO_Init+0xfa>
80020a4: 4a98 ldr r2, [pc, #608] ; (8002308 <HAL_GPIO_Init+0x2a0>)
80020a6: 4293 cmp r3, r2
80020a8: d875 bhi.n 8002196 <HAL_GPIO_Init+0x12e>
80020aa: 4a98 ldr r2, [pc, #608] ; (800230c <HAL_GPIO_Init+0x2a4>)
80020ac: 4293 cmp r3, r2
80020ae: d058 beq.n 8002162 <HAL_GPIO_Init+0xfa>
80020b0: 4a96 ldr r2, [pc, #600] ; (800230c <HAL_GPIO_Init+0x2a4>)
80020b2: 4293 cmp r3, r2
80020b4: d86f bhi.n 8002196 <HAL_GPIO_Init+0x12e>
80020b6: 4a96 ldr r2, [pc, #600] ; (8002310 <HAL_GPIO_Init+0x2a8>)
80020b8: 4293 cmp r3, r2
80020ba: d052 beq.n 8002162 <HAL_GPIO_Init+0xfa>
80020bc: 4a94 ldr r2, [pc, #592] ; (8002310 <HAL_GPIO_Init+0x2a8>)
80020be: 4293 cmp r3, r2
80020c0: d869 bhi.n 8002196 <HAL_GPIO_Init+0x12e>
80020c2: 4a94 ldr r2, [pc, #592] ; (8002314 <HAL_GPIO_Init+0x2ac>)
80020c4: 4293 cmp r3, r2
80020c6: d04c beq.n 8002162 <HAL_GPIO_Init+0xfa>
80020c8: 4a92 ldr r2, [pc, #584] ; (8002314 <HAL_GPIO_Init+0x2ac>)
80020ca: 4293 cmp r3, r2
80020cc: d863 bhi.n 8002196 <HAL_GPIO_Init+0x12e>
80020ce: 4a92 ldr r2, [pc, #584] ; (8002318 <HAL_GPIO_Init+0x2b0>)
80020d0: 4293 cmp r3, r2
80020d2: d046 beq.n 8002162 <HAL_GPIO_Init+0xfa>
80020d4: 4a90 ldr r2, [pc, #576] ; (8002318 <HAL_GPIO_Init+0x2b0>)
80020d6: 4293 cmp r3, r2
80020d8: d85d bhi.n 8002196 <HAL_GPIO_Init+0x12e>
80020da: 2b12 cmp r3, #18
80020dc: d82a bhi.n 8002134 <HAL_GPIO_Init+0xcc>
80020de: 2b12 cmp r3, #18
80020e0: d859 bhi.n 8002196 <HAL_GPIO_Init+0x12e>
80020e2: a201 add r2, pc, #4 ; (adr r2, 80020e8 <HAL_GPIO_Init+0x80>)
80020e4: f852 f023 ldr.w pc, [r2, r3, lsl #2]
80020e8: 08002163 .word 0x08002163
80020ec: 0800213d .word 0x0800213d
80020f0: 0800214f .word 0x0800214f
80020f4: 08002191 .word 0x08002191
80020f8: 08002197 .word 0x08002197
80020fc: 08002197 .word 0x08002197
8002100: 08002197 .word 0x08002197
8002104: 08002197 .word 0x08002197
8002108: 08002197 .word 0x08002197
800210c: 08002197 .word 0x08002197
8002110: 08002197 .word 0x08002197
8002114: 08002197 .word 0x08002197
8002118: 08002197 .word 0x08002197
800211c: 08002197 .word 0x08002197
8002120: 08002197 .word 0x08002197
8002124: 08002197 .word 0x08002197
8002128: 08002197 .word 0x08002197
800212c: 08002145 .word 0x08002145
8002130: 08002159 .word 0x08002159
8002134: 4a79 ldr r2, [pc, #484] ; (800231c <HAL_GPIO_Init+0x2b4>)
8002136: 4293 cmp r3, r2
8002138: d013 beq.n 8002162 <HAL_GPIO_Init+0xfa>
config = GPIO_CR_MODE_INPUT + GPIO_CR_CNF_ANALOG;
break;
/* Parameters are checked with assert_param */
default:
break;
800213a: e02c b.n 8002196 <HAL_GPIO_Init+0x12e>
config = GPIO_Init->Speed + GPIO_CR_CNF_GP_OUTPUT_PP;
800213c: 683b ldr r3, [r7, #0]
800213e: 68db ldr r3, [r3, #12]
8002140: 623b str r3, [r7, #32]
break;
8002142: e029 b.n 8002198 <HAL_GPIO_Init+0x130>
config = GPIO_Init->Speed + GPIO_CR_CNF_GP_OUTPUT_OD;
8002144: 683b ldr r3, [r7, #0]
8002146: 68db ldr r3, [r3, #12]
8002148: 3304 adds r3, #4
800214a: 623b str r3, [r7, #32]
break;
800214c: e024 b.n 8002198 <HAL_GPIO_Init+0x130>
config = GPIO_Init->Speed + GPIO_CR_CNF_AF_OUTPUT_PP;
800214e: 683b ldr r3, [r7, #0]
8002150: 68db ldr r3, [r3, #12]
8002152: 3308 adds r3, #8
8002154: 623b str r3, [r7, #32]
break;
8002156: e01f b.n 8002198 <HAL_GPIO_Init+0x130>
config = GPIO_Init->Speed + GPIO_CR_CNF_AF_OUTPUT_OD;
8002158: 683b ldr r3, [r7, #0]
800215a: 68db ldr r3, [r3, #12]
800215c: 330c adds r3, #12
800215e: 623b str r3, [r7, #32]
break;
8002160: e01a b.n 8002198 <HAL_GPIO_Init+0x130>
if (GPIO_Init->Pull == GPIO_NOPULL)
8002162: 683b ldr r3, [r7, #0]
8002164: 689b ldr r3, [r3, #8]
8002166: 2b00 cmp r3, #0
8002168: d102 bne.n 8002170 <HAL_GPIO_Init+0x108>
config = GPIO_CR_MODE_INPUT + GPIO_CR_CNF_INPUT_FLOATING;
800216a: 2304 movs r3, #4
800216c: 623b str r3, [r7, #32]
break;
800216e: e013 b.n 8002198 <HAL_GPIO_Init+0x130>
else if (GPIO_Init->Pull == GPIO_PULLUP)
8002170: 683b ldr r3, [r7, #0]
8002172: 689b ldr r3, [r3, #8]
8002174: 2b01 cmp r3, #1
8002176: d105 bne.n 8002184 <HAL_GPIO_Init+0x11c>
config = GPIO_CR_MODE_INPUT + GPIO_CR_CNF_INPUT_PU_PD;
8002178: 2308 movs r3, #8
800217a: 623b str r3, [r7, #32]
GPIOx->BSRR = ioposition;
800217c: 687b ldr r3, [r7, #4]
800217e: 69fa ldr r2, [r7, #28]
8002180: 611a str r2, [r3, #16]
break;
8002182: e009 b.n 8002198 <HAL_GPIO_Init+0x130>
config = GPIO_CR_MODE_INPUT + GPIO_CR_CNF_INPUT_PU_PD;
8002184: 2308 movs r3, #8
8002186: 623b str r3, [r7, #32]
GPIOx->BRR = ioposition;
8002188: 687b ldr r3, [r7, #4]
800218a: 69fa ldr r2, [r7, #28]
800218c: 615a str r2, [r3, #20]
break;
800218e: e003 b.n 8002198 <HAL_GPIO_Init+0x130>
config = GPIO_CR_MODE_INPUT + GPIO_CR_CNF_ANALOG;
8002190: 2300 movs r3, #0
8002192: 623b str r3, [r7, #32]
break;
8002194: e000 b.n 8002198 <HAL_GPIO_Init+0x130>
break;
8002196: 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;
8002198: 69bb ldr r3, [r7, #24]
800219a: 2bff cmp r3, #255 ; 0xff
800219c: d801 bhi.n 80021a2 <HAL_GPIO_Init+0x13a>
800219e: 687b ldr r3, [r7, #4]
80021a0: e001 b.n 80021a6 <HAL_GPIO_Init+0x13e>
80021a2: 687b ldr r3, [r7, #4]
80021a4: 3304 adds r3, #4
80021a6: 617b str r3, [r7, #20]
registeroffset = (iocurrent < GPIO_PIN_8) ? (position << 2u) : ((position - 8u) << 2u);
80021a8: 69bb ldr r3, [r7, #24]
80021aa: 2bff cmp r3, #255 ; 0xff
80021ac: d802 bhi.n 80021b4 <HAL_GPIO_Init+0x14c>
80021ae: 6a7b ldr r3, [r7, #36] ; 0x24
80021b0: 009b lsls r3, r3, #2
80021b2: e002 b.n 80021ba <HAL_GPIO_Init+0x152>
80021b4: 6a7b ldr r3, [r7, #36] ; 0x24
80021b6: 3b08 subs r3, #8
80021b8: 009b lsls r3, r3, #2
80021ba: 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));
80021bc: 697b ldr r3, [r7, #20]
80021be: 681a ldr r2, [r3, #0]
80021c0: 210f movs r1, #15
80021c2: 693b ldr r3, [r7, #16]
80021c4: fa01 f303 lsl.w r3, r1, r3
80021c8: 43db mvns r3, r3
80021ca: 401a ands r2, r3
80021cc: 6a39 ldr r1, [r7, #32]
80021ce: 693b ldr r3, [r7, #16]
80021d0: fa01 f303 lsl.w r3, r1, r3
80021d4: 431a orrs r2, r3
80021d6: 697b ldr r3, [r7, #20]
80021d8: 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)
80021da: 683b ldr r3, [r7, #0]
80021dc: 685b ldr r3, [r3, #4]
80021de: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
80021e2: 2b00 cmp r3, #0
80021e4: f000 80b1 beq.w 800234a <HAL_GPIO_Init+0x2e2>
{
/* Enable AFIO Clock */
__HAL_RCC_AFIO_CLK_ENABLE();
80021e8: 4b4d ldr r3, [pc, #308] ; (8002320 <HAL_GPIO_Init+0x2b8>)
80021ea: 699b ldr r3, [r3, #24]
80021ec: 4a4c ldr r2, [pc, #304] ; (8002320 <HAL_GPIO_Init+0x2b8>)
80021ee: f043 0301 orr.w r3, r3, #1
80021f2: 6193 str r3, [r2, #24]
80021f4: 4b4a ldr r3, [pc, #296] ; (8002320 <HAL_GPIO_Init+0x2b8>)
80021f6: 699b ldr r3, [r3, #24]
80021f8: f003 0301 and.w r3, r3, #1
80021fc: 60bb str r3, [r7, #8]
80021fe: 68bb ldr r3, [r7, #8]
temp = AFIO->EXTICR[position >> 2u];
8002200: 4a48 ldr r2, [pc, #288] ; (8002324 <HAL_GPIO_Init+0x2bc>)
8002202: 6a7b ldr r3, [r7, #36] ; 0x24
8002204: 089b lsrs r3, r3, #2
8002206: 3302 adds r3, #2
8002208: f852 3023 ldr.w r3, [r2, r3, lsl #2]
800220c: 60fb str r3, [r7, #12]
CLEAR_BIT(temp, (0x0Fu) << (4u * (position & 0x03u)));
800220e: 6a7b ldr r3, [r7, #36] ; 0x24
8002210: f003 0303 and.w r3, r3, #3
8002214: 009b lsls r3, r3, #2
8002216: 220f movs r2, #15
8002218: fa02 f303 lsl.w r3, r2, r3
800221c: 43db mvns r3, r3
800221e: 68fa ldr r2, [r7, #12]
8002220: 4013 ands r3, r2
8002222: 60fb str r3, [r7, #12]
SET_BIT(temp, (GPIO_GET_INDEX(GPIOx)) << (4u * (position & 0x03u)));
8002224: 687b ldr r3, [r7, #4]
8002226: 4a40 ldr r2, [pc, #256] ; (8002328 <HAL_GPIO_Init+0x2c0>)
8002228: 4293 cmp r3, r2
800222a: d013 beq.n 8002254 <HAL_GPIO_Init+0x1ec>
800222c: 687b ldr r3, [r7, #4]
800222e: 4a3f ldr r2, [pc, #252] ; (800232c <HAL_GPIO_Init+0x2c4>)
8002230: 4293 cmp r3, r2
8002232: d00d beq.n 8002250 <HAL_GPIO_Init+0x1e8>
8002234: 687b ldr r3, [r7, #4]
8002236: 4a3e ldr r2, [pc, #248] ; (8002330 <HAL_GPIO_Init+0x2c8>)
8002238: 4293 cmp r3, r2
800223a: d007 beq.n 800224c <HAL_GPIO_Init+0x1e4>
800223c: 687b ldr r3, [r7, #4]
800223e: 4a3d ldr r2, [pc, #244] ; (8002334 <HAL_GPIO_Init+0x2cc>)
8002240: 4293 cmp r3, r2
8002242: d101 bne.n 8002248 <HAL_GPIO_Init+0x1e0>
8002244: 2303 movs r3, #3
8002246: e006 b.n 8002256 <HAL_GPIO_Init+0x1ee>
8002248: 2304 movs r3, #4
800224a: e004 b.n 8002256 <HAL_GPIO_Init+0x1ee>
800224c: 2302 movs r3, #2
800224e: e002 b.n 8002256 <HAL_GPIO_Init+0x1ee>
8002250: 2301 movs r3, #1
8002252: e000 b.n 8002256 <HAL_GPIO_Init+0x1ee>
8002254: 2300 movs r3, #0
8002256: 6a7a ldr r2, [r7, #36] ; 0x24
8002258: f002 0203 and.w r2, r2, #3
800225c: 0092 lsls r2, r2, #2
800225e: 4093 lsls r3, r2
8002260: 68fa ldr r2, [r7, #12]
8002262: 4313 orrs r3, r2
8002264: 60fb str r3, [r7, #12]
AFIO->EXTICR[position >> 2u] = temp;
8002266: 492f ldr r1, [pc, #188] ; (8002324 <HAL_GPIO_Init+0x2bc>)
8002268: 6a7b ldr r3, [r7, #36] ; 0x24
800226a: 089b lsrs r3, r3, #2
800226c: 3302 adds r3, #2
800226e: 68fa ldr r2, [r7, #12]
8002270: f841 2023 str.w r2, [r1, r3, lsl #2]
/* Configure the interrupt mask */
if ((GPIO_Init->Mode & GPIO_MODE_IT) == GPIO_MODE_IT)
8002274: 683b ldr r3, [r7, #0]
8002276: 685b ldr r3, [r3, #4]
8002278: f403 3380 and.w r3, r3, #65536 ; 0x10000
800227c: 2b00 cmp r3, #0
800227e: d006 beq.n 800228e <HAL_GPIO_Init+0x226>
{
SET_BIT(EXTI->IMR, iocurrent);
8002280: 4b2d ldr r3, [pc, #180] ; (8002338 <HAL_GPIO_Init+0x2d0>)
8002282: 681a ldr r2, [r3, #0]
8002284: 492c ldr r1, [pc, #176] ; (8002338 <HAL_GPIO_Init+0x2d0>)
8002286: 69bb ldr r3, [r7, #24]
8002288: 4313 orrs r3, r2
800228a: 600b str r3, [r1, #0]
800228c: e006 b.n 800229c <HAL_GPIO_Init+0x234>
}
else
{
CLEAR_BIT(EXTI->IMR, iocurrent);
800228e: 4b2a ldr r3, [pc, #168] ; (8002338 <HAL_GPIO_Init+0x2d0>)
8002290: 681a ldr r2, [r3, #0]
8002292: 69bb ldr r3, [r7, #24]
8002294: 43db mvns r3, r3
8002296: 4928 ldr r1, [pc, #160] ; (8002338 <HAL_GPIO_Init+0x2d0>)
8002298: 4013 ands r3, r2
800229a: 600b str r3, [r1, #0]
}
/* Configure the event mask */
if ((GPIO_Init->Mode & GPIO_MODE_EVT) == GPIO_MODE_EVT)
800229c: 683b ldr r3, [r7, #0]
800229e: 685b ldr r3, [r3, #4]
80022a0: f403 3300 and.w r3, r3, #131072 ; 0x20000
80022a4: 2b00 cmp r3, #0
80022a6: d006 beq.n 80022b6 <HAL_GPIO_Init+0x24e>
{
SET_BIT(EXTI->EMR, iocurrent);
80022a8: 4b23 ldr r3, [pc, #140] ; (8002338 <HAL_GPIO_Init+0x2d0>)
80022aa: 685a ldr r2, [r3, #4]
80022ac: 4922 ldr r1, [pc, #136] ; (8002338 <HAL_GPIO_Init+0x2d0>)
80022ae: 69bb ldr r3, [r7, #24]
80022b0: 4313 orrs r3, r2
80022b2: 604b str r3, [r1, #4]
80022b4: e006 b.n 80022c4 <HAL_GPIO_Init+0x25c>
}
else
{
CLEAR_BIT(EXTI->EMR, iocurrent);
80022b6: 4b20 ldr r3, [pc, #128] ; (8002338 <HAL_GPIO_Init+0x2d0>)
80022b8: 685a ldr r2, [r3, #4]
80022ba: 69bb ldr r3, [r7, #24]
80022bc: 43db mvns r3, r3
80022be: 491e ldr r1, [pc, #120] ; (8002338 <HAL_GPIO_Init+0x2d0>)
80022c0: 4013 ands r3, r2
80022c2: 604b str r3, [r1, #4]
}
/* Enable or disable the rising trigger */
if ((GPIO_Init->Mode & RISING_EDGE) == RISING_EDGE)
80022c4: 683b ldr r3, [r7, #0]
80022c6: 685b ldr r3, [r3, #4]
80022c8: f403 1380 and.w r3, r3, #1048576 ; 0x100000
80022cc: 2b00 cmp r3, #0
80022ce: d006 beq.n 80022de <HAL_GPIO_Init+0x276>
{
SET_BIT(EXTI->RTSR, iocurrent);
80022d0: 4b19 ldr r3, [pc, #100] ; (8002338 <HAL_GPIO_Init+0x2d0>)
80022d2: 689a ldr r2, [r3, #8]
80022d4: 4918 ldr r1, [pc, #96] ; (8002338 <HAL_GPIO_Init+0x2d0>)
80022d6: 69bb ldr r3, [r7, #24]
80022d8: 4313 orrs r3, r2
80022da: 608b str r3, [r1, #8]
80022dc: e006 b.n 80022ec <HAL_GPIO_Init+0x284>
}
else
{
CLEAR_BIT(EXTI->RTSR, iocurrent);
80022de: 4b16 ldr r3, [pc, #88] ; (8002338 <HAL_GPIO_Init+0x2d0>)
80022e0: 689a ldr r2, [r3, #8]
80022e2: 69bb ldr r3, [r7, #24]
80022e4: 43db mvns r3, r3
80022e6: 4914 ldr r1, [pc, #80] ; (8002338 <HAL_GPIO_Init+0x2d0>)
80022e8: 4013 ands r3, r2
80022ea: 608b str r3, [r1, #8]
}
/* Enable or disable the falling trigger */
if ((GPIO_Init->Mode & FALLING_EDGE) == FALLING_EDGE)
80022ec: 683b ldr r3, [r7, #0]
80022ee: 685b ldr r3, [r3, #4]
80022f0: f403 1300 and.w r3, r3, #2097152 ; 0x200000
80022f4: 2b00 cmp r3, #0
80022f6: d021 beq.n 800233c <HAL_GPIO_Init+0x2d4>
{
SET_BIT(EXTI->FTSR, iocurrent);
80022f8: 4b0f ldr r3, [pc, #60] ; (8002338 <HAL_GPIO_Init+0x2d0>)
80022fa: 68da ldr r2, [r3, #12]
80022fc: 490e ldr r1, [pc, #56] ; (8002338 <HAL_GPIO_Init+0x2d0>)
80022fe: 69bb ldr r3, [r7, #24]
8002300: 4313 orrs r3, r2
8002302: 60cb str r3, [r1, #12]
8002304: e021 b.n 800234a <HAL_GPIO_Init+0x2e2>
8002306: bf00 nop
8002308: 10320000 .word 0x10320000
800230c: 10310000 .word 0x10310000
8002310: 10220000 .word 0x10220000
8002314: 10210000 .word 0x10210000
8002318: 10120000 .word 0x10120000
800231c: 10110000 .word 0x10110000
8002320: 40021000 .word 0x40021000
8002324: 40010000 .word 0x40010000
8002328: 40010800 .word 0x40010800
800232c: 40010c00 .word 0x40010c00
8002330: 40011000 .word 0x40011000
8002334: 40011400 .word 0x40011400
8002338: 40010400 .word 0x40010400
}
else
{
CLEAR_BIT(EXTI->FTSR, iocurrent);
800233c: 4b0b ldr r3, [pc, #44] ; (800236c <HAL_GPIO_Init+0x304>)
800233e: 68da ldr r2, [r3, #12]
8002340: 69bb ldr r3, [r7, #24]
8002342: 43db mvns r3, r3
8002344: 4909 ldr r1, [pc, #36] ; (800236c <HAL_GPIO_Init+0x304>)
8002346: 4013 ands r3, r2
8002348: 60cb str r3, [r1, #12]
}
}
}
position++;
800234a: 6a7b ldr r3, [r7, #36] ; 0x24
800234c: 3301 adds r3, #1
800234e: 627b str r3, [r7, #36] ; 0x24
while (((GPIO_Init->Pin) >> position) != 0x00u)
8002350: 683b ldr r3, [r7, #0]
8002352: 681a ldr r2, [r3, #0]
8002354: 6a7b ldr r3, [r7, #36] ; 0x24
8002356: fa22 f303 lsr.w r3, r2, r3
800235a: 2b00 cmp r3, #0
800235c: f47f ae8e bne.w 800207c <HAL_GPIO_Init+0x14>
}
}
8002360: bf00 nop
8002362: bf00 nop
8002364: 372c adds r7, #44 ; 0x2c
8002366: 46bd mov sp, r7
8002368: bc80 pop {r7}
800236a: 4770 bx lr
800236c: 40010400 .word 0x40010400
08002370 <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)
{
8002370: b480 push {r7}
8002372: b083 sub sp, #12
8002374: af00 add r7, sp, #0
8002376: 6078 str r0, [r7, #4]
8002378: 460b mov r3, r1
800237a: 807b strh r3, [r7, #2]
800237c: 4613 mov r3, r2
800237e: 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)
8002380: 787b ldrb r3, [r7, #1]
8002382: 2b00 cmp r3, #0
8002384: d003 beq.n 800238e <HAL_GPIO_WritePin+0x1e>
{
GPIOx->BSRR = GPIO_Pin;
8002386: 887a ldrh r2, [r7, #2]
8002388: 687b ldr r3, [r7, #4]
800238a: 611a str r2, [r3, #16]
}
else
{
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16u;
}
}
800238c: e003 b.n 8002396 <HAL_GPIO_WritePin+0x26>
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16u;
800238e: 887b ldrh r3, [r7, #2]
8002390: 041a lsls r2, r3, #16
8002392: 687b ldr r3, [r7, #4]
8002394: 611a str r2, [r3, #16]
}
8002396: bf00 nop
8002398: 370c adds r7, #12
800239a: 46bd mov sp, r7
800239c: bc80 pop {r7}
800239e: 4770 bx lr
080023a0 <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)
{
80023a0: b5f0 push {r4, r5, r6, r7, lr}
80023a2: b08b sub sp, #44 ; 0x2c
80023a4: af06 add r7, sp, #24
80023a6: 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)
80023a8: 687b ldr r3, [r7, #4]
80023aa: 2b00 cmp r3, #0
80023ac: d101 bne.n 80023b2 <HAL_PCD_Init+0x12>
{
return HAL_ERROR;
80023ae: 2301 movs r3, #1
80023b0: e0fd b.n 80025ae <HAL_PCD_Init+0x20e>
#if defined (USB_OTG_FS)
USBx = hpcd->Instance;
#endif /* defined (USB_OTG_FS) */
if (hpcd->State == HAL_PCD_STATE_RESET)
80023b2: 687b ldr r3, [r7, #4]
80023b4: f893 32a9 ldrb.w r3, [r3, #681] ; 0x2a9
80023b8: b2db uxtb r3, r3
80023ba: 2b00 cmp r3, #0
80023bc: d106 bne.n 80023cc <HAL_PCD_Init+0x2c>
{
/* Allocate lock resource and initialize it */
hpcd->Lock = HAL_UNLOCKED;
80023be: 687b ldr r3, [r7, #4]
80023c0: 2200 movs r2, #0
80023c2: 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);
80023c6: 6878 ldr r0, [r7, #4]
80023c8: f7ff f92a bl 8001620 <HAL_PCD_MspInit>
#endif /* (USE_HAL_PCD_REGISTER_CALLBACKS) */
}
hpcd->State = HAL_PCD_STATE_BUSY;
80023cc: 687b ldr r3, [r7, #4]
80023ce: 2203 movs r2, #3
80023d0: 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);
80023d4: 687b ldr r3, [r7, #4]
80023d6: 681b ldr r3, [r3, #0]
80023d8: 4618 mov r0, r3
80023da: f002 fd11 bl 8004e00 <USB_DisableGlobalInt>
/*Init the Core (common init.) */
if (USB_CoreInit(hpcd->Instance, hpcd->Init) != HAL_OK)
80023de: 687b ldr r3, [r7, #4]
80023e0: 681b ldr r3, [r3, #0]
80023e2: 603b str r3, [r7, #0]
80023e4: 687e ldr r6, [r7, #4]
80023e6: 466d mov r5, sp
80023e8: f106 0410 add.w r4, r6, #16
80023ec: cc0f ldmia r4!, {r0, r1, r2, r3}
80023ee: c50f stmia r5!, {r0, r1, r2, r3}
80023f0: 6823 ldr r3, [r4, #0]
80023f2: 602b str r3, [r5, #0]
80023f4: 1d33 adds r3, r6, #4
80023f6: cb0e ldmia r3, {r1, r2, r3}
80023f8: 6838 ldr r0, [r7, #0]
80023fa: f002 fcf1 bl 8004de0 <USB_CoreInit>
80023fe: 4603 mov r3, r0
8002400: 2b00 cmp r3, #0
8002402: d005 beq.n 8002410 <HAL_PCD_Init+0x70>
{
hpcd->State = HAL_PCD_STATE_ERROR;
8002404: 687b ldr r3, [r7, #4]
8002406: 2202 movs r2, #2
8002408: f883 22a9 strb.w r2, [r3, #681] ; 0x2a9
return HAL_ERROR;
800240c: 2301 movs r3, #1
800240e: e0ce b.n 80025ae <HAL_PCD_Init+0x20e>
}
/* Force Device Mode*/
(void)USB_SetCurrentMode(hpcd->Instance, USB_DEVICE_MODE);
8002410: 687b ldr r3, [r7, #4]
8002412: 681b ldr r3, [r3, #0]
8002414: 2100 movs r1, #0
8002416: 4618 mov r0, r3
8002418: f002 fd0c bl 8004e34 <USB_SetCurrentMode>
/* Init endpoints structures */
for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
800241c: 2300 movs r3, #0
800241e: 73fb strb r3, [r7, #15]
8002420: e04c b.n 80024bc <HAL_PCD_Init+0x11c>
{
/* Init ep structure */
hpcd->IN_ep[i].is_in = 1U;
8002422: 7bfb ldrb r3, [r7, #15]
8002424: 6879 ldr r1, [r7, #4]
8002426: 1c5a adds r2, r3, #1
8002428: 4613 mov r3, r2
800242a: 009b lsls r3, r3, #2
800242c: 4413 add r3, r2
800242e: 00db lsls r3, r3, #3
8002430: 440b add r3, r1
8002432: 3301 adds r3, #1
8002434: 2201 movs r2, #1
8002436: 701a strb r2, [r3, #0]
hpcd->IN_ep[i].num = i;
8002438: 7bfb ldrb r3, [r7, #15]
800243a: 6879 ldr r1, [r7, #4]
800243c: 1c5a adds r2, r3, #1
800243e: 4613 mov r3, r2
8002440: 009b lsls r3, r3, #2
8002442: 4413 add r3, r2
8002444: 00db lsls r3, r3, #3
8002446: 440b add r3, r1
8002448: 7bfa ldrb r2, [r7, #15]
800244a: 701a strb r2, [r3, #0]
hpcd->IN_ep[i].tx_fifo_num = i;
800244c: 7bfa ldrb r2, [r7, #15]
800244e: 7bfb ldrb r3, [r7, #15]
8002450: b298 uxth r0, r3
8002452: 6879 ldr r1, [r7, #4]
8002454: 4613 mov r3, r2
8002456: 009b lsls r3, r3, #2
8002458: 4413 add r3, r2
800245a: 00db lsls r3, r3, #3
800245c: 440b add r3, r1
800245e: 3336 adds r3, #54 ; 0x36
8002460: 4602 mov r2, r0
8002462: 801a strh r2, [r3, #0]
/* Control until ep is activated */
hpcd->IN_ep[i].type = EP_TYPE_CTRL;
8002464: 7bfb ldrb r3, [r7, #15]
8002466: 6879 ldr r1, [r7, #4]
8002468: 1c5a adds r2, r3, #1
800246a: 4613 mov r3, r2
800246c: 009b lsls r3, r3, #2
800246e: 4413 add r3, r2
8002470: 00db lsls r3, r3, #3
8002472: 440b add r3, r1
8002474: 3303 adds r3, #3
8002476: 2200 movs r2, #0
8002478: 701a strb r2, [r3, #0]
hpcd->IN_ep[i].maxpacket = 0U;
800247a: 7bfa ldrb r2, [r7, #15]
800247c: 6879 ldr r1, [r7, #4]
800247e: 4613 mov r3, r2
8002480: 009b lsls r3, r3, #2
8002482: 4413 add r3, r2
8002484: 00db lsls r3, r3, #3
8002486: 440b add r3, r1
8002488: 3338 adds r3, #56 ; 0x38
800248a: 2200 movs r2, #0
800248c: 601a str r2, [r3, #0]
hpcd->IN_ep[i].xfer_buff = 0U;
800248e: 7bfa ldrb r2, [r7, #15]
8002490: 6879 ldr r1, [r7, #4]
8002492: 4613 mov r3, r2
8002494: 009b lsls r3, r3, #2
8002496: 4413 add r3, r2
8002498: 00db lsls r3, r3, #3
800249a: 440b add r3, r1
800249c: 333c adds r3, #60 ; 0x3c
800249e: 2200 movs r2, #0
80024a0: 601a str r2, [r3, #0]
hpcd->IN_ep[i].xfer_len = 0U;
80024a2: 7bfa ldrb r2, [r7, #15]
80024a4: 6879 ldr r1, [r7, #4]
80024a6: 4613 mov r3, r2
80024a8: 009b lsls r3, r3, #2
80024aa: 4413 add r3, r2
80024ac: 00db lsls r3, r3, #3
80024ae: 440b add r3, r1
80024b0: 3340 adds r3, #64 ; 0x40
80024b2: 2200 movs r2, #0
80024b4: 601a str r2, [r3, #0]
for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
80024b6: 7bfb ldrb r3, [r7, #15]
80024b8: 3301 adds r3, #1
80024ba: 73fb strb r3, [r7, #15]
80024bc: 7bfa ldrb r2, [r7, #15]
80024be: 687b ldr r3, [r7, #4]
80024c0: 685b ldr r3, [r3, #4]
80024c2: 429a cmp r2, r3
80024c4: d3ad bcc.n 8002422 <HAL_PCD_Init+0x82>
}
for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
80024c6: 2300 movs r3, #0
80024c8: 73fb strb r3, [r7, #15]
80024ca: e044 b.n 8002556 <HAL_PCD_Init+0x1b6>
{
hpcd->OUT_ep[i].is_in = 0U;
80024cc: 7bfa ldrb r2, [r7, #15]
80024ce: 6879 ldr r1, [r7, #4]
80024d0: 4613 mov r3, r2
80024d2: 009b lsls r3, r3, #2
80024d4: 4413 add r3, r2
80024d6: 00db lsls r3, r3, #3
80024d8: 440b add r3, r1
80024da: f203 1369 addw r3, r3, #361 ; 0x169
80024de: 2200 movs r2, #0
80024e0: 701a strb r2, [r3, #0]
hpcd->OUT_ep[i].num = i;
80024e2: 7bfa ldrb r2, [r7, #15]
80024e4: 6879 ldr r1, [r7, #4]
80024e6: 4613 mov r3, r2
80024e8: 009b lsls r3, r3, #2
80024ea: 4413 add r3, r2
80024ec: 00db lsls r3, r3, #3
80024ee: 440b add r3, r1
80024f0: f503 73b4 add.w r3, r3, #360 ; 0x168
80024f4: 7bfa ldrb r2, [r7, #15]
80024f6: 701a strb r2, [r3, #0]
/* Control until ep is activated */
hpcd->OUT_ep[i].type = EP_TYPE_CTRL;
80024f8: 7bfa ldrb r2, [r7, #15]
80024fa: 6879 ldr r1, [r7, #4]
80024fc: 4613 mov r3, r2
80024fe: 009b lsls r3, r3, #2
8002500: 4413 add r3, r2
8002502: 00db lsls r3, r3, #3
8002504: 440b add r3, r1
8002506: f203 136b addw r3, r3, #363 ; 0x16b
800250a: 2200 movs r2, #0
800250c: 701a strb r2, [r3, #0]
hpcd->OUT_ep[i].maxpacket = 0U;
800250e: 7bfa ldrb r2, [r7, #15]
8002510: 6879 ldr r1, [r7, #4]
8002512: 4613 mov r3, r2
8002514: 009b lsls r3, r3, #2
8002516: 4413 add r3, r2
8002518: 00db lsls r3, r3, #3
800251a: 440b add r3, r1
800251c: f503 73bc add.w r3, r3, #376 ; 0x178
8002520: 2200 movs r2, #0
8002522: 601a str r2, [r3, #0]
hpcd->OUT_ep[i].xfer_buff = 0U;
8002524: 7bfa ldrb r2, [r7, #15]
8002526: 6879 ldr r1, [r7, #4]
8002528: 4613 mov r3, r2
800252a: 009b lsls r3, r3, #2
800252c: 4413 add r3, r2
800252e: 00db lsls r3, r3, #3
8002530: 440b add r3, r1
8002532: f503 73be add.w r3, r3, #380 ; 0x17c
8002536: 2200 movs r2, #0
8002538: 601a str r2, [r3, #0]
hpcd->OUT_ep[i].xfer_len = 0U;
800253a: 7bfa ldrb r2, [r7, #15]
800253c: 6879 ldr r1, [r7, #4]
800253e: 4613 mov r3, r2
8002540: 009b lsls r3, r3, #2
8002542: 4413 add r3, r2
8002544: 00db lsls r3, r3, #3
8002546: 440b add r3, r1
8002548: f503 73c0 add.w r3, r3, #384 ; 0x180
800254c: 2200 movs r2, #0
800254e: 601a str r2, [r3, #0]
for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
8002550: 7bfb ldrb r3, [r7, #15]
8002552: 3301 adds r3, #1
8002554: 73fb strb r3, [r7, #15]
8002556: 7bfa ldrb r2, [r7, #15]
8002558: 687b ldr r3, [r7, #4]
800255a: 685b ldr r3, [r3, #4]
800255c: 429a cmp r2, r3
800255e: d3b5 bcc.n 80024cc <HAL_PCD_Init+0x12c>
}
/* Init Device */
if (USB_DevInit(hpcd->Instance, hpcd->Init) != HAL_OK)
8002560: 687b ldr r3, [r7, #4]
8002562: 681b ldr r3, [r3, #0]
8002564: 603b str r3, [r7, #0]
8002566: 687e ldr r6, [r7, #4]
8002568: 466d mov r5, sp
800256a: f106 0410 add.w r4, r6, #16
800256e: cc0f ldmia r4!, {r0, r1, r2, r3}
8002570: c50f stmia r5!, {r0, r1, r2, r3}
8002572: 6823 ldr r3, [r4, #0]
8002574: 602b str r3, [r5, #0]
8002576: 1d33 adds r3, r6, #4
8002578: cb0e ldmia r3, {r1, r2, r3}
800257a: 6838 ldr r0, [r7, #0]
800257c: f002 fc66 bl 8004e4c <USB_DevInit>
8002580: 4603 mov r3, r0
8002582: 2b00 cmp r3, #0
8002584: d005 beq.n 8002592 <HAL_PCD_Init+0x1f2>
{
hpcd->State = HAL_PCD_STATE_ERROR;
8002586: 687b ldr r3, [r7, #4]
8002588: 2202 movs r2, #2
800258a: f883 22a9 strb.w r2, [r3, #681] ; 0x2a9
return HAL_ERROR;
800258e: 2301 movs r3, #1
8002590: e00d b.n 80025ae <HAL_PCD_Init+0x20e>
}
hpcd->USB_Address = 0U;
8002592: 687b ldr r3, [r7, #4]
8002594: 2200 movs r2, #0
8002596: f883 2024 strb.w r2, [r3, #36] ; 0x24
hpcd->State = HAL_PCD_STATE_READY;
800259a: 687b ldr r3, [r7, #4]
800259c: 2201 movs r2, #1
800259e: f883 22a9 strb.w r2, [r3, #681] ; 0x2a9
(void)USB_DevDisconnect(hpcd->Instance);
80025a2: 687b ldr r3, [r7, #4]
80025a4: 681b ldr r3, [r3, #0]
80025a6: 4618 mov r0, r3
80025a8: f002 fc70 bl 8004e8c <USB_DevDisconnect>
return HAL_OK;
80025ac: 2300 movs r3, #0
}
80025ae: 4618 mov r0, r3
80025b0: 3714 adds r7, #20
80025b2: 46bd mov sp, r7
80025b4: bdf0 pop {r4, r5, r6, r7, pc}
...
080025b8 <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)
{
80025b8: b580 push {r7, lr}
80025ba: b086 sub sp, #24
80025bc: af00 add r7, sp, #0
80025be: 6078 str r0, [r7, #4]
uint32_t tickstart;
uint32_t pll_config;
/* Check Null pointer */
if (RCC_OscInitStruct == NULL)
80025c0: 687b ldr r3, [r7, #4]
80025c2: 2b00 cmp r3, #0
80025c4: d101 bne.n 80025ca <HAL_RCC_OscConfig+0x12>
{
return HAL_ERROR;
80025c6: 2301 movs r3, #1
80025c8: e272 b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
/* Check the parameters */
assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType));
/*------------------------------- HSE Configuration ------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE)
80025ca: 687b ldr r3, [r7, #4]
80025cc: 681b ldr r3, [r3, #0]
80025ce: f003 0301 and.w r3, r3, #1
80025d2: 2b00 cmp r3, #0
80025d4: f000 8087 beq.w 80026e6 <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)
80025d8: 4b92 ldr r3, [pc, #584] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
80025da: 685b ldr r3, [r3, #4]
80025dc: f003 030c and.w r3, r3, #12
80025e0: 2b04 cmp r3, #4
80025e2: d00c beq.n 80025fe <HAL_RCC_OscConfig+0x46>
|| ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (__HAL_RCC_GET_PLL_OSCSOURCE() == RCC_PLLSOURCE_HSE)))
80025e4: 4b8f ldr r3, [pc, #572] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
80025e6: 685b ldr r3, [r3, #4]
80025e8: f003 030c and.w r3, r3, #12
80025ec: 2b08 cmp r3, #8
80025ee: d112 bne.n 8002616 <HAL_RCC_OscConfig+0x5e>
80025f0: 4b8c ldr r3, [pc, #560] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
80025f2: 685b ldr r3, [r3, #4]
80025f4: f403 3380 and.w r3, r3, #65536 ; 0x10000
80025f8: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
80025fc: d10b bne.n 8002616 <HAL_RCC_OscConfig+0x5e>
{
if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
80025fe: 4b89 ldr r3, [pc, #548] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
8002600: 681b ldr r3, [r3, #0]
8002602: f403 3300 and.w r3, r3, #131072 ; 0x20000
8002606: 2b00 cmp r3, #0
8002608: d06c beq.n 80026e4 <HAL_RCC_OscConfig+0x12c>
800260a: 687b ldr r3, [r7, #4]
800260c: 685b ldr r3, [r3, #4]
800260e: 2b00 cmp r3, #0
8002610: d168 bne.n 80026e4 <HAL_RCC_OscConfig+0x12c>
{
return HAL_ERROR;
8002612: 2301 movs r3, #1
8002614: e24c b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
}
}
else
{
/* Set the new HSE configuration ---------------------------------------*/
__HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
8002616: 687b ldr r3, [r7, #4]
8002618: 685b ldr r3, [r3, #4]
800261a: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800261e: d106 bne.n 800262e <HAL_RCC_OscConfig+0x76>
8002620: 4b80 ldr r3, [pc, #512] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
8002622: 681b ldr r3, [r3, #0]
8002624: 4a7f ldr r2, [pc, #508] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
8002626: f443 3380 orr.w r3, r3, #65536 ; 0x10000
800262a: 6013 str r3, [r2, #0]
800262c: e02e b.n 800268c <HAL_RCC_OscConfig+0xd4>
800262e: 687b ldr r3, [r7, #4]
8002630: 685b ldr r3, [r3, #4]
8002632: 2b00 cmp r3, #0
8002634: d10c bne.n 8002650 <HAL_RCC_OscConfig+0x98>
8002636: 4b7b ldr r3, [pc, #492] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
8002638: 681b ldr r3, [r3, #0]
800263a: 4a7a ldr r2, [pc, #488] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
800263c: f423 3380 bic.w r3, r3, #65536 ; 0x10000
8002640: 6013 str r3, [r2, #0]
8002642: 4b78 ldr r3, [pc, #480] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
8002644: 681b ldr r3, [r3, #0]
8002646: 4a77 ldr r2, [pc, #476] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
8002648: f423 2380 bic.w r3, r3, #262144 ; 0x40000
800264c: 6013 str r3, [r2, #0]
800264e: e01d b.n 800268c <HAL_RCC_OscConfig+0xd4>
8002650: 687b ldr r3, [r7, #4]
8002652: 685b ldr r3, [r3, #4]
8002654: f5b3 2fa0 cmp.w r3, #327680 ; 0x50000
8002658: d10c bne.n 8002674 <HAL_RCC_OscConfig+0xbc>
800265a: 4b72 ldr r3, [pc, #456] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
800265c: 681b ldr r3, [r3, #0]
800265e: 4a71 ldr r2, [pc, #452] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
8002660: f443 2380 orr.w r3, r3, #262144 ; 0x40000
8002664: 6013 str r3, [r2, #0]
8002666: 4b6f ldr r3, [pc, #444] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
8002668: 681b ldr r3, [r3, #0]
800266a: 4a6e ldr r2, [pc, #440] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
800266c: f443 3380 orr.w r3, r3, #65536 ; 0x10000
8002670: 6013 str r3, [r2, #0]
8002672: e00b b.n 800268c <HAL_RCC_OscConfig+0xd4>
8002674: 4b6b ldr r3, [pc, #428] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
8002676: 681b ldr r3, [r3, #0]
8002678: 4a6a ldr r2, [pc, #424] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
800267a: f423 3380 bic.w r3, r3, #65536 ; 0x10000
800267e: 6013 str r3, [r2, #0]
8002680: 4b68 ldr r3, [pc, #416] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
8002682: 681b ldr r3, [r3, #0]
8002684: 4a67 ldr r2, [pc, #412] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
8002686: f423 2380 bic.w r3, r3, #262144 ; 0x40000
800268a: 6013 str r3, [r2, #0]
/* Check the HSE State */
if (RCC_OscInitStruct->HSEState != RCC_HSE_OFF)
800268c: 687b ldr r3, [r7, #4]
800268e: 685b ldr r3, [r3, #4]
8002690: 2b00 cmp r3, #0
8002692: d013 beq.n 80026bc <HAL_RCC_OscConfig+0x104>
{
/* Get Start Tick */
tickstart = HAL_GetTick();
8002694: f7ff f90e bl 80018b4 <HAL_GetTick>
8002698: 6138 str r0, [r7, #16]
/* Wait till HSE is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
800269a: e008 b.n 80026ae <HAL_RCC_OscConfig+0xf6>
{
if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
800269c: f7ff f90a bl 80018b4 <HAL_GetTick>
80026a0: 4602 mov r2, r0
80026a2: 693b ldr r3, [r7, #16]
80026a4: 1ad3 subs r3, r2, r3
80026a6: 2b64 cmp r3, #100 ; 0x64
80026a8: d901 bls.n 80026ae <HAL_RCC_OscConfig+0xf6>
{
return HAL_TIMEOUT;
80026aa: 2303 movs r3, #3
80026ac: e200 b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
80026ae: 4b5d ldr r3, [pc, #372] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
80026b0: 681b ldr r3, [r3, #0]
80026b2: f403 3300 and.w r3, r3, #131072 ; 0x20000
80026b6: 2b00 cmp r3, #0
80026b8: d0f0 beq.n 800269c <HAL_RCC_OscConfig+0xe4>
80026ba: e014 b.n 80026e6 <HAL_RCC_OscConfig+0x12e>
}
}
else
{
/* Get Start Tick */
tickstart = HAL_GetTick();
80026bc: f7ff f8fa bl 80018b4 <HAL_GetTick>
80026c0: 6138 str r0, [r7, #16]
/* Wait till HSE is disabled */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
80026c2: e008 b.n 80026d6 <HAL_RCC_OscConfig+0x11e>
{
if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
80026c4: f7ff f8f6 bl 80018b4 <HAL_GetTick>
80026c8: 4602 mov r2, r0
80026ca: 693b ldr r3, [r7, #16]
80026cc: 1ad3 subs r3, r2, r3
80026ce: 2b64 cmp r3, #100 ; 0x64
80026d0: d901 bls.n 80026d6 <HAL_RCC_OscConfig+0x11e>
{
return HAL_TIMEOUT;
80026d2: 2303 movs r3, #3
80026d4: e1ec b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
80026d6: 4b53 ldr r3, [pc, #332] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
80026d8: 681b ldr r3, [r3, #0]
80026da: f403 3300 and.w r3, r3, #131072 ; 0x20000
80026de: 2b00 cmp r3, #0
80026e0: d1f0 bne.n 80026c4 <HAL_RCC_OscConfig+0x10c>
80026e2: e000 b.n 80026e6 <HAL_RCC_OscConfig+0x12e>
if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
80026e4: bf00 nop
}
}
}
}
/*----------------------------- HSI Configuration --------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
80026e6: 687b ldr r3, [r7, #4]
80026e8: 681b ldr r3, [r3, #0]
80026ea: f003 0302 and.w r3, r3, #2
80026ee: 2b00 cmp r3, #0
80026f0: d063 beq.n 80027ba <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)
80026f2: 4b4c ldr r3, [pc, #304] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
80026f4: 685b ldr r3, [r3, #4]
80026f6: f003 030c and.w r3, r3, #12
80026fa: 2b00 cmp r3, #0
80026fc: d00b beq.n 8002716 <HAL_RCC_OscConfig+0x15e>
|| ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (__HAL_RCC_GET_PLL_OSCSOURCE() == RCC_PLLSOURCE_HSI_DIV2)))
80026fe: 4b49 ldr r3, [pc, #292] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
8002700: 685b ldr r3, [r3, #4]
8002702: f003 030c and.w r3, r3, #12
8002706: 2b08 cmp r3, #8
8002708: d11c bne.n 8002744 <HAL_RCC_OscConfig+0x18c>
800270a: 4b46 ldr r3, [pc, #280] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
800270c: 685b ldr r3, [r3, #4]
800270e: f403 3380 and.w r3, r3, #65536 ; 0x10000
8002712: 2b00 cmp r3, #0
8002714: d116 bne.n 8002744 <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))
8002716: 4b43 ldr r3, [pc, #268] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
8002718: 681b ldr r3, [r3, #0]
800271a: f003 0302 and.w r3, r3, #2
800271e: 2b00 cmp r3, #0
8002720: d005 beq.n 800272e <HAL_RCC_OscConfig+0x176>
8002722: 687b ldr r3, [r7, #4]
8002724: 691b ldr r3, [r3, #16]
8002726: 2b01 cmp r3, #1
8002728: d001 beq.n 800272e <HAL_RCC_OscConfig+0x176>
{
return HAL_ERROR;
800272a: 2301 movs r3, #1
800272c: e1c0 b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
}
/* Otherwise, just the calibration is allowed */
else
{
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
800272e: 4b3d ldr r3, [pc, #244] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
8002730: 681b ldr r3, [r3, #0]
8002732: f023 02f8 bic.w r2, r3, #248 ; 0xf8
8002736: 687b ldr r3, [r7, #4]
8002738: 695b ldr r3, [r3, #20]
800273a: 00db lsls r3, r3, #3
800273c: 4939 ldr r1, [pc, #228] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
800273e: 4313 orrs r3, r2
8002740: 600b str r3, [r1, #0]
if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
8002742: e03a b.n 80027ba <HAL_RCC_OscConfig+0x202>
}
}
else
{
/* Check the HSI State */
if (RCC_OscInitStruct->HSIState != RCC_HSI_OFF)
8002744: 687b ldr r3, [r7, #4]
8002746: 691b ldr r3, [r3, #16]
8002748: 2b00 cmp r3, #0
800274a: d020 beq.n 800278e <HAL_RCC_OscConfig+0x1d6>
{
/* Enable the Internal High Speed oscillator (HSI). */
__HAL_RCC_HSI_ENABLE();
800274c: 4b36 ldr r3, [pc, #216] ; (8002828 <HAL_RCC_OscConfig+0x270>)
800274e: 2201 movs r2, #1
8002750: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8002752: f7ff f8af bl 80018b4 <HAL_GetTick>
8002756: 6138 str r0, [r7, #16]
/* Wait till HSI is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
8002758: e008 b.n 800276c <HAL_RCC_OscConfig+0x1b4>
{
if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
800275a: f7ff f8ab bl 80018b4 <HAL_GetTick>
800275e: 4602 mov r2, r0
8002760: 693b ldr r3, [r7, #16]
8002762: 1ad3 subs r3, r2, r3
8002764: 2b02 cmp r3, #2
8002766: d901 bls.n 800276c <HAL_RCC_OscConfig+0x1b4>
{
return HAL_TIMEOUT;
8002768: 2303 movs r3, #3
800276a: e1a1 b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
800276c: 4b2d ldr r3, [pc, #180] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
800276e: 681b ldr r3, [r3, #0]
8002770: f003 0302 and.w r3, r3, #2
8002774: 2b00 cmp r3, #0
8002776: d0f0 beq.n 800275a <HAL_RCC_OscConfig+0x1a2>
}
}
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
8002778: 4b2a ldr r3, [pc, #168] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
800277a: 681b ldr r3, [r3, #0]
800277c: f023 02f8 bic.w r2, r3, #248 ; 0xf8
8002780: 687b ldr r3, [r7, #4]
8002782: 695b ldr r3, [r3, #20]
8002784: 00db lsls r3, r3, #3
8002786: 4927 ldr r1, [pc, #156] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
8002788: 4313 orrs r3, r2
800278a: 600b str r3, [r1, #0]
800278c: e015 b.n 80027ba <HAL_RCC_OscConfig+0x202>
}
else
{
/* Disable the Internal High Speed oscillator (HSI). */
__HAL_RCC_HSI_DISABLE();
800278e: 4b26 ldr r3, [pc, #152] ; (8002828 <HAL_RCC_OscConfig+0x270>)
8002790: 2200 movs r2, #0
8002792: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8002794: f7ff f88e bl 80018b4 <HAL_GetTick>
8002798: 6138 str r0, [r7, #16]
/* Wait till HSI is disabled */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
800279a: e008 b.n 80027ae <HAL_RCC_OscConfig+0x1f6>
{
if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
800279c: f7ff f88a bl 80018b4 <HAL_GetTick>
80027a0: 4602 mov r2, r0
80027a2: 693b ldr r3, [r7, #16]
80027a4: 1ad3 subs r3, r2, r3
80027a6: 2b02 cmp r3, #2
80027a8: d901 bls.n 80027ae <HAL_RCC_OscConfig+0x1f6>
{
return HAL_TIMEOUT;
80027aa: 2303 movs r3, #3
80027ac: e180 b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
80027ae: 4b1d ldr r3, [pc, #116] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
80027b0: 681b ldr r3, [r3, #0]
80027b2: f003 0302 and.w r3, r3, #2
80027b6: 2b00 cmp r3, #0
80027b8: d1f0 bne.n 800279c <HAL_RCC_OscConfig+0x1e4>
}
}
}
}
/*------------------------------ LSI Configuration -------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
80027ba: 687b ldr r3, [r7, #4]
80027bc: 681b ldr r3, [r3, #0]
80027be: f003 0308 and.w r3, r3, #8
80027c2: 2b00 cmp r3, #0
80027c4: d03a beq.n 800283c <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)
80027c6: 687b ldr r3, [r7, #4]
80027c8: 699b ldr r3, [r3, #24]
80027ca: 2b00 cmp r3, #0
80027cc: d019 beq.n 8002802 <HAL_RCC_OscConfig+0x24a>
{
/* Enable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_ENABLE();
80027ce: 4b17 ldr r3, [pc, #92] ; (800282c <HAL_RCC_OscConfig+0x274>)
80027d0: 2201 movs r2, #1
80027d2: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
80027d4: f7ff f86e bl 80018b4 <HAL_GetTick>
80027d8: 6138 str r0, [r7, #16]
/* Wait till LSI is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
80027da: e008 b.n 80027ee <HAL_RCC_OscConfig+0x236>
{
if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
80027dc: f7ff f86a bl 80018b4 <HAL_GetTick>
80027e0: 4602 mov r2, r0
80027e2: 693b ldr r3, [r7, #16]
80027e4: 1ad3 subs r3, r2, r3
80027e6: 2b02 cmp r3, #2
80027e8: d901 bls.n 80027ee <HAL_RCC_OscConfig+0x236>
{
return HAL_TIMEOUT;
80027ea: 2303 movs r3, #3
80027ec: e160 b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
80027ee: 4b0d ldr r3, [pc, #52] ; (8002824 <HAL_RCC_OscConfig+0x26c>)
80027f0: 6a5b ldr r3, [r3, #36] ; 0x24
80027f2: f003 0302 and.w r3, r3, #2
80027f6: 2b00 cmp r3, #0
80027f8: d0f0 beq.n 80027dc <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);
80027fa: 2001 movs r0, #1
80027fc: f000 fad8 bl 8002db0 <RCC_Delay>
8002800: e01c b.n 800283c <HAL_RCC_OscConfig+0x284>
}
else
{
/* Disable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_DISABLE();
8002802: 4b0a ldr r3, [pc, #40] ; (800282c <HAL_RCC_OscConfig+0x274>)
8002804: 2200 movs r2, #0
8002806: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8002808: f7ff f854 bl 80018b4 <HAL_GetTick>
800280c: 6138 str r0, [r7, #16]
/* Wait till LSI is disabled */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
800280e: e00f b.n 8002830 <HAL_RCC_OscConfig+0x278>
{
if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
8002810: f7ff f850 bl 80018b4 <HAL_GetTick>
8002814: 4602 mov r2, r0
8002816: 693b ldr r3, [r7, #16]
8002818: 1ad3 subs r3, r2, r3
800281a: 2b02 cmp r3, #2
800281c: d908 bls.n 8002830 <HAL_RCC_OscConfig+0x278>
{
return HAL_TIMEOUT;
800281e: 2303 movs r3, #3
8002820: e146 b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
8002822: bf00 nop
8002824: 40021000 .word 0x40021000
8002828: 42420000 .word 0x42420000
800282c: 42420480 .word 0x42420480
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
8002830: 4b92 ldr r3, [pc, #584] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
8002832: 6a5b ldr r3, [r3, #36] ; 0x24
8002834: f003 0302 and.w r3, r3, #2
8002838: 2b00 cmp r3, #0
800283a: d1e9 bne.n 8002810 <HAL_RCC_OscConfig+0x258>
}
}
}
}
/*------------------------------ LSE Configuration -------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
800283c: 687b ldr r3, [r7, #4]
800283e: 681b ldr r3, [r3, #0]
8002840: f003 0304 and.w r3, r3, #4
8002844: 2b00 cmp r3, #0
8002846: f000 80a6 beq.w 8002996 <HAL_RCC_OscConfig+0x3de>
{
FlagStatus pwrclkchanged = RESET;
800284a: 2300 movs r3, #0
800284c: 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())
800284e: 4b8b ldr r3, [pc, #556] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
8002850: 69db ldr r3, [r3, #28]
8002852: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8002856: 2b00 cmp r3, #0
8002858: d10d bne.n 8002876 <HAL_RCC_OscConfig+0x2be>
{
__HAL_RCC_PWR_CLK_ENABLE();
800285a: 4b88 ldr r3, [pc, #544] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
800285c: 69db ldr r3, [r3, #28]
800285e: 4a87 ldr r2, [pc, #540] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
8002860: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8002864: 61d3 str r3, [r2, #28]
8002866: 4b85 ldr r3, [pc, #532] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
8002868: 69db ldr r3, [r3, #28]
800286a: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
800286e: 60bb str r3, [r7, #8]
8002870: 68bb ldr r3, [r7, #8]
pwrclkchanged = SET;
8002872: 2301 movs r3, #1
8002874: 75fb strb r3, [r7, #23]
}
if (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
8002876: 4b82 ldr r3, [pc, #520] ; (8002a80 <HAL_RCC_OscConfig+0x4c8>)
8002878: 681b ldr r3, [r3, #0]
800287a: f403 7380 and.w r3, r3, #256 ; 0x100
800287e: 2b00 cmp r3, #0
8002880: d118 bne.n 80028b4 <HAL_RCC_OscConfig+0x2fc>
{
/* Enable write access to Backup domain */
SET_BIT(PWR->CR, PWR_CR_DBP);
8002882: 4b7f ldr r3, [pc, #508] ; (8002a80 <HAL_RCC_OscConfig+0x4c8>)
8002884: 681b ldr r3, [r3, #0]
8002886: 4a7e ldr r2, [pc, #504] ; (8002a80 <HAL_RCC_OscConfig+0x4c8>)
8002888: f443 7380 orr.w r3, r3, #256 ; 0x100
800288c: 6013 str r3, [r2, #0]
/* Wait for Backup domain Write protection disable */
tickstart = HAL_GetTick();
800288e: f7ff f811 bl 80018b4 <HAL_GetTick>
8002892: 6138 str r0, [r7, #16]
while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
8002894: e008 b.n 80028a8 <HAL_RCC_OscConfig+0x2f0>
{
if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
8002896: f7ff f80d bl 80018b4 <HAL_GetTick>
800289a: 4602 mov r2, r0
800289c: 693b ldr r3, [r7, #16]
800289e: 1ad3 subs r3, r2, r3
80028a0: 2b64 cmp r3, #100 ; 0x64
80028a2: d901 bls.n 80028a8 <HAL_RCC_OscConfig+0x2f0>
{
return HAL_TIMEOUT;
80028a4: 2303 movs r3, #3
80028a6: e103 b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
80028a8: 4b75 ldr r3, [pc, #468] ; (8002a80 <HAL_RCC_OscConfig+0x4c8>)
80028aa: 681b ldr r3, [r3, #0]
80028ac: f403 7380 and.w r3, r3, #256 ; 0x100
80028b0: 2b00 cmp r3, #0
80028b2: d0f0 beq.n 8002896 <HAL_RCC_OscConfig+0x2de>
}
}
}
/* Set the new LSE configuration -----------------------------------------*/
__HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
80028b4: 687b ldr r3, [r7, #4]
80028b6: 68db ldr r3, [r3, #12]
80028b8: 2b01 cmp r3, #1
80028ba: d106 bne.n 80028ca <HAL_RCC_OscConfig+0x312>
80028bc: 4b6f ldr r3, [pc, #444] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
80028be: 6a1b ldr r3, [r3, #32]
80028c0: 4a6e ldr r2, [pc, #440] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
80028c2: f043 0301 orr.w r3, r3, #1
80028c6: 6213 str r3, [r2, #32]
80028c8: e02d b.n 8002926 <HAL_RCC_OscConfig+0x36e>
80028ca: 687b ldr r3, [r7, #4]
80028cc: 68db ldr r3, [r3, #12]
80028ce: 2b00 cmp r3, #0
80028d0: d10c bne.n 80028ec <HAL_RCC_OscConfig+0x334>
80028d2: 4b6a ldr r3, [pc, #424] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
80028d4: 6a1b ldr r3, [r3, #32]
80028d6: 4a69 ldr r2, [pc, #420] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
80028d8: f023 0301 bic.w r3, r3, #1
80028dc: 6213 str r3, [r2, #32]
80028de: 4b67 ldr r3, [pc, #412] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
80028e0: 6a1b ldr r3, [r3, #32]
80028e2: 4a66 ldr r2, [pc, #408] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
80028e4: f023 0304 bic.w r3, r3, #4
80028e8: 6213 str r3, [r2, #32]
80028ea: e01c b.n 8002926 <HAL_RCC_OscConfig+0x36e>
80028ec: 687b ldr r3, [r7, #4]
80028ee: 68db ldr r3, [r3, #12]
80028f0: 2b05 cmp r3, #5
80028f2: d10c bne.n 800290e <HAL_RCC_OscConfig+0x356>
80028f4: 4b61 ldr r3, [pc, #388] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
80028f6: 6a1b ldr r3, [r3, #32]
80028f8: 4a60 ldr r2, [pc, #384] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
80028fa: f043 0304 orr.w r3, r3, #4
80028fe: 6213 str r3, [r2, #32]
8002900: 4b5e ldr r3, [pc, #376] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
8002902: 6a1b ldr r3, [r3, #32]
8002904: 4a5d ldr r2, [pc, #372] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
8002906: f043 0301 orr.w r3, r3, #1
800290a: 6213 str r3, [r2, #32]
800290c: e00b b.n 8002926 <HAL_RCC_OscConfig+0x36e>
800290e: 4b5b ldr r3, [pc, #364] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
8002910: 6a1b ldr r3, [r3, #32]
8002912: 4a5a ldr r2, [pc, #360] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
8002914: f023 0301 bic.w r3, r3, #1
8002918: 6213 str r3, [r2, #32]
800291a: 4b58 ldr r3, [pc, #352] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
800291c: 6a1b ldr r3, [r3, #32]
800291e: 4a57 ldr r2, [pc, #348] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
8002920: f023 0304 bic.w r3, r3, #4
8002924: 6213 str r3, [r2, #32]
/* Check the LSE State */
if (RCC_OscInitStruct->LSEState != RCC_LSE_OFF)
8002926: 687b ldr r3, [r7, #4]
8002928: 68db ldr r3, [r3, #12]
800292a: 2b00 cmp r3, #0
800292c: d015 beq.n 800295a <HAL_RCC_OscConfig+0x3a2>
{
/* Get Start Tick */
tickstart = HAL_GetTick();
800292e: f7fe ffc1 bl 80018b4 <HAL_GetTick>
8002932: 6138 str r0, [r7, #16]
/* Wait till LSE is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
8002934: e00a b.n 800294c <HAL_RCC_OscConfig+0x394>
{
if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
8002936: f7fe ffbd bl 80018b4 <HAL_GetTick>
800293a: 4602 mov r2, r0
800293c: 693b ldr r3, [r7, #16]
800293e: 1ad3 subs r3, r2, r3
8002940: f241 3288 movw r2, #5000 ; 0x1388
8002944: 4293 cmp r3, r2
8002946: d901 bls.n 800294c <HAL_RCC_OscConfig+0x394>
{
return HAL_TIMEOUT;
8002948: 2303 movs r3, #3
800294a: e0b1 b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
800294c: 4b4b ldr r3, [pc, #300] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
800294e: 6a1b ldr r3, [r3, #32]
8002950: f003 0302 and.w r3, r3, #2
8002954: 2b00 cmp r3, #0
8002956: d0ee beq.n 8002936 <HAL_RCC_OscConfig+0x37e>
8002958: e014 b.n 8002984 <HAL_RCC_OscConfig+0x3cc>
}
}
else
{
/* Get Start Tick */
tickstart = HAL_GetTick();
800295a: f7fe ffab bl 80018b4 <HAL_GetTick>
800295e: 6138 str r0, [r7, #16]
/* Wait till LSE is disabled */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
8002960: e00a b.n 8002978 <HAL_RCC_OscConfig+0x3c0>
{
if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
8002962: f7fe ffa7 bl 80018b4 <HAL_GetTick>
8002966: 4602 mov r2, r0
8002968: 693b ldr r3, [r7, #16]
800296a: 1ad3 subs r3, r2, r3
800296c: f241 3288 movw r2, #5000 ; 0x1388
8002970: 4293 cmp r3, r2
8002972: d901 bls.n 8002978 <HAL_RCC_OscConfig+0x3c0>
{
return HAL_TIMEOUT;
8002974: 2303 movs r3, #3
8002976: e09b b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
8002978: 4b40 ldr r3, [pc, #256] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
800297a: 6a1b ldr r3, [r3, #32]
800297c: f003 0302 and.w r3, r3, #2
8002980: 2b00 cmp r3, #0
8002982: d1ee bne.n 8002962 <HAL_RCC_OscConfig+0x3aa>
}
}
}
/* Require to disable power clock if necessary */
if (pwrclkchanged == SET)
8002984: 7dfb ldrb r3, [r7, #23]
8002986: 2b01 cmp r3, #1
8002988: d105 bne.n 8002996 <HAL_RCC_OscConfig+0x3de>
{
__HAL_RCC_PWR_CLK_DISABLE();
800298a: 4b3c ldr r3, [pc, #240] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
800298c: 69db ldr r3, [r3, #28]
800298e: 4a3b ldr r2, [pc, #236] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
8002990: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000
8002994: 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)
8002996: 687b ldr r3, [r7, #4]
8002998: 69db ldr r3, [r3, #28]
800299a: 2b00 cmp r3, #0
800299c: f000 8087 beq.w 8002aae <HAL_RCC_OscConfig+0x4f6>
{
/* Check if the PLL is used as system clock or not */
if (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_PLLCLK)
80029a0: 4b36 ldr r3, [pc, #216] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
80029a2: 685b ldr r3, [r3, #4]
80029a4: f003 030c and.w r3, r3, #12
80029a8: 2b08 cmp r3, #8
80029aa: d061 beq.n 8002a70 <HAL_RCC_OscConfig+0x4b8>
{
if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON)
80029ac: 687b ldr r3, [r7, #4]
80029ae: 69db ldr r3, [r3, #28]
80029b0: 2b02 cmp r3, #2
80029b2: d146 bne.n 8002a42 <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();
80029b4: 4b33 ldr r3, [pc, #204] ; (8002a84 <HAL_RCC_OscConfig+0x4cc>)
80029b6: 2200 movs r2, #0
80029b8: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
80029ba: f7fe ff7b bl 80018b4 <HAL_GetTick>
80029be: 6138 str r0, [r7, #16]
/* Wait till PLL is disabled */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
80029c0: e008 b.n 80029d4 <HAL_RCC_OscConfig+0x41c>
{
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
80029c2: f7fe ff77 bl 80018b4 <HAL_GetTick>
80029c6: 4602 mov r2, r0
80029c8: 693b ldr r3, [r7, #16]
80029ca: 1ad3 subs r3, r2, r3
80029cc: 2b02 cmp r3, #2
80029ce: d901 bls.n 80029d4 <HAL_RCC_OscConfig+0x41c>
{
return HAL_TIMEOUT;
80029d0: 2303 movs r3, #3
80029d2: e06d b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
80029d4: 4b29 ldr r3, [pc, #164] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
80029d6: 681b ldr r3, [r3, #0]
80029d8: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
80029dc: 2b00 cmp r3, #0
80029de: d1f0 bne.n 80029c2 <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)
80029e0: 687b ldr r3, [r7, #4]
80029e2: 6a1b ldr r3, [r3, #32]
80029e4: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
80029e8: d108 bne.n 80029fc <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);
80029ea: 4b24 ldr r3, [pc, #144] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
80029ec: 685b ldr r3, [r3, #4]
80029ee: f423 3200 bic.w r2, r3, #131072 ; 0x20000
80029f2: 687b ldr r3, [r7, #4]
80029f4: 689b ldr r3, [r3, #8]
80029f6: 4921 ldr r1, [pc, #132] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
80029f8: 4313 orrs r3, r2
80029fa: 604b str r3, [r1, #4]
}
/* Configure the main PLL clock source and multiplication factors. */
__HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource,
80029fc: 4b1f ldr r3, [pc, #124] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
80029fe: 685b ldr r3, [r3, #4]
8002a00: f423 1274 bic.w r2, r3, #3997696 ; 0x3d0000
8002a04: 687b ldr r3, [r7, #4]
8002a06: 6a19 ldr r1, [r3, #32]
8002a08: 687b ldr r3, [r7, #4]
8002a0a: 6a5b ldr r3, [r3, #36] ; 0x24
8002a0c: 430b orrs r3, r1
8002a0e: 491b ldr r1, [pc, #108] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
8002a10: 4313 orrs r3, r2
8002a12: 604b str r3, [r1, #4]
RCC_OscInitStruct->PLL.PLLMUL);
/* Enable the main PLL. */
__HAL_RCC_PLL_ENABLE();
8002a14: 4b1b ldr r3, [pc, #108] ; (8002a84 <HAL_RCC_OscConfig+0x4cc>)
8002a16: 2201 movs r2, #1
8002a18: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8002a1a: f7fe ff4b bl 80018b4 <HAL_GetTick>
8002a1e: 6138 str r0, [r7, #16]
/* Wait till PLL is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
8002a20: e008 b.n 8002a34 <HAL_RCC_OscConfig+0x47c>
{
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
8002a22: f7fe ff47 bl 80018b4 <HAL_GetTick>
8002a26: 4602 mov r2, r0
8002a28: 693b ldr r3, [r7, #16]
8002a2a: 1ad3 subs r3, r2, r3
8002a2c: 2b02 cmp r3, #2
8002a2e: d901 bls.n 8002a34 <HAL_RCC_OscConfig+0x47c>
{
return HAL_TIMEOUT;
8002a30: 2303 movs r3, #3
8002a32: e03d b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
8002a34: 4b11 ldr r3, [pc, #68] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
8002a36: 681b ldr r3, [r3, #0]
8002a38: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
8002a3c: 2b00 cmp r3, #0
8002a3e: d0f0 beq.n 8002a22 <HAL_RCC_OscConfig+0x46a>
8002a40: e035 b.n 8002aae <HAL_RCC_OscConfig+0x4f6>
}
}
else
{
/* Disable the main PLL. */
__HAL_RCC_PLL_DISABLE();
8002a42: 4b10 ldr r3, [pc, #64] ; (8002a84 <HAL_RCC_OscConfig+0x4cc>)
8002a44: 2200 movs r2, #0
8002a46: 601a str r2, [r3, #0]
/* Get Start Tick */
tickstart = HAL_GetTick();
8002a48: f7fe ff34 bl 80018b4 <HAL_GetTick>
8002a4c: 6138 str r0, [r7, #16]
/* Wait till PLL is disabled */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
8002a4e: e008 b.n 8002a62 <HAL_RCC_OscConfig+0x4aa>
{
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
8002a50: f7fe ff30 bl 80018b4 <HAL_GetTick>
8002a54: 4602 mov r2, r0
8002a56: 693b ldr r3, [r7, #16]
8002a58: 1ad3 subs r3, r2, r3
8002a5a: 2b02 cmp r3, #2
8002a5c: d901 bls.n 8002a62 <HAL_RCC_OscConfig+0x4aa>
{
return HAL_TIMEOUT;
8002a5e: 2303 movs r3, #3
8002a60: e026 b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
8002a62: 4b06 ldr r3, [pc, #24] ; (8002a7c <HAL_RCC_OscConfig+0x4c4>)
8002a64: 681b ldr r3, [r3, #0]
8002a66: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
8002a6a: 2b00 cmp r3, #0
8002a6c: d1f0 bne.n 8002a50 <HAL_RCC_OscConfig+0x498>
8002a6e: e01e b.n 8002aae <HAL_RCC_OscConfig+0x4f6>
}
}
else
{
/* Check if there is a request to disable the PLL used as System clock source */
if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF)
8002a70: 687b ldr r3, [r7, #4]
8002a72: 69db ldr r3, [r3, #28]
8002a74: 2b01 cmp r3, #1
8002a76: d107 bne.n 8002a88 <HAL_RCC_OscConfig+0x4d0>
{
return HAL_ERROR;
8002a78: 2301 movs r3, #1
8002a7a: e019 b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
8002a7c: 40021000 .word 0x40021000
8002a80: 40007000 .word 0x40007000
8002a84: 42420060 .word 0x42420060
}
else
{
/* Do not return HAL_ERROR if request repeats the current configuration */
pll_config = RCC->CFGR;
8002a88: 4b0b ldr r3, [pc, #44] ; (8002ab8 <HAL_RCC_OscConfig+0x500>)
8002a8a: 685b ldr r3, [r3, #4]
8002a8c: 60fb str r3, [r7, #12]
if ((READ_BIT(pll_config, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
8002a8e: 68fb ldr r3, [r7, #12]
8002a90: f403 3280 and.w r2, r3, #65536 ; 0x10000
8002a94: 687b ldr r3, [r7, #4]
8002a96: 6a1b ldr r3, [r3, #32]
8002a98: 429a cmp r2, r3
8002a9a: d106 bne.n 8002aaa <HAL_RCC_OscConfig+0x4f2>
(READ_BIT(pll_config, RCC_CFGR_PLLMULL) != RCC_OscInitStruct->PLL.PLLMUL))
8002a9c: 68fb ldr r3, [r7, #12]
8002a9e: f403 1270 and.w r2, r3, #3932160 ; 0x3c0000
8002aa2: 687b ldr r3, [r7, #4]
8002aa4: 6a5b ldr r3, [r3, #36] ; 0x24
if ((READ_BIT(pll_config, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
8002aa6: 429a cmp r2, r3
8002aa8: d001 beq.n 8002aae <HAL_RCC_OscConfig+0x4f6>
{
return HAL_ERROR;
8002aaa: 2301 movs r3, #1
8002aac: e000 b.n 8002ab0 <HAL_RCC_OscConfig+0x4f8>
}
}
}
}
return HAL_OK;
8002aae: 2300 movs r3, #0
}
8002ab0: 4618 mov r0, r3
8002ab2: 3718 adds r7, #24
8002ab4: 46bd mov sp, r7
8002ab6: bd80 pop {r7, pc}
8002ab8: 40021000 .word 0x40021000
08002abc <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)
{
8002abc: b580 push {r7, lr}
8002abe: b084 sub sp, #16
8002ac0: af00 add r7, sp, #0
8002ac2: 6078 str r0, [r7, #4]
8002ac4: 6039 str r1, [r7, #0]
uint32_t tickstart;
/* Check Null pointer */
if (RCC_ClkInitStruct == NULL)
8002ac6: 687b ldr r3, [r7, #4]
8002ac8: 2b00 cmp r3, #0
8002aca: d101 bne.n 8002ad0 <HAL_RCC_ClockConfig+0x14>
{
return HAL_ERROR;
8002acc: 2301 movs r3, #1
8002ace: e0d0 b.n 8002c72 <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())
8002ad0: 4b6a ldr r3, [pc, #424] ; (8002c7c <HAL_RCC_ClockConfig+0x1c0>)
8002ad2: 681b ldr r3, [r3, #0]
8002ad4: f003 0307 and.w r3, r3, #7
8002ad8: 683a ldr r2, [r7, #0]
8002ada: 429a cmp r2, r3
8002adc: d910 bls.n 8002b00 <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);
8002ade: 4b67 ldr r3, [pc, #412] ; (8002c7c <HAL_RCC_ClockConfig+0x1c0>)
8002ae0: 681b ldr r3, [r3, #0]
8002ae2: f023 0207 bic.w r2, r3, #7
8002ae6: 4965 ldr r1, [pc, #404] ; (8002c7c <HAL_RCC_ClockConfig+0x1c0>)
8002ae8: 683b ldr r3, [r7, #0]
8002aea: 4313 orrs r3, r2
8002aec: 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)
8002aee: 4b63 ldr r3, [pc, #396] ; (8002c7c <HAL_RCC_ClockConfig+0x1c0>)
8002af0: 681b ldr r3, [r3, #0]
8002af2: f003 0307 and.w r3, r3, #7
8002af6: 683a ldr r2, [r7, #0]
8002af8: 429a cmp r2, r3
8002afa: d001 beq.n 8002b00 <HAL_RCC_ClockConfig+0x44>
{
return HAL_ERROR;
8002afc: 2301 movs r3, #1
8002afe: e0b8 b.n 8002c72 <HAL_RCC_ClockConfig+0x1b6>
}
}
#endif /* FLASH_ACR_LATENCY */
/*-------------------------- HCLK Configuration --------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
8002b00: 687b ldr r3, [r7, #4]
8002b02: 681b ldr r3, [r3, #0]
8002b04: f003 0302 and.w r3, r3, #2
8002b08: 2b00 cmp r3, #0
8002b0a: d020 beq.n 8002b4e <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)
8002b0c: 687b ldr r3, [r7, #4]
8002b0e: 681b ldr r3, [r3, #0]
8002b10: f003 0304 and.w r3, r3, #4
8002b14: 2b00 cmp r3, #0
8002b16: d005 beq.n 8002b24 <HAL_RCC_ClockConfig+0x68>
{
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_HCLK_DIV16);
8002b18: 4b59 ldr r3, [pc, #356] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002b1a: 685b ldr r3, [r3, #4]
8002b1c: 4a58 ldr r2, [pc, #352] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002b1e: f443 63e0 orr.w r3, r3, #1792 ; 0x700
8002b22: 6053 str r3, [r2, #4]
}
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
8002b24: 687b ldr r3, [r7, #4]
8002b26: 681b ldr r3, [r3, #0]
8002b28: f003 0308 and.w r3, r3, #8
8002b2c: 2b00 cmp r3, #0
8002b2e: d005 beq.n 8002b3c <HAL_RCC_ClockConfig+0x80>
{
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, (RCC_HCLK_DIV16 << 3));
8002b30: 4b53 ldr r3, [pc, #332] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002b32: 685b ldr r3, [r3, #4]
8002b34: 4a52 ldr r2, [pc, #328] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002b36: f443 5360 orr.w r3, r3, #14336 ; 0x3800
8002b3a: 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);
8002b3c: 4b50 ldr r3, [pc, #320] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002b3e: 685b ldr r3, [r3, #4]
8002b40: f023 02f0 bic.w r2, r3, #240 ; 0xf0
8002b44: 687b ldr r3, [r7, #4]
8002b46: 689b ldr r3, [r3, #8]
8002b48: 494d ldr r1, [pc, #308] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002b4a: 4313 orrs r3, r2
8002b4c: 604b str r3, [r1, #4]
}
/*------------------------- SYSCLK Configuration ---------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
8002b4e: 687b ldr r3, [r7, #4]
8002b50: 681b ldr r3, [r3, #0]
8002b52: f003 0301 and.w r3, r3, #1
8002b56: 2b00 cmp r3, #0
8002b58: d040 beq.n 8002bdc <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)
8002b5a: 687b ldr r3, [r7, #4]
8002b5c: 685b ldr r3, [r3, #4]
8002b5e: 2b01 cmp r3, #1
8002b60: d107 bne.n 8002b72 <HAL_RCC_ClockConfig+0xb6>
{
/* Check the HSE ready flag */
if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
8002b62: 4b47 ldr r3, [pc, #284] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002b64: 681b ldr r3, [r3, #0]
8002b66: f403 3300 and.w r3, r3, #131072 ; 0x20000
8002b6a: 2b00 cmp r3, #0
8002b6c: d115 bne.n 8002b9a <HAL_RCC_ClockConfig+0xde>
{
return HAL_ERROR;
8002b6e: 2301 movs r3, #1
8002b70: e07f b.n 8002c72 <HAL_RCC_ClockConfig+0x1b6>
}
}
/* PLL is selected as System Clock Source */
else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK)
8002b72: 687b ldr r3, [r7, #4]
8002b74: 685b ldr r3, [r3, #4]
8002b76: 2b02 cmp r3, #2
8002b78: d107 bne.n 8002b8a <HAL_RCC_ClockConfig+0xce>
{
/* Check the PLL ready flag */
if (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
8002b7a: 4b41 ldr r3, [pc, #260] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002b7c: 681b ldr r3, [r3, #0]
8002b7e: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
8002b82: 2b00 cmp r3, #0
8002b84: d109 bne.n 8002b9a <HAL_RCC_ClockConfig+0xde>
{
return HAL_ERROR;
8002b86: 2301 movs r3, #1
8002b88: e073 b.n 8002c72 <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)
8002b8a: 4b3d ldr r3, [pc, #244] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002b8c: 681b ldr r3, [r3, #0]
8002b8e: f003 0302 and.w r3, r3, #2
8002b92: 2b00 cmp r3, #0
8002b94: d101 bne.n 8002b9a <HAL_RCC_ClockConfig+0xde>
{
return HAL_ERROR;
8002b96: 2301 movs r3, #1
8002b98: e06b b.n 8002c72 <HAL_RCC_ClockConfig+0x1b6>
}
}
__HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource);
8002b9a: 4b39 ldr r3, [pc, #228] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002b9c: 685b ldr r3, [r3, #4]
8002b9e: f023 0203 bic.w r2, r3, #3
8002ba2: 687b ldr r3, [r7, #4]
8002ba4: 685b ldr r3, [r3, #4]
8002ba6: 4936 ldr r1, [pc, #216] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002ba8: 4313 orrs r3, r2
8002baa: 604b str r3, [r1, #4]
/* Get Start Tick */
tickstart = HAL_GetTick();
8002bac: f7fe fe82 bl 80018b4 <HAL_GetTick>
8002bb0: 60f8 str r0, [r7, #12]
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
8002bb2: e00a b.n 8002bca <HAL_RCC_ClockConfig+0x10e>
{
if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
8002bb4: f7fe fe7e bl 80018b4 <HAL_GetTick>
8002bb8: 4602 mov r2, r0
8002bba: 68fb ldr r3, [r7, #12]
8002bbc: 1ad3 subs r3, r2, r3
8002bbe: f241 3288 movw r2, #5000 ; 0x1388
8002bc2: 4293 cmp r3, r2
8002bc4: d901 bls.n 8002bca <HAL_RCC_ClockConfig+0x10e>
{
return HAL_TIMEOUT;
8002bc6: 2303 movs r3, #3
8002bc8: e053 b.n 8002c72 <HAL_RCC_ClockConfig+0x1b6>
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
8002bca: 4b2d ldr r3, [pc, #180] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002bcc: 685b ldr r3, [r3, #4]
8002bce: f003 020c and.w r2, r3, #12
8002bd2: 687b ldr r3, [r7, #4]
8002bd4: 685b ldr r3, [r3, #4]
8002bd6: 009b lsls r3, r3, #2
8002bd8: 429a cmp r2, r3
8002bda: d1eb bne.n 8002bb4 <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())
8002bdc: 4b27 ldr r3, [pc, #156] ; (8002c7c <HAL_RCC_ClockConfig+0x1c0>)
8002bde: 681b ldr r3, [r3, #0]
8002be0: f003 0307 and.w r3, r3, #7
8002be4: 683a ldr r2, [r7, #0]
8002be6: 429a cmp r2, r3
8002be8: d210 bcs.n 8002c0c <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);
8002bea: 4b24 ldr r3, [pc, #144] ; (8002c7c <HAL_RCC_ClockConfig+0x1c0>)
8002bec: 681b ldr r3, [r3, #0]
8002bee: f023 0207 bic.w r2, r3, #7
8002bf2: 4922 ldr r1, [pc, #136] ; (8002c7c <HAL_RCC_ClockConfig+0x1c0>)
8002bf4: 683b ldr r3, [r7, #0]
8002bf6: 4313 orrs r3, r2
8002bf8: 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)
8002bfa: 4b20 ldr r3, [pc, #128] ; (8002c7c <HAL_RCC_ClockConfig+0x1c0>)
8002bfc: 681b ldr r3, [r3, #0]
8002bfe: f003 0307 and.w r3, r3, #7
8002c02: 683a ldr r2, [r7, #0]
8002c04: 429a cmp r2, r3
8002c06: d001 beq.n 8002c0c <HAL_RCC_ClockConfig+0x150>
{
return HAL_ERROR;
8002c08: 2301 movs r3, #1
8002c0a: e032 b.n 8002c72 <HAL_RCC_ClockConfig+0x1b6>
}
}
#endif /* FLASH_ACR_LATENCY */
/*-------------------------- PCLK1 Configuration ---------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
8002c0c: 687b ldr r3, [r7, #4]
8002c0e: 681b ldr r3, [r3, #0]
8002c10: f003 0304 and.w r3, r3, #4
8002c14: 2b00 cmp r3, #0
8002c16: d008 beq.n 8002c2a <HAL_RCC_ClockConfig+0x16e>
{
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider);
8002c18: 4b19 ldr r3, [pc, #100] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002c1a: 685b ldr r3, [r3, #4]
8002c1c: f423 62e0 bic.w r2, r3, #1792 ; 0x700
8002c20: 687b ldr r3, [r7, #4]
8002c22: 68db ldr r3, [r3, #12]
8002c24: 4916 ldr r1, [pc, #88] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002c26: 4313 orrs r3, r2
8002c28: 604b str r3, [r1, #4]
}
/*-------------------------- PCLK2 Configuration ---------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
8002c2a: 687b ldr r3, [r7, #4]
8002c2c: 681b ldr r3, [r3, #0]
8002c2e: f003 0308 and.w r3, r3, #8
8002c32: 2b00 cmp r3, #0
8002c34: d009 beq.n 8002c4a <HAL_RCC_ClockConfig+0x18e>
{
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3));
8002c36: 4b12 ldr r3, [pc, #72] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002c38: 685b ldr r3, [r3, #4]
8002c3a: f423 5260 bic.w r2, r3, #14336 ; 0x3800
8002c3e: 687b ldr r3, [r7, #4]
8002c40: 691b ldr r3, [r3, #16]
8002c42: 00db lsls r3, r3, #3
8002c44: 490e ldr r1, [pc, #56] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002c46: 4313 orrs r3, r2
8002c48: 604b str r3, [r1, #4]
}
/* Update the SystemCoreClock global variable */
SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos];
8002c4a: f000 f821 bl 8002c90 <HAL_RCC_GetSysClockFreq>
8002c4e: 4602 mov r2, r0
8002c50: 4b0b ldr r3, [pc, #44] ; (8002c80 <HAL_RCC_ClockConfig+0x1c4>)
8002c52: 685b ldr r3, [r3, #4]
8002c54: 091b lsrs r3, r3, #4
8002c56: f003 030f and.w r3, r3, #15
8002c5a: 490a ldr r1, [pc, #40] ; (8002c84 <HAL_RCC_ClockConfig+0x1c8>)
8002c5c: 5ccb ldrb r3, [r1, r3]
8002c5e: fa22 f303 lsr.w r3, r2, r3
8002c62: 4a09 ldr r2, [pc, #36] ; (8002c88 <HAL_RCC_ClockConfig+0x1cc>)
8002c64: 6013 str r3, [r2, #0]
/* Configure the source of time base considering new system clocks settings*/
HAL_InitTick(uwTickPrio);
8002c66: 4b09 ldr r3, [pc, #36] ; (8002c8c <HAL_RCC_ClockConfig+0x1d0>)
8002c68: 681b ldr r3, [r3, #0]
8002c6a: 4618 mov r0, r3
8002c6c: f7fe fde0 bl 8001830 <HAL_InitTick>
return HAL_OK;
8002c70: 2300 movs r3, #0
}
8002c72: 4618 mov r0, r3
8002c74: 3710 adds r7, #16
8002c76: 46bd mov sp, r7
8002c78: bd80 pop {r7, pc}
8002c7a: bf00 nop
8002c7c: 40022000 .word 0x40022000
8002c80: 40021000 .word 0x40021000
8002c84: 08005af0 .word 0x08005af0
8002c88: 20000000 .word 0x20000000
8002c8c: 20000004 .word 0x20000004
08002c90 <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)
{
8002c90: b490 push {r4, r7}
8002c92: b08a sub sp, #40 ; 0x28
8002c94: 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};
8002c96: 4b29 ldr r3, [pc, #164] ; (8002d3c <HAL_RCC_GetSysClockFreq+0xac>)
8002c98: 1d3c adds r4, r7, #4
8002c9a: cb0f ldmia r3, {r0, r1, r2, r3}
8002c9c: 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};
8002ca0: f240 2301 movw r3, #513 ; 0x201
8002ca4: 803b strh r3, [r7, #0]
#endif /*RCC_CFGR2_PREDIV1*/
#endif
uint32_t tmpreg = 0U, prediv = 0U, pllclk = 0U, pllmul = 0U;
8002ca6: 2300 movs r3, #0
8002ca8: 61fb str r3, [r7, #28]
8002caa: 2300 movs r3, #0
8002cac: 61bb str r3, [r7, #24]
8002cae: 2300 movs r3, #0
8002cb0: 627b str r3, [r7, #36] ; 0x24
8002cb2: 2300 movs r3, #0
8002cb4: 617b str r3, [r7, #20]
uint32_t sysclockfreq = 0U;
8002cb6: 2300 movs r3, #0
8002cb8: 623b str r3, [r7, #32]
#if defined(RCC_CFGR2_PREDIV1SRC)
uint32_t prediv2 = 0U, pll2mul = 0U;
#endif /*RCC_CFGR2_PREDIV1SRC*/
tmpreg = RCC->CFGR;
8002cba: 4b21 ldr r3, [pc, #132] ; (8002d40 <HAL_RCC_GetSysClockFreq+0xb0>)
8002cbc: 685b ldr r3, [r3, #4]
8002cbe: 61fb str r3, [r7, #28]
/* Get SYSCLK source -------------------------------------------------------*/
switch (tmpreg & RCC_CFGR_SWS)
8002cc0: 69fb ldr r3, [r7, #28]
8002cc2: f003 030c and.w r3, r3, #12
8002cc6: 2b04 cmp r3, #4
8002cc8: d002 beq.n 8002cd0 <HAL_RCC_GetSysClockFreq+0x40>
8002cca: 2b08 cmp r3, #8
8002ccc: d003 beq.n 8002cd6 <HAL_RCC_GetSysClockFreq+0x46>
8002cce: e02b b.n 8002d28 <HAL_RCC_GetSysClockFreq+0x98>
{
case RCC_SYSCLKSOURCE_STATUS_HSE: /* HSE used as system clock */
{
sysclockfreq = HSE_VALUE;
8002cd0: 4b1c ldr r3, [pc, #112] ; (8002d44 <HAL_RCC_GetSysClockFreq+0xb4>)
8002cd2: 623b str r3, [r7, #32]
break;
8002cd4: e02b b.n 8002d2e <HAL_RCC_GetSysClockFreq+0x9e>
}
case RCC_SYSCLKSOURCE_STATUS_PLLCLK: /* PLL used as system clock */
{
pllmul = aPLLMULFactorTable[(uint32_t)(tmpreg & RCC_CFGR_PLLMULL) >> RCC_CFGR_PLLMULL_Pos];
8002cd6: 69fb ldr r3, [r7, #28]
8002cd8: 0c9b lsrs r3, r3, #18
8002cda: f003 030f and.w r3, r3, #15
8002cde: 3328 adds r3, #40 ; 0x28
8002ce0: 443b add r3, r7
8002ce2: f813 3c24 ldrb.w r3, [r3, #-36]
8002ce6: 617b str r3, [r7, #20]
if ((tmpreg & RCC_CFGR_PLLSRC) != RCC_PLLSOURCE_HSI_DIV2)
8002ce8: 69fb ldr r3, [r7, #28]
8002cea: f403 3380 and.w r3, r3, #65536 ; 0x10000
8002cee: 2b00 cmp r3, #0
8002cf0: d012 beq.n 8002d18 <HAL_RCC_GetSysClockFreq+0x88>
{
#if defined(RCC_CFGR2_PREDIV1)
prediv = aPredivFactorTable[(uint32_t)(RCC->CFGR2 & RCC_CFGR2_PREDIV1) >> RCC_CFGR2_PREDIV1_Pos];
#else
prediv = aPredivFactorTable[(uint32_t)(RCC->CFGR & RCC_CFGR_PLLXTPRE) >> RCC_CFGR_PLLXTPRE_Pos];
8002cf2: 4b13 ldr r3, [pc, #76] ; (8002d40 <HAL_RCC_GetSysClockFreq+0xb0>)
8002cf4: 685b ldr r3, [r3, #4]
8002cf6: 0c5b lsrs r3, r3, #17
8002cf8: f003 0301 and.w r3, r3, #1
8002cfc: 3328 adds r3, #40 ; 0x28
8002cfe: 443b add r3, r7
8002d00: f813 3c28 ldrb.w r3, [r3, #-40]
8002d04: 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);
8002d06: 697b ldr r3, [r7, #20]
8002d08: 4a0e ldr r2, [pc, #56] ; (8002d44 <HAL_RCC_GetSysClockFreq+0xb4>)
8002d0a: fb03 f202 mul.w r2, r3, r2
8002d0e: 69bb ldr r3, [r7, #24]
8002d10: fbb2 f3f3 udiv r3, r2, r3
8002d14: 627b str r3, [r7, #36] ; 0x24
8002d16: e004 b.n 8002d22 <HAL_RCC_GetSysClockFreq+0x92>
#endif /*RCC_CFGR2_PREDIV1SRC*/
}
else
{
/* HSI used as PLL clock source : PLLCLK = HSI/2 * PLLMUL */
pllclk = (uint32_t)((HSI_VALUE >> 1) * pllmul);
8002d18: 697b ldr r3, [r7, #20]
8002d1a: 4a0b ldr r2, [pc, #44] ; (8002d48 <HAL_RCC_GetSysClockFreq+0xb8>)
8002d1c: fb02 f303 mul.w r3, r2, r3
8002d20: 627b str r3, [r7, #36] ; 0x24
}
sysclockfreq = pllclk;
8002d22: 6a7b ldr r3, [r7, #36] ; 0x24
8002d24: 623b str r3, [r7, #32]
break;
8002d26: e002 b.n 8002d2e <HAL_RCC_GetSysClockFreq+0x9e>
}
case RCC_SYSCLKSOURCE_STATUS_HSI: /* HSI used as system clock source */
default: /* HSI used as system clock */
{
sysclockfreq = HSI_VALUE;
8002d28: 4b06 ldr r3, [pc, #24] ; (8002d44 <HAL_RCC_GetSysClockFreq+0xb4>)
8002d2a: 623b str r3, [r7, #32]
break;
8002d2c: bf00 nop
}
}
return sysclockfreq;
8002d2e: 6a3b ldr r3, [r7, #32]
}
8002d30: 4618 mov r0, r3
8002d32: 3728 adds r7, #40 ; 0x28
8002d34: 46bd mov sp, r7
8002d36: bc90 pop {r4, r7}
8002d38: 4770 bx lr
8002d3a: bf00 nop
8002d3c: 08005ac0 .word 0x08005ac0
8002d40: 40021000 .word 0x40021000
8002d44: 007a1200 .word 0x007a1200
8002d48: 003d0900 .word 0x003d0900
08002d4c <HAL_RCC_GetHCLKFreq>:
* @note The SystemCoreClock CMSIS variable is used to store System Clock Frequency
* and updated within this function
* @retval HCLK frequency
*/
uint32_t HAL_RCC_GetHCLKFreq(void)
{
8002d4c: b480 push {r7}
8002d4e: af00 add r7, sp, #0
return SystemCoreClock;
8002d50: 4b02 ldr r3, [pc, #8] ; (8002d5c <HAL_RCC_GetHCLKFreq+0x10>)
8002d52: 681b ldr r3, [r3, #0]
}
8002d54: 4618 mov r0, r3
8002d56: 46bd mov sp, r7
8002d58: bc80 pop {r7}
8002d5a: 4770 bx lr
8002d5c: 20000000 .word 0x20000000
08002d60 <HAL_RCC_GetPCLK1Freq>:
* @note Each time PCLK1 changes, this function must be called to update the
* right PCLK1 value. Otherwise, any configuration based on this function will be incorrect.
* @retval PCLK1 frequency
*/
uint32_t HAL_RCC_GetPCLK1Freq(void)
{
8002d60: b580 push {r7, lr}
8002d62: af00 add r7, sp, #0
/* Get HCLK source and Compute PCLK1 frequency ---------------------------*/
return (HAL_RCC_GetHCLKFreq() >> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE1) >> RCC_CFGR_PPRE1_Pos]);
8002d64: f7ff fff2 bl 8002d4c <HAL_RCC_GetHCLKFreq>
8002d68: 4602 mov r2, r0
8002d6a: 4b05 ldr r3, [pc, #20] ; (8002d80 <HAL_RCC_GetPCLK1Freq+0x20>)
8002d6c: 685b ldr r3, [r3, #4]
8002d6e: 0a1b lsrs r3, r3, #8
8002d70: f003 0307 and.w r3, r3, #7
8002d74: 4903 ldr r1, [pc, #12] ; (8002d84 <HAL_RCC_GetPCLK1Freq+0x24>)
8002d76: 5ccb ldrb r3, [r1, r3]
8002d78: fa22 f303 lsr.w r3, r2, r3
}
8002d7c: 4618 mov r0, r3
8002d7e: bd80 pop {r7, pc}
8002d80: 40021000 .word 0x40021000
8002d84: 08005b00 .word 0x08005b00
08002d88 <HAL_RCC_GetPCLK2Freq>:
* @note Each time PCLK2 changes, this function must be called to update the
* right PCLK2 value. Otherwise, any configuration based on this function will be incorrect.
* @retval PCLK2 frequency
*/
uint32_t HAL_RCC_GetPCLK2Freq(void)
{
8002d88: b580 push {r7, lr}
8002d8a: af00 add r7, sp, #0
/* Get HCLK source and Compute PCLK2 frequency ---------------------------*/
return (HAL_RCC_GetHCLKFreq() >> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE2) >> RCC_CFGR_PPRE2_Pos]);
8002d8c: f7ff ffde bl 8002d4c <HAL_RCC_GetHCLKFreq>
8002d90: 4602 mov r2, r0
8002d92: 4b05 ldr r3, [pc, #20] ; (8002da8 <HAL_RCC_GetPCLK2Freq+0x20>)
8002d94: 685b ldr r3, [r3, #4]
8002d96: 0adb lsrs r3, r3, #11
8002d98: f003 0307 and.w r3, r3, #7
8002d9c: 4903 ldr r1, [pc, #12] ; (8002dac <HAL_RCC_GetPCLK2Freq+0x24>)
8002d9e: 5ccb ldrb r3, [r1, r3]
8002da0: fa22 f303 lsr.w r3, r2, r3
}
8002da4: 4618 mov r0, r3
8002da6: bd80 pop {r7, pc}
8002da8: 40021000 .word 0x40021000
8002dac: 08005b00 .word 0x08005b00
08002db0 <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)
{
8002db0: b480 push {r7}
8002db2: b085 sub sp, #20
8002db4: af00 add r7, sp, #0
8002db6: 6078 str r0, [r7, #4]
__IO uint32_t Delay = mdelay * (SystemCoreClock / 8U / 1000U);
8002db8: 4b0a ldr r3, [pc, #40] ; (8002de4 <RCC_Delay+0x34>)
8002dba: 681b ldr r3, [r3, #0]
8002dbc: 4a0a ldr r2, [pc, #40] ; (8002de8 <RCC_Delay+0x38>)
8002dbe: fba2 2303 umull r2, r3, r2, r3
8002dc2: 0a5b lsrs r3, r3, #9
8002dc4: 687a ldr r2, [r7, #4]
8002dc6: fb02 f303 mul.w r3, r2, r3
8002dca: 60fb str r3, [r7, #12]
do
{
__NOP();
8002dcc: bf00 nop
}
while (Delay --);
8002dce: 68fb ldr r3, [r7, #12]
8002dd0: 1e5a subs r2, r3, #1
8002dd2: 60fa str r2, [r7, #12]
8002dd4: 2b00 cmp r3, #0
8002dd6: d1f9 bne.n 8002dcc <RCC_Delay+0x1c>
}
8002dd8: bf00 nop
8002dda: bf00 nop
8002ddc: 3714 adds r7, #20
8002dde: 46bd mov sp, r7
8002de0: bc80 pop {r7}
8002de2: 4770 bx lr
8002de4: 20000000 .word 0x20000000
8002de8: 10624dd3 .word 0x10624dd3
08002dec <HAL_RCCEx_PeriphCLKConfig>:
* manually disable it.
*
* @retval HAL status
*/
HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit)
{
8002dec: b580 push {r7, lr}
8002dee: b086 sub sp, #24
8002df0: af00 add r7, sp, #0
8002df2: 6078 str r0, [r7, #4]
uint32_t tickstart = 0U, temp_reg = 0U;
8002df4: 2300 movs r3, #0
8002df6: 613b str r3, [r7, #16]
8002df8: 2300 movs r3, #0
8002dfa: 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))
8002dfc: 687b ldr r3, [r7, #4]
8002dfe: 681b ldr r3, [r3, #0]
8002e00: f003 0301 and.w r3, r3, #1
8002e04: 2b00 cmp r3, #0
8002e06: d07d beq.n 8002f04 <HAL_RCCEx_PeriphCLKConfig+0x118>
{
FlagStatus pwrclkchanged = RESET;
8002e08: 2300 movs r3, #0
8002e0a: 75fb strb r3, [r7, #23]
assert_param(IS_RCC_RTCCLKSOURCE(PeriphClkInit->RTCClockSelection));
/* As soon as function is called to change RTC clock source, activation of the
power domain is done. */
/* Requires to enable write access to Backup Domain of necessary */
if (__HAL_RCC_PWR_IS_CLK_DISABLED())
8002e0c: 4b4f ldr r3, [pc, #316] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002e0e: 69db ldr r3, [r3, #28]
8002e10: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8002e14: 2b00 cmp r3, #0
8002e16: d10d bne.n 8002e34 <HAL_RCCEx_PeriphCLKConfig+0x48>
{
__HAL_RCC_PWR_CLK_ENABLE();
8002e18: 4b4c ldr r3, [pc, #304] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002e1a: 69db ldr r3, [r3, #28]
8002e1c: 4a4b ldr r2, [pc, #300] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002e1e: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8002e22: 61d3 str r3, [r2, #28]
8002e24: 4b49 ldr r3, [pc, #292] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002e26: 69db ldr r3, [r3, #28]
8002e28: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8002e2c: 60bb str r3, [r7, #8]
8002e2e: 68bb ldr r3, [r7, #8]
pwrclkchanged = SET;
8002e30: 2301 movs r3, #1
8002e32: 75fb strb r3, [r7, #23]
}
if (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
8002e34: 4b46 ldr r3, [pc, #280] ; (8002f50 <HAL_RCCEx_PeriphCLKConfig+0x164>)
8002e36: 681b ldr r3, [r3, #0]
8002e38: f403 7380 and.w r3, r3, #256 ; 0x100
8002e3c: 2b00 cmp r3, #0
8002e3e: d118 bne.n 8002e72 <HAL_RCCEx_PeriphCLKConfig+0x86>
{
/* Enable write access to Backup domain */
SET_BIT(PWR->CR, PWR_CR_DBP);
8002e40: 4b43 ldr r3, [pc, #268] ; (8002f50 <HAL_RCCEx_PeriphCLKConfig+0x164>)
8002e42: 681b ldr r3, [r3, #0]
8002e44: 4a42 ldr r2, [pc, #264] ; (8002f50 <HAL_RCCEx_PeriphCLKConfig+0x164>)
8002e46: f443 7380 orr.w r3, r3, #256 ; 0x100
8002e4a: 6013 str r3, [r2, #0]
/* Wait for Backup domain Write protection disable */
tickstart = HAL_GetTick();
8002e4c: f7fe fd32 bl 80018b4 <HAL_GetTick>
8002e50: 6138 str r0, [r7, #16]
while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
8002e52: e008 b.n 8002e66 <HAL_RCCEx_PeriphCLKConfig+0x7a>
{
if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
8002e54: f7fe fd2e bl 80018b4 <HAL_GetTick>
8002e58: 4602 mov r2, r0
8002e5a: 693b ldr r3, [r7, #16]
8002e5c: 1ad3 subs r3, r2, r3
8002e5e: 2b64 cmp r3, #100 ; 0x64
8002e60: d901 bls.n 8002e66 <HAL_RCCEx_PeriphCLKConfig+0x7a>
{
return HAL_TIMEOUT;
8002e62: 2303 movs r3, #3
8002e64: e06d b.n 8002f42 <HAL_RCCEx_PeriphCLKConfig+0x156>
while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
8002e66: 4b3a ldr r3, [pc, #232] ; (8002f50 <HAL_RCCEx_PeriphCLKConfig+0x164>)
8002e68: 681b ldr r3, [r3, #0]
8002e6a: f403 7380 and.w r3, r3, #256 ; 0x100
8002e6e: 2b00 cmp r3, #0
8002e70: d0f0 beq.n 8002e54 <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);
8002e72: 4b36 ldr r3, [pc, #216] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002e74: 6a1b ldr r3, [r3, #32]
8002e76: f403 7340 and.w r3, r3, #768 ; 0x300
8002e7a: 60fb str r3, [r7, #12]
if ((temp_reg != 0x00000000U) && (temp_reg != (PeriphClkInit->RTCClockSelection & RCC_BDCR_RTCSEL)))
8002e7c: 68fb ldr r3, [r7, #12]
8002e7e: 2b00 cmp r3, #0
8002e80: d02e beq.n 8002ee0 <HAL_RCCEx_PeriphCLKConfig+0xf4>
8002e82: 687b ldr r3, [r7, #4]
8002e84: 685b ldr r3, [r3, #4]
8002e86: f403 7340 and.w r3, r3, #768 ; 0x300
8002e8a: 68fa ldr r2, [r7, #12]
8002e8c: 429a cmp r2, r3
8002e8e: d027 beq.n 8002ee0 <HAL_RCCEx_PeriphCLKConfig+0xf4>
{
/* Store the content of BDCR register before the reset of Backup Domain */
temp_reg = (RCC->BDCR & ~(RCC_BDCR_RTCSEL));
8002e90: 4b2e ldr r3, [pc, #184] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002e92: 6a1b ldr r3, [r3, #32]
8002e94: f423 7340 bic.w r3, r3, #768 ; 0x300
8002e98: 60fb str r3, [r7, #12]
/* RTC Clock selection can be changed only if the Backup Domain is reset */
__HAL_RCC_BACKUPRESET_FORCE();
8002e9a: 4b2e ldr r3, [pc, #184] ; (8002f54 <HAL_RCCEx_PeriphCLKConfig+0x168>)
8002e9c: 2201 movs r2, #1
8002e9e: 601a str r2, [r3, #0]
__HAL_RCC_BACKUPRESET_RELEASE();
8002ea0: 4b2c ldr r3, [pc, #176] ; (8002f54 <HAL_RCCEx_PeriphCLKConfig+0x168>)
8002ea2: 2200 movs r2, #0
8002ea4: 601a str r2, [r3, #0]
/* Restore the Content of BDCR register */
RCC->BDCR = temp_reg;
8002ea6: 4a29 ldr r2, [pc, #164] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002ea8: 68fb ldr r3, [r7, #12]
8002eaa: 6213 str r3, [r2, #32]
/* Wait for LSERDY if LSE was enabled */
if (HAL_IS_BIT_SET(temp_reg, RCC_BDCR_LSEON))
8002eac: 68fb ldr r3, [r7, #12]
8002eae: f003 0301 and.w r3, r3, #1
8002eb2: 2b00 cmp r3, #0
8002eb4: d014 beq.n 8002ee0 <HAL_RCCEx_PeriphCLKConfig+0xf4>
{
/* Get Start Tick */
tickstart = HAL_GetTick();
8002eb6: f7fe fcfd bl 80018b4 <HAL_GetTick>
8002eba: 6138 str r0, [r7, #16]
/* Wait till LSE is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
8002ebc: e00a b.n 8002ed4 <HAL_RCCEx_PeriphCLKConfig+0xe8>
{
if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
8002ebe: f7fe fcf9 bl 80018b4 <HAL_GetTick>
8002ec2: 4602 mov r2, r0
8002ec4: 693b ldr r3, [r7, #16]
8002ec6: 1ad3 subs r3, r2, r3
8002ec8: f241 3288 movw r2, #5000 ; 0x1388
8002ecc: 4293 cmp r3, r2
8002ece: d901 bls.n 8002ed4 <HAL_RCCEx_PeriphCLKConfig+0xe8>
{
return HAL_TIMEOUT;
8002ed0: 2303 movs r3, #3
8002ed2: e036 b.n 8002f42 <HAL_RCCEx_PeriphCLKConfig+0x156>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
8002ed4: 4b1d ldr r3, [pc, #116] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002ed6: 6a1b ldr r3, [r3, #32]
8002ed8: f003 0302 and.w r3, r3, #2
8002edc: 2b00 cmp r3, #0
8002ede: d0ee beq.n 8002ebe <HAL_RCCEx_PeriphCLKConfig+0xd2>
}
}
}
}
__HAL_RCC_RTC_CONFIG(PeriphClkInit->RTCClockSelection);
8002ee0: 4b1a ldr r3, [pc, #104] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002ee2: 6a1b ldr r3, [r3, #32]
8002ee4: f423 7240 bic.w r2, r3, #768 ; 0x300
8002ee8: 687b ldr r3, [r7, #4]
8002eea: 685b ldr r3, [r3, #4]
8002eec: 4917 ldr r1, [pc, #92] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002eee: 4313 orrs r3, r2
8002ef0: 620b str r3, [r1, #32]
/* Require to disable power clock if necessary */
if (pwrclkchanged == SET)
8002ef2: 7dfb ldrb r3, [r7, #23]
8002ef4: 2b01 cmp r3, #1
8002ef6: d105 bne.n 8002f04 <HAL_RCCEx_PeriphCLKConfig+0x118>
{
__HAL_RCC_PWR_CLK_DISABLE();
8002ef8: 4b14 ldr r3, [pc, #80] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002efa: 69db ldr r3, [r3, #28]
8002efc: 4a13 ldr r2, [pc, #76] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002efe: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000
8002f02: 61d3 str r3, [r2, #28]
}
}
/*------------------------------ ADC clock Configuration ------------------*/
if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_ADC) == RCC_PERIPHCLK_ADC)
8002f04: 687b ldr r3, [r7, #4]
8002f06: 681b ldr r3, [r3, #0]
8002f08: f003 0302 and.w r3, r3, #2
8002f0c: 2b00 cmp r3, #0
8002f0e: d008 beq.n 8002f22 <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);
8002f10: 4b0e ldr r3, [pc, #56] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002f12: 685b ldr r3, [r3, #4]
8002f14: f423 4240 bic.w r2, r3, #49152 ; 0xc000
8002f18: 687b ldr r3, [r7, #4]
8002f1a: 689b ldr r3, [r3, #8]
8002f1c: 490b ldr r1, [pc, #44] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002f1e: 4313 orrs r3, r2
8002f20: 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)
8002f22: 687b ldr r3, [r7, #4]
8002f24: 681b ldr r3, [r3, #0]
8002f26: f003 0310 and.w r3, r3, #16
8002f2a: 2b00 cmp r3, #0
8002f2c: d008 beq.n 8002f40 <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);
8002f2e: 4b07 ldr r3, [pc, #28] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002f30: 685b ldr r3, [r3, #4]
8002f32: f423 0280 bic.w r2, r3, #4194304 ; 0x400000
8002f36: 687b ldr r3, [r7, #4]
8002f38: 68db ldr r3, [r3, #12]
8002f3a: 4904 ldr r1, [pc, #16] ; (8002f4c <HAL_RCCEx_PeriphCLKConfig+0x160>)
8002f3c: 4313 orrs r3, r2
8002f3e: 604b str r3, [r1, #4]
}
#endif /* STM32F102x6 || STM32F102xB || STM32F103x6 || STM32F103xB || STM32F103xE || STM32F103xG || STM32F105xC || STM32F107xC */
return HAL_OK;
8002f40: 2300 movs r3, #0
}
8002f42: 4618 mov r0, r3
8002f44: 3718 adds r7, #24
8002f46: 46bd mov sp, r7
8002f48: bd80 pop {r7, pc}
8002f4a: bf00 nop
8002f4c: 40021000 .word 0x40021000
8002f50: 40007000 .word 0x40007000
8002f54: 42420440 .word 0x42420440
08002f58 <HAL_TIM_Base_Init>:
* Ex: call @ref HAL_TIM_Base_DeInit() before HAL_TIM_Base_Init()
* @param htim TIM Base handle
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_Base_Init(TIM_HandleTypeDef *htim)
{
8002f58: b580 push {r7, lr}
8002f5a: b082 sub sp, #8
8002f5c: af00 add r7, sp, #0
8002f5e: 6078 str r0, [r7, #4]
/* Check the TIM handle allocation */
if (htim == NULL)
8002f60: 687b ldr r3, [r7, #4]
8002f62: 2b00 cmp r3, #0
8002f64: d101 bne.n 8002f6a <HAL_TIM_Base_Init+0x12>
{
return HAL_ERROR;
8002f66: 2301 movs r3, #1
8002f68: e041 b.n 8002fee <HAL_TIM_Base_Init+0x96>
assert_param(IS_TIM_INSTANCE(htim->Instance));
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
if (htim->State == HAL_TIM_STATE_RESET)
8002f6a: 687b ldr r3, [r7, #4]
8002f6c: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
8002f70: b2db uxtb r3, r3
8002f72: 2b00 cmp r3, #0
8002f74: d106 bne.n 8002f84 <HAL_TIM_Base_Init+0x2c>
{
/* Allocate lock resource and initialize it */
htim->Lock = HAL_UNLOCKED;
8002f76: 687b ldr r3, [r7, #4]
8002f78: 2200 movs r2, #0
8002f7a: f883 203c strb.w r2, [r3, #60] ; 0x3c
}
/* Init the low level hardware : GPIO, CLOCK, NVIC */
htim->Base_MspInitCallback(htim);
#else
/* Init the low level hardware : GPIO, CLOCK, NVIC */
HAL_TIM_Base_MspInit(htim);
8002f7e: 6878 ldr r0, [r7, #4]
8002f80: f7fe f9fa bl 8001378 <HAL_TIM_Base_MspInit>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
/* Set the TIM state */
htim->State = HAL_TIM_STATE_BUSY;
8002f84: 687b ldr r3, [r7, #4]
8002f86: 2202 movs r2, #2
8002f88: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Set the Time Base configuration */
TIM_Base_SetConfig(htim->Instance, &htim->Init);
8002f8c: 687b ldr r3, [r7, #4]
8002f8e: 681a ldr r2, [r3, #0]
8002f90: 687b ldr r3, [r7, #4]
8002f92: 3304 adds r3, #4
8002f94: 4619 mov r1, r3
8002f96: 4610 mov r0, r2
8002f98: f000 fd48 bl 8003a2c <TIM_Base_SetConfig>
/* Initialize the DMA burst operation state */
htim->DMABurstState = HAL_DMA_BURST_STATE_READY;
8002f9c: 687b ldr r3, [r7, #4]
8002f9e: 2201 movs r2, #1
8002fa0: f883 2046 strb.w r2, [r3, #70] ; 0x46
/* Initialize the TIM channels state */
TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
8002fa4: 687b ldr r3, [r7, #4]
8002fa6: 2201 movs r2, #1
8002fa8: f883 203e strb.w r2, [r3, #62] ; 0x3e
8002fac: 687b ldr r3, [r7, #4]
8002fae: 2201 movs r2, #1
8002fb0: f883 203f strb.w r2, [r3, #63] ; 0x3f
8002fb4: 687b ldr r3, [r7, #4]
8002fb6: 2201 movs r2, #1
8002fb8: f883 2040 strb.w r2, [r3, #64] ; 0x40
8002fbc: 687b ldr r3, [r7, #4]
8002fbe: 2201 movs r2, #1
8002fc0: f883 2041 strb.w r2, [r3, #65] ; 0x41
TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
8002fc4: 687b ldr r3, [r7, #4]
8002fc6: 2201 movs r2, #1
8002fc8: f883 2042 strb.w r2, [r3, #66] ; 0x42
8002fcc: 687b ldr r3, [r7, #4]
8002fce: 2201 movs r2, #1
8002fd0: f883 2043 strb.w r2, [r3, #67] ; 0x43
8002fd4: 687b ldr r3, [r7, #4]
8002fd6: 2201 movs r2, #1
8002fd8: f883 2044 strb.w r2, [r3, #68] ; 0x44
8002fdc: 687b ldr r3, [r7, #4]
8002fde: 2201 movs r2, #1
8002fe0: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Initialize the TIM state*/
htim->State = HAL_TIM_STATE_READY;
8002fe4: 687b ldr r3, [r7, #4]
8002fe6: 2201 movs r2, #1
8002fe8: f883 203d strb.w r2, [r3, #61] ; 0x3d
return HAL_OK;
8002fec: 2300 movs r3, #0
}
8002fee: 4618 mov r0, r3
8002ff0: 3708 adds r7, #8
8002ff2: 46bd mov sp, r7
8002ff4: bd80 pop {r7, pc}
...
08002ff8 <HAL_TIM_Base_Start>:
* @brief Starts the TIM Base generation.
* @param htim TIM Base handle
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_Base_Start(TIM_HandleTypeDef *htim)
{
8002ff8: b480 push {r7}
8002ffa: b085 sub sp, #20
8002ffc: af00 add r7, sp, #0
8002ffe: 6078 str r0, [r7, #4]
/* Check the parameters */
assert_param(IS_TIM_INSTANCE(htim->Instance));
/* Check the TIM state */
if (htim->State != HAL_TIM_STATE_READY)
8003000: 687b ldr r3, [r7, #4]
8003002: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
8003006: b2db uxtb r3, r3
8003008: 2b01 cmp r3, #1
800300a: d001 beq.n 8003010 <HAL_TIM_Base_Start+0x18>
{
return HAL_ERROR;
800300c: 2301 movs r3, #1
800300e: e032 b.n 8003076 <HAL_TIM_Base_Start+0x7e>
}
/* Set the TIM state */
htim->State = HAL_TIM_STATE_BUSY;
8003010: 687b ldr r3, [r7, #4]
8003012: 2202 movs r2, #2
8003014: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
8003018: 687b ldr r3, [r7, #4]
800301a: 681b ldr r3, [r3, #0]
800301c: 4a18 ldr r2, [pc, #96] ; (8003080 <HAL_TIM_Base_Start+0x88>)
800301e: 4293 cmp r3, r2
8003020: d00e beq.n 8003040 <HAL_TIM_Base_Start+0x48>
8003022: 687b ldr r3, [r7, #4]
8003024: 681b ldr r3, [r3, #0]
8003026: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
800302a: d009 beq.n 8003040 <HAL_TIM_Base_Start+0x48>
800302c: 687b ldr r3, [r7, #4]
800302e: 681b ldr r3, [r3, #0]
8003030: 4a14 ldr r2, [pc, #80] ; (8003084 <HAL_TIM_Base_Start+0x8c>)
8003032: 4293 cmp r3, r2
8003034: d004 beq.n 8003040 <HAL_TIM_Base_Start+0x48>
8003036: 687b ldr r3, [r7, #4]
8003038: 681b ldr r3, [r3, #0]
800303a: 4a13 ldr r2, [pc, #76] ; (8003088 <HAL_TIM_Base_Start+0x90>)
800303c: 4293 cmp r3, r2
800303e: d111 bne.n 8003064 <HAL_TIM_Base_Start+0x6c>
{
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
8003040: 687b ldr r3, [r7, #4]
8003042: 681b ldr r3, [r3, #0]
8003044: 689b ldr r3, [r3, #8]
8003046: f003 0307 and.w r3, r3, #7
800304a: 60fb str r3, [r7, #12]
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
800304c: 68fb ldr r3, [r7, #12]
800304e: 2b06 cmp r3, #6
8003050: d010 beq.n 8003074 <HAL_TIM_Base_Start+0x7c>
{
__HAL_TIM_ENABLE(htim);
8003052: 687b ldr r3, [r7, #4]
8003054: 681b ldr r3, [r3, #0]
8003056: 681a ldr r2, [r3, #0]
8003058: 687b ldr r3, [r7, #4]
800305a: 681b ldr r3, [r3, #0]
800305c: f042 0201 orr.w r2, r2, #1
8003060: 601a str r2, [r3, #0]
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
8003062: e007 b.n 8003074 <HAL_TIM_Base_Start+0x7c>
}
}
else
{
__HAL_TIM_ENABLE(htim);
8003064: 687b ldr r3, [r7, #4]
8003066: 681b ldr r3, [r3, #0]
8003068: 681a ldr r2, [r3, #0]
800306a: 687b ldr r3, [r7, #4]
800306c: 681b ldr r3, [r3, #0]
800306e: f042 0201 orr.w r2, r2, #1
8003072: 601a str r2, [r3, #0]
}
/* Return function status */
return HAL_OK;
8003074: 2300 movs r3, #0
}
8003076: 4618 mov r0, r3
8003078: 3714 adds r7, #20
800307a: 46bd mov sp, r7
800307c: bc80 pop {r7}
800307e: 4770 bx lr
8003080: 40012c00 .word 0x40012c00
8003084: 40000400 .word 0x40000400
8003088: 40000800 .word 0x40000800
0800308c <HAL_TIM_PWM_Init>:
* Ex: call @ref HAL_TIM_PWM_DeInit() before HAL_TIM_PWM_Init()
* @param htim TIM PWM handle
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_PWM_Init(TIM_HandleTypeDef *htim)
{
800308c: b580 push {r7, lr}
800308e: b082 sub sp, #8
8003090: af00 add r7, sp, #0
8003092: 6078 str r0, [r7, #4]
/* Check the TIM handle allocation */
if (htim == NULL)
8003094: 687b ldr r3, [r7, #4]
8003096: 2b00 cmp r3, #0
8003098: d101 bne.n 800309e <HAL_TIM_PWM_Init+0x12>
{
return HAL_ERROR;
800309a: 2301 movs r3, #1
800309c: e041 b.n 8003122 <HAL_TIM_PWM_Init+0x96>
assert_param(IS_TIM_INSTANCE(htim->Instance));
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
if (htim->State == HAL_TIM_STATE_RESET)
800309e: 687b ldr r3, [r7, #4]
80030a0: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
80030a4: b2db uxtb r3, r3
80030a6: 2b00 cmp r3, #0
80030a8: d106 bne.n 80030b8 <HAL_TIM_PWM_Init+0x2c>
{
/* Allocate lock resource and initialize it */
htim->Lock = HAL_UNLOCKED;
80030aa: 687b ldr r3, [r7, #4]
80030ac: 2200 movs r2, #0
80030ae: f883 203c strb.w r2, [r3, #60] ; 0x3c
}
/* Init the low level hardware : GPIO, CLOCK, NVIC */
htim->PWM_MspInitCallback(htim);
#else
/* Init the low level hardware : GPIO, CLOCK, NVIC and DMA */
HAL_TIM_PWM_MspInit(htim);
80030b2: 6878 ldr r0, [r7, #4]
80030b4: f7fe f944 bl 8001340 <HAL_TIM_PWM_MspInit>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
/* Set the TIM state */
htim->State = HAL_TIM_STATE_BUSY;
80030b8: 687b ldr r3, [r7, #4]
80030ba: 2202 movs r2, #2
80030bc: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Init the base time for the PWM */
TIM_Base_SetConfig(htim->Instance, &htim->Init);
80030c0: 687b ldr r3, [r7, #4]
80030c2: 681a ldr r2, [r3, #0]
80030c4: 687b ldr r3, [r7, #4]
80030c6: 3304 adds r3, #4
80030c8: 4619 mov r1, r3
80030ca: 4610 mov r0, r2
80030cc: f000 fcae bl 8003a2c <TIM_Base_SetConfig>
/* Initialize the DMA burst operation state */
htim->DMABurstState = HAL_DMA_BURST_STATE_READY;
80030d0: 687b ldr r3, [r7, #4]
80030d2: 2201 movs r2, #1
80030d4: f883 2046 strb.w r2, [r3, #70] ; 0x46
/* Initialize the TIM channels state */
TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
80030d8: 687b ldr r3, [r7, #4]
80030da: 2201 movs r2, #1
80030dc: f883 203e strb.w r2, [r3, #62] ; 0x3e
80030e0: 687b ldr r3, [r7, #4]
80030e2: 2201 movs r2, #1
80030e4: f883 203f strb.w r2, [r3, #63] ; 0x3f
80030e8: 687b ldr r3, [r7, #4]
80030ea: 2201 movs r2, #1
80030ec: f883 2040 strb.w r2, [r3, #64] ; 0x40
80030f0: 687b ldr r3, [r7, #4]
80030f2: 2201 movs r2, #1
80030f4: f883 2041 strb.w r2, [r3, #65] ; 0x41
TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
80030f8: 687b ldr r3, [r7, #4]
80030fa: 2201 movs r2, #1
80030fc: f883 2042 strb.w r2, [r3, #66] ; 0x42
8003100: 687b ldr r3, [r7, #4]
8003102: 2201 movs r2, #1
8003104: f883 2043 strb.w r2, [r3, #67] ; 0x43
8003108: 687b ldr r3, [r7, #4]
800310a: 2201 movs r2, #1
800310c: f883 2044 strb.w r2, [r3, #68] ; 0x44
8003110: 687b ldr r3, [r7, #4]
8003112: 2201 movs r2, #1
8003114: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Initialize the TIM state*/
htim->State = HAL_TIM_STATE_READY;
8003118: 687b ldr r3, [r7, #4]
800311a: 2201 movs r2, #1
800311c: f883 203d strb.w r2, [r3, #61] ; 0x3d
return HAL_OK;
8003120: 2300 movs r3, #0
}
8003122: 4618 mov r0, r3
8003124: 3708 adds r7, #8
8003126: 46bd mov sp, r7
8003128: bd80 pop {r7, pc}
...
0800312c <HAL_TIM_PWM_Start>:
* @arg TIM_CHANNEL_3: TIM Channel 3 selected
* @arg TIM_CHANNEL_4: TIM Channel 4 selected
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_PWM_Start(TIM_HandleTypeDef *htim, uint32_t Channel)
{
800312c: b580 push {r7, lr}
800312e: b084 sub sp, #16
8003130: af00 add r7, sp, #0
8003132: 6078 str r0, [r7, #4]
8003134: 6039 str r1, [r7, #0]
/* Check the parameters */
assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel));
/* Check the TIM channel state */
if (TIM_CHANNEL_STATE_GET(htim, Channel) != HAL_TIM_CHANNEL_STATE_READY)
8003136: 683b ldr r3, [r7, #0]
8003138: 2b00 cmp r3, #0
800313a: d109 bne.n 8003150 <HAL_TIM_PWM_Start+0x24>
800313c: 687b ldr r3, [r7, #4]
800313e: f893 303e ldrb.w r3, [r3, #62] ; 0x3e
8003142: b2db uxtb r3, r3
8003144: 2b01 cmp r3, #1
8003146: bf14 ite ne
8003148: 2301 movne r3, #1
800314a: 2300 moveq r3, #0
800314c: b2db uxtb r3, r3
800314e: e022 b.n 8003196 <HAL_TIM_PWM_Start+0x6a>
8003150: 683b ldr r3, [r7, #0]
8003152: 2b04 cmp r3, #4
8003154: d109 bne.n 800316a <HAL_TIM_PWM_Start+0x3e>
8003156: 687b ldr r3, [r7, #4]
8003158: f893 303f ldrb.w r3, [r3, #63] ; 0x3f
800315c: b2db uxtb r3, r3
800315e: 2b01 cmp r3, #1
8003160: bf14 ite ne
8003162: 2301 movne r3, #1
8003164: 2300 moveq r3, #0
8003166: b2db uxtb r3, r3
8003168: e015 b.n 8003196 <HAL_TIM_PWM_Start+0x6a>
800316a: 683b ldr r3, [r7, #0]
800316c: 2b08 cmp r3, #8
800316e: d109 bne.n 8003184 <HAL_TIM_PWM_Start+0x58>
8003170: 687b ldr r3, [r7, #4]
8003172: f893 3040 ldrb.w r3, [r3, #64] ; 0x40
8003176: b2db uxtb r3, r3
8003178: 2b01 cmp r3, #1
800317a: bf14 ite ne
800317c: 2301 movne r3, #1
800317e: 2300 moveq r3, #0
8003180: b2db uxtb r3, r3
8003182: e008 b.n 8003196 <HAL_TIM_PWM_Start+0x6a>
8003184: 687b ldr r3, [r7, #4]
8003186: f893 3041 ldrb.w r3, [r3, #65] ; 0x41
800318a: b2db uxtb r3, r3
800318c: 2b01 cmp r3, #1
800318e: bf14 ite ne
8003190: 2301 movne r3, #1
8003192: 2300 moveq r3, #0
8003194: b2db uxtb r3, r3
8003196: 2b00 cmp r3, #0
8003198: d001 beq.n 800319e <HAL_TIM_PWM_Start+0x72>
{
return HAL_ERROR;
800319a: 2301 movs r3, #1
800319c: e05e b.n 800325c <HAL_TIM_PWM_Start+0x130>
}
/* Set the TIM channel state */
TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY);
800319e: 683b ldr r3, [r7, #0]
80031a0: 2b00 cmp r3, #0
80031a2: d104 bne.n 80031ae <HAL_TIM_PWM_Start+0x82>
80031a4: 687b ldr r3, [r7, #4]
80031a6: 2202 movs r2, #2
80031a8: f883 203e strb.w r2, [r3, #62] ; 0x3e
80031ac: e013 b.n 80031d6 <HAL_TIM_PWM_Start+0xaa>
80031ae: 683b ldr r3, [r7, #0]
80031b0: 2b04 cmp r3, #4
80031b2: d104 bne.n 80031be <HAL_TIM_PWM_Start+0x92>
80031b4: 687b ldr r3, [r7, #4]
80031b6: 2202 movs r2, #2
80031b8: f883 203f strb.w r2, [r3, #63] ; 0x3f
80031bc: e00b b.n 80031d6 <HAL_TIM_PWM_Start+0xaa>
80031be: 683b ldr r3, [r7, #0]
80031c0: 2b08 cmp r3, #8
80031c2: d104 bne.n 80031ce <HAL_TIM_PWM_Start+0xa2>
80031c4: 687b ldr r3, [r7, #4]
80031c6: 2202 movs r2, #2
80031c8: f883 2040 strb.w r2, [r3, #64] ; 0x40
80031cc: e003 b.n 80031d6 <HAL_TIM_PWM_Start+0xaa>
80031ce: 687b ldr r3, [r7, #4]
80031d0: 2202 movs r2, #2
80031d2: f883 2041 strb.w r2, [r3, #65] ; 0x41
/* Enable the Capture compare channel */
TIM_CCxChannelCmd(htim->Instance, Channel, TIM_CCx_ENABLE);
80031d6: 687b ldr r3, [r7, #4]
80031d8: 681b ldr r3, [r3, #0]
80031da: 2201 movs r2, #1
80031dc: 6839 ldr r1, [r7, #0]
80031de: 4618 mov r0, r3
80031e0: f000 fea4 bl 8003f2c <TIM_CCxChannelCmd>
if (IS_TIM_BREAK_INSTANCE(htim->Instance) != RESET)
80031e4: 687b ldr r3, [r7, #4]
80031e6: 681b ldr r3, [r3, #0]
80031e8: 4a1e ldr r2, [pc, #120] ; (8003264 <HAL_TIM_PWM_Start+0x138>)
80031ea: 4293 cmp r3, r2
80031ec: d107 bne.n 80031fe <HAL_TIM_PWM_Start+0xd2>
{
/* Enable the main output */
__HAL_TIM_MOE_ENABLE(htim);
80031ee: 687b ldr r3, [r7, #4]
80031f0: 681b ldr r3, [r3, #0]
80031f2: 6c5a ldr r2, [r3, #68] ; 0x44
80031f4: 687b ldr r3, [r7, #4]
80031f6: 681b ldr r3, [r3, #0]
80031f8: f442 4200 orr.w r2, r2, #32768 ; 0x8000
80031fc: 645a str r2, [r3, #68] ; 0x44
}
/* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
80031fe: 687b ldr r3, [r7, #4]
8003200: 681b ldr r3, [r3, #0]
8003202: 4a18 ldr r2, [pc, #96] ; (8003264 <HAL_TIM_PWM_Start+0x138>)
8003204: 4293 cmp r3, r2
8003206: d00e beq.n 8003226 <HAL_TIM_PWM_Start+0xfa>
8003208: 687b ldr r3, [r7, #4]
800320a: 681b ldr r3, [r3, #0]
800320c: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
8003210: d009 beq.n 8003226 <HAL_TIM_PWM_Start+0xfa>
8003212: 687b ldr r3, [r7, #4]
8003214: 681b ldr r3, [r3, #0]
8003216: 4a14 ldr r2, [pc, #80] ; (8003268 <HAL_TIM_PWM_Start+0x13c>)
8003218: 4293 cmp r3, r2
800321a: d004 beq.n 8003226 <HAL_TIM_PWM_Start+0xfa>
800321c: 687b ldr r3, [r7, #4]
800321e: 681b ldr r3, [r3, #0]
8003220: 4a12 ldr r2, [pc, #72] ; (800326c <HAL_TIM_PWM_Start+0x140>)
8003222: 4293 cmp r3, r2
8003224: d111 bne.n 800324a <HAL_TIM_PWM_Start+0x11e>
{
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
8003226: 687b ldr r3, [r7, #4]
8003228: 681b ldr r3, [r3, #0]
800322a: 689b ldr r3, [r3, #8]
800322c: f003 0307 and.w r3, r3, #7
8003230: 60fb str r3, [r7, #12]
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
8003232: 68fb ldr r3, [r7, #12]
8003234: 2b06 cmp r3, #6
8003236: d010 beq.n 800325a <HAL_TIM_PWM_Start+0x12e>
{
__HAL_TIM_ENABLE(htim);
8003238: 687b ldr r3, [r7, #4]
800323a: 681b ldr r3, [r3, #0]
800323c: 681a ldr r2, [r3, #0]
800323e: 687b ldr r3, [r7, #4]
8003240: 681b ldr r3, [r3, #0]
8003242: f042 0201 orr.w r2, r2, #1
8003246: 601a str r2, [r3, #0]
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
8003248: e007 b.n 800325a <HAL_TIM_PWM_Start+0x12e>
}
}
else
{
__HAL_TIM_ENABLE(htim);
800324a: 687b ldr r3, [r7, #4]
800324c: 681b ldr r3, [r3, #0]
800324e: 681a ldr r2, [r3, #0]
8003250: 687b ldr r3, [r7, #4]
8003252: 681b ldr r3, [r3, #0]
8003254: f042 0201 orr.w r2, r2, #1
8003258: 601a str r2, [r3, #0]
}
/* Return function status */
return HAL_OK;
800325a: 2300 movs r3, #0
}
800325c: 4618 mov r0, r3
800325e: 3710 adds r7, #16
8003260: 46bd mov sp, r7
8003262: bd80 pop {r7, pc}
8003264: 40012c00 .word 0x40012c00
8003268: 40000400 .word 0x40000400
800326c: 40000800 .word 0x40000800
08003270 <HAL_TIM_Encoder_Init>:
* @param htim TIM Encoder Interface handle
* @param sConfig TIM Encoder Interface configuration structure
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_Encoder_Init(TIM_HandleTypeDef *htim, TIM_Encoder_InitTypeDef *sConfig)
{
8003270: b580 push {r7, lr}
8003272: b086 sub sp, #24
8003274: af00 add r7, sp, #0
8003276: 6078 str r0, [r7, #4]
8003278: 6039 str r1, [r7, #0]
uint32_t tmpsmcr;
uint32_t tmpccmr1;
uint32_t tmpccer;
/* Check the TIM handle allocation */
if (htim == NULL)
800327a: 687b ldr r3, [r7, #4]
800327c: 2b00 cmp r3, #0
800327e: d101 bne.n 8003284 <HAL_TIM_Encoder_Init+0x14>
{
return HAL_ERROR;
8003280: 2301 movs r3, #1
8003282: e093 b.n 80033ac <HAL_TIM_Encoder_Init+0x13c>
assert_param(IS_TIM_IC_PRESCALER(sConfig->IC1Prescaler));
assert_param(IS_TIM_IC_PRESCALER(sConfig->IC2Prescaler));
assert_param(IS_TIM_IC_FILTER(sConfig->IC1Filter));
assert_param(IS_TIM_IC_FILTER(sConfig->IC2Filter));
if (htim->State == HAL_TIM_STATE_RESET)
8003284: 687b ldr r3, [r7, #4]
8003286: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
800328a: b2db uxtb r3, r3
800328c: 2b00 cmp r3, #0
800328e: d106 bne.n 800329e <HAL_TIM_Encoder_Init+0x2e>
{
/* Allocate lock resource and initialize it */
htim->Lock = HAL_UNLOCKED;
8003290: 687b ldr r3, [r7, #4]
8003292: 2200 movs r2, #0
8003294: f883 203c strb.w r2, [r3, #60] ; 0x3c
}
/* Init the low level hardware : GPIO, CLOCK, NVIC */
htim->Encoder_MspInitCallback(htim);
#else
/* Init the low level hardware : GPIO, CLOCK, NVIC and DMA */
HAL_TIM_Encoder_MspInit(htim);
8003298: 6878 ldr r0, [r7, #4]
800329a: f7fd ffe5 bl 8001268 <HAL_TIM_Encoder_MspInit>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
/* Set the TIM state */
htim->State = HAL_TIM_STATE_BUSY;
800329e: 687b ldr r3, [r7, #4]
80032a0: 2202 movs r2, #2
80032a2: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Reset the SMS and ECE bits */
htim->Instance->SMCR &= ~(TIM_SMCR_SMS | TIM_SMCR_ECE);
80032a6: 687b ldr r3, [r7, #4]
80032a8: 681b ldr r3, [r3, #0]
80032aa: 689b ldr r3, [r3, #8]
80032ac: 687a ldr r2, [r7, #4]
80032ae: 6812 ldr r2, [r2, #0]
80032b0: f423 4380 bic.w r3, r3, #16384 ; 0x4000
80032b4: f023 0307 bic.w r3, r3, #7
80032b8: 6093 str r3, [r2, #8]
/* Configure the Time base in the Encoder Mode */
TIM_Base_SetConfig(htim->Instance, &htim->Init);
80032ba: 687b ldr r3, [r7, #4]
80032bc: 681a ldr r2, [r3, #0]
80032be: 687b ldr r3, [r7, #4]
80032c0: 3304 adds r3, #4
80032c2: 4619 mov r1, r3
80032c4: 4610 mov r0, r2
80032c6: f000 fbb1 bl 8003a2c <TIM_Base_SetConfig>
/* Get the TIMx SMCR register value */
tmpsmcr = htim->Instance->SMCR;
80032ca: 687b ldr r3, [r7, #4]
80032cc: 681b ldr r3, [r3, #0]
80032ce: 689b ldr r3, [r3, #8]
80032d0: 617b str r3, [r7, #20]
/* Get the TIMx CCMR1 register value */
tmpccmr1 = htim->Instance->CCMR1;
80032d2: 687b ldr r3, [r7, #4]
80032d4: 681b ldr r3, [r3, #0]
80032d6: 699b ldr r3, [r3, #24]
80032d8: 613b str r3, [r7, #16]
/* Get the TIMx CCER register value */
tmpccer = htim->Instance->CCER;
80032da: 687b ldr r3, [r7, #4]
80032dc: 681b ldr r3, [r3, #0]
80032de: 6a1b ldr r3, [r3, #32]
80032e0: 60fb str r3, [r7, #12]
/* Set the encoder Mode */
tmpsmcr |= sConfig->EncoderMode;
80032e2: 683b ldr r3, [r7, #0]
80032e4: 681b ldr r3, [r3, #0]
80032e6: 697a ldr r2, [r7, #20]
80032e8: 4313 orrs r3, r2
80032ea: 617b str r3, [r7, #20]
/* Select the Capture Compare 1 and the Capture Compare 2 as input */
tmpccmr1 &= ~(TIM_CCMR1_CC1S | TIM_CCMR1_CC2S);
80032ec: 693b ldr r3, [r7, #16]
80032ee: f423 7340 bic.w r3, r3, #768 ; 0x300
80032f2: f023 0303 bic.w r3, r3, #3
80032f6: 613b str r3, [r7, #16]
tmpccmr1 |= (sConfig->IC1Selection | (sConfig->IC2Selection << 8U));
80032f8: 683b ldr r3, [r7, #0]
80032fa: 689a ldr r2, [r3, #8]
80032fc: 683b ldr r3, [r7, #0]
80032fe: 699b ldr r3, [r3, #24]
8003300: 021b lsls r3, r3, #8
8003302: 4313 orrs r3, r2
8003304: 693a ldr r2, [r7, #16]
8003306: 4313 orrs r3, r2
8003308: 613b str r3, [r7, #16]
/* Set the Capture Compare 1 and the Capture Compare 2 prescalers and filters */
tmpccmr1 &= ~(TIM_CCMR1_IC1PSC | TIM_CCMR1_IC2PSC);
800330a: 693b ldr r3, [r7, #16]
800330c: f423 6340 bic.w r3, r3, #3072 ; 0xc00
8003310: f023 030c bic.w r3, r3, #12
8003314: 613b str r3, [r7, #16]
tmpccmr1 &= ~(TIM_CCMR1_IC1F | TIM_CCMR1_IC2F);
8003316: 693b ldr r3, [r7, #16]
8003318: f423 4370 bic.w r3, r3, #61440 ; 0xf000
800331c: f023 03f0 bic.w r3, r3, #240 ; 0xf0
8003320: 613b str r3, [r7, #16]
tmpccmr1 |= sConfig->IC1Prescaler | (sConfig->IC2Prescaler << 8U);
8003322: 683b ldr r3, [r7, #0]
8003324: 68da ldr r2, [r3, #12]
8003326: 683b ldr r3, [r7, #0]
8003328: 69db ldr r3, [r3, #28]
800332a: 021b lsls r3, r3, #8
800332c: 4313 orrs r3, r2
800332e: 693a ldr r2, [r7, #16]
8003330: 4313 orrs r3, r2
8003332: 613b str r3, [r7, #16]
tmpccmr1 |= (sConfig->IC1Filter << 4U) | (sConfig->IC2Filter << 12U);
8003334: 683b ldr r3, [r7, #0]
8003336: 691b ldr r3, [r3, #16]
8003338: 011a lsls r2, r3, #4
800333a: 683b ldr r3, [r7, #0]
800333c: 6a1b ldr r3, [r3, #32]
800333e: 031b lsls r3, r3, #12
8003340: 4313 orrs r3, r2
8003342: 693a ldr r2, [r7, #16]
8003344: 4313 orrs r3, r2
8003346: 613b str r3, [r7, #16]
/* Set the TI1 and the TI2 Polarities */
tmpccer &= ~(TIM_CCER_CC1P | TIM_CCER_CC2P);
8003348: 68fb ldr r3, [r7, #12]
800334a: f023 0322 bic.w r3, r3, #34 ; 0x22
800334e: 60fb str r3, [r7, #12]
tmpccer |= sConfig->IC1Polarity | (sConfig->IC2Polarity << 4U);
8003350: 683b ldr r3, [r7, #0]
8003352: 685a ldr r2, [r3, #4]
8003354: 683b ldr r3, [r7, #0]
8003356: 695b ldr r3, [r3, #20]
8003358: 011b lsls r3, r3, #4
800335a: 4313 orrs r3, r2
800335c: 68fa ldr r2, [r7, #12]
800335e: 4313 orrs r3, r2
8003360: 60fb str r3, [r7, #12]
/* Write to TIMx SMCR */
htim->Instance->SMCR = tmpsmcr;
8003362: 687b ldr r3, [r7, #4]
8003364: 681b ldr r3, [r3, #0]
8003366: 697a ldr r2, [r7, #20]
8003368: 609a str r2, [r3, #8]
/* Write to TIMx CCMR1 */
htim->Instance->CCMR1 = tmpccmr1;
800336a: 687b ldr r3, [r7, #4]
800336c: 681b ldr r3, [r3, #0]
800336e: 693a ldr r2, [r7, #16]
8003370: 619a str r2, [r3, #24]
/* Write to TIMx CCER */
htim->Instance->CCER = tmpccer;
8003372: 687b ldr r3, [r7, #4]
8003374: 681b ldr r3, [r3, #0]
8003376: 68fa ldr r2, [r7, #12]
8003378: 621a str r2, [r3, #32]
/* Initialize the DMA burst operation state */
htim->DMABurstState = HAL_DMA_BURST_STATE_READY;
800337a: 687b ldr r3, [r7, #4]
800337c: 2201 movs r2, #1
800337e: f883 2046 strb.w r2, [r3, #70] ; 0x46
/* Set the TIM channels state */
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY);
8003382: 687b ldr r3, [r7, #4]
8003384: 2201 movs r2, #1
8003386: f883 203e strb.w r2, [r3, #62] ; 0x3e
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY);
800338a: 687b ldr r3, [r7, #4]
800338c: 2201 movs r2, #1
800338e: f883 203f strb.w r2, [r3, #63] ; 0x3f
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_READY);
8003392: 687b ldr r3, [r7, #4]
8003394: 2201 movs r2, #1
8003396: f883 2042 strb.w r2, [r3, #66] ; 0x42
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_READY);
800339a: 687b ldr r3, [r7, #4]
800339c: 2201 movs r2, #1
800339e: f883 2043 strb.w r2, [r3, #67] ; 0x43
/* Initialize the TIM state*/
htim->State = HAL_TIM_STATE_READY;
80033a2: 687b ldr r3, [r7, #4]
80033a4: 2201 movs r2, #1
80033a6: f883 203d strb.w r2, [r3, #61] ; 0x3d
return HAL_OK;
80033aa: 2300 movs r3, #0
}
80033ac: 4618 mov r0, r3
80033ae: 3718 adds r7, #24
80033b0: 46bd mov sp, r7
80033b2: bd80 pop {r7, pc}
080033b4 <HAL_TIM_Encoder_Start>:
* @arg TIM_CHANNEL_2: TIM Channel 2 selected
* @arg TIM_CHANNEL_ALL: TIM Channel 1 and TIM Channel 2 are selected
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_Encoder_Start(TIM_HandleTypeDef *htim, uint32_t Channel)
{
80033b4: b580 push {r7, lr}
80033b6: b084 sub sp, #16
80033b8: af00 add r7, sp, #0
80033ba: 6078 str r0, [r7, #4]
80033bc: 6039 str r1, [r7, #0]
HAL_TIM_ChannelStateTypeDef channel_1_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_1);
80033be: 687b ldr r3, [r7, #4]
80033c0: f893 303e ldrb.w r3, [r3, #62] ; 0x3e
80033c4: 73fb strb r3, [r7, #15]
HAL_TIM_ChannelStateTypeDef channel_2_state = TIM_CHANNEL_STATE_GET(htim, TIM_CHANNEL_2);
80033c6: 687b ldr r3, [r7, #4]
80033c8: f893 303f ldrb.w r3, [r3, #63] ; 0x3f
80033cc: 73bb strb r3, [r7, #14]
HAL_TIM_ChannelStateTypeDef complementary_channel_1_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_1);
80033ce: 687b ldr r3, [r7, #4]
80033d0: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
80033d4: 737b strb r3, [r7, #13]
HAL_TIM_ChannelStateTypeDef complementary_channel_2_state = TIM_CHANNEL_N_STATE_GET(htim, TIM_CHANNEL_2);
80033d6: 687b ldr r3, [r7, #4]
80033d8: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
80033dc: 733b strb r3, [r7, #12]
/* Check the parameters */
assert_param(IS_TIM_ENCODER_INTERFACE_INSTANCE(htim->Instance));
/* Set the TIM channel(s) state */
if (Channel == TIM_CHANNEL_1)
80033de: 683b ldr r3, [r7, #0]
80033e0: 2b00 cmp r3, #0
80033e2: d110 bne.n 8003406 <HAL_TIM_Encoder_Start+0x52>
{
if ((channel_1_state != HAL_TIM_CHANNEL_STATE_READY)
80033e4: 7bfb ldrb r3, [r7, #15]
80033e6: 2b01 cmp r3, #1
80033e8: d102 bne.n 80033f0 <HAL_TIM_Encoder_Start+0x3c>
|| (complementary_channel_1_state != HAL_TIM_CHANNEL_STATE_READY))
80033ea: 7b7b ldrb r3, [r7, #13]
80033ec: 2b01 cmp r3, #1
80033ee: d001 beq.n 80033f4 <HAL_TIM_Encoder_Start+0x40>
{
return HAL_ERROR;
80033f0: 2301 movs r3, #1
80033f2: e069 b.n 80034c8 <HAL_TIM_Encoder_Start+0x114>
}
else
{
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY);
80033f4: 687b ldr r3, [r7, #4]
80033f6: 2202 movs r2, #2
80033f8: f883 203e strb.w r2, [r3, #62] ; 0x3e
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY);
80033fc: 687b ldr r3, [r7, #4]
80033fe: 2202 movs r2, #2
8003400: f883 2042 strb.w r2, [r3, #66] ; 0x42
8003404: e031 b.n 800346a <HAL_TIM_Encoder_Start+0xb6>
}
}
else if (Channel == TIM_CHANNEL_2)
8003406: 683b ldr r3, [r7, #0]
8003408: 2b04 cmp r3, #4
800340a: d110 bne.n 800342e <HAL_TIM_Encoder_Start+0x7a>
{
if ((channel_2_state != HAL_TIM_CHANNEL_STATE_READY)
800340c: 7bbb ldrb r3, [r7, #14]
800340e: 2b01 cmp r3, #1
8003410: d102 bne.n 8003418 <HAL_TIM_Encoder_Start+0x64>
|| (complementary_channel_2_state != HAL_TIM_CHANNEL_STATE_READY))
8003412: 7b3b ldrb r3, [r7, #12]
8003414: 2b01 cmp r3, #1
8003416: d001 beq.n 800341c <HAL_TIM_Encoder_Start+0x68>
{
return HAL_ERROR;
8003418: 2301 movs r3, #1
800341a: e055 b.n 80034c8 <HAL_TIM_Encoder_Start+0x114>
}
else
{
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY);
800341c: 687b ldr r3, [r7, #4]
800341e: 2202 movs r2, #2
8003420: f883 203f strb.w r2, [r3, #63] ; 0x3f
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY);
8003424: 687b ldr r3, [r7, #4]
8003426: 2202 movs r2, #2
8003428: f883 2043 strb.w r2, [r3, #67] ; 0x43
800342c: e01d b.n 800346a <HAL_TIM_Encoder_Start+0xb6>
}
}
else
{
if ((channel_1_state != HAL_TIM_CHANNEL_STATE_READY)
800342e: 7bfb ldrb r3, [r7, #15]
8003430: 2b01 cmp r3, #1
8003432: d108 bne.n 8003446 <HAL_TIM_Encoder_Start+0x92>
|| (channel_2_state != HAL_TIM_CHANNEL_STATE_READY)
8003434: 7bbb ldrb r3, [r7, #14]
8003436: 2b01 cmp r3, #1
8003438: d105 bne.n 8003446 <HAL_TIM_Encoder_Start+0x92>
|| (complementary_channel_1_state != HAL_TIM_CHANNEL_STATE_READY)
800343a: 7b7b ldrb r3, [r7, #13]
800343c: 2b01 cmp r3, #1
800343e: d102 bne.n 8003446 <HAL_TIM_Encoder_Start+0x92>
|| (complementary_channel_2_state != HAL_TIM_CHANNEL_STATE_READY))
8003440: 7b3b ldrb r3, [r7, #12]
8003442: 2b01 cmp r3, #1
8003444: d001 beq.n 800344a <HAL_TIM_Encoder_Start+0x96>
{
return HAL_ERROR;
8003446: 2301 movs r3, #1
8003448: e03e b.n 80034c8 <HAL_TIM_Encoder_Start+0x114>
}
else
{
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY);
800344a: 687b ldr r3, [r7, #4]
800344c: 2202 movs r2, #2
800344e: f883 203e strb.w r2, [r3, #62] ; 0x3e
TIM_CHANNEL_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY);
8003452: 687b ldr r3, [r7, #4]
8003454: 2202 movs r2, #2
8003456: f883 203f strb.w r2, [r3, #63] ; 0x3f
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_1, HAL_TIM_CHANNEL_STATE_BUSY);
800345a: 687b ldr r3, [r7, #4]
800345c: 2202 movs r2, #2
800345e: f883 2042 strb.w r2, [r3, #66] ; 0x42
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_2, HAL_TIM_CHANNEL_STATE_BUSY);
8003462: 687b ldr r3, [r7, #4]
8003464: 2202 movs r2, #2
8003466: f883 2043 strb.w r2, [r3, #67] ; 0x43
}
}
/* Enable the encoder interface channels */
switch (Channel)
800346a: 683b ldr r3, [r7, #0]
800346c: 2b00 cmp r3, #0
800346e: d003 beq.n 8003478 <HAL_TIM_Encoder_Start+0xc4>
8003470: 683b ldr r3, [r7, #0]
8003472: 2b04 cmp r3, #4
8003474: d008 beq.n 8003488 <HAL_TIM_Encoder_Start+0xd4>
8003476: e00f b.n 8003498 <HAL_TIM_Encoder_Start+0xe4>
{
case TIM_CHANNEL_1:
{
TIM_CCxChannelCmd(htim->Instance, TIM_CHANNEL_1, TIM_CCx_ENABLE);
8003478: 687b ldr r3, [r7, #4]
800347a: 681b ldr r3, [r3, #0]
800347c: 2201 movs r2, #1
800347e: 2100 movs r1, #0
8003480: 4618 mov r0, r3
8003482: f000 fd53 bl 8003f2c <TIM_CCxChannelCmd>
break;
8003486: e016 b.n 80034b6 <HAL_TIM_Encoder_Start+0x102>
}
case TIM_CHANNEL_2:
{
TIM_CCxChannelCmd(htim->Instance, TIM_CHANNEL_2, TIM_CCx_ENABLE);
8003488: 687b ldr r3, [r7, #4]
800348a: 681b ldr r3, [r3, #0]
800348c: 2201 movs r2, #1
800348e: 2104 movs r1, #4
8003490: 4618 mov r0, r3
8003492: f000 fd4b bl 8003f2c <TIM_CCxChannelCmd>
break;
8003496: e00e b.n 80034b6 <HAL_TIM_Encoder_Start+0x102>
}
default :
{
TIM_CCxChannelCmd(htim->Instance, TIM_CHANNEL_1, TIM_CCx_ENABLE);
8003498: 687b ldr r3, [r7, #4]
800349a: 681b ldr r3, [r3, #0]
800349c: 2201 movs r2, #1
800349e: 2100 movs r1, #0
80034a0: 4618 mov r0, r3
80034a2: f000 fd43 bl 8003f2c <TIM_CCxChannelCmd>
TIM_CCxChannelCmd(htim->Instance, TIM_CHANNEL_2, TIM_CCx_ENABLE);
80034a6: 687b ldr r3, [r7, #4]
80034a8: 681b ldr r3, [r3, #0]
80034aa: 2201 movs r2, #1
80034ac: 2104 movs r1, #4
80034ae: 4618 mov r0, r3
80034b0: f000 fd3c bl 8003f2c <TIM_CCxChannelCmd>
break;
80034b4: bf00 nop
}
}
/* Enable the Peripheral */
__HAL_TIM_ENABLE(htim);
80034b6: 687b ldr r3, [r7, #4]
80034b8: 681b ldr r3, [r3, #0]
80034ba: 681a ldr r2, [r3, #0]
80034bc: 687b ldr r3, [r7, #4]
80034be: 681b ldr r3, [r3, #0]
80034c0: f042 0201 orr.w r2, r2, #1
80034c4: 601a str r2, [r3, #0]
/* Return function status */
return HAL_OK;
80034c6: 2300 movs r3, #0
}
80034c8: 4618 mov r0, r3
80034ca: 3710 adds r7, #16
80034cc: 46bd mov sp, r7
80034ce: bd80 pop {r7, pc}
080034d0 <HAL_TIM_IRQHandler>:
* @brief This function handles TIM interrupts requests.
* @param htim TIM handle
* @retval None
*/
void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
{
80034d0: b580 push {r7, lr}
80034d2: b082 sub sp, #8
80034d4: af00 add r7, sp, #0
80034d6: 6078 str r0, [r7, #4]
/* Capture compare 1 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC1) != RESET)
80034d8: 687b ldr r3, [r7, #4]
80034da: 681b ldr r3, [r3, #0]
80034dc: 691b ldr r3, [r3, #16]
80034de: f003 0302 and.w r3, r3, #2
80034e2: 2b02 cmp r3, #2
80034e4: d122 bne.n 800352c <HAL_TIM_IRQHandler+0x5c>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC1) != RESET)
80034e6: 687b ldr r3, [r7, #4]
80034e8: 681b ldr r3, [r3, #0]
80034ea: 68db ldr r3, [r3, #12]
80034ec: f003 0302 and.w r3, r3, #2
80034f0: 2b02 cmp r3, #2
80034f2: d11b bne.n 800352c <HAL_TIM_IRQHandler+0x5c>
{
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC1);
80034f4: 687b ldr r3, [r7, #4]
80034f6: 681b ldr r3, [r3, #0]
80034f8: f06f 0202 mvn.w r2, #2
80034fc: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1;
80034fe: 687b ldr r3, [r7, #4]
8003500: 2201 movs r2, #1
8003502: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR1 & TIM_CCMR1_CC1S) != 0x00U)
8003504: 687b ldr r3, [r7, #4]
8003506: 681b ldr r3, [r3, #0]
8003508: 699b ldr r3, [r3, #24]
800350a: f003 0303 and.w r3, r3, #3
800350e: 2b00 cmp r3, #0
8003510: d003 beq.n 800351a <HAL_TIM_IRQHandler+0x4a>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
8003512: 6878 ldr r0, [r7, #4]
8003514: f000 fa6f bl 80039f6 <HAL_TIM_IC_CaptureCallback>
8003518: e005 b.n 8003526 <HAL_TIM_IRQHandler+0x56>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
800351a: 6878 ldr r0, [r7, #4]
800351c: f000 fa62 bl 80039e4 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
8003520: 6878 ldr r0, [r7, #4]
8003522: f000 fa71 bl 8003a08 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
8003526: 687b ldr r3, [r7, #4]
8003528: 2200 movs r2, #0
800352a: 771a strb r2, [r3, #28]
}
}
}
/* Capture compare 2 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC2) != RESET)
800352c: 687b ldr r3, [r7, #4]
800352e: 681b ldr r3, [r3, #0]
8003530: 691b ldr r3, [r3, #16]
8003532: f003 0304 and.w r3, r3, #4
8003536: 2b04 cmp r3, #4
8003538: d122 bne.n 8003580 <HAL_TIM_IRQHandler+0xb0>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC2) != RESET)
800353a: 687b ldr r3, [r7, #4]
800353c: 681b ldr r3, [r3, #0]
800353e: 68db ldr r3, [r3, #12]
8003540: f003 0304 and.w r3, r3, #4
8003544: 2b04 cmp r3, #4
8003546: d11b bne.n 8003580 <HAL_TIM_IRQHandler+0xb0>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC2);
8003548: 687b ldr r3, [r7, #4]
800354a: 681b ldr r3, [r3, #0]
800354c: f06f 0204 mvn.w r2, #4
8003550: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2;
8003552: 687b ldr r3, [r7, #4]
8003554: 2202 movs r2, #2
8003556: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U)
8003558: 687b ldr r3, [r7, #4]
800355a: 681b ldr r3, [r3, #0]
800355c: 699b ldr r3, [r3, #24]
800355e: f403 7340 and.w r3, r3, #768 ; 0x300
8003562: 2b00 cmp r3, #0
8003564: d003 beq.n 800356e <HAL_TIM_IRQHandler+0x9e>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
8003566: 6878 ldr r0, [r7, #4]
8003568: f000 fa45 bl 80039f6 <HAL_TIM_IC_CaptureCallback>
800356c: e005 b.n 800357a <HAL_TIM_IRQHandler+0xaa>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
800356e: 6878 ldr r0, [r7, #4]
8003570: f000 fa38 bl 80039e4 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
8003574: 6878 ldr r0, [r7, #4]
8003576: f000 fa47 bl 8003a08 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
800357a: 687b ldr r3, [r7, #4]
800357c: 2200 movs r2, #0
800357e: 771a strb r2, [r3, #28]
}
}
/* Capture compare 3 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC3) != RESET)
8003580: 687b ldr r3, [r7, #4]
8003582: 681b ldr r3, [r3, #0]
8003584: 691b ldr r3, [r3, #16]
8003586: f003 0308 and.w r3, r3, #8
800358a: 2b08 cmp r3, #8
800358c: d122 bne.n 80035d4 <HAL_TIM_IRQHandler+0x104>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC3) != RESET)
800358e: 687b ldr r3, [r7, #4]
8003590: 681b ldr r3, [r3, #0]
8003592: 68db ldr r3, [r3, #12]
8003594: f003 0308 and.w r3, r3, #8
8003598: 2b08 cmp r3, #8
800359a: d11b bne.n 80035d4 <HAL_TIM_IRQHandler+0x104>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC3);
800359c: 687b ldr r3, [r7, #4]
800359e: 681b ldr r3, [r3, #0]
80035a0: f06f 0208 mvn.w r2, #8
80035a4: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3;
80035a6: 687b ldr r3, [r7, #4]
80035a8: 2204 movs r2, #4
80035aa: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U)
80035ac: 687b ldr r3, [r7, #4]
80035ae: 681b ldr r3, [r3, #0]
80035b0: 69db ldr r3, [r3, #28]
80035b2: f003 0303 and.w r3, r3, #3
80035b6: 2b00 cmp r3, #0
80035b8: d003 beq.n 80035c2 <HAL_TIM_IRQHandler+0xf2>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
80035ba: 6878 ldr r0, [r7, #4]
80035bc: f000 fa1b bl 80039f6 <HAL_TIM_IC_CaptureCallback>
80035c0: e005 b.n 80035ce <HAL_TIM_IRQHandler+0xfe>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
80035c2: 6878 ldr r0, [r7, #4]
80035c4: f000 fa0e bl 80039e4 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
80035c8: 6878 ldr r0, [r7, #4]
80035ca: f000 fa1d bl 8003a08 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
80035ce: 687b ldr r3, [r7, #4]
80035d0: 2200 movs r2, #0
80035d2: 771a strb r2, [r3, #28]
}
}
/* Capture compare 4 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC4) != RESET)
80035d4: 687b ldr r3, [r7, #4]
80035d6: 681b ldr r3, [r3, #0]
80035d8: 691b ldr r3, [r3, #16]
80035da: f003 0310 and.w r3, r3, #16
80035de: 2b10 cmp r3, #16
80035e0: d122 bne.n 8003628 <HAL_TIM_IRQHandler+0x158>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC4) != RESET)
80035e2: 687b ldr r3, [r7, #4]
80035e4: 681b ldr r3, [r3, #0]
80035e6: 68db ldr r3, [r3, #12]
80035e8: f003 0310 and.w r3, r3, #16
80035ec: 2b10 cmp r3, #16
80035ee: d11b bne.n 8003628 <HAL_TIM_IRQHandler+0x158>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC4);
80035f0: 687b ldr r3, [r7, #4]
80035f2: 681b ldr r3, [r3, #0]
80035f4: f06f 0210 mvn.w r2, #16
80035f8: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4;
80035fa: 687b ldr r3, [r7, #4]
80035fc: 2208 movs r2, #8
80035fe: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U)
8003600: 687b ldr r3, [r7, #4]
8003602: 681b ldr r3, [r3, #0]
8003604: 69db ldr r3, [r3, #28]
8003606: f403 7340 and.w r3, r3, #768 ; 0x300
800360a: 2b00 cmp r3, #0
800360c: d003 beq.n 8003616 <HAL_TIM_IRQHandler+0x146>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
800360e: 6878 ldr r0, [r7, #4]
8003610: f000 f9f1 bl 80039f6 <HAL_TIM_IC_CaptureCallback>
8003614: e005 b.n 8003622 <HAL_TIM_IRQHandler+0x152>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
8003616: 6878 ldr r0, [r7, #4]
8003618: f000 f9e4 bl 80039e4 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
800361c: 6878 ldr r0, [r7, #4]
800361e: f000 f9f3 bl 8003a08 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
8003622: 687b ldr r3, [r7, #4]
8003624: 2200 movs r2, #0
8003626: 771a strb r2, [r3, #28]
}
}
/* TIM Update event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_UPDATE) != RESET)
8003628: 687b ldr r3, [r7, #4]
800362a: 681b ldr r3, [r3, #0]
800362c: 691b ldr r3, [r3, #16]
800362e: f003 0301 and.w r3, r3, #1
8003632: 2b01 cmp r3, #1
8003634: d10e bne.n 8003654 <HAL_TIM_IRQHandler+0x184>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_UPDATE) != RESET)
8003636: 687b ldr r3, [r7, #4]
8003638: 681b ldr r3, [r3, #0]
800363a: 68db ldr r3, [r3, #12]
800363c: f003 0301 and.w r3, r3, #1
8003640: 2b01 cmp r3, #1
8003642: d107 bne.n 8003654 <HAL_TIM_IRQHandler+0x184>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_UPDATE);
8003644: 687b ldr r3, [r7, #4]
8003646: 681b ldr r3, [r3, #0]
8003648: f06f 0201 mvn.w r2, #1
800364c: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->PeriodElapsedCallback(htim);
#else
HAL_TIM_PeriodElapsedCallback(htim);
800364e: 6878 ldr r0, [r7, #4]
8003650: f7fd f8f0 bl 8000834 <HAL_TIM_PeriodElapsedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM Break input event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK) != RESET)
8003654: 687b ldr r3, [r7, #4]
8003656: 681b ldr r3, [r3, #0]
8003658: 691b ldr r3, [r3, #16]
800365a: f003 0380 and.w r3, r3, #128 ; 0x80
800365e: 2b80 cmp r3, #128 ; 0x80
8003660: d10e bne.n 8003680 <HAL_TIM_IRQHandler+0x1b0>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET)
8003662: 687b ldr r3, [r7, #4]
8003664: 681b ldr r3, [r3, #0]
8003666: 68db ldr r3, [r3, #12]
8003668: f003 0380 and.w r3, r3, #128 ; 0x80
800366c: 2b80 cmp r3, #128 ; 0x80
800366e: d107 bne.n 8003680 <HAL_TIM_IRQHandler+0x1b0>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_BREAK);
8003670: 687b ldr r3, [r7, #4]
8003672: 681b ldr r3, [r3, #0]
8003674: f06f 0280 mvn.w r2, #128 ; 0x80
8003678: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->BreakCallback(htim);
#else
HAL_TIMEx_BreakCallback(htim);
800367a: 6878 ldr r0, [r7, #4]
800367c: f000 fce1 bl 8004042 <HAL_TIMEx_BreakCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM Trigger detection event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_TRIGGER) != RESET)
8003680: 687b ldr r3, [r7, #4]
8003682: 681b ldr r3, [r3, #0]
8003684: 691b ldr r3, [r3, #16]
8003686: f003 0340 and.w r3, r3, #64 ; 0x40
800368a: 2b40 cmp r3, #64 ; 0x40
800368c: d10e bne.n 80036ac <HAL_TIM_IRQHandler+0x1dc>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_TRIGGER) != RESET)
800368e: 687b ldr r3, [r7, #4]
8003690: 681b ldr r3, [r3, #0]
8003692: 68db ldr r3, [r3, #12]
8003694: f003 0340 and.w r3, r3, #64 ; 0x40
8003698: 2b40 cmp r3, #64 ; 0x40
800369a: d107 bne.n 80036ac <HAL_TIM_IRQHandler+0x1dc>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_TRIGGER);
800369c: 687b ldr r3, [r7, #4]
800369e: 681b ldr r3, [r3, #0]
80036a0: f06f 0240 mvn.w r2, #64 ; 0x40
80036a4: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->TriggerCallback(htim);
#else
HAL_TIM_TriggerCallback(htim);
80036a6: 6878 ldr r0, [r7, #4]
80036a8: f000 f9b7 bl 8003a1a <HAL_TIM_TriggerCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM commutation event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_COM) != RESET)
80036ac: 687b ldr r3, [r7, #4]
80036ae: 681b ldr r3, [r3, #0]
80036b0: 691b ldr r3, [r3, #16]
80036b2: f003 0320 and.w r3, r3, #32
80036b6: 2b20 cmp r3, #32
80036b8: d10e bne.n 80036d8 <HAL_TIM_IRQHandler+0x208>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_COM) != RESET)
80036ba: 687b ldr r3, [r7, #4]
80036bc: 681b ldr r3, [r3, #0]
80036be: 68db ldr r3, [r3, #12]
80036c0: f003 0320 and.w r3, r3, #32
80036c4: 2b20 cmp r3, #32
80036c6: d107 bne.n 80036d8 <HAL_TIM_IRQHandler+0x208>
{
__HAL_TIM_CLEAR_IT(htim, TIM_FLAG_COM);
80036c8: 687b ldr r3, [r7, #4]
80036ca: 681b ldr r3, [r3, #0]
80036cc: f06f 0220 mvn.w r2, #32
80036d0: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->CommutationCallback(htim);
#else
HAL_TIMEx_CommutCallback(htim);
80036d2: 6878 ldr r0, [r7, #4]
80036d4: f000 fcac bl 8004030 <HAL_TIMEx_CommutCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
}
80036d8: bf00 nop
80036da: 3708 adds r7, #8
80036dc: 46bd mov sp, r7
80036de: bd80 pop {r7, pc}
080036e0 <HAL_TIM_PWM_ConfigChannel>:
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim,
TIM_OC_InitTypeDef *sConfig,
uint32_t Channel)
{
80036e0: b580 push {r7, lr}
80036e2: b084 sub sp, #16
80036e4: af00 add r7, sp, #0
80036e6: 60f8 str r0, [r7, #12]
80036e8: 60b9 str r1, [r7, #8]
80036ea: 607a str r2, [r7, #4]
assert_param(IS_TIM_PWM_MODE(sConfig->OCMode));
assert_param(IS_TIM_OC_POLARITY(sConfig->OCPolarity));
assert_param(IS_TIM_FAST_STATE(sConfig->OCFastMode));
/* Process Locked */
__HAL_LOCK(htim);
80036ec: 68fb ldr r3, [r7, #12]
80036ee: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
80036f2: 2b01 cmp r3, #1
80036f4: d101 bne.n 80036fa <HAL_TIM_PWM_ConfigChannel+0x1a>
80036f6: 2302 movs r3, #2
80036f8: e0ac b.n 8003854 <HAL_TIM_PWM_ConfigChannel+0x174>
80036fa: 68fb ldr r3, [r7, #12]
80036fc: 2201 movs r2, #1
80036fe: f883 203c strb.w r2, [r3, #60] ; 0x3c
switch (Channel)
8003702: 687b ldr r3, [r7, #4]
8003704: 2b0c cmp r3, #12
8003706: f200 809f bhi.w 8003848 <HAL_TIM_PWM_ConfigChannel+0x168>
800370a: a201 add r2, pc, #4 ; (adr r2, 8003710 <HAL_TIM_PWM_ConfigChannel+0x30>)
800370c: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8003710: 08003745 .word 0x08003745
8003714: 08003849 .word 0x08003849
8003718: 08003849 .word 0x08003849
800371c: 08003849 .word 0x08003849
8003720: 08003785 .word 0x08003785
8003724: 08003849 .word 0x08003849
8003728: 08003849 .word 0x08003849
800372c: 08003849 .word 0x08003849
8003730: 080037c7 .word 0x080037c7
8003734: 08003849 .word 0x08003849
8003738: 08003849 .word 0x08003849
800373c: 08003849 .word 0x08003849
8003740: 08003807 .word 0x08003807
{
/* Check the parameters */
assert_param(IS_TIM_CC1_INSTANCE(htim->Instance));
/* Configure the Channel 1 in PWM mode */
TIM_OC1_SetConfig(htim->Instance, sConfig);
8003744: 68fb ldr r3, [r7, #12]
8003746: 681b ldr r3, [r3, #0]
8003748: 68b9 ldr r1, [r7, #8]
800374a: 4618 mov r0, r3
800374c: f000 f9d0 bl 8003af0 <TIM_OC1_SetConfig>
/* Set the Preload enable bit for channel1 */
htim->Instance->CCMR1 |= TIM_CCMR1_OC1PE;
8003750: 68fb ldr r3, [r7, #12]
8003752: 681b ldr r3, [r3, #0]
8003754: 699a ldr r2, [r3, #24]
8003756: 68fb ldr r3, [r7, #12]
8003758: 681b ldr r3, [r3, #0]
800375a: f042 0208 orr.w r2, r2, #8
800375e: 619a str r2, [r3, #24]
/* Configure the Output Fast mode */
htim->Instance->CCMR1 &= ~TIM_CCMR1_OC1FE;
8003760: 68fb ldr r3, [r7, #12]
8003762: 681b ldr r3, [r3, #0]
8003764: 699a ldr r2, [r3, #24]
8003766: 68fb ldr r3, [r7, #12]
8003768: 681b ldr r3, [r3, #0]
800376a: f022 0204 bic.w r2, r2, #4
800376e: 619a str r2, [r3, #24]
htim->Instance->CCMR1 |= sConfig->OCFastMode;
8003770: 68fb ldr r3, [r7, #12]
8003772: 681b ldr r3, [r3, #0]
8003774: 6999 ldr r1, [r3, #24]
8003776: 68bb ldr r3, [r7, #8]
8003778: 691a ldr r2, [r3, #16]
800377a: 68fb ldr r3, [r7, #12]
800377c: 681b ldr r3, [r3, #0]
800377e: 430a orrs r2, r1
8003780: 619a str r2, [r3, #24]
break;
8003782: e062 b.n 800384a <HAL_TIM_PWM_ConfigChannel+0x16a>
{
/* Check the parameters */
assert_param(IS_TIM_CC2_INSTANCE(htim->Instance));
/* Configure the Channel 2 in PWM mode */
TIM_OC2_SetConfig(htim->Instance, sConfig);
8003784: 68fb ldr r3, [r7, #12]
8003786: 681b ldr r3, [r3, #0]
8003788: 68b9 ldr r1, [r7, #8]
800378a: 4618 mov r0, r3
800378c: f000 fa16 bl 8003bbc <TIM_OC2_SetConfig>
/* Set the Preload enable bit for channel2 */
htim->Instance->CCMR1 |= TIM_CCMR1_OC2PE;
8003790: 68fb ldr r3, [r7, #12]
8003792: 681b ldr r3, [r3, #0]
8003794: 699a ldr r2, [r3, #24]
8003796: 68fb ldr r3, [r7, #12]
8003798: 681b ldr r3, [r3, #0]
800379a: f442 6200 orr.w r2, r2, #2048 ; 0x800
800379e: 619a str r2, [r3, #24]
/* Configure the Output Fast mode */
htim->Instance->CCMR1 &= ~TIM_CCMR1_OC2FE;
80037a0: 68fb ldr r3, [r7, #12]
80037a2: 681b ldr r3, [r3, #0]
80037a4: 699a ldr r2, [r3, #24]
80037a6: 68fb ldr r3, [r7, #12]
80037a8: 681b ldr r3, [r3, #0]
80037aa: f422 6280 bic.w r2, r2, #1024 ; 0x400
80037ae: 619a str r2, [r3, #24]
htim->Instance->CCMR1 |= sConfig->OCFastMode << 8U;
80037b0: 68fb ldr r3, [r7, #12]
80037b2: 681b ldr r3, [r3, #0]
80037b4: 6999 ldr r1, [r3, #24]
80037b6: 68bb ldr r3, [r7, #8]
80037b8: 691b ldr r3, [r3, #16]
80037ba: 021a lsls r2, r3, #8
80037bc: 68fb ldr r3, [r7, #12]
80037be: 681b ldr r3, [r3, #0]
80037c0: 430a orrs r2, r1
80037c2: 619a str r2, [r3, #24]
break;
80037c4: e041 b.n 800384a <HAL_TIM_PWM_ConfigChannel+0x16a>
{
/* Check the parameters */
assert_param(IS_TIM_CC3_INSTANCE(htim->Instance));
/* Configure the Channel 3 in PWM mode */
TIM_OC3_SetConfig(htim->Instance, sConfig);
80037c6: 68fb ldr r3, [r7, #12]
80037c8: 681b ldr r3, [r3, #0]
80037ca: 68b9 ldr r1, [r7, #8]
80037cc: 4618 mov r0, r3
80037ce: f000 fa5f bl 8003c90 <TIM_OC3_SetConfig>
/* Set the Preload enable bit for channel3 */
htim->Instance->CCMR2 |= TIM_CCMR2_OC3PE;
80037d2: 68fb ldr r3, [r7, #12]
80037d4: 681b ldr r3, [r3, #0]
80037d6: 69da ldr r2, [r3, #28]
80037d8: 68fb ldr r3, [r7, #12]
80037da: 681b ldr r3, [r3, #0]
80037dc: f042 0208 orr.w r2, r2, #8
80037e0: 61da str r2, [r3, #28]
/* Configure the Output Fast mode */
htim->Instance->CCMR2 &= ~TIM_CCMR2_OC3FE;
80037e2: 68fb ldr r3, [r7, #12]
80037e4: 681b ldr r3, [r3, #0]
80037e6: 69da ldr r2, [r3, #28]
80037e8: 68fb ldr r3, [r7, #12]
80037ea: 681b ldr r3, [r3, #0]
80037ec: f022 0204 bic.w r2, r2, #4
80037f0: 61da str r2, [r3, #28]
htim->Instance->CCMR2 |= sConfig->OCFastMode;
80037f2: 68fb ldr r3, [r7, #12]
80037f4: 681b ldr r3, [r3, #0]
80037f6: 69d9 ldr r1, [r3, #28]
80037f8: 68bb ldr r3, [r7, #8]
80037fa: 691a ldr r2, [r3, #16]
80037fc: 68fb ldr r3, [r7, #12]
80037fe: 681b ldr r3, [r3, #0]
8003800: 430a orrs r2, r1
8003802: 61da str r2, [r3, #28]
break;
8003804: e021 b.n 800384a <HAL_TIM_PWM_ConfigChannel+0x16a>
{
/* Check the parameters */
assert_param(IS_TIM_CC4_INSTANCE(htim->Instance));
/* Configure the Channel 4 in PWM mode */
TIM_OC4_SetConfig(htim->Instance, sConfig);
8003806: 68fb ldr r3, [r7, #12]
8003808: 681b ldr r3, [r3, #0]
800380a: 68b9 ldr r1, [r7, #8]
800380c: 4618 mov r0, r3
800380e: f000 faa9 bl 8003d64 <TIM_OC4_SetConfig>
/* Set the Preload enable bit for channel4 */
htim->Instance->CCMR2 |= TIM_CCMR2_OC4PE;
8003812: 68fb ldr r3, [r7, #12]
8003814: 681b ldr r3, [r3, #0]
8003816: 69da ldr r2, [r3, #28]
8003818: 68fb ldr r3, [r7, #12]
800381a: 681b ldr r3, [r3, #0]
800381c: f442 6200 orr.w r2, r2, #2048 ; 0x800
8003820: 61da str r2, [r3, #28]
/* Configure the Output Fast mode */
htim->Instance->CCMR2 &= ~TIM_CCMR2_OC4FE;
8003822: 68fb ldr r3, [r7, #12]
8003824: 681b ldr r3, [r3, #0]
8003826: 69da ldr r2, [r3, #28]
8003828: 68fb ldr r3, [r7, #12]
800382a: 681b ldr r3, [r3, #0]
800382c: f422 6280 bic.w r2, r2, #1024 ; 0x400
8003830: 61da str r2, [r3, #28]
htim->Instance->CCMR2 |= sConfig->OCFastMode << 8U;
8003832: 68fb ldr r3, [r7, #12]
8003834: 681b ldr r3, [r3, #0]
8003836: 69d9 ldr r1, [r3, #28]
8003838: 68bb ldr r3, [r7, #8]
800383a: 691b ldr r3, [r3, #16]
800383c: 021a lsls r2, r3, #8
800383e: 68fb ldr r3, [r7, #12]
8003840: 681b ldr r3, [r3, #0]
8003842: 430a orrs r2, r1
8003844: 61da str r2, [r3, #28]
break;
8003846: e000 b.n 800384a <HAL_TIM_PWM_ConfigChannel+0x16a>
}
default:
break;
8003848: bf00 nop
}
__HAL_UNLOCK(htim);
800384a: 68fb ldr r3, [r7, #12]
800384c: 2200 movs r2, #0
800384e: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_OK;
8003852: 2300 movs r3, #0
}
8003854: 4618 mov r0, r3
8003856: 3710 adds r7, #16
8003858: 46bd mov sp, r7
800385a: bd80 pop {r7, pc}
0800385c <HAL_TIM_ConfigClockSource>:
* @param sClockSourceConfig pointer to a TIM_ClockConfigTypeDef structure that
* contains the clock source information for the TIM peripheral.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_ConfigClockSource(TIM_HandleTypeDef *htim, TIM_ClockConfigTypeDef *sClockSourceConfig)
{
800385c: b580 push {r7, lr}
800385e: b084 sub sp, #16
8003860: af00 add r7, sp, #0
8003862: 6078 str r0, [r7, #4]
8003864: 6039 str r1, [r7, #0]
uint32_t tmpsmcr;
/* Process Locked */
__HAL_LOCK(htim);
8003866: 687b ldr r3, [r7, #4]
8003868: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
800386c: 2b01 cmp r3, #1
800386e: d101 bne.n 8003874 <HAL_TIM_ConfigClockSource+0x18>
8003870: 2302 movs r3, #2
8003872: e0b3 b.n 80039dc <HAL_TIM_ConfigClockSource+0x180>
8003874: 687b ldr r3, [r7, #4]
8003876: 2201 movs r2, #1
8003878: f883 203c strb.w r2, [r3, #60] ; 0x3c
htim->State = HAL_TIM_STATE_BUSY;
800387c: 687b ldr r3, [r7, #4]
800387e: 2202 movs r2, #2
8003880: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Check the parameters */
assert_param(IS_TIM_CLOCKSOURCE(sClockSourceConfig->ClockSource));
/* Reset the SMS, TS, ECE, ETPS and ETRF bits */
tmpsmcr = htim->Instance->SMCR;
8003884: 687b ldr r3, [r7, #4]
8003886: 681b ldr r3, [r3, #0]
8003888: 689b ldr r3, [r3, #8]
800388a: 60fb str r3, [r7, #12]
tmpsmcr &= ~(TIM_SMCR_SMS | TIM_SMCR_TS);
800388c: 68fb ldr r3, [r7, #12]
800388e: f023 0377 bic.w r3, r3, #119 ; 0x77
8003892: 60fb str r3, [r7, #12]
tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP);
8003894: 68fb ldr r3, [r7, #12]
8003896: f423 437f bic.w r3, r3, #65280 ; 0xff00
800389a: 60fb str r3, [r7, #12]
htim->Instance->SMCR = tmpsmcr;
800389c: 687b ldr r3, [r7, #4]
800389e: 681b ldr r3, [r3, #0]
80038a0: 68fa ldr r2, [r7, #12]
80038a2: 609a str r2, [r3, #8]
switch (sClockSourceConfig->ClockSource)
80038a4: 683b ldr r3, [r7, #0]
80038a6: 681b ldr r3, [r3, #0]
80038a8: f5b3 5f00 cmp.w r3, #8192 ; 0x2000
80038ac: d03e beq.n 800392c <HAL_TIM_ConfigClockSource+0xd0>
80038ae: f5b3 5f00 cmp.w r3, #8192 ; 0x2000
80038b2: f200 8087 bhi.w 80039c4 <HAL_TIM_ConfigClockSource+0x168>
80038b6: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
80038ba: f000 8085 beq.w 80039c8 <HAL_TIM_ConfigClockSource+0x16c>
80038be: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
80038c2: d87f bhi.n 80039c4 <HAL_TIM_ConfigClockSource+0x168>
80038c4: 2b70 cmp r3, #112 ; 0x70
80038c6: d01a beq.n 80038fe <HAL_TIM_ConfigClockSource+0xa2>
80038c8: 2b70 cmp r3, #112 ; 0x70
80038ca: d87b bhi.n 80039c4 <HAL_TIM_ConfigClockSource+0x168>
80038cc: 2b60 cmp r3, #96 ; 0x60
80038ce: d050 beq.n 8003972 <HAL_TIM_ConfigClockSource+0x116>
80038d0: 2b60 cmp r3, #96 ; 0x60
80038d2: d877 bhi.n 80039c4 <HAL_TIM_ConfigClockSource+0x168>
80038d4: 2b50 cmp r3, #80 ; 0x50
80038d6: d03c beq.n 8003952 <HAL_TIM_ConfigClockSource+0xf6>
80038d8: 2b50 cmp r3, #80 ; 0x50
80038da: d873 bhi.n 80039c4 <HAL_TIM_ConfigClockSource+0x168>
80038dc: 2b40 cmp r3, #64 ; 0x40
80038de: d058 beq.n 8003992 <HAL_TIM_ConfigClockSource+0x136>
80038e0: 2b40 cmp r3, #64 ; 0x40
80038e2: d86f bhi.n 80039c4 <HAL_TIM_ConfigClockSource+0x168>
80038e4: 2b30 cmp r3, #48 ; 0x30
80038e6: d064 beq.n 80039b2 <HAL_TIM_ConfigClockSource+0x156>
80038e8: 2b30 cmp r3, #48 ; 0x30
80038ea: d86b bhi.n 80039c4 <HAL_TIM_ConfigClockSource+0x168>
80038ec: 2b20 cmp r3, #32
80038ee: d060 beq.n 80039b2 <HAL_TIM_ConfigClockSource+0x156>
80038f0: 2b20 cmp r3, #32
80038f2: d867 bhi.n 80039c4 <HAL_TIM_ConfigClockSource+0x168>
80038f4: 2b00 cmp r3, #0
80038f6: d05c beq.n 80039b2 <HAL_TIM_ConfigClockSource+0x156>
80038f8: 2b10 cmp r3, #16
80038fa: d05a beq.n 80039b2 <HAL_TIM_ConfigClockSource+0x156>
TIM_ITRx_SetConfig(htim->Instance, sClockSourceConfig->ClockSource);
break;
}
default:
break;
80038fc: e062 b.n 80039c4 <HAL_TIM_ConfigClockSource+0x168>
TIM_ETR_SetConfig(htim->Instance,
80038fe: 687b ldr r3, [r7, #4]
8003900: 6818 ldr r0, [r3, #0]
8003902: 683b ldr r3, [r7, #0]
8003904: 6899 ldr r1, [r3, #8]
8003906: 683b ldr r3, [r7, #0]
8003908: 685a ldr r2, [r3, #4]
800390a: 683b ldr r3, [r7, #0]
800390c: 68db ldr r3, [r3, #12]
800390e: f000 faee bl 8003eee <TIM_ETR_SetConfig>
tmpsmcr = htim->Instance->SMCR;
8003912: 687b ldr r3, [r7, #4]
8003914: 681b ldr r3, [r3, #0]
8003916: 689b ldr r3, [r3, #8]
8003918: 60fb str r3, [r7, #12]
tmpsmcr |= (TIM_SLAVEMODE_EXTERNAL1 | TIM_CLOCKSOURCE_ETRMODE1);
800391a: 68fb ldr r3, [r7, #12]
800391c: f043 0377 orr.w r3, r3, #119 ; 0x77
8003920: 60fb str r3, [r7, #12]
htim->Instance->SMCR = tmpsmcr;
8003922: 687b ldr r3, [r7, #4]
8003924: 681b ldr r3, [r3, #0]
8003926: 68fa ldr r2, [r7, #12]
8003928: 609a str r2, [r3, #8]
break;
800392a: e04e b.n 80039ca <HAL_TIM_ConfigClockSource+0x16e>
TIM_ETR_SetConfig(htim->Instance,
800392c: 687b ldr r3, [r7, #4]
800392e: 6818 ldr r0, [r3, #0]
8003930: 683b ldr r3, [r7, #0]
8003932: 6899 ldr r1, [r3, #8]
8003934: 683b ldr r3, [r7, #0]
8003936: 685a ldr r2, [r3, #4]
8003938: 683b ldr r3, [r7, #0]
800393a: 68db ldr r3, [r3, #12]
800393c: f000 fad7 bl 8003eee <TIM_ETR_SetConfig>
htim->Instance->SMCR |= TIM_SMCR_ECE;
8003940: 687b ldr r3, [r7, #4]
8003942: 681b ldr r3, [r3, #0]
8003944: 689a ldr r2, [r3, #8]
8003946: 687b ldr r3, [r7, #4]
8003948: 681b ldr r3, [r3, #0]
800394a: f442 4280 orr.w r2, r2, #16384 ; 0x4000
800394e: 609a str r2, [r3, #8]
break;
8003950: e03b b.n 80039ca <HAL_TIM_ConfigClockSource+0x16e>
TIM_TI1_ConfigInputStage(htim->Instance,
8003952: 687b ldr r3, [r7, #4]
8003954: 6818 ldr r0, [r3, #0]
8003956: 683b ldr r3, [r7, #0]
8003958: 6859 ldr r1, [r3, #4]
800395a: 683b ldr r3, [r7, #0]
800395c: 68db ldr r3, [r3, #12]
800395e: 461a mov r2, r3
8003960: f000 fa4e bl 8003e00 <TIM_TI1_ConfigInputStage>
TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1);
8003964: 687b ldr r3, [r7, #4]
8003966: 681b ldr r3, [r3, #0]
8003968: 2150 movs r1, #80 ; 0x50
800396a: 4618 mov r0, r3
800396c: f000 faa5 bl 8003eba <TIM_ITRx_SetConfig>
break;
8003970: e02b b.n 80039ca <HAL_TIM_ConfigClockSource+0x16e>
TIM_TI2_ConfigInputStage(htim->Instance,
8003972: 687b ldr r3, [r7, #4]
8003974: 6818 ldr r0, [r3, #0]
8003976: 683b ldr r3, [r7, #0]
8003978: 6859 ldr r1, [r3, #4]
800397a: 683b ldr r3, [r7, #0]
800397c: 68db ldr r3, [r3, #12]
800397e: 461a mov r2, r3
8003980: f000 fa6c bl 8003e5c <TIM_TI2_ConfigInputStage>
TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI2);
8003984: 687b ldr r3, [r7, #4]
8003986: 681b ldr r3, [r3, #0]
8003988: 2160 movs r1, #96 ; 0x60
800398a: 4618 mov r0, r3
800398c: f000 fa95 bl 8003eba <TIM_ITRx_SetConfig>
break;
8003990: e01b b.n 80039ca <HAL_TIM_ConfigClockSource+0x16e>
TIM_TI1_ConfigInputStage(htim->Instance,
8003992: 687b ldr r3, [r7, #4]
8003994: 6818 ldr r0, [r3, #0]
8003996: 683b ldr r3, [r7, #0]
8003998: 6859 ldr r1, [r3, #4]
800399a: 683b ldr r3, [r7, #0]
800399c: 68db ldr r3, [r3, #12]
800399e: 461a mov r2, r3
80039a0: f000 fa2e bl 8003e00 <TIM_TI1_ConfigInputStage>
TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1ED);
80039a4: 687b ldr r3, [r7, #4]
80039a6: 681b ldr r3, [r3, #0]
80039a8: 2140 movs r1, #64 ; 0x40
80039aa: 4618 mov r0, r3
80039ac: f000 fa85 bl 8003eba <TIM_ITRx_SetConfig>
break;
80039b0: e00b b.n 80039ca <HAL_TIM_ConfigClockSource+0x16e>
TIM_ITRx_SetConfig(htim->Instance, sClockSourceConfig->ClockSource);
80039b2: 687b ldr r3, [r7, #4]
80039b4: 681a ldr r2, [r3, #0]
80039b6: 683b ldr r3, [r7, #0]
80039b8: 681b ldr r3, [r3, #0]
80039ba: 4619 mov r1, r3
80039bc: 4610 mov r0, r2
80039be: f000 fa7c bl 8003eba <TIM_ITRx_SetConfig>
break;
80039c2: e002 b.n 80039ca <HAL_TIM_ConfigClockSource+0x16e>
break;
80039c4: bf00 nop
80039c6: e000 b.n 80039ca <HAL_TIM_ConfigClockSource+0x16e>
break;
80039c8: bf00 nop
}
htim->State = HAL_TIM_STATE_READY;
80039ca: 687b ldr r3, [r7, #4]
80039cc: 2201 movs r2, #1
80039ce: f883 203d strb.w r2, [r3, #61] ; 0x3d
__HAL_UNLOCK(htim);
80039d2: 687b ldr r3, [r7, #4]
80039d4: 2200 movs r2, #0
80039d6: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_OK;
80039da: 2300 movs r3, #0
}
80039dc: 4618 mov r0, r3
80039de: 3710 adds r7, #16
80039e0: 46bd mov sp, r7
80039e2: bd80 pop {r7, pc}
080039e4 <HAL_TIM_OC_DelayElapsedCallback>:
* @brief Output Compare callback in non-blocking mode
* @param htim TIM OC handle
* @retval None
*/
__weak void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef *htim)
{
80039e4: b480 push {r7}
80039e6: b083 sub sp, #12
80039e8: af00 add r7, sp, #0
80039ea: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIM_OC_DelayElapsedCallback could be implemented in the user file
*/
}
80039ec: bf00 nop
80039ee: 370c adds r7, #12
80039f0: 46bd mov sp, r7
80039f2: bc80 pop {r7}
80039f4: 4770 bx lr
080039f6 <HAL_TIM_IC_CaptureCallback>:
* @brief Input Capture callback in non-blocking mode
* @param htim TIM IC handle
* @retval None
*/
__weak void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim)
{
80039f6: b480 push {r7}
80039f8: b083 sub sp, #12
80039fa: af00 add r7, sp, #0
80039fc: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIM_IC_CaptureCallback could be implemented in the user file
*/
}
80039fe: bf00 nop
8003a00: 370c adds r7, #12
8003a02: 46bd mov sp, r7
8003a04: bc80 pop {r7}
8003a06: 4770 bx lr
08003a08 <HAL_TIM_PWM_PulseFinishedCallback>:
* @brief PWM Pulse finished callback in non-blocking mode
* @param htim TIM handle
* @retval None
*/
__weak void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim)
{
8003a08: b480 push {r7}
8003a0a: b083 sub sp, #12
8003a0c: af00 add r7, sp, #0
8003a0e: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIM_PWM_PulseFinishedCallback could be implemented in the user file
*/
}
8003a10: bf00 nop
8003a12: 370c adds r7, #12
8003a14: 46bd mov sp, r7
8003a16: bc80 pop {r7}
8003a18: 4770 bx lr
08003a1a <HAL_TIM_TriggerCallback>:
* @brief Hall Trigger detection callback in non-blocking mode
* @param htim TIM handle
* @retval None
*/
__weak void HAL_TIM_TriggerCallback(TIM_HandleTypeDef *htim)
{
8003a1a: b480 push {r7}
8003a1c: b083 sub sp, #12
8003a1e: af00 add r7, sp, #0
8003a20: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIM_TriggerCallback could be implemented in the user file
*/
}
8003a22: bf00 nop
8003a24: 370c adds r7, #12
8003a26: 46bd mov sp, r7
8003a28: bc80 pop {r7}
8003a2a: 4770 bx lr
08003a2c <TIM_Base_SetConfig>:
* @param TIMx TIM peripheral
* @param Structure TIM Base configuration structure
* @retval None
*/
void TIM_Base_SetConfig(TIM_TypeDef *TIMx, TIM_Base_InitTypeDef *Structure)
{
8003a2c: b480 push {r7}
8003a2e: b085 sub sp, #20
8003a30: af00 add r7, sp, #0
8003a32: 6078 str r0, [r7, #4]
8003a34: 6039 str r1, [r7, #0]
uint32_t tmpcr1;
tmpcr1 = TIMx->CR1;
8003a36: 687b ldr r3, [r7, #4]
8003a38: 681b ldr r3, [r3, #0]
8003a3a: 60fb str r3, [r7, #12]
/* Set TIM Time Base Unit parameters ---------------------------------------*/
if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx))
8003a3c: 687b ldr r3, [r7, #4]
8003a3e: 4a29 ldr r2, [pc, #164] ; (8003ae4 <TIM_Base_SetConfig+0xb8>)
8003a40: 4293 cmp r3, r2
8003a42: d00b beq.n 8003a5c <TIM_Base_SetConfig+0x30>
8003a44: 687b ldr r3, [r7, #4]
8003a46: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
8003a4a: d007 beq.n 8003a5c <TIM_Base_SetConfig+0x30>
8003a4c: 687b ldr r3, [r7, #4]
8003a4e: 4a26 ldr r2, [pc, #152] ; (8003ae8 <TIM_Base_SetConfig+0xbc>)
8003a50: 4293 cmp r3, r2
8003a52: d003 beq.n 8003a5c <TIM_Base_SetConfig+0x30>
8003a54: 687b ldr r3, [r7, #4]
8003a56: 4a25 ldr r2, [pc, #148] ; (8003aec <TIM_Base_SetConfig+0xc0>)
8003a58: 4293 cmp r3, r2
8003a5a: d108 bne.n 8003a6e <TIM_Base_SetConfig+0x42>
{
/* Select the Counter Mode */
tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS);
8003a5c: 68fb ldr r3, [r7, #12]
8003a5e: f023 0370 bic.w r3, r3, #112 ; 0x70
8003a62: 60fb str r3, [r7, #12]
tmpcr1 |= Structure->CounterMode;
8003a64: 683b ldr r3, [r7, #0]
8003a66: 685b ldr r3, [r3, #4]
8003a68: 68fa ldr r2, [r7, #12]
8003a6a: 4313 orrs r3, r2
8003a6c: 60fb str r3, [r7, #12]
}
if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx))
8003a6e: 687b ldr r3, [r7, #4]
8003a70: 4a1c ldr r2, [pc, #112] ; (8003ae4 <TIM_Base_SetConfig+0xb8>)
8003a72: 4293 cmp r3, r2
8003a74: d00b beq.n 8003a8e <TIM_Base_SetConfig+0x62>
8003a76: 687b ldr r3, [r7, #4]
8003a78: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
8003a7c: d007 beq.n 8003a8e <TIM_Base_SetConfig+0x62>
8003a7e: 687b ldr r3, [r7, #4]
8003a80: 4a19 ldr r2, [pc, #100] ; (8003ae8 <TIM_Base_SetConfig+0xbc>)
8003a82: 4293 cmp r3, r2
8003a84: d003 beq.n 8003a8e <TIM_Base_SetConfig+0x62>
8003a86: 687b ldr r3, [r7, #4]
8003a88: 4a18 ldr r2, [pc, #96] ; (8003aec <TIM_Base_SetConfig+0xc0>)
8003a8a: 4293 cmp r3, r2
8003a8c: d108 bne.n 8003aa0 <TIM_Base_SetConfig+0x74>
{
/* Set the clock division */
tmpcr1 &= ~TIM_CR1_CKD;
8003a8e: 68fb ldr r3, [r7, #12]
8003a90: f423 7340 bic.w r3, r3, #768 ; 0x300
8003a94: 60fb str r3, [r7, #12]
tmpcr1 |= (uint32_t)Structure->ClockDivision;
8003a96: 683b ldr r3, [r7, #0]
8003a98: 68db ldr r3, [r3, #12]
8003a9a: 68fa ldr r2, [r7, #12]
8003a9c: 4313 orrs r3, r2
8003a9e: 60fb str r3, [r7, #12]
}
/* Set the auto-reload preload */
MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload);
8003aa0: 68fb ldr r3, [r7, #12]
8003aa2: f023 0280 bic.w r2, r3, #128 ; 0x80
8003aa6: 683b ldr r3, [r7, #0]
8003aa8: 695b ldr r3, [r3, #20]
8003aaa: 4313 orrs r3, r2
8003aac: 60fb str r3, [r7, #12]
TIMx->CR1 = tmpcr1;
8003aae: 687b ldr r3, [r7, #4]
8003ab0: 68fa ldr r2, [r7, #12]
8003ab2: 601a str r2, [r3, #0]
/* Set the Autoreload value */
TIMx->ARR = (uint32_t)Structure->Period ;
8003ab4: 683b ldr r3, [r7, #0]
8003ab6: 689a ldr r2, [r3, #8]
8003ab8: 687b ldr r3, [r7, #4]
8003aba: 62da str r2, [r3, #44] ; 0x2c
/* Set the Prescaler value */
TIMx->PSC = Structure->Prescaler;
8003abc: 683b ldr r3, [r7, #0]
8003abe: 681a ldr r2, [r3, #0]
8003ac0: 687b ldr r3, [r7, #4]
8003ac2: 629a str r2, [r3, #40] ; 0x28
if (IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx))
8003ac4: 687b ldr r3, [r7, #4]
8003ac6: 4a07 ldr r2, [pc, #28] ; (8003ae4 <TIM_Base_SetConfig+0xb8>)
8003ac8: 4293 cmp r3, r2
8003aca: d103 bne.n 8003ad4 <TIM_Base_SetConfig+0xa8>
{
/* Set the Repetition Counter value */
TIMx->RCR = Structure->RepetitionCounter;
8003acc: 683b ldr r3, [r7, #0]
8003ace: 691a ldr r2, [r3, #16]
8003ad0: 687b ldr r3, [r7, #4]
8003ad2: 631a str r2, [r3, #48] ; 0x30
}
/* Generate an update event to reload the Prescaler
and the repetition counter (only for advanced timer) value immediately */
TIMx->EGR = TIM_EGR_UG;
8003ad4: 687b ldr r3, [r7, #4]
8003ad6: 2201 movs r2, #1
8003ad8: 615a str r2, [r3, #20]
}
8003ada: bf00 nop
8003adc: 3714 adds r7, #20
8003ade: 46bd mov sp, r7
8003ae0: bc80 pop {r7}
8003ae2: 4770 bx lr
8003ae4: 40012c00 .word 0x40012c00
8003ae8: 40000400 .word 0x40000400
8003aec: 40000800 .word 0x40000800
08003af0 <TIM_OC1_SetConfig>:
* @param TIMx to select the TIM peripheral
* @param OC_Config The output configuration structure
* @retval None
*/
static void TIM_OC1_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
{
8003af0: b480 push {r7}
8003af2: b087 sub sp, #28
8003af4: af00 add r7, sp, #0
8003af6: 6078 str r0, [r7, #4]
8003af8: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the Channel 1: Reset the CC1E Bit */
TIMx->CCER &= ~TIM_CCER_CC1E;
8003afa: 687b ldr r3, [r7, #4]
8003afc: 6a1b ldr r3, [r3, #32]
8003afe: f023 0201 bic.w r2, r3, #1
8003b02: 687b ldr r3, [r7, #4]
8003b04: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
8003b06: 687b ldr r3, [r7, #4]
8003b08: 6a1b ldr r3, [r3, #32]
8003b0a: 617b str r3, [r7, #20]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
8003b0c: 687b ldr r3, [r7, #4]
8003b0e: 685b ldr r3, [r3, #4]
8003b10: 613b str r3, [r7, #16]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR1;
8003b12: 687b ldr r3, [r7, #4]
8003b14: 699b ldr r3, [r3, #24]
8003b16: 60fb str r3, [r7, #12]
/* Reset the Output Compare Mode Bits */
tmpccmrx &= ~TIM_CCMR1_OC1M;
8003b18: 68fb ldr r3, [r7, #12]
8003b1a: f023 0370 bic.w r3, r3, #112 ; 0x70
8003b1e: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR1_CC1S;
8003b20: 68fb ldr r3, [r7, #12]
8003b22: f023 0303 bic.w r3, r3, #3
8003b26: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= OC_Config->OCMode;
8003b28: 683b ldr r3, [r7, #0]
8003b2a: 681b ldr r3, [r3, #0]
8003b2c: 68fa ldr r2, [r7, #12]
8003b2e: 4313 orrs r3, r2
8003b30: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC1P;
8003b32: 697b ldr r3, [r7, #20]
8003b34: f023 0302 bic.w r3, r3, #2
8003b38: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= OC_Config->OCPolarity;
8003b3a: 683b ldr r3, [r7, #0]
8003b3c: 689b ldr r3, [r3, #8]
8003b3e: 697a ldr r2, [r7, #20]
8003b40: 4313 orrs r3, r2
8003b42: 617b str r3, [r7, #20]
if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_1))
8003b44: 687b ldr r3, [r7, #4]
8003b46: 4a1c ldr r2, [pc, #112] ; (8003bb8 <TIM_OC1_SetConfig+0xc8>)
8003b48: 4293 cmp r3, r2
8003b4a: d10c bne.n 8003b66 <TIM_OC1_SetConfig+0x76>
{
/* Check parameters */
assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity));
/* Reset the Output N Polarity level */
tmpccer &= ~TIM_CCER_CC1NP;
8003b4c: 697b ldr r3, [r7, #20]
8003b4e: f023 0308 bic.w r3, r3, #8
8003b52: 617b str r3, [r7, #20]
/* Set the Output N Polarity */
tmpccer |= OC_Config->OCNPolarity;
8003b54: 683b ldr r3, [r7, #0]
8003b56: 68db ldr r3, [r3, #12]
8003b58: 697a ldr r2, [r7, #20]
8003b5a: 4313 orrs r3, r2
8003b5c: 617b str r3, [r7, #20]
/* Reset the Output N State */
tmpccer &= ~TIM_CCER_CC1NE;
8003b5e: 697b ldr r3, [r7, #20]
8003b60: f023 0304 bic.w r3, r3, #4
8003b64: 617b str r3, [r7, #20]
}
if (IS_TIM_BREAK_INSTANCE(TIMx))
8003b66: 687b ldr r3, [r7, #4]
8003b68: 4a13 ldr r2, [pc, #76] ; (8003bb8 <TIM_OC1_SetConfig+0xc8>)
8003b6a: 4293 cmp r3, r2
8003b6c: d111 bne.n 8003b92 <TIM_OC1_SetConfig+0xa2>
/* Check parameters */
assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState));
assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
/* Reset the Output Compare and Output Compare N IDLE State */
tmpcr2 &= ~TIM_CR2_OIS1;
8003b6e: 693b ldr r3, [r7, #16]
8003b70: f423 7380 bic.w r3, r3, #256 ; 0x100
8003b74: 613b str r3, [r7, #16]
tmpcr2 &= ~TIM_CR2_OIS1N;
8003b76: 693b ldr r3, [r7, #16]
8003b78: f423 7300 bic.w r3, r3, #512 ; 0x200
8003b7c: 613b str r3, [r7, #16]
/* Set the Output Idle state */
tmpcr2 |= OC_Config->OCIdleState;
8003b7e: 683b ldr r3, [r7, #0]
8003b80: 695b ldr r3, [r3, #20]
8003b82: 693a ldr r2, [r7, #16]
8003b84: 4313 orrs r3, r2
8003b86: 613b str r3, [r7, #16]
/* Set the Output N Idle state */
tmpcr2 |= OC_Config->OCNIdleState;
8003b88: 683b ldr r3, [r7, #0]
8003b8a: 699b ldr r3, [r3, #24]
8003b8c: 693a ldr r2, [r7, #16]
8003b8e: 4313 orrs r3, r2
8003b90: 613b str r3, [r7, #16]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
8003b92: 687b ldr r3, [r7, #4]
8003b94: 693a ldr r2, [r7, #16]
8003b96: 605a str r2, [r3, #4]
/* Write to TIMx CCMR1 */
TIMx->CCMR1 = tmpccmrx;
8003b98: 687b ldr r3, [r7, #4]
8003b9a: 68fa ldr r2, [r7, #12]
8003b9c: 619a str r2, [r3, #24]
/* Set the Capture Compare Register value */
TIMx->CCR1 = OC_Config->Pulse;
8003b9e: 683b ldr r3, [r7, #0]
8003ba0: 685a ldr r2, [r3, #4]
8003ba2: 687b ldr r3, [r7, #4]
8003ba4: 635a str r2, [r3, #52] ; 0x34
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
8003ba6: 687b ldr r3, [r7, #4]
8003ba8: 697a ldr r2, [r7, #20]
8003baa: 621a str r2, [r3, #32]
}
8003bac: bf00 nop
8003bae: 371c adds r7, #28
8003bb0: 46bd mov sp, r7
8003bb2: bc80 pop {r7}
8003bb4: 4770 bx lr
8003bb6: bf00 nop
8003bb8: 40012c00 .word 0x40012c00
08003bbc <TIM_OC2_SetConfig>:
* @param TIMx to select the TIM peripheral
* @param OC_Config The output configuration structure
* @retval None
*/
void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
{
8003bbc: b480 push {r7}
8003bbe: b087 sub sp, #28
8003bc0: af00 add r7, sp, #0
8003bc2: 6078 str r0, [r7, #4]
8003bc4: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the Channel 2: Reset the CC2E Bit */
TIMx->CCER &= ~TIM_CCER_CC2E;
8003bc6: 687b ldr r3, [r7, #4]
8003bc8: 6a1b ldr r3, [r3, #32]
8003bca: f023 0210 bic.w r2, r3, #16
8003bce: 687b ldr r3, [r7, #4]
8003bd0: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
8003bd2: 687b ldr r3, [r7, #4]
8003bd4: 6a1b ldr r3, [r3, #32]
8003bd6: 617b str r3, [r7, #20]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
8003bd8: 687b ldr r3, [r7, #4]
8003bda: 685b ldr r3, [r3, #4]
8003bdc: 613b str r3, [r7, #16]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR1;
8003bde: 687b ldr r3, [r7, #4]
8003be0: 699b ldr r3, [r3, #24]
8003be2: 60fb str r3, [r7, #12]
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= ~TIM_CCMR1_OC2M;
8003be4: 68fb ldr r3, [r7, #12]
8003be6: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8003bea: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR1_CC2S;
8003bec: 68fb ldr r3, [r7, #12]
8003bee: f423 7340 bic.w r3, r3, #768 ; 0x300
8003bf2: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= (OC_Config->OCMode << 8U);
8003bf4: 683b ldr r3, [r7, #0]
8003bf6: 681b ldr r3, [r3, #0]
8003bf8: 021b lsls r3, r3, #8
8003bfa: 68fa ldr r2, [r7, #12]
8003bfc: 4313 orrs r3, r2
8003bfe: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC2P;
8003c00: 697b ldr r3, [r7, #20]
8003c02: f023 0320 bic.w r3, r3, #32
8003c06: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 4U);
8003c08: 683b ldr r3, [r7, #0]
8003c0a: 689b ldr r3, [r3, #8]
8003c0c: 011b lsls r3, r3, #4
8003c0e: 697a ldr r2, [r7, #20]
8003c10: 4313 orrs r3, r2
8003c12: 617b str r3, [r7, #20]
if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_2))
8003c14: 687b ldr r3, [r7, #4]
8003c16: 4a1d ldr r2, [pc, #116] ; (8003c8c <TIM_OC2_SetConfig+0xd0>)
8003c18: 4293 cmp r3, r2
8003c1a: d10d bne.n 8003c38 <TIM_OC2_SetConfig+0x7c>
{
assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity));
/* Reset the Output N Polarity level */
tmpccer &= ~TIM_CCER_CC2NP;
8003c1c: 697b ldr r3, [r7, #20]
8003c1e: f023 0380 bic.w r3, r3, #128 ; 0x80
8003c22: 617b str r3, [r7, #20]
/* Set the Output N Polarity */
tmpccer |= (OC_Config->OCNPolarity << 4U);
8003c24: 683b ldr r3, [r7, #0]
8003c26: 68db ldr r3, [r3, #12]
8003c28: 011b lsls r3, r3, #4
8003c2a: 697a ldr r2, [r7, #20]
8003c2c: 4313 orrs r3, r2
8003c2e: 617b str r3, [r7, #20]
/* Reset the Output N State */
tmpccer &= ~TIM_CCER_CC2NE;
8003c30: 697b ldr r3, [r7, #20]
8003c32: f023 0340 bic.w r3, r3, #64 ; 0x40
8003c36: 617b str r3, [r7, #20]
}
if (IS_TIM_BREAK_INSTANCE(TIMx))
8003c38: 687b ldr r3, [r7, #4]
8003c3a: 4a14 ldr r2, [pc, #80] ; (8003c8c <TIM_OC2_SetConfig+0xd0>)
8003c3c: 4293 cmp r3, r2
8003c3e: d113 bne.n 8003c68 <TIM_OC2_SetConfig+0xac>
/* Check parameters */
assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState));
assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
/* Reset the Output Compare and Output Compare N IDLE State */
tmpcr2 &= ~TIM_CR2_OIS2;
8003c40: 693b ldr r3, [r7, #16]
8003c42: f423 6380 bic.w r3, r3, #1024 ; 0x400
8003c46: 613b str r3, [r7, #16]
tmpcr2 &= ~TIM_CR2_OIS2N;
8003c48: 693b ldr r3, [r7, #16]
8003c4a: f423 6300 bic.w r3, r3, #2048 ; 0x800
8003c4e: 613b str r3, [r7, #16]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 2U);
8003c50: 683b ldr r3, [r7, #0]
8003c52: 695b ldr r3, [r3, #20]
8003c54: 009b lsls r3, r3, #2
8003c56: 693a ldr r2, [r7, #16]
8003c58: 4313 orrs r3, r2
8003c5a: 613b str r3, [r7, #16]
/* Set the Output N Idle state */
tmpcr2 |= (OC_Config->OCNIdleState << 2U);
8003c5c: 683b ldr r3, [r7, #0]
8003c5e: 699b ldr r3, [r3, #24]
8003c60: 009b lsls r3, r3, #2
8003c62: 693a ldr r2, [r7, #16]
8003c64: 4313 orrs r3, r2
8003c66: 613b str r3, [r7, #16]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
8003c68: 687b ldr r3, [r7, #4]
8003c6a: 693a ldr r2, [r7, #16]
8003c6c: 605a str r2, [r3, #4]
/* Write to TIMx CCMR1 */
TIMx->CCMR1 = tmpccmrx;
8003c6e: 687b ldr r3, [r7, #4]
8003c70: 68fa ldr r2, [r7, #12]
8003c72: 619a str r2, [r3, #24]
/* Set the Capture Compare Register value */
TIMx->CCR2 = OC_Config->Pulse;
8003c74: 683b ldr r3, [r7, #0]
8003c76: 685a ldr r2, [r3, #4]
8003c78: 687b ldr r3, [r7, #4]
8003c7a: 639a str r2, [r3, #56] ; 0x38
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
8003c7c: 687b ldr r3, [r7, #4]
8003c7e: 697a ldr r2, [r7, #20]
8003c80: 621a str r2, [r3, #32]
}
8003c82: bf00 nop
8003c84: 371c adds r7, #28
8003c86: 46bd mov sp, r7
8003c88: bc80 pop {r7}
8003c8a: 4770 bx lr
8003c8c: 40012c00 .word 0x40012c00
08003c90 <TIM_OC3_SetConfig>:
* @param TIMx to select the TIM peripheral
* @param OC_Config The output configuration structure
* @retval None
*/
static void TIM_OC3_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
{
8003c90: b480 push {r7}
8003c92: b087 sub sp, #28
8003c94: af00 add r7, sp, #0
8003c96: 6078 str r0, [r7, #4]
8003c98: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the Channel 3: Reset the CC2E Bit */
TIMx->CCER &= ~TIM_CCER_CC3E;
8003c9a: 687b ldr r3, [r7, #4]
8003c9c: 6a1b ldr r3, [r3, #32]
8003c9e: f423 7280 bic.w r2, r3, #256 ; 0x100
8003ca2: 687b ldr r3, [r7, #4]
8003ca4: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
8003ca6: 687b ldr r3, [r7, #4]
8003ca8: 6a1b ldr r3, [r3, #32]
8003caa: 617b str r3, [r7, #20]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
8003cac: 687b ldr r3, [r7, #4]
8003cae: 685b ldr r3, [r3, #4]
8003cb0: 613b str r3, [r7, #16]
/* Get the TIMx CCMR2 register value */
tmpccmrx = TIMx->CCMR2;
8003cb2: 687b ldr r3, [r7, #4]
8003cb4: 69db ldr r3, [r3, #28]
8003cb6: 60fb str r3, [r7, #12]
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= ~TIM_CCMR2_OC3M;
8003cb8: 68fb ldr r3, [r7, #12]
8003cba: f023 0370 bic.w r3, r3, #112 ; 0x70
8003cbe: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR2_CC3S;
8003cc0: 68fb ldr r3, [r7, #12]
8003cc2: f023 0303 bic.w r3, r3, #3
8003cc6: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= OC_Config->OCMode;
8003cc8: 683b ldr r3, [r7, #0]
8003cca: 681b ldr r3, [r3, #0]
8003ccc: 68fa ldr r2, [r7, #12]
8003cce: 4313 orrs r3, r2
8003cd0: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC3P;
8003cd2: 697b ldr r3, [r7, #20]
8003cd4: f423 7300 bic.w r3, r3, #512 ; 0x200
8003cd8: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 8U);
8003cda: 683b ldr r3, [r7, #0]
8003cdc: 689b ldr r3, [r3, #8]
8003cde: 021b lsls r3, r3, #8
8003ce0: 697a ldr r2, [r7, #20]
8003ce2: 4313 orrs r3, r2
8003ce4: 617b str r3, [r7, #20]
if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_3))
8003ce6: 687b ldr r3, [r7, #4]
8003ce8: 4a1d ldr r2, [pc, #116] ; (8003d60 <TIM_OC3_SetConfig+0xd0>)
8003cea: 4293 cmp r3, r2
8003cec: d10d bne.n 8003d0a <TIM_OC3_SetConfig+0x7a>
{
assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity));
/* Reset the Output N Polarity level */
tmpccer &= ~TIM_CCER_CC3NP;
8003cee: 697b ldr r3, [r7, #20]
8003cf0: f423 6300 bic.w r3, r3, #2048 ; 0x800
8003cf4: 617b str r3, [r7, #20]
/* Set the Output N Polarity */
tmpccer |= (OC_Config->OCNPolarity << 8U);
8003cf6: 683b ldr r3, [r7, #0]
8003cf8: 68db ldr r3, [r3, #12]
8003cfa: 021b lsls r3, r3, #8
8003cfc: 697a ldr r2, [r7, #20]
8003cfe: 4313 orrs r3, r2
8003d00: 617b str r3, [r7, #20]
/* Reset the Output N State */
tmpccer &= ~TIM_CCER_CC3NE;
8003d02: 697b ldr r3, [r7, #20]
8003d04: f423 6380 bic.w r3, r3, #1024 ; 0x400
8003d08: 617b str r3, [r7, #20]
}
if (IS_TIM_BREAK_INSTANCE(TIMx))
8003d0a: 687b ldr r3, [r7, #4]
8003d0c: 4a14 ldr r2, [pc, #80] ; (8003d60 <TIM_OC3_SetConfig+0xd0>)
8003d0e: 4293 cmp r3, r2
8003d10: d113 bne.n 8003d3a <TIM_OC3_SetConfig+0xaa>
/* Check parameters */
assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState));
assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
/* Reset the Output Compare and Output Compare N IDLE State */
tmpcr2 &= ~TIM_CR2_OIS3;
8003d12: 693b ldr r3, [r7, #16]
8003d14: f423 5380 bic.w r3, r3, #4096 ; 0x1000
8003d18: 613b str r3, [r7, #16]
tmpcr2 &= ~TIM_CR2_OIS3N;
8003d1a: 693b ldr r3, [r7, #16]
8003d1c: f423 5300 bic.w r3, r3, #8192 ; 0x2000
8003d20: 613b str r3, [r7, #16]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 4U);
8003d22: 683b ldr r3, [r7, #0]
8003d24: 695b ldr r3, [r3, #20]
8003d26: 011b lsls r3, r3, #4
8003d28: 693a ldr r2, [r7, #16]
8003d2a: 4313 orrs r3, r2
8003d2c: 613b str r3, [r7, #16]
/* Set the Output N Idle state */
tmpcr2 |= (OC_Config->OCNIdleState << 4U);
8003d2e: 683b ldr r3, [r7, #0]
8003d30: 699b ldr r3, [r3, #24]
8003d32: 011b lsls r3, r3, #4
8003d34: 693a ldr r2, [r7, #16]
8003d36: 4313 orrs r3, r2
8003d38: 613b str r3, [r7, #16]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
8003d3a: 687b ldr r3, [r7, #4]
8003d3c: 693a ldr r2, [r7, #16]
8003d3e: 605a str r2, [r3, #4]
/* Write to TIMx CCMR2 */
TIMx->CCMR2 = tmpccmrx;
8003d40: 687b ldr r3, [r7, #4]
8003d42: 68fa ldr r2, [r7, #12]
8003d44: 61da str r2, [r3, #28]
/* Set the Capture Compare Register value */
TIMx->CCR3 = OC_Config->Pulse;
8003d46: 683b ldr r3, [r7, #0]
8003d48: 685a ldr r2, [r3, #4]
8003d4a: 687b ldr r3, [r7, #4]
8003d4c: 63da str r2, [r3, #60] ; 0x3c
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
8003d4e: 687b ldr r3, [r7, #4]
8003d50: 697a ldr r2, [r7, #20]
8003d52: 621a str r2, [r3, #32]
}
8003d54: bf00 nop
8003d56: 371c adds r7, #28
8003d58: 46bd mov sp, r7
8003d5a: bc80 pop {r7}
8003d5c: 4770 bx lr
8003d5e: bf00 nop
8003d60: 40012c00 .word 0x40012c00
08003d64 <TIM_OC4_SetConfig>:
* @param TIMx to select the TIM peripheral
* @param OC_Config The output configuration structure
* @retval None
*/
static void TIM_OC4_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
{
8003d64: b480 push {r7}
8003d66: b087 sub sp, #28
8003d68: af00 add r7, sp, #0
8003d6a: 6078 str r0, [r7, #4]
8003d6c: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the Channel 4: Reset the CC4E Bit */
TIMx->CCER &= ~TIM_CCER_CC4E;
8003d6e: 687b ldr r3, [r7, #4]
8003d70: 6a1b ldr r3, [r3, #32]
8003d72: f423 5280 bic.w r2, r3, #4096 ; 0x1000
8003d76: 687b ldr r3, [r7, #4]
8003d78: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
8003d7a: 687b ldr r3, [r7, #4]
8003d7c: 6a1b ldr r3, [r3, #32]
8003d7e: 613b str r3, [r7, #16]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
8003d80: 687b ldr r3, [r7, #4]
8003d82: 685b ldr r3, [r3, #4]
8003d84: 617b str r3, [r7, #20]
/* Get the TIMx CCMR2 register value */
tmpccmrx = TIMx->CCMR2;
8003d86: 687b ldr r3, [r7, #4]
8003d88: 69db ldr r3, [r3, #28]
8003d8a: 60fb str r3, [r7, #12]
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= ~TIM_CCMR2_OC4M;
8003d8c: 68fb ldr r3, [r7, #12]
8003d8e: f423 43e0 bic.w r3, r3, #28672 ; 0x7000
8003d92: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR2_CC4S;
8003d94: 68fb ldr r3, [r7, #12]
8003d96: f423 7340 bic.w r3, r3, #768 ; 0x300
8003d9a: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= (OC_Config->OCMode << 8U);
8003d9c: 683b ldr r3, [r7, #0]
8003d9e: 681b ldr r3, [r3, #0]
8003da0: 021b lsls r3, r3, #8
8003da2: 68fa ldr r2, [r7, #12]
8003da4: 4313 orrs r3, r2
8003da6: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC4P;
8003da8: 693b ldr r3, [r7, #16]
8003daa: f423 5300 bic.w r3, r3, #8192 ; 0x2000
8003dae: 613b str r3, [r7, #16]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 12U);
8003db0: 683b ldr r3, [r7, #0]
8003db2: 689b ldr r3, [r3, #8]
8003db4: 031b lsls r3, r3, #12
8003db6: 693a ldr r2, [r7, #16]
8003db8: 4313 orrs r3, r2
8003dba: 613b str r3, [r7, #16]
if (IS_TIM_BREAK_INSTANCE(TIMx))
8003dbc: 687b ldr r3, [r7, #4]
8003dbe: 4a0f ldr r2, [pc, #60] ; (8003dfc <TIM_OC4_SetConfig+0x98>)
8003dc0: 4293 cmp r3, r2
8003dc2: d109 bne.n 8003dd8 <TIM_OC4_SetConfig+0x74>
{
/* Check parameters */
assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
/* Reset the Output Compare IDLE State */
tmpcr2 &= ~TIM_CR2_OIS4;
8003dc4: 697b ldr r3, [r7, #20]
8003dc6: f423 4380 bic.w r3, r3, #16384 ; 0x4000
8003dca: 617b str r3, [r7, #20]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 6U);
8003dcc: 683b ldr r3, [r7, #0]
8003dce: 695b ldr r3, [r3, #20]
8003dd0: 019b lsls r3, r3, #6
8003dd2: 697a ldr r2, [r7, #20]
8003dd4: 4313 orrs r3, r2
8003dd6: 617b str r3, [r7, #20]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
8003dd8: 687b ldr r3, [r7, #4]
8003dda: 697a ldr r2, [r7, #20]
8003ddc: 605a str r2, [r3, #4]
/* Write to TIMx CCMR2 */
TIMx->CCMR2 = tmpccmrx;
8003dde: 687b ldr r3, [r7, #4]
8003de0: 68fa ldr r2, [r7, #12]
8003de2: 61da str r2, [r3, #28]
/* Set the Capture Compare Register value */
TIMx->CCR4 = OC_Config->Pulse;
8003de4: 683b ldr r3, [r7, #0]
8003de6: 685a ldr r2, [r3, #4]
8003de8: 687b ldr r3, [r7, #4]
8003dea: 641a str r2, [r3, #64] ; 0x40
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
8003dec: 687b ldr r3, [r7, #4]
8003dee: 693a ldr r2, [r7, #16]
8003df0: 621a str r2, [r3, #32]
}
8003df2: bf00 nop
8003df4: 371c adds r7, #28
8003df6: 46bd mov sp, r7
8003df8: bc80 pop {r7}
8003dfa: 4770 bx lr
8003dfc: 40012c00 .word 0x40012c00
08003e00 <TIM_TI1_ConfigInputStage>:
* @param TIM_ICFilter Specifies the Input Capture Filter.
* This parameter must be a value between 0x00 and 0x0F.
* @retval None
*/
static void TIM_TI1_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter)
{
8003e00: b480 push {r7}
8003e02: b087 sub sp, #28
8003e04: af00 add r7, sp, #0
8003e06: 60f8 str r0, [r7, #12]
8003e08: 60b9 str r1, [r7, #8]
8003e0a: 607a str r2, [r7, #4]
uint32_t tmpccmr1;
uint32_t tmpccer;
/* Disable the Channel 1: Reset the CC1E Bit */
tmpccer = TIMx->CCER;
8003e0c: 68fb ldr r3, [r7, #12]
8003e0e: 6a1b ldr r3, [r3, #32]
8003e10: 617b str r3, [r7, #20]
TIMx->CCER &= ~TIM_CCER_CC1E;
8003e12: 68fb ldr r3, [r7, #12]
8003e14: 6a1b ldr r3, [r3, #32]
8003e16: f023 0201 bic.w r2, r3, #1
8003e1a: 68fb ldr r3, [r7, #12]
8003e1c: 621a str r2, [r3, #32]
tmpccmr1 = TIMx->CCMR1;
8003e1e: 68fb ldr r3, [r7, #12]
8003e20: 699b ldr r3, [r3, #24]
8003e22: 613b str r3, [r7, #16]
/* Set the filter */
tmpccmr1 &= ~TIM_CCMR1_IC1F;
8003e24: 693b ldr r3, [r7, #16]
8003e26: f023 03f0 bic.w r3, r3, #240 ; 0xf0
8003e2a: 613b str r3, [r7, #16]
tmpccmr1 |= (TIM_ICFilter << 4U);
8003e2c: 687b ldr r3, [r7, #4]
8003e2e: 011b lsls r3, r3, #4
8003e30: 693a ldr r2, [r7, #16]
8003e32: 4313 orrs r3, r2
8003e34: 613b str r3, [r7, #16]
/* Select the Polarity and set the CC1E Bit */
tmpccer &= ~(TIM_CCER_CC1P | TIM_CCER_CC1NP);
8003e36: 697b ldr r3, [r7, #20]
8003e38: f023 030a bic.w r3, r3, #10
8003e3c: 617b str r3, [r7, #20]
tmpccer |= TIM_ICPolarity;
8003e3e: 697a ldr r2, [r7, #20]
8003e40: 68bb ldr r3, [r7, #8]
8003e42: 4313 orrs r3, r2
8003e44: 617b str r3, [r7, #20]
/* Write to TIMx CCMR1 and CCER registers */
TIMx->CCMR1 = tmpccmr1;
8003e46: 68fb ldr r3, [r7, #12]
8003e48: 693a ldr r2, [r7, #16]
8003e4a: 619a str r2, [r3, #24]
TIMx->CCER = tmpccer;
8003e4c: 68fb ldr r3, [r7, #12]
8003e4e: 697a ldr r2, [r7, #20]
8003e50: 621a str r2, [r3, #32]
}
8003e52: bf00 nop
8003e54: 371c adds r7, #28
8003e56: 46bd mov sp, r7
8003e58: bc80 pop {r7}
8003e5a: 4770 bx lr
08003e5c <TIM_TI2_ConfigInputStage>:
* @param TIM_ICFilter Specifies the Input Capture Filter.
* This parameter must be a value between 0x00 and 0x0F.
* @retval None
*/
static void TIM_TI2_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter)
{
8003e5c: b480 push {r7}
8003e5e: b087 sub sp, #28
8003e60: af00 add r7, sp, #0
8003e62: 60f8 str r0, [r7, #12]
8003e64: 60b9 str r1, [r7, #8]
8003e66: 607a str r2, [r7, #4]
uint32_t tmpccmr1;
uint32_t tmpccer;
/* Disable the Channel 2: Reset the CC2E Bit */
TIMx->CCER &= ~TIM_CCER_CC2E;
8003e68: 68fb ldr r3, [r7, #12]
8003e6a: 6a1b ldr r3, [r3, #32]
8003e6c: f023 0210 bic.w r2, r3, #16
8003e70: 68fb ldr r3, [r7, #12]
8003e72: 621a str r2, [r3, #32]
tmpccmr1 = TIMx->CCMR1;
8003e74: 68fb ldr r3, [r7, #12]
8003e76: 699b ldr r3, [r3, #24]
8003e78: 617b str r3, [r7, #20]
tmpccer = TIMx->CCER;
8003e7a: 68fb ldr r3, [r7, #12]
8003e7c: 6a1b ldr r3, [r3, #32]
8003e7e: 613b str r3, [r7, #16]
/* Set the filter */
tmpccmr1 &= ~TIM_CCMR1_IC2F;
8003e80: 697b ldr r3, [r7, #20]
8003e82: f423 4370 bic.w r3, r3, #61440 ; 0xf000
8003e86: 617b str r3, [r7, #20]
tmpccmr1 |= (TIM_ICFilter << 12U);
8003e88: 687b ldr r3, [r7, #4]
8003e8a: 031b lsls r3, r3, #12
8003e8c: 697a ldr r2, [r7, #20]
8003e8e: 4313 orrs r3, r2
8003e90: 617b str r3, [r7, #20]
/* Select the Polarity and set the CC2E Bit */
tmpccer &= ~(TIM_CCER_CC2P | TIM_CCER_CC2NP);
8003e92: 693b ldr r3, [r7, #16]
8003e94: f023 03a0 bic.w r3, r3, #160 ; 0xa0
8003e98: 613b str r3, [r7, #16]
tmpccer |= (TIM_ICPolarity << 4U);
8003e9a: 68bb ldr r3, [r7, #8]
8003e9c: 011b lsls r3, r3, #4
8003e9e: 693a ldr r2, [r7, #16]
8003ea0: 4313 orrs r3, r2
8003ea2: 613b str r3, [r7, #16]
/* Write to TIMx CCMR1 and CCER registers */
TIMx->CCMR1 = tmpccmr1 ;
8003ea4: 68fb ldr r3, [r7, #12]
8003ea6: 697a ldr r2, [r7, #20]
8003ea8: 619a str r2, [r3, #24]
TIMx->CCER = tmpccer;
8003eaa: 68fb ldr r3, [r7, #12]
8003eac: 693a ldr r2, [r7, #16]
8003eae: 621a str r2, [r3, #32]
}
8003eb0: bf00 nop
8003eb2: 371c adds r7, #28
8003eb4: 46bd mov sp, r7
8003eb6: bc80 pop {r7}
8003eb8: 4770 bx lr
08003eba <TIM_ITRx_SetConfig>:
* @arg TIM_TS_TI2FP2: Filtered Timer Input 2
* @arg TIM_TS_ETRF: External Trigger input
* @retval None
*/
static void TIM_ITRx_SetConfig(TIM_TypeDef *TIMx, uint32_t InputTriggerSource)
{
8003eba: b480 push {r7}
8003ebc: b085 sub sp, #20
8003ebe: af00 add r7, sp, #0
8003ec0: 6078 str r0, [r7, #4]
8003ec2: 6039 str r1, [r7, #0]
uint32_t tmpsmcr;
/* Get the TIMx SMCR register value */
tmpsmcr = TIMx->SMCR;
8003ec4: 687b ldr r3, [r7, #4]
8003ec6: 689b ldr r3, [r3, #8]
8003ec8: 60fb str r3, [r7, #12]
/* Reset the TS Bits */
tmpsmcr &= ~TIM_SMCR_TS;
8003eca: 68fb ldr r3, [r7, #12]
8003ecc: f023 0370 bic.w r3, r3, #112 ; 0x70
8003ed0: 60fb str r3, [r7, #12]
/* Set the Input Trigger source and the slave mode*/
tmpsmcr |= (InputTriggerSource | TIM_SLAVEMODE_EXTERNAL1);
8003ed2: 683a ldr r2, [r7, #0]
8003ed4: 68fb ldr r3, [r7, #12]
8003ed6: 4313 orrs r3, r2
8003ed8: f043 0307 orr.w r3, r3, #7
8003edc: 60fb str r3, [r7, #12]
/* Write to TIMx SMCR */
TIMx->SMCR = tmpsmcr;
8003ede: 687b ldr r3, [r7, #4]
8003ee0: 68fa ldr r2, [r7, #12]
8003ee2: 609a str r2, [r3, #8]
}
8003ee4: bf00 nop
8003ee6: 3714 adds r7, #20
8003ee8: 46bd mov sp, r7
8003eea: bc80 pop {r7}
8003eec: 4770 bx lr
08003eee <TIM_ETR_SetConfig>:
* This parameter must be a value between 0x00 and 0x0F
* @retval None
*/
void TIM_ETR_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ExtTRGPrescaler,
uint32_t TIM_ExtTRGPolarity, uint32_t ExtTRGFilter)
{
8003eee: b480 push {r7}
8003ef0: b087 sub sp, #28
8003ef2: af00 add r7, sp, #0
8003ef4: 60f8 str r0, [r7, #12]
8003ef6: 60b9 str r1, [r7, #8]
8003ef8: 607a str r2, [r7, #4]
8003efa: 603b str r3, [r7, #0]
uint32_t tmpsmcr;
tmpsmcr = TIMx->SMCR;
8003efc: 68fb ldr r3, [r7, #12]
8003efe: 689b ldr r3, [r3, #8]
8003f00: 617b str r3, [r7, #20]
/* Reset the ETR Bits */
tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP);
8003f02: 697b ldr r3, [r7, #20]
8003f04: f423 437f bic.w r3, r3, #65280 ; 0xff00
8003f08: 617b str r3, [r7, #20]
/* Set the Prescaler, the Filter value and the Polarity */
tmpsmcr |= (uint32_t)(TIM_ExtTRGPrescaler | (TIM_ExtTRGPolarity | (ExtTRGFilter << 8U)));
8003f0a: 683b ldr r3, [r7, #0]
8003f0c: 021a lsls r2, r3, #8
8003f0e: 687b ldr r3, [r7, #4]
8003f10: 431a orrs r2, r3
8003f12: 68bb ldr r3, [r7, #8]
8003f14: 4313 orrs r3, r2
8003f16: 697a ldr r2, [r7, #20]
8003f18: 4313 orrs r3, r2
8003f1a: 617b str r3, [r7, #20]
/* Write to TIMx SMCR */
TIMx->SMCR = tmpsmcr;
8003f1c: 68fb ldr r3, [r7, #12]
8003f1e: 697a ldr r2, [r7, #20]
8003f20: 609a str r2, [r3, #8]
}
8003f22: bf00 nop
8003f24: 371c adds r7, #28
8003f26: 46bd mov sp, r7
8003f28: bc80 pop {r7}
8003f2a: 4770 bx lr
08003f2c <TIM_CCxChannelCmd>:
* @param ChannelState specifies the TIM Channel CCxE bit new state.
* This parameter can be: TIM_CCx_ENABLE or TIM_CCx_DISABLE.
* @retval None
*/
void TIM_CCxChannelCmd(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ChannelState)
{
8003f2c: b480 push {r7}
8003f2e: b087 sub sp, #28
8003f30: af00 add r7, sp, #0
8003f32: 60f8 str r0, [r7, #12]
8003f34: 60b9 str r1, [r7, #8]
8003f36: 607a str r2, [r7, #4]
/* Check the parameters */
assert_param(IS_TIM_CC1_INSTANCE(TIMx));
assert_param(IS_TIM_CHANNELS(Channel));
tmp = TIM_CCER_CC1E << (Channel & 0x1FU); /* 0x1FU = 31 bits max shift */
8003f38: 68bb ldr r3, [r7, #8]
8003f3a: f003 031f and.w r3, r3, #31
8003f3e: 2201 movs r2, #1
8003f40: fa02 f303 lsl.w r3, r2, r3
8003f44: 617b str r3, [r7, #20]
/* Reset the CCxE Bit */
TIMx->CCER &= ~tmp;
8003f46: 68fb ldr r3, [r7, #12]
8003f48: 6a1a ldr r2, [r3, #32]
8003f4a: 697b ldr r3, [r7, #20]
8003f4c: 43db mvns r3, r3
8003f4e: 401a ands r2, r3
8003f50: 68fb ldr r3, [r7, #12]
8003f52: 621a str r2, [r3, #32]
/* Set or reset the CCxE Bit */
TIMx->CCER |= (uint32_t)(ChannelState << (Channel & 0x1FU)); /* 0x1FU = 31 bits max shift */
8003f54: 68fb ldr r3, [r7, #12]
8003f56: 6a1a ldr r2, [r3, #32]
8003f58: 68bb ldr r3, [r7, #8]
8003f5a: f003 031f and.w r3, r3, #31
8003f5e: 6879 ldr r1, [r7, #4]
8003f60: fa01 f303 lsl.w r3, r1, r3
8003f64: 431a orrs r2, r3
8003f66: 68fb ldr r3, [r7, #12]
8003f68: 621a str r2, [r3, #32]
}
8003f6a: bf00 nop
8003f6c: 371c adds r7, #28
8003f6e: 46bd mov sp, r7
8003f70: bc80 pop {r7}
8003f72: 4770 bx lr
08003f74 <HAL_TIMEx_MasterConfigSynchronization>:
* mode.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
TIM_MasterConfigTypeDef *sMasterConfig)
{
8003f74: b480 push {r7}
8003f76: b085 sub sp, #20
8003f78: af00 add r7, sp, #0
8003f7a: 6078 str r0, [r7, #4]
8003f7c: 6039 str r1, [r7, #0]
assert_param(IS_TIM_MASTER_INSTANCE(htim->Instance));
assert_param(IS_TIM_TRGO_SOURCE(sMasterConfig->MasterOutputTrigger));
assert_param(IS_TIM_MSM_STATE(sMasterConfig->MasterSlaveMode));
/* Check input state */
__HAL_LOCK(htim);
8003f7e: 687b ldr r3, [r7, #4]
8003f80: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
8003f84: 2b01 cmp r3, #1
8003f86: d101 bne.n 8003f8c <HAL_TIMEx_MasterConfigSynchronization+0x18>
8003f88: 2302 movs r3, #2
8003f8a: e046 b.n 800401a <HAL_TIMEx_MasterConfigSynchronization+0xa6>
8003f8c: 687b ldr r3, [r7, #4]
8003f8e: 2201 movs r2, #1
8003f90: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* Change the handler state */
htim->State = HAL_TIM_STATE_BUSY;
8003f94: 687b ldr r3, [r7, #4]
8003f96: 2202 movs r2, #2
8003f98: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Get the TIMx CR2 register value */
tmpcr2 = htim->Instance->CR2;
8003f9c: 687b ldr r3, [r7, #4]
8003f9e: 681b ldr r3, [r3, #0]
8003fa0: 685b ldr r3, [r3, #4]
8003fa2: 60fb str r3, [r7, #12]
/* Get the TIMx SMCR register value */
tmpsmcr = htim->Instance->SMCR;
8003fa4: 687b ldr r3, [r7, #4]
8003fa6: 681b ldr r3, [r3, #0]
8003fa8: 689b ldr r3, [r3, #8]
8003faa: 60bb str r3, [r7, #8]
/* Reset the MMS Bits */
tmpcr2 &= ~TIM_CR2_MMS;
8003fac: 68fb ldr r3, [r7, #12]
8003fae: f023 0370 bic.w r3, r3, #112 ; 0x70
8003fb2: 60fb str r3, [r7, #12]
/* Select the TRGO source */
tmpcr2 |= sMasterConfig->MasterOutputTrigger;
8003fb4: 683b ldr r3, [r7, #0]
8003fb6: 681b ldr r3, [r3, #0]
8003fb8: 68fa ldr r2, [r7, #12]
8003fba: 4313 orrs r3, r2
8003fbc: 60fb str r3, [r7, #12]
/* Update TIMx CR2 */
htim->Instance->CR2 = tmpcr2;
8003fbe: 687b ldr r3, [r7, #4]
8003fc0: 681b ldr r3, [r3, #0]
8003fc2: 68fa ldr r2, [r7, #12]
8003fc4: 605a str r2, [r3, #4]
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
8003fc6: 687b ldr r3, [r7, #4]
8003fc8: 681b ldr r3, [r3, #0]
8003fca: 4a16 ldr r2, [pc, #88] ; (8004024 <HAL_TIMEx_MasterConfigSynchronization+0xb0>)
8003fcc: 4293 cmp r3, r2
8003fce: d00e beq.n 8003fee <HAL_TIMEx_MasterConfigSynchronization+0x7a>
8003fd0: 687b ldr r3, [r7, #4]
8003fd2: 681b ldr r3, [r3, #0]
8003fd4: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
8003fd8: d009 beq.n 8003fee <HAL_TIMEx_MasterConfigSynchronization+0x7a>
8003fda: 687b ldr r3, [r7, #4]
8003fdc: 681b ldr r3, [r3, #0]
8003fde: 4a12 ldr r2, [pc, #72] ; (8004028 <HAL_TIMEx_MasterConfigSynchronization+0xb4>)
8003fe0: 4293 cmp r3, r2
8003fe2: d004 beq.n 8003fee <HAL_TIMEx_MasterConfigSynchronization+0x7a>
8003fe4: 687b ldr r3, [r7, #4]
8003fe6: 681b ldr r3, [r3, #0]
8003fe8: 4a10 ldr r2, [pc, #64] ; (800402c <HAL_TIMEx_MasterConfigSynchronization+0xb8>)
8003fea: 4293 cmp r3, r2
8003fec: d10c bne.n 8004008 <HAL_TIMEx_MasterConfigSynchronization+0x94>
{
/* Reset the MSM Bit */
tmpsmcr &= ~TIM_SMCR_MSM;
8003fee: 68bb ldr r3, [r7, #8]
8003ff0: f023 0380 bic.w r3, r3, #128 ; 0x80
8003ff4: 60bb str r3, [r7, #8]
/* Set master mode */
tmpsmcr |= sMasterConfig->MasterSlaveMode;
8003ff6: 683b ldr r3, [r7, #0]
8003ff8: 685b ldr r3, [r3, #4]
8003ffa: 68ba ldr r2, [r7, #8]
8003ffc: 4313 orrs r3, r2
8003ffe: 60bb str r3, [r7, #8]
/* Update TIMx SMCR */
htim->Instance->SMCR = tmpsmcr;
8004000: 687b ldr r3, [r7, #4]
8004002: 681b ldr r3, [r3, #0]
8004004: 68ba ldr r2, [r7, #8]
8004006: 609a str r2, [r3, #8]
}
/* Change the htim state */
htim->State = HAL_TIM_STATE_READY;
8004008: 687b ldr r3, [r7, #4]
800400a: 2201 movs r2, #1
800400c: f883 203d strb.w r2, [r3, #61] ; 0x3d
__HAL_UNLOCK(htim);
8004010: 687b ldr r3, [r7, #4]
8004012: 2200 movs r2, #0
8004014: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_OK;
8004018: 2300 movs r3, #0
}
800401a: 4618 mov r0, r3
800401c: 3714 adds r7, #20
800401e: 46bd mov sp, r7
8004020: bc80 pop {r7}
8004022: 4770 bx lr
8004024: 40012c00 .word 0x40012c00
8004028: 40000400 .word 0x40000400
800402c: 40000800 .word 0x40000800
08004030 <HAL_TIMEx_CommutCallback>:
* @brief Hall commutation changed callback in non-blocking mode
* @param htim TIM handle
* @retval None
*/
__weak void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim)
{
8004030: b480 push {r7}
8004032: b083 sub sp, #12
8004034: af00 add r7, sp, #0
8004036: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIMEx_CommutCallback could be implemented in the user file
*/
}
8004038: bf00 nop
800403a: 370c adds r7, #12
800403c: 46bd mov sp, r7
800403e: bc80 pop {r7}
8004040: 4770 bx lr
08004042 <HAL_TIMEx_BreakCallback>:
* @brief Hall Break detection callback in non-blocking mode
* @param htim TIM handle
* @retval None
*/
__weak void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim)
{
8004042: b480 push {r7}
8004044: b083 sub sp, #12
8004046: af00 add r7, sp, #0
8004048: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIMEx_BreakCallback could be implemented in the user file
*/
}
800404a: bf00 nop
800404c: 370c adds r7, #12
800404e: 46bd mov sp, r7
8004050: bc80 pop {r7}
8004052: 4770 bx lr
08004054 <HAL_UART_Init>:
* @param huart Pointer to a UART_HandleTypeDef structure that contains
* the configuration information for the specified UART module.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart)
{
8004054: b580 push {r7, lr}
8004056: b082 sub sp, #8
8004058: af00 add r7, sp, #0
800405a: 6078 str r0, [r7, #4]
/* Check the UART handle allocation */
if (huart == NULL)
800405c: 687b ldr r3, [r7, #4]
800405e: 2b00 cmp r3, #0
8004060: d101 bne.n 8004066 <HAL_UART_Init+0x12>
{
return HAL_ERROR;
8004062: 2301 movs r3, #1
8004064: e03f b.n 80040e6 <HAL_UART_Init+0x92>
assert_param(IS_UART_WORD_LENGTH(huart->Init.WordLength));
#if defined(USART_CR1_OVER8)
assert_param(IS_UART_OVERSAMPLING(huart->Init.OverSampling));
#endif /* USART_CR1_OVER8 */
if (huart->gState == HAL_UART_STATE_RESET)
8004066: 687b ldr r3, [r7, #4]
8004068: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
800406c: b2db uxtb r3, r3
800406e: 2b00 cmp r3, #0
8004070: d106 bne.n 8004080 <HAL_UART_Init+0x2c>
{
/* Allocate lock resource and initialize it */
huart->Lock = HAL_UNLOCKED;
8004072: 687b ldr r3, [r7, #4]
8004074: 2200 movs r2, #0
8004076: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* Init the low level hardware */
huart->MspInitCallback(huart);
#else
/* Init the low level hardware : GPIO, CLOCK */
HAL_UART_MspInit(huart);
800407a: 6878 ldr r0, [r7, #4]
800407c: f7fd fa02 bl 8001484 <HAL_UART_MspInit>
#endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */
}
huart->gState = HAL_UART_STATE_BUSY;
8004080: 687b ldr r3, [r7, #4]
8004082: 2224 movs r2, #36 ; 0x24
8004084: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Disable the peripheral */
__HAL_UART_DISABLE(huart);
8004088: 687b ldr r3, [r7, #4]
800408a: 681b ldr r3, [r3, #0]
800408c: 68da ldr r2, [r3, #12]
800408e: 687b ldr r3, [r7, #4]
8004090: 681b ldr r3, [r3, #0]
8004092: f422 5200 bic.w r2, r2, #8192 ; 0x2000
8004096: 60da str r2, [r3, #12]
/* Set the UART Communication parameters */
UART_SetConfig(huart);
8004098: 6878 ldr r0, [r7, #4]
800409a: f000 fe13 bl 8004cc4 <UART_SetConfig>
/* In asynchronous mode, the following bits must be kept cleared:
- LINEN and CLKEN bits in the USART_CR2 register,
- SCEN, HDSEL and IREN bits in the USART_CR3 register.*/
CLEAR_BIT(huart->Instance->CR2, (USART_CR2_LINEN | USART_CR2_CLKEN));
800409e: 687b ldr r3, [r7, #4]
80040a0: 681b ldr r3, [r3, #0]
80040a2: 691a ldr r2, [r3, #16]
80040a4: 687b ldr r3, [r7, #4]
80040a6: 681b ldr r3, [r3, #0]
80040a8: f422 4290 bic.w r2, r2, #18432 ; 0x4800
80040ac: 611a str r2, [r3, #16]
CLEAR_BIT(huart->Instance->CR3, (USART_CR3_SCEN | USART_CR3_HDSEL | USART_CR3_IREN));
80040ae: 687b ldr r3, [r7, #4]
80040b0: 681b ldr r3, [r3, #0]
80040b2: 695a ldr r2, [r3, #20]
80040b4: 687b ldr r3, [r7, #4]
80040b6: 681b ldr r3, [r3, #0]
80040b8: f022 022a bic.w r2, r2, #42 ; 0x2a
80040bc: 615a str r2, [r3, #20]
/* Enable the peripheral */
__HAL_UART_ENABLE(huart);
80040be: 687b ldr r3, [r7, #4]
80040c0: 681b ldr r3, [r3, #0]
80040c2: 68da ldr r2, [r3, #12]
80040c4: 687b ldr r3, [r7, #4]
80040c6: 681b ldr r3, [r3, #0]
80040c8: f442 5200 orr.w r2, r2, #8192 ; 0x2000
80040cc: 60da str r2, [r3, #12]
/* Initialize the UART state */
huart->ErrorCode = HAL_UART_ERROR_NONE;
80040ce: 687b ldr r3, [r7, #4]
80040d0: 2200 movs r2, #0
80040d2: 641a str r2, [r3, #64] ; 0x40
huart->gState = HAL_UART_STATE_READY;
80040d4: 687b ldr r3, [r7, #4]
80040d6: 2220 movs r2, #32
80040d8: f883 203d strb.w r2, [r3, #61] ; 0x3d
huart->RxState = HAL_UART_STATE_READY;
80040dc: 687b ldr r3, [r7, #4]
80040de: 2220 movs r2, #32
80040e0: f883 203e strb.w r2, [r3, #62] ; 0x3e
return HAL_OK;
80040e4: 2300 movs r3, #0
}
80040e6: 4618 mov r0, r3
80040e8: 3708 adds r7, #8
80040ea: 46bd mov sp, r7
80040ec: bd80 pop {r7, pc}
080040ee <HAL_UART_Transmit>:
* @param Size Amount of data elements (u8 or u16) to be sent
* @param Timeout Timeout duration
* @retval HAL status
*/
HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout)
{
80040ee: b580 push {r7, lr}
80040f0: b08a sub sp, #40 ; 0x28
80040f2: af02 add r7, sp, #8
80040f4: 60f8 str r0, [r7, #12]
80040f6: 60b9 str r1, [r7, #8]
80040f8: 603b str r3, [r7, #0]
80040fa: 4613 mov r3, r2
80040fc: 80fb strh r3, [r7, #6]
uint8_t *pdata8bits;
uint16_t *pdata16bits;
uint32_t tickstart = 0U;
80040fe: 2300 movs r3, #0
8004100: 617b str r3, [r7, #20]
/* Check that a Tx process is not already ongoing */
if (huart->gState == HAL_UART_STATE_READY)
8004102: 68fb ldr r3, [r7, #12]
8004104: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
8004108: b2db uxtb r3, r3
800410a: 2b20 cmp r3, #32
800410c: d17c bne.n 8004208 <HAL_UART_Transmit+0x11a>
{
if ((pData == NULL) || (Size == 0U))
800410e: 68bb ldr r3, [r7, #8]
8004110: 2b00 cmp r3, #0
8004112: d002 beq.n 800411a <HAL_UART_Transmit+0x2c>
8004114: 88fb ldrh r3, [r7, #6]
8004116: 2b00 cmp r3, #0
8004118: d101 bne.n 800411e <HAL_UART_Transmit+0x30>
{
return HAL_ERROR;
800411a: 2301 movs r3, #1
800411c: e075 b.n 800420a <HAL_UART_Transmit+0x11c>
}
/* Process Locked */
__HAL_LOCK(huart);
800411e: 68fb ldr r3, [r7, #12]
8004120: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
8004124: 2b01 cmp r3, #1
8004126: d101 bne.n 800412c <HAL_UART_Transmit+0x3e>
8004128: 2302 movs r3, #2
800412a: e06e b.n 800420a <HAL_UART_Transmit+0x11c>
800412c: 68fb ldr r3, [r7, #12]
800412e: 2201 movs r2, #1
8004130: f883 203c strb.w r2, [r3, #60] ; 0x3c
huart->ErrorCode = HAL_UART_ERROR_NONE;
8004134: 68fb ldr r3, [r7, #12]
8004136: 2200 movs r2, #0
8004138: 641a str r2, [r3, #64] ; 0x40
huart->gState = HAL_UART_STATE_BUSY_TX;
800413a: 68fb ldr r3, [r7, #12]
800413c: 2221 movs r2, #33 ; 0x21
800413e: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Init tickstart for timeout management */
tickstart = HAL_GetTick();
8004142: f7fd fbb7 bl 80018b4 <HAL_GetTick>
8004146: 6178 str r0, [r7, #20]
huart->TxXferSize = Size;
8004148: 68fb ldr r3, [r7, #12]
800414a: 88fa ldrh r2, [r7, #6]
800414c: 849a strh r2, [r3, #36] ; 0x24
huart->TxXferCount = Size;
800414e: 68fb ldr r3, [r7, #12]
8004150: 88fa ldrh r2, [r7, #6]
8004152: 84da strh r2, [r3, #38] ; 0x26
/* In case of 9bits/No Parity transfer, pData needs to be handled as a uint16_t pointer */
if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE))
8004154: 68fb ldr r3, [r7, #12]
8004156: 689b ldr r3, [r3, #8]
8004158: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
800415c: d108 bne.n 8004170 <HAL_UART_Transmit+0x82>
800415e: 68fb ldr r3, [r7, #12]
8004160: 691b ldr r3, [r3, #16]
8004162: 2b00 cmp r3, #0
8004164: d104 bne.n 8004170 <HAL_UART_Transmit+0x82>
{
pdata8bits = NULL;
8004166: 2300 movs r3, #0
8004168: 61fb str r3, [r7, #28]
pdata16bits = (uint16_t *) pData;
800416a: 68bb ldr r3, [r7, #8]
800416c: 61bb str r3, [r7, #24]
800416e: e003 b.n 8004178 <HAL_UART_Transmit+0x8a>
}
else
{
pdata8bits = pData;
8004170: 68bb ldr r3, [r7, #8]
8004172: 61fb str r3, [r7, #28]
pdata16bits = NULL;
8004174: 2300 movs r3, #0
8004176: 61bb str r3, [r7, #24]
}
/* Process Unlocked */
__HAL_UNLOCK(huart);
8004178: 68fb ldr r3, [r7, #12]
800417a: 2200 movs r2, #0
800417c: f883 203c strb.w r2, [r3, #60] ; 0x3c
while (huart->TxXferCount > 0U)
8004180: e02a b.n 80041d8 <HAL_UART_Transmit+0xea>
{
if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_TXE, RESET, tickstart, Timeout) != HAL_OK)
8004182: 683b ldr r3, [r7, #0]
8004184: 9300 str r3, [sp, #0]
8004186: 697b ldr r3, [r7, #20]
8004188: 2200 movs r2, #0
800418a: 2180 movs r1, #128 ; 0x80
800418c: 68f8 ldr r0, [r7, #12]
800418e: f000 fb98 bl 80048c2 <UART_WaitOnFlagUntilTimeout>
8004192: 4603 mov r3, r0
8004194: 2b00 cmp r3, #0
8004196: d001 beq.n 800419c <HAL_UART_Transmit+0xae>
{
return HAL_TIMEOUT;
8004198: 2303 movs r3, #3
800419a: e036 b.n 800420a <HAL_UART_Transmit+0x11c>
}
if (pdata8bits == NULL)
800419c: 69fb ldr r3, [r7, #28]
800419e: 2b00 cmp r3, #0
80041a0: d10b bne.n 80041ba <HAL_UART_Transmit+0xcc>
{
huart->Instance->DR = (uint16_t)(*pdata16bits & 0x01FFU);
80041a2: 69bb ldr r3, [r7, #24]
80041a4: 881b ldrh r3, [r3, #0]
80041a6: 461a mov r2, r3
80041a8: 68fb ldr r3, [r7, #12]
80041aa: 681b ldr r3, [r3, #0]
80041ac: f3c2 0208 ubfx r2, r2, #0, #9
80041b0: 605a str r2, [r3, #4]
pdata16bits++;
80041b2: 69bb ldr r3, [r7, #24]
80041b4: 3302 adds r3, #2
80041b6: 61bb str r3, [r7, #24]
80041b8: e007 b.n 80041ca <HAL_UART_Transmit+0xdc>
}
else
{
huart->Instance->DR = (uint8_t)(*pdata8bits & 0xFFU);
80041ba: 69fb ldr r3, [r7, #28]
80041bc: 781a ldrb r2, [r3, #0]
80041be: 68fb ldr r3, [r7, #12]
80041c0: 681b ldr r3, [r3, #0]
80041c2: 605a str r2, [r3, #4]
pdata8bits++;
80041c4: 69fb ldr r3, [r7, #28]
80041c6: 3301 adds r3, #1
80041c8: 61fb str r3, [r7, #28]
}
huart->TxXferCount--;
80041ca: 68fb ldr r3, [r7, #12]
80041cc: 8cdb ldrh r3, [r3, #38] ; 0x26
80041ce: b29b uxth r3, r3
80041d0: 3b01 subs r3, #1
80041d2: b29a uxth r2, r3
80041d4: 68fb ldr r3, [r7, #12]
80041d6: 84da strh r2, [r3, #38] ; 0x26
while (huart->TxXferCount > 0U)
80041d8: 68fb ldr r3, [r7, #12]
80041da: 8cdb ldrh r3, [r3, #38] ; 0x26
80041dc: b29b uxth r3, r3
80041de: 2b00 cmp r3, #0
80041e0: d1cf bne.n 8004182 <HAL_UART_Transmit+0x94>
}
if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_TC, RESET, tickstart, Timeout) != HAL_OK)
80041e2: 683b ldr r3, [r7, #0]
80041e4: 9300 str r3, [sp, #0]
80041e6: 697b ldr r3, [r7, #20]
80041e8: 2200 movs r2, #0
80041ea: 2140 movs r1, #64 ; 0x40
80041ec: 68f8 ldr r0, [r7, #12]
80041ee: f000 fb68 bl 80048c2 <UART_WaitOnFlagUntilTimeout>
80041f2: 4603 mov r3, r0
80041f4: 2b00 cmp r3, #0
80041f6: d001 beq.n 80041fc <HAL_UART_Transmit+0x10e>
{
return HAL_TIMEOUT;
80041f8: 2303 movs r3, #3
80041fa: e006 b.n 800420a <HAL_UART_Transmit+0x11c>
}
/* At end of Tx process, restore huart->gState to Ready */
huart->gState = HAL_UART_STATE_READY;
80041fc: 68fb ldr r3, [r7, #12]
80041fe: 2220 movs r2, #32
8004200: f883 203d strb.w r2, [r3, #61] ; 0x3d
return HAL_OK;
8004204: 2300 movs r3, #0
8004206: e000 b.n 800420a <HAL_UART_Transmit+0x11c>
}
else
{
return HAL_BUSY;
8004208: 2302 movs r3, #2
}
}
800420a: 4618 mov r0, r3
800420c: 3720 adds r7, #32
800420e: 46bd mov sp, r7
8004210: bd80 pop {r7, pc}
08004212 <HAL_UART_Receive_IT>:
* @param pData Pointer to data buffer (u8 or u16 data elements).
* @param Size Amount of data elements (u8 or u16) to be received.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_UART_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
{
8004212: b580 push {r7, lr}
8004214: b084 sub sp, #16
8004216: af00 add r7, sp, #0
8004218: 60f8 str r0, [r7, #12]
800421a: 60b9 str r1, [r7, #8]
800421c: 4613 mov r3, r2
800421e: 80fb strh r3, [r7, #6]
/* Check that a Rx process is not already ongoing */
if (huart->RxState == HAL_UART_STATE_READY)
8004220: 68fb ldr r3, [r7, #12]
8004222: f893 303e ldrb.w r3, [r3, #62] ; 0x3e
8004226: b2db uxtb r3, r3
8004228: 2b20 cmp r3, #32
800422a: d11d bne.n 8004268 <HAL_UART_Receive_IT+0x56>
{
if ((pData == NULL) || (Size == 0U))
800422c: 68bb ldr r3, [r7, #8]
800422e: 2b00 cmp r3, #0
8004230: d002 beq.n 8004238 <HAL_UART_Receive_IT+0x26>
8004232: 88fb ldrh r3, [r7, #6]
8004234: 2b00 cmp r3, #0
8004236: d101 bne.n 800423c <HAL_UART_Receive_IT+0x2a>
{
return HAL_ERROR;
8004238: 2301 movs r3, #1
800423a: e016 b.n 800426a <HAL_UART_Receive_IT+0x58>
}
/* Process Locked */
__HAL_LOCK(huart);
800423c: 68fb ldr r3, [r7, #12]
800423e: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
8004242: 2b01 cmp r3, #1
8004244: d101 bne.n 800424a <HAL_UART_Receive_IT+0x38>
8004246: 2302 movs r3, #2
8004248: e00f b.n 800426a <HAL_UART_Receive_IT+0x58>
800424a: 68fb ldr r3, [r7, #12]
800424c: 2201 movs r2, #1
800424e: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* Set Reception type to Standard reception */
huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
8004252: 68fb ldr r3, [r7, #12]
8004254: 2200 movs r2, #0
8004256: 631a str r2, [r3, #48] ; 0x30
return(UART_Start_Receive_IT(huart, pData, Size));
8004258: 88fb ldrh r3, [r7, #6]
800425a: 461a mov r2, r3
800425c: 68b9 ldr r1, [r7, #8]
800425e: 68f8 ldr r0, [r7, #12]
8004260: f000 fb79 bl 8004956 <UART_Start_Receive_IT>
8004264: 4603 mov r3, r0
8004266: e000 b.n 800426a <HAL_UART_Receive_IT+0x58>
}
else
{
return HAL_BUSY;
8004268: 2302 movs r3, #2
}
}
800426a: 4618 mov r0, r3
800426c: 3710 adds r7, #16
800426e: 46bd mov sp, r7
8004270: bd80 pop {r7, pc}
...
08004274 <HAL_UART_Transmit_DMA>:
* @param pData Pointer to data buffer (u8 or u16 data elements).
* @param Size Amount of data elements (u8 or u16) to be sent
* @retval HAL status
*/
HAL_StatusTypeDef HAL_UART_Transmit_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
{
8004274: b580 push {r7, lr}
8004276: b086 sub sp, #24
8004278: af00 add r7, sp, #0
800427a: 60f8 str r0, [r7, #12]
800427c: 60b9 str r1, [r7, #8]
800427e: 4613 mov r3, r2
8004280: 80fb strh r3, [r7, #6]
uint32_t *tmp;
/* Check that a Tx process is not already ongoing */
if (huart->gState == HAL_UART_STATE_READY)
8004282: 68fb ldr r3, [r7, #12]
8004284: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
8004288: b2db uxtb r3, r3
800428a: 2b20 cmp r3, #32
800428c: d153 bne.n 8004336 <HAL_UART_Transmit_DMA+0xc2>
{
if ((pData == NULL) || (Size == 0U))
800428e: 68bb ldr r3, [r7, #8]
8004290: 2b00 cmp r3, #0
8004292: d002 beq.n 800429a <HAL_UART_Transmit_DMA+0x26>
8004294: 88fb ldrh r3, [r7, #6]
8004296: 2b00 cmp r3, #0
8004298: d101 bne.n 800429e <HAL_UART_Transmit_DMA+0x2a>
{
return HAL_ERROR;
800429a: 2301 movs r3, #1
800429c: e04c b.n 8004338 <HAL_UART_Transmit_DMA+0xc4>
}
/* Process Locked */
__HAL_LOCK(huart);
800429e: 68fb ldr r3, [r7, #12]
80042a0: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
80042a4: 2b01 cmp r3, #1
80042a6: d101 bne.n 80042ac <HAL_UART_Transmit_DMA+0x38>
80042a8: 2302 movs r3, #2
80042aa: e045 b.n 8004338 <HAL_UART_Transmit_DMA+0xc4>
80042ac: 68fb ldr r3, [r7, #12]
80042ae: 2201 movs r2, #1
80042b0: f883 203c strb.w r2, [r3, #60] ; 0x3c
huart->pTxBuffPtr = pData;
80042b4: 68ba ldr r2, [r7, #8]
80042b6: 68fb ldr r3, [r7, #12]
80042b8: 621a str r2, [r3, #32]
huart->TxXferSize = Size;
80042ba: 68fb ldr r3, [r7, #12]
80042bc: 88fa ldrh r2, [r7, #6]
80042be: 849a strh r2, [r3, #36] ; 0x24
huart->TxXferCount = Size;
80042c0: 68fb ldr r3, [r7, #12]
80042c2: 88fa ldrh r2, [r7, #6]
80042c4: 84da strh r2, [r3, #38] ; 0x26
huart->ErrorCode = HAL_UART_ERROR_NONE;
80042c6: 68fb ldr r3, [r7, #12]
80042c8: 2200 movs r2, #0
80042ca: 641a str r2, [r3, #64] ; 0x40
huart->gState = HAL_UART_STATE_BUSY_TX;
80042cc: 68fb ldr r3, [r7, #12]
80042ce: 2221 movs r2, #33 ; 0x21
80042d0: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Set the UART DMA transfer complete callback */
huart->hdmatx->XferCpltCallback = UART_DMATransmitCplt;
80042d4: 68fb ldr r3, [r7, #12]
80042d6: 6b5b ldr r3, [r3, #52] ; 0x34
80042d8: 4a19 ldr r2, [pc, #100] ; (8004340 <HAL_UART_Transmit_DMA+0xcc>)
80042da: 629a str r2, [r3, #40] ; 0x28
/* Set the UART DMA Half transfer complete callback */
huart->hdmatx->XferHalfCpltCallback = UART_DMATxHalfCplt;
80042dc: 68fb ldr r3, [r7, #12]
80042de: 6b5b ldr r3, [r3, #52] ; 0x34
80042e0: 4a18 ldr r2, [pc, #96] ; (8004344 <HAL_UART_Transmit_DMA+0xd0>)
80042e2: 62da str r2, [r3, #44] ; 0x2c
/* Set the DMA error callback */
huart->hdmatx->XferErrorCallback = UART_DMAError;
80042e4: 68fb ldr r3, [r7, #12]
80042e6: 6b5b ldr r3, [r3, #52] ; 0x34
80042e8: 4a17 ldr r2, [pc, #92] ; (8004348 <HAL_UART_Transmit_DMA+0xd4>)
80042ea: 631a str r2, [r3, #48] ; 0x30
/* Set the DMA abort callback */
huart->hdmatx->XferAbortCallback = NULL;
80042ec: 68fb ldr r3, [r7, #12]
80042ee: 6b5b ldr r3, [r3, #52] ; 0x34
80042f0: 2200 movs r2, #0
80042f2: 635a str r2, [r3, #52] ; 0x34
/* Enable the UART transmit DMA channel */
tmp = (uint32_t *)&pData;
80042f4: f107 0308 add.w r3, r7, #8
80042f8: 617b str r3, [r7, #20]
HAL_DMA_Start_IT(huart->hdmatx, *(uint32_t *)tmp, (uint32_t)&huart->Instance->DR, Size);
80042fa: 68fb ldr r3, [r7, #12]
80042fc: 6b58 ldr r0, [r3, #52] ; 0x34
80042fe: 697b ldr r3, [r7, #20]
8004300: 6819 ldr r1, [r3, #0]
8004302: 68fb ldr r3, [r7, #12]
8004304: 681b ldr r3, [r3, #0]
8004306: 3304 adds r3, #4
8004308: 461a mov r2, r3
800430a: 88fb ldrh r3, [r7, #6]
800430c: f7fd fc68 bl 8001be0 <HAL_DMA_Start_IT>
/* Clear the TC flag in the SR register by writing 0 to it */
__HAL_UART_CLEAR_FLAG(huart, UART_FLAG_TC);
8004310: 68fb ldr r3, [r7, #12]
8004312: 681b ldr r3, [r3, #0]
8004314: f06f 0240 mvn.w r2, #64 ; 0x40
8004318: 601a str r2, [r3, #0]
/* Process Unlocked */
__HAL_UNLOCK(huart);
800431a: 68fb ldr r3, [r7, #12]
800431c: 2200 movs r2, #0
800431e: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* Enable the DMA transfer for transmit request by setting the DMAT bit
in the UART CR3 register */
SET_BIT(huart->Instance->CR3, USART_CR3_DMAT);
8004322: 68fb ldr r3, [r7, #12]
8004324: 681b ldr r3, [r3, #0]
8004326: 695a ldr r2, [r3, #20]
8004328: 68fb ldr r3, [r7, #12]
800432a: 681b ldr r3, [r3, #0]
800432c: f042 0280 orr.w r2, r2, #128 ; 0x80
8004330: 615a str r2, [r3, #20]
return HAL_OK;
8004332: 2300 movs r3, #0
8004334: e000 b.n 8004338 <HAL_UART_Transmit_DMA+0xc4>
}
else
{
return HAL_BUSY;
8004336: 2302 movs r3, #2
}
}
8004338: 4618 mov r0, r3
800433a: 3718 adds r7, #24
800433c: 46bd mov sp, r7
800433e: bd80 pop {r7, pc}
8004340: 080047c1 .word 0x080047c1
8004344: 08004813 .word 0x08004813
8004348: 0800482f .word 0x0800482f
0800434c <HAL_UART_AbortReceive_IT>:
* @note This procedure is executed in Interrupt mode, meaning that abort procedure could be
* considered as completed only when user abort complete callback is executed (not when exiting function).
* @retval HAL status
*/
HAL_StatusTypeDef HAL_UART_AbortReceive_IT(UART_HandleTypeDef *huart)
{
800434c: b580 push {r7, lr}
800434e: b082 sub sp, #8
8004350: af00 add r7, sp, #0
8004352: 6078 str r0, [r7, #4]
/* Disable RXNE, PE and ERR (Frame error, noise error, overrun error) interrupts */
CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE));
8004354: 687b ldr r3, [r7, #4]
8004356: 681b ldr r3, [r3, #0]
8004358: 68da ldr r2, [r3, #12]
800435a: 687b ldr r3, [r7, #4]
800435c: 681b ldr r3, [r3, #0]
800435e: f422 7290 bic.w r2, r2, #288 ; 0x120
8004362: 60da str r2, [r3, #12]
CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
8004364: 687b ldr r3, [r7, #4]
8004366: 681b ldr r3, [r3, #0]
8004368: 695a ldr r2, [r3, #20]
800436a: 687b ldr r3, [r7, #4]
800436c: 681b ldr r3, [r3, #0]
800436e: f022 0201 bic.w r2, r2, #1
8004372: 615a str r2, [r3, #20]
/* If Reception till IDLE event was ongoing, disable IDLEIE interrupt */
if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE)
8004374: 687b ldr r3, [r7, #4]
8004376: 6b1b ldr r3, [r3, #48] ; 0x30
8004378: 2b01 cmp r3, #1
800437a: d107 bne.n 800438c <HAL_UART_AbortReceive_IT+0x40>
{
CLEAR_BIT(huart->Instance->CR1, (USART_CR1_IDLEIE));
800437c: 687b ldr r3, [r7, #4]
800437e: 681b ldr r3, [r3, #0]
8004380: 68da ldr r2, [r3, #12]
8004382: 687b ldr r3, [r7, #4]
8004384: 681b ldr r3, [r3, #0]
8004386: f022 0210 bic.w r2, r2, #16
800438a: 60da str r2, [r3, #12]
}
/* Disable the UART DMA Rx request if enabled */
if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR))
800438c: 687b ldr r3, [r7, #4]
800438e: 681b ldr r3, [r3, #0]
8004390: 695b ldr r3, [r3, #20]
8004392: f003 0340 and.w r3, r3, #64 ; 0x40
8004396: 2b00 cmp r3, #0
8004398: d02d beq.n 80043f6 <HAL_UART_AbortReceive_IT+0xaa>
{
CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAR);
800439a: 687b ldr r3, [r7, #4]
800439c: 681b ldr r3, [r3, #0]
800439e: 695a ldr r2, [r3, #20]
80043a0: 687b ldr r3, [r7, #4]
80043a2: 681b ldr r3, [r3, #0]
80043a4: f022 0240 bic.w r2, r2, #64 ; 0x40
80043a8: 615a str r2, [r3, #20]
/* Abort the UART DMA Rx channel : use blocking DMA Abort API (no callback) */
if (huart->hdmarx != NULL)
80043aa: 687b ldr r3, [r7, #4]
80043ac: 6b9b ldr r3, [r3, #56] ; 0x38
80043ae: 2b00 cmp r3, #0
80043b0: d013 beq.n 80043da <HAL_UART_AbortReceive_IT+0x8e>
{
/* Set the UART DMA Abort callback :
will lead to call HAL_UART_AbortCpltCallback() at end of DMA abort procedure */
huart->hdmarx->XferAbortCallback = UART_DMARxOnlyAbortCallback;
80043b2: 687b ldr r3, [r7, #4]
80043b4: 6b9b ldr r3, [r3, #56] ; 0x38
80043b6: 4a19 ldr r2, [pc, #100] ; (800441c <HAL_UART_AbortReceive_IT+0xd0>)
80043b8: 635a str r2, [r3, #52] ; 0x34
/* Abort DMA RX */
if (HAL_DMA_Abort_IT(huart->hdmarx) != HAL_OK)
80043ba: 687b ldr r3, [r7, #4]
80043bc: 6b9b ldr r3, [r3, #56] ; 0x38
80043be: 4618 mov r0, r3
80043c0: f7fd fca8 bl 8001d14 <HAL_DMA_Abort_IT>
80043c4: 4603 mov r3, r0
80043c6: 2b00 cmp r3, #0
80043c8: d022 beq.n 8004410 <HAL_UART_AbortReceive_IT+0xc4>
{
/* Call Directly huart->hdmarx->XferAbortCallback function in case of error */
huart->hdmarx->XferAbortCallback(huart->hdmarx);
80043ca: 687b ldr r3, [r7, #4]
80043cc: 6b9b ldr r3, [r3, #56] ; 0x38
80043ce: 6b5b ldr r3, [r3, #52] ; 0x34
80043d0: 687a ldr r2, [r7, #4]
80043d2: 6b92 ldr r2, [r2, #56] ; 0x38
80043d4: 4610 mov r0, r2
80043d6: 4798 blx r3
80043d8: e01a b.n 8004410 <HAL_UART_AbortReceive_IT+0xc4>
}
}
else
{
/* Reset Rx transfer counter */
huart->RxXferCount = 0x00U;
80043da: 687b ldr r3, [r7, #4]
80043dc: 2200 movs r2, #0
80043de: 85da strh r2, [r3, #46] ; 0x2e
/* Restore huart->RxState to Ready */
huart->RxState = HAL_UART_STATE_READY;
80043e0: 687b ldr r3, [r7, #4]
80043e2: 2220 movs r2, #32
80043e4: f883 203e strb.w r2, [r3, #62] ; 0x3e
huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
80043e8: 687b ldr r3, [r7, #4]
80043ea: 2200 movs r2, #0
80043ec: 631a str r2, [r3, #48] ; 0x30
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/* Call registered Abort Receive Complete Callback */
huart->AbortReceiveCpltCallback(huart);
#else
/* Call legacy weak Abort Receive Complete Callback */
HAL_UART_AbortReceiveCpltCallback(huart);
80043ee: 6878 ldr r0, [r7, #4]
80043f0: f000 f9d2 bl 8004798 <HAL_UART_AbortReceiveCpltCallback>
80043f4: e00c b.n 8004410 <HAL_UART_AbortReceive_IT+0xc4>
}
}
else
{
/* Reset Rx transfer counter */
huart->RxXferCount = 0x00U;
80043f6: 687b ldr r3, [r7, #4]
80043f8: 2200 movs r2, #0
80043fa: 85da strh r2, [r3, #46] ; 0x2e
/* Restore huart->RxState to Ready */
huart->RxState = HAL_UART_STATE_READY;
80043fc: 687b ldr r3, [r7, #4]
80043fe: 2220 movs r2, #32
8004400: f883 203e strb.w r2, [r3, #62] ; 0x3e
huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
8004404: 687b ldr r3, [r7, #4]
8004406: 2200 movs r2, #0
8004408: 631a str r2, [r3, #48] ; 0x30
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/* Call registered Abort Receive Complete Callback */
huart->AbortReceiveCpltCallback(huart);
#else
/* Call legacy weak Abort Receive Complete Callback */
HAL_UART_AbortReceiveCpltCallback(huart);
800440a: 6878 ldr r0, [r7, #4]
800440c: f000 f9c4 bl 8004798 <HAL_UART_AbortReceiveCpltCallback>
#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
}
return HAL_OK;
8004410: 2300 movs r3, #0
}
8004412: 4618 mov r0, r3
8004414: 3708 adds r7, #8
8004416: 46bd mov sp, r7
8004418: bd80 pop {r7, pc}
800441a: bf00 nop
800441c: 08004a73 .word 0x08004a73
08004420 <HAL_UART_IRQHandler>:
* @param huart Pointer to a UART_HandleTypeDef structure that contains
* the configuration information for the specified UART module.
* @retval None
*/
void HAL_UART_IRQHandler(UART_HandleTypeDef *huart)
{
8004420: b580 push {r7, lr}
8004422: b08a sub sp, #40 ; 0x28
8004424: af00 add r7, sp, #0
8004426: 6078 str r0, [r7, #4]
uint32_t isrflags = READ_REG(huart->Instance->SR);
8004428: 687b ldr r3, [r7, #4]
800442a: 681b ldr r3, [r3, #0]
800442c: 681b ldr r3, [r3, #0]
800442e: 627b str r3, [r7, #36] ; 0x24
uint32_t cr1its = READ_REG(huart->Instance->CR1);
8004430: 687b ldr r3, [r7, #4]
8004432: 681b ldr r3, [r3, #0]
8004434: 68db ldr r3, [r3, #12]
8004436: 623b str r3, [r7, #32]
uint32_t cr3its = READ_REG(huart->Instance->CR3);
8004438: 687b ldr r3, [r7, #4]
800443a: 681b ldr r3, [r3, #0]
800443c: 695b ldr r3, [r3, #20]
800443e: 61fb str r3, [r7, #28]
uint32_t errorflags = 0x00U;
8004440: 2300 movs r3, #0
8004442: 61bb str r3, [r7, #24]
uint32_t dmarequest = 0x00U;
8004444: 2300 movs r3, #0
8004446: 617b str r3, [r7, #20]
/* If no error occurs */
errorflags = (isrflags & (uint32_t)(USART_SR_PE | USART_SR_FE | USART_SR_ORE | USART_SR_NE));
8004448: 6a7b ldr r3, [r7, #36] ; 0x24
800444a: f003 030f and.w r3, r3, #15
800444e: 61bb str r3, [r7, #24]
if (errorflags == RESET)
8004450: 69bb ldr r3, [r7, #24]
8004452: 2b00 cmp r3, #0
8004454: d10d bne.n 8004472 <HAL_UART_IRQHandler+0x52>
{
/* UART in mode Receiver -------------------------------------------------*/
if (((isrflags & USART_SR_RXNE) != RESET) && ((cr1its & USART_CR1_RXNEIE) != RESET))
8004456: 6a7b ldr r3, [r7, #36] ; 0x24
8004458: f003 0320 and.w r3, r3, #32
800445c: 2b00 cmp r3, #0
800445e: d008 beq.n 8004472 <HAL_UART_IRQHandler+0x52>
8004460: 6a3b ldr r3, [r7, #32]
8004462: f003 0320 and.w r3, r3, #32
8004466: 2b00 cmp r3, #0
8004468: d003 beq.n 8004472 <HAL_UART_IRQHandler+0x52>
{
UART_Receive_IT(huart);
800446a: 6878 ldr r0, [r7, #4]
800446c: f000 fb80 bl 8004b70 <UART_Receive_IT>
return;
8004470: e17b b.n 800476a <HAL_UART_IRQHandler+0x34a>
}
}
/* If some errors occur */
if ((errorflags != RESET) && (((cr3its & USART_CR3_EIE) != RESET) || ((cr1its & (USART_CR1_RXNEIE | USART_CR1_PEIE)) != RESET)))
8004472: 69bb ldr r3, [r7, #24]
8004474: 2b00 cmp r3, #0
8004476: f000 80b1 beq.w 80045dc <HAL_UART_IRQHandler+0x1bc>
800447a: 69fb ldr r3, [r7, #28]
800447c: f003 0301 and.w r3, r3, #1
8004480: 2b00 cmp r3, #0
8004482: d105 bne.n 8004490 <HAL_UART_IRQHandler+0x70>
8004484: 6a3b ldr r3, [r7, #32]
8004486: f403 7390 and.w r3, r3, #288 ; 0x120
800448a: 2b00 cmp r3, #0
800448c: f000 80a6 beq.w 80045dc <HAL_UART_IRQHandler+0x1bc>
{
/* UART parity error interrupt occurred ----------------------------------*/
if (((isrflags & USART_SR_PE) != RESET) && ((cr1its & USART_CR1_PEIE) != RESET))
8004490: 6a7b ldr r3, [r7, #36] ; 0x24
8004492: f003 0301 and.w r3, r3, #1
8004496: 2b00 cmp r3, #0
8004498: d00a beq.n 80044b0 <HAL_UART_IRQHandler+0x90>
800449a: 6a3b ldr r3, [r7, #32]
800449c: f403 7380 and.w r3, r3, #256 ; 0x100
80044a0: 2b00 cmp r3, #0
80044a2: d005 beq.n 80044b0 <HAL_UART_IRQHandler+0x90>
{
huart->ErrorCode |= HAL_UART_ERROR_PE;
80044a4: 687b ldr r3, [r7, #4]
80044a6: 6c1b ldr r3, [r3, #64] ; 0x40
80044a8: f043 0201 orr.w r2, r3, #1
80044ac: 687b ldr r3, [r7, #4]
80044ae: 641a str r2, [r3, #64] ; 0x40
}
/* UART noise error interrupt occurred -----------------------------------*/
if (((isrflags & USART_SR_NE) != RESET) && ((cr3its & USART_CR3_EIE) != RESET))
80044b0: 6a7b ldr r3, [r7, #36] ; 0x24
80044b2: f003 0304 and.w r3, r3, #4
80044b6: 2b00 cmp r3, #0
80044b8: d00a beq.n 80044d0 <HAL_UART_IRQHandler+0xb0>
80044ba: 69fb ldr r3, [r7, #28]
80044bc: f003 0301 and.w r3, r3, #1
80044c0: 2b00 cmp r3, #0
80044c2: d005 beq.n 80044d0 <HAL_UART_IRQHandler+0xb0>
{
huart->ErrorCode |= HAL_UART_ERROR_NE;
80044c4: 687b ldr r3, [r7, #4]
80044c6: 6c1b ldr r3, [r3, #64] ; 0x40
80044c8: f043 0202 orr.w r2, r3, #2
80044cc: 687b ldr r3, [r7, #4]
80044ce: 641a str r2, [r3, #64] ; 0x40
}
/* UART frame error interrupt occurred -----------------------------------*/
if (((isrflags & USART_SR_FE) != RESET) && ((cr3its & USART_CR3_EIE) != RESET))
80044d0: 6a7b ldr r3, [r7, #36] ; 0x24
80044d2: f003 0302 and.w r3, r3, #2
80044d6: 2b00 cmp r3, #0
80044d8: d00a beq.n 80044f0 <HAL_UART_IRQHandler+0xd0>
80044da: 69fb ldr r3, [r7, #28]
80044dc: f003 0301 and.w r3, r3, #1
80044e0: 2b00 cmp r3, #0
80044e2: d005 beq.n 80044f0 <HAL_UART_IRQHandler+0xd0>
{
huart->ErrorCode |= HAL_UART_ERROR_FE;
80044e4: 687b ldr r3, [r7, #4]
80044e6: 6c1b ldr r3, [r3, #64] ; 0x40
80044e8: f043 0204 orr.w r2, r3, #4
80044ec: 687b ldr r3, [r7, #4]
80044ee: 641a str r2, [r3, #64] ; 0x40
}
/* UART Over-Run interrupt occurred --------------------------------------*/
if (((isrflags & USART_SR_ORE) != RESET) && (((cr1its & USART_CR1_RXNEIE) != RESET) || ((cr3its & USART_CR3_EIE) != RESET)))
80044f0: 6a7b ldr r3, [r7, #36] ; 0x24
80044f2: f003 0308 and.w r3, r3, #8
80044f6: 2b00 cmp r3, #0
80044f8: d00f beq.n 800451a <HAL_UART_IRQHandler+0xfa>
80044fa: 6a3b ldr r3, [r7, #32]
80044fc: f003 0320 and.w r3, r3, #32
8004500: 2b00 cmp r3, #0
8004502: d104 bne.n 800450e <HAL_UART_IRQHandler+0xee>
8004504: 69fb ldr r3, [r7, #28]
8004506: f003 0301 and.w r3, r3, #1
800450a: 2b00 cmp r3, #0
800450c: d005 beq.n 800451a <HAL_UART_IRQHandler+0xfa>
{
huart->ErrorCode |= HAL_UART_ERROR_ORE;
800450e: 687b ldr r3, [r7, #4]
8004510: 6c1b ldr r3, [r3, #64] ; 0x40
8004512: f043 0208 orr.w r2, r3, #8
8004516: 687b ldr r3, [r7, #4]
8004518: 641a str r2, [r3, #64] ; 0x40
}
/* Call UART Error Call back function if need be --------------------------*/
if (huart->ErrorCode != HAL_UART_ERROR_NONE)
800451a: 687b ldr r3, [r7, #4]
800451c: 6c1b ldr r3, [r3, #64] ; 0x40
800451e: 2b00 cmp r3, #0
8004520: f000 811e beq.w 8004760 <HAL_UART_IRQHandler+0x340>
{
/* UART in mode Receiver -----------------------------------------------*/
if (((isrflags & USART_SR_RXNE) != RESET) && ((cr1its & USART_CR1_RXNEIE) != RESET))
8004524: 6a7b ldr r3, [r7, #36] ; 0x24
8004526: f003 0320 and.w r3, r3, #32
800452a: 2b00 cmp r3, #0
800452c: d007 beq.n 800453e <HAL_UART_IRQHandler+0x11e>
800452e: 6a3b ldr r3, [r7, #32]
8004530: f003 0320 and.w r3, r3, #32
8004534: 2b00 cmp r3, #0
8004536: d002 beq.n 800453e <HAL_UART_IRQHandler+0x11e>
{
UART_Receive_IT(huart);
8004538: 6878 ldr r0, [r7, #4]
800453a: f000 fb19 bl 8004b70 <UART_Receive_IT>
}
/* If Overrun error occurs, or if any error occurs in DMA mode reception,
consider error as blocking */
dmarequest = HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR);
800453e: 687b ldr r3, [r7, #4]
8004540: 681b ldr r3, [r3, #0]
8004542: 695b ldr r3, [r3, #20]
8004544: f003 0340 and.w r3, r3, #64 ; 0x40
8004548: 2b00 cmp r3, #0
800454a: bf14 ite ne
800454c: 2301 movne r3, #1
800454e: 2300 moveq r3, #0
8004550: b2db uxtb r3, r3
8004552: 617b str r3, [r7, #20]
if (((huart->ErrorCode & HAL_UART_ERROR_ORE) != RESET) || dmarequest)
8004554: 687b ldr r3, [r7, #4]
8004556: 6c1b ldr r3, [r3, #64] ; 0x40
8004558: f003 0308 and.w r3, r3, #8
800455c: 2b00 cmp r3, #0
800455e: d102 bne.n 8004566 <HAL_UART_IRQHandler+0x146>
8004560: 697b ldr r3, [r7, #20]
8004562: 2b00 cmp r3, #0
8004564: d031 beq.n 80045ca <HAL_UART_IRQHandler+0x1aa>
{
/* Blocking error : transfer is aborted
Set the UART state ready to be able to start again the process,
Disable Rx Interrupts, and disable Rx DMA request, if ongoing */
UART_EndRxTransfer(huart);
8004566: 6878 ldr r0, [r7, #4]
8004568: f000 fa43 bl 80049f2 <UART_EndRxTransfer>
/* Disable the UART DMA Rx request if enabled */
if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR))
800456c: 687b ldr r3, [r7, #4]
800456e: 681b ldr r3, [r3, #0]
8004570: 695b ldr r3, [r3, #20]
8004572: f003 0340 and.w r3, r3, #64 ; 0x40
8004576: 2b00 cmp r3, #0
8004578: d023 beq.n 80045c2 <HAL_UART_IRQHandler+0x1a2>
{
CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAR);
800457a: 687b ldr r3, [r7, #4]
800457c: 681b ldr r3, [r3, #0]
800457e: 695a ldr r2, [r3, #20]
8004580: 687b ldr r3, [r7, #4]
8004582: 681b ldr r3, [r3, #0]
8004584: f022 0240 bic.w r2, r2, #64 ; 0x40
8004588: 615a str r2, [r3, #20]
/* Abort the UART DMA Rx channel */
if (huart->hdmarx != NULL)
800458a: 687b ldr r3, [r7, #4]
800458c: 6b9b ldr r3, [r3, #56] ; 0x38
800458e: 2b00 cmp r3, #0
8004590: d013 beq.n 80045ba <HAL_UART_IRQHandler+0x19a>
{
/* Set the UART DMA Abort callback :
will lead to call HAL_UART_ErrorCallback() at end of DMA abort procedure */
huart->hdmarx->XferAbortCallback = UART_DMAAbortOnError;
8004592: 687b ldr r3, [r7, #4]
8004594: 6b9b ldr r3, [r3, #56] ; 0x38
8004596: 4a76 ldr r2, [pc, #472] ; (8004770 <HAL_UART_IRQHandler+0x350>)
8004598: 635a str r2, [r3, #52] ; 0x34
if (HAL_DMA_Abort_IT(huart->hdmarx) != HAL_OK)
800459a: 687b ldr r3, [r7, #4]
800459c: 6b9b ldr r3, [r3, #56] ; 0x38
800459e: 4618 mov r0, r3
80045a0: f7fd fbb8 bl 8001d14 <HAL_DMA_Abort_IT>
80045a4: 4603 mov r3, r0
80045a6: 2b00 cmp r3, #0
80045a8: d016 beq.n 80045d8 <HAL_UART_IRQHandler+0x1b8>
{
/* Call Directly XferAbortCallback function in case of error */
huart->hdmarx->XferAbortCallback(huart->hdmarx);
80045aa: 687b ldr r3, [r7, #4]
80045ac: 6b9b ldr r3, [r3, #56] ; 0x38
80045ae: 6b5b ldr r3, [r3, #52] ; 0x34
80045b0: 687a ldr r2, [r7, #4]
80045b2: 6b92 ldr r2, [r2, #56] ; 0x38
80045b4: 4610 mov r0, r2
80045b6: 4798 blx r3
if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR))
80045b8: e00e b.n 80045d8 <HAL_UART_IRQHandler+0x1b8>
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/*Call registered error callback*/
huart->ErrorCallback(huart);
#else
/*Call legacy weak error callback*/
HAL_UART_ErrorCallback(huart);
80045ba: 6878 ldr r0, [r7, #4]
80045bc: f000 f8e3 bl 8004786 <HAL_UART_ErrorCallback>
if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR))
80045c0: e00a b.n 80045d8 <HAL_UART_IRQHandler+0x1b8>
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/*Call registered error callback*/
huart->ErrorCallback(huart);
#else
/*Call legacy weak error callback*/
HAL_UART_ErrorCallback(huart);
80045c2: 6878 ldr r0, [r7, #4]
80045c4: f000 f8df bl 8004786 <HAL_UART_ErrorCallback>
if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR))
80045c8: e006 b.n 80045d8 <HAL_UART_IRQHandler+0x1b8>
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/*Call registered error callback*/
huart->ErrorCallback(huart);
#else
/*Call legacy weak error callback*/
HAL_UART_ErrorCallback(huart);
80045ca: 6878 ldr r0, [r7, #4]
80045cc: f000 f8db bl 8004786 <HAL_UART_ErrorCallback>
#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
huart->ErrorCode = HAL_UART_ERROR_NONE;
80045d0: 687b ldr r3, [r7, #4]
80045d2: 2200 movs r2, #0
80045d4: 641a str r2, [r3, #64] ; 0x40
}
}
return;
80045d6: e0c3 b.n 8004760 <HAL_UART_IRQHandler+0x340>
if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR))
80045d8: bf00 nop
return;
80045da: e0c1 b.n 8004760 <HAL_UART_IRQHandler+0x340>
} /* End if some error occurs */
/* Check current reception Mode :
If Reception till IDLE event has been selected : */
if ( (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE)
80045dc: 687b ldr r3, [r7, #4]
80045de: 6b1b ldr r3, [r3, #48] ; 0x30
80045e0: 2b01 cmp r3, #1
80045e2: f040 80a1 bne.w 8004728 <HAL_UART_IRQHandler+0x308>
&&((isrflags & USART_SR_IDLE) != 0U)
80045e6: 6a7b ldr r3, [r7, #36] ; 0x24
80045e8: f003 0310 and.w r3, r3, #16
80045ec: 2b00 cmp r3, #0
80045ee: f000 809b beq.w 8004728 <HAL_UART_IRQHandler+0x308>
&&((cr1its & USART_SR_IDLE) != 0U))
80045f2: 6a3b ldr r3, [r7, #32]
80045f4: f003 0310 and.w r3, r3, #16
80045f8: 2b00 cmp r3, #0
80045fa: f000 8095 beq.w 8004728 <HAL_UART_IRQHandler+0x308>
{
__HAL_UART_CLEAR_IDLEFLAG(huart);
80045fe: 2300 movs r3, #0
8004600: 60fb str r3, [r7, #12]
8004602: 687b ldr r3, [r7, #4]
8004604: 681b ldr r3, [r3, #0]
8004606: 681b ldr r3, [r3, #0]
8004608: 60fb str r3, [r7, #12]
800460a: 687b ldr r3, [r7, #4]
800460c: 681b ldr r3, [r3, #0]
800460e: 685b ldr r3, [r3, #4]
8004610: 60fb str r3, [r7, #12]
8004612: 68fb ldr r3, [r7, #12]
/* Check if DMA mode is enabled in UART */
if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR))
8004614: 687b ldr r3, [r7, #4]
8004616: 681b ldr r3, [r3, #0]
8004618: 695b ldr r3, [r3, #20]
800461a: f003 0340 and.w r3, r3, #64 ; 0x40
800461e: 2b00 cmp r3, #0
8004620: d04e beq.n 80046c0 <HAL_UART_IRQHandler+0x2a0>
{
/* DMA mode enabled */
/* Check received length : If all expected data are received, do nothing,
(DMA cplt callback will be called).
Otherwise, if at least one data has already been received, IDLE event is to be notified to user */
uint16_t nb_remaining_rx_data = (uint16_t) __HAL_DMA_GET_COUNTER(huart->hdmarx);
8004622: 687b ldr r3, [r7, #4]
8004624: 6b9b ldr r3, [r3, #56] ; 0x38
8004626: 681b ldr r3, [r3, #0]
8004628: 685b ldr r3, [r3, #4]
800462a: 823b strh r3, [r7, #16]
if ( (nb_remaining_rx_data > 0U)
800462c: 8a3b ldrh r3, [r7, #16]
800462e: 2b00 cmp r3, #0
8004630: f000 8098 beq.w 8004764 <HAL_UART_IRQHandler+0x344>
&&(nb_remaining_rx_data < huart->RxXferSize))
8004634: 687b ldr r3, [r7, #4]
8004636: 8d9b ldrh r3, [r3, #44] ; 0x2c
8004638: 8a3a ldrh r2, [r7, #16]
800463a: 429a cmp r2, r3
800463c: f080 8092 bcs.w 8004764 <HAL_UART_IRQHandler+0x344>
{
/* Reception is not complete */
huart->RxXferCount = nb_remaining_rx_data;
8004640: 687b ldr r3, [r7, #4]
8004642: 8a3a ldrh r2, [r7, #16]
8004644: 85da strh r2, [r3, #46] ; 0x2e
/* In Normal mode, end DMA xfer and HAL UART Rx process*/
if (huart->hdmarx->Init.Mode != DMA_CIRCULAR)
8004646: 687b ldr r3, [r7, #4]
8004648: 6b9b ldr r3, [r3, #56] ; 0x38
800464a: 699b ldr r3, [r3, #24]
800464c: 2b20 cmp r3, #32
800464e: d02b beq.n 80046a8 <HAL_UART_IRQHandler+0x288>
{
/* Disable PE and ERR (Frame error, noise error, overrun error) interrupts */
CLEAR_BIT(huart->Instance->CR1, USART_CR1_PEIE);
8004650: 687b ldr r3, [r7, #4]
8004652: 681b ldr r3, [r3, #0]
8004654: 68da ldr r2, [r3, #12]
8004656: 687b ldr r3, [r7, #4]
8004658: 681b ldr r3, [r3, #0]
800465a: f422 7280 bic.w r2, r2, #256 ; 0x100
800465e: 60da str r2, [r3, #12]
CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
8004660: 687b ldr r3, [r7, #4]
8004662: 681b ldr r3, [r3, #0]
8004664: 695a ldr r2, [r3, #20]
8004666: 687b ldr r3, [r7, #4]
8004668: 681b ldr r3, [r3, #0]
800466a: f022 0201 bic.w r2, r2, #1
800466e: 615a str r2, [r3, #20]
/* Disable the DMA transfer for the receiver request by resetting the DMAR bit
in the UART CR3 register */
CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAR);
8004670: 687b ldr r3, [r7, #4]
8004672: 681b ldr r3, [r3, #0]
8004674: 695a ldr r2, [r3, #20]
8004676: 687b ldr r3, [r7, #4]
8004678: 681b ldr r3, [r3, #0]
800467a: f022 0240 bic.w r2, r2, #64 ; 0x40
800467e: 615a str r2, [r3, #20]
/* At end of Rx process, restore huart->RxState to Ready */
huart->RxState = HAL_UART_STATE_READY;
8004680: 687b ldr r3, [r7, #4]
8004682: 2220 movs r2, #32
8004684: f883 203e strb.w r2, [r3, #62] ; 0x3e
huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
8004688: 687b ldr r3, [r7, #4]
800468a: 2200 movs r2, #0
800468c: 631a str r2, [r3, #48] ; 0x30
CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE);
800468e: 687b ldr r3, [r7, #4]
8004690: 681b ldr r3, [r3, #0]
8004692: 68da ldr r2, [r3, #12]
8004694: 687b ldr r3, [r7, #4]
8004696: 681b ldr r3, [r3, #0]
8004698: f022 0210 bic.w r2, r2, #16
800469c: 60da str r2, [r3, #12]
/* Last bytes received, so no need as the abort is immediate */
(void)HAL_DMA_Abort(huart->hdmarx);
800469e: 687b ldr r3, [r7, #4]
80046a0: 6b9b ldr r3, [r3, #56] ; 0x38
80046a2: 4618 mov r0, r3
80046a4: f7fd fafb bl 8001c9e <HAL_DMA_Abort>
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/*Call registered Rx Event callback*/
huart->RxEventCallback(huart, (huart->RxXferSize - huart->RxXferCount));
#else
/*Call legacy weak Rx Event callback*/
HAL_UARTEx_RxEventCallback(huart, (huart->RxXferSize - huart->RxXferCount));
80046a8: 687b ldr r3, [r7, #4]
80046aa: 8d9a ldrh r2, [r3, #44] ; 0x2c
80046ac: 687b ldr r3, [r7, #4]
80046ae: 8ddb ldrh r3, [r3, #46] ; 0x2e
80046b0: b29b uxth r3, r3
80046b2: 1ad3 subs r3, r2, r3
80046b4: b29b uxth r3, r3
80046b6: 4619 mov r1, r3
80046b8: 6878 ldr r0, [r7, #4]
80046ba: f000 f876 bl 80047aa <HAL_UARTEx_RxEventCallback>
#endif
}
return;
80046be: e051 b.n 8004764 <HAL_UART_IRQHandler+0x344>
else
{
/* DMA mode not enabled */
/* Check received length : If all expected data are received, do nothing.
Otherwise, if at least one data has already been received, IDLE event is to be notified to user */
uint16_t nb_rx_data = huart->RxXferSize - huart->RxXferCount;
80046c0: 687b ldr r3, [r7, #4]
80046c2: 8d9a ldrh r2, [r3, #44] ; 0x2c
80046c4: 687b ldr r3, [r7, #4]
80046c6: 8ddb ldrh r3, [r3, #46] ; 0x2e
80046c8: b29b uxth r3, r3
80046ca: 1ad3 subs r3, r2, r3
80046cc: 827b strh r3, [r7, #18]
if ( (huart->RxXferCount > 0U)
80046ce: 687b ldr r3, [r7, #4]
80046d0: 8ddb ldrh r3, [r3, #46] ; 0x2e
80046d2: b29b uxth r3, r3
80046d4: 2b00 cmp r3, #0
80046d6: d047 beq.n 8004768 <HAL_UART_IRQHandler+0x348>
&&(nb_rx_data > 0U) )
80046d8: 8a7b ldrh r3, [r7, #18]
80046da: 2b00 cmp r3, #0
80046dc: d044 beq.n 8004768 <HAL_UART_IRQHandler+0x348>
{
/* Disable the UART Parity Error Interrupt and RXNE interrupts */
CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE));
80046de: 687b ldr r3, [r7, #4]
80046e0: 681b ldr r3, [r3, #0]
80046e2: 68da ldr r2, [r3, #12]
80046e4: 687b ldr r3, [r7, #4]
80046e6: 681b ldr r3, [r3, #0]
80046e8: f422 7290 bic.w r2, r2, #288 ; 0x120
80046ec: 60da str r2, [r3, #12]
/* Disable the UART Error Interrupt: (Frame error, noise error, overrun error) */
CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
80046ee: 687b ldr r3, [r7, #4]
80046f0: 681b ldr r3, [r3, #0]
80046f2: 695a ldr r2, [r3, #20]
80046f4: 687b ldr r3, [r7, #4]
80046f6: 681b ldr r3, [r3, #0]
80046f8: f022 0201 bic.w r2, r2, #1
80046fc: 615a str r2, [r3, #20]
/* Rx process is completed, restore huart->RxState to Ready */
huart->RxState = HAL_UART_STATE_READY;
80046fe: 687b ldr r3, [r7, #4]
8004700: 2220 movs r2, #32
8004702: f883 203e strb.w r2, [r3, #62] ; 0x3e
huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
8004706: 687b ldr r3, [r7, #4]
8004708: 2200 movs r2, #0
800470a: 631a str r2, [r3, #48] ; 0x30
CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE);
800470c: 687b ldr r3, [r7, #4]
800470e: 681b ldr r3, [r3, #0]
8004710: 68da ldr r2, [r3, #12]
8004712: 687b ldr r3, [r7, #4]
8004714: 681b ldr r3, [r3, #0]
8004716: f022 0210 bic.w r2, r2, #16
800471a: 60da str r2, [r3, #12]
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/*Call registered Rx complete callback*/
huart->RxEventCallback(huart, nb_rx_data);
#else
/*Call legacy weak Rx Event callback*/
HAL_UARTEx_RxEventCallback(huart, nb_rx_data);
800471c: 8a7b ldrh r3, [r7, #18]
800471e: 4619 mov r1, r3
8004720: 6878 ldr r0, [r7, #4]
8004722: f000 f842 bl 80047aa <HAL_UARTEx_RxEventCallback>
#endif
}
return;
8004726: e01f b.n 8004768 <HAL_UART_IRQHandler+0x348>
}
}
/* UART in mode Transmitter ------------------------------------------------*/
if (((isrflags & USART_SR_TXE) != RESET) && ((cr1its & USART_CR1_TXEIE) != RESET))
8004728: 6a7b ldr r3, [r7, #36] ; 0x24
800472a: f003 0380 and.w r3, r3, #128 ; 0x80
800472e: 2b00 cmp r3, #0
8004730: d008 beq.n 8004744 <HAL_UART_IRQHandler+0x324>
8004732: 6a3b ldr r3, [r7, #32]
8004734: f003 0380 and.w r3, r3, #128 ; 0x80
8004738: 2b00 cmp r3, #0
800473a: d003 beq.n 8004744 <HAL_UART_IRQHandler+0x324>
{
UART_Transmit_IT(huart);
800473c: 6878 ldr r0, [r7, #4]
800473e: f000 f9b0 bl 8004aa2 <UART_Transmit_IT>
return;
8004742: e012 b.n 800476a <HAL_UART_IRQHandler+0x34a>
}
/* UART in mode Transmitter end --------------------------------------------*/
if (((isrflags & USART_SR_TC) != RESET) && ((cr1its & USART_CR1_TCIE) != RESET))
8004744: 6a7b ldr r3, [r7, #36] ; 0x24
8004746: f003 0340 and.w r3, r3, #64 ; 0x40
800474a: 2b00 cmp r3, #0
800474c: d00d beq.n 800476a <HAL_UART_IRQHandler+0x34a>
800474e: 6a3b ldr r3, [r7, #32]
8004750: f003 0340 and.w r3, r3, #64 ; 0x40
8004754: 2b00 cmp r3, #0
8004756: d008 beq.n 800476a <HAL_UART_IRQHandler+0x34a>
{
UART_EndTransmit_IT(huart);
8004758: 6878 ldr r0, [r7, #4]
800475a: f000 f9f1 bl 8004b40 <UART_EndTransmit_IT>
return;
800475e: e004 b.n 800476a <HAL_UART_IRQHandler+0x34a>
return;
8004760: bf00 nop
8004762: e002 b.n 800476a <HAL_UART_IRQHandler+0x34a>
return;
8004764: bf00 nop
8004766: e000 b.n 800476a <HAL_UART_IRQHandler+0x34a>
return;
8004768: bf00 nop
}
}
800476a: 3728 adds r7, #40 ; 0x28
800476c: 46bd mov sp, r7
800476e: bd80 pop {r7, pc}
8004770: 08004a4b .word 0x08004a4b
08004774 <HAL_UART_TxHalfCpltCallback>:
* @param huart Pointer to a UART_HandleTypeDef structure that contains
* the configuration information for the specified UART module.
* @retval None
*/
__weak void HAL_UART_TxHalfCpltCallback(UART_HandleTypeDef *huart)
{
8004774: b480 push {r7}
8004776: b083 sub sp, #12
8004778: af00 add r7, sp, #0
800477a: 6078 str r0, [r7, #4]
/* Prevent unused argument(s) compilation warning */
UNUSED(huart);
/* NOTE: This function should not be modified, when the callback is needed,
the HAL_UART_TxHalfCpltCallback could be implemented in the user file
*/
}
800477c: bf00 nop
800477e: 370c adds r7, #12
8004780: 46bd mov sp, r7
8004782: bc80 pop {r7}
8004784: 4770 bx lr
08004786 <HAL_UART_ErrorCallback>:
* @param huart Pointer to a UART_HandleTypeDef structure that contains
* the configuration information for the specified UART module.
* @retval None
*/
__weak void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart)
{
8004786: b480 push {r7}
8004788: b083 sub sp, #12
800478a: af00 add r7, sp, #0
800478c: 6078 str r0, [r7, #4]
/* Prevent unused argument(s) compilation warning */
UNUSED(huart);
/* NOTE: This function should not be modified, when the callback is needed,
the HAL_UART_ErrorCallback could be implemented in the user file
*/
}
800478e: bf00 nop
8004790: 370c adds r7, #12
8004792: 46bd mov sp, r7
8004794: bc80 pop {r7}
8004796: 4770 bx lr
08004798 <HAL_UART_AbortReceiveCpltCallback>:
* @brief UART Abort Receive Complete callback.
* @param huart UART handle.
* @retval None
*/
__weak void HAL_UART_AbortReceiveCpltCallback(UART_HandleTypeDef *huart)
{
8004798: b480 push {r7}
800479a: b083 sub sp, #12
800479c: af00 add r7, sp, #0
800479e: 6078 str r0, [r7, #4]
UNUSED(huart);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_UART_AbortReceiveCpltCallback can be implemented in the user file.
*/
}
80047a0: bf00 nop
80047a2: 370c adds r7, #12
80047a4: 46bd mov sp, r7
80047a6: bc80 pop {r7}
80047a8: 4770 bx lr
080047aa <HAL_UARTEx_RxEventCallback>:
* @param Size Number of data available in application reception buffer (indicates a position in
* reception buffer until which, data are available)
* @retval None
*/
__weak void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size)
{
80047aa: b480 push {r7}
80047ac: b083 sub sp, #12
80047ae: af00 add r7, sp, #0
80047b0: 6078 str r0, [r7, #4]
80047b2: 460b mov r3, r1
80047b4: 807b strh r3, [r7, #2]
UNUSED(Size);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_UARTEx_RxEventCallback can be implemented in the user file.
*/
}
80047b6: bf00 nop
80047b8: 370c adds r7, #12
80047ba: 46bd mov sp, r7
80047bc: bc80 pop {r7}
80047be: 4770 bx lr
080047c0 <UART_DMATransmitCplt>:
* @param hdma Pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA module.
* @retval None
*/
static void UART_DMATransmitCplt(DMA_HandleTypeDef *hdma)
{
80047c0: b580 push {r7, lr}
80047c2: b084 sub sp, #16
80047c4: af00 add r7, sp, #0
80047c6: 6078 str r0, [r7, #4]
UART_HandleTypeDef *huart = (UART_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
80047c8: 687b ldr r3, [r7, #4]
80047ca: 6a5b ldr r3, [r3, #36] ; 0x24
80047cc: 60fb str r3, [r7, #12]
/* DMA Normal mode*/
if ((hdma->Instance->CCR & DMA_CCR_CIRC) == 0U)
80047ce: 687b ldr r3, [r7, #4]
80047d0: 681b ldr r3, [r3, #0]
80047d2: 681b ldr r3, [r3, #0]
80047d4: f003 0320 and.w r3, r3, #32
80047d8: 2b00 cmp r3, #0
80047da: d113 bne.n 8004804 <UART_DMATransmitCplt+0x44>
{
huart->TxXferCount = 0x00U;
80047dc: 68fb ldr r3, [r7, #12]
80047de: 2200 movs r2, #0
80047e0: 84da strh r2, [r3, #38] ; 0x26
/* Disable the DMA transfer for transmit request by setting the DMAT bit
in the UART CR3 register */
CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAT);
80047e2: 68fb ldr r3, [r7, #12]
80047e4: 681b ldr r3, [r3, #0]
80047e6: 695a ldr r2, [r3, #20]
80047e8: 68fb ldr r3, [r7, #12]
80047ea: 681b ldr r3, [r3, #0]
80047ec: f022 0280 bic.w r2, r2, #128 ; 0x80
80047f0: 615a str r2, [r3, #20]
/* Enable the UART Transmit Complete Interrupt */
SET_BIT(huart->Instance->CR1, USART_CR1_TCIE);
80047f2: 68fb ldr r3, [r7, #12]
80047f4: 681b ldr r3, [r3, #0]
80047f6: 68da ldr r2, [r3, #12]
80047f8: 68fb ldr r3, [r7, #12]
80047fa: 681b ldr r3, [r3, #0]
80047fc: f042 0240 orr.w r2, r2, #64 ; 0x40
8004800: 60da str r2, [r3, #12]
#else
/*Call legacy weak Tx complete callback*/
HAL_UART_TxCpltCallback(huart);
#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
}
}
8004802: e002 b.n 800480a <UART_DMATransmitCplt+0x4a>
HAL_UART_TxCpltCallback(huart);
8004804: 68f8 ldr r0, [r7, #12]
8004806: f7fc f833 bl 8000870 <HAL_UART_TxCpltCallback>
}
800480a: bf00 nop
800480c: 3710 adds r7, #16
800480e: 46bd mov sp, r7
8004810: bd80 pop {r7, pc}
08004812 <UART_DMATxHalfCplt>:
* @param hdma Pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA module.
* @retval None
*/
static void UART_DMATxHalfCplt(DMA_HandleTypeDef *hdma)
{
8004812: b580 push {r7, lr}
8004814: b084 sub sp, #16
8004816: af00 add r7, sp, #0
8004818: 6078 str r0, [r7, #4]
UART_HandleTypeDef *huart = (UART_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
800481a: 687b ldr r3, [r7, #4]
800481c: 6a5b ldr r3, [r3, #36] ; 0x24
800481e: 60fb str r3, [r7, #12]
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/*Call registered Tx complete callback*/
huart->TxHalfCpltCallback(huart);
#else
/*Call legacy weak Tx complete callback*/
HAL_UART_TxHalfCpltCallback(huart);
8004820: 68f8 ldr r0, [r7, #12]
8004822: f7ff ffa7 bl 8004774 <HAL_UART_TxHalfCpltCallback>
#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
}
8004826: bf00 nop
8004828: 3710 adds r7, #16
800482a: 46bd mov sp, r7
800482c: bd80 pop {r7, pc}
0800482e <UART_DMAError>:
* @param hdma Pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA module.
* @retval None
*/
static void UART_DMAError(DMA_HandleTypeDef *hdma)
{
800482e: b580 push {r7, lr}
8004830: b084 sub sp, #16
8004832: af00 add r7, sp, #0
8004834: 6078 str r0, [r7, #4]
uint32_t dmarequest = 0x00U;
8004836: 2300 movs r3, #0
8004838: 60fb str r3, [r7, #12]
UART_HandleTypeDef *huart = (UART_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
800483a: 687b ldr r3, [r7, #4]
800483c: 6a5b ldr r3, [r3, #36] ; 0x24
800483e: 60bb str r3, [r7, #8]
/* Stop UART DMA Tx request if ongoing */
dmarequest = HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAT);
8004840: 68bb ldr r3, [r7, #8]
8004842: 681b ldr r3, [r3, #0]
8004844: 695b ldr r3, [r3, #20]
8004846: f003 0380 and.w r3, r3, #128 ; 0x80
800484a: 2b00 cmp r3, #0
800484c: bf14 ite ne
800484e: 2301 movne r3, #1
8004850: 2300 moveq r3, #0
8004852: b2db uxtb r3, r3
8004854: 60fb str r3, [r7, #12]
if ((huart->gState == HAL_UART_STATE_BUSY_TX) && dmarequest)
8004856: 68bb ldr r3, [r7, #8]
8004858: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
800485c: b2db uxtb r3, r3
800485e: 2b21 cmp r3, #33 ; 0x21
8004860: d108 bne.n 8004874 <UART_DMAError+0x46>
8004862: 68fb ldr r3, [r7, #12]
8004864: 2b00 cmp r3, #0
8004866: d005 beq.n 8004874 <UART_DMAError+0x46>
{
huart->TxXferCount = 0x00U;
8004868: 68bb ldr r3, [r7, #8]
800486a: 2200 movs r2, #0
800486c: 84da strh r2, [r3, #38] ; 0x26
UART_EndTxTransfer(huart);
800486e: 68b8 ldr r0, [r7, #8]
8004870: f000 f8aa bl 80049c8 <UART_EndTxTransfer>
}
/* Stop UART DMA Rx request if ongoing */
dmarequest = HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR);
8004874: 68bb ldr r3, [r7, #8]
8004876: 681b ldr r3, [r3, #0]
8004878: 695b ldr r3, [r3, #20]
800487a: f003 0340 and.w r3, r3, #64 ; 0x40
800487e: 2b00 cmp r3, #0
8004880: bf14 ite ne
8004882: 2301 movne r3, #1
8004884: 2300 moveq r3, #0
8004886: b2db uxtb r3, r3
8004888: 60fb str r3, [r7, #12]
if ((huart->RxState == HAL_UART_STATE_BUSY_RX) && dmarequest)
800488a: 68bb ldr r3, [r7, #8]
800488c: f893 303e ldrb.w r3, [r3, #62] ; 0x3e
8004890: b2db uxtb r3, r3
8004892: 2b22 cmp r3, #34 ; 0x22
8004894: d108 bne.n 80048a8 <UART_DMAError+0x7a>
8004896: 68fb ldr r3, [r7, #12]
8004898: 2b00 cmp r3, #0
800489a: d005 beq.n 80048a8 <UART_DMAError+0x7a>
{
huart->RxXferCount = 0x00U;
800489c: 68bb ldr r3, [r7, #8]
800489e: 2200 movs r2, #0
80048a0: 85da strh r2, [r3, #46] ; 0x2e
UART_EndRxTransfer(huart);
80048a2: 68b8 ldr r0, [r7, #8]
80048a4: f000 f8a5 bl 80049f2 <UART_EndRxTransfer>
}
huart->ErrorCode |= HAL_UART_ERROR_DMA;
80048a8: 68bb ldr r3, [r7, #8]
80048aa: 6c1b ldr r3, [r3, #64] ; 0x40
80048ac: f043 0210 orr.w r2, r3, #16
80048b0: 68bb ldr r3, [r7, #8]
80048b2: 641a str r2, [r3, #64] ; 0x40
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/*Call registered error callback*/
huart->ErrorCallback(huart);
#else
/*Call legacy weak error callback*/
HAL_UART_ErrorCallback(huart);
80048b4: 68b8 ldr r0, [r7, #8]
80048b6: f7ff ff66 bl 8004786 <HAL_UART_ErrorCallback>
#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
}
80048ba: bf00 nop
80048bc: 3710 adds r7, #16
80048be: 46bd mov sp, r7
80048c0: bd80 pop {r7, pc}
080048c2 <UART_WaitOnFlagUntilTimeout>:
* @param Tickstart Tick start value
* @param Timeout Timeout duration
* @retval HAL status
*/
static HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status, uint32_t Tickstart, uint32_t Timeout)
{
80048c2: b580 push {r7, lr}
80048c4: b084 sub sp, #16
80048c6: af00 add r7, sp, #0
80048c8: 60f8 str r0, [r7, #12]
80048ca: 60b9 str r1, [r7, #8]
80048cc: 603b str r3, [r7, #0]
80048ce: 4613 mov r3, r2
80048d0: 71fb strb r3, [r7, #7]
/* Wait until flag is set */
while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
80048d2: e02c b.n 800492e <UART_WaitOnFlagUntilTimeout+0x6c>
{
/* Check for the Timeout */
if (Timeout != HAL_MAX_DELAY)
80048d4: 69bb ldr r3, [r7, #24]
80048d6: f1b3 3fff cmp.w r3, #4294967295
80048da: d028 beq.n 800492e <UART_WaitOnFlagUntilTimeout+0x6c>
{
if ((Timeout == 0U) || ((HAL_GetTick() - Tickstart) > Timeout))
80048dc: 69bb ldr r3, [r7, #24]
80048de: 2b00 cmp r3, #0
80048e0: d007 beq.n 80048f2 <UART_WaitOnFlagUntilTimeout+0x30>
80048e2: f7fc ffe7 bl 80018b4 <HAL_GetTick>
80048e6: 4602 mov r2, r0
80048e8: 683b ldr r3, [r7, #0]
80048ea: 1ad3 subs r3, r2, r3
80048ec: 69ba ldr r2, [r7, #24]
80048ee: 429a cmp r2, r3
80048f0: d21d bcs.n 800492e <UART_WaitOnFlagUntilTimeout+0x6c>
{
/* Disable TXE, RXNE, PE and ERR (Frame error, noise error, overrun error) interrupts for the interrupt process */
CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE | USART_CR1_TXEIE));
80048f2: 68fb ldr r3, [r7, #12]
80048f4: 681b ldr r3, [r3, #0]
80048f6: 68da ldr r2, [r3, #12]
80048f8: 68fb ldr r3, [r7, #12]
80048fa: 681b ldr r3, [r3, #0]
80048fc: f422 72d0 bic.w r2, r2, #416 ; 0x1a0
8004900: 60da str r2, [r3, #12]
CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
8004902: 68fb ldr r3, [r7, #12]
8004904: 681b ldr r3, [r3, #0]
8004906: 695a ldr r2, [r3, #20]
8004908: 68fb ldr r3, [r7, #12]
800490a: 681b ldr r3, [r3, #0]
800490c: f022 0201 bic.w r2, r2, #1
8004910: 615a str r2, [r3, #20]
huart->gState = HAL_UART_STATE_READY;
8004912: 68fb ldr r3, [r7, #12]
8004914: 2220 movs r2, #32
8004916: f883 203d strb.w r2, [r3, #61] ; 0x3d
huart->RxState = HAL_UART_STATE_READY;
800491a: 68fb ldr r3, [r7, #12]
800491c: 2220 movs r2, #32
800491e: f883 203e strb.w r2, [r3, #62] ; 0x3e
/* Process Unlocked */
__HAL_UNLOCK(huart);
8004922: 68fb ldr r3, [r7, #12]
8004924: 2200 movs r2, #0
8004926: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_TIMEOUT;
800492a: 2303 movs r3, #3
800492c: e00f b.n 800494e <UART_WaitOnFlagUntilTimeout+0x8c>
while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
800492e: 68fb ldr r3, [r7, #12]
8004930: 681b ldr r3, [r3, #0]
8004932: 681a ldr r2, [r3, #0]
8004934: 68bb ldr r3, [r7, #8]
8004936: 4013 ands r3, r2
8004938: 68ba ldr r2, [r7, #8]
800493a: 429a cmp r2, r3
800493c: bf0c ite eq
800493e: 2301 moveq r3, #1
8004940: 2300 movne r3, #0
8004942: b2db uxtb r3, r3
8004944: 461a mov r2, r3
8004946: 79fb ldrb r3, [r7, #7]
8004948: 429a cmp r2, r3
800494a: d0c3 beq.n 80048d4 <UART_WaitOnFlagUntilTimeout+0x12>
}
}
}
return HAL_OK;
800494c: 2300 movs r3, #0
}
800494e: 4618 mov r0, r3
8004950: 3710 adds r7, #16
8004952: 46bd mov sp, r7
8004954: bd80 pop {r7, pc}
08004956 <UART_Start_Receive_IT>:
* @param pData Pointer to data buffer (u8 or u16 data elements).
* @param Size Amount of data elements (u8 or u16) to be received.
* @retval HAL status
*/
HAL_StatusTypeDef UART_Start_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
{
8004956: b480 push {r7}
8004958: b085 sub sp, #20
800495a: af00 add r7, sp, #0
800495c: 60f8 str r0, [r7, #12]
800495e: 60b9 str r1, [r7, #8]
8004960: 4613 mov r3, r2
8004962: 80fb strh r3, [r7, #6]
huart->pRxBuffPtr = pData;
8004964: 68fb ldr r3, [r7, #12]
8004966: 68ba ldr r2, [r7, #8]
8004968: 629a str r2, [r3, #40] ; 0x28
huart->RxXferSize = Size;
800496a: 68fb ldr r3, [r7, #12]
800496c: 88fa ldrh r2, [r7, #6]
800496e: 859a strh r2, [r3, #44] ; 0x2c
huart->RxXferCount = Size;
8004970: 68fb ldr r3, [r7, #12]
8004972: 88fa ldrh r2, [r7, #6]
8004974: 85da strh r2, [r3, #46] ; 0x2e
huart->ErrorCode = HAL_UART_ERROR_NONE;
8004976: 68fb ldr r3, [r7, #12]
8004978: 2200 movs r2, #0
800497a: 641a str r2, [r3, #64] ; 0x40
huart->RxState = HAL_UART_STATE_BUSY_RX;
800497c: 68fb ldr r3, [r7, #12]
800497e: 2222 movs r2, #34 ; 0x22
8004980: f883 203e strb.w r2, [r3, #62] ; 0x3e
/* Process Unlocked */
__HAL_UNLOCK(huart);
8004984: 68fb ldr r3, [r7, #12]
8004986: 2200 movs r2, #0
8004988: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* Enable the UART Parity Error Interrupt */
__HAL_UART_ENABLE_IT(huart, UART_IT_PE);
800498c: 68fb ldr r3, [r7, #12]
800498e: 681b ldr r3, [r3, #0]
8004990: 68da ldr r2, [r3, #12]
8004992: 68fb ldr r3, [r7, #12]
8004994: 681b ldr r3, [r3, #0]
8004996: f442 7280 orr.w r2, r2, #256 ; 0x100
800499a: 60da str r2, [r3, #12]
/* Enable the UART Error Interrupt: (Frame error, noise error, overrun error) */
__HAL_UART_ENABLE_IT(huart, UART_IT_ERR);
800499c: 68fb ldr r3, [r7, #12]
800499e: 681b ldr r3, [r3, #0]
80049a0: 695a ldr r2, [r3, #20]
80049a2: 68fb ldr r3, [r7, #12]
80049a4: 681b ldr r3, [r3, #0]
80049a6: f042 0201 orr.w r2, r2, #1
80049aa: 615a str r2, [r3, #20]
/* Enable the UART Data Register not empty Interrupt */
__HAL_UART_ENABLE_IT(huart, UART_IT_RXNE);
80049ac: 68fb ldr r3, [r7, #12]
80049ae: 681b ldr r3, [r3, #0]
80049b0: 68da ldr r2, [r3, #12]
80049b2: 68fb ldr r3, [r7, #12]
80049b4: 681b ldr r3, [r3, #0]
80049b6: f042 0220 orr.w r2, r2, #32
80049ba: 60da str r2, [r3, #12]
return HAL_OK;
80049bc: 2300 movs r3, #0
}
80049be: 4618 mov r0, r3
80049c0: 3714 adds r7, #20
80049c2: 46bd mov sp, r7
80049c4: bc80 pop {r7}
80049c6: 4770 bx lr
080049c8 <UART_EndTxTransfer>:
* @brief End ongoing Tx transfer on UART peripheral (following error detection or Transmit completion).
* @param huart UART handle.
* @retval None
*/
static void UART_EndTxTransfer(UART_HandleTypeDef *huart)
{
80049c8: b480 push {r7}
80049ca: b083 sub sp, #12
80049cc: af00 add r7, sp, #0
80049ce: 6078 str r0, [r7, #4]
/* Disable TXEIE and TCIE interrupts */
CLEAR_BIT(huart->Instance->CR1, (USART_CR1_TXEIE | USART_CR1_TCIE));
80049d0: 687b ldr r3, [r7, #4]
80049d2: 681b ldr r3, [r3, #0]
80049d4: 68da ldr r2, [r3, #12]
80049d6: 687b ldr r3, [r7, #4]
80049d8: 681b ldr r3, [r3, #0]
80049da: f022 02c0 bic.w r2, r2, #192 ; 0xc0
80049de: 60da str r2, [r3, #12]
/* At end of Tx process, restore huart->gState to Ready */
huart->gState = HAL_UART_STATE_READY;
80049e0: 687b ldr r3, [r7, #4]
80049e2: 2220 movs r2, #32
80049e4: f883 203d strb.w r2, [r3, #61] ; 0x3d
}
80049e8: bf00 nop
80049ea: 370c adds r7, #12
80049ec: 46bd mov sp, r7
80049ee: bc80 pop {r7}
80049f0: 4770 bx lr
080049f2 <UART_EndRxTransfer>:
* @brief End ongoing Rx transfer on UART peripheral (following error detection or Reception completion).
* @param huart UART handle.
* @retval None
*/
static void UART_EndRxTransfer(UART_HandleTypeDef *huart)
{
80049f2: b480 push {r7}
80049f4: b083 sub sp, #12
80049f6: af00 add r7, sp, #0
80049f8: 6078 str r0, [r7, #4]
/* Disable RXNE, PE and ERR (Frame error, noise error, overrun error) interrupts */
CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE));
80049fa: 687b ldr r3, [r7, #4]
80049fc: 681b ldr r3, [r3, #0]
80049fe: 68da ldr r2, [r3, #12]
8004a00: 687b ldr r3, [r7, #4]
8004a02: 681b ldr r3, [r3, #0]
8004a04: f422 7290 bic.w r2, r2, #288 ; 0x120
8004a08: 60da str r2, [r3, #12]
CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
8004a0a: 687b ldr r3, [r7, #4]
8004a0c: 681b ldr r3, [r3, #0]
8004a0e: 695a ldr r2, [r3, #20]
8004a10: 687b ldr r3, [r7, #4]
8004a12: 681b ldr r3, [r3, #0]
8004a14: f022 0201 bic.w r2, r2, #1
8004a18: 615a str r2, [r3, #20]
/* In case of reception waiting for IDLE event, disable also the IDLE IE interrupt source */
if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE)
8004a1a: 687b ldr r3, [r7, #4]
8004a1c: 6b1b ldr r3, [r3, #48] ; 0x30
8004a1e: 2b01 cmp r3, #1
8004a20: d107 bne.n 8004a32 <UART_EndRxTransfer+0x40>
{
CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE);
8004a22: 687b ldr r3, [r7, #4]
8004a24: 681b ldr r3, [r3, #0]
8004a26: 68da ldr r2, [r3, #12]
8004a28: 687b ldr r3, [r7, #4]
8004a2a: 681b ldr r3, [r3, #0]
8004a2c: f022 0210 bic.w r2, r2, #16
8004a30: 60da str r2, [r3, #12]
}
/* At end of Rx process, restore huart->RxState to Ready */
huart->RxState = HAL_UART_STATE_READY;
8004a32: 687b ldr r3, [r7, #4]
8004a34: 2220 movs r2, #32
8004a36: f883 203e strb.w r2, [r3, #62] ; 0x3e
huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
8004a3a: 687b ldr r3, [r7, #4]
8004a3c: 2200 movs r2, #0
8004a3e: 631a str r2, [r3, #48] ; 0x30
}
8004a40: bf00 nop
8004a42: 370c adds r7, #12
8004a44: 46bd mov sp, r7
8004a46: bc80 pop {r7}
8004a48: 4770 bx lr
08004a4a <UART_DMAAbortOnError>:
* @param hdma Pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA module.
* @retval None
*/
static void UART_DMAAbortOnError(DMA_HandleTypeDef *hdma)
{
8004a4a: b580 push {r7, lr}
8004a4c: b084 sub sp, #16
8004a4e: af00 add r7, sp, #0
8004a50: 6078 str r0, [r7, #4]
UART_HandleTypeDef *huart = (UART_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
8004a52: 687b ldr r3, [r7, #4]
8004a54: 6a5b ldr r3, [r3, #36] ; 0x24
8004a56: 60fb str r3, [r7, #12]
huart->RxXferCount = 0x00U;
8004a58: 68fb ldr r3, [r7, #12]
8004a5a: 2200 movs r2, #0
8004a5c: 85da strh r2, [r3, #46] ; 0x2e
huart->TxXferCount = 0x00U;
8004a5e: 68fb ldr r3, [r7, #12]
8004a60: 2200 movs r2, #0
8004a62: 84da strh r2, [r3, #38] ; 0x26
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/*Call registered error callback*/
huart->ErrorCallback(huart);
#else
/*Call legacy weak error callback*/
HAL_UART_ErrorCallback(huart);
8004a64: 68f8 ldr r0, [r7, #12]
8004a66: f7ff fe8e bl 8004786 <HAL_UART_ErrorCallback>
#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
}
8004a6a: bf00 nop
8004a6c: 3710 adds r7, #16
8004a6e: 46bd mov sp, r7
8004a70: bd80 pop {r7, pc}
08004a72 <UART_DMARxOnlyAbortCallback>:
* @param hdma Pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA module.
* @retval None
*/
static void UART_DMARxOnlyAbortCallback(DMA_HandleTypeDef *hdma)
{
8004a72: b580 push {r7, lr}
8004a74: b084 sub sp, #16
8004a76: af00 add r7, sp, #0
8004a78: 6078 str r0, [r7, #4]
UART_HandleTypeDef *huart = (UART_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
8004a7a: 687b ldr r3, [r7, #4]
8004a7c: 6a5b ldr r3, [r3, #36] ; 0x24
8004a7e: 60fb str r3, [r7, #12]
huart->RxXferCount = 0x00U;
8004a80: 68fb ldr r3, [r7, #12]
8004a82: 2200 movs r2, #0
8004a84: 85da strh r2, [r3, #46] ; 0x2e
/* Restore huart->RxState to Ready */
huart->RxState = HAL_UART_STATE_READY;
8004a86: 68fb ldr r3, [r7, #12]
8004a88: 2220 movs r2, #32
8004a8a: f883 203e strb.w r2, [r3, #62] ; 0x3e
huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
8004a8e: 68fb ldr r3, [r7, #12]
8004a90: 2200 movs r2, #0
8004a92: 631a str r2, [r3, #48] ; 0x30
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/* Call registered Abort Receive Complete Callback */
huart->AbortReceiveCpltCallback(huart);
#else
/* Call legacy weak Abort Receive Complete Callback */
HAL_UART_AbortReceiveCpltCallback(huart);
8004a94: 68f8 ldr r0, [r7, #12]
8004a96: f7ff fe7f bl 8004798 <HAL_UART_AbortReceiveCpltCallback>
#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
}
8004a9a: bf00 nop
8004a9c: 3710 adds r7, #16
8004a9e: 46bd mov sp, r7
8004aa0: bd80 pop {r7, pc}
08004aa2 <UART_Transmit_IT>:
* @param huart Pointer to a UART_HandleTypeDef structure that contains
* the configuration information for the specified UART module.
* @retval HAL status
*/
static HAL_StatusTypeDef UART_Transmit_IT(UART_HandleTypeDef *huart)
{
8004aa2: b480 push {r7}
8004aa4: b085 sub sp, #20
8004aa6: af00 add r7, sp, #0
8004aa8: 6078 str r0, [r7, #4]
uint16_t *tmp;
/* Check that a Tx process is ongoing */
if (huart->gState == HAL_UART_STATE_BUSY_TX)
8004aaa: 687b ldr r3, [r7, #4]
8004aac: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
8004ab0: b2db uxtb r3, r3
8004ab2: 2b21 cmp r3, #33 ; 0x21
8004ab4: d13e bne.n 8004b34 <UART_Transmit_IT+0x92>
{
if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE))
8004ab6: 687b ldr r3, [r7, #4]
8004ab8: 689b ldr r3, [r3, #8]
8004aba: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
8004abe: d114 bne.n 8004aea <UART_Transmit_IT+0x48>
8004ac0: 687b ldr r3, [r7, #4]
8004ac2: 691b ldr r3, [r3, #16]
8004ac4: 2b00 cmp r3, #0
8004ac6: d110 bne.n 8004aea <UART_Transmit_IT+0x48>
{
tmp = (uint16_t *) huart->pTxBuffPtr;
8004ac8: 687b ldr r3, [r7, #4]
8004aca: 6a1b ldr r3, [r3, #32]
8004acc: 60fb str r3, [r7, #12]
huart->Instance->DR = (uint16_t)(*tmp & (uint16_t)0x01FF);
8004ace: 68fb ldr r3, [r7, #12]
8004ad0: 881b ldrh r3, [r3, #0]
8004ad2: 461a mov r2, r3
8004ad4: 687b ldr r3, [r7, #4]
8004ad6: 681b ldr r3, [r3, #0]
8004ad8: f3c2 0208 ubfx r2, r2, #0, #9
8004adc: 605a str r2, [r3, #4]
huart->pTxBuffPtr += 2U;
8004ade: 687b ldr r3, [r7, #4]
8004ae0: 6a1b ldr r3, [r3, #32]
8004ae2: 1c9a adds r2, r3, #2
8004ae4: 687b ldr r3, [r7, #4]
8004ae6: 621a str r2, [r3, #32]
8004ae8: e008 b.n 8004afc <UART_Transmit_IT+0x5a>
}
else
{
huart->Instance->DR = (uint8_t)(*huart->pTxBuffPtr++ & (uint8_t)0x00FF);
8004aea: 687b ldr r3, [r7, #4]
8004aec: 6a1b ldr r3, [r3, #32]
8004aee: 1c59 adds r1, r3, #1
8004af0: 687a ldr r2, [r7, #4]
8004af2: 6211 str r1, [r2, #32]
8004af4: 781a ldrb r2, [r3, #0]
8004af6: 687b ldr r3, [r7, #4]
8004af8: 681b ldr r3, [r3, #0]
8004afa: 605a str r2, [r3, #4]
}
if (--huart->TxXferCount == 0U)
8004afc: 687b ldr r3, [r7, #4]
8004afe: 8cdb ldrh r3, [r3, #38] ; 0x26
8004b00: b29b uxth r3, r3
8004b02: 3b01 subs r3, #1
8004b04: b29b uxth r3, r3
8004b06: 687a ldr r2, [r7, #4]
8004b08: 4619 mov r1, r3
8004b0a: 84d1 strh r1, [r2, #38] ; 0x26
8004b0c: 2b00 cmp r3, #0
8004b0e: d10f bne.n 8004b30 <UART_Transmit_IT+0x8e>
{
/* Disable the UART Transmit Complete Interrupt */
__HAL_UART_DISABLE_IT(huart, UART_IT_TXE);
8004b10: 687b ldr r3, [r7, #4]
8004b12: 681b ldr r3, [r3, #0]
8004b14: 68da ldr r2, [r3, #12]
8004b16: 687b ldr r3, [r7, #4]
8004b18: 681b ldr r3, [r3, #0]
8004b1a: f022 0280 bic.w r2, r2, #128 ; 0x80
8004b1e: 60da str r2, [r3, #12]
/* Enable the UART Transmit Complete Interrupt */
__HAL_UART_ENABLE_IT(huart, UART_IT_TC);
8004b20: 687b ldr r3, [r7, #4]
8004b22: 681b ldr r3, [r3, #0]
8004b24: 68da ldr r2, [r3, #12]
8004b26: 687b ldr r3, [r7, #4]
8004b28: 681b ldr r3, [r3, #0]
8004b2a: f042 0240 orr.w r2, r2, #64 ; 0x40
8004b2e: 60da str r2, [r3, #12]
}
return HAL_OK;
8004b30: 2300 movs r3, #0
8004b32: e000 b.n 8004b36 <UART_Transmit_IT+0x94>
}
else
{
return HAL_BUSY;
8004b34: 2302 movs r3, #2
}
}
8004b36: 4618 mov r0, r3
8004b38: 3714 adds r7, #20
8004b3a: 46bd mov sp, r7
8004b3c: bc80 pop {r7}
8004b3e: 4770 bx lr
08004b40 <UART_EndTransmit_IT>:
* @param huart Pointer to a UART_HandleTypeDef structure that contains
* the configuration information for the specified UART module.
* @retval HAL status
*/
static HAL_StatusTypeDef UART_EndTransmit_IT(UART_HandleTypeDef *huart)
{
8004b40: b580 push {r7, lr}
8004b42: b082 sub sp, #8
8004b44: af00 add r7, sp, #0
8004b46: 6078 str r0, [r7, #4]
/* Disable the UART Transmit Complete Interrupt */
__HAL_UART_DISABLE_IT(huart, UART_IT_TC);
8004b48: 687b ldr r3, [r7, #4]
8004b4a: 681b ldr r3, [r3, #0]
8004b4c: 68da ldr r2, [r3, #12]
8004b4e: 687b ldr r3, [r7, #4]
8004b50: 681b ldr r3, [r3, #0]
8004b52: f022 0240 bic.w r2, r2, #64 ; 0x40
8004b56: 60da str r2, [r3, #12]
/* Tx process is ended, restore huart->gState to Ready */
huart->gState = HAL_UART_STATE_READY;
8004b58: 687b ldr r3, [r7, #4]
8004b5a: 2220 movs r2, #32
8004b5c: f883 203d strb.w r2, [r3, #61] ; 0x3d
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/*Call registered Tx complete callback*/
huart->TxCpltCallback(huart);
#else
/*Call legacy weak Tx complete callback*/
HAL_UART_TxCpltCallback(huart);
8004b60: 6878 ldr r0, [r7, #4]
8004b62: f7fb fe85 bl 8000870 <HAL_UART_TxCpltCallback>
#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
return HAL_OK;
8004b66: 2300 movs r3, #0
}
8004b68: 4618 mov r0, r3
8004b6a: 3708 adds r7, #8
8004b6c: 46bd mov sp, r7
8004b6e: bd80 pop {r7, pc}
08004b70 <UART_Receive_IT>:
* @param huart Pointer to a UART_HandleTypeDef structure that contains
* the configuration information for the specified UART module.
* @retval HAL status
*/
static HAL_StatusTypeDef UART_Receive_IT(UART_HandleTypeDef *huart)
{
8004b70: b580 push {r7, lr}
8004b72: b086 sub sp, #24
8004b74: af00 add r7, sp, #0
8004b76: 6078 str r0, [r7, #4]
uint8_t *pdata8bits;
uint16_t *pdata16bits;
/* Check that a Rx process is ongoing */
if (huart->RxState == HAL_UART_STATE_BUSY_RX)
8004b78: 687b ldr r3, [r7, #4]
8004b7a: f893 303e ldrb.w r3, [r3, #62] ; 0x3e
8004b7e: b2db uxtb r3, r3
8004b80: 2b22 cmp r3, #34 ; 0x22
8004b82: f040 8099 bne.w 8004cb8 <UART_Receive_IT+0x148>
{
if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE))
8004b86: 687b ldr r3, [r7, #4]
8004b88: 689b ldr r3, [r3, #8]
8004b8a: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
8004b8e: d117 bne.n 8004bc0 <UART_Receive_IT+0x50>
8004b90: 687b ldr r3, [r7, #4]
8004b92: 691b ldr r3, [r3, #16]
8004b94: 2b00 cmp r3, #0
8004b96: d113 bne.n 8004bc0 <UART_Receive_IT+0x50>
{
pdata8bits = NULL;
8004b98: 2300 movs r3, #0
8004b9a: 617b str r3, [r7, #20]
pdata16bits = (uint16_t *) huart->pRxBuffPtr;
8004b9c: 687b ldr r3, [r7, #4]
8004b9e: 6a9b ldr r3, [r3, #40] ; 0x28
8004ba0: 613b str r3, [r7, #16]
*pdata16bits = (uint16_t)(huart->Instance->DR & (uint16_t)0x01FF);
8004ba2: 687b ldr r3, [r7, #4]
8004ba4: 681b ldr r3, [r3, #0]
8004ba6: 685b ldr r3, [r3, #4]
8004ba8: b29b uxth r3, r3
8004baa: f3c3 0308 ubfx r3, r3, #0, #9
8004bae: b29a uxth r2, r3
8004bb0: 693b ldr r3, [r7, #16]
8004bb2: 801a strh r2, [r3, #0]
huart->pRxBuffPtr += 2U;
8004bb4: 687b ldr r3, [r7, #4]
8004bb6: 6a9b ldr r3, [r3, #40] ; 0x28
8004bb8: 1c9a adds r2, r3, #2
8004bba: 687b ldr r3, [r7, #4]
8004bbc: 629a str r2, [r3, #40] ; 0x28
8004bbe: e026 b.n 8004c0e <UART_Receive_IT+0x9e>
}
else
{
pdata8bits = (uint8_t *) huart->pRxBuffPtr;
8004bc0: 687b ldr r3, [r7, #4]
8004bc2: 6a9b ldr r3, [r3, #40] ; 0x28
8004bc4: 617b str r3, [r7, #20]
pdata16bits = NULL;
8004bc6: 2300 movs r3, #0
8004bc8: 613b str r3, [r7, #16]
if ((huart->Init.WordLength == UART_WORDLENGTH_9B) || ((huart->Init.WordLength == UART_WORDLENGTH_8B) && (huart->Init.Parity == UART_PARITY_NONE)))
8004bca: 687b ldr r3, [r7, #4]
8004bcc: 689b ldr r3, [r3, #8]
8004bce: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
8004bd2: d007 beq.n 8004be4 <UART_Receive_IT+0x74>
8004bd4: 687b ldr r3, [r7, #4]
8004bd6: 689b ldr r3, [r3, #8]
8004bd8: 2b00 cmp r3, #0
8004bda: d10a bne.n 8004bf2 <UART_Receive_IT+0x82>
8004bdc: 687b ldr r3, [r7, #4]
8004bde: 691b ldr r3, [r3, #16]
8004be0: 2b00 cmp r3, #0
8004be2: d106 bne.n 8004bf2 <UART_Receive_IT+0x82>
{
*pdata8bits = (uint8_t)(huart->Instance->DR & (uint8_t)0x00FF);
8004be4: 687b ldr r3, [r7, #4]
8004be6: 681b ldr r3, [r3, #0]
8004be8: 685b ldr r3, [r3, #4]
8004bea: b2da uxtb r2, r3
8004bec: 697b ldr r3, [r7, #20]
8004bee: 701a strb r2, [r3, #0]
8004bf0: e008 b.n 8004c04 <UART_Receive_IT+0x94>
}
else
{
*pdata8bits = (uint8_t)(huart->Instance->DR & (uint8_t)0x007F);
8004bf2: 687b ldr r3, [r7, #4]
8004bf4: 681b ldr r3, [r3, #0]
8004bf6: 685b ldr r3, [r3, #4]
8004bf8: b2db uxtb r3, r3
8004bfa: f003 037f and.w r3, r3, #127 ; 0x7f
8004bfe: b2da uxtb r2, r3
8004c00: 697b ldr r3, [r7, #20]
8004c02: 701a strb r2, [r3, #0]
}
huart->pRxBuffPtr += 1U;
8004c04: 687b ldr r3, [r7, #4]
8004c06: 6a9b ldr r3, [r3, #40] ; 0x28
8004c08: 1c5a adds r2, r3, #1
8004c0a: 687b ldr r3, [r7, #4]
8004c0c: 629a str r2, [r3, #40] ; 0x28
}
if (--huart->RxXferCount == 0U)
8004c0e: 687b ldr r3, [r7, #4]
8004c10: 8ddb ldrh r3, [r3, #46] ; 0x2e
8004c12: b29b uxth r3, r3
8004c14: 3b01 subs r3, #1
8004c16: b29b uxth r3, r3
8004c18: 687a ldr r2, [r7, #4]
8004c1a: 4619 mov r1, r3
8004c1c: 85d1 strh r1, [r2, #46] ; 0x2e
8004c1e: 2b00 cmp r3, #0
8004c20: d148 bne.n 8004cb4 <UART_Receive_IT+0x144>
{
/* Disable the UART Data Register not empty Interrupt */
__HAL_UART_DISABLE_IT(huart, UART_IT_RXNE);
8004c22: 687b ldr r3, [r7, #4]
8004c24: 681b ldr r3, [r3, #0]
8004c26: 68da ldr r2, [r3, #12]
8004c28: 687b ldr r3, [r7, #4]
8004c2a: 681b ldr r3, [r3, #0]
8004c2c: f022 0220 bic.w r2, r2, #32
8004c30: 60da str r2, [r3, #12]
/* Disable the UART Parity Error Interrupt */
__HAL_UART_DISABLE_IT(huart, UART_IT_PE);
8004c32: 687b ldr r3, [r7, #4]
8004c34: 681b ldr r3, [r3, #0]
8004c36: 68da ldr r2, [r3, #12]
8004c38: 687b ldr r3, [r7, #4]
8004c3a: 681b ldr r3, [r3, #0]
8004c3c: f422 7280 bic.w r2, r2, #256 ; 0x100
8004c40: 60da str r2, [r3, #12]
/* Disable the UART Error Interrupt: (Frame error, noise error, overrun error) */
__HAL_UART_DISABLE_IT(huart, UART_IT_ERR);
8004c42: 687b ldr r3, [r7, #4]
8004c44: 681b ldr r3, [r3, #0]
8004c46: 695a ldr r2, [r3, #20]
8004c48: 687b ldr r3, [r7, #4]
8004c4a: 681b ldr r3, [r3, #0]
8004c4c: f022 0201 bic.w r2, r2, #1
8004c50: 615a str r2, [r3, #20]
/* Rx process is completed, restore huart->RxState to Ready */
huart->RxState = HAL_UART_STATE_READY;
8004c52: 687b ldr r3, [r7, #4]
8004c54: 2220 movs r2, #32
8004c56: f883 203e strb.w r2, [r3, #62] ; 0x3e
/* Check current reception Mode :
If Reception till IDLE event has been selected : */
if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE)
8004c5a: 687b ldr r3, [r7, #4]
8004c5c: 6b1b ldr r3, [r3, #48] ; 0x30
8004c5e: 2b01 cmp r3, #1
8004c60: d123 bne.n 8004caa <UART_Receive_IT+0x13a>
{
/* Set reception type to Standard */
huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
8004c62: 687b ldr r3, [r7, #4]
8004c64: 2200 movs r2, #0
8004c66: 631a str r2, [r3, #48] ; 0x30
/* Disable IDLE interrupt */
CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE);
8004c68: 687b ldr r3, [r7, #4]
8004c6a: 681b ldr r3, [r3, #0]
8004c6c: 68da ldr r2, [r3, #12]
8004c6e: 687b ldr r3, [r7, #4]
8004c70: 681b ldr r3, [r3, #0]
8004c72: f022 0210 bic.w r2, r2, #16
8004c76: 60da str r2, [r3, #12]
/* Check if IDLE flag is set */
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_IDLE))
8004c78: 687b ldr r3, [r7, #4]
8004c7a: 681b ldr r3, [r3, #0]
8004c7c: 681b ldr r3, [r3, #0]
8004c7e: f003 0310 and.w r3, r3, #16
8004c82: 2b10 cmp r3, #16
8004c84: d10a bne.n 8004c9c <UART_Receive_IT+0x12c>
{
/* Clear IDLE flag in ISR */
__HAL_UART_CLEAR_IDLEFLAG(huart);
8004c86: 2300 movs r3, #0
8004c88: 60fb str r3, [r7, #12]
8004c8a: 687b ldr r3, [r7, #4]
8004c8c: 681b ldr r3, [r3, #0]
8004c8e: 681b ldr r3, [r3, #0]
8004c90: 60fb str r3, [r7, #12]
8004c92: 687b ldr r3, [r7, #4]
8004c94: 681b ldr r3, [r3, #0]
8004c96: 685b ldr r3, [r3, #4]
8004c98: 60fb str r3, [r7, #12]
8004c9a: 68fb ldr r3, [r7, #12]
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/*Call registered Rx Event callback*/
huart->RxEventCallback(huart, huart->RxXferSize);
#else
/*Call legacy weak Rx Event callback*/
HAL_UARTEx_RxEventCallback(huart, huart->RxXferSize);
8004c9c: 687b ldr r3, [r7, #4]
8004c9e: 8d9b ldrh r3, [r3, #44] ; 0x2c
8004ca0: 4619 mov r1, r3
8004ca2: 6878 ldr r0, [r7, #4]
8004ca4: f7ff fd81 bl 80047aa <HAL_UARTEx_RxEventCallback>
8004ca8: e002 b.n 8004cb0 <UART_Receive_IT+0x140>
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/*Call registered Rx complete callback*/
huart->RxCpltCallback(huart);
#else
/*Call legacy weak Rx complete callback*/
HAL_UART_RxCpltCallback(huart);
8004caa: 6878 ldr r0, [r7, #4]
8004cac: f7fb fdcc bl 8000848 <HAL_UART_RxCpltCallback>
#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
}
return HAL_OK;
8004cb0: 2300 movs r3, #0
8004cb2: e002 b.n 8004cba <UART_Receive_IT+0x14a>
}
return HAL_OK;
8004cb4: 2300 movs r3, #0
8004cb6: e000 b.n 8004cba <UART_Receive_IT+0x14a>
}
else
{
return HAL_BUSY;
8004cb8: 2302 movs r3, #2
}
}
8004cba: 4618 mov r0, r3
8004cbc: 3718 adds r7, #24
8004cbe: 46bd mov sp, r7
8004cc0: bd80 pop {r7, pc}
...
08004cc4 <UART_SetConfig>:
* @param huart Pointer to a UART_HandleTypeDef structure that contains
* the configuration information for the specified UART module.
* @retval None
*/
static void UART_SetConfig(UART_HandleTypeDef *huart)
{
8004cc4: b580 push {r7, lr}
8004cc6: b084 sub sp, #16
8004cc8: af00 add r7, sp, #0
8004cca: 6078 str r0, [r7, #4]
assert_param(IS_UART_MODE(huart->Init.Mode));
/*-------------------------- USART CR2 Configuration -----------------------*/
/* Configure the UART Stop Bits: Set STOP[13:12] bits
according to huart->Init.StopBits value */
MODIFY_REG(huart->Instance->CR2, USART_CR2_STOP, huart->Init.StopBits);
8004ccc: 687b ldr r3, [r7, #4]
8004cce: 681b ldr r3, [r3, #0]
8004cd0: 691b ldr r3, [r3, #16]
8004cd2: f423 5140 bic.w r1, r3, #12288 ; 0x3000
8004cd6: 687b ldr r3, [r7, #4]
8004cd8: 68da ldr r2, [r3, #12]
8004cda: 687b ldr r3, [r7, #4]
8004cdc: 681b ldr r3, [r3, #0]
8004cde: 430a orrs r2, r1
8004ce0: 611a str r2, [r3, #16]
tmpreg = (uint32_t)huart->Init.WordLength | huart->Init.Parity | huart->Init.Mode | huart->Init.OverSampling;
MODIFY_REG(huart->Instance->CR1,
(uint32_t)(USART_CR1_M | USART_CR1_PCE | USART_CR1_PS | USART_CR1_TE | USART_CR1_RE | USART_CR1_OVER8),
tmpreg);
#else
tmpreg = (uint32_t)huart->Init.WordLength | huart->Init.Parity | huart->Init.Mode;
8004ce2: 687b ldr r3, [r7, #4]
8004ce4: 689a ldr r2, [r3, #8]
8004ce6: 687b ldr r3, [r7, #4]
8004ce8: 691b ldr r3, [r3, #16]
8004cea: 431a orrs r2, r3
8004cec: 687b ldr r3, [r7, #4]
8004cee: 695b ldr r3, [r3, #20]
8004cf0: 4313 orrs r3, r2
8004cf2: 60bb str r3, [r7, #8]
MODIFY_REG(huart->Instance->CR1,
8004cf4: 687b ldr r3, [r7, #4]
8004cf6: 681b ldr r3, [r3, #0]
8004cf8: 68db ldr r3, [r3, #12]
8004cfa: f423 53b0 bic.w r3, r3, #5632 ; 0x1600
8004cfe: f023 030c bic.w r3, r3, #12
8004d02: 687a ldr r2, [r7, #4]
8004d04: 6812 ldr r2, [r2, #0]
8004d06: 68b9 ldr r1, [r7, #8]
8004d08: 430b orrs r3, r1
8004d0a: 60d3 str r3, [r2, #12]
tmpreg);
#endif /* USART_CR1_OVER8 */
/*-------------------------- USART CR3 Configuration -----------------------*/
/* Configure the UART HFC: Set CTSE and RTSE bits according to huart->Init.HwFlowCtl value */
MODIFY_REG(huart->Instance->CR3, (USART_CR3_RTSE | USART_CR3_CTSE), huart->Init.HwFlowCtl);
8004d0c: 687b ldr r3, [r7, #4]
8004d0e: 681b ldr r3, [r3, #0]
8004d10: 695b ldr r3, [r3, #20]
8004d12: f423 7140 bic.w r1, r3, #768 ; 0x300
8004d16: 687b ldr r3, [r7, #4]
8004d18: 699a ldr r2, [r3, #24]
8004d1a: 687b ldr r3, [r7, #4]
8004d1c: 681b ldr r3, [r3, #0]
8004d1e: 430a orrs r2, r1
8004d20: 615a str r2, [r3, #20]
if(huart->Instance == USART1)
8004d22: 687b ldr r3, [r7, #4]
8004d24: 681b ldr r3, [r3, #0]
8004d26: 4a2c ldr r2, [pc, #176] ; (8004dd8 <UART_SetConfig+0x114>)
8004d28: 4293 cmp r3, r2
8004d2a: d103 bne.n 8004d34 <UART_SetConfig+0x70>
{
pclk = HAL_RCC_GetPCLK2Freq();
8004d2c: f7fe f82c bl 8002d88 <HAL_RCC_GetPCLK2Freq>
8004d30: 60f8 str r0, [r7, #12]
8004d32: e002 b.n 8004d3a <UART_SetConfig+0x76>
}
else
{
pclk = HAL_RCC_GetPCLK1Freq();
8004d34: f7fe f814 bl 8002d60 <HAL_RCC_GetPCLK1Freq>
8004d38: 60f8 str r0, [r7, #12]
else
{
huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate);
}
#else
huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate);
8004d3a: 68fa ldr r2, [r7, #12]
8004d3c: 4613 mov r3, r2
8004d3e: 009b lsls r3, r3, #2
8004d40: 4413 add r3, r2
8004d42: 009a lsls r2, r3, #2
8004d44: 441a add r2, r3
8004d46: 687b ldr r3, [r7, #4]
8004d48: 685b ldr r3, [r3, #4]
8004d4a: 009b lsls r3, r3, #2
8004d4c: fbb2 f3f3 udiv r3, r2, r3
8004d50: 4a22 ldr r2, [pc, #136] ; (8004ddc <UART_SetConfig+0x118>)
8004d52: fba2 2303 umull r2, r3, r2, r3
8004d56: 095b lsrs r3, r3, #5
8004d58: 0119 lsls r1, r3, #4
8004d5a: 68fa ldr r2, [r7, #12]
8004d5c: 4613 mov r3, r2
8004d5e: 009b lsls r3, r3, #2
8004d60: 4413 add r3, r2
8004d62: 009a lsls r2, r3, #2
8004d64: 441a add r2, r3
8004d66: 687b ldr r3, [r7, #4]
8004d68: 685b ldr r3, [r3, #4]
8004d6a: 009b lsls r3, r3, #2
8004d6c: fbb2 f2f3 udiv r2, r2, r3
8004d70: 4b1a ldr r3, [pc, #104] ; (8004ddc <UART_SetConfig+0x118>)
8004d72: fba3 0302 umull r0, r3, r3, r2
8004d76: 095b lsrs r3, r3, #5
8004d78: 2064 movs r0, #100 ; 0x64
8004d7a: fb00 f303 mul.w r3, r0, r3
8004d7e: 1ad3 subs r3, r2, r3
8004d80: 011b lsls r3, r3, #4
8004d82: 3332 adds r3, #50 ; 0x32
8004d84: 4a15 ldr r2, [pc, #84] ; (8004ddc <UART_SetConfig+0x118>)
8004d86: fba2 2303 umull r2, r3, r2, r3
8004d8a: 095b lsrs r3, r3, #5
8004d8c: f003 03f0 and.w r3, r3, #240 ; 0xf0
8004d90: 4419 add r1, r3
8004d92: 68fa ldr r2, [r7, #12]
8004d94: 4613 mov r3, r2
8004d96: 009b lsls r3, r3, #2
8004d98: 4413 add r3, r2
8004d9a: 009a lsls r2, r3, #2
8004d9c: 441a add r2, r3
8004d9e: 687b ldr r3, [r7, #4]
8004da0: 685b ldr r3, [r3, #4]
8004da2: 009b lsls r3, r3, #2
8004da4: fbb2 f2f3 udiv r2, r2, r3
8004da8: 4b0c ldr r3, [pc, #48] ; (8004ddc <UART_SetConfig+0x118>)
8004daa: fba3 0302 umull r0, r3, r3, r2
8004dae: 095b lsrs r3, r3, #5
8004db0: 2064 movs r0, #100 ; 0x64
8004db2: fb00 f303 mul.w r3, r0, r3
8004db6: 1ad3 subs r3, r2, r3
8004db8: 011b lsls r3, r3, #4
8004dba: 3332 adds r3, #50 ; 0x32
8004dbc: 4a07 ldr r2, [pc, #28] ; (8004ddc <UART_SetConfig+0x118>)
8004dbe: fba2 2303 umull r2, r3, r2, r3
8004dc2: 095b lsrs r3, r3, #5
8004dc4: f003 020f and.w r2, r3, #15
8004dc8: 687b ldr r3, [r7, #4]
8004dca: 681b ldr r3, [r3, #0]
8004dcc: 440a add r2, r1
8004dce: 609a str r2, [r3, #8]
#endif /* USART_CR1_OVER8 */
}
8004dd0: bf00 nop
8004dd2: 3710 adds r7, #16
8004dd4: 46bd mov sp, r7
8004dd6: bd80 pop {r7, pc}
8004dd8: 40013800 .word 0x40013800
8004ddc: 51eb851f .word 0x51eb851f
08004de0 <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)
{
8004de0: b084 sub sp, #16
8004de2: b480 push {r7}
8004de4: b083 sub sp, #12
8004de6: af00 add r7, sp, #0
8004de8: 6078 str r0, [r7, #4]
8004dea: f107 0014 add.w r0, r7, #20
8004dee: 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;
8004df2: 2300 movs r3, #0
}
8004df4: 4618 mov r0, r3
8004df6: 370c adds r7, #12
8004df8: 46bd mov sp, r7
8004dfa: bc80 pop {r7}
8004dfc: b004 add sp, #16
8004dfe: 4770 bx lr
08004e00 <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)
{
8004e00: b480 push {r7}
8004e02: b085 sub sp, #20
8004e04: af00 add r7, sp, #0
8004e06: 6078 str r0, [r7, #4]
uint32_t winterruptmask;
/* Set winterruptmask variable */
winterruptmask = USB_CNTR_CTRM | USB_CNTR_WKUPM |
8004e08: f44f 433f mov.w r3, #48896 ; 0xbf00
8004e0c: 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);
8004e0e: 687b ldr r3, [r7, #4]
8004e10: f8b3 3040 ldrh.w r3, [r3, #64] ; 0x40
8004e14: b29a uxth r2, r3
8004e16: 68fb ldr r3, [r7, #12]
8004e18: b29b uxth r3, r3
8004e1a: 43db mvns r3, r3
8004e1c: b29b uxth r3, r3
8004e1e: 4013 ands r3, r2
8004e20: b29a uxth r2, r3
8004e22: 687b ldr r3, [r7, #4]
8004e24: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
return HAL_OK;
8004e28: 2300 movs r3, #0
}
8004e2a: 4618 mov r0, r3
8004e2c: 3714 adds r7, #20
8004e2e: 46bd mov sp, r7
8004e30: bc80 pop {r7}
8004e32: 4770 bx lr
08004e34 <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)
{
8004e34: b480 push {r7}
8004e36: b083 sub sp, #12
8004e38: af00 add r7, sp, #0
8004e3a: 6078 str r0, [r7, #4]
8004e3c: 460b mov r3, r1
8004e3e: 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;
8004e40: 2300 movs r3, #0
}
8004e42: 4618 mov r0, r3
8004e44: 370c adds r7, #12
8004e46: 46bd mov sp, r7
8004e48: bc80 pop {r7}
8004e4a: 4770 bx lr
08004e4c <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)
{
8004e4c: b084 sub sp, #16
8004e4e: b480 push {r7}
8004e50: b083 sub sp, #12
8004e52: af00 add r7, sp, #0
8004e54: 6078 str r0, [r7, #4]
8004e56: f107 0014 add.w r0, r7, #20
8004e5a: 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;
8004e5e: 687b ldr r3, [r7, #4]
8004e60: 2201 movs r2, #1
8004e62: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
/* CNTR_FRES = 0 */
USBx->CNTR = 0U;
8004e66: 687b ldr r3, [r7, #4]
8004e68: 2200 movs r2, #0
8004e6a: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
/* Clear pending interrupts */
USBx->ISTR = 0U;
8004e6e: 687b ldr r3, [r7, #4]
8004e70: 2200 movs r2, #0
8004e72: f8a3 2044 strh.w r2, [r3, #68] ; 0x44
/*Set Btable Address*/
USBx->BTABLE = BTABLE_ADDRESS;
8004e76: 687b ldr r3, [r7, #4]
8004e78: 2200 movs r2, #0
8004e7a: f8a3 2050 strh.w r2, [r3, #80] ; 0x50
return HAL_OK;
8004e7e: 2300 movs r3, #0
}
8004e80: 4618 mov r0, r3
8004e82: 370c adds r7, #12
8004e84: 46bd mov sp, r7
8004e86: bc80 pop {r7}
8004e88: b004 add sp, #16
8004e8a: 4770 bx lr
08004e8c <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)
{
8004e8c: b480 push {r7}
8004e8e: b083 sub sp, #12
8004e90: af00 add r7, sp, #0
8004e92: 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;
8004e94: 2300 movs r3, #0
}
8004e96: 4618 mov r0, r3
8004e98: 370c adds r7, #12
8004e9a: 46bd mov sp, r7
8004e9c: bc80 pop {r7}
8004e9e: 4770 bx lr
08004ea0 <_ZdlPvj>:
8004ea0: f000 b813 b.w 8004eca <_ZdlPv>
08004ea4 <_Znwj>:
8004ea4: 2801 cmp r0, #1
8004ea6: bf38 it cc
8004ea8: 2001 movcc r0, #1
8004eaa: b510 push {r4, lr}
8004eac: 4604 mov r4, r0
8004eae: 4620 mov r0, r4
8004eb0: f000 f848 bl 8004f44 <malloc>
8004eb4: b930 cbnz r0, 8004ec4 <_Znwj+0x20>
8004eb6: f000 f80b bl 8004ed0 <_ZSt15get_new_handlerv>
8004eba: b908 cbnz r0, 8004ec0 <_Znwj+0x1c>
8004ebc: f000 f810 bl 8004ee0 <abort>
8004ec0: 4780 blx r0
8004ec2: e7f4 b.n 8004eae <_Znwj+0xa>
8004ec4: bd10 pop {r4, pc}
08004ec6 <_Znaj>:
8004ec6: f7ff bfed b.w 8004ea4 <_Znwj>
08004eca <_ZdlPv>:
8004eca: f000 b843 b.w 8004f54 <free>
...
08004ed0 <_ZSt15get_new_handlerv>:
8004ed0: 4b02 ldr r3, [pc, #8] ; (8004edc <_ZSt15get_new_handlerv+0xc>)
8004ed2: 6818 ldr r0, [r3, #0]
8004ed4: f3bf 8f5b dmb ish
8004ed8: 4770 bx lr
8004eda: bf00 nop
8004edc: 20000890 .word 0x20000890
08004ee0 <abort>:
8004ee0: 2006 movs r0, #6
8004ee2: b508 push {r3, lr}
8004ee4: f000 f968 bl 80051b8 <raise>
8004ee8: 2001 movs r0, #1
8004eea: f7fc fc1e bl 800172a <_exit>
...
08004ef0 <__errno>:
8004ef0: 4b01 ldr r3, [pc, #4] ; (8004ef8 <__errno+0x8>)
8004ef2: 6818 ldr r0, [r3, #0]
8004ef4: 4770 bx lr
8004ef6: bf00 nop
8004ef8: 2000000c .word 0x2000000c
08004efc <__libc_init_array>:
8004efc: b570 push {r4, r5, r6, lr}
8004efe: 2600 movs r6, #0
8004f00: 4d0c ldr r5, [pc, #48] ; (8004f34 <__libc_init_array+0x38>)
8004f02: 4c0d ldr r4, [pc, #52] ; (8004f38 <__libc_init_array+0x3c>)
8004f04: 1b64 subs r4, r4, r5
8004f06: 10a4 asrs r4, r4, #2
8004f08: 42a6 cmp r6, r4
8004f0a: d109 bne.n 8004f20 <__libc_init_array+0x24>
8004f0c: f000 fcf0 bl 80058f0 <_init>
8004f10: 2600 movs r6, #0
8004f12: 4d0a ldr r5, [pc, #40] ; (8004f3c <__libc_init_array+0x40>)
8004f14: 4c0a ldr r4, [pc, #40] ; (8004f40 <__libc_init_array+0x44>)
8004f16: 1b64 subs r4, r4, r5
8004f18: 10a4 asrs r4, r4, #2
8004f1a: 42a6 cmp r6, r4
8004f1c: d105 bne.n 8004f2a <__libc_init_array+0x2e>
8004f1e: bd70 pop {r4, r5, r6, pc}
8004f20: f855 3b04 ldr.w r3, [r5], #4
8004f24: 4798 blx r3
8004f26: 3601 adds r6, #1
8004f28: e7ee b.n 8004f08 <__libc_init_array+0xc>
8004f2a: f855 3b04 ldr.w r3, [r5], #4
8004f2e: 4798 blx r3
8004f30: 3601 adds r6, #1
8004f32: e7f2 b.n 8004f1a <__libc_init_array+0x1e>
8004f34: 08005b3c .word 0x08005b3c
8004f38: 08005b3c .word 0x08005b3c
8004f3c: 08005b3c .word 0x08005b3c
8004f40: 08005b44 .word 0x08005b44
08004f44 <malloc>:
8004f44: 4b02 ldr r3, [pc, #8] ; (8004f50 <malloc+0xc>)
8004f46: 4601 mov r1, r0
8004f48: 6818 ldr r0, [r3, #0]
8004f4a: f000 b889 b.w 8005060 <_malloc_r>
8004f4e: bf00 nop
8004f50: 2000000c .word 0x2000000c
08004f54 <free>:
8004f54: 4b02 ldr r3, [pc, #8] ; (8004f60 <free+0xc>)
8004f56: 4601 mov r1, r0
8004f58: 6818 ldr r0, [r3, #0]
8004f5a: f000 b819 b.w 8004f90 <_free_r>
8004f5e: bf00 nop
8004f60: 2000000c .word 0x2000000c
08004f64 <memcpy>:
8004f64: 440a add r2, r1
8004f66: 4291 cmp r1, r2
8004f68: f100 33ff add.w r3, r0, #4294967295
8004f6c: d100 bne.n 8004f70 <memcpy+0xc>
8004f6e: 4770 bx lr
8004f70: b510 push {r4, lr}
8004f72: f811 4b01 ldrb.w r4, [r1], #1
8004f76: 4291 cmp r1, r2
8004f78: f803 4f01 strb.w r4, [r3, #1]!
8004f7c: d1f9 bne.n 8004f72 <memcpy+0xe>
8004f7e: bd10 pop {r4, pc}
08004f80 <memset>:
8004f80: 4603 mov r3, r0
8004f82: 4402 add r2, r0
8004f84: 4293 cmp r3, r2
8004f86: d100 bne.n 8004f8a <memset+0xa>
8004f88: 4770 bx lr
8004f8a: f803 1b01 strb.w r1, [r3], #1
8004f8e: e7f9 b.n 8004f84 <memset+0x4>
08004f90 <_free_r>:
8004f90: b538 push {r3, r4, r5, lr}
8004f92: 4605 mov r5, r0
8004f94: 2900 cmp r1, #0
8004f96: d040 beq.n 800501a <_free_r+0x8a>
8004f98: f851 3c04 ldr.w r3, [r1, #-4]
8004f9c: 1f0c subs r4, r1, #4
8004f9e: 2b00 cmp r3, #0
8004fa0: bfb8 it lt
8004fa2: 18e4 addlt r4, r4, r3
8004fa4: f000 f944 bl 8005230 <__malloc_lock>
8004fa8: 4a1c ldr r2, [pc, #112] ; (800501c <_free_r+0x8c>)
8004faa: 6813 ldr r3, [r2, #0]
8004fac: b933 cbnz r3, 8004fbc <_free_r+0x2c>
8004fae: 6063 str r3, [r4, #4]
8004fb0: 6014 str r4, [r2, #0]
8004fb2: 4628 mov r0, r5
8004fb4: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
8004fb8: f000 b940 b.w 800523c <__malloc_unlock>
8004fbc: 42a3 cmp r3, r4
8004fbe: d908 bls.n 8004fd2 <_free_r+0x42>
8004fc0: 6820 ldr r0, [r4, #0]
8004fc2: 1821 adds r1, r4, r0
8004fc4: 428b cmp r3, r1
8004fc6: bf01 itttt eq
8004fc8: 6819 ldreq r1, [r3, #0]
8004fca: 685b ldreq r3, [r3, #4]
8004fcc: 1809 addeq r1, r1, r0
8004fce: 6021 streq r1, [r4, #0]
8004fd0: e7ed b.n 8004fae <_free_r+0x1e>
8004fd2: 461a mov r2, r3
8004fd4: 685b ldr r3, [r3, #4]
8004fd6: b10b cbz r3, 8004fdc <_free_r+0x4c>
8004fd8: 42a3 cmp r3, r4
8004fda: d9fa bls.n 8004fd2 <_free_r+0x42>
8004fdc: 6811 ldr r1, [r2, #0]
8004fde: 1850 adds r0, r2, r1
8004fe0: 42a0 cmp r0, r4
8004fe2: d10b bne.n 8004ffc <_free_r+0x6c>
8004fe4: 6820 ldr r0, [r4, #0]
8004fe6: 4401 add r1, r0
8004fe8: 1850 adds r0, r2, r1
8004fea: 4283 cmp r3, r0
8004fec: 6011 str r1, [r2, #0]
8004fee: d1e0 bne.n 8004fb2 <_free_r+0x22>
8004ff0: 6818 ldr r0, [r3, #0]
8004ff2: 685b ldr r3, [r3, #4]
8004ff4: 4401 add r1, r0
8004ff6: 6011 str r1, [r2, #0]
8004ff8: 6053 str r3, [r2, #4]
8004ffa: e7da b.n 8004fb2 <_free_r+0x22>
8004ffc: d902 bls.n 8005004 <_free_r+0x74>
8004ffe: 230c movs r3, #12
8005000: 602b str r3, [r5, #0]
8005002: e7d6 b.n 8004fb2 <_free_r+0x22>
8005004: 6820 ldr r0, [r4, #0]
8005006: 1821 adds r1, r4, r0
8005008: 428b cmp r3, r1
800500a: bf01 itttt eq
800500c: 6819 ldreq r1, [r3, #0]
800500e: 685b ldreq r3, [r3, #4]
8005010: 1809 addeq r1, r1, r0
8005012: 6021 streq r1, [r4, #0]
8005014: 6063 str r3, [r4, #4]
8005016: 6054 str r4, [r2, #4]
8005018: e7cb b.n 8004fb2 <_free_r+0x22>
800501a: bd38 pop {r3, r4, r5, pc}
800501c: 20000894 .word 0x20000894
08005020 <sbrk_aligned>:
8005020: b570 push {r4, r5, r6, lr}
8005022: 4e0e ldr r6, [pc, #56] ; (800505c <sbrk_aligned+0x3c>)
8005024: 460c mov r4, r1
8005026: 6831 ldr r1, [r6, #0]
8005028: 4605 mov r5, r0
800502a: b911 cbnz r1, 8005032 <sbrk_aligned+0x12>
800502c: f000 f88c bl 8005148 <_sbrk_r>
8005030: 6030 str r0, [r6, #0]
8005032: 4621 mov r1, r4
8005034: 4628 mov r0, r5
8005036: f000 f887 bl 8005148 <_sbrk_r>
800503a: 1c43 adds r3, r0, #1
800503c: d00a beq.n 8005054 <sbrk_aligned+0x34>
800503e: 1cc4 adds r4, r0, #3
8005040: f024 0403 bic.w r4, r4, #3
8005044: 42a0 cmp r0, r4
8005046: d007 beq.n 8005058 <sbrk_aligned+0x38>
8005048: 1a21 subs r1, r4, r0
800504a: 4628 mov r0, r5
800504c: f000 f87c bl 8005148 <_sbrk_r>
8005050: 3001 adds r0, #1
8005052: d101 bne.n 8005058 <sbrk_aligned+0x38>
8005054: f04f 34ff mov.w r4, #4294967295
8005058: 4620 mov r0, r4
800505a: bd70 pop {r4, r5, r6, pc}
800505c: 20000898 .word 0x20000898
08005060 <_malloc_r>:
8005060: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
8005064: 1ccd adds r5, r1, #3
8005066: f025 0503 bic.w r5, r5, #3
800506a: 3508 adds r5, #8
800506c: 2d0c cmp r5, #12
800506e: bf38 it cc
8005070: 250c movcc r5, #12
8005072: 2d00 cmp r5, #0
8005074: 4607 mov r7, r0
8005076: db01 blt.n 800507c <_malloc_r+0x1c>
8005078: 42a9 cmp r1, r5
800507a: d905 bls.n 8005088 <_malloc_r+0x28>
800507c: 230c movs r3, #12
800507e: 2600 movs r6, #0
8005080: 603b str r3, [r7, #0]
8005082: 4630 mov r0, r6
8005084: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
8005088: 4e2e ldr r6, [pc, #184] ; (8005144 <_malloc_r+0xe4>)
800508a: f000 f8d1 bl 8005230 <__malloc_lock>
800508e: 6833 ldr r3, [r6, #0]
8005090: 461c mov r4, r3
8005092: bb34 cbnz r4, 80050e2 <_malloc_r+0x82>
8005094: 4629 mov r1, r5
8005096: 4638 mov r0, r7
8005098: f7ff ffc2 bl 8005020 <sbrk_aligned>
800509c: 1c43 adds r3, r0, #1
800509e: 4604 mov r4, r0
80050a0: d14d bne.n 800513e <_malloc_r+0xde>
80050a2: 6834 ldr r4, [r6, #0]
80050a4: 4626 mov r6, r4
80050a6: 2e00 cmp r6, #0
80050a8: d140 bne.n 800512c <_malloc_r+0xcc>
80050aa: 6823 ldr r3, [r4, #0]
80050ac: 4631 mov r1, r6
80050ae: 4638 mov r0, r7
80050b0: eb04 0803 add.w r8, r4, r3
80050b4: f000 f848 bl 8005148 <_sbrk_r>
80050b8: 4580 cmp r8, r0
80050ba: d13a bne.n 8005132 <_malloc_r+0xd2>
80050bc: 6821 ldr r1, [r4, #0]
80050be: 3503 adds r5, #3
80050c0: 1a6d subs r5, r5, r1
80050c2: f025 0503 bic.w r5, r5, #3
80050c6: 3508 adds r5, #8
80050c8: 2d0c cmp r5, #12
80050ca: bf38 it cc
80050cc: 250c movcc r5, #12
80050ce: 4638 mov r0, r7
80050d0: 4629 mov r1, r5
80050d2: f7ff ffa5 bl 8005020 <sbrk_aligned>
80050d6: 3001 adds r0, #1
80050d8: d02b beq.n 8005132 <_malloc_r+0xd2>
80050da: 6823 ldr r3, [r4, #0]
80050dc: 442b add r3, r5
80050de: 6023 str r3, [r4, #0]
80050e0: e00e b.n 8005100 <_malloc_r+0xa0>
80050e2: 6822 ldr r2, [r4, #0]
80050e4: 1b52 subs r2, r2, r5
80050e6: d41e bmi.n 8005126 <_malloc_r+0xc6>
80050e8: 2a0b cmp r2, #11
80050ea: d916 bls.n 800511a <_malloc_r+0xba>
80050ec: 1961 adds r1, r4, r5
80050ee: 42a3 cmp r3, r4
80050f0: 6025 str r5, [r4, #0]
80050f2: bf18 it ne
80050f4: 6059 strne r1, [r3, #4]
80050f6: 6863 ldr r3, [r4, #4]
80050f8: bf08 it eq
80050fa: 6031 streq r1, [r6, #0]
80050fc: 5162 str r2, [r4, r5]
80050fe: 604b str r3, [r1, #4]
8005100: 4638 mov r0, r7
8005102: f104 060b add.w r6, r4, #11
8005106: f000 f899 bl 800523c <__malloc_unlock>
800510a: f026 0607 bic.w r6, r6, #7
800510e: 1d23 adds r3, r4, #4
8005110: 1af2 subs r2, r6, r3
8005112: d0b6 beq.n 8005082 <_malloc_r+0x22>
8005114: 1b9b subs r3, r3, r6
8005116: 50a3 str r3, [r4, r2]
8005118: e7b3 b.n 8005082 <_malloc_r+0x22>
800511a: 6862 ldr r2, [r4, #4]
800511c: 42a3 cmp r3, r4
800511e: bf0c ite eq
8005120: 6032 streq r2, [r6, #0]
8005122: 605a strne r2, [r3, #4]
8005124: e7ec b.n 8005100 <_malloc_r+0xa0>
8005126: 4623 mov r3, r4
8005128: 6864 ldr r4, [r4, #4]
800512a: e7b2 b.n 8005092 <_malloc_r+0x32>
800512c: 4634 mov r4, r6
800512e: 6876 ldr r6, [r6, #4]
8005130: e7b9 b.n 80050a6 <_malloc_r+0x46>
8005132: 230c movs r3, #12
8005134: 4638 mov r0, r7
8005136: 603b str r3, [r7, #0]
8005138: f000 f880 bl 800523c <__malloc_unlock>
800513c: e7a1 b.n 8005082 <_malloc_r+0x22>
800513e: 6025 str r5, [r4, #0]
8005140: e7de b.n 8005100 <_malloc_r+0xa0>
8005142: bf00 nop
8005144: 20000894 .word 0x20000894
08005148 <_sbrk_r>:
8005148: b538 push {r3, r4, r5, lr}
800514a: 2300 movs r3, #0
800514c: 4d05 ldr r5, [pc, #20] ; (8005164 <_sbrk_r+0x1c>)
800514e: 4604 mov r4, r0
8005150: 4608 mov r0, r1
8005152: 602b str r3, [r5, #0]
8005154: f7fc faf4 bl 8001740 <_sbrk>
8005158: 1c43 adds r3, r0, #1
800515a: d102 bne.n 8005162 <_sbrk_r+0x1a>
800515c: 682b ldr r3, [r5, #0]
800515e: b103 cbz r3, 8005162 <_sbrk_r+0x1a>
8005160: 6023 str r3, [r4, #0]
8005162: bd38 pop {r3, r4, r5, pc}
8005164: 2000089c .word 0x2000089c
08005168 <_raise_r>:
8005168: 291f cmp r1, #31
800516a: b538 push {r3, r4, r5, lr}
800516c: 4604 mov r4, r0
800516e: 460d mov r5, r1
8005170: d904 bls.n 800517c <_raise_r+0x14>
8005172: 2316 movs r3, #22
8005174: 6003 str r3, [r0, #0]
8005176: f04f 30ff mov.w r0, #4294967295
800517a: bd38 pop {r3, r4, r5, pc}
800517c: 6c42 ldr r2, [r0, #68] ; 0x44
800517e: b112 cbz r2, 8005186 <_raise_r+0x1e>
8005180: f852 3021 ldr.w r3, [r2, r1, lsl #2]
8005184: b94b cbnz r3, 800519a <_raise_r+0x32>
8005186: 4620 mov r0, r4
8005188: f000 f830 bl 80051ec <_getpid_r>
800518c: 462a mov r2, r5
800518e: 4601 mov r1, r0
8005190: 4620 mov r0, r4
8005192: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
8005196: f000 b817 b.w 80051c8 <_kill_r>
800519a: 2b01 cmp r3, #1
800519c: d00a beq.n 80051b4 <_raise_r+0x4c>
800519e: 1c59 adds r1, r3, #1
80051a0: d103 bne.n 80051aa <_raise_r+0x42>
80051a2: 2316 movs r3, #22
80051a4: 6003 str r3, [r0, #0]
80051a6: 2001 movs r0, #1
80051a8: e7e7 b.n 800517a <_raise_r+0x12>
80051aa: 2400 movs r4, #0
80051ac: 4628 mov r0, r5
80051ae: f842 4025 str.w r4, [r2, r5, lsl #2]
80051b2: 4798 blx r3
80051b4: 2000 movs r0, #0
80051b6: e7e0 b.n 800517a <_raise_r+0x12>
080051b8 <raise>:
80051b8: 4b02 ldr r3, [pc, #8] ; (80051c4 <raise+0xc>)
80051ba: 4601 mov r1, r0
80051bc: 6818 ldr r0, [r3, #0]
80051be: f7ff bfd3 b.w 8005168 <_raise_r>
80051c2: bf00 nop
80051c4: 2000000c .word 0x2000000c
080051c8 <_kill_r>:
80051c8: b538 push {r3, r4, r5, lr}
80051ca: 2300 movs r3, #0
80051cc: 4d06 ldr r5, [pc, #24] ; (80051e8 <_kill_r+0x20>)
80051ce: 4604 mov r4, r0
80051d0: 4608 mov r0, r1
80051d2: 4611 mov r1, r2
80051d4: 602b str r3, [r5, #0]
80051d6: f7fc fa98 bl 800170a <_kill>
80051da: 1c43 adds r3, r0, #1
80051dc: d102 bne.n 80051e4 <_kill_r+0x1c>
80051de: 682b ldr r3, [r5, #0]
80051e0: b103 cbz r3, 80051e4 <_kill_r+0x1c>
80051e2: 6023 str r3, [r4, #0]
80051e4: bd38 pop {r3, r4, r5, pc}
80051e6: bf00 nop
80051e8: 2000089c .word 0x2000089c
080051ec <_getpid_r>:
80051ec: f7fc ba86 b.w 80016fc <_getpid>
080051f0 <siprintf>:
80051f0: b40e push {r1, r2, r3}
80051f2: f06f 4100 mvn.w r1, #2147483648 ; 0x80000000
80051f6: b500 push {lr}
80051f8: b09c sub sp, #112 ; 0x70
80051fa: ab1d add r3, sp, #116 ; 0x74
80051fc: 9002 str r0, [sp, #8]
80051fe: 9006 str r0, [sp, #24]
8005200: 9107 str r1, [sp, #28]
8005202: 9104 str r1, [sp, #16]
8005204: 4808 ldr r0, [pc, #32] ; (8005228 <siprintf+0x38>)
8005206: 4909 ldr r1, [pc, #36] ; (800522c <siprintf+0x3c>)
8005208: f853 2b04 ldr.w r2, [r3], #4
800520c: 9105 str r1, [sp, #20]
800520e: 6800 ldr r0, [r0, #0]
8005210: a902 add r1, sp, #8
8005212: 9301 str r3, [sp, #4]
8005214: f000 f874 bl 8005300 <_svfiprintf_r>
8005218: 2200 movs r2, #0
800521a: 9b02 ldr r3, [sp, #8]
800521c: 701a strb r2, [r3, #0]
800521e: b01c add sp, #112 ; 0x70
8005220: f85d eb04 ldr.w lr, [sp], #4
8005224: b003 add sp, #12
8005226: 4770 bx lr
8005228: 2000000c .word 0x2000000c
800522c: ffff0208 .word 0xffff0208
08005230 <__malloc_lock>:
8005230: 4801 ldr r0, [pc, #4] ; (8005238 <__malloc_lock+0x8>)
8005232: f000 bafb b.w 800582c <__retarget_lock_acquire_recursive>
8005236: bf00 nop
8005238: 200008a0 .word 0x200008a0
0800523c <__malloc_unlock>:
800523c: 4801 ldr r0, [pc, #4] ; (8005244 <__malloc_unlock+0x8>)
800523e: f000 baf6 b.w 800582e <__retarget_lock_release_recursive>
8005242: bf00 nop
8005244: 200008a0 .word 0x200008a0
08005248 <__ssputs_r>:
8005248: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
800524c: 688e ldr r6, [r1, #8]
800524e: 4682 mov sl, r0
8005250: 429e cmp r6, r3
8005252: 460c mov r4, r1
8005254: 4690 mov r8, r2
8005256: 461f mov r7, r3
8005258: d838 bhi.n 80052cc <__ssputs_r+0x84>
800525a: 898a ldrh r2, [r1, #12]
800525c: f412 6f90 tst.w r2, #1152 ; 0x480
8005260: d032 beq.n 80052c8 <__ssputs_r+0x80>
8005262: 6825 ldr r5, [r4, #0]
8005264: 6909 ldr r1, [r1, #16]
8005266: 3301 adds r3, #1
8005268: eba5 0901 sub.w r9, r5, r1
800526c: 6965 ldr r5, [r4, #20]
800526e: 444b add r3, r9
8005270: eb05 0545 add.w r5, r5, r5, lsl #1
8005274: eb05 75d5 add.w r5, r5, r5, lsr #31
8005278: 106d asrs r5, r5, #1
800527a: 429d cmp r5, r3
800527c: bf38 it cc
800527e: 461d movcc r5, r3
8005280: 0553 lsls r3, r2, #21
8005282: d531 bpl.n 80052e8 <__ssputs_r+0xa0>
8005284: 4629 mov r1, r5
8005286: f7ff feeb bl 8005060 <_malloc_r>
800528a: 4606 mov r6, r0
800528c: b950 cbnz r0, 80052a4 <__ssputs_r+0x5c>
800528e: 230c movs r3, #12
8005290: f04f 30ff mov.w r0, #4294967295
8005294: f8ca 3000 str.w r3, [sl]
8005298: 89a3 ldrh r3, [r4, #12]
800529a: f043 0340 orr.w r3, r3, #64 ; 0x40
800529e: 81a3 strh r3, [r4, #12]
80052a0: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
80052a4: 464a mov r2, r9
80052a6: 6921 ldr r1, [r4, #16]
80052a8: f7ff fe5c bl 8004f64 <memcpy>
80052ac: 89a3 ldrh r3, [r4, #12]
80052ae: f423 6390 bic.w r3, r3, #1152 ; 0x480
80052b2: f043 0380 orr.w r3, r3, #128 ; 0x80
80052b6: 81a3 strh r3, [r4, #12]
80052b8: 6126 str r6, [r4, #16]
80052ba: 444e add r6, r9
80052bc: 6026 str r6, [r4, #0]
80052be: 463e mov r6, r7
80052c0: 6165 str r5, [r4, #20]
80052c2: eba5 0509 sub.w r5, r5, r9
80052c6: 60a5 str r5, [r4, #8]
80052c8: 42be cmp r6, r7
80052ca: d900 bls.n 80052ce <__ssputs_r+0x86>
80052cc: 463e mov r6, r7
80052ce: 4632 mov r2, r6
80052d0: 4641 mov r1, r8
80052d2: 6820 ldr r0, [r4, #0]
80052d4: f000 faba bl 800584c <memmove>
80052d8: 68a3 ldr r3, [r4, #8]
80052da: 2000 movs r0, #0
80052dc: 1b9b subs r3, r3, r6
80052de: 60a3 str r3, [r4, #8]
80052e0: 6823 ldr r3, [r4, #0]
80052e2: 4433 add r3, r6
80052e4: 6023 str r3, [r4, #0]
80052e6: e7db b.n 80052a0 <__ssputs_r+0x58>
80052e8: 462a mov r2, r5
80052ea: f000 fac9 bl 8005880 <_realloc_r>
80052ee: 4606 mov r6, r0
80052f0: 2800 cmp r0, #0
80052f2: d1e1 bne.n 80052b8 <__ssputs_r+0x70>
80052f4: 4650 mov r0, sl
80052f6: 6921 ldr r1, [r4, #16]
80052f8: f7ff fe4a bl 8004f90 <_free_r>
80052fc: e7c7 b.n 800528e <__ssputs_r+0x46>
...
08005300 <_svfiprintf_r>:
8005300: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
8005304: 4698 mov r8, r3
8005306: 898b ldrh r3, [r1, #12]
8005308: 4607 mov r7, r0
800530a: 061b lsls r3, r3, #24
800530c: 460d mov r5, r1
800530e: 4614 mov r4, r2
8005310: b09d sub sp, #116 ; 0x74
8005312: d50e bpl.n 8005332 <_svfiprintf_r+0x32>
8005314: 690b ldr r3, [r1, #16]
8005316: b963 cbnz r3, 8005332 <_svfiprintf_r+0x32>
8005318: 2140 movs r1, #64 ; 0x40
800531a: f7ff fea1 bl 8005060 <_malloc_r>
800531e: 6028 str r0, [r5, #0]
8005320: 6128 str r0, [r5, #16]
8005322: b920 cbnz r0, 800532e <_svfiprintf_r+0x2e>
8005324: 230c movs r3, #12
8005326: 603b str r3, [r7, #0]
8005328: f04f 30ff mov.w r0, #4294967295
800532c: e0d1 b.n 80054d2 <_svfiprintf_r+0x1d2>
800532e: 2340 movs r3, #64 ; 0x40
8005330: 616b str r3, [r5, #20]
8005332: 2300 movs r3, #0
8005334: 9309 str r3, [sp, #36] ; 0x24
8005336: 2320 movs r3, #32
8005338: f88d 3029 strb.w r3, [sp, #41] ; 0x29
800533c: 2330 movs r3, #48 ; 0x30
800533e: f04f 0901 mov.w r9, #1
8005342: f8cd 800c str.w r8, [sp, #12]
8005346: f8df 81a4 ldr.w r8, [pc, #420] ; 80054ec <_svfiprintf_r+0x1ec>
800534a: f88d 302a strb.w r3, [sp, #42] ; 0x2a
800534e: 4623 mov r3, r4
8005350: 469a mov sl, r3
8005352: f813 2b01 ldrb.w r2, [r3], #1
8005356: b10a cbz r2, 800535c <_svfiprintf_r+0x5c>
8005358: 2a25 cmp r2, #37 ; 0x25
800535a: d1f9 bne.n 8005350 <_svfiprintf_r+0x50>
800535c: ebba 0b04 subs.w fp, sl, r4
8005360: d00b beq.n 800537a <_svfiprintf_r+0x7a>
8005362: 465b mov r3, fp
8005364: 4622 mov r2, r4
8005366: 4629 mov r1, r5
8005368: 4638 mov r0, r7
800536a: f7ff ff6d bl 8005248 <__ssputs_r>
800536e: 3001 adds r0, #1
8005370: f000 80aa beq.w 80054c8 <_svfiprintf_r+0x1c8>
8005374: 9a09 ldr r2, [sp, #36] ; 0x24
8005376: 445a add r2, fp
8005378: 9209 str r2, [sp, #36] ; 0x24
800537a: f89a 3000 ldrb.w r3, [sl]
800537e: 2b00 cmp r3, #0
8005380: f000 80a2 beq.w 80054c8 <_svfiprintf_r+0x1c8>
8005384: 2300 movs r3, #0
8005386: f04f 32ff mov.w r2, #4294967295
800538a: e9cd 2305 strd r2, r3, [sp, #20]
800538e: f10a 0a01 add.w sl, sl, #1
8005392: 9304 str r3, [sp, #16]
8005394: 9307 str r3, [sp, #28]
8005396: f88d 3053 strb.w r3, [sp, #83] ; 0x53
800539a: 931a str r3, [sp, #104] ; 0x68
800539c: 4654 mov r4, sl
800539e: 2205 movs r2, #5
80053a0: f814 1b01 ldrb.w r1, [r4], #1
80053a4: 4851 ldr r0, [pc, #324] ; (80054ec <_svfiprintf_r+0x1ec>)
80053a6: f000 fa43 bl 8005830 <memchr>
80053aa: 9a04 ldr r2, [sp, #16]
80053ac: b9d8 cbnz r0, 80053e6 <_svfiprintf_r+0xe6>
80053ae: 06d0 lsls r0, r2, #27
80053b0: bf44 itt mi
80053b2: 2320 movmi r3, #32
80053b4: f88d 3053 strbmi.w r3, [sp, #83] ; 0x53
80053b8: 0711 lsls r1, r2, #28
80053ba: bf44 itt mi
80053bc: 232b movmi r3, #43 ; 0x2b
80053be: f88d 3053 strbmi.w r3, [sp, #83] ; 0x53
80053c2: f89a 3000 ldrb.w r3, [sl]
80053c6: 2b2a cmp r3, #42 ; 0x2a
80053c8: d015 beq.n 80053f6 <_svfiprintf_r+0xf6>
80053ca: 4654 mov r4, sl
80053cc: 2000 movs r0, #0
80053ce: f04f 0c0a mov.w ip, #10
80053d2: 9a07 ldr r2, [sp, #28]
80053d4: 4621 mov r1, r4
80053d6: f811 3b01 ldrb.w r3, [r1], #1
80053da: 3b30 subs r3, #48 ; 0x30
80053dc: 2b09 cmp r3, #9
80053de: d94e bls.n 800547e <_svfiprintf_r+0x17e>
80053e0: b1b0 cbz r0, 8005410 <_svfiprintf_r+0x110>
80053e2: 9207 str r2, [sp, #28]
80053e4: e014 b.n 8005410 <_svfiprintf_r+0x110>
80053e6: eba0 0308 sub.w r3, r0, r8
80053ea: fa09 f303 lsl.w r3, r9, r3
80053ee: 4313 orrs r3, r2
80053f0: 46a2 mov sl, r4
80053f2: 9304 str r3, [sp, #16]
80053f4: e7d2 b.n 800539c <_svfiprintf_r+0x9c>
80053f6: 9b03 ldr r3, [sp, #12]
80053f8: 1d19 adds r1, r3, #4
80053fa: 681b ldr r3, [r3, #0]
80053fc: 9103 str r1, [sp, #12]
80053fe: 2b00 cmp r3, #0
8005400: bfbb ittet lt
8005402: 425b neglt r3, r3
8005404: f042 0202 orrlt.w r2, r2, #2
8005408: 9307 strge r3, [sp, #28]
800540a: 9307 strlt r3, [sp, #28]
800540c: bfb8 it lt
800540e: 9204 strlt r2, [sp, #16]
8005410: 7823 ldrb r3, [r4, #0]
8005412: 2b2e cmp r3, #46 ; 0x2e
8005414: d10c bne.n 8005430 <_svfiprintf_r+0x130>
8005416: 7863 ldrb r3, [r4, #1]
8005418: 2b2a cmp r3, #42 ; 0x2a
800541a: d135 bne.n 8005488 <_svfiprintf_r+0x188>
800541c: 9b03 ldr r3, [sp, #12]
800541e: 3402 adds r4, #2
8005420: 1d1a adds r2, r3, #4
8005422: 681b ldr r3, [r3, #0]
8005424: 9203 str r2, [sp, #12]
8005426: 2b00 cmp r3, #0
8005428: bfb8 it lt
800542a: f04f 33ff movlt.w r3, #4294967295
800542e: 9305 str r3, [sp, #20]
8005430: f8df a0bc ldr.w sl, [pc, #188] ; 80054f0 <_svfiprintf_r+0x1f0>
8005434: 2203 movs r2, #3
8005436: 4650 mov r0, sl
8005438: 7821 ldrb r1, [r4, #0]
800543a: f000 f9f9 bl 8005830 <memchr>
800543e: b140 cbz r0, 8005452 <_svfiprintf_r+0x152>
8005440: 2340 movs r3, #64 ; 0x40
8005442: eba0 000a sub.w r0, r0, sl
8005446: fa03 f000 lsl.w r0, r3, r0
800544a: 9b04 ldr r3, [sp, #16]
800544c: 3401 adds r4, #1
800544e: 4303 orrs r3, r0
8005450: 9304 str r3, [sp, #16]
8005452: f814 1b01 ldrb.w r1, [r4], #1
8005456: 2206 movs r2, #6
8005458: 4826 ldr r0, [pc, #152] ; (80054f4 <_svfiprintf_r+0x1f4>)
800545a: f88d 1028 strb.w r1, [sp, #40] ; 0x28
800545e: f000 f9e7 bl 8005830 <memchr>
8005462: 2800 cmp r0, #0
8005464: d038 beq.n 80054d8 <_svfiprintf_r+0x1d8>
8005466: 4b24 ldr r3, [pc, #144] ; (80054f8 <_svfiprintf_r+0x1f8>)
8005468: bb1b cbnz r3, 80054b2 <_svfiprintf_r+0x1b2>
800546a: 9b03 ldr r3, [sp, #12]
800546c: 3307 adds r3, #7
800546e: f023 0307 bic.w r3, r3, #7
8005472: 3308 adds r3, #8
8005474: 9303 str r3, [sp, #12]
8005476: 9b09 ldr r3, [sp, #36] ; 0x24
8005478: 4433 add r3, r6
800547a: 9309 str r3, [sp, #36] ; 0x24
800547c: e767 b.n 800534e <_svfiprintf_r+0x4e>
800547e: 460c mov r4, r1
8005480: 2001 movs r0, #1
8005482: fb0c 3202 mla r2, ip, r2, r3
8005486: e7a5 b.n 80053d4 <_svfiprintf_r+0xd4>
8005488: 2300 movs r3, #0
800548a: f04f 0c0a mov.w ip, #10
800548e: 4619 mov r1, r3
8005490: 3401 adds r4, #1
8005492: 9305 str r3, [sp, #20]
8005494: 4620 mov r0, r4
8005496: f810 2b01 ldrb.w r2, [r0], #1
800549a: 3a30 subs r2, #48 ; 0x30
800549c: 2a09 cmp r2, #9
800549e: d903 bls.n 80054a8 <_svfiprintf_r+0x1a8>
80054a0: 2b00 cmp r3, #0
80054a2: d0c5 beq.n 8005430 <_svfiprintf_r+0x130>
80054a4: 9105 str r1, [sp, #20]
80054a6: e7c3 b.n 8005430 <_svfiprintf_r+0x130>
80054a8: 4604 mov r4, r0
80054aa: 2301 movs r3, #1
80054ac: fb0c 2101 mla r1, ip, r1, r2
80054b0: e7f0 b.n 8005494 <_svfiprintf_r+0x194>
80054b2: ab03 add r3, sp, #12
80054b4: 9300 str r3, [sp, #0]
80054b6: 462a mov r2, r5
80054b8: 4638 mov r0, r7
80054ba: 4b10 ldr r3, [pc, #64] ; (80054fc <_svfiprintf_r+0x1fc>)
80054bc: a904 add r1, sp, #16
80054be: f3af 8000 nop.w
80054c2: 1c42 adds r2, r0, #1
80054c4: 4606 mov r6, r0
80054c6: d1d6 bne.n 8005476 <_svfiprintf_r+0x176>
80054c8: 89ab ldrh r3, [r5, #12]
80054ca: 065b lsls r3, r3, #25
80054cc: f53f af2c bmi.w 8005328 <_svfiprintf_r+0x28>
80054d0: 9809 ldr r0, [sp, #36] ; 0x24
80054d2: b01d add sp, #116 ; 0x74
80054d4: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
80054d8: ab03 add r3, sp, #12
80054da: 9300 str r3, [sp, #0]
80054dc: 462a mov r2, r5
80054de: 4638 mov r0, r7
80054e0: 4b06 ldr r3, [pc, #24] ; (80054fc <_svfiprintf_r+0x1fc>)
80054e2: a904 add r1, sp, #16
80054e4: f000 f87c bl 80055e0 <_printf_i>
80054e8: e7eb b.n 80054c2 <_svfiprintf_r+0x1c2>
80054ea: bf00 nop
80054ec: 08005b08 .word 0x08005b08
80054f0: 08005b0e .word 0x08005b0e
80054f4: 08005b12 .word 0x08005b12
80054f8: 00000000 .word 0x00000000
80054fc: 08005249 .word 0x08005249
08005500 <_printf_common>:
8005500: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
8005504: 4616 mov r6, r2
8005506: 4699 mov r9, r3
8005508: 688a ldr r2, [r1, #8]
800550a: 690b ldr r3, [r1, #16]
800550c: 4607 mov r7, r0
800550e: 4293 cmp r3, r2
8005510: bfb8 it lt
8005512: 4613 movlt r3, r2
8005514: 6033 str r3, [r6, #0]
8005516: f891 2043 ldrb.w r2, [r1, #67] ; 0x43
800551a: 460c mov r4, r1
800551c: f8dd 8020 ldr.w r8, [sp, #32]
8005520: b10a cbz r2, 8005526 <_printf_common+0x26>
8005522: 3301 adds r3, #1
8005524: 6033 str r3, [r6, #0]
8005526: 6823 ldr r3, [r4, #0]
8005528: 0699 lsls r1, r3, #26
800552a: bf42 ittt mi
800552c: 6833 ldrmi r3, [r6, #0]
800552e: 3302 addmi r3, #2
8005530: 6033 strmi r3, [r6, #0]
8005532: 6825 ldr r5, [r4, #0]
8005534: f015 0506 ands.w r5, r5, #6
8005538: d106 bne.n 8005548 <_printf_common+0x48>
800553a: f104 0a19 add.w sl, r4, #25
800553e: 68e3 ldr r3, [r4, #12]
8005540: 6832 ldr r2, [r6, #0]
8005542: 1a9b subs r3, r3, r2
8005544: 42ab cmp r3, r5
8005546: dc28 bgt.n 800559a <_printf_common+0x9a>
8005548: f894 2043 ldrb.w r2, [r4, #67] ; 0x43
800554c: 1e13 subs r3, r2, #0
800554e: 6822 ldr r2, [r4, #0]
8005550: bf18 it ne
8005552: 2301 movne r3, #1
8005554: 0692 lsls r2, r2, #26
8005556: d42d bmi.n 80055b4 <_printf_common+0xb4>
8005558: 4649 mov r1, r9
800555a: 4638 mov r0, r7
800555c: f104 0243 add.w r2, r4, #67 ; 0x43
8005560: 47c0 blx r8
8005562: 3001 adds r0, #1
8005564: d020 beq.n 80055a8 <_printf_common+0xa8>
8005566: 6823 ldr r3, [r4, #0]
8005568: 68e5 ldr r5, [r4, #12]
800556a: f003 0306 and.w r3, r3, #6
800556e: 2b04 cmp r3, #4
8005570: bf18 it ne
8005572: 2500 movne r5, #0
8005574: 6832 ldr r2, [r6, #0]
8005576: f04f 0600 mov.w r6, #0
800557a: 68a3 ldr r3, [r4, #8]
800557c: bf08 it eq
800557e: 1aad subeq r5, r5, r2
8005580: 6922 ldr r2, [r4, #16]
8005582: bf08 it eq
8005584: ea25 75e5 biceq.w r5, r5, r5, asr #31
8005588: 4293 cmp r3, r2
800558a: bfc4 itt gt
800558c: 1a9b subgt r3, r3, r2
800558e: 18ed addgt r5, r5, r3
8005590: 341a adds r4, #26
8005592: 42b5 cmp r5, r6
8005594: d11a bne.n 80055cc <_printf_common+0xcc>
8005596: 2000 movs r0, #0
8005598: e008 b.n 80055ac <_printf_common+0xac>
800559a: 2301 movs r3, #1
800559c: 4652 mov r2, sl
800559e: 4649 mov r1, r9
80055a0: 4638 mov r0, r7
80055a2: 47c0 blx r8
80055a4: 3001 adds r0, #1
80055a6: d103 bne.n 80055b0 <_printf_common+0xb0>
80055a8: f04f 30ff mov.w r0, #4294967295
80055ac: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
80055b0: 3501 adds r5, #1
80055b2: e7c4 b.n 800553e <_printf_common+0x3e>
80055b4: 2030 movs r0, #48 ; 0x30
80055b6: 18e1 adds r1, r4, r3
80055b8: f881 0043 strb.w r0, [r1, #67] ; 0x43
80055bc: 1c5a adds r2, r3, #1
80055be: f894 1045 ldrb.w r1, [r4, #69] ; 0x45
80055c2: 4422 add r2, r4
80055c4: 3302 adds r3, #2
80055c6: f882 1043 strb.w r1, [r2, #67] ; 0x43
80055ca: e7c5 b.n 8005558 <_printf_common+0x58>
80055cc: 2301 movs r3, #1
80055ce: 4622 mov r2, r4
80055d0: 4649 mov r1, r9
80055d2: 4638 mov r0, r7
80055d4: 47c0 blx r8
80055d6: 3001 adds r0, #1
80055d8: d0e6 beq.n 80055a8 <_printf_common+0xa8>
80055da: 3601 adds r6, #1
80055dc: e7d9 b.n 8005592 <_printf_common+0x92>
...
080055e0 <_printf_i>:
80055e0: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr}
80055e4: 7e0f ldrb r7, [r1, #24]
80055e6: 4691 mov r9, r2
80055e8: 2f78 cmp r7, #120 ; 0x78
80055ea: 4680 mov r8, r0
80055ec: 460c mov r4, r1
80055ee: 469a mov sl, r3
80055f0: 9d0c ldr r5, [sp, #48] ; 0x30
80055f2: f101 0243 add.w r2, r1, #67 ; 0x43
80055f6: d807 bhi.n 8005608 <_printf_i+0x28>
80055f8: 2f62 cmp r7, #98 ; 0x62
80055fa: d80a bhi.n 8005612 <_printf_i+0x32>
80055fc: 2f00 cmp r7, #0
80055fe: f000 80d9 beq.w 80057b4 <_printf_i+0x1d4>
8005602: 2f58 cmp r7, #88 ; 0x58
8005604: f000 80a4 beq.w 8005750 <_printf_i+0x170>
8005608: f104 0542 add.w r5, r4, #66 ; 0x42
800560c: f884 7042 strb.w r7, [r4, #66] ; 0x42
8005610: e03a b.n 8005688 <_printf_i+0xa8>
8005612: f1a7 0363 sub.w r3, r7, #99 ; 0x63
8005616: 2b15 cmp r3, #21
8005618: d8f6 bhi.n 8005608 <_printf_i+0x28>
800561a: a101 add r1, pc, #4 ; (adr r1, 8005620 <_printf_i+0x40>)
800561c: f851 f023 ldr.w pc, [r1, r3, lsl #2]
8005620: 08005679 .word 0x08005679
8005624: 0800568d .word 0x0800568d
8005628: 08005609 .word 0x08005609
800562c: 08005609 .word 0x08005609
8005630: 08005609 .word 0x08005609
8005634: 08005609 .word 0x08005609
8005638: 0800568d .word 0x0800568d
800563c: 08005609 .word 0x08005609
8005640: 08005609 .word 0x08005609
8005644: 08005609 .word 0x08005609
8005648: 08005609 .word 0x08005609
800564c: 0800579b .word 0x0800579b
8005650: 080056bd .word 0x080056bd
8005654: 0800577d .word 0x0800577d
8005658: 08005609 .word 0x08005609
800565c: 08005609 .word 0x08005609
8005660: 080057bd .word 0x080057bd
8005664: 08005609 .word 0x08005609
8005668: 080056bd .word 0x080056bd
800566c: 08005609 .word 0x08005609
8005670: 08005609 .word 0x08005609
8005674: 08005785 .word 0x08005785
8005678: 682b ldr r3, [r5, #0]
800567a: 1d1a adds r2, r3, #4
800567c: 681b ldr r3, [r3, #0]
800567e: 602a str r2, [r5, #0]
8005680: f104 0542 add.w r5, r4, #66 ; 0x42
8005684: f884 3042 strb.w r3, [r4, #66] ; 0x42
8005688: 2301 movs r3, #1
800568a: e0a4 b.n 80057d6 <_printf_i+0x1f6>
800568c: 6820 ldr r0, [r4, #0]
800568e: 6829 ldr r1, [r5, #0]
8005690: 0606 lsls r6, r0, #24
8005692: f101 0304 add.w r3, r1, #4
8005696: d50a bpl.n 80056ae <_printf_i+0xce>
8005698: 680e ldr r6, [r1, #0]
800569a: 602b str r3, [r5, #0]
800569c: 2e00 cmp r6, #0
800569e: da03 bge.n 80056a8 <_printf_i+0xc8>
80056a0: 232d movs r3, #45 ; 0x2d
80056a2: 4276 negs r6, r6
80056a4: f884 3043 strb.w r3, [r4, #67] ; 0x43
80056a8: 230a movs r3, #10
80056aa: 485e ldr r0, [pc, #376] ; (8005824 <_printf_i+0x244>)
80056ac: e019 b.n 80056e2 <_printf_i+0x102>
80056ae: 680e ldr r6, [r1, #0]
80056b0: f010 0f40 tst.w r0, #64 ; 0x40
80056b4: 602b str r3, [r5, #0]
80056b6: bf18 it ne
80056b8: b236 sxthne r6, r6
80056ba: e7ef b.n 800569c <_printf_i+0xbc>
80056bc: 682b ldr r3, [r5, #0]
80056be: 6820 ldr r0, [r4, #0]
80056c0: 1d19 adds r1, r3, #4
80056c2: 6029 str r1, [r5, #0]
80056c4: 0601 lsls r1, r0, #24
80056c6: d501 bpl.n 80056cc <_printf_i+0xec>
80056c8: 681e ldr r6, [r3, #0]
80056ca: e002 b.n 80056d2 <_printf_i+0xf2>
80056cc: 0646 lsls r6, r0, #25
80056ce: d5fb bpl.n 80056c8 <_printf_i+0xe8>
80056d0: 881e ldrh r6, [r3, #0]
80056d2: 2f6f cmp r7, #111 ; 0x6f
80056d4: bf0c ite eq
80056d6: 2308 moveq r3, #8
80056d8: 230a movne r3, #10
80056da: 4852 ldr r0, [pc, #328] ; (8005824 <_printf_i+0x244>)
80056dc: 2100 movs r1, #0
80056de: f884 1043 strb.w r1, [r4, #67] ; 0x43
80056e2: 6865 ldr r5, [r4, #4]
80056e4: 2d00 cmp r5, #0
80056e6: bfa8 it ge
80056e8: 6821 ldrge r1, [r4, #0]
80056ea: 60a5 str r5, [r4, #8]
80056ec: bfa4 itt ge
80056ee: f021 0104 bicge.w r1, r1, #4
80056f2: 6021 strge r1, [r4, #0]
80056f4: b90e cbnz r6, 80056fa <_printf_i+0x11a>
80056f6: 2d00 cmp r5, #0
80056f8: d04d beq.n 8005796 <_printf_i+0x1b6>
80056fa: 4615 mov r5, r2
80056fc: fbb6 f1f3 udiv r1, r6, r3
8005700: fb03 6711 mls r7, r3, r1, r6
8005704: 5dc7 ldrb r7, [r0, r7]
8005706: f805 7d01 strb.w r7, [r5, #-1]!
800570a: 4637 mov r7, r6
800570c: 42bb cmp r3, r7
800570e: 460e mov r6, r1
8005710: d9f4 bls.n 80056fc <_printf_i+0x11c>
8005712: 2b08 cmp r3, #8
8005714: d10b bne.n 800572e <_printf_i+0x14e>
8005716: 6823 ldr r3, [r4, #0]
8005718: 07de lsls r6, r3, #31
800571a: d508 bpl.n 800572e <_printf_i+0x14e>
800571c: 6923 ldr r3, [r4, #16]
800571e: 6861 ldr r1, [r4, #4]
8005720: 4299 cmp r1, r3
8005722: bfde ittt le
8005724: 2330 movle r3, #48 ; 0x30
8005726: f805 3c01 strble.w r3, [r5, #-1]
800572a: f105 35ff addle.w r5, r5, #4294967295
800572e: 1b52 subs r2, r2, r5
8005730: 6122 str r2, [r4, #16]
8005732: 464b mov r3, r9
8005734: 4621 mov r1, r4
8005736: 4640 mov r0, r8
8005738: f8cd a000 str.w sl, [sp]
800573c: aa03 add r2, sp, #12
800573e: f7ff fedf bl 8005500 <_printf_common>
8005742: 3001 adds r0, #1
8005744: d14c bne.n 80057e0 <_printf_i+0x200>
8005746: f04f 30ff mov.w r0, #4294967295
800574a: b004 add sp, #16
800574c: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
8005750: 4834 ldr r0, [pc, #208] ; (8005824 <_printf_i+0x244>)
8005752: f881 7045 strb.w r7, [r1, #69] ; 0x45
8005756: 6829 ldr r1, [r5, #0]
8005758: 6823 ldr r3, [r4, #0]
800575a: f851 6b04 ldr.w r6, [r1], #4
800575e: 6029 str r1, [r5, #0]
8005760: 061d lsls r5, r3, #24
8005762: d514 bpl.n 800578e <_printf_i+0x1ae>
8005764: 07df lsls r7, r3, #31
8005766: bf44 itt mi
8005768: f043 0320 orrmi.w r3, r3, #32
800576c: 6023 strmi r3, [r4, #0]
800576e: b91e cbnz r6, 8005778 <_printf_i+0x198>
8005770: 6823 ldr r3, [r4, #0]
8005772: f023 0320 bic.w r3, r3, #32
8005776: 6023 str r3, [r4, #0]
8005778: 2310 movs r3, #16
800577a: e7af b.n 80056dc <_printf_i+0xfc>
800577c: 6823 ldr r3, [r4, #0]
800577e: f043 0320 orr.w r3, r3, #32
8005782: 6023 str r3, [r4, #0]
8005784: 2378 movs r3, #120 ; 0x78
8005786: 4828 ldr r0, [pc, #160] ; (8005828 <_printf_i+0x248>)
8005788: f884 3045 strb.w r3, [r4, #69] ; 0x45
800578c: e7e3 b.n 8005756 <_printf_i+0x176>
800578e: 0659 lsls r1, r3, #25
8005790: bf48 it mi
8005792: b2b6 uxthmi r6, r6
8005794: e7e6 b.n 8005764 <_printf_i+0x184>
8005796: 4615 mov r5, r2
8005798: e7bb b.n 8005712 <_printf_i+0x132>
800579a: 682b ldr r3, [r5, #0]
800579c: 6826 ldr r6, [r4, #0]
800579e: 1d18 adds r0, r3, #4
80057a0: 6961 ldr r1, [r4, #20]
80057a2: 6028 str r0, [r5, #0]
80057a4: 0635 lsls r5, r6, #24
80057a6: 681b ldr r3, [r3, #0]
80057a8: d501 bpl.n 80057ae <_printf_i+0x1ce>
80057aa: 6019 str r1, [r3, #0]
80057ac: e002 b.n 80057b4 <_printf_i+0x1d4>
80057ae: 0670 lsls r0, r6, #25
80057b0: d5fb bpl.n 80057aa <_printf_i+0x1ca>
80057b2: 8019 strh r1, [r3, #0]
80057b4: 2300 movs r3, #0
80057b6: 4615 mov r5, r2
80057b8: 6123 str r3, [r4, #16]
80057ba: e7ba b.n 8005732 <_printf_i+0x152>
80057bc: 682b ldr r3, [r5, #0]
80057be: 2100 movs r1, #0
80057c0: 1d1a adds r2, r3, #4
80057c2: 602a str r2, [r5, #0]
80057c4: 681d ldr r5, [r3, #0]
80057c6: 6862 ldr r2, [r4, #4]
80057c8: 4628 mov r0, r5
80057ca: f000 f831 bl 8005830 <memchr>
80057ce: b108 cbz r0, 80057d4 <_printf_i+0x1f4>
80057d0: 1b40 subs r0, r0, r5
80057d2: 6060 str r0, [r4, #4]
80057d4: 6863 ldr r3, [r4, #4]
80057d6: 6123 str r3, [r4, #16]
80057d8: 2300 movs r3, #0
80057da: f884 3043 strb.w r3, [r4, #67] ; 0x43
80057de: e7a8 b.n 8005732 <_printf_i+0x152>
80057e0: 462a mov r2, r5
80057e2: 4649 mov r1, r9
80057e4: 4640 mov r0, r8
80057e6: 6923 ldr r3, [r4, #16]
80057e8: 47d0 blx sl
80057ea: 3001 adds r0, #1
80057ec: d0ab beq.n 8005746 <_printf_i+0x166>
80057ee: 6823 ldr r3, [r4, #0]
80057f0: 079b lsls r3, r3, #30
80057f2: d413 bmi.n 800581c <_printf_i+0x23c>
80057f4: 68e0 ldr r0, [r4, #12]
80057f6: 9b03 ldr r3, [sp, #12]
80057f8: 4298 cmp r0, r3
80057fa: bfb8 it lt
80057fc: 4618 movlt r0, r3
80057fe: e7a4 b.n 800574a <_printf_i+0x16a>
8005800: 2301 movs r3, #1
8005802: 4632 mov r2, r6
8005804: 4649 mov r1, r9
8005806: 4640 mov r0, r8
8005808: 47d0 blx sl
800580a: 3001 adds r0, #1
800580c: d09b beq.n 8005746 <_printf_i+0x166>
800580e: 3501 adds r5, #1
8005810: 68e3 ldr r3, [r4, #12]
8005812: 9903 ldr r1, [sp, #12]
8005814: 1a5b subs r3, r3, r1
8005816: 42ab cmp r3, r5
8005818: dcf2 bgt.n 8005800 <_printf_i+0x220>
800581a: e7eb b.n 80057f4 <_printf_i+0x214>
800581c: 2500 movs r5, #0
800581e: f104 0619 add.w r6, r4, #25
8005822: e7f5 b.n 8005810 <_printf_i+0x230>
8005824: 08005b19 .word 0x08005b19
8005828: 08005b2a .word 0x08005b2a
0800582c <__retarget_lock_acquire_recursive>:
800582c: 4770 bx lr
0800582e <__retarget_lock_release_recursive>:
800582e: 4770 bx lr
08005830 <memchr>:
8005830: 4603 mov r3, r0
8005832: b510 push {r4, lr}
8005834: b2c9 uxtb r1, r1
8005836: 4402 add r2, r0
8005838: 4293 cmp r3, r2
800583a: 4618 mov r0, r3
800583c: d101 bne.n 8005842 <memchr+0x12>
800583e: 2000 movs r0, #0
8005840: e003 b.n 800584a <memchr+0x1a>
8005842: 7804 ldrb r4, [r0, #0]
8005844: 3301 adds r3, #1
8005846: 428c cmp r4, r1
8005848: d1f6 bne.n 8005838 <memchr+0x8>
800584a: bd10 pop {r4, pc}
0800584c <memmove>:
800584c: 4288 cmp r0, r1
800584e: b510 push {r4, lr}
8005850: eb01 0402 add.w r4, r1, r2
8005854: d902 bls.n 800585c <memmove+0x10>
8005856: 4284 cmp r4, r0
8005858: 4623 mov r3, r4
800585a: d807 bhi.n 800586c <memmove+0x20>
800585c: 1e43 subs r3, r0, #1
800585e: 42a1 cmp r1, r4
8005860: d008 beq.n 8005874 <memmove+0x28>
8005862: f811 2b01 ldrb.w r2, [r1], #1
8005866: f803 2f01 strb.w r2, [r3, #1]!
800586a: e7f8 b.n 800585e <memmove+0x12>
800586c: 4601 mov r1, r0
800586e: 4402 add r2, r0
8005870: 428a cmp r2, r1
8005872: d100 bne.n 8005876 <memmove+0x2a>
8005874: bd10 pop {r4, pc}
8005876: f813 4d01 ldrb.w r4, [r3, #-1]!
800587a: f802 4d01 strb.w r4, [r2, #-1]!
800587e: e7f7 b.n 8005870 <memmove+0x24>
08005880 <_realloc_r>:
8005880: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
8005884: 4680 mov r8, r0
8005886: 4614 mov r4, r2
8005888: 460e mov r6, r1
800588a: b921 cbnz r1, 8005896 <_realloc_r+0x16>
800588c: 4611 mov r1, r2
800588e: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr}
8005892: f7ff bbe5 b.w 8005060 <_malloc_r>
8005896: b92a cbnz r2, 80058a4 <_realloc_r+0x24>
8005898: f7ff fb7a bl 8004f90 <_free_r>
800589c: 4625 mov r5, r4
800589e: 4628 mov r0, r5
80058a0: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
80058a4: f000 f81b bl 80058de <_malloc_usable_size_r>
80058a8: 4284 cmp r4, r0
80058aa: 4607 mov r7, r0
80058ac: d802 bhi.n 80058b4 <_realloc_r+0x34>
80058ae: ebb4 0f50 cmp.w r4, r0, lsr #1
80058b2: d812 bhi.n 80058da <_realloc_r+0x5a>
80058b4: 4621 mov r1, r4
80058b6: 4640 mov r0, r8
80058b8: f7ff fbd2 bl 8005060 <_malloc_r>
80058bc: 4605 mov r5, r0
80058be: 2800 cmp r0, #0
80058c0: d0ed beq.n 800589e <_realloc_r+0x1e>
80058c2: 42bc cmp r4, r7
80058c4: 4622 mov r2, r4
80058c6: 4631 mov r1, r6
80058c8: bf28 it cs
80058ca: 463a movcs r2, r7
80058cc: f7ff fb4a bl 8004f64 <memcpy>
80058d0: 4631 mov r1, r6
80058d2: 4640 mov r0, r8
80058d4: f7ff fb5c bl 8004f90 <_free_r>
80058d8: e7e1 b.n 800589e <_realloc_r+0x1e>
80058da: 4635 mov r5, r6
80058dc: e7df b.n 800589e <_realloc_r+0x1e>
080058de <_malloc_usable_size_r>:
80058de: f851 3c04 ldr.w r3, [r1, #-4]
80058e2: 1f18 subs r0, r3, #4
80058e4: 2b00 cmp r3, #0
80058e6: bfbc itt lt
80058e8: 580b ldrlt r3, [r1, r0]
80058ea: 18c0 addlt r0, r0, r3
80058ec: 4770 bx lr
...
080058f0 <_init>:
80058f0: b5f8 push {r3, r4, r5, r6, r7, lr}
80058f2: bf00 nop
80058f4: bcf8 pop {r3, r4, r5, r6, r7}
80058f6: bc08 pop {r3}
80058f8: 469e mov lr, r3
80058fa: 4770 bx lr
080058fc <_fini>:
80058fc: b5f8 push {r3, r4, r5, r6, r7, lr}
80058fe: bf00 nop
8005900: bcf8 pop {r3, r4, r5, r6, r7}
8005902: bc08 pop {r3}
8005904: 469e mov lr, r3
8005906: 4770 bx lr