diff --git a/access_control_python/__pycache__/access_control.cpython-311.pyc b/access_control_python/__pycache__/access_control.cpython-311.pyc
index b0c12f7..2bbca13 100644
Binary files a/access_control_python/__pycache__/access_control.cpython-311.pyc and b/access_control_python/__pycache__/access_control.cpython-311.pyc differ
diff --git a/access_control_python/access_control.py b/access_control_python/access_control.py
index 06e2421..a9dcbdc 100644
--- a/access_control_python/access_control.py
+++ b/access_control_python/access_control.py
@@ -1,20 +1,37 @@
import serial
+import time
from threading import Thread
class access_control:
+ _in_payloads = []
_read_buffer = []
+ _door_state: bool = 0
serial_adapter: serial.Serial
def __init__(self, serial_port: str):
self.serial_adapter = serial.Serial(serial_port,baudrate=115200)
- #Thread(target=self.read_serial).start()
+ Thread(target=self.read_serial).start()
+ Thread(target=self._process_payload).start()
def read_serial(self):
while True:
- if True:
- print("Reading Serial")
- data = self.serial_adapter.read_until(0xFF)
- print(data)
- #data = data.decode("ascii").removesuffix("\r\n")
- self._read_buffer.append(data)
+ if self.serial_adapter.in_waiting:
+ in_byte = self.serial_adapter.read(1)
+ if(in_byte==b'\xFF'):
+ self._in_payloads.append(self._read_buffer)
+ self._read_buffer = []
+ else:
+ self._read_buffer.append(in_byte)
+ def _process_payload(self):
+ while True:
+ self._process_payload_once()
+
+ def _process_payload_once(self):
+ if(len(self._in_payloads)>0):
+ payload = self._in_payloads.pop(0)
+ if(payload[0]==b'\x01'):
+ if(payload[1]==b'\x00'):
+ self._door_state = True
+ elif(payload[1]==b'\01'):
+ self._door_state = False
def light_on(self):
packet = bytearray()
packet.append(0x00)
@@ -27,8 +44,12 @@ class access_control:
packet.append(0x00)
packet.append(0xFF)
self.serial_adapter.write(packet)
- def request_door_state(self):
+ def _request_door_state(self):
packet = bytearray()
packet.append(0x01)
packet.append(0xFF)
- self.serial_adapter.write(packet)
\ No newline at end of file
+ self.serial_adapter.write(packet)
+ def get_door_state(self) -> bool:
+ self._request_door_state()
+ time.sleep(0.25)
+ return self._door_state
\ No newline at end of file
diff --git a/access_control_python/main.py b/access_control_python/main.py
index 3a67ecf..002de67 100644
--- a/access_control_python/main.py
+++ b/access_control_python/main.py
@@ -1,10 +1,10 @@
from access_control import access_control
import time
-stm32 = access_control("COM7")
+stm32 = access_control("COM12")
time.sleep(1)
while True:
- stm32.request_door_state()
- kkc =stm32.serial_adapter.read(2)
- print(kkc)
- time.sleep(0.5)
\ No newline at end of file
+ if(stm32.get_door_state() == True):
+ print("Door is Closed")
+ else:
+ print("Door is Openned")
diff --git a/access_control_stm32/.settings/language.settings.xml b/access_control_stm32/.settings/language.settings.xml
index 15f6ae8..f843df6 100644
--- a/access_control_stm32/.settings/language.settings.xml
+++ b/access_control_stm32/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
diff --git a/access_control_stm32/.settings/stm32cubeide.project.prefs b/access_control_stm32/.settings/stm32cubeide.project.prefs
index cd085b3..702b2a4 100644
--- a/access_control_stm32/.settings/stm32cubeide.project.prefs
+++ b/access_control_stm32/.settings/stm32cubeide.project.prefs
@@ -1,5 +1,5 @@
635E684B79701B039C64EA45C3F84D30=0128DB7B22BCDE154FEB5F4DBED2CA57
66BE74F758C12D739921AEA421D593D3=4
-8DF89ED150041C4CBC7CB9A9CAA90856=AB868319CB57203C6EBBFA9F981B52E0
-DC22A860405A8BF2F2C095E5B6529F12=AB868319CB57203C6EBBFA9F981B52E0
+8DF89ED150041C4CBC7CB9A9CAA90856=2C6D56F1655FD58902B46B19116A62EB
+DC22A860405A8BF2F2C095E5B6529F12=363334336619A6574C7D7388DE56AD2C
eclipse.preferences.version=1
diff --git a/access_control_stm32/Debug/Core/Src/main.cyclo b/access_control_stm32/Debug/Core/Src/main.cyclo
index 8458c9f..7925410 100644
--- a/access_control_stm32/Debug/Core/Src/main.cyclo
+++ b/access_control_stm32/Debug/Core/Src/main.cyclo
@@ -1,5 +1,5 @@
-../Core/Src/main.c:67:5:main 1
-../Core/Src/main.c:130:6:SystemClock_Config 3
-../Core/Src/main.c:174:13:MX_USART2_UART_Init 2
-../Core/Src/main.c:205:13:MX_GPIO_Init 1
-../Core/Src/main.c:250:6:Error_Handler 1
+../Core/Src/main.c:67:5:main 6
+../Core/Src/main.c:128:6:SystemClock_Config 3
+../Core/Src/main.c:172:13:MX_USART2_UART_Init 2
+../Core/Src/main.c:203:13:MX_GPIO_Init 1
+../Core/Src/main.c:248:6:Error_Handler 1
diff --git a/access_control_stm32/Debug/Core/Src/main.o b/access_control_stm32/Debug/Core/Src/main.o
index 88bf8d3..f7c8f72 100644
Binary files a/access_control_stm32/Debug/Core/Src/main.o and b/access_control_stm32/Debug/Core/Src/main.o differ
diff --git a/access_control_stm32/Debug/Core/Src/main.su b/access_control_stm32/Debug/Core/Src/main.su
index facc2af..3c4e371 100644
--- a/access_control_stm32/Debug/Core/Src/main.su
+++ b/access_control_stm32/Debug/Core/Src/main.su
@@ -1,5 +1,5 @@
-../Core/Src/main.c:67:5:main 8 static
-../Core/Src/main.c:130:6:SystemClock_Config 88 static
-../Core/Src/main.c:174:13:MX_USART2_UART_Init 8 static
-../Core/Src/main.c:205:13:MX_GPIO_Init 48 static
-../Core/Src/main.c:250:6:Error_Handler 4 static,ignoring_inline_asm
+../Core/Src/main.c:67:5:main 16 static
+../Core/Src/main.c:128:6:SystemClock_Config 88 static
+../Core/Src/main.c:172:13:MX_USART2_UART_Init 8 static
+../Core/Src/main.c:203:13:MX_GPIO_Init 48 static
+../Core/Src/main.c:248:6:Error_Handler 4 static,ignoring_inline_asm
diff --git a/access_control_stm32/Debug/Core/Src/stm32f4xx_hal_msp.o b/access_control_stm32/Debug/Core/Src/stm32f4xx_hal_msp.o
index 15a5796..bedcc7c 100644
Binary files a/access_control_stm32/Debug/Core/Src/stm32f4xx_hal_msp.o and b/access_control_stm32/Debug/Core/Src/stm32f4xx_hal_msp.o differ
diff --git a/access_control_stm32/Debug/Core/Src/stm32f4xx_it.o b/access_control_stm32/Debug/Core/Src/stm32f4xx_it.o
index 9c11b31..b75caf6 100644
Binary files a/access_control_stm32/Debug/Core/Src/stm32f4xx_it.o and b/access_control_stm32/Debug/Core/Src/stm32f4xx_it.o differ
diff --git a/access_control_stm32/Debug/Core/Src/syscalls.o b/access_control_stm32/Debug/Core/Src/syscalls.o
index 51be6cf..7486f43 100644
Binary files a/access_control_stm32/Debug/Core/Src/syscalls.o and b/access_control_stm32/Debug/Core/Src/syscalls.o differ
diff --git a/access_control_stm32/Debug/Core/Src/sysmem.o b/access_control_stm32/Debug/Core/Src/sysmem.o
index 46033e6..daab869 100644
Binary files a/access_control_stm32/Debug/Core/Src/sysmem.o and b/access_control_stm32/Debug/Core/Src/sysmem.o differ
diff --git a/access_control_stm32/Debug/Core/Src/system_stm32f4xx.o b/access_control_stm32/Debug/Core/Src/system_stm32f4xx.o
index 198886a..7c5f423 100644
Binary files a/access_control_stm32/Debug/Core/Src/system_stm32f4xx.o and b/access_control_stm32/Debug/Core/Src/system_stm32f4xx.o differ
diff --git a/access_control_stm32/Debug/Core/Startup/startup_stm32f411retx.o b/access_control_stm32/Debug/Core/Startup/startup_stm32f411retx.o
index ccb4edb..b9cc321 100644
Binary files a/access_control_stm32/Debug/Core/Startup/startup_stm32f411retx.o and b/access_control_stm32/Debug/Core/Startup/startup_stm32f411retx.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o
index 97961af..30ce352 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o
index e4a5874..2e4df97 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o
index 71f90e0..a57ae53 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o
index 9597333..e33cd91 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.o
index e3d2624..f8a4d3e 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o
index 6184639..fc3a338 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o
index b169f08..1d36f47 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o
index 5e2f472..095097c 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o
index f0fe873..8e1db63 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o
index 10c9793..1aaf0f8 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o
index c3de82a..241be09 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o
index fa20771..92a8aa7 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o
index 3969cba..208a782 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.o
index 152b487..11c9206 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.o
index 1fb4420..4b7c895 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.o differ
diff --git a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.o b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.o
index 8d3203c..c1a874a 100644
Binary files a/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.o and b/access_control_stm32/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.o differ
diff --git a/access_control_stm32/Debug/access_control_stm32.elf b/access_control_stm32/Debug/access_control_stm32.elf
index fe6cc01..f6e825a 100644
Binary files a/access_control_stm32/Debug/access_control_stm32.elf and b/access_control_stm32/Debug/access_control_stm32.elf differ
diff --git a/access_control_stm32/Debug/access_control_stm32.list b/access_control_stm32/Debug/access_control_stm32.list
index e5d65c7..accbd3c 100644
--- a/access_control_stm32/Debug/access_control_stm32.list
+++ b/access_control_stm32/Debug/access_control_stm32.list
@@ -5,47 +5,47 @@ Sections:
Idx Name Size VMA LMA File off Algn
0 .isr_vector 00000198 08000000 08000000 00010000 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 1 .text 00001e58 08000198 08000198 00010198 2**2
+ 1 .text 00002054 08000198 08000198 00010198 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
- 2 .rodata 00000020 08001ff0 08001ff0 00011ff0 2**2
+ 2 .rodata 00000018 080021ec 080021ec 000121ec 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 3 .ARM.extab 00000000 08002010 08002010 0002000c 2**0
+ 3 .ARM.extab 00000000 08002204 08002204 0002000c 2**0
CONTENTS
- 4 .ARM 00000008 08002010 08002010 00012010 2**2
+ 4 .ARM 00000008 08002204 08002204 00012204 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 5 .preinit_array 00000000 08002018 08002018 0002000c 2**0
+ 5 .preinit_array 00000000 0800220c 0800220c 0002000c 2**0
CONTENTS, ALLOC, LOAD, DATA
- 6 .init_array 00000004 08002018 08002018 00012018 2**2
+ 6 .init_array 00000004 0800220c 0800220c 0001220c 2**2
CONTENTS, ALLOC, LOAD, DATA
- 7 .fini_array 00000004 0800201c 0800201c 0001201c 2**2
+ 7 .fini_array 00000004 08002210 08002210 00012210 2**2
CONTENTS, ALLOC, LOAD, DATA
- 8 .data 0000000c 20000000 08002020 00020000 2**2
+ 8 .data 0000000c 20000000 08002214 00020000 2**2
CONTENTS, ALLOC, LOAD, DATA
- 9 .bss 00000070 2000000c 0800202c 0002000c 2**2
+ 9 .bss 00000070 2000000c 08002220 0002000c 2**2
ALLOC
- 10 ._user_heap_stack 00000604 2000007c 0800202c 0002007c 2**0
+ 10 ._user_heap_stack 00000604 2000007c 08002220 0002007c 2**0
ALLOC
11 .ARM.attributes 00000030 00000000 00000000 0002000c 2**0
CONTENTS, READONLY
12 .comment 00000043 00000000 00000000 0002003c 2**0
CONTENTS, READONLY
- 13 .debug_info 000070ba 00000000 00000000 0002007f 2**0
+ 13 .debug_info 00007126 00000000 00000000 0002007f 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 14 .debug_abbrev 000012d1 00000000 00000000 00027139 2**0
+ 14 .debug_abbrev 000012ea 00000000 00000000 000271a5 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 15 .debug_aranges 00000608 00000000 00000000 00028410 2**3
+ 15 .debug_aranges 00000608 00000000 00000000 00028490 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
- 16 .debug_rnglists 0000049c 00000000 00000000 00028a18 2**0
+ 16 .debug_rnglists 0000049d 00000000 00000000 00028a98 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 17 .debug_macro 0001483d 00000000 00000000 00028eb4 2**0
+ 17 .debug_macro 0001483d 00000000 00000000 00028f35 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 18 .debug_line 00007952 00000000 00000000 0003d6f1 2**0
+ 18 .debug_line 0000798a 00000000 00000000 0003d772 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 19 .debug_str 000818ec 00000000 00000000 00045043 2**0
+ 19 .debug_str 000818db 00000000 00000000 000450fc 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 20 .debug_frame 000017a4 00000000 00000000 000c6930 2**2
+ 20 .debug_frame 000017a8 00000000 00000000 000c69d8 2**2
CONTENTS, READONLY, DEBUGGING, OCTETS
- 21 .debug_line_str 00000072 00000000 00000000 000c80d4 2**0
+ 21 .debug_line_str 00000059 00000000 00000000 000c8180 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
Disassembly of section .text:
@@ -64,7 +64,7 @@ Disassembly of section .text:
80001ae: bd10 pop {r4, pc}
80001b0: 2000000c .word 0x2000000c
80001b4: 00000000 .word 0x00000000
- 80001b8: 08001fd8 .word 0x08001fd8
+ 80001b8: 080021d4 .word 0x080021d4
080001bc :
80001bc: b508 push {r3, lr}
@@ -76,7 +76,7 @@ Disassembly of section .text:
80001ca: bd08 pop {r3, pc}
80001cc: 00000000 .word 0x00000000
80001d0: 20000010 .word 0x20000010
- 80001d4: 08001fd8 .word 0x08001fd8
+ 80001d4: 080021d4 .word 0x080021d4
080001d8 <__aeabi_uldivmod>:
80001d8: b953 cbnz r3, 80001f0 <__aeabi_uldivmod+0x18>
@@ -359,4486 +359,4844 @@ Disassembly of section .text:
*/
int main(void) {
80004d4: b580 push {r7, lr}
- 80004d6: af00 add r7, sp, #0
+ 80004d6: b082 sub sp, #8
+ 80004d8: af00 add r7, sp, #0
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
- 80004d8: f000 fa02 bl 80008e0
+ 80004da: f000 fa45 bl 8000968
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
- 80004dc: f000 f816 bl 800050c
+ 80004de: f000 f859 bl 8000594
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
- 80004e0: f000 f8a8 bl 8000634
+ 80004e2: f000 f8eb bl 80006bc
MX_USART2_UART_Init();
- 80004e4: f000 f87c bl 80005e0
+ 80004e6: f000 f8bf bl 8000668
/* USER CODE BEGIN 2 */
memset(uart_buffer, 0, 10);
- 80004e8: 220a movs r2, #10
- 80004ea: 2100 movs r1, #0
- 80004ec: 4804 ldr r0, [pc, #16] ; (8000500 )
- 80004ee: f001 fd47 bl 8001f80
-// }
-// uart_index = 0;
-// memset(uart_buffer, 0, 10);
-// }
-// }
- HAL_UART_Transmit(&huart2, (uint8_t*)"Hello", 5, 100);
- 80004f2: 2364 movs r3, #100 ; 0x64
- 80004f4: 2205 movs r2, #5
- 80004f6: 4903 ldr r1, [pc, #12] ; (8000504 )
- 80004f8: 4803 ldr r0, [pc, #12] ; (8000508 )
- 80004fa: f001 f9cc bl 8001896
- 80004fe: e7f8 b.n 80004f2
- 8000500: 2000006c .word 0x2000006c
- 8000504: 08001ff0 .word 0x08001ff0
- 8000508: 20000028 .word 0x20000028
+ 80004ea: 220a movs r2, #10
+ 80004ec: 2100 movs r1, #0
+ 80004ee: 4825 ldr r0, [pc, #148] ; (8000584 )
+ 80004f0: f001 fe44 bl 800217c
-0800050c :
+ /* Infinite loop */
+ /* USER CODE BEGIN WHILE */
+ while (1) {
+
+ if (HAL_UART_Receive(&huart2, uart_buffer + uart_index, 1, 250)
+ 80004f4: 4b24 ldr r3, [pc, #144] ; (8000588 )
+ 80004f6: 781b ldrb r3, [r3, #0]
+ 80004f8: 461a mov r2, r3
+ 80004fa: 4b22 ldr r3, [pc, #136] ; (8000584 )
+ 80004fc: 18d1 adds r1, r2, r3
+ 80004fe: 23fa movs r3, #250 ; 0xfa
+ 8000500: 2201 movs r2, #1
+ 8000502: 4822 ldr r0, [pc, #136] ; (800058c )
+ 8000504: f001 fab5 bl 8001a72
+ 8000508: 4603 mov r3, r0
+ 800050a: 2b00 cmp r3, #0
+ 800050c: d1f2 bne.n 80004f4
+ == HAL_OK) {
+ uart_index++;
+ 800050e: 4b1e ldr r3, [pc, #120] ; (8000588 )
+ 8000510: 781b ldrb r3, [r3, #0]
+ 8000512: 3301 adds r3, #1
+ 8000514: b2da uxtb r2, r3
+ 8000516: 4b1c ldr r3, [pc, #112] ; (8000588 )
+ 8000518: 701a strb r2, [r3, #0]
+ if (uart_buffer[uart_index - 1] == 0xFF) {
+ 800051a: 4b1b ldr r3, [pc, #108] ; (8000588 )
+ 800051c: 781b ldrb r3, [r3, #0]
+ 800051e: 3b01 subs r3, #1
+ 8000520: 4a18 ldr r2, [pc, #96] ; (8000584 )
+ 8000522: 5cd3 ldrb r3, [r2, r3]
+ 8000524: 2bff cmp r3, #255 ; 0xff
+ 8000526: d1e5 bne.n 80004f4
+ if (uart_index > 1) {
+ 8000528: 4b17 ldr r3, [pc, #92] ; (8000588 )
+ 800052a: 781b ldrb r3, [r3, #0]
+ 800052c: 2b01 cmp r3, #1
+ 800052e: d920 bls.n 8000572
+ if (uart_buffer[0] == 0x00) {
+ 8000530: 4b14 ldr r3, [pc, #80] ; (8000584 )
+ 8000532: 781b ldrb r3, [r3, #0]
+ 8000534: 2b00 cmp r3, #0
+ 8000536: d107 bne.n 8000548
+ HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, uart_buffer[1]);
+ 8000538: 4b12 ldr r3, [pc, #72] ; (8000584 )
+ 800053a: 785b ldrb r3, [r3, #1]
+ 800053c: 461a mov r2, r3
+ 800053e: 2120 movs r1, #32
+ 8000540: 4813 ldr r0, [pc, #76] ; (8000590 )
+ 8000542: f000 fd05 bl 8000f50
+ 8000546: e014 b.n 8000572
+ } else if (uart_buffer[0] == 0x01) {
+ 8000548: 4b0e ldr r3, [pc, #56] ; (8000584 )
+ 800054a: 781b ldrb r3, [r3, #0]
+ 800054c: 2b01 cmp r3, #1
+ 800054e: d110 bne.n 8000572
+ uint8_t payload[3] = { 0x01, HAL_GPIO_ReadPin(GPIOA,
+ 8000550: 2301 movs r3, #1
+ 8000552: 713b strb r3, [r7, #4]
+ 8000554: 2180 movs r1, #128 ; 0x80
+ 8000556: 480e ldr r0, [pc, #56] ; (8000590 )
+ 8000558: f000 fce2 bl 8000f20
+ 800055c: 4603 mov r3, r0
+ 800055e: 717b strb r3, [r7, #5]
+ 8000560: 23ff movs r3, #255 ; 0xff
+ 8000562: 71bb strb r3, [r7, #6]
+ GPIO_PIN_7), 0xFF };
+ HAL_UART_Transmit(&huart2, payload, 3, 1500);
+ 8000564: 1d39 adds r1, r7, #4
+ 8000566: f240 53dc movw r3, #1500 ; 0x5dc
+ 800056a: 2203 movs r2, #3
+ 800056c: 4807 ldr r0, [pc, #28] ; (800058c )
+ 800056e: f001 f9ee bl 800194e
+ }
+ }
+ uart_index = 0;
+ 8000572: 4b05 ldr r3, [pc, #20] ; (8000588 )
+ 8000574: 2200 movs r2, #0
+ 8000576: 701a strb r2, [r3, #0]
+ memset(uart_buffer, 0, 10);
+ 8000578: 220a movs r2, #10
+ 800057a: 2100 movs r1, #0
+ 800057c: 4801 ldr r0, [pc, #4] ; (8000584 )
+ 800057e: f001 fdfd bl 800217c
+ if (HAL_UART_Receive(&huart2, uart_buffer + uart_index, 1, 250)
+ 8000582: e7b7 b.n 80004f4
+ 8000584: 2000006c .word 0x2000006c
+ 8000588: 20000076 .word 0x20000076
+ 800058c: 20000028 .word 0x20000028
+ 8000590: 40020000 .word 0x40020000
+
+08000594 :
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void) {
- 800050c: b580 push {r7, lr}
- 800050e: b094 sub sp, #80 ; 0x50
- 8000510: af00 add r7, sp, #0
+ 8000594: b580 push {r7, lr}
+ 8000596: b094 sub sp, #80 ; 0x50
+ 8000598: af00 add r7, sp, #0
RCC_OscInitTypeDef RCC_OscInitStruct = { 0 };
- 8000512: f107 0320 add.w r3, r7, #32
- 8000516: 2230 movs r2, #48 ; 0x30
- 8000518: 2100 movs r1, #0
- 800051a: 4618 mov r0, r3
- 800051c: f001 fd30 bl 8001f80
+ 800059a: f107 0320 add.w r3, r7, #32
+ 800059e: 2230 movs r2, #48 ; 0x30
+ 80005a0: 2100 movs r1, #0
+ 80005a2: 4618 mov r0, r3
+ 80005a4: f001 fdea bl 800217c
RCC_ClkInitTypeDef RCC_ClkInitStruct = { 0 };
- 8000520: f107 030c add.w r3, r7, #12
- 8000524: 2200 movs r2, #0
- 8000526: 601a str r2, [r3, #0]
- 8000528: 605a str r2, [r3, #4]
- 800052a: 609a str r2, [r3, #8]
- 800052c: 60da str r2, [r3, #12]
- 800052e: 611a str r2, [r3, #16]
+ 80005a8: f107 030c add.w r3, r7, #12
+ 80005ac: 2200 movs r2, #0
+ 80005ae: 601a str r2, [r3, #0]
+ 80005b0: 605a str r2, [r3, #4]
+ 80005b2: 609a str r2, [r3, #8]
+ 80005b4: 60da str r2, [r3, #12]
+ 80005b6: 611a str r2, [r3, #16]
/** Configure the main internal regulator output voltage
*/
__HAL_RCC_PWR_CLK_ENABLE();
- 8000530: 2300 movs r3, #0
- 8000532: 60bb str r3, [r7, #8]
- 8000534: 4b28 ldr r3, [pc, #160] ; (80005d8 )
- 8000536: 6c1b ldr r3, [r3, #64] ; 0x40
- 8000538: 4a27 ldr r2, [pc, #156] ; (80005d8 )
- 800053a: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
- 800053e: 6413 str r3, [r2, #64] ; 0x40
- 8000540: 4b25 ldr r3, [pc, #148] ; (80005d8 )
- 8000542: 6c1b ldr r3, [r3, #64] ; 0x40
- 8000544: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
- 8000548: 60bb str r3, [r7, #8]
- 800054a: 68bb ldr r3, [r7, #8]
+ 80005b8: 2300 movs r3, #0
+ 80005ba: 60bb str r3, [r7, #8]
+ 80005bc: 4b28 ldr r3, [pc, #160] ; (8000660 )
+ 80005be: 6c1b ldr r3, [r3, #64] ; 0x40
+ 80005c0: 4a27 ldr r2, [pc, #156] ; (8000660 )
+ 80005c2: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
+ 80005c6: 6413 str r3, [r2, #64] ; 0x40
+ 80005c8: 4b25 ldr r3, [pc, #148] ; (8000660 )
+ 80005ca: 6c1b ldr r3, [r3, #64] ; 0x40
+ 80005cc: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
+ 80005d0: 60bb str r3, [r7, #8]
+ 80005d2: 68bb ldr r3, [r7, #8]
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
- 800054c: 2300 movs r3, #0
- 800054e: 607b str r3, [r7, #4]
- 8000550: 4b22 ldr r3, [pc, #136] ; (80005dc )
- 8000552: 681b ldr r3, [r3, #0]
- 8000554: 4a21 ldr r2, [pc, #132] ; (80005dc )
- 8000556: f443 4340 orr.w r3, r3, #49152 ; 0xc000
- 800055a: 6013 str r3, [r2, #0]
- 800055c: 4b1f ldr r3, [pc, #124] ; (80005dc )
- 800055e: 681b ldr r3, [r3, #0]
- 8000560: f403 4340 and.w r3, r3, #49152 ; 0xc000
- 8000564: 607b str r3, [r7, #4]
- 8000566: 687b ldr r3, [r7, #4]
+ 80005d4: 2300 movs r3, #0
+ 80005d6: 607b str r3, [r7, #4]
+ 80005d8: 4b22 ldr r3, [pc, #136] ; (8000664 )
+ 80005da: 681b ldr r3, [r3, #0]
+ 80005dc: 4a21 ldr r2, [pc, #132] ; (8000664 )
+ 80005de: f443 4340 orr.w r3, r3, #49152 ; 0xc000
+ 80005e2: 6013 str r3, [r2, #0]
+ 80005e4: 4b1f ldr r3, [pc, #124] ; (8000664 )
+ 80005e6: 681b ldr r3, [r3, #0]
+ 80005e8: f403 4340 and.w r3, r3, #49152 ; 0xc000
+ 80005ec: 607b str r3, [r7, #4]
+ 80005ee: 687b ldr r3, [r7, #4]
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
- 8000568: 2302 movs r3, #2
- 800056a: 623b str r3, [r7, #32]
+ 80005f0: 2302 movs r3, #2
+ 80005f2: 623b str r3, [r7, #32]
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
- 800056c: 2301 movs r3, #1
- 800056e: 62fb str r3, [r7, #44] ; 0x2c
+ 80005f4: 2301 movs r3, #1
+ 80005f6: 62fb str r3, [r7, #44] ; 0x2c
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
- 8000570: 2310 movs r3, #16
- 8000572: 633b str r3, [r7, #48] ; 0x30
+ 80005f8: 2310 movs r3, #16
+ 80005fa: 633b str r3, [r7, #48] ; 0x30
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
- 8000574: 2302 movs r3, #2
- 8000576: 63bb str r3, [r7, #56] ; 0x38
+ 80005fc: 2302 movs r3, #2
+ 80005fe: 63bb str r3, [r7, #56] ; 0x38
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
- 8000578: 2300 movs r3, #0
- 800057a: 63fb str r3, [r7, #60] ; 0x3c
+ 8000600: 2300 movs r3, #0
+ 8000602: 63fb str r3, [r7, #60] ; 0x3c
RCC_OscInitStruct.PLL.PLLM = 16;
- 800057c: 2310 movs r3, #16
- 800057e: 643b str r3, [r7, #64] ; 0x40
+ 8000604: 2310 movs r3, #16
+ 8000606: 643b str r3, [r7, #64] ; 0x40
RCC_OscInitStruct.PLL.PLLN = 336;
- 8000580: f44f 73a8 mov.w r3, #336 ; 0x150
- 8000584: 647b str r3, [r7, #68] ; 0x44
+ 8000608: f44f 73a8 mov.w r3, #336 ; 0x150
+ 800060c: 647b str r3, [r7, #68] ; 0x44
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4;
- 8000586: 2304 movs r3, #4
- 8000588: 64bb str r3, [r7, #72] ; 0x48
+ 800060e: 2304 movs r3, #4
+ 8000610: 64bb str r3, [r7, #72] ; 0x48
RCC_OscInitStruct.PLL.PLLQ = 4;
- 800058a: 2304 movs r3, #4
- 800058c: 64fb str r3, [r7, #76] ; 0x4c
+ 8000612: 2304 movs r3, #4
+ 8000614: 64fb str r3, [r7, #76] ; 0x4c
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
- 800058e: f107 0320 add.w r3, r7, #32
- 8000592: 4618 mov r0, r3
- 8000594: f000 fc9a bl 8000ecc
- 8000598: 4603 mov r3, r0
- 800059a: 2b00 cmp r3, #0
- 800059c: d001 beq.n 80005a2
+ 8000616: f107 0320 add.w r3, r7, #32
+ 800061a: 4618 mov r0, r3
+ 800061c: f000 fcb2 bl 8000f84
+ 8000620: 4603 mov r3, r0
+ 8000622: 2b00 cmp r3, #0
+ 8000624: d001 beq.n 800062a
Error_Handler();
- 800059e: f000 f8c3 bl 8000728
+ 8000626: f000 f8c3 bl 80007b0
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
- 80005a2: 230f movs r3, #15
- 80005a4: 60fb str r3, [r7, #12]
+ 800062a: 230f movs r3, #15
+ 800062c: 60fb str r3, [r7, #12]
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
- 80005a6: 2302 movs r3, #2
- 80005a8: 613b str r3, [r7, #16]
+ 800062e: 2302 movs r3, #2
+ 8000630: 613b str r3, [r7, #16]
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- 80005aa: 2300 movs r3, #0
- 80005ac: 617b str r3, [r7, #20]
+ 8000632: 2300 movs r3, #0
+ 8000634: 617b str r3, [r7, #20]
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
- 80005ae: f44f 5380 mov.w r3, #4096 ; 0x1000
- 80005b2: 61bb str r3, [r7, #24]
+ 8000636: f44f 5380 mov.w r3, #4096 ; 0x1000
+ 800063a: 61bb str r3, [r7, #24]
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
- 80005b4: 2300 movs r3, #0
- 80005b6: 61fb str r3, [r7, #28]
+ 800063c: 2300 movs r3, #0
+ 800063e: 61fb str r3, [r7, #28]
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) {
- 80005b8: f107 030c add.w r3, r7, #12
- 80005bc: 2102 movs r1, #2
- 80005be: 4618 mov r0, r3
- 80005c0: f000 fefc bl 80013bc
- 80005c4: 4603 mov r3, r0
- 80005c6: 2b00 cmp r3, #0
- 80005c8: d001 beq.n 80005ce
+ 8000640: f107 030c add.w r3, r7, #12
+ 8000644: 2102 movs r1, #2
+ 8000646: 4618 mov r0, r3
+ 8000648: f000 ff14 bl 8001474
+ 800064c: 4603 mov r3, r0
+ 800064e: 2b00 cmp r3, #0
+ 8000650: d001 beq.n 8000656
Error_Handler();
- 80005ca: f000 f8ad bl 8000728
+ 8000652: f000 f8ad bl 80007b0
}
}
- 80005ce: bf00 nop
- 80005d0: 3750 adds r7, #80 ; 0x50
- 80005d2: 46bd mov sp, r7
- 80005d4: bd80 pop {r7, pc}
- 80005d6: bf00 nop
- 80005d8: 40023800 .word 0x40023800
- 80005dc: 40007000 .word 0x40007000
+ 8000656: bf00 nop
+ 8000658: 3750 adds r7, #80 ; 0x50
+ 800065a: 46bd mov sp, r7
+ 800065c: bd80 pop {r7, pc}
+ 800065e: bf00 nop
+ 8000660: 40023800 .word 0x40023800
+ 8000664: 40007000 .word 0x40007000
-080005e0 :
+08000668 :
/**
* @brief USART2 Initialization Function
* @param None
* @retval None
*/
static void MX_USART2_UART_Init(void) {
- 80005e0: b580 push {r7, lr}
- 80005e2: af00 add r7, sp, #0
+ 8000668: b580 push {r7, lr}
+ 800066a: 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;
- 80005e4: 4b11 ldr r3, [pc, #68] ; (800062c )
- 80005e6: 4a12 ldr r2, [pc, #72] ; (8000630 )
- 80005e8: 601a str r2, [r3, #0]
+ 800066c: 4b11 ldr r3, [pc, #68] ; (80006b4 )
+ 800066e: 4a12 ldr r2, [pc, #72] ; (80006b8 )
+ 8000670: 601a str r2, [r3, #0]
huart2.Init.BaudRate = 115200;
- 80005ea: 4b10 ldr r3, [pc, #64] ; (800062c )
- 80005ec: f44f 32e1 mov.w r2, #115200 ; 0x1c200
- 80005f0: 605a str r2, [r3, #4]
+ 8000672: 4b10 ldr r3, [pc, #64] ; (80006b4 )
+ 8000674: f44f 32e1 mov.w r2, #115200 ; 0x1c200
+ 8000678: 605a str r2, [r3, #4]
huart2.Init.WordLength = UART_WORDLENGTH_8B;
- 80005f2: 4b0e ldr r3, [pc, #56] ; (800062c )
- 80005f4: 2200 movs r2, #0
- 80005f6: 609a str r2, [r3, #8]
+ 800067a: 4b0e ldr r3, [pc, #56] ; (80006b4 )
+ 800067c: 2200 movs r2, #0
+ 800067e: 609a str r2, [r3, #8]
huart2.Init.StopBits = UART_STOPBITS_1;
- 80005f8: 4b0c ldr r3, [pc, #48] ; (800062c )
- 80005fa: 2200 movs r2, #0
- 80005fc: 60da str r2, [r3, #12]
+ 8000680: 4b0c ldr r3, [pc, #48] ; (80006b4 )
+ 8000682: 2200 movs r2, #0
+ 8000684: 60da str r2, [r3, #12]
huart2.Init.Parity = UART_PARITY_NONE;
- 80005fe: 4b0b ldr r3, [pc, #44] ; (800062c )
- 8000600: 2200 movs r2, #0
- 8000602: 611a str r2, [r3, #16]
+ 8000686: 4b0b ldr r3, [pc, #44] ; (80006b4 )
+ 8000688: 2200 movs r2, #0
+ 800068a: 611a str r2, [r3, #16]
huart2.Init.Mode = UART_MODE_TX_RX;
- 8000604: 4b09 ldr r3, [pc, #36] ; (800062c )
- 8000606: 220c movs r2, #12
- 8000608: 615a str r2, [r3, #20]
+ 800068c: 4b09 ldr r3, [pc, #36] ; (80006b4 )
+ 800068e: 220c movs r2, #12
+ 8000690: 615a str r2, [r3, #20]
huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
- 800060a: 4b08 ldr r3, [pc, #32] ; (800062c )
- 800060c: 2200 movs r2, #0
- 800060e: 619a str r2, [r3, #24]
+ 8000692: 4b08 ldr r3, [pc, #32] ; (80006b4 )
+ 8000694: 2200 movs r2, #0
+ 8000696: 619a str r2, [r3, #24]
huart2.Init.OverSampling = UART_OVERSAMPLING_16;
- 8000610: 4b06 ldr r3, [pc, #24] ; (800062c )
- 8000612: 2200 movs r2, #0
- 8000614: 61da str r2, [r3, #28]
+ 8000698: 4b06 ldr r3, [pc, #24] ; (80006b4 )
+ 800069a: 2200 movs r2, #0
+ 800069c: 61da str r2, [r3, #28]
if (HAL_UART_Init(&huart2) != HAL_OK) {
- 8000616: 4805 ldr r0, [pc, #20] ; (800062c )
- 8000618: f001 f8f0 bl 80017fc
- 800061c: 4603 mov r3, r0
- 800061e: 2b00 cmp r3, #0
- 8000620: d001 beq.n 8000626
+ 800069e: 4805 ldr r0, [pc, #20] ; (80006b4 )
+ 80006a0: f001 f908 bl 80018b4
+ 80006a4: 4603 mov r3, r0
+ 80006a6: 2b00 cmp r3, #0
+ 80006a8: d001 beq.n 80006ae
Error_Handler();
- 8000622: f000 f881 bl 8000728
+ 80006aa: f000 f881 bl 80007b0
}
/* USER CODE BEGIN USART2_Init 2 */
/* USER CODE END USART2_Init 2 */
}
- 8000626: bf00 nop
- 8000628: bd80 pop {r7, pc}
- 800062a: bf00 nop
- 800062c: 20000028 .word 0x20000028
- 8000630: 40004400 .word 0x40004400
+ 80006ae: bf00 nop
+ 80006b0: bd80 pop {r7, pc}
+ 80006b2: bf00 nop
+ 80006b4: 20000028 .word 0x20000028
+ 80006b8: 40004400 .word 0x40004400
-08000634 :
+080006bc :
/**
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void) {
- 8000634: b580 push {r7, lr}
- 8000636: b08a sub sp, #40 ; 0x28
- 8000638: af00 add r7, sp, #0
+ 80006bc: b580 push {r7, lr}
+ 80006be: b08a sub sp, #40 ; 0x28
+ 80006c0: af00 add r7, sp, #0
GPIO_InitTypeDef GPIO_InitStruct = { 0 };
- 800063a: f107 0314 add.w r3, r7, #20
- 800063e: 2200 movs r2, #0
- 8000640: 601a str r2, [r3, #0]
- 8000642: 605a str r2, [r3, #4]
- 8000644: 609a str r2, [r3, #8]
- 8000646: 60da str r2, [r3, #12]
- 8000648: 611a str r2, [r3, #16]
+ 80006c2: f107 0314 add.w r3, r7, #20
+ 80006c6: 2200 movs r2, #0
+ 80006c8: 601a str r2, [r3, #0]
+ 80006ca: 605a str r2, [r3, #4]
+ 80006cc: 609a str r2, [r3, #8]
+ 80006ce: 60da str r2, [r3, #12]
+ 80006d0: 611a str r2, [r3, #16]
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOC_CLK_ENABLE();
- 800064a: 2300 movs r3, #0
- 800064c: 613b str r3, [r7, #16]
- 800064e: 4b33 ldr r3, [pc, #204] ; (800071c )
- 8000650: 6b1b ldr r3, [r3, #48] ; 0x30
- 8000652: 4a32 ldr r2, [pc, #200] ; (800071c )
- 8000654: f043 0304 orr.w r3, r3, #4
- 8000658: 6313 str r3, [r2, #48] ; 0x30
- 800065a: 4b30 ldr r3, [pc, #192] ; (800071c )
- 800065c: 6b1b ldr r3, [r3, #48] ; 0x30
- 800065e: f003 0304 and.w r3, r3, #4
- 8000662: 613b str r3, [r7, #16]
- 8000664: 693b ldr r3, [r7, #16]
+ 80006d2: 2300 movs r3, #0
+ 80006d4: 613b str r3, [r7, #16]
+ 80006d6: 4b33 ldr r3, [pc, #204] ; (80007a4 )
+ 80006d8: 6b1b ldr r3, [r3, #48] ; 0x30
+ 80006da: 4a32 ldr r2, [pc, #200] ; (80007a4 )
+ 80006dc: f043 0304 orr.w r3, r3, #4
+ 80006e0: 6313 str r3, [r2, #48] ; 0x30
+ 80006e2: 4b30 ldr r3, [pc, #192] ; (80007a4 )
+ 80006e4: 6b1b ldr r3, [r3, #48] ; 0x30
+ 80006e6: f003 0304 and.w r3, r3, #4
+ 80006ea: 613b str r3, [r7, #16]
+ 80006ec: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOH_CLK_ENABLE();
- 8000666: 2300 movs r3, #0
- 8000668: 60fb str r3, [r7, #12]
- 800066a: 4b2c ldr r3, [pc, #176] ; (800071c )
- 800066c: 6b1b ldr r3, [r3, #48] ; 0x30
- 800066e: 4a2b ldr r2, [pc, #172] ; (800071c )
- 8000670: f043 0380 orr.w r3, r3, #128 ; 0x80
- 8000674: 6313 str r3, [r2, #48] ; 0x30
- 8000676: 4b29 ldr r3, [pc, #164] ; (800071c )
- 8000678: 6b1b ldr r3, [r3, #48] ; 0x30
- 800067a: f003 0380 and.w r3, r3, #128 ; 0x80
- 800067e: 60fb str r3, [r7, #12]
- 8000680: 68fb ldr r3, [r7, #12]
+ 80006ee: 2300 movs r3, #0
+ 80006f0: 60fb str r3, [r7, #12]
+ 80006f2: 4b2c ldr r3, [pc, #176] ; (80007a4 )
+ 80006f4: 6b1b ldr r3, [r3, #48] ; 0x30
+ 80006f6: 4a2b ldr r2, [pc, #172] ; (80007a4 )
+ 80006f8: f043 0380 orr.w r3, r3, #128 ; 0x80
+ 80006fc: 6313 str r3, [r2, #48] ; 0x30
+ 80006fe: 4b29 ldr r3, [pc, #164] ; (80007a4 )
+ 8000700: 6b1b ldr r3, [r3, #48] ; 0x30
+ 8000702: f003 0380 and.w r3, r3, #128 ; 0x80
+ 8000706: 60fb str r3, [r7, #12]
+ 8000708: 68fb ldr r3, [r7, #12]
__HAL_RCC_GPIOA_CLK_ENABLE();
- 8000682: 2300 movs r3, #0
- 8000684: 60bb str r3, [r7, #8]
- 8000686: 4b25 ldr r3, [pc, #148] ; (800071c )
- 8000688: 6b1b ldr r3, [r3, #48] ; 0x30
- 800068a: 4a24 ldr r2, [pc, #144] ; (800071c )
- 800068c: f043 0301 orr.w r3, r3, #1
- 8000690: 6313 str r3, [r2, #48] ; 0x30
- 8000692: 4b22 ldr r3, [pc, #136] ; (800071c )
- 8000694: 6b1b ldr r3, [r3, #48] ; 0x30
- 8000696: f003 0301 and.w r3, r3, #1
- 800069a: 60bb str r3, [r7, #8]
- 800069c: 68bb ldr r3, [r7, #8]
+ 800070a: 2300 movs r3, #0
+ 800070c: 60bb str r3, [r7, #8]
+ 800070e: 4b25 ldr r3, [pc, #148] ; (80007a4 )
+ 8000710: 6b1b ldr r3, [r3, #48] ; 0x30
+ 8000712: 4a24 ldr r2, [pc, #144] ; (80007a4 )
+ 8000714: f043 0301 orr.w r3, r3, #1
+ 8000718: 6313 str r3, [r2, #48] ; 0x30
+ 800071a: 4b22 ldr r3, [pc, #136] ; (80007a4 )
+ 800071c: 6b1b ldr r3, [r3, #48] ; 0x30
+ 800071e: f003 0301 and.w r3, r3, #1
+ 8000722: 60bb str r3, [r7, #8]
+ 8000724: 68bb ldr r3, [r7, #8]
__HAL_RCC_GPIOB_CLK_ENABLE();
- 800069e: 2300 movs r3, #0
- 80006a0: 607b str r3, [r7, #4]
- 80006a2: 4b1e ldr r3, [pc, #120] ; (800071c )
- 80006a4: 6b1b ldr r3, [r3, #48] ; 0x30
- 80006a6: 4a1d ldr r2, [pc, #116] ; (800071c )
- 80006a8: f043 0302 orr.w r3, r3, #2
- 80006ac: 6313 str r3, [r2, #48] ; 0x30
- 80006ae: 4b1b ldr r3, [pc, #108] ; (800071c )
- 80006b0: 6b1b ldr r3, [r3, #48] ; 0x30
- 80006b2: f003 0302 and.w r3, r3, #2
- 80006b6: 607b str r3, [r7, #4]
- 80006b8: 687b ldr r3, [r7, #4]
+ 8000726: 2300 movs r3, #0
+ 8000728: 607b str r3, [r7, #4]
+ 800072a: 4b1e ldr r3, [pc, #120] ; (80007a4 )
+ 800072c: 6b1b ldr r3, [r3, #48] ; 0x30
+ 800072e: 4a1d ldr r2, [pc, #116] ; (80007a4 )
+ 8000730: f043 0302 orr.w r3, r3, #2
+ 8000734: 6313 str r3, [r2, #48] ; 0x30
+ 8000736: 4b1b ldr r3, [pc, #108] ; (80007a4 )
+ 8000738: 6b1b ldr r3, [r3, #48] ; 0x30
+ 800073a: f003 0302 and.w r3, r3, #2
+ 800073e: 607b str r3, [r7, #4]
+ 8000740: 687b ldr r3, [r7, #4]
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_RESET);
- 80006ba: 2200 movs r2, #0
- 80006bc: 2120 movs r1, #32
- 80006be: 4818 ldr r0, [pc, #96] ; (8000720 )
- 80006c0: f000 fbea bl 8000e98
+ 8000742: 2200 movs r2, #0
+ 8000744: 2120 movs r1, #32
+ 8000746: 4818 ldr r0, [pc, #96] ; (80007a8 )
+ 8000748: f000 fc02 bl 8000f50
/*Configure GPIO pin : B1_Pin */
GPIO_InitStruct.Pin = B1_Pin;
- 80006c4: f44f 5300 mov.w r3, #8192 ; 0x2000
- 80006c8: 617b str r3, [r7, #20]
+ 800074c: f44f 5300 mov.w r3, #8192 ; 0x2000
+ 8000750: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
- 80006ca: f44f 1304 mov.w r3, #2162688 ; 0x210000
- 80006ce: 61bb str r3, [r7, #24]
+ 8000752: f44f 1304 mov.w r3, #2162688 ; 0x210000
+ 8000756: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
- 80006d0: 2300 movs r3, #0
- 80006d2: 61fb str r3, [r7, #28]
+ 8000758: 2300 movs r3, #0
+ 800075a: 61fb str r3, [r7, #28]
HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct);
- 80006d4: f107 0314 add.w r3, r7, #20
- 80006d8: 4619 mov r1, r3
- 80006da: 4812 ldr r0, [pc, #72] ; (8000724 )
- 80006dc: f000 fa58 bl 8000b90
+ 800075c: f107 0314 add.w r3, r7, #20
+ 8000760: 4619 mov r1, r3
+ 8000762: 4812 ldr r0, [pc, #72] ; (80007ac )
+ 8000764: f000 fa58 bl 8000c18
/*Configure GPIO pin : LD2_Pin */
GPIO_InitStruct.Pin = LD2_Pin;
- 80006e0: 2320 movs r3, #32
- 80006e2: 617b str r3, [r7, #20]
+ 8000768: 2320 movs r3, #32
+ 800076a: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
- 80006e4: 2301 movs r3, #1
- 80006e6: 61bb str r3, [r7, #24]
+ 800076c: 2301 movs r3, #1
+ 800076e: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
- 80006e8: 2300 movs r3, #0
- 80006ea: 61fb str r3, [r7, #28]
+ 8000770: 2300 movs r3, #0
+ 8000772: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
- 80006ec: 2300 movs r3, #0
- 80006ee: 623b str r3, [r7, #32]
+ 8000774: 2300 movs r3, #0
+ 8000776: 623b str r3, [r7, #32]
HAL_GPIO_Init(LD2_GPIO_Port, &GPIO_InitStruct);
- 80006f0: f107 0314 add.w r3, r7, #20
- 80006f4: 4619 mov r1, r3
- 80006f6: 480a ldr r0, [pc, #40] ; (8000720 )
- 80006f8: f000 fa4a bl 8000b90
+ 8000778: f107 0314 add.w r3, r7, #20
+ 800077c: 4619 mov r1, r3
+ 800077e: 480a ldr r0, [pc, #40] ; (80007a8 )
+ 8000780: f000 fa4a bl 8000c18
/*Configure GPIO pin : Door_Sensor_Pin */
GPIO_InitStruct.Pin = Door_Sensor_Pin;
- 80006fc: 2380 movs r3, #128 ; 0x80
- 80006fe: 617b str r3, [r7, #20]
+ 8000784: 2380 movs r3, #128 ; 0x80
+ 8000786: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
- 8000700: 2300 movs r3, #0
- 8000702: 61bb str r3, [r7, #24]
+ 8000788: 2300 movs r3, #0
+ 800078a: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_PULLUP;
- 8000704: 2301 movs r3, #1
- 8000706: 61fb str r3, [r7, #28]
+ 800078c: 2301 movs r3, #1
+ 800078e: 61fb str r3, [r7, #28]
HAL_GPIO_Init(Door_Sensor_GPIO_Port, &GPIO_InitStruct);
- 8000708: f107 0314 add.w r3, r7, #20
- 800070c: 4619 mov r1, r3
- 800070e: 4804 ldr r0, [pc, #16] ; (8000720 )
- 8000710: f000 fa3e bl 8000b90
+ 8000790: f107 0314 add.w r3, r7, #20
+ 8000794: 4619 mov r1, r3
+ 8000796: 4804 ldr r0, [pc, #16] ; (80007a8 )
+ 8000798: f000 fa3e bl 8000c18
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
- 8000714: bf00 nop
- 8000716: 3728 adds r7, #40 ; 0x28
- 8000718: 46bd mov sp, r7
- 800071a: bd80 pop {r7, pc}
- 800071c: 40023800 .word 0x40023800
- 8000720: 40020000 .word 0x40020000
- 8000724: 40020800 .word 0x40020800
+ 800079c: bf00 nop
+ 800079e: 3728 adds r7, #40 ; 0x28
+ 80007a0: 46bd mov sp, r7
+ 80007a2: bd80 pop {r7, pc}
+ 80007a4: 40023800 .word 0x40023800
+ 80007a8: 40020000 .word 0x40020000
+ 80007ac: 40020800 .word 0x40020800
-08000728 :
+080007b0 :
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void) {
- 8000728: b480 push {r7}
- 800072a: af00 add r7, sp, #0
+ 80007b0: b480 push {r7}
+ 80007b2: 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");
- 800072c: b672 cpsid i
+ 80007b4: b672 cpsid i
}
- 800072e: bf00 nop
+ 80007b6: 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) {
- 8000730: e7fe b.n 8000730
+ 80007b8: e7fe b.n 80007b8
...
-08000734 :
+080007bc :
/* USER CODE END 0 */
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
{
- 8000734: b580 push {r7, lr}
- 8000736: b082 sub sp, #8
- 8000738: af00 add r7, sp, #0
+ 80007bc: b580 push {r7, lr}
+ 80007be: b082 sub sp, #8
+ 80007c0: af00 add r7, sp, #0
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
__HAL_RCC_SYSCFG_CLK_ENABLE();
- 800073a: 2300 movs r3, #0
- 800073c: 607b str r3, [r7, #4]
- 800073e: 4b10 ldr r3, [pc, #64] ; (8000780 )
- 8000740: 6c5b ldr r3, [r3, #68] ; 0x44
- 8000742: 4a0f ldr r2, [pc, #60] ; (8000780 )
- 8000744: f443 4380 orr.w r3, r3, #16384 ; 0x4000
- 8000748: 6453 str r3, [r2, #68] ; 0x44
- 800074a: 4b0d ldr r3, [pc, #52] ; (8000780 )
- 800074c: 6c5b ldr r3, [r3, #68] ; 0x44
- 800074e: f403 4380 and.w r3, r3, #16384 ; 0x4000
- 8000752: 607b str r3, [r7, #4]
- 8000754: 687b ldr r3, [r7, #4]
+ 80007c2: 2300 movs r3, #0
+ 80007c4: 607b str r3, [r7, #4]
+ 80007c6: 4b10 ldr r3, [pc, #64] ; (8000808 )
+ 80007c8: 6c5b ldr r3, [r3, #68] ; 0x44
+ 80007ca: 4a0f ldr r2, [pc, #60] ; (8000808 )
+ 80007cc: f443 4380 orr.w r3, r3, #16384 ; 0x4000
+ 80007d0: 6453 str r3, [r2, #68] ; 0x44
+ 80007d2: 4b0d ldr r3, [pc, #52] ; (8000808 )
+ 80007d4: 6c5b ldr r3, [r3, #68] ; 0x44
+ 80007d6: f403 4380 and.w r3, r3, #16384 ; 0x4000
+ 80007da: 607b str r3, [r7, #4]
+ 80007dc: 687b ldr r3, [r7, #4]
__HAL_RCC_PWR_CLK_ENABLE();
- 8000756: 2300 movs r3, #0
- 8000758: 603b str r3, [r7, #0]
- 800075a: 4b09 ldr r3, [pc, #36] ; (8000780 )
- 800075c: 6c1b ldr r3, [r3, #64] ; 0x40
- 800075e: 4a08 ldr r2, [pc, #32] ; (8000780 )
- 8000760: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
- 8000764: 6413 str r3, [r2, #64] ; 0x40
- 8000766: 4b06 ldr r3, [pc, #24] ; (8000780 )
- 8000768: 6c1b ldr r3, [r3, #64] ; 0x40
- 800076a: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
- 800076e: 603b str r3, [r7, #0]
- 8000770: 683b ldr r3, [r7, #0]
+ 80007de: 2300 movs r3, #0
+ 80007e0: 603b str r3, [r7, #0]
+ 80007e2: 4b09 ldr r3, [pc, #36] ; (8000808 )
+ 80007e4: 6c1b ldr r3, [r3, #64] ; 0x40
+ 80007e6: 4a08 ldr r2, [pc, #32] ; (8000808 )
+ 80007e8: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
+ 80007ec: 6413 str r3, [r2, #64] ; 0x40
+ 80007ee: 4b06 ldr r3, [pc, #24] ; (8000808 )
+ 80007f0: 6c1b ldr r3, [r3, #64] ; 0x40
+ 80007f2: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
+ 80007f6: 603b str r3, [r7, #0]
+ 80007f8: 683b ldr r3, [r7, #0]
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_0);
- 8000772: 2007 movs r0, #7
- 8000774: f000 f9d8 bl 8000b28
+ 80007fa: 2007 movs r0, #7
+ 80007fc: f000 f9d8 bl 8000bb0
/* System interrupt init*/
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
}
- 8000778: bf00 nop
- 800077a: 3708 adds r7, #8
- 800077c: 46bd mov sp, r7
- 800077e: bd80 pop {r7, pc}
- 8000780: 40023800 .word 0x40023800
+ 8000800: bf00 nop
+ 8000802: 3708 adds r7, #8
+ 8000804: 46bd mov sp, r7
+ 8000806: bd80 pop {r7, pc}
+ 8000808: 40023800 .word 0x40023800
-08000784 :
+0800080c :
* This function configures the hardware resources used in this example
* @param huart: UART handle pointer
* @retval None
*/
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
{
- 8000784: b580 push {r7, lr}
- 8000786: b08a sub sp, #40 ; 0x28
- 8000788: af00 add r7, sp, #0
- 800078a: 6078 str r0, [r7, #4]
+ 800080c: b580 push {r7, lr}
+ 800080e: b08a sub sp, #40 ; 0x28
+ 8000810: af00 add r7, sp, #0
+ 8000812: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
- 800078c: f107 0314 add.w r3, r7, #20
- 8000790: 2200 movs r2, #0
- 8000792: 601a str r2, [r3, #0]
- 8000794: 605a str r2, [r3, #4]
- 8000796: 609a str r2, [r3, #8]
- 8000798: 60da str r2, [r3, #12]
- 800079a: 611a str r2, [r3, #16]
+ 8000814: f107 0314 add.w r3, r7, #20
+ 8000818: 2200 movs r2, #0
+ 800081a: 601a str r2, [r3, #0]
+ 800081c: 605a str r2, [r3, #4]
+ 800081e: 609a str r2, [r3, #8]
+ 8000820: 60da str r2, [r3, #12]
+ 8000822: 611a str r2, [r3, #16]
if(huart->Instance==USART2)
- 800079c: 687b ldr r3, [r7, #4]
- 800079e: 681b ldr r3, [r3, #0]
- 80007a0: 4a19 ldr r2, [pc, #100] ; (8000808 )
- 80007a2: 4293 cmp r3, r2
- 80007a4: d12b bne.n 80007fe
+ 8000824: 687b ldr r3, [r7, #4]
+ 8000826: 681b ldr r3, [r3, #0]
+ 8000828: 4a19 ldr r2, [pc, #100] ; (8000890 )
+ 800082a: 4293 cmp r3, r2
+ 800082c: d12b bne.n 8000886
{
/* USER CODE BEGIN USART2_MspInit 0 */
/* USER CODE END USART2_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_USART2_CLK_ENABLE();
- 80007a6: 2300 movs r3, #0
- 80007a8: 613b str r3, [r7, #16]
- 80007aa: 4b18 ldr r3, [pc, #96] ; (800080c )
- 80007ac: 6c1b ldr r3, [r3, #64] ; 0x40
- 80007ae: 4a17 ldr r2, [pc, #92] ; (800080c )
- 80007b0: f443 3300 orr.w r3, r3, #131072 ; 0x20000
- 80007b4: 6413 str r3, [r2, #64] ; 0x40
- 80007b6: 4b15 ldr r3, [pc, #84] ; (800080c )
- 80007b8: 6c1b ldr r3, [r3, #64] ; 0x40
- 80007ba: f403 3300 and.w r3, r3, #131072 ; 0x20000
- 80007be: 613b str r3, [r7, #16]
- 80007c0: 693b ldr r3, [r7, #16]
+ 800082e: 2300 movs r3, #0
+ 8000830: 613b str r3, [r7, #16]
+ 8000832: 4b18 ldr r3, [pc, #96] ; (8000894 )
+ 8000834: 6c1b ldr r3, [r3, #64] ; 0x40
+ 8000836: 4a17 ldr r2, [pc, #92] ; (8000894 )
+ 8000838: f443 3300 orr.w r3, r3, #131072 ; 0x20000
+ 800083c: 6413 str r3, [r2, #64] ; 0x40
+ 800083e: 4b15 ldr r3, [pc, #84] ; (8000894 )
+ 8000840: 6c1b ldr r3, [r3, #64] ; 0x40
+ 8000842: f403 3300 and.w r3, r3, #131072 ; 0x20000
+ 8000846: 613b str r3, [r7, #16]
+ 8000848: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOA_CLK_ENABLE();
- 80007c2: 2300 movs r3, #0
- 80007c4: 60fb str r3, [r7, #12]
- 80007c6: 4b11 ldr r3, [pc, #68] ; (800080c )
- 80007c8: 6b1b ldr r3, [r3, #48] ; 0x30
- 80007ca: 4a10 ldr r2, [pc, #64] ; (800080c )
- 80007cc: f043 0301 orr.w r3, r3, #1
- 80007d0: 6313 str r3, [r2, #48] ; 0x30
- 80007d2: 4b0e ldr r3, [pc, #56] ; (800080c )
- 80007d4: 6b1b ldr r3, [r3, #48] ; 0x30
- 80007d6: f003 0301 and.w r3, r3, #1
- 80007da: 60fb str r3, [r7, #12]
- 80007dc: 68fb ldr r3, [r7, #12]
+ 800084a: 2300 movs r3, #0
+ 800084c: 60fb str r3, [r7, #12]
+ 800084e: 4b11 ldr r3, [pc, #68] ; (8000894 )
+ 8000850: 6b1b ldr r3, [r3, #48] ; 0x30
+ 8000852: 4a10 ldr r2, [pc, #64] ; (8000894 )
+ 8000854: f043 0301 orr.w r3, r3, #1
+ 8000858: 6313 str r3, [r2, #48] ; 0x30
+ 800085a: 4b0e ldr r3, [pc, #56] ; (8000894 )
+ 800085c: 6b1b ldr r3, [r3, #48] ; 0x30
+ 800085e: f003 0301 and.w r3, r3, #1
+ 8000862: 60fb str r3, [r7, #12]
+ 8000864: 68fb ldr r3, [r7, #12]
/**USART2 GPIO Configuration
PA2 ------> USART2_TX
PA3 ------> USART2_RX
*/
GPIO_InitStruct.Pin = USART_TX_Pin|USART_RX_Pin;
- 80007de: 230c movs r3, #12
- 80007e0: 617b str r3, [r7, #20]
+ 8000866: 230c movs r3, #12
+ 8000868: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
- 80007e2: 2302 movs r3, #2
- 80007e4: 61bb str r3, [r7, #24]
+ 800086a: 2302 movs r3, #2
+ 800086c: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
- 80007e6: 2300 movs r3, #0
- 80007e8: 61fb str r3, [r7, #28]
+ 800086e: 2300 movs r3, #0
+ 8000870: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
- 80007ea: 2303 movs r3, #3
- 80007ec: 623b str r3, [r7, #32]
+ 8000872: 2303 movs r3, #3
+ 8000874: 623b str r3, [r7, #32]
GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
- 80007ee: 2307 movs r3, #7
- 80007f0: 627b str r3, [r7, #36] ; 0x24
+ 8000876: 2307 movs r3, #7
+ 8000878: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
- 80007f2: f107 0314 add.w r3, r7, #20
- 80007f6: 4619 mov r1, r3
- 80007f8: 4805 ldr r0, [pc, #20] ; (8000810 )
- 80007fa: f000 f9c9 bl 8000b90
+ 800087a: f107 0314 add.w r3, r7, #20
+ 800087e: 4619 mov r1, r3
+ 8000880: 4805 ldr r0, [pc, #20] ; (8000898 )
+ 8000882: f000 f9c9 bl 8000c18
/* USER CODE BEGIN USART2_MspInit 1 */
/* USER CODE END USART2_MspInit 1 */
}
}
- 80007fe: bf00 nop
- 8000800: 3728 adds r7, #40 ; 0x28
- 8000802: 46bd mov sp, r7
- 8000804: bd80 pop {r7, pc}
- 8000806: bf00 nop
- 8000808: 40004400 .word 0x40004400
- 800080c: 40023800 .word 0x40023800
- 8000810: 40020000 .word 0x40020000
+ 8000886: bf00 nop
+ 8000888: 3728 adds r7, #40 ; 0x28
+ 800088a: 46bd mov sp, r7
+ 800088c: bd80 pop {r7, pc}
+ 800088e: bf00 nop
+ 8000890: 40004400 .word 0x40004400
+ 8000894: 40023800 .word 0x40023800
+ 8000898: 40020000 .word 0x40020000
-08000814 :
+0800089c :
/******************************************************************************/
/**
* @brief This function handles Non maskable interrupt.
*/
void NMI_Handler(void)
{
- 8000814: b480 push {r7}
- 8000816: af00 add r7, sp, #0
+ 800089c: b480 push {r7}
+ 800089e: 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)
- 8000818: e7fe b.n 8000818
+ 80008a0: e7fe b.n 80008a0
-0800081a :
+080008a2 :
/**
* @brief This function handles Hard fault interrupt.
*/
void HardFault_Handler(void)
{
- 800081a: b480 push {r7}
- 800081c: af00 add r7, sp, #0
+ 80008a2: b480 push {r7}
+ 80008a4: af00 add r7, sp, #0
/* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */
while (1)
- 800081e: e7fe b.n 800081e
+ 80008a6: e7fe b.n 80008a6
-08000820 :
+080008a8 :
/**
* @brief This function handles Memory management fault.
*/
void MemManage_Handler(void)
{
- 8000820: b480 push {r7}
- 8000822: af00 add r7, sp, #0
+ 80008a8: b480 push {r7}
+ 80008aa: af00 add r7, sp, #0
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
/* USER CODE END MemoryManagement_IRQn 0 */
while (1)
- 8000824: e7fe b.n 8000824
+ 80008ac: e7fe b.n 80008ac
-08000826 :
+080008ae :
/**
* @brief This function handles Pre-fetch fault, memory access fault.
*/
void BusFault_Handler(void)
{
- 8000826: b480 push {r7}
- 8000828: af00 add r7, sp, #0
+ 80008ae: b480 push {r7}
+ 80008b0: af00 add r7, sp, #0
/* USER CODE BEGIN BusFault_IRQn 0 */
/* USER CODE END BusFault_IRQn 0 */
while (1)
- 800082a: e7fe b.n 800082a
+ 80008b2: e7fe b.n 80008b2
-0800082c :
+080008b4 :
/**
* @brief This function handles Undefined instruction or illegal state.
*/
void UsageFault_Handler(void)
{
- 800082c: b480 push {r7}
- 800082e: af00 add r7, sp, #0
+ 80008b4: b480 push {r7}
+ 80008b6: af00 add r7, sp, #0
/* USER CODE BEGIN UsageFault_IRQn 0 */
/* USER CODE END UsageFault_IRQn 0 */
while (1)
- 8000830: e7fe b.n 8000830
+ 80008b8: e7fe b.n 80008b8
-08000832 :
+080008ba :
/**
* @brief This function handles System service call via SWI instruction.
*/
void SVC_Handler(void)
{
- 8000832: b480 push {r7}
- 8000834: af00 add r7, sp, #0
+ 80008ba: b480 push {r7}
+ 80008bc: af00 add r7, sp, #0
/* USER CODE END SVCall_IRQn 0 */
/* USER CODE BEGIN SVCall_IRQn 1 */
/* USER CODE END SVCall_IRQn 1 */
}
- 8000836: bf00 nop
- 8000838: 46bd mov sp, r7
- 800083a: f85d 7b04 ldr.w r7, [sp], #4
- 800083e: 4770 bx lr
+ 80008be: bf00 nop
+ 80008c0: 46bd mov sp, r7
+ 80008c2: f85d 7b04 ldr.w r7, [sp], #4
+ 80008c6: 4770 bx lr
-08000840 :
+080008c8 :
/**
* @brief This function handles Debug monitor.
*/
void DebugMon_Handler(void)
{
- 8000840: b480 push {r7}
- 8000842: af00 add r7, sp, #0
+ 80008c8: b480 push {r7}
+ 80008ca: af00 add r7, sp, #0
/* USER CODE END DebugMonitor_IRQn 0 */
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
/* USER CODE END DebugMonitor_IRQn 1 */
}
- 8000844: bf00 nop
- 8000846: 46bd mov sp, r7
- 8000848: f85d 7b04 ldr.w r7, [sp], #4
- 800084c: 4770 bx lr
+ 80008cc: bf00 nop
+ 80008ce: 46bd mov sp, r7
+ 80008d0: f85d 7b04 ldr.w r7, [sp], #4
+ 80008d4: 4770 bx lr
-0800084e :
+080008d6 :
/**
* @brief This function handles Pendable request for system service.
*/
void PendSV_Handler(void)
{
- 800084e: b480 push {r7}
- 8000850: af00 add r7, sp, #0
+ 80008d6: b480 push {r7}
+ 80008d8: af00 add r7, sp, #0
/* USER CODE END PendSV_IRQn 0 */
/* USER CODE BEGIN PendSV_IRQn 1 */
/* USER CODE END PendSV_IRQn 1 */
}
- 8000852: bf00 nop
- 8000854: 46bd mov sp, r7
- 8000856: f85d 7b04 ldr.w r7, [sp], #4
- 800085a: 4770 bx lr
+ 80008da: bf00 nop
+ 80008dc: 46bd mov sp, r7
+ 80008de: f85d 7b04 ldr.w r7, [sp], #4
+ 80008e2: 4770 bx lr
-0800085c :
+080008e4 :
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
- 800085c: b580 push {r7, lr}
- 800085e: af00 add r7, sp, #0
+ 80008e4: b580 push {r7, lr}
+ 80008e6: af00 add r7, sp, #0
/* USER CODE BEGIN SysTick_IRQn 0 */
/* USER CODE END SysTick_IRQn 0 */
HAL_IncTick();
- 8000860: f000 f890 bl 8000984
+ 80008e8: f000 f890 bl 8000a0c
/* USER CODE BEGIN SysTick_IRQn 1 */
/* USER CODE END SysTick_IRQn 1 */
}
- 8000864: bf00 nop
- 8000866: bd80 pop {r7, pc}
+ 80008ec: bf00 nop
+ 80008ee: bd80 pop {r7, pc}
-08000868 :
+080008f0 :
* configuration.
* @param None
* @retval None
*/
void SystemInit(void)
{
- 8000868: b480 push {r7}
- 800086a: af00 add r7, sp, #0
+ 80008f0: b480 push {r7}
+ 80008f2: af00 add r7, sp, #0
/* FPU settings ------------------------------------------------------------*/
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
- 800086c: 4b06 ldr r3, [pc, #24] ; (8000888 )
- 800086e: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
- 8000872: 4a05 ldr r2, [pc, #20] ; (8000888 )
- 8000874: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000
- 8000878: f8c2 3088 str.w r3, [r2, #136] ; 0x88
+ 80008f4: 4b06 ldr r3, [pc, #24] ; (8000910 )
+ 80008f6: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
+ 80008fa: 4a05 ldr r2, [pc, #20] ; (8000910 )
+ 80008fc: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000
+ 8000900: f8c2 3088 str.w r3, [r2, #136] ; 0x88
/* 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 */
}
- 800087c: bf00 nop
- 800087e: 46bd mov sp, r7
- 8000880: f85d 7b04 ldr.w r7, [sp], #4
- 8000884: 4770 bx lr
- 8000886: bf00 nop
- 8000888: e000ed00 .word 0xe000ed00
+ 8000904: bf00 nop
+ 8000906: 46bd mov sp, r7
+ 8000908: f85d 7b04 ldr.w r7, [sp], #4
+ 800090c: 4770 bx lr
+ 800090e: bf00 nop
+ 8000910: e000ed00 .word 0xe000ed00
-0800088c :
+08000914 :
.section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
ldr sp, =_estack /* set stack pointer */
- 800088c: f8df d034 ldr.w sp, [pc, #52] ; 80008c4
+ 8000914: f8df d034 ldr.w sp, [pc, #52] ; 800094c
/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
- 8000890: 480d ldr r0, [pc, #52] ; (80008c8 )
+ 8000918: 480d ldr r0, [pc, #52] ; (8000950 )
ldr r1, =_edata
- 8000892: 490e ldr r1, [pc, #56] ; (80008cc )
+ 800091a: 490e ldr r1, [pc, #56] ; (8000954 )
ldr r2, =_sidata
- 8000894: 4a0e ldr r2, [pc, #56] ; (80008d0 )
+ 800091c: 4a0e ldr r2, [pc, #56] ; (8000958 )
movs r3, #0
- 8000896: 2300 movs r3, #0
+ 800091e: 2300 movs r3, #0
b LoopCopyDataInit
- 8000898: e002 b.n 80008a0
+ 8000920: e002 b.n 8000928
-0800089a :
+08000922 :
CopyDataInit:
ldr r4, [r2, r3]
- 800089a: 58d4 ldr r4, [r2, r3]
+ 8000922: 58d4 ldr r4, [r2, r3]
str r4, [r0, r3]
- 800089c: 50c4 str r4, [r0, r3]
+ 8000924: 50c4 str r4, [r0, r3]
adds r3, r3, #4
- 800089e: 3304 adds r3, #4
+ 8000926: 3304 adds r3, #4
-080008a0 :
+08000928 :
LoopCopyDataInit:
adds r4, r0, r3
- 80008a0: 18c4 adds r4, r0, r3
+ 8000928: 18c4 adds r4, r0, r3
cmp r4, r1
- 80008a2: 428c cmp r4, r1
+ 800092a: 428c cmp r4, r1
bcc CopyDataInit
- 80008a4: d3f9 bcc.n 800089a
+ 800092c: d3f9 bcc.n 8000922
/* Zero fill the bss segment. */
ldr r2, =_sbss
- 80008a6: 4a0b ldr r2, [pc, #44] ; (80008d4 )
+ 800092e: 4a0b ldr r2, [pc, #44] ; (800095c )
ldr r4, =_ebss
- 80008a8: 4c0b ldr r4, [pc, #44] ; (80008d8 )
+ 8000930: 4c0b ldr r4, [pc, #44] ; (8000960 )
movs r3, #0
- 80008aa: 2300 movs r3, #0
+ 8000932: 2300 movs r3, #0
b LoopFillZerobss
- 80008ac: e001 b.n 80008b2
+ 8000934: e001 b.n 800093a
-080008ae :
+08000936 :
FillZerobss:
str r3, [r2]
- 80008ae: 6013 str r3, [r2, #0]
+ 8000936: 6013 str r3, [r2, #0]
adds r2, r2, #4
- 80008b0: 3204 adds r2, #4
+ 8000938: 3204 adds r2, #4
-080008b2 :
+0800093a :
LoopFillZerobss:
cmp r2, r4
- 80008b2: 42a2 cmp r2, r4
+ 800093a: 42a2 cmp r2, r4
bcc FillZerobss
- 80008b4: d3fb bcc.n 80008ae
+ 800093c: d3fb bcc.n 8000936
/* Call the clock system initialization function.*/
bl SystemInit
- 80008b6: f7ff ffd7 bl 8000868
+ 800093e: f7ff ffd7 bl 80008f0