diff --git a/access_control_python/__pycache__/access_control.cpython-311.pyc b/access_control_python/__pycache__/access_control.cpython-311.pyc
index e98237c..b0c12f7 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 87ae367..06e2421 100644
--- a/access_control_python/access_control.py
+++ b/access_control_python/access_control.py
@@ -6,11 +6,13 @@ class access_control:
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()
def read_serial(self):
while True:
- if self.serial_adapter.in_waiting:
- data = self.serial_adapter.read(1)
+ 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)
def light_on(self):
@@ -25,4 +27,8 @@ class access_control:
packet.append(0x00)
packet.append(0xFF)
self.serial_adapter.write(packet)
-
\ No newline at end of file
+ def request_door_state(self):
+ packet = bytearray()
+ packet.append(0x01)
+ packet.append(0xFF)
+ self.serial_adapter.write(packet)
\ No newline at end of file
diff --git a/access_control_python/main.py b/access_control_python/main.py
index 2a5ab37..3a67ecf 100644
--- a/access_control_python/main.py
+++ b/access_control_python/main.py
@@ -2,8 +2,9 @@ from access_control import access_control
import time
stm32 = access_control("COM7")
+time.sleep(1)
while True:
- stm32.light_on()
- time.sleep(1)
- stm32.light_off()
- time.sleep(1)
\ No newline at end of file
+ stm32.request_door_state()
+ kkc =stm32.serial_adapter.read(2)
+ print(kkc)
+ time.sleep(0.5)
\ No newline at end of file
diff --git a/access_control_stm32/.cproject b/access_control_stm32/.cproject
index c69e6a6..08b68cc 100644
--- a/access_control_stm32/.cproject
+++ b/access_control_stm32/.cproject
@@ -104,7 +104,7 @@
-
+
@@ -173,4 +173,5 @@
+
\ No newline at end of file
diff --git a/access_control_stm32/.mxproject b/access_control_stm32/.mxproject
index 6e0acf8..6d2eac7 100644
--- a/access_control_stm32/.mxproject
+++ b/access_control_stm32/.mxproject
@@ -1,3 +1,11 @@
+[PreviousLibFiles]
+LibFiles=Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_bus.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_system.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_utils.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dmamux.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_exti.h;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_bus.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_system.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_utils.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dmamux.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_exti.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f411xe.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\system_stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armclang.h;Drivers\CMSIS\Include\cmsis_compiler.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\cmsis_iccarm.h;Drivers\CMSIS\Include\cmsis_version.h;Drivers\CMSIS\Include\core_armv8mbl.h;Drivers\CMSIS\Include\core_armv8mml.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm1.h;Drivers\CMSIS\Include\core_cm23.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm33.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;Drivers\CMSIS\Include\mpu_armv7.h;Drivers\CMSIS\Include\mpu_armv8.h;Drivers\CMSIS\Include\tz_context.h;
+
+[PreviousUsedCubeIDEFiles]
+SourceFiles=Core\Src\main.c;Core\Src\stm32f4xx_it.c;Core\Src\stm32f4xx_hal_msp.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Core\Src\system_stm32f4xx.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Core\Src\system_stm32f4xx.c;;;
+HeaderPath=Drivers\STM32F4xx_HAL_Driver\Inc;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy;Drivers\CMSIS\Device\ST\STM32F4xx\Include;Drivers\CMSIS\Include;Core\Inc;
+CDefines=USE_HAL_DRIVER;STM32F411xE;USE_HAL_DRIVER;USE_HAL_DRIVER;
+
[PreviousGenFiles]
AdvancedFolderStructure=true
HeaderFileListSize=3
@@ -15,11 +23,3 @@ SourceFolderListSize=1
SourcePath#0=..\Core\Src
SourceFiles=;
-[PreviousLibFiles]
-LibFiles=Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_bus.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_system.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_utils.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dmamux.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_exti.h;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_bus.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_system.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_utils.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dmamux.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_exti.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f411xe.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\system_stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armclang.h;Drivers\CMSIS\Include\cmsis_compiler.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\cmsis_iccarm.h;Drivers\CMSIS\Include\cmsis_version.h;Drivers\CMSIS\Include\core_armv8mbl.h;Drivers\CMSIS\Include\core_armv8mml.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm1.h;Drivers\CMSIS\Include\core_cm23.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm33.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;Drivers\CMSIS\Include\mpu_armv7.h;Drivers\CMSIS\Include\mpu_armv8.h;Drivers\CMSIS\Include\tz_context.h;
-
-[PreviousUsedCubeIDEFiles]
-SourceFiles=Core\Src\main.c;Core\Src\stm32f4xx_it.c;Core\Src\stm32f4xx_hal_msp.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Core\Src\system_stm32f4xx.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Core\Src\system_stm32f4xx.c;;;
-HeaderPath=Drivers\STM32F4xx_HAL_Driver\Inc;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy;Drivers\CMSIS\Device\ST\STM32F4xx\Include;Drivers\CMSIS\Include;Core\Inc;
-CDefines=USE_HAL_DRIVER;STM32F411xE;USE_HAL_DRIVER;USE_HAL_DRIVER;
-
diff --git a/access_control_stm32/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs b/access_control_stm32/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs
new file mode 100644
index 0000000..98a69fc
--- /dev/null
+++ b/access_control_stm32/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+sfrviewstate={"fFavorites"\:{"fLists"\:{}},"fProperties"\:{"fNodeProperties"\:{}}}
diff --git a/access_control_stm32/.settings/stm32cubeide.project.prefs b/access_control_stm32/.settings/stm32cubeide.project.prefs
index b6e3140..cd085b3 100644
--- a/access_control_stm32/.settings/stm32cubeide.project.prefs
+++ b/access_control_stm32/.settings/stm32cubeide.project.prefs
@@ -1,5 +1,5 @@
635E684B79701B039C64EA45C3F84D30=0128DB7B22BCDE154FEB5F4DBED2CA57
-66BE74F758C12D739921AEA421D593D3=0
+66BE74F758C12D739921AEA421D593D3=4
8DF89ED150041C4CBC7CB9A9CAA90856=AB868319CB57203C6EBBFA9F981B52E0
DC22A860405A8BF2F2C095E5B6529F12=AB868319CB57203C6EBBFA9F981B52E0
eclipse.preferences.version=1
diff --git a/access_control_stm32/Core/Inc/main.h b/access_control_stm32/Core/Inc/main.h
index be60ecc..84b2573 100644
--- a/access_control_stm32/Core/Inc/main.h
+++ b/access_control_stm32/Core/Inc/main.h
@@ -65,6 +65,8 @@ void Error_Handler(void);
#define USART_RX_GPIO_Port GPIOA
#define LD2_Pin GPIO_PIN_5
#define LD2_GPIO_Port GPIOA
+#define Door_Sensor_Pin GPIO_PIN_7
+#define Door_Sensor_GPIO_Port GPIOA
#define TMS_Pin GPIO_PIN_13
#define TMS_GPIO_Port GPIOA
#define TCK_Pin GPIO_PIN_14
diff --git a/access_control_stm32/Core/Src/main.c b/access_control_stm32/Core/Src/main.c
index 122dd25..585bb9d 100644
--- a/access_control_stm32/Core/Src/main.c
+++ b/access_control_stm32/Core/Src/main.c
@@ -1,25 +1,24 @@
/* USER CODE BEGIN Header */
/**
- ******************************************************************************
- * @file : main.c
- * @brief : Main program body
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2023 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
+ ******************************************************************************
+ * @file : main.c
+ * @brief : Main program body
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
-#include "string.h"
-#include "stdio.h"
+
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
@@ -62,175 +61,180 @@ static void MX_USART2_UART_Init(void);
/* USER CODE END 0 */
/**
- * @brief The application entry point.
- * @retval int
- */
-int main(void)
-{
- /* USER CODE BEGIN 1 */
+ * @brief The application entry point.
+ * @retval int
+ */
+int main(void) {
+ /* USER CODE BEGIN 1 */
- /* USER CODE END 1 */
+ /* USER CODE END 1 */
- /* MCU Configuration--------------------------------------------------------*/
+ /* MCU Configuration--------------------------------------------------------*/
- /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
- HAL_Init();;
+ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
+ HAL_Init();
- /* USER CODE BEGIN Init */
+ /* USER CODE BEGIN Init */
- /* USER CODE END Init */
+ /* USER CODE END Init */
- /* Configure the system clock */
- SystemClock_Config();
+ /* Configure the system clock */
+ SystemClock_Config();
- /* USER CODE BEGIN SysInit */
+ /* USER CODE BEGIN SysInit */
- /* USER CODE END SysInit */
+ /* USER CODE END SysInit */
- /* Initialize all configured peripherals */
- MX_GPIO_Init();
- MX_USART2_UART_Init();
- /* USER CODE BEGIN 2 */
- memset(uart_buffer,0,10);
- /* USER CODE END 2 */
+ /* Initialize all configured peripherals */
+ MX_GPIO_Init();
+ MX_USART2_UART_Init();
+ /* USER CODE BEGIN 2 */
+ memset(uart_buffer, 0, 10);
+ /* USER CODE END 2 */
- /* Infinite loop */
- /* USER CODE BEGIN WHILE */
- while (1)
- {
- /* USER CODE END WHILE */
- if(HAL_UART_Receive(&huart2, uart_buffer+uart_index, 1, 250) == HAL_OK) {
- uart_index++;
- if(uart_buffer[uart_index-1] == 0xFF) {
- if(uart_index>1) {
- if(uart_buffer[0]==0x00) {
- HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, uart_buffer[1]);
- }
- }
- uart_index = 0;
- memset(uart_buffer,0,10);
- }
+ /* Infinite loop */
+ /* USER CODE BEGIN WHILE */
+ while (1) {
- }
- /* USER CODE BEGIN 3 */
- }
- /* USER CODE END 3 */
+ if (HAL_UART_Receive(&huart2, uart_buffer + uart_index, 1, 250)
+ == HAL_OK) {
+ uart_index++;
+ if (uart_buffer[uart_index - 1] == 0xFF) {
+ if (uart_index > 1) {
+ if (uart_buffer[0] == 0x00) {
+ HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, uart_buffer[1]);
+ } else if (uart_buffer[0] == 0x01) {
+ uint8_t payload[3] = { 0x01, HAL_GPIO_ReadPin(GPIOA,
+ GPIO_PIN_7), 0xFF };
+ HAL_UART_Transmit(&huart2, payload, 3, 1500);
+ }
+ }
+ uart_index = 0;
+ memset(uart_buffer, 0, 10);
+ }
+ }
+ /* USER CODE END WHILE */
+
+ /* USER CODE BEGIN 3 */
+
+ /* USER CODE END 3 */
+ }
}
/**
- * @brief System Clock Configuration
- * @retval None
- */
-void SystemClock_Config(void)
-{
- RCC_OscInitTypeDef RCC_OscInitStruct = {0};
- RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
+ * @brief System Clock Configuration
+ * @retval None
+ */
+void SystemClock_Config(void) {
+ RCC_OscInitTypeDef RCC_OscInitStruct = { 0 };
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = { 0 };
- /** Configure the main internal regulator output voltage
- */
- __HAL_RCC_PWR_CLK_ENABLE();
- __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
+ /** Configure the main internal regulator output voltage
+ */
+ __HAL_RCC_PWR_CLK_ENABLE();
+ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
- /** Initializes the RCC Oscillators according to the specified parameters
- * in the RCC_OscInitTypeDef structure.
- */
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
- RCC_OscInitStruct.HSIState = RCC_HSI_ON;
- RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
- RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
- RCC_OscInitStruct.PLL.PLLM = 16;
- RCC_OscInitStruct.PLL.PLLN = 336;
- RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4;
- RCC_OscInitStruct.PLL.PLLQ = 4;
- if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
- {
- Error_Handler();
- }
+ /** Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
+ RCC_OscInitStruct.HSIState = RCC_HSI_ON;
+ RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
+ RCC_OscInitStruct.PLL.PLLM = 16;
+ RCC_OscInitStruct.PLL.PLLN = 336;
+ RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4;
+ RCC_OscInitStruct.PLL.PLLQ = 4;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
+ Error_Handler();
+ }
- /** Initializes the CPU, AHB and APB buses clocks
- */
- RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
- |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
- RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
- RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
+ /** Initializes the CPU, AHB and APB buses clocks
+ */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
+ | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
+ RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
- if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
- {
- Error_Handler();
- }
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) {
+ Error_Handler();
+ }
}
/**
- * @brief USART2 Initialization Function
- * @param None
- * @retval None
- */
-static void MX_USART2_UART_Init(void)
-{
+ * @brief USART2 Initialization Function
+ * @param None
+ * @retval None
+ */
+static void MX_USART2_UART_Init(void) {
- /* USER CODE BEGIN USART2_Init 0 */
+ /* USER CODE BEGIN USART2_Init 0 */
- /* USER CODE END USART2_Init 0 */
+ /* USER CODE END USART2_Init 0 */
- /* USER CODE BEGIN USART2_Init 1 */
+ /* USER CODE BEGIN USART2_Init 1 */
- /* USER CODE END USART2_Init 1 */
- huart2.Instance = USART2;
- huart2.Init.BaudRate = 115200;
- huart2.Init.WordLength = UART_WORDLENGTH_8B;
- huart2.Init.StopBits = UART_STOPBITS_1;
- huart2.Init.Parity = UART_PARITY_NONE;
- huart2.Init.Mode = UART_MODE_TX_RX;
- huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
- huart2.Init.OverSampling = UART_OVERSAMPLING_16;
- if (HAL_UART_Init(&huart2) != HAL_OK)
- {
- Error_Handler();
- }
- /* USER CODE BEGIN USART2_Init 2 */
+ /* USER CODE END USART2_Init 1 */
+ huart2.Instance = USART2;
+ huart2.Init.BaudRate = 115200;
+ huart2.Init.WordLength = UART_WORDLENGTH_8B;
+ huart2.Init.StopBits = UART_STOPBITS_1;
+ huart2.Init.Parity = UART_PARITY_NONE;
+ huart2.Init.Mode = UART_MODE_TX_RX;
+ huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
+ huart2.Init.OverSampling = UART_OVERSAMPLING_16;
+ if (HAL_UART_Init(&huart2) != HAL_OK) {
+ Error_Handler();
+ }
+ /* USER CODE BEGIN USART2_Init 2 */
- /* USER CODE END USART2_Init 2 */
+ /* USER CODE END USART2_Init 2 */
}
/**
- * @brief GPIO Initialization Function
- * @param None
- * @retval None
- */
-static void MX_GPIO_Init(void)
-{
- GPIO_InitTypeDef GPIO_InitStruct = {0};
-/* USER CODE BEGIN MX_GPIO_Init_1 */
-/* USER CODE END MX_GPIO_Init_1 */
+ * @brief GPIO Initialization Function
+ * @param None
+ * @retval None
+ */
+static void MX_GPIO_Init(void) {
+ GPIO_InitTypeDef GPIO_InitStruct = { 0 };
+ /* USER CODE BEGIN MX_GPIO_Init_1 */
+ /* USER CODE END MX_GPIO_Init_1 */
- /* GPIO Ports Clock Enable */
- __HAL_RCC_GPIOC_CLK_ENABLE();
- __HAL_RCC_GPIOH_CLK_ENABLE();
- __HAL_RCC_GPIOA_CLK_ENABLE();
- __HAL_RCC_GPIOB_CLK_ENABLE();
+ /* GPIO Ports Clock Enable */
+ __HAL_RCC_GPIOC_CLK_ENABLE();
+ __HAL_RCC_GPIOH_CLK_ENABLE();
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ __HAL_RCC_GPIOB_CLK_ENABLE();
- /*Configure GPIO pin Output Level */
- HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_RESET);
+ /*Configure GPIO pin Output Level */
+ HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_RESET);
- /*Configure GPIO pin : B1_Pin */
- GPIO_InitStruct.Pin = B1_Pin;
- GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct);
+ /*Configure GPIO pin : B1_Pin */
+ GPIO_InitStruct.Pin = B1_Pin;
+ GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct);
- /*Configure GPIO pin : LD2_Pin */
- GPIO_InitStruct.Pin = LD2_Pin;
- GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
- HAL_GPIO_Init(LD2_GPIO_Port, &GPIO_InitStruct);
+ /*Configure GPIO pin : LD2_Pin */
+ GPIO_InitStruct.Pin = LD2_Pin;
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+ HAL_GPIO_Init(LD2_GPIO_Port, &GPIO_InitStruct);
-/* USER CODE BEGIN MX_GPIO_Init_2 */
-/* USER CODE END MX_GPIO_Init_2 */
+ /*Configure GPIO pin : Door_Sensor_Pin */
+ GPIO_InitStruct.Pin = Door_Sensor_Pin;
+ GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
+ GPIO_InitStruct.Pull = GPIO_PULLUP;
+ HAL_GPIO_Init(Door_Sensor_GPIO_Port, &GPIO_InitStruct);
+
+ /* USER CODE BEGIN MX_GPIO_Init_2 */
+ /* USER CODE END MX_GPIO_Init_2 */
}
/* USER CODE BEGIN 4 */
@@ -238,18 +242,16 @@ static void MX_GPIO_Init(void)
/* USER CODE END 4 */
/**
- * @brief This function is executed in case of error occurrence.
- * @retval None
- */
-void Error_Handler(void)
-{
- /* USER CODE BEGIN Error_Handler_Debug */
- /* User can add his own implementation to report the HAL error return state */
- __disable_irq();
- while (1)
- {
- }
- /* USER CODE END Error_Handler_Debug */
+ * @brief This function is executed in case of error occurrence.
+ * @retval None
+ */
+void Error_Handler(void) {
+ /* USER CODE BEGIN Error_Handler_Debug */
+ /* User can add his own implementation to report the HAL error return state */
+ __disable_irq();
+ while (1) {
+ }
+ /* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
diff --git a/access_control_stm32/Debug/Core/Src/main.cyclo b/access_control_stm32/Debug/Core/Src/main.cyclo
index 6be0e03..8458c9f 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:68:5:main 5
-../Core/Src/main.c:124:6:SystemClock_Config 3
-../Core/Src/main.c:171:13:MX_USART2_UART_Init 2
-../Core/Src/main.c:204:13:MX_GPIO_Init 1
-../Core/Src/main.c:244:6:Error_Handler 1
+../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
diff --git a/access_control_stm32/Debug/Core/Src/main.o b/access_control_stm32/Debug/Core/Src/main.o
index a74d0e1..88bf8d3 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 e459db8..facc2af 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:68:5:main 8 static
-../Core/Src/main.c:124:6:SystemClock_Config 88 static
-../Core/Src/main.c:171:13:MX_USART2_UART_Init 8 static
-../Core/Src/main.c:204:13:MX_GPIO_Init 48 static
-../Core/Src/main.c:244:6:Error_Handler 4 static,ignoring_inline_asm
+../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
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 06a3e5f..15a5796 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 be57fba..9c11b31 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/access_control_stm32.elf b/access_control_stm32/Debug/access_control_stm32.elf
index 8058c18..fe6cc01 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 ff8aebb..e5d65c7 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 00001ebc 08000198 08000198 00010198 2**2
+ 1 .text 00001e58 08000198 08000198 00010198 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
- 2 .rodata 00000018 08002054 08002054 00012054 2**2
+ 2 .rodata 00000020 08001ff0 08001ff0 00011ff0 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 3 .ARM.extab 00000000 0800206c 0800206c 0002000c 2**0
+ 3 .ARM.extab 00000000 08002010 08002010 0002000c 2**0
CONTENTS
- 4 .ARM 00000008 0800206c 0800206c 0001206c 2**2
+ 4 .ARM 00000008 08002010 08002010 00012010 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 5 .preinit_array 00000000 08002074 08002074 0002000c 2**0
+ 5 .preinit_array 00000000 08002018 08002018 0002000c 2**0
CONTENTS, ALLOC, LOAD, DATA
- 6 .init_array 00000004 08002074 08002074 00012074 2**2
+ 6 .init_array 00000004 08002018 08002018 00012018 2**2
CONTENTS, ALLOC, LOAD, DATA
- 7 .fini_array 00000004 08002078 08002078 00012078 2**2
+ 7 .fini_array 00000004 0800201c 0800201c 0001201c 2**2
CONTENTS, ALLOC, LOAD, DATA
- 8 .data 0000000c 20000000 0800207c 00020000 2**2
+ 8 .data 0000000c 20000000 08002020 00020000 2**2
CONTENTS, ALLOC, LOAD, DATA
- 9 .bss 00000070 2000000c 08002088 0002000c 2**2
+ 9 .bss 00000070 2000000c 0800202c 0002000c 2**2
ALLOC
- 10 ._user_heap_stack 00000604 2000007c 08002088 0002007c 2**0
+ 10 ._user_heap_stack 00000604 2000007c 0800202c 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 000070cd 00000000 00000000 0002007f 2**0
+ 13 .debug_info 000070ba 00000000 00000000 0002007f 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 14 .debug_abbrev 000012d3 00000000 00000000 0002714c 2**0
+ 14 .debug_abbrev 000012d1 00000000 00000000 00027139 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 15 .debug_aranges 00000608 00000000 00000000 00028420 2**3
+ 15 .debug_aranges 00000608 00000000 00000000 00028410 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
- 16 .debug_rnglists 0000049d 00000000 00000000 00028a28 2**0
+ 16 .debug_rnglists 0000049c 00000000 00000000 00028a18 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 17 .debug_macro 000152be 00000000 00000000 00028ec5 2**0
+ 17 .debug_macro 0001483d 00000000 00000000 00028eb4 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 18 .debug_line 00007ae1 00000000 00000000 0003e183 2**0
+ 18 .debug_line 00007952 00000000 00000000 0003d6f1 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 19 .debug_str 00085048 00000000 00000000 00045c64 2**0
+ 19 .debug_str 000818ec 00000000 00000000 00045043 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 20 .debug_frame 000017a4 00000000 00000000 000cacac 2**2
+ 20 .debug_frame 000017a4 00000000 00000000 000c6930 2**2
CONTENTS, READONLY, DEBUGGING, OCTETS
- 21 .debug_line_str 00000072 00000000 00000000 000cc450 2**0
+ 21 .debug_line_str 00000072 00000000 00000000 000c80d4 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: 0800203c .word 0x0800203c
+ 80001b8: 08001fd8 .word 0x08001fd8
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: 0800203c .word 0x0800203c
+ 80001d4: 08001fd8 .word 0x08001fd8
080001d8 <__aeabi_uldivmod>:
80001d8: b953 cbnz r3, 80001f0 <__aeabi_uldivmod+0x18>
@@ -352,4551 +352,4493 @@ Disassembly of section .text:
80004d2: bf00 nop
080004d4 :
+
/**
- * @brief The application entry point.
- * @retval int
- */
-int main(void)
-{
+ * @brief The application entry point.
+ * @retval int
+ */
+int main(void) {
80004d4: b580 push {r7, lr}
80004d6: af00 add r7, sp, #0
- /* USER CODE END 1 */
+ /* USER CODE END 1 */
- /* MCU Configuration--------------------------------------------------------*/
+ /* MCU Configuration--------------------------------------------------------*/
- /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
- HAL_Init();;
- 80004d8: f000 fa24 bl 8000924
- /* USER CODE BEGIN Init */
+ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
+ HAL_Init();
+ 80004d8: f000 fa02 bl 80008e0
+ /* USER CODE BEGIN Init */
- /* USER CODE END Init */
+ /* USER CODE END Init */
- /* Configure the system clock */
- SystemClock_Config();
- 80004dc: f000 f844 bl 8000568
- /* USER CODE BEGIN SysInit */
+ /* Configure the system clock */
+ SystemClock_Config();
+ 80004dc: f000 f816 bl 800050c
+ /* USER CODE BEGIN SysInit */
- /* USER CODE END SysInit */
+ /* USER CODE END SysInit */
- /* Initialize all configured peripherals */
- MX_GPIO_Init();
- 80004e0: f000 f8d6 bl 8000690
- MX_USART2_UART_Init();
- 80004e4: f000 f8aa bl 800063c
- /* USER CODE BEGIN 2 */
- memset(uart_buffer,0,10);
+ /* Initialize all configured peripherals */
+ MX_GPIO_Init();
+ 80004e0: f000 f8a8 bl 8000634
+ MX_USART2_UART_Init();
+ 80004e4: f000 f87c bl 80005e0
+ /* USER CODE BEGIN 2 */
+ memset(uart_buffer, 0, 10);
80004e8: 220a movs r2, #10
80004ea: 2100 movs r1, #0
- 80004ec: 481a ldr r0, [pc, #104] ; (8000558 )
- 80004ee: f001 fd79 bl 8001fe4
- /* Infinite loop */
- /* USER CODE BEGIN WHILE */
- while (1)
- {
- /* USER CODE END WHILE */
- if(HAL_UART_Receive(&huart2, uart_buffer+uart_index, 1, 250) == HAL_OK) {
- 80004f2: 4b1a ldr r3, [pc, #104] ; (800055c )
- 80004f4: 781b ldrb r3, [r3, #0]
- 80004f6: 461a mov r2, r3
- 80004f8: 4b17 ldr r3, [pc, #92] ; (8000558 )
- 80004fa: 18d1 adds r1, r2, r3
- 80004fc: 23fa movs r3, #250 ; 0xfa
- 80004fe: 2201 movs r2, #1
- 8000500: 4817 ldr r0, [pc, #92] ; (8000560 )
- 8000502: f001 f9ea bl 80018da
- 8000506: 4603 mov r3, r0
- 8000508: 2b00 cmp r3, #0
- 800050a: d1f2 bne.n 80004f2
- uart_index++;
- 800050c: 4b13 ldr r3, [pc, #76] ; (800055c )
- 800050e: 781b ldrb r3, [r3, #0]
- 8000510: 3301 adds r3, #1
- 8000512: b2da uxtb r2, r3
- 8000514: 4b11 ldr r3, [pc, #68] ; (800055c )
- 8000516: 701a strb r2, [r3, #0]
- if(uart_buffer[uart_index-1] == 0xFF) {
- 8000518: 4b10 ldr r3, [pc, #64] ; (800055c )
- 800051a: 781b ldrb r3, [r3, #0]
- 800051c: 3b01 subs r3, #1
- 800051e: 4a0e ldr r2, [pc, #56] ; (8000558 )
- 8000520: 5cd3 ldrb r3, [r2, r3]
- 8000522: 2bff cmp r3, #255 ; 0xff
- 8000524: d1e5 bne.n 80004f2
- if(uart_index>1) {
- 8000526: 4b0d ldr r3, [pc, #52] ; (800055c )
- 8000528: 781b ldrb r3, [r3, #0]
- 800052a: 2b01 cmp r3, #1
- 800052c: d90a bls.n 8000544
- if(uart_buffer[0]==0x00) {
- 800052e: 4b0a ldr r3, [pc, #40] ; (8000558 )
- 8000530: 781b ldrb r3, [r3, #0]
- 8000532: 2b00 cmp r3, #0
- 8000534: d106 bne.n 8000544
- HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, uart_buffer[1]);
- 8000536: 4b08 ldr r3, [pc, #32] ; (8000558 )
- 8000538: 785b ldrb r3, [r3, #1]
- 800053a: 461a mov r2, r3
- 800053c: 2120 movs r1, #32
- 800053e: 4809 ldr r0, [pc, #36] ; (8000564 )
- 8000540: f000 fccc bl 8000edc
- }
- }
- uart_index = 0;
- 8000544: 4b05 ldr r3, [pc, #20] ; (800055c )
- 8000546: 2200 movs r2, #0
- 8000548: 701a strb r2, [r3, #0]
- memset(uart_buffer,0,10);
- 800054a: 220a movs r2, #10
- 800054c: 2100 movs r1, #0
- 800054e: 4802 ldr r0, [pc, #8] ; (8000558 )
- 8000550: f001 fd48 bl 8001fe4
- if(HAL_UART_Receive(&huart2, uart_buffer+uart_index, 1, 250) == HAL_OK) {
- 8000554: e7cd b.n 80004f2
- 8000556: bf00 nop
- 8000558: 2000006c .word 0x2000006c
- 800055c: 20000076 .word 0x20000076
- 8000560: 20000028 .word 0x20000028
- 8000564: 40020000 .word 0x40020000
+ 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
+
+0800050c :
-08000568 :
/**
- * @brief System Clock Configuration
- * @retval None
- */
-void SystemClock_Config(void)
-{
- 8000568: b580 push {r7, lr}
- 800056a: b094 sub sp, #80 ; 0x50
- 800056c: af00 add r7, sp, #0
- RCC_OscInitTypeDef RCC_OscInitStruct = {0};
- 800056e: f107 0320 add.w r3, r7, #32
- 8000572: 2230 movs r2, #48 ; 0x30
- 8000574: 2100 movs r1, #0
- 8000576: 4618 mov r0, r3
- 8000578: f001 fd34 bl 8001fe4
- RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
- 800057c: f107 030c add.w r3, r7, #12
- 8000580: 2200 movs r2, #0
- 8000582: 601a str r2, [r3, #0]
- 8000584: 605a str r2, [r3, #4]
- 8000586: 609a str r2, [r3, #8]
- 8000588: 60da str r2, [r3, #12]
- 800058a: 611a str r2, [r3, #16]
+ * @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
+ 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
+ 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]
- /** Configure the main internal regulator output voltage
- */
- __HAL_RCC_PWR_CLK_ENABLE();
- 800058c: 2300 movs r3, #0
- 800058e: 60bb str r3, [r7, #8]
- 8000590: 4b28 ldr r3, [pc, #160] ; (8000634 )
- 8000592: 6c1b ldr r3, [r3, #64] ; 0x40
- 8000594: 4a27 ldr r2, [pc, #156] ; (8000634 )
- 8000596: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
- 800059a: 6413 str r3, [r2, #64] ; 0x40
- 800059c: 4b25 ldr r3, [pc, #148] ; (8000634 )
- 800059e: 6c1b ldr r3, [r3, #64] ; 0x40
- 80005a0: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
- 80005a4: 60bb str r3, [r7, #8]
- 80005a6: 68bb ldr r3, [r7, #8]
- __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
- 80005a8: 2300 movs r3, #0
- 80005aa: 607b str r3, [r7, #4]
- 80005ac: 4b22 ldr r3, [pc, #136] ; (8000638 )
- 80005ae: 681b ldr r3, [r3, #0]
- 80005b0: 4a21 ldr r2, [pc, #132] ; (8000638 )
- 80005b2: f443 4340 orr.w r3, r3, #49152 ; 0xc000
- 80005b6: 6013 str r3, [r2, #0]
- 80005b8: 4b1f ldr r3, [pc, #124] ; (8000638 )
- 80005ba: 681b ldr r3, [r3, #0]
- 80005bc: f403 4340 and.w r3, r3, #49152 ; 0xc000
- 80005c0: 607b str r3, [r7, #4]
- 80005c2: 687b ldr r3, [r7, #4]
+ /** 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]
+ __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]
- /** Initializes the RCC Oscillators according to the specified parameters
- * in the RCC_OscInitTypeDef structure.
- */
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
- 80005c4: 2302 movs r3, #2
- 80005c6: 623b str r3, [r7, #32]
- RCC_OscInitStruct.HSIState = RCC_HSI_ON;
- 80005c8: 2301 movs r3, #1
- 80005ca: 62fb str r3, [r7, #44] ; 0x2c
- RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
- 80005cc: 2310 movs r3, #16
- 80005ce: 633b str r3, [r7, #48] ; 0x30
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
- 80005d0: 2302 movs r3, #2
- 80005d2: 63bb str r3, [r7, #56] ; 0x38
- RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
- 80005d4: 2300 movs r3, #0
- 80005d6: 63fb str r3, [r7, #60] ; 0x3c
- RCC_OscInitStruct.PLL.PLLM = 16;
- 80005d8: 2310 movs r3, #16
- 80005da: 643b str r3, [r7, #64] ; 0x40
- RCC_OscInitStruct.PLL.PLLN = 336;
- 80005dc: f44f 73a8 mov.w r3, #336 ; 0x150
- 80005e0: 647b str r3, [r7, #68] ; 0x44
- RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4;
- 80005e2: 2304 movs r3, #4
- 80005e4: 64bb str r3, [r7, #72] ; 0x48
- RCC_OscInitStruct.PLL.PLLQ = 4;
- 80005e6: 2304 movs r3, #4
- 80005e8: 64fb str r3, [r7, #76] ; 0x4c
- if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
- 80005ea: f107 0320 add.w r3, r7, #32
- 80005ee: 4618 mov r0, r3
- 80005f0: f000 fc8e bl 8000f10
- 80005f4: 4603 mov r3, r0
- 80005f6: 2b00 cmp r3, #0
- 80005f8: d001 beq.n 80005fe
- {
- Error_Handler();
- 80005fa: f000 f8b7 bl 800076c
- }
+ /** 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]
+ RCC_OscInitStruct.HSIState = RCC_HSI_ON;
+ 800056c: 2301 movs r3, #1
+ 800056e: 62fb str r3, [r7, #44] ; 0x2c
+ RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
+ 8000570: 2310 movs r3, #16
+ 8000572: 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
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
+ 8000578: 2300 movs r3, #0
+ 800057a: 63fb str r3, [r7, #60] ; 0x3c
+ RCC_OscInitStruct.PLL.PLLM = 16;
+ 800057c: 2310 movs r3, #16
+ 800057e: 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
+ RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4;
+ 8000586: 2304 movs r3, #4
+ 8000588: 64bb str r3, [r7, #72] ; 0x48
+ RCC_OscInitStruct.PLL.PLLQ = 4;
+ 800058a: 2304 movs r3, #4
+ 800058c: 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
+ Error_Handler();
+ 800059e: f000 f8c3 bl 8000728
+ }
- /** Initializes the CPU, AHB and APB buses clocks
- */
- RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
- 80005fe: 230f movs r3, #15
- 8000600: 60fb str r3, [r7, #12]
- |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
- 8000602: 2302 movs r3, #2
- 8000604: 613b str r3, [r7, #16]
- RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- 8000606: 2300 movs r3, #0
- 8000608: 617b str r3, [r7, #20]
- RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
- 800060a: f44f 5380 mov.w r3, #4096 ; 0x1000
- 800060e: 61bb str r3, [r7, #24]
- RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
- 8000610: 2300 movs r3, #0
- 8000612: 61fb str r3, [r7, #28]
+ /** 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]
+ | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ 80005a6: 2302 movs r3, #2
+ 80005a8: 613b str r3, [r7, #16]
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ 80005aa: 2300 movs r3, #0
+ 80005ac: 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]
+ RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
+ 80005b4: 2300 movs r3, #0
+ 80005b6: 61fb str r3, [r7, #28]
- if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
- 8000614: f107 030c add.w r3, r7, #12
- 8000618: 2102 movs r1, #2
- 800061a: 4618 mov r0, r3
- 800061c: f000 fef0 bl 8001400
- 8000620: 4603 mov r3, r0
- 8000622: 2b00 cmp r3, #0
- 8000624: d001 beq.n 800062a
- {
- Error_Handler();
- 8000626: f000 f8a1 bl 800076c
- }
+ 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
+ Error_Handler();
+ 80005ca: f000 f8ad bl 8000728
+ }
}
+ 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
+
+080005e0 :
+/**
+ * @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
+ /* 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]
+ 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]
+ huart2.Init.WordLength = UART_WORDLENGTH_8B;
+ 80005f2: 4b0e ldr r3, [pc, #56] ; (800062c )
+ 80005f4: 2200 movs r2, #0
+ 80005f6: 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]
+ huart2.Init.Parity = UART_PARITY_NONE;
+ 80005fe: 4b0b ldr r3, [pc, #44] ; (800062c )
+ 8000600: 2200 movs r2, #0
+ 8000602: 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]
+ huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
+ 800060a: 4b08 ldr r3, [pc, #32] ; (800062c )
+ 800060c: 2200 movs r2, #0
+ 800060e: 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]
+ 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
+ Error_Handler();
+ 8000622: f000 f881 bl 8000728
+ }
+ /* USER CODE BEGIN USART2_Init 2 */
+
+ /* USER CODE END USART2_Init 2 */
+
+}
+ 8000626: bf00 nop
+ 8000628: bd80 pop {r7, pc}
800062a: bf00 nop
- 800062c: 3750 adds r7, #80 ; 0x50
- 800062e: 46bd mov sp, r7
- 8000630: bd80 pop {r7, pc}
- 8000632: bf00 nop
- 8000634: 40023800 .word 0x40023800
- 8000638: 40007000 .word 0x40007000
+ 800062c: 20000028 .word 0x20000028
+ 8000630: 40004400 .word 0x40004400
-0800063c :
- * @brief USART2 Initialization Function
- * @param None
- * @retval None
- */
-static void MX_USART2_UART_Init(void)
-{
- 800063c: b580 push {r7, lr}
- 800063e: 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;
- 8000640: 4b11 ldr r3, [pc, #68] ; (8000688 )
- 8000642: 4a12 ldr r2, [pc, #72] ; (800068c )
- 8000644: 601a str r2, [r3, #0]
- huart2.Init.BaudRate = 115200;
- 8000646: 4b10 ldr r3, [pc, #64] ; (8000688 )
- 8000648: f44f 32e1 mov.w r2, #115200 ; 0x1c200
- 800064c: 605a str r2, [r3, #4]
- huart2.Init.WordLength = UART_WORDLENGTH_8B;
- 800064e: 4b0e ldr r3, [pc, #56] ; (8000688 )
- 8000650: 2200 movs r2, #0
- 8000652: 609a str r2, [r3, #8]
- huart2.Init.StopBits = UART_STOPBITS_1;
- 8000654: 4b0c ldr r3, [pc, #48] ; (8000688 )
- 8000656: 2200 movs r2, #0
- 8000658: 60da str r2, [r3, #12]
- huart2.Init.Parity = UART_PARITY_NONE;
- 800065a: 4b0b ldr r3, [pc, #44] ; (8000688 )
- 800065c: 2200 movs r2, #0
- 800065e: 611a str r2, [r3, #16]
- huart2.Init.Mode = UART_MODE_TX_RX;
- 8000660: 4b09 ldr r3, [pc, #36] ; (8000688 )
- 8000662: 220c movs r2, #12
- 8000664: 615a str r2, [r3, #20]
- huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
- 8000666: 4b08 ldr r3, [pc, #32] ; (8000688 )
- 8000668: 2200 movs r2, #0
- 800066a: 619a str r2, [r3, #24]
- huart2.Init.OverSampling = UART_OVERSAMPLING_16;
- 800066c: 4b06 ldr r3, [pc, #24] ; (8000688 )
- 800066e: 2200 movs r2, #0
- 8000670: 61da str r2, [r3, #28]
- if (HAL_UART_Init(&huart2) != HAL_OK)
- 8000672: 4805 ldr r0, [pc, #20] ; (8000688 )
- 8000674: f001 f8e4 bl 8001840
- 8000678: 4603 mov r3, r0
- 800067a: 2b00 cmp r3, #0
- 800067c: d001 beq.n 8000682
- {
- Error_Handler();
- 800067e: f000 f875 bl 800076c
- }
- /* USER CODE BEGIN USART2_Init 2 */
-
- /* USER CODE END USART2_Init 2 */
-
-}
- 8000682: bf00 nop
- 8000684: bd80 pop {r7, pc}
- 8000686: bf00 nop
- 8000688: 20000028 .word 0x20000028
- 800068c: 40004400 .word 0x40004400
-
-08000690 :
- * @brief GPIO Initialization Function
- * @param None
- * @retval None
- */
-static void MX_GPIO_Init(void)
-{
- 8000690: b580 push {r7, lr}
- 8000692: b08a sub sp, #40 ; 0x28
- 8000694: af00 add r7, sp, #0
- GPIO_InitTypeDef GPIO_InitStruct = {0};
- 8000696: f107 0314 add.w r3, r7, #20
- 800069a: 2200 movs r2, #0
- 800069c: 601a str r2, [r3, #0]
- 800069e: 605a str r2, [r3, #4]
- 80006a0: 609a str r2, [r3, #8]
- 80006a2: 60da str r2, [r3, #12]
- 80006a4: 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();
- 80006a6: 2300 movs r3, #0
- 80006a8: 613b str r3, [r7, #16]
- 80006aa: 4b2d ldr r3, [pc, #180] ; (8000760 )
- 80006ac: 6b1b ldr r3, [r3, #48] ; 0x30
- 80006ae: 4a2c ldr r2, [pc, #176] ; (8000760 )
- 80006b0: f043 0304 orr.w r3, r3, #4
- 80006b4: 6313 str r3, [r2, #48] ; 0x30
- 80006b6: 4b2a ldr r3, [pc, #168] ; (8000760 )
- 80006b8: 6b1b ldr r3, [r3, #48] ; 0x30
- 80006ba: f003 0304 and.w r3, r3, #4
- 80006be: 613b str r3, [r7, #16]
- 80006c0: 693b ldr r3, [r7, #16]
- __HAL_RCC_GPIOH_CLK_ENABLE();
- 80006c2: 2300 movs r3, #0
- 80006c4: 60fb str r3, [r7, #12]
- 80006c6: 4b26 ldr r3, [pc, #152] ; (8000760 )
- 80006c8: 6b1b ldr r3, [r3, #48] ; 0x30
- 80006ca: 4a25 ldr r2, [pc, #148] ; (8000760 )
- 80006cc: f043 0380 orr.w r3, r3, #128 ; 0x80
- 80006d0: 6313 str r3, [r2, #48] ; 0x30
- 80006d2: 4b23 ldr r3, [pc, #140] ; (8000760 )
- 80006d4: 6b1b ldr r3, [r3, #48] ; 0x30
- 80006d6: f003 0380 and.w r3, r3, #128 ; 0x80
- 80006da: 60fb str r3, [r7, #12]
- 80006dc: 68fb ldr r3, [r7, #12]
- __HAL_RCC_GPIOA_CLK_ENABLE();
- 80006de: 2300 movs r3, #0
- 80006e0: 60bb str r3, [r7, #8]
- 80006e2: 4b1f ldr r3, [pc, #124] ; (8000760 )
- 80006e4: 6b1b ldr r3, [r3, #48] ; 0x30
- 80006e6: 4a1e ldr r2, [pc, #120] ; (8000760 )
- 80006e8: f043 0301 orr.w r3, r3, #1
- 80006ec: 6313 str r3, [r2, #48] ; 0x30
- 80006ee: 4b1c ldr r3, [pc, #112] ; (8000760 )
- 80006f0: 6b1b ldr r3, [r3, #48] ; 0x30
- 80006f2: f003 0301 and.w r3, r3, #1
- 80006f6: 60bb str r3, [r7, #8]
- 80006f8: 68bb ldr r3, [r7, #8]
- __HAL_RCC_GPIOB_CLK_ENABLE();
- 80006fa: 2300 movs r3, #0
- 80006fc: 607b str r3, [r7, #4]
- 80006fe: 4b18 ldr r3, [pc, #96] ; (8000760 )
- 8000700: 6b1b ldr r3, [r3, #48] ; 0x30
- 8000702: 4a17 ldr r2, [pc, #92] ; (8000760 )
- 8000704: f043 0302 orr.w r3, r3, #2
- 8000708: 6313 str r3, [r2, #48] ; 0x30
- 800070a: 4b15 ldr r3, [pc, #84] ; (8000760 )
- 800070c: 6b1b ldr r3, [r3, #48] ; 0x30
- 800070e: f003 0302 and.w r3, r3, #2
- 8000712: 607b str r3, [r7, #4]
- 8000714: 687b ldr r3, [r7, #4]
-
- /*Configure GPIO pin Output Level */
- HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_RESET);
- 8000716: 2200 movs r2, #0
- 8000718: 2120 movs r1, #32
- 800071a: 4812 ldr r0, [pc, #72] ; (8000764 )
- 800071c: f000 fbde bl 8000edc
-
- /*Configure GPIO pin : B1_Pin */
- GPIO_InitStruct.Pin = B1_Pin;
- 8000720: f44f 5300 mov.w r3, #8192 ; 0x2000
- 8000724: 617b str r3, [r7, #20]
- GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
- 8000726: f44f 1304 mov.w r3, #2162688 ; 0x210000
- 800072a: 61bb str r3, [r7, #24]
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- 800072c: 2300 movs r3, #0
- 800072e: 61fb str r3, [r7, #28]
- HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct);
- 8000730: f107 0314 add.w r3, r7, #20
- 8000734: 4619 mov r1, r3
- 8000736: 480c ldr r0, [pc, #48] ; (8000768 )
- 8000738: f000 fa4c bl 8000bd4
-
- /*Configure GPIO pin : LD2_Pin */
- GPIO_InitStruct.Pin = LD2_Pin;
- 800073c: 2320 movs r3, #32
- 800073e: 617b str r3, [r7, #20]
- GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
- 8000740: 2301 movs r3, #1
- 8000742: 61bb str r3, [r7, #24]
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- 8000744: 2300 movs r3, #0
- 8000746: 61fb str r3, [r7, #28]
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
- 8000748: 2300 movs r3, #0
- 800074a: 623b str r3, [r7, #32]
- HAL_GPIO_Init(LD2_GPIO_Port, &GPIO_InitStruct);
- 800074c: f107 0314 add.w r3, r7, #20
- 8000750: 4619 mov r1, r3
- 8000752: 4804 ldr r0, [pc, #16] ; (8000764 )
- 8000754: f000 fa3e bl 8000bd4
-
-/* USER CODE BEGIN MX_GPIO_Init_2 */
-/* USER CODE END MX_GPIO_Init_2 */
-}
- 8000758: bf00 nop
- 800075a: 3728 adds r7, #40 ; 0x28
- 800075c: 46bd mov sp, r7
- 800075e: bd80 pop {r7, pc}
- 8000760: 40023800 .word 0x40023800
- 8000764: 40020000 .word 0x40020000
- 8000768: 40020800 .word 0x40020800
-
-0800076c :
+08000634 :
/**
- * @brief This function is executed in case of error occurrence.
- * @retval None
- */
-void Error_Handler(void)
-{
- 800076c: b480 push {r7}
- 800076e: af00 add r7, sp, #0
+ * @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
+ 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]
+ /* 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]
+ __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]
+ __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]
+ __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]
+
+ /*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
+
+ /*Configure GPIO pin : B1_Pin */
+ GPIO_InitStruct.Pin = B1_Pin;
+ 80006c4: f44f 5300 mov.w r3, #8192 ; 0x2000
+ 80006c8: 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]
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ 80006d0: 2300 movs r3, #0
+ 80006d2: 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
+
+ /*Configure GPIO pin : LD2_Pin */
+ GPIO_InitStruct.Pin = LD2_Pin;
+ 80006e0: 2320 movs r3, #32
+ 80006e2: 617b str r3, [r7, #20]
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+ 80006e4: 2301 movs r3, #1
+ 80006e6: 61bb str r3, [r7, #24]
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ 80006e8: 2300 movs r3, #0
+ 80006ea: 61fb str r3, [r7, #28]
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+ 80006ec: 2300 movs r3, #0
+ 80006ee: 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
+
+ /*Configure GPIO pin : Door_Sensor_Pin */
+ GPIO_InitStruct.Pin = Door_Sensor_Pin;
+ 80006fc: 2380 movs r3, #128 ; 0x80
+ 80006fe: 617b str r3, [r7, #20]
+ GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
+ 8000700: 2300 movs r3, #0
+ 8000702: 61bb str r3, [r7, #24]
+ GPIO_InitStruct.Pull = GPIO_PULLUP;
+ 8000704: 2301 movs r3, #1
+ 8000706: 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
+
+ /* 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
+
+08000728 :
+
+/**
+ * @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
\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");
- 8000770: b672 cpsid i
+ 800072c: b672 cpsid i
}
- 8000772: 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)
- 8000774: e7fe b.n 8000774
+ 800072e: 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
...
-08000778 :
+08000734 :
/* USER CODE END 0 */
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
{
- 8000778: b580 push {r7, lr}
- 800077a: b082 sub sp, #8
- 800077c: af00 add r7, sp, #0
+ 8000734: b580 push {r7, lr}
+ 8000736: b082 sub sp, #8
+ 8000738: af00 add r7, sp, #0
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
__HAL_RCC_SYSCFG_CLK_ENABLE();
- 800077e: 2300 movs r3, #0
- 8000780: 607b str r3, [r7, #4]
- 8000782: 4b10 ldr r3, [pc, #64] ; (80007c4 )
- 8000784: 6c5b ldr r3, [r3, #68] ; 0x44
- 8000786: 4a0f ldr r2, [pc, #60] ; (80007c4 )
- 8000788: f443 4380 orr.w r3, r3, #16384 ; 0x4000
- 800078c: 6453 str r3, [r2, #68] ; 0x44
- 800078e: 4b0d ldr r3, [pc, #52] ; (80007c4 )
- 8000790: 6c5b ldr r3, [r3, #68] ; 0x44
- 8000792: f403 4380 and.w r3, r3, #16384 ; 0x4000
- 8000796: 607b str r3, [r7, #4]
- 8000798: 687b ldr r3, [r7, #4]
+ 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]
__HAL_RCC_PWR_CLK_ENABLE();
- 800079a: 2300 movs r3, #0
- 800079c: 603b str r3, [r7, #0]
- 800079e: 4b09 ldr r3, [pc, #36] ; (80007c4 )
- 80007a0: 6c1b ldr r3, [r3, #64] ; 0x40
- 80007a2: 4a08 ldr r2, [pc, #32] ; (80007c4 )
- 80007a4: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
- 80007a8: 6413 str r3, [r2, #64] ; 0x40
- 80007aa: 4b06 ldr r3, [pc, #24] ; (80007c4 )
- 80007ac: 6c1b ldr r3, [r3, #64] ; 0x40
- 80007ae: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
- 80007b2: 603b str r3, [r7, #0]
- 80007b4: 683b ldr r3, [r7, #0]
+ 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]
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_0);
- 80007b6: 2007 movs r0, #7
- 80007b8: f000 f9d8 bl 8000b6c
+ 8000772: 2007 movs r0, #7
+ 8000774: f000 f9d8 bl 8000b28
/* System interrupt init*/
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
}
- 80007bc: bf00 nop
- 80007be: 3708 adds r7, #8
- 80007c0: 46bd mov sp, r7
- 80007c2: bd80 pop {r7, pc}
- 80007c4: 40023800 .word 0x40023800
+ 8000778: bf00 nop
+ 800077a: 3708 adds r7, #8
+ 800077c: 46bd mov sp, r7
+ 800077e: bd80 pop {r7, pc}
+ 8000780: 40023800 .word 0x40023800
-080007c8 :
+08000784 :
* This function configures the hardware resources used in this example
* @param huart: UART handle pointer
* @retval None
*/
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
{
- 80007c8: b580 push {r7, lr}
- 80007ca: b08a sub sp, #40 ; 0x28
- 80007cc: af00 add r7, sp, #0
- 80007ce: 6078 str r0, [r7, #4]
+ 8000784: b580 push {r7, lr}
+ 8000786: b08a sub sp, #40 ; 0x28
+ 8000788: af00 add r7, sp, #0
+ 800078a: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
- 80007d0: f107 0314 add.w r3, r7, #20
- 80007d4: 2200 movs r2, #0
- 80007d6: 601a str r2, [r3, #0]
- 80007d8: 605a str r2, [r3, #4]
- 80007da: 609a str r2, [r3, #8]
- 80007dc: 60da str r2, [r3, #12]
- 80007de: 611a str r2, [r3, #16]
+ 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]
if(huart->Instance==USART2)
- 80007e0: 687b ldr r3, [r7, #4]
- 80007e2: 681b ldr r3, [r3, #0]
- 80007e4: 4a19 ldr r2, [pc, #100] ; (800084c )
- 80007e6: 4293 cmp r3, r2
- 80007e8: d12b bne.n 8000842
+ 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
{
/* USER CODE BEGIN USART2_MspInit 0 */
/* USER CODE END USART2_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_USART2_CLK_ENABLE();
- 80007ea: 2300 movs r3, #0
- 80007ec: 613b str r3, [r7, #16]
- 80007ee: 4b18 ldr r3, [pc, #96] ; (8000850 )
- 80007f0: 6c1b ldr r3, [r3, #64] ; 0x40
- 80007f2: 4a17 ldr r2, [pc, #92] ; (8000850 )
- 80007f4: f443 3300 orr.w r3, r3, #131072 ; 0x20000
- 80007f8: 6413 str r3, [r2, #64] ; 0x40
- 80007fa: 4b15 ldr r3, [pc, #84] ; (8000850 )
- 80007fc: 6c1b ldr r3, [r3, #64] ; 0x40
- 80007fe: f403 3300 and.w r3, r3, #131072 ; 0x20000
- 8000802: 613b str r3, [r7, #16]
- 8000804: 693b ldr r3, [r7, #16]
+ 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]
__HAL_RCC_GPIOA_CLK_ENABLE();
- 8000806: 2300 movs r3, #0
- 8000808: 60fb str r3, [r7, #12]
- 800080a: 4b11 ldr r3, [pc, #68] ; (8000850 )
- 800080c: 6b1b ldr r3, [r3, #48] ; 0x30
- 800080e: 4a10 ldr r2, [pc, #64] ; (8000850 )
- 8000810: f043 0301 orr.w r3, r3, #1
- 8000814: 6313 str r3, [r2, #48] ; 0x30
- 8000816: 4b0e ldr r3, [pc, #56] ; (8000850 )
- 8000818: 6b1b ldr r3, [r3, #48] ; 0x30
- 800081a: f003 0301 and.w r3, r3, #1
- 800081e: 60fb str r3, [r7, #12]
- 8000820: 68fb ldr r3, [r7, #12]
+ 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]
/**USART2 GPIO Configuration
PA2 ------> USART2_TX
PA3 ------> USART2_RX
*/
GPIO_InitStruct.Pin = USART_TX_Pin|USART_RX_Pin;
- 8000822: 230c movs r3, #12
- 8000824: 617b str r3, [r7, #20]
+ 80007de: 230c movs r3, #12
+ 80007e0: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
- 8000826: 2302 movs r3, #2
- 8000828: 61bb str r3, [r7, #24]
+ 80007e2: 2302 movs r3, #2
+ 80007e4: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
- 800082a: 2300 movs r3, #0
- 800082c: 61fb str r3, [r7, #28]
+ 80007e6: 2300 movs r3, #0
+ 80007e8: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
- 800082e: 2303 movs r3, #3
- 8000830: 623b str r3, [r7, #32]
+ 80007ea: 2303 movs r3, #3
+ 80007ec: 623b str r3, [r7, #32]
GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
- 8000832: 2307 movs r3, #7
- 8000834: 627b str r3, [r7, #36] ; 0x24
+ 80007ee: 2307 movs r3, #7
+ 80007f0: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
- 8000836: f107 0314 add.w r3, r7, #20
- 800083a: 4619 mov r1, r3
- 800083c: 4805 ldr r0, [pc, #20] ; (8000854 )
- 800083e: f000 f9c9 bl 8000bd4
+ 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
/* USER CODE BEGIN USART2_MspInit 1 */
/* USER CODE END USART2_MspInit 1 */
}
}
- 8000842: bf00 nop
- 8000844: 3728 adds r7, #40 ; 0x28
- 8000846: 46bd mov sp, r7
- 8000848: bd80 pop {r7, pc}
- 800084a: bf00 nop
- 800084c: 40004400 .word 0x40004400
- 8000850: 40023800 .word 0x40023800
- 8000854: 40020000 .word 0x40020000
+ 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
-08000858 :
+08000814 :
/******************************************************************************/
/**
* @brief This function handles Non maskable interrupt.
*/
void NMI_Handler(void)
{
- 8000858: b480 push {r7}
- 800085a: af00 add r7, sp, #0
+ 8000814: b480 push {r7}
+ 8000816: 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)
- 800085c: e7fe b.n 800085c
+ 8000818: e7fe b.n 8000818
-0800085e :
+0800081a :
/**
* @brief This function handles Hard fault interrupt.
*/
void HardFault_Handler(void)
{
- 800085e: b480 push {r7}
- 8000860: af00 add r7, sp, #0
+ 800081a: b480 push {r7}
+ 800081c: af00 add r7, sp, #0
/* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */
while (1)
- 8000862: e7fe b.n 8000862
+ 800081e: e7fe b.n 800081e
-08000864 :
+08000820 :
/**
* @brief This function handles Memory management fault.
*/
void MemManage_Handler(void)
{
- 8000864: b480 push {r7}
- 8000866: af00 add r7, sp, #0
+ 8000820: b480 push {r7}
+ 8000822: af00 add r7, sp, #0
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
/* USER CODE END MemoryManagement_IRQn 0 */
while (1)
- 8000868: e7fe b.n 8000868
+ 8000824: e7fe b.n 8000824
-0800086a :
+08000826 :
/**
* @brief This function handles Pre-fetch fault, memory access fault.
*/
void BusFault_Handler(void)
{
- 800086a: b480 push {r7}
- 800086c: af00 add r7, sp, #0
+ 8000826: b480 push {r7}
+ 8000828: af00 add r7, sp, #0
/* USER CODE BEGIN BusFault_IRQn 0 */
/* USER CODE END BusFault_IRQn 0 */
while (1)
- 800086e: e7fe b.n 800086e
+ 800082a: e7fe b.n 800082a
-08000870 :
+0800082c :
/**
* @brief This function handles Undefined instruction or illegal state.
*/
void UsageFault_Handler(void)
{
- 8000870: b480 push {r7}
- 8000872: af00 add r7, sp, #0
+ 800082c: b480 push {r7}
+ 800082e: af00 add r7, sp, #0
/* USER CODE BEGIN UsageFault_IRQn 0 */
/* USER CODE END UsageFault_IRQn 0 */
while (1)
- 8000874: e7fe b.n 8000874
+ 8000830: e7fe b.n 8000830
-08000876 :
+08000832 :
/**
* @brief This function handles System service call via SWI instruction.
*/
void SVC_Handler(void)
{
- 8000876: b480 push {r7}
- 8000878: af00 add r7, sp, #0
+ 8000832: b480 push {r7}
+ 8000834: af00 add r7, sp, #0
/* USER CODE END SVCall_IRQn 0 */
/* USER CODE BEGIN SVCall_IRQn 1 */
/* USER CODE END SVCall_IRQn 1 */
}
- 800087a: bf00 nop
- 800087c: 46bd mov sp, r7
- 800087e: f85d 7b04 ldr.w r7, [sp], #4
- 8000882: 4770 bx lr
+ 8000836: bf00 nop
+ 8000838: 46bd mov sp, r7
+ 800083a: f85d 7b04 ldr.w r7, [sp], #4
+ 800083e: 4770 bx lr
-08000884 :
+08000840 :
/**
* @brief This function handles Debug monitor.
*/
void DebugMon_Handler(void)
{
- 8000884: b480 push {r7}
- 8000886: af00 add r7, sp, #0
+ 8000840: b480 push {r7}
+ 8000842: af00 add r7, sp, #0
/* USER CODE END DebugMonitor_IRQn 0 */
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
/* USER CODE END DebugMonitor_IRQn 1 */
}
- 8000888: bf00 nop
- 800088a: 46bd mov sp, r7
- 800088c: f85d 7b04 ldr.w r7, [sp], #4
- 8000890: 4770 bx lr
+ 8000844: bf00 nop
+ 8000846: 46bd mov sp, r7
+ 8000848: f85d 7b04 ldr.w r7, [sp], #4
+ 800084c: 4770 bx lr
-08000892 :
+0800084e :
/**
* @brief This function handles Pendable request for system service.
*/
void PendSV_Handler(void)
{
- 8000892: b480 push {r7}
- 8000894: af00 add r7, sp, #0
+ 800084e: b480 push {r7}
+ 8000850: af00 add r7, sp, #0
/* USER CODE END PendSV_IRQn 0 */
/* USER CODE BEGIN PendSV_IRQn 1 */
/* USER CODE END PendSV_IRQn 1 */
}
- 8000896: bf00 nop
- 8000898: 46bd mov sp, r7
- 800089a: f85d 7b04 ldr.w r7, [sp], #4
- 800089e: 4770 bx lr
+ 8000852: bf00 nop
+ 8000854: 46bd mov sp, r7
+ 8000856: f85d 7b04 ldr.w r7, [sp], #4
+ 800085a: 4770 bx lr
-080008a0 :
+0800085c :
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
- 80008a0: b580 push {r7, lr}
- 80008a2: af00 add r7, sp, #0
+ 800085c: b580 push {r7, lr}
+ 800085e: af00 add r7, sp, #0
/* USER CODE BEGIN SysTick_IRQn 0 */
/* USER CODE END SysTick_IRQn 0 */
HAL_IncTick();
- 80008a4: f000 f890 bl 80009c8
+ 8000860: f000 f890 bl 8000984
/* USER CODE BEGIN SysTick_IRQn 1 */
/* USER CODE END SysTick_IRQn 1 */
}
- 80008a8: bf00 nop
- 80008aa: bd80 pop {r7, pc}
+ 8000864: bf00 nop
+ 8000866: bd80 pop {r7, pc}
-080008ac :
+08000868 :
* configuration.
* @param None
* @retval None
*/
void SystemInit(void)
{
- 80008ac: b480 push {r7}
- 80008ae: af00 add r7, sp, #0
+ 8000868: b480 push {r7}
+ 800086a: 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 */
- 80008b0: 4b06 ldr r3, [pc, #24] ; (80008cc )
- 80008b2: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
- 80008b6: 4a05 ldr r2, [pc, #20] ; (80008cc )
- 80008b8: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000
- 80008bc: f8c2 3088 str.w r3, [r2, #136] ; 0x88
+ 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
/* 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 */
}
- 80008c0: bf00 nop
- 80008c2: 46bd mov sp, r7
- 80008c4: f85d 7b04 ldr.w r7, [sp], #4
- 80008c8: 4770 bx lr
- 80008ca: bf00 nop
- 80008cc: e000ed00 .word 0xe000ed00
+ 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
-080008d0 :
+0800088c :
.section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
ldr sp, =_estack /* set stack pointer */
- 80008d0: f8df d034 ldr.w sp, [pc, #52] ; 8000908
+ 800088c: f8df d034 ldr.w sp, [pc, #52] ; 80008c4
/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
- 80008d4: 480d ldr r0, [pc, #52] ; (800090c )
+ 8000890: 480d ldr r0, [pc, #52] ; (80008c8 )
ldr r1, =_edata
- 80008d6: 490e ldr r1, [pc, #56] ; (8000910 )
+ 8000892: 490e ldr r1, [pc, #56] ; (80008cc )
ldr r2, =_sidata
- 80008d8: 4a0e ldr r2, [pc, #56] ; (8000914 )
+ 8000894: 4a0e ldr r2, [pc, #56] ; (80008d0 )
movs r3, #0
- 80008da: 2300 movs r3, #0
+ 8000896: 2300 movs r3, #0
b LoopCopyDataInit
- 80008dc: e002 b.n 80008e4
+ 8000898: e002 b.n 80008a0
-080008de :
+0800089a :
CopyDataInit:
ldr r4, [r2, r3]
- 80008de: 58d4 ldr r4, [r2, r3]
+ 800089a: 58d4 ldr r4, [r2, r3]
str r4, [r0, r3]
- 80008e0: 50c4 str r4, [r0, r3]
+ 800089c: 50c4 str r4, [r0, r3]
adds r3, r3, #4
- 80008e2: 3304 adds r3, #4
+ 800089e: 3304 adds r3, #4
-080008e4 :
+080008a0 :
LoopCopyDataInit:
adds r4, r0, r3
- 80008e4: 18c4 adds r4, r0, r3
+ 80008a0: 18c4 adds r4, r0, r3
cmp r4, r1
- 80008e6: 428c cmp r4, r1
+ 80008a2: 428c cmp r4, r1
bcc CopyDataInit
- 80008e8: d3f9 bcc.n 80008de
+ 80008a4: d3f9 bcc.n 800089a
/* Zero fill the bss segment. */
ldr r2, =_sbss
- 80008ea: 4a0b ldr r2, [pc, #44] ; (8000918 )
+ 80008a6: 4a0b ldr r2, [pc, #44] ; (80008d4 )
ldr r4, =_ebss
- 80008ec: 4c0b ldr r4, [pc, #44] ; (800091c )
+ 80008a8: 4c0b ldr r4, [pc, #44] ; (80008d8 )
movs r3, #0
- 80008ee: 2300 movs r3, #0
+ 80008aa: 2300 movs r3, #0
b LoopFillZerobss
- 80008f0: e001 b.n 80008f6
+ 80008ac: e001 b.n 80008b2
-080008f2 :
+080008ae :
FillZerobss:
str r3, [r2]
- 80008f2: 6013 str r3, [r2, #0]
+ 80008ae: 6013 str r3, [r2, #0]
adds r2, r2, #4
- 80008f4: 3204 adds r2, #4
+ 80008b0: 3204 adds r2, #4
-080008f6 :
+080008b2 :
LoopFillZerobss:
cmp r2, r4
- 80008f6: 42a2 cmp r2, r4
+ 80008b2: 42a2 cmp r2, r4
bcc FillZerobss
- 80008f8: d3fb bcc.n 80008f2
+ 80008b4: d3fb bcc.n 80008ae
/* Call the clock system initialization function.*/
bl SystemInit
- 80008fa: f7ff ffd7 bl 80008ac
+ 80008b6: f7ff ffd7 bl 8000868
/* Call static constructors */
bl __libc_init_array
- 80008fe: f001 fb79 bl 8001ff4 <__libc_init_array>
+ 80008ba: f001 fb69 bl 8001f90 <__libc_init_array>
/* Call the application's entry point.*/
bl main
- 8000902: f7ff fde7 bl 80004d4
+ 80008be: f7ff fe09 bl 80004d4
bx lr
- 8000906: 4770 bx lr
+ 80008c2: 4770 bx lr
ldr sp, =_estack /* set stack pointer */
- 8000908: 20020000 .word 0x20020000
+ 80008c4: 20020000 .word 0x20020000
ldr r0, =_sdata
- 800090c: 20000000 .word 0x20000000
+ 80008c8: 20000000 .word 0x20000000
ldr r1, =_edata
- 8000910: 2000000c .word 0x2000000c
+ 80008cc: 2000000c .word 0x2000000c
ldr r2, =_sidata
- 8000914: 0800207c .word 0x0800207c
+ 80008d0: 08002020 .word 0x08002020
ldr r2, =_sbss
- 8000918: 2000000c .word 0x2000000c
+ 80008d4: 2000000c .word 0x2000000c
ldr r4, =_ebss
- 800091c: 2000007c .word 0x2000007c
+ 80008d8: 2000007c .word 0x2000007c
-08000920 :
+080008dc :
* @retval None
*/
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
- 8000920: e7fe b.n 8000920
+ 80008dc: e7fe b.n 80008dc
...
-08000924 :
+080008e0 :
* 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)
{
- 8000924: b580 push {r7, lr}
- 8000926: af00 add r7, sp, #0
+ 80008e0: b580 push {r7, lr}
+ 80008e2: af00 add r7, sp, #0
/* Configure Flash prefetch, Instruction cache, Data cache */
#if (INSTRUCTION_CACHE_ENABLE != 0U)
__HAL_FLASH_INSTRUCTION_CACHE_ENABLE();
- 8000928: 4b0e ldr r3, [pc, #56] ; (8000964